|
|
(self.webpackChunk=self.webpackChunk||[]).push([[4496],{40001:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},26227:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},41464:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},73331:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},15277:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},61485:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},47472:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},87395:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(60499),ut=ie(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Je=ve,be=ie(7657),Se=function(fe,et){return ut.createElement(be.Z,(0,te.Z)({},fe,{ref:et,icon:Je}))},He=ut.forwardRef(Se),nt=He},88319:function(){"use strict"},94896:function(){"use strict"},74501:function(rn,jt){"use strict";jt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},84915: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 rn={},jt="5.0",ie={},te=null,ut=!1,ve=!1,Je=null,be=!1,Se=null,He=null,nt=0;nt<arguments.length;nt++){var Ie=arguments[nt];if(Ie!==null)switch(typeof Ie){case"number":jt=Ie.toFixed(1);break;case"string":Ie.match(new RegExp("^[0-9]\\.[0-9]+$"))?jt=Ie:Je=Ie;break;case"object":typeof Ie.is3D!="undefined"?te=Ie:ie=Ie;break;case"boolean":ut=Ie,ve=!0;break}}te===null&&(te={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ie.material_id!==void 0&&!ve&&(ut=!0)),Je!==null&&ie.id===void 0&&(ie.id=Je);var fe="",et="",xe=!1,wt=null,rt=null,We=null,Ve=!1,Ne=null,pt=null,It=null,Ot=null,gt=null;ie.height!==void 0&&(ie.height=Math.round(ie.height)),ie.width!==void 0&&(ie.width=Math.round(ie.width));var ct=function(ze){return parseFloat(ze)>4?parseFloat(ze):5};rn.setHTML5Codebase=function(ze,dt){He=ze,mt(ze,dt)},rn.setJavaCodebase=rn.setJavaCodebaseVersion=rn.isCompiledInstalled=rn.setPreCompiledScriptPath=rn.setPreCompiledResourcePath=function(){},rn.setHTML5CodebaseVersion=function(ze,dt){var bt=parseFloat(ze);if(bt!==NaN&&bt<5){console.log("The GeoGebra HTML5 codebase version "+bt+" is deprecated. Using version latest instead.");return}Se=ze,de(ze,dt)},rn.getHTML5CodebaseVersion=function(){return rt},rn.getParameters=function(){return ie},rn.setFontsCSSURL=function(ze){Ot=ze},rn.setGiacJSURL=function(ze){},rn.setJNLPFile=function(ze){fe=ze},rn.setJNLPBaseDir=function(ze){},rn.inject=function(){function ze(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var dt="auto",bt=ie.id,un,At=!1,sn=0;sn<arguments.length;sn++){var it=arguments[sn];typeof it=="string"?(it=it.toLowerCase(),it.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?dt=it:bt=arguments[sn]):typeof it=="boolean"?At=it:it instanceof HTMLElement&&(un=it)}_t();function _t(){if(!be){setTimeout(_t,200);return}dt=qt(dt);var ht=un||document.getElementById(bt);if(!ht){console.log("possibly bug on ajax loading? ");return}if(rn.removeExistingApplet(ht,!1),ie.width===void 0&&ht.clientWidth&&(ie.width=ht.clientWidth),ie.height===void 0&&ht.clientHeight&&(ie.height=ht.clientHeight),!(ie.width&&ie.height)&&dt==="html5"&&(delete ie.width,delete ie.height),wt=dt,dt==="screenshot")ot(ht,ie);else{var se=!1;ie.hasOwnProperty("playButton")&&ie.playButton||ie.hasOwnProperty("clickToLoad")&&ie.clickToLoad?se=!0:ie.hasOwnProperty("playButtonAutoDecide")&&ie.playButtonAutoDecide&&(se=(!yt()||ze())&&Ke()),se?(wt="screenshot",St(ht,ie,At,dt)):lt(ht,ie,At)}}};function yt(){try{return window.self!==window.top}catch(ze){return!0}}function Ke(){return ie.hasOwnProperty("screenshotGenerator")&&ie.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}rn.getViews=function(){return te},rn.isJavaInstalled=function(){return!1};var Bt=function(ze){var dt=function(sn){var it=JSON.parse(sn),_t=function(ee){return ee.type=="G"||ee.type=="E"},ht=it.elements?it.elements.filter(_t)[0]:it;if(!ht||!ht.url){bt();return}ie.fileName=ht.url,Fe(ht.settings||{}),te.is3D=!0;var se="https://www.geogebra.org/images/";rn.setPreviewImage(Ne||ht.previewUrl,se+"GeoGebra_loading.png",se+"applet_play.png"),ze()},bt=function(){ie.onError&&ie.onError(),en("Error: Fetching material (id "+ie.material_id+") failed.",ie)},un=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",At="/materials/"+ie.material_id+"?scope=basic";_e("https://"+un+"/api/proxy.php?path="+encodeURIComponent(At),dt,bt)};function Fe(ze){var dt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(bt){ze[bt]=!!ze[bt]}),dt.forEach(function(bt){ie[bt]===void 0&&ze[bt]!==void 0&&(ie[bt]=ze[bt])}),ie.showToolBarHelp===void 0&&(ie.showToolBarHelp=ie.showToolBar)}function _e(ze,dt,bt){var un=new XMLHttpRequest;un.open("GET",ze),un.onload=function(){dt(un.responseText)},un.onerror=bt,un.send()}rn.isHTML5Installed=function(){return!0},rn.getLoadedAppletType=function(){return wt},rn.setPreviewImage=function(ze,dt,bt){Ne=ze,pt=dt,It=bt},rn.removeExistingApplet=function(ze,dt){var bt;typeof ze=="string"&&(ze=document.getElementById(ze)),wt=null;var un=null;for(bt=0;bt<ze.childNodes.length;bt++){var At=ze.childNodes[bt],sn=At.className;sn==="applet_screenshot"?dt?(At.style.display="block",wt="screenshot"):At.style.display="none":sn!=="applet_scaler prerender"&&(ze.removeChild(At),un=sn&&sn.indexOf("appletParameters")!=-1?At.id:null,bt--)}var it=ie.id!==void 0?ie.id:un,_t=window[it];_t&&typeof _t.getBase64=="function"&&(_t.remove(),window[it]=null)},rn.refreshHitPoints=function(){if(ct(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ze=rn.getAppletObject();return ze&&typeof ze.recalculateEnvironments=="function"?(ze.recalculateEnvironments(),!0):!1},rn.startAnimation=function(){var ze=rn.getAppletObject();return ze&&typeof ze.startAnimation=="function"?(ze.startAnimation(),!0):!1},rn.stopAnimation=function(){var ze=rn.getAppletObject();return ze&&typeof ze.stopAnimation=="function"?(ze.stopAnimation(),!0):!1},rn.getAppletObject=function(){var ze=ie.id!==void 0?ie.id:"ggbApplet";return window[ze]},rn.resize=function(){};var ft=function(ze,dt,bt){var un=document.createElement("param");un.setAttribute("name",dt),un.setAttribute("value",bt),ze.appendChild(un)},Re=function(ze){return ze&&ze!=="false"},lt=function(ze,dt,bt){ct(rt)<=4.2&&(bt=!0);var un=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==rt||ggbHTML5LoadedCodebaseIsWebSimple&&!Ve)&&(un=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var At=document.createElement("div");At.classList.add("appletParameters","notranslate");var sn=dt.width,it=dt.height;if(dt.disableAutoScale=dt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():dt.disableAutoScale,dt.width!==void 0)if(ct(rt)<=4.4)Re(dt.showToolBar)&&(dt.height-=7),Re(dt.showAlgebraInput)&&(dt.height-=37),dt.width<605&&Re(dt.showToolBar)&&(dt.width=605,sn=605);else{var _t=100;(Re(dt.showToolBar)||Re(dt.showMenuBar))&&(dt.hasOwnProperty("customToolBar")&&(dt.customToolbar=dt.customToolBar),_t=Re(dt.showMenuBar)?245:155),sn<_t&&(dt.width=_t,sn=_t)}At.style.border="none",At.style.display="inline-block";for(var ht in dt)dt.hasOwnProperty(ht)&&ht!=="appletOnLoad"&&At.setAttribute("data-param-"+ht,dt[ht]);Ot&&At.setAttribute("data-param-fontscssurl",Ot),rn.resize=function(){GGBAppletUtils.responsiveResize(ze,dt)},window.addEventListener("resize",function(Rt){rn.resize()});var se=typeof dt.appletOnLoad=="function"?dt.appletOnLoad:function(){};if(!bt&&dt.width!==void 0){dt.hasOwnProperty("showSplash")||At.setAttribute("data-param-showSplash","false");var ee=ze.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var oe=ee.querySelector(".ggb_preview");else{var oe=Ct(sn,it,dt.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=sn+"px",ee.style.height=it+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),ct(rt)>=5?(dt.appletOnLoad=function(Rt){var Dt=ze.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),se(Rt)},z||ee.appendChild(oe)):At.appendChild(oe),ee.appendChild(At),z||ze.appendChild(ee),setTimeout(function(){rn.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(At),ze.appendChild(le),dt.appletOnLoad=function(Rt){rn.resize(),se(Rt)}}function re(Rt,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Rt,Dt.appletOnLoad):renderGGBElement(Rt),en("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function Ee(Rt,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Rt,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Jt){re(Jt.article,Jt.params)}),html5AppletsToProcess=null)},ct(rt)<5&&(Rt.className+=" geogebraweb")):re(Rt,Dt)}if(un){scriptLoadStarted=!0;for(var at=0;at<At.childNodes.length;at++){var Ht=At.childNodes[at].tagName;Ht==="TABLE"&&(At.removeChild(At.childNodes[at]),at--)}if(ggbHTML5LoadedScript!==null){var Ye=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ye!=null&&Ye.parentNode.removeChild(Ye)}var tt=document.createElement("script"),vt=function(){Ee(At,dt)};tt.src=et+We,ggbHTML5LoadedCodebaseIsWebSimple=Ve,ggbHTML5LoadedCodebaseVersion=rt,ggbHTML5LoadedScript=tt.src,en("GeoGebra HTML5 codebase loaded: '"+et+"'.",dt),!He&&(!Se||Se=="5.0")?(Ve?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),vt()):et.requirejs?__webpack_require__.e(4510).then(function(){var Rt=[__webpack_require__(4510)];vt.apply(null,Rt)}.bind(this)).catch(__webpack_require__.oe):(tt.onload=vt,ze.appendChild(tt))}else Ee(At,dt);dt.height=it,dt.width=sn},ot=function(ze,dt,bt){var un=Ct(dt.width,dt.height,dt.borderColor,bt),At=document.createElement("div");At.style.position="relative",At.style.display="block",At.style.width=dt.width+"px",At.style.height=dt.height+"px",At.className="applet_screenshot applet_scaler"+(bt?" applet_screenshot_play":""),At.appendChild(un);var sn=GGBAppletUtils.getScale(dt,ze,bt);bt?(ze.appendChild(ke()),window.GGBT_wsf_view||(ze.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(At,"66%"),ze.appendChild(At),sn!==1&&!isNaN(sn)&&(GGBAppletUtils.scaleElement(At,sn),At.style.width=dt.width+"px",At.style.height=dt.height+"px",At.parentNode.style.width=dt.width*sn+"px",At.parentNode.style.height=dt.height*sn+"px"),rn.resize=function(){pe(ze,un,At,bt)},window.addEventListener("resize",function(it){rn.resize()}),rn.resize()};function pe(ze,dt,bt,un){if(ze.contains(dt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ze.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ze)}var At=GGBAppletUtils.getScale(ie,ze,un);bt.parentNode!==null&&(!isNaN(At)&&At!==1?(GGBAppletUtils.scaleElement(bt,At),bt.parentNode.style.width=ie.width*At+"px",bt.parentNode.style.height=ie.height*At+"px"):(GGBAppletUtils.scaleElement(bt,1),bt.parentNode.style.width=ie.width+"px",bt.parentNode.style.height=ie.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ze),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}rn.onExitFullscreen=function(ze,dt){dt.appendChild(ze)};var St=function(ze,dt,bt,un){ot(ze,dt,!0);for(var At=function(){var _t=[];for(it=0;it<ze.childNodes.length;it++)_t.push(ze.childNodes[it]);if(window.GGBT_wsf_view){var ht=window.GGBT_wsf_view.renderFullScreen(ze,dt.id),se=document.getElementById("fullscreencontainer"),ee=jQuery(ze).find(".fullscreencontent");ee.length>0?(ht.remove(),ee.attr("id","fullscreencontent").show(),jQuery(se).append(ee),window.dispatchEvent(new Event("resize"))):lt(ht,dt,!1),window.GGBT_wsf_view.launchFullScreen(se)}else wt=un,lt(ze,dt,!1);if(!window.GGBT_wsf_view)for(it=0;it<_t.length;it++)ze.removeChild(_t[it])},sn=ze.getElementsByClassName("ggb_preview_play"),it=0;it<sn.length;it++)sn[it].addEventListener("click",At,!1),sn[it].addEventListener("ontouchstart",At,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ze),Ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ke=function(){var ze=document.createElement("div");if(ze.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var dt='.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");}',bt=document.createElement("style");bt.styleSheet?bt.styleSheet.cssText=dt:bt.appendChild(document.createTextNode(dt)),document.getElementsByTagName("head")[0].appendChild(bt)}return ze},Ct=function(ze,dt,bt,un){var At=document.createElement("div");At.className="ggb_preview",At.style.position="absolute",At.style.zIndex="90",At.style.width=ze-2+"px",At.style.height=dt-2+"px",At.style.top="0px",At.style.left="0px",At.style.overflow="hidden",At.style.backgroundColor="white";var sn="lightgrey";bt!==void 0&&(bt==="none"?sn="transparent":sn=bt),At.style.border="1px solid "+sn;var it=document.createElement("img");if(it.style.position="relative",it.style.zIndex="1000",it.style.top="-1px",it.style.left="-1px",Ne!==null&&it.setAttribute("src",Ne),it.style.opacity=.7,pt!==null){var _t,ht,se;if(!un){_t=document.createElement("img"),_t.style.position="absolute",_t.style.zIndex="1001",_t.style.opacity=1,it.style.opacity=.3,ht=360,ht>ze/4*3&&(ht=ze/4*3),se=ht/5.8,_t.setAttribute("src",pt),_t.setAttribute("width",ht),_t.setAttribute("height",se);var ee=(ze-ht)/2,z=(dt-se)/2;_t.style.left=ee+"px",_t.style.top=z+"px",At.appendChild(_t)}}return At.appendChild(it),At},qt=function(ze){return ze=ze.toLowerCase(),ze==="html5"||ze==="screenshot"?ze:"html5"},Ce=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(ze,dt){if(rt=ze,dt){mt(rt,!0);return}var bt=!ut;if(bt){var un=ct(rt);!isNaN(un)&&un<4.4&&(bt=!1)}var At,sn;window.location.protocol.substr(0,4)==="http"?At=window.location.protocol:At="http:";var it=rt.indexOf("//");it>0?sn=rt:it===0?sn=At+rt:sn="https://www.geogebra.org/apps/5.2.814.0/";for(var _t in Ce)if(rt.slice(Ce[_t].length*-1)===Ce[_t]||rt.slice((Ce[_t].length+1)*-1)===Ce[_t]+"/"){mt(sn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&bt&&!te.is3D&&!te.AV&&!te.SV&&!te.CV&&!te.EV2&&!te.CP&&!te.PC&&!te.DA&&!te.FI&&!te.PV&&!Re(ie.showToolBar)&&!Re(ie.showMenuBar)&&!Re(ie.showAlgebraInput)&&!Re(ie.enableRightClick)&&(!ie.appName||ie.appName=="classic")?sn+="webSimple/":sn+="web3d/",mt(sn,!1)},mt=function(ze,dt){if(ze.requirejs){et=ze;return}ze.slice(-1)!=="/"&&(ze+="/"),et=ze,dt===null&&(dt=ze.indexOf("http")===-1),xe=dt,We="web.nocache.js",Ve=!1;var bt=et.split("/");bt.length>1&&(!dt&&bt[bt.length-2]==="webSimple"?(We="webSimple.nocache.js",Ve=!0):Ce.indexOf(bt[bt.length-2])>=0&&(We=bt[bt.length-2]+".nocache.js")),bt=ze.split("/"),rt=bt[bt.length-3],rt.substr(0,4)==="test"?rt=rt.substr(4,1)+"."+rt.substr(5,1):(rt.substr(0,3)==="war"||rt.substr(0,4)==="beta")&&(rt="5.0");var un=parseFloat(rt);un!==NaN&&un<5&&ze.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+un+" is deprecated. Using version latest instead."),de("5.0",dt))},en=function(ze,dt){window.console&&window.console.log&&(!dt||typeof dt.showLogging=="undefined"||dt.showLogging&&dt.showLogging!=="false")&&console.log(ze)};ie.material_id!==void 0?Bt(Mt):Mt();function Mt(){var ze=jt;Se!==null?ze=Se:parseFloat(ze)<5&&(ze="5.0"),de(ze,!1),He!==null&&mt(He,xe),be=!0}return rn},GGBAppletUtils=function(){"use strict";function rn(){return window.GGBT_wsf_edit!==void 0}function jt(be,Se){Se!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+Se+","+Se+")",be.style.webkitTransform="scale("+Se+","+Se+")",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 ie(be,Se,He,nt,Ie,fe){var et=null;if(fe!=null&&fe!="")for(var xe=be.parentNode;xe!=null;)if((" "+xe.className+" ").indexOf(" "+fe+" ")>-1){et=xe;break}else xe=xe.parentNode;var wt=0,rt=0,We=0,Ve=0,Ne=0,pt=0,It=0;if(et)wt=et.offsetWidth,rt=Math.max(nt?et.offsetWidth:0,et.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(wt=Math.min(window.innerWidth,document.documentElement.clientWidth),rt=Math.min(window.innerHeight,document.documentElement.clientHeight),We=wt):(wt=window.innerWidth,rt=window.innerHeight,We=window.innerWidth),be){var Ot=be.getBoundingClientRect();Ot.left>0&&Ot.left<=wt&&(Ie===void 0||!Ie)&&(document.dir==="rtl"?(Ne=wt-Ot.width-Ot.left,pt=We<=480?10:30):(pt=Ot.left,Ne=We<=480?10:30),Ve=pt+Ne)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var gt=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ve=40,It=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ve=0,It=40)}}return be&&((He===void 0||!He)&&Se>0&&Se+Ve<wt?wt=Se:wt-=Ve,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He===void 0||!He)&&(rt-=It)),{width:wt,height:rt}}function te(be,Se,He,nt,Ie){if(be.isScreenshoGenerator)return 1;var fe=nt!==void 0&&nt,et=be.noScaleMargin!=null&&be.noScaleMargin,xe=function(gt){return gt&>!=="false"},wt=xe(be.autoHeight),rt=ie(Se,be.width,He,wt,fe&&window.GGBT_wsf_view||et,Ie),We=parseInt(rt.width),Ve=be.width,Ne=be.height;if(Ve===void 0){var pt=Se.querySelector(".appletParameters");pt&&(Ve=pt.offsetWidth,Ne=pt.offsetHeight)}var It=We/Ve,Ot=fe?1:rt.height/Ne;return He!==void 0&&!He&&(It=Math.min(1,It),Ot=Math.min(1,Ot)),Math.min(It,Ot)}function ut(be,Se,He){var nt=1,Ie,fe=!1;if(be.hasOwnProperty("allowUpscale")&&(fe=be.allowUpscale),be.hasOwnProperty("scale")&&(nt=parseFloat(be.scale),(isNaN(nt)||nt===null||nt===0)&&(nt=1),nt>1&&(fe=!0)),Se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))Ie=te(be,Se,fe,He,be.scaleContainerClass);else return nt;return fe&&(!be.hasOwnProperty("scale")||nt===1)?Ie:Math.min(nt,Ie)}function ve(be){var Se=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=be.getBoundingClientRect(),Ie=(Se-nt.width)/2,fe=(He-nt.height)/2;fe<0&&(fe=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ie<40?be.style.left="40px":be.style.left=Ie+"px",be.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?be.style.top="40px":be.style.top=fe+"px",be.style.left=Ie+"px")}function Je(be,Se){var He=be.querySelector(".appletParameters");if(He){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Se.id!==He.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(He.parentElement&&/fullscreen/.test(He.parentElement.className))return;var nt=ut(Se,be);rn()&&He.setAttribute("data-param-scale",nt);for(var Ie=null,fe=0;fe<be.childNodes.length;fe++)if(be.childNodes[fe].className!==void 0&&be.childNodes[fe].className.match(/^applet_scaler/)){Ie=be.childNodes[fe];break}if(Ie!==null&&Ie.querySelector(".noscale")!==null)return;var et=Se.id!==void 0?Se.id:"ggbApplet",xe=window[et];(xe==null||!xe.recalculateEnvironments)&&Ie!==null&&!Ie.className.match(/fullscreen/)&&(Ie.parentNode.style.transform="",!isNaN(nt)&&nt!==1?(Ie.parentNode.style.width=Se.width*nt+"px",Ie.parentNode.style.height=Se.height*nt+"px",jt(Ie,nt)):(jt(Ie,1),Ie.parentNode.style.width=Se.width+"px",Ie.parentNode.style.height=Se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ve(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(He).parents(".content-added-content"))}}return{responsiveResize:Je,isFlexibleWorksheetEditor:rn,positionCenter:ve,getScale:ut,scaleElement:jt}}();__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 rn=n.location.search;return rn.indexOf(J)!=-1||rn.indexOf(K)!=-1}function q(rn,jt){}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(rn){var jt=s[L].bindings;s[L].bindings=function(){for(var ie=jt?jt():{},te=rn[webModule.__softPermutationId],ut=O;ut<te.length;ut++){var ve=te[ut];ie[ve[O]]=ve[P]}return ie}};var t;function u(){return v(),t}function v(){if(!t){var rn=o.createElement(Q);if(rn.id=L,rn.style.cssText=R+S,rn.tabIndex=-1,o.body.appendChild(rn),t=rn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var jt=document.compatMode==U?V:W;t.write(jt+X),t.close()}}}function w(rn){function jt(te){function ut(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ve=ut();if(ve){te();return}function Je(){if(!ve){if(!ut())return;ve=!0,te(),o.removeEventListener&&o.removeEventListener(Z,Je,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,Je,!1);var be=setInterval(function(){Je()},$)}function ie(te){var ut=u(),ve=ut.body,Je=ut.createElement(_);Je.language=ab,Je.crossOrigin=W,Je.src=te,webModule.__errFn&&(Je.onerror=function(){webModule.__errFn(L,new Error(bb+te))}),ve.appendChild(Je)}jt(function(){ie(rn)})}webModule.__startLoadingFragment=function(rn){return C(rn)},webModule.__installRunAsyncCode=function(rn){var jt=u(),ie=jt.body,te=jt.createElement(_);te.language=ab,te.text=rn,ie.appendChild(te),ie.removeChild(te)};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(rn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(rn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(rn){var jt=c[rn];return jt==null?null:jt},r=d,webModule.__errFn=e}function B(){function rn(be){var Se=be.lastIndexOf(rb);Se==-1&&(Se=be.length);var He=be.indexOf(sb);He==-1&&(He=be.length);var nt=be.lastIndexOf(tb,Math.min(He,Se));return nt>=O?be.substring(O,nt+P):W}function jt(be){if(!be.match(/^\w+:\/\//)){var Se=o.createElement(ub);Se.src=be+vb,be=rn(Se.src)}return be}function ie(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function te(){for(var be=o.getElementsByTagName(_),Se=O;Se<be.length;++Se)if(be[Se].src.indexOf(xb)!=-1)return rn(be[Se].src);return W}function ut(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function ve(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var Je=ie();return Je==W&&(Je=te()),Je==W&&(Je=ut()),Je==W&&ve()&&(Je=rn(o.location.href)),Je=jt(Je),Je}function C(rn){return rn.match(/^\//)||rn.match(/^[a-zA-Z]+:\/\//)?rn:webModule.__moduleBase+rn}function D(){var rn=[],jt=O,ie=[],te=[];function ut(be){var Se=te[be](),He=ie[be];if(Se in He)return Se;var nt=[];for(var Ie in He)nt[He[Ie]]=Ie;throw r&&r(be,nt,Se),null}if(__gwt_isKnownPropertyValue=function(be,Se){return Se in ie[be]},webModule.__getPropMap=function(){var be={};for(var Se in ie)ie.hasOwnProperty(Se)&&(be[Se]=ut(Se));return be},webModule.__computePropValue=ut,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ve;try{ve=Cb;var Je=ve.indexOf(Db);Je!=-1&&(jt=parseInt(ve.substring(Je+P),$),ve=ve.substring(O,Je))}catch(be){}return webModule.__softPermutationId=jt,C(ve+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})()},23216:function(rn,jt,ie){"use strict";ie.d(jt,{Ax:function(){return Je},Ds:function(){return be},KI:function(){return He},SI:function(){return ve},f1:function(){return ut}});var te=ie(14185);function ut(nt){let Ie=!0;if(nt.length>0){for(let fe=0;fe<nt.length;fe++)if(nt[fe].compile_success==0||!nt[fe].compile_success){Ie=!1;break}}else Ie=!1;return Ie}function ve(nt,Ie=""){let fe=[];for(let et=0;et<nt.length;et++){let xe=nt[et],wt=Ie?`${Ie}/${xe.name}`:`${xe.name}`;fe.push({title:xe.name,type:xe.type,isLeaf:xe.type!=="tree",key:wt})}return fe}function Je(nt,Ie,fe){for(let et=0;et<nt.length;et++){let xe=nt[et];if(xe.key===Ie){xe.children=fe;break}xe.children&&Je(xe.children,Ie,fe)}return nt}function be(nt,Ie,fe){let et;return function(){let xe=this,wt=arguments,rt=function(){et=null,fe||nt.apply(xe,wt)},We=fe&&!et;clearTimeout(et),et=setTimeout(rt,Ie),We&&nt.apply(xe,wt)}}const Se=!0,He=te.Z.API_SERVER},40254:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return et}});var te=ie(59301),ut={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ve=ie(92310),Je=ie.n(ve),be=ie(29787),Se=ie(2859),He=ie(49317),nt=ie(76406),Ie=(xe,wt,rt)=>new Promise((We,Ve)=>{var Ne=Ot=>{try{It(rt.next(Ot))}catch(gt){Ve(gt)}},pt=Ot=>{try{It(rt.throw(Ot))}catch(gt){Ve(gt)}},It=Ot=>Ot.done?We(Ot.value):Promise.resolve(Ot.value).then(Ne,pt);It((rt=rt.apply(xe,wt)).next())}),et=({data:xe,className:wt,fullWidth:rt,style:We={},onClose:Ve,onOk:Ne,showFullTools:pt,noAssociationId:It})=>{const Ot=(0,te.useRef)(null),gt=(0,te.useRef)(null),ct=(0,te.useRef)(null),yt=(0,te.useRef)(null),[Ke,Bt]=(0,te.useState)(!1),[Fe,_e]=(0,te.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,te.useEffect)(()=>(ct.current||(ct.current=document.createElement("style"),document.head.appendChild(ct.current)),xe!=null&&xe.visible?(document.body.setAttribute("data-custom","y-hidden"),ct.current.innerHTML=" html { overflow-y: hidden; }",xe!=null&&xe.src&&ft()):(document.body.removeAttribute("data-custom"),ct.current&&(document.head.removeChild(ct.current),ct.current=null)),()=>{document.body.removeAttribute("data-custom"),ct.current&&(document.head.removeChild(ct.current),ct.current=null)}),[xe==null?void 0:xe.visible]);const ft=()=>Ie(void 0,null,function*(){Bt(!0),_e("\u6B63\u5728\u52A0\u8F7D\u4E2D");const pe=yield(0,nt.ZJ)(xe==null?void 0:xe.src);Ot.current.src="",Ot.current.src=pe,Ot.current.onload=function(){ot()},Bt(!1),_e("")}),Re=pe=>Ie(void 0,null,function*(){Bt(!0),_e("\u6B63\u5728\u4FDD\u5B58\u4E2D");const St=yield(0,He.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:xe.title,file:pe.dataUrl}});St!=null&&St.id&&!It?(yield(0,He.ZP)(`/api/attachments/${xe.id}/add_subitem.json`,{method:"post",body:{subitem_id:St==null?void 0:St.id,settings:JSON.stringify(pe.state)}})).status===0&&Ne():St!=null&&St.id&&Ne(St),Bt(!1),_e("")}),lt=()=>{const pe=document.querySelector('a[href="https://markerjs.com/"]');pe&&pe.parentNode&&(pe.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(ke=>{const Ct=document.querySelector(ke.name);Ct&&Ct.setAttribute("title",ke.title)})},ot=()=>{gt.current=new Se.hP(Ot.current),gt.current.targetRoot=yt.current,gt.current.addEventListener("render",Re),gt.current.addEventListener("beforeclose",Ve),pt&&(gt.current.availableMarkerTypes=gt.current.ALL_MARKER_TYPES,gt.current.uiStyleSettings.redoButtonVisible=!0,gt.current.uiStyleSettings.notesButtonVisible=!0,gt.current.uiStyleSettings.zoomButtonVisible=!0,gt.current.uiStyleSettings.zoomOutButtonVisible=!0,gt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=gt.current.uiStyleSettings,gt.current.show(),xe!=null&&xe.snapshotData&>.current.restoreState(xe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),lt()},300)};return te.createElement(te.Fragment,null,(xe==null?void 0:xe.visible)&&te.createElement(be.Z,{spinning:Ke,tip:Fe,style:{position:"absolute",width:"100vw"}},te.createElement("div",{ref:yt,className:Je()(ut.imageDimensions,wt,rt?ut.fullWidth:""),style:We},te.createElement("img",{className:ut.img,ref:Ot}))))}},9057:function(rn,jt,ie){"use strict";var te=ie(59301),ut=ie(77019),ve=ie(5269),Je=ie(31691),be=ie(7939),Se=ie(35883),He=ie(74501),nt=ie(48136),Ie=ie(59301);const fe=(0,te.forwardRef)(({callback:et,showSaveButton:xe,value:wt=""},rt)=>{const We=(0,te.useRef)(),Ve=[{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 "}]}]}],Ne=[{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}`}]}]}],pt=gt=>{We.current.setValue(We.current.getValue()+" "+gt.value+" ")},It=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ie.createElement(ut.Z,{className:He.Z.lists,gutter:[10,10]},Ve.map((gt,ct)=>Ie.createElement(ve.Z,{flex:"110px",className:He.Z.item},Ie.createElement("div",null,Ie.createElement(Se.Z,{value:`$$${gt.value}$$`}),gt.name),Ie.createElement("div",{className:He.Z.children},gt.children.map((yt,Ke)=>Ie.createElement("div",{key:Ke},Ie.createElement("h1",null,yt.name),Ie.createElement(ut.Z,{gutter:[10,10]},yt.data.map((Bt,Fe)=>Ie.createElement(ve.Z,{key:Fe,onClick:()=>pt(Bt),className:He.Z.diamond},Ie.createElement(Se.Z,{value:"`$$"+Bt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ie.createElement(ut.Z,{className:He.Z.lists,gutter:[10,10]},Ne.map((gt,ct)=>Ie.createElement(ve.Z,{flex:"110px",className:He.Z.item},Ie.createElement("div",null,Ie.createElement(Se.Z,{value:"`$$"+gt.value+"$$`"}),gt.name),Ie.createElement("div",{className:He.Z.children},gt.children.map((yt,Ke)=>Ie.createElement("div",{key:Ke},yt.name&&Ie.createElement("h1",null,yt.name),Ie.createElement(ut.Z,{gutter:[10,10]},yt.data.map((Bt,Fe)=>Ie.createElement(ve.Z,{key:Fe,onClick:()=>pt(Bt),className:He.Z.diamond},Ie.createElement(Se.Z,{value:"`$$"+Bt.value+"$$`"}))))))))))}],Ot=()=>{var gt=document.createElement("div");gt.innerHTML=We.current.getValue();var ct=gt.innerText;return et&&et(ct),ct};return(0,te.useImperativeHandle)(rt,()=>({getData:Ot})),Ie.createElement("div",{className:He.Z.mathWrap},Ie.createElement(Je.default,{defaultActiveKey:"1",items:It}),Ie.createElement("math-field",{locale:"zh_cn",className:He.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:We,style:{width:800,marginTop:30,fontSize:18}},wt||""),xe&&Ie.createElement("div",{className:He.Z.button},Ie.createElement(be.ZP,{size:"large",onClick:Ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});jt.Z=fe},90736:function(rn,jt,ie){"use strict";var te=ie(59301),ut=ie(4977),ve=ie(7939),Je=Object.defineProperty,be=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,fe=(rt,We,Ve)=>We in rt?Je(rt,We,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):rt[We]=Ve,et=(rt,We)=>{for(var Ve in We||(We={}))nt.call(We,Ve)&&fe(rt,Ve,We[Ve]);if(He)for(var Ve of He(We))Ie.call(We,Ve)&&fe(rt,Ve,We[Ve]);return rt},xe=(rt,We)=>be(rt,Se(We));const wt=({img:rt,buttonProps:We={},styles:Ve={},customText:Ne,ButtonText:pt,ButtonClick:It,Buttonclass:Ot,ButtonTwo:gt,imgStyles:ct,loading:yt=!1,className:Ke=""})=>te.createElement("section",{className:`tc animated fadeIn ${Ke}`,style:et({color:"#999",margin:"100px auto",visibility:yt?"hidden":"visible"},Ve)},te.createElement("img",{src:rt||ut,style:xe(et({},ct),{pointerEvents:"none",userSelect:"none"})}),te.createElement("p",{className:"mt20 font14"},Ne||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),pt&&te.createElement(ve.ZP,et({className:Ot,onClick:It},We),pt),gt&>);jt.Z=wt},86974:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return Ot}});var te=ie(59301),ut={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},ve=ie(7939),Je=ie(70557),be=ie(34728),Se=ie(25399),He=ie(76406),nt=ie(84849),Ie=ie(90736),fe=ie(14185),et=ie(52078),xe=ie(59301),wt=Object.defineProperty,rt=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Ne=(gt,ct,yt)=>ct in gt?wt(gt,ct,{enumerable:!0,configurable:!0,writable:!0,value:yt}):gt[ct]=yt,pt=(gt,ct)=>{for(var yt in ct||(ct={}))We.call(ct,yt)&&Ne(gt,yt,ct[yt]);if(rt)for(var yt of rt(ct))Ve.call(ct,yt)&&Ne(gt,yt,ct[yt]);return gt},It=(gt,ct,yt)=>new Promise((Ke,Bt)=>{var Fe=Re=>{try{ft(yt.next(Re))}catch(lt){Bt(lt)}},_e=Re=>{try{ft(yt.throw(Re))}catch(lt){Bt(lt)}},ft=Re=>Re.done?Ke(Re.value):Promise.resolve(Re.value).then(Fe,_e);ft((yt=yt.apply(gt,ct)).next())}),Ot=({editOffice:gt="view",data:ct,issaver:yt,onSaver:Ke,theme:Bt,type:Fe,filename:_e,monacoEditor:ft,className:Re,style:lt,close:ot,onClose:pe,hasMask:St,disabledDownload:ke,onImgDimensions:Ct,showNodata:qt,recordInfo:Ce})=>{const[de,mt]=(0,te.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[en,Mt]=(0,te.useState)(""),[ze,dt]=(0,te.useState)(),bt=window.ENV==="build"?"/react/build":"",un=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,sn=10*(1024*1024),it=(0,te.useRef)();ct!=null&&ct.startsWith("/api")&&Fe!=="txt"&&(ct=fe.Z.API_SERVER+ct);const _t=le=>le.substring(le.lastIndexOf("/")+1).split(".").pop();_e&&ft&&(ft.filename=_e),(0,te.useEffect)(()=>{var le,re;const Ee=(re=(le=document.cookie)==null?void 0:le.replace(/\s/g,""))==null?void 0:re.split(";");Ee==null||Ee.map(at=>{let Ht=at.split("=");Ht[0]==="_educoder_session"&&Mt(Ht[1])})},[]),(0,te.useEffect)(()=>{Fe==="office"&&(ct.indexOf("bigfilescdn.")>-1||ct.indexOf("bigfiles1")>-1?dt({url:ct,fileType:_t(ct),model:ct.indexOf("model=edit")?"edit":"view"}):ct.indexOf("coze")>-1?dt({url:ct,fileType:"doc",model:"view"}):se())},[Fe,ct]);function ht(le){return It(this,null,function*(){le.data.type==="pdfdata"&&(Ke(le.data.data),window.removeEventListener("message",ht,!1)),console.log("mess---:",le.data)})}const se=()=>It(void 0,null,function*(){console.log("data:",ct);let le=ct;ct.startsWith("http")||(le=location.origin+le);let re=new URL(le).pathname.split("/").pop();const Ee=yield(0,nt.gJ)({attachment_id:re});Ee.url=un+Ee.url,dt(Ee)}),ee=()=>{if(ct.startsWith("http")||ct.startsWith("blob:")){z();return}(0,He.Sv)(_e||"educoder",ct,_e)},z=()=>{Ce&&(0,et.fc)({id:Ce==null?void 0:Ce.id,watch_type:1,course_id:Ce==null?void 0:Ce.course_id}),(0,He.Nd)(_e||"educoder",decodeURIComponent(ct))};(0,te.useEffect)(()=>(window.addEventListener("message",oe),()=>{window.removeEventListener("message",oe)}),[]);const oe=le=>{var re;((re=le==null?void 0:le.data)==null?void 0:re.type)==="closePop"&&pe()};return xe.createElement("div",{style:pt({},lt||{}),className:`${St&&ut.bgBlack} ${Fe?ut.wrp:"hide"}`},!!Fe&&ot&&xe.createElement("div",{id:"closePop",className:ut.close,ref:it},!!Ct&&xe.createElement(Se.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>it.current},xe.createElement("span",{onClick:()=>{pe(),Ct()}},xe.createElement("i",{className:"icon-yulanpizhu"}))),!ke&&window.parent===window&&xe.createElement(Se.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>it.current},xe.createElement("span",{onClick:z},xe.createElement("i",{className:"icon-quxiaozhiding"}))),yt&&xe.createElement(Se.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>it.current},xe.createElement("span",{className:"",onClick:()=>{const le=document.getElementById("pdfiframe");window.addEventListener("message",ht,!1),setTimeout(()=>{le.contentWindow.postMessage("getData","*")},300)}},xe.createElement("i",{className:"icon-baocun"}))),xe.createElement(Se.Z,{title:"\u5173\u95ED",getPopupContainer:()=>it.current},xe.createElement("span",{className:"",onClick:()=>{pe()}},xe.createElement("i",{className:"icon-guanbi1"})))),xe.createElement("div",{className:`${ut[Re]} ${Re} ${ut.monaco} ${Fe==="txt"?"show":"hide"}`},Fe==="txt"&&xe.createElement(xe.Fragment,null,xe.createElement(be.ZP,pt({},ft)))),Fe==="audio"&&xe.createElement("audio",{controls:!0,src:`${(ct==null?void 0:ct.indexOf("http://"))>-1||(ct==null?void 0:ct.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ct}`,autoPlay:!0}),Fe==="video"&&xe.createElement(xe.Fragment,null,(ct==null?void 0:ct.indexOf("http"))>-1?xe.createElement("video",{controls:!0,src:`${ct}`,autoPlay:!0}):xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ct}`,autoPlay:!0})),Fe==="office"&&ze&&xe.createElement("iframe",{src:`${bt}/office.html?key=${ze.key}&url=${btoa(ze.url)}&callbackUrl=${un+(ze.callbackUrl||"")}&fileType=${ze.fileType}&title=${ze.title||""}&model=${gt}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!ke}`}),Fe==="html"&&xe.createElement("iframe",{src:ct+"&disposition=inline"}),Fe==="pdf"&&xe.createElement("iframe",{id:"pdfiframe",src:`${bt}/js/pdf/index.html?filename=${_e||"educoder.pdf"}&url=${encodeURIComponent(ct)}&disabledDownload=${!!ke}&model=${gt}`}),Fe==="image"&&xe.createElement("img",{src:`${(ct==null?void 0:ct.indexOf("http://"))>-1||(ct==null?void 0:ct.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ct}`}),(Fe==="other"||Fe==="download")&&xe.createElement(xe.Fragment,null,qt?xe.createElement(Ie.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:xe.createElement(ve.ZP,{icon:xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:ke},"\u4E0B\u8F7D")}):xe.createElement(ve.ZP,{type:"primary",size:"middle",onClick:ee,disabled:ke},xe.createElement(Je.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Fe==="flowChart"&&xe.createElement("div",{className:"embed"},xe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ct||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(rn,jt,ie){"use strict";ie.d(jt,{z:function(){return ft},Z:function(){return Re}});var te=ie(59301),ut=ie(46214),ve=ie(20047),Je=ie(64018),be=ie(16471),Se=ie(14185),He=ie(76406),nt=ie(15342),Ie=ie(44104),fe=ie(7939),et=ie(1012),xe=ie(86974),wt=ie(59301),We=({html:lt})=>{const ot=(0,te.useRef)(null),pe=(0,te.useRef)(null),St=`.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,te.useEffect)(()=>{const ke=ot.current.attachShadow({mode:"open"});pe.current=document.createElement("div"),pe.current.className="markdown-body",pe.current.innerHTML=lt,ke.appendChild(pe.current);const Ct=document.createElement("style");return Ct.textContent=St,ke.appendChild(Ct),()=>{ke.innerHTML=""}},[]),(0,te.useEffect)(()=>{pe.current&&(pe.current.innerHTML=lt)},[lt]),wt.createElement("div",{ref:ot})};function Ve(lt){const ot=["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"],pe=new RegExp(`\\b(${ot.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),St=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return lt.replace(pe,"").replace(St,"").trim()}var Ne={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},pt=Object.defineProperty,It=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,ct=(lt,ot,pe)=>ot in lt?pt(lt,ot,{enumerable:!0,configurable:!0,writable:!0,value:pe}):lt[ot]=pe,yt=(lt,ot)=>{for(var pe in ot||(ot={}))Ot.call(ot,pe)&&ct(lt,pe,ot[pe]);if(It)for(var pe of It(ot))gt.call(ot,pe)&&ct(lt,pe,ot[pe]);return lt};const Ke="@\u2581\u2581@",Bt="@\u2581@",Fe=/<pre[^>]*>/g;function _e(lt){let ot=document.createElement("div");return ot.innerHTML=lt,ot.childNodes.length===0?"":ot.childNodes[0].nodeValue}const ft=(lt,ot)=>{lt=lt||"";const pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ke=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ct=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ot?lt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(pe,(qt,Ce,de,mt,en,Mt,ze)=>{const dt=Ce||mt||Mt,bt=de||en||ze||"?";return Se.Z.API_SERVER+"/api/attachments/"+dt+bt+"&t="+(0,He.Jn)(dt,Date.now())+(qt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(lt=lt.replace(Ct,(qt,Ce,de,mt,en,Mt,ze)=>{const dt=Ce||mt||Mt,bt=de||en||ze||"?";return Se.Z.API_SERVER+"/attachments/download/"+dt+bt+"&t="+(0,He.Jn)(dt,Date.now())+(qt.indexOf(")")>-1?")":"&")}).replace(pe,(qt,Ce,de,mt,en,Mt,ze)=>{const dt=Ce||mt||Mt,bt=de||en||ze||"?";return Se.Z.API_SERVER+"/api/attachments/"+dt+bt+"&t="+(0,He.Jn)(dt,Date.now())+(qt.indexOf(")")>-1?")":"&")}).replace(St,(qt,Ce,de,mt,en)=>{const Mt=Ce||mt,ze=de||en||"";return'"'+Se.Z.API_SERVER+"/api/attachments/"+Mt+ze+Mt+ze+"&t="+(0,He.Jn)(Mt,Date.now())}).replace(ke,(qt,Ce,de,mt,en)=>{const Mt=Ce||mt,ze=de||en||"";return"("+Se.Z.API_SERVER+"/files/uploads/"+Mt+ze+Mt+ze+"&t="+(0,He.Jn)(Mt,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,`
|
|
|
`),lt)};var Re=({value:lt="",edit:ot=!1,className:pe,showTextOnly:St,showLines:ke,style:Ct={},stylesPrev:qt={},highlightKeywords:Ce,showProgramFill:de,isProgramFill:mt,disabledFill:en=!1,programFillValue:Mt,openEditor:ze=()=>{},onFillChange:dt=At=>{},onFillBlur:bt=()=>{},onFillFocus:un=()=>{}})=>{let At=Ve(String(lt||""));const sn=(0,te.useRef)(),it=(0,te.useRef)(),[_t,ht]=(0,te.useState)(""),[se,ee]=(0,te.useState)("office"),[z,oe]=(0,te.useState)([]),le=(0,te.useRef)("a"+(0,et.Z)()),re={},Ee=kt=>/<style[\s\S]*?>/i.test(kt||""),at=(kt,Pn,Qt)=>{const Pe=document.createElement(kt===Bt?"input":"textarea");Pe.style.width="100%",Pe.style.height=kt===Bt?"40px":"151px",Pe.rows=5,Pe.spellcheck=!1,Pe.name="edu-program-fill",Pe.placeholder="\u8BF7\u8F93\u5165",Pe.dataset.id=Pn;const Qe=Object.keys(re).length;return re[Qe]=Pe,`<span class="edu-program-fill-wrap ${kt===Bt?"":"show"}" style="width:${kt===Bt?"600px":"100%"}" title=${Qt||""}><span>${Pe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ht(kt){return kt=kt.replace(/!\[.*?\]\(.*?\)/g,""),kt=kt.replace(/\[.*?\]\(.*?\)/g,""),kt=kt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),kt=kt.replace(/<embed.*?>/g,""),kt=kt.replace(/<img.*?>/g,""),kt=kt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),kt=kt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),kt=kt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),kt=kt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),kt}const Ye=kt=>!St&&Ee(At)?kt:kt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Pn,Qt){let Pe=Qt.replace(/(\n|\r)/g,"").split("}"),Qe=[];return Pe.map(Lt=>{Lt!=""&&Qe.push(`.${le.current} ${Lt}`)}),`<style>${Qe.join("}")}</style>`}),tt=(0,te.useMemo)(()=>{(0,ve.Iy)();try{const Pe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Qe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Lt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Nt=/\(\/attachments\/download\//g;At=At.replace(Nt,"("+Se.Z.API_SERVER+"/attachments/download/").replace(Pe,"("+Se.Z.API_SERVER+"/api/attachments/").replace(Qe,'"'+Se.Z.API_SERVER+"/api/attachments/").replace(Lt,'"'+Se.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,`
|
|
|
`),sn.current.style.display="none"}catch(Pe){}if(de){let Pe=-1;return At=At.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Qe,Lt,Nt){var we;return++Pe,at(Qe,Pe,(we=Mt==null?void 0:Mt[Pe])==null?void 0:we.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ye(At||"")}</pre>`}let kt=Ye(At);kt=(0,ve.ZP)(kt);const Pn=(0,ve.ez)();At.match(/\[TOC\]/)&&(kt=kt.replace("<p>[TOC]</p>",(0,ve.Qv)()),(0,ve.Iy)()),kt=kt.replace(/(__special_katext_id_\d+__)/g,(Pe,Qe)=>{const{type:Lt,expression:Nt}=Pn[Qe];return(0,nt.renderToString)(_e(Nt)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ve.AL)();const Qt=document.createElement("div");if(Qt.innerHTML=kt,St)return Qt.innerText;if(Ce){const Pe=Ce.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Jt(Qt,Pe),Qt.innerHTML}return setTimeout(()=>En(),500),Qt.innerHTML},[At,Ce]);(0,te.useEffect)(()=>{Xt.current&&Xt.current.querySelectorAll(["input","textarea"]).forEach(Pn=>{Pn.oninput=vt,Pn.onblur=Rt,Pn.onfocus=Dt})},[z]),(0,te.useEffect)(()=>{var kt,Pn,Qt,Pe,Qe;if(Mt!=null&&Mt.length)try{const Lt=Xt.current.querySelectorAll(".edu-program-fill-score"),Nt=Xt.current.querySelectorAll('[name="edu-program-fill"]');for(const[we,$e]of Nt.entries())$e.value=((kt=Mt==null?void 0:Mt[we])==null?void 0:kt.value)||"",((Pn=Mt==null?void 0:Mt[we])==null?void 0:Pn.type)==="warning"?$e.className="program-fill-warning":((Qt=Mt==null?void 0:Mt[we])==null?void 0:Qt.type)==="success"?$e.className="program-fill-success":$e.className="";for(const[we,$e]of Lt.entries())$e.innerHTML=(Pe=Mt==null?void 0:Mt[we])!=null&&Pe.score?`${(Qe=Mt==null?void 0:Mt[we])==null?void 0:Qe.score}\u5206`:"";oe(Mt)}catch(Lt){console.log(Lt,"error")}},[Mt]);const vt=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),dt(z,kt.target.dataset.id)},Rt=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),bt(z,kt.target.dataset.id)},Dt=kt=>{z[kt.target.dataset.id]=z[kt.target.dataset.id]||{},z[kt.target.dataset.id].value=kt.target.value,oe([...z]),un(z,kt.target.dataset.id)};function Jt(kt,Pn){return kt.childNodes.forEach(Qt=>{var Pe;if(Qt.childNodes.length>0)Jt(Qt,Pn);else if(Qt.nodeName!=="IMG")if(Qt.innerHTML)Qt.innerHTML=(Pe=Qt.innerHTML)==null?void 0:Pe.replace(new RegExp(Pn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Qe=document.createElement("span");Qe.innerHTML=Qt.textContent.replace(new RegExp(Pn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Qt.replaceWith(Qe)}})}const Xt=(0,te.useRef)();ve.jb.WebkitLineClamp=ke,ke&&(Ct=yt(yt({},Ct),ve.jb));function Zt(kt){let Pn=kt.target;if(Pn.tagName.toUpperCase()==="A"){let Qt=Pn.getAttribute("href");if(Qt.indexOf("office")>-1)kt.preventDefault(),ht(Qt),ee("office");else if(Qt.indexOf("application/pdf")>-1)kt.preventDefault(),ht(Qt),ee("pdf");else if(Qt.indexOf("text/html")>-1)kt.preventDefault(),ht(Qt),ee("html");else if(Qt.startsWith("#")){kt.preventDefault();let Pe=document.getElementById(Qt.replace("#",""));Pe&&Pe.scrollIntoView(!0)}}}const En=()=>{var kt;const Pn=(kt=Xt.current)==null?void 0:kt.querySelectorAll("video");Pn==null||Pn.forEach(Qt=>{if(Qt.oncontextmenu=()=>!1,Qt.src.indexOf(".m3u8")>-1&&!Qt.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var Pe=new be.ZP;Pe.loadSource(Qt.src),Pe.attachMedia(Qt)}}})};(0,te.useEffect)(()=>{if(Xt.current&&tt&&tt.match(Fe)&&window.PR.prettyPrint(),Xt.current)return Xt.current.addEventListener("click",Zt),()=>{var kt;(kt=Xt.current)==null||kt.removeEventListener("click",Zt),(0,ve.AL)(),(0,ve.Iy)()}},[tt,Xt.current,Zt]);const cn=kt=>{kt.target.nodeName==="IMG"&&kt.target.className.indexOf("draw-flowchart")>-1?(sn.current.style.zIndex=1,sn.current.style.display="flex",sn.current.style.width=kt.target.clientWidth+"px",sn.current.style.height=kt.target.clientHeight+"px",sn.current.style.top=kt.target.offsetTop+"px",sn.current.style.left=kt.target.offsetLeft+"px",kt.target.id&&(it.current=kt.target.id)):sn.current.style.display="none"},wn=()=>{sn.current.style.display="none"};return(0,te.useEffect)(()=>{var kt;const Pn=Qt=>{Qt.preventDefault(),Qt.clipboardData.setData("text",window.getSelection().toString())};return(kt=Xt.current)==null||kt.addEventListener("copy",Pn),()=>{var Qt;(Qt=Xt.current)==null||Qt.removeEventListener("copy",Pn)}},[Xt.current]),te.createElement("div",{style:{position:"relative"},onMouseLeave:wn},St&&te.createElement("div",{ref:Xt,className:`${Ne.mdBody} `},tt),!St&&!Ee(tt)&&te.createElement("div",{ref:Xt,style:yt({},Ct),onMouseOver:cn,className:`${pe||""} ${en?"disabled-fill":""} markdown-body ${Ne.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:tt}}),!St&&Ee(tt)&&te.createElement(We,{html:tt}),te.createElement("div",{ref:sn,className:`${Ne.button} ${ot?"":Ne.previewFlowChart}`},te.createElement(Ie.Z,null,te.createElement(fe.ZP,{onClick:()=>{ot?ze(it.current):(ht(it.current),ee("flowChart"))}},ot?"\u7F16\u8F91":"\u9884\u89C8"))),te.createElement(xe.Z,{close:!0,data:_t,type:_t!=null&&_t.length?se:"",style:yt({},qt),onClose:()=>ht("")}))}},28267:function(rn,jt,ie){"use strict";ie.d(jt,{h:function(){return gt}});var te=ie(59301),ut=ie(82326),ve=ie(28284),Je=ie(7939),be=ie(89780),Se=ie.n(be),He=ie(88319),nt=ie(94896),Ie=Object.defineProperty,fe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,We=(ct,yt,Ke)=>yt in ct?Ie(ct,yt,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):ct[yt]=Ke,Ve=(ct,yt)=>{for(var Ke in yt||(yt={}))wt.call(yt,Ke)&&We(ct,Ke,yt[Ke]);if(xe)for(var Ke of xe(yt))rt.call(yt,Ke)&&We(ct,Ke,yt[Ke]);return ct},Ne=(ct,yt)=>fe(ct,et(yt));const pt=ut.default.Option,It={labelCol:{span:4},wrapperCol:{span:20}},Ot={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"]};jt.Z=({callback:ct,onCancel:yt})=>{const[Ke,Bt]=(0,te.useState)("python");function Fe(ft){Bt(Ot[ft][1])}function _e(ft){ct(ft)}return te.createElement(ve.default,Ne(Ve({},It),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_e,style:{width:500}}),te.createElement(ve.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},te.createElement(ut.default,{getPopupContainer:ft=>ft.parentNode,onChange:Fe},Object.keys(Ot).map(ft=>te.createElement(pt,{key:ft,value:ft},Ot[ft][0])))),te.createElement(ve.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},te.createElement(gt,{mode:Ke})),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Je.ZP,{type:"ghost",onClick:yt},"\u53D6\u6D88")))};function gt({value:ct,onChange:yt,mode:Ke,options:Bt={}}){const Fe=(0,te.useRef)(),[_e,ft]=(0,te.useState)();return(0,te.useEffect)(()=>{if(_e){let Re=function(lt){const ot=lt.getValue();yt&&yt(ot)};return _e.on("change",Re),()=>{_e.off("change",Re)}}},[_e,yt]),(0,te.useEffect)(()=>{_e&&_e.setOption("mode",Ke)},[_e,Ke]),(0,te.useEffect)(()=>{_e&&(ct!==_e.getValue()||ct==="")&&setTimeout(()=>{_e.setValue(ct||"")},300)},[_e,ct]),(0,te.useEffect)(()=>{if(Fe.current&&!_e){const Re=Se().fromTextArea(Fe.current,Ve({mode:Ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Bt));ft(Re)}},[Fe.current,_e]),te.createElement("div",{className:"my-codemirror-container"},te.createElement("textarea",{ref:Fe}))}},39116:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return hn}});var te=ie(59301),ut=ie(44283),ve=ie(89780),Je=ie.n(ve),be=ie(76374),Se=ie(88319),He=ie(6313),nt=ie(25717),Ie=ie(99498),fe=ie(25419),et=ie(67549),xe=ie(35883),wt=({value:Yt="",className:Mn,showTextOnly:pn,showLines:On,style:Gn={}})=>{const Zn=(0,te.useMemo)(()=>"",[Yt]);return te.createElement(te.Fragment,null,te.createElement("div",{dangerouslySetInnerHTML:{__html:Zn}}))},rt=Object.defineProperty,We=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,Ot=(Yt,Mn,pn)=>Mn in Yt?rt(Yt,Mn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):Yt[Mn]=pn,gt=(Yt,Mn)=>{for(var pn in Mn||(Mn={}))pt.call(Mn,pn)&&Ot(Yt,pn,Mn[pn]);if(Ne)for(var pn of Ne(Mn))It.call(Mn,pn)&&Ot(Yt,pn,Mn[pn]);return Yt},ct=(Yt,Mn)=>We(Yt,Ve(Mn));let yt=[{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 Ke({onActionCallback:Yt,title:Mn,icon:pn,actionName:On,className:Gn="",children:Zn}){function Bn(){Yt(On)}return te.createElement("a",{title:Mn,className:Gn,onClick:Bn},te.createElement("i",{className:`${pn}`}),Zn)}var Bt=({watch:Yt,showNullButton:Mn,showNullProgramButton:pn,onActionCallback:On,fullScreen:Gn,insertTemp:Zn,hidetoolBar:Bn,extraUse:Xn})=>{const Nn=[...yt,{title:`${Yt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Yt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return te.createElement("ul",{className:"markdown-toolbar-container"},!Bn&&Nn.map((ar,qn)=>te.createElement("li",{key:qn},ar.actionName?te.createElement(Ke,ct(gt({},ar),{onActionCallback:On})):te.createElement("span",{className:"v-line"}))),Mn?te.createElement("li",null,te.createElement(Ke,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:On},te.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,pn?te.createElement(te.Fragment,null,te.createElement("li",null,te.createElement(Ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:On},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),te.createElement("li",null,te.createElement(Ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:On},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Zn&&te.createElement("li",null,te.createElement(Ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Zn}`,onActionCallback:On},te.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Xn&&te.createElement("li",null,Xn),te.createElement("li",{className:"btn-full-screen"},te.createElement(Ke,{icon:`${Gn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Gn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:On})))},Fe=ie(88487),_e=ie(28284),ft=ie(37568),Re=ie(7939),lt=Object.defineProperty,ot=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,qt=(Yt,Mn,pn)=>Mn in Yt?lt(Yt,Mn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):Yt[Mn]=pn,Ce=(Yt,Mn)=>{for(var pn in Mn||(Mn={}))ke.call(Mn,pn)&&qt(Yt,pn,Mn[pn]);if(St)for(var pn of St(Mn))Ct.call(Mn,pn)&&qt(Yt,pn,Mn[pn]);return Yt},de=(Yt,Mn)=>ot(Yt,pe(Mn));const mt={labelCol:{span:4},wrapperCol:{span:20}};var en=({callback:Yt,onCancel:Mn})=>{function pn(On){Yt(On)}return te.createElement(_e.default,de(Ce({},mt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pn,style:{width:500}}),te.createElement(_e.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},te.createElement(ft.default,null)),te.createElement(_e.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},te.createElement(ft.default,null)),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Re.ZP,{type:"ghost",onClick:Mn},"\u53D6\u6D88")))},Mt=ie(28267),ze=ie(53332),dt=ie(62957),bt=ie(77019),un=ie(40254),At=ie(59301),sn=({callback:Yt,onCancel:Mn})=>{const pn=document.createElement("canvas"),On=pn.getContext("2d");pn.width=1e3,pn.height=800,On.fillStyle="#ffffff",On.fillRect(0,0,pn.width,pn.height);const Gn=pn.toDataURL("image/png");return At.createElement(dt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},At.createElement(bt.Z,{style:{height:"100vh"}},At.createElement(un.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Gn,visible:!0,title:String(Date.now())},onOk:Zn=>{Yt({src:Zn.url})},onClose:Mn})))},it=ie(36207),_t=ie(5269),ht=ie(6767),se={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=ie(59301),oe=(0,te.forwardRef)(({onCancel:Yt,editImgId:Mn,callback:pn},On)=>{let Gn=(0,te.useRef)(),Zn=(0,te.useRef)(),Bn=(0,te.useRef)(),Xn=(0,te.useRef)(!1);const Nn=(0,te.useRef)(!1);console.log("ref:",On);const[ar,qn]=(0,te.useState)(0),[Et,Ut]=(0,te.useState)("100vh");return(0,te.useEffect)(()=>{qn(1)},[]),(0,te.useImperativeHandle)(On,()=>({setHeight:Ut})),ee.createElement("div",{ref:Nn,className:"body-overflow-initial"},ee.createElement(it.Z,{width:"100vw",height:Et,footer:null,closable:!0,placement:"bottom",open:!!ar,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${se.drawerWrap}`,onClose:()=>{window.saveDrawData(zn=>{pn({src:`/api/attachments/${zn}`,id:zn})})},title:ee.createElement(bt.Z,{align:"middle"},ee.createElement(_t.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(_t.Z,{onClick:()=>{Ut(Et==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(_t.Z,{onClick:()=>{window.saveDrawData(zn=>{if(zn===null){ht.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}ht.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),pn({src:`/api/attachments/${zn}`,id:zn,disabledClose:!0})})}},ee.createElement(Re.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.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:Zn})))}),le=ie(14185),re=ie(47889),Ee=ie(4875);const at=re.ZP.Group,Ht={margin:"0 8px"};var Ye=({callback:Yt,onCancel:Mn})=>{function pn(On){Yt(On)}return te.createElement(_e.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pn},te.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},te.createElement("span",{style:Ht},"\u5355\u5143\u683C\u6570\uFF1A"),te.createElement("span",{style:Ht},"\u884C\u6570"),te.createElement(_e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},te.createElement(Ee.Z,null)),te.createElement("span",{style:Ht},"\u5217\u6570"),te.createElement(_e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},te.createElement(Ee.Z,null))),te.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},te.createElement("span",{style:Ht},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),te.createElement(_e.default.Item,{name:"align"},te.createElement(at,null,te.createElement(re.ZP,{value:"default"},te.createElement("i",{className:"fa fa-align-justify"})),te.createElement(re.ZP,{value:"left"},te.createElement("i",{className:"fa fa-align-left"})),te.createElement(re.ZP,{value:"center"},te.createElement("i",{className:"fa fa-align-center"})),te.createElement(re.ZP,{value:"right"},te.createElement("i",{className:"fa fa-align-right"}))))),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Re.ZP,{type:"ghost",onClick:Mn},"\u53D6\u6D88")))},tt=ie(58755),vt=ie(84915),Rt=ie.n(vt),Jt=(0,te.forwardRef)(({use3d:Yt,width:Mn,height:pn,callback:On,showSaveButton:Gn},Zn)=>{const Bn=(0,te.useRef)(),Xn=(0,te.useRef)(),[Nn,ar]=(0,te.useState)(!1),qn=(0,te.useRef)({id:Bn,appName:"graphing",width:Mn||1e3,height:pn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,te.useEffect)(()=>{Xn.current=new(Rt())(qn.current,!0),window.onload=function(){Xn.current.inject("applet_container")}},[]);const Et=()=>{var Ut=window.ggbApplet.getPNGBase64(1,!0,72);return On&&On(Ut),Ut};return(0,te.useEffect)(()=>{qn.current.appName=Nn?"3D":"graphing",Xn.current.inject("applet_container")},[Nn]),(0,te.useEffect)(()=>{ar(Yt)},[Yt]),(0,te.useImperativeHandle)(Zn,()=>({getImgData:Et})),te.createElement(te.Fragment,null,te.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Bn}),te.createElement(bt.Z,{align:"middle"},te.createElement(_t.Z,{flex:1},te.createElement(tt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:Ut=>ar(Ut)})),te.createElement(_t.Z,null,te.createElement(Re.ZP,{size:"large",onClick:Et,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Xt=ie(9057);const Zt="link",En="upload-image",cn="add-flowchart",wn="draw-image",kt="add-flowchart",Pn="code-block",Qt="add-table",Pe="------------",Qe={default:Pe,left:`:${Pe}`,center:`:${Pe}:`,right:`${Pe}:`};var Lt=ie(79006),Nt=ie(76406);function we(){}let $e=0;const st=1e4,Tt="\u2581",zt="@\u2581\u2581@",on="@\u2581@",Dn=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,In=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function dn(Yt){return/^\d+$/.test(Yt)?`${Yt}px`:Yt}const fn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$n={[fn+"-B"]:"bold",[fn+"-I"]:"italic"},gn={[Zt]:"\u6DFB\u52A0\u94FE\u63A5",[Pn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[En]:"\u6DFB\u52A0\u56FE\u7247",[wn]:"\u6DFB\u52A0\u753B\u56FE",[cn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Qt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var hn=({defaultValue:Yt="",onChange:Mn,width:pn="100%",height:On=400,miniToolbar:Gn=!1,isFocus:Zn=!1,watch:Bn,insertTemp:Xn,mode:Nn="markdown",id:ar="markdown-editor-id",showResizeBar:qn=!1,noStorage:Et=!1,showNullButton:Ut=!1,showNullProgramButton:zn=!1,hidetoolBar:nr=!1,fullScreen:De=!1,onBlur:Ue,onCMBeforeChange:ge,onFullScreen:Me,className:ye="",disablePaste:Le=!1,disabled:me=!1,disabledFill:Be=!1,placeholder:Ze="",values:qe="",extraUse:je,onAddBlank:Oe})=>{const[Te,Ge]=(0,te.useState)(null),[$t,Ft]=(0,te.useState)(Yt),[Wt,kn]=(0,te.useState)(Bn),[Tn,Hn]=(0,te.useState)(De),[Sn,mn]=(0,te.useState)(""),[Cn,Fn]=(0,te.useState)(0),[Yn,Vn]=(0,te.useState)(On),[Kn,vn]=(0,te.useState)(!1),[er,Wn]=(0,te.useState)(0),[dr,pr]=(0,te.useState)(0),lr=(0,te.useRef)(),ur=(0,te.useRef)(),yr=(0,te.useRef)(),sr=(0,te.useRef)(),fr=(0,te.useRef)(),Qn=(0,te.useRef)(),mr=(0,ut.useDispatch)();(0,te.useEffect)(()=>{const tn=window.scrollY||window.pageYOffset;Ft(qe),Te==null||Te.setValue(qe),window.scrollTo(0,tn)},[qe]),(0,te.useEffect)(()=>{Me==null||Me(Tn)},[Tn]),(0,te.useEffect)(()=>{if(lr.current){let tn=function(yn,Ln){var cr;if(Le){Ln.preventDefault();return}const Lr=Ln.clipboardData;if(Lr){const Ir=Lr.types.toString(),Rr=Lr.items;if(Ir==="Files"||Lr.types.indexOf("Files")>-1){if(Ln.preventDefault(),Nn=="stex")return;try{let Br=Rr[1];((cr=Rr[0])==null?void 0:cr.kind)==="file"&&(Br=Rr[0]);const Fr=Br.getAsFile(),Vr=Fr.name.split(".").pop();(0,ze.I)(Fr,Wr=>{var Kr,ti,Ei;Wr.id?((Kr=Fr==null?void 0:Fr.type)==null?void 0:Kr.indexOf("image"))>-1?Vt.replaceSelection(`<img width="100%" src="/api/attachments/${Wr.id}?type=${Wr.content_type})" alt="" />`):((ti=Fr==null?void 0:Fr.type)==null?void 0:ti.indexOf("video"))>-1?Vt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Wr.id}"></video>`):((Ei=Fr==null?void 0:Fr.type)==null?void 0:Ei.indexOf("pdf"))>-1?Vt.replaceSelection(`<a href="/api/attachments/${Wr.id}?type=${Fr.type}&disposition=inline" target="_blank">${Fr.name}</a>`):In.includes(Vr)?Vt.replaceSelection(`<a href="/api/attachments/${Wr.id}?type=office&disposition=inline" target="_blank">${Fr.name}</a>`):Vt.replaceSelection(`[${Fr.name}](/api/attachments/${Wr.id}?type=${Wr.content_type})`):(Wr==null?void 0:Wr.status)===401&&(document.location.href="/user/login")})}catch(Br){ht.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Vt=Je().fromTextArea(lr.current,{mode:Nn,lineNumbers:!Gn,lineWrapping:!0,value:Yt,autoCloseTags:!0,autoCloseBrackets:!0});return Vt.on("keyup",function(yn,Ln){Ln.keyCode===8&&(yn.getValue()==""?Vt.setOption("placeholder",Ze):Vt.setOption("placeholder",null))}),Vt.on("keydown",function(yn,Ln){if(Ln.keyCode===8){var cr=Hr(yn);cr&&Ln.preventDefault()}}),Zn&&Vt.focus(),Vt.on("paste",tn),me&&Vt.on("beforeChange",function(yn,Ln){(Ln.origin==="paste"||Ln.origin==="+input")&&Ln.cancel()}),Ge(Vt),()=>{Vt.off("paste",tn)}}},[]);const br=(0,te.useCallback)(()=>{if(ur.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[Yn,ur,Tn]);(0,te.useEffect)(()=>{function tn(){let Vt=new be.Z(yn=>{for(let Ln of yn)(Ln.target.offsetHeight>0||Ln.target.offsetWidth>0)&&(br(),Te.setSize("100%","100%"),Te.refresh())});return Vt.observe(lr.current.parentElement),Vt}if(Te){const Vt=tn();return()=>{var yn,Ln;(yn=lr.current)!=null&&yn.parentElement&&Vt.unobserve((Ln=lr.current)==null?void 0:Ln.parentElement)}}},[Te,br]),(0,te.useEffect)(()=>{if(Te){let tn=[];for(const[Vt,yn]of Object.entries($n)){let Ln={[Vt]:()=>{Er(yn)}};tn.push(Ln),Te.addKeyMap(Ln)}return()=>{for(let Vt of tn)Te.removeKeyMap(Vt)}}},[Te]),(0,te.useEffect)(()=>{De!==Tn&&Hn(De)},[De]),(0,Lt.Z)(()=>{if(!Et&&Cn>0){let tn=new Date().getTime(),Vt=window.sessionStorage.getItem(ar);tn>=Cn+st&&(!Vt||Vt!==$t)&&(window.sessionStorage.setItem(ar,$t),vn(!0))}},st),(0,te.useEffect)(()=>{kn(Bn)},[Te,Bn]),(0,te.useEffect)(()=>{Te&&Zn&&Te.focus()},[Te,Zn]),(0,te.useEffect)(()=>{if(Wt&&Te){let tn=function(yn){let Ln=yn.target;if(sr.current){let cr=Ln.scrollTop/Ln.scrollHeight;sr.current.scrollTop=sr.current.scrollHeight*cr}};const Vt=Te.getScrollerElement();return Vt.addEventListener("scroll",tn),()=>{Vt.removeEventListener("scroll",tn)}}},[Te,Wt]),(0,te.useEffect)(()=>{if(Te&&ge){let tn=function(Vt,yn){ge(Vt,yn)};return Te.on("beforeChange",tn),()=>{Te.off("beforeChange",tn)}}},[Te,ge]),(0,te.useEffect)(()=>{if(Te&&Ue){let tn=function(){Ue(Te.getValue())};return Te.on("blur",tn),()=>{Te.off("blur",tn)}}},[Te,Ue]);function Hr(tn,Vt){var yn=tn.getDoc(),Ln=yn.getCursor(),cr=yn.getLine(Ln.line),Lr=cr.charAt(Ln.ch-1),Ir=cr.lastIndexOf("@\u2581@",Ln.ch),Rr=cr.lastIndexOf("@\u2581\u2581@",Ln.ch),Br=Ir>Rr?Ir:Rr,Fr=Ir>Rr?3:4;if(zt.indexOf(Lr)===-1)return null;if(console.log("change1:",Vt,tn,cr,Ln,Br,Ir,Rr,Lr),Br>=0&&Ln.ch-Br<5){var Vr=Br+Fr;return yn.replaceRange("",{line:Ln.line,ch:Br},{line:Ln.line,ch:Vr}),{line:Ln.line,ch:Vr}}return null}(0,te.useEffect)(()=>{if(Te){let tn=function(Vt,yn){const Ln=Vt.getValue();Ft(Ln),Fn(new Date().getTime()),Vt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Mn&&(zn?Mn(Ln,ln(Ln)):Mn(Ln))};return Te.on("change",tn),()=>{Te.off("change",tn)}}},[Te,Mn]),(0,te.useEffect)(()=>{if(Te)if(Yt==null)Te.setValue(""),Ft("");else{const tn=window.scrollY||window.pageYOffset;Yt!==Te.getValue()&&(Te.setValue(Yt),Ft(Yt),Te.setCursor(me?1:Te.lineCount(),0),window.scrollTo(0,tn))}},[Te,Yt]);const Er=(0,te.useCallback)(tn=>{const Vt=Te.getCursor(),yn=Te.getSelection();let Ln=yn.split(`
|
|
|
`);switch(tn){case"bold":return Te.replaceSelection("**"+yn+"**"),yn===""&&Te.setCursor(Vt.line,Vt.ch+2),Te.focus();case"italic":return Te.replaceSelection("*"+yn+"*"),yn===""&&Te.setCursor(Vt.line,Vt.ch+1),Te.focus();case"code":return Te.replaceSelection("`"+yn+"`"),yn===""&&Te.setCursor(Vt.line,Vt.ch+1),Te.focus();case"inline-latex":return(0,Nt.Ye)(mr)?void 0:(mn("inline-latex"),Te.focus());case"latex":return Te.replaceSelection("```latex\n"+yn+"\n```"),Te.setCursor(Vt.line+1,yn.length+1),Te.focus();case"line-break":return Te.replaceSelection(`<br/>
|
|
|
`),Te.focus();case"list-ul":return yn===""?Te.replaceSelection("- "+yn):Te.replaceSelection(Ln.map(cr=>cr===""?"":`- ${cr}`).join(`
|
|
|
`)),Te.focus();case"list-ol":return yn===""?Te.replaceSelection("1. "+yn):Te.replaceSelection(Ln.map((cr,Lr)=>cr===""?"":`${Lr+1}. ${cr}`).join(`
|
|
|
`)),Te.focus();case"add-null-ch":Oe==null||Oe();return;case"add-signal":return yn===""&&Te.setCursor(Vt.line,Vt.ch),Te.replaceSelection(on),Te.focus();case"add-multiple":return yn===""&&Te.setCursor(Vt.line,Vt.ch),Te.replaceSelection(zt),Te.focus();case"inster-template-1":return yn===""&&Te.setCursor(Vt.line,Vt.ch),Te.replaceSelection(Dn),Te.focus();case"eraser":return Te.setValue(""),Te.focus();case"trigger-watch":return kn(!Wt),Te.focus();case"trigger-full-screen":return Hn(!Tn),Te.focus();case Zt:mn(Zt);return;case Pn:mn(Pn);return;case En:mn(En);return;case wn:mn(wn);return;case"maths-latex":if((0,Nt.Ye)(mr))return;mn("maths-latex");return;case cn:fr.current="",sessionStorage.removeItem("file_id"),mn(cn);return;case Qt:mn(Qt);return;default:throw new Error}},[Te,Wt,Tn]),Ar=(0,te.useCallback)((tn,Vt)=>{var yn,Ln,cr,Lr,Ir,Rr;tn!=null&&tn.disabledClose||mn("");const{src:Br,alt:Fr,id:Vr}=tn||{};switch(Sn){case Zt:const{title:Ni,link:xi}=tn;return Te.replaceSelection(`[${Ni}](${xi})`),Te.focus();case Pn:const{language:li,content:Ri}=tn;return Te.replaceSelection(["```"+li,Ri,"```"].join(`
|
|
|
`)),Te.focus();case"maths-latex":for(var Wr=atob(tn),Kr=new Uint8Array(Wr.length),ti=0;ti<Wr.length;ti++)Kr[ti]=Wr.charCodeAt(ti);var Ei=new Blob([Kr],{type:"image/png"});return(0,ze.I)(Ei,wr=>{wr.id?Te.replaceSelection(``):(wr==null?void 0:wr.status)===401&&(document.location.href="/user/login")}),Te.focus();case"inline-latex":return(0,Nt.Ye)(mr)?void 0:(Te.replaceSelection("`$$"+tn+"$$`"),Te.focus());case kt:return Vr?(Te.getValue().indexOf(Br)===-1?Te.replaceSelection(`<center><img id="${Vr}" width="80%" src="${Br}" class="draw-flowchart" alt="${Fr||""}" /></center>`):document.getElementById(Vr).src=le.Z.API_SERVER+Br+"?t="+Date.now(),Te.focus()):void 0;case En:case wn:const $r=Vt,_i=(cr=(Ln=(yn=$r==null?void 0:$r.name)==null?void 0:yn.split("."))==null?void 0:Ln.pop)==null?void 0:cr.call(Ln);return((Lr=$r==null?void 0:$r.type)==null?void 0:Lr.indexOf("image"))>-1||!($r!=null&&$r.type)?$r!=null&&$r.align||$r!=null&&$r.width?Te.replaceSelection(`<p style="text-align:${$r.align||"initial"}"><img width="${$r.width?$r.width+"%":"initial"}" src="${Br}" alt="${Fr||""}" /></p>`):Te.replaceSelection(`<img width="100%" src="${Br}" alt="${Fr||""}" />`):((Ir=$r==null?void 0:$r.type)==null?void 0:Ir.indexOf("video"))>-1?Te.replaceSelection(`<video width="100%" controls src="${Br}"></video>`):((Rr=$r==null?void 0:$r.type)==null?void 0:Rr.indexOf("pdf"))>-1?Te.replaceSelection(`<a href="${Br}?type=${$r.type}&disposition=inline" target="_blank">${$r.name}</a>`):In.includes(_i)?Te.replaceSelection(`<a href="${Br}?type=office&disposition=inline" target="_blank">${$r.name}</a>`):Te.replaceSelection(`[${$r.name}](${Br})`),Te.focus();case Qt:const{row:qr,col:xr,align:zr}=tn;let Gr=`
|
|
|
`;for(let wr=0;wr<qr;wr++){let Nr=[],Or=[];for(let ui=0;ui<xr;ui++)wr===1&&Or.push(Qe[zr]),Nr.push(" ");wr===1&&(Gr+=`| ${Or.join(" | ")} |
|
|
|
`),Gr+=`| ${Nr.join(xr===1?"":" | ")} |
|
|
|
`}return Te.replaceSelection(Gr+`
|
|
|
`),Te.focus();default:throw new Error}},[Te,Sn]),kr=(0,te.useMemo)(()=>{switch(Sn){case Zt:return te.createElement(en,{callback:Ar,onCancel:Pr});case Pn:return te.createElement(Mt.Z,{callback:Ar,onCancel:Pr});case En:return te.createElement(ze.Z,{callback:Ar,onCancel:Pr});case cn:return te.createElement(oe,{editImgId:fr.current,callback:Ar,onCancel:Pr});case Qt:return te.createElement(Ye,{callback:Ar,onCancel:Pr});case"maths-latex":return te.createElement(Jt,{showSaveButton:!0,callback:Ar});case"inline-latex":return te.createElement(Xt.Z,{showSaveButton:!0,callback:Ar});default:return null}},[Sn]);function Pr(){mn("")}(0,te.useEffect)(()=>{if(yr.current){let tn=function(Ir){cr=!0,Lr=Ir.pageY},Vt=function(){cr=!1},yn=function(Ir){if(cr){let Rr=Ir.pageY-Lr;Rr<0&&(Rr=0),Rr>300&&(Rr=300);let Br=On+Rr+"px";Vn(Br)}},Ln=yr.current,cr=!1,Lr=0;return Ln.addEventListener("mousedown",tn),document.addEventListener("mousemove",yn),document.addEventListener("mouseup",Vt),()=>{Ln.removeEventListener("mousedown",tn),document.removeEventListener("mousemove",yn),document.removeEventListener("mouseup",Vt)}}},[Te,yr]),(0,te.useEffect)(()=>{Vn(On)},[On]);const ir=dn(pn),rr=dn(Yn),Jn={width:ir,height:rr},Kt=(0,te.useMemo)(()=>{if(Cn){let tn=new Date(Cn),Vt=tn.getHours(),yn=tn.getMinutes(),Ln=tn.getSeconds();return Vt=Vt<10?"0"+Vt:Vt,yn=yn<10?"0"+yn:yn,Ln=Ln<10?"0"+Ln:Ln,`${Vt}:${yn}:${Ln}`}return 0},[Cn]),ln=tn=>{const Vt=[];if(zn){let yn=-1;tn=tn.replace(/(@▁▁@|@▁@)/g,function(Ln,cr,Lr){Vt.push({multiLine:Ln!==on})})}return Vt};function an(){window.sessionStorage.removeItem(ar),vn(!1),Fn(0)}function Gt(){vn(!1),Fn(0),Te.setValue(window.sessionStorage.getItem(ar))}(0,te.useEffect)(()=>{gn[Sn]&&Sn!==wn&&Sn!==cn&&setTimeout(()=>{const tn=document.getElementsByClassName("markdown-popup-form")[0],Vt=window.innerWidth/2-tn.offsetWidth/2,yn=window.innerHeight/2-tn.offsetHeight/2;Wn(Vt),pr(yn)},0)},[Sn]);const An=tn=>{tn.preventDefault();const Vt=tn.clientX-er,yn=tn.clientY-dr;document.body.onmousemove=Ln=>{let cr=Ln.clientX-Vt,Lr=Ln.clientY-yn;const Ir=document.getElementsByClassName("markdown-popup-form")[0],Rr=window.innerWidth-Ir.offsetWidth,Br=window.innerHeight-Ir.offsetHeight;cr=Math.max(0,Math.min(cr,Rr)),Lr=Math.max(0,Math.min(Lr,Br)),jn(Ln.clientX,Ln.clientY,Vt,yn)&&(Wn(cr),pr(Lr))},document.body.onmouseup=function(){document.body.onmousemove=null}},jn=(tn,Vt,yn,Ln)=>{const cr=document.body.clientHeight,Lr=document.body.clientWidth;return tn<20&&yn>tn||tn>Lr-20&&yn<tn||Vt<20&&Ln>Vt||Vt>cr-20&&Ln<Vt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return te.createElement(te.Fragment,null,te.createElement("div",{className:"markdown-editor-wrapper",ref:ur},te.createElement("div",{className:`markdown-editor-container ${ye} ${Wt?"on-preview":""} ${Gn?"mini":""} ${Tn?"full-screen":""}`,style:Jn},te.createElement(Bt,{insertTemp:Xn,watch:Wt,fullScreen:Tn,showNullButton:Ut,showNullProgramButton:zn,onActionCallback:Er,hidetoolBar:nr,extraUse:je}),te.createElement("div",{className:"markdown-editor-body"},te.createElement("div",{className:"codemirror-container"},te.createElement("textarea",{ref:lr,placeholder:Ze})),Wt?te.createElement("div",{ref:sr,className:"preview-container"},Nn==="stex"&&te.createElement(wt,{value:$t}),Nn!=="stex"&&te.createElement(xe.Z,{edit:!0,disabledFill:Be,showProgramFill:zn,value:$t,openEditor:tn=>{var Vt;fr.current=tn,(Vt=Qn.current)==null||Vt.setHeight("100vh"),setTimeout(()=>{mn("add-flowchart")},150)}})):null))),qn?te.createElement("a",{ref:yr,className:"editor-resize"}):null,Sn===wn&&te.createElement(sn,{callback:Ar,onCancel:Pr}),Sn===cn&&te.createElement(oe,{ref:Qn,editImgId:fr.current,callback:Ar,onCancel:Pr}),te.createElement(Fe.Z,null,gn[Sn]&&Sn!==wn&&Sn!==cn?te.createElement(dt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:er,top:dr},title:te.createElement("div",{style:{cursor:"move"},onMouseDown:An},gn[Sn]),open:!0,onCancel:Pr,footer:null,destroyOnClose:!0,width:Sn===cn?"1200px":null,height:Sn===cn?"80vh":null,className:"markdown-popup-form"},kr):null))}},53332:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return yt},I:function(){return Bt}});var te=ie(28284),ut=ie(6767),ve=ie(37568),Je=ie(44104),be=ie(4875),Se=ie(47889),He=ie(7939),nt=ie(23216),Ie=ie(59301),fe=ie(59301),et=Object.defineProperty,xe=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Ne=(Fe,_e,ft)=>_e in Fe?et(Fe,_e,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Fe[_e]=ft,pt=(Fe,_e)=>{for(var ft in _e||(_e={}))We.call(_e,ft)&&Ne(Fe,ft,_e[ft]);if(rt)for(var ft of rt(_e))Ve.call(_e,ft)&&Ne(Fe,ft,_e[ft]);return Fe},It=(Fe,_e)=>xe(Fe,wt(_e));const{useForm:Ot}=te.default,gt={width:280,marginRight:10},ct={labelCol:{span:5},wrapperCol:{span:19}};var yt=({callback:Fe,onCancel:_e})=>{const[ft]=Ot();let Re=(0,Ie.useRef)();function lt(St){Re.current.width=ft.getFieldValue("width"),Re.current.align=ft.getFieldValue("align"),Fe(St,Re.current)}function ot(St,ke){if(St.status===-1){ut.ZP.error(St.message);return}ft.setFieldsValue({src:`/api/attachments/${St.id}`,type:ke.type})}function pe(St){let ke=St.target.files[0];Re.current=ke,Bt(ke,ot)}return fe.createElement(te.default,It(pt({form:ft},ct),{className:"upload-image-panel",onFinish:lt,style:{width:470,overflow:"hidden"}}),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(te.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(ve.default,{style:gt})),fe.createElement(Ke,{onFileChange:pe}))),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(ve.default,{style:{width:264}})),fe.createElement(te.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Je.Z,null,fe.createElement(te.default.Item,{name:"width",style:{margin:0}},fe.createElement(be.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(te.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(Se.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),fe.createElement("aside",null,fe.createElement(te.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(He.ZP,{type:"default",onClick:_e},"\u53D6\u6D88"))))};function Ke({onFileChange:Fe}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Fe}))}function Bt(Fe,_e){if(!Fe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ft=new FormData;ft.append("editormd-image-file",Fe),ft.append("file_param_name","editormd-image-file"),ft.append("byxhr","true");var Re=new window.XMLHttpRequest;Re.withCredentials=!0,Re.addEventListener("load",function(lt){_e(JSON.parse(lt.target.responseText),Fe)},!1),Re.addEventListener("error",function(lt){console.error(lt)},!1),Re.open("POST",`${nt.KI}/api/attachments.json`),Re.send(ft)}},88487:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return ve}});var te=ie(59301),ut=ie(4676);class ve extends te.Component{constructor(be){super(be);const Se=window.document;this.node=Se.createElement("div"),Se.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,ut.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},34728:function(rn,jt,ie){"use strict";ie.d(jt,{SV:function(){return sn},ZP:function(){return At}});var te=ie(59301),ut=ie(76374);const ve={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"]},Je={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(`
|
|
|
`)}]},Se={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(`
|
|
|
`)}]},He={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 nt=ie(53184),Ie=ie.n(nt),fe=(it,_t,ht)=>new Promise((se,ee)=>{var z=re=>{try{le(ht.next(re))}catch(Ee){ee(Ee)}},oe=re=>{try{le(ht.throw(re))}catch(Ee){ee(Ee)}},le=re=>re.done?se(re.value):Promise.resolve(re.value).then(z,oe);le((ht=ht.apply(it,_t)).next())});const et={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"]}},xe=(it,_t,ht,se)=>{const ee=_t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ht.lineNumber,endColumn:ht.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:it.languages.CompletionItemKind.Text,insertText:oe,range:se}))},wt=(it,_t,ht,se)=>{it.languages.registerCompletionItemProvider(_t,{provideCompletionItems(ee,z){const oe=ee.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},re=ee.getLineContent(z.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...xe(it,ee,z,le),...ht.map(at=>({label:at,kind:it.languages.CompletionItemKind.Keyword,documentation:at,insertText:at,insertTextRules:it.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...se.map(at=>({label:at.label,kind:it.languages.CompletionItemKind.Snippet,documentation:at.content,insertText:re.startsWith("#")?at.content.replace(/#/,""):at.content,insertTextRules:it.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var rt=it=>{et.languages.forEach(_t=>{it.languages.registerDocumentFormattingEditProvider(_t,{provideDocumentFormattingEdits(ht){return fe(this,null,function*(){const se=Ie()(ht.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:ht.getFullModelRange(),text:se}]})}})}),wt(it,"java",Je.keywords,Je.quickKey),wt(it,"cpp",be.keywords,be.quickKey),wt(it,"c",ve.keywords,[]),wt(it,"python",Se.keywords,Se.quickKey),wt(it,"scala",He.keywords,He.quickKey)};const We="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ve=Object.defineProperty,Ne=(it,_t,ht)=>_t in it?Ve(it,_t,{enumerable:!0,configurable:!0,writable:!0,value:ht}):it[_t]=ht,pt=(it,_t,ht)=>Ne(it,typeof _t!="symbol"?_t+"":_t,ht);const It=class zl{constructor(_t,ht,se){this.placeholder=_t,this.editor=ht,this.monaco=se,ht.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return zl.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)}};pt(It,"ID","editor.widget.placeholderHint");var gt=It,ct=ie(96236),yt=ie(6767),Ke=ie(25399),Bt=ie(78267),Fe=ie(33156),_e=ie(56102),ft=Object.defineProperty,Re=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,ke=(it,_t,ht)=>_t in it?ft(it,_t,{enumerable:!0,configurable:!0,writable:!0,value:ht}):it[_t]=ht,Ct=(it,_t)=>{for(var ht in _t||(_t={}))pe.call(_t,ht)&&ke(it,ht,_t[ht]);if(ot)for(var ht of ot(_t))St.call(_t,ht)&&ke(it,ht,_t[ht]);return it},qt=(it,_t)=>Re(it,lt(_t)),Ce=(it,_t)=>{var ht={};for(var se in it)pe.call(it,se)&&_t.indexOf(se)<0&&(ht[se]=it[se]);if(it!=null&&ot)for(var se of ot(it))_t.indexOf(se)<0&&St.call(it,se)&&(ht[se]=it[se]);return ht},de=(it,_t,ht)=>new Promise((se,ee)=>{var z=re=>{try{le(ht.next(re))}catch(Ee){ee(Ee)}},oe=re=>{try{le(ht.throw(re))}catch(Ee){ee(Ee)}},le=re=>re.done?se(re.value):Promise.resolve(re.value).then(z,oe);le((ht=ht.apply(it,_t)).next())});function mt(it){return/^\d+$/.test(it)?`${it}px`:it}function en(){}let Mt=!1;const ze={"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 dt(it=[]){let _t=it;if(Array.isArray(it)){for(let ht=0;ht<it.length;ht++){let se=ze[it[ht]];if(se)return se}return _t[0]}return ze[_t]||_t}let bt=null;const un=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(it){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",it)}});var At=it=>{var _t=it,{width:ht="100%",height:se="100%",value:ee,language:z="javascript",style:oe={},options:le={},overrideServices:re={},theme:Ee="vs-dark",onEditBlur:at,isCopy:Ht=!1,onSave:Ye,autoHeight:tt=!1,forbidCopy:vt=!1,forbidCopyTips:Rt,onChange:Dt=en,editorDidMount:Jt=en,onFocus:Xt=en,onBreakPoint:Zt=en,breakPointValue:En=[],filename:cn="educoder.txt",errorLine:wn,errorContent:kt="",highlightLine:Pn,openBreakPoint:Qt=!1,placeholder:Pe="",showMiniMap:Qe=!0}=_t,Lt=Ce(_t,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Nt=(0,te.useRef)(),we=(0,te.useRef)({}),$e=(0,te.useRef)(),st=(0,te.useRef)(),Tt=(0,te.useRef)([]),zt=(0,te.useRef)(!1),on=(0,te.useRef)(),Dn=(0,te.useRef)(),In=(0,te.useRef)(!1),[dn,xn]=(0,te.useState)(!1);function fn(){let Et;return Nt.current&&(Et=new ut.Z(Ut=>{for(let zn of Ut)(zn.target.offsetHeight>0||zn.target.offsetWidth>0)&&we.current.instance.layout()}),Et.observe(Nt.current)),Et}function $n(){yt.ZP.warning({content:decodeURIComponent(Rt||We),key:"monaco-editor-tip"})}const gn=()=>{let Et=we.current.instance;if(ee!=null&&Et&&dn){const Ut=Et.getModel();Ut&&ee!==Ut.getValue()&&(Mt=!0,Ut.setValue(ee),Et.layout(),Mt=!1)}};(0,te.useEffect)(()=>{const Et=Fe.Z.subscribe("formatDocument",Ut=>{var zn;let nr=we.current.instance;(zn=nr==null?void 0:nr.getAction)==null||zn.call(nr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ut=>{Dt(Ut)},Et},[]),(0,te.useEffect)(()=>{var Et;let Ut=we.current.instance;st.current&&clearTimeout(st.current),st.current=setTimeout(()=>{gn()},500),ee&&(ee!=null&&ee.length)&&((Et=Ut==null?void 0:Ut.updateOptions)==null||Et.call(Ut,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,dn,we.current]),(0,te.useEffect)(()=>{if(wn&&we.current&&we.current.instance){let Ut=we.current.instance;Ut.changeViewZones(function(zn){var nr=document.createElement("div");nr.style.padding="10px 20px",nr.style.width="calc(100% - 20px)",nr.className="my-error-line-wrp",nr.innerHTML=kt,zn.addZone({afterLineNumber:wn||11,heightInLines:3,domNode:nr})});var Et={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}};Ut.addOverlayWidget(Et),Ut.revealPositionInCenter({lineNumber:20,column:1})}},[wn,we.current,dn]);const hn=(Et="",Ut)=>{if(!Et||Et.trim()==="")return!0;const nr=we.current.instance.getModel().getLineTokens(Ut);let De=!1;for(let Ue=0;Ue<2;Ue++)nr.getStandardTokenType(Ue)===1&&(De=!0);return De};(0,te.useEffect)(()=>{var Et;const Ut=(Et=we.current)==null?void 0:Et.instance;if(Ut&&dn&&vt){const zn=Ut.onDidBlurEditorWidget(()=>{In.current=!1}),nr=Ut.onDidFocusEditorText(()=>{In.current=!0});return()=>{zn.dispose(),nr.dispose()}}},[we.current,dn,vt]),(0,te.useEffect)(()=>{var Et;if((Et=we.current)!=null&&Et.instance&&dn&&Qt){let Ut=we.current.instance,zn=Ut.getModel();if(!zn)return;(()=>{var je;let Oe=[],Te=[];const Ge=zn.getAllDecorations();for(let Ft of Ge)Ft.options.className==="highlighted-line"&&(Oe.push((je=Ft==null?void 0:Ft.range)==null?void 0:je.startLineNumber),Te.push(Ft==null?void 0:Ft.id));if(Pn===Oe[0])return;zn.deltaDecorations(Te,[]);const $t=zn.getLineCount();Pn&&Pn<=$t&&(Ut.deltaDecorations([],[{range:new bt.Range(Pn,1,Pn,zn.getLineMaxColumn(Pn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ut.revealLineInCenter(Pn))})();const De=(je=!1)=>{var Oe;let Te=[],Ge=[];const $t=zn.getAllDecorations();for(let Ft of $t)Ft.options.linesDecorationsClassName==="breakpoints-select"&&(Te.push((Oe=Ft==null?void 0:Ft.range)==null?void 0:Oe.startLineNumber),Ge.push(Ft==null?void 0:Ft.id));if(je)return{lines:Te,ids:Ge};Zt(Te)},Ue=je=>de(void 0,null,function*(){let Oe={range:new bt.Range(je,1,je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield zn.deltaDecorations([],[Oe]),De()}),ge=je=>de(void 0,null,function*(){let Oe=[];const Te=Ut.getLineDecorations(je);for(let Ge of Te)Ge.options.linesDecorationsClassName==="breakpoints-select"&&Oe.push(Ge.id);yield zn.deltaDecorations(Oe,[]),De()}),Me=je=>{let Oe=Ut.getLineDecorations(je);for(let Te of Oe)if(Te.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Bt.isEqual)(En,De(!0).lines)){zn.deltaDecorations(De(!0).ids,[]);const je=En.map(Oe=>({range:new bt.Range(Oe,1,Oe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));zn.deltaDecorations([],je)}const ye=Ut.onDidChangeModelContent(je=>{let Oe=Ut.getPosition();if(Oe){let Te=Oe.lineNumber;clearTimeout(Dn.current),Dn.current=setTimeout(()=>{hn(zn.getLineContent(Te),Te)?ge(Te):Me(Te)?(ge(Te),Ue(Te)):De()},100)}}),Le=Ut.onMouseDown(je=>{var Oe,Te,Ge;if(je.target.detail&&((Ge=(Te=(Oe=je.target)==null?void 0:Oe.element)==null?void 0:Te.className)!=null&&Ge.includes("line-numbers"))){let $t=je.target.position.lineNumber;if(hn(zn.getLineContent($t),$t))return;Me($t)?ge($t):Ue($t)}}),me=je=>{let Oe={range:new bt.Range(je,1,je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Tt.current=Ut.deltaDecorations(Tt.current,[Oe])},Be=()=>{Tt.current=Ut.deltaDecorations(Tt.current,[])},Ze=Ut.onMouseMove(je=>{var Oe,Te,Ge;if(Be(),je.target.detail&&((Ge=(Te=(Oe=je.target)==null?void 0:Oe.element)==null?void 0:Te.className)!=null&&Ge.includes("line-numbers"))){let $t=je.target.position.lineNumber;if(hn(zn.getLineContent($t),$t))return;me($t)}}),qe=Ut.onMouseLeave(()=>{Be()});return()=>{ye.dispose(),Le.dispose(),Ze.dispose(),qe.dispose()}}},[we.current,dn,En,Pn,Qt,z]),(0,te.useEffect)(()=>{var Et;(Et=we.current)!=null&&Et.instance&&Qt&&we.current.instance.setPosition({lineNumber:0,column:0})},[Pn]);function Yt(){let Et=we.current.instance;if(Et){const Ut=Et.getSelection(),zn=we.current.pastePos||{},nr=new bt.Range(zn.startLineNumber||Ut.endLineNumber,zn.startColumn||Ut.endColumn,zn.endLineNumber||Ut.endLineNumber,zn.endColumn||Ut.endColumn);setTimeout(()=>{Et.executeEdits("",[{range:nr,text:""}])},300)}}function Mn(Et){(window.navigator.platform.match("Mac")?Et.metaKey:Et.ctrlKey)&&Et.keyCode==83&&(Et.preventDefault(),Ye())}const pn=()=>{if(tt&&we.current.instance){const Et=we.current.instance.getContentHeight();ar(Et<se?se:Et)}else ar(se)};function On(Et){var Ut=document.createEvent("MouseEvents");Ut.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Et.dispatchEvent(Ut)}const Gn=Et=>{if(!In.current)return;const{keyCode:Ut,ctrlKey:zn,metaKey:nr,target:De,type:Ue}=Et;return(Ue==="paste"||(Ut===67||Ut===86)&&(nr||zn))&&De.nodeName==="TEXTAREA"&&($n(),Et.preventDefault()),!1};function Zn(Et,Ut){var zn=window.URL||window.webkitURL||window,nr=new Blob([Ut]),De=document.createElementNS("http://www.w3.org/1999/xhtml","a");De.href=zn.createObjectURL(nr),De.download=Et,On(De)}(0,te.useEffect)(()=>{pn()},[pn]),(0,te.useEffect)(()=>{Nt.current&&!dn&&Promise.all([ie.e(8909),ie.e(5977)]).then(ie.bind(ie,71448)).then(Et=>{try{bt=Et,we.current.instance=bt.editor.create(Nt.current,{value:ee,language:dt(z),theme:Ee,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Qe||!1}},re);const Ut=we.current.instance;let De=[...ct.BH._menuItems].find(ye=>ye[0]._debugName=="EditorContext")[1],Ue=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ge=(ye,Le)=>{var me,Be;let Ze=ye._first;do Le.includes((Be=(me=Ze.element)==null?void 0:me.command)==null?void 0:Be.id)&&ye._remove(Ze);while(Ze=Ze.next)};if(Jt(Ut,bt),setTimeout(()=>{pn(),we.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Zn(cn||"educoder.txt",Ut.getValue())}})},500),we.current.subscription=Ut.onDidChangeModelContent(ye=>{zt.current?clearTimeout(on.current):(pn(),Dt(Ut.getValue(),ye)),on.current=setTimeout(()=>{zt.current=!1},500)}),window.Monaco||rt(bt,dt(z)),vt&&(ge(De,Ue),Nt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Gn),window.removeEventListener("paste",Gn),window.addEventListener("keydown",Gn),window.addEventListener("paste",Gn)),window.Monaco=bt,at&&Ut.onDidBlurEditorWidget(()=>{at(Ut.getValue())}),Xt&&Ut.onDidFocusEditorText(()=>{vt&&un(),Xt(Ut.getValue())}),vt){un();try{Ut.onDidPaste(ye=>{const Le=Ut.getSelection(),me=we.current.pastePos||{},Be=new bt.Range(me.startLineNumber||Le.endLineNumber,me.startColumn||Le.endColumn,me.endLineNumber||Le.endLineNumber,me.endColumn||Le.endColumn);Ut.executeEdits("",[{range:ye.range,text:""}])})}catch(ye){}}let Me=fn();return Pe&&typeof Pe=="string"&&new gt(Pe,Ut,bt),xn(!0),()=>{const ye=we.current.instance;ye.dispose();const Le=ye.getModel();Le&&Le.dispose(),we.current.subscription&&we.current.subscription.dispose(),Me.unobserve(Nt.current)}}catch(Ut){}})},[]),(0,te.useEffect)(()=>{if(we.current.instance&&dn)return document.addEventListener("keydown",Mn,!1),()=>{document.removeEventListener("keydown",Mn)}},[Ye,dn]),(0,te.useEffect)(()=>{let Et=we.current.instance;if(Et&&dn){let Ut=dt(z);bt.editor.setModelLanguage(Et.getModel(),Ut)}},[z,dn]),(0,te.useEffect)(()=>{we.current.instance&&dn&&bt.editor.setTheme(Ee)},[Ee,dn]),(0,te.useEffect)(()=>{let Et=we.current.instance;$e.current=le,Et&&dn&&(Et.updateOptions(Ct({},le)),setTimeout(()=>{Et.getModel().updateOptions(Ct({},le))},200))},[JSON.stringify(le),dn]),(0,te.useEffect)(()=>{let Et=we.current.instance;Et&&dn&&Et.layout()},[ht,se,dn]);const[Bn,Xn]=(0,te.useState)(mt(ht)),[Nn,ar]=(0,te.useState)(mt(se)),qn=qt(Ct({},oe),{width:Bn,height:Nn,position:"relative"});return te.createElement("div",{className:"my-monaco-editor",ref:Nt,style:qn,onFocus:()=>{vt&&un()}},Ht&&te.createElement(_e.CopyToClipboard,{text:ee,onCopy:()=>yt.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement(Ke.Z,{title:"\u590D\u5236\u4EE3\u7801"},te.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},te.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function sn({width:it="100%",height:_t="100%",original:ht,modified:se,language:ee,options:z={}}){const oe=(0,te.useRef)(),[le,re]=(0,te.useState)(null);function Ee(tt){let vt;return oe.current&&(vt=new ut.Z(Rt=>{for(let Dt of Rt)(Dt.target.offsetHeight>0||Dt.target.offsetWidth>0)&&tt.layout()}),vt.observe(oe.current)),vt}(0,te.useEffect)(()=>(oe.current&&Promise.all([ie.e(8909),ie.e(9404)]).then(ie.bind(ie,2550)).then(tt=>{bt=tt;const vt=bt.editor.createDiffEditor(oe.current,qt(Ct({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));re(vt);let Rt=Ee(vt);return()=>{vt.dispose();const Dt=vt.getModel();Dt&&Dt.dispose(),Rt.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,te.useEffect)(()=>{le&&le.setModel({original:bt.editor.createModel(ht,ee),modified:bt.editor.createModel(se,ee)})},[ht,se,ee,le]);const at=mt(it),Ht=mt(_t),Ye={width:at,height:Ht};return te.createElement("div",{className:"my-diff-editor",ref:oe,style:Ye})}},79006:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return ut}});var te=ie(59301);function ut(ve,Je){const be=(0,te.useRef)();(0,te.useEffect)(()=>{be.current=ve}),(0,te.useEffect)(()=>{function Se(){be.current()}if(Je!==null){let He=setInterval(Se,Je);return()=>clearInterval(He)}},[Je])}},5258:function(rn,jt,ie){"use strict";ie.r(jt),ie.d(jt,{default:function(){return Bt}});var te=ie(59301),ut=ie(39116),ve=ie(6767),Je=ie(37568),be=ie(7939),Se=ie(49317),He=(Fe,_e,ft)=>new Promise((Re,lt)=>{var ot=ke=>{try{St(ft.next(ke))}catch(Ct){lt(Ct)}},pe=ke=>{try{St(ft.throw(ke))}catch(Ct){lt(Ct)}},St=ke=>ke.done?Re(ke.value):Promise.resolve(ke.value).then(ot,pe);St((ft=ft.apply(Fe,_e)).next())});function nt({setIscreate:Fe,init:_e,UpdateItem:ft}){const[Re,lt]=(0,te.useState)(""),[ot,pe]=(0,te.useState)("");(0,te.useEffect)(()=>{ft&&(lt(ft&&ft.name),pe(ft&&ft.description))},[ft]);function St(){return He(this,null,function*(){if(!Re){ve.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!ot){ve.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(ft){ke();return}(yield(0,Se.ZP)("/api/hpc_courses.json",{method:"post",body:{name:Re,description:ot,container_type:window.location.pathname.split("/")[1]}}))&&(ve.ZP.info("\u521B\u5EFA\u6210\u529F"),Fe(!1),_e("add"))})}function ke(){return He(this,null,function*(){(yield(0,Se.ZP)(`/api/hpc_courses/${ft.id}.json`,{method:"put",body:{name:Re,description:ot,container_type:window.location.pathname.split("/")[1]}}))&&(ve.ZP.info("\u7F16\u8F91\u6210\u529F"),Fe(!1),_e(""))})}return te.createElement("div",null,te.createElement(Je.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:Re,maxLength:60,addonAfter:String(Re.length)+"/60",onChange:Ct=>lt(Ct.target.value)}),te.createElement(ut.Z,{id:"courseContentMD",defaultValue:ot,onChange:Ct=>pe(Ct)}),te.createElement("div",{className:"clearfix mt30 mb30"},te.createElement(be.ZP,{type:"primary",onClick:()=>St(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),te.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Fe(!1)},"\u53D6\u6D88")))}var Ie=nt,fe=ie(35883),et=(Fe,_e,ft)=>new Promise((Re,lt)=>{var ot=ke=>{try{St(ft.next(ke))}catch(Ct){lt(Ct)}},pe=ke=>{try{St(ft.throw(ke))}catch(Ct){lt(Ct)}},St=ke=>ke.done?Re(ke.value):Promise.resolve(ke.value).then(ot,pe);St((ft=ft.apply(Fe,_e)).next())});function xe({CourseItem:Fe,userId:_e,init:ft,ItemUpdate:Re,setSee:lt,UserInfo:ot}){function pe(){return et(this,null,function*(){(yield(0,Se.ZP)(`/api/hpc_courses/${Fe.id}.json`,{method:"delete"}))&&(ve.ZP.info("\u5220\u9664\u6210\u529F"),ft("delete"),lt(!1))})}function St(){Re(Fe)}return te.createElement("div",null,_e===299635||_e===301458||ot!=null&&ot.admin||ot!=null&&ot.business?te.createElement("div",{style:{textAlign:"right"}},te.createElement(be.ZP,{onClick:()=>St()},"\u7F16\u8F91"),te.createElement(be.ZP,{onClick:()=>pe(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,te.createElement("h1",null,Fe==null?void 0:Fe.name),te.createElement(fe.Z,{value:Fe==null?void 0:Fe.description}))}var wt=xe,rt=ie(94968),We=ie(14185),Ve=ie(44283),Ne=Object.defineProperty,pt=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,gt=(Fe,_e,ft)=>_e in Fe?Ne(Fe,_e,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Fe[_e]=ft,ct=(Fe,_e)=>{for(var ft in _e||(_e={}))It.call(_e,ft)&>(Fe,ft,_e[ft]);if(pt)for(var ft of pt(_e))Ot.call(_e,ft)&>(Fe,ft,_e[ft]);return Fe},yt=(Fe,_e,ft)=>new Promise((Re,lt)=>{var ot=ke=>{try{St(ft.next(ke))}catch(Ct){lt(Ct)}},pe=ke=>{try{St(ft.throw(ke))}catch(Ct){lt(Ct)}},St=ke=>ke.done?Re(ke.value):Promise.resolve(ke.value).then(ot,pe);St((ft=ft.apply(Fe,_e)).next())});function Ke({user:Fe,dispatch:_e}){var ft,Re,lt,ot,pe,St,ke,Ct,qt;const[Ce,de]=(0,te.useState)(1),[mt,en]=(0,te.useState)(100),[Mt,ze]=(0,te.useState)([]),[dt,bt]=(0,te.useState)(!1),[un,At]=(0,te.useState)(!1),[sn,it]=(0,te.useState)(""),[_t,ht]=(0,te.useState)(""),[se,ee]=(0,te.useState)("");let{itemname:z}=(0,Ve.useParams)();const[oe,le]=(0,te.useState)("");(0,te.useEffect)(()=>{_e({type:"globalSetting/headerToggle",payload:!1}),Ce&&re("")},[Ce]);function re(tt){return yt(this,null,function*(){var vt,Rt;const Dt=yield(0,Se.ZP)("/api/hpc_courses.json",{method:"get",params:{page:Ce,per_page:mt,container_type:window.location.pathname.split("/")[1]}});if(Dt){let Jt=Dt.data.hpc_courses.length;if(ze(Dt.data.hpc_courses),ee(Dt.data.file_url),ht(""),!Jt)return;if(oe)if(tt==="delete"){if(Jt===0){At(!1);return}it(Dt.data.hpc_courses[0]),At(!0),le(Dt.data.hpc_courses[0].id)}else tt==="add"?(it(Dt.data.hpc_courses[Jt-1]),At(!0),le(Dt.data.hpc_courses[Jt-1].id)):(it(Dt.data.hpc_courses.filter(Xt=>Xt.id===oe)[0]),At(!0),le(oe));else if(z){let Xt=0;(Rt=(vt=Dt==null?void 0:Dt.data)==null?void 0:vt.hpc_courses)==null||Rt.map((Zt,En)=>{var cn;(z==null?void 0:z.toLocaleLowerCase())===((cn=Zt==null?void 0:Zt.name)==null?void 0:cn.toLocaleLowerCase())&&(Xt=En)}),it(Dt.data.hpc_courses[Xt]),At(!0),le(Dt.data.hpc_courses[Xt].id),(z==null?void 0:z.toLocaleLowerCase())==="resources"&&(it(Dt.data.hpc_courses.filter(Zt=>Zt.id===15)[0]),At(!0),le(15))}else it(Dt.data.hpc_courses[0]),At(!0),le(Dt.data.hpc_courses[0].id)}})}function Ee(tt){bt(!1),At(!0),it(tt),le(tt.id)}function at(tt){ht(tt),bt(!0),At(!1)}function Ht(){ht(""),bt(!0),At(!1)}const Ye={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(tt){const{status:vt}=tt.file;vt==="done"?(ve.ZP.success(`${tt.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),re("")):vt==="error"&&ve.ZP.error(`${tt.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:tt=>{const vt=tt.size/1024/1024<150;return vt||ve.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),vt}};return te.createElement("div",{style:{marginBottom:"40px"}},te.createElement("div",{className:"bannterdiv",style:{background:`url(${We.Z.IMG_SERVER+`/${se}`})`}}),te.createElement("img",{style:{width:"100%"},src:We.Z.IMG_SERVER+`/${se}`}),te.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},te.createElement("div",{style:{flex:"1",marginTop:"17px"}},Mt&&Mt.map((tt,vt)=>te.createElement("p",{key:vt,onClick:()=>Ee(tt),className:oe===tt.id?"menuitemselect":"menuitem task-hide"},tt.name)),((ft=Fe==null?void 0:Fe.userInfo)==null?void 0:ft.user_id)===299635||((Re=Fe==null?void 0:Fe.userInfo)==null?void 0:Re.user_id)===301458||(lt=Fe==null?void 0:Fe.userInfo)!=null&<.admin||(ot=Fe==null?void 0:Fe.userInfo)!=null&&ot.business?te.createElement("p",{onClick:()=>Ht(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},te.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),te.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},dt?te.createElement(Ie,{UpdateItem:_t,setIscreate:bt,init:re}):null,un?te.createElement(wt,{UserInfo:Fe==null?void 0:Fe.userInfo,setSee:At,userId:(pe=Fe==null?void 0:Fe.userInfo)==null?void 0:pe.user_id,ItemUpdate:at,CourseItem:sn,init:re}):null)),((St=Fe==null?void 0:Fe.userInfo)==null?void 0:St.user_id)===299635||((ke=Fe==null?void 0:Fe.userInfo)==null?void 0:ke.user_id)===301458||(Ct=Fe==null?void 0:Fe.userInfo)!=null&&Ct.admin||(qt=Fe==null?void 0:Fe.userInfo)!=null&&qt.business?te.createElement(rt.default,ct({},Ye),te.createElement(be.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Bt=(0,Ve.connect)(({user:Fe})=>({user:Fe}))(Ke)},20047:function(rn,jt,ie){"use strict";ie.d(jt,{AL:function(){return gt},Iy:function(){return et},Qv:function(){return rt},ez:function(){return Ot},jb:function(){return xe}});var te=ie(32834),ut=ie.n(te),ve=ie(11690),Je=ie.n(ve);let be=1;function Se(Fe,_e){const ft=Fe.match(/^(\s+)(?:```)/);if(ft===null)return _e;const Re=ft[1];return _e.split(`
|
|
|
`).map(lt=>{const ot=lt.match(/^\s+/);if(ot===null)return lt;const[pe]=ot;return pe.length>=Re.length?lt.slice(Re.length):lt}).join(`
|
|
|
`)}let He=[],nt=["<ul>"];const Ie=new(ut()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function et(){He.length=0,nt=["<ul>"]}const xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function wt(Fe,_e,ft,Re){if(_e>=Fe.length||Fe[_e].level<=ft)return _e;var lt=Fe[_e];Re.push("<li><a href='#"+be+lt.anchor+"'>"+lt.text+"</a>"),_e++;var ot=[];return _e=wt(Fe,_e,lt.level,ot),ot.length>0&&(Re.push("<ul>"),ot.forEach(function(pe){Re.push(pe)}),Re.push("</ul>")),Re.push("</li>"),_e=wt(Fe,_e,ft,Re),_e}function rt(){return wt(He,0,0,nt),nt.push("</ul>"),nt.join("")}const We={heading(Fe){const _e=fe.exec(Fe);if(be+=1,_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},fences(Fe){const _e=this.rules.block.fences.exec(Fe);if(_e){const ft=_e[0];let Re=Se(ft,_e[3]||"");const lt=_e[2]?_e[2].trim():_e[2];if(["latex","katex","math"].indexOf(lt)>=0){const ot=pt(),pe=Re;Re=ot,It[ot]={type:"block",expression:pe}}return{type:"code",raw:ft,lang:lt,text:Re}}}},Ve=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ne=0;const pt=()=>`__special_katext_id_${Ne++}__`;let It={};function Ot(){return It}function gt(){Ne=0,It={}}function ct(Fe){return Fe=Fe.replace(Ve,(_e,ft)=>{const Re=pt();return It[Re]={type:"inline",expression:ft},Re}),Fe}const yt=Ie.listitem;Ie.listitem=function(Fe){return yt(ct(Fe))};const Ke=Ie.paragraph;Ie.paragraph=function(Fe){return Ke(ct(Fe))};const Bt=Ie.tablecell;Ie.tablecell=function(Fe,_e){return Bt(ct(Fe),_e)},Ie.code=function(Fe,_e,ft){const Re=(_e||"").match(/\S*/)[0];return Re?["latex","katex","math"].indexOf(Re)>=0?`<p class='editormd-tex'>${Fe}</p>`:`<pre class="prettyprint linenums"><code class="language-${_e}">${ft?Fe:(0,ve.escape)(Fe,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(ft?Fe:(0,ve.escape)(Fe,!0))+"</code></pre>"},Ie.heading=function(Fe,_e,ft){let Re=this.options.headerPrefix+ft.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return He.push({anchor:Re,level:_e,text:Fe}),"<h"+_e+' id="'+be+Re+'">'+Fe+"</h"+_e+">"},ut().setOptions({silent:!0,gfm:!0,pedantic:!1}),ut().use({tokenizer:We,renderer:Ie}),jt.ZP=ut()},86013:function(rn,jt,ie){"use strict";var te=ie(59301),ut=ie(19248);const ve=Je=>{let be;return typeof Je=="object"&&(Je!=null&&Je.clearIcon)?be=Je:Je&&(be={clearIcon:te.createElement(ut.Z,null)}),be};jt.Z=ve},38406:function(rn,jt,ie){"use strict";var te=ie(59301),ut=ie(48755),ve=ie(584);const Je=be=>{const{componentName:Se}=be,{getPrefixCls:He}=(0,te.useContext)(ut.E_),nt=He("empty");switch(Se){case"Table":case"List":return te.createElement(ve.Z,{image:ve.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return te.createElement(ve.Z,{image:ve.Z.PRESENTED_IMAGE_SIMPLE,className:`${nt}-small`});case"Table.filter":return null;default:return te.createElement(ve.Z,null)}};jt.Z=Je},36207:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return Ht}});var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(85899),be=ie(72190),Se=ie(43403),He=ie(34280),nt=te.createContext(null),Ie=te.createContext({}),fe=nt,et=ie(18642),xe=ie(60499),wt=ie(77900),rt=ie(10228),We=ie(26112),Ve=ie(42244),Ne=ie(8654),pt=["prefixCls","className","containerRef"],It=function(tt){var vt=tt.prefixCls,Rt=tt.className,Dt=tt.containerRef,Jt=(0,Ve.Z)(tt,pt),Xt=te.useContext(Ie),Zt=Xt.panel,En=(0,Ne.x1)(Zt,Dt);return te.createElement("div",(0,xe.Z)({className:ve()("".concat(vt,"-content"),Rt),role:"dialog",ref:En},(0,We.Z)(tt,{aria:!0}),{"aria-modal":"true"},Jt))},Ot=It,gt=ie(48736);function ct(Ye){return typeof Ye=="string"&&String(Number(Ye))===Ye?((0,gt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ye)):Ye}function yt(Ye){warning(!("wrapperClassName"in Ye),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ye.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ke={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Bt(Ye,tt){var vt,Rt,Dt,Jt=Ye.prefixCls,Xt=Ye.open,Zt=Ye.placement,En=Ye.inline,cn=Ye.push,wn=Ye.forceRender,kt=Ye.autoFocus,Pn=Ye.keyboard,Qt=Ye.classNames,Pe=Ye.rootClassName,Qe=Ye.rootStyle,Lt=Ye.zIndex,Nt=Ye.className,we=Ye.id,$e=Ye.style,st=Ye.motion,Tt=Ye.width,zt=Ye.height,on=Ye.children,Dn=Ye.mask,In=Ye.maskClosable,dn=Ye.maskMotion,xn=Ye.maskClassName,fn=Ye.maskStyle,$n=Ye.afterOpenChange,gn=Ye.onClose,hn=Ye.onMouseEnter,Yt=Ye.onMouseOver,Mn=Ye.onMouseLeave,pn=Ye.onClick,On=Ye.onKeyDown,Gn=Ye.onKeyUp,Zn=Ye.styles,Bn=Ye.drawerRender,Xn=te.useRef(),Nn=te.useRef(),ar=te.useRef();te.useImperativeHandle(tt,function(){return Xn.current});var qn=function(Oe){var Te=Oe.keyCode,Ge=Oe.shiftKey;switch(Te){case rt.Z.TAB:{if(Te===rt.Z.TAB){if(!Ge&&document.activeElement===ar.current){var $t;($t=Nn.current)===null||$t===void 0||$t.focus({preventScroll:!0})}else if(Ge&&document.activeElement===Nn.current){var Ft;(Ft=ar.current)===null||Ft===void 0||Ft.focus({preventScroll:!0})}}break}case rt.Z.ESC:{gn&&Pn&&(Oe.stopPropagation(),gn(Oe));break}}};te.useEffect(function(){if(Xt&&kt){var je;(je=Xn.current)===null||je===void 0||je.focus({preventScroll:!0})}},[Xt]);var Et=te.useState(!1),Ut=(0,be.Z)(Et,2),zn=Ut[0],nr=Ut[1],De=te.useContext(fe),Ue;typeof cn=="boolean"?Ue=cn?{}:{distance:0}:Ue=cn||{};var ge=(vt=(Rt=(Dt=Ue)===null||Dt===void 0?void 0:Dt.distance)!==null&&Rt!==void 0?Rt:De==null?void 0:De.pushDistance)!==null&&vt!==void 0?vt:180,Me=te.useMemo(function(){return{pushDistance:ge,push:function(){nr(!0)},pull:function(){nr(!1)}}},[ge]);te.useEffect(function(){if(Xt){var je;De==null||(je=De.push)===null||je===void 0||je.call(De)}else{var Oe;De==null||(Oe=De.pull)===null||Oe===void 0||Oe.call(De)}},[Xt]),te.useEffect(function(){return function(){var je;De==null||(je=De.pull)===null||je===void 0||je.call(De)}},[]);var ye=Dn&&te.createElement(wt.default,(0,xe.Z)({key:"mask"},dn,{visible:Xt}),function(je,Oe){var Te=je.className,Ge=je.style;return te.createElement("div",{className:ve()("".concat(Jt,"-mask"),Te,Qt==null?void 0:Qt.mask,xn),style:(0,Je.Z)((0,Je.Z)((0,Je.Z)({},Ge),fn),Zn==null?void 0:Zn.mask),onClick:In&&Xt?gn:void 0,ref:Oe})}),Le=typeof st=="function"?st(Zt):st,me={};if(zn&&ge)switch(Zt){case"top":me.transform="translateY(".concat(ge,"px)");break;case"bottom":me.transform="translateY(".concat(-ge,"px)");break;case"left":me.transform="translateX(".concat(ge,"px)");break;default:me.transform="translateX(".concat(-ge,"px)");break}Zt==="left"||Zt==="right"?me.width=ct(Tt):me.height=ct(zt);var Be={onMouseEnter:hn,onMouseOver:Yt,onMouseLeave:Mn,onClick:pn,onKeyDown:On,onKeyUp:Gn},Ze=te.createElement(wt.default,(0,xe.Z)({key:"panel"},Le,{visible:Xt,forceRender:wn,onVisibleChanged:function(Oe){$n==null||$n(Oe)},removeOnLeave:!1,leavedClassName:"".concat(Jt,"-content-wrapper-hidden")}),function(je,Oe){var Te=je.className,Ge=je.style,$t=te.createElement(Ot,(0,xe.Z)({id:we,containerRef:Oe,prefixCls:Jt,className:ve()(Nt,Qt==null?void 0:Qt.content),style:(0,Je.Z)((0,Je.Z)({},$e),Zn==null?void 0:Zn.content)},(0,We.Z)(Ye,{aria:!0}),Be),on);return te.createElement("div",(0,xe.Z)({className:ve()("".concat(Jt,"-content-wrapper"),Qt==null?void 0:Qt.wrapper,Te),style:(0,Je.Z)((0,Je.Z)((0,Je.Z)({},me),Ge),Zn==null?void 0:Zn.wrapper)},(0,We.Z)(Ye,{data:!0})),Bn?Bn($t):$t)}),qe=(0,Je.Z)({},Qe);return Lt&&(qe.zIndex=Lt),te.createElement(fe.Provider,{value:Me},te.createElement("div",{className:ve()(Jt,"".concat(Jt,"-").concat(Zt),Pe,(0,et.Z)((0,et.Z)({},"".concat(Jt,"-open"),Xt),"".concat(Jt,"-inline"),En)),style:qe,tabIndex:-1,ref:Xn,onKeyDown:qn},ye,te.createElement("div",{tabIndex:0,ref:Nn,style:Ke,"aria-hidden":"true","data-sentinel":"start"}),Ze,te.createElement("div",{tabIndex:0,ref:ar,style:Ke,"aria-hidden":"true","data-sentinel":"end"})))}var Fe=te.forwardRef(Bt),_e=Fe,ft=function(tt){var vt=tt.open,Rt=vt===void 0?!1:vt,Dt=tt.prefixCls,Jt=Dt===void 0?"rc-drawer":Dt,Xt=tt.placement,Zt=Xt===void 0?"right":Xt,En=tt.autoFocus,cn=En===void 0?!0:En,wn=tt.keyboard,kt=wn===void 0?!0:wn,Pn=tt.width,Qt=Pn===void 0?378:Pn,Pe=tt.mask,Qe=Pe===void 0?!0:Pe,Lt=tt.maskClosable,Nt=Lt===void 0?!0:Lt,we=tt.getContainer,$e=tt.forceRender,st=tt.afterOpenChange,Tt=tt.destroyOnClose,zt=tt.onMouseEnter,on=tt.onMouseOver,Dn=tt.onMouseLeave,In=tt.onClick,dn=tt.onKeyDown,xn=tt.onKeyUp,fn=tt.panelRef,$n=te.useState(!1),gn=(0,be.Z)($n,2),hn=gn[0],Yt=gn[1],Mn=te.useState(!1),pn=(0,be.Z)(Mn,2),On=pn[0],Gn=pn[1];(0,He.Z)(function(){Gn(!0)},[]);var Zn=On?Rt:!1,Bn=te.useRef(),Xn=te.useRef();(0,He.Z)(function(){Zn&&(Xn.current=document.activeElement)},[Zn]);var Nn=function(zn){var nr;if(Yt(zn),st==null||st(zn),!zn&&Xn.current&&!((nr=Bn.current)!==null&&nr!==void 0&&nr.contains(Xn.current))){var De;(De=Xn.current)===null||De===void 0||De.focus({preventScroll:!0})}},ar=te.useMemo(function(){return{panel:fn}},[fn]);if(!$e&&!hn&&!Zn&&Tt)return null;var qn={onMouseEnter:zt,onMouseOver:on,onMouseLeave:Dn,onClick:In,onKeyDown:dn,onKeyUp:xn},Et=(0,Je.Z)((0,Je.Z)({},tt),{},{open:Zn,prefixCls:Jt,placement:Zt,autoFocus:cn,keyboard:kt,width:Qt,mask:Qe,maskClosable:Nt,inline:we===!1,afterOpenChange:Nn,ref:Bn},qn);return te.createElement(Ie.Provider,{value:ar},te.createElement(Se.Z,{open:Zn||$e||hn,autoDestroy:!1,getContainer:we,autoLock:Qe&&(Zn||hn)},te.createElement(_e,Et)))},Re=ft,lt=Re,ot=ie(62487),pe=ie(75030),St=ie(86641),ke=ie(55743),Ct=ie(48755),qt=ie(91190),Ce=ie(78776),de=ie(458),en=Ye=>{var tt,vt;const{prefixCls:Rt,title:Dt,footer:Jt,extra:Xt,loading:Zt,onClose:En,headerStyle:cn,bodyStyle:wn,footerStyle:kt,children:Pn,classNames:Qt,styles:Pe}=Ye,Qe=(0,Ct.dj)("drawer"),Lt=te.useCallback(Tt=>te.createElement("button",{type:"button",onClick:En,"aria-label":"Close",className:`${Rt}-close`},Tt),[En]),[Nt,we]=(0,Ce.Z)((0,Ce.w)(Ye),(0,Ce.w)(Qe),{closable:!0,closeIconRender:Lt}),$e=te.useMemo(()=>{var Tt,zt;return!Dt&&!Nt?null:te.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(Tt=Qe.styles)===null||Tt===void 0?void 0:Tt.header),cn),Pe==null?void 0:Pe.header),className:ve()(`${Rt}-header`,{[`${Rt}-header-close-only`]:Nt&&!Dt&&!Xt},(zt=Qe.classNames)===null||zt===void 0?void 0:zt.header,Qt==null?void 0:Qt.header)},te.createElement("div",{className:`${Rt}-header-title`},we,Dt&&te.createElement("div",{className:`${Rt}-title`},Dt)),Xt&&te.createElement("div",{className:`${Rt}-extra`},Xt))},[Nt,we,Xt,cn,Rt,Dt]),st=te.useMemo(()=>{var Tt,zt;if(!Jt)return null;const on=`${Rt}-footer`;return te.createElement("div",{className:ve()(on,(Tt=Qe.classNames)===null||Tt===void 0?void 0:Tt.footer,Qt==null?void 0:Qt.footer),style:Object.assign(Object.assign(Object.assign({},(zt=Qe.styles)===null||zt===void 0?void 0:zt.footer),kt),Pe==null?void 0:Pe.footer)},Jt)},[Jt,kt,Rt]);return te.createElement(te.Fragment,null,$e,te.createElement("div",{className:ve()(`${Rt}-body`,Qt==null?void 0:Qt.body,(tt=Qe.classNames)===null||tt===void 0?void 0:tt.body),style:Object.assign(Object.assign(Object.assign({},(vt=Qe.styles)===null||vt===void 0?void 0:vt.body),wn),Pe==null?void 0:Pe.body)},Zt?te.createElement(de.Z,{active:!0,title:!1,paragraph:{rows:5},className:`${Rt}-body-skeleton`}):Pn),st)},Mt=ie(36237),ze=ie(63356),dt=ie(16931),bt=ie(51636);const un=Ye=>{const tt="100%";return{left:`translateX(-${tt})`,right:`translateX(${tt})`,top:`translateY(-${tt})`,bottom:`translateY(${tt})`}[Ye]},At=(Ye,tt)=>({"&-enter, &-appear":Object.assign(Object.assign({},Ye),{"&-active":tt}),"&-leave":Object.assign(Object.assign({},tt),{"&-active":Ye})}),sn=(Ye,tt)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${tt}`}}},At({opacity:Ye},{opacity:1})),it=(Ye,tt)=>[sn(.7,tt),At({transform:un(Ye)},{transform:"none"})];var ht=Ye=>{const{componentCls:tt,motionDurationSlow:vt}=Ye;return{[tt]:{[`${tt}-mask-motion`]:sn(0,vt),[`${tt}-panel-motion`]:["left","right","top","bottom"].reduce((Rt,Dt)=>Object.assign(Object.assign({},Rt),{[`&-${Dt}`]:it(Dt,vt)}),{})}}};const se=Ye=>{const{borderRadiusSM:tt,componentCls:vt,zIndexPopup:Rt,colorBgMask:Dt,colorBgElevated:Jt,motionDurationSlow:Xt,motionDurationMid:Zt,paddingXS:En,padding:cn,paddingLG:wn,fontSizeLG:kt,lineHeightLG:Pn,lineWidth:Qt,lineType:Pe,colorSplit:Qe,marginXS:Lt,colorIcon:Nt,colorIconHover:we,colorBgTextHover:$e,colorBgTextActive:st,colorText:Tt,fontWeightStrong:zt,footerPaddingBlock:on,footerPaddingInline:Dn,calc:In}=Ye,dn=`${vt}-content-wrapper`;return{[vt]:{position:"fixed",inset:0,zIndex:Rt,pointerEvents:"none",color:Tt,"&-pure":{position:"relative",background:Jt,display:"flex",flexDirection:"column",[`&${vt}-left`]:{boxShadow:Ye.boxShadowDrawerLeft},[`&${vt}-right`]:{boxShadow:Ye.boxShadowDrawerRight},[`&${vt}-top`]:{boxShadow:Ye.boxShadowDrawerUp},[`&${vt}-bottom`]:{boxShadow:Ye.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${vt}-mask`]:{position:"absolute",inset:0,zIndex:Rt,background:Dt,pointerEvents:"auto"},[dn]:{position:"absolute",zIndex:Rt,maxWidth:"100vw",transition:`all ${Xt}`,"&-hidden":{display:"none"}},[`&-left > ${dn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Ye.boxShadowDrawerLeft},[`&-right > ${dn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Ye.boxShadowDrawerRight},[`&-top > ${dn}`]:{top:0,insetInline:0,boxShadow:Ye.boxShadowDrawerUp},[`&-bottom > ${dn}`]:{bottom:0,insetInline:0,boxShadow:Ye.boxShadowDrawerDown},[`${vt}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:Jt,pointerEvents:"auto"},[`${vt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,Mt.unit)(cn)} ${(0,Mt.unit)(wn)}`,fontSize:kt,lineHeight:Pn,borderBottom:`${(0,Mt.unit)(Qt)} ${Pe} ${Qe}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${vt}-extra`]:{flex:"none"},[`${vt}-close`]:Object.assign({display:"inline-flex",width:In(kt).add(En).equal(),height:In(kt).add(En).equal(),borderRadius:tt,justifyContent:"center",alignItems:"center",marginInlineEnd:Lt,color:Nt,fontWeight:zt,fontSize:kt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${Zt}`,textRendering:"auto","&:hover":{color:we,backgroundColor:$e,textDecoration:"none"},"&:active":{backgroundColor:st}},(0,ze.Qy)(Ye)),[`${vt}-title`]:{flex:1,margin:0,fontWeight:Ye.fontWeightStrong,fontSize:kt,lineHeight:Pn},[`${vt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:wn,overflow:"auto",[`${vt}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${vt}-footer`]:{flexShrink:0,padding:`${(0,Mt.unit)(on)} ${(0,Mt.unit)(Dn)}`,borderTop:`${(0,Mt.unit)(Qt)} ${Pe} ${Qe}`},"&-rtl":{direction:"rtl"}}}},ee=Ye=>({zIndexPopup:Ye.zIndexPopupBase,footerPaddingBlock:Ye.paddingXS,footerPaddingInline:Ye.padding});var z=(0,dt.I$)("Drawer",Ye=>{const tt=(0,bt.mergeToken)(Ye,{});return[se(tt),ht(tt)]},ee),oe=function(Ye,tt){var vt={};for(var Rt in Ye)Object.prototype.hasOwnProperty.call(Ye,Rt)&&tt.indexOf(Rt)<0&&(vt[Rt]=Ye[Rt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Rt=Object.getOwnPropertySymbols(Ye);Dt<Rt.length;Dt++)tt.indexOf(Rt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Rt[Dt])&&(vt[Rt[Dt]]=Ye[Rt[Dt]]);return vt};const le=null,re={distance:180},Ee=Ye=>{var tt;const{rootClassName:vt,width:Rt,height:Dt,size:Jt="default",mask:Xt=!0,push:Zt=re,open:En,afterOpenChange:cn,onClose:wn,prefixCls:kt,getContainer:Pn,style:Qt,className:Pe,visible:Qe,afterVisibleChange:Lt,maskStyle:Nt,drawerStyle:we,contentWrapperStyle:$e}=Ye,st=oe(Ye,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:Tt,getPrefixCls:zt,direction:on,className:Dn,style:In,classNames:dn,styles:xn}=(0,Ct.dj)("drawer"),fn=zt("drawer",kt),[$n,gn,hn]=z(fn),Yt=Pn===void 0&&Tt?()=>Tt(document.body):Pn,Mn=ve()({"no-mask":!Xt,[`${fn}-rtl`]:on==="rtl"},vt,gn,hn),pn=te.useMemo(()=>Rt!=null?Rt:Jt==="large"?736:378,[Rt,Jt]),On=te.useMemo(()=>Dt!=null?Dt:Jt==="large"?736:378,[Dt,Jt]),Gn={motionName:(0,St.m)(fn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Zn=Et=>({motionName:(0,St.m)(fn,`panel-motion-${Et}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Bn=(0,qt.H)(),[Xn,Nn]=(0,pe.Cn)("Drawer",st.zIndex),{classNames:ar={},styles:qn={}}=st;return $n(te.createElement(ot.Z,{form:!0,space:!0},te.createElement(ke.Z.Provider,{value:Nn},te.createElement(lt,Object.assign({prefixCls:fn,onClose:wn,maskMotion:Gn,motion:Zn},st,{classNames:{mask:ve()(ar.mask,dn.mask),content:ve()(ar.content,dn.content),wrapper:ve()(ar.wrapper,dn.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},qn.mask),Nt),xn.mask),content:Object.assign(Object.assign(Object.assign({},qn.content),we),xn.content),wrapper:Object.assign(Object.assign(Object.assign({},qn.wrapper),$e),xn.wrapper)},open:En!=null?En:Qe,mask:Xt,push:Zt,width:pn,height:On,style:Object.assign(Object.assign({},In),Qt),className:ve()(Dn,Pe),rootClassName:Mn,getContainer:Yt,afterOpenChange:cn!=null?cn:Lt,panelRef:Bn,zIndex:Xn}),te.createElement(en,Object.assign({prefixCls:fn},st,{onClose:wn}))))))},at=Ye=>{const{prefixCls:tt,style:vt,className:Rt,placement:Dt="right"}=Ye,Jt=oe(Ye,["prefixCls","style","className","placement"]),{getPrefixCls:Xt}=te.useContext(Ct.E_),Zt=Xt("drawer",tt),[En,cn,wn]=z(Zt),kt=ve()(Zt,`${Zt}-pure`,`${Zt}-${Dt}`,cn,wn,Rt);return En(te.createElement("div",{className:kt,style:vt},te.createElement(en,Object.assign({prefixCls:Zt},Jt))))};Ee._InternalPanelDoNotUseOrYouWillBeFired=at;var Ht=Ee},584:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return Ot}});var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(9017),be=ie(17835),Se=ie(57700),nt=()=>{const[,gt]=(0,Se.ZP)(),[ct]=(0,Je.Z)("Empty"),Ke=new be.FastColor(gt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return te.createElement("svg",{style:Ke,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},te.createElement("title",null,(ct==null?void 0:ct.description)||"Empty"),te.createElement("g",{fill:"none",fillRule:"evenodd"},te.createElement("g",{transform:"translate(24 31.67)"},te.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),te.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),te.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),te.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),te.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),te.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),te.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},te.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),te.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},fe=()=>{const[,gt]=(0,Se.ZP)(),[ct]=(0,Je.Z)("Empty"),{colorFill:yt,colorFillTertiary:Ke,colorFillQuaternary:Bt,colorBgContainer:Fe}=gt,{borderColor:_e,shadowColor:ft,contentColor:Re}=(0,te.useMemo)(()=>({borderColor:new be.FastColor(yt).onBackground(Fe).toHexString(),shadowColor:new be.FastColor(Ke).onBackground(Fe).toHexString(),contentColor:new be.FastColor(Bt).onBackground(Fe).toHexString()}),[yt,Ke,Bt,Fe]);return te.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},te.createElement("title",null,(ct==null?void 0:ct.description)||"Empty"),te.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},te.createElement("ellipse",{fill:ft,cx:"32",cy:"33",rx:"32",ry:"7"}),te.createElement("g",{fillRule:"nonzero",stroke:_e},te.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),te.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Re}))))},et=ie(16931),xe=ie(51636);const wt=gt=>{const{componentCls:ct,margin:yt,marginXS:Ke,marginXL:Bt,fontSize:Fe,lineHeight:_e}=gt;return{[ct]:{marginInline:Ke,fontSize:Fe,lineHeight:_e,textAlign:"center",[`${ct}-image`]:{height:gt.emptyImgHeight,marginBottom:Ke,opacity:gt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${ct}-description`]:{color:gt.colorTextDescription},[`${ct}-footer`]:{marginTop:yt},"&-normal":{marginBlock:Bt,color:gt.colorTextDescription,[`${ct}-description`]:{color:gt.colorTextDescription},[`${ct}-image`]:{height:gt.emptyImgHeightMD}},"&-small":{marginBlock:Ke,color:gt.colorTextDescription,[`${ct}-image`]:{height:gt.emptyImgHeightSM}}}}};var rt=(0,et.I$)("Empty",gt=>{const{componentCls:ct,controlHeightLG:yt,calc:Ke}=gt,Bt=(0,xe.mergeToken)(gt,{emptyImgCls:`${ct}-img`,emptyImgHeight:Ke(yt).mul(2.5).equal(),emptyImgHeightMD:yt,emptyImgHeightSM:Ke(yt).mul(.875).equal()});return[wt(Bt)]}),We=ie(48755),Ve=function(gt,ct){var yt={};for(var Ke in gt)Object.prototype.hasOwnProperty.call(gt,Ke)&&ct.indexOf(Ke)<0&&(yt[Ke]=gt[Ke]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,Ke=Object.getOwnPropertySymbols(gt);Bt<Ke.length;Bt++)ct.indexOf(Ke[Bt])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ke[Bt])&&(yt[Ke[Bt]]=gt[Ke[Bt]]);return yt};const Ne=te.createElement(nt,null),pt=te.createElement(fe,null),It=gt=>{const{className:ct,rootClassName:yt,prefixCls:Ke,image:Bt=Ne,description:Fe,children:_e,imageStyle:ft,style:Re,classNames:lt,styles:ot}=gt,pe=Ve(gt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:St,direction:ke,className:Ct,style:qt,classNames:Ce,styles:de}=(0,We.dj)("empty"),mt=St("empty",Ke),[en,Mt,ze]=rt(mt),[dt]=(0,Je.Z)("Empty"),bt=typeof Fe!="undefined"?Fe:dt==null?void 0:dt.description,un=typeof bt=="string"?bt:"empty";let At=null;return typeof Bt=="string"?At=te.createElement("img",{alt:un,src:Bt}):At=Bt,en(te.createElement("div",Object.assign({className:ve()(Mt,ze,mt,Ct,{[`${mt}-normal`]:Bt===pt,[`${mt}-rtl`]:ke==="rtl"},ct,yt,Ce.root,lt==null?void 0:lt.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},de.root),qt),ot==null?void 0:ot.root),Re)},pe),te.createElement("div",{className:ve()(`${mt}-image`,Ce.image,lt==null?void 0:lt.image),style:Object.assign(Object.assign(Object.assign({},ft),de.image),ot==null?void 0:ot.image)},At),bt&&te.createElement("div",{className:ve()(`${mt}-description`,Ce.description,lt==null?void 0:lt.description),style:Object.assign(Object.assign({},de.description),ot==null?void 0:ot.description)},bt),_e&&te.createElement("div",{className:ve()(`${mt}-footer`,Ce.footer,lt==null?void 0:lt.footer),style:Object.assign(Object.assign({},de.footer),ot==null?void 0:ot.footer)},_e)))};It.PRESENTED_IMAGE_DEFAULT=Ne,It.PRESENTED_IMAGE_SIMPLE=pt;var Ot=It},28284:function(rn,jt,ie){"use strict";ie.d(jt,{default:function(){return Ue}});var te=ie(56553),ut=ie(77654),ve=ie(59301),Je=ie(92310),be=ie.n(Je),Se=ie(77900),He=ie(86641),nt=ie(83397);function Ie(ge){const[Me,ye]=ve.useState(ge);return ve.useEffect(()=>{const Le=setTimeout(()=>{ye(ge)},ge.length?0:10);return()=>{clearTimeout(Le)}},[ge]),Me}var fe=ie(36237),et=ie(63356),xe=ie(34925),wt=ie(34961),rt=ie(51636),We=ie(16931),Ne=ge=>{const{componentCls:Me}=ge,ye=`${Me}-show-help`,Le=`${Me}-show-help-item`;return{[ye]:{transition:`opacity ${ge.motionDurationFast} ${ge.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Le]:{overflow:"hidden",transition:`height ${ge.motionDurationFast} ${ge.motionEaseInOut},
|
|
|
opacity ${ge.motionDurationFast} ${ge.motionEaseInOut},
|
|
|
transform ${ge.motionDurationFast} ${ge.motionEaseInOut} !important`,[`&${Le}-appear, &${Le}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Le}-leave-active`]:{transform:"translateY(-5px)"}}}}};const pt=ge=>({legend:{display:"block",width:"100%",marginBottom:ge.marginLG,padding:0,color:ge.colorTextDescription,fontSize:ge.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,fe.unit)(ge.lineWidth)} ${ge.lineType} ${ge.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,fe.unit)(ge.controlOutlineWidth)} ${ge.controlOutline}`},output:{display:"block",paddingTop:15,color:ge.colorText,fontSize:ge.fontSize,lineHeight:ge.lineHeight}}),It=(ge,Me)=>{const{formItemCls:ye}=ge;return{[ye]:{[`${ye}-label > label`]:{height:Me},[`${ye}-control-input`]:{minHeight:Me}}}},Ot=ge=>{const{componentCls:Me}=ge;return{[ge.componentCls]:Object.assign(Object.assign(Object.assign({},(0,et.Wf)(ge)),pt(ge)),{[`${Me}-text`]:{display:"inline-block",paddingInlineEnd:ge.paddingSM},"&-small":Object.assign({},It(ge,ge.controlHeightSM)),"&-large":Object.assign({},It(ge,ge.controlHeightLG))})}},gt=ge=>{const{formItemCls:Me,iconCls:ye,rootPrefixCls:Le,antCls:me,labelRequiredMarkColor:Be,labelColor:Ze,labelFontSize:qe,labelHeight:je,labelColonMarginInlineStart:Oe,labelColonMarginInlineEnd:Te,itemMarginBottom:Ge}=ge;return{[Me]:Object.assign(Object.assign({},(0,et.Wf)(ge)),{marginBottom:Ge,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${me}-row`]:{display:"none"},"&-has-warning":{[`${Me}-split`]:{color:ge.colorError}},"&-has-error":{[`${Me}-split`]:{color:ge.colorWarning}},[`${Me}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:ge.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:je,color:Ze,fontSize:qe,[`> ${ye}`]:{fontSize:ge.fontSize,verticalAlign:"top"},[`&${Me}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:ge.marginXXS,color:Be,fontSize:ge.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${Me}-required-mark-hidden, &${Me}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${Me}-optional`]:{display:"inline-block",marginInlineStart:ge.marginXXS,color:ge.colorTextDescription,[`&${Me}-required-mark-hidden`]:{display:"none"}},[`${Me}-tooltip`]:{color:ge.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:ge.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Oe,marginInlineEnd:Te},[`&${Me}-no-colon::after`]:{content:'"\\a0"'}}},[`${Me}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Le}-col-'"]):not([class*="' ${Le}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:ge.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Me]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:ge.colorTextDescription,fontSize:ge.fontSize,lineHeight:ge.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:ge.controlHeightSM,transition:`color ${ge.motionDurationMid} ${ge.motionEaseOut}`},"&-explain":{"&-error":{color:ge.colorError},"&-warning":{color:ge.colorWarning}}},[`&-with-help ${Me}-explain`]:{height:"auto",opacity:1},[`${Me}-feedback-icon`]:{fontSize:ge.fontSize,textAlign:"center",visibility:"visible",animationName:xe.kr,animationDuration:ge.motionDurationMid,animationTimingFunction:ge.motionEaseOutBack,pointerEvents:"none","&-success":{color:ge.colorSuccess},"&-error":{color:ge.colorError},"&-warning":{color:ge.colorWarning},"&-validating":{color:ge.colorPrimary}}})}},ct=(ge,Me)=>{const{formItemCls:ye}=ge;return{[`${Me}-horizontal`]:{[`${ye}-label`]:{flexGrow:0},[`${ye}-control`]:{flex:"1 1 0",minWidth:0},[`${ye}-label[class$='-24'], ${ye}-label[class*='-24 ']`]:{[`& + ${ye}-control`]:{minWidth:"unset"}}}}},yt=ge=>{const{componentCls:Me,formItemCls:ye,inlineItemMarginBottom:Le}=ge;return{[`${Me}-inline`]:{display:"flex",flexWrap:"wrap",[ye]:{flex:"none",marginInlineEnd:ge.margin,marginBottom:Le,"&-row":{flexWrap:"nowrap"},[`> ${ye}-label,
|
|
|
> ${ye}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ye}-label`]:{flex:"none"},[`${Me}-text`]:{display:"inline-block"},[`${ye}-has-feedback`]:{display:"inline-block"}}}}},Ke=ge=>({padding:ge.verticalLabelPadding,margin:ge.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Bt=ge=>{const{componentCls:Me,formItemCls:ye,rootPrefixCls:Le}=ge;return{[`${ye} ${ye}-label`]:Ke(ge),[`${Me}:not(${Me}-inline)`]:{[ye]:{flexWrap:"wrap",[`${ye}-label, ${ye}-control`]:{[`&:not([class*=" ${Le}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Fe=ge=>{const{componentCls:Me,formItemCls:ye,antCls:Le}=ge;return{[`${Me}-vertical`]:{[`${ye}:not(${ye}-horizontal)`]:{[`${ye}-row`]:{flexDirection:"column"},[`${ye}-label > label`]:{height:"auto"},[`${ye}-control`]:{width:"100%"},[`${ye}-label,
|
|
|
${Le}-col-24${ye}-label,
|
|
|
${Le}-col-xl-24${ye}-label`]:Ke(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenXSMax)})`]:[Bt(ge),{[Me]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Le}-col-xs-24${ye}-label`]:Ke(ge)}}}],[`@media (max-width: ${(0,fe.unit)(ge.screenSMMax)})`]:{[Me]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Le}-col-sm-24${ye}-label`]:Ke(ge)}}},[`@media (max-width: ${(0,fe.unit)(ge.screenMDMax)})`]:{[Me]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Le}-col-md-24${ye}-label`]:Ke(ge)}}},[`@media (max-width: ${(0,fe.unit)(ge.screenLGMax)})`]:{[Me]:{[`${ye}:not(${ye}-horizontal)`]:{[`${Le}-col-lg-24${ye}-label`]:Ke(ge)}}}}},_e=ge=>{const{formItemCls:Me,antCls:ye}=ge;return{[`${Me}-vertical`]:{[`${Me}-row`]:{flexDirection:"column"},[`${Me}-label > label`]:{height:"auto"},[`${Me}-control`]:{width:"100%"}},[`${Me}-vertical ${Me}-label,
|
|
|
${ye}-col-24${Me}-label,
|
|
|
${ye}-col-xl-24${Me}-label`]:Ke(ge),[`@media (max-width: ${(0,fe.unit)(ge.screenXSMax)})`]:[Bt(ge),{[Me]:{[`${ye}-col-xs-24${Me}-label`]:Ke(ge)}}],[`@media (max-width: ${(0,fe.unit)(ge.screenSMMax)})`]:{[Me]:{[`${ye}-col-sm-24${Me}-label`]:Ke(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenMDMax)})`]:{[Me]:{[`${ye}-col-md-24${Me}-label`]:Ke(ge)}},[`@media (max-width: ${(0,fe.unit)(ge.screenLGMax)})`]:{[Me]:{[`${ye}-col-lg-24${Me}-label`]:Ke(ge)}}}},ft=ge=>({labelRequiredMarkColor:ge.colorError,labelColor:ge.colorTextHeading,labelFontSize:ge.fontSize,labelHeight:ge.controlHeight,labelColonMarginInlineStart:ge.marginXXS/2,labelColonMarginInlineEnd:ge.marginXS,itemMarginBottom:ge.marginLG,verticalLabelPadding:`0 0 ${ge.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Re=(ge,Me)=>(0,rt.mergeToken)(ge,{formItemCls:`${ge.componentCls}-item`,rootPrefixCls:Me});var lt=(0,We.I$)("Form",(ge,Me)=>{let{rootPrefixCls:ye}=Me;const Le=Re(ge,ye);return[Ot(Le),gt(Le),Ne(Le),ct(Le,Le.componentCls),ct(Le,Le.formItemCls),yt(Le),Fe(Le),_e(Le),(0,wt.Z)(Le),xe.kr]},ft,{order:-1e3});const ot=[];function pe(ge,Me,ye){let Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof ge=="string"?ge:`${Me}-${Le}`,error:ge,errorStatus:ye}}var ke=ge=>{let{help:Me,helpStatus:ye,errors:Le=ot,warnings:me=ot,className:Be,fieldId:Ze,onVisibleChanged:qe}=ge;const{prefixCls:je}=ve.useContext(te.Rk),Oe=`${je}-item-explain`,Te=(0,nt.Z)(je),[Ge,$t,Ft]=lt(je,Te),Wt=ve.useMemo(()=>(0,He.Z)(je),[je]),kn=Ie(Le),Tn=Ie(me),Hn=ve.useMemo(()=>Me!=null?[pe(Me,"help",ye)]:[].concat((0,ut.Z)(kn.map((Cn,Fn)=>pe(Cn,"error","error",Fn))),(0,ut.Z)(Tn.map((Cn,Fn)=>pe(Cn,"warning","warning",Fn)))),[Me,ye,kn,Tn]),Sn=ve.useMemo(()=>{const Cn={};return Hn.forEach(Fn=>{let{key:Yn}=Fn;Cn[Yn]=(Cn[Yn]||0)+1}),Hn.map((Fn,Yn)=>Object.assign(Object.assign({},Fn),{key:Cn[Fn.key]>1?`${Fn.key}-fallback-${Yn}`:Fn.key}))},[Hn]),mn={};return Ze&&(mn.id=`${Ze}_help`),Ge(ve.createElement(Se.default,{motionDeadline:Wt.motionDeadline,motionName:`${je}-show-help`,visible:!!Sn.length,onVisibleChanged:qe},Cn=>{const{className:Fn,style:Yn}=Cn;return ve.createElement("div",Object.assign({},mn,{className:be()(Oe,Fn,Ft,Te,Be,$t),style:Yn}),ve.createElement(Se.CSSMotionList,Object.assign({keys:Sn},(0,He.Z)(je),{motionName:`${je}-show-help-item`,component:!1}),Vn=>{const{key:Kn,error:vn,errorStatus:er,className:Wn,style:dr}=Vn;return ve.createElement("div",{key:Kn,className:be()(Wn,{[`${Oe}-${er}`]:er}),style:dr},vn)}))}))},Ct=ie(69180),qt=ie(48755),Ce=ie(2171),de=ie(31756),mt=ie(23069),en=ie(76846),Mt=ie(16722);const ze=["parentNode"],dt="form_item";function bt(ge){return ge===void 0||ge===!1?[]:Array.isArray(ge)?ge:[ge]}function un(ge,Me){if(!ge.length)return;const ye=ge.join("_");return Me?`${Me}_${ye}`:ze.includes(ye)?`${dt}_${ye}`:ye}function At(ge,Me,ye,Le,me,Be){let Ze=Le;return Be!==void 0?Ze=Be:ye.validating?Ze="validating":ge.length?Ze="error":Me.length?Ze="warning":(ye.touched||me&&ye.validated)&&(Ze="success"),Ze}var sn=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye};function it(ge){return bt(ge).join("_")}function _t(ge,Me){const ye=Me.getFieldInstance(ge),Le=(0,en.bn)(ye);if(Le)return Le;const me=un(bt(ge),Me.__INTERNAL__.name);if(me)return document.getElementById(me)}function ht(ge){const[Me]=(0,Ct.useForm)(),ye=ve.useRef({}),Le=ve.useMemo(()=>ge!=null?ge:Object.assign(Object.assign({},Me),{__INTERNAL__:{itemRef:me=>Be=>{const Ze=it(me);Be?ye.current[Ze]=Be:delete ye.current[Ze]}},scrollToField:function(me){let Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:Ze}=Be,qe=sn(Be,["focus"]),je=_t(me,Le);je&&((0,Mt.Z)(je,Object.assign({scrollMode:"if-needed",block:"nearest"},qe)),Ze&&Le.focusField(me))},focusField:me=>{var Be,Ze;const qe=Le.getFieldInstance(me);typeof(qe==null?void 0:qe.focus)=="function"?qe.focus():(Ze=(Be=_t(me,Le))===null||Be===void 0?void 0:Be.focus)===null||Ze===void 0||Ze.call(Be)},getFieldInstance:me=>{const Be=it(me);return ye.current[Be]}}),[ge,Me]);return[Le]}var se=ie(98350),ee=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye};const z=(ge,Me)=>{const ye=ve.useContext(Ce.Z),{getPrefixCls:Le,direction:me,requiredMark:Be,colon:Ze,scrollToFirstError:qe,className:je,style:Oe}=(0,qt.dj)("form"),{prefixCls:Te,className:Ge,rootClassName:$t,size:Ft,disabled:Wt=ye,form:kn,colon:Tn,labelAlign:Hn,labelWrap:Sn,labelCol:mn,wrapperCol:Cn,hideRequiredMark:Fn,layout:Yn="horizontal",scrollToFirstError:Vn,requiredMark:Kn,onFinishFailed:vn,name:er,style:Wn,feedbackIcons:dr,variant:pr}=ge,lr=ee(ge,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),ur=(0,de.Z)(Ft),yr=ve.useContext(se.Z),sr=ve.useMemo(()=>Kn!==void 0?Kn:Fn?!1:Be!==void 0?Be:!0,[Fn,Kn,Be]),fr=Tn!=null?Tn:Ze,Qn=Le("form",Te),mr=(0,nt.Z)(Qn),[br,Hr,Er]=lt(Qn,mr),Ar=be()(Qn,`${Qn}-${Yn}`,{[`${Qn}-hide-required-mark`]:sr===!1,[`${Qn}-rtl`]:me==="rtl",[`${Qn}-${ur}`]:ur},Er,mr,Hr,je,Ge,$t),[kr]=ht(kn),{__INTERNAL__:Pr}=kr;Pr.name=er;const ir=ve.useMemo(()=>({name:er,labelAlign:Hn,labelCol:mn,labelWrap:Sn,wrapperCol:Cn,vertical:Yn==="vertical",colon:fr,requiredMark:sr,itemRef:Pr.itemRef,form:kr,feedbackIcons:dr}),[er,Hn,mn,Cn,Yn,fr,sr,kr,dr]),rr=ve.useRef(null);ve.useImperativeHandle(Me,()=>{var ln;return Object.assign(Object.assign({},kr),{nativeElement:(ln=rr.current)===null||ln===void 0?void 0:ln.nativeElement})});const Jn=(ln,an)=>{if(ln){let Gt={block:"nearest"};typeof ln=="object"&&(Gt=Object.assign(Object.assign({},Gt),ln)),kr.scrollToField(an,Gt)}},Kt=ln=>{if(vn==null||vn(ln),ln.errorFields.length){const an=ln.errorFields[0].name;if(Vn!==void 0){Jn(Vn,an);return}qe!==void 0&&Jn(qe,an)}};return br(ve.createElement(te.pg.Provider,{value:pr},ve.createElement(Ce.n,{disabled:Wt},ve.createElement(mt.Z.Provider,{value:ur},ve.createElement(te.RV,{validateMessages:yr},ve.createElement(te.q3.Provider,{value:ir},ve.createElement(Ct.default,Object.assign({id:er},lr,{name:er,onFinishFailed:Kt,form:kr,ref:rr,style:Object.assign(Object.assign({},Oe),Wn),className:Ar}))))))))};var le=ve.forwardRef(z),re=ie(41799),Ee=ie(8654),at=ie(22703),Ht=ie(32383),Ye=ie(11592);function tt(ge){if(typeof ge=="function")return ge;const Me=(0,Ye.Z)(ge);return Me.length<=1?Me[0]:Me}const vt=()=>{const{status:ge,errors:Me=[],warnings:ye=[]}=ve.useContext(te.aM);return{status:ge,errors:Me,warnings:ye}};vt.Context=te.aM;var Rt=vt,Dt=ie(16089);function Jt(ge){const[Me,ye]=ve.useState(ge),Le=ve.useRef(null),me=ve.useRef([]),Be=ve.useRef(!1);ve.useEffect(()=>(Be.current=!1,()=>{Be.current=!0,Dt.Z.cancel(Le.current),Le.current=null}),[]);function Ze(qe){Be.current||(Le.current===null&&(me.current=[],Le.current=(0,Dt.Z)(()=>{Le.current=null,ye(je=>{let Oe=je;return me.current.forEach(Te=>{Oe=Te(Oe)}),Oe})})),me.current.push(qe))}return[Me,Ze]}function Xt(){const{itemRef:ge}=ve.useContext(te.q3),Me=ve.useRef({});function ye(Le,me){const Be=me&&typeof me=="object"&&(0,Ee.C4)(me),Ze=Le.join("_");return(Me.current.name!==Ze||Me.current.originRef!==Be)&&(Me.current.name=Ze,Me.current.originRef=Be,Me.current.ref=(0,Ee.sQ)(ge(Le),Be)),Me.current.ref}return ye}var Zt=ie(29194),En=ie(34280),cn=ie(2738),wn=ie(65970),kt=ie(70425),Pn=ie(5472);const Qt=ge=>{const{formItemCls:Me}=ge;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Me}-control`]:{display:"flex"}}}};var Pe=(0,We.bk)(["Form","item-item"],(ge,Me)=>{let{rootPrefixCls:ye}=Me;const Le=Re(ge,ye);return[Qt(Le)]}),Qe=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye};const Lt=24;var we=ge=>{const{prefixCls:Me,status:ye,labelCol:Le,wrapperCol:me,children:Be,errors:Ze,warnings:qe,_internalItemRender:je,extra:Oe,help:Te,fieldId:Ge,marginBottom:$t,onErrorVisibleChanged:Ft,label:Wt}=ge,kn=`${Me}-item`,Tn=ve.useContext(te.q3),Hn=ve.useMemo(()=>{let lr=Object.assign({},me||Tn.wrapperCol||{});return Wt===null&&!Le&&!me&&Tn.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(yr=>{const sr=yr?[yr]:[],fr=(0,kt.U2)(Tn.labelCol,sr),Qn=typeof fr=="object"?fr:{},mr=(0,kt.U2)(lr,sr),br=typeof mr=="object"?mr:{};"span"in Qn&&!("offset"in br)&&Qn.span<Lt&&(lr=(0,kt.t8)(lr,[].concat(sr,["offset"]),Qn.span))}),lr},[me,Tn]),Sn=be()(`${kn}-control`,Hn.className),mn=ve.useMemo(()=>{const{labelCol:lr,wrapperCol:ur}=Tn;return Qe(Tn,["labelCol","wrapperCol"])},[Tn]),Cn=ve.useRef(null),[Fn,Yn]=ve.useState(0);(0,En.Z)(()=>{Oe&&Cn.current?Yn(Cn.current.clientHeight):Yn(0)},[Oe]);const Vn=ve.createElement("div",{className:`${kn}-control-input`},ve.createElement("div",{className:`${kn}-control-input-content`},Be)),Kn=ve.useMemo(()=>({prefixCls:Me,status:ye}),[Me,ye]),vn=$t!==null||Ze.length||qe.length?ve.createElement(te.Rk.Provider,{value:Kn},ve.createElement(ke,{fieldId:Ge,errors:Ze,warnings:qe,help:Te,helpStatus:ye,className:`${kn}-explain-connected`,onVisibleChanged:Ft})):null,er={};Ge&&(er.id=`${Ge}_extra`);const Wn=Oe?ve.createElement("div",Object.assign({},er,{className:`${kn}-extra`,ref:Cn}),Oe):null,dr=vn||Wn?ve.createElement("div",{className:`${kn}-additional`,style:$t?{minHeight:$t+Fn}:{}},vn,Wn):null,pr=je&&je.mark==="pro_table_render"&&je.render?je.render(ge,{input:Vn,errorList:vn,extra:Wn}):ve.createElement(ve.Fragment,null,Vn,dr);return ve.createElement(te.q3.Provider,{value:mn},ve.createElement(Pn.Z,Object.assign({},Hn,{className:Sn}),pr),ve.createElement(Pe,{prefixCls:Me}))},$e=ie(61485),st=ie(9017),Tt=ie(85981),zt=ie(25399),on=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye};function Dn(ge){return ge?typeof ge=="object"&&!ve.isValidElement(ge)?ge:{title:ge}:null}var dn=ge=>{let{prefixCls:Me,label:ye,htmlFor:Le,labelCol:me,labelAlign:Be,colon:Ze,required:qe,requiredMark:je,tooltip:Oe,vertical:Te}=ge;var Ge;const[$t]=(0,st.Z)("Form"),{labelAlign:Ft,labelCol:Wt,labelWrap:kn,colon:Tn}=ve.useContext(te.q3);if(!ye)return null;const Hn=me||Wt||{},Sn=Be||Ft,mn=`${Me}-item-label`,Cn=be()(mn,Sn==="left"&&`${mn}-left`,Hn.className,{[`${mn}-wrap`]:!!kn});let Fn=ye;const Yn=Ze===!0||Tn!==!1&&Ze!==!1;Yn&&!Te&&typeof ye=="string"&&ye.trim()&&(Fn=ye.replace(/[:|:]\s*$/,""));const Kn=Dn(Oe);if(Kn){const{icon:lr=ve.createElement($e.Z,null)}=Kn,ur=on(Kn,["icon"]),yr=ve.createElement(zt.Z,Object.assign({},ur),ve.cloneElement(lr,{className:`${Me}-item-tooltip`,title:"",onClick:sr=>{sr.preventDefault()},tabIndex:null}));Fn=ve.createElement(ve.Fragment,null,Fn,yr)}const vn=je==="optional",er=typeof je=="function",Wn=je===!1;er?Fn=je(Fn,{required:!!qe}):vn&&!qe&&(Fn=ve.createElement(ve.Fragment,null,Fn,ve.createElement("span",{className:`${Me}-item-optional`,title:""},($t==null?void 0:$t.optional)||((Ge=Tt.Z.Form)===null||Ge===void 0?void 0:Ge.optional))));let dr;Wn?dr="hidden":(vn||er)&&(dr="optional");const pr=be()({[`${Me}-item-required`]:qe,[`${Me}-item-required-mark-${dr}`]:dr,[`${Me}-item-no-colon`]:!Yn});return ve.createElement(Pn.Z,Object.assign({},Hn,{className:Cn}),ve.createElement("label",{htmlFor:Le,className:pr,title:typeof ye=="string"?ye:""},Fn))},xn=ie(29679),fn=ie(19248),$n=ie(96512),gn=ie(58617);const hn={success:xn.Z,warning:$n.Z,error:fn.Z,validating:gn.Z};function Yt(ge){let{children:Me,errors:ye,warnings:Le,hasFeedback:me,validateStatus:Be,prefixCls:Ze,meta:qe,noStyle:je}=ge;const Oe=`${Ze}-item`,{feedbackIcons:Te}=ve.useContext(te.q3),Ge=At(ye,Le,qe,null,!!me,Be),{isFormItemInput:$t,status:Ft,hasFeedback:Wt,feedbackIcon:kn}=ve.useContext(te.aM),Tn=ve.useMemo(()=>{var Hn;let Sn;if(me){const Cn=me!==!0&&me.icons||Te,Fn=Ge&&((Hn=Cn==null?void 0:Cn({status:Ge,errors:ye,warnings:Le}))===null||Hn===void 0?void 0:Hn[Ge]),Yn=Ge&&hn[Ge];Sn=Fn!==!1&&Yn?ve.createElement("span",{className:be()(`${Oe}-feedback-icon`,`${Oe}-feedback-icon-${Ge}`)},Fn||ve.createElement(Yn,null)):null}const mn={status:Ge||"",errors:ye,warnings:Le,hasFeedback:!!me,feedbackIcon:Sn,isFormItemInput:!0};return je&&(mn.status=(Ge!=null?Ge:Ft)||"",mn.isFormItemInput=$t,mn.hasFeedback=!!(me!=null?me:Wt),mn.feedbackIcon=me!==void 0?mn.feedbackIcon:kn),mn},[Ge,me,je,$t,Ft]);return ve.createElement(te.aM.Provider,{value:Tn},Me)}var Mn=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye};function pn(ge){const{prefixCls:Me,className:ye,rootClassName:Le,style:me,help:Be,errors:Ze,warnings:qe,validateStatus:je,meta:Oe,hasFeedback:Te,hidden:Ge,children:$t,fieldId:Ft,required:Wt,isRequired:kn,onSubItemMetaChange:Tn,layout:Hn}=ge,Sn=Mn(ge,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),mn=`${Me}-item`,{requiredMark:Cn,vertical:Fn}=ve.useContext(te.q3),Yn=Fn||Hn==="vertical",Vn=ve.useRef(null),Kn=Ie(Ze),vn=Ie(qe),er=Be!=null,Wn=!!(er||Ze.length||qe.length),dr=!!Vn.current&&(0,Zt.Z)(Vn.current),[pr,lr]=ve.useState(null);(0,En.Z)(()=>{if(Wn&&Vn.current){const Qn=getComputedStyle(Vn.current);lr(parseInt(Qn.marginBottom,10))}},[Wn,dr]);const ur=Qn=>{Qn||lr(null)},sr=function(){let Qn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const mr=Qn?Kn:Oe.errors,br=Qn?vn:Oe.warnings;return At(mr,br,Oe,"",!!Te,je)}(),fr=be()(mn,ye,Le,{[`${mn}-with-help`]:er||Kn.length||vn.length,[`${mn}-has-feedback`]:sr&&Te,[`${mn}-has-success`]:sr==="success",[`${mn}-has-warning`]:sr==="warning",[`${mn}-has-error`]:sr==="error",[`${mn}-is-validating`]:sr==="validating",[`${mn}-hidden`]:Ge,[`${mn}-${Hn}`]:Hn});return ve.createElement("div",{className:fr,style:me,ref:Vn},ve.createElement(wn.Z,Object.assign({className:`${mn}-row`},(0,cn.Z)(Sn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),ve.createElement(dn,Object.assign({htmlFor:Ft},ge,{requiredMark:Cn,required:Wt!=null?Wt:kn,prefixCls:Me,vertical:Yn})),ve.createElement(we,Object.assign({},ge,Oe,{errors:Kn,warnings:vn,prefixCls:Me,status:sr,help:Be,marginBottom:pr,onErrorVisibleChanged:ur}),ve.createElement(te.qI.Provider,{value:Tn},ve.createElement(Yt,{prefixCls:Me,meta:Oe,errors:Oe.errors,warnings:Oe.warnings,hasFeedback:Te,validateStatus:sr},$t)))),!!pr&&ve.createElement("div",{className:`${mn}-margin-offset`,style:{marginBottom:-pr}}))}const On="__SPLIT__",Gn=null;function Zn(ge,Me){const ye=Object.keys(ge),Le=Object.keys(Me);return ye.length===Le.length&&ye.every(me=>{const Be=ge[me],Ze=Me[me];return Be===Ze||typeof Be=="function"||typeof Ze=="function"})}const Bn=ve.memo(ge=>{let{children:Me}=ge;return Me},(ge,Me)=>Zn(ge.control,Me.control)&&ge.update===Me.update&&ge.childProps.length===Me.childProps.length&&ge.childProps.every((ye,Le)=>ye===Me.childProps[Le]));function Xn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Nn(ge){const{name:Me,noStyle:ye,className:Le,dependencies:me,prefixCls:Be,shouldUpdate:Ze,rules:qe,children:je,required:Oe,label:Te,messageVariables:Ge,trigger:$t="onChange",validateTrigger:Ft,hidden:Wt,help:kn,layout:Tn}=ge,{getPrefixCls:Hn}=ve.useContext(qt.E_),{name:Sn}=ve.useContext(te.q3),mn=tt(je),Cn=typeof mn=="function",Fn=ve.useContext(te.qI),{validateTrigger:Yn}=ve.useContext(Ct.FieldContext),Vn=Ft!==void 0?Ft:Yn,Kn=Me!=null,vn=Hn("form",Be),er=(0,nt.Z)(vn),[Wn,dr,pr]=lt(vn,er),lr=(0,Ht.ln)("Form.Item"),ur=ve.useContext(Ct.ListContext),yr=ve.useRef(null),[sr,fr]=Jt({}),[Qn,mr]=(0,re.Z)(()=>Xn()),br=rr=>{const Jn=ur==null?void 0:ur.getKey(rr.name);if(mr(rr.destroy?Xn():rr,!0),ye&&kn!==!1&&Fn){let Kt=rr.name;if(rr.destroy)Kt=yr.current||Kt;else if(Jn!==void 0){const[ln,an]=Jn;Kt=[ln].concat((0,ut.Z)(an)),yr.current=Kt}Fn(rr,Kt)}},Hr=(rr,Jn)=>{fr(Kt=>{const ln=Object.assign({},Kt),Gt=[].concat((0,ut.Z)(rr.name.slice(0,-1)),(0,ut.Z)(Jn)).join(On);return rr.destroy?delete ln[Gt]:ln[Gt]=rr,ln})},[Er,Ar]=ve.useMemo(()=>{const rr=(0,ut.Z)(Qn.errors),Jn=(0,ut.Z)(Qn.warnings);return Object.values(sr).forEach(Kt=>{rr.push.apply(rr,(0,ut.Z)(Kt.errors||[])),Jn.push.apply(Jn,(0,ut.Z)(Kt.warnings||[]))}),[rr,Jn]},[sr,Qn.errors,Qn.warnings]),kr=Xt();function Pr(rr,Jn,Kt){return ye&&!Wt?ve.createElement(Yt,{prefixCls:vn,hasFeedback:ge.hasFeedback,validateStatus:ge.validateStatus,meta:Qn,errors:Er,warnings:Ar,noStyle:!0},rr):ve.createElement(pn,Object.assign({key:"row"},ge,{className:be()(Le,pr,er,dr),prefixCls:vn,fieldId:Jn,isRequired:Kt,errors:Er,warnings:Ar,meta:Qn,onSubItemMetaChange:Hr,layout:Tn}),rr)}if(!Kn&&!Cn&&!me)return Wn(Pr(mn));let ir={};return typeof Te=="string"?ir.label=Te:Me&&(ir.label=String(Me)),Ge&&(ir=Object.assign(Object.assign({},ir),Ge)),Wn(ve.createElement(Ct.Field,Object.assign({},ge,{messageVariables:ir,trigger:$t,validateTrigger:Vn,onMetaChange:br}),(rr,Jn,Kt)=>{const ln=bt(Me).length&&Jn?Jn.name:[],an=un(ln,Sn),Gt=Oe!==void 0?Oe:!!(qe!=null&&qe.some(tn=>{if(tn&&typeof tn=="object"&&tn.required&&!tn.warningOnly)return!0;if(typeof tn=="function"){const Vt=tn(Kt);return(Vt==null?void 0:Vt.required)&&!(Vt!=null&&Vt.warningOnly)}return!1})),An=Object.assign({},rr);let jn=null;if(Array.isArray(mn)&&Kn)jn=mn;else if(!(Cn&&(!(Ze||me)||Kn))){if(!(me&&!Cn&&!Kn))if(ve.isValidElement(mn)){const tn=Object.assign(Object.assign({},mn.props),An);if(tn.id||(tn.id=an),kn||Er.length>0||Ar.length>0||ge.extra){const Ln=[];(kn||Er.length>0)&&Ln.push(`${an}_help`),ge.extra&&Ln.push(`${an}_extra`),tn["aria-describedby"]=Ln.join(" ")}Er.length>0&&(tn["aria-invalid"]="true"),Gt&&(tn["aria-required"]="true"),(0,Ee.Yr)(mn)&&(tn.ref=kr(ln,mn)),new Set([].concat((0,ut.Z)(bt($t)),(0,ut.Z)(bt(Vn)))).forEach(Ln=>{tn[Ln]=function(){for(var cr,Lr,Ir,Rr,Br,Fr=arguments.length,Vr=new Array(Fr),Wr=0;Wr<Fr;Wr++)Vr[Wr]=arguments[Wr];(Ir=An[Ln])===null||Ir===void 0||(cr=Ir).call.apply(cr,[An].concat(Vr)),(Br=(Rr=mn.props)[Ln])===null||Br===void 0||(Lr=Br).call.apply(Lr,[Rr].concat(Vr))}});const yn=[tn["aria-required"],tn["aria-invalid"],tn["aria-describedby"]];jn=ve.createElement(Bn,{control:An,update:mn,childProps:yn},(0,at.Tm)(mn,tn))}else Cn&&(Ze||me)&&!Kn?jn=mn(Kt):jn=mn}return Pr(jn,an,Gt)}))}const ar=Nn;ar.useStatus=Rt;var qn=ar,Et=function(ge,Me){var ye={};for(var Le in ge)Object.prototype.hasOwnProperty.call(ge,Le)&&Me.indexOf(Le)<0&&(ye[Le]=ge[Le]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,Le=Object.getOwnPropertySymbols(ge);me<Le.length;me++)Me.indexOf(Le[me])<0&&Object.prototype.propertyIsEnumerable.call(ge,Le[me])&&(ye[Le[me]]=ge[Le[me]]);return ye},zn=ge=>{var{prefixCls:Me,children:ye}=ge,Le=Et(ge,["prefixCls","children"]);const{getPrefixCls:me}=ve.useContext(qt.E_),Be=me("form",Me),Ze=ve.useMemo(()=>({prefixCls:Be,status:"error"}),[Be]);return ve.createElement(Ct.List,Object.assign({},Le),(qe,je,Oe)=>ve.createElement(te.Rk.Provider,{value:Ze},ye(qe.map(Te=>Object.assign(Object.assign({},Te),{fieldKey:Te.key})),je,{errors:Oe.errors,warnings:Oe.warnings})))};function nr(){const{form:ge}=ve.useContext(te.q3);return ge}const De=le;De.Item=qn,De.List=zn,De.ErrorList=ke,De.useForm=ht,De.useFormInstance=nr,De.useWatch=Ct.useWatch,De.Provider=te.RV,De.create=()=>{};var Ue=De},4875:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return Nt}});var te=ie(59301),ut=ie(84105),ve=ie(87395),Je=ie(92310),be=ie.n(Je),Se=ie(60499),He=ie(18642),nt=ie(43749),Ie=ie(72190),fe=ie(42244),et=ie(38705),xe=ie(17212);function wt(){return typeof BigInt=="function"}function rt(we){return!we&&we!==0&&!Number.isNaN(we)||!String(we).trim()}function We(we){var $e=we.trim(),st=$e.startsWith("-");st&&($e=$e.slice(1)),$e=$e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),$e.startsWith(".")&&($e="0".concat($e));var Tt=$e||"0",zt=Tt.split("."),on=zt[0]||"0",Dn=zt[1]||"0";on==="0"&&Dn==="0"&&(st=!1);var In=st?"-":"";return{negative:st,negativeStr:In,trimStr:Tt,integerStr:on,decimalStr:Dn,fullStr:"".concat(In).concat(Tt)}}function Ve(we){var $e=String(we);return!Number.isNaN(Number($e))&&$e.includes("e")}function Ne(we){var $e=String(we);if(Ve(we)){var st=Number($e.slice($e.indexOf("e-")+2)),Tt=$e.match(/\.(\d+)/);return Tt!=null&&Tt[1]&&(st+=Tt[1].length),st}return $e.includes(".")&&It($e)?$e.length-$e.indexOf(".")-1:0}function pt(we){var $e=String(we);if(Ve(we)){if(we>Number.MAX_SAFE_INTEGER)return String(wt()?BigInt(we).toString():Number.MAX_SAFE_INTEGER);if(we<Number.MIN_SAFE_INTEGER)return String(wt()?BigInt(we).toString():Number.MIN_SAFE_INTEGER);$e=we.toFixed(Ne($e))}return We($e).fullStr}function It(we){return typeof we=="number"?!Number.isNaN(we):we?/^\s*-?\d+(\.\d+)?\s*$/.test(we)||/^\s*-?\d+\.\s*$/.test(we)||/^\s*-?\.\d+\s*$/.test(we):!1}var Ot=function(){function we($e){if((0,et.Z)(this,we),(0,He.Z)(this,"origin",""),(0,He.Z)(this,"negative",void 0),(0,He.Z)(this,"integer",void 0),(0,He.Z)(this,"decimal",void 0),(0,He.Z)(this,"decimalLen",void 0),(0,He.Z)(this,"empty",void 0),(0,He.Z)(this,"nan",void 0),rt($e)){this.empty=!0;return}if(this.origin=String($e),$e==="-"||Number.isNaN($e)){this.nan=!0;return}var st=$e;if(Ve(st)&&(st=Number(st)),st=typeof st=="string"?st:pt(st),It(st)){var Tt=We(st);this.negative=Tt.negative;var zt=Tt.trimStr.split(".");this.integer=BigInt(zt[0]);var on=zt[1]||"0";this.decimal=BigInt(on),this.decimalLen=on.length}else this.nan=!0}return(0,xe.Z)(we,[{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(st){var Tt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(st,"0"));return BigInt(Tt)}},{key:"negate",value:function(){var st=new we(this.toString());return st.negative=!st.negative,st}},{key:"cal",value:function(st,Tt,zt){var on=Math.max(this.getDecimalStr().length,st.getDecimalStr().length),Dn=this.alignDecimal(on),In=st.alignDecimal(on),dn=Tt(Dn,In).toString(),xn=zt(on),fn=We(dn),$n=fn.negativeStr,gn=fn.trimStr,hn="".concat($n).concat(gn.padStart(xn+1,"0"));return new we("".concat(hn.slice(0,-xn),".").concat(hn.slice(-xn)))}},{key:"add",value:function(st){if(this.isInvalidate())return new we(st);var Tt=new we(st);return Tt.isInvalidate()?this:this.cal(Tt,function(zt,on){return zt+on},function(zt){return zt})}},{key:"multi",value:function(st){var Tt=new we(st);return this.isInvalidate()||Tt.isInvalidate()?new we(NaN):this.cal(Tt,function(zt,on){return zt*on},function(zt){return zt*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(st){return this.toString()===(st==null?void 0:st.toString())}},{key:"lessEquals",value:function(st){return this.add(st.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return st?this.isInvalidate()?"":We("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),we}(),gt=function(){function we($e){if((0,et.Z)(this,we),(0,He.Z)(this,"origin",""),(0,He.Z)(this,"number",void 0),(0,He.Z)(this,"empty",void 0),rt($e)){this.empty=!0;return}this.origin=String($e),this.number=Number($e)}return(0,xe.Z)(we,[{key:"negate",value:function(){return new we(-this.toNumber())}},{key:"add",value:function(st){if(this.isInvalidate())return new we(st);var Tt=Number(st);if(Number.isNaN(Tt))return this;var zt=this.number+Tt;if(zt>Number.MAX_SAFE_INTEGER)return new we(Number.MAX_SAFE_INTEGER);if(zt<Number.MIN_SAFE_INTEGER)return new we(Number.MIN_SAFE_INTEGER);var on=Math.max(Ne(this.number),Ne(Tt));return new we(zt.toFixed(on))}},{key:"multi",value:function(st){var Tt=Number(st);if(this.isInvalidate()||Number.isNaN(Tt))return new we(NaN);var zt=this.number*Tt;if(zt>Number.MAX_SAFE_INTEGER)return new we(Number.MAX_SAFE_INTEGER);if(zt<Number.MIN_SAFE_INTEGER)return new we(Number.MIN_SAFE_INTEGER);var on=Math.max(Ne(this.number),Ne(Tt));return new we(zt.toFixed(on))}},{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(st){return this.toNumber()===(st==null?void 0:st.toNumber())}},{key:"lessEquals",value:function(st){return this.add(st.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return st?this.isInvalidate()?"":pt(this.number):this.origin}}]),we}();function ct(we){return wt()?new Ot(we):new gt(we)}function yt(we,$e,st){var Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(we==="")return"";var zt=We(we),on=zt.negativeStr,Dn=zt.integerStr,In=zt.decimalStr,dn="".concat($e).concat(In),xn="".concat(on).concat(Dn);if(st>=0){var fn=Number(In[st]);if(fn>=5&&!Tt){var $n=ct(we).add("".concat(on,"0.").concat("0".repeat(st)).concat(10-fn));return yt($n.toString(),$e,st,Tt)}return st===0?xn:"".concat(xn).concat($e).concat(In.padEnd(st,"0").slice(0,st))}return dn===".0"?xn:"".concat(xn).concat(dn)}var Ke=ct,Bt=ie(36901),Fe=ie(34280);function _e(we,$e){return typeof Proxy!="undefined"&&we?new Proxy(we,{get:function(Tt,zt){if($e[zt])return $e[zt];var on=Tt[zt];return typeof on=="function"?on.bind(Tt):on}}):we}var ft=ie(8654),Re=ie(48736);function lt(we,$e){var st=(0,te.useRef)(null);function Tt(){try{var on=we.selectionStart,Dn=we.selectionEnd,In=we.value,dn=In.substring(0,on),xn=In.substring(Dn);st.current={start:on,end:Dn,value:In,beforeTxt:dn,afterTxt:xn}}catch(fn){}}function zt(){if(we&&st.current&&$e)try{var on=we.value,Dn=st.current,In=Dn.beforeTxt,dn=Dn.afterTxt,xn=Dn.start,fn=on.length;if(on.startsWith(In))fn=In.length;else if(on.endsWith(dn))fn=on.length-st.current.afterTxt.length;else{var $n=In[xn-1],gn=on.indexOf($n,xn-1);gn!==-1&&(fn=gn+1)}we.setSelectionRange(fn,fn)}catch(hn){(0,Re.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(hn.message))}}return[Tt,zt]}var ot=ie(49658),pe=function(){var $e=(0,te.useState)(!1),st=(0,Ie.Z)($e,2),Tt=st[0],zt=st[1];return(0,Fe.Z)(function(){zt((0,ot.Z)())},[]),Tt},St=pe,ke=ie(16089),Ct=200,qt=600;function Ce(we){var $e=we.prefixCls,st=we.upNode,Tt=we.downNode,zt=we.upDisabled,on=we.downDisabled,Dn=we.onStep,In=te.useRef(),dn=te.useRef([]),xn=te.useRef();xn.current=Dn;var fn=function(){clearTimeout(In.current)},$n=function(Zn,Bn){Zn.preventDefault(),fn(),xn.current(Bn);function Xn(){xn.current(Bn),In.current=setTimeout(Xn,Ct)}In.current=setTimeout(Xn,qt)};te.useEffect(function(){return function(){fn(),dn.current.forEach(function(Gn){return ke.Z.cancel(Gn)})}},[]);var gn=St();if(gn)return null;var hn="".concat($e,"-handler"),Yt=be()(hn,"".concat(hn,"-up"),(0,He.Z)({},"".concat(hn,"-up-disabled"),zt)),Mn=be()(hn,"".concat(hn,"-down"),(0,He.Z)({},"".concat(hn,"-down-disabled"),on)),pn=function(){return dn.current.push((0,ke.Z)(fn))},On={unselectable:"on",role:"button",onMouseUp:pn,onMouseLeave:pn};return te.createElement("div",{className:"".concat(hn,"-wrap")},te.createElement("span",(0,Se.Z)({},On,{onMouseDown:function(Zn){$n(Zn,!0)},"aria-label":"Increase Value","aria-disabled":zt,className:Yt}),st||te.createElement("span",{unselectable:"on",className:"".concat($e,"-handler-up-inner")})),te.createElement("span",(0,Se.Z)({},On,{onMouseDown:function(Zn){$n(Zn,!1)},"aria-label":"Decrease Value","aria-disabled":on,className:Mn}),Tt||te.createElement("span",{unselectable:"on",className:"".concat($e,"-handler-down-inner")})))}function de(we){var $e=typeof we=="number"?pt(we):We(we).fullStr,st=$e.includes(".");return st?We($e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:we+"0"}var mt=ie(30292),en=function(){var we=(0,te.useRef)(0),$e=function(){ke.Z.cancel(we.current)};return(0,te.useEffect)(function(){return $e},[]),function(st){$e(),we.current=(0,ke.Z)(function(){st()})}},Mt=["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"],ze=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],dt=function($e,st){return $e||st.isEmpty()?st.toString():st.toNumber()},bt=function($e){var st=Ke($e);return st.isInvalidate()?null:st},un=te.forwardRef(function(we,$e){var st=we.prefixCls,Tt=we.className,zt=we.style,on=we.min,Dn=we.max,In=we.step,dn=In===void 0?1:In,xn=we.defaultValue,fn=we.value,$n=we.disabled,gn=we.readOnly,hn=we.upHandler,Yt=we.downHandler,Mn=we.keyboard,pn=we.changeOnWheel,On=pn===void 0?!1:pn,Gn=we.controls,Zn=Gn===void 0?!0:Gn,Bn=we.classNames,Xn=we.stringMode,Nn=we.parser,ar=we.formatter,qn=we.precision,Et=we.decimalSeparator,Ut=we.onChange,zn=we.onInput,nr=we.onPressEnter,De=we.onStep,Ue=we.changeOnBlur,ge=Ue===void 0?!0:Ue,Me=we.domRef,ye=(0,fe.Z)(we,Mt),Le="".concat(st,"-input"),me=te.useRef(null),Be=te.useState(!1),Ze=(0,Ie.Z)(Be,2),qe=Ze[0],je=Ze[1],Oe=te.useRef(!1),Te=te.useRef(!1),Ge=te.useRef(!1),$t=te.useState(function(){return Ke(fn!=null?fn:xn)}),Ft=(0,Ie.Z)($t,2),Wt=Ft[0],kn=Ft[1];function Tn(an){fn===void 0&&kn(an)}var Hn=te.useCallback(function(an,Gt){if(!Gt)return qn>=0?qn:Math.max(Ne(an),Ne(dn))},[qn,dn]),Sn=te.useCallback(function(an){var Gt=String(an);if(Nn)return Nn(Gt);var An=Gt;return Et&&(An=An.replace(Et,".")),An.replace(/[^\w.-]+/g,"")},[Nn,Et]),mn=te.useRef(""),Cn=te.useCallback(function(an,Gt){if(ar)return ar(an,{userTyping:Gt,input:String(mn.current)});var An=typeof an=="number"?pt(an):an;if(!Gt){var jn=Hn(An,Gt);if(It(An)&&(Et||jn>=0)){var tn=Et||".";An=yt(An,tn,jn)}}return An},[ar,Hn,Et]),Fn=te.useState(function(){var an=xn!=null?xn:fn;return Wt.isInvalidate()&&["string","number"].includes((0,nt.Z)(an))?Number.isNaN(an)?"":an:Cn(Wt.toString(),!1)}),Yn=(0,Ie.Z)(Fn,2),Vn=Yn[0],Kn=Yn[1];mn.current=Vn;function vn(an,Gt){Kn(Cn(an.isInvalidate()?an.toString(!1):an.toString(!Gt),Gt))}var er=te.useMemo(function(){return bt(Dn)},[Dn,qn]),Wn=te.useMemo(function(){return bt(on)},[on,qn]),dr=te.useMemo(function(){return!er||!Wt||Wt.isInvalidate()?!1:er.lessEquals(Wt)},[er,Wt]),pr=te.useMemo(function(){return!Wn||!Wt||Wt.isInvalidate()?!1:Wt.lessEquals(Wn)},[Wn,Wt]),lr=lt(me.current,qe),ur=(0,Ie.Z)(lr,2),yr=ur[0],sr=ur[1],fr=function(Gt){return er&&!Gt.lessEquals(er)?er:Wn&&!Wn.lessEquals(Gt)?Wn:null},Qn=function(Gt){return!fr(Gt)},mr=function(Gt,An){var jn=Gt,tn=Qn(jn)||jn.isEmpty();if(!jn.isEmpty()&&!An&&(jn=fr(jn)||jn,tn=!0),!gn&&!$n&&tn){var Vt=jn.toString(),yn=Hn(Vt,An);return yn>=0&&(jn=Ke(yt(Vt,".",yn)),Qn(jn)||(jn=Ke(yt(Vt,".",yn,!0)))),jn.equals(Wt)||(Tn(jn),Ut==null||Ut(jn.isEmpty()?null:dt(Xn,jn)),fn===void 0&&vn(jn,An)),jn}return Wt},br=en(),Hr=function an(Gt){if(yr(),mn.current=Gt,Kn(Gt),!Te.current){var An=Sn(Gt),jn=Ke(An);jn.isNaN()||mr(jn,!0)}zn==null||zn(Gt),br(function(){var tn=Gt;Nn||(tn=Gt.replace(/。/g,".")),tn!==Gt&&an(tn)})},Er=function(){Te.current=!0},Ar=function(){Te.current=!1,Hr(me.current.value)},kr=function(Gt){Hr(Gt.target.value)},Pr=function(Gt){var An;if(!(Gt&&dr||!Gt&&pr)){Oe.current=!1;var jn=Ke(Ge.current?de(dn):dn);Gt||(jn=jn.negate());var tn=(Wt||Ke(0)).add(jn.toString()),Vt=mr(tn,!1);De==null||De(dt(Xn,Vt),{offset:Ge.current?de(dn):dn,type:Gt?"up":"down"}),(An=me.current)===null||An===void 0||An.focus()}},ir=function(Gt){var An=Ke(Sn(Vn)),jn;An.isNaN()?jn=mr(Wt,Gt):jn=mr(An,Gt),fn!==void 0?vn(Wt,!1):jn.isNaN()||vn(jn,!1)},rr=function(){Oe.current=!0},Jn=function(Gt){var An=Gt.key,jn=Gt.shiftKey;Oe.current=!0,Ge.current=jn,An==="Enter"&&(Te.current||(Oe.current=!1),ir(!1),nr==null||nr(Gt)),Mn!==!1&&!Te.current&&["Up","ArrowUp","Down","ArrowDown"].includes(An)&&(Pr(An==="Up"||An==="ArrowUp"),Gt.preventDefault())},Kt=function(){Oe.current=!1,Ge.current=!1};te.useEffect(function(){if(On&&qe){var an=function(jn){Pr(jn.deltaY<0),jn.preventDefault()},Gt=me.current;if(Gt)return Gt.addEventListener("wheel",an,{passive:!1}),function(){return Gt.removeEventListener("wheel",an)}}});var ln=function(){ge&&ir(!1),je(!1),Oe.current=!1};return(0,Fe.o)(function(){Wt.isInvalidate()||vn(Wt,!1)},[qn,ar]),(0,Fe.o)(function(){var an=Ke(fn);kn(an);var Gt=Ke(Sn(Vn));(!an.equals(Gt)||!Oe.current||ar)&&vn(an,Oe.current)},[fn]),(0,Fe.o)(function(){ar&&sr()},[Vn]),te.createElement("div",{ref:Me,className:be()(st,Tt,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(st,"-focused"),qe),"".concat(st,"-disabled"),$n),"".concat(st,"-readonly"),gn),"".concat(st,"-not-a-number"),Wt.isNaN()),"".concat(st,"-out-of-range"),!Wt.isInvalidate()&&!Qn(Wt))),style:zt,onFocus:function(){je(!0)},onBlur:ln,onKeyDown:Jn,onKeyUp:Kt,onCompositionStart:Er,onCompositionEnd:Ar,onBeforeInput:rr},Zn&&te.createElement(Ce,{prefixCls:st,upNode:hn,downNode:Yt,upDisabled:dr,downDisabled:pr,onStep:Pr}),te.createElement("div",{className:"".concat(Le,"-wrap")},te.createElement("input",(0,Se.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":on,"aria-valuemax":Dn,"aria-valuenow":Wt.isInvalidate()?null:Wt.toString(),step:dn},ye,{ref:(0,ft.sQ)(me,$e),className:Le,value:Vn,onChange:kr,disabled:$n,readOnly:gn}))))}),At=te.forwardRef(function(we,$e){var st=we.disabled,Tt=we.style,zt=we.prefixCls,on=zt===void 0?"rc-input-number":zt,Dn=we.value,In=we.prefix,dn=we.suffix,xn=we.addonBefore,fn=we.addonAfter,$n=we.className,gn=we.classNames,hn=(0,fe.Z)(we,ze),Yt=te.useRef(null),Mn=te.useRef(null),pn=te.useRef(null),On=function(Zn){pn.current&&(0,mt.nH)(pn.current,Zn)};return te.useImperativeHandle($e,function(){return _e(pn.current,{focus:On,nativeElement:Yt.current.nativeElement||Mn.current})}),te.createElement(Bt.BaseInput,{className:$n,triggerFocus:On,prefixCls:on,value:Dn,disabled:st,style:Tt,prefix:In,suffix:dn,addonAfter:fn,addonBefore:xn,classNames:gn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:Yt},te.createElement(un,(0,Se.Z)({prefixCls:on,disabled:st,ref:pn,domRef:Mn,className:gn==null?void 0:gn.input},hn)))}),sn=At,it=sn,_t=ie(62487),ht=ie(82855),se=ie(48755),ee=ie(60840),z=ie(2171),oe=ie(83397),le=ie(31756),re=ie(56553),Ee=ie(24971),at=ie(70045),Ht=ie(36237),Ye=ie(53075),tt=ie(64910),vt=ie(39082),Rt=ie(63356),Dt=ie(56119),Jt=ie(16931),Xt=ie(51636),Zt=ie(17835);const En=we=>{var $e;const st=($e=we.handleVisible)!==null&&$e!==void 0?$e:"auto",Tt=we.controlHeightSM-we.lineWidth*2;return Object.assign(Object.assign({},(0,tt.T)(we)),{controlWidth:90,handleWidth:Tt,handleFontSize:we.fontSize/2,handleVisible:st,handleActiveBg:we.colorFillAlter,handleBg:we.colorBgContainer,filledHandleBg:new Zt.FastColor(we.colorFillSecondary).onBackground(we.colorBgContainer).toHexString(),handleHoverColor:we.colorPrimary,handleBorderColor:we.colorBorder,handleOpacity:st===!0?1:0,handleVisibleWidth:st===!0?Tt:0})},cn=(we,$e)=>{let{componentCls:st,borderRadiusSM:Tt,borderRadiusLG:zt}=we;const on=$e==="lg"?zt:Tt;return{[`&-${$e}`]:{[`${st}-handler-wrap`]:{borderStartEndRadius:on,borderEndEndRadius:on},[`${st}-handler-up`]:{borderStartEndRadius:on},[`${st}-handler-down`]:{borderEndEndRadius:on}}}},wn=we=>{const{componentCls:$e,lineWidth:st,lineType:Tt,borderRadius:zt,inputFontSizeSM:on,inputFontSizeLG:Dn,controlHeightLG:In,controlHeightSM:dn,colorError:xn,paddingInlineSM:fn,paddingBlockSM:$n,paddingBlockLG:gn,paddingInlineLG:hn,colorTextDescription:Yt,motionDurationMid:Mn,handleHoverColor:pn,handleOpacity:On,paddingInline:Gn,paddingBlock:Zn,handleBg:Bn,handleActiveBg:Xn,colorTextDisabled:Nn,borderRadiusSM:ar,borderRadiusLG:qn,controlWidth:Et,handleBorderColor:Ut,filledHandleBg:zn,lineHeightLG:nr,calc:De}=we;return[{[$e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Rt.Wf)(we)),(0,Ye.ik)(we)),{display:"inline-block",width:Et,margin:0,padding:0,borderRadius:zt}),(0,vt.qG)(we,{[`${$e}-handler-wrap`]:{background:Bn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,Ht.unit)(st)} ${Tt} ${Ut}`}}})),(0,vt.H8)(we,{[`${$e}-handler-wrap`]:{background:zn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,Ht.unit)(st)} ${Tt} ${Ut}`}},"&:focus-within":{[`${$e}-handler-wrap`]:{background:Bn}}})),(0,vt.vc)(we,{[`${$e}-handler-wrap`]:{background:Bn,[`${$e}-handler-down`]:{borderBlockStart:`${(0,Ht.unit)(st)} ${Tt} ${Ut}`}}})),(0,vt.Mu)(we)),{"&-rtl":{direction:"rtl",[`${$e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Dn,lineHeight:nr,borderRadius:qn,[`input${$e}-input`]:{height:De(In).sub(De(st).mul(2)).equal(),padding:`${(0,Ht.unit)(gn)} ${(0,Ht.unit)(hn)}`}},"&-sm":{padding:0,fontSize:on,borderRadius:ar,[`input${$e}-input`]:{height:De(dn).sub(De(st).mul(2)).equal(),padding:`${(0,Ht.unit)($n)} ${(0,Ht.unit)(fn)}`}},"&-out-of-range":{[`${$e}-input-wrap`]:{input:{color:xn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Rt.Wf)(we)),(0,Ye.s7)(we)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${$e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${$e}-group-addon`]:{borderRadius:qn,fontSize:we.fontSizeLG}},"&-sm":{[`${$e}-group-addon`]:{borderRadius:ar}}},(0,vt.ir)(we)),(0,vt.S5)(we)),{[`&:not(${$e}-compact-first-item):not(${$e}-compact-last-item)${$e}-compact-item`]:{[`${$e}, ${$e}-group-addon`]:{borderRadius:0}},[`&:not(${$e}-compact-last-item)${$e}-compact-first-item`]:{[`${$e}, ${$e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${$e}-compact-first-item)${$e}-compact-last-item`]:{[`${$e}, ${$e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${$e}-input`]:{cursor:"not-allowed"},[$e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Rt.Wf)(we)),{width:"100%",padding:`${(0,Ht.unit)(Zn)} ${(0,Ht.unit)(Gn)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:zt,outline:0,transition:`all ${Mn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Ye.nz)(we.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${$e}-handler-wrap, &-focused ${$e}-handler-wrap`]:{width:we.handleWidth,opacity:1}})},{[$e]:Object.assign(Object.assign(Object.assign({[`${$e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:we.handleVisibleWidth,opacity:On,height:"100%",borderStartStartRadius:0,borderStartEndRadius:zt,borderEndEndRadius:zt,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${Mn}`,overflow:"hidden",[`${$e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${$e}-handler-up-inner,
|
|
|
${$e}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:we.handleFontSize}}},[`${$e}-handler`]:{height:"50%",overflow:"hidden",color:Yt,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,Ht.unit)(st)} ${Tt} ${Ut}`,transition:`all ${Mn} linear`,"&:active":{background:Xn},"&:hover":{height:"60%",[`
|
|
|
${$e}-handler-up-inner,
|
|
|
${$e}-handler-down-inner
|
|
|
`]:{color:pn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Rt.Ro)()),{color:Yt,transition:`all ${Mn} linear`,userSelect:"none"})},[`${$e}-handler-up`]:{borderStartEndRadius:zt},[`${$e}-handler-down`]:{borderEndEndRadius:zt}},cn(we,"lg")),cn(we,"sm")),{"&-disabled, &-readonly":{[`${$e}-handler-wrap`]:{display:"none"},[`${$e}-input`]:{color:"inherit"}},[`
|
|
|
${$e}-handler-up-disabled,
|
|
|
${$e}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${$e}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${$e}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Nn}})}]},kt=we=>{const{componentCls:$e,paddingBlock:st,paddingInline:Tt,inputAffixPadding:zt,controlWidth:on,borderRadiusLG:Dn,borderRadiusSM:In,paddingInlineLG:dn,paddingInlineSM:xn,paddingBlockLG:fn,paddingBlockSM:$n,motionDurationMid:gn}=we;return{[`${$e}-affix-wrapper`]:Object.assign(Object.assign({[`input${$e}-input`]:{padding:`${(0,Ht.unit)(st)} 0`}},(0,Ye.ik)(we)),{position:"relative",display:"inline-flex",alignItems:"center",width:on,padding:0,paddingInlineStart:Tt,"&-lg":{borderRadius:Dn,paddingInlineStart:dn,[`input${$e}-input`]:{padding:`${(0,Ht.unit)(fn)} 0`}},"&-sm":{borderRadius:In,paddingInlineStart:xn,[`input${$e}-input`]:{padding:`${(0,Ht.unit)($n)} 0`}},[`&:not(${$e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${$e}-disabled`]:{background:"transparent"},[`> div${$e}`]:{width:"100%",border:"none",outline:"none",[`&${$e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${$e}-handler-wrap`]:{zIndex:2},[$e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:zt},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:Tt,marginInlineStart:zt,transition:`margin ${gn}`}},[`&:hover ${$e}-handler-wrap, &-focused ${$e}-handler-wrap`]:{width:we.handleWidth,opacity:1},[`&:not(${$e}-affix-wrapper-without-controls):hover ${$e}-suffix`]:{marginInlineEnd:we.calc(we.handleWidth).add(Tt).equal()}})}};var Pn=(0,Jt.I$)("InputNumber",we=>{const $e=(0,Xt.mergeToken)(we,(0,tt.e)(we));return[wn($e),kt($e),(0,Dt.c)($e)]},En,{unitless:{handleOpacity:!0}}),Qt=function(we,$e){var st={};for(var Tt in we)Object.prototype.hasOwnProperty.call(we,Tt)&&$e.indexOf(Tt)<0&&(st[Tt]=we[Tt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,Tt=Object.getOwnPropertySymbols(we);zt<Tt.length;zt++)$e.indexOf(Tt[zt])<0&&Object.prototype.propertyIsEnumerable.call(we,Tt[zt])&&(st[Tt[zt]]=we[Tt[zt]]);return st};const Pe=te.forwardRef((we,$e)=>{const{getPrefixCls:st,direction:Tt}=te.useContext(se.E_),zt=te.useRef(null);te.useImperativeHandle($e,()=>zt.current);const{className:on,rootClassName:Dn,size:In,disabled:dn,prefixCls:xn,addonBefore:fn,addonAfter:$n,prefix:gn,suffix:hn,bordered:Yt,readOnly:Mn,status:pn,controls:On,variant:Gn}=we,Zn=Qt(we,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),Bn=st("input-number",xn),Xn=(0,oe.Z)(Bn),[Nn,ar,qn]=Pn(Bn,Xn),{compactSize:Et,compactItemClassnames:Ut}=(0,at.ri)(Bn,Tt);let zn=te.createElement(ve.Z,{className:`${Bn}-handler-up-inner`}),nr=te.createElement(ut.Z,{className:`${Bn}-handler-down-inner`});const De=typeof On=="boolean"?On:void 0;typeof On=="object"&&(zn=typeof On.upIcon=="undefined"?zn:te.createElement("span",{className:`${Bn}-handler-up-inner`},On.upIcon),nr=typeof On.downIcon=="undefined"?nr:te.createElement("span",{className:`${Bn}-handler-down-inner`},On.downIcon));const{hasFeedback:Ue,status:ge,isFormItemInput:Me,feedbackIcon:ye}=te.useContext(re.aM),Le=(0,ht.F)(ge,pn),me=(0,le.Z)(Ft=>{var Wt;return(Wt=In!=null?In:Et)!==null&&Wt!==void 0?Wt:Ft}),Be=te.useContext(z.Z),Ze=dn!=null?dn:Be,[qe,je]=(0,Ee.Z)("inputNumber",Gn,Yt),Oe=Ue&&te.createElement(te.Fragment,null,ye),Te=be()({[`${Bn}-lg`]:me==="large",[`${Bn}-sm`]:me==="small",[`${Bn}-rtl`]:Tt==="rtl",[`${Bn}-in-form-item`]:Me},ar),Ge=`${Bn}-group`,$t=te.createElement(it,Object.assign({ref:zt,disabled:Ze,className:be()(qn,Xn,on,Dn,Ut),upHandler:zn,downHandler:nr,prefixCls:Bn,readOnly:Mn,controls:De,prefix:gn,suffix:Oe||hn,addonBefore:fn&&te.createElement(_t.Z,{form:!0,space:!0},fn),addonAfter:$n&&te.createElement(_t.Z,{form:!0,space:!0},$n),classNames:{input:Te,variant:be()({[`${Bn}-${qe}`]:je},(0,ht.Z)(Bn,Le,Ue)),affixWrapper:be()({[`${Bn}-affix-wrapper-sm`]:me==="small",[`${Bn}-affix-wrapper-lg`]:me==="large",[`${Bn}-affix-wrapper-rtl`]:Tt==="rtl",[`${Bn}-affix-wrapper-without-controls`]:On===!1||Ze},ar),wrapper:be()({[`${Ge}-rtl`]:Tt==="rtl"},ar),groupWrapper:be()({[`${Bn}-group-wrapper-sm`]:me==="small",[`${Bn}-group-wrapper-lg`]:me==="large",[`${Bn}-group-wrapper-rtl`]:Tt==="rtl",[`${Bn}-group-wrapper-${qe}`]:je},(0,ht.Z)(`${Bn}-group-wrapper`,Le,Ue),ar)}},Zn));return Nn($t)}),Qe=Pe,Lt=we=>te.createElement(ee.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},te.createElement(Pe,Object.assign({},we)));Qe._InternalPanelDoNotUseOrYouWillBeFired=Lt;var Nt=Qe},49397:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return gt}});var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(36901),be=ie(8654),Se=ie(62487),He=ie(86013),nt=ie(82855),Ie=ie(48755),fe=ie(2171),et=ie(83397),xe=ie(31756),wt=ie(56553),rt=ie(24971),We=ie(70045),Ve=ie(23826),Ne=ie(53075);function pt(ct){return!!(ct.prefix||ct.suffix||ct.allowClear||ct.showCount)}var It=function(ct,yt){var Ke={};for(var Bt in ct)Object.prototype.hasOwnProperty.call(ct,Bt)&&yt.indexOf(Bt)<0&&(Ke[Bt]=ct[Bt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Bt=Object.getOwnPropertySymbols(ct);Fe<Bt.length;Fe++)yt.indexOf(Bt[Fe])<0&&Object.prototype.propertyIsEnumerable.call(ct,Bt[Fe])&&(Ke[Bt[Fe]]=ct[Bt[Fe]]);return Ke},gt=(0,te.forwardRef)((ct,yt)=>{const{prefixCls:Ke,bordered:Bt=!0,status:Fe,size:_e,disabled:ft,onBlur:Re,onFocus:lt,suffix:ot,allowClear:pe,addonAfter:St,addonBefore:ke,className:Ct,style:qt,styles:Ce,rootClassName:de,onChange:mt,classNames:en,variant:Mt}=ct,ze=It(ct,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:dt,direction:bt,allowClear:un,autoComplete:At,className:sn,style:it,classNames:_t,styles:ht}=(0,Ie.dj)("input"),se=dt("input",Ke),ee=(0,te.useRef)(null),z=(0,et.Z)(se),[oe,le,re]=(0,Ne.TI)(se,de),[Ee]=(0,Ne.ZP)(se,z),{compactSize:at,compactItemClassnames:Ht}=(0,We.ri)(se,bt),Ye=(0,xe.Z)(Nt=>{var we;return(we=_e!=null?_e:at)!==null&&we!==void 0?we:Nt}),tt=te.useContext(fe.Z),vt=ft!=null?ft:tt,{status:Rt,hasFeedback:Dt,feedbackIcon:Jt}=(0,te.useContext)(wt.aM),Xt=(0,nt.F)(Rt,Fe),Zt=pt(ct)||!!Dt,En=(0,te.useRef)(Zt),cn=(0,Ve.Z)(ee,!0),wn=Nt=>{cn(),Re==null||Re(Nt)},kt=Nt=>{cn(),lt==null||lt(Nt)},Pn=Nt=>{cn(),mt==null||mt(Nt)},Qt=(Dt||ot)&&te.createElement(te.Fragment,null,ot,Dt&&Jt),Pe=(0,He.Z)(pe!=null?pe:un),[Qe,Lt]=(0,rt.Z)("input",Mt,Bt);return oe(Ee(te.createElement(Je.default,Object.assign({ref:(0,be.sQ)(yt,ee),prefixCls:se,autoComplete:At},ze,{disabled:vt,onBlur:wn,onFocus:kt,style:Object.assign(Object.assign({},it),qt),styles:Object.assign(Object.assign({},ht),Ce),suffix:Qt,allowClear:Pe,className:ve()(Ct,de,re,z,Ht,sn),onChange:Pn,addonBefore:ke&&te.createElement(Se.Z,{form:!0,space:!0},ke),addonAfter:St&&te.createElement(Se.Z,{form:!0,space:!0},St),classNames:Object.assign(Object.assign(Object.assign({},en),_t),{input:ve()({[`${se}-sm`]:Ye==="small",[`${se}-lg`]:Ye==="large",[`${se}-rtl`]:bt==="rtl"},en==null?void 0:en.input,_t.input,le),variant:ve()({[`${se}-${Qe}`]:Lt},(0,nt.Z)(se,Xt)),affixWrapper:ve()({[`${se}-affix-wrapper-sm`]:Ye==="small",[`${se}-affix-wrapper-lg`]:Ye==="large",[`${se}-affix-wrapper-rtl`]:bt==="rtl"},le),wrapper:ve()({[`${se}-group-rtl`]:bt==="rtl"},le),groupWrapper:ve()({[`${se}-group-wrapper-sm`]:Ye==="small",[`${se}-group-wrapper-lg`]:Ye==="large",[`${se}-group-wrapper-rtl`]:bt==="rtl",[`${se}-group-wrapper-${Qe}`]:Lt},(0,nt.Z)(`${se}-group-wrapper`,Xt,Dt),le)})}))))})},79809:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return yt}});var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(22711),be=ie(86013),Se=ie(82855),He=ie(48755),nt=ie(2171),Ie=ie(83397),fe=ie(31756),et=ie(56553),xe=ie(24971),wt=ie(70045),rt=ie(30292),We=ie(53075),Ve=ie(16931),Ne=ie(51636),pt=ie(64910);const It=Ke=>{const{componentCls:Bt,paddingLG:Fe}=Ke,_e=`${Bt}-textarea`;return{[`textarea${Bt}`]:{maxWidth:"100%",height:"auto",minHeight:Ke.controlHeight,lineHeight:Ke.lineHeight,verticalAlign:"bottom",transition:`all ${Ke.motionDurationSlow}`,resize:"vertical",[`&${Bt}-mouse-active`]:{transition:`all ${Ke.motionDurationSlow}, height 0s, width 0s`}},[`${Bt}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[_e]:{position:"relative","&-show-count":{[`> ${Bt}`]:{height:"100%"},[`${Bt}-data-count`]:{position:"absolute",bottom:Ke.calc(Ke.fontSize).mul(Ke.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:Ke.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${Bt},
|
|
|
&-affix-wrapper${_e}-has-feedback ${Bt}
|
|
|
`]:{paddingInlineEnd:Fe},[`&-affix-wrapper${Bt}-affix-wrapper`]:{padding:0,[`> textarea${Bt}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:Ke.calc(Ke.controlHeight).sub(Ke.calc(Ke.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${Bt}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Bt}-clear-icon`]:{position:"absolute",insetInlineEnd:Ke.paddingInline,insetBlockStart:Ke.paddingXS},[`${_e}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ke.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${Bt}-affix-wrapper-sm`]:{[`${Bt}-suffix`]:{[`${Bt}-clear-icon`]:{insetInlineEnd:Ke.paddingInlineSM}}}}}};var Ot=(0,Ve.I$)(["Input","TextArea"],Ke=>{const Bt=(0,Ne.mergeToken)(Ke,(0,pt.e)(Ke));return[It(Bt)]},pt.T,{resetFont:!1}),gt=function(Ke,Bt){var Fe={};for(var _e in Ke)Object.prototype.hasOwnProperty.call(Ke,_e)&&Bt.indexOf(_e)<0&&(Fe[_e]=Ke[_e]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,_e=Object.getOwnPropertySymbols(Ke);ft<_e.length;ft++)Bt.indexOf(_e[ft])<0&&Object.prototype.propertyIsEnumerable.call(Ke,_e[ft])&&(Fe[_e[ft]]=Ke[_e[ft]]);return Fe},yt=(0,te.forwardRef)((Ke,Bt)=>{var Fe;const{prefixCls:_e,bordered:ft=!0,size:Re,disabled:lt,status:ot,allowClear:pe,classNames:St,rootClassName:ke,className:Ct,style:qt,styles:Ce,variant:de,showCount:mt,onMouseDown:en,onResize:Mt}=Ke,ze=gt(Ke,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:dt,direction:bt,allowClear:un,autoComplete:At,className:sn,style:it,classNames:_t,styles:ht}=(0,He.dj)("textArea"),se=te.useContext(nt.Z),ee=lt!=null?lt:se,{status:z,hasFeedback:oe,feedbackIcon:le}=te.useContext(et.aM),re=(0,Se.F)(z,ot),Ee=te.useRef(null);te.useImperativeHandle(Bt,()=>{var Lt;return{resizableTextArea:(Lt=Ee.current)===null||Lt===void 0?void 0:Lt.resizableTextArea,focus:Nt=>{var we,$e;(0,rt.nH)(($e=(we=Ee.current)===null||we===void 0?void 0:we.resizableTextArea)===null||$e===void 0?void 0:$e.textArea,Nt)},blur:()=>{var Nt;return(Nt=Ee.current)===null||Nt===void 0?void 0:Nt.blur()}}});const at=dt("input",_e),Ht=(0,Ie.Z)(at),[Ye,tt,vt]=(0,We.TI)(at,ke),[Rt]=Ot(at,Ht),{compactSize:Dt,compactItemClassnames:Jt}=(0,wt.ri)(at,bt),Xt=(0,fe.Z)(Lt=>{var Nt;return(Nt=Re!=null?Re:Dt)!==null&&Nt!==void 0?Nt:Lt}),[Zt,En]=(0,xe.Z)("textArea",de,ft),cn=(0,be.Z)(pe!=null?pe:un),[wn,kt]=te.useState(!1),[Pn,Qt]=te.useState(!1),Pe=Lt=>{kt(!0),en==null||en(Lt);const Nt=()=>{kt(!1),document.removeEventListener("mouseup",Nt)};document.addEventListener("mouseup",Nt)},Qe=Lt=>{var Nt,we;if(Mt==null||Mt(Lt),wn&&typeof getComputedStyle=="function"){const $e=(we=(Nt=Ee.current)===null||Nt===void 0?void 0:Nt.nativeElement)===null||we===void 0?void 0:we.querySelector("textarea");$e&&getComputedStyle($e).resize==="both"&&Qt(!0)}};return Ye(Rt(te.createElement(Je.default,Object.assign({autoComplete:At},ze,{style:Object.assign(Object.assign({},it),qt),styles:Object.assign(Object.assign({},ht),Ce),disabled:ee,allowClear:cn,className:ve()(vt,Ht,Ct,ke,Jt,sn,Pn&&`${at}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},St),_t),{textarea:ve()({[`${at}-sm`]:Xt==="small",[`${at}-lg`]:Xt==="large"},tt,St==null?void 0:St.textarea,_t.textarea,wn&&`${at}-mouse-active`),variant:ve()({[`${at}-${Zt}`]:En},(0,Se.Z)(at,re)),affixWrapper:ve()(`${at}-textarea-affix-wrapper`,{[`${at}-affix-wrapper-rtl`]:bt==="rtl",[`${at}-affix-wrapper-sm`]:Xt==="small",[`${at}-affix-wrapper-lg`]:Xt==="large",[`${at}-textarea-show-count`]:mt||((Fe=Ke.count)===null||Fe===void 0?void 0:Fe.show)},tt)}),prefixCls:at,suffix:oe&&te.createElement("span",{className:`${at}-textarea-suffix`},le),showCount:mt,ref:Ee,onResize:Qe,onMouseDown:Pe}))))})},23826:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return ut}});var te=ie(59301);function ut(ve,Je){const be=(0,te.useRef)([]),Se=()=>{be.current.push(setTimeout(()=>{var He,nt,Ie,fe;!((He=ve.current)===null||He===void 0)&&He.input&&((nt=ve.current)===null||nt===void 0?void 0:nt.input.getAttribute("type"))==="password"&&(!((Ie=ve.current)===null||Ie===void 0)&&Ie.input.hasAttribute("value"))&&((fe=ve.current)===null||fe===void 0||fe.input.removeAttribute("value"))}))};return(0,te.useEffect)(()=>(Je&&Se(),()=>be.current.forEach(He=>{He&&clearTimeout(He)})),[]),Se}},37568:function(rn,jt,ie){"use strict";ie.d(jt,{default:function(){return _t}});var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(48755),be=ie(56553),Se=ie(53075),nt=ht=>{const{getPrefixCls:se,direction:ee}=(0,te.useContext)(Je.E_),{prefixCls:z,className:oe}=ht,le=se("input-group",z),re=se("input"),[Ee,at,Ht]=(0,Se.ZP)(re),Ye=ve()(le,Ht,{[`${le}-lg`]:ht.size==="large",[`${le}-sm`]:ht.size==="small",[`${le}-compact`]:ht.compact,[`${le}-rtl`]:ee==="rtl"},at,oe),tt=(0,te.useContext)(be.aM),vt=(0,te.useMemo)(()=>Object.assign(Object.assign({},tt),{isFormItemInput:!1}),[tt]);return Ee(te.createElement("span",{className:Ye,style:ht.style,onMouseEnter:ht.onMouseEnter,onMouseLeave:ht.onMouseLeave,onFocus:ht.onFocus,onBlur:ht.onBlur},te.createElement(be.aM.Provider,{value:vt},ht.children)))},Ie=ie(49397),fe=ie(77654),et=ie(6089),xe=ie(26112),wt=ie(82855),rt=ie(31756),We=ie(16931),Ve=ie(51636),Ne=ie(64910);const pt=ht=>{const{componentCls:se,paddingXS:ee}=ht;return{[se]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:ee,"&-rtl":{direction:"rtl"},[`${se}-input`]:{textAlign:"center",paddingInline:ht.paddingXXS},[`&${se}-sm ${se}-input`]:{paddingInline:ht.calc(ht.paddingXXS).div(2).equal()},[`&${se}-lg ${se}-input`]:{paddingInline:ht.paddingXS}}}};var It=(0,We.I$)(["Input","OTP"],ht=>{const se=(0,Ve.mergeToken)(ht,(0,Ne.e)(ht));return[pt(se)]},Ne.T),Ot=ie(16089),gt=function(ht,se){var ee={};for(var z in ht)Object.prototype.hasOwnProperty.call(ht,z)&&se.indexOf(z)<0&&(ee[z]=ht[z]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(ht);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(ht,z[oe])&&(ee[z[oe]]=ht[z[oe]]);return ee},yt=te.forwardRef((ht,se)=>{const{value:ee,onChange:z,onActiveChange:oe,index:le,mask:re}=ht,Ee=gt(ht,["value","onChange","onActiveChange","index","mask"]),at=ee&&typeof re=="string"?re:ee,Ht=Dt=>{z(le,Dt.target.value)},Ye=te.useRef(null);te.useImperativeHandle(se,()=>Ye.current);const tt=()=>{(0,Ot.Z)(()=>{var Dt;const Jt=(Dt=Ye.current)===null||Dt===void 0?void 0:Dt.input;document.activeElement===Jt&&Jt&&Jt.select()})},vt=Dt=>{const{key:Jt,ctrlKey:Xt,metaKey:Zt}=Dt;Jt==="ArrowLeft"?oe(le-1):Jt==="ArrowRight"?oe(le+1):Jt==="z"&&(Xt||Zt)&&Dt.preventDefault(),tt()},Rt=Dt=>{Dt.key==="Backspace"&&!ee&&oe(le-1),tt()};return te.createElement(Ie.Z,Object.assign({type:re===!0?"password":"text"},Ee,{ref:Ye,value:at,onInput:Ht,onFocus:tt,onKeyDown:vt,onKeyUp:Rt,onMouseDown:tt,onMouseUp:tt}))}),Ke=function(ht,se){var ee={};for(var z in ht)Object.prototype.hasOwnProperty.call(ht,z)&&se.indexOf(z)<0&&(ee[z]=ht[z]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(ht);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(ht,z[oe])&&(ee[z[oe]]=ht[z[oe]]);return ee};function Bt(ht){return(ht||"").split("")}const Fe=ht=>{const{index:se,prefixCls:ee,separator:z}=ht,oe=typeof z=="function"?z(se):z;return oe?te.createElement("span",{className:`${ee}-separator`},oe):null};var ft=te.forwardRef((ht,se)=>{const{prefixCls:ee,length:z=6,size:oe,defaultValue:le,value:re,onChange:Ee,formatter:at,separator:Ht,variant:Ye,disabled:tt,status:vt,autoFocus:Rt,mask:Dt,type:Jt,onInput:Xt,inputMode:Zt}=ht,En=Ke(ht,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:cn,direction:wn}=te.useContext(Je.E_),kt=cn("otp",ee),Pn=(0,xe.Z)(En,{aria:!0,data:!0,attr:!0}),[Qt,Pe,Qe]=It(kt),Lt=(0,rt.Z)(gn=>oe!=null?oe:gn),Nt=te.useContext(be.aM),we=(0,wt.F)(Nt.status,vt),$e=te.useMemo(()=>Object.assign(Object.assign({},Nt),{status:we,hasFeedback:!1,feedbackIcon:null}),[Nt,we]),st=te.useRef(null),Tt=te.useRef({});te.useImperativeHandle(se,()=>({focus:()=>{var gn;(gn=Tt.current[0])===null||gn===void 0||gn.focus()},blur:()=>{var gn;for(let hn=0;hn<z;hn+=1)(gn=Tt.current[hn])===null||gn===void 0||gn.blur()},nativeElement:st.current}));const zt=gn=>at?at(gn):gn,[on,Dn]=te.useState(()=>Bt(zt(le||"")));te.useEffect(()=>{re!==void 0&&Dn(Bt(re))},[re]);const In=(0,et.Z)(gn=>{Dn(gn),Xt&&Xt(gn),Ee&&gn.length===z&&gn.every(hn=>hn)&&gn.some((hn,Yt)=>on[Yt]!==hn)&&Ee(gn.join(""))}),dn=(0,et.Z)((gn,hn)=>{let Yt=(0,fe.Z)(on);for(let pn=0;pn<gn;pn+=1)Yt[pn]||(Yt[pn]="");hn.length<=1?Yt[gn]=hn:Yt=Yt.slice(0,gn).concat(Bt(hn)),Yt=Yt.slice(0,z);for(let pn=Yt.length-1;pn>=0&&!Yt[pn];pn-=1)Yt.pop();const Mn=zt(Yt.map(pn=>pn||" ").join(""));return Yt=Bt(Mn).map((pn,On)=>pn===" "&&!Yt[On]?Yt[On]:pn),Yt}),xn=(gn,hn)=>{var Yt;const Mn=dn(gn,hn),pn=Math.min(gn+hn.length,z-1);pn!==gn&&Mn[gn]!==void 0&&((Yt=Tt.current[pn])===null||Yt===void 0||Yt.focus()),In(Mn)},fn=gn=>{var hn;(hn=Tt.current[gn])===null||hn===void 0||hn.focus()},$n={variant:Ye,disabled:tt,status:we,mask:Dt,type:Jt,inputMode:Zt};return Qt(te.createElement("div",Object.assign({},Pn,{ref:st,className:ve()(kt,{[`${kt}-sm`]:Lt==="small",[`${kt}-lg`]:Lt==="large",[`${kt}-rtl`]:wn==="rtl"},Qe,Pe)}),te.createElement(be.aM.Provider,{value:$e},Array.from({length:z}).map((gn,hn)=>{const Yt=`otp-${hn}`,Mn=on[hn]||"";return te.createElement(te.Fragment,{key:Yt},te.createElement(yt,Object.assign({ref:pn=>{Tt.current[hn]=pn},index:hn,size:Lt,htmlSize:1,className:`${kt}-input`,onChange:xn,value:Mn,onActiveChange:fn,autoFocus:hn===0&&Rt},$n)),hn<z-1&&te.createElement(Fe,{separator:Ht,index:hn,prefixCls:kt}))}))))}),Re=ie(73331),lt=ie(15277),ot=ie(2738),pe=ie(8654),St=ie(2171),ke=ie(23826),Ct=function(ht,se){var ee={};for(var z in ht)Object.prototype.hasOwnProperty.call(ht,z)&&se.indexOf(z)<0&&(ee[z]=ht[z]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(ht);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(ht,z[oe])&&(ee[z[oe]]=ht[z[oe]]);return ee};const qt=ht=>ht?te.createElement(lt.Z,null):te.createElement(Re.Z,null),Ce={click:"onClick",hover:"onMouseOver"};var mt=te.forwardRef((ht,se)=>{const{disabled:ee,action:z="click",visibilityToggle:oe=!0,iconRender:le=qt}=ht,re=te.useContext(St.Z),Ee=ee!=null?ee:re,at=typeof oe=="object"&&oe.visible!==void 0,[Ht,Ye]=(0,te.useState)(()=>at?oe.visible:!1),tt=(0,te.useRef)(null);te.useEffect(()=>{at&&Ye(oe.visible)},[at,oe]);const vt=(0,ke.Z)(tt),Rt=()=>{var Lt;if(Ee)return;Ht&&vt();const Nt=!Ht;Ye(Nt),typeof oe=="object"&&((Lt=oe.onVisibleChange)===null||Lt===void 0||Lt.call(oe,Nt))},Dt=Lt=>{const Nt=Ce[z]||"",we=le(Ht),$e={[Nt]:Rt,className:`${Lt}-icon`,key:"passwordIcon",onMouseDown:st=>{st.preventDefault()},onMouseUp:st=>{st.preventDefault()}};return te.cloneElement(te.isValidElement(we)?we:te.createElement("span",null,we),$e)},{className:Jt,prefixCls:Xt,inputPrefixCls:Zt,size:En}=ht,cn=Ct(ht,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:wn}=te.useContext(Je.E_),kt=wn("input",Zt),Pn=wn("input-password",Xt),Qt=oe&&Dt(Pn),Pe=ve()(Pn,Jt,{[`${Pn}-${En}`]:!!En}),Qe=Object.assign(Object.assign({},(0,ot.Z)(cn,["suffix","iconRender","visibilityToggle"])),{type:Ht?"text":"password",className:Pe,prefixCls:kt,suffix:Qt});return En&&(Qe.size=En),te.createElement(Ie.Z,Object.assign({ref:(0,pe.sQ)(se,tt)},Qe))}),en=ie(47472),Mt=ie(22703),ze=ie(7939),dt=ie(70045),bt=function(ht,se){var ee={};for(var z in ht)Object.prototype.hasOwnProperty.call(ht,z)&&se.indexOf(z)<0&&(ee[z]=ht[z]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,z=Object.getOwnPropertySymbols(ht);oe<z.length;oe++)se.indexOf(z[oe])<0&&Object.prototype.propertyIsEnumerable.call(ht,z[oe])&&(ee[z[oe]]=ht[z[oe]]);return ee},At=te.forwardRef((ht,se)=>{const{prefixCls:ee,inputPrefixCls:z,className:oe,size:le,suffix:re,enterButton:Ee=!1,addonAfter:at,loading:Ht,disabled:Ye,onSearch:tt,onChange:vt,onCompositionStart:Rt,onCompositionEnd:Dt}=ht,Jt=bt(ht,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Xt,direction:Zt}=te.useContext(Je.E_),En=te.useRef(!1),cn=Xt("input-search",ee),wn=Xt("input",z),{compactSize:kt}=(0,dt.ri)(cn,Zt),Pn=(0,rt.Z)(xn=>{var fn;return(fn=le!=null?le:kt)!==null&&fn!==void 0?fn:xn}),Qt=te.useRef(null),Pe=xn=>{xn!=null&&xn.target&&xn.type==="click"&&tt&&tt(xn.target.value,xn,{source:"clear"}),vt==null||vt(xn)},Qe=xn=>{var fn;document.activeElement===((fn=Qt.current)===null||fn===void 0?void 0:fn.input)&&xn.preventDefault()},Lt=xn=>{var fn,$n;tt&&tt(($n=(fn=Qt.current)===null||fn===void 0?void 0:fn.input)===null||$n===void 0?void 0:$n.value,xn,{source:"input"})},Nt=xn=>{En.current||Ht||Lt(xn)},we=typeof Ee=="boolean"?te.createElement(en.Z,null):null,$e=`${cn}-button`;let st;const Tt=Ee||{},zt=Tt.type&&Tt.type.__ANT_BUTTON===!0;zt||Tt.type==="button"?st=(0,Mt.Tm)(Tt,Object.assign({onMouseDown:Qe,onClick:xn=>{var fn,$n;($n=(fn=Tt==null?void 0:Tt.props)===null||fn===void 0?void 0:fn.onClick)===null||$n===void 0||$n.call(fn,xn),Lt(xn)},key:"enterButton"},zt?{className:$e,size:Pn}:{})):st=te.createElement(ze.ZP,{className:$e,type:Ee?"primary":void 0,size:Pn,disabled:Ye,key:"enterButton",onMouseDown:Qe,onClick:Lt,loading:Ht,icon:we},Ee),at&&(st=[st,(0,Mt.Tm)(at,{key:"addonAfter"})]);const on=ve()(cn,{[`${cn}-rtl`]:Zt==="rtl",[`${cn}-${Pn}`]:!!Pn,[`${cn}-with-button`]:!!Ee},oe),Dn=Object.assign(Object.assign({},Jt),{className:on,prefixCls:wn,type:"search"}),In=xn=>{En.current=!0,Rt==null||Rt(xn)},dn=xn=>{En.current=!1,Dt==null||Dt(xn)};return te.createElement(Ie.Z,Object.assign({ref:(0,pe.sQ)(Qt,se),onPressEnter:Nt},Dn,{size:Pn,onCompositionStart:In,onCompositionEnd:dn,addonAfter:st,suffix:re,onChange:Pe,disabled:Ye}))}),sn=ie(79809);const it=Ie.Z;it.Group=nt,it.Search=At,it.TextArea=sn.Z,it.Password=mt,it.OTP=ft;var _t=it},89787:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return Qt}});var te=ie(59301),ut=ie(17835),ve=ie(29679),Je=ie(40001),be=ie(19248),Se=ie(99267),He=ie(92310),nt=ie.n(He),Ie=ie(2738),fe=ie(48755),et=ie(60499),xe=ie(85899),wt=ie(42244),rt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},We=function(){var Qe=(0,te.useRef)([]),Lt=(0,te.useRef)(null);return(0,te.useEffect)(function(){var Nt=Date.now(),we=!1;Qe.current.forEach(function($e){if($e){we=!0;var st=$e.style;st.transitionDuration=".3s, .3s, .3s, .06s",Lt.current&&Nt-Lt.current<100&&(st.transitionDuration="0s, 0s")}}),we&&(Lt.current=Date.now())}),Qe.current},Ve=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Ne=function(Qe){var Lt=(0,xe.Z)((0,xe.Z)({},rt),Qe),Nt=Lt.className,we=Lt.percent,$e=Lt.prefixCls,st=Lt.strokeColor,Tt=Lt.strokeLinecap,zt=Lt.strokeWidth,on=Lt.style,Dn=Lt.trailColor,In=Lt.trailWidth,dn=Lt.transition,xn=(0,wt.Z)(Lt,Ve);delete xn.gapPosition;var fn=Array.isArray(we)?we:[we],$n=Array.isArray(st)?st:[st],gn=We(),hn=zt/2,Yt=100-zt/2,Mn="M ".concat(Tt==="round"?hn:0,",").concat(hn,`
|
|
|
L `).concat(Tt==="round"?Yt:100,",").concat(hn),pn="0 0 100 ".concat(zt),On=0;return te.createElement("svg",(0,et.Z)({className:nt()("".concat($e,"-line"),Nt),viewBox:pn,preserveAspectRatio:"none",style:on},xn),te.createElement("path",{className:"".concat($e,"-line-trail"),d:Mn,strokeLinecap:Tt,stroke:Dn,strokeWidth:In||zt,fillOpacity:"0"}),fn.map(function(Gn,Zn){var Bn=1;switch(Tt){case"round":Bn=1-zt/100;break;case"square":Bn=1-zt/2/100;break;default:Bn=1;break}var Xn={strokeDasharray:"".concat(Gn*Bn,"px, 100px"),strokeDashoffset:"-".concat(On,"px"),transition:dn||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Nn=$n[Zn]||$n[$n.length-1];return On+=Gn,te.createElement("path",{key:Zn,className:"".concat($e,"-line-path"),d:Mn,strokeLinecap:Tt,stroke:Nn,strokeWidth:zt,fillOpacity:"0",ref:function(qn){gn[Zn]=qn},style:Xn})}))},pt=Ne,It=ie(43749),Ot=ie(72190),gt=ie(47273),ct=0,yt=(0,gt.Z)();function Ke(){var Pe;return yt?(Pe=ct,ct+=1):Pe="TEST_OR_SSR",Pe}var Bt=function(Pe){var Qe=te.useState(),Lt=(0,Ot.Z)(Qe,2),Nt=Lt[0],we=Lt[1];return te.useEffect(function(){we("rc_progress_".concat(Ke()))},[]),Pe||Nt},Fe=function(Qe){var Lt=Qe.bg,Nt=Qe.children;return te.createElement("div",{style:{width:"100%",height:"100%",background:Lt}},Nt)};function _e(Pe,Qe){return Object.keys(Pe).map(function(Lt){var Nt=parseFloat(Lt),we="".concat(Math.floor(Nt*Qe),"%");return"".concat(Pe[Lt]," ").concat(we)})}var ft=te.forwardRef(function(Pe,Qe){var Lt=Pe.prefixCls,Nt=Pe.color,we=Pe.gradientId,$e=Pe.radius,st=Pe.style,Tt=Pe.ptg,zt=Pe.strokeLinecap,on=Pe.strokeWidth,Dn=Pe.size,In=Pe.gapDegree,dn=Nt&&(0,It.Z)(Nt)==="object",xn=dn?"#FFF":void 0,fn=Dn/2,$n=te.createElement("circle",{className:"".concat(Lt,"-circle-path"),r:$e,cx:fn,cy:fn,stroke:xn,strokeLinecap:zt,strokeWidth:on,opacity:Tt===0?0:1,style:st,ref:Qe});if(!dn)return $n;var gn="".concat(we,"-conic"),hn=In?"".concat(180+In/2,"deg"):"0deg",Yt=_e(Nt,(360-In)/360),Mn=_e(Nt,1),pn="conic-gradient(from ".concat(hn,", ").concat(Yt.join(", "),")"),On="linear-gradient(to ".concat(In?"bottom":"top",", ").concat(Mn.join(", "),")");return te.createElement(te.Fragment,null,te.createElement("mask",{id:gn},$n),te.createElement("foreignObject",{x:0,y:0,width:Dn,height:Dn,mask:"url(#".concat(gn,")")},te.createElement(Fe,{bg:On},te.createElement(Fe,{bg:pn}))))}),Re=ft,lt=100,ot=function(Qe,Lt,Nt,we,$e,st,Tt,zt,on,Dn){var In=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,dn=Nt/100*360*((360-st)/360),xn=st===0?0:{bottom:0,top:180,left:90,right:-90}[Tt],fn=(100-we)/100*Lt;on==="round"&&we!==100&&(fn+=Dn/2,fn>=Lt&&(fn=Lt-.01));var $n=lt/2;return{stroke:typeof zt=="string"?zt:void 0,strokeDasharray:"".concat(Lt,"px ").concat(Qe),strokeDashoffset:fn+In,transform:"rotate(".concat($e+dn+xn,"deg)"),transformOrigin:"".concat($n,"px ").concat($n,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},pe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function St(Pe){var Qe=Pe!=null?Pe:[];return Array.isArray(Qe)?Qe:[Qe]}var ke=function(Qe){var Lt=(0,xe.Z)((0,xe.Z)({},rt),Qe),Nt=Lt.id,we=Lt.prefixCls,$e=Lt.steps,st=Lt.strokeWidth,Tt=Lt.trailWidth,zt=Lt.gapDegree,on=zt===void 0?0:zt,Dn=Lt.gapPosition,In=Lt.trailColor,dn=Lt.strokeLinecap,xn=Lt.style,fn=Lt.className,$n=Lt.strokeColor,gn=Lt.percent,hn=(0,wt.Z)(Lt,pe),Yt=lt/2,Mn=Bt(Nt),pn="".concat(Mn,"-gradient"),On=Yt-st/2,Gn=Math.PI*2*On,Zn=on>0?90+on/2:-90,Bn=Gn*((360-on)/360),Xn=(0,It.Z)($e)==="object"?$e:{count:$e,gap:2},Nn=Xn.count,ar=Xn.gap,qn=St(gn),Et=St($n),Ut=Et.find(function(ye){return ye&&(0,It.Z)(ye)==="object"}),zn=Ut&&(0,It.Z)(Ut)==="object",nr=zn?"butt":dn,De=ot(Gn,Bn,0,100,Zn,on,Dn,In,nr,st),Ue=We(),ge=function(){var Le=0;return qn.map(function(me,Be){var Ze=Et[Be]||Et[Et.length-1],qe=ot(Gn,Bn,Le,me,Zn,on,Dn,Ze,nr,st);return Le+=me,te.createElement(Re,{key:Be,color:Ze,ptg:me,radius:On,prefixCls:we,gradientId:pn,style:qe,strokeLinecap:nr,strokeWidth:st,gapDegree:on,ref:function(Oe){Ue[Be]=Oe},size:lt})}).reverse()},Me=function(){var Le=Math.round(Nn*(qn[0]/100)),me=100/Nn,Be=0;return new Array(Nn).fill(null).map(function(Ze,qe){var je=qe<=Le-1?Et[0]:In,Oe=je&&(0,It.Z)(je)==="object"?"url(#".concat(pn,")"):void 0,Te=ot(Gn,Bn,Be,me,Zn,on,Dn,je,"butt",st,ar);return Be+=(Bn-Te.strokeDashoffset+ar)*100/Bn,te.createElement("circle",{key:qe,className:"".concat(we,"-circle-path"),r:On,cx:Yt,cy:Yt,stroke:Oe,strokeWidth:st,opacity:1,style:Te,ref:function($t){Ue[qe]=$t}})})};return te.createElement("svg",(0,et.Z)({className:nt()("".concat(we,"-circle"),fn),viewBox:"0 0 ".concat(lt," ").concat(lt),style:xn,id:Nt,role:"presentation"},hn),!Nn&&te.createElement("circle",{className:"".concat(we,"-circle-trail"),r:On,cx:Yt,cy:Yt,stroke:In,strokeLinecap:nr,strokeWidth:Tt||st,style:De}),Nn?Me():ge())},Ct=ke,qt={Line:pt,Circle:Ct},Ce=ie(25399),de=ie(68361);function mt(Pe){return!Pe||Pe<0?0:Pe>100?100:Pe}function en(Pe){let{success:Qe,successPercent:Lt}=Pe,Nt=Lt;return Qe&&"progress"in Qe&&(Nt=Qe.progress),Qe&&"percent"in Qe&&(Nt=Qe.percent),Nt}const Mt=Pe=>{let{percent:Qe,success:Lt,successPercent:Nt}=Pe;const we=mt(en({success:Lt,successPercent:Nt}));return[we,mt(mt(Qe)-we)]},ze=Pe=>{let{success:Qe={},strokeColor:Lt}=Pe;const{strokeColor:Nt}=Qe;return[Nt||de.presetPrimaryColors.green,Lt||null]},dt=(Pe,Qe,Lt)=>{var Nt,we,$e,st;let Tt=-1,zt=-1;if(Qe==="step"){const on=Lt.steps,Dn=Lt.strokeWidth;typeof Pe=="string"||typeof Pe=="undefined"?(Tt=Pe==="small"?2:14,zt=Dn!=null?Dn:8):typeof Pe=="number"?[Tt,zt]=[Pe,Pe]:[Tt=14,zt=8]=Array.isArray(Pe)?Pe:[Pe.width,Pe.height],Tt*=on}else if(Qe==="line"){const on=Lt==null?void 0:Lt.strokeWidth;typeof Pe=="string"||typeof Pe=="undefined"?zt=on||(Pe==="small"?6:8):typeof Pe=="number"?[Tt,zt]=[Pe,Pe]:[Tt=-1,zt=8]=Array.isArray(Pe)?Pe:[Pe.width,Pe.height]}else(Qe==="circle"||Qe==="dashboard")&&(typeof Pe=="string"||typeof Pe=="undefined"?[Tt,zt]=Pe==="small"?[60,60]:[120,120]:typeof Pe=="number"?[Tt,zt]=[Pe,Pe]:Array.isArray(Pe)&&(Tt=(we=(Nt=Pe[0])!==null&&Nt!==void 0?Nt:Pe[1])!==null&&we!==void 0?we:120,zt=(st=($e=Pe[0])!==null&&$e!==void 0?$e:Pe[1])!==null&&st!==void 0?st:120));return[Tt,zt]},bt=3,un=Pe=>bt/Pe*100;var sn=Pe=>{const{prefixCls:Qe,trailColor:Lt=null,strokeLinecap:Nt="round",gapPosition:we,gapDegree:$e,width:st=120,type:Tt,children:zt,success:on,size:Dn=st,steps:In}=Pe,[dn,xn]=dt(Dn,"circle");let{strokeWidth:fn}=Pe;fn===void 0&&(fn=Math.max(un(dn),6));const $n={width:dn,height:xn,fontSize:dn*.15+6},gn=te.useMemo(()=>{if($e||$e===0)return $e;if(Tt==="dashboard")return 75},[$e,Tt]),hn=Mt(Pe),Yt=we||Tt==="dashboard"&&"bottom"||void 0,Mn=Object.prototype.toString.call(Pe.strokeColor)==="[object Object]",pn=ze({success:on,strokeColor:Pe.strokeColor}),On=nt()(`${Qe}-inner`,{[`${Qe}-circle-gradient`]:Mn}),Gn=te.createElement(Ct,{steps:In,percent:In?hn[1]:hn,strokeWidth:fn,trailWidth:fn,strokeColor:In?pn[1]:pn,strokeLinecap:Nt,trailColor:Lt,prefixCls:Qe,gapDegree:gn,gapPosition:Yt}),Zn=dn<=20,Bn=te.createElement("div",{className:On,style:$n},Gn,!Zn&&zt);return Zn?te.createElement(Ce.Z,{title:zt},Bn):Bn},it=ie(36237),_t=ie(63356),ht=ie(16931),se=ie(51636);const ee="--progress-line-stroke-color",z="--progress-percent",oe=Pe=>{const Qe=Pe?"100%":"-100%";return new it.Keyframes(`antProgress${Pe?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Qe}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Qe}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},le=Pe=>{const{componentCls:Qe,iconCls:Lt}=Pe;return{[Qe]:Object.assign(Object.assign({},(0,_t.Wf)(Pe)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Pe.fontSize},[`${Qe}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Qe}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:Pe.remainingColor,borderRadius:Pe.lineBorderRadius},[`${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.defaultColor}},[`${Qe}-success-bg, ${Qe}-bg`]:{position:"relative",background:Pe.defaultColor,borderRadius:Pe.lineBorderRadius,transition:`all ${Pe.motionDurationSlow} ${Pe.motionEaseInOutCirc}`},[`${Qe}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Qe}-text`]:{width:"max-content",marginInlineStart:0,marginTop:Pe.marginXXS}},[`${Qe}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${ee})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${Qe}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Qe}-text-inner`]:{color:Pe.colorWhite,[`&${Qe}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Qe}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Pe.colorSuccess},[`${Qe}-text`]:{display:"inline-block",marginInlineStart:Pe.marginXS,color:Pe.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Lt]:{fontSize:Pe.fontSize},[`&${Qe}-text-outer`]:{width:"max-content"},[`&${Qe}-text-outer${Qe}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:Pe.marginXS}},[`${Qe}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,it.unit)(Pe.paddingXXS)}`,[`&${Qe}-text-start`]:{justifyContent:"start"},[`&${Qe}-text-end`]:{justifyContent:"end"}},[`&${Qe}-status-active`]:{[`${Qe}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Pe.colorBgContainer,borderRadius:Pe.lineBorderRadius,opacity:0,animationName:oe(),animationDuration:Pe.progressActiveMotionDuration,animationTimingFunction:Pe.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Qe}-rtl${Qe}-status-active`]:{[`${Qe}-bg::before`]:{animationName:oe(!0)}},[`&${Qe}-status-exception`]:{[`${Qe}-bg`]:{backgroundColor:Pe.colorError},[`${Qe}-text`]:{color:Pe.colorError}},[`&${Qe}-status-exception ${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.colorError}},[`&${Qe}-status-success`]:{[`${Qe}-bg`]:{backgroundColor:Pe.colorSuccess},[`${Qe}-text`]:{color:Pe.colorSuccess}},[`&${Qe}-status-success ${Qe}-inner:not(${Qe}-circle-gradient)`]:{[`${Qe}-circle-path`]:{stroke:Pe.colorSuccess}}})}},re=Pe=>{const{componentCls:Qe,iconCls:Lt}=Pe;return{[Qe]:{[`${Qe}-circle-trail`]:{stroke:Pe.remainingColor},[`&${Qe}-circle ${Qe}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Qe}-circle ${Qe}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Pe.circleTextColor,fontSize:Pe.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Lt]:{fontSize:Pe.circleIconFontSize}},[`${Qe}-circle&-status-exception`]:{[`${Qe}-text`]:{color:Pe.colorError}},[`${Qe}-circle&-status-success`]:{[`${Qe}-text`]:{color:Pe.colorSuccess}}},[`${Qe}-inline-circle`]:{lineHeight:1,[`${Qe}-inner`]:{verticalAlign:"bottom"}}}},Ee=Pe=>{const{componentCls:Qe}=Pe;return{[Qe]:{[`${Qe}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Pe.progressStepMinWidth,marginInlineEnd:Pe.progressStepMarginInlineEnd,backgroundColor:Pe.remainingColor,transition:`all ${Pe.motionDurationSlow}`,"&-active":{backgroundColor:Pe.defaultColor}}}}}},at=Pe=>{const{componentCls:Qe,iconCls:Lt}=Pe;return{[Qe]:{[`${Qe}-small&-line, ${Qe}-small&-line ${Qe}-text ${Lt}`]:{fontSize:Pe.fontSizeSM}}}},Ht=Pe=>({circleTextColor:Pe.colorText,defaultColor:Pe.colorInfo,remainingColor:Pe.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${Pe.fontSize/Pe.fontSizeSM}em`});var Ye=(0,ht.I$)("Progress",Pe=>{const Qe=Pe.calc(Pe.marginXXS).div(2).equal(),Lt=(0,se.mergeToken)(Pe,{progressStepMarginInlineEnd:Qe,progressStepMinWidth:Qe,progressActiveMotionDuration:"2.4s"});return[le(Lt),re(Lt),Ee(Lt),at(Lt)]},Ht),tt=function(Pe,Qe){var Lt={};for(var Nt in Pe)Object.prototype.hasOwnProperty.call(Pe,Nt)&&Qe.indexOf(Nt)<0&&(Lt[Nt]=Pe[Nt]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,Nt=Object.getOwnPropertySymbols(Pe);we<Nt.length;we++)Qe.indexOf(Nt[we])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Nt[we])&&(Lt[Nt[we]]=Pe[Nt[we]]);return Lt};const vt=Pe=>{let Qe=[];return Object.keys(Pe).forEach(Lt=>{const Nt=parseFloat(Lt.replace(/%/g,""));Number.isNaN(Nt)||Qe.push({key:Nt,value:Pe[Lt]})}),Qe=Qe.sort((Lt,Nt)=>Lt.key-Nt.key),Qe.map(Lt=>{let{key:Nt,value:we}=Lt;return`${we} ${Nt}%`}).join(", ")},Rt=(Pe,Qe)=>{const{from:Lt=de.presetPrimaryColors.blue,to:Nt=de.presetPrimaryColors.blue,direction:we=Qe==="rtl"?"to left":"to right"}=Pe,$e=tt(Pe,["from","to","direction"]);if(Object.keys($e).length!==0){const Tt=vt($e),zt=`linear-gradient(${we}, ${Tt})`;return{background:zt,[ee]:zt}}const st=`linear-gradient(${we}, ${Lt}, ${Nt})`;return{background:st,[ee]:st}};var Jt=Pe=>{const{prefixCls:Qe,direction:Lt,percent:Nt,size:we,strokeWidth:$e,strokeColor:st,strokeLinecap:Tt="round",children:zt,trailColor:on=null,percentPosition:Dn,success:In}=Pe,{align:dn,type:xn}=Dn,fn=st&&typeof st!="string"?Rt(st,Lt):{[ee]:st,background:st},$n=Tt==="square"||Tt==="butt"?0:void 0,gn=we!=null?we:[-1,$e||(we==="small"?6:8)],[hn,Yt]=dt(gn,"line",{strokeWidth:$e}),Mn={backgroundColor:on||void 0,borderRadius:$n},pn=Object.assign(Object.assign({width:`${mt(Nt)}%`,height:Yt,borderRadius:$n},fn),{[z]:mt(Nt)/100}),On=en(Pe),Gn={width:`${mt(On)}%`,height:Yt,borderRadius:$n,backgroundColor:In==null?void 0:In.strokeColor},Zn={width:hn<0?"100%":hn},Bn=te.createElement("div",{className:`${Qe}-inner`,style:Mn},te.createElement("div",{className:nt()(`${Qe}-bg`,`${Qe}-bg-${xn}`),style:pn},xn==="inner"&&zt),On!==void 0&&te.createElement("div",{className:`${Qe}-success-bg`,style:Gn})),Xn=xn==="outer"&&dn==="start",Nn=xn==="outer"&&dn==="end";return xn==="outer"&&dn==="center"?te.createElement("div",{className:`${Qe}-layout-bottom`},Bn,zt):te.createElement("div",{className:`${Qe}-outer`,style:Zn},Xn&&zt,Bn,Nn&&zt)},Zt=Pe=>{const{size:Qe,steps:Lt,rounding:Nt=Math.round,percent:we=0,strokeWidth:$e=8,strokeColor:st,trailColor:Tt=null,prefixCls:zt,children:on}=Pe,Dn=Nt(Lt*(we/100)),In=Qe==="small"?2:14,dn=Qe!=null?Qe:[In,$e],[xn,fn]=dt(dn,"step",{steps:Lt,strokeWidth:$e}),$n=xn/Lt,gn=Array.from({length:Lt});for(let hn=0;hn<Lt;hn++){const Yt=Array.isArray(st)?st[hn]:st;gn[hn]=te.createElement("div",{key:hn,className:nt()(`${zt}-steps-item`,{[`${zt}-steps-item-active`]:hn<=Dn-1}),style:{backgroundColor:hn<=Dn-1?Yt:Tt,width:$n,height:fn}})}return te.createElement("div",{className:`${zt}-steps-outer`},gn,on)},En=function(Pe,Qe){var Lt={};for(var Nt in Pe)Object.prototype.hasOwnProperty.call(Pe,Nt)&&Qe.indexOf(Nt)<0&&(Lt[Nt]=Pe[Nt]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,Nt=Object.getOwnPropertySymbols(Pe);we<Nt.length;we++)Qe.indexOf(Nt[we])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Nt[we])&&(Lt[Nt[we]]=Pe[Nt[we]]);return Lt};const cn=null,wn=["normal","exception","active","success"];var Pn=te.forwardRef((Pe,Qe)=>{const{prefixCls:Lt,className:Nt,rootClassName:we,steps:$e,strokeColor:st,percent:Tt=0,size:zt="default",showInfo:on=!0,type:Dn="line",status:In,format:dn,style:xn,percentPosition:fn={}}=Pe,$n=En(Pe,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:gn="end",type:hn="outer"}=fn,Yt=Array.isArray(st)?st[0]:st,Mn=typeof st=="string"||Array.isArray(st)?st:void 0,pn=te.useMemo(()=>{if(Yt){const ge=typeof Yt=="string"?Yt:Object.values(Yt)[0];return new ut.FastColor(ge).isLight()}return!1},[st]),On=te.useMemo(()=>{var ge,Me;const ye=en(Pe);return parseInt(ye!==void 0?(ge=ye!=null?ye:0)===null||ge===void 0?void 0:ge.toString():(Me=Tt!=null?Tt:0)===null||Me===void 0?void 0:Me.toString(),10)},[Tt,Pe.success,Pe.successPercent]),Gn=te.useMemo(()=>!wn.includes(In)&&On>=100?"success":In||"normal",[In,On]),{getPrefixCls:Zn,direction:Bn,progress:Xn}=te.useContext(fe.E_),Nn=Zn("progress",Lt),[ar,qn,Et]=Ye(Nn),Ut=Dn==="line",zn=Ut&&!$e,nr=te.useMemo(()=>{if(!on)return null;const ge=en(Pe);let Me;const ye=dn||(me=>`${me}%`),Le=Ut&&pn&&hn==="inner";return hn==="inner"||dn||Gn!=="exception"&&Gn!=="success"?Me=ye(mt(Tt),mt(ge)):Gn==="exception"?Me=Ut?te.createElement(be.Z,null):te.createElement(Se.Z,null):Gn==="success"&&(Me=Ut?te.createElement(ve.Z,null):te.createElement(Je.Z,null)),te.createElement("span",{className:nt()(`${Nn}-text`,{[`${Nn}-text-bright`]:Le,[`${Nn}-text-${gn}`]:zn,[`${Nn}-text-${hn}`]:zn}),title:typeof Me=="string"?Me:void 0},Me)},[on,Tt,On,Gn,Dn,Nn,dn]);let De;Dn==="line"?De=$e?te.createElement(Zt,Object.assign({},Pe,{strokeColor:Mn,prefixCls:Nn,steps:typeof $e=="object"?$e.count:$e}),nr):te.createElement(Jt,Object.assign({},Pe,{strokeColor:Yt,prefixCls:Nn,direction:Bn,percentPosition:{align:gn,type:hn}}),nr):(Dn==="circle"||Dn==="dashboard")&&(De=te.createElement(sn,Object.assign({},Pe,{strokeColor:Yt,prefixCls:Nn,progressStatus:Gn}),nr));const Ue=nt()(Nn,`${Nn}-status-${Gn}`,{[`${Nn}-${Dn==="dashboard"&&"circle"||Dn}`]:Dn!=="line",[`${Nn}-inline-circle`]:Dn==="circle"&&dt(zt,"circle")[0]<=20,[`${Nn}-line`]:zn,[`${Nn}-line-align-${gn}`]:zn,[`${Nn}-line-position-${hn}`]:zn,[`${Nn}-steps`]:$e,[`${Nn}-show-info`]:on,[`${Nn}-${zt}`]:typeof zt=="string",[`${Nn}-rtl`]:Bn==="rtl"},Xn==null?void 0:Xn.className,Nt,we,qn,Et);return ar(te.createElement("div",Object.assign({ref:Qe,style:Object.assign(Object.assign({},Xn==null?void 0:Xn.style),xn),className:Ue,role:"progressbar","aria-valuenow":On,"aria-valuemin":0,"aria-valuemax":100},(0,Ie.Z)($n,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),De))}),Qt=Pn},82326:function(rn,jt,ie){"use strict";var te=ie(59301),ut=ie(92310),ve=ie.n(ut),Je=ie(37463),be=ie(2738),Se=ie(75030),He=ie(86641),nt=ie(45915),Ie=ie(82855),fe=ie(48755),et=ie(38406),xe=ie(2171),wt=ie(83397),rt=ie(31756),We=ie(56553),Ve=ie(24971),Ne=ie(70045),pt=ie(57700),It=ie(1722),Ot=ie(90376),gt=ie(68525),ct=ie(90005),yt=function(ft,Re){var lt={};for(var ot in ft)Object.prototype.hasOwnProperty.call(ft,ot)&&Re.indexOf(ot)<0&&(lt[ot]=ft[ot]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,ot=Object.getOwnPropertySymbols(ft);pe<ot.length;pe++)Re.indexOf(ot[pe])<0&&Object.prototype.propertyIsEnumerable.call(ft,ot[pe])&&(lt[ot[pe]]=ft[ot[pe]]);return lt};const Ke="SECRET_COMBOBOX_MODE_DO_NOT_USE",Bt=(ft,Re)=>{var lt;const{prefixCls:ot,bordered:pe,className:St,rootClassName:ke,getPopupContainer:Ct,popupClassName:qt,dropdownClassName:Ce,listHeight:de=256,placement:mt,listItemHeight:en,size:Mt,disabled:ze,notFoundContent:dt,status:bt,builtinPlacements:un,dropdownMatchSelectWidth:At,popupMatchSelectWidth:sn,direction:it,style:_t,allowClear:ht,variant:se,dropdownStyle:ee,transitionName:z,tagRender:oe,maxCount:le,prefix:re}=ft,Ee=yt(ft,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:at,getPrefixCls:Ht,renderEmpty:Ye,direction:tt,virtual:vt,popupMatchSelectWidth:Rt,popupOverflow:Dt}=te.useContext(fe.E_),Jt=(0,fe.dj)("select"),[,Xt]=(0,pt.ZP)(),Zt=en!=null?en:Xt==null?void 0:Xt.controlHeight,En=Ht("select",ot),cn=Ht(),wn=it!=null?it:tt,{compactSize:kt,compactItemClassnames:Pn}=(0,Ne.ri)(En,wn),[Qt,Pe]=(0,Ve.Z)("select",se,pe),Qe=(0,wt.Z)(En),[Lt,Nt,we]=(0,Ot.Z)(En,Qe),$e=te.useMemo(()=>{const{mode:qn}=ft;if(qn!=="combobox")return qn===Ke?"combobox":qn},[ft.mode]),st=$e==="multiple"||$e==="tags",Tt=(0,ct.Z)(ft.suffixIcon,ft.showArrow),zt=(lt=sn!=null?sn:At)!==null&<!==void 0?lt:Rt,{status:on,hasFeedback:Dn,isFormItemInput:In,feedbackIcon:dn}=te.useContext(We.aM),xn=(0,Ie.F)(on,bt);let fn;dt!==void 0?fn=dt:$e==="combobox"?fn=null:fn=(Ye==null?void 0:Ye("Select"))||te.createElement(et.Z,{componentName:"Select"});const{suffixIcon:$n,itemIcon:gn,removeIcon:hn,clearIcon:Yt}=(0,gt.Z)(Object.assign(Object.assign({},Ee),{multiple:st,hasFeedback:Dn,feedbackIcon:dn,showSuffixIcon:Tt,prefixCls:En,componentName:"Select"})),Mn=ht===!0?{clearIcon:Yt}:ht,pn=(0,be.Z)(Ee,["suffixIcon","itemIcon"]),On=ve()(qt||Ce,{[`${En}-dropdown-${wn}`]:wn==="rtl"},ke,we,Qe,Nt),Gn=(0,rt.Z)(qn=>{var Et;return(Et=Mt!=null?Mt:kt)!==null&&Et!==void 0?Et:qn}),Zn=te.useContext(xe.Z),Bn=ze!=null?ze:Zn,Xn=ve()({[`${En}-lg`]:Gn==="large",[`${En}-sm`]:Gn==="small",[`${En}-rtl`]:wn==="rtl",[`${En}-${Qt}`]:Pe,[`${En}-in-form-item`]:In},(0,Ie.Z)(En,xn,Dn),Pn,Jt.className,St,ke,we,Qe,Nt),Nn=te.useMemo(()=>mt!==void 0?mt:wn==="rtl"?"bottomRight":"bottomLeft",[mt,wn]),[ar]=(0,Se.Cn)("SelectLike",ee==null?void 0:ee.zIndex);return Lt(te.createElement(Je.ZP,Object.assign({ref:Re,virtual:vt,showSearch:Jt.showSearch},pn,{style:Object.assign(Object.assign({},Jt.style),_t),dropdownMatchSelectWidth:zt,transitionName:(0,He.m)(cn,"slide-up",z),builtinPlacements:(0,It.Z)(un,Dt),listHeight:de,listItemHeight:Zt,mode:$e,prefixCls:En,placement:Nn,direction:wn,prefix:re,suffixIcon:$n,menuItemSelectedIcon:gn,removeIcon:hn,allowClear:Mn,notFoundContent:fn,className:Xn,getPopupContainer:Ct||at,dropdownClassName:On,disabled:Bn,dropdownStyle:Object.assign(Object.assign({},ee),{zIndex:ar}),maxCount:st?le:void 0,tagRender:st?oe:void 0})))},Fe=te.forwardRef(Bt),_e=(0,nt.Z)(Fe,"dropdownAlign");Fe.SECRET_COMBOBOX_MODE_DO_NOT_USE=Ke,Fe.Option=Je.Wx,Fe.OptGroup=Je.Xo,Fe._InternalPanelDoNotUseOrYouWillBeFired=_e,jt.default=Fe},1722:function(rn,jt){"use strict";const ie=ut=>{const Je={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ut==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},Je),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Je),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Je),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Je),{points:["br","tr"],offset:[0,-4]})}};function te(ut,ve){return ut||ie(ve)}jt.Z=te},90376:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return ot}});var te=ie(63356),ut=ie(56119),ve=ie(16931),Je=ie(51636),be=ie(46e3),Se=ie(93873);const He=pe=>{const{optionHeight:St,optionFontSize:ke,optionLineHeight:Ct,optionPadding:qt}=pe;return{position:"relative",display:"block",minHeight:St,padding:qt,color:pe.colorText,fontWeight:"normal",fontSize:ke,lineHeight:Ct,boxSizing:"border-box"}};var Ie=pe=>{const{antCls:St,componentCls:ke}=pe,Ct=`${ke}-item`,qt=`&${St}-slide-up-enter${St}-slide-up-enter-active`,Ce=`&${St}-slide-up-appear${St}-slide-up-appear-active`,de=`&${St}-slide-up-leave${St}-slide-up-leave-active`,mt=`${ke}-dropdown-placement-`,en=`${Ct}-option-selected`;return[{[`${ke}-dropdown`]:Object.assign(Object.assign({},(0,te.Wf)(pe)),{position:"absolute",top:-9999,zIndex:pe.zIndexPopup,boxSizing:"border-box",padding:pe.paddingXXS,overflow:"hidden",fontSize:pe.fontSize,fontVariant:"initial",backgroundColor:pe.colorBgElevated,borderRadius:pe.borderRadiusLG,outline:"none",boxShadow:pe.boxShadowSecondary,[`
|
|
|
${qt}${mt}bottomLeft,
|
|
|
${Ce}${mt}bottomLeft
|
|
|
`]:{animationName:be.fJ},[`
|
|
|
${qt}${mt}topLeft,
|
|
|
${Ce}${mt}topLeft,
|
|
|
${qt}${mt}topRight,
|
|
|
${Ce}${mt}topRight
|
|
|
`]:{animationName:be.Qt},[`${de}${mt}bottomLeft`]:{animationName:be.Uw},[`
|
|
|
${de}${mt}topLeft,
|
|
|
${de}${mt}topRight
|
|
|
`]:{animationName:be.ly},"&-hidden":{display:"none"},[Ct]:Object.assign(Object.assign({},He(pe)),{cursor:"pointer",transition:`background ${pe.motionDurationSlow} ease`,borderRadius:pe.borderRadiusSM,"&-group":{color:pe.colorTextDescription,fontSize:pe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},te.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ct}-option-disabled)`]:{backgroundColor:pe.optionActiveBg},[`&-selected:not(${Ct}-option-disabled)`]:{color:pe.optionSelectedColor,fontWeight:pe.optionSelectedFontWeight,backgroundColor:pe.optionSelectedBg,[`${Ct}-option-state`]:{color:pe.colorPrimary}},"&-disabled":{[`&${Ct}-option-selected`]:{backgroundColor:pe.colorBgContainerDisabled},color:pe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:pe.calc(pe.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},He(pe)),{color:pe.colorTextDisabled})}),[`${en}:has(+ ${en})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${en}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,be.oN)(pe,"slide-up"),(0,be.oN)(pe,"slide-down"),(0,Se.Fm)(pe,"move-up"),(0,Se.Fm)(pe,"move-down")]},fe=ie(26743),et=ie(36237);function xe(pe,St){const{componentCls:ke,inputPaddingHorizontalBase:Ct,borderRadius:qt}=pe,Ce=pe.calc(pe.controlHeight).sub(pe.calc(pe.lineWidth).mul(2)).equal(),de=St?`${ke}-${St}`:"";return{[`${ke}-single${de}`]:{fontSize:pe.fontSize,height:pe.controlHeight,[`${ke}-selector`]:Object.assign(Object.assign({},(0,te.Wf)(pe,!0)),{display:"flex",borderRadius:qt,flex:"1 1 auto",[`${ke}-selection-wrap:after`]:{lineHeight:(0,et.unit)(Ce)},[`${ke}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
|
${ke}-selection-item,
|
|
|
${ke}-selection-placeholder
|
|
|
`]:{display:"block",padding:0,lineHeight:(0,et.unit)(Ce),transition:`all ${pe.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${ke}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ke}-selection-item:empty:after`,`${ke}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${ke}-show-arrow ${ke}-selection-item,
|
|
|
&${ke}-show-arrow ${ke}-selection-search,
|
|
|
&${ke}-show-arrow ${ke}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:pe.showArrowPaddingInlineEnd},[`&${ke}-open ${ke}-selection-item`]:{color:pe.colorTextPlaceholder},[`&:not(${ke}-customize-input)`]:{[`${ke}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,et.unit)(Ct)}`,[`${ke}-selection-search-input`]:{height:Ce,fontSize:pe.fontSize},"&:after":{lineHeight:(0,et.unit)(Ce)}}},[`&${ke}-customize-input`]:{[`${ke}-selector`]:{"&:after":{display:"none"},[`${ke}-selection-search`]:{position:"static",width:"100%"},[`${ke}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,et.unit)(Ct)}`,"&:after":{display:"none"}}}}}}}function wt(pe){const{componentCls:St}=pe,ke=pe.calc(pe.controlPaddingHorizontalSM).sub(pe.lineWidth).equal();return[xe(pe),xe((0,Je.mergeToken)(pe,{controlHeight:pe.controlHeightSM,borderRadius:pe.borderRadiusSM}),"sm"),{[`${St}-single${St}-sm`]:{[`&:not(${St}-customize-input)`]:{[`${St}-selector`]:{padding:`0 ${(0,et.unit)(ke)}`},[`&${St}-show-arrow ${St}-selection-search`]:{insetInlineEnd:pe.calc(ke).add(pe.calc(pe.fontSize).mul(1.5)).equal()},[`
|
|
|
&${St}-show-arrow ${St}-selection-item,
|
|
|
&${St}-show-arrow ${St}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:pe.calc(pe.fontSize).mul(1.5).equal()}}}},xe((0,Je.mergeToken)(pe,{controlHeight:pe.singleItemHeightLG,fontSize:pe.fontSizeLG,borderRadius:pe.borderRadiusLG}),"lg")]}const rt=pe=>{const{fontSize:St,lineHeight:ke,lineWidth:Ct,controlHeight:qt,controlHeightSM:Ce,controlHeightLG:de,paddingXXS:mt,controlPaddingHorizontal:en,zIndexPopupBase:Mt,colorText:ze,fontWeightStrong:dt,controlItemBgActive:bt,controlItemBgHover:un,colorBgContainer:At,colorFillSecondary:sn,colorBgContainerDisabled:it,colorTextDisabled:_t,colorPrimaryHover:ht,colorPrimary:se,controlOutline:ee}=pe,z=mt*2,oe=Ct*2,le=Math.min(qt-z,qt-oe),re=Math.min(Ce-z,Ce-oe),Ee=Math.min(de-z,de-oe);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(mt/2),zIndexPopup:Mt+50,optionSelectedColor:ze,optionSelectedFontWeight:dt,optionSelectedBg:bt,optionActiveBg:un,optionPadding:`${(qt-St*ke)/2}px ${en}px`,optionFontSize:St,optionLineHeight:ke,optionHeight:qt,selectorBg:At,clearBg:At,singleItemHeightLG:de,multipleItemBg:sn,multipleItemBorderColor:"transparent",multipleItemHeight:le,multipleItemHeightSM:re,multipleItemHeightLG:Ee,multipleSelectorBgDisabled:it,multipleItemColorDisabled:_t,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(pe.fontSize*1.25),hoverBorderColor:ht,activeBorderColor:se,activeOutlineColor:ee,selectAffixPadding:mt}},We=(pe,St)=>{const{componentCls:ke,antCls:Ct,controlOutlineWidth:qt}=pe;return{[`&:not(${ke}-customize-input) ${ke}-selector`]:{border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} ${St.borderColor}`,background:pe.selectorBg},[`&:not(${ke}-disabled):not(${ke}-customize-input):not(${Ct}-pagination-size-changer)`]:{[`&:hover ${ke}-selector`]:{borderColor:St.hoverBorderHover},[`${ke}-focused& ${ke}-selector`]:{borderColor:St.activeBorderColor,boxShadow:`0 0 0 ${(0,et.unit)(qt)} ${St.activeOutlineColor}`,outline:0},[`${ke}-prefix`]:{color:St.color}}}},Ve=(pe,St)=>({[`&${pe.componentCls}-status-${St.status}`]:Object.assign({},We(pe,St))}),Ne=pe=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},We(pe,{borderColor:pe.colorBorder,hoverBorderHover:pe.hoverBorderColor,activeBorderColor:pe.activeBorderColor,activeOutlineColor:pe.activeOutlineColor,color:pe.colorText})),Ve(pe,{status:"error",borderColor:pe.colorError,hoverBorderHover:pe.colorErrorHover,activeBorderColor:pe.colorError,activeOutlineColor:pe.colorErrorOutline,color:pe.colorError})),Ve(pe,{status:"warning",borderColor:pe.colorWarning,hoverBorderHover:pe.colorWarningHover,activeBorderColor:pe.colorWarning,activeOutlineColor:pe.colorWarningOutline,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{background:pe.colorBgContainerDisabled,color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`}})}),pt=(pe,St)=>{const{componentCls:ke,antCls:Ct}=pe;return{[`&:not(${ke}-customize-input) ${ke}-selector`]:{background:St.bg,border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} transparent`,color:St.color},[`&:not(${ke}-disabled):not(${ke}-customize-input):not(${Ct}-pagination-size-changer)`]:{[`&:hover ${ke}-selector`]:{background:St.hoverBg},[`${ke}-focused& ${ke}-selector`]:{background:pe.selectorBg,borderColor:St.activeBorderColor,outline:0}}}},It=(pe,St)=>({[`&${pe.componentCls}-status-${St.status}`]:Object.assign({},pt(pe,St))}),Ot=pe=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},pt(pe,{bg:pe.colorFillTertiary,hoverBg:pe.colorFillSecondary,activeBorderColor:pe.activeBorderColor,color:pe.colorText})),It(pe,{status:"error",bg:pe.colorErrorBg,hoverBg:pe.colorErrorBgHover,activeBorderColor:pe.colorError,color:pe.colorError})),It(pe,{status:"warning",bg:pe.colorWarningBg,hoverBg:pe.colorWarningBgHover,activeBorderColor:pe.colorWarning,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{borderColor:pe.colorBorder,background:pe.colorBgContainerDisabled,color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.colorBgContainer,border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} ${pe.colorSplit}`}})}),gt=pe=>({"&-borderless":{[`${pe.componentCls}-selector`]:{background:"transparent",border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} transparent`},[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`},[`&${pe.componentCls}-status-error`]:{[`${pe.componentCls}-prefix, ${pe.componentCls}-selection-item`]:{color:pe.colorError}},[`&${pe.componentCls}-status-warning`]:{[`${pe.componentCls}-prefix, ${pe.componentCls}-selection-item`]:{color:pe.colorWarning}}}}),ct=(pe,St)=>{const{componentCls:ke,antCls:Ct}=pe;return{[`&:not(${ke}-customize-input) ${ke}-selector`]:{borderWidth:`0 0 ${(0,et.unit)(pe.lineWidth)} 0`,borderStyle:`none none ${pe.lineType} none`,borderColor:St.borderColor,background:pe.selectorBg,borderRadius:0},[`&:not(${ke}-disabled):not(${ke}-customize-input):not(${Ct}-pagination-size-changer)`]:{[`&:hover ${ke}-selector`]:{borderColor:St.hoverBorderHover},[`${ke}-focused& ${ke}-selector`]:{borderColor:St.activeBorderColor,outline:0},[`${ke}-prefix`]:{color:St.color}}}},yt=(pe,St)=>({[`&${pe.componentCls}-status-${St.status}`]:Object.assign({},ct(pe,St))}),Ke=pe=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},ct(pe,{borderColor:pe.colorBorder,hoverBorderHover:pe.hoverBorderColor,activeBorderColor:pe.activeBorderColor,activeOutlineColor:pe.activeOutlineColor,color:pe.colorText})),yt(pe,{status:"error",borderColor:pe.colorError,hoverBorderHover:pe.colorErrorHover,activeBorderColor:pe.colorError,activeOutlineColor:pe.colorErrorOutline,color:pe.colorError})),yt(pe,{status:"warning",borderColor:pe.colorWarning,hoverBorderHover:pe.colorWarningHover,activeBorderColor:pe.colorWarning,activeOutlineColor:pe.colorWarningOutline,color:pe.colorWarning})),{[`&${pe.componentCls}-disabled`]:{[`&:not(${pe.componentCls}-customize-input) ${pe.componentCls}-selector`]:{color:pe.colorTextDisabled}},[`&${pe.componentCls}-multiple ${pe.componentCls}-selection-item`]:{background:pe.multipleItemBg,border:`${(0,et.unit)(pe.lineWidth)} ${pe.lineType} ${pe.multipleItemBorderColor}`}})});var Fe=pe=>({[pe.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Ne(pe)),Ot(pe)),gt(pe)),Ke(pe))});const _e=pe=>{const{componentCls:St}=pe;return{position:"relative",transition:`all ${pe.motionDurationMid} ${pe.motionEaseInOut}`,input:{cursor:"pointer"},[`${St}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${St}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},ft=pe=>{const{componentCls:St}=pe;return{[`${St}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Re=pe=>{const{antCls:St,componentCls:ke,inputPaddingHorizontalBase:Ct,iconCls:qt}=pe;return{[ke]:Object.assign(Object.assign({},(0,te.Wf)(pe)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${ke}-customize-input) ${ke}-selector`]:Object.assign(Object.assign({},_e(pe)),ft(pe)),[`${ke}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},te.vS),{[`> ${St}-typography`]:{display:"inline"}}),[`${ke}-selection-placeholder`]:Object.assign(Object.assign({},te.vS),{flex:1,color:pe.colorTextPlaceholder,pointerEvents:"none"}),[`${ke}-arrow`]:Object.assign(Object.assign({},(0,te.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ct,height:pe.fontSizeIcon,marginTop:pe.calc(pe.fontSizeIcon).mul(-1).div(2).equal(),color:pe.colorTextQuaternary,fontSize:pe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${pe.motionDurationSlow} ease`,[qt]:{verticalAlign:"top",transition:`transform ${pe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ke}-suffix)`]:{pointerEvents:"auto"}},[`${ke}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ke}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${ke}-prefix`]:{flex:"none",marginInlineEnd:pe.selectAffixPadding},[`${ke}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ct,zIndex:1,display:"inline-block",width:pe.fontSizeIcon,height:pe.fontSizeIcon,marginTop:pe.calc(pe.fontSizeIcon).mul(-1).div(2).equal(),color:pe.colorTextQuaternary,fontSize:pe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${pe.motionDurationMid} ease, opacity ${pe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:pe.colorTextTertiary}},[`&:hover ${ke}-clear`]:{opacity:1,background:pe.colorBgBase,borderRadius:"50%"}}),[`${ke}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${ke}-has-feedback`]:{[`${ke}-clear`]:{insetInlineEnd:pe.calc(Ct).add(pe.fontSize).add(pe.paddingXS).equal()}}}}}},lt=pe=>{const{componentCls:St}=pe;return[{[St]:{[`&${St}-in-form-item`]:{width:"100%"}}},Re(pe),wt(pe),(0,fe.ZP)(pe),Ie(pe),{[`${St}-rtl`]:{direction:"rtl"}},(0,ut.c)(pe,{borderElCls:`${St}-selector`,focusElCls:`${St}-focused`})]};var ot=(0,ve.I$)("Select",(pe,St)=>{let{rootPrefixCls:ke}=St;const Ct=(0,Je.mergeToken)(pe,{rootPrefixCls:ke,inputPaddingHorizontalBase:pe.calc(pe.paddingSM).sub(1).equal(),multipleSelectItemHeight:pe.multipleItemHeight,selectHeight:pe.controlHeight});return[lt(Ct),Fe(Ct)]},rt,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(rn,jt,ie){"use strict";ie.d(jt,{_z:function(){return Se},gp:function(){return Je}});var te=ie(36237),ut=ie(63356),ve=ie(51636);const Je=fe=>{const{multipleSelectItemHeight:et,paddingXXS:xe,lineWidth:wt,INTERNAL_FIXED_ITEM_MARGIN:rt}=fe,We=fe.max(fe.calc(xe).sub(wt).equal(),0),Ve=fe.max(fe.calc(We).sub(rt).equal(),0);return{basePadding:We,containerPadding:Ve,itemHeight:(0,te.unit)(et),itemLineHeight:(0,te.unit)(fe.calc(et).sub(fe.calc(fe.lineWidth).mul(2)).equal())}},be=fe=>{const{multipleSelectItemHeight:et,selectHeight:xe,lineWidth:wt}=fe;return fe.calc(xe).sub(et).div(2).sub(wt).equal()},Se=fe=>{const{componentCls:et,iconCls:xe,borderRadiusSM:wt,motionDurationSlow:rt,paddingXS:We,multipleItemColorDisabled:Ve,multipleItemBorderColorDisabled:Ne,colorIcon:pt,colorIconHover:It,INTERNAL_FIXED_ITEM_MARGIN:Ot}=fe;return{[`${et}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${et}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:Ot,borderRadius:wt,cursor:"default",transition:`font-size ${rt}, line-height ${rt}, height ${rt}`,marginInlineEnd:fe.calc(Ot).mul(2).equal(),paddingInlineStart:We,paddingInlineEnd:fe.calc(We).div(2).equal(),[`${et}-disabled&`]:{color:Ve,borderColor:Ne,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:fe.calc(We).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ut.Ro)()),{display:"inline-flex",alignItems:"center",color:pt,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${xe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:It}})}}}},He=(fe,et)=>{const{componentCls:xe,INTERNAL_FIXED_ITEM_MARGIN:wt}=fe,rt=`${xe}-selection-overflow`,We=fe.multipleSelectItemHeight,Ve=be(fe),Ne=et?`${xe}-${et}`:"",pt=Je(fe);return{[`${xe}-multiple${Ne}`]:Object.assign(Object.assign({},Se(fe)),{[`${xe}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:pt.basePadding,paddingBlock:pt.containerPadding,borderRadius:fe.borderRadius,[`${xe}-disabled&`]:{background:fe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,te.unit)(wt)} 0`,lineHeight:(0,te.unit)(We),visibility:"hidden",content:'"\\a0"'}},[`${xe}-selection-item`]:{height:pt.itemHeight,lineHeight:(0,te.unit)(pt.itemLineHeight)},[`${xe}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,te.unit)(We),marginBlock:wt}},[`${xe}-prefix`]:{marginInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(pt.basePadding).equal()},[`${rt}-item + ${rt}-item,
|
|
|
${xe}-prefix + ${xe}-selection-wrap
|
|
|
`]:{[`${xe}-selection-search`]:{marginInlineStart:0},[`${xe}-selection-placeholder`]:{insetInlineStart:0}},[`${rt}-item-suffix`]:{minHeight:pt.itemHeight,marginBlock:wt},[`${xe}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(Ve).equal(),"\n &-input,\n &-mirror\n ":{height:We,fontFamily:fe.fontFamily,lineHeight:(0,te.unit)(We),transition:`all ${fe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${xe}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:fe.calc(fe.inputPaddingHorizontalBase).sub(pt.basePadding).equal(),insetInlineEnd:fe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${fe.motionDurationSlow}`}})}};function nt(fe,et){const{componentCls:xe}=fe,wt=et?`${xe}-${et}`:"",rt={[`${xe}-multiple${wt}`]:{fontSize:fe.fontSize,[`${xe}-selector`]:{[`${xe}-show-search&`]:{cursor:"text"}},[`
|
|
|
&${xe}-show-arrow ${xe}-selector,
|
|
|
&${xe}-allow-clear ${xe}-selector
|
|
|
`]:{paddingInlineEnd:fe.calc(fe.fontSizeIcon).add(fe.controlPaddingHorizontal).equal()}}};return[He(fe,et),rt]}const Ie=fe=>{const{componentCls:et}=fe,xe=(0,ve.mergeToken)(fe,{selectHeight:fe.controlHeightSM,multipleSelectItemHeight:fe.multipleItemHeightSM,borderRadius:fe.borderRadiusSM,borderRadiusSM:fe.borderRadiusXS}),wt=(0,ve.mergeToken)(fe,{fontSize:fe.fontSizeLG,selectHeight:fe.controlHeightLG,multipleSelectItemHeight:fe.multipleItemHeightLG,borderRadius:fe.borderRadiusLG,borderRadiusSM:fe.borderRadius});return[nt(fe),nt(xe,"sm"),{[`${et}-multiple${et}-sm`]:{[`${et}-selection-placeholder`]:{insetInline:fe.calc(fe.controlPaddingHorizontalSM).sub(fe.lineWidth).equal()},[`${et}-selection-search`]:{marginInlineStart:2}}},nt(wt,"lg")]};jt.ZP=Ie},68525:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});var te=ie(59301),ut=ie(40001),ve=ie(19248),Je=ie(99267),be=ie(84105),Se=ie(58617),He=ie(47472);function nt(Ie){let{suffixIcon:fe,clearIcon:et,menuItemSelectedIcon:xe,removeIcon:wt,loading:rt,multiple:We,hasFeedback:Ve,prefixCls:Ne,showSuffixIcon:pt,feedbackIcon:It,showArrow:Ot,componentName:gt}=Ie;const ct=et!=null?et:te.createElement(ve.Z,null),yt=_e=>fe===null&&!Ve&&!Ot?null:te.createElement(te.Fragment,null,pt!==!1&&_e,Ve&&It);let Ke=null;if(fe!==void 0)Ke=yt(fe);else if(rt)Ke=yt(te.createElement(Se.Z,{spin:!0}));else{const _e=`${Ne}-suffix`;Ke=ft=>{let{open:Re,showSearch:lt}=ft;return yt(Re&<?te.createElement(He.Z,{className:_e}):te.createElement(be.Z,{className:_e}))}}let Bt=null;xe!==void 0?Bt=xe:We?Bt=te.createElement(ut.Z,null):Bt=null;let Fe=null;return wt!==void 0?Fe=wt:Fe=te.createElement(Je.Z,null),{clearIcon:ct,suffixIcon:Ke,itemIcon:Bt,removeIcon:Fe}}},90005:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return te}});function te(ut,ve){return ve!==void 0?ve:ut!==null}},58755:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return St}});var te=ie(59301),ut=ie(58617),ve=ie(92310),Je=ie.n(ve),be=ie(60499),Se=ie(18642),He=ie(72190),nt=ie(42244),Ie=ie(18929),fe=ie(10228),et=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],xe=te.forwardRef(function(ke,Ct){var qt,Ce=ke.prefixCls,de=Ce===void 0?"rc-switch":Ce,mt=ke.className,en=ke.checked,Mt=ke.defaultChecked,ze=ke.disabled,dt=ke.loadingIcon,bt=ke.checkedChildren,un=ke.unCheckedChildren,At=ke.onClick,sn=ke.onChange,it=ke.onKeyDown,_t=(0,nt.Z)(ke,et),ht=(0,Ie.Z)(!1,{value:en,defaultValue:Mt}),se=(0,He.Z)(ht,2),ee=se[0],z=se[1];function oe(at,Ht){var Ye=ee;return ze||(Ye=at,z(Ye),sn==null||sn(Ye,Ht)),Ye}function le(at){at.which===fe.Z.LEFT?oe(!1,at):at.which===fe.Z.RIGHT&&oe(!0,at),it==null||it(at)}function re(at){var Ht=oe(!ee,at);At==null||At(Ht,at)}var Ee=Je()(de,mt,(qt={},(0,Se.Z)(qt,"".concat(de,"-checked"),ee),(0,Se.Z)(qt,"".concat(de,"-disabled"),ze),qt));return te.createElement("button",(0,be.Z)({},_t,{type:"button",role:"switch","aria-checked":ee,disabled:ze,className:Ee,ref:Ct,onKeyDown:le,onClick:re}),dt,te.createElement("span",{className:"".concat(de,"-inner")},te.createElement("span",{className:"".concat(de,"-inner-checked")},bt),te.createElement("span",{className:"".concat(de,"-inner-unchecked")},un)))});xe.displayName="Switch";var wt=xe,rt=ie(12919),We=ie(48755),Ve=ie(2171),Ne=ie(31756),pt=ie(36237),It=ie(17835),Ot=ie(63356),gt=ie(16931),ct=ie(51636);const yt=ke=>{const{componentCls:Ct,trackHeightSM:qt,trackPadding:Ce,trackMinWidthSM:de,innerMinMarginSM:mt,innerMaxMarginSM:en,handleSizeSM:Mt,calc:ze}=ke,dt=`${Ct}-inner`,bt=(0,pt.unit)(ze(Mt).add(ze(Ce).mul(2)).equal()),un=(0,pt.unit)(ze(en).mul(2).equal());return{[Ct]:{[`&${Ct}-small`]:{minWidth:de,height:qt,lineHeight:(0,pt.unit)(qt),[`${Ct}-inner`]:{paddingInlineStart:en,paddingInlineEnd:mt,[`${dt}-checked, ${dt}-unchecked`]:{minHeight:qt},[`${dt}-checked`]:{marginInlineStart:`calc(-100% + ${bt} - ${un})`,marginInlineEnd:`calc(100% - ${bt} + ${un})`},[`${dt}-unchecked`]:{marginTop:ze(qt).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${Ct}-handle`]:{width:Mt,height:Mt},[`${Ct}-loading-icon`]:{top:ze(ze(Mt).sub(ke.switchLoadingIconSize)).div(2).equal(),fontSize:ke.switchLoadingIconSize},[`&${Ct}-checked`]:{[`${Ct}-inner`]:{paddingInlineStart:mt,paddingInlineEnd:en,[`${dt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${dt}-unchecked`]:{marginInlineStart:`calc(100% - ${bt} + ${un})`,marginInlineEnd:`calc(-100% + ${bt} - ${un})`}},[`${Ct}-handle`]:{insetInlineStart:`calc(100% - ${(0,pt.unit)(ze(Mt).add(Ce).equal())})`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${dt}`]:{[`${dt}-unchecked`]:{marginInlineStart:ze(ke.marginXXS).div(2).equal(),marginInlineEnd:ze(ke.marginXXS).mul(-1).div(2).equal()}},[`&${Ct}-checked ${dt}`]:{[`${dt}-checked`]:{marginInlineStart:ze(ke.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:ze(ke.marginXXS).div(2).equal()}}}}}}},Ke=ke=>{const{componentCls:Ct,handleSize:qt,calc:Ce}=ke;return{[Ct]:{[`${Ct}-loading-icon${ke.iconCls}`]:{position:"relative",top:Ce(Ce(qt).sub(ke.fontSize)).div(2).equal(),color:ke.switchLoadingIconColor,verticalAlign:"top"},[`&${Ct}-checked ${Ct}-loading-icon`]:{color:ke.switchColor}}}},Bt=ke=>{const{componentCls:Ct,trackPadding:qt,handleBg:Ce,handleShadow:de,handleSize:mt,calc:en}=ke,Mt=`${Ct}-handle`;return{[Ct]:{[Mt]:{position:"absolute",top:qt,insetInlineStart:qt,width:mt,height:mt,transition:`all ${ke.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Ce,borderRadius:en(mt).div(2).equal(),boxShadow:de,transition:`all ${ke.switchDuration} ease-in-out`,content:'""'}},[`&${Ct}-checked ${Mt}`]:{insetInlineStart:`calc(100% - ${(0,pt.unit)(en(mt).add(qt).equal())})`},[`&:not(${Ct}-disabled):active`]:{[`${Mt}::before`]:{insetInlineEnd:ke.switchHandleActiveInset,insetInlineStart:0},[`&${Ct}-checked ${Mt}::before`]:{insetInlineEnd:0,insetInlineStart:ke.switchHandleActiveInset}}}}},Fe=ke=>{const{componentCls:Ct,trackHeight:qt,trackPadding:Ce,innerMinMargin:de,innerMaxMargin:mt,handleSize:en,calc:Mt}=ke,ze=`${Ct}-inner`,dt=(0,pt.unit)(Mt(en).add(Mt(Ce).mul(2)).equal()),bt=(0,pt.unit)(Mt(mt).mul(2).equal());return{[Ct]:{[ze]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:mt,paddingInlineEnd:de,transition:`padding-inline-start ${ke.switchDuration} ease-in-out, padding-inline-end ${ke.switchDuration} ease-in-out`,[`${ze}-checked, ${ze}-unchecked`]:{display:"block",color:ke.colorTextLightSolid,fontSize:ke.fontSizeSM,transition:`margin-inline-start ${ke.switchDuration} ease-in-out, margin-inline-end ${ke.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:qt},[`${ze}-checked`]:{marginInlineStart:`calc(-100% + ${dt} - ${bt})`,marginInlineEnd:`calc(100% - ${dt} + ${bt})`},[`${ze}-unchecked`]:{marginTop:Mt(qt).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${Ct}-checked ${ze}`]:{paddingInlineStart:de,paddingInlineEnd:mt,[`${ze}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ze}-unchecked`]:{marginInlineStart:`calc(100% - ${dt} + ${bt})`,marginInlineEnd:`calc(-100% + ${dt} - ${bt})`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${ze}`]:{[`${ze}-unchecked`]:{marginInlineStart:Mt(Ce).mul(2).equal(),marginInlineEnd:Mt(Ce).mul(-1).mul(2).equal()}},[`&${Ct}-checked ${ze}`]:{[`${ze}-checked`]:{marginInlineStart:Mt(Ce).mul(-1).mul(2).equal(),marginInlineEnd:Mt(Ce).mul(2).equal()}}}}}},_e=ke=>{const{componentCls:Ct,trackHeight:qt,trackMinWidth:Ce}=ke;return{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ot.Wf)(ke)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ce,height:qt,lineHeight:(0,pt.unit)(qt),verticalAlign:"middle",background:ke.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ke.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ct}-disabled)`]:{background:ke.colorTextTertiary}}),(0,Ot.Qy)(ke)),{[`&${Ct}-checked`]:{background:ke.switchColor,[`&:hover:not(${Ct}-disabled)`]:{background:ke.colorPrimaryHover}},[`&${Ct}-loading, &${Ct}-disabled`]:{cursor:"not-allowed",opacity:ke.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ct}-rtl`]:{direction:"rtl"}})}},ft=ke=>{const{fontSize:Ct,lineHeight:qt,controlHeight:Ce,colorWhite:de}=ke,mt=Ct*qt,en=Ce/2,Mt=2,ze=mt-Mt*2,dt=en-Mt*2;return{trackHeight:mt,trackHeightSM:en,trackMinWidth:ze*2+Mt*4,trackMinWidthSM:dt*2+Mt*2,trackPadding:Mt,handleBg:de,handleSize:ze,handleSizeSM:dt,handleShadow:`0 2px 4px 0 ${new It.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:ze/2,innerMaxMargin:ze+Mt+Mt*2,innerMinMarginSM:dt/2,innerMaxMarginSM:dt+Mt+Mt*2}};var Re=(0,gt.I$)("Switch",ke=>{const Ct=(0,ct.mergeToken)(ke,{switchDuration:ke.motionDurationMid,switchColor:ke.colorPrimary,switchDisabledOpacity:ke.opacityLoading,switchLoadingIconSize:ke.calc(ke.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${ke.opacityLoading})`,switchHandleActiveInset:"-30%"});return[_e(Ct),Fe(Ct),Bt(Ct),Ke(Ct),yt(Ct)]},ft),lt=function(ke,Ct){var qt={};for(var Ce in ke)Object.prototype.hasOwnProperty.call(ke,Ce)&&Ct.indexOf(Ce)<0&&(qt[Ce]=ke[Ce]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,Ce=Object.getOwnPropertySymbols(ke);de<Ce.length;de++)Ct.indexOf(Ce[de])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ce[de])&&(qt[Ce[de]]=ke[Ce[de]]);return qt};const pe=te.forwardRef((ke,Ct)=>{const{prefixCls:qt,size:Ce,disabled:de,loading:mt,className:en,rootClassName:Mt,style:ze,checked:dt,value:bt,defaultChecked:un,defaultValue:At,onChange:sn}=ke,it=lt(ke,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[_t,ht]=(0,Ie.Z)(!1,{value:dt!=null?dt:bt,defaultValue:un!=null?un:At}),{getPrefixCls:se,direction:ee,switch:z}=te.useContext(We.E_),oe=te.useContext(Ve.Z),le=(de!=null?de:oe)||mt,re=se("switch",qt),Ee=te.createElement("div",{className:`${re}-handle`},mt&&te.createElement(ut.Z,{className:`${re}-loading-icon`})),[at,Ht,Ye]=Re(re),tt=(0,Ne.Z)(Ce),vt=Je()(z==null?void 0:z.className,{[`${re}-small`]:tt==="small",[`${re}-loading`]:mt,[`${re}-rtl`]:ee==="rtl"},en,Mt,Ht,Ye),Rt=Object.assign(Object.assign({},z==null?void 0:z.style),ze),Dt=function(){ht(arguments.length<=0?void 0:arguments[0]),sn==null||sn.apply(void 0,arguments)};return at(te.createElement(rt.Z,{component:"Switch"},te.createElement(wt,Object.assign({},it,{checked:_t,onChange:Dt,prefixCls:re,className:vt,style:Rt,disabled:le,ref:Ct,loadingIcon:Ee}))))});pe.__ANT_SWITCH=!0;var St=pe},94968:function(rn,jt,ie){"use strict";ie.d(jt,{default:function(){return Le}});var te=ie(59301),ut=ie(77654),ve=ie(4676),Je=ie(92310),be=ie.n(Je),Se=ie(60499),He=ie(38705),nt=ie(17212),Ie=ie(15793),fe=ie(39153),et=ie(55401),xe=ie(18642),wt=ie(85899),rt=ie(42244),We=ie(43749),Ve=ie(73001),Ne=ie(11576),pt=ie(26112),It=ie(48736),Ot=function(me,Be){if(me&&Be){var Ze=Array.isArray(Be)?Be:Be.split(","),qe=me.name||"",je=me.type||"",Oe=je.replace(/\/.*$/,"");return Ze.some(function(Te){var Ge=Te.trim();if(/^\*(\/\*)?$/.test(Te))return!0;if(Ge.charAt(0)==="."){var $t=qe.toLowerCase(),Ft=Ge.toLowerCase(),Wt=[Ft];return(Ft===".jpg"||Ft===".jpeg")&&(Wt=[".jpg",".jpeg"]),Wt.some(function(kn){return $t.endsWith(kn)})}return/\/\*$/.test(Ge)?Oe===Ge.replace(/\/.*$/,""):je===Ge?!0:/^\w+$/.test(Ge)?((0,It.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Ge,"'.Skip for check.")),!0):!1})}return!0};function gt(me,Be){var Ze="cannot ".concat(me.method," ").concat(me.action," ").concat(Be.status,"'"),qe=new Error(Ze);return qe.status=Be.status,qe.method=me.method,qe.url=me.action,qe}function ct(me){var Be=me.responseText||me.response;if(!Be)return Be;try{return JSON.parse(Be)}catch(Ze){return Be}}function yt(me){var Be=new XMLHttpRequest;me.onProgress&&Be.upload&&(Be.upload.onprogress=function(Oe){Oe.total>0&&(Oe.percent=Oe.loaded/Oe.total*100),me.onProgress(Oe)});var Ze=new FormData;me.data&&Object.keys(me.data).forEach(function(je){var Oe=me.data[je];if(Array.isArray(Oe)){Oe.forEach(function(Te){Ze.append("".concat(je,"[]"),Te)});return}Ze.append(je,Oe)}),me.file instanceof Blob?Ze.append(me.filename,me.file,me.file.name):Ze.append(me.filename,me.file),Be.onerror=function(Oe){me.onError(Oe)},Be.onload=function(){return Be.status<200||Be.status>=300?me.onError(gt(me,Be),ct(Be)):me.onSuccess(ct(Be),Be)},Be.open(me.method,me.action,!0),me.withCredentials&&"withCredentials"in Be&&(Be.withCredentials=!0);var qe=me.headers||{};return qe["X-Requested-With"]!==null&&Be.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(qe).forEach(function(je){qe[je]!==null&&Be.setRequestHeader(je,qe[je])}),Be.send(Ze),{abort:function(){Be.abort()}}}var Ke=function(){var me=(0,Ne.Z)((0,Ve.Z)().mark(function Be(Ze,qe){var je,Oe,Te,Ge,$t,Ft,Wt,kn;return(0,Ve.Z)().wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:Ft=function(){return Ft=(0,Ne.Z)((0,Ve.Z)().mark(function mn(Cn){return(0,Ve.Z)().wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.abrupt("return",new Promise(function(Vn){Cn.file(function(Kn){qe(Kn)?(Cn.fullPath&&!Kn.webkitRelativePath&&(Object.defineProperties(Kn,{webkitRelativePath:{writable:!0}}),Kn.webkitRelativePath=Cn.fullPath.replace(/^\//,""),Object.defineProperties(Kn,{webkitRelativePath:{writable:!1}})),Vn(Kn)):Vn(null)})}));case 1:case"end":return Yn.stop()}},mn)})),Ft.apply(this,arguments)},$t=function(mn){return Ft.apply(this,arguments)},Ge=function(){return Ge=(0,Ne.Z)((0,Ve.Z)().mark(function mn(Cn){var Fn,Yn,Vn,Kn,vn;return(0,Ve.Z)().wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:Fn=Cn.createReader(),Yn=[];case 2:return Wn.next=5,new Promise(function(dr){Fn.readEntries(dr,function(){return dr([])})});case 5:if(Vn=Wn.sent,Kn=Vn.length,Kn){Wn.next=9;break}return Wn.abrupt("break",12);case 9:for(vn=0;vn<Kn;vn++)Yn.push(Vn[vn]);Wn.next=2;break;case 12:return Wn.abrupt("return",Yn);case 13:case"end":return Wn.stop()}},mn)})),Ge.apply(this,arguments)},Te=function(mn){return Ge.apply(this,arguments)},je=[],Oe=[],Ze.forEach(function(Sn){return Oe.push(Sn.webkitGetAsEntry())}),Wt=function(){var Sn=(0,Ne.Z)((0,Ve.Z)().mark(function mn(Cn,Fn){var Yn,Vn;return(0,Ve.Z)().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(Cn){vn.next=2;break}return vn.abrupt("return");case 2:if(Cn.path=Fn||"",!Cn.isFile){vn.next=10;break}return vn.next=6,$t(Cn);case 6:Yn=vn.sent,Yn&&je.push(Yn),vn.next=15;break;case 10:if(!Cn.isDirectory){vn.next=15;break}return vn.next=13,Te(Cn);case 13:Vn=vn.sent,Oe.push.apply(Oe,(0,ut.Z)(Vn));case 15:case"end":return vn.stop()}},mn)}));return function(Cn,Fn){return Sn.apply(this,arguments)}}(),kn=0;case 9:if(!(kn<Oe.length)){Hn.next=15;break}return Hn.next=12,Wt(Oe[kn]);case 12:kn++,Hn.next=9;break;case 15:return Hn.abrupt("return",je);case 16:case"end":return Hn.stop()}},Be)}));return function(Ze,qe){return me.apply(this,arguments)}}(),Bt=Ke,Fe=+new Date,_e=0;function ft(){return"rc-upload-".concat(Fe,"-").concat(++_e)}var Re=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],lt=function(me){(0,fe.Z)(Ze,me);var Be=(0,et.Z)(Ze);function Ze(){var qe;(0,He.Z)(this,Ze);for(var je=arguments.length,Oe=new Array(je),Te=0;Te<je;Te++)Oe[Te]=arguments[Te];return qe=Be.call.apply(Be,[this].concat(Oe)),(0,xe.Z)((0,Ie.Z)(qe),"state",{uid:ft()}),(0,xe.Z)((0,Ie.Z)(qe),"reqs",{}),(0,xe.Z)((0,Ie.Z)(qe),"fileInput",void 0),(0,xe.Z)((0,Ie.Z)(qe),"_isMounted",void 0),(0,xe.Z)((0,Ie.Z)(qe),"onChange",function(Ge){var $t=qe.props,Ft=$t.accept,Wt=$t.directory,kn=Ge.target.files,Tn=(0,ut.Z)(kn).filter(function(Hn){return!Wt||Ot(Hn,Ft)});qe.uploadFiles(Tn),qe.reset()}),(0,xe.Z)((0,Ie.Z)(qe),"onClick",function(Ge){var $t=qe.fileInput;if($t){var Ft=Ge.target,Wt=qe.props.onClick;if(Ft&&Ft.tagName==="BUTTON"){var kn=$t.parentNode;kn.focus(),Ft.blur()}$t.click(),Wt&&Wt(Ge)}}),(0,xe.Z)((0,Ie.Z)(qe),"onKeyDown",function(Ge){Ge.key==="Enter"&&qe.onClick(Ge)}),(0,xe.Z)((0,Ie.Z)(qe),"onFileDrop",function(){var Ge=(0,Ne.Z)((0,Ve.Z)().mark(function $t(Ft){var Wt,kn,Tn;return(0,Ve.Z)().wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:if(Wt=qe.props.multiple,Ft.preventDefault(),Ft.type!=="dragover"){Sn.next=4;break}return Sn.abrupt("return");case 4:if(!qe.props.directory){Sn.next=11;break}return Sn.next=7,Bt(Array.prototype.slice.call(Ft.dataTransfer.items),function(mn){return Ot(mn,qe.props.accept)});case 7:kn=Sn.sent,qe.uploadFiles(kn),Sn.next=14;break;case 11:Tn=(0,ut.Z)(Ft.dataTransfer.files).filter(function(mn){return Ot(mn,qe.props.accept)}),Wt===!1&&(Tn=Tn.slice(0,1)),qe.uploadFiles(Tn);case 14:case"end":return Sn.stop()}},$t)}));return function($t){return Ge.apply(this,arguments)}}()),(0,xe.Z)((0,Ie.Z)(qe),"uploadFiles",function(Ge){var $t=(0,ut.Z)(Ge),Ft=$t.map(function(Wt){return Wt.uid=ft(),qe.processFile(Wt,$t)});Promise.all(Ft).then(function(Wt){var kn=qe.props.onBatchStart;kn==null||kn(Wt.map(function(Tn){var Hn=Tn.origin,Sn=Tn.parsedFile;return{file:Hn,parsedFile:Sn}})),Wt.filter(function(Tn){return Tn.parsedFile!==null}).forEach(function(Tn){qe.post(Tn)})})}),(0,xe.Z)((0,Ie.Z)(qe),"processFile",function(){var Ge=(0,Ne.Z)((0,Ve.Z)().mark(function $t(Ft,Wt){var kn,Tn,Hn,Sn,mn,Cn,Fn,Yn,Vn;return(0,Ve.Z)().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(kn=qe.props.beforeUpload,Tn=Ft,!kn){vn.next=14;break}return vn.prev=3,vn.next=6,kn(Ft,Wt);case 6:Tn=vn.sent,vn.next=12;break;case 9:vn.prev=9,vn.t0=vn.catch(3),Tn=!1;case 12:if(Tn!==!1){vn.next=14;break}return vn.abrupt("return",{origin:Ft,parsedFile:null,action:null,data:null});case 14:if(Hn=qe.props.action,typeof Hn!="function"){vn.next=21;break}return vn.next=18,Hn(Ft);case 18:Sn=vn.sent,vn.next=22;break;case 21:Sn=Hn;case 22:if(mn=qe.props.data,typeof mn!="function"){vn.next=29;break}return vn.next=26,mn(Ft);case 26:Cn=vn.sent,vn.next=30;break;case 29:Cn=mn;case 30:return Fn=((0,We.Z)(Tn)==="object"||typeof Tn=="string")&&Tn?Tn:Ft,Fn instanceof File?Yn=Fn:Yn=new File([Fn],Ft.name,{type:Ft.type}),Vn=Yn,Vn.uid=Ft.uid,vn.abrupt("return",{origin:Ft,data:Cn,parsedFile:Vn,action:Sn});case 35:case"end":return vn.stop()}},$t,null,[[3,9]])}));return function($t,Ft){return Ge.apply(this,arguments)}}()),(0,xe.Z)((0,Ie.Z)(qe),"saveFileInput",function(Ge){qe.fileInput=Ge}),qe}return(0,nt.Z)(Ze,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(je){var Oe=this,Te=je.data,Ge=je.origin,$t=je.action,Ft=je.parsedFile;if(this._isMounted){var Wt=this.props,kn=Wt.onStart,Tn=Wt.customRequest,Hn=Wt.name,Sn=Wt.headers,mn=Wt.withCredentials,Cn=Wt.method,Fn=Ge.uid,Yn=Tn||yt,Vn={action:$t,filename:Hn,data:Te,file:Ft,headers:Sn,withCredentials:mn,method:Cn||"post",onProgress:function(vn){var er=Oe.props.onProgress;er==null||er(vn,Ft)},onSuccess:function(vn,er){var Wn=Oe.props.onSuccess;Wn==null||Wn(vn,Ft,er),delete Oe.reqs[Fn]},onError:function(vn,er){var Wn=Oe.props.onError;Wn==null||Wn(vn,er,Ft),delete Oe.reqs[Fn]}};kn(Ge),this.reqs[Fn]=Yn(Vn)}}},{key:"reset",value:function(){this.setState({uid:ft()})}},{key:"abort",value:function(je){var Oe=this.reqs;if(je){var Te=je.uid?je.uid:je;Oe[Te]&&Oe[Te].abort&&Oe[Te].abort(),delete Oe[Te]}else Object.keys(Oe).forEach(function(Ge){Oe[Ge]&&Oe[Ge].abort&&Oe[Ge].abort(),delete Oe[Ge]})}},{key:"render",value:function(){var je=this.props,Oe=je.component,Te=je.prefixCls,Ge=je.className,$t=je.classNames,Ft=$t===void 0?{}:$t,Wt=je.disabled,kn=je.id,Tn=je.name,Hn=je.style,Sn=je.styles,mn=Sn===void 0?{}:Sn,Cn=je.multiple,Fn=je.accept,Yn=je.capture,Vn=je.children,Kn=je.directory,vn=je.openFileDialogOnClick,er=je.onMouseEnter,Wn=je.onMouseLeave,dr=je.hasControlInside,pr=(0,rt.Z)(je,Re),lr=be()((0,xe.Z)((0,xe.Z)((0,xe.Z)({},Te,!0),"".concat(Te,"-disabled"),Wt),Ge,Ge)),ur=Kn?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},yr=Wt?{}:{onClick:vn?this.onClick:function(){},onKeyDown:vn?this.onKeyDown:function(){},onMouseEnter:er,onMouseLeave:Wn,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:dr?void 0:"0"};return te.createElement(Oe,(0,Se.Z)({},yr,{className:lr,role:dr?void 0:"button",style:Hn}),te.createElement("input",(0,Se.Z)({},(0,pt.Z)(pr,{aria:!0,data:!0}),{id:kn,name:Tn,disabled:Wt,type:"file",ref:this.saveFileInput,onClick:function(fr){return fr.stopPropagation()},key:this.state.uid,style:(0,wt.Z)({display:"none"},mn.input),className:Ft.input,accept:Fn},ur,{multiple:Cn,onChange:this.onChange},Yn!=null?{capture:Yn}:{})),Vn)}}]),Ze}(te.Component),ot=lt;function pe(){}var St=function(me){(0,fe.Z)(Ze,me);var Be=(0,et.Z)(Ze);function Ze(){var qe;(0,He.Z)(this,Ze);for(var je=arguments.length,Oe=new Array(je),Te=0;Te<je;Te++)Oe[Te]=arguments[Te];return qe=Be.call.apply(Be,[this].concat(Oe)),(0,xe.Z)((0,Ie.Z)(qe),"uploader",void 0),(0,xe.Z)((0,Ie.Z)(qe),"saveUploader",function(Ge){qe.uploader=Ge}),qe}return(0,nt.Z)(Ze,[{key:"abort",value:function(je){this.uploader.abort(je)}},{key:"render",value:function(){return te.createElement(ot,(0,Se.Z)({},this.props,{ref:this.saveUploader}))}}]),Ze}(te.Component);(0,xe.Z)(St,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:pe,onError:pe,onSuccess:pe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ke=St,Ct=ke,qt=ie(18929),Ce=ie(48755),de=ie(2171),mt=ie(9017),en=ie(85981),Mt=ie(63356),ze=ie(34961),dt=ie(16931),bt=ie(51636),un=ie(36237),sn=me=>{const{componentCls:Be,iconCls:Ze}=me;return{[`${Be}-wrapper`]:{[`${Be}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:me.colorFillAlter,border:`${(0,un.unit)(me.lineWidth)} dashed ${me.colorBorder}`,borderRadius:me.borderRadiusLG,cursor:"pointer",transition:`border-color ${me.motionDurationSlow}`,[Be]:{padding:me.padding},[`${Be}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:me.borderRadiusLG,"&:focus-visible":{outline:`${(0,un.unit)(me.lineWidthFocus)} solid ${me.colorPrimaryBorder}`}},[`${Be}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
|
&:not(${Be}-disabled):hover,
|
|
|
&-hover:not(${Be}-disabled)
|
|
|
`]:{borderColor:me.colorPrimaryHover},[`p${Be}-drag-icon`]:{marginBottom:me.margin,[Ze]:{color:me.colorPrimary,fontSize:me.uploadThumbnailSize}},[`p${Be}-text`]:{margin:`0 0 ${(0,un.unit)(me.marginXXS)}`,color:me.colorTextHeading,fontSize:me.fontSizeLG},[`p${Be}-hint`]:{color:me.colorTextDescription,fontSize:me.fontSize},[`&${Be}-disabled`]:{[`p${Be}-drag-icon ${Ze},
|
|
|
p${Be}-text,
|
|
|
p${Be}-hint
|
|
|
`]:{color:me.colorTextDisabled}}}}}},_t=me=>{const{componentCls:Be,iconCls:Ze,fontSize:qe,lineHeight:je,calc:Oe}=me,Te=`${Be}-list-item`,Ge=`${Te}-actions`,$t=`${Te}-action`;return{[`${Be}-wrapper`]:{[`${Be}-list`]:Object.assign(Object.assign({},(0,Mt.dF)()),{lineHeight:me.lineHeight,[Te]:{position:"relative",height:Oe(me.lineHeight).mul(qe).equal(),marginTop:me.marginXS,fontSize:qe,display:"flex",alignItems:"center",transition:`background-color ${me.motionDurationSlow}`,borderRadius:me.borderRadiusSM,"&:hover":{backgroundColor:me.controlItemBgHover},[`${Te}-name`]:Object.assign(Object.assign({},Mt.vS),{padding:`0 ${(0,un.unit)(me.paddingXS)}`,lineHeight:je,flex:"auto",transition:`all ${me.motionDurationSlow}`}),[Ge]:{whiteSpace:"nowrap",[$t]:{opacity:0},[Ze]:{color:me.actionsColor,transition:`all ${me.motionDurationSlow}`},[`
|
|
|
${$t}:focus-visible,
|
|
|
&.picture ${$t}
|
|
|
`]:{opacity:1}},[`${Be}-icon ${Ze}`]:{color:me.colorTextDescription,fontSize:qe},[`${Te}-progress`]:{position:"absolute",bottom:me.calc(me.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:Oe(qe).add(me.paddingXS).equal(),fontSize:qe,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Te}:hover ${$t}`]:{opacity:1},[`${Te}-error`]:{color:me.colorError,[`${Te}-name, ${Be}-icon ${Ze}`]:{color:me.colorError},[Ge]:{[`${Ze}, ${Ze}:hover`]:{color:me.colorError},[$t]:{opacity:1}}},[`${Be}-list-item-container`]:{transition:`opacity ${me.motionDurationSlow}, height ${me.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},ht=ie(99495),ee=me=>{const{componentCls:Be}=me,Ze=new un.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:me.calc(me.marginXS).div(-2).equal()}}),qe=new un.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:me.calc(me.marginXS).div(-2).equal()}}),je=`${Be}-animate-inline`;return[{[`${Be}-wrapper`]:{[`${je}-appear, ${je}-enter, ${je}-leave`]:{animationDuration:me.motionDurationSlow,animationTimingFunction:me.motionEaseInOutCirc,animationFillMode:"forwards"},[`${je}-appear, ${je}-enter`]:{animationName:Ze},[`${je}-leave`]:{animationName:qe}}},{[`${Be}-wrapper`]:(0,ht.J$)(me)},Ze,qe]},z=ie(68361);const oe=me=>{const{componentCls:Be,iconCls:Ze,uploadThumbnailSize:qe,uploadProgressOffset:je,calc:Oe}=me,Te=`${Be}-list`,Ge=`${Te}-item`;return{[`${Be}-wrapper`]:{[`
|
|
|
${Te}${Te}-picture,
|
|
|
${Te}${Te}-picture-card,
|
|
|
${Te}${Te}-picture-circle
|
|
|
`]:{[Ge]:{position:"relative",height:Oe(qe).add(Oe(me.lineWidth).mul(2)).add(Oe(me.paddingXS).mul(2)).equal(),padding:me.paddingXS,border:`${(0,un.unit)(me.lineWidth)} ${me.lineType} ${me.colorBorder}`,borderRadius:me.borderRadiusLG,"&:hover":{background:"transparent"},[`${Ge}-thumbnail`]:Object.assign(Object.assign({},Mt.vS),{width:qe,height:qe,lineHeight:(0,un.unit)(Oe(qe).add(me.paddingSM).equal()),textAlign:"center",flex:"none",[Ze]:{fontSize:me.fontSizeHeading2,color:me.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Ge}-progress`]:{bottom:je,width:`calc(100% - ${(0,un.unit)(Oe(me.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:Oe(qe).add(me.paddingXS).equal()}},[`${Ge}-error`]:{borderColor:me.colorError,[`${Ge}-thumbnail ${Ze}`]:{[`svg path[fill='${z.blue[0]}']`]:{fill:me.colorErrorBg},[`svg path[fill='${z.blue.primary}']`]:{fill:me.colorError}}},[`${Ge}-uploading`]:{borderStyle:"dashed",[`${Ge}-name`]:{marginBottom:je}}},[`${Te}${Te}-picture-circle ${Ge}`]:{[`&, &::before, ${Ge}-thumbnail`]:{borderRadius:"50%"}}}}},le=me=>{const{componentCls:Be,iconCls:Ze,fontSizeLG:qe,colorTextLightSolid:je,calc:Oe}=me,Te=`${Be}-list`,Ge=`${Te}-item`,$t=me.uploadPicCardSize;return{[`
|
|
|
${Be}-wrapper${Be}-picture-card-wrapper,
|
|
|
${Be}-wrapper${Be}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Mt.dF)()),{display:"block",[`${Be}${Be}-select`]:{width:$t,height:$t,textAlign:"center",verticalAlign:"top",backgroundColor:me.colorFillAlter,border:`${(0,un.unit)(me.lineWidth)} dashed ${me.colorBorder}`,borderRadius:me.borderRadiusLG,cursor:"pointer",transition:`border-color ${me.motionDurationSlow}`,[`> ${Be}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Be}-disabled):hover`]:{borderColor:me.colorPrimary}},[`${Te}${Te}-picture-card, ${Te}${Te}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:me.marginXS,marginInlineEnd:me.marginXS}},"@supports (gap: 1px)":{gap:me.marginXS},[`${Te}-item-container`]:{display:"inline-block",width:$t,height:$t,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[Ge]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,un.unit)(Oe(me.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,un.unit)(Oe(me.paddingXS).mul(2).equal())})`,backgroundColor:me.colorBgMask,opacity:0,transition:`all ${me.motionDurationSlow}`,content:'" "'}},[`${Ge}:hover`]:{[`&::before, ${Ge}-actions`]:{opacity:1}},[`${Ge}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${me.motionDurationSlow}`,[`
|
|
|
${Ze}-eye,
|
|
|
${Ze}-download,
|
|
|
${Ze}-delete
|
|
|
`]:{zIndex:10,width:qe,margin:`0 ${(0,un.unit)(me.marginXXS)}`,fontSize:qe,cursor:"pointer",transition:`all ${me.motionDurationSlow}`,color:je,"&:hover":{color:je},svg:{verticalAlign:"baseline"}}},[`${Ge}-thumbnail, ${Ge}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Ge}-name`]:{display:"none",textAlign:"center"},[`${Ge}-file + ${Ge}-name`]:{position:"absolute",bottom:me.margin,display:"block",width:`calc(100% - ${(0,un.unit)(Oe(me.paddingXS).mul(2).equal())})`},[`${Ge}-uploading`]:{[`&${Ge}`]:{backgroundColor:me.colorFillAlter},[`&::before, ${Ze}-eye, ${Ze}-download, ${Ze}-delete`]:{display:"none"}},[`${Ge}-progress`]:{bottom:me.marginXL,width:`calc(100% - ${(0,un.unit)(Oe(me.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${Be}-wrapper${Be}-picture-circle-wrapper`]:{[`${Be}${Be}-select`]:{borderRadius:"50%"}}}};var Ee=me=>{const{componentCls:Be}=me;return{[`${Be}-rtl`]:{direction:"rtl"}}};const at=me=>{const{componentCls:Be,colorTextDisabled:Ze}=me;return{[`${Be}-wrapper`]:Object.assign(Object.assign({},(0,Mt.Wf)(me)),{[Be]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Be}-select`]:{display:"inline-block"},[`${Be}-hidden`]:{display:"none"},[`${Be}-disabled`]:{color:Ze,cursor:"not-allowed"}})}},Ht=me=>({actionsColor:me.colorTextDescription});var Ye=(0,dt.I$)("Upload",me=>{const{fontSizeHeading3:Be,fontHeight:Ze,lineWidth:qe,controlHeightLG:je,calc:Oe}=me,Te=(0,bt.mergeToken)(me,{uploadThumbnailSize:Oe(Be).mul(2).equal(),uploadProgressOffset:Oe(Oe(Ze).div(2)).add(qe).equal(),uploadPicCardSize:Oe(je).mul(2.55).equal()});return[at(Te),sn(Te),oe(Te),le(Te),_t(Te),ee(Te),Ee(Te),(0,ze.Z)(Te)]},Ht),tt={icon:function(Be,Ze){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:Ze}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:Be}}]}},name:"file",theme:"twotone"},vt=tt,Rt=ie(7657),Dt=function(Be,Ze){return te.createElement(Rt.Z,(0,Se.Z)({},Be,{ref:Ze,icon:vt}))},Jt=te.forwardRef(Dt),Xt=Jt,Zt=ie(58617),En={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},cn=En,wn=function(Be,Ze){return te.createElement(Rt.Z,(0,Se.Z)({},Be,{ref:Ze,icon:cn}))},kt=te.forwardRef(wn),Pn=kt,Qt={icon:function(Be,Ze){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:Be}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:Ze}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:Ze}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:Ze}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:Be}}]}},name:"picture",theme:"twotone"},Pe=Qt,Qe=function(Be,Ze){return te.createElement(Rt.Z,(0,Se.Z)({},Be,{ref:Ze,icon:Pe}))},Lt=te.forwardRef(Qe),Nt=Lt,we=ie(77900),$e=ie(2738),st=ie(40192),Tt=ie(86641),zt=ie(22703),on=ie(7939);function Dn(me){return Object.assign(Object.assign({},me),{lastModified:me.lastModified,lastModifiedDate:me.lastModifiedDate,name:me.name,size:me.size,type:me.type,uid:me.uid,percent:0,originFileObj:me})}function In(me,Be){const Ze=(0,ut.Z)(Be),qe=Ze.findIndex(je=>{let{uid:Oe}=je;return Oe===me.uid});return qe===-1?Ze.push(me):Ze[qe]=me,Ze}function dn(me,Be){const Ze=me.uid!==void 0?"uid":"name";return Be.filter(qe=>qe[Ze]===me[Ze])[0]}function xn(me,Be){const Ze=me.uid!==void 0?"uid":"name",qe=Be.filter(je=>je[Ze]!==me[Ze]);return qe.length===Be.length?null:qe}const fn=function(){const Be=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),qe=Be[Be.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(qe)||[""])[0]},$n=me=>me.indexOf("image/")===0,gn=me=>{if(me.type&&!me.thumbUrl)return $n(me.type);const Be=me.thumbUrl||me.url||"",Ze=fn(Be);return/^data:image\//.test(Be)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(Ze)?!0:!(/^data:/.test(Be)||Ze)},hn=200;function Yt(me){return new Promise(Be=>{if(!me.type||!$n(me.type)){Be("");return}const Ze=document.createElement("canvas");Ze.width=hn,Ze.height=hn,Ze.style.cssText=`position: fixed; left: 0; top: 0; width: ${hn}px; height: ${hn}px; z-index: 9999; display: none;`,document.body.appendChild(Ze);const qe=Ze.getContext("2d"),je=new Image;if(je.onload=()=>{const{width:Oe,height:Te}=je;let Ge=hn,$t=hn,Ft=0,Wt=0;Oe>Te?($t=Te*(hn/Oe),Wt=-($t-Ge)/2):(Ge=Oe*(hn/Te),Ft=-(Ge-$t)/2),qe.drawImage(je,Ft,Wt,Ge,$t);const kn=Ze.toDataURL();document.body.removeChild(Ze),window.URL.revokeObjectURL(je.src),Be(kn)},je.crossOrigin="anonymous",me.type.startsWith("image/svg+xml")){const Oe=new FileReader;Oe.onload=()=>{Oe.result&&typeof Oe.result=="string"&&(je.src=Oe.result)},Oe.readAsDataURL(me)}else if(me.type.startsWith("image/gif")){const Oe=new FileReader;Oe.onload=()=>{Oe.result&&Be(Oe.result)},Oe.readAsDataURL(me)}else je.src=window.URL.createObjectURL(me)})}var Mn=ie(26227),pn=ie(41464),On=ie(15277),Gn=ie(89787),Zn=ie(25399),Xn=te.forwardRef((me,Be)=>{let{prefixCls:Ze,className:qe,style:je,locale:Oe,listType:Te,file:Ge,items:$t,progress:Ft,iconRender:Wt,actionIconRender:kn,itemRender:Tn,isImgUrl:Hn,showPreviewIcon:Sn,showRemoveIcon:mn,showDownloadIcon:Cn,previewIcon:Fn,removeIcon:Yn,downloadIcon:Vn,extra:Kn,onPreview:vn,onDownload:er,onClose:Wn}=me;var dr,pr;const{status:lr}=Ge,[ur,yr]=te.useState(lr);te.useEffect(()=>{lr!=="removed"&&yr(lr)},[lr]);const[sr,fr]=te.useState(!1);te.useEffect(()=>{const Vt=setTimeout(()=>{fr(!0)},300);return()=>{clearTimeout(Vt)}},[]);const Qn=Wt(Ge);let mr=te.createElement("div",{className:`${Ze}-icon`},Qn);if(Te==="picture"||Te==="picture-card"||Te==="picture-circle")if(ur==="uploading"||!Ge.thumbUrl&&!Ge.url){const Vt=be()(`${Ze}-list-item-thumbnail`,{[`${Ze}-list-item-file`]:ur!=="uploading"});mr=te.createElement("div",{className:Vt},Qn)}else{const Vt=Hn!=null&&Hn(Ge)?te.createElement("img",{src:Ge.thumbUrl||Ge.url,alt:Ge.name,className:`${Ze}-list-item-image`,crossOrigin:Ge.crossOrigin}):Qn,yn=be()(`${Ze}-list-item-thumbnail`,{[`${Ze}-list-item-file`]:Hn&&!Hn(Ge)});mr=te.createElement("a",{className:yn,onClick:Ln=>vn(Ge,Ln),href:Ge.url||Ge.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Vt)}const br=be()(`${Ze}-list-item`,`${Ze}-list-item-${ur}`),Hr=typeof Ge.linkProps=="string"?JSON.parse(Ge.linkProps):Ge.linkProps,Er=(typeof mn=="function"?mn(Ge):mn)?kn((typeof Yn=="function"?Yn(Ge):Yn)||te.createElement(Mn.Z,null),()=>Wn(Ge),Ze,Oe.removeFile,!0):null,Ar=(typeof Cn=="function"?Cn(Ge):Cn)&&ur==="done"?kn((typeof Vn=="function"?Vn(Ge):Vn)||te.createElement(pn.Z,null),()=>er(Ge),Ze,Oe.downloadFile):null,kr=Te!=="picture-card"&&Te!=="picture-circle"&&te.createElement("span",{key:"download-delete",className:be()(`${Ze}-list-item-actions`,{picture:Te==="picture"})},Ar,Er),Pr=typeof Kn=="function"?Kn(Ge):Kn,ir=Pr&&te.createElement("span",{className:`${Ze}-list-item-extra`},Pr),rr=be()(`${Ze}-list-item-name`),Jn=Ge.url?te.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:rr,title:Ge.name},Hr,{href:Ge.url,onClick:Vt=>vn(Ge,Vt)}),Ge.name,ir):te.createElement("span",{key:"view",className:rr,onClick:Vt=>vn(Ge,Vt),title:Ge.name},Ge.name,ir),Kt=(typeof Sn=="function"?Sn(Ge):Sn)&&(Ge.url||Ge.thumbUrl)?te.createElement("a",{href:Ge.url||Ge.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Vt=>vn(Ge,Vt),title:Oe.previewFile},typeof Fn=="function"?Fn(Ge):Fn||te.createElement(On.Z,null)):null,ln=(Te==="picture-card"||Te==="picture-circle")&&ur!=="uploading"&&te.createElement("span",{className:`${Ze}-list-item-actions`},Kt,ur==="done"&&Ar,Er),{getPrefixCls:an}=te.useContext(Ce.E_),Gt=an(),An=te.createElement("div",{className:br},mr,Jn,kr,ln,sr&&te.createElement(we.default,{motionName:`${Gt}-fade`,visible:ur==="uploading",motionDeadline:2e3},Vt=>{let{className:yn}=Vt;const Ln="percent"in Ge?te.createElement(Gn.Z,Object.assign({},Ft,{type:"line",percent:Ge.percent,"aria-label":Ge["aria-label"],"aria-labelledby":Ge["aria-labelledby"]})):null;return te.createElement("div",{className:be()(`${Ze}-list-item-progress`,yn)},Ln)})),jn=Ge.response&&typeof Ge.response=="string"?Ge.response:((dr=Ge.error)===null||dr===void 0?void 0:dr.statusText)||((pr=Ge.error)===null||pr===void 0?void 0:pr.message)||Oe.uploadError,tn=ur==="error"?te.createElement(Zn.Z,{title:jn,getPopupContainer:Vt=>Vt.parentNode},An):An;return te.createElement("div",{className:be()(`${Ze}-list-item-container`,qe),style:je,ref:Be},Tn?Tn(tn,Ge,$t,{download:er.bind(null,Ge),preview:vn.bind(null,Ge),remove:Wn.bind(null,Ge)}):tn)});const Nn=(me,Be)=>{const{listType:Ze="text",previewFile:qe=Yt,onPreview:je,onDownload:Oe,onRemove:Te,locale:Ge,iconRender:$t,isImageUrl:Ft=gn,prefixCls:Wt,items:kn=[],showPreviewIcon:Tn=!0,showRemoveIcon:Hn=!0,showDownloadIcon:Sn=!1,removeIcon:mn,previewIcon:Cn,downloadIcon:Fn,extra:Yn,progress:Vn={size:[-1,2],showInfo:!1},appendAction:Kn,appendActionVisible:vn=!0,itemRender:er,disabled:Wn}=me,dr=(0,st.Z)(),[pr,lr]=te.useState(!1),ur=["picture-card","picture-circle"].includes(Ze);te.useEffect(()=>{Ze.startsWith("picture")&&(kn||[]).forEach(ir=>{!(ir.originFileObj instanceof File||ir.originFileObj instanceof Blob)||ir.thumbUrl!==void 0||(ir.thumbUrl="",qe==null||qe(ir.originFileObj).then(rr=>{ir.thumbUrl=rr||"",dr()}))})},[Ze,kn,qe]),te.useEffect(()=>{lr(!0)},[]);const yr=(ir,rr)=>{if(je)return rr==null||rr.preventDefault(),je(ir)},sr=ir=>{typeof Oe=="function"?Oe(ir):ir.url&&window.open(ir.url)},fr=ir=>{Te==null||Te(ir)},Qn=ir=>{if($t)return $t(ir,Ze);const rr=ir.status==="uploading";if(Ze.startsWith("picture")){const Jn=Ze==="picture"?te.createElement(Zt.Z,null):Ge.uploading,Kt=Ft!=null&&Ft(ir)?te.createElement(Nt,null):te.createElement(Xt,null);return rr?Jn:Kt}return rr?te.createElement(Zt.Z,null):te.createElement(Pn,null)},mr=(ir,rr,Jn,Kt,ln)=>{const an={type:"text",size:"small",title:Kt,onClick:Gt=>{var An,jn;rr(),te.isValidElement(ir)&&((jn=(An=ir.props).onClick)===null||jn===void 0||jn.call(An,Gt))},className:`${Jn}-list-item-action`};return ln&&(an.disabled=Wn),te.isValidElement(ir)?te.createElement(on.ZP,Object.assign({},an,{icon:(0,zt.Tm)(ir,Object.assign(Object.assign({},ir.props),{onClick:()=>{}}))})):te.createElement(on.ZP,Object.assign({},an),te.createElement("span",null,ir))};te.useImperativeHandle(Be,()=>({handlePreview:yr,handleDownload:sr}));const{getPrefixCls:br}=te.useContext(Ce.E_),Hr=br("upload",Wt),Er=br(),Ar=be()(`${Hr}-list`,`${Hr}-list-${Ze}`),kr=te.useMemo(()=>(0,$e.Z)((0,Tt.Z)(Er),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[Er]),Pr=Object.assign(Object.assign({},ur?{}:kr),{motionDeadline:2e3,motionName:`${Hr}-${ur?"animate-inline":"animate"}`,keys:(0,ut.Z)(kn.map(ir=>({key:ir.uid,file:ir}))),motionAppear:pr});return te.createElement("div",{className:Ar},te.createElement(we.CSSMotionList,Object.assign({},Pr,{component:!1}),ir=>{let{key:rr,file:Jn,className:Kt,style:ln}=ir;return te.createElement(Xn,{key:rr,locale:Ge,prefixCls:Hr,className:Kt,style:ln,file:Jn,items:kn,progress:Vn,listType:Ze,isImgUrl:Ft,showPreviewIcon:Tn,showRemoveIcon:Hn,showDownloadIcon:Sn,removeIcon:mn,previewIcon:Cn,downloadIcon:Fn,extra:Yn,iconRender:Qn,actionIconRender:mr,itemRender:er,onPreview:yr,onDownload:sr,onClose:fr})}),Kn&&te.createElement(we.default,Object.assign({},Pr,{visible:vn,forceRender:!0}),ir=>{let{className:rr,style:Jn}=ir;return(0,zt.Tm)(Kn,Kt=>({className:be()(Kt.className,rr),style:Object.assign(Object.assign(Object.assign({},Jn),{pointerEvents:rr?"none":void 0}),Kt.style)}))}))};var qn=te.forwardRef(Nn),Et=function(me,Be,Ze,qe){function je(Oe){return Oe instanceof Ze?Oe:new Ze(function(Te){Te(Oe)})}return new(Ze||(Ze=Promise))(function(Oe,Te){function Ge(Wt){try{Ft(qe.next(Wt))}catch(kn){Te(kn)}}function $t(Wt){try{Ft(qe.throw(Wt))}catch(kn){Te(kn)}}function Ft(Wt){Wt.done?Oe(Wt.value):je(Wt.value).then(Ge,$t)}Ft((qe=qe.apply(me,Be||[])).next())})};const Ut=`__LIST_IGNORE_${Date.now()}__`,zn=(me,Be)=>{const{fileList:Ze,defaultFileList:qe,onRemove:je,showUploadList:Oe=!0,listType:Te="text",onPreview:Ge,onDownload:$t,onChange:Ft,onDrop:Wt,previewFile:kn,disabled:Tn,locale:Hn,iconRender:Sn,isImageUrl:mn,progress:Cn,prefixCls:Fn,className:Yn,type:Vn="select",children:Kn,style:vn,itemRender:er,maxCount:Wn,data:dr={},multiple:pr=!1,hasControlInside:lr=!0,action:ur="",accept:yr="",supportServerRender:sr=!0,rootClassName:fr}=me,Qn=te.useContext(de.Z),mr=Tn!=null?Tn:Qn,[br,Hr]=(0,qt.Z)(qe||[],{value:Ze,postState:xr=>xr!=null?xr:[]}),[Er,Ar]=te.useState("drop"),kr=te.useRef(null),Pr=te.useRef(null);te.useMemo(()=>{const xr=Date.now();(Ze||[]).forEach((zr,Gr)=>{!zr.uid&&!Object.isFrozen(zr)&&(zr.uid=`__AUTO__${xr}_${Gr}__`)})},[Ze]);const ir=(xr,zr,Gr)=>{let wr=(0,ut.Z)(zr),Nr=!1;Wn===1?wr=wr.slice(-1):Wn&&(Nr=wr.length>Wn,wr=wr.slice(0,Wn)),(0,ve.flushSync)(()=>{Hr(wr)});const Or={file:xr,fileList:wr};Gr&&(Or.event=Gr),(!Nr||xr.status==="removed"||wr.some(ui=>ui.uid===xr.uid))&&(0,ve.flushSync)(()=>{Ft==null||Ft(Or)})},rr=(xr,zr)=>Et(void 0,void 0,void 0,function*(){const{beforeUpload:Gr,transformFile:wr}=me;let Nr=xr;if(Gr){const Or=yield Gr(xr,zr);if(Or===!1)return!1;if(delete xr[Ut],Or===Ut)return Object.defineProperty(xr,Ut,{value:!0,configurable:!0}),!1;typeof Or=="object"&&Or&&(Nr=Or)}return wr&&(Nr=yield wr(Nr)),Nr}),Jn=xr=>{const zr=xr.filter(Nr=>!Nr.file[Ut]);if(!zr.length)return;const Gr=zr.map(Nr=>Dn(Nr.file));let wr=(0,ut.Z)(br);Gr.forEach(Nr=>{wr=In(Nr,wr)}),Gr.forEach((Nr,Or)=>{let ui=Nr;if(zr[Or].parsedFile)Nr.status="uploading";else{const{originFileObj:Pi}=Nr;let fi;try{fi=new File([Pi],Pi.name,{type:Pi.type})}catch(ni){fi=new Blob([Pi],{type:Pi.type}),fi.name=Pi.name,fi.lastModifiedDate=new Date,fi.lastModified=new Date().getTime()}fi.uid=Nr.uid,ui=fi}ir(ui,wr)})},Kt=(xr,zr,Gr)=>{try{typeof xr=="string"&&(xr=JSON.parse(xr))}catch(Or){}if(!dn(zr,br))return;const wr=Dn(zr);wr.status="done",wr.percent=100,wr.response=xr,wr.xhr=Gr;const Nr=In(wr,br);ir(wr,Nr)},ln=(xr,zr)=>{if(!dn(zr,br))return;const Gr=Dn(zr);Gr.status="uploading",Gr.percent=xr.percent;const wr=In(Gr,br);ir(Gr,wr,xr)},an=(xr,zr,Gr)=>{if(!dn(Gr,br))return;const wr=Dn(Gr);wr.error=xr,wr.response=zr,wr.status="error";const Nr=In(wr,br);ir(wr,Nr)},Gt=xr=>{let zr;Promise.resolve(typeof je=="function"?je(xr):je).then(Gr=>{var wr;if(Gr===!1)return;const Nr=xn(xr,br);Nr&&(zr=Object.assign(Object.assign({},xr),{status:"removed"}),br==null||br.forEach(Or=>{const ui=zr.uid!==void 0?"uid":"name";Or[ui]===zr[ui]&&!Object.isFrozen(Or)&&(Or.status="removed")}),(wr=kr.current)===null||wr===void 0||wr.abort(zr),ir(zr,Nr))})},An=xr=>{Ar(xr.type),xr.type==="drop"&&(Wt==null||Wt(xr))};te.useImperativeHandle(Be,()=>({onBatchStart:Jn,onSuccess:Kt,onProgress:ln,onError:an,fileList:br,upload:kr.current,nativeElement:Pr.current}));const{getPrefixCls:jn,direction:tn,upload:Vt}=te.useContext(Ce.E_),yn=jn("upload",Fn),Ln=Object.assign(Object.assign({onBatchStart:Jn,onError:an,onProgress:ln,onSuccess:Kt},me),{data:dr,multiple:pr,action:ur,accept:yr,supportServerRender:sr,prefixCls:yn,disabled:mr,beforeUpload:rr,onChange:void 0,hasControlInside:lr});delete Ln.className,delete Ln.style,(!Kn||mr)&&delete Ln.id;const cr=`${yn}-wrapper`,[Lr,Ir,Rr]=Ye(yn,cr),[Br]=(0,mt.Z)("Upload",en.Z.Upload),{showRemoveIcon:Fr,showPreviewIcon:Vr,showDownloadIcon:Wr,removeIcon:Kr,previewIcon:ti,downloadIcon:Ei,extra:Ni}=typeof Oe=="boolean"?{}:Oe,xi=typeof Fr=="undefined"?!mr:Fr,li=(xr,zr)=>Oe?te.createElement(qn,{prefixCls:yn,listType:Te,items:br,previewFile:kn,onPreview:Ge,onDownload:$t,onRemove:Gt,showRemoveIcon:xi,showPreviewIcon:Vr,showDownloadIcon:Wr,removeIcon:Kr,previewIcon:ti,downloadIcon:Ei,iconRender:Sn,extra:Ni,locale:Object.assign(Object.assign({},Br),Hn),isImageUrl:mn,progress:Cn,appendAction:xr,appendActionVisible:zr,itemRender:er,disabled:mr}):xr,Ri=be()(cr,Yn,fr,Ir,Rr,Vt==null?void 0:Vt.className,{[`${yn}-rtl`]:tn==="rtl",[`${yn}-picture-card-wrapper`]:Te==="picture-card",[`${yn}-picture-circle-wrapper`]:Te==="picture-circle"}),$r=Object.assign(Object.assign({},Vt==null?void 0:Vt.style),vn);if(Vn==="drag"){const xr=be()(Ir,yn,`${yn}-drag`,{[`${yn}-drag-uploading`]:br.some(zr=>zr.status==="uploading"),[`${yn}-drag-hover`]:Er==="dragover",[`${yn}-disabled`]:mr,[`${yn}-rtl`]:tn==="rtl"});return Lr(te.createElement("span",{className:Ri,ref:Pr},te.createElement("div",{className:xr,style:$r,onDrop:An,onDragOver:An,onDragLeave:An},te.createElement(Ct,Object.assign({},Ln,{ref:kr,className:`${yn}-btn`}),te.createElement("div",{className:`${yn}-drag-container`},Kn))),li()))}const _i=be()(yn,`${yn}-select`,{[`${yn}-disabled`]:mr,[`${yn}-hidden`]:!Kn}),qr=te.createElement("div",{className:_i},te.createElement(Ct,Object.assign({},Ln,{ref:kr})));return Lr(Te==="picture-card"||Te==="picture-circle"?te.createElement("span",{className:Ri,ref:Pr},li(qr,!!Kn)):te.createElement("span",{className:Ri,ref:Pr},qr,li()))};var De=te.forwardRef(zn),Ue=function(me,Be){var Ze={};for(var qe in me)Object.prototype.hasOwnProperty.call(me,qe)&&Be.indexOf(qe)<0&&(Ze[qe]=me[qe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,qe=Object.getOwnPropertySymbols(me);je<qe.length;je++)Be.indexOf(qe[je])<0&&Object.prototype.propertyIsEnumerable.call(me,qe[je])&&(Ze[qe[je]]=me[qe[je]]);return Ze},Me=te.forwardRef((me,Be)=>{var{style:Ze,height:qe,hasControlInside:je=!1}=me,Oe=Ue(me,["style","height","hasControlInside"]);return te.createElement(De,Object.assign({ref:Be,hasControlInside:je},Oe,{type:"drag",style:Object.assign(Object.assign({},Ze),{height:qe})}))});const ye=De;ye.Dragger=Me,ye.LIST_IGNORE=Ut;var Le=ye},99498:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){te.defineOption("placeholder","",function(nt,Ie,fe){var et=fe&&fe!=te.Init;if(Ie&&!et)nt.on("blur",be),nt.on("change",Se),nt.on("swapDoc",Se),te.on(nt.getInputField(),"compositionupdate",nt.state.placeholderCompose=function(){Je(nt)}),Se(nt);else if(!Ie&&et){nt.off("blur",be),nt.off("change",Se),nt.off("swapDoc",Se),te.off(nt.getInputField(),"compositionupdate",nt.state.placeholderCompose),ut(nt);var xe=nt.getWrapperElement();xe.className=xe.className.replace(" CodeMirror-empty","")}Ie&&!nt.hasFocus()&&be(nt)});function ut(nt){nt.state.placeholder&&(nt.state.placeholder.parentNode.removeChild(nt.state.placeholder),nt.state.placeholder=null)}function ve(nt){ut(nt);var Ie=nt.state.placeholder=document.createElement("pre");Ie.style.cssText="height: 0; overflow: visible",Ie.style.direction=nt.getOption("direction"),Ie.className="CodeMirror-placeholder CodeMirror-line-like";var fe=nt.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),Ie.appendChild(fe),nt.display.lineSpace.insertBefore(Ie,nt.display.lineSpace.firstChild)}function Je(nt){setTimeout(function(){var Ie=!1,fe=nt.getInputField();fe.nodeName=="TEXTAREA"?Ie=!fe.value:nt.lineCount()==1&&(Ie=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),Ie?ve(nt):ut(nt)},20)}function be(nt){He(nt)&&ve(nt)}function Se(nt){var Ie=nt.getWrapperElement(),fe=He(nt);Ie.className=Ie.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?ve(nt):ut(nt)}function He(nt){return nt.lineCount()===1&&nt.getLine(0)===""}})},25717:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){var ut={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ve=te.Pos;te.defineOption("autoCloseBrackets",!1,function(We,Ve,Ne){Ne&&Ne!=te.Init&&(We.removeKeyMap(be),We.state.closeBrackets=null),Ve&&(Se(Je(Ve,"pairs")),We.state.closeBrackets=Ve,We.addKeyMap(be))});function Je(We,Ve){return Ve=="pairs"&&typeof We=="string"?We:typeof We=="object"&&We[Ve]!=null?We[Ve]:ut[Ve]}var be={Backspace:Ie,Enter:fe};function Se(We){for(var Ve=0;Ve<We.length;Ve++){var Ne=We.charAt(Ve),pt="'"+Ne+"'";be[pt]||(be[pt]=He(Ne))}}Se(ut.pairs+"`");function He(We){return function(Ve){return xe(Ve,We)}}function nt(We){var Ve=We.state.closeBrackets;if(!Ve||Ve.override)return Ve;var Ne=We.getModeAt(We.getCursor());return Ne.closeBrackets||Ve}function Ie(We){var Ve=nt(We);if(!Ve||We.getOption("disableInput"))return te.Pass;for(var Ne=Je(Ve,"pairs"),pt=We.listSelections(),It=0;It<pt.length;It++){if(!pt[It].empty())return te.Pass;var Ot=wt(We,pt[It].head);if(!Ot||Ne.indexOf(Ot)%2!=0)return te.Pass}for(var It=pt.length-1;It>=0;It--){var gt=pt[It].head;We.replaceRange("",ve(gt.line,gt.ch-1),ve(gt.line,gt.ch+1),"+delete")}}function fe(We){var Ve=nt(We),Ne=Ve&&Je(Ve,"explode");if(!Ne||We.getOption("disableInput"))return te.Pass;for(var pt=We.listSelections(),It=0;It<pt.length;It++){if(!pt[It].empty())return te.Pass;var Ot=wt(We,pt[It].head);if(!Ot||Ne.indexOf(Ot)%2!=0)return te.Pass}We.operation(function(){var gt=We.lineSeparator()||`
|
|
|
`;We.replaceSelection(gt+gt,null),We.execCommand("goCharLeft"),pt=We.listSelections();for(var ct=0;ct<pt.length;ct++){var yt=pt[ct].head.line;We.indentLine(yt,null,!0),We.indentLine(yt+1,null,!0)}})}function et(We){var Ve=te.cmpPos(We.anchor,We.head)>0;return{anchor:new ve(We.anchor.line,We.anchor.ch+(Ve?-1:1)),head:new ve(We.head.line,We.head.ch+(Ve?1:-1))}}function xe(We,Ve){var Ne=nt(We);if(!Ne||We.getOption("disableInput"))return te.Pass;var pt=Je(Ne,"pairs"),It=pt.indexOf(Ve);if(It==-1)return te.Pass;for(var Ot=Je(Ne,"closeBefore"),gt=Je(Ne,"triples"),ct=pt.charAt(It+1)==Ve,yt=We.listSelections(),Ke=It%2==0,Bt,Fe=0;Fe<yt.length;Fe++){var _e=yt[Fe],ft=_e.head,Re,lt=We.getRange(ft,ve(ft.line,ft.ch+1));if(Ke&&!_e.empty())Re="surround";else if((ct||!Ke)&<==Ve)ct&&rt(We,ft)?Re="both":gt.indexOf(Ve)>=0&&We.getRange(ft,ve(ft.line,ft.ch+3))==Ve+Ve+Ve?Re="skipThree":Re="skip";else if(ct&&ft.ch>1&>.indexOf(Ve)>=0&&We.getRange(ve(ft.line,ft.ch-2),ft)==Ve+Ve){if(ft.ch>2&&/\bstring/.test(We.getTokenTypeAt(ve(ft.line,ft.ch-2))))return te.Pass;Re="addFour"}else if(ct){var ot=ft.ch==0?" ":We.getRange(ve(ft.line,ft.ch-1),ft);if(!te.isWordChar(lt)&&ot!=Ve&&!te.isWordChar(ot))Re="both";else return te.Pass}else if(Ke&&(lt.length===0||/\s/.test(lt)||Ot.indexOf(lt)>-1))Re="both";else return te.Pass;if(!Bt)Bt=Re;else if(Bt!=Re)return te.Pass}var pe=It%2?pt.charAt(It-1):Ve,St=It%2?Ve:pt.charAt(It+1);We.operation(function(){if(Bt=="skip")We.execCommand("goCharRight");else if(Bt=="skipThree")for(var ke=0;ke<3;ke++)We.execCommand("goCharRight");else if(Bt=="surround"){for(var Ct=We.getSelections(),ke=0;ke<Ct.length;ke++)Ct[ke]=pe+Ct[ke]+St;We.replaceSelections(Ct,"around"),Ct=We.listSelections().slice();for(var ke=0;ke<Ct.length;ke++)Ct[ke]=et(Ct[ke]);We.setSelections(Ct)}else Bt=="both"?(We.replaceSelection(pe+St,null),We.triggerElectric(pe+St),We.execCommand("goCharLeft")):Bt=="addFour"&&(We.replaceSelection(pe+pe+pe+pe,"before"),We.execCommand("goCharRight"))})}function wt(We,Ve){var Ne=We.getRange(ve(Ve.line,Ve.ch-1),ve(Ve.line,Ve.ch+1));return Ne.length==2?Ne:null}function rt(We,Ve){var Ne=We.getTokenAt(ve(Ve.line,Ve.ch+1));return/\bstring/.test(Ne.type)&&Ne.start==Ve.ch&&(Ve.ch==0||!/\bstring/.test(We.getTokenTypeAt(Ve)))}})},6313:function(rn,jt,ie){(function(te){te(ie(89780),ie(32855))})(function(te){te.defineOption("autoCloseTags",!1,function(Ie,fe,et){if(et!=te.Init&&et&&Ie.removeKeyMap("autoCloseTags"),!!fe){var xe={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(xe["'/'"]=function(wt){return Se(wt)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(xe["'>'"]=function(wt){return Je(wt)}),Ie.addKeyMap(xe)}});var ut=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ve=["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 Je(Ie){if(Ie.getOption("disableInput"))return te.Pass;for(var fe=Ie.listSelections(),et=[],xe=Ie.getOption("autoCloseTags"),wt=0;wt<fe.length;wt++){if(!fe[wt].empty())return te.Pass;var rt=fe[wt].head,We=Ie.getTokenAt(rt),Ve=te.innerMode(Ie.getMode(),We.state),Ne=Ve.state,pt=Ve.mode.xmlCurrentTag&&Ve.mode.xmlCurrentTag(Ne),It=pt&&pt.name;if(!It)return te.Pass;var Ot=Ve.mode.configuration=="html",gt=typeof xe=="object"&&xe.dontCloseTags||Ot&&ut,ct=typeof xe=="object"&&xe.indentTags||Ot&&ve;We.end>rt.ch&&(It=It.slice(0,It.length-We.end+rt.ch));var yt=It.toLowerCase();if(!It||We.type=="string"&&(We.end!=rt.ch||!/[\"\']/.test(We.string.charAt(We.string.length-1))||We.string.length==1)||We.type=="tag"&&pt.close||We.string.indexOf("/")==rt.ch-We.start-1||gt&&He(gt,yt)>-1||nt(Ie,Ve.mode.xmlCurrentContext&&Ve.mode.xmlCurrentContext(Ne)||[],It,rt,!0))return te.Pass;var Ke=typeof xe=="object"&&xe.emptyTags;if(Ke&&He(Ke,It)>-1){et[wt]={text:"/>",newPos:te.Pos(rt.line,rt.ch+2)};continue}var Bt=ct&&He(ct,yt)>-1;et[wt]={indent:Bt,text:">"+(Bt?`
|
|
|
|
|
|
`:"")+"</"+It+">",newPos:Bt?te.Pos(rt.line+1,0):te.Pos(rt.line,rt.ch+1)}}for(var Fe=typeof xe=="object"&&xe.dontIndentOnAutoClose,wt=fe.length-1;wt>=0;wt--){var _e=et[wt];Ie.replaceRange(_e.text,fe[wt].head,fe[wt].anchor,"+insert");var ft=Ie.listSelections().slice(0);ft[wt]={head:_e.newPos,anchor:_e.newPos},Ie.setSelections(ft),!Fe&&_e.indent&&(Ie.indentLine(_e.newPos.line,null,!0),Ie.indentLine(_e.newPos.line+1,null,!0))}}function be(Ie,fe){for(var et=Ie.listSelections(),xe=[],wt=fe?"/":"</",rt=Ie.getOption("autoCloseTags"),We=typeof rt=="object"&&rt.dontIndentOnSlash,Ve=0;Ve<et.length;Ve++){if(!et[Ve].empty())return te.Pass;var Ne=et[Ve].head,pt=Ie.getTokenAt(Ne),It=te.innerMode(Ie.getMode(),pt.state),Ot=It.state;if(fe&&(pt.type=="string"||pt.string.charAt(0)!="<"||pt.start!=Ne.ch-1))return te.Pass;var gt,ct=It.mode.name!="xml"&&Ie.getMode().name=="htmlmixed";if(ct&&It.mode.name=="javascript")gt=wt+"script";else if(ct&&It.mode.name=="css")gt=wt+"style";else{var yt=It.mode.xmlCurrentContext&&It.mode.xmlCurrentContext(Ot);if(!yt||yt.length&&nt(Ie,yt,yt[yt.length-1],Ne))return te.Pass;gt=wt+yt[yt.length-1]}Ie.getLine(Ne.line).charAt(pt.end)!=">"&&(gt+=">"),xe[Ve]=gt}if(Ie.replaceSelections(xe),et=Ie.listSelections(),!We)for(var Ve=0;Ve<et.length;Ve++)(Ve==et.length-1||et[Ve].head.line<et[Ve+1].head.line)&&Ie.indentLine(et[Ve].head.line)}function Se(Ie){return Ie.getOption("disableInput")?te.Pass:be(Ie,!0)}te.commands.closeTag=function(Ie){return be(Ie)};function He(Ie,fe){if(Ie.indexOf)return Ie.indexOf(fe);for(var et=0,xe=Ie.length;et<xe;++et)if(Ie[et]==fe)return et;return-1}function nt(Ie,fe,et,xe,wt){if(!te.scanForClosingTag)return!1;var rt=Math.min(Ie.lastLine()+1,xe.line+500),We=te.scanForClosingTag(Ie,xe,null,rt);if(!We||We.tag!=et)return!1;for(var Ve=wt?1:0,Ne=fe.length-1;Ne>=0&&fe[Ne]==et;Ne--)++Ve;xe=We.to;for(var Ne=1;Ne<Ve;Ne++){var pt=te.scanForClosingTag(Ie,xe,null,rt);if(!pt||pt.tag!=et)return!1;xe=pt.to}return!0}})},32855:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){"use strict";var ut=te.Pos;function ve(Ne,pt){return Ne.line-pt.line||Ne.ch-pt.ch}var Je="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=Je+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Se=new RegExp("<(/?)(["+Je+"]["+be+"]*)","g");function He(Ne,pt,It,Ot){this.line=pt,this.ch=It,this.cm=Ne,this.text=Ne.getLine(pt),this.min=Ot?Math.max(Ot.from,Ne.firstLine()):Ne.firstLine(),this.max=Ot?Math.min(Ot.to-1,Ne.lastLine()):Ne.lastLine()}function nt(Ne,pt){var It=Ne.cm.getTokenTypeAt(ut(Ne.line,pt));return It&&/\btag\b/.test(It)}function Ie(Ne){if(!(Ne.line>=Ne.max))return Ne.ch=0,Ne.text=Ne.cm.getLine(++Ne.line),!0}function fe(Ne){if(!(Ne.line<=Ne.min))return Ne.text=Ne.cm.getLine(--Ne.line),Ne.ch=Ne.text.length,!0}function et(Ne){for(;;){var pt=Ne.text.indexOf(">",Ne.ch);if(pt==-1){if(Ie(Ne))continue;return}if(!nt(Ne,pt+1)){Ne.ch=pt+1;continue}var It=Ne.text.lastIndexOf("/",pt),Ot=It>-1&&!/\S/.test(Ne.text.slice(It+1,pt));return Ne.ch=pt+1,Ot?"selfClose":"regular"}}function xe(Ne){for(;;){var pt=Ne.ch?Ne.text.lastIndexOf("<",Ne.ch-1):-1;if(pt==-1){if(fe(Ne))continue;return}if(!nt(Ne,pt+1)){Ne.ch=pt;continue}Se.lastIndex=pt,Ne.ch=pt;var It=Se.exec(Ne.text);if(It&&It.index==pt)return It}}function wt(Ne){for(;;){Se.lastIndex=Ne.ch;var pt=Se.exec(Ne.text);if(!pt){if(Ie(Ne))continue;return}if(!nt(Ne,pt.index+1)){Ne.ch=pt.index+1;continue}return Ne.ch=pt.index+pt[0].length,pt}}function rt(Ne){for(;;){var pt=Ne.ch?Ne.text.lastIndexOf(">",Ne.ch-1):-1;if(pt==-1){if(fe(Ne))continue;return}if(!nt(Ne,pt+1)){Ne.ch=pt;continue}var It=Ne.text.lastIndexOf("/",pt),Ot=It>-1&&!/\S/.test(Ne.text.slice(It+1,pt));return Ne.ch=pt+1,Ot?"selfClose":"regular"}}function We(Ne,pt){for(var It=[];;){var Ot=wt(Ne),gt,ct=Ne.line,yt=Ne.ch-(Ot?Ot[0].length:0);if(!Ot||!(gt=et(Ne)))return;if(gt!="selfClose")if(Ot[1]){for(var Ke=It.length-1;Ke>=0;--Ke)if(It[Ke]==Ot[2]){It.length=Ke;break}if(Ke<0&&(!pt||pt==Ot[2]))return{tag:Ot[2],from:ut(ct,yt),to:ut(Ne.line,Ne.ch)}}else It.push(Ot[2])}}function Ve(Ne,pt){for(var It=[];;){var Ot=rt(Ne);if(!Ot)return;if(Ot=="selfClose"){xe(Ne);continue}var gt=Ne.line,ct=Ne.ch,yt=xe(Ne);if(!yt)return;if(yt[1])It.push(yt[2]);else{for(var Ke=It.length-1;Ke>=0;--Ke)if(It[Ke]==yt[2]){It.length=Ke;break}if(Ke<0&&(!pt||pt==yt[2]))return{tag:yt[2],from:ut(Ne.line,Ne.ch),to:ut(gt,ct)}}}}te.registerHelper("fold","xml",function(Ne,pt){for(var It=new He(Ne,pt.line,0);;){var Ot=wt(It);if(!Ot||It.line!=pt.line)return;var gt=et(It);if(!gt)return;if(!Ot[1]&>!="selfClose"){var ct=ut(It.line,It.ch),yt=We(It,Ot[2]);return yt&&ve(yt.from,ct)>0?{from:ct,to:yt.from}:null}}}),te.findMatchingTag=function(Ne,pt,It){var Ot=new He(Ne,pt.line,pt.ch,It);if(!(Ot.text.indexOf(">")==-1&&Ot.text.indexOf("<")==-1)){var gt=et(Ot),ct=gt&&ut(Ot.line,Ot.ch),yt=gt&&xe(Ot);if(!(!gt||!yt||ve(Ot,pt)>0)){var Ke={from:ut(Ot.line,Ot.ch),to:ct,tag:yt[2]};return gt=="selfClose"?{open:Ke,close:null,at:"open"}:yt[1]?{open:Ve(Ot,yt[2]),close:Ke,at:"close"}:(Ot=new He(Ne,ct.line,ct.ch,It),{open:Ke,close:We(Ot,yt[2]),at:"open"})}}},te.findEnclosingTag=function(Ne,pt,It,Ot){for(var gt=new He(Ne,pt.line,pt.ch,It);;){var ct=Ve(gt,Ot);if(!ct)break;var yt=new He(Ne,pt.line,pt.ch,It),Ke=We(yt,ct.tag);if(Ke)return{open:ct,close:Ke}}},te.scanForClosingTag=function(Ne,pt,It,Ot){var gt=new He(Ne,pt.line,pt.ch,Ot?{from:0,to:Ot}:null);return We(gt,It)}})},89780:function(rn){(function(jt,ie){rn.exports=ie()})(this,function(){"use strict";var jt=navigator.userAgent,ie=navigator.platform,te=/gecko\/\d/i.test(jt),ut=/MSIE \d/.test(jt),ve=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt),Je=/Edge\/(\d+)/.exec(jt),be=ut||ve||Je,Se=be&&(ut?document.documentMode||6:+(Je||ve)[1]),He=!Je&&/WebKit\//.test(jt),nt=He&&/Qt\/\d+\.\d+/.test(jt),Ie=!Je&&/Chrome\//.test(jt),fe=/Opera\//.test(jt),et=/Apple Computer/.test(navigator.vendor),xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(jt),wt=/PhantomJS/.test(jt),rt=!Je&&/AppleWebKit/.test(jt)&&/Mobile\/\w+/.test(jt),We=/Android/.test(jt),Ve=rt||We||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(jt),Ne=rt||/Mac/.test(ie),pt=/\bCrOS\b/.test(jt),It=/win/i.test(ie),Ot=fe&&jt.match(/Version\/(\d*\.\d*)/);Ot&&(Ot=Number(Ot[1])),Ot&&Ot>=15&&(fe=!1,He=!0);var gt=Ne&&(nt||fe&&(Ot==null||Ot<12.11)),ct=te||be&&Se>=9;function yt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var Ke=function(a,y){var x=a.className,b=yt(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function Bt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Fe(a,y){return Bt(a).appendChild(y)}function _e(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ne=0;ne<y.length;++ne)E.appendChild(y[ne]);return E}function ft(a,y,x,b){var E=_e(a,y,x,b);return E.setAttribute("role","presentation"),E}var Re;document.createRange?Re=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Re=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function lt(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 ot(){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 pe(a,y){var x=a.className;yt(y).test(x)||(a.className+=(x?" ":"")+y)}function St(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!yt(x[b]).test(y)&&(y+=" "+x[b]);return y}var ke=function(a){a.select()};rt?ke=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:be&&(ke=function(a){try{a.select()}catch(y){}});function Ct(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function qt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function Ce(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ne=b||0,ae=E||0;;){var ue=a.indexOf(" ",ne);if(ue<0||ue>=y)return ae+(y-ne);ae+=ue-ne,ae+=x-ae%x,ne=ue+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=Ct(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function mt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var en=50,Mt={toString:function(){return"CodeMirror.Pass"}},ze={scroll:!1},dt={origin:"*mouse"},bt={origin:"+move"};function un(a,y,x){for(var b=0,E=0;;){var ne=a.indexOf(" ",b);ne==-1&&(ne=a.length);var ae=ne-b;if(ne==a.length||E+ae>=y)return b+Math.min(ae,y-E);if(E+=ne-b,E+=x-E%x,b=ne+1,E>=y)return b}}var At=[""];function sn(a){for(;At.length<=a;)At.push(it(At)+" ");return At[a]}function it(a){return a[a.length-1]}function _t(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function ht(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function se(){}function ee(a,y){var x;return Object.create?x=Object.create(a):(se.prototype=a,x=new se),y&&qt(y,x),x}var z=/[\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()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function re(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Ee=/[\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 at(a){return a.charCodeAt(0)>=768&&Ee.test(a)}function Ht(a,y,x){for(;(x<0?y>0:y<a.length)&&at(a.charAt(y));)y+=x;return y}function Ye(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ne=b<0?Math.ceil(E):Math.floor(E);if(ne==y)return a(ne)?y:x;a(ne)?x=ne:y=ne+b}}function tt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ne=0;ne<a.length;++ne){var ae=a[ne];(ae.from<x&&ae.to>y||y==x&&ae.to==y)&&(b(Math.max(ae.from,y),Math.min(ae.to,x),ae.level==1?"rtl":"ltr",ne),E=!0)}E||b(y,x,"ltr")}var vt=null;function Rt(a,y,x){var b;vt=null;for(var E=0;E<a.length;++E){var ne=a[E];if(ne.from<y&&ne.to>y)return E;ne.to==y&&(ne.from!=ne.to&&x=="before"?b=E:vt=E),ne.from==y&&(ne.from!=ne.to&&x!="before"?b=E:vt=E)}return b!=null?b:vt}var Dt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ne=/[LRr]/,ae=/[Lb1n]/,ue=/[1n]/;function ce(he,Ae,Xe){this.level=he,this.from=Ae,this.to=Xe}return function(he,Ae){var Xe=Ae=="ltr"?"L":"R";if(he.length==0||Ae=="ltr"&&!b.test(he))return!1;for(var Pt=he.length,xt=[],nn=0;nn<Pt;++nn)xt.push(x(he.charCodeAt(nn)));for(var bn=0,Rn=Xe;bn<Pt;++bn){var Un=xt[bn];Un=="m"?xt[bn]=Rn:Rn=Un}for(var tr=0,_n=Xe;tr<Pt;++tr){var or=xt[tr];or=="1"&&_n=="r"?xt[tr]="n":ne.test(or)&&(_n=or,or=="r"&&(xt[tr]="R"))}for(var gr=1,hr=xt[0];gr<Pt-1;++gr){var Tr=xt[gr];Tr=="+"&&hr=="1"&&xt[gr+1]=="1"?xt[gr]="1":Tr==","&&hr==xt[gr+1]&&(hr=="1"||hr=="n")&&(xt[gr]=hr),hr=Tr}for(var Yr=0;Yr<Pt;++Yr){var mi=xt[Yr];if(mi==",")xt[Yr]="N";else if(mi=="%"){var Qr=void 0;for(Qr=Yr+1;Qr<Pt&&xt[Qr]=="%";++Qr);for(var $i=Yr&&xt[Yr-1]=="!"||Qr<Pt&&xt[Qr]=="1"?"1":"N",Ti=Yr;Ti<Qr;++Ti)xt[Ti]=$i;Yr=Qr-1}}for(var ai=0,Ai=Xe;ai<Pt;++ai){var bi=xt[ai];Ai=="L"&&bi=="1"?xt[ai]="L":ne.test(bi)&&(Ai=bi)}for(var di=0;di<Pt;++di)if(E.test(xt[di])){var si=void 0;for(si=di+1;si<Pt&&E.test(xt[si]);++si);for(var ei=(di?xt[di-1]:Xe)=="L",Bi=(si<Pt?xt[si]:Xe)=="L",Vo=ei==Bi?ei?"L":"R":Xe,bo=di;bo<si;++bo)xt[bo]=Vo;di=si-1}for(var Si=[],ro,vi=0;vi<Pt;)if(ae.test(xt[vi])){var bs=vi;for(++vi;vi<Pt&&ae.test(xt[vi]);++vi);Si.push(new ce(0,bs,vi))}else{var so=vi,Po=Si.length,Do=Ae=="rtl"?1:0;for(++vi;vi<Pt&&xt[vi]!="L";++vi);for(var Mi=so;Mi<vi;)if(ue.test(xt[Mi])){so<Mi&&(Si.splice(Po,0,new ce(1,so,Mi)),Po+=Do);var Uo=Mi;for(++Mi;Mi<vi&&ue.test(xt[Mi]);++Mi);Si.splice(Po,0,new ce(2,Uo,Mi)),Po+=Do,so=Mi}else++Mi;so<vi&&Si.splice(Po,0,new ce(1,so,vi))}return Ae=="ltr"&&(Si[0].level==1&&(ro=he.match(/^\s+/))&&(Si[0].from=ro[0].length,Si.unshift(new ce(0,0,ro[0].length))),it(Si).level==1&&(ro=he.match(/\s+$/))&&(it(Si).to-=ro[0].length,Si.push(new ce(0,Pt-ro[0].length,Pt)))),Ae=="rtl"?Si.reverse():Si}}();function Jt(a,y){var x=a.order;return x==null&&(x=a.order=Dt(a.text,y)),x}var Xt=[],Zt=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||Xt).concat(x)}};function En(a,y){return a._handlers&&a._handlers[y]||Xt}function cn(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var ne=mt(E,x);ne>-1&&(b[y]=E.slice(0,ne).concat(E.slice(ne+1)))}}}function wn(a,y){var x=En(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function kt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),wn(a,x||y.type,a,y),Nt(y)||y.codemirrorIgnore}function Pn(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)mt(x,y[b])==-1&&x.push(y[b])}function Qt(a,y){return En(a,y).length>0}function Pe(a){a.prototype.on=function(y,x){Zt(this,y,x)},a.prototype.off=function(y,x){cn(this,y,x)}}function Qe(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Lt(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Nt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function we(a){Qe(a),Lt(a)}function $e(a){return a.target||a.srcElement}function st(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ne&&a.ctrlKey&&y==1&&(y=3),y}var Tt=function(){if(be&&Se<9)return!1;var a=_e("div");return"draggable"in a||"dragDrop"in a}(),zt;function on(a){if(zt==null){var y=_e("span","\u200B");Fe(a,_e("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(zt=y.offsetWidth<=1&&y.offsetHeight>2&&!(be&&Se<8))}var x=zt?_e("span","\u200B"):_e("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Dn;function In(a){if(Dn!=null)return Dn;var y=Fe(a,document.createTextNode("A\u062EA")),x=Re(y,0,1).getBoundingClientRect(),b=Re(y,1,2).getBoundingClientRect();return Bt(a),!x||x.left==x.right?!1:Dn=b.right-x.right<3}var dn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
|
|
|
`,y);E==-1&&(E=a.length);var ne=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ae=ne.indexOf("\r");ae!=-1?(x.push(ne.slice(0,ae)),y+=ae+1):(x.push(ne),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},xn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},fn=function(){var a=_e("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),$n=null;function gn(a){if($n!=null)return $n;var y=Fe(a,_e("span","x")),x=y.getBoundingClientRect(),b=Re(y,0,1).getBoundingClientRect();return $n=Math.abs(x.left-b.left)>1}var hn={},Yt={};function Mn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),hn[a]=y}function pn(a,y){Yt[a]=y}function On(a){if(typeof a=="string"&&Yt.hasOwnProperty(a))a=Yt[a];else if(a&&typeof a.name=="string"&&Yt.hasOwnProperty(a.name)){var y=Yt[a.name];typeof y=="string"&&(y={name:y}),a=ee(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return On("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return On("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Gn(a,y){y=On(y);var x=hn[y.name];if(!x)return Gn(a,"text/plain");var b=x(a,y);if(Zn.hasOwnProperty(y.name)){var E=Zn[y.name];for(var ne in E)E.hasOwnProperty(ne)&&(b.hasOwnProperty(ne)&&(b["_"+ne]=b[ne]),b[ne]=E[ne])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ae in y.modeProps)b[ae]=y.modeProps[ae];return b}var Zn={};function Bn(a,y){var x=Zn.hasOwnProperty(a)?Zn[a]:Zn[a]={};qt(y,x)}function Xn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Nn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function ar(a,y,x){return a.startState?a.startState(y,x):!0}var qn=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};qn.prototype.eol=function(){return this.pos>=this.string.length},qn.prototype.sol=function(){return this.pos==this.lineStart},qn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qn.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},qn.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},qn.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},qn.prototype.skipToEnd=function(){this.pos=this.string.length},qn.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},qn.prototype.backUp=function(a){this.pos-=a},qn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},qn.prototype.indentation=function(){return Ce(this.string,null,this.tabSize)-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},qn.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(ae){return x?ae.toLowerCase():ae},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var ne=this.string.slice(this.pos).match(a);return ne&&ne.index>0?null:(ne&&y!==!1&&(this.pos+=ne[0].length),ne)}},qn.prototype.current=function(){return this.string.slice(this.start,this.pos)},qn.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},qn.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},qn.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Et(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ne=E.chunkSize();if(y<ne){x=E;break}y-=ne}return x.lines[y]}function Ut(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ne){var ae=ne.text;E==x.line&&(ae=ae.slice(0,x.ch)),E==y.line&&(ae=ae.slice(y.ch)),b.push(ae),++E}),b}function zn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function nr(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function De(a){if(a.parent==null)return null;for(var y=a.parent,x=mt(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function Ue(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ne=E.height;if(y<ne){a=E;continue e}y-=ne,x+=E.chunkSize()}return x}while(!a.lines);for(var ae=0;ae<a.lines.length;++ae){var ue=a.lines[ae],ce=ue.height;if(y<ce)break;y-=ce}return x+ae}function ge(a,y){return y>=a.first&&y<a.first+a.size}function Me(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function ye(a,y,x){if(x===void 0&&(x=null),!(this instanceof ye))return new ye(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Le(a,y){return a.line-y.line||a.ch-y.ch}function me(a,y){return a.sticky==y.sticky&&Le(a,y)==0}function Be(a){return ye(a.line,a.ch)}function Ze(a,y){return Le(a,y)<0?y:a}function qe(a,y){return Le(a,y)<0?a:y}function je(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Oe(a,y){if(y.line<a.first)return ye(a.first,0);var x=a.first+a.size-1;return y.line>x?ye(x,Et(a,x).text.length):Te(y,Et(a,y.line).text.length)}function Te(a,y){var x=a.ch;return x==null||x>y?ye(a.line,y):x<0?ye(a.line,0):a}function Ge(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Oe(a,y[b]);return x}var $t=function(a,y){this.state=a,this.lookAhead=y},Ft=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};Ft.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Ft.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}},Ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ft.fromSaved=function(a,y,x){return y instanceof $t?new Ft(a,Xn(a.mode,y.state),x,y.lookAhead):new Ft(a,Xn(a.mode,y),x)},Ft.prototype.save=function(a){var y=a!==!1?Xn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new $t(y,this.maxLookAhead):y};function Wt(a,y,x,b){var E=[a.state.modeGen],ne={};Vn(a,y.text,a.doc.mode,x,function(he,Ae){return E.push(he,Ae)},ne,b);for(var ae=x.state,ue=function(he){x.baseTokens=E;var Ae=a.state.overlays[he],Xe=1,Pt=0;x.state=!0,Vn(a,y.text,Ae.mode,x,function(xt,nn){for(var bn=Xe;Pt<xt;){var Rn=E[Xe];Rn>xt&&E.splice(Xe,1,xt,E[Xe+1],Rn),Xe+=2,Pt=Math.min(xt,Rn)}if(nn)if(Ae.opaque)E.splice(bn,Xe-bn,xt,"overlay "+nn),Xe=bn+2;else for(;bn<Xe;bn+=2){var Un=E[bn+1];E[bn+1]=(Un?Un+" ":"")+"overlay "+nn}},ne),x.state=ae,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)ue(ce);return{styles:E,classes:ne.bgClass||ne.textClass?ne:null}}function kn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Tn(a,De(y)),E=y.text.length>a.options.maxHighlightLength&&Xn(a.doc.mode,b.state),ne=Wt(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ne.styles,ne.classes?y.styleClasses=ne.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Tn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new Ft(b,!0,y);var ne=Kn(a,y,x),ae=ne>b.first&&Et(b,ne-1).stateAfter,ue=ae?Ft.fromSaved(b,ae,ne):new Ft(b,ar(b.mode),ne);return b.iter(ne,y,function(ce){Hn(a,ce.text,ue);var he=ue.line;ce.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?ue.save():null,ue.nextLine()}),x&&(b.modeFrontier=ue.line),ue}function Hn(a,y,x,b){var E=a.doc.mode,ne=new qn(y,a.options.tabSize,x);for(ne.start=ne.pos=b||0,y==""&&Sn(E,x.state);!ne.eol();)mn(E,ne,x.state),ne.start=ne.pos}function Sn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Nn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function mn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Nn(a,x).mode);var ne=a.token(y,x);if(y.pos>y.start)return ne}throw new Error("Mode "+a.name+" failed to advance stream.")}var Cn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Fn(a,y,x,b){var E=a.doc,ne=E.mode,ae;y=Oe(E,y);var ue=Et(E,y.line),ce=Tn(a,y.line,x),he=new qn(ue.text,a.options.tabSize,ce),Ae;for(b&&(Ae=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,ae=mn(ne,he,ce.state),b&&Ae.push(new Cn(he,ae,Xn(E.mode,ce.state)));return b?Ae:new Cn(he,ae,ce.state)}function Yn(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function Vn(a,y,x,b,E,ne,ae){var ue=x.flattenSpans;ue==null&&(ue=a.options.flattenSpans);var ce=0,he=null,Ae=new qn(y,a.options.tabSize,b),Xe,Pt=a.options.addModeClass&&[null];for(y==""&&Yn(Sn(x,b.state),ne);!Ae.eol();){if(Ae.pos>a.options.maxHighlightLength?(ue=!1,ae&&Hn(a,y,b,Ae.pos),Ae.pos=y.length,Xe=null):Xe=Yn(mn(x,Ae,b.state,Pt),ne),Pt){var xt=Pt[0].name;xt&&(Xe="m-"+(Xe?xt+" "+Xe:xt))}if(!ue||he!=Xe){for(;ce<Ae.start;)ce=Math.min(Ae.start,ce+5e3),E(ce,he);he=Xe}Ae.start=Ae.pos}for(;ce<Ae.pos;){var nn=Math.min(Ae.pos,ce+5e3);E(nn,he),ce=nn}}function Kn(a,y,x){for(var b,E,ne=a.doc,ae=x?-1:y-(a.doc.mode.innerMode?1e3:100),ue=y;ue>ae;--ue){if(ue<=ne.first)return ne.first;var ce=Et(ne,ue-1),he=ce.stateAfter;if(he&&(!x||ue+(he instanceof $t?he.lookAhead:0)<=ne.modeFrontier))return ue;var Ae=Ce(ce.text,null,a.options.tabSize);(E==null||b>Ae)&&(E=ue-1,b=Ae)}return E}function vn(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=Et(a,b).stateAfter;if(E&&(!(E instanceof $t)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var er=!1,Wn=!1;function dr(){er=!0}function pr(){Wn=!0}function lr(a,y,x){this.marker=a,this.from=y,this.to=x}function ur(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function yr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function sr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function fr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ne=a[E],ae=ne.marker,ue=ne.from==null||(ae.inclusiveLeft?ne.from<=y:ne.from<y);if(ue||ne.from==y&&ae.type=="bookmark"&&(!x||!ne.marker.insertLeft)){var ce=ne.to==null||(ae.inclusiveRight?ne.to>=y:ne.to>y);(b||(b=[])).push(new lr(ae,ne.from,ce?null:ne.to))}}return b}function Qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ne=a[E],ae=ne.marker,ue=ne.to==null||(ae.inclusiveRight?ne.to>=y:ne.to>y);if(ue||ne.from==y&&ae.type=="bookmark"&&(!x||ne.marker.insertLeft)){var ce=ne.from==null||(ae.inclusiveLeft?ne.from<=y:ne.from<y);(b||(b=[])).push(new lr(ae,ce?null:ne.from-y,ne.to==null?null:ne.to-y))}}return b}function mr(a,y){if(y.full)return null;var x=ge(a,y.from.line)&&Et(a,y.from.line).markedSpans,b=ge(a,y.to.line)&&Et(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ne=y.to.ch,ae=Le(y.from,y.to)==0,ue=fr(x,E,ae),ce=Qn(b,ne,ae),he=y.text.length==1,Ae=it(y.text).length+(he?E:0);if(ue)for(var Xe=0;Xe<ue.length;++Xe){var Pt=ue[Xe];if(Pt.to==null){var xt=ur(ce,Pt.marker);xt?he&&(Pt.to=xt.to==null?null:xt.to+Ae):Pt.to=E}}if(ce)for(var nn=0;nn<ce.length;++nn){var bn=ce[nn];if(bn.to!=null&&(bn.to+=Ae),bn.from==null){var Rn=ur(ue,bn.marker);Rn||(bn.from=Ae,he&&(ue||(ue=[])).push(bn))}else bn.from+=Ae,he&&(ue||(ue=[])).push(bn)}ue&&(ue=br(ue)),ce&&ce!=ue&&(ce=br(ce));var Un=[ue];if(!he){var tr=y.text.length-2,_n;if(tr>0&&ue)for(var or=0;or<ue.length;++or)ue[or].to==null&&(_n||(_n=[])).push(new lr(ue[or].marker,null,null));for(var gr=0;gr<tr;++gr)Un.push(_n);Un.push(ce)}return Un}function br(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Hr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(xt){if(xt.markedSpans)for(var nn=0;nn<xt.markedSpans.length;++nn){var bn=xt.markedSpans[nn].marker;bn.readOnly&&(!b||mt(b,bn)==-1)&&(b||(b=[])).push(bn)}}),!b)return null;for(var E=[{from:y,to:x}],ne=0;ne<b.length;++ne)for(var ae=b[ne],ue=ae.find(0),ce=0;ce<E.length;++ce){var he=E[ce];if(!(Le(he.to,ue.from)<0||Le(he.from,ue.to)>0)){var Ae=[ce,1],Xe=Le(he.from,ue.from),Pt=Le(he.to,ue.to);(Xe<0||!ae.inclusiveLeft&&!Xe)&&Ae.push({from:he.from,to:ue.from}),(Pt>0||!ae.inclusiveRight&&!Pt)&&Ae.push({from:ue.to,to:he.to}),E.splice.apply(E,Ae),ce+=Ae.length-3}}return E}function Er(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Ar(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function kr(a){return a.inclusiveLeft?-1:0}function Pr(a){return a.inclusiveRight?1:0}function ir(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ne=Le(b.from,E.from)||kr(a)-kr(y);if(ne)return-ne;var ae=Le(b.to,E.to)||Pr(a)-Pr(y);return ae||y.id-a.id}function rr(a,y){var x=Wn&&a.markedSpans,b;if(x)for(var E=void 0,ne=0;ne<x.length;++ne)E=x[ne],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ir(b,E.marker)<0)&&(b=E.marker);return b}function Jn(a){return rr(a,!0)}function Kt(a){return rr(a,!1)}function ln(a,y){var x=Wn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ne=x[E];ne.marker.collapsed&&(ne.from==null||ne.from<y)&&(ne.to==null||ne.to>y)&&(!b||ir(b,ne.marker)<0)&&(b=ne.marker)}return b}function an(a,y,x,b,E){var ne=Et(a,y),ae=Wn&&ne.markedSpans;if(ae)for(var ue=0;ue<ae.length;++ue){var ce=ae[ue];if(ce.marker.collapsed){var he=ce.marker.find(0),Ae=Le(he.from,x)||kr(ce.marker)-kr(E),Xe=Le(he.to,b)||Pr(ce.marker)-Pr(E);if(!(Ae>=0&&Xe<=0||Ae<=0&&Xe>=0)&&(Ae<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Le(he.to,x)>=0:Le(he.to,x)>0)||Ae>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Le(he.from,b)<=0:Le(he.from,b)<0)))return!0}}}function Gt(a){for(var y;y=Jn(a);)a=y.find(-1,!0).line;return a}function An(a){for(var y;y=Kt(a);)a=y.find(1,!0).line;return a}function jn(a){for(var y,x;y=Kt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function tn(a,y){var x=Et(a,y),b=Gt(x);return x==b?y:De(b)}function Vt(a,y){if(y>a.lastLine())return y;var x=Et(a,y),b;if(!yn(a,x))return y;for(;b=Kt(x);)x=b.find(1,!0).line;return De(x)+1}function yn(a,y){var x=Wn&&y.markedSpans;if(x){for(var b=void 0,E=0;E<x.length;++E)if(b=x[E],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&Ln(a,y,b))return!0}}}function Ln(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Ln(a,b.line,ur(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ne=0;ne<y.markedSpans.length;++ne)if(E=y.markedSpans[ne],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&Ln(a,y,E))return!0}function cr(a){a=Gt(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var ne=x.parent;ne;x=ne,ne=x.parent)for(var ae=0;ae<ne.children.length;++ae){var ue=ne.children[ae];if(ue==x)break;y+=ue.height}return y}function Lr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Jn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Kt(b);){var ne=x.find(0,!0);y-=b.text.length-ne.from.ch,b=ne.to.line,y+=b.text.length-ne.to.ch}return y}function Ir(a){var y=a.display,x=a.doc;y.maxLine=Et(x,x.first),y.maxLineLength=Lr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Lr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Rr=function(a,y,x){this.text=a,Ar(this,y),this.height=x?x(this):1};Rr.prototype.lineNo=function(){return De(this)},Pe(Rr);function Br(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Er(a),Ar(a,x);var E=b?b(a):1;E!=a.height&&nr(a,E)}function Fr(a){a.parent=null,Er(a)}var Vr={},Wr={};function Kr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Wr:Vr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ti(a,y){var x=ft("span",null,null,He?"padding-right: .1px":null),b={pre:ft("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ne=E?y.rest[E-1]:y.line,ae=void 0;b.pos=0,b.addToken=Ni,In(a.display.measure)&&(ae=Jt(ne,a.doc.direction))&&(b.addToken=li(b.addToken,ae)),b.map=[];var ue=y!=a.display.externalMeasured&&De(ne);$r(ne,b,kn(a,ne,ue)),ne.styleClasses&&(ne.styleClasses.bgClass&&(b.bgClass=St(ne.styleClasses.bgClass,b.bgClass||"")),ne.styleClasses.textClass&&(b.textClass=St(ne.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(on(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(He){var ce=b.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return wn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=St(b.pre.className,b.textClass||"")),b}function Ei(a){var y=_e("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ni(a,y,x,b,E,ne,ae){if(y){var ue=a.splitSpaces?xi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,he=!1,Ae;if(!ce.test(y))a.col+=y.length,Ae=document.createTextNode(ue),a.map.push(a.pos,a.pos+y.length,Ae),be&&Se<9&&(he=!0),a.pos+=y.length;else{Ae=document.createDocumentFragment();for(var Xe=0;;){ce.lastIndex=Xe;var Pt=ce.exec(y),xt=Pt?Pt.index-Xe:y.length-Xe;if(xt){var nn=document.createTextNode(ue.slice(Xe,Xe+xt));be&&Se<9?Ae.appendChild(_e("span",[nn])):Ae.appendChild(nn),a.map.push(a.pos,a.pos+xt,nn),a.col+=xt,a.pos+=xt}if(!Pt)break;Xe+=xt+1;var bn=void 0;if(Pt[0]==" "){var Rn=a.cm.options.tabSize,Un=Rn-a.col%Rn;bn=Ae.appendChild(_e("span",sn(Un),"cm-tab")),bn.setAttribute("role","presentation"),bn.setAttribute("cm-text"," "),a.col+=Un}else Pt[0]=="\r"||Pt[0]==`
|
|
|
`?(bn=Ae.appendChild(_e("span",Pt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),bn.setAttribute("cm-text",Pt[0]),a.col+=1):(bn=a.cm.options.specialCharPlaceholder(Pt[0]),bn.setAttribute("cm-text",Pt[0]),be&&Se<9?Ae.appendChild(_e("span",[bn])):Ae.appendChild(bn),a.col+=1);a.map.push(a.pos,a.pos+1,bn),a.pos++}}if(a.trailingSpace=ue.charCodeAt(y.length-1)==32,x||b||E||he||ne||ae){var tr=x||"";b&&(tr+=b),E&&(tr+=E);var _n=_e("span",[Ae],tr,ne);if(ae)for(var or in ae)ae.hasOwnProperty(or)&&or!="style"&&or!="class"&&_n.setAttribute(or,ae[or]);return a.content.appendChild(_n)}a.content.appendChild(Ae)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ne=a.charAt(E);ne==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ne="\xA0"),b+=ne,x=ne==" "}return b}function li(a,y){return function(x,b,E,ne,ae,ue,ce){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,Ae=he+b.length;;){for(var Xe=void 0,Pt=0;Pt<y.length&&(Xe=y[Pt],!(Xe.to>he&&Xe.from<=he));Pt++);if(Xe.to>=Ae)return a(x,b,E,ne,ae,ue,ce);a(x,b.slice(0,Xe.to-he),E,ne,null,ue,ce),ne=null,b=b.slice(Xe.to-he),he=Xe.to}}}function Ri(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function $r(a,y,x){var b=a.markedSpans,E=a.text,ne=0;if(!b){for(var ae=1;ae<x.length;ae+=2)y.addToken(y,E.slice(ne,ne=x[ae]),Kr(x[ae+1],y.cm.options));return}for(var ue=E.length,ce=0,he=1,Ae="",Xe,Pt,xt=0,nn,bn,Rn,Un,tr;;){if(xt==ce){nn=bn=Rn=Pt="",tr=null,Un=null,xt=1/0;for(var _n=[],or=void 0,gr=0;gr<b.length;++gr){var hr=b[gr],Tr=hr.marker;if(Tr.type=="bookmark"&&hr.from==ce&&Tr.widgetNode)_n.push(Tr);else if(hr.from<=ce&&(hr.to==null||hr.to>ce||Tr.collapsed&&hr.to==ce&&hr.from==ce)){if(hr.to!=null&&hr.to!=ce&&xt>hr.to&&(xt=hr.to,bn=""),Tr.className&&(nn+=" "+Tr.className),Tr.css&&(Pt=(Pt?Pt+";":"")+Tr.css),Tr.startStyle&&hr.from==ce&&(Rn+=" "+Tr.startStyle),Tr.endStyle&&hr.to==xt&&(or||(or=[])).push(Tr.endStyle,hr.to),Tr.title&&((tr||(tr={})).title=Tr.title),Tr.attributes)for(var Yr in Tr.attributes)(tr||(tr={}))[Yr]=Tr.attributes[Yr];Tr.collapsed&&(!Un||ir(Un.marker,Tr)<0)&&(Un=hr)}else hr.from>ce&&xt>hr.from&&(xt=hr.from)}if(or)for(var mi=0;mi<or.length;mi+=2)or[mi+1]==xt&&(bn+=" "+or[mi]);if(!Un||Un.from==ce)for(var Qr=0;Qr<_n.length;++Qr)Ri(y,0,_n[Qr]);if(Un&&(Un.from||0)==ce){if(Ri(y,(Un.to==null?ue+1:Un.to)-ce,Un.marker,Un.from==null),Un.to==null)return;Un.to==ce&&(Un=!1)}}if(ce>=ue)break;for(var $i=Math.min(ue,xt);;){if(Ae){var Ti=ce+Ae.length;if(!Un){var ai=Ti>$i?Ae.slice(0,$i-ce):Ae;y.addToken(y,ai,Xe?Xe+nn:nn,Rn,ce+ai.length==xt?bn:"",Pt,tr)}if(Ti>=$i){Ae=Ae.slice($i-ce),ce=$i;break}ce=Ti,Rn=""}Ae=E.slice(ne,ne=x[he++]),Xe=Kr(x[he++],y.cm.options)}}}function _i(a,y,x){this.line=y,this.rest=jn(y),this.size=this.rest?De(it(this.rest))-x+1:1,this.node=this.text=null,this.hidden=yn(a,y)}function qr(a,y,x){for(var b=[],E,ne=y;ne<x;ne=E){var ae=new _i(a.doc,Et(a.doc,ne),ne);E=ne+ae.size,b.push(ae)}return b}var xr=null;function zr(a){xr?xr.ops.push(a):a.ownsGroup=xr={ops:[a],delayedCallbacks:[]}}function Gr(a){var y=a.delayedCallbacks,x=0;do{for(;x<y.length;x++)y[x].call(null);for(var b=0;b<a.ops.length;b++){var E=a.ops[b];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(x<y.length)}function wr(a,y){var x=a.ownsGroup;if(x)try{Gr(x)}finally{xr=null,y(x)}}var Nr=null;function Or(a,y){var x=En(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;xr?E=xr.delayedCallbacks:Nr?E=Nr:(E=Nr=[],setTimeout(ui,0));for(var ne=function(ue){E.push(function(){return x[ue].apply(null,b)})},ae=0;ae<x.length;++ae)ne(ae)}}function ui(){var a=Nr;Nr=null;for(var y=0;y<a.length;++y)a[y]()}function Pi(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ne=y.changes[E];ne=="text"?lo(a,y):ne=="gutter"?Mr(a,y,x,b):ne=="class"?vr(a,y):ne=="widget"&&Cr(a,y,b)}y.changes=null}function fi(a){return a.node==a.text&&(a.node=_e("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),be&&Se<8&&(a.node.style.zIndex=2)),a.node}function ni(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=fi(y);y.background=b.insertBefore(_e("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ti(a,y)}function lo(a,y){var x=y.text.className,b=xo(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,vr(a,y)):x&&(y.text.className=x)}function vr(a,y){ni(a,y),y.line.wrapClass?fi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function Mr(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=fi(y);y.gutterBackground=_e("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ne=y.line.gutterMarkers;if(a.options.lineNumbers||ne){var ae=fi(y),ue=y.gutter=_e("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ue),ae.insertBefore(ue,y.text),y.line.gutterClass&&(ue.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ne||!ne["CodeMirror-linenumbers"])&&(y.lineNumber=ue.appendChild(_e("div",Me(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ne)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=a.display.gutterSpecs[ce].className,Ae=ne.hasOwnProperty(he)&&ne[he];Ae&&ue.appendChild(_e("div",[Ae],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Cr(a,y,x){y.alignable&&(y.alignable=null);for(var b=yt("CodeMirror-linewidget"),E=y.node.firstChild,ne=void 0;E;E=ne)ne=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);jr(a,y,x)}function Sr(a,y,x,b){var E=xo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),vr(a,y),Mr(a,y,x,b),jr(a,y,b),y.node}function jr(a,y,x){if(Xr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Xr(a,y.rest[b],y,x,!1)}function Xr(a,y,x,b,E){if(y.widgets)for(var ne=fi(x),ae=0,ue=y.widgets;ae<ue.length;++ae){var ce=ue[ae],he=_e("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Ki(ce,he,x,b),a.display.input.setUneditable(he),E&&ce.above?ne.insertBefore(he,x.gutter||x.text):ne.appendChild(he),Or(ce,"redraw")}}function Ki(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function ki(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!lt(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),Fe(y.display.measure,_e("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function gi(a,y){for(var x=$e(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function ri(a){return a.lineSpace.offsetTop}function Gi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function eo(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Fe(a.measure,_e("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Fi(a){return en-a.display.nativeBarWidth}function to(a){return a.display.scroller.clientWidth-Fi(a)-a.display.barWidth}function io(a){return a.display.scroller.clientHeight-Fi(a)-a.display.barHeight}function Xi(a,y,x){var b=a.options.lineWrapping,E=b&&to(a);if(!y.measure.heights||b&&y.measure.width!=E){var ne=y.measure.heights=[];if(b){y.measure.width=E;for(var ae=y.text.firstChild.getClientRects(),ue=0;ue<ae.length-1;ue++){var ce=ae[ue],he=ae[ue+1];Math.abs(ce.bottom-he.bottom)>2&&ne.push((ce.bottom+he.top)/2-x.top)}}ne.push(x.bottom-x.top)}}function Lo(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(De(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=Gt(y);var x=De(y),b=a.display.externalMeasured=new _i(a.doc,y,x);b.lineN=x;var E=b.built=ti(a,b);return b.text=E.pre,Fe(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Vi(a,uo(a,y),x,b)}function no(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=De(y),b=no(a,x);b&&!b.text?b=null:b&&b.changes&&(Pi(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=Ga(a,y));var E=Lo(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Vi(a,y,x,b,E){y.before&&(x=-1);var ne=x+(b||""),ae;return y.cache.hasOwnProperty(ne)?ae=y.cache[ne]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Xi(a,y.view,y.rect),y.hasHeights=!0),ae=Ca(a,y,x,b),ae.bogus||(y.cache[ne]=ae)),{left:ae.left,right:ae.right,top:E?ae.rtop:ae.top,bottom:E?ae.rbottom:ae.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ne,ae,ue,ce,he=0;he<a.length;he+=3)if(ue=a[he],ce=a[he+1],y<ue?(E=0,ne=1,ae="left"):y<ce?(E=y-ue,ne=E+1):(he==a.length-3||y==ce&&a[he+3]>y)&&(ne=ce-ue,E=ne-1,y>=ce&&(ae="right")),E!=null){if(b=a[he+2],ue==ce&&x==(b.insertLeft?"left":"right")&&(ae=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],ae="left";if(x=="right"&&E==ce-ue)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],ae="right";break}return{node:b,start:E,end:ne,collapse:ae,coverStart:ue,coverEnd:ce}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function Ca(a,y,x,b){var E=xa(y.map,x,b),ne=E.node,ae=E.start,ue=E.end,ce=E.collapse,he;if(ne.nodeType==3){for(var Ae=0;Ae<4;Ae++){for(;ae&&at(y.line.text.charAt(E.coverStart+ae));)--ae;for(;E.coverStart+ue<E.coverEnd&&at(y.line.text.charAt(E.coverStart+ue));)++ue;if(be&&Se<9&&ae==0&&ue==E.coverEnd-E.coverStart?he=ne.parentNode.getBoundingClientRect():he=Va(Re(ne,ae,ue).getClientRects(),b),he.left||he.right||ae==0)break;ue=ae,ae=ae-1,ce="right"}be&&Se<11&&(he=Ua(a.display.measure,he))}else{ae>0&&(ce=b="right");var Xe;a.options.lineWrapping&&(Xe=ne.getClientRects()).length>1?he=Xe[b=="right"?Xe.length-1:0]:he=ne.getBoundingClientRect()}if(be&&Se<9&&!ae&&(!he||!he.left&&!he.right)){var Pt=ne.parentNode.getClientRects()[0];Pt?he={left:Pt.left,right:Pt.left+Ji(a.display),top:Pt.top,bottom:Pt.bottom}:he=ba}for(var xt=he.top-y.rect.top,nn=he.bottom-y.rect.top,bn=(xt+nn)/2,Rn=y.view.measure.heights,Un=0;Un<Rn.length-1&&!(bn<Rn[Un]);Un++);var tr=Un?Rn[Un-1]:0,_n=Rn[Un],or={left:(ce=="right"?he.right:he.left)-y.rect.left,right:(ce=="left"?he.left:he.right)-y.rect.left,top:tr,bottom:_n};return!he.left&&!he.right&&(or.bogus=!0),a.options.singleCursorHeightPerLine||(or.rtop=xt,or.rbottom=nn),or}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gn(a))return y;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*x,right:y.right*x,top:y.top*b,bottom:y.bottom*b}}function _o(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 Ko(a){a.display.externalMeasure=null,Bt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)_o(a.display.view[y])}function Co(a){Ko(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Xo(){return Ie&&We?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wa(){return Ie&&We?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=ki(a.widgets[x]));return y}function Oo(a,y,x,b,E){if(!E){var ne=Yo(y);x.top+=ne,x.bottom+=ne}if(b=="line")return x;b||(b="local");var ae=cr(y);if(b=="local"?ae+=ri(a.display):ae-=a.display.viewOffset,b=="page"||b=="window"){var ue=a.display.lineSpace.getBoundingClientRect();ae+=ue.top+(b=="window"?0:wa());var ce=ue.left+(b=="window"?0:Xo());x.left+=ce,x.right+=ce}return x.top+=ae,x.bottom+=ae,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=wa();else if(x=="local"||!x){var ne=a.display.sizer.getBoundingClientRect();b+=ne.left,E+=ne.top}var ae=a.display.lineSpace.getBoundingClientRect();return{left:b-ae.left,top:E-ae.top}}function To(a,y,x,b,E){return b||(b=Et(a.doc,y.line)),Oo(a,b,ya(a,b,y.ch,E),x)}function Di(a,y,x,b,E,ne){b=b||Et(a.doc,y.line),E||(E=uo(a,b));function ae(nn,bn){var Rn=Vi(a,E,nn,bn?"right":"left",ne);return bn?Rn.left=Rn.right:Rn.right=Rn.left,Oo(a,b,Rn,x)}var ue=Jt(b,a.doc.direction),ce=y.ch,he=y.sticky;if(ce>=b.text.length?(ce=b.text.length,he="before"):ce<=0&&(ce=0,he="after"),!ue)return ae(he=="before"?ce-1:ce,he=="before");function Ae(nn,bn,Rn){var Un=ue[bn],tr=Un.level==1;return ae(Rn?nn-1:nn,tr!=Rn)}var Xe=Rt(ue,ce,he),Pt=vt,xt=Ae(ce,Xe,he=="before");return Pt!=null&&(xt.other=Ae(ce,Pt,he!="before")),xt}function Zr(a,y){var x=0;y=Oe(a.doc,y),a.options.lineWrapping||(x=Ji(a.display)*y.ch);var b=Et(a.doc,y.line),E=cr(b)+ri(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Dr(a,y,x,b,E){var ne=ye(a,y,x);return ne.xRel=E,b&&(ne.outside=b),ne}function yi(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Dr(b.first,0,null,-1,-1);var E=Ue(b,x),ne=b.first+b.size-1;if(E>ne)return Dr(b.first+b.size-1,Et(b,ne).text.length,null,1,1);y<0&&(y=0);for(var ae=Et(b,E);;){var ue=Yi(a,ae,E,y,x),ce=ln(ae,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!ce)return ue;var he=ce.find(1);if(he.line==E)return he;ae=Et(b,E=he.line)}}function Ci(a,y,x,b){b-=Yo(y);var E=y.text.length,ne=Ye(function(ae){return Vi(a,x,ae-1).bottom<=b},E,0);return E=Ye(function(ae){return Vi(a,x,ae).top>b},ne,E),{begin:ne,end:E}}function ii(a,y,x,b){x||(x=uo(a,y));var E=Oo(a,y,Vi(a,x,b),"line").top;return Ci(a,y,x,E)}function ci(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Yi(a,y,x,b,E){E-=cr(y);var ne=uo(a,y),ae=Yo(y),ue=0,ce=y.text.length,he=!0,Ae=Jt(y,a.doc.direction);if(Ae){var Xe=(a.options.lineWrapping?oo:Ui)(a,y,x,ne,Ae,b,E);he=Xe.level!=1,ue=he?Xe.from:Xe.to-1,ce=he?Xe.to:Xe.from-1}var Pt=null,xt=null,nn=Ye(function(gr){var hr=Vi(a,ne,gr);return hr.top+=ae,hr.bottom+=ae,ci(hr,b,E,!1)?(hr.top<=E&&hr.left<=b&&(Pt=gr,xt=hr),!0):!1},ue,ce),bn,Rn,Un=!1;if(xt){var tr=b-xt.left<xt.right-b,_n=tr==he;nn=Pt+(_n?0:1),Rn=_n?"after":"before",bn=tr?xt.left:xt.right}else{!he&&(nn==ce||nn==ue)&&nn++,Rn=nn==0?"after":nn==y.text.length?"before":Vi(a,ne,nn-(he?1:0)).bottom+ae<=E==he?"after":"before";var or=Di(a,ye(x,nn,Rn),"line",y,ne);bn=or.left,Un=E<or.top?-1:E>=or.bottom?1:0}return nn=Ht(y.text,nn,1),Dr(x,nn,Rn,Un,b-bn)}function Ui(a,y,x,b,E,ne,ae){var ue=Ye(function(Xe){var Pt=E[Xe],xt=Pt.level!=1;return ci(Di(a,ye(x,xt?Pt.to:Pt.from,xt?"before":"after"),"line",y,b),ne,ae,!0)},0,E.length-1),ce=E[ue];if(ue>0){var he=ce.level!=1,Ae=Di(a,ye(x,he?ce.from:ce.to,he?"after":"before"),"line",y,b);ci(Ae,ne,ae,!0)&&Ae.top>ae&&(ce=E[ue-1])}return ce}function oo(a,y,x,b,E,ne,ae){var ue=Ci(a,y,b,ae),ce=ue.begin,he=ue.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var Ae=null,Xe=null,Pt=0;Pt<E.length;Pt++){var xt=E[Pt];if(!(xt.from>=he||xt.to<=ce)){var nn=xt.level!=1,bn=Vi(a,b,nn?Math.min(he,xt.to)-1:Math.max(ce,xt.from)).right,Rn=bn<ne?ne-bn+1e9:bn-ne;(!Ae||Xe>Rn)&&(Ae=xt,Xe=Rn)}}return Ae||(Ae=E[E.length-1]),Ae.from<ce&&(Ae={from:ce,to:Ae.to,level:Ae.level}),Ae.to>he&&(Ae={from:Ae.from,to:he,level:Ae.level}),Ae}var zi;function Hi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(zi==null){zi=_e("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)zi.appendChild(document.createTextNode("x")),zi.appendChild(_e("br"));zi.appendChild(document.createTextNode("x"))}Fe(a.measure,zi);var x=zi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Bt(a.measure),x||1}function Ji(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=_e("span","xxxxxxxxxx"),x=_e("pre",[y],"CodeMirror-line-like");Fe(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ne=y.gutters.firstChild,ae=0;ne;ne=ne.nextSibling,++ae){var ue=a.display.gutterSpecs[ae].className;x[ue]=ne.offsetLeft+ne.clientLeft+E,b[ue]=ne.clientWidth}return{fixedPos:_a(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function _a(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Cs(a){var y=Hi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ji(a.display)-3);return function(E){if(yn(a.doc,E))return 0;var ne=0;if(E.widgets)for(var ae=0;ae<E.widgets.length;ae++)E.widgets[ae].height&&(ne+=E.widgets[ae].height);return x?ne+(Math.ceil(E.text.length/b)||1)*y:ne+y}}function Ka(a){var y=a.doc,x=Cs(a);y.iter(function(b){var E=x(b);E!=b.height&&nr(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&$e(y).getAttribute("cm-not-content")=="true")return null;var ne,ae,ue=E.lineSpace.getBoundingClientRect();try{ne=y.clientX-ue.left,ae=y.clientY-ue.top}catch(Xe){return null}var ce=yi(a,ne,ae),he;if(b&&ce.xRel>0&&(he=Et(a.doc,ce.line).text).length==ce.ch){var Ae=Ce(he,he.length,a.options.tabSize)-he.length;ce=ye(ce.line,Math.max(0,Math.round((ne-eo(a.display).left)/Ji(a.display))-Ae))}return ce}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function Li(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)Wn&&tn(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)Wn&&Vt(a.doc,x+b)>E.viewFrom?ho(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ho(a);else if(y<=E.viewFrom){var ne=Ea(a,x,x+b,1);ne?(E.view=E.view.slice(ne.index),E.viewFrom=ne.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var ae=Ea(a,y,y,-1);ae?(E.view=E.view.slice(0,ae.index),E.viewTo=ae.lineN):ho(a)}else{var ue=Ea(a,y,y,-1),ce=Ea(a,x,x+b,1);ue&&ce?(E.view=E.view.slice(0,ue.index).concat(qr(a,ue.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=b):ho(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function fo(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var ne=b.view[So(a,y)];if(ne.node!=null){var ae=ne.changes||(ne.changes=[]);mt(ae,x)==-1&&ae.push(x)}}}function ho(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Ea(a,y,x,b){var E=So(a,y),ne,ae=a.display.view;if(!Wn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ue=a.display.viewFrom,ce=0;ce<E;ce++)ue+=ae[ce].size;if(ue!=y){if(b>0){if(E==ae.length-1)return null;ne=ue+ae[E].size-y,E++}else ne=ue-y;y+=ne,x+=ne}for(;tn(a.doc,x)!=x;){if(E==(b<0?0:ae.length-1))return null;x+=b*ae[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=qr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=qr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(So(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(qr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function ws(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Jo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ne=b.selection=document.createDocumentFragment(),ae=0;ae<x.sel.ranges.length;ae++)if(!(!y&&ae==x.sel.primIndex)){var ue=x.sel.ranges[ae];if(!(ue.from().line>=a.display.viewTo||ue.to().line<a.display.viewFrom)){var ce=ue.empty();(ce||a.options.showCursorWhenSelecting)&&Es(a,ue.head,E),ce||Wl(a,ue,ne)}}return b}function Es(a,y,x){var b=Di(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(_e("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ne=x.appendChild(_e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ne.style.display="",ne.style.left=b.other.left+"px",ne.style.top=b.other.top+"px",ne.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Wl(a,y,x){var b=a.display,E=a.doc,ne=document.createDocumentFragment(),ae=eo(a.display),ue=ae.left,ce=Math.max(b.sizerWidth,to(a)-b.sizer.offsetLeft)-ae.right,he=E.direction=="ltr";function Ae(_n,or,gr,hr){or<0&&(or=0),or=Math.round(or),hr=Math.round(hr),ne.appendChild(_e("div",null,"CodeMirror-selected","position: absolute; left: "+_n+`px;
|
|
|
top: `+or+"px; width: "+(gr==null?ce-_n:gr)+`px;
|
|
|
height: `+(hr-or)+"px"))}function Xe(_n,or,gr){var hr=Et(E,_n),Tr=hr.text.length,Yr,mi;function Qr(ai,Ai){return To(a,ye(_n,ai),"div",hr,Ai)}function $i(ai,Ai,bi){var di=ii(a,hr,null,ai),si=Ai=="ltr"==(bi=="after")?"left":"right",ei=bi=="after"?di.begin:di.end-(/\s/.test(hr.text.charAt(di.end-1))?2:1);return Qr(ei,si)[si]}var Ti=Jt(hr,E.direction);return tt(Ti,or||0,gr==null?Tr:gr,function(ai,Ai,bi,di){var si=bi=="ltr",ei=Qr(ai,si?"left":"right"),Bi=Qr(Ai-1,si?"right":"left"),Vo=or==null&&ai==0,bo=gr==null&&Ai==Tr,Si=di==0,ro=!Ti||di==Ti.length-1;if(Bi.top-ei.top<=3){var vi=(he?Vo:bo)&&Si,bs=(he?bo:Vo)&&ro,so=vi?ue:(si?ei:Bi).left,Po=bs?ce:(si?Bi:ei).right;Ae(so,ei.top,Po-so,ei.bottom)}else{var Do,Mi,Uo,xs;si?(Do=he&&Vo&&Si?ue:ei.left,Mi=he?ce:$i(ai,bi,"before"),Uo=he?ue:$i(Ai,bi,"after"),xs=he&&bo&&ro?ce:Bi.right):(Do=he?$i(ai,bi,"before"):ue,Mi=!he&&Vo&&Si?ce:ei.right,Uo=!he&&bo&&ro?ue:Bi.left,xs=he?$i(Ai,bi,"after"):ce),Ae(Do,ei.top,Mi-Do,ei.bottom),ei.bottom<Bi.top&&Ae(ue,ei.bottom,null,Bi.top),Ae(Uo,Bi.top,xs-Uo,Bi.bottom)}(!Yr||ka(ei,Yr)<0)&&(Yr=ei),ka(Bi,Yr)<0&&(Yr=Bi),(!mi||ka(ei,mi)<0)&&(mi=ei),ka(Bi,mi)<0&&(mi=Bi)}),{start:Yr,end:mi}}var Pt=y.from(),xt=y.to();if(Pt.line==xt.line)Xe(Pt.line,Pt.ch,xt.ch);else{var nn=Et(E,Pt.line),bn=Et(E,xt.line),Rn=Gt(nn)==Gt(bn),Un=Xe(Pt.line,Pt.ch,Rn?nn.text.length+1:null).end,tr=Xe(xt.line,Rn?0:null,xt.ch).start;Rn&&(Un.top<tr.top-2?(Ae(Un.right,Un.top,null,Un.bottom),Ae(ue,tr.top,tr.left,tr.bottom)):Ae(Un.right,Un.top,tr.left-Un.right,Un.bottom)),Un.bottom<tr.top&&Ae(ue,Un.bottom,null,tr.top)}x.appendChild(ne)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ao(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function ks(a){a.state.focused||(a.display.input.focus(),Ya(a))}function Is(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ao(a))},100)}function Ya(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(wn(a,"focus",a,y),a.state.focused=!0,pe(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),He&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Ao(a,y){a.state.delayingBlurEvent||(a.state.focused&&(wn(a,"blur",a,y),a.state.focused=!1,Ke(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Ia(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ne=a.options.lineWrapping,ae=void 0,ue=0;if(!E.hidden){if(be&&Se<8){var ce=E.node.offsetTop+E.node.offsetHeight;ae=ce-x,x=ce}else{var he=E.node.getBoundingClientRect();ae=he.bottom-he.top,!ne&&E.text.firstChild&&(ue=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var Ae=E.line.height-ae;if((Ae>.005||Ae<-.005)&&(nr(E.line,ae),Ms(E.line),E.rest))for(var Xe=0;Xe<E.rest.length;Xe++)Ms(E.rest[Xe]);if(ue>a.display.sizerWidth){var Pt=Math.ceil(ue/Ji(a.display));Pt>a.display.maxLineLength&&(a.display.maxLineLength=Pt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ms(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function Ma(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-ri(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ne=Ue(y,b),ae=Ue(y,E);if(x&&x.ensure){var ue=x.ensure.from.line,ce=x.ensure.to.line;ue<ne?(ne=ue,ae=Ue(y,cr(Et(y,ue))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=ae&&(ne=Ue(y,cr(Et(y,ce))-a.wrapper.clientHeight),ae=ce)}return{from:ne,to:Math.max(ae,ne+1)}}function $l(a,y){if(!kt(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!wt){var ne=_e("div","\u200B",null,`position: absolute;
|
|
|
top: `+(y.top-x.viewOffset-ri(a.display))+`px;
|
|
|
height: `+(y.bottom-y.top+Fi(a)+x.barHeight)+`px;
|
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ne),ne.scrollIntoView(E),a.display.lineSpace.removeChild(ne)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?ye(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?ye(y.line,y.ch+1,"before"):y);for(var ne=0;ne<5;ne++){var ae=!1,ue=Di(a,y),ce=!x||x==y?ue:Di(a,x);E={left:Math.min(ue.left,ce.left),top:Math.min(ue.top,ce.top)-b,right:Math.max(ue.left,ce.left),bottom:Math.max(ue.bottom,ce.bottom)+b};var he=Ja(a,E),Ae=a.doc.scrollTop,Xe=a.doc.scrollLeft;if(he.scrollTop!=null&&(qo(a,he.scrollTop),Math.abs(a.doc.scrollTop-Ae)>1&&(ae=!0)),he.scrollLeft!=null&&(Eo(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Xe)>1&&(ae=!0)),!ae)break}return E}function jl(a,y){var x=Ja(a,y);x.scrollTop!=null&&qo(a,x.scrollTop),x.scrollLeft!=null&&Eo(a,x.scrollLeft)}function Ja(a,y){var x=a.display,b=Hi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ne=io(a),ae={};y.bottom-y.top>ne&&(y.bottom=y.top+ne);var ue=a.doc.height+Gi(x),ce=y.top<b,he=y.bottom>ue-b;if(y.top<E)ae.scrollTop=ce?0:y.top;else if(y.bottom>E+ne){var Ae=Math.min(y.top,(he?ue:y.bottom)-ne);Ae!=E&&(ae.scrollTop=Ae)}var Xe=a.options.fixedGutter?0:x.gutters.offsetWidth,Pt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Xe,xt=to(a)-x.gutters.offsetWidth,nn=y.right-y.left>xt;return nn&&(y.right=y.left+xt),y.left<10?ae.scrollLeft=0:y.left<Pt?ae.scrollLeft=Math.max(0,y.left+Xe-(nn?0:10)):y.right>xt+Pt-3&&(ae.scrollLeft=y.right+(nn?0:10)-xt),ae}function Qa(a,y){y!=null&&(Pa(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Bo(a){Pa(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Qo(a,y,x){(y!=null||x!=null)&&Pa(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Gl(a,y){Pa(a),a.curOp.scrollToPos=y}function Pa(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Zr(a,y.from),b=Zr(a,y.to);Ps(a,x,b,y.margin)}}function Ps(a,y,x,b){var E=Ja(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});Qo(a,E.scrollLeft,E.scrollTop)}function qo(a,y){Math.abs(a.doc.scrollTop-y)<2||(te||es(a,{top:y}),Ds(a,y,!0),te&&es(a),na(a,100))}function Ds(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Eo(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Bs(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Gi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Fi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=_e("div",[_e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=_e("div",[_e("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Zt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Zt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&Se<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ne=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ne)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=Ne&&!xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ne=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ne!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function No(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ls(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Ia(a),Ls(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ls(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Os={native:ko,null:ta};function Ts(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ke(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Os[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Zt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?Eo(a,y):qo(a,y)},a),a.display.scrollbars.addClass&&pe(a.display.wrapper,a.display.scrollbars.addClass)}var Vl=0;function Io(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vl},zr(a.curOp)}function Mo(a){var y=a.curOp;y&&wr(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Ul(x)})}function Ul(a){for(var y=a.ops,x=0;x<y.length;x++)_l(y[x]);for(var b=0;b<y.length;b++)Kl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var ne=0;ne<y.length;ne++)Yl(y[ne]);for(var ae=0;ae<y.length;ae++)Jl(y[ae])}function _l(a){var y=a.cm,x=y.display;ql(y),a.updateMaxLine&&Ir(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Da(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Kl(a){a.updatedDisplay=a.mustUpdate&&qa(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Ia(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Fi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-to(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Yl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Eo(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==ot();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&ks(a.cm)}function Jl(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&As(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ds(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,Oe(b,a.scrollToPos.from),Oe(b,a.scrollToPos.to),a.scrollToPos.margin);$l(y,E)}var ne=a.maybeHiddenMarkers,ae=a.maybeUnhiddenMarkers;if(ne)for(var ue=0;ue<ne.length;++ue)ne[ue].lines.length||wn(ne[ue],"hide");if(ae)for(var ce=0;ce<ae.length;++ce)ae[ce].lines.length&&wn(ae[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&wn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Wi(a,y){if(a.curOp)return y();Io(a);try{return y()}finally{Mo(a)}}function hi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Io(a);try{return y.apply(a,arguments)}finally{Mo(a)}}}function Ii(a){return function(){if(this.curOp)return a.apply(this,arguments);Io(this);try{return a.apply(this,arguments)}finally{Mo(this)}}}function pi(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Io(y);try{return a.apply(this,arguments)}finally{Mo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Ct(Ql,a))}function Ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Tn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ne){if(b.line>=a.display.viewFrom){var ae=ne.styles,ue=ne.text.length>a.options.maxHighlightLength?Xn(y.mode,b.state):null,ce=Wt(a,ne,b,!0);ue&&(b.state=ue),ne.styles=ce.styles;var he=ne.styleClasses,Ae=ce.classes;Ae?ne.styleClasses=Ae:he&&(ne.styleClasses=null);for(var Xe=!ae||ae.length!=ne.styles.length||he!=Ae&&(!he||!Ae||he.bgClass!=Ae.bgClass||he.textClass!=Ae.textClass),Pt=0;!Xe&&Pt<ae.length;++Pt)Xe=ae[Pt]!=ne.styles[Pt];Xe&&E.push(b.line),ne.stateAfter=b.save(),b.nextLine()}else ne.text.length<=a.options.maxHighlightLength&&Hn(a,ne.text,b),ne.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Wi(a,function(){for(var ne=0;ne<E.length;ne++)fo(a,E[ne],"text")})}}var Da=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Ma(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=to(a),this.force=x,this.dims=co(a),this.events=[]};Da.prototype.signal=function(a,y){Qt(a,y)&&this.events.push(arguments)},Da.prototype.finish=function(){for(var a=0;a<this.events.length;a++)wn.apply(null,this.events[a])};function ql(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Fi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Fi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=ot();if(!y||!lt(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&<(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==ot())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&<(document.body,a.anchorNode)&<(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function qa(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return ho(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&ws(a)==0)return!1;Ns(a)&&(ho(a),y.dims=co(a));var E=b.first+b.size,ne=Math.max(y.visible.from-a.options.viewportMargin,b.first),ae=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ne&&ne-x.viewFrom<20&&(ne=Math.max(b.first,x.viewFrom)),x.viewTo>ae&&x.viewTo-ae<20&&(ae=Math.min(E,x.viewTo)),Wn&&(ne=tn(a.doc,ne),ae=Vt(a.doc,ae));var ue=ne!=x.viewFrom||ae!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ne,ae),x.viewOffset=cr(Et(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=ws(a);if(!ue&&ce==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return ce>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ce>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),Bt(x.cursorDiv),Bt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ue&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function As(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==to(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Gi(a.display)-io(a),x.top)}),y.visible=Ma(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Ma(a.display,a.doc,x));if(!qa(a,y))break;Ia(a);var E=ea(a);Jo(a),No(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Da(a,y);if(qa(a,x)){Ia(a),As(a,x);var b=ea(a);Jo(a),No(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ne=b.lineDiv,ae=ne.firstChild;function ue(nn){var bn=nn.nextSibling;return He&&Ne&&a.display.currentWheelTarget==nn?nn.style.display="none":nn.parentNode.removeChild(nn),bn}for(var ce=b.view,he=b.viewFrom,Ae=0;Ae<ce.length;Ae++){var Xe=ce[Ae];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=ne){var Pt=Sr(a,Xe,he,x);ne.insertBefore(Pt,ae)}else{for(;ae!=Xe.node;)ae=ue(ae);var xt=E&&y!=null&&y<=he&&Xe.lineNumber;Xe.changes&&(mt(Xe.changes,"gutter")>-1&&(xt=!1),Pi(a,Xe,he,x)),xt&&(Bt(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(Me(a.options,he)))),ae=Xe.node.nextSibling}he+=Xe.size}for(;ae;)ae=ue(ae)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Fi(a)+"px"}function Bs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=_a(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ne=b+"px",ae=0;ae<x.length;ae++)if(!x[ae].hidden){a.options.fixedGutter&&(x[ae].gutter&&(x[ae].gutter.style.left=ne),x[ae].gutterBackground&&(x[ae].gutterBackground.style.left=ne));var ue=x[ae].alignable;if(ue)for(var ce=0;ce<ue.length;ce++)ue[ce].style.left=ne}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Ns(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Me(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(_e("div",[_e("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ne=E.firstChild.offsetWidth,ae=E.offsetWidth-ne;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ne,b.lineGutter.offsetWidth-ae)+1,b.lineNumWidth=b.lineNumInnerWidth+ae,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ne=a[E],ae=null;if(typeof ne!="string"&&(ae=ne.style,ne=ne.className),ne=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ne,style:ae})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rs(a){var y=a.gutters,x=a.gutterSpecs;Bt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ne=E.className,ae=E.style,ue=y.appendChild(_e("div",null,"CodeMirror-gutter "+ne));ae&&(ue.style.cssText=ae),ne=="CodeMirror-linenumbers"&&(a.lineGutter=ue,ue.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Rs(a.display),Li(a),Bs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=_e("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=_e("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ft("div",null,"CodeMirror-code"),E.selectionDiv=_e("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=_e("div",null,"CodeMirror-cursors"),E.measure=_e("div",null,"CodeMirror-measure"),E.lineMeasure=_e("div",null,"CodeMirror-measure"),E.lineSpace=ft("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ne=ft("div",[E.lineSpace],"CodeMirror-lines");E.mover=_e("div",[ne],null,"position: relative"),E.sizer=_e("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=_e("div",null,null,"position: absolute; height: "+en+"px; width: 1px;"),E.gutters=_e("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=_e("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=_e("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),be&&Se<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!He&&!(te&&Ve)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),Rs(E),x.init(E)}var La=0,Zi=null;be?Zi=-.53:te?Zi=15:Ie?Zi=-.7:et&&(Zi=-1/3);function Fs(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Fs(a);return y.x*=Zi,y.y*=Zi,y}function zs(a,y){var x=Fs(y),b=x.x,E=x.y,ne=a.display,ae=ne.scroller,ue=ae.scrollWidth>ae.clientWidth,ce=ae.scrollHeight>ae.clientHeight;if(b&&ue||E&&ce){if(E&&Ne&&He){e:for(var he=y.target,Ae=ne.view;he!=ae;he=he.parentNode)for(var Xe=0;Xe<Ae.length;Xe++)if(Ae[Xe].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!te&&!fe&&Zi!=null){E&&ce&&qo(a,Math.max(0,ae.scrollTop+E*Zi)),Eo(a,Math.max(0,ae.scrollLeft+b*Zi)),(!E||E&&ce)&&Qe(y),ne.wheelStartX=null;return}if(E&&Zi!=null){var Pt=E*Zi,xt=a.doc.scrollTop,nn=xt+ne.wrapper.clientHeight;Pt<0?xt=Math.max(0,xt+Pt-50):nn=Math.min(a.doc.height,nn+Pt+50),es(a,{top:xt,bottom:nn})}La<20&&(ne.wheelStartX==null?(ne.wheelStartX=ae.scrollLeft,ne.wheelStartY=ae.scrollTop,ne.wheelDX=b,ne.wheelDY=E,setTimeout(function(){if(ne.wheelStartX!=null){var bn=ae.scrollLeft-ne.wheelStartX,Rn=ae.scrollTop-ne.wheelStartY,Un=Rn&&ne.wheelDY&&Rn/ne.wheelDY||bn&&ne.wheelDX&&bn/ne.wheelDX;ne.wheelStartX=ne.wheelStartY=null,Un&&(Zi=(Zi*La+Un)/(La+1),++La)}},200)):(ne.wheelDX+=b,ne.wheelDY+=E))}}var ji=function(a,y){this.ranges=a,this.primIndex=y};ji.prototype.primary=function(){return this.ranges[this.primIndex]},ji.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var x=this.ranges[y],b=a.ranges[y];if(!me(x.anchor,b.anchor)||!me(x.head,b.head))return!1}return!0},ji.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Ur(Be(this.ranges[y].anchor),Be(this.ranges[y].head));return new ji(a,this.primIndex)},ji.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},ji.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Le(y,b.from())>=0&&Le(a,b.to())<=0)return x}return-1};var Ur=function(a,y){this.anchor=a,this.head=y};Ur.prototype.from=function(){return qe(this.anchor,this.head)},Ur.prototype.to=function(){return Ze(this.anchor,this.head)},Ur.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Pt,xt){return Le(Pt.from(),xt.from())}),x=mt(y,E);for(var ne=1;ne<y.length;ne++){var ae=y[ne],ue=y[ne-1],ce=Le(ue.to(),ae.from());if(b&&!ae.empty()?ce>0:ce>=0){var he=qe(ue.from(),ae.from()),Ae=Ze(ue.to(),ae.to()),Xe=ue.empty()?ae.from()==ae.head:ue.from()==ue.head;ne<=x&&--x,y.splice(--ne,2,new Ur(Xe?Ae:he,Xe?he:Ae))}}return new ji(y,x)}function po(a,y){return new ji([new Ur(a,y||a)],0)}function mo(a){return a.text?ye(a.from.line+a.text.length-1,it(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(Le(a,y.from)<0)return a;if(Le(a,y.to)<=0)return mo(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=mo(y).ch-y.to.ch),ye(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Ur(Hs(E.anchor,y),Hs(E.head,y)))}return Qi(a.cm,x,a.sel.primIndex)}function Ws(a,y,x){return a.line==y.line?ye(x.line,a.ch-y.ch+x.ch):ye(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=ye(a.first,0),ne=E,ae=0;ae<y.length;ae++){var ue=y[ae],ce=Ws(ue.from,E,ne),he=Ws(mo(ue),E,ne);if(E=ue.to,ne=he,x=="around"){var Ae=a.sel.ranges[ae],Xe=Le(Ae.head,Ae.anchor)<0;b[ae]=new Ur(Xe?he:ce,Xe?ce:he)}else b[ae]=new Ur(ce,ce)}return new ji(b,a.sel.primIndex)}function os(a){a.doc.mode=Gn(a.options,a.doc.modeOption),ia(a)}function ia(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&Li(a)}function $s(a,y){return y.from.ch==0&&y.to.ch==0&&it(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(tr){return x?x[tr]:null}function ne(tr,_n,or){Br(tr,_n,or,b),Or(tr,"change",tr,y)}function ae(tr,_n){for(var or=[],gr=tr;gr<_n;++gr)or.push(new Rr(he[gr],E(gr),b));return or}var ue=y.from,ce=y.to,he=y.text,Ae=Et(a,ue.line),Xe=Et(a,ce.line),Pt=it(he),xt=E(he.length-1),nn=ce.line-ue.line;if(y.full)a.insert(0,ae(0,he.length)),a.remove(he.length,a.size-he.length);else if($s(a,y)){var bn=ae(0,he.length-1);ne(Xe,Xe.text,xt),nn&&a.remove(ue.line,nn),bn.length&&a.insert(ue.line,bn)}else if(Ae==Xe)if(he.length==1)ne(Ae,Ae.text.slice(0,ue.ch)+Pt+Ae.text.slice(ce.ch),xt);else{var Rn=ae(1,he.length-1);Rn.push(new Rr(Pt+Ae.text.slice(ce.ch),xt,b)),ne(Ae,Ae.text.slice(0,ue.ch)+he[0],E(0)),a.insert(ue.line+1,Rn)}else if(he.length==1)ne(Ae,Ae.text.slice(0,ue.ch)+he[0]+Xe.text.slice(ce.ch),E(0)),a.remove(ue.line+1,nn);else{ne(Ae,Ae.text.slice(0,ue.ch)+he[0],E(0)),ne(Xe,Pt+Xe.text.slice(ce.ch),xt);var Un=ae(1,he.length-1);nn>1&&a.remove(ue.line+1,nn-1),a.insert(ue.line+1,Un)}Or(a,"change",a,y)}function vo(a,y,x){function b(E,ne,ae){if(E.linked)for(var ue=0;ue<E.linked.length;++ue){var ce=E.linked[ue];if(ce.doc!=ne){var he=ae&&ce.sharedHist;x&&!he||(y(ce.doc,he),b(ce.doc,E,he))}}}b(a,null,!0)}function Zs(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ka(a),os(a),js(a),a.options.lineWrapping||Ir(a),a.options.mode=y.modeOption,Li(a)}function js(a){(a.doc.direction=="rtl"?pe:Ke)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Wi(a,function(){js(a),Li(a)})}function Oa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:Be(y.from),to:mo(y),text:Ut(a,y.from,y.to)};return Us(a,x,y.from.line,y.to.line+1),vo(a,function(b){return Us(b,x,y.from.line,y.to.line+1)},!0),x}function Gs(a){for(;a.length;){var y=it(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return Gs(a.done),it(a.done);if(a.done.length&&!it(a.done).ranges)return it(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),it(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var ne=+new Date,ae,ue;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ne-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ae=su(E,E.lastOp==b)))ue=it(ae.changes),Le(y.from,y.to)==0&&Le(y.from,ue.to)==0?ue.to=mo(y):ae.changes.push(ss(a,y));else{var ce=it(E.done);for((!ce||!ce.ranges)&&Ta(a.sel,E.done),ae={changes:[ss(a,y)],generation:E.generation},E.done.push(ae);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ne,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ue||wn(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ne=b&&b.origin;x==E.lastSelOp||ne&&E.lastSelOrigin==ne&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ne||lu(a,ne,it(E.done),y))?E.done[E.done.length-1]=y:Ta(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ne,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gs(E.undone)}function Ta(a,y){var x=it(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(a,y,x,b){var E=y["spans_"+a.id],ne=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ae){ae.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ne]=ae.markedSpans),++ne})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function _s(a,y){var x=du(a,y),b=mr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ne=x[E],ae=b[E];if(ne&&ae)e:for(var ue=0;ue<ae.length;++ue){for(var ce=ae[ue],he=0;he<ne.length;++he)if(ne[he].marker==ce.marker)continue e;ne.push(ce)}else ae&&(x[E]=ae)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var ne=a[E];if(ne.ranges){b.push(x?ji.prototype.deepCopy.call(ne):ne);continue}var ae=ne.changes,ue=[];b.push({changes:ue});for(var ce=0;ce<ae.length;++ce){var he=ae[ce],Ae=void 0;if(ue.push({from:he.from,to:he.to,text:he.text}),y)for(var Xe in he)(Ae=Xe.match(/^spans_(\d+)$/))&&mt(y,Number(Ae[1]))>-1&&(it(ue)[Xe]=he[Xe],delete he[Xe])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ne=Le(y,E)<0;ne!=Le(x,E)<0?(E=y,y=x):ne!=Le(y,x)<0&&(y=x)}return new Ur(E,y)}else return new Ur(x||y,y)}function Aa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),wi(a,new ji([ls(a.sel.primary(),y,x,E)],0),b)}function Ks(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ne=0;ne<a.sel.ranges.length;ne++)b[ne]=ls(a.sel.ranges[ne],y[ne],null,E);var ae=Qi(a.cm,b,a.sel.primIndex);wi(a,ae,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,wi(a,Qi(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){wi(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ne=0;ne<E.length;ne++)this.ranges[ne]=new Ur(Oe(a,E[ne].anchor),Oe(a,E[ne].head))},origin:x&&x.origin};return wn(a,"beforeSelectionChange",a,b),a.cm&&wn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Qi(a.cm,b.ranges,b.ranges.length-1):y}function Ys(a,y,x){var b=a.history.done,E=it(b);E&&E.ranges?(b[b.length-1]=y,Ba(a,y,x)):wi(a,y,x)}function wi(a,y,x){Ba(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ba(a,y,x){(Qt(a,"beforeSelectionChange")||a.cm&&Qt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Le(y.primary().head,a.sel.primary().head)<0?-1:1);Js(a,qs(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Bo(a.cm)}function Js(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Pn(a.cm)),Or(a,"cursorActivity",a))}function Qs(a){Js(a,qs(a,a.sel,null,!1))}function qs(a,y,x,b){for(var E,ne=0;ne<y.ranges.length;ne++){var ae=y.ranges[ne],ue=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ne],ce=Na(a,ae.anchor,ue&&ue.anchor,x,b),he=Na(a,ae.head,ue&&ue.head,x,b);(E||ce!=ae.anchor||he!=ae.head)&&(E||(E=y.ranges.slice(0,ne)),E[ne]=new Ur(ce,he))}return E?Qi(a.cm,E,y.primIndex):y}function Fo(a,y,x,b,E){var ne=Et(a,y.line);if(ne.markedSpans)for(var ae=0;ae<ne.markedSpans.length;++ae){var ue=ne.markedSpans[ae],ce=ue.marker,he="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ae="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((ue.from==null||(he?ue.from<=y.ch:ue.from<y.ch))&&(ue.to==null||(Ae?ue.to>=y.ch:ue.to>y.ch))){if(E&&(wn(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(ne.markedSpans){--ae;continue}else break;if(!ce.atomic)continue;if(x){var Xe=ce.find(b<0?1:-1),Pt=void 0;if((b<0?Ae:he)&&(Xe=el(a,Xe,-b,Xe&&Xe.line==y.line?ne:null)),Xe&&Xe.line==y.line&&(Pt=Le(Xe,x))&&(b<0?Pt<0:Pt>0))return Fo(a,Xe,y,b,E)}var xt=ce.find(b<0?-1:1);return(b<0?he:Ae)&&(xt=el(a,xt,b,xt.line==y.line?ne:null)),xt?Fo(a,xt,y,b,E):null}}return y}function Na(a,y,x,b,E){var ne=b||1,ae=Fo(a,y,x,ne,E)||!E&&Fo(a,y,x,ne,!0)||Fo(a,y,x,-ne,E)||!E&&Fo(a,y,x,-ne,!0);return ae||(a.cantEdit=!0,ye(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Oe(a,ye(y.line-1)):null:x>0&&y.ch==(b||Et(a,y.line)).text.length?y.line<a.first+a.size-1?ye(y.line+1,0):null:new ye(y.line,y.ch+x)}function tl(a){a.setSelection(ye(a.firstLine(),0),ye(a.lastLine()),ze)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ne,ae,ue){E&&(b.from=Oe(a,E)),ne&&(b.to=Oe(a,ne)),ae&&(b.text=ae),ue!==void 0&&(b.origin=ue)}),wn(a,"beforeChange",a,b),a.cm&&wn(a.cm,"beforeChange",a.cm,b),b.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function zo(a,y,x){if(a.cm){if(!a.cm.curOp)return hi(a.cm,zo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Qt(a,"beforeChange")||a.cm&&Qt(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=er&&!x&&Hr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Le(y.from,y.to)==0)){var x=is(a,y);Vs(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,mr(a,y));var b=[];vo(a,function(E,ne){!ne&&mt(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,mr(E,y))})}}function Ra(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ne,ae=a.sel,ue=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,he=0;he<ue.length&&(ne=ue[he],!(x?ne.ranges&&!ne.equals(a.sel):!ne.ranges));he++);if(he!=ue.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ne=ue.pop(),ne.ranges){if(Ta(ne,ce),x&&!ne.equals(a.sel)){wi(a,ne,{clearRedo:!1});return}ae=ne}else if(b){ue.push(ne);return}else break;var Ae=[];Ta(ae,ce),ce.push({changes:Ae,generation:E.generation}),E.generation=ne.generation||++E.maxGeneration;for(var Xe=Qt(a,"beforeChange")||a.cm&&Qt(a.cm,"beforeChange"),Pt=function(bn){var Rn=ne.changes[bn];if(Rn.origin=y,Xe&&!nl(a,Rn,!1))return ue.length=0,{};Ae.push(ss(a,Rn));var Un=bn?is(a,Rn):it(ue);oa(a,Rn,Un,_s(a,Rn)),!bn&&a.cm&&a.cm.scrollIntoView({from:Rn.from,to:mo(Rn)});var tr=[];vo(a,function(_n,or){!or&&mt(tr,_n.history)==-1&&(sl(_n.history,Rn),tr.push(_n.history)),oa(_n,Rn,null,_s(_n,Rn))})},xt=ne.changes.length-1;xt>=0;--xt){var nn=Pt(xt);if(nn)return nn.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new ji(_t(a.sel.ranges,function(E){return new Ur(ye(E.anchor.line+y,E.anchor.ch),ye(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Li(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)fo(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return hi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);il(a,E),y={from:ye(a.first,0),to:ye(y.to.line+E,y.to.ch),text:[it(y.text)],origin:y.origin}}var ne=a.lastLine();y.to.line>ne&&(y={from:y.from,to:ye(ne,Et(a,ne).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Ut(a,y.from,y.to),x||(x=is(a,y)),a.cm?hu(a.cm,y,b):as(a,y,b),Ba(a,x,ze),a.cantEdit&&Na(a,ye(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,ne=y.from,ae=y.to,ue=!1,ce=ne.line;a.options.lineWrapping||(ce=De(Gt(Et(b,ne.line))),b.iter(ce,ae.line+1,function(xt){if(xt==E.maxLine)return ue=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Pn(a),as(b,y,x,Cs(a)),a.options.lineWrapping||(b.iter(ce,ne.line+y.text.length,function(xt){var nn=Lr(xt);nn>E.maxLineLength&&(E.maxLine=xt,E.maxLineLength=nn,E.maxLineChanged=!0,ue=!1)}),ue&&(a.curOp.updateMaxLine=!0)),vn(b,ne.line),na(a,400);var he=y.text.length-(ae.line-ne.line)-1;y.full?Li(a):ne.line==ae.line&&y.text.length==1&&!$s(a.doc,y)?fo(a,ne.line,"text"):Li(a,ne.line,ae.line+1,he);var Ae=Qt(a,"changes"),Xe=Qt(a,"change");if(Xe||Ae){var Pt={from:ne,to:ae,text:y.text,removed:y.removed,origin:y.origin};Xe&&Or(a,"change",a,Pt),Ae&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Pt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ne;b||(b=x),Le(b,x)<0&&(ne=[b,x],x=ne[0],b=ne[1]),typeof y=="string"&&(y=a.splitLines(y)),zo(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var ne=a[E],ae=!0;if(ne.ranges){ne.copied||(ne=a[E]=ne.deepCopy(),ne.copied=!0);for(var ue=0;ue<ne.ranges.length;ue++)ol(ne.ranges[ue].anchor,y,x,b),ol(ne.ranges[ue].head,y,x,b);continue}for(var ce=0;ce<ne.changes.length;++ce){var he=ne.changes[ce];if(x<he.from.line)he.from=ye(he.from.line+b,he.from.ch),he.to=ye(he.to.line+b,he.to.ch);else if(y<=he.to.line){ae=!1;break}}ae||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ne=y;return typeof y=="number"?ne=Et(a,je(a,y)):E=De(y),E==null?null:(b(ne,E)&&a.cm&&fo(a.cm,E,x),ne)}function sa(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Fr(E),Or(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function la(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ne=Math.min(y,E-a),ae=b.height;if(b.removeInner(a,ne),this.height-=ae-b.height,E==ne&&(this.children.splice(x--,1),b.parent=null),(y-=ne)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var ue=[];this.collapse(ue),this.children=[new sa(ue)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ne=E.chunkSize();if(a<=ne){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ae=E.lines.length%25+25,ue=ae;ue<E.lines.length;){var ce=new sa(E.lines.slice(ue,ue+=25));E.height-=ce.height,this.children.splice(++b,0,ce),ce.parent=this}E.lines=E.lines.slice(0,ae),this.maybeSpill()}break}a-=ne}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=mt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ne=E.chunkSize();if(a<ne){var ae=Math.min(y,ne-a);if(E.iterN(a,ae,x))return!0;if((y-=ae)==0)break;a=0}else a-=ne}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=De(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ne=ki(this);nr(x,Math.max(0,x.height-ne)),a&&(Wi(a,function(){ll(a,x,-ne),fo(a,b,"widget")}),Or(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=ki(this)-y;E&&(yn(this.doc,b)||nr(b,b.height+E),x&&Wi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Or(x,"lineWidgetChanged",x,a,De(b))}))},Pe(ua);function ll(a,y,x){cr(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),ne=a.cm;return ne&&E.noHScroll&&(ne.display.alignWidgets=!0),aa(a,y,"widget",function(ae){var ue=ae.widgets||(ae.widgets=[]);if(E.insertAt==null?ue.push(E):ue.splice(Math.min(ue.length-1,Math.max(0,E.insertAt)),0,E),E.line=ae,ne&&!yn(a,ae)){var ce=cr(ae)<a.scrollTop;nr(ae,ae.height+ki(E)),ce&&Qa(ne,E.height),ne.curOp.forceUpdate=!0}return!0}),ne&&Or(ne,"lineWidgetAdded",ne,E,typeof y=="number"?y:De(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Io(a),Qt(this,"clear")){var x=this.find();x&&Or(this,"clear",x.from,x.to)}for(var b=null,E=null,ne=0;ne<this.lines.length;++ne){var ae=this.lines[ne],ue=ur(ae.markedSpans,this);a&&!this.collapsed?fo(a,De(ae),"text"):a&&(ue.to!=null&&(E=De(ae)),ue.from!=null&&(b=De(ae))),ae.markedSpans=yr(ae.markedSpans,ue),ue.from==null&&this.collapsed&&!yn(this.doc,ae)&&a&&nr(ae,Hi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var he=Gt(this.lines[ce]),Ae=Lr(he);Ae>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=Ae,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Li(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Qs(a.doc)),a&&Or(a,"markerCleared",a,this,b,E),y&&Mo(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ne=this.lines[E],ae=ur(ne.markedSpans,this);if(ae.from!=null&&(x=ye(y?ne:De(ne),ae.from),a==-1))return x;if(ae.to!=null&&(b=ye(y?ne:De(ne),ae.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Wi(b,function(){var E=y.line,ne=De(y.line),ae=no(b,ne);if(ae&&(_o(ae),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!yn(x.doc,E)&&x.height!=null){var ue=x.height;x.height=null;var ce=ki(x)-ue;ce&&nr(E,E.height+ce)}Or(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||mt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(mt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Pe(go);function Wo(a,y,x,b,E){if(b&&b.shared)return mu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return hi(a.cm,Wo)(a,y,x,b,E);var ne=new go(a,E),ae=Le(y,x);if(b&&qt(b,ne,!1),ae>0||ae==0&&ne.clearWhenEmpty!==!1)return ne;if(ne.replacedWith&&(ne.collapsed=!0,ne.widgetNode=ft("span",[ne.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ne.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ne.widgetNode.insertLeft=!0)),ne.collapsed){if(an(a,y.line,y,x,ne)||y.line!=x.line&&an(a,x.line,y,x,ne))throw new Error("Inserting collapsed marker partially overlapping an existing one");pr()}ne.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ue=y.line,ce=a.cm,he;if(a.iter(ue,x.line+1,function(Xe){ce&&ne.collapsed&&!ce.options.lineWrapping&&Gt(Xe)==ce.display.maxLine&&(he=!0),ne.collapsed&&ue!=y.line&&nr(Xe,0),sr(Xe,new lr(ne,ue==y.line?y.ch:null,ue==x.line?x.ch:null)),++ue}),ne.collapsed&&a.iter(y.line,x.line+1,function(Xe){yn(a,Xe)&&nr(Xe,0)}),ne.clearOnEnter&&Zt(ne,"beforeCursorEnter",function(){return ne.clear()}),ne.readOnly&&(dr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ne.collapsed&&(ne.id=++ul,ne.atomic=!0),ce){if(he&&(ce.curOp.updateMaxLine=!0),ne.collapsed)Li(ce,y.line,x.line+1);else if(ne.className||ne.startStyle||ne.endStyle||ne.css||ne.attributes||ne.title)for(var Ae=y.line;Ae<=x.line;Ae++)fo(ce,Ae,"text");ne.atomic&&Qs(ce.doc),Or(ce,"markerAdded",ce,ne)}return ne}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Or(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Pe(ca);function mu(a,y,x,b,E){b=qt(b),b.shared=!1;var ne=[Wo(a,y,x,b,E)],ae=ne[0],ue=b.widgetNode;return vo(a,function(ce){ue&&(b.widgetNode=ue.cloneNode(!0)),ne.push(Wo(ce,Oe(ce,y),Oe(ce,x),b,E));for(var he=0;he<ce.linked.length;++he)if(ce.linked[he].isParent)return;ae=it(ne)}),new ca(ne,ae)}function cl(a){return a.findMarks(ye(a.first,0),a.clipPos(ye(a.lastLine())),function(y){return y.parent})}function vu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ne=a.clipPos(E.from),ae=a.clipPos(E.to);if(Le(ne,ae)){var ue=Wo(a,ne,ae,b.primary,b.primary.type);b.markers.push(ue),ue.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ne=[E.primary.doc];vo(E.primary.doc,function(ce){return ne.push(ce)});for(var ae=0;ae<E.markers.length;ae++){var ue=E.markers[ae];mt(ne,ue.doc)==-1&&(ue.parent=null,E.markers.splice(ae--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Oi=function(a,y,x,b,E){if(!(this instanceof Oi))return new Oi(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Rr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ne=ye(x,0);this.sel=po(ne),this.history=new Oa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:ne,to:ne,text:a}),wi(this,po(ne),ze)};Oi.prototype=ee(la.prototype,{constructor:Oi,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=zn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:pi(function(a){var y=ye(this.first,0),x=this.first+this.size-1;zo(this,{from:y,to:ye(x,Et(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),wi(this,po(y),ze)}),replaceRange:function(a,y,x,b){y=Oe(this,y),x=x?Oe(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Ut(this,Oe(this,a),Oe(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(ge(this,a))return Et(this,a)},getLineNumber:function(a){return De(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Et(this,a)),Gt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Oe(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pi(function(a,y,x){Xs(this,Oe(this,typeof a=="number"?ye(a,y||0):a),null,x)}),setSelection:pi(function(a,y,x){Xs(this,Oe(this,a),Oe(this,y||a),x)}),extendSelection:pi(function(a,y,x){Aa(this,Oe(this,a),y&&Oe(this,y),x)}),extendSelections:pi(function(a,y){Ks(this,Ge(this,a),y)}),extendSelectionsBy:pi(function(a,y){var x=_t(this.sel.ranges,a);Ks(this,Ge(this,x),y)}),setSelections:pi(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Ur(Oe(this,a[E].anchor),Oe(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),wi(this,Qi(this.cm,b,y),x)}}),addSelection:pi(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Ur(Oe(this,a),Oe(this,y||a))),wi(this,Qi(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Ut(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Ut(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:pi(function(a,y,x){for(var b=[],E=this.sel,ne=0;ne<E.ranges.length;ne++){var ae=E.ranges[ne];b[ne]={from:ae.from(),to:ae.to(),text:this.splitLines(a[ne]),origin:x}}for(var ue=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)zo(this,b[ce]);ue?Ys(this,ue):this.cm&&Bo(this.cm)}),undo:pi(function(){Ra(this,"undo")}),redo:pi(function(){Ra(this,"redo")}),undoSelection:pi(function(){Ra(this,"undo",!0)}),redoSelection:pi(function(){Ra(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Oa(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:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(a){var y=this.history=new Oa(this.history.maxGeneration);y.done=Ro(a.done.slice(0),null,!0),y.undone=Ro(a.undone.slice(0),null,!0)},setGutterMarker:pi(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&re(E)&&(b.gutterMarkers=null),!0})}),clearGutter:pi(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,re(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!ge(this,a)||(y=a,a=Et(this,a),!a))return null}else if(y=De(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:pi(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!b[E])b[E]=x;else{if(yt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:pi(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",ne=b[E];if(ne)if(x==null)b[E]=null;else{var ae=ne.match(yt(x));if(!ae)return!1;var ue=ae.index+ae[0].length;b[E]=ne.slice(0,ae.index)+(!ae.index||ue==ne.length?"":" ")+ne.slice(ue)||null}else return!1;return!0})}),addLineWidget:pi(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Wo(this,Oe(this,a),Oe(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Oe(this,a),Wo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Oe(this,a);var y=[],x=Et(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=Oe(this,a),y=Oe(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ne){var ae=ne.markedSpans;if(ae)for(var ue=0;ue<ae.length;ue++){var ce=ae[ue];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!x||x(ce.marker))&&b.push(ce.marker.parent||ce.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var ne=E.text.length+b;if(ne>a)return y=a,!0;a-=ne,++x}),Oe(this,ye(x,y))},indexFromPos:function(a){a=Oe(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Oi(zn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Oi(zn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],vu(b,cl(this)),b},unlinkDoc:function(a){if(a instanceof Jr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cl(this));break}}if(a.history==this.history){var b=[a.id];vo(a,function(E){return b.push(E.id)},!0),a.history=new Oa(null),a.history.done=Ro(this.history.done,b),a.history.undone=Ro(this.history.undone,b)}},iterLinkedDocs:function(a){vo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):dn(a)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:pi(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))})}),Oi.prototype.eachLine=Oi.prototype.iter;var dl=0;function bu(a){var y=this;if(fl(y),!(kt(y,a)||gi(y.display,a))){Qe(a),be&&(dl=+new Date);var x=wo(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,ne=Array(E),ae=0,ue=function(){++ae==E&&hi(y,function(){x=Oe(y.doc,x);var xt={from:x,to:x,text:y.doc.splitLines(ne.filter(function(nn){return nn!=null}).join(y.doc.lineSeparator())),origin:"paste"};zo(y.doc,xt),Ys(y.doc,po(Oe(y.doc,x),Oe(y.doc,mo(xt))))})()},ce=function(xt,nn){if(y.options.allowDropFileTypes&&mt(y.options.allowDropFileTypes,xt.type)==-1){ue();return}var bn=new FileReader;bn.onerror=function(){return ue()},bn.onload=function(){var Rn=bn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Rn)){ue();return}ne[nn]=Rn,ue()},bn.readAsText(xt)},he=0;he<b.length;he++)ce(b[he],he);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var Ae=a.dataTransfer.getData("Text");if(Ae){var Xe;if(y.state.draggingText&&!y.state.draggingText.copy&&(Xe=y.listSelections()),Ba(y.doc,po(x,x)),Xe)for(var Pt=0;Pt<Xe.length;++Pt)Ho(y.doc,"",Xe[Pt].anchor,Xe[Pt].head,"drag");y.replaceSelection(Ae,"around","paste"),y.display.input.focus()}}catch(xt){}}}}function xu(a,y){if(be&&(!a.state.draggingText||+new Date-dl<100)){we(y);return}if(!(kt(a,y)||gi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!et)){var x=_e("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function Cu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();Es(a,x,b),a.display.dragCursor||(a.display.dragCursor=_e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Fe(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hl(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var ne=0;ne<x.length;ne++)a(x[ne])})}}var pl=!1;function wu(){pl||(Su(),pl=!0)}function Su(){var a;Zt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hl(Eu)},100))}),Zt(window,"blur",function(){return hl(Ao)})}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"},da=0;da<10;da++)yo[da+48]=yo[da+96]=String(da);for(var Fa=65;Fa<=90;Fa++)yo[Fa]=String.fromCharCode(Fa);for(var fa=1;fa<=12;fa++)yo[fa+111]=yo[fa+63235]="F"+fa;var ao={};ao.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"},ao.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"},ao.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"},ao.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"]},ao.default=Ne?ao.macDefault:ao.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ne,ae=0;ae<y.length-1;ae++){var ue=y[ae];if(/^(cmd|meta|m)$/i.test(ue))ne=!0;else if(/^a(lt)?$/i.test(ue))x=!0;else if(/^(c|ctrl|control)$/i.test(ue))b=!0;else if(/^s(hift)?$/i.test(ue))E=!0;else throw new Error("Unrecognized modifier name: "+ue)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ne&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Iu(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=_t(x.split(" "),ku),ne=0;ne<E.length;ne++){var ae=void 0,ue=void 0;ne==E.length-1?(ue=E.join(" "),ae=b):(ue=E.slice(0,ne+1).join(" "),ae="...");var ce=y[ue];if(!ce)y[ue]=ae;else if(ce!=ae)throw new Error("Inconsistent bindings for "+ue)}delete a[x]}for(var he in y)a[he]=y[he];return a}function $o(a,y,x,b){y=za(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return $o(a,y.fallthrough,x,b);for(var ne=0;ne<y.fallthrough.length;ne++){var ae=$o(a,y.fallthrough[ne],x,b);if(ae)return ae}}}function ml(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function vl(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(gt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(gt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),vl(x,a,y))}function za(a){return typeof a=="string"?ao[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ne=y(x[E]);b.length&&Le(ne.from,it(b).to)<=0;){var ae=b.pop();if(Le(ae.from,ne.from)<0){ne.from=ae.from;break}}b.push(ne)}Wi(a,function(){for(var ue=b.length-1;ue>=0;ue--)Ho(a.doc,"",b[ue].from,b[ue].to,"+delete");Bo(a)})}function cs(a,y,x){var b=Ht(a.text,y+x,x);return b<0||b>a.text.length?null:b}function ds(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new ye(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ne=Jt(x,y.doc.direction);if(ne){var ae=E<0?it(ne):ne[0],ue=E<0==(ae.level==1),ce=ue?"after":"before",he;if(ae.level>0||y.doc.direction=="rtl"){var Ae=uo(y,x);he=E<0?x.text.length-1:0;var Xe=Vi(y,Ae,he).top;he=Ye(function(Pt){return Vi(y,Ae,Pt).top==Xe},E<0==(ae.level==1)?ae.from:ae.to-1,he),ce=="before"&&(he=cs(x,he,1))}else he=E<0?ae.to:ae.from;return new ye(b,he,ce)}}return new ye(b,E<0?x.text.length:0,E<0?"before":"after")}function Mu(a,y,x,b){var E=Jt(y,a.doc.direction);if(!E)return ds(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ne=Rt(E,x.ch,x.sticky),ae=E[ne];if(a.doc.direction=="ltr"&&ae.level%2==0&&(b>0?ae.to>x.ch:ae.from<x.ch))return ds(y,x,b);var ue=function(Un,tr){return cs(y,Un instanceof ye?Un.ch:Un,tr)},ce,he=function(Un){return a.options.lineWrapping?(ce=ce||uo(a,y),ii(a,y,ce,Un)):{begin:0,end:y.text.length}},Ae=he(x.sticky=="before"?ue(x,-1):x.ch);if(a.doc.direction=="rtl"||ae.level==1){var Xe=ae.level==1==b<0,Pt=ue(x,Xe?1:-1);if(Pt!=null&&(Xe?Pt<=ae.to&&Pt<=Ae.end:Pt>=ae.from&&Pt>=Ae.begin)){var xt=Xe?"before":"after";return new ye(x.line,Pt,xt)}}var nn=function(Un,tr,_n){for(var or=function(Yr,mi){return mi?new ye(x.line,ue(Yr,1),"before"):new ye(x.line,Yr,"after")};Un>=0&&Un<E.length;Un+=tr){var gr=E[Un],hr=tr>0==(gr.level!=1),Tr=hr?_n.begin:ue(_n.end,-1);if(gr.from<=Tr&&Tr<gr.to||(Tr=hr?gr.from:ue(gr.to,-1),_n.begin<=Tr&&Tr<_n.end))return or(Tr,hr)}},bn=nn(ne+b,b,Ae);if(bn)return bn;var Rn=b>0?Ae.end:ue(Ae.begin,-1);return Rn!=null&&!(b>0&&Rn==y.text.length)&&(bn=nn(b>0?0:E.length-1,b,he(Rn)),bn)?bn:null}var ha={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ze)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=Et(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:ye(y.head.line+1,0)}:{from:y.head,to:ye(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:ye(y.from().line,0),to:Oe(a.doc,ye(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:ye(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(ye(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(ye(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Pu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},bt)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},bt)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bl(a,y.head):b},bt)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var ne=x[E].from(),ae=Ce(a.getLine(ne.line),ne.ch,b);y.push(sn(b-ae%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Wi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ne=Et(a.doc,E.line).text;if(ne){if(E.ch==ne.length&&(E=new ye(E.line,E.ch-1)),E.ch>0)E=new ye(E.line,E.ch+1),a.replaceRange(ne.charAt(E.ch-1)+ne.charAt(E.ch-2),ye(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ae=Et(a.doc,E.line-1).text;ae&&(E=new ye(E.line,1),a.replaceRange(ne.charAt(0)+a.doc.lineSeparator()+ae.charAt(ae.length-1),ye(E.line-1,ae.length-1),E,"+transpose"))}}x.push(new Ur(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Wi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);Bo(a)})},openLine:function(a){return a.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=Et(a.doc,y),b=Gt(x);return b!=x&&(y=De(b)),fs(!0,a,b,y,1)}function Pu(a,y){var x=Et(a.doc,y),b=An(x);return b!=x&&(y=De(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=Et(a.doc,x.line),E=Jt(b,a.doc.direction);if(!E||E[0].level==0){var ne=Math.max(x.ch,b.text.search(/\S/)),ae=y.line==x.line&&y.ch<=ne&&y.ch;return ye(x.line,ae?0:ne,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=ha[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=Mt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Du(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=$o(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&$o(y,a.options.extraKeys,x,a)||$o(y,a.options.keyMap,x,a)}var Lu=new de;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(ml(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Lu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Du(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Or(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(Qe(x),Xa(a)),!!E}function Cl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Ou(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hs=null;function wl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=ot(),!kt(y,a))){be&&Se<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=Cl(y,a);fe&&(hs=b?x:null,!b&&x==88&&!fn&&(Ne?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),te&&!Ne&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Tu(y)}}function Tu(a){var y=a.display.lineDiv;pe(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(Ke(y,"CodeMirror-crosshair"),cn(document,"keyup",x),cn(document,"mouseover",x))}Zt(document,"keyup",x),Zt(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),kt(this,a)}function El(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(gi(y.display,a)||kt(y,a)||a.ctrlKey&&!a.altKey||Ne&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==hs){hs=null,Qe(a);return}if(!(fe&&(!a.which||a.which<10)&&Cl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Ou(y,a,E)||y.display.input.onKeyPress(a))}}}var Au=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Au>a&&Le(y,this.pos)==0&&x==this.button};var ma,va;function Bu(a,y){var x=+new Date;return va&&va.compare(x,a,y)?(ma=va=null,"triple"):ma&&ma.compare(x,a,y)?(va=new ps(x,a,y),ma=null,"double"):(ma=new ps(x,a,y),va=null,"single")}function kl(a){var y=this,x=y.display;if(!(kt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,gi(x,a)){He||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!ms(y,a)){var b=wo(y,a),E=st(a),ne=b?Bu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,ne,a))&&(E==1?b?Fu(y,b,ne,a):$e(a)==x.scroller&&Qe(a):E==2?(b&&Aa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(ct?y.display.input.onContextMenu(a):Is(y)))}}}function Nu(a,y,x,b,E){var ne="Click";return b=="double"?ne="Double"+ne:b=="triple"&&(ne="Triple"+ne),ne=(y==1?"Left":y==2?"Middle":"Right")+ne,pa(a,vl(ne,E),E,function(ae){if(typeof ae=="string"&&(ae=ha[ae]),!ae)return!1;var ue=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ue=ae(a,x)!=Mt}finally{a.state.suppressEdits=!1}return ue})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ne=pt?x.shiftKey&&x.metaKey:x.altKey;E.unit=ne?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Ne?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ne?x.altKey:x.ctrlKey)),E}function Fu(a,y,x,b){be?setTimeout(Ct(ks,a),0):a.curOp.focus=ot();var E=Ru(a,x,b),ne=a.doc.sel,ae;a.options.dragDrop&&Tt&&!a.isReadOnly()&&x=="single"&&(ae=ne.contains(y))>-1&&(Le((ae=ne.ranges[ae]).from(),y)<0||y.xRel>0)&&(Le(ae.to(),y)>0||y.xRel<0)?zu(a,b,y,E):Hu(a,b,y,E)}function zu(a,y,x,b){var E=a.display,ne=!1,ae=hi(a,function(he){He&&(E.scroller.draggable=!1),a.state.draggingText=!1,cn(E.wrapper.ownerDocument,"mouseup",ae),cn(E.wrapper.ownerDocument,"mousemove",ue),cn(E.scroller,"dragstart",ce),cn(E.scroller,"drop",ae),ne||(Qe(he),b.addNew||Aa(a.doc,x,null,null,b.extend),He&&!et||be&&Se==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ue=function(he){ne=ne||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ce=function(){return ne=!0};He&&(E.scroller.draggable=!0),a.state.draggingText=ae,ae.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Zt(E.wrapper.ownerDocument,"mouseup",ae),Zt(E.wrapper.ownerDocument,"mousemove",ue),Zt(E.scroller,"dragstart",ce),Zt(E.scroller,"drop",ae),Is(a),setTimeout(function(){return E.input.focus()},20)}function Il(a,y,x){if(x=="char")return new Ur(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Ur(ye(y.line,0),Oe(a.doc,ye(y.line+1,0)));var b=x(a,y);return new Ur(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ne=a.doc;Qe(y);var ae,ue,ce=ne.sel,he=ce.ranges;if(b.addNew&&!b.extend?(ue=ne.sel.contains(x),ue>-1?ae=he[ue]:ae=new Ur(x,x)):(ae=ne.sel.primary(),ue=ne.sel.primIndex),b.unit=="rectangle")b.addNew||(ae=new Ur(x,x)),x=wo(a,y,!0,!0),ue=-1;else{var Ae=Il(a,x,b.unit);b.extend?ae=ls(ae,Ae.anchor,Ae.head,b.extend):ae=Ae}b.addNew?ue==-1?(ue=he.length,wi(ne,Qi(a,he.concat([ae]),ue),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ue].empty()&&b.unit=="char"&&!b.extend?(wi(ne,Qi(a,he.slice(0,ue).concat(he.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),ce=ne.sel):us(ne,ue,ae,dt):(ue=0,wi(ne,new ji([ae],0),dt),ce=ne.sel);var Xe=x;function Pt(_n){if(Le(Xe,_n)!=0)if(Xe=_n,b.unit=="rectangle"){for(var or=[],gr=a.options.tabSize,hr=Ce(Et(ne,x.line).text,x.ch,gr),Tr=Ce(Et(ne,_n.line).text,_n.ch,gr),Yr=Math.min(hr,Tr),mi=Math.max(hr,Tr),Qr=Math.min(x.line,_n.line),$i=Math.min(a.lastLine(),Math.max(x.line,_n.line));Qr<=$i;Qr++){var Ti=Et(ne,Qr).text,ai=un(Ti,Yr,gr);Yr==mi?or.push(new Ur(ye(Qr,ai),ye(Qr,ai))):Ti.length>ai&&or.push(new Ur(ye(Qr,ai),ye(Qr,un(Ti,mi,gr))))}or.length||or.push(new Ur(x,x)),wi(ne,Qi(a,ce.ranges.slice(0,ue).concat(or),ue),{origin:"*mouse",scroll:!1}),a.scrollIntoView(_n)}else{var Ai=ae,bi=Il(a,_n,b.unit),di=Ai.anchor,si;Le(bi.anchor,di)>0?(si=bi.head,di=qe(Ai.from(),bi.anchor)):(si=bi.anchor,di=Ze(Ai.to(),bi.head));var ei=ce.ranges.slice(0);ei[ue]=Wu(a,new Ur(Oe(ne,di),si)),wi(ne,Qi(a,ei,ue),dt)}}var xt=E.wrapper.getBoundingClientRect(),nn=0;function bn(_n){var or=++nn,gr=wo(a,_n,!0,b.unit=="rectangle");if(gr)if(Le(gr,Xe)!=0){a.curOp.focus=ot(),Pt(gr);var hr=Ma(E,ne);(gr.line>=hr.to||gr.line<hr.from)&&setTimeout(hi(a,function(){nn==or&&bn(_n)}),150)}else{var Tr=_n.clientY<xt.top?-20:_n.clientY>xt.bottom?20:0;Tr&&setTimeout(hi(a,function(){nn==or&&(E.scroller.scrollTop+=Tr,bn(_n))}),50)}}function Rn(_n){a.state.selectingText=!1,nn=1/0,_n&&(Qe(_n),E.input.focus()),cn(E.wrapper.ownerDocument,"mousemove",Un),cn(E.wrapper.ownerDocument,"mouseup",tr),ne.history.lastSelOrigin=null}var Un=hi(a,function(_n){_n.buttons===0||!st(_n)?Rn(_n):bn(_n)}),tr=hi(a,Rn);a.state.selectingText=tr,Zt(E.wrapper.ownerDocument,"mousemove",Un),Zt(E.wrapper.ownerDocument,"mouseup",tr)}function Wu(a,y){var x=y.anchor,b=y.head,E=Et(a.doc,x.line);if(Le(x,b)==0&&x.sticky==b.sticky)return y;var ne=Jt(E);if(!ne)return y;var ae=Rt(ne,x.ch,x.sticky),ue=ne[ae];if(ue.from!=x.ch&&ue.to!=x.ch)return y;var ce=ae+(ue.from==x.ch==(ue.level!=1)?0:1);if(ce==0||ce==ne.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Ae=Rt(ne,b.ch,b.sticky),Xe=Ae-ae||(b.ch-x.ch)*(ue.level==1?-1:1);Ae==ce-1||Ae==ce?he=Xe<0:he=Xe>0}var Pt=ne[ce+(he?-1:0)],xt=he==(Pt.level==1),nn=xt?Pt.from:Pt.to,bn=xt?"after":"before";return x.ch==nn&&x.sticky==bn?y:new Ur(new ye(x.line,nn,bn),b)}function Ml(a,y,x,b){var E,ne;if(y.touches)E=y.touches[0].clientX,ne=y.touches[0].clientY;else try{E=y.clientX,ne=y.clientY}catch(Pt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&Qe(y);var ae=a.display,ue=ae.lineDiv.getBoundingClientRect();if(ne>ue.bottom||!Qt(a,x))return Nt(y);ne-=ue.top-ae.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var he=ae.gutters.childNodes[ce];if(he&&he.getBoundingClientRect().right>=E){var Ae=Ue(a.doc,ne),Xe=a.display.gutterSpecs[ce];return wn(a,x,a,Ae,Xe.className,y),Nt(y)}}}function ms(a,y){return Ml(a,y,"gutterClick",!0)}function Pl(a,y){gi(a.display,y)||$u(a,y)||kt(a,y,"contextmenu")||ct||a.display.input.onContextMenu(y)}function $u(a,y){return Qt(a,"gutterContextMenu")?Ml(a,y,"gutterContextMenu",!1):!1}function Dl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Co(a)}var jo={toString:function(){return"CodeMirror.Init"}},Ll={},Wa={};function Zu(a){var y=a.optionHandlers;function x(b,E,ne,ae){a.defaults[b]=E,ne&&(y[b]=ae?function(ue,ce,he){he!=jo&&ne(ue,ce,he)}:ne)}a.defineOption=x,a.Init=jo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),Co(b),Li(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ne=[],ae=b.doc.first;b.doc.iter(function(ce){for(var he=0;;){var Ae=ce.text.indexOf(E,he);if(Ae==-1)break;he=Ae+E.length,ne.push(ye(ae,Ae))}ae++});for(var ue=ne.length-1;ue>=0;ue--)Ho(b.doc,E,ne[ue],ye(ne[ue].line,ne[ue].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ne){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ne!=jo&&b.refresh()}),x("specialCharPlaceholder",Ei,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Ve?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!It),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Dl(b),ra(b)},!0),x("keyMap","default",function(b,E,ne){var ae=za(E),ue=ne!=jo&&za(ne);ue&&ue.detach&&ue.detach(b,ae),ae.attach&&ae.attach(b,ue||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?_a(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return No(b)},!0),x("scrollbarStyle","native",function(b){Ts(b),No(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Jo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Ao(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,ju),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Jo,!0),x("singleCursorHeightPerLine",!0,Jo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function ju(a,y,x){var b=x&&x!=jo;if(!y!=!b){var E=a.display.dragFunctions,ne=y?Zt:cn;ne(a.display.scroller,"dragstart",E.start),ne(a.display.scroller,"dragenter",E.enter),ne(a.display.scroller,"dragover",E.over),ne(a.display.scroller,"dragleave",E.leave),ne(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(pe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ke(a.display.wrapper,"CodeMirror-wrap"),Ir(a)),Ka(a),Li(a),Co(a),setTimeout(function(){return No(a)},100)}function Jr(a,y){var x=this;if(!(this instanceof Jr))return new Jr(a,y);this.options=y=y?qt(y):{},qt(Ll,y,!1);var b=y.value;typeof b=="string"?b=new Oi(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Jr.inputStyles[y.inputStyle](this),ne=this.display=new ru(a,b,E,y);ne.wrapper.CodeMirror=this,Dl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(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 de,keySeq:null,specialChars:null},y.autofocus&&!Ve&&ne.input.focus(),be&&Se<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),wu(),Io(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Ve||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ya(x)},20):Ao(this);for(var ae in Wa)Wa.hasOwnProperty(ae)&&Wa[ae](this,y[ae],jo);Ns(this),y.finishInit&&y.finishInit(this);for(var ue=0;ue<vs.length;++ue)vs[ue](this);Mo(this),He&&y.lineWrapping&&getComputedStyle(ne.lineDiv).textRendering=="optimizelegibility"&&(ne.lineDiv.style.textRendering="auto")}Jr.defaults=Ll,Jr.optionHandlers=Wa;function Vu(a){var y=a.display;Zt(y.scroller,"mousedown",hi(a,kl)),be&&Se<11?Zt(y.scroller,"dblclick",hi(a,function(ce){if(!kt(a,ce)){var he=wo(a,ce);if(!(!he||ms(a,ce)||gi(a.display,ce))){Qe(ce);var Ae=a.findWordAt(he);Aa(a.doc,Ae.anchor,Ae.head)}}})):Zt(y.scroller,"dblclick",function(ce){return kt(a,ce)||Qe(ce)}),Zt(y.scroller,"contextmenu",function(ce){return Pl(a,ce)}),Zt(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Pl(a,ce)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ne(ce){if(ce.touches.length!=1)return!1;var he=ce.touches[0];return he.radiusX<=1&&he.radiusY<=1}function ae(ce,he){if(he.left==null)return!0;var Ae=he.left-ce.left,Xe=he.top-ce.top;return Ae*Ae+Xe*Xe>20*20}Zt(y.scroller,"touchstart",function(ce){if(!kt(a,ce)&&!ne(ce)&&!ms(a,ce)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),Zt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Zt(y.scroller,"touchend",function(ce){var he=y.activeTouch;if(he&&!gi(y,ce)&&he.left!=null&&!he.moved&&new Date-he.start<300){var Ae=a.coordsChar(y.activeTouch,"page"),Xe;!he.prev||ae(he,he.prev)?Xe=new Ur(Ae,Ae):!he.prev.prev||ae(he,he.prev.prev)?Xe=a.findWordAt(Ae):Xe=new Ur(ye(Ae.line,0),Oe(a.doc,ye(Ae.line+1,0))),a.setSelection(Xe.anchor,Xe.head),a.focus(),Qe(ce)}E()}),Zt(y.scroller,"touchcancel",E),Zt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qo(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),wn(a,"scroll",a))}),Zt(y.scroller,"mousewheel",function(ce){return zs(a,ce)}),Zt(y.scroller,"DOMMouseScroll",function(ce){return zs(a,ce)}),Zt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){kt(a,ce)||we(ce)},over:function(ce){kt(a,ce)||(Cu(a,ce),we(ce))},start:function(ce){return xu(a,ce)},drop:hi(a,bu),leave:function(ce){kt(a,ce)||fl(a)}};var ue=y.input.getField();Zt(ue,"keyup",function(ce){return Sl.call(a,ce)}),Zt(ue,"keydown",hi(a,wl)),Zt(ue,"keypress",hi(a,El)),Zt(ue,"focus",function(ce){return Ya(a,ce)}),Zt(ue,"blur",function(ce){return Ao(a,ce)})}var vs=[];Jr.defineInitHook=function(a){return vs.push(a)};function ga(a,y,x,b){var E=a.doc,ne;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ne=Tn(a,y).state:x="prev");var ae=a.options.tabSize,ue=Et(E,y),ce=Ce(ue.text,null,ae);ue.stateAfter&&(ue.stateAfter=null);var he=ue.text.match(/^\s*/)[0],Ae;if(!b&&!/\S/.test(ue.text))Ae=0,x="not";else if(x=="smart"&&(Ae=E.mode.indent(ne,ue.text.slice(he.length),ue.text),Ae==Mt||Ae>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?Ae=Ce(Et(E,y-1).text,null,ae):Ae=0:x=="add"?Ae=ce+a.options.indentUnit:x=="subtract"?Ae=ce-a.options.indentUnit:typeof x=="number"&&(Ae=ce+x),Ae=Math.max(0,Ae);var Xe="",Pt=0;if(a.options.indentWithTabs)for(var xt=Math.floor(Ae/ae);xt;--xt)Pt+=ae,Xe+=" ";if(Pt<Ae&&(Xe+=sn(Ae-Pt)),Xe!=he)return Ho(E,Xe,ye(y,0),ye(y,he.length),"+input"),ue.stateAfter=null,!0;for(var nn=0;nn<E.sel.ranges.length;nn++){var bn=E.sel.ranges[nn];if(bn.head.line==y&&bn.head.ch<he.length){var Rn=ye(y,he.length);us(E,nn,new Ur(Rn,Rn));break}}}var qi=null;function $a(a){qi=a}function gs(a,y,x,b,E){var ne=a.doc;a.display.shift=!1,b||(b=ne.sel);var ae=+new Date-200,ue=E=="paste"||a.state.pasteIncoming>ae,ce=dn(y),he=null;if(ue&&b.ranges.length>1)if(qi&&qi.text.join(`
|
|
|
`)==y){if(b.ranges.length%qi.text.length==0){he=[];for(var Ae=0;Ae<qi.text.length;Ae++)he.push(ne.splitLines(qi.text[Ae]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=_t(ce,function(Un){return[Un]}));for(var Xe=a.curOp.updateInput,Pt=b.ranges.length-1;Pt>=0;Pt--){var xt=b.ranges[Pt],nn=xt.from(),bn=xt.to();xt.empty()&&(x&&x>0?nn=ye(nn.line,nn.ch-x):a.state.overwrite&&!ue?bn=ye(bn.line,Math.min(Et(ne,bn.line).text.length,bn.ch+it(ce).length)):ue&&qi&&qi.lineWise&&qi.text.join(`
|
|
|
`)==ce.join(`
|
|
|
`)&&(nn=bn=ye(nn.line,0)));var Rn={from:nn,to:bn,text:he?he[Pt%he.length]:ce,origin:E||(ue?"paste":a.state.cutIncoming>ae?"cut":"+input")};zo(a.doc,Rn),Or(a,"inputRead",a,Rn)}y&&!ue&&Tl(a,y),Bo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Xe),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ol(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Wi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Tl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ne=a.getModeAt(E.head),ae=!1;if(ne.electricChars){for(var ue=0;ue<ne.electricChars.length;ue++)if(y.indexOf(ne.electricChars.charAt(ue))>-1){ae=ga(a,E.head.line,"smart");break}}else ne.electricInput&&ne.electricInput.test(Et(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ae=ga(a,E.head.line,"smart"));ae&&Or(a,"electricInput",a,E.head.line)}}}function Al(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ne={anchor:ye(E,0),head:ye(E+1,0)};x.push(ne),y.push(a.getRange(ne.anchor,ne.head))}return{text:y,ranges:x}}function Bl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Nl(){var a=_e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=_e("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return He?a.style.width="1000px":a.setAttribute("wrap","off"),rt&&(a.style.border="1px solid black"),Bl(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ne=this.options,ae=ne[b];ne[b]==E&&b!="mode"||(ne[b]=E,y.hasOwnProperty(b)&&hi(this,y[b])(this,E,ae),wn(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](za(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ne=0;ne<E.length;++ne)if(E[ne]==b||E[ne].name==b)return E.splice(ne,1),!0},addOverlay:Ii(function(b,E){var ne=b.token?b:a.getMode(this.options,b);if(ne.startState)throw new Error("Overlays may not be stateful.");ht(this.state.overlays,{mode:ne,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Li(this)}),removeOverlay:Ii(function(b){for(var E=this.state.overlays,ne=0;ne<E.length;++ne){var ae=E[ne].modeSpec;if(ae==b||typeof b=="string"&&ae.name==b){E.splice(ne,1),this.state.modeGen++,Li(this);return}}}),indentLine:Ii(function(b,E,ne){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),ge(this.doc,b)&&ga(this,b,E,ne)}),indentSelection:Ii(function(b){for(var E=this.doc.sel.ranges,ne=-1,ae=0;ae<E.length;ae++){var ue=E[ae];if(ue.empty())ue.head.line>ne&&(ga(this,ue.head.line,b,!0),ne=ue.head.line,ae==this.doc.sel.primIndex&&Bo(this));else{var ce=ue.from(),he=ue.to(),Ae=Math.max(ne,ce.line);ne=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Xe=Ae;Xe<ne;++Xe)ga(this,Xe,b);var Pt=this.doc.sel.ranges;ce.ch==0&&E.length==Pt.length&&Pt[ae].from().ch>0&&us(this.doc,ae,new Ur(ce,Pt[ae].to()),ze)}}}),getTokenAt:function(b,E){return Fn(this,b,E)},getLineTokens:function(b,E){return Fn(this,ye(b),E,!0)},getTokenTypeAt:function(b){b=Oe(this.doc,b);var E=kn(this,Et(this.doc,b.line)),ne=0,ae=(E.length-1)/2,ue=b.ch,ce;if(ue==0)ce=E[2];else for(;;){var he=ne+ae>>1;if((he?E[he*2-1]:0)>=ue)ae=he;else if(E[he*2+1]<ue)ne=he+1;else{ce=E[he*2+2];break}}var Ae=ce?ce.indexOf("overlay "):-1;return Ae<0?ce:Ae==0?null:ce.slice(0,Ae-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var ne=[];if(!x.hasOwnProperty(E))return ne;var ae=x[E],ue=this.getModeAt(b);if(typeof ue[E]=="string")ae[ue[E]]&&ne.push(ae[ue[E]]);else if(ue[E])for(var ce=0;ce<ue[E].length;ce++){var he=ae[ue[E][ce]];he&&ne.push(he)}else ue.helperType&&ae[ue.helperType]?ne.push(ae[ue.helperType]):ae[ue.name]&&ne.push(ae[ue.name]);for(var Ae=0;Ae<ae._global.length;Ae++){var Xe=ae._global[Ae];Xe.pred(ue,this)&&mt(ne,Xe.val)==-1&&ne.push(Xe.val)}return ne},getStateAfter:function(b,E){var ne=this.doc;return b=je(ne,b==null?ne.first+ne.size-1:b),Tn(this,b+1,E).state},cursorCoords:function(b,E){var ne,ae=this.doc.sel.primary();return b==null?ne=ae.head:typeof b=="object"?ne=Oe(this.doc,b):ne=b?ae.from():ae.to(),Di(this,ne,E||"page")},charCoords:function(b,E){return To(this,Oe(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),yi(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Ue(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ne){var ae=!1,ue;if(typeof b=="number"){var ce=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ce&&(b=ce,ae=!0),ue=Et(this.doc,b)}else ue=b;return Oo(this,ue,{top:0,left:0},E||"page",ne||ae).top+(ae?this.doc.height-cr(ue):0)},defaultTextHeight:function(){return Hi(this.display)},defaultCharWidth:function(){return Ji(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ne,ae,ue){var ce=this.display;b=Di(this,Oe(this.doc,b));var he=b.bottom,Ae=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),ae=="over")he=b.top;else if(ae=="above"||ae=="near"){var Xe=Math.max(ce.wrapper.clientHeight,this.doc.height),Pt=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(ae=="above"||b.bottom+E.offsetHeight>Xe)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Xe&&(he=b.bottom),Ae+E.offsetWidth>Pt&&(Ae=Pt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ue=="right"?(Ae=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ue=="left"?Ae=0:ue=="middle"&&(Ae=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Ae+"px"),ne&&jl(this,{left:Ae,top:he,right:Ae+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:Ii(wl),triggerOnKeyPress:Ii(El),triggerOnKeyUp:Sl,triggerOnMouseDown:Ii(kl),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:Ii(function(b){Tl(this,b)}),findPosH:function(b,E,ne,ae){var ue=1;E<0&&(ue=-1,E=-E);for(var ce=Oe(this.doc,b),he=0;he<E&&(ce=ys(this.doc,ce,ue,ne,ae),!ce.hitSide);++he);return ce},moveH:Ii(function(b,E){var ne=this;this.extendSelectionsBy(function(ae){return ne.display.shift||ne.doc.extend||ae.empty()?ys(ne.doc,ae.head,b,E,ne.options.rtlMoveVisually):b<0?ae.from():ae.to()},bt)}),deleteH:Ii(function(b,E){var ne=this.doc.sel,ae=this.doc;ne.somethingSelected()?ae.replaceSelection("",null,"+delete"):Zo(this,function(ue){var ce=ys(ae,ue.head,b,E,!1);return b<0?{from:ce,to:ue.head}:{from:ue.head,to:ce}})}),findPosV:function(b,E,ne,ae){var ue=1,ce=ae;E<0&&(ue=-1,E=-E);for(var he=Oe(this.doc,b),Ae=0;Ae<E;++Ae){var Xe=Di(this,he,"div");if(ce==null?ce=Xe.left:Xe.left=ce,he=Rl(this,Xe,ue,ne),he.hitSide)break}return he},moveV:Ii(function(b,E){var ne=this,ae=this.doc,ue=[],ce=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Ae){if(ce)return b<0?Ae.from():Ae.to();var Xe=Di(ne,Ae.head,"div");Ae.goalColumn!=null&&(Xe.left=Ae.goalColumn),ue.push(Xe.left);var Pt=Rl(ne,Xe,b,E);return E=="page"&&Ae==ae.sel.primary()&&Qa(ne,To(ne,Pt,"div").top-Xe.top),Pt},bt),ue.length)for(var he=0;he<ae.sel.ranges.length;he++)ae.sel.ranges[he].goalColumn=ue[he]}),findWordAt:function(b){var E=this.doc,ne=Et(E,b.line).text,ae=b.ch,ue=b.ch;if(ne){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||ue==ne.length)&&ae?--ae:++ue;for(var he=ne.charAt(ae),Ae=le(he,ce)?function(Xe){return le(Xe,ce)}:/\s/.test(he)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!le(Xe)};ae>0&&Ae(ne.charAt(ae-1));)--ae;for(;ue<ne.length&&Ae(ne.charAt(ue));)++ue}return new Ur(ye(b.line,ae),ye(b.line,ue))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?pe(this.display.cursorDiv,"CodeMirror-overwrite"):Ke(this.display.cursorDiv,"CodeMirror-overwrite"),wn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ot()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ii(function(b,E){Qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Fi(this)-this.display.barHeight,width:b.scrollWidth-Fi(this)-this.display.barWidth,clientHeight:io(this),clientWidth:to(this)}},scrollIntoView:Ii(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:ye(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?Gl(this,b):Ps(this,b.from,b.to,b.margin)}),setSize:Ii(function(b,E){var ne=this,ae=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=ae(b)),E!=null&&(this.display.wrapper.style.height=ae(E)),this.options.lineWrapping&&Ko(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(ce){if(ce.widgets){for(var he=0;he<ce.widgets.length;he++)if(ce.widgets[he].noHScroll){fo(ne,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,wn(this,"refresh",this)}),operation:function(b){return Wi(this,b)},startOperation:function(){return Io(this)},endOperation:function(){return Mo(this)},refresh:Ii(function(){var b=this.display.cachedTextHeight;Li(this),this.curOp.forceUpdate=!0,Co(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Hi(this.display))>.5||this.options.lineWrapping)&&Ka(this),wn(this,"refresh",this)}),swapDoc:Ii(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),Co(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Or(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Pe(a),a.registerHelper=function(b,E,ne){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ne},a.registerGlobalHelper=function(b,E,ne,ae){a.registerHelper(b,E,ae),x[b]._global.push({pred:ne,val:ae})}}function ys(a,y,x,b,E){var ne=y,ae=x,ue=Et(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function he(){var tr=y.line+ce;return tr<a.first||tr>=a.first+a.size?!1:(y=new ye(tr,y.ch,y.sticky),ue=Et(a,tr))}function Ae(tr){var _n;if(b=="codepoint"){var or=ue.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(or)?_n=null:_n=new ye(y.line,Math.max(0,Math.min(ue.text.length,y.ch+x*(or>=55296&&or<56320?2:1))),-x)}else E?_n=Mu(a.cm,ue,y,x):_n=ds(ue,y,x);if(_n==null)if(!tr&&he())y=fs(E,a.cm,ue,y.line,ce);else return!1;else y=_n;return!0}if(b=="char"||b=="codepoint")Ae();else if(b=="column")Ae(!0);else if(b=="word"||b=="group")for(var Xe=null,Pt=b=="group",xt=a.cm&&a.cm.getHelper(y,"wordChars"),nn=!0;!(x<0&&!Ae(!nn));nn=!1){var bn=ue.text.charAt(y.ch)||`
|
|
|
`,Rn=le(bn,xt)?"w":Pt&&bn==`
|
|
|
`?"n":!Pt||/\s/.test(bn)?null:"p";if(Pt&&!nn&&!Rn&&(Rn="s"),Xe&&Xe!=Rn){x<0&&(x=1,Ae(),y.sticky="after");break}if(Rn&&(Xe=Rn),x>0&&!Ae(!nn))break}var Un=Na(a,y,ne,ae,!0);return me(ne,Un)&&(Un.hitSide=!0),Un}function Rl(a,y,x,b){var E=a.doc,ne=y.left,ae;if(b=="page"){var ue=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(ue-.5*Hi(a.display),3);ae=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(ae=x>0?y.bottom+3:y.top-3);for(var he;he=yi(a,ne,ae),!!he.outside;){if(x<0?ae<=0:ae>=E.height){he.hitSide=!0;break}ae+=x*5}return he}var _r=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};_r.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Bl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ne(ue){for(var ce=ue.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Zt(E,"paste",function(ue){!ne(ue)||kt(b,ue)||Ol(ue,b)||Se<=11&&setTimeout(hi(b,function(){return y.updateFromDOM()}),20)}),Zt(E,"compositionstart",function(ue){y.composing={data:ue.data,done:!1}}),Zt(E,"compositionupdate",function(ue){y.composing||(y.composing={data:ue.data,done:!1})}),Zt(E,"compositionend",function(ue){y.composing&&(ue.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Zt(E,"touchstart",function(){return x.forceCompositionEnd()}),Zt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ae(ue){if(!(!ne(ue)||kt(b,ue))){if(b.somethingSelected())$a({lineWise:!1,text:b.getSelections()}),ue.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=Al(b);$a({lineWise:!0,text:ce.text}),ue.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,ze),b.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var he=qi.text.join(`
|
|
|
`);if(ue.clipboardData.setData("Text",he),ue.clipboardData.getData("Text")==he){ue.preventDefault();return}}var Ae=Nl(),Xe=Ae.firstChild;b.display.lineSpace.insertBefore(Ae,b.display.lineSpace.firstChild),Xe.value=qi.text.join(`
|
|
|
`);var Pt=document.activeElement;ke(Xe),setTimeout(function(){b.display.lineSpace.removeChild(Ae),Pt.focus(),Pt==E&&x.showPrimarySelection()},50)}}Zt(E,"copy",ae),Zt(E,"cut",ae)},_r.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},_r.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},_r.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},_r.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},_r.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ne=Za(y,a.anchorNode,a.anchorOffset),ae=Za(y,a.focusNode,a.focusOffset);if(!(ne&&!ne.bad&&ae&&!ae.bad&&Le(qe(ne,ae),b)==0&&Le(Ze(ne,ae),E)==0)){var ue=y.display.view,ce=b.line>=y.display.viewFrom&&Fl(y,b)||{node:ue[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Fl(y,E);if(!he){var Ae=ue[ue.length-1].measure,Xe=Ae.maps?Ae.maps[Ae.maps.length-1]:Ae.map;he={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!ce||!he){a.removeAllRanges();return}var Pt=a.rangeCount&&a.getRangeAt(0),xt;try{xt=Re(ce.node,ce.offset,he.offset,he.node)}catch(nn){}xt&&(!te&&y.state.focused?(a.collapse(ce.node,ce.offset),xt.collapsed||(a.removeAllRanges(),a.addRange(xt))):(a.removeAllRanges(),a.addRange(xt)),Pt&&a.anchorNode==null?a.addRange(Pt):te&&this.startGracePeriod()),this.rememberSelection()}},_r.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)},_r.prototype.showMultipleSelections=function(a){Fe(this.cm.display.cursorDiv,a.cursors),Fe(this.cm.display.selectionDiv,a.selection)},_r.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},_r.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return lt(this.div,y)},_r.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},_r.prototype.blur=function(){this.div.blur()},_r.prototype.getField=function(){return this.div},_r.prototype.supportsTouch=function(){return!0},_r.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Wi(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)},_r.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},_r.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(We&&Ie&&this.cm.display.gutterSpecs.length&&_u(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Wi(y,function(){wi(y.doc,po(x,b),ze),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},_r.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=ye(b.line-1,Et(a.doc,b.line-1).length)),E.ch==Et(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=ye(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ne,ae,ue;b.line==y.viewFrom||(ne=So(a,b.line))==0?(ae=De(y.view[0].line),ue=y.view[0].node):(ae=De(y.view[ne].line),ue=y.view[ne-1].node.nextSibling);var ce=So(a,E.line),he,Ae;if(ce==y.view.length-1?(he=y.viewTo-1,Ae=y.lineDiv.lastChild):(he=De(y.view[ce+1].line)-1,Ae=y.view[ce+1].node.previousSibling),!ue)return!1;for(var Xe=a.doc.splitLines(Ku(a,ue,Ae,ae,he)),Pt=Ut(a.doc,ye(ae,0),ye(he,Et(a.doc,he).text.length));Xe.length>1&&Pt.length>1;)if(it(Xe)==it(Pt))Xe.pop(),Pt.pop(),he--;else if(Xe[0]==Pt[0])Xe.shift(),Pt.shift(),ae++;else break;for(var xt=0,nn=0,bn=Xe[0],Rn=Pt[0],Un=Math.min(bn.length,Rn.length);xt<Un&&bn.charCodeAt(xt)==Rn.charCodeAt(xt);)++xt;for(var tr=it(Xe),_n=it(Pt),or=Math.min(tr.length-(Xe.length==1?xt:0),_n.length-(Pt.length==1?xt:0));nn<or&&tr.charCodeAt(tr.length-nn-1)==_n.charCodeAt(_n.length-nn-1);)++nn;if(Xe.length==1&&Pt.length==1&&ae==b.line)for(;xt&&xt>b.ch&&tr.charCodeAt(tr.length-nn-1)==_n.charCodeAt(_n.length-nn-1);)xt--,nn++;Xe[Xe.length-1]=tr.slice(0,tr.length-nn).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(xt).replace(/\u200b+$/,"");var gr=ye(ae,xt),hr=ye(he,Pt.length?it(Pt).length-nn:0);if(Xe.length>1||Xe[0]||Le(gr,hr))return Ho(a.doc,Xe,gr,hr,"+input"),!0},_r.prototype.ensurePolled=function(){this.forceCompositionEnd()},_r.prototype.reset=function(){this.forceCompositionEnd()},_r.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},_r.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))},_r.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return Li(a.cm)})},_r.prototype.setUneditable=function(a){a.contentEditable="false"},_r.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||hi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},_r.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},_r.prototype.onContextMenu=function(){},_r.prototype.resetPosition=function(){},_r.prototype.needsContentAttribute=!0;function Fl(a,y){var x=no(a,y.line);if(!x||x.hidden)return null;var b=Et(a.doc,y.line),E=Lo(x,b,y.line),ne=Jt(b,a.doc.direction),ae="left";if(ne){var ue=Rt(ne,y.ch);ae=ue%2?"right":"left"}var ce=xa(E.map,y.ch,ae);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function _u(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Ku(a,y,x,b,E){var ne="",ae=!1,ue=a.doc.lineSeparator(),ce=!1;function he(xt){return function(nn){return nn.id==xt}}function Ae(){ae&&(ne+=ue,ce&&(ne+=ue),ae=ce=!1)}function Xe(xt){xt&&(Ae(),ne+=xt)}function Pt(xt){if(xt.nodeType==1){var nn=xt.getAttribute("cm-text");if(nn){Xe(nn);return}var bn=xt.getAttribute("cm-marker"),Rn;if(bn){var Un=a.findMarks(ye(b,0),ye(E+1,0),he(+bn));Un.length&&(Rn=Un[0].find(0))&&Xe(Ut(a.doc,Rn.from,Rn.to).join(ue));return}if(xt.getAttribute("contenteditable")=="false")return;var tr=/^(pre|div|p|li|table|br)$/i.test(xt.nodeName);if(!/^br$/i.test(xt.nodeName)&&xt.textContent.length==0)return;tr&&Ae();for(var _n=0;_n<xt.childNodes.length;_n++)Pt(xt.childNodes[_n]);/^(pre|p)$/i.test(xt.nodeName)&&(ce=!0),tr&&(ae=!0)}else xt.nodeType==3&&Xe(xt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Pt(y),y!=x;)y=y.nextSibling,ce=!1;return ne}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(ye(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ne=a.display.view[E];if(ne.node==b)return Xu(ne,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!lt(b,y))return Go(ye(De(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ne=a.rest?it(a.rest):a.line;return Go(ye(De(ne),ne.text.length),E)}var ae=y.nodeType==3?y:null,ue=y;for(!ae&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ae=y.firstChild,x&&(x=ae.nodeValue.length));ue.parentNode!=b;)ue=ue.parentNode;var ce=a.measure,he=ce.maps;function Ae(Rn,Un,tr){for(var _n=-1;_n<(he?he.length:0);_n++)for(var or=_n<0?ce.map:he[_n],gr=0;gr<or.length;gr+=3){var hr=or[gr+2];if(hr==Rn||hr==Un){var Tr=De(_n<0?a.line:a.rest[_n]),Yr=or[gr]+tr;return(tr<0||hr!=Rn)&&(Yr=or[gr+(tr?1:0)]),ye(Tr,Yr)}}}var Xe=Ae(ae,ue,x);if(Xe)return Go(Xe,E);for(var Pt=ue.nextSibling,xt=ae?ae.nodeValue.length-x:0;Pt;Pt=Pt.nextSibling){if(Xe=Ae(Pt,Pt.firstChild,0),Xe)return Go(ye(Xe.line,Xe.ch-xt),E);xt+=Pt.textContent.length}for(var nn=ue.previousSibling,bn=x;nn;nn=nn.previousSibling){if(Xe=Ae(nn,nn.firstChild,-1),Xe)return Go(ye(Xe.line,Xe.ch+bn),E);bn+=nn.textContent.length}}var oi=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};oi.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),rt&&(E.style.width="0px"),Zt(E,"input",function(){be&&Se>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Zt(E,"paste",function(ae){kt(b,ae)||Ol(ae,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ne(ae){if(!kt(b,ae)){if(b.somethingSelected())$a({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ue=Al(b);$a({lineWise:!0,text:ue.text}),ae.type=="cut"?b.setSelections(ue.ranges,null,ze):(x.prevInput="",E.value=ue.text.join(`
|
|
|
`),ke(E))}else return;ae.type=="cut"&&(b.state.cutIncoming=+new Date)}}Zt(E,"cut",ne),Zt(E,"copy",ne),Zt(a.scroller,"paste",function(ae){if(!(gi(a,ae)||kt(b,ae))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ue=new Event("paste");ue.clipboardData=ae.clipboardData,E.dispatchEvent(ue)}}),Zt(a.lineSpace,"selectstart",function(ae){gi(a,ae)||Qe(ae)}),Zt(E,"compositionstart",function(){var ae=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:ae,range:b.markText(ae,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Zt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},oi.prototype.createField=function(a){this.wrapper=Nl(),this.textarea=this.wrapper.firstChild},oi.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},oi.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=Di(a,x.sel.primary().head,"div"),ne=y.wrapper.getBoundingClientRect(),ae=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ae.top-ne.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ae.left-ne.left))}return b},oi.prototype.showSelection=function(a){var y=this.cm,x=y.display;Fe(x.cursorDiv,a.cursors),Fe(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},oi.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&ke(this.textarea),be&&Se>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",be&&Se>=9&&(this.hasSelection=null))}},oi.prototype.getField=function(){return this.textarea},oi.prototype.supportsTouch=function(){return!1},oi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ve||ot()!=this.textarea))try{this.textarea.focus()}catch(a){}},oi.prototype.blur=function(){this.textarea.blur()},oi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},oi.prototype.receivedFocus=function(){this.slowPoll()},oi.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},oi.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},oi.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||xn(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(be&&Se>=9&&this.hasSelection===E||Ne&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ne=E.charCodeAt(0);if(ne==8203&&!b&&(b="\u200B"),ne==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,ue=Math.min(b.length,E.length);ae<ue&&b.charCodeAt(ae)==E.charCodeAt(ae);)++ae;return Wi(y,function(){gs(y,E.slice(ae),b.length-ae,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
|
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},oi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},oi.prototype.onKeyPress=function(){be&&Se>=9&&(this.hasSelection=null),this.fastPoll()},oi.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ne=wo(x,a),ae=b.scroller.scrollTop;if(!ne||fe)return;var ue=x.options.resetSelectionOnContextMenu;ue&&x.doc.sel.contains(ne)==-1&&hi(x,wi)(x.doc,po(ne),ze);var ce=E.style.cssText,he=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 Xe;He&&(Xe=window.scrollY),b.input.focus(),He&&window.scrollTo(null,Xe),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=xt,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Pt(){if(E.selectionStart!=null){var bn=x.somethingSelected(),Rn="\u200B"+(bn?E.value:"");E.value="\u21DA",E.value=Rn,y.prevInput=bn?"":"\u200B",E.selectionStart=1,E.selectionEnd=Rn.length,b.selForContextMenu=x.doc.sel}}function xt(){if(y.contextMenuPending==xt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ce,be&&Se<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ae),E.selectionStart!=null)){(!be||be&&Se<9)&&Pt();var bn=0,Rn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?hi(x,tl)(x):bn++<10?b.detectingSelectAll=setTimeout(Rn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Rn,200)}}if(be&&Se>=9&&Pt(),ct){we(a);var nn=function(){cn(window,"mouseup",nn),setTimeout(xt,20)};Zt(window,"mouseup",nn)}else setTimeout(xt,50)},oi.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},oi.prototype.setUneditable=function(){},oi.prototype.needsContentAttribute=!1;function Yu(a,y){if(y=y?qt(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=ot();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ue.getValue()}var E;if(a.form&&(Zt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ne=a.form;E=ne.submit;try{var ae=ne.submit=function(){b(),ne.submit=E,ne.submit(),ne.submit=ae}}catch(ce){}}y.finishInit=function(ce){ce.save=b,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,b(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(cn(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ue=Jr(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return ue}function Ju(a){a.off=cn,a.on=Zt,a.wheelEventPixels=iu,a.Doc=Oi,a.splitLines=dn,a.countColumn=Ce,a.findColumn=un,a.isWordChar=oe,a.Pass=Mt,a.signal=wn,a.Line=Rr,a.changeEnd=mo,a.scrollbarModel=Os,a.Pos=ye,a.cmpPos=Le,a.modes=hn,a.mimeModes=Yt,a.resolveMode=On,a.getMode=Gn,a.modeExtensions=Zn,a.extendMode=Bn,a.copyState=Xn,a.startState=ar,a.innerMode=Nn,a.commands=ha,a.keyMap=ao,a.keyName=gl,a.isModifierKey=ml,a.lookupKey=$o,a.normalizeKeyMap=Iu,a.StringStream=qn,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=Qe,a.e_stopPropagation=Lt,a.e_stop=we,a.addClass=pe,a.contains=lt,a.rmClass=Ke,a.keyNames=yo}Zu(Jr),Uu(Jr);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Oi.prototype)Oi.prototype.hasOwnProperty(ja)&&mt(Qu,ja)<0&&(Jr.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Oi.prototype[ja]));return Pe(Oi),Jr.inputStyles={textarea:oi,contenteditable:_r},Jr.defineMode=function(a){!Jr.defaults.mode&&a!="null"&&(Jr.defaults.mode=a),Mn.apply(this,arguments)},Jr.defineMIME=pn,Jr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Jr.defineMIME("text/plain","null"),Jr.defineExtension=function(a,y){Jr.prototype[a]=y},Jr.defineDocExtension=function(a,y){Oi.prototype[a]=y},Jr.fromTextArea=Yu,Ju(Jr),Jr.version="5.58.2",Jr})},25419:function(rn,jt,ie){(function(te){te(ie(89780),ie(15525),ie(98101))})(function(te){"use strict";te.defineMode("markdown",function(ut,ve){var Je=te.getMode(ut,"text/html"),be=Je.name=="null";function Se(Ce){if(te.findModeByName){var de=te.findModeByName(Ce);de&&(Ce=de.mime||de.mimes[0])}var mt=te.getMode(ut,Ce);return mt.name=="null"?null:mt}ve.highlightFormatting===void 0&&(ve.highlightFormatting=!1),ve.maxBlockquoteDepth===void 0&&(ve.maxBlockquoteDepth=0),ve.taskLists===void 0&&(ve.taskLists=!1),ve.strikethrough===void 0&&(ve.strikethrough=!1),ve.emoji===void 0&&(ve.emoji=!1),ve.fencedCodeBlockHighlighting===void 0&&(ve.fencedCodeBlockHighlighting=!0),ve.fencedCodeBlockDefaultMode===void 0&&(ve.fencedCodeBlockDefaultMode="text/plain"),ve.xml===void 0&&(ve.xml=!0),ve.tokenTypeOverrides===void 0&&(ve.tokenTypeOverrides={});var He={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 nt in He)He.hasOwnProperty(nt)&&ve.tokenTypeOverrides[nt]&&(He[nt]=ve.tokenTypeOverrides[nt]);var Ie=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,et=/^\[(x| )\](?=\s)/i,xe=ve.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,wt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,rt=/^[^#!\[\]*_\\<>` "'(~:]+/,We=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ve=/^\s*\[[^\]]+?\]:.*$/,Ne=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,pt=" ";function It(Ce,de,mt){return de.f=de.inline=mt,mt(Ce,de)}function Ot(Ce,de,mt){return de.f=de.block=mt,mt(Ce,de)}function gt(Ce){return!Ce||!/\S/.test(Ce.string)}function ct(Ce){if(Ce.linkTitle=!1,Ce.linkHref=!1,Ce.linkText=!1,Ce.em=!1,Ce.strong=!1,Ce.strikethrough=!1,Ce.quote=0,Ce.indentedCode=!1,Ce.f==Ke){var de=be;if(!de){var mt=te.innerMode(Je,Ce.htmlState);de=mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText}de&&(Ce.f=ft,Ce.block=yt,Ce.htmlState=null)}return Ce.trailingSpace=0,Ce.trailingSpaceNewLine=!1,Ce.prevLine=Ce.thisLine,Ce.thisLine={stream:null},null}function yt(Ce,de){var mt=Ce.column()===de.indentation,en=gt(de.prevLine.stream),Mt=de.indentedCode,ze=de.prevLine.hr,dt=de.list!==!1,bt=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var un=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,dt)){for(de.list=null;un<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=un-de.listStack[de.listStack.length-1])}var At=!en&&!ze&&!de.prevLine.header&&(!dt||!Mt)&&!de.prevLine.fencedCodeEnd,sn=(de.list===!1||ze||en)&&de.indentation<=bt&&Ce.match(Ie),it=null;if(de.indentationDiff>=4&&(Mt||de.prevLine.fencedCodeEnd||de.prevLine.header||en))return Ce.skipToEnd(),de.indentedCode=!0,He.code;if(Ce.eatSpace())return null;if(mt&&de.indentation<=bt&&(it=Ce.match(xe))&&it[1].length<=6)return de.quote=0,de.header=it[1].length,de.thisLine.header=!0,ve.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Fe(de);if(de.indentation<=bt&&Ce.eat(">"))return de.quote=mt?1:de.quote+1,ve.highlightFormatting&&(de.formatting="quote"),Ce.eatSpace(),Fe(de);if(!sn&&!de.setext&&mt&&de.indentation<=bt&&(it=Ce.match(fe))){var _t=it[1]?"ol":"ul";return de.indentation=un+Ce.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,ve.taskLists&&Ce.match(et,!1)&&(de.taskList=!0),de.f=de.inline,ve.highlightFormatting&&(de.formatting=["list","list-"+_t]),Fe(de)}else{if(mt&&de.indentation<=bt&&(it=Ce.match(We,!0)))return de.quote=0,de.fencedEndRE=new RegExp(it[1]+"+ *$"),de.localMode=ve.fencedCodeBlockHighlighting&&Se(it[2]||ve.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=te.startState(de.localMode)),de.f=de.block=Bt,ve.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Fe(de);if(de.setext||(!At||!dt)&&!de.quote&&de.list===!1&&!de.code&&!sn&&!Ve.test(Ce.string)&&(it=Ce.lookAhead(1))&&(it=it.match(wt)))return de.setext?(de.header=de.setext,de.setext=0,Ce.skipToEnd(),ve.highlightFormatting&&(de.formatting="header")):(de.header=it[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Fe(de);if(sn)return Ce.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,He.hr;if(Ce.peek()==="[")return It(Ce,de,St)}return It(Ce,de,de.inline)}function Ke(Ce,de){var mt=Je.token(Ce,de.htmlState);if(!be){var en=te.innerMode(Je,de.htmlState);(en.mode.name=="xml"&&en.state.tagStart===null&&!en.state.context&&en.state.tokenize.isInText||de.md_inside&&Ce.current().indexOf(">")>-1)&&(de.f=ft,de.block=yt,de.htmlState=null)}return mt}function Bt(Ce,de){var mt=de.listStack[de.listStack.length-1]||0,en=de.indentation<mt,Mt=mt+3;if(de.fencedEndRE&&de.indentation<=Mt&&(en||Ce.match(de.fencedEndRE))){ve.highlightFormatting&&(de.formatting="code-block");var ze;return en||(ze=Fe(de)),de.localMode=de.localState=null,de.block=yt,de.f=ft,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,en?Ot(Ce,de,de.block):ze}else return de.localMode?de.localMode.token(Ce,de.localState):(Ce.skipToEnd(),He.code)}function Fe(Ce){var de=[];if(Ce.formatting){de.push(He.formatting),typeof Ce.formatting=="string"&&(Ce.formatting=[Ce.formatting]);for(var mt=0;mt<Ce.formatting.length;mt++)de.push(He.formatting+"-"+Ce.formatting[mt]),Ce.formatting[mt]==="header"&&de.push(He.formatting+"-"+Ce.formatting[mt]+"-"+Ce.header),Ce.formatting[mt]==="quote"&&(!ve.maxBlockquoteDepth||ve.maxBlockquoteDepth>=Ce.quote?de.push(He.formatting+"-"+Ce.formatting[mt]+"-"+Ce.quote):de.push("error"))}if(Ce.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(Ce.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(Ce.linkHref?de.push(He.linkHref,"url"):(Ce.strong&&de.push(He.strong),Ce.em&&de.push(He.em),Ce.strikethrough&&de.push(He.strikethrough),Ce.emoji&&de.push(He.emoji),Ce.linkText&&de.push(He.linkText),Ce.code&&de.push(He.code),Ce.image&&de.push(He.image),Ce.imageAltText&&de.push(He.imageAltText,"link"),Ce.imageMarker&&de.push(He.imageMarker)),Ce.header&&de.push(He.header,He.header+"-"+Ce.header),Ce.quote&&(de.push(He.quote),!ve.maxBlockquoteDepth||ve.maxBlockquoteDepth>=Ce.quote?de.push(He.quote+"-"+Ce.quote):de.push(He.quote+"-"+ve.maxBlockquoteDepth)),Ce.list!==!1){var en=(Ce.listStack.length-1)%3;en?en===1?de.push(He.list2):de.push(He.list3):de.push(He.list1)}return Ce.trailingSpaceNewLine?de.push("trailing-space-new-line"):Ce.trailingSpace&&de.push("trailing-space-"+(Ce.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function _e(Ce,de){if(Ce.match(rt,!0))return Fe(de)}function ft(Ce,de){var mt=de.text(Ce,de);if(typeof mt!="undefined")return mt;if(de.list)return de.list=null,Fe(de);if(de.taskList){var en=Ce.match(et,!0)[1]===" ";return en?de.taskOpen=!0:de.taskClosed=!0,ve.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Fe(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&Ce.match(/^#+$/,!0))return ve.highlightFormatting&&(de.formatting="header"),Fe(de);var Mt=Ce.next();if(de.linkTitle){de.linkTitle=!1;var ze=Mt;Mt==="("&&(ze=")"),ze=(ze+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var dt="^\\s*(?:[^"+ze+"\\\\]+|\\\\\\\\|\\\\.)"+ze;if(Ce.match(new RegExp(dt),!0))return He.linkHref}if(Mt==="`"){var bt=de.formatting;ve.highlightFormatting&&(de.formatting="code"),Ce.eatWhile("`");var un=Ce.current().length;if(de.code==0&&(!de.quote||un==1))return de.code=un,Fe(de);if(un==de.code){var At=Fe(de);return de.code=0,At}else return de.formatting=bt,Fe(de)}else if(de.code)return Fe(de);if(Mt==="\\"&&(Ce.next(),ve.highlightFormatting)){var sn=Fe(de),it=He.formatting+"-escape";return sn?sn+" "+it:it}if(Mt==="!"&&Ce.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,ve.highlightFormatting&&(de.formatting="image"),Fe(de);if(Mt==="["&&de.imageMarker&&Ce.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,ve.highlightFormatting&&(de.formatting="image"),Fe(de);if(Mt==="]"&&de.imageAltText){ve.highlightFormatting&&(de.formatting="image");var sn=Fe(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=lt,sn}if(Mt==="["&&!de.image)return de.linkText&&Ce.match(/^.*?\]/)||(de.linkText=!0,ve.highlightFormatting&&(de.formatting="link")),Fe(de);if(Mt==="]"&&de.linkText){ve.highlightFormatting&&(de.formatting="link");var sn=Fe(de);return de.linkText=!1,de.inline=de.f=Ce.match(/\(.*?\)| ?\[.*?\]/,!1)?lt:ft,sn}if(Mt==="<"&&Ce.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Re,ve.highlightFormatting&&(de.formatting="link");var sn=Fe(de);return sn?sn+=" ":sn="",sn+He.linkInline}if(Mt==="<"&&Ce.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Re,ve.highlightFormatting&&(de.formatting="link");var sn=Fe(de);return sn?sn+=" ":sn="",sn+He.linkEmail}if(ve.xml&&Mt==="<"&&Ce.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _t=Ce.string.indexOf(">",Ce.pos);if(_t!=-1){var ht=Ce.string.substring(Ce.start,_t);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ht)&&(de.md_inside=!0)}return Ce.backUp(1),de.htmlState=te.startState(Je),Ot(Ce,de,Ke)}if(ve.xml&&Mt==="<"&&Ce.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(Mt==="*"||Mt==="_"){for(var se=1,ee=Ce.pos==1?" ":Ce.string.charAt(Ce.pos-2);se<3&&Ce.eat(Mt);)se++;var z=Ce.peek()||" ",oe=!/\s/.test(z)&&(!Ne.test(z)||/\s/.test(ee)||Ne.test(ee)),le=!/\s/.test(ee)&&(!Ne.test(ee)||/\s/.test(z)||Ne.test(z)),re=null,Ee=null;if(se%2&&(!de.em&&oe&&(Mt==="*"||!le||Ne.test(ee))?re=!0:de.em==Mt&&le&&(Mt==="*"||!oe||Ne.test(z))&&(re=!1)),se>1&&(!de.strong&&oe&&(Mt==="*"||!le||Ne.test(ee))?Ee=!0:de.strong==Mt&&le&&(Mt==="*"||!oe||Ne.test(z))&&(Ee=!1)),Ee!=null||re!=null){ve.highlightFormatting&&(de.formatting=re==null?"strong":Ee==null?"em":"strong em"),re===!0&&(de.em=Mt),Ee===!0&&(de.strong=Mt);var At=Fe(de);return re===!1&&(de.em=!1),Ee===!1&&(de.strong=!1),At}}else if(Mt===" "&&(Ce.eat("*")||Ce.eat("_"))){if(Ce.peek()===" ")return Fe(de);Ce.backUp(1)}if(ve.strikethrough){if(Mt==="~"&&Ce.eatWhile(Mt)){if(de.strikethrough){ve.highlightFormatting&&(de.formatting="strikethrough");var At=Fe(de);return de.strikethrough=!1,At}else if(Ce.match(/^[^\s]/,!1))return de.strikethrough=!0,ve.highlightFormatting&&(de.formatting="strikethrough"),Fe(de)}else if(Mt===" "&&Ce.match(/^~~/,!0)){if(Ce.peek()===" ")return Fe(de);Ce.backUp(2)}}if(ve.emoji&&Mt===":"&&Ce.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,ve.highlightFormatting&&(de.formatting="emoji");var at=Fe(de);return de.emoji=!1,at}return Mt===" "&&(Ce.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Fe(de)}function Re(Ce,de){var mt=Ce.next();if(mt===">"){de.f=de.inline=ft,ve.highlightFormatting&&(de.formatting="link");var en=Fe(de);return en?en+=" ":en="",en+He.linkInline}return Ce.match(/^[^>]+/,!0),He.linkInline}function lt(Ce,de){if(Ce.eatSpace())return null;var mt=Ce.next();return mt==="("||mt==="["?(de.f=de.inline=pe(mt==="("?")":"]"),ve.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Fe(de)):"error"}var ot={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function pe(Ce){return function(de,mt){var en=de.next();if(en===Ce){mt.f=mt.inline=ft,ve.highlightFormatting&&(mt.formatting="link-string");var Mt=Fe(mt);return mt.linkHref=!1,Mt}return de.match(ot[Ce]),mt.linkHref=!0,Fe(mt)}}function St(Ce,de){return Ce.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=ke,Ce.next(),ve.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Fe(de)):It(Ce,de,ft)}function ke(Ce,de){if(Ce.match(/^\]:/,!0)){de.f=de.inline=Ct,ve.highlightFormatting&&(de.formatting="link");var mt=Fe(de);return de.linkText=!1,mt}return Ce.match(/^([^\]\\]|\\.)+/,!0),He.linkText}function Ct(Ce,de){return Ce.eatSpace()?null:(Ce.match(/^[^\s]+/,!0),Ce.peek()===void 0?de.linkTitle=!0:Ce.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=ft,He.linkHref+" url")}var qt={startState:function(){return{f:yt,prevLine:{stream:null},thisLine:{stream:null},block:yt,htmlState:null,indentation:0,inline:ft,text:_e,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(Ce){return{f:Ce.f,prevLine:Ce.prevLine,thisLine:Ce.thisLine,block:Ce.block,htmlState:Ce.htmlState&&te.copyState(Je,Ce.htmlState),indentation:Ce.indentation,localMode:Ce.localMode,localState:Ce.localMode?te.copyState(Ce.localMode,Ce.localState):null,inline:Ce.inline,text:Ce.text,formatting:!1,linkText:Ce.linkText,linkTitle:Ce.linkTitle,linkHref:Ce.linkHref,code:Ce.code,em:Ce.em,strong:Ce.strong,strikethrough:Ce.strikethrough,emoji:Ce.emoji,header:Ce.header,setext:Ce.setext,hr:Ce.hr,taskList:Ce.taskList,list:Ce.list,listStack:Ce.listStack.slice(0),quote:Ce.quote,indentedCode:Ce.indentedCode,trailingSpace:Ce.trailingSpace,trailingSpaceNewLine:Ce.trailingSpaceNewLine,md_inside:Ce.md_inside,fencedEndRE:Ce.fencedEndRE}},token:function(Ce,de){if(de.formatting=!1,Ce!=de.thisLine.stream){if(de.header=0,de.hr=!1,Ce.match(/^\s*$/,!0))return ct(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:Ce},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=Ke)){var mt=Ce.match(/^\s*/,!0)[0].replace(/\t/g,pt).length;if(de.indentation=mt,de.indentationDiff=null,mt>0)return null}}return de.f(Ce,de)},innerMode:function(Ce){return Ce.block==Ke?{state:Ce.htmlState,mode:Je}:Ce.localState?{state:Ce.localState,mode:Ce.localMode}:{state:Ce,mode:qt}},indent:function(Ce,de,mt){return Ce.block==Ke&&Je.indent?Je.indent(Ce.htmlState,de,mt):Ce.localState&&Ce.localMode.indent?Ce.localMode.indent(Ce.localState,de,mt):te.Pass},blankLine:ct,getType:Fe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return qt},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},98101:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){"use strict";te.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 ut=0;ut<te.modeInfo.length;ut++){var ve=te.modeInfo[ut];ve.mimes&&(ve.mime=ve.mimes[0])}te.findModeByMIME=function(Je){Je=Je.toLowerCase();for(var be=0;be<te.modeInfo.length;be++){var Se=te.modeInfo[be];if(Se.mime==Je)return Se;if(Se.mimes){for(var He=0;He<Se.mimes.length;He++)if(Se.mimes[He]==Je)return Se}}if(/\+xml$/.test(Je))return te.findModeByMIME("application/xml");if(/\+json$/.test(Je))return te.findModeByMIME("application/json")},te.findModeByExtension=function(Je){Je=Je.toLowerCase();for(var be=0;be<te.modeInfo.length;be++){var Se=te.modeInfo[be];if(Se.ext){for(var He=0;He<Se.ext.length;He++)if(Se.ext[He]==Je)return Se}}},te.findModeByFileName=function(Je){for(var be=0;be<te.modeInfo.length;be++){var Se=te.modeInfo[be];if(Se.file&&Se.file.test(Je))return Se}var He=Je.lastIndexOf("."),nt=He>-1&&Je.substring(He+1,Je.length);if(nt)return te.findModeByExtension(nt)},te.findModeByName=function(Je){Je=Je.toLowerCase();for(var be=0;be<te.modeInfo.length;be++){var Se=te.modeInfo[be];if(Se.name.toLowerCase()==Je)return Se;if(Se.alias){for(var He=0;He<Se.alias.length;He++)if(Se.alias[He].toLowerCase()==Je)return Se}}}})},67549:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){"use strict";te.defineMode("stex",function(ut,ve){"use strict";function Je(rt,We){rt.cmdState.push(We)}function be(rt){return rt.cmdState.length>0?rt.cmdState[rt.cmdState.length-1]:null}function Se(rt){var We=rt.cmdState.pop();We&&We.closeBracket()}function He(rt){for(var We=rt.cmdState,Ve=We.length-1;Ve>=0;Ve--){var Ne=We[Ve];if(Ne.name!="DEFAULT")return Ne}return{styleIdentifier:function(){return null}}}function nt(rt,We,Ve){return function(){this.name=rt,this.bracketNo=0,this.style=We,this.styles=Ve,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ie={};Ie.importmodule=nt("importmodule","tag",["string","builtin"]),Ie.documentclass=nt("documentclass","tag",["","atom"]),Ie.usepackage=nt("usepackage","tag",["atom"]),Ie.begin=nt("begin","tag",["atom"]),Ie.end=nt("end","tag",["atom"]),Ie.label=nt("label","tag",["atom"]),Ie.ref=nt("ref","tag",["atom"]),Ie.eqref=nt("eqref","tag",["atom"]),Ie.cite=nt("cite","tag",["atom"]),Ie.bibitem=nt("bibitem","tag",["atom"]),Ie.Bibitem=nt("Bibitem","tag",["atom"]),Ie.RBibitem=nt("RBibitem","tag",["atom"]),Ie.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(rt,We){rt.f=We}function et(rt,We){var Ve;if(rt.match(/^\\[a-zA-Z@]+/)){var Ne=rt.current().slice(1);return Ve=Ie.hasOwnProperty(Ne)?Ie[Ne]:Ie.DEFAULT,Ve=new Ve,Je(We,Ve),fe(We,wt),Ve.style}if(rt.match(/^\\[$&%#{}_]/)||rt.match(/^\\[,;!\/\\]/))return"tag";if(rt.match("\\["))return fe(We,function(It,Ot){return xe(It,Ot,"\\]")}),"keyword";if(rt.match("\\("))return fe(We,function(It,Ot){return xe(It,Ot,"\\)")}),"keyword";if(rt.match("$$"))return fe(We,function(It,Ot){return xe(It,Ot,"$$")}),"keyword";if(rt.match("$"))return fe(We,function(It,Ot){return xe(It,Ot,"$")}),"keyword";var pt=rt.next();if(pt=="%")return rt.skipToEnd(),"comment";if(pt=="}"||pt=="]"){if(Ve=be(We),Ve)Ve.closeBracket(pt),fe(We,wt);else return"error";return"bracket"}else return pt=="{"||pt=="["?(Ve=Ie.DEFAULT,Ve=new Ve,Je(We,Ve),"bracket"):/\d/.test(pt)?(rt.eatWhile(/[\w.%]/),"atom"):(rt.eatWhile(/[\w\-_]/),Ve=He(We),Ve.name=="begin"&&(Ve.argument=rt.current()),Ve.styleIdentifier())}function xe(rt,We,Ve){if(rt.eatSpace())return null;if(Ve&&rt.match(Ve))return fe(We,et),"keyword";if(rt.match(/^\\[a-zA-Z@]+/))return"tag";if(rt.match(/^[a-zA-Z]+/))return"variable-2";if(rt.match(/^\\[$&%#{}_]/)||rt.match(/^\\[,;!\/]/)||rt.match(/^[\^_&]/))return"tag";if(rt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(rt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ne=rt.next();return Ne=="{"||Ne=="}"||Ne=="["||Ne=="]"||Ne=="("||Ne==")"?"bracket":Ne=="%"?(rt.skipToEnd(),"comment"):"error"}function wt(rt,We){var Ve=rt.peek(),Ne;return Ve=="{"||Ve=="["?(Ne=be(We),Ne.openBracket(Ve),rt.eat(Ve),fe(We,et),"bracket"):/[ \t\r]/.test(Ve)?(rt.eat(Ve),null):(fe(We,et),Se(We),et(rt,We))}return{startState:function(){var rt=ve.inMathMode?function(We,Ve){return xe(We,Ve)}:et;return{cmdState:[],f:rt}},copyState:function(rt){return{cmdState:rt.cmdState.slice(),f:rt.f}},token:function(rt,We){return We.f(rt,We)},blankLine:function(rt){rt.f=et,rt.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},15525:function(rn,jt,ie){(function(te){te(ie(89780))})(function(te){"use strict";var ut={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},ve={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(Je,be){var Se=Je.indentUnit,He={},nt=be.htmlMode?ut:ve;for(var Ie in nt)He[Ie]=nt[Ie];for(var Ie in be)He[Ie]=be[Ie];var fe,et;function xe(Re,lt){function ot(ke){return lt.tokenize=ke,ke(Re,lt)}var pe=Re.next();if(pe=="<")return Re.eat("!")?Re.eat("[")?Re.match("CDATA[")?ot(We("atom","]]>")):null:Re.match("--")?ot(We("comment","-->")):Re.match("DOCTYPE",!0,!0)?(Re.eatWhile(/[\w\._\-]/),ot(Ve(1))):null:Re.eat("?")?(Re.eatWhile(/[\w\._\-]/),lt.tokenize=We("meta","?>"),"meta"):(fe=Re.eat("/")?"closeTag":"openTag",lt.tokenize=wt,"tag bracket");if(pe=="&"){var St;return Re.eat("#")?Re.eat("x")?St=Re.eatWhile(/[a-fA-F\d]/)&&Re.eat(";"):St=Re.eatWhile(/[\d]/)&&Re.eat(";"):St=Re.eatWhile(/[\w\.\-:]/)&&Re.eat(";"),St?"atom":"error"}else return Re.eatWhile(/[^&<]/),null}xe.isInText=!0;function wt(Re,lt){var ot=Re.next();if(ot==">"||ot=="/"&&Re.eat(">"))return lt.tokenize=xe,fe=ot==">"?"endTag":"selfcloseTag","tag bracket";if(ot=="=")return fe="equals",null;if(ot=="<"){lt.tokenize=xe,lt.state=Ot,lt.tagName=lt.tagStart=null;var pe=lt.tokenize(Re,lt);return pe?pe+" tag error":"tag error"}else return/[\'\"]/.test(ot)?(lt.tokenize=rt(ot),lt.stringStartCol=Re.column(),lt.tokenize(Re,lt)):(Re.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function rt(Re){var lt=function(ot,pe){for(;!ot.eol();)if(ot.next()==Re){pe.tokenize=wt;break}return"string"};return lt.isInAttribute=!0,lt}function We(Re,lt){return function(ot,pe){for(;!ot.eol();){if(ot.match(lt)){pe.tokenize=xe;break}ot.next()}return Re}}function Ve(Re){return function(lt,ot){for(var pe;(pe=lt.next())!=null;){if(pe=="<")return ot.tokenize=Ve(Re+1),ot.tokenize(lt,ot);if(pe==">")if(Re==1){ot.tokenize=xe;break}else return ot.tokenize=Ve(Re-1),ot.tokenize(lt,ot)}return"meta"}}function Ne(Re,lt,ot){this.prev=Re.context,this.tagName=lt,this.indent=Re.indented,this.startOfLine=ot,(He.doNotIndent.hasOwnProperty(lt)||Re.context&&Re.context.noIndent)&&(this.noIndent=!0)}function pt(Re){Re.context&&(Re.context=Re.context.prev)}function It(Re,lt){for(var ot;;){if(!Re.context||(ot=Re.context.tagName,!He.contextGrabbers.hasOwnProperty(ot)||!He.contextGrabbers[ot].hasOwnProperty(lt)))return;pt(Re)}}function Ot(Re,lt,ot){return Re=="openTag"?(ot.tagStart=lt.column(),gt):Re=="closeTag"?ct:Ot}function gt(Re,lt,ot){return Re=="word"?(ot.tagName=lt.current(),et="tag",Bt):He.allowMissingTagName&&Re=="endTag"?(et="tag bracket",Bt(Re,lt,ot)):(et="error",gt)}function ct(Re,lt,ot){if(Re=="word"){var pe=lt.current();return ot.context&&ot.context.tagName!=pe&&He.implicitlyClosed.hasOwnProperty(ot.context.tagName)&&pt(ot),ot.context&&ot.context.tagName==pe||He.matchClosing===!1?(et="tag",yt):(et="tag error",Ke)}else return He.allowMissingTagName&&Re=="endTag"?(et="tag bracket",yt(Re,lt,ot)):(et="error",Ke)}function yt(Re,lt,ot){return Re!="endTag"?(et="error",yt):(pt(ot),Ot)}function Ke(Re,lt,ot){return et="error",yt(Re,lt,ot)}function Bt(Re,lt,ot){if(Re=="word")return et="attribute",Fe;if(Re=="endTag"||Re=="selfcloseTag"){var pe=ot.tagName,St=ot.tagStart;return ot.tagName=ot.tagStart=null,Re=="selfcloseTag"||He.autoSelfClosers.hasOwnProperty(pe)?It(ot,pe):(It(ot,pe),ot.context=new Ne(ot,pe,St==ot.indented)),Ot}return et="error",Bt}function Fe(Re,lt,ot){return Re=="equals"?_e:(He.allowMissing||(et="error"),Bt(Re,lt,ot))}function _e(Re,lt,ot){return Re=="string"?ft:Re=="word"&&He.allowUnquoted?(et="string",Bt):(et="error",Bt(Re,lt,ot))}function ft(Re,lt,ot){return Re=="string"?ft:Bt(Re,lt,ot)}return{startState:function(Re){var lt={tokenize:xe,state:Ot,indented:Re||0,tagName:null,tagStart:null,context:null};return Re!=null&&(lt.baseIndent=Re),lt},token:function(Re,lt){if(!lt.tagName&&Re.sol()&&(lt.indented=Re.indentation()),Re.eatSpace())return null;fe=null;var ot=lt.tokenize(Re,lt);return(ot||fe)&&ot!="comment"&&(et=null,lt.state=lt.state(fe||ot,Re,lt),et&&(ot=et=="error"?ot+" error":et)),ot},indent:function(Re,lt,ot){var pe=Re.context;if(Re.tokenize.isInAttribute)return Re.tagStart==Re.indented?Re.stringStartCol+1:Re.indented+Se;if(pe&&pe.noIndent)return te.Pass;if(Re.tokenize!=wt&&Re.tokenize!=xe)return ot?ot.match(/^(\s*)/)[0].length:0;if(Re.tagName)return He.multilineTagIndentPastTag!==!1?Re.tagStart+Re.tagName.length+2:Re.tagStart+Se*(He.multilineTagIndentFactor||1);if(He.alignCDATA&&/<!\[CDATA\[/.test(lt))return 0;var St=lt&&/^<(\/)?([\w_:\.-]*)/.exec(lt);if(St&&St[1])for(;pe;)if(pe.tagName==St[2]){pe=pe.prev;break}else if(He.implicitlyClosed.hasOwnProperty(pe.tagName))pe=pe.prev;else break;else if(St)for(;pe;){var ke=He.contextGrabbers[pe.tagName];if(ke&&ke.hasOwnProperty(St[2]))pe=pe.prev;else break}for(;pe&&pe.prev&&!pe.startOfLine;)pe=pe.prev;return pe?pe.indent+Se:Re.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:He.htmlMode?"html":"xml",helperType:He.htmlMode?"html":"xml",skipAttribute:function(Re){Re.state==_e&&(Re.state=Bt)},xmlCurrentTag:function(Re){return Re.tagName?{name:Re.tagName,close:Re.type=="closeTag"}:null},xmlCurrentContext:function(Re){for(var lt=[],ot=Re.context;ot;ot=ot.prev)ot.tagName&<.push(ot.tagName);return lt.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(rn,jt,ie){"use strict";ie.d(jt,{hP:function(){return ht}});var te=function(se,ee){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&(z[le]=oe[le])})(se,ee)};function ut(se,ee){function z(){this.constructor=se}te(se,ee),se.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function ve(se,ee,z,oe){return new(z||(z=Promise))(function(le,re){function Ee(Ye){try{Ht(oe.next(Ye))}catch(tt){re(tt)}}function at(Ye){try{Ht(oe.throw(Ye))}catch(tt){re(tt)}}function Ht(Ye){var tt;Ye.done?le(Ye.value):(tt=Ye.value,tt instanceof z?tt:new z(function(vt){vt(tt)})).then(Ee,at)}Ht((oe=oe.apply(se,ee||[])).next())})}function Je(se,ee){var z,oe,le,re,Ee={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return re={next:at(0),throw:at(1),return:at(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function at(Ht){return function(Ye){return function(tt){if(z)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(z=1,oe&&(le=2&tt[0]?oe.return:tt[0]?oe.throw||((le=oe.return)&&le.call(oe),0):oe.next)&&!(le=le.call(oe,tt[1])).done)return le;switch(oe=0,le&&(tt=[2&tt[0],le.value]),tt[0]){case 0:case 1:le=tt;break;case 4:return Ee.label++,{value:tt[1],done:!1};case 5:Ee.label++,oe=tt[1],tt=[0];continue;case 7:tt=Ee.ops.pop(),Ee.trys.pop();continue;default:if(le=Ee.trys,!((le=le.length>0&&le[le.length-1])||tt[0]!==6&&tt[0]!==2)){Ee=0;continue}if(tt[0]===3&&(!le||tt[1]>le[0]&&tt[1]<le[3])){Ee.label=tt[1];break}if(tt[0]===6&&Ee.label<le[1]){Ee.label=le[1],le=tt;break}if(le&&Ee.label<le[2]){Ee.label=le[2],Ee.ops.push(tt);break}le[2]&&Ee.ops.pop(),Ee.trys.pop();continue}tt=ee.call(se,Ee)}catch(vt){tt=[6,vt],oe=0}finally{z=le=0}if(5&tt[0])throw tt[1];return{value:tt[0]?tt[1]:void 0,done:!0}}([Ht,Ye])}}}function be(){for(var se=0,ee=0,z=arguments.length;ee<z;ee++)se+=arguments[ee].length;var oe=Array(se),le=0;for(ee=0;ee<z;ee++)for(var re=arguments[ee],Ee=0,at=re.length;Ee<at;Ee++,le++)oe[le]=re[Ee];return oe}var Se=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(ee,z){for(var oe=0,le=z;oe<le.length;oe++){var re=le[oe],Ee=re[0],at=re[1];ee.setAttribute(Ee,at)}},se.createRect=function(ee,z,oe){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",ee.toString()),le.setAttribute("height",z.toString()),oe&&se.setAttributes(le,oe),le},se.createLine=function(ee,z,oe,le,re){var Ee=document.createElementNS("http://www.w3.org/2000/svg","line");return Ee.setAttribute("x1",ee.toString()),Ee.setAttribute("y1",z.toString()),Ee.setAttribute("x2",oe.toString()),Ee.setAttribute("y2",le.toString()),re&&se.setAttributes(Ee,re),Ee},se.createPolygon=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",ee),z&&se.setAttributes(oe,z),oe},se.createCircle=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(ee/2).toString()),oe.setAttribute("cy",(ee/2).toString()),oe.setAttribute("r",ee.toString()),z&&se.setAttributes(oe,z),oe},se.createEllipse=function(ee,z,oe){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()),oe&&se.setAttributes(le,oe),le},se.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&se.setAttributes(z,ee),z},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(ee,z,oe,le,re,Ee,at){var Ht=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(Ht,[["id",ee],["orient",z],["markerWidth",oe.toString()],["markerHeight",le.toString()],["refX",re.toString()],["refY",Ee.toString()]]),Ht.appendChild(at),Ht},se.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&se.setAttributes(z,ee),z},se.createTSpan=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=ee,z&&se.setAttributes(oe,z),oe},se.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&se.setAttributes(z,ee),z},se.createPoint=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=ee,oe.y=z,oe},se.createPath=function(ee,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",ee),z&&se.setAttributes(oe,z),oe},se}(),He=function(){function se(){}return se.addKey=function(ee){se.key=ee},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),nt=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(ee,z,oe){var le=this;return new Promise(function(re){var Ee=oe!==void 0?oe:document.createElement("canvas");ee===null&&(le.markersOnly=!0,le.naturalSize=!1);var at=document.createElementNS("http://www.w3.org/2000/svg","svg");at.setAttribute("xmlns","http://www.w3.org/2000/svg"),at.setAttribute("width",z.width.baseVal.valueAsString),at.setAttribute("height",z.height.baseVal.valueAsString),at.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),at.innerHTML=z.innerHTML,le.naturalSize===!0?(at.width.baseVal.value=ee.naturalWidth,at.height.baseVal.value=ee.naturalHeight):le.width!==void 0&&le.height!==void 0&&(at.width.baseVal.value=le.width,at.height.baseVal.value=le.height),Ee.width=at.width.baseVal.value,Ee.height=at.height.baseVal.value;var Ht=at.outerHTML,Ye=Ee.getContext("2d");le.markersOnly!==!0&&Ye.drawImage(ee,0,0,Ee.width,Ee.height);var tt=window.URL,vt=new Image(Ee.width,Ee.height);vt.setAttribute("crossOrigin","anonymous");var Rt=new Blob([Ht],{type:"image/svg+xml"}),Dt=tt.createObjectURL(Rt);vt.onload=function(){Ye.drawImage(vt,0,0),tt.revokeObjectURL(Dt);var Jt=Ee.toDataURL(le.imageType,le.imageQuality);re(Jt)},vt.src=Dt})},se}(),Ie=function(){},fe=function(){function se(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(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},se.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)},se.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 et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new et("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new xe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new xe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},se.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),et=function(se,ee){this.selector=se,this.style=ee},xe=function(se,ee){this.localName=se,this.style=ee},wt=function(){function se(ee,z,oe,le,re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=oe,this.uiStyleSettings=le,this.styles=re,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(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 oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(re){var Ee=document.createElement("div");Ee.className=""+z.toolbarButtonStyleClass.name,Ee.setAttribute("data-type-name",re.typeName),Ee.innerHTML=re.icon,Ee.addEventListener("click",function(){z.markerToolbarButtonClicked(Ee,re)}),z.buttons.push(Ee),z.markerButtons.push(Ee)}),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()},se.prototype.addButtonClickListener=function(ee){this.buttonClickListeners.push(ee)},se.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.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]))}},se.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},se.prototype.resetButtonStyles=function(){var 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)})},se.prototype.addActionButton=function(ee,z,oe){var le=this,re=document.createElement("div");switch(re.className=""+this.toolbarButtonStyleClass.name,re.innerHTML=z,re.setAttribute("data-action",oe),re.addEventListener("click",function(){le.actionToolbarButtonClicked(re,oe)}),oe){case"select":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":re.style.fill=this.uiStyleSettings.closeButtonColor}ee.appendChild(re),this.buttons.push(re)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xe("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 xe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new xe("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 xe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xe("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 xe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new et("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},se.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(ee,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.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)},se.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},se.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){z.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},se}(),rt=function(){function se(ee,z,oe,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=oe,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new xe("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 xe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new xe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new xe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new xe("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 xe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new xe("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 xe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new et("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},se.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)},se.prototype.setPanelButtons=function(ee){var z,oe,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+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(re){var Ee;re.uiStyleSettings=le.uiStyleSettings;var at=document.createElement("div");at.className=le.toolboxButtonStyleClass.name+" "+((Ee=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ee!==void 0?Ee:le.toolboxButtonStyleColorsClass.name),at.innerHTML=re.icon,at.title=re.title,at.addEventListener("click",function(){le.panelButtonClick(re)}),le.panelButtons.push(at),le.buttonRow.appendChild(at)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(ee){var z=this,oe=-1;if(ee!==this.activePanel){oe=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(re,Ee){var at,Ht;re.className=z.toolboxButtonStyleClass.name+" "+(Ee===oe?""+((at=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&at!==void 0?at:z.toolboxActiveButtonStyleColorsClass.name):""+((Ht=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ht!==void 0?Ht:z.toolboxButtonStyleColorsClass.name))})},se}(),We=function(se,ee){this.title=se,this.icon=ee},Ve=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.colors=[],Ee.addTransparent=!1,Ee.colorBoxes=[],Ee.colors=oe,Ee.currentColor=le,Ee.setCurrentColor=Ee.setCurrentColor.bind(Ee),Ee.getColorBox=Ee.getColorBox.bind(Ee),Ee}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(le){var re=z.getColorBox(le);oe.appendChild(re),z.colorBoxes.push(re)}),oe},ee.prototype.getColorBox=function(z){var oe=this,le=this.uiStyleSettings.toolbarHeight/4,re=this.uiStyleSettings.toolbarHeight-le,Ee=document.createElement("div");Ee.style.display="inline-block",Ee.style.boxSizing="content-box",Ee.style.width=re-2+"px",Ee.style.height=re-2+"px",Ee.style.padding="1px",Ee.style.marginRight="2px",Ee.style.marginBottom="2px",Ee.style.borderWidth="2px",Ee.style.borderStyle="solid",Ee.style.borderRadius=(re+2)/2+"px",Ee.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ee.addEventListener("click",function(){oe.setCurrentColor(z,Ee)});var at=document.createElement("div");return at.style.display="inline-block",at.style.width=re-2+"px",at.style.height=re-2+"px",at.style.backgroundColor=z,at.style.borderRadius=re/2+"px",z==="transparent"&&(at.style.fill=this.uiStyleSettings.toolboxAccentColor,at.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>`),Ee.appendChild(at),Ee},ee.prototype.setCurrentColor=function(z,oe){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(We),Ne=function(){function se(ee,z,oe){this._state="new",this._isSelected=!1,this._container=ee,this._overlayContainer=z,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(ee){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(ee,z){},se.prototype.dblClick=function(ee,z){},se.prototype.manipulate=function(ee){},se.prototype.pointerUp=function(ee){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},se.prototype.scale=function(ee,z){},se.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},se.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},se.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)}},se.typeName="MarkerBase",se}(),pt=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.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},se}(),It=function(){function se(){this.GRIP_SIZE=10,this.visual=Se.createGroup(),this.visual.appendChild(Se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Se.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},se}(),Ot=function(){function se(){}return se.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},se.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},se}(),gt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.left=0,re.top=0,re.width=0,re.height=0,re.defaultSize={x:50,y:20},re.offsetX=0,re.offsetY=0,re.rotationAngle=0,re.CB_DISTANCE=10,re._suppressMarkerCreateEvent=!1,re.container.transform.baseVal.appendItem(Se.createTransform()),re.setupControlBox(),re}return ut(ee,se),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 oe=Se.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),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(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=re.x-this.width/2,this.top=re.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ee=this.container.transform.baseVal.getItem(0);Ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ee.prototype.pointerUp=function(z){var oe=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",oe==="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 oe=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(z)},ee.prototype.resize=function(z){var oe=this.manipulationStartLeft,le=this.manipulationStartWidth,re=this.manipulationStartTop,Ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-oe;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:re=this.manipulationStartTop+z.y-this.manipulationStartY,Ee=this.manipulationStartHeight+this.manipulationStartTop-re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ee=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=oe,this.width=le):(this.left=oe+le,this.width=-le),Ee>=0?(this.top=re,this.height=Ee):(this.top=re+Ee,this.height=-Ee),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 oe=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*oe,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 oe=this.container.getCTM(),le=Se.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(oe)).x,y:le.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM();oe=oe.inverse();var le=Se.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(oe)).x,y:le.y}},ee.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=Se.createGroup();var z=Se.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=Se.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=Se.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new pt,this.addControlGrips(),this.controlBox.style.display="none"},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 It;return z.visual.transform.baseVal.appendItem(Se.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,oe=-z/2,le=oe,re=(this.width+this.CB_DISTANCE)/2-z/2,Ee=(this.height+this.CB_DISTANCE)/2-z/2,at=this.height+this.CB_DISTANCE-z/2,Ht=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,le),this.positionGrip(this.controlGrips.topCenter.visual,re,le),this.positionGrip(this.controlGrips.topRight.visual,Ht,le),this.positionGrip(this.controlGrips.centerLeft.visual,oe,Ee),this.positionGrip(this.controlGrips.centerRight.visual,Ht,Ee),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,at),this.positionGrip(this.controlGrips.bottomCenter.visual,re,at),this.positionGrip(this.controlGrips.bottomRight.visual,Ht,at),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,re,le-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,oe,le){var re=z.transform.baseVal.getItem(0);re.setTranslate(oe,le),z.transform.baseVal.replaceItem(re,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:Ot.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ot.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ot.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ot.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe);var le=this.rotatePoint({x:this.left,y:this.top}),re=this.unrotatePoint({x:le.x*z,y:le.y*oe});this.left=re.x,this.top=re.y,this.width=this.width*z,this.height=this.height*oe,this.adjustControlBox()},ee}(Ne),ct=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){se.prototype.setSize.call(this),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Se.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},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.setSize()},ee.title="Rectangle marker",ee}(gt),yt=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ee.widths=[],Ee.widthBoxes=[],Ee.widths=oe,Ee.currentWidth=le,Ee.setCurrentWidth=Ee.setCurrentWidth.bind(Ee),Ee}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.flexGrow="2",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentWidth(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.innerText=le.toString(),Ee.style.marginRight="5px",re.appendChild(Ee);var at=document.createElement("div");at.style.minHeight="20px",at.style.flexGrow="2",at.style.display="flex",at.style.alignItems="center";var Ht=document.createElement("hr");Ht.style.minWidth="20px",Ht.style.border="0px",Ht.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,Ht.style.flexGrow="2",at.appendChild(Ht),re.appendChild(at),z.widthBoxes.push(re)}),oe},ee.prototype.setCurrentWidth=function(z,oe){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(We),Ke=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.styles=[],Ee.styleBoxes=[],Ee.styles=oe,Ee.currentStyle=le,Ee.setCurrentStyle=Ee.setCurrentStyle.bind(Ee),Ee}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/z.styles.length-5+"%",re.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentStyle(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.overflow="hidden";var at=`<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>`;Ee.innerHTML=at,re.appendChild(Ee),z.styleBoxes.push(re)}),oe},ee.prototype.setCurrentStyle=function(z,oe){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(We),Bt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new Ve("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Ke("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ut(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.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}(ct),Fe=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"},_e=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.x1=0,re.y1=0,re.x2=0,re.y2=0,re.defaultLength=50,re.manipulationStartX=0,re.manipulationStartY=0,re.manipulationStartX1=0,re.manipulationStartY1=0,re.manipulationStartX2=0,re.manipulationStartY2=0,re.setupControlBox(),re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),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(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ee.prototype.pointerUp=function(z){var oe=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",oe==="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(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=Se.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 It;return z.visual.transform.baseVal.appendItem(Se.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,oe,le){var re=z.transform.baseVal.getItem(0);re.setTranslate(oe,le),z.transform.baseVal.replaceItem(re,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.x1=this.x1*z,this.y1=this.y1*oe,this.x2=this.x2*z,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},ee}(Ne),ft=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new Ve("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Ke("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ee.prototype.createVisual=function(){this.visual=Se.createGroup(),this.selectorLine=Se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Se.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,oe){se.prototype.pointerDown.call(this,z,oe),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()),Se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Se.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.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}(_e),Re=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.fonts=[],Ee.fontBoxes=[],Ee.fonts=oe,Ee.currentFont=le,Ee.setCurrentFont=Ee.setCurrentFont.bind(Ee),Ee}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(le){var re=document.createElement("div");re.style.display="inline-block",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/z.fonts.length-5+"%",re.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentFont(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.fontFamily=le,Ee.style.overflow="hidden";var at=document.createElement("div");at.style.whiteSpace="nowrap",at.style.overflow="hidden",at.style.textOverflow="ellipsis",at.innerHTML="The quick brown fox jumps over the lazy dog",Ee.appendChild(at),re.appendChild(Ee),z.fontBoxes.push(re)}),oe},ee.prototype.setCurrentFont=function(z,oe){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(We),lt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.color="transparent",re.padding=5,re.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",re.text=re.DEFAULT_TEXT,re.isMoved=!1,re.color=le.defaultColor,re.fontFamily=le.defaultFontFamily,re.defaultSize={x:100,y:30},re.setColor=re.setColor.bind(re),re.setFont=re.setFont.bind(re),re.renderText=re.renderText.bind(re),re.sizeText=re.sizeText.bind(re),re.textEditDivClicked=re.textEditDivClicked.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.setSize=re.setSize.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.colorPanel=new Ve("Color",le.defaultColorSet,le.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.fontFamilyPanel=new Re("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){if(se.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(oe=!0)}),oe},ee.prototype.createVisual=function(){this.visual=Se.createGroup(),this.bgRectangle=Se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),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(oe){z.textElement.appendChild(Se.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),oe=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,re=(1*this.height-this.height*this.padding*2/100)/z.height;oe=Math.min(le,re)}return oe},ee.prototype.getTextPosition=function(z){var oe=this.textElement.getBBox(),le=0,re=0;return oe.width>0&&oe.height>0&&(le=(this.width-oe.width*z)/2,re=this.height/2-oe.height*z/2),{x:le,y:re}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),oe=this.getTextScale(),le=this.getTextPosition(oe);le.y-=z.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},ee.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ee.prototype.pointerUp=function(z){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,z),this.setSize(),(oe==="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(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,z.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var le=oe.clipboardData.getData("text"),re=window.getSelection();if(!re.rangeCount)return!1;re.deleteFromDocument(),re.getRangeAt(0).insertNode(document.createTextNode(le)),oe.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(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),re={x:le.width*z,y:le.height*z};oe.x-=re.x/2,oe.y-=re.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.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(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,oe){se.prototype.dblClick.call(this,z,oe),this.showTextEditor()},ee.prototype.setColor=function(z){this.textElement&&Se.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&&Se.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(gt),ot=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.color="transparent",re.lineWidth=3,re.drawing=!1,re.pixelRatio=1,re.color=le.defaultColor,re.lineWidth=le.defaultStrokeWidth,re.pixelRatio=le.freehandPixelRatio,re.setColor=re.setColor.bind(re),re.addCanvas=re.addCanvas.bind(re),re.finishCreation=re.finishCreation.bind(re),re.setLineWidth=re.setLineWidth.bind(re),re.colorPanel=new Ve("Color",le.defaultColorSet,le.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.lineWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.lineWidthPanel.onWidthChanged=re.setLineWidth,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ee.prototype.createVisual=function(){this.visual=Se.createGroup(),this.drawingImage=Se.createImage(),this.visual.appendChild(this.drawingImage);var z=Se.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):se.prototype.pointerDown.call(this,z,oe)},ee.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.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()):se.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(),se.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},ee.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=oe[0],re=oe[1],Ee=oe[2],at=oe[3],Ht=!1,Ye=0;Ye<this.canvasElement.height;Ye++)for(var tt=0;tt<this.canvasElement.width;tt++)z.data[Ye*this.canvasElement.width*4+4*tt+3]>0&&(Ht=!0,Ye<re&&(re=Ye),tt<le&&(le=tt),Ye>at&&(at=Ye),tt>Ee&&(Ee=tt));if(Ht){this.left=le/this.pixelRatio,this.top=re/this.pixelRatio,this.width=(Ee-le)/this.pixelRatio,this.height=(at-re)/this.pixelRatio;var vt=document.createElement("canvas");vt.width=Ee-le,vt.height=at-re,vt.getContext("2d").putImageData(this.canvasContext.getImageData(le,re,Ee-le,at-re),0,0),this.drawingImgUrl=vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){Se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Se.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),se.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(gt),pe=function(se){function ee(z,oe,le){var re=se.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 re.typeBoxes=[],re.currentType=oe,re.setCurrentType=re.setCurrentType.bind(re),re}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var le=function(at){var Ht="both";switch(at){case 0:Ht="both";break;case 1:Ht="start";break;case 2:Ht="end";break;case 3:Ht="none"}var Ye=document.createElement("div");if(Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=Ht===re.currentType?re.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){z.setCurrentType(Ht,Ye)}),oe.appendChild(Ye),Ht==="both"||Ht==="start"){var tt=document.createElement("div");tt.style.display="flex",tt.style.alignItems="center",tt.style.minHeight="20px",tt.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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,tt.style.marginLeft="5px",Ye.appendChild(tt)}var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.style.flexGrow="2";var Rt=document.createElement("hr");if(Rt.style.minWidth="20px",Rt.style.border="0px",Rt.style.borderTop="3px solid "+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee"),Rt.style.flexGrow="2",vt.appendChild(Rt),Ye.appendChild(vt),Ht==="both"||Ht==="end"){var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Dt.style.marginRight="5px",Ye.appendChild(Dt)}re.typeBoxes.push(Ye)},re=this,Ee=0;Ee<4;Ee++)le(Ee);return oe},ee.prototype.setCurrentType=function(z,oe){var le=this;this.currentType=z,this.typeBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(We),St=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.arrowType="end",re.arrowBaseHeight=10,re.arrowBaseWidth=10,re.getArrowPoints=re.getArrowPoints.bind(re),re.setArrowType=re.setArrowType.bind(re),re.arrowTypePanel=new pe("Arrow type","end"),re.arrowTypePanel.onArrowTypeChanged=re.setArrowType,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,oe){var le=this.arrowBaseWidth+2*this.strokeWidth,re=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(oe+re/2)+" "+z+","+(oe-re/2)+" "+(z+le/2)+","+(oe+re/2)},ee.prototype.createTips=function(){this.arrow1=Se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow2)},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Se.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 oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.arrowType=oe.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}(ft),ke=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor=le.defaultFillColor,re.strokeWidth=0,re.fillPanel=new Ve("Color",le.defaultColorSet,le.defaultFillColor),re.fillPanel.onColorChanged=re.setFillColor,re}return ut(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.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}(ct),Ct=function(se){function ee(z,oe,le,re){var Ee=se.call(this,z,re||'<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 Ee.opacities=[],Ee.opacityBoxes=[],Ee.opacities=oe,Ee.currentOpacity=le,Ee.setCurrentOpacity=Ee.setCurrentOpacity.bind(Ee),Ee}return ut(ee,se),ee.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(le){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="center",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){z.setCurrentOpacity(le,re)}),oe.appendChild(re);var Ee=document.createElement("div");Ee.innerText=100*le+"%",re.appendChild(Ee),z.opacityBoxes.push(re)}),oe},ee.prototype.setCurrentOpacity=function(z,oe){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(re){re.style.borderColor=re===oe?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(We),qt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.setOpacity=re.setOpacity.bind(re),re.fillColor=le.defaultHighlightColor,re.strokeWidth=0,re.opacity=le.defaultHighlightOpacity,re.fillPanel=new Ve("Color",le.defaultColorSet,re.fillColor),re.fillPanel.onColorChanged=re.setFillColor,re.opacityPanel=new Ct("Opacity",le.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ut(ee,se),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Se.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=se.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}(ke),Ce='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',de='<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>',mt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.bgColor="transparent",re.tipPosition={x:0,y:0},re.tipBase1Position={x:0,y:0},re.tipBase2Position={x:0,y:0},re.tipMoving=!1,re.color=le.defaultStrokeColor,re.bgColor=le.defaultFillColor,re.fontFamily=le.defaultFontFamily,re.defaultSize={x:100,y:30},re.setBgColor=re.setBgColor.bind(re),re.getTipPoints=re.getTipPoints.bind(re),re.positionTip=re.positionTip.bind(re),re.setTipPoints=re.setTipPoints.bind(re),re.colorPanel=new Ve("Text color",le.defaultColorSet,re.color,Ce),re.colorPanel.onColorChanged=re.setColor,re.bgColorPanel=new Ve("Fill color",le.defaultColorSet,re.bgColor,de),re.bgColorPanel.onColorChanged=re.setBgColor,re.fontFamilyPanel=new Re("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.tipGrip=new It,re.tipGrip.visual.transform.baseVal.appendItem(Se.createTransform()),re.controlBox.appendChild(re.tipGrip.visual),re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return se.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ee.prototype.createTip=function(){Se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ee.prototype.pointerDown=function(z,oe){this.state==="new"&&se.prototype.pointerDown.call(this,z,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,z,oe)},ee.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,z);else{var oe=this.state==="creating";se.prototype.pointerUp.call(this,z),this.setTipPoints(oe),this.positionTip()}},ee.prototype.manipulate=function(z){if(this.tipMoving){var oe=this.unrotatePoint(z);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,z)},ee.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(Se.setAttributes(this.bgRectangle,[["fill",z]]),Se.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 oe=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:oe+le/2,y:this.height+20});var re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+le,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-le,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-le,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-le},this.tipBase2Position={x:this.width,y:this.height-oe}):re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-le})},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){Se.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(),se.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,se.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*oe},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}(lt),en=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.fillColor=le.defaultFillColor,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.setOpacity=re.setOpacity.bind(re),re.createVisual=re.createVisual.bind(re),re.strokePanel=new Ve("Line color",be(le.defaultColorSet,["transparent"]),le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new Ve("Fill color",be(le.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Ke("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.opacityPanel=new Ct("Opacity",le.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Se.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,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){se.prototype.setSize.call(this),Se.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){se.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Se.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},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(gt),Mt=function(se){function ee(z,oe,le){return se.call(this,z,oe,le)||this}return ut(ee,se),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ee.prototype.createTips=function(){this.tip1=Se.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(Se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Se.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(Se.createTransform()),this.visual.appendChild(this.tip2)},ee.prototype.pointerDown=function(z,oe){se.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Se.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()]]),Se.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),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,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=se.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.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}(ft),ze=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokePanel.colors=le.defaultColorSet,re.fillColor="transparent",re}return ut(ee,se),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=se.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}(en),dt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(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))},se.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var ee=this.undoStack.pop();return ee!==void 0&&this.redoStack.push(ee),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),bt=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.curveX=0,re.curveY=0,re.manipulationStartCurveX=0,re.manipulationStartCurveY=0,re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.positionGrips=re.positionGrips.bind(re),re.addControlGrips=re.addControlGrips.bind(re),re.adjustVisual=re.adjustVisual.bind(re),re.setupControlBox=re.setupControlBox.bind(re),re.resize=re.resize.bind(re),re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.strokePanel=new Ve("Line color",le.defaultColorSet,le.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Ke("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.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=Se.createGroup(),this.selectorCurve=Se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Se.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,oe){se.prototype.pointerDown.call(this,z,oe),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(oe)&&(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()),Se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=Se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Se.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,se.prototype.addControlGrips.call(this)},ee.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ee.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),se.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),se.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},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,oe){this.curveX=this.curveX*z,this.curveY=this.curveY*oe,se.prototype.scale.call(this,z,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=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.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}(_e),un=function(se){function ee(z,oe,le){var re=se.call(this,z,oe,le)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.textColor="transparent",re.fontSize="1rem",re.isMoved=!1,re.captionText="Caption",re.PADDING=5,re.captionBoxWidth=0,re.captionBoxHeight=0,re.strokeColor=le.defaultColor,re.strokeWidth=le.defaultStrokeWidth,re.strokeDasharray=le.defaultStrokeDasharray,re.fillColor=le.defaultFillColor,re.textColor=le.defaultStrokeColor,re.fontFamily=le.defaultFontFamily,re.fontSize=le.defaultCaptionFontSize,re.captionText=le.defaultCaptionText,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re.sizeCaption=re.sizeCaption.bind(re),re.setCaptionText=re.setCaptionText.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.finishTextEditing=re.finishTextEditing.bind(re),re.setFont=re.setFont.bind(re),re.setTextColor=re.setTextColor.bind(re),re.strokePanel=new Ve("Line color",be(le.defaultColorSet,["transparent"]),re.strokeColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new Ve("Fill color",be(le.defaultColorSet,["transparent"]),re.fillColor,de),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new yt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Ke("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.fontFamilyPanel=new Re("Font",le.defaultFontFamilies,le.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.textColorPanel=new Ve("Text color",le.defaultColorSet,re.textColor,Ce),re.textColorPanel.onColorChanged=re.setTextColor,re}return ut(ee,se),ee.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ee.prototype.createVisual=function(){this.visual=Se.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Se.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Se.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=Se.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,oe){se.prototype.pointerDown.call(this,z,oe),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){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){se.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),Se.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')"]]),Se.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(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.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&&Se.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&&Se.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ee.prototype.setSize=function(){se.prototype.setSize.call(this),Se.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.dblClick=function(z,oe){se.prototype.dblClick.call(this,z,oe),this.showTextEditor()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&Se.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&Se.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&Se.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&Se.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},se.prototype.getState.call(this));return z.typeName=this.typeName,z},ee.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,oe){se.prototype.scale.call(this,z,oe),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}(gt),At=function(){function se(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,this.cancelable=z}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),sn=function(se){function ee(z,oe,le){var re=se.call(this,z,!1)||this;return re.dataUrl=oe,re.state=le,re}return ut(ee,se),ee}(At),it=function(se){function ee(z,oe,le){le===void 0&&(le=!1);var re=se.call(this,z,le)||this;return re.marker=oe,re}return ut(ee,se),ee}(At),_t=function(){function se(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return se.prototype.addEventListener=function(ee,z){this[ee].push(z)},se.prototype.removeEventListener=function(ee,z){var oe=this[ee].indexOf(z);oe>-1&&this[ee].splice(oe,1)},se}(),ht=function(){function se(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 Fe,this._isOpen=!1,this.undoRedoManager=new dt,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 _t,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[Bt,ot,St,lt,ze,en,qt,mt,Mt,ke,ft,bt,un]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Bt,ot,St,lt,en,qt,mt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Bt,ot,St,lt,qt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(oe){if(typeof oe=="string"){var le=z.ALL_MARKER_TYPES.find(function(re){return re.typeName===oe});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),He.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new At(ee))})},se.prototype.render=function(){return ve(this,void 0,void 0,function(){var ee;return Je(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new nt).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()]}})})},se.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var oe=!1;ee||this.eventListeners.beforeclose.forEach(function(le){var re=new At(z,!0);le(re),re.defaultPrevented&&(oe=!0)}),oe||(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 At(z))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var ee,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];(ee=this._availableMarkerTypes).push.apply(ee,z)},se.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},se.prototype.removeRenderEventListener=function(ee){},se.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},se.prototype.removeCloseEventListener=function(ee){},se.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))},se.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,oe=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,oe)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(ee,z){this._isResizing=!0;var oe=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(oe,le),this._isResizing=!1},se.prototype.scaleMarkers=function(ee,z){var oe,le=this;this._currentMarker&&this._currentMarker instanceof lt?this._currentMarker.scale(ee,z):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(re){re!==le._currentMarker&&re.scale(ee,z)}),oe!==void 0&&this.setCurrentMarker(oe)},se.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},se.prototype.setTopLeft=function(){var ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.top-z.top},se.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},se.prototype.addDefs=function(){for(var ee,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];this.defs=Se.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,z)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},se.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var 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()},se.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var 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 wt(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 rt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.dispose()},se.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},se.prototype.toolbarButtonClicked=function(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()}},se.prototype.deleteSelectedMarker=function(){var ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var re=new it(ee,ee._currentMarker,!0);le(re),re.defaultPrevented&&(z=!0)}),!z){var oe=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 it(ee,oe))})}}},se.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ee){var at=new it(ee,void 0,!0);Ee(at),at.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var oe=function(Ee){var at=le.markers[Ee];le.setCurrentMarker(le.markers[Ee]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(Ht){return Ht(new it(ee,at))})},le=this,re=this.markers.length-1;re>=0;re--)oe(re);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.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))},se.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===z.width&&oe.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(re){return re(new At(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(re){return re(new At(ee))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.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(oe){return oe(new At(ee))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.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(oe){return oe(new At(ee))}))},se.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},se.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},se.prototype.startRenderAndClose=function(){return ve(this,void 0,void 0,function(){var ee,z,oe=this;return Je(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(re){return re(new sn(oe,ee,z))}),this.close(!0),[2]}})})},se.prototype.getState=function(ee){ee===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return z.markers.push(oe.getState())}),z},se.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(oe){var le=z._availableMarkerTypes.find(function(Ee){return Ee.typeName===oe.typeName});if(le!==void 0){var re=z.addNewMarker(le);re.restoreState(oe),z.markers.push(re)}}),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(oe){return oe(new At(z))})},se.prototype.addNewMarker=function(ee){var z=Se.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(ee){var z,oe=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 it(oe,oe._currentMarker))}))},se.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof ot&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ot):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new it(z,z._currentMarker))})},se.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},se.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},se.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new it(z,ee))})},se.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(oe){return oe(new it(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(oe){return oe(new it(z,z._currentMarker))}))},se.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(oe){return oe.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))},se.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(oe){return oe.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()}},se.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}))},se.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()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(ee,z){var oe=this.markerImage.getBoundingClientRect();return{x:(ee-oe.left)/this.zoomLevel,y:(z-oe.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.prototype.addLicenseKey=function(ee){He.addKey(ee)},se.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},se.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},se.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(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.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 At(ee))}))},se.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 At(ee))}))},se.instanceCounter=0,se}()},6551:function(rn,jt,ie){"use strict";ie.d(jt,{ZP:function(){return He}});var te=ie(72190),ut=ie(59301),ve=ie(47273),Je=0,be=(0,ve.Z)();function Se(){var nt;return be?(nt=Je,Je+=1):nt="TEST_OR_SSR",nt}function He(nt){var Ie=ut.useState(),fe=(0,te.Z)(Ie,2),et=fe[0],xe=fe[1];return ut.useEffect(function(){xe("rc_select_".concat(Se()))},[]),nt||et}},37463:function(rn,jt,ie){"use strict";ie.d(jt,{Ac:function(){return kt},Xo:function(){return Qt},Wx:function(){return Qe},ZP:function(){return nr},lk:function(){return Ot}});var te=ie(60499),ut=ie(77654),ve=ie(18642),Je=ie(85899),be=ie(72190),Se=ie(42244),He=ie(43749),nt=ie(18929),Ie=ie(48736),fe=ie(59301),et=ie(92310),xe=ie.n(et),wt=ie(34280),rt=ie(49658),We=ie(8654),Ve=function(Ue){var ge=Ue.className,Me=Ue.customizeIcon,ye=Ue.customizeIconProps,Le=Ue.children,me=Ue.onMouseDown,Be=Ue.onClick,Ze=typeof Me=="function"?Me(ye):Me;return fe.createElement("span",{className:ge,onMouseDown:function(je){je.preventDefault(),me==null||me(je)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Be,"aria-hidden":!0},Ze!==void 0?Ze:fe.createElement("span",{className:xe()(ge.split(/\s+/).map(function(qe){return"".concat(qe,"-icon")}))},Le))},Ne=Ve,pt=function(Ue,ge,Me,ye,Le){var me=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Be=arguments.length>6?arguments[6]:void 0,Ze=arguments.length>7?arguments[7]:void 0,qe=fe.useMemo(function(){if((0,He.Z)(ye)==="object")return ye.clearIcon;if(Le)return Le},[ye,Le]),je=fe.useMemo(function(){return!!(!me&&ye&&(Me.length||Be)&&!(Ze==="combobox"&&Be===""))},[ye,me,Me.length,Be,Ze]);return{allowClear:je,clearIcon:fe.createElement(Ne,{className:"".concat(Ue,"-clear"),onMouseDown:ge,customizeIcon:qe},"\xD7")}},It=fe.createContext(null);function Ot(){return fe.useContext(It)}function gt(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ue=fe.useState(!1),ge=(0,be.Z)(Ue,2),Me=ge[0],ye=ge[1],Le=fe.useRef(null),me=function(){window.clearTimeout(Le.current)};fe.useEffect(function(){return me},[]);var Be=function(qe,je){me(),Le.current=window.setTimeout(function(){ye(qe),je&&je()},De)};return[Me,Be,me]}function ct(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ue=fe.useRef(null),ge=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(ge.current)}},[]);function Me(ye){(ye||Ue.current===null)&&(Ue.current=ye),window.clearTimeout(ge.current),ge.current=window.setTimeout(function(){Ue.current=null},De)}return[function(){return Ue.current},Me]}function yt(De,Ue,ge,Me){var ye=fe.useRef(null);ye.current={open:Ue,triggerOpen:ge,customizedTrigger:Me},fe.useEffect(function(){function Le(me){var Be;if(!((Be=ye.current)!==null&&Be!==void 0&&Be.customizedTrigger)){var Ze=me.target;Ze.shadowRoot&&me.composed&&(Ze=me.composedPath()[0]||Ze),ye.current.open&&De().filter(function(qe){return qe}).every(function(qe){return!qe.contains(Ze)&&qe!==Ze})&&ye.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Le),function(){return window.removeEventListener("mousedown",Le)}},[])}var Ke=ie(10228);function Bt(De){return De&&![Ke.Z.ESC,Ke.Z.SHIFT,Ke.Z.BACKSPACE,Ke.Z.TAB,Ke.Z.WIN_KEY,Ke.Z.ALT,Ke.Z.META,Ke.Z.WIN_KEY_RIGHT,Ke.Z.CTRL,Ke.Z.SEMICOLON,Ke.Z.EQUALS,Ke.Z.CAPS_LOCK,Ke.Z.CONTEXT_MENU,Ke.Z.F1,Ke.Z.F2,Ke.Z.F3,Ke.Z.F4,Ke.Z.F5,Ke.Z.F6,Ke.Z.F7,Ke.Z.F8,Ke.Z.F9,Ke.Z.F10,Ke.Z.F11,Ke.Z.F12].includes(De)}var Fe=ie(26112),_e=ie(83836);function ft(De,Ue,ge){var Me=(0,Je.Z)((0,Je.Z)({},De),ge?Ue:{});return Object.keys(Ue).forEach(function(ye){var Le=Ue[ye];typeof Le=="function"&&(Me[ye]=function(){for(var me,Be=arguments.length,Ze=new Array(Be),qe=0;qe<Be;qe++)Ze[qe]=arguments[qe];return Le.apply(void 0,Ze),(me=De[ye])===null||me===void 0?void 0:me.call.apply(me,[De].concat(Ze))})}),Me}var Re=ft,lt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],ot=function(Ue,ge){var Me=Ue.prefixCls,ye=Ue.id,Le=Ue.inputElement,me=Ue.autoFocus,Be=Ue.autoComplete,Ze=Ue.editable,qe=Ue.activeDescendantId,je=Ue.value,Oe=Ue.open,Te=Ue.attrs,Ge=(0,Se.Z)(Ue,lt),$t=Le||fe.createElement("input",null),Ft=$t,Wt=Ft.ref,kn=Ft.props;return(0,Ie.Kp)(!("maxLength"in $t.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),$t=fe.cloneElement($t,(0,Je.Z)((0,Je.Z)((0,Je.Z)({type:"search"},Re(Ge,kn,!0)),{},{id:ye,ref:(0,We.sQ)(ge,Wt),autoComplete:Be||"off",autoFocus:me,className:xe()("".concat(Me,"-selection-search-input"),kn==null?void 0:kn.className),role:"combobox","aria-expanded":Oe||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ye,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ye,"_list"),"aria-activedescendant":Oe?qe:void 0},Te),{},{value:Ze?je:"",readOnly:!Ze,unselectable:Ze?null:"on",style:(0,Je.Z)((0,Je.Z)({},kn.style),{},{opacity:Ze?null:0})})),$t},pe=fe.forwardRef(ot),St=pe;function ke(De){return Array.isArray(De)?De:De!==void 0?[De]:[]}var Ct=typeof window!="undefined"&&window.document&&window.document.documentElement,qt=Ct;function Ce(De){return De!=null}function de(De){return!De&&De!==0}function mt(De){return["string","number"].includes((0,He.Z)(De))}function en(De){var Ue=void 0;return De&&(mt(De.title)?Ue=De.title.toString():mt(De.label)&&(Ue=De.label.toString())),Ue}function Mt(De,Ue){qt?fe.useLayoutEffect(De,Ue):fe.useEffect(De,Ue)}function ze(De){var Ue;return(Ue=De.key)!==null&&Ue!==void 0?Ue:De.value}var dt=function(Ue){Ue.preventDefault(),Ue.stopPropagation()},bt=function(Ue){var ge=Ue.id,Me=Ue.prefixCls,ye=Ue.values,Le=Ue.open,me=Ue.searchValue,Be=Ue.autoClearSearchValue,Ze=Ue.inputRef,qe=Ue.placeholder,je=Ue.disabled,Oe=Ue.mode,Te=Ue.showSearch,Ge=Ue.autoFocus,$t=Ue.autoComplete,Ft=Ue.activeDescendantId,Wt=Ue.tabIndex,kn=Ue.removeIcon,Tn=Ue.maxTagCount,Hn=Ue.maxTagTextLength,Sn=Ue.maxTagPlaceholder,mn=Sn===void 0?function(an){return"+ ".concat(an.length," ...")}:Sn,Cn=Ue.tagRender,Fn=Ue.onToggleOpen,Yn=Ue.onRemove,Vn=Ue.onInputChange,Kn=Ue.onInputPaste,vn=Ue.onInputKeyDown,er=Ue.onInputMouseDown,Wn=Ue.onInputCompositionStart,dr=Ue.onInputCompositionEnd,pr=Ue.onInputBlur,lr=fe.useRef(null),ur=(0,fe.useState)(0),yr=(0,be.Z)(ur,2),sr=yr[0],fr=yr[1],Qn=(0,fe.useState)(!1),mr=(0,be.Z)(Qn,2),br=mr[0],Hr=mr[1],Er="".concat(Me,"-selection"),Ar=Le||Oe==="multiple"&&Be===!1||Oe==="tags"?me:"",kr=Oe==="tags"||Oe==="multiple"&&Be===!1||Te&&(Le||br);Mt(function(){fr(lr.current.scrollWidth)},[Ar]);var Pr=function(Gt,An,jn,tn,Vt){return fe.createElement("span",{title:en(Gt),className:xe()("".concat(Er,"-item"),(0,ve.Z)({},"".concat(Er,"-item-disabled"),jn))},fe.createElement("span",{className:"".concat(Er,"-item-content")},An),tn&&fe.createElement(Ne,{className:"".concat(Er,"-item-remove"),onMouseDown:dt,onClick:Vt,customizeIcon:kn},"\xD7"))},ir=function(Gt,An,jn,tn,Vt,yn){var Ln=function(Lr){dt(Lr),Fn(!Le)};return fe.createElement("span",{onMouseDown:Ln},Cn({label:An,value:Gt,disabled:jn,closable:tn,onClose:Vt,isMaxTag:!!yn}))},rr=function(Gt){var An=Gt.disabled,jn=Gt.label,tn=Gt.value,Vt=!je&&!An,yn=jn;if(typeof Hn=="number"&&(typeof jn=="string"||typeof jn=="number")){var Ln=String(yn);Ln.length>Hn&&(yn="".concat(Ln.slice(0,Hn),"..."))}var cr=function(Ir){Ir&&Ir.stopPropagation(),Yn(Gt)};return typeof Cn=="function"?ir(tn,yn,An,Vt,cr):Pr(Gt,yn,An,Vt,cr)},Jn=function(Gt){if(!ye.length)return null;var An=typeof mn=="function"?mn(Gt):mn;return typeof Cn=="function"?ir(void 0,An,!1,!1,void 0,!0):Pr({title:An},An,!1)},Kt=fe.createElement("div",{className:"".concat(Er,"-search"),style:{width:sr},onFocus:function(){Hr(!0)},onBlur:function(){Hr(!1)}},fe.createElement(St,{ref:Ze,open:Le,prefixCls:Me,id:ge,inputElement:null,disabled:je,autoFocus:Ge,autoComplete:$t,editable:kr,activeDescendantId:Ft,value:Ar,onKeyDown:vn,onMouseDown:er,onChange:Vn,onPaste:Kn,onCompositionStart:Wn,onCompositionEnd:dr,onBlur:pr,tabIndex:Wt,attrs:(0,Fe.Z)(Ue,!0)}),fe.createElement("span",{ref:lr,className:"".concat(Er,"-search-mirror"),"aria-hidden":!0},Ar,"\xA0")),ln=fe.createElement(_e.Z,{prefixCls:"".concat(Er,"-overflow"),data:ye,renderItem:rr,renderRest:Jn,suffix:Kt,itemKey:ze,maxCount:Tn});return fe.createElement("span",{className:"".concat(Er,"-wrap")},ln,!ye.length&&!Ar&&fe.createElement("span",{className:"".concat(Er,"-placeholder")},qe))},un=bt,At=function(Ue){var ge=Ue.inputElement,Me=Ue.prefixCls,ye=Ue.id,Le=Ue.inputRef,me=Ue.disabled,Be=Ue.autoFocus,Ze=Ue.autoComplete,qe=Ue.activeDescendantId,je=Ue.mode,Oe=Ue.open,Te=Ue.values,Ge=Ue.placeholder,$t=Ue.tabIndex,Ft=Ue.showSearch,Wt=Ue.searchValue,kn=Ue.activeValue,Tn=Ue.maxLength,Hn=Ue.onInputKeyDown,Sn=Ue.onInputMouseDown,mn=Ue.onInputChange,Cn=Ue.onInputPaste,Fn=Ue.onInputCompositionStart,Yn=Ue.onInputCompositionEnd,Vn=Ue.onInputBlur,Kn=Ue.title,vn=fe.useState(!1),er=(0,be.Z)(vn,2),Wn=er[0],dr=er[1],pr=je==="combobox",lr=pr||Ft,ur=Te[0],yr=Wt||"";pr&&kn&&!Wn&&(yr=kn),fe.useEffect(function(){pr&&dr(!1)},[pr,kn]);var sr=je!=="combobox"&&!Oe&&!Ft?!1:!!yr,fr=Kn===void 0?en(ur):Kn,Qn=fe.useMemo(function(){return ur?null:fe.createElement("span",{className:"".concat(Me,"-selection-placeholder"),style:sr?{visibility:"hidden"}:void 0},Ge)},[ur,sr,Ge,Me]);return fe.createElement("span",{className:"".concat(Me,"-selection-wrap")},fe.createElement("span",{className:"".concat(Me,"-selection-search")},fe.createElement(St,{ref:Le,prefixCls:Me,id:ye,open:Oe,inputElement:ge,disabled:me,autoFocus:Be,autoComplete:Ze,editable:lr,activeDescendantId:qe,value:yr,onKeyDown:Hn,onMouseDown:Sn,onChange:function(br){dr(!0),mn(br)},onPaste:Cn,onCompositionStart:Fn,onCompositionEnd:Yn,onBlur:Vn,tabIndex:$t,attrs:(0,Fe.Z)(Ue,!0),maxLength:pr?Tn:void 0})),!pr&&ur?fe.createElement("span",{className:"".concat(Me,"-selection-item"),title:fr,style:sr?{visibility:"hidden"}:void 0},ur.label):null,Qn)},sn=At,it=function(Ue,ge){var Me=(0,fe.useRef)(null),ye=(0,fe.useRef)(!1),Le=Ue.prefixCls,me=Ue.open,Be=Ue.mode,Ze=Ue.showSearch,qe=Ue.tokenWithEnter,je=Ue.disabled,Oe=Ue.prefix,Te=Ue.autoClearSearchValue,Ge=Ue.onSearch,$t=Ue.onSearchSubmit,Ft=Ue.onToggleOpen,Wt=Ue.onInputKeyDown,kn=Ue.onInputBlur,Tn=Ue.domRef;fe.useImperativeHandle(ge,function(){return{focus:function(fr){Me.current.focus(fr)},blur:function(){Me.current.blur()}}});var Hn=ct(0),Sn=(0,be.Z)(Hn,2),mn=Sn[0],Cn=Sn[1],Fn=function(fr){var Qn=fr.which,mr=Me.current instanceof HTMLTextAreaElement;!mr&&me&&(Qn===Ke.Z.UP||Qn===Ke.Z.DOWN)&&fr.preventDefault(),Wt&&Wt(fr),Qn===Ke.Z.ENTER&&Be==="tags"&&!ye.current&&!me&&($t==null||$t(fr.target.value)),!(mr&&!me&&~[Ke.Z.UP,Ke.Z.DOWN,Ke.Z.LEFT,Ke.Z.RIGHT].indexOf(Qn))&&Bt(Qn)&&Ft(!0)},Yn=function(){Cn(!0)},Vn=(0,fe.useRef)(null),Kn=function(fr){Ge(fr,!0,ye.current)!==!1&&Ft(!0)},vn=function(){ye.current=!0},er=function(fr){ye.current=!1,Be!=="combobox"&&Kn(fr.target.value)},Wn=function(fr){var Qn=fr.target.value;if(qe&&Vn.current&&/[\r\n]/.test(Vn.current)){var mr=Vn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Qn=Qn.replace(mr,Vn.current)}Vn.current=null,Kn(Qn)},dr=function(fr){var Qn=fr.clipboardData,mr=Qn==null?void 0:Qn.getData("text");Vn.current=mr||""},pr=function(fr){var Qn=fr.target;if(Qn!==Me.current){var mr=document.body.style.msTouchAction!==void 0;mr?setTimeout(function(){Me.current.focus()}):Me.current.focus()}},lr=function(fr){var Qn=mn();fr.target!==Me.current&&!Qn&&!(Be==="combobox"&&je)&&fr.preventDefault(),(Be!=="combobox"&&(!Ze||!Qn)||!me)&&(me&&Te!==!1&&Ge("",!0,!1),Ft())},ur={inputRef:Me,onInputKeyDown:Fn,onInputMouseDown:Yn,onInputChange:Wn,onInputPaste:dr,onInputCompositionStart:vn,onInputCompositionEnd:er,onInputBlur:kn},yr=Be==="multiple"||Be==="tags"?fe.createElement(un,(0,te.Z)({},Ue,ur)):fe.createElement(sn,(0,te.Z)({},Ue,ur));return fe.createElement("div",{ref:Tn,className:"".concat(Le,"-selector"),onClick:pr,onMouseDown:lr},Oe&&fe.createElement("div",{className:"".concat(Le,"-prefix")},Oe),yr)},_t=fe.forwardRef(it),ht=_t,se=ie(68196),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Ue){var ge=Ue===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ge,adjustY:1},htmlRegion:"scroll"}}},oe=function(Ue,ge){var Me=Ue.prefixCls,ye=Ue.disabled,Le=Ue.visible,me=Ue.children,Be=Ue.popupElement,Ze=Ue.animation,qe=Ue.transitionName,je=Ue.dropdownStyle,Oe=Ue.dropdownClassName,Te=Ue.direction,Ge=Te===void 0?"ltr":Te,$t=Ue.placement,Ft=Ue.builtinPlacements,Wt=Ue.dropdownMatchSelectWidth,kn=Ue.dropdownRender,Tn=Ue.dropdownAlign,Hn=Ue.getPopupContainer,Sn=Ue.empty,mn=Ue.getTriggerDOMNode,Cn=Ue.onPopupVisibleChange,Fn=Ue.onPopupMouseEnter,Yn=(0,Se.Z)(Ue,ee),Vn="".concat(Me,"-dropdown"),Kn=Be;kn&&(Kn=kn(Be));var vn=fe.useMemo(function(){return Ft||z(Wt)},[Ft,Wt]),er=Ze?"".concat(Vn,"-").concat(Ze):qe,Wn=typeof Wt=="number",dr=fe.useMemo(function(){return Wn?null:Wt===!1?"minWidth":"width"},[Wt,Wn]),pr=je;Wn&&(pr=(0,Je.Z)((0,Je.Z)({},pr),{},{width:Wt}));var lr=fe.useRef(null);return fe.useImperativeHandle(ge,function(){return{getPopupElement:function(){var yr;return(yr=lr.current)===null||yr===void 0?void 0:yr.popupElement}}}),fe.createElement(se.Z,(0,te.Z)({},Yn,{showAction:Cn?["click"]:[],hideAction:Cn?["click"]:[],popupPlacement:$t||(Ge==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:vn,prefixCls:Vn,popupTransitionName:er,popup:fe.createElement("div",{onMouseEnter:Fn},Kn),ref:lr,stretch:dr,popupAlign:Tn,popupVisible:Le,getPopupContainer:Hn,popupClassName:xe()(Oe,(0,ve.Z)({},"".concat(Vn,"-empty"),Sn)),popupStyle:pr,getTriggerDOMNode:mn,onPopupVisibleChange:Cn}),me)},le=fe.forwardRef(oe),re=le,Ee=ie(48745);function at(De,Ue){var ge=De.key,Me;return"value"in De&&(Me=De.value),ge!=null?ge:Me!==void 0?Me:"rc-index-key-".concat(Ue)}function Ht(De){return typeof De!="undefined"&&!Number.isNaN(De)}function Ye(De,Ue){var ge=De||{},Me=ge.label,ye=ge.value,Le=ge.options,me=ge.groupLabel,Be=Me||(Ue?"children":"label");return{label:Be,value:ye||"value",options:Le||"options",groupLabel:me||Be}}function tt(De){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge=Ue.fieldNames,Me=Ue.childrenAsData,ye=[],Le=Ye(ge,!1),me=Le.label,Be=Le.value,Ze=Le.options,qe=Le.groupLabel;function je(Oe,Te){Array.isArray(Oe)&&Oe.forEach(function(Ge){if(Te||!(Ze in Ge)){var $t=Ge[Be];ye.push({key:at(Ge,ye.length),groupOption:Te,data:Ge,label:Ge[me],value:$t})}else{var Ft=Ge[qe];Ft===void 0&&Me&&(Ft=Ge.label),ye.push({key:at(Ge,ye.length),group:!0,data:Ge,label:Ft}),je(Ge[Ze],!0)}})}return je(De,!1),ye}function vt(De){var Ue=(0,Je.Z)({},De);return"props"in Ue||Object.defineProperty(Ue,"props",{get:function(){return(0,Ie.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ue}}),Ue}var Rt=function(Ue,ge,Me){if(!ge||!ge.length)return null;var ye=!1,Le=function Be(Ze,qe){var je=(0,Ee.Z)(qe),Oe=je[0],Te=je.slice(1);if(!Oe)return[Ze];var Ge=Ze.split(Oe);return ye=ye||Ge.length>1,Ge.reduce(function($t,Ft){return[].concat((0,ut.Z)($t),(0,ut.Z)(Be(Ft,Te)))},[]).filter(Boolean)},me=Le(Ue,ge);return ye?typeof Me!="undefined"?me.slice(0,Me):me:null},Dt=fe.createContext(null),Jt=Dt;function Xt(De){var Ue=De.visible,ge=De.values;if(!Ue)return null;var Me=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ge.slice(0,Me).map(function(ye){var Le=ye.label,me=ye.value;return["number","string"].includes((0,He.Z)(Le))?Le:me}).join(", ")),ge.length>Me?", ...":null)}var Zt=["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"],En=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],cn=function(Ue){return Ue==="tags"||Ue==="multiple"},wn=fe.forwardRef(function(De,Ue){var ge,Me=De.id,ye=De.prefixCls,Le=De.className,me=De.showSearch,Be=De.tagRender,Ze=De.direction,qe=De.omitDomProps,je=De.displayValues,Oe=De.onDisplayValuesChange,Te=De.emptyOptions,Ge=De.notFoundContent,$t=Ge===void 0?"Not Found":Ge,Ft=De.onClear,Wt=De.mode,kn=De.disabled,Tn=De.loading,Hn=De.getInputElement,Sn=De.getRawInputElement,mn=De.open,Cn=De.defaultOpen,Fn=De.onDropdownVisibleChange,Yn=De.activeValue,Vn=De.onActiveValueChange,Kn=De.activeDescendantId,vn=De.searchValue,er=De.autoClearSearchValue,Wn=De.onSearch,dr=De.onSearchSplit,pr=De.tokenSeparators,lr=De.allowClear,ur=De.prefix,yr=De.suffixIcon,sr=De.clearIcon,fr=De.OptionList,Qn=De.animation,mr=De.transitionName,br=De.dropdownStyle,Hr=De.dropdownClassName,Er=De.dropdownMatchSelectWidth,Ar=De.dropdownRender,kr=De.dropdownAlign,Pr=De.placement,ir=De.builtinPlacements,rr=De.getPopupContainer,Jn=De.showAction,Kt=Jn===void 0?[]:Jn,ln=De.onFocus,an=De.onBlur,Gt=De.onKeyUp,An=De.onKeyDown,jn=De.onMouseDown,tn=(0,Se.Z)(De,Zt),Vt=cn(Wt),yn=(me!==void 0?me:Vt)||Wt==="combobox",Ln=(0,Je.Z)({},tn);En.forEach(function(Zr){delete Ln[Zr]}),qe==null||qe.forEach(function(Zr){delete Ln[Zr]});var cr=fe.useState(!1),Lr=(0,be.Z)(cr,2),Ir=Lr[0],Rr=Lr[1];fe.useEffect(function(){Rr((0,rt.Z)())},[]);var Br=fe.useRef(null),Fr=fe.useRef(null),Vr=fe.useRef(null),Wr=fe.useRef(null),Kr=fe.useRef(null),ti=fe.useRef(!1),Ei=gt(),Ni=(0,be.Z)(Ei,3),xi=Ni[0],li=Ni[1],Ri=Ni[2];fe.useImperativeHandle(Ue,function(){var Zr,Dr;return{focus:(Zr=Wr.current)===null||Zr===void 0?void 0:Zr.focus,blur:(Dr=Wr.current)===null||Dr===void 0?void 0:Dr.blur,scrollTo:function(Ci){var ii;return(ii=Kr.current)===null||ii===void 0?void 0:ii.scrollTo(Ci)},nativeElement:Br.current||Fr.current}});var $r=fe.useMemo(function(){var Zr;if(Wt!=="combobox")return vn;var Dr=(Zr=je[0])===null||Zr===void 0?void 0:Zr.value;return typeof Dr=="string"||typeof Dr=="number"?String(Dr):""},[vn,Wt,je]),_i=Wt==="combobox"&&typeof Hn=="function"&&Hn()||null,qr=typeof Sn=="function"&&Sn(),xr=(0,We.x1)(Fr,qr==null||(ge=qr.props)===null||ge===void 0?void 0:ge.ref),zr=fe.useState(!1),Gr=(0,be.Z)(zr,2),wr=Gr[0],Nr=Gr[1];(0,wt.Z)(function(){Nr(!0)},[]);var Or=(0,nt.Z)(!1,{defaultValue:Cn,value:mn}),ui=(0,be.Z)(Or,2),Pi=ui[0],fi=ui[1],ni=wr?Pi:!1,xo=!$t&&Te;(kn||xo&&ni&&Wt==="combobox")&&(ni=!1);var lo=xo?!1:ni,vr=fe.useCallback(function(Zr){var Dr=Zr!==void 0?Zr:!ni;kn||(fi(Dr),ni!==Dr&&(Fn==null||Fn(Dr)))},[kn,ni,fi,Fn]),Mr=fe.useMemo(function(){return(pr||[]).some(function(Zr){return[`
|
|
|
`,`\r
|
|
|
`].includes(Zr)})},[pr]),Cr=fe.useContext(Jt)||{},Sr=Cr.maxCount,jr=Cr.rawValues,Xr=function(Dr,yi,Ci){if(!(Vt&&Ht(Sr)&&(jr==null?void 0:jr.size)>=Sr)){var ii=!0,ci=Dr;Vn==null||Vn(null);var Yi=Rt(Dr,pr,Ht(Sr)?Sr-jr.size:void 0),Ui=Ci?null:Yi;return Wt!=="combobox"&&Ui&&(ci="",dr==null||dr(Ui),vr(!1),ii=!1),Wn&&$r!==ci&&Wn(ci,{source:yi?"typing":"effect"}),ii}},Ki=function(Dr){!Dr||!Dr.trim()||Wn(Dr,{source:"submit"})};fe.useEffect(function(){!ni&&!Vt&&Wt!=="combobox"&&Xr("",!1,!1)},[ni]),fe.useEffect(function(){Pi&&kn&&fi(!1),kn&&!ti.current&&li(!1)},[kn]);var ki=ct(),gi=(0,be.Z)(ki,2),ri=gi[0],Gi=gi[1],eo=fe.useRef(!1),Fi=function(Dr){var yi=ri(),Ci=Dr.key,ii=Ci==="Enter";if(ii&&(Wt!=="combobox"&&Dr.preventDefault(),ni||vr(!0)),Gi(!!$r),Ci==="Backspace"&&!yi&&Vt&&!$r&&je.length){for(var ci=(0,ut.Z)(je),Yi=null,Ui=ci.length-1;Ui>=0;Ui-=1){var oo=ci[Ui];if(!oo.disabled){ci.splice(Ui,1),Yi=oo;break}}Yi&&Oe(ci,{type:"remove",values:[Yi]})}for(var zi=arguments.length,Hi=new Array(zi>1?zi-1:0),Ji=1;Ji<zi;Ji++)Hi[Ji-1]=arguments[Ji];if(ni&&(!ii||!eo.current)){var co;ii&&(eo.current=!0),(co=Kr.current)===null||co===void 0||co.onKeyDown.apply(co,[Dr].concat(Hi))}An==null||An.apply(void 0,[Dr].concat(Hi))},to=function(Dr){for(var yi=arguments.length,Ci=new Array(yi>1?yi-1:0),ii=1;ii<yi;ii++)Ci[ii-1]=arguments[ii];if(ni){var ci;(ci=Kr.current)===null||ci===void 0||ci.onKeyUp.apply(ci,[Dr].concat(Ci))}Dr.key==="Enter"&&(eo.current=!1),Gt==null||Gt.apply(void 0,[Dr].concat(Ci))},io=function(Dr){var yi=je.filter(function(Ci){return Ci!==Dr});Oe(yi,{type:"remove",values:[Dr]})},Xi=function(){eo.current=!1},Lo=fe.useRef(!1),Ga=function(){li(!0),kn||(ln&&!Lo.current&&ln.apply(void 0,arguments),Kt.includes("focus")&&vr(!0)),Lo.current=!0},ya=function(){ti.current=!0,li(!1,function(){Lo.current=!1,ti.current=!1,vr(!1)}),!kn&&($r&&(Wt==="tags"?Wn($r,{source:"submit"}):Wt==="multiple"&&Wn("",{source:"blur"})),an&&an.apply(void 0,arguments))},no=[];fe.useEffect(function(){return function(){no.forEach(function(Zr){return clearTimeout(Zr)}),no.splice(0,no.length)}},[]);var uo=function(Dr){var yi,Ci=Dr.target,ii=(yi=Vr.current)===null||yi===void 0?void 0:yi.getPopupElement();if(ii&&ii.contains(Ci)){var ci=setTimeout(function(){var zi=no.indexOf(ci);if(zi!==-1&&no.splice(zi,1),Ri(),!Ir&&!ii.contains(document.activeElement)){var Hi;(Hi=Wr.current)===null||Hi===void 0||Hi.focus()}});no.push(ci)}for(var Yi=arguments.length,Ui=new Array(Yi>1?Yi-1:0),oo=1;oo<Yi;oo++)Ui[oo-1]=arguments[oo];jn==null||jn.apply(void 0,[Dr].concat(Ui))},Vi=fe.useState({}),ba=(0,be.Z)(Vi,2),xa=ba[1];function Va(){xa({})}var Ca;qr&&(Ca=function(Dr){vr(Dr)}),yt(function(){var Zr;return[Br.current,(Zr=Vr.current)===null||Zr===void 0?void 0:Zr.getPopupElement()]},lo,vr,!!qr);var Ua=fe.useMemo(function(){return(0,Je.Z)((0,Je.Z)({},De),{},{notFoundContent:$t,open:ni,triggerOpen:lo,id:Me,showSearch:yn,multiple:Vt,toggleOpen:vr})},[De,$t,lo,ni,Me,yn,Vt,vr]),_o=!!yr||Tn,Ko;_o&&(Ko=fe.createElement(Ne,{className:xe()("".concat(ye,"-arrow"),(0,ve.Z)({},"".concat(ye,"-arrow-loading"),Tn)),customizeIcon:yr,customizeIconProps:{loading:Tn,searchValue:$r,open:ni,focused:xi,showSearch:yn}}));var Co=function(){var Dr;Ft==null||Ft(),(Dr=Wr.current)===null||Dr===void 0||Dr.focus(),Oe([],{type:"clear",values:je}),Xr("",!1,!1)},Xo=pt(ye,Co,je,lr,sr,kn,$r,Wt),wa=Xo.allowClear,Yo=Xo.clearIcon,Oo=fe.createElement(fr,{ref:Kr}),Sa=xe()(ye,Le,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(ye,"-focused"),xi),"".concat(ye,"-multiple"),Vt),"".concat(ye,"-single"),!Vt),"".concat(ye,"-allow-clear"),lr),"".concat(ye,"-show-arrow"),_o),"".concat(ye,"-disabled"),kn),"".concat(ye,"-loading"),Tn),"".concat(ye,"-open"),ni),"".concat(ye,"-customize-input"),_i),"".concat(ye,"-show-search"),yn)),To=fe.createElement(re,{ref:Vr,disabled:kn,prefixCls:ye,visible:lo,popupElement:Oo,animation:Qn,transitionName:mr,dropdownStyle:br,dropdownClassName:Hr,direction:Ze,dropdownMatchSelectWidth:Er,dropdownRender:Ar,dropdownAlign:kr,placement:Pr,builtinPlacements:ir,getPopupContainer:rr,empty:Te,getTriggerDOMNode:function(Dr){return Fr.current||Dr},onPopupVisibleChange:Ca,onPopupMouseEnter:Va},qr?fe.cloneElement(qr,{ref:xr}):fe.createElement(ht,(0,te.Z)({},De,{domRef:Fr,prefixCls:ye,inputElement:_i,ref:Wr,id:Me,prefix:ur,showSearch:yn,autoClearSearchValue:er,mode:Wt,activeDescendantId:Kn,tagRender:Be,values:je,open:ni,onToggleOpen:vr,activeValue:Yn,searchValue:$r,onSearch:Xr,onSearchSubmit:Ki,onRemove:io,tokenWithEnter:Mr,onInputBlur:Xi}))),Di;return qr?Di=To:Di=fe.createElement("div",(0,te.Z)({className:Sa},Ln,{ref:Br,onMouseDown:uo,onKeyDown:Fi,onKeyUp:to,onFocus:Ga,onBlur:ya}),fe.createElement(Xt,{visible:xi&&!ni,values:je}),To,Ko,wa&&Yo),fe.createElement(It.Provider,{value:Ua},Di)}),kt=wn,Pn=function(){return null};Pn.isSelectOptGroup=!0;var Qt=Pn,Pe=function(){return null};Pe.isSelectOption=!0;var Qe=Pe,Lt=ie(80547),Nt=ie(2738),we=ie(48911);function $e(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var st=["disabled","title","children","style","className"];function Tt(De){return typeof De=="string"||typeof De=="number"}var zt=function(Ue,ge){var Me=Ot(),ye=Me.prefixCls,Le=Me.id,me=Me.open,Be=Me.multiple,Ze=Me.mode,qe=Me.searchValue,je=Me.toggleOpen,Oe=Me.notFoundContent,Te=Me.onPopupScroll,Ge=fe.useContext(Jt),$t=Ge.maxCount,Ft=Ge.flattenOptions,Wt=Ge.onActiveValue,kn=Ge.defaultActiveFirstOption,Tn=Ge.onSelect,Hn=Ge.menuItemSelectedIcon,Sn=Ge.rawValues,mn=Ge.fieldNames,Cn=Ge.virtual,Fn=Ge.direction,Yn=Ge.listHeight,Vn=Ge.listItemHeight,Kn=Ge.optionRender,vn="".concat(ye,"-item"),er=(0,Lt.Z)(function(){return Ft},[me,Ft],function(Jn,Kt){return Kt[0]&&Jn[1]!==Kt[1]}),Wn=fe.useRef(null),dr=fe.useMemo(function(){return Be&&Ht($t)&&(Sn==null?void 0:Sn.size)>=$t},[Be,$t,Sn==null?void 0:Sn.size]),pr=function(Kt){Kt.preventDefault()},lr=function(Kt){var ln;(ln=Wn.current)===null||ln===void 0||ln.scrollTo(typeof Kt=="number"?{index:Kt}:Kt)},ur=fe.useCallback(function(Jn){return Ze==="combobox"?!1:Sn.has(Jn)},[Ze,(0,ut.Z)(Sn).toString(),Sn.size]),yr=function(Kt){for(var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,an=er.length,Gt=0;Gt<an;Gt+=1){var An=(Kt+Gt*ln+an)%an,jn=er[An]||{},tn=jn.group,Vt=jn.data;if(!tn&&!(Vt!=null&&Vt.disabled)&&(ur(Vt.value)||!dr))return An}return-1},sr=fe.useState(function(){return yr(0)}),fr=(0,be.Z)(sr,2),Qn=fr[0],mr=fr[1],br=function(Kt){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;mr(Kt);var an={source:ln?"keyboard":"mouse"},Gt=er[Kt];if(!Gt){Wt(null,-1,an);return}Wt(Gt.value,Kt,an)};(0,fe.useEffect)(function(){br(kn!==!1?yr(0):-1)},[er.length,qe]);var Hr=fe.useCallback(function(Jn){return Ze==="combobox"?String(Jn).toLowerCase()===qe.toLowerCase():Sn.has(Jn)},[Ze,qe,(0,ut.Z)(Sn).toString(),Sn.size]);(0,fe.useEffect)(function(){var Jn=setTimeout(function(){if(!Be&&me&&Sn.size===1){var ln=Array.from(Sn)[0],an=er.findIndex(function(Gt){var An=Gt.data;return qe?String(An.value).startsWith(qe):An.value===ln});an!==-1&&(br(an),lr(an))}});if(me){var Kt;(Kt=Wn.current)===null||Kt===void 0||Kt.scrollTo(void 0)}return function(){return clearTimeout(Jn)}},[me,qe]);var Er=function(Kt){Kt!==void 0&&Tn(Kt,{selected:!Sn.has(Kt)}),Be||je(!1)};if(fe.useImperativeHandle(ge,function(){return{onKeyDown:function(Kt){var ln=Kt.which,an=Kt.ctrlKey;switch(ln){case Ke.Z.N:case Ke.Z.P:case Ke.Z.UP:case Ke.Z.DOWN:{var Gt=0;if(ln===Ke.Z.UP?Gt=-1:ln===Ke.Z.DOWN?Gt=1:$e()&&an&&(ln===Ke.Z.N?Gt=1:ln===Ke.Z.P&&(Gt=-1)),Gt!==0){var An=yr(Qn+Gt,Gt);lr(An),br(An,!0)}break}case Ke.Z.TAB:case Ke.Z.ENTER:{var jn,tn=er[Qn];tn&&!(tn!=null&&(jn=tn.data)!==null&&jn!==void 0&&jn.disabled)&&!dr?Er(tn.value):Er(void 0),me&&Kt.preventDefault();break}case Ke.Z.ESC:je(!1),me&&Kt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Kt){lr(Kt)}}}),er.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(Le,"_list"),className:"".concat(vn,"-empty"),onMouseDown:pr},Oe);var Ar=Object.keys(mn).map(function(Jn){return mn[Jn]}),kr=function(Kt){return Kt.label};function Pr(Jn,Kt){var ln=Jn.group;return{role:ln?"presentation":"option",id:"".concat(Le,"_list_").concat(Kt)}}var ir=function(Kt){var ln=er[Kt];if(!ln)return null;var an=ln.data||{},Gt=an.value,An=ln.group,jn=(0,Fe.Z)(an,!0),tn=kr(ln);return ln?fe.createElement("div",(0,te.Z)({"aria-label":typeof tn=="string"&&!An?tn:null},jn,{key:Kt},Pr(ln,Kt),{"aria-selected":Hr(Gt)}),Gt):null},rr={role:"listbox",id:"".concat(Le,"_list")};return fe.createElement(fe.Fragment,null,Cn&&fe.createElement("div",(0,te.Z)({},rr,{style:{height:0,width:0,overflow:"hidden"}}),ir(Qn-1),ir(Qn),ir(Qn+1)),fe.createElement(we.Z,{itemKey:"key",ref:Wn,data:er,height:Yn,itemHeight:Vn,fullHeight:!1,onMouseDown:pr,onScroll:Te,virtual:Cn,direction:Fn,innerProps:Cn?null:rr},function(Jn,Kt){var ln=Jn.group,an=Jn.groupOption,Gt=Jn.data,An=Jn.label,jn=Jn.value,tn=Gt.key;if(ln){var Vt,yn=(Vt=Gt.title)!==null&&Vt!==void 0?Vt:Tt(An)?An.toString():void 0;return fe.createElement("div",{className:xe()(vn,"".concat(vn,"-group"),Gt.className),title:yn},An!==void 0?An:tn)}var Ln=Gt.disabled,cr=Gt.title,Lr=Gt.children,Ir=Gt.style,Rr=Gt.className,Br=(0,Se.Z)(Gt,st),Fr=(0,Nt.Z)(Br,Ar),Vr=ur(jn),Wr=Ln||!Vr&&dr,Kr="".concat(vn,"-option"),ti=xe()(vn,Kr,Rr,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(Kr,"-grouped"),an),"".concat(Kr,"-active"),Qn===Kt&&!Wr),"".concat(Kr,"-disabled"),Wr),"".concat(Kr,"-selected"),Vr)),Ei=kr(Jn),Ni=!Hn||typeof Hn=="function"||Vr,xi=typeof Ei=="number"?Ei:Ei||jn,li=Tt(xi)?xi.toString():void 0;return cr!==void 0&&(li=cr),fe.createElement("div",(0,te.Z)({},(0,Fe.Z)(Fr),Cn?{}:Pr(Jn,Kt),{"aria-selected":Hr(jn),className:ti,title:li,onMouseMove:function(){Qn===Kt||Wr||br(Kt)},onClick:function(){Wr||Er(jn)},style:Ir}),fe.createElement("div",{className:"".concat(Kr,"-content")},typeof Kn=="function"?Kn(Jn,{index:Kt}):xi),fe.isValidElement(Hn)||Vr,Ni&&fe.createElement(Ne,{className:"".concat(vn,"-option-state"),customizeIcon:Hn,customizeIconProps:{value:jn,disabled:Wr,isSelected:Vr}},Vr?"\u2713":null))}))},on=fe.forwardRef(zt),Dn=on,In=function(De,Ue){var ge=fe.useRef({values:new Map,options:new Map}),Me=fe.useMemo(function(){var Le=ge.current,me=Le.values,Be=Le.options,Ze=De.map(function(Oe){if(Oe.label===void 0){var Te;return(0,Je.Z)((0,Je.Z)({},Oe),{},{label:(Te=me.get(Oe.value))===null||Te===void 0?void 0:Te.label})}return Oe}),qe=new Map,je=new Map;return Ze.forEach(function(Oe){qe.set(Oe.value,Oe),je.set(Oe.value,Ue.get(Oe.value)||Be.get(Oe.value))}),ge.current.values=qe,ge.current.options=je,Ze},[De,Ue]),ye=fe.useCallback(function(Le){return Ue.get(Le)||ge.current.options.get(Le)},[Ue]);return[Me,ye]};function dn(De,Ue){return ke(De).join("").toUpperCase().includes(Ue)}var xn=function(De,Ue,ge,Me,ye){return fe.useMemo(function(){if(!ge||Me===!1)return De;var Le=Ue.options,me=Ue.label,Be=Ue.value,Ze=[],qe=typeof Me=="function",je=ge.toUpperCase(),Oe=qe?Me:function(Ge,$t){return ye?dn($t[ye],je):$t[Le]?dn($t[me!=="children"?me:"label"],je):dn($t[Be],je)},Te=qe?function(Ge){return vt(Ge)}:function(Ge){return Ge};return De.forEach(function(Ge){if(Ge[Le]){var $t=Oe(ge,Te(Ge));if($t)Ze.push(Ge);else{var Ft=Ge[Le].filter(function(Wt){return Oe(ge,Te(Wt))});Ft.length&&Ze.push((0,Je.Z)((0,Je.Z)({},Ge),{},(0,ve.Z)({},Le,Ft)))}return}Oe(ge,Te(Ge))&&Ze.push(Ge)}),Ze},[De,Me,ye,ge,Ue])},fn=ie(6551),$n=ie(11592),gn=["children","value"],hn=["children"];function Yt(De){var Ue=De,ge=Ue.key,Me=Ue.props,ye=Me.children,Le=Me.value,me=(0,Se.Z)(Me,gn);return(0,Je.Z)({key:ge,value:Le!==void 0?Le:ge,children:ye},me)}function Mn(De){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,$n.Z)(De).map(function(ge,Me){if(!fe.isValidElement(ge)||!ge.type)return null;var ye=ge,Le=ye.type.isSelectOptGroup,me=ye.key,Be=ye.props,Ze=Be.children,qe=(0,Se.Z)(Be,hn);return Ue||!Le?Yt(ge):(0,Je.Z)((0,Je.Z)({key:"__RC_SELECT_GRP__".concat(me===null?Me:me,"__"),label:me},qe),{},{options:Mn(Ze)})}).filter(function(ge){return ge})}var pn=function(Ue,ge,Me,ye,Le){return fe.useMemo(function(){var me=Ue,Be=!Ue;Be&&(me=Mn(ge));var Ze=new Map,qe=new Map,je=function(Ge,$t,Ft){Ft&&typeof Ft=="string"&&Ge.set($t[Ft],$t)},Oe=function Te(Ge){for(var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ft=0;Ft<Ge.length;Ft+=1){var Wt=Ge[Ft];!Wt[Me.options]||$t?(Ze.set(Wt[Me.value],Wt),je(qe,Wt,Me.label),je(qe,Wt,ye),je(qe,Wt,Le)):Te(Wt[Me.options],!0)}};return Oe(me),{options:me,valueOptions:Ze,labelOptions:qe}},[Ue,ge,Me,ye,Le])},On=pn;function Gn(De){var Ue=fe.useRef();Ue.current=De;var ge=fe.useCallback(function(){return Ue.current.apply(Ue,arguments)},[]);return ge}function Zn(De){var Ue=De.mode,ge=De.options,Me=De.children,ye=De.backfill,Le=De.allowClear,me=De.placeholder,Be=De.getInputElement,Ze=De.showSearch,qe=De.onSearch,je=De.defaultOpen,Oe=De.autoFocus,Te=De.labelInValue,Ge=De.value,$t=De.inputValue,Ft=De.optionLabelProp,Wt=isMultiple(Ue),kn=Ze!==void 0?Ze:Wt||Ue==="combobox",Tn=ge||convertChildrenToData(Me);if(warning(Ue!=="tags"||Tn.every(function(Cn){return!Cn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ue==="tags"||Ue==="combobox"){var Hn=Tn.some(function(Cn){return Cn.options?Cn.options.some(function(Fn){return typeof("value"in Fn?Fn.value:Fn.key)=="number"}):typeof("value"in Cn?Cn.value:Cn.key)=="number"});warning(!Hn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ue!=="combobox"||!Ft,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ue==="combobox"||!ye,"`backfill` only works with `combobox` mode."),warning(Ue==="combobox"||!Be,"`getInputElement` only work with `combobox` mode."),noteOnce(Ue!=="combobox"||!Be||!Le||!me,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),qe&&!kn&&Ue!=="combobox"&&Ue!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!je||Oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ge!=null){var Sn=toArray(Ge);warning(!Te||Sn.every(function(Cn){return _typeof(Cn)==="object"&&("key"in Cn||"value"in Cn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Wt||Array.isArray(Ge),"`value` should be array when `mode` is `multiple` or `tags`")}if(Me){var mn=null;toNodeArray(Me).some(function(Cn){if(!React.isValidElement(Cn)||!Cn.type)return!1;var Fn=Cn,Yn=Fn.type;if(Yn.isSelectOption)return!1;if(Yn.isSelectOptGroup){var Vn=toNodeArray(Cn.props.children).every(function(Kn){return!React.isValidElement(Kn)||!Cn.type||Kn.type.isSelectOption?!0:(mn=Kn.type,!1)});return!Vn}return mn=Yn,!0}),mn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(mn.displayName||mn.name||mn,"`.")),warning($t===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Bn(De,Ue){if(De){var ge=function Me(ye){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=0;me<ye.length;me++){var Be=ye[me];if(Be[Ue==null?void 0:Ue.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Le&&Array.isArray(Be[Ue==null?void 0:Ue.options])&&Me(Be[Ue==null?void 0:Ue.options],!0))break}};ge(De)}}var Xn=null,Nn=["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"],ar=["inputValue"];function qn(De){return!De||(0,He.Z)(De)!=="object"}var Et=fe.forwardRef(function(De,Ue){var ge=De.id,Me=De.mode,ye=De.prefixCls,Le=ye===void 0?"rc-select":ye,me=De.backfill,Be=De.fieldNames,Ze=De.inputValue,qe=De.searchValue,je=De.onSearch,Oe=De.autoClearSearchValue,Te=Oe===void 0?!0:Oe,Ge=De.onSelect,$t=De.onDeselect,Ft=De.dropdownMatchSelectWidth,Wt=Ft===void 0?!0:Ft,kn=De.filterOption,Tn=De.filterSort,Hn=De.optionFilterProp,Sn=De.optionLabelProp,mn=De.options,Cn=De.optionRender,Fn=De.children,Yn=De.defaultActiveFirstOption,Vn=De.menuItemSelectedIcon,Kn=De.virtual,vn=De.direction,er=De.listHeight,Wn=er===void 0?200:er,dr=De.listItemHeight,pr=dr===void 0?20:dr,lr=De.labelRender,ur=De.value,yr=De.defaultValue,sr=De.labelInValue,fr=De.onChange,Qn=De.maxCount,mr=(0,Se.Z)(De,Nn),br=(0,fn.ZP)(ge),Hr=cn(Me),Er=!!(!mn&&Fn),Ar=fe.useMemo(function(){return kn===void 0&&Me==="combobox"?!1:kn},[kn,Me]),kr=fe.useMemo(function(){return Ye(Be,Er)},[JSON.stringify(Be),Er]),Pr=(0,nt.Z)("",{value:qe!==void 0?qe:Ze,postState:function(Mr){return Mr||""}}),ir=(0,be.Z)(Pr,2),rr=ir[0],Jn=ir[1],Kt=On(mn,Fn,kr,Hn,Sn),ln=Kt.valueOptions,an=Kt.labelOptions,Gt=Kt.options,An=fe.useCallback(function(vr){var Mr=ke(vr);return Mr.map(function(Cr){var Sr,jr,Xr,Ki,ki;if(qn(Cr))Sr=Cr;else{var gi;Xr=Cr.key,jr=Cr.label,Sr=(gi=Cr.value)!==null&&gi!==void 0?gi:Xr}var ri=ln.get(Sr);if(ri){var Gi;if(jr===void 0&&(jr=ri==null?void 0:ri[Sn||kr.label]),Xr===void 0&&(Xr=(Gi=ri==null?void 0:ri.key)!==null&&Gi!==void 0?Gi:Sr),Ki=ri==null?void 0:ri.disabled,ki=ri==null?void 0:ri.title,0)var eo}return{label:jr,value:Sr,key:Xr,disabled:Ki,title:ki}})},[kr,Sn,ln]),jn=(0,nt.Z)(yr,{value:ur}),tn=(0,be.Z)(jn,2),Vt=tn[0],yn=tn[1],Ln=fe.useMemo(function(){var vr,Mr=Hr&&Vt===null?[]:Vt,Cr=An(Mr);return Me==="combobox"&&de((vr=Cr[0])===null||vr===void 0?void 0:vr.value)?[]:Cr},[Vt,An,Me,Hr]),cr=In(Ln,ln),Lr=(0,be.Z)(cr,2),Ir=Lr[0],Rr=Lr[1],Br=fe.useMemo(function(){if(!Me&&Ir.length===1){var vr=Ir[0];if(vr.value===null&&(vr.label===null||vr.label===void 0))return[]}return Ir.map(function(Mr){var Cr;return(0,Je.Z)((0,Je.Z)({},Mr),{},{label:(Cr=typeof lr=="function"?lr(Mr):Mr.label)!==null&&Cr!==void 0?Cr:Mr.value})})},[Me,Ir,lr]),Fr=fe.useMemo(function(){return new Set(Ir.map(function(vr){return vr.value}))},[Ir]);fe.useEffect(function(){if(Me==="combobox"){var vr,Mr=(vr=Ir[0])===null||vr===void 0?void 0:vr.value;Jn(Ce(Mr)?String(Mr):"")}},[Ir]);var Vr=Gn(function(vr,Mr){var Cr=Mr!=null?Mr:vr;return(0,ve.Z)((0,ve.Z)({},kr.value,vr),kr.label,Cr)}),Wr=fe.useMemo(function(){if(Me!=="tags")return Gt;var vr=(0,ut.Z)(Gt),Mr=function(Sr){return ln.has(Sr)};return(0,ut.Z)(Ir).sort(function(Cr,Sr){return Cr.value<Sr.value?-1:1}).forEach(function(Cr){var Sr=Cr.value;Mr(Sr)||vr.push(Vr(Sr,Cr.label))}),vr},[Vr,Gt,ln,Ir,Me]),Kr=xn(Wr,kr,rr,Ar,Hn),ti=fe.useMemo(function(){return Me!=="tags"||!rr||Kr.some(function(vr){return vr[Hn||"value"]===rr})||Kr.some(function(vr){return vr[kr.value]===rr})?Kr:[Vr(rr)].concat((0,ut.Z)(Kr))},[Vr,Hn,Me,Kr,rr,kr]),Ei=function vr(Mr){var Cr=(0,ut.Z)(Mr).sort(function(Sr,jr){return Tn(Sr,jr,{searchValue:rr})});return Cr.map(function(Sr){return Array.isArray(Sr.options)?(0,Je.Z)((0,Je.Z)({},Sr),{},{options:Sr.options.length>0?vr(Sr.options):Sr.options}):Sr})},Ni=fe.useMemo(function(){return Tn?Ei(ti):ti},[ti,Tn,rr]),xi=fe.useMemo(function(){return tt(Ni,{fieldNames:kr,childrenAsData:Er})},[Ni,kr,Er]),li=function(Mr){var Cr=An(Mr);if(yn(Cr),fr&&(Cr.length!==Ir.length||Cr.some(function(Xr,Ki){var ki;return((ki=Ir[Ki])===null||ki===void 0?void 0:ki.value)!==(Xr==null?void 0:Xr.value)}))){var Sr=sr?Cr:Cr.map(function(Xr){return Xr.value}),jr=Cr.map(function(Xr){return vt(Rr(Xr.value))});fr(Hr?Sr:Sr[0],Hr?jr:jr[0])}},Ri=fe.useState(null),$r=(0,be.Z)(Ri,2),_i=$r[0],qr=$r[1],xr=fe.useState(0),zr=(0,be.Z)(xr,2),Gr=zr[0],wr=zr[1],Nr=Yn!==void 0?Yn:Me!=="combobox",Or=fe.useCallback(function(vr,Mr){var Cr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Sr=Cr.source,jr=Sr===void 0?"keyboard":Sr;wr(Mr),me&&Me==="combobox"&&vr!==null&&jr==="keyboard"&&qr(String(vr))},[me,Me]),ui=function(Mr,Cr,Sr){var jr=function(){var io,Xi=Rr(Mr);return[sr?{label:Xi==null?void 0:Xi[kr.label],value:Mr,key:(io=Xi==null?void 0:Xi.key)!==null&&io!==void 0?io:Mr}:Mr,vt(Xi)]};if(Cr&&Ge){var Xr=jr(),Ki=(0,be.Z)(Xr,2),ki=Ki[0],gi=Ki[1];Ge(ki,gi)}else if(!Cr&&$t&&Sr!=="clear"){var ri=jr(),Gi=(0,be.Z)(ri,2),eo=Gi[0],Fi=Gi[1];$t(eo,Fi)}},Pi=Gn(function(vr,Mr){var Cr,Sr=Hr?Mr.selected:!0;Sr?Cr=Hr?[].concat((0,ut.Z)(Ir),[vr]):[vr]:Cr=Ir.filter(function(jr){return jr.value!==vr}),li(Cr),ui(vr,Sr),Me==="combobox"?qr(""):(!cn||Te)&&(Jn(""),qr(""))}),fi=function(Mr,Cr){li(Mr);var Sr=Cr.type,jr=Cr.values;(Sr==="remove"||Sr==="clear")&&jr.forEach(function(Xr){ui(Xr.value,!1,Sr)})},ni=function(Mr,Cr){if(Jn(Mr),qr(null),Cr.source==="submit"){var Sr=(Mr||"").trim();if(Sr){var jr=Array.from(new Set([].concat((0,ut.Z)(Fr),[Sr])));li(jr),ui(Sr,!0),Jn("")}return}Cr.source!=="blur"&&(Me==="combobox"&&li(Mr),je==null||je(Mr))},xo=function(Mr){var Cr=Mr;Me!=="tags"&&(Cr=Mr.map(function(jr){var Xr=an.get(jr);return Xr==null?void 0:Xr.value}).filter(function(jr){return jr!==void 0}));var Sr=Array.from(new Set([].concat((0,ut.Z)(Fr),(0,ut.Z)(Cr))));li(Sr),Sr.forEach(function(jr){ui(jr,!0)})},lo=fe.useMemo(function(){var vr=Kn!==!1&&Wt!==!1;return(0,Je.Z)((0,Je.Z)({},Kt),{},{flattenOptions:xi,onActiveValue:Or,defaultActiveFirstOption:Nr,onSelect:Pi,menuItemSelectedIcon:Vn,rawValues:Fr,fieldNames:kr,virtual:vr,direction:vn,listHeight:Wn,listItemHeight:pr,childrenAsData:Er,maxCount:Qn,optionRender:Cn})},[Qn,Kt,xi,Or,Nr,Pi,Vn,Fr,kr,Kn,Wt,vn,Wn,pr,Er,Cn]);return fe.createElement(Jt.Provider,{value:lo},fe.createElement(kt,(0,te.Z)({},mr,{id:br,prefixCls:Le,ref:Ue,omitDomProps:ar,mode:Me,displayValues:Br,onDisplayValuesChange:fi,direction:vn,searchValue:rr,onSearch:ni,autoClearSearchValue:Te,onSearchSplit:xo,dropdownMatchSelectWidth:Wt,OptionList:Dn,emptyOptions:!xi.length,activeValue:_i,activeDescendantId:"".concat(br,"_list_").concat(Gr)})))}),Ut=Et;Ut.Option=Qe,Ut.OptGroup=Qt;var zn=Ut,nr=zn},22711:function(rn,jt,ie){"use strict";ie.r(jt),ie.d(jt,{ResizableTextArea:function(){return Re},default:function(){return St}});var te=ie(60499),ut=ie(18642),ve=ie(85899),Je=ie(77654),be=ie(72190),Se=ie(42244),He=ie(92310),nt=ie.n(He),Ie=ie(36901),fe=ie(66003),et=ie(30292),xe=ie(18929),wt=ie(59301),rt=ie(43749),We=ie(29301),Ve=ie(34280),Ne=ie(16089),pt=`
|
|
|
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;
|
|
|
`,It=["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"],Ot={},gt;function ct(ke){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qt=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(Ct&&Ot[qt])return Ot[qt];var Ce=window.getComputedStyle(ke),de=Ce.getPropertyValue("box-sizing")||Ce.getPropertyValue("-moz-box-sizing")||Ce.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(Ce.getPropertyValue("padding-bottom"))+parseFloat(Ce.getPropertyValue("padding-top")),en=parseFloat(Ce.getPropertyValue("border-bottom-width"))+parseFloat(Ce.getPropertyValue("border-top-width")),Mt=It.map(function(dt){return"".concat(dt,":").concat(Ce.getPropertyValue(dt))}).join(";"),ze={sizingStyle:Mt,paddingSize:mt,borderSize:en,boxSizing:de};return Ct&&qt&&(Ot[qt]=ze),ze}function yt(ke){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;gt||(gt=document.createElement("textarea"),gt.setAttribute("tab-index","-1"),gt.setAttribute("aria-hidden","true"),gt.setAttribute("name","hiddenTextarea"),document.body.appendChild(gt)),ke.getAttribute("wrap")?gt.setAttribute("wrap",ke.getAttribute("wrap")):gt.removeAttribute("wrap");var de=ct(ke,Ct),mt=de.paddingSize,en=de.borderSize,Mt=de.boxSizing,ze=de.sizingStyle;gt.setAttribute("style","".concat(ze,";").concat(pt)),gt.value=ke.value||ke.placeholder||"";var dt=void 0,bt=void 0,un,At=gt.scrollHeight;if(Mt==="border-box"?At+=en:Mt==="content-box"&&(At-=mt),qt!==null||Ce!==null){gt.value=" ";var sn=gt.scrollHeight-mt;qt!==null&&(dt=sn*qt,Mt==="border-box"&&(dt=dt+mt+en),At=Math.max(dt,At)),Ce!==null&&(bt=sn*Ce,Mt==="border-box"&&(bt=bt+mt+en),un=At>bt?"":"hidden",At=Math.min(bt,At))}var it={height:At,overflowY:un,resize:"none"};return dt&&(it.minHeight=dt),bt&&(it.maxHeight=bt),it}var Ke=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Bt=0,Fe=1,_e=2,ft=wt.forwardRef(function(ke,Ct){var qt=ke,Ce=qt.prefixCls,de=qt.defaultValue,mt=qt.value,en=qt.autoSize,Mt=qt.onResize,ze=qt.className,dt=qt.style,bt=qt.disabled,un=qt.onChange,At=qt.onInternalAutoSize,sn=(0,Se.Z)(qt,Ke),it=(0,xe.Z)(de,{value:mt,postState:function(Qe){return Qe!=null?Qe:""}}),_t=(0,be.Z)(it,2),ht=_t[0],se=_t[1],ee=function(Qe){se(Qe.target.value),un==null||un(Qe)},z=wt.useRef();wt.useImperativeHandle(Ct,function(){return{textArea:z.current}});var oe=wt.useMemo(function(){return en&&(0,rt.Z)(en)==="object"?[en.minRows,en.maxRows]:[]},[en]),le=(0,be.Z)(oe,2),re=le[0],Ee=le[1],at=!!en,Ht=function(){try{if(document.activeElement===z.current){var Qe=z.current,Lt=Qe.selectionStart,Nt=Qe.selectionEnd,we=Qe.scrollTop;z.current.setSelectionRange(Lt,Nt),z.current.scrollTop=we}}catch($e){}},Ye=wt.useState(_e),tt=(0,be.Z)(Ye,2),vt=tt[0],Rt=tt[1],Dt=wt.useState(),Jt=(0,be.Z)(Dt,2),Xt=Jt[0],Zt=Jt[1],En=function(){Rt(Bt)};(0,Ve.Z)(function(){at&&En()},[mt,re,Ee,at]),(0,Ve.Z)(function(){if(vt===Bt)Rt(Fe);else if(vt===Fe){var Pe=yt(z.current,!1,re,Ee);Rt(_e),Zt(Pe)}else Ht()},[vt]);var cn=wt.useRef(),wn=function(){Ne.Z.cancel(cn.current)},kt=function(Qe){vt===_e&&(Mt==null||Mt(Qe),en&&(wn(),cn.current=(0,Ne.Z)(function(){En()})))};wt.useEffect(function(){return wn},[]);var Pn=at?Xt:null,Qt=(0,ve.Z)((0,ve.Z)({},dt),Pn);return(vt===Bt||vt===Fe)&&(Qt.overflowY="hidden",Qt.overflowX="hidden"),wt.createElement(We.Z,{onResize:kt,disabled:!(en||Mt)},wt.createElement("textarea",(0,te.Z)({},sn,{ref:z,style:Qt,className:nt()(Ce,ze,(0,ut.Z)({},"".concat(Ce,"-disabled"),bt)),disabled:bt,value:ht,onChange:ee})))}),Re=ft,lt=["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"],ot=wt.forwardRef(function(ke,Ct){var qt,Ce=ke.defaultValue,de=ke.value,mt=ke.onFocus,en=ke.onBlur,Mt=ke.onChange,ze=ke.allowClear,dt=ke.maxLength,bt=ke.onCompositionStart,un=ke.onCompositionEnd,At=ke.suffix,sn=ke.prefixCls,it=sn===void 0?"rc-textarea":sn,_t=ke.showCount,ht=ke.count,se=ke.className,ee=ke.style,z=ke.disabled,oe=ke.hidden,le=ke.classNames,re=ke.styles,Ee=ke.onResize,at=ke.onClear,Ht=ke.onPressEnter,Ye=ke.readOnly,tt=ke.autoSize,vt=ke.onKeyDown,Rt=(0,Se.Z)(ke,lt),Dt=(0,xe.Z)(Ce,{value:de,defaultValue:Ce}),Jt=(0,be.Z)(Dt,2),Xt=Jt[0],Zt=Jt[1],En=Xt==null?"":String(Xt),cn=wt.useState(!1),wn=(0,be.Z)(cn,2),kt=wn[0],Pn=wn[1],Qt=wt.useRef(!1),Pe=wt.useState(null),Qe=(0,be.Z)(Pe,2),Lt=Qe[0],Nt=Qe[1],we=(0,wt.useRef)(null),$e=(0,wt.useRef)(null),st=function(){var Ut;return(Ut=$e.current)===null||Ut===void 0?void 0:Ut.textArea},Tt=function(){st().focus()};(0,wt.useImperativeHandle)(Ct,function(){var Et;return{resizableTextArea:$e.current,focus:Tt,blur:function(){st().blur()},nativeElement:((Et=we.current)===null||Et===void 0?void 0:Et.nativeElement)||st()}}),(0,wt.useEffect)(function(){Pn(function(Et){return!z&&Et})},[z]);var zt=wt.useState(null),on=(0,be.Z)(zt,2),Dn=on[0],In=on[1];wt.useEffect(function(){if(Dn){var Et;(Et=st()).setSelectionRange.apply(Et,(0,Je.Z)(Dn))}},[Dn]);var dn=(0,fe.Z)(ht,_t),xn=(qt=dn.max)!==null&&qt!==void 0?qt:dt,fn=Number(xn)>0,$n=dn.strategy(En),gn=!!xn&&$n>xn,hn=function(Ut,zn){var nr=zn;!Qt.current&&dn.exceedFormatter&&dn.max&&dn.strategy(zn)>dn.max&&(nr=dn.exceedFormatter(zn,{max:dn.max}),zn!==nr&&In([st().selectionStart||0,st().selectionEnd||0])),Zt(nr),(0,et.rJ)(Ut.currentTarget,Ut,Mt,nr)},Yt=function(Ut){Qt.current=!0,bt==null||bt(Ut)},Mn=function(Ut){Qt.current=!1,hn(Ut,Ut.currentTarget.value),un==null||un(Ut)},pn=function(Ut){hn(Ut,Ut.target.value)},On=function(Ut){Ut.key==="Enter"&&Ht&&Ht(Ut),vt==null||vt(Ut)},Gn=function(Ut){Pn(!0),mt==null||mt(Ut)},Zn=function(Ut){Pn(!1),en==null||en(Ut)},Bn=function(Ut){Zt(""),Tt(),(0,et.rJ)(st(),Ut,Mt)},Xn=At,Nn;dn.show&&(dn.showFormatter?Nn=dn.showFormatter({value:En,count:$n,maxLength:xn}):Nn="".concat($n).concat(fn?" / ".concat(xn):""),Xn=wt.createElement(wt.Fragment,null,Xn,wt.createElement("span",{className:nt()("".concat(it,"-data-count"),le==null?void 0:le.count),style:re==null?void 0:re.count},Nn)));var ar=function(Ut){var zn;Ee==null||Ee(Ut),(zn=st())!==null&&zn!==void 0&&zn.style.height&&Nt(!0)},qn=!tt&&!_t&&!ze;return wt.createElement(Ie.BaseInput,{ref:we,value:En,allowClear:ze,handleReset:Bn,suffix:Xn,prefixCls:it,classNames:(0,ve.Z)((0,ve.Z)({},le),{},{affixWrapper:nt()(le==null?void 0:le.affixWrapper,(0,ut.Z)((0,ut.Z)({},"".concat(it,"-show-count"),_t),"".concat(it,"-textarea-allow-clear"),ze))}),disabled:z,focused:kt,className:nt()(se,gn&&"".concat(it,"-out-of-range")),style:(0,ve.Z)((0,ve.Z)({},ee),Lt&&!qn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nn=="string"?Nn:void 0}},hidden:oe,readOnly:Ye,onClear:at},wt.createElement(Re,(0,te.Z)({},Rt,{autoSize:tt,maxLength:dt,onKeyDown:On,onChange:pn,onFocus:Gn,onBlur:Zn,onCompositionStart:Yt,onCompositionEnd:Mn,className:nt()(le==null?void 0:le.textarea),style:(0,ve.Z)((0,ve.Z)({},re==null?void 0:re.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:it,onResize:ar,ref:$e,readOnly:Ye})))}),pe=ot,St=pe},48911:function(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return ht}});var te=ie(60499),ut=ie(43749),ve=ie(85899),Je=ie(18642),be=ie(72190),Se=ie(42244),He=ie(92310),nt=ie.n(He),Ie=ie(29301),fe=ie(70425),et=ie(34280),xe=ie(59301),wt=ie(4676),rt=xe.forwardRef(function(se,ee){var z=se.height,oe=se.offsetY,le=se.offsetX,re=se.children,Ee=se.prefixCls,at=se.onInnerResize,Ht=se.innerProps,Ye=se.rtl,tt=se.extra,vt={},Rt={display:"flex",flexDirection:"column"};return oe!==void 0&&(vt={height:z,position:"relative",overflow:"hidden"},Rt=(0,ve.Z)((0,ve.Z)({},Rt),{},(0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)({transform:"translateY(".concat(oe,"px)")},Ye?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),xe.createElement("div",{style:vt},xe.createElement(Ie.Z,{onResize:function(Jt){var Xt=Jt.offsetHeight;Xt&&at&&at()}},xe.createElement("div",(0,te.Z)({style:Rt,className:nt()((0,Je.Z)({},"".concat(Ee,"-holder-inner"),Ee)),ref:ee},Ht),re,tt)))});rt.displayName="Filler";var We=rt;function Ve(se){var ee=se.children,z=se.setRef,oe=xe.useCallback(function(le){z(le)},[]);return xe.cloneElement(ee,{ref:oe})}function Ne(se,ee,z,oe,le,re,Ee,at){var Ht=at.getKey;return se.slice(ee,z+1).map(function(Ye,tt){var vt=ee+tt,Rt=Ee(Ye,vt,{style:{width:oe},offsetX:le}),Dt=Ht(Ye);return xe.createElement(Ve,{key:Dt,setRef:function(Xt){return re(Ye,Xt)}},Rt)})}function pt(se,ee,z,oe){var le=z-se,re=ee-z,Ee=Math.min(le,re)*2;if(oe<=Ee){var at=Math.floor(oe/2);return oe%2?z+at+1:z-at}return le>re?z-(oe-re):z+(oe-le)}function It(se,ee,z){var oe=se.length,le=ee.length,re,Ee;if(oe===0&&le===0)return null;oe<le?(re=se,Ee=ee):(re=ee,Ee=se);var at={__EMPTY_ITEM__:!0};function Ht(Jt){return Jt!==void 0?z(Jt):at}for(var Ye=null,tt=Math.abs(oe-le)!==1,vt=0;vt<Ee.length;vt+=1){var Rt=Ht(re[vt]),Dt=Ht(Ee[vt]);if(Rt!==Dt){Ye=vt,tt=tt||Rt!==Ht(Ee[vt+1]);break}}return Ye===null?null:{index:Ye,multiple:tt}}function Ot(se,ee,z){var oe=xe.useState(se),le=(0,be.Z)(oe,2),re=le[0],Ee=le[1],at=xe.useState(null),Ht=(0,be.Z)(at,2),Ye=Ht[0],tt=Ht[1];return xe.useEffect(function(){var vt=It(re||[],se||[],ee);(vt==null?void 0:vt.index)!==void 0&&(z==null||z(vt.index),tt(se[vt.index])),Ee(se)},[se]),[Ye]}var gt=ie(16089),ct=(typeof navigator=="undefined"?"undefined":(0,ut.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),yt=ct,Ke=function(se,ee,z,oe){var le=(0,xe.useRef)(!1),re=(0,xe.useRef)(null);function Ee(){clearTimeout(re.current),le.current=!0,re.current=setTimeout(function(){le.current=!1},50)}var at=(0,xe.useRef)({top:se,bottom:ee,left:z,right:oe});return at.current.top=se,at.current.bottom=ee,at.current.left=z,at.current.right=oe,function(Ht,Ye){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,vt=Ht?Ye<0&&at.current.left||Ye>0&&at.current.right:Ye<0&&at.current.top||Ye>0&&at.current.bottom;return tt&&vt?(clearTimeout(re.current),le.current=!1):(!vt||le.current)&&Ee(),!le.current&&vt}};function Bt(se,ee,z,oe,le,re,Ee){var at=(0,xe.useRef)(0),Ht=(0,xe.useRef)(null),Ye=(0,xe.useRef)(null),tt=(0,xe.useRef)(!1),vt=Ke(ee,z,oe,le);function Rt(cn,wn){if(gt.Z.cancel(Ht.current),!vt(!1,wn)){var kt=cn;if(!kt._virtualHandled)kt._virtualHandled=!0;else return;at.current+=wn,Ye.current=wn,yt||kt.preventDefault(),Ht.current=(0,gt.Z)(function(){var Pn=tt.current?10:1;Ee(at.current*Pn,!1),at.current=0})}}function Dt(cn,wn){Ee(wn,!0),yt||cn.preventDefault()}var Jt=(0,xe.useRef)(null),Xt=(0,xe.useRef)(null);function Zt(cn){if(se){gt.Z.cancel(Xt.current),Xt.current=(0,gt.Z)(function(){Jt.current=null},2);var wn=cn.deltaX,kt=cn.deltaY,Pn=cn.shiftKey,Qt=wn,Pe=kt;(Jt.current==="sx"||!Jt.current&&Pn&&kt&&!wn)&&(Qt=kt,Pe=0,Jt.current="sx");var Qe=Math.abs(Qt),Lt=Math.abs(Pe);Jt.current===null&&(Jt.current=re&&Qe>Lt?"x":"y"),Jt.current==="y"?Rt(cn,Pe):Dt(cn,Qt)}}function En(cn){se&&(tt.current=cn.detail===Ye.current)}return[Zt,En]}function Fe(se,ee,z,oe){var le=xe.useMemo(function(){return[new Map,[]]},[se,z.id,oe]),re=(0,be.Z)(le,2),Ee=re[0],at=re[1],Ht=function(tt){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt,Rt=Ee.get(tt),Dt=Ee.get(vt);if(Rt===void 0||Dt===void 0)for(var Jt=se.length,Xt=at.length;Xt<Jt;Xt+=1){var Zt,En=se[Xt],cn=ee(En);Ee.set(cn,Xt);var wn=(Zt=z.get(cn))!==null&&Zt!==void 0?Zt:oe;if(at[Xt]=(at[Xt-1]||0)+wn,cn===tt&&(Rt=Xt),cn===vt&&(Dt=Xt),Rt!==void 0&&Dt!==void 0)break}return{top:at[Rt-1]||0,bottom:at[Dt]}};return Ht}var _e=ie(38705),ft=ie(17212),Re=function(){function se(){(0,_e.Z)(this,se),(0,Je.Z)(this,"maps",void 0),(0,Je.Z)(this,"id",0),(0,Je.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ft.Z)(se,[{key:"set",value:function(z,oe){this.diffRecords.set(z,this.maps[z]),this.maps[z]=oe,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),se}(),lt=Re;function ot(se){var ee=parseFloat(se);return isNaN(ee)?0:ee}function pe(se,ee,z){var oe=xe.useState(0),le=(0,be.Z)(oe,2),re=le[0],Ee=le[1],at=(0,xe.useRef)(new Map),Ht=(0,xe.useRef)(new lt),Ye=(0,xe.useRef)(0);function tt(){Ye.current+=1}function vt(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;tt();var Jt=function(){var En=!1;at.current.forEach(function(cn,wn){if(cn&&cn.offsetParent){var kt=cn.offsetHeight,Pn=getComputedStyle(cn),Qt=Pn.marginTop,Pe=Pn.marginBottom,Qe=ot(Qt),Lt=ot(Pe),Nt=kt+Qe+Lt;Ht.current.get(wn)!==Nt&&(Ht.current.set(wn,Nt),En=!0)}}),En&&Ee(function(cn){return cn+1})};if(Dt)Jt();else{Ye.current+=1;var Xt=Ye.current;Promise.resolve().then(function(){Xt===Ye.current&&Jt()})}}function Rt(Dt,Jt){var Xt=se(Dt),Zt=at.current.get(Xt);Jt?(at.current.set(Xt,Jt),vt()):at.current.delete(Xt),!Zt!=!Jt&&(Jt?ee==null||ee(Dt):z==null||z(Dt))}return(0,xe.useEffect)(function(){return tt},[]),[Rt,vt,Ht.current,re]}var St=14/15;function ke(se,ee,z){var oe=(0,xe.useRef)(!1),le=(0,xe.useRef)(0),re=(0,xe.useRef)(0),Ee=(0,xe.useRef)(null),at=(0,xe.useRef)(null),Ht,Ye=function(Dt){if(oe.current){var Jt=Math.ceil(Dt.touches[0].pageX),Xt=Math.ceil(Dt.touches[0].pageY),Zt=le.current-Jt,En=re.current-Xt,cn=Math.abs(Zt)>Math.abs(En);cn?le.current=Jt:re.current=Xt;var wn=z(cn,cn?Zt:En,!1,Dt);wn&&Dt.preventDefault(),clearInterval(at.current),wn&&(at.current=setInterval(function(){cn?Zt*=St:En*=St;var kt=Math.floor(cn?Zt:En);(!z(cn,kt,!0)||Math.abs(kt)<=.1)&&clearInterval(at.current)},16))}},tt=function(){oe.current=!1,Ht()},vt=function(Dt){Ht(),Dt.touches.length===1&&!oe.current&&(oe.current=!0,le.current=Math.ceil(Dt.touches[0].pageX),re.current=Math.ceil(Dt.touches[0].pageY),Ee.current=Dt.target,Ee.current.addEventListener("touchmove",Ye,{passive:!1}),Ee.current.addEventListener("touchend",tt,{passive:!0}))};Ht=function(){Ee.current&&(Ee.current.removeEventListener("touchmove",Ye),Ee.current.removeEventListener("touchend",tt))},(0,et.Z)(function(){return se&&ee.current.addEventListener("touchstart",vt,{passive:!0}),function(){var Rt;(Rt=ee.current)===null||Rt===void 0||Rt.removeEventListener("touchstart",vt),Ht(),clearInterval(at.current)}},[se])}function Ct(se){return Math.floor(Math.pow(se,.5))}function qt(se,ee){var z="touches"in se?se.touches[0]:se;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function Ce(se,ee,z){xe.useEffect(function(){var oe=ee.current;if(se&&oe){var le=!1,re,Ee,at=function(){gt.Z.cancel(re)},Ht=function Rt(){at(),re=(0,gt.Z)(function(){z(Ee),Rt()})},Ye=function(){le=!1,at()},tt=function(Dt){if(!(Dt.target.draggable||Dt.button!==0)){var Jt=Dt;Jt._virtualHandled||(Jt._virtualHandled=!0,le=!0)}},vt=function(Dt){if(le){var Jt=qt(Dt,!1),Xt=oe.getBoundingClientRect(),Zt=Xt.top,En=Xt.bottom;if(Jt<=Zt){var cn=Zt-Jt;Ee=-Ct(cn),Ht()}else if(Jt>=En){var wn=Jt-En;Ee=Ct(wn),Ht()}else at()}};return oe.addEventListener("mousedown",tt),oe.ownerDocument.addEventListener("mouseup",Ye),oe.ownerDocument.addEventListener("mousemove",vt),oe.ownerDocument.addEventListener("dragend",Ye),function(){oe.removeEventListener("mousedown",tt),oe.ownerDocument.removeEventListener("mouseup",Ye),oe.ownerDocument.removeEventListener("mousemove",vt),oe.ownerDocument.removeEventListener("dragend",Ye),at()}}},[se])}var de=10;function mt(se,ee,z,oe,le,re,Ee,at){var Ht=xe.useRef(),Ye=xe.useState(null),tt=(0,be.Z)(Ye,2),vt=tt[0],Rt=tt[1];return(0,et.Z)(function(){if(vt&&vt.times<de){if(!se.current){Rt(function(dn){return(0,ve.Z)({},dn)});return}re();var Dt=vt.targetAlign,Jt=vt.originAlign,Xt=vt.index,Zt=vt.offset,En=se.current.clientHeight,cn=!1,wn=Dt,kt=null;if(En){for(var Pn=Dt||Jt,Qt=0,Pe=0,Qe=0,Lt=Math.min(ee.length-1,Xt),Nt=0;Nt<=Lt;Nt+=1){var we=le(ee[Nt]);Pe=Qt;var $e=z.get(we);Qe=Pe+($e===void 0?oe:$e),Qt=Qe}for(var st=Pn==="top"?Zt:En-Zt,Tt=Lt;Tt>=0;Tt-=1){var zt=le(ee[Tt]),on=z.get(zt);if(on===void 0){cn=!0;break}if(st-=on,st<=0)break}switch(Pn){case"top":kt=Pe-Zt;break;case"bottom":kt=Qe-En+Zt;break;default:{var Dn=se.current.scrollTop,In=Dn+En;Pe<Dn?wn="top":Qe>In&&(wn="bottom")}}kt!==null&&Ee(kt),kt!==vt.lastTop&&(cn=!0)}cn&&Rt((0,ve.Z)((0,ve.Z)({},vt),{},{times:vt.times+1,targetAlign:wn,lastTop:kt}))}},[vt,se.current]),function(Dt){if(Dt==null){at();return}if(gt.Z.cancel(Ht.current),typeof Dt=="number")Ee(Dt);else if(Dt&&(0,ut.Z)(Dt)==="object"){var Jt,Xt=Dt.align;"index"in Dt?Jt=Dt.index:Jt=ee.findIndex(function(cn){return le(cn)===Dt.key});var Zt=Dt.offset,En=Zt===void 0?0:Zt;Rt({times:0,index:Jt,offset:En,originAlign:Xt})}}}var en=xe.forwardRef(function(se,ee){var z=se.prefixCls,oe=se.rtl,le=se.scrollOffset,re=se.scrollRange,Ee=se.onStartMove,at=se.onStopMove,Ht=se.onScroll,Ye=se.horizontal,tt=se.spinSize,vt=se.containerSize,Rt=se.style,Dt=se.thumbStyle,Jt=se.showScrollBar,Xt=xe.useState(!1),Zt=(0,be.Z)(Xt,2),En=Zt[0],cn=Zt[1],wn=xe.useState(null),kt=(0,be.Z)(wn,2),Pn=kt[0],Qt=kt[1],Pe=xe.useState(null),Qe=(0,be.Z)(Pe,2),Lt=Qe[0],Nt=Qe[1],we=!oe,$e=xe.useRef(),st=xe.useRef(),Tt=xe.useState(Jt),zt=(0,be.Z)(Tt,2),on=zt[0],Dn=zt[1],In=xe.useRef(),dn=function(){Jt===!0||Jt===!1||(clearTimeout(In.current),Dn(!0),In.current=setTimeout(function(){Dn(!1)},3e3))},xn=re-vt||0,fn=vt-tt||0,$n=xe.useMemo(function(){if(le===0||xn===0)return 0;var Bn=le/xn;return Bn*fn},[le,xn,fn]),gn=function(Xn){Xn.stopPropagation(),Xn.preventDefault()},hn=xe.useRef({top:$n,dragging:En,pageY:Pn,startTop:Lt});hn.current={top:$n,dragging:En,pageY:Pn,startTop:Lt};var Yt=function(Xn){cn(!0),Qt(qt(Xn,Ye)),Nt(hn.current.top),Ee(),Xn.stopPropagation(),Xn.preventDefault()};xe.useEffect(function(){var Bn=function(qn){qn.preventDefault()},Xn=$e.current,Nn=st.current;return Xn.addEventListener("touchstart",Bn,{passive:!1}),Nn.addEventListener("touchstart",Yt,{passive:!1}),function(){Xn.removeEventListener("touchstart",Bn),Nn.removeEventListener("touchstart",Yt)}},[]);var Mn=xe.useRef();Mn.current=xn;var pn=xe.useRef();pn.current=fn,xe.useEffect(function(){if(En){var Bn,Xn=function(qn){var Et=hn.current,Ut=Et.dragging,zn=Et.pageY,nr=Et.startTop;gt.Z.cancel(Bn);var De=$e.current.getBoundingClientRect(),Ue=vt/(Ye?De.width:De.height);if(Ut){var ge=(qt(qn,Ye)-zn)*Ue,Me=nr;!we&&Ye?Me-=ge:Me+=ge;var ye=Mn.current,Le=pn.current,me=Le?Me/Le:0,Be=Math.ceil(me*ye);Be=Math.max(Be,0),Be=Math.min(Be,ye),Bn=(0,gt.Z)(function(){Ht(Be,Ye)})}},Nn=function(){cn(!1),at()};return window.addEventListener("mousemove",Xn,{passive:!0}),window.addEventListener("touchmove",Xn,{passive:!0}),window.addEventListener("mouseup",Nn,{passive:!0}),window.addEventListener("touchend",Nn,{passive:!0}),function(){window.removeEventListener("mousemove",Xn),window.removeEventListener("touchmove",Xn),window.removeEventListener("mouseup",Nn),window.removeEventListener("touchend",Nn),gt.Z.cancel(Bn)}}},[En]),xe.useEffect(function(){return dn(),function(){clearTimeout(In.current)}},[le]),xe.useImperativeHandle(ee,function(){return{delayHidden:dn}});var On="".concat(z,"-scrollbar"),Gn={position:"absolute",visibility:on?null:"hidden"},Zn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ye?(Object.assign(Gn,{height:8,left:0,right:0,bottom:0}),Object.assign(Zn,(0,Je.Z)({height:"100%",width:tt},we?"left":"right",$n))):(Object.assign(Gn,(0,Je.Z)({width:8,top:0,bottom:0},we?"right":"left",0)),Object.assign(Zn,{width:"100%",height:tt,top:$n})),xe.createElement("div",{ref:$e,className:nt()(On,(0,Je.Z)((0,Je.Z)((0,Je.Z)({},"".concat(On,"-horizontal"),Ye),"".concat(On,"-vertical"),!Ye),"".concat(On,"-visible"),on)),style:(0,ve.Z)((0,ve.Z)({},Gn),Rt),onMouseDown:gn,onMouseMove:dn},xe.createElement("div",{ref:st,className:nt()("".concat(On,"-thumb"),(0,Je.Z)({},"".concat(On,"-thumb-moving"),En)),style:(0,ve.Z)((0,ve.Z)({},Zn),Dt),onMouseDown:Yt}))}),Mt=en,ze=20;function dt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=se/ee*se;return isNaN(z)&&(z=0),z=Math.max(z,ze),Math.floor(z)}var bt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],un=[],At={overflowY:"auto",overflowAnchor:"none"};function sn(se,ee){var z=se.prefixCls,oe=z===void 0?"rc-virtual-list":z,le=se.className,re=se.height,Ee=se.itemHeight,at=se.fullHeight,Ht=at===void 0?!0:at,Ye=se.style,tt=se.data,vt=se.children,Rt=se.itemKey,Dt=se.virtual,Jt=se.direction,Xt=se.scrollWidth,Zt=se.component,En=Zt===void 0?"div":Zt,cn=se.onScroll,wn=se.onVirtualScroll,kt=se.onVisibleChange,Pn=se.innerProps,Qt=se.extraRender,Pe=se.styles,Qe=se.showScrollBar,Lt=Qe===void 0?"optional":Qe,Nt=(0,Se.Z)(se,bt),we=xe.useCallback(function(Kt){return typeof Rt=="function"?Rt(Kt):Kt==null?void 0:Kt[Rt]},[Rt]),$e=pe(we,null,null),st=(0,be.Z)($e,4),Tt=st[0],zt=st[1],on=st[2],Dn=st[3],In=!!(Dt!==!1&&re&&Ee),dn=xe.useMemo(function(){return Object.values(on.maps).reduce(function(Kt,ln){return Kt+ln},0)},[on.id,on.maps]),xn=In&&tt&&(Math.max(Ee*tt.length,dn)>re||!!Xt),fn=Jt==="rtl",$n=nt()(oe,(0,Je.Z)({},"".concat(oe,"-rtl"),fn),le),gn=tt||un,hn=(0,xe.useRef)(),Yt=(0,xe.useRef)(),Mn=(0,xe.useRef)(),pn=(0,xe.useState)(0),On=(0,be.Z)(pn,2),Gn=On[0],Zn=On[1],Bn=(0,xe.useState)(0),Xn=(0,be.Z)(Bn,2),Nn=Xn[0],ar=Xn[1],qn=(0,xe.useState)(!1),Et=(0,be.Z)(qn,2),Ut=Et[0],zn=Et[1],nr=function(){zn(!0)},De=function(){zn(!1)},Ue={getKey:we};function ge(Kt){Zn(function(ln){var an;typeof Kt=="function"?an=Kt(ln):an=Kt;var Gt=Yn(an);return hn.current.scrollTop=Gt,Gt})}var Me=(0,xe.useRef)({start:0,end:gn.length}),ye=(0,xe.useRef)(),Le=Ot(gn,we),me=(0,be.Z)(Le,1),Be=me[0];ye.current=Be;var Ze=xe.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:gn.length-1,offset:void 0};if(!xn){var Kt;return{scrollHeight:((Kt=Yt.current)===null||Kt===void 0?void 0:Kt.offsetHeight)||0,start:0,end:gn.length-1,offset:void 0}}for(var ln=0,an,Gt,An,jn=gn.length,tn=0;tn<jn;tn+=1){var Vt=gn[tn],yn=we(Vt),Ln=on.get(yn),cr=ln+(Ln===void 0?Ee:Ln);cr>=Gn&&an===void 0&&(an=tn,Gt=ln),cr>Gn+re&&An===void 0&&(An=tn),ln=cr}return an===void 0&&(an=0,Gt=0,An=Math.ceil(re/Ee)),An===void 0&&(An=gn.length-1),An=Math.min(An+1,gn.length-1),{scrollHeight:ln,start:an,end:An,offset:Gt}},[xn,In,Gn,gn,Dn,re]),qe=Ze.scrollHeight,je=Ze.start,Oe=Ze.end,Te=Ze.offset;Me.current.start=je,Me.current.end=Oe,xe.useLayoutEffect(function(){var Kt=on.getRecord();if(Kt.size===1){var ln=Array.from(Kt.keys())[0],an=Kt.get(ln),Gt=gn[je];if(Gt&&an===void 0){var An=we(Gt);if(An===ln){var jn=on.get(ln),tn=jn-Ee;ge(function(Vt){return Vt+tn})}}}on.resetRecord()},[qe]);var Ge=xe.useState({width:0,height:re}),$t=(0,be.Z)(Ge,2),Ft=$t[0],Wt=$t[1],kn=function(ln){Wt({width:ln.offsetWidth,height:ln.offsetHeight})},Tn=(0,xe.useRef)(),Hn=(0,xe.useRef)(),Sn=xe.useMemo(function(){return dt(Ft.width,Xt)},[Ft.width,Xt]),mn=xe.useMemo(function(){return dt(Ft.height,qe)},[Ft.height,qe]),Cn=qe-re,Fn=(0,xe.useRef)(Cn);Fn.current=Cn;function Yn(Kt){var ln=Kt;return Number.isNaN(Fn.current)||(ln=Math.min(ln,Fn.current)),ln=Math.max(ln,0),ln}var Vn=Gn<=0,Kn=Gn>=Cn,vn=Nn<=0,er=Nn>=Xt,Wn=Ke(Vn,Kn,vn,er),dr=function(){return{x:fn?-Nn:Nn,y:Gn}},pr=(0,xe.useRef)(dr()),lr=(0,fe.zX)(function(Kt){if(wn){var ln=(0,ve.Z)((0,ve.Z)({},dr()),Kt);(pr.current.x!==ln.x||pr.current.y!==ln.y)&&(wn(ln),pr.current=ln)}});function ur(Kt,ln){var an=Kt;ln?((0,wt.flushSync)(function(){ar(an)}),lr()):ge(an)}function yr(Kt){var ln=Kt.currentTarget.scrollTop;ln!==Gn&&ge(ln),cn==null||cn(Kt),lr()}var sr=function(ln){var an=ln,Gt=Xt?Xt-Ft.width:0;return an=Math.max(an,0),an=Math.min(an,Gt),an},fr=(0,fe.zX)(function(Kt,ln){ln?((0,wt.flushSync)(function(){ar(function(an){var Gt=an+(fn?-Kt:Kt);return sr(Gt)})}),lr()):ge(function(an){var Gt=an+Kt;return Gt})}),Qn=Bt(In,Vn,Kn,vn,er,!!Xt,fr),mr=(0,be.Z)(Qn,2),br=mr[0],Hr=mr[1];ke(In,hn,function(Kt,ln,an,Gt){var An=Gt;return Wn(Kt,ln,an)?!1:!An||!An._virtualHandled?(An&&(An._virtualHandled=!0),br({preventDefault:function(){},deltaX:Kt?ln:0,deltaY:Kt?0:ln}),!0):!1}),Ce(xn,hn,function(Kt){ge(function(ln){return ln+Kt})}),(0,et.Z)(function(){function Kt(an){var Gt=Vn&&an.detail<0,An=Kn&&an.detail>0;In&&!Gt&&!An&&an.preventDefault()}var ln=hn.current;return ln.addEventListener("wheel",br,{passive:!1}),ln.addEventListener("DOMMouseScroll",Hr,{passive:!0}),ln.addEventListener("MozMousePixelScroll",Kt,{passive:!1}),function(){ln.removeEventListener("wheel",br),ln.removeEventListener("DOMMouseScroll",Hr),ln.removeEventListener("MozMousePixelScroll",Kt)}},[In,Vn,Kn]),(0,et.Z)(function(){if(Xt){var Kt=sr(Nn);ar(Kt),lr({x:Kt})}},[Ft.width,Xt]);var Er=function(){var ln,an;(ln=Tn.current)===null||ln===void 0||ln.delayHidden(),(an=Hn.current)===null||an===void 0||an.delayHidden()},Ar=mt(hn,gn,on,Ee,we,function(){return zt(!0)},ge,Er);xe.useImperativeHandle(ee,function(){return{nativeElement:Mn.current,getScrollInfo:dr,scrollTo:function(ln){function an(Gt){return Gt&&(0,ut.Z)(Gt)==="object"&&("left"in Gt||"top"in Gt)}an(ln)?(ln.left!==void 0&&ar(sr(ln.left)),Ar(ln.top)):Ar(ln)}}}),(0,et.Z)(function(){if(kt){var Kt=gn.slice(je,Oe+1);kt(Kt,gn)}},[je,Oe,gn]);var kr=Fe(gn,we,on,Ee),Pr=Qt==null?void 0:Qt({start:je,end:Oe,virtual:xn,offsetX:Nn,offsetY:Te,rtl:fn,getSize:kr}),ir=Ne(gn,je,Oe,Xt,Nn,Tt,vt,Ue),rr=null;re&&(rr=(0,ve.Z)((0,Je.Z)({},Ht?"height":"maxHeight",re),At),In&&(rr.overflowY="hidden",Xt&&(rr.overflowX="hidden"),Ut&&(rr.pointerEvents="none")));var Jn={};return fn&&(Jn.dir="rtl"),xe.createElement("div",(0,te.Z)({ref:Mn,style:(0,ve.Z)((0,ve.Z)({},Ye),{},{position:"relative"}),className:$n},Jn,Nt),xe.createElement(Ie.Z,{onResize:kn},xe.createElement(En,{className:"".concat(oe,"-holder"),style:rr,ref:hn,onScroll:yr,onMouseEnter:Er},xe.createElement(We,{prefixCls:oe,height:qe,offsetX:Nn,offsetY:Te,scrollWidth:Xt,onInnerResize:zt,ref:Yt,innerProps:Pn,rtl:fn,extra:Pr},ir))),xn&&qe>re&&xe.createElement(Mt,{ref:Tn,prefixCls:oe,scrollOffset:Gn,scrollRange:qe,rtl:fn,onScroll:ur,onStartMove:nr,onStopMove:De,spinSize:mn,containerSize:Ft.height,style:Pe==null?void 0:Pe.verticalScrollBar,thumbStyle:Pe==null?void 0:Pe.verticalScrollBarThumb,showScrollBar:Lt}),xn&&Xt>Ft.width&&xe.createElement(Mt,{ref:Hn,prefixCls:oe,scrollOffset:Nn,scrollRange:Xt,rtl:fn,onScroll:ur,onStartMove:nr,onStopMove:De,spinSize:Sn,containerSize:Ft.width,horizontal:!0,style:Pe==null?void 0:Pe.horizontalScrollBar,thumbStyle:Pe==null?void 0:Pe.horizontalScrollBarThumb,showScrollBar:Lt}))}var it=xe.forwardRef(sn);it.displayName="List";var _t=it,ht=_t},4977:function(rn){"use strict";rn.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(rn,jt,ie){"use strict";ie.d(jt,{Z:function(){return nt}});const te=Ie=>typeof Ie=="object"&&Ie!=null&&Ie.nodeType===1,ut=(Ie,fe)=>(!fe||Ie!=="hidden")&&Ie!=="visible"&&Ie!=="clip",ve=(Ie,fe)=>{if(Ie.clientHeight<Ie.scrollHeight||Ie.clientWidth<Ie.scrollWidth){const et=getComputedStyle(Ie,null);return ut(et.overflowY,fe)||ut(et.overflowX,fe)||(xe=>{const wt=(rt=>{if(!rt.ownerDocument||!rt.ownerDocument.defaultView)return null;try{return rt.ownerDocument.defaultView.frameElement}catch(We){return null}})(xe);return!!wt&&(wt.clientHeight<xe.scrollHeight||wt.clientWidth<xe.scrollWidth)})(Ie)}return!1},Je=(Ie,fe,et,xe,wt,rt,We,Ve)=>rt<Ie&&We>fe||rt>Ie&&We<fe?0:rt<=Ie&&Ve<=et||We>=fe&&Ve>=et?rt-Ie-xe:We>fe&&Ve<et||rt<Ie&&Ve>et?We-fe+wt:0,be=Ie=>{const fe=Ie.parentElement;return fe==null?Ie.getRootNode().host||null:fe},Se=(Ie,fe)=>{var et,xe,wt,rt;if(typeof document=="undefined")return[];const{scrollMode:We,block:Ve,inline:Ne,boundary:pt,skipOverflowHiddenElements:It}=fe,Ot=typeof pt=="function"?pt:Mt=>Mt!==pt;if(!te(Ie))throw new TypeError("Invalid target");const gt=document.scrollingElement||document.documentElement,ct=[];let yt=Ie;for(;te(yt)&&Ot(yt);){if(yt=be(yt),yt===gt){ct.push(yt);break}yt!=null&&yt===document.body&&ve(yt)&&!ve(document.documentElement)||yt!=null&&ve(yt,It)&&ct.push(yt)}const Ke=(xe=(et=window.visualViewport)==null?void 0:et.width)!=null?xe:innerWidth,Bt=(rt=(wt=window.visualViewport)==null?void 0:wt.height)!=null?rt:innerHeight,{scrollX:Fe,scrollY:_e}=window,{height:ft,width:Re,top:lt,right:ot,bottom:pe,left:St}=Ie.getBoundingClientRect(),{top:ke,right:Ct,bottom:qt,left:Ce}=(Mt=>{const ze=window.getComputedStyle(Mt);return{top:parseFloat(ze.scrollMarginTop)||0,right:parseFloat(ze.scrollMarginRight)||0,bottom:parseFloat(ze.scrollMarginBottom)||0,left:parseFloat(ze.scrollMarginLeft)||0}})(Ie);let de=Ve==="start"||Ve==="nearest"?lt-ke:Ve==="end"?pe+qt:lt+ft/2-ke+qt,mt=Ne==="center"?St+Re/2-Ce+Ct:Ne==="end"?ot+Ct:St-Ce;const en=[];for(let Mt=0;Mt<ct.length;Mt++){const ze=ct[Mt],{height:dt,width:bt,top:un,right:At,bottom:sn,left:it}=ze.getBoundingClientRect();if(We==="if-needed"&<>=0&&St>=0&&pe<=Bt&&ot<=Ke&&(ze===gt&&!ve(ze)||lt>=un&&pe<=sn&&St>=it&&ot<=At))return en;const _t=getComputedStyle(ze),ht=parseInt(_t.borderLeftWidth,10),se=parseInt(_t.borderTopWidth,10),ee=parseInt(_t.borderRightWidth,10),z=parseInt(_t.borderBottomWidth,10);let oe=0,le=0;const re="offsetWidth"in ze?ze.offsetWidth-ze.clientWidth-ht-ee:0,Ee="offsetHeight"in ze?ze.offsetHeight-ze.clientHeight-se-z:0,at="offsetWidth"in ze?ze.offsetWidth===0?0:bt/ze.offsetWidth:0,Ht="offsetHeight"in ze?ze.offsetHeight===0?0:dt/ze.offsetHeight:0;if(gt===ze)oe=Ve==="start"?de:Ve==="end"?de-Bt:Ve==="nearest"?Je(_e,_e+Bt,Bt,se,z,_e+de,_e+de+ft,ft):de-Bt/2,le=Ne==="start"?mt:Ne==="center"?mt-Ke/2:Ne==="end"?mt-Ke:Je(Fe,Fe+Ke,Ke,ht,ee,Fe+mt,Fe+mt+Re,Re),oe=Math.max(0,oe+_e),le=Math.max(0,le+Fe);else{oe=Ve==="start"?de-un-se:Ve==="end"?de-sn+z+Ee:Ve==="nearest"?Je(un,sn,dt,se,z+Ee,de,de+ft,ft):de-(un+dt/2)+Ee/2,le=Ne==="start"?mt-it-ht:Ne==="center"?mt-(it+bt/2)+re/2:Ne==="end"?mt-At+ee+re:Je(it,At,bt,ht,ee+re,mt,mt+Re,Re);const{scrollLeft:Ye,scrollTop:tt}=ze;oe=Ht===0?0:Math.max(0,Math.min(tt+oe/Ht,ze.scrollHeight-dt/Ht+Ee)),le=at===0?0:Math.max(0,Math.min(Ye+le/at,ze.scrollWidth-bt/at+re)),de+=tt-oe,mt+=Ye-le}en.push({el:ze,top:oe,left:le})}return en},He=Ie=>Ie===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(Ie)?Ie:{block:"start",inline:"nearest"};function nt(Ie,fe){if(!Ie.isConnected||!(wt=>{let rt=wt;for(;rt&&rt.parentNode;){if(rt.parentNode===document)return!0;rt=rt.parentNode instanceof ShadowRoot?rt.parentNode.host:rt.parentNode}return!1})(Ie))return;const et=(wt=>{const rt=window.getComputedStyle(wt);return{top:parseFloat(rt.scrollMarginTop)||0,right:parseFloat(rt.scrollMarginRight)||0,bottom:parseFloat(rt.scrollMarginBottom)||0,left:parseFloat(rt.scrollMarginLeft)||0}})(Ie);if((wt=>typeof wt=="object"&&typeof wt.behavior=="function")(fe))return fe.behavior(Se(Ie,fe));const xe=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:wt,top:rt,left:We}of Se(Ie,He(fe))){const Ve=rt-et.top+et.bottom,Ne=We-et.left+et.right;wt.scroll({top:Ve,left:Ne,behavior:xe})}}}}]);
|