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

3459 lines
1.6 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var Dl=Math.pow;var gc=(Ln,en,se)=>new Promise((ce,Ue)=>{var Fe=Le=>{try{ve(se.next(Le))}catch(Me){Ue(Me)}},it=Le=>{try{ve(se.throw(Le))}catch(Me){Ue(Me)}},ve=Le=>Le.done?ce(Le.value):Promise.resolve(Le.value).then(Fe,it);ve((se=se.apply(Ln,en)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[80508],{18299:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},84249:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},42922:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},25877:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},55304:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},63237:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},99569:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},22751:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},38308:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},17663:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},91034:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},72395:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},53978:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Me}});var ce=se(87462),Ue=se(67294),Fe={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"},it=Fe,ve=se(84089),Le=function(me,Pe){return Ue.createElement(ve.Z,(0,ce.Z)({},me,{ref:Pe,icon:it}))},Me=Ue.forwardRef(Le)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Ln,en){"use strict";en.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},61016: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 Ln={},en="5.0",se={},ce=null,Ue=!1,Fe=!1,it=null,ve=!1,Le=null,Me=null,Se=0;Se<arguments.length;Se++){var me=arguments[Se];if(me!==null)switch(typeof me){case"number":en=me.toFixed(1);break;case"string":me.match(new RegExp("^[0-9]\\.[0-9]+$"))?en=me:it=me;break;case"object":typeof me.is3D!="undefined"?ce=me:se=me;break;case"boolean":Ue=me,Fe=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},se.material_id!==void 0&&!Fe&&(Ue=!0)),it!==null&&se.id===void 0&&(se.id=it);var Pe="",st="",Re=!1,Et=null,ht=null,lt=null,et=!1,ke=null,vt=null,jt=null,tt=null,ut=null;se.height!==void 0&&(se.height=Math.round(se.height)),se.width!==void 0&&(se.width=Math.round(se.width));var Ee=function(ot){return parseFloat(ot)>4?parseFloat(ot):5};Ln.setHTML5Codebase=function(ot,ft){Me=ot,Zt(ot,ft)},Ln.setJavaCodebase=Ln.setJavaCodebaseVersion=Ln.isCompiledInstalled=Ln.setPreCompiledScriptPath=Ln.setPreCompiledResourcePath=function(){},Ln.setHTML5CodebaseVersion=function(ot,ft){var Jt=parseFloat(ot);if(Jt!==NaN&&Jt<5){console.log("The GeoGebra HTML5 codebase version "+Jt+" is deprecated. Using version latest instead.");return}Le=ot,De(ot,ft)},Ln.getHTML5CodebaseVersion=function(){return ht},Ln.getParameters=function(){return se},Ln.setFontsCSSURL=function(ot){tt=ot},Ln.setGiacJSURL=function(ot){},Ln.setJNLPFile=function(ot){Pe=ot},Ln.setJNLPBaseDir=function(ot){},Ln.inject=function(){function ot(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ft="auto",Jt=se.id,Bn,wn=!1,Nt=0;Nt<arguments.length;Nt++){var Xt=arguments[Nt];typeof Xt=="string"?(Xt=Xt.toLowerCase(),Xt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ft=Xt:Jt=arguments[Nt]):typeof Xt=="boolean"?wn=Xt:Xt instanceof HTMLElement&&(Bn=Xt)}Dn();function Dn(){if(!ve){setTimeout(Dn,200);return}ft=yn(ft);var Mn=Bn||document.getElementById(Jt);if(!Mn){console.log("possibly bug on ajax loading? ");return}if(Ln.removeExistingApplet(Mn,!1),se.width===void 0&&Mn.clientWidth&&(se.width=Mn.clientWidth),se.height===void 0&&Mn.clientHeight&&(se.height=Mn.clientHeight),!(se.width&&se.height)&&ft==="html5"&&(delete se.width,delete se.height),Et=ft,ft==="screenshot")$t(Mn,se);else{var Te=!1;se.hasOwnProperty("playButton")&&se.playButton||se.hasOwnProperty("clickToLoad")&&se.clickToLoad?Te=!0:se.hasOwnProperty("playButtonAutoDecide")&&se.playButtonAutoDecide&&(Te=(!we()||ot())&&je()),Te?(Et="screenshot",dt(Mn,se,wn,ft)):Vt(Mn,se,wn)}}};function we(){try{return window.self!==window.top}catch(ot){return!0}}function je(){return se.hasOwnProperty("screenshotGenerator")&&se.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Ln.getViews=function(){return ce},Ln.isJavaInstalled=function(){return!1};var Ye=function(ot){var ft=function(Nt){var Xt=JSON.parse(Nt),Dn=function(de){return de.type=="G"||de.type=="E"},Mn=Xt.elements?Xt.elements.filter(Dn)[0]:Xt;if(!Mn||!Mn.url){Jt();return}se.fileName=Mn.url,Lt(Mn.settings||{}),ce.is3D=!0;var Te="https://www.geogebra.org/images/";Ln.setPreviewImage(ke||Mn.previewUrl,Te+"GeoGebra_loading.png",Te+"applet_play.png"),ot()},Jt=function(){se.onError&&se.onError(),In("Error: Fetching material (id "+se.material_id+") failed.",se)},Bn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",wn="/materials/"+se.material_id+"?scope=basic";Ct("https://"+Bn+"/api/proxy.php?path="+encodeURIComponent(wn),ft,Jt)};function Lt(ot){var ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Jt){ot[Jt]=!!ot[Jt]}),ft.forEach(function(Jt){se[Jt]===void 0&&ot[Jt]!==void 0&&(se[Jt]=ot[Jt])}),se.showToolBarHelp===void 0&&(se.showToolBarHelp=se.showToolBar)}function Ct(ot,ft,Jt){var Bn=new XMLHttpRequest;Bn.open("GET",ot),Bn.onload=function(){ft(Bn.responseText)},Bn.onerror=Jt,Bn.send()}Ln.isHTML5Installed=function(){return!0},Ln.getLoadedAppletType=function(){return Et},Ln.setPreviewImage=function(ot,ft,Jt){ke=ot,vt=ft,jt=Jt},Ln.removeExistingApplet=function(ot,ft){var Jt;typeof ot=="string"&&(ot=document.getElementById(ot)),Et=null;var Bn=null;for(Jt=0;Jt<ot.childNodes.length;Jt++){var wn=ot.childNodes[Jt],Nt=wn.className;Nt==="applet_screenshot"?ft?(wn.style.display="block",Et="screenshot"):wn.style.display="none":Nt!=="applet_scaler prerender"&&(ot.removeChild(wn),Bn=Nt&&Nt.indexOf("appletParameters")!=-1?wn.id:null,Jt--)}var Xt=se.id!==void 0?se.id:Bn,Dn=window[Xt];Dn&&typeof Dn.getBase64=="function"&&(Dn.remove(),window[Xt]=null)},Ln.refreshHitPoints=function(){if(Ee(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ot=Ln.getAppletObject();return ot&&typeof ot.recalculateEnvironments=="function"?(ot.recalculateEnvironments(),!0):!1},Ln.startAnimation=function(){var ot=Ln.getAppletObject();return ot&&typeof ot.startAnimation=="function"?(ot.startAnimation(),!0):!1},Ln.stopAnimation=function(){var ot=Ln.getAppletObject();return ot&&typeof ot.stopAnimation=="function"?(ot.stopAnimation(),!0):!1},Ln.getAppletObject=function(){var ot=se.id!==void 0?se.id:"ggbApplet";return window[ot]},Ln.resize=function(){};var Bt=function(ot,ft,Jt){var Bn=document.createElement("param");Bn.setAttribute("name",ft),Bn.setAttribute("value",Jt),ot.appendChild(Bn)},at=function(ot){return ot&&ot!=="false"},Vt=function(ot,ft,Jt){Ee(ht)<=4.2&&(Jt=!0);var Bn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ht||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Bn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var wn=document.createElement("div");wn.classList.add("appletParameters","notranslate");var Nt=ft.width,Xt=ft.height;if(ft.disableAutoScale=ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ft.disableAutoScale,ft.width!==void 0)if(Ee(ht)<=4.4)at(ft.showToolBar)&&(ft.height-=7),at(ft.showAlgebraInput)&&(ft.height-=37),ft.width<605&&at(ft.showToolBar)&&(ft.width=605,Nt=605);else{var Dn=100;(at(ft.showToolBar)||at(ft.showMenuBar))&&(ft.hasOwnProperty("customToolBar")&&(ft.customToolbar=ft.customToolBar),Dn=at(ft.showMenuBar)?245:155),Nt<Dn&&(ft.width=Dn,Nt=Dn)}wn.style.border="none",wn.style.display="inline-block";for(var Mn in ft)ft.hasOwnProperty(Mn)&&Mn!=="appletOnLoad"&&wn.setAttribute("data-param-"+Mn,ft[Mn]);tt&&wn.setAttribute("data-param-fontscssurl",tt),Ln.resize=function(){GGBAppletUtils.responsiveResize(ot,ft)},window.addEventListener("resize",function(Gt){Ln.resize()});var Te=typeof ft.appletOnLoad=="function"?ft.appletOnLoad:function(){};if(!Jt&&ft.width!==void 0){ft.hasOwnProperty("showSplash")||wn.setAttribute("data-param-showSplash","false");var de=ot.querySelector(".applet_scaler.prerender"),le=de!==null;if(le)var pe=de.querySelector(".ggb_preview");else{var pe=En(Nt,Xt,ft.borderColor,!1);de=document.createElement("div"),de.className="applet_scaler",de.style.position="relative",de.style.display="block",de.style.width=Nt+"px",de.style.height=Xt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(de,"66%"),Ee(ht)>=5?(ft.appletOnLoad=function(Gt){var nr=ot.querySelector(".ggb_preview");nr&&nr.parentNode.removeChild(nr),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(de),window.GGBT_wsf_view&&$(window).trigger("resize"),Te(Gt)},le||de.appendChild(pe)):wn.appendChild(pe),de.appendChild(wn),le||ot.appendChild(de),setTimeout(function(){Ln.resize()},1)}else{var he=document.createElement("div");he.className="applet_scaler",he.style.position="relative",he.style.display="block",he.appendChild(wn),ot.appendChild(he),ft.appletOnLoad=function(Gt){Ln.resize(),Te(Gt)}}function oe(Gt,nr){nr&&typeof nr.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Gt,nr.appletOnLoad):renderGGBElement(Gt),In("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",nr)}function Ie(Gt,nr){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Gt,params:nr}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(gr){oe(gr.article,gr.params)}),html5AppletsToProcess=null)},Ee(ht)<5&&(Gt.className+=" geogebraweb")):oe(Gt,nr)}if(Bn){scriptLoadStarted=!0;for(var Je=0;Je<wn.childNodes.length;Je++){var _t=wn.childNodes[Je].tagName;_t==="TABLE"&&(wn.removeChild(wn.childNodes[Je]),Je--)}if(ggbHTML5LoadedScript!==null){var Kt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Kt!=null&&Kt.parentNode.removeChild(Kt)}var Ht=document.createElement("script"),Qt=function(){Ie(wn,ft)};Ht.src=st+lt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=ht,ggbHTML5LoadedScript=Ht.src,In("GeoGebra HTML5 codebase loaded: '"+st+"'.",ft),!Me&&(!Le||Le=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Qt()):st.requirejs?__webpack_require__.e(12).then(function(){var Gt=[__webpack_require__(12)];Qt.apply(null,Gt)}.bind(this)).catch(__webpack_require__.oe):(Ht.onload=Qt,ot.appendChild(Ht))}else Ie(wn,ft);ft.height=Xt,ft.width=Nt},$t=function(ot,ft,Jt){var Bn=En(ft.width,ft.height,ft.borderColor,Jt),wn=document.createElement("div");wn.style.position="relative",wn.style.display="block",wn.style.width=ft.width+"px",wn.style.height=ft.height+"px",wn.className="applet_screenshot applet_scaler"+(Jt?" applet_screenshot_play":""),wn.appendChild(Bn);var Nt=GGBAppletUtils.getScale(ft,ot,Jt);Jt?(ot.appendChild(on()),window.GGBT_wsf_view||(ot.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wn,"66%"),ot.appendChild(wn),Nt!==1&&!isNaN(Nt)&&(GGBAppletUtils.scaleElement(wn,Nt),wn.style.width=ft.width+"px",wn.style.height=ft.height+"px",wn.parentNode.style.width=ft.width*Nt+"px",wn.parentNode.style.height=ft.height*Nt+"px"),Ln.resize=function(){xn(ot,Bn,wn,Jt)},window.addEventListener("resize",function(Xt){Ln.resize()}),Ln.resize()};function xn(ot,ft,Jt,Bn){if(ot.contains(ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ot.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ot)}var wn=GGBAppletUtils.getScale(se,ot,Bn);Jt.parentNode!==null&&(!isNaN(wn)&&wn!==1?(GGBAppletUtils.scaleElement(Jt,wn),Jt.parentNode.style.width=se.width*wn+"px",Jt.parentNode.style.height=se.height*wn+"px"):(GGBAppletUtils.scaleElement(Jt,1),Jt.parentNode.style.width=se.width+"px",Jt.parentNode.style.height=se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ot),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Ln.onExitFullscreen=function(ot,ft){ft.appendChild(ot)};var dt=function(ot,ft,Jt,Bn){$t(ot,ft,!0);for(var wn=function(){var Dn=[];for(Xt=0;Xt<ot.childNodes.length;Xt++)Dn.push(ot.childNodes[Xt]);if(window.GGBT_wsf_view){var Mn=window.GGBT_wsf_view.renderFullScreen(ot,ft.id),Te=document.getElementById("fullscreencontainer"),de=jQuery(ot).find(".fullscreencontent");de.length>0?(Mn.remove(),de.attr("id","fullscreencontent").show(),jQuery(Te).append(de),window.dispatchEvent(new Event("resize"))):Vt(Mn,ft,!1),window.GGBT_wsf_view.launchFullScreen(Te)}else Et=Bn,Vt(ot,ft,!1);if(!window.GGBT_wsf_view)for(Xt=0;Xt<Dn.length;Xt++)ot.removeChild(Dn[Xt])},Nt=ot.getElementsByClassName("ggb_preview_play"),Xt=0;Xt<Nt.length;Xt++)Nt[Xt].addEventListener("click",wn,!1),Nt[Xt].addEventListener("ontouchstart",wn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ot),je()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},on=function(){var ot=document.createElement("div");if(ot.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ft='.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");}',Jt=document.createElement("style");Jt.styleSheet?Jt.styleSheet.cssText=ft:Jt.appendChild(document.createTextNode(ft)),document.getElementsByTagName("head")[0].appendChild(Jt)}return ot},En=function(ot,ft,Jt,Bn){var wn=document.createElement("div");wn.className="ggb_preview",wn.style.position="absolute",wn.style.zIndex="90",wn.style.width=ot-2+"px",wn.style.height=ft-2+"px",wn.style.top="0px",wn.style.left="0px",wn.style.overflow="hidden",wn.style.backgroundColor="white";var Nt="lightgrey";Jt!==void 0&&(Jt==="none"?Nt="transparent":Nt=Jt),wn.style.border="1px solid "+Nt;var Xt=document.createElement("img");if(Xt.style.position="relative",Xt.style.zIndex="1000",Xt.style.top="-1px",Xt.style.left="-1px",ke!==null&&Xt.setAttribute("src",ke),Xt.style.opacity=.7,vt!==null){var Dn,Mn,Te;if(!Bn){Dn=document.createElement("img"),Dn.style.position="absolute",Dn.style.zIndex="1001",Dn.style.opacity=1,Xt.style.opacity=.3,Mn=360,Mn>ot/4*3&&(Mn=ot/4*3),Te=Mn/5.8,Dn.setAttribute("src",vt),Dn.setAttribute("width",Mn),Dn.setAttribute("height",Te);var de=(ot-Mn)/2,le=(ft-Te)/2;Dn.style.left=de+"px",Dn.style.top=le+"px",wn.appendChild(Dn)}}return wn.appendChild(Xt),wn},yn=function(ot){return ot=ot.toLowerCase(),ot==="html5"||ot==="screenshot"?ot:"html5"},Ge=["web","webSimple","web3d","tablet","tablet3d","phone"],De=function(ot,ft){if(ht=ot,ft){Zt(ht,!0);return}var Jt=!Ue;if(Jt){var Bn=Ee(ht);!isNaN(Bn)&&Bn<4.4&&(Jt=!1)}var wn,Nt;window.location.protocol.substr(0,4)==="http"?wn=window.location.protocol:wn="http:";var Xt=ht.indexOf("//");Xt>0?Nt=ht:Xt===0?Nt=wn+ht:Nt="https://www.geogebra.org/apps/5.2.814.0/";for(var Dn in Ge)if(ht.slice(Ge[Dn].length*-1)===Ge[Dn]||ht.slice((Ge[Dn].length+1)*-1)===Ge[Dn]+"/"){Zt(Nt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Jt&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!at(se.showToolBar)&&!at(se.showMenuBar)&&!at(se.showAlgebraInput)&&!at(se.enableRightClick)&&(!se.appName||se.appName=="classic")?Nt+="webSimple/":Nt+="web3d/",Zt(Nt,!1)},Zt=function(ot,ft){if(ot.requirejs){st=ot;return}ot.slice(-1)!=="/"&&(ot+="/"),st=ot,ft===null&&(ft=ot.indexOf("http")===-1),Re=ft,lt="web.nocache.js",et=!1;var Jt=st.split("/");Jt.length>1&&(!ft&&Jt[Jt.length-2]==="webSimple"?(lt="webSimple.nocache.js",et=!0):Ge.indexOf(Jt[Jt.length-2])>=0&&(lt=Jt[Jt.length-2]+".nocache.js")),Jt=ot.split("/"),ht=Jt[Jt.length-3],ht.substr(0,4)==="test"?ht=ht.substr(4,1)+"."+ht.substr(5,1):(ht.substr(0,3)==="war"||ht.substr(0,4)==="beta")&&(ht="5.0");var Bn=parseFloat(ht);Bn!==NaN&&Bn<5&&ot.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Bn+" is deprecated. Using version latest instead."),De("5.0",ft))},In=function(ot,ft){window.console&&window.console.log&&(!ft||typeof ft.showLogging=="undefined"||ft.showLogging&&ft.showLogging!=="false")&&console.log(ot)};se.material_id!==void 0?Ye(fn):fn();function fn(){var ot=en;Le!==null?ot=Le:parseFloat(ot)<5&&(ot="5.0"),De(ot,!1),Me!==null&&Zt(Me,Re),ve=!0}return Ln},GGBAppletUtils=function(){"use strict";function Ln(){return window.GGBT_wsf_edit!==void 0}function en(ve,Le){Le!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+Le+","+Le+")",ve.style.webkitTransform="scale("+Le+","+Le+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function se(ve,Le,Me,Se,me,Pe){var st=null;if(Pe!=null&&Pe!="")for(var Re=ve.parentNode;Re!=null;)if((" "+Re.className+" ").indexOf(" "+Pe+" ")>-1){st=Re;break}else Re=Re.parentNode;var Et=0,ht=0,lt=0,et=0,ke=0,vt=0,jt=0;if(st)Et=st.offsetWidth,ht=Math.max(Se?st.offsetWidth:0,st.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Et=Math.min(window.innerWidth,document.documentElement.clientWidth),ht=Math.min(window.innerHeight,document.documentElement.clientHeight),lt=Et):(Et=window.innerWidth,ht=window.innerHeight,lt=window.innerWidth),ve){var tt=ve.getBoundingClientRect();tt.left>0&&tt.left<=Et&&(me===void 0||!me)&&(document.dir==="rtl"?(ke=Et-tt.width-tt.left,vt=lt<=480?10:30):(vt=tt.left,ke=lt<=480?10:30),et=vt+ke)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ut=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,jt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,jt=40)}}return ve&&((Me===void 0||!Me)&&Le>0&&Le+et<Et?Et=Le:Et-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(ht-=jt)),{width:Et,height:ht}}function ce(ve,Le,Me,Se,me){if(ve.isScreenshoGenerator)return 1;var Pe=Se!==void 0&&Se,st=ve.noScaleMargin!=null&&ve.noScaleMargin,Re=function(ut){return ut&&ut!=="false"},Et=Re(ve.autoHeight),ht=se(Le,ve.width,Me,Et,Pe&&window.GGBT_wsf_view||st,me),lt=parseInt(ht.width),et=ve.width,ke=ve.height;if(et===void 0){var vt=Le.querySelector(".appletParameters");vt&&(et=vt.offsetWidth,ke=vt.offsetHeight)}var jt=lt/et,tt=Pe?1:ht.height/ke;return Me!==void 0&&!Me&&(jt=Math.min(1,jt),tt=Math.min(1,tt)),Math.min(jt,tt)}function Ue(ve,Le,Me){var Se=1,me,Pe=!1;if(ve.hasOwnProperty("allowUpscale")&&(Pe=ve.allowUpscale),ve.hasOwnProperty("scale")&&(Se=parseFloat(ve.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(Pe=!0)),Le&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Pe=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))me=ce(ve,Le,Pe,Me,ve.scaleContainerClass);else return Se;return Pe&&(!ve.hasOwnProperty("scale")||Se===1)?me:Math.min(Se,me)}function Fe(ve){var Le=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=ve.getBoundingClientRect(),me=(Le-Se.width)/2,Pe=(Me-Se.height)/2;Pe<0&&(Pe=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(me<40?ve.style.left="40px":ve.style.left=me+"px",ve.style.top=Pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Pe<40?ve.style.top="40px":ve.style.top=Pe+"px",ve.style.left=me+"px")}function it(ve,Le){var Me=ve.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Le.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var Se=Ue(Le,ve);Ln()&&Me.setAttribute("data-param-scale",Se);for(var me=null,Pe=0;Pe<ve.childNodes.length;Pe++)if(ve.childNodes[Pe].className!==void 0&&ve.childNodes[Pe].className.match(/^applet_scaler/)){me=ve.childNodes[Pe];break}if(me!==null&&me.querySelector(".noscale")!==null)return;var st=Le.id!==void 0?Le.id:"ggbApplet",Re=window[st];(Re==null||!Re.recalculateEnvironments)&&me!==null&&!me.className.match(/fullscreen/)&&(me.parentNode.style.transform="",!isNaN(Se)&&Se!==1?(me.parentNode.style.width=Le.width*Se+"px",me.parentNode.style.height=Le.height*Se+"px",en(me,Se)):(en(me,1),me.parentNode.style.width=Le.width+"px",me.parentNode.style.height=Le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:it,isFlexibleWorksheetEditor:Ln,positionCenter:Fe,getScale:Ue,scaleElement:en}}();__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 Ln=n.location.search;return Ln.indexOf(J)!=-1||Ln.indexOf(K)!=-1}function q(Ln,en){}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(Ln){var en=s[L].bindings;s[L].bindings=function(){for(var se=en?en():{},ce=Ln[webModule.__softPermutationId],Ue=O;Ue<ce.length;Ue++){var Fe=ce[Ue];se[Fe[O]]=Fe[P]}return se}};var t;function u(){return v(),t}function v(){if(!t){var Ln=o.createElement(Q);if(Ln.id=L,Ln.style.cssText=R+S,Ln.tabIndex=-1,o.body.appendChild(Ln),t=Ln.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var en=document.compatMode==U?V:W;t.write(en+X),t.close()}}}function w(Ln){function en(ce){function Ue(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=Ue();if(Fe){ce();return}function it(){if(!Fe){if(!Ue())return;Fe=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,it,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,it,!1);var ve=setInterval(function(){it()},$)}function se(ce){var Ue=u(),Fe=Ue.body,it=Ue.createElement(_);it.language=ab,it.crossOrigin=W,it.src=ce,webModule.__errFn&&(it.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),Fe.appendChild(it)}en(function(){se(Ln)})}webModule.__startLoadingFragment=function(Ln){return C(Ln)},webModule.__installRunAsyncCode=function(Ln){var en=u(),se=en.body,ce=en.createElement(_);ce.language=ab,ce.text=Ln,se.appendChild(ce),se.removeChild(ce)};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(Ln){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ln){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ln){var en=c[Ln];return en==null?null:en},r=d,webModule.__errFn=e}function B(){function Ln(ve){var Le=ve.lastIndexOf(rb);Le==-1&&(Le=ve.length);var Me=ve.indexOf(sb);Me==-1&&(Me=ve.length);var Se=ve.lastIndexOf(tb,Math.min(Me,Le));return Se>=O?ve.substring(O,Se+P):W}function en(ve){if(!ve.match(/^\w+:\/\//)){var Le=o.createElement(ub);Le.src=ve+vb,ve=Ln(Le.src)}return ve}function se(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function ce(){for(var ve=o.getElementsByTagName(_),Le=O;Le<ve.length;++Le)if(ve[Le].src.indexOf(xb)!=-1)return Ln(ve[Le].src);return W}function Ue(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Fe(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var it=se();return it==W&&(it=ce()),it==W&&(it=Ue()),it==W&&Fe()&&(it=Ln(o.location.href)),it=en(it),it}function C(Ln){return Ln.match(/^\//)||Ln.match(/^[a-zA-Z]+:\/\//)?Ln:webModule.__moduleBase+Ln}function D(){var Ln=[],en=O,se=[],ce=[];function Ue(ve){var Le=ce[ve](),Me=se[ve];if(Le in Me)return Le;var Se=[];for(var me in Me)Se[Me[me]]=me;throw r&&r(ve,Se,Le),null}if(__gwt_isKnownPropertyValue=function(ve,Le){return Le in se[ve]},webModule.__getPropMap=function(){var ve={};for(var Le in se)se.hasOwnProperty(Le)&&(ve[Le]=Ue(Le));return ve},webModule.__computePropValue=Ue,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var it=Fe.indexOf(Db);it!=-1&&(en=parseInt(Fe.substring(it+P),$),Fe=Fe.substring(O,it))}catch(ve){}return webModule.__softPermutationId=en,C(Fe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/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})()},15476:function(Ln,en,se){"use strict";se.d(en,{Ax:function(){return it},Ds:function(){return ve},KI:function(){return Me},SI:function(){return Fe},f1:function(){return Ue}});var ce=se(11320);function Ue(Se){let me=!0;if(Se.length>0){for(let Pe=0;Pe<Se.length;Pe++)if(Se[Pe].compile_success==0||!Se[Pe].compile_success){me=!1;break}}else me=!1;return me}function Fe(Se,me=""){let Pe=[];for(let st=0;st<Se.length;st++){let Re=Se[st],Et=me?`${me}/${Re.name}`:`${Re.name}`;Pe.push({title:Re.name,type:Re.type,isLeaf:Re.type!=="tree",key:Et})}return Pe}function it(Se,me,Pe){for(let st=0;st<Se.length;st++){let Re=Se[st];if(Re.key===me){Re.children=Pe;break}Re.children&&it(Re.children,me,Pe)}return Se}function ve(Se,me,Pe){let st;return function(){let Re=this,Et=arguments,ht=function(){st=null,Pe||Se.apply(Re,Et)},lt=Pe&&!st;clearTimeout(st),st=setTimeout(ht,me),lt&&Se.apply(Re,Et)}}const Le=!0,Me=ce.Z.API_SERVER},63205:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return st}});var ce=se(67294),Ue={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=se(94184),it=se.n(Fe),ve=se(57953),Le=se(15979),Me=se(33170),Se=se(28706),me=(Re,Et,ht)=>new Promise((lt,et)=>{var ke=tt=>{try{jt(ht.next(tt))}catch(ut){et(ut)}},vt=tt=>{try{jt(ht.throw(tt))}catch(ut){et(ut)}},jt=tt=>tt.done?lt(tt.value):Promise.resolve(tt.value).then(ke,vt);jt((ht=ht.apply(Re,Et)).next())}),st=({data:Re,className:Et,fullWidth:ht,style:lt={},onClose:et,onOk:ke,showFullTools:vt,noAssociationId:jt})=>{const tt=(0,ce.useRef)(null),ut=(0,ce.useRef)(null),Ee=(0,ce.useRef)(null),we=(0,ce.useRef)(null),[je,Ye]=(0,ce.useState)(!1),[Lt,Ct]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>{Ee.current||(Ee.current=document.createElement("style"),document.head.appendChild(Ee.current)),Re!=null&&Re.visible?(document.body.setAttribute("data-custom","y-hidden"),Ee.current.innerHTML=" html { overflow-y: hidden; }",Re!=null&&Re.src&&Bt()):(document.body.removeAttribute("data-custom"),Ee.current&&(document.head.removeChild(Ee.current),Ee.current=null))},[Re==null?void 0:Re.visible]);const Bt=()=>me(void 0,null,function*(){Ye(!0),Ct("\u6B63\u5728\u52A0\u8F7D\u4E2D");const dt=yield(0,Se.ZJ)(Re==null?void 0:Re.src);tt.current.src="",tt.current.src=dt,tt.current.onload=function(){xn()},Ye(!1),Ct("")}),at=()=>{document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",et()},Vt=dt=>me(void 0,null,function*(){Ye(!0),Ct("\u6B63\u5728\u4FDD\u5B58\u4E2D");const on=yield(0,Me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Re.title,file:dt.dataUrl}});on!=null&&on.id&&!jt?(yield(0,Me.ZP)(`/api/attachments/${Re.id}/add_subitem.json`,{method:"post",body:{subitem_id:on==null?void 0:on.id,settings:JSON.stringify(dt.state)}})).status===0&&ke():on!=null&&on.id&&ke(on),document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",Ye(!1),Ct("")}),$t=()=>{const dt=document.querySelector('a[href="https://markerjs.com/"]');dt&&dt.parentNode&&(dt.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(En=>{const yn=document.querySelector(En.name);yn&&yn.setAttribute("title",En.title)})},xn=()=>{ut.current=new Le.hP(tt.current),ut.current.targetRoot=we.current,ut.current.addEventListener("render",Vt),ut.current.addEventListener("beforeclose",at),vt&&(ut.current.availableMarkerTypes=ut.current.ALL_MARKER_TYPES,ut.current.uiStyleSettings.redoButtonVisible=!0,ut.current.uiStyleSettings.notesButtonVisible=!0,ut.current.uiStyleSettings.zoomButtonVisible=!0,ut.current.uiStyleSettings.zoomOutButtonVisible=!0,ut.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ut.current.uiStyleSettings,ut.current.show(),Re!=null&&Re.snapshotData&&ut.current.restoreState(Re.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$t()},300)};return ce.createElement(ce.Fragment,null,(Re==null?void 0:Re.visible)&&ce.createElement(ve.Z,{spinning:je,tip:Lt,style:{position:"absolute"}},ce.createElement("div",{ref:we,className:it()(Ue.imageDimensions,Et,ht?Ue.fullWidth:""),style:lt},ce.createElement("img",{className:Ue.img,ref:tt}))))}},36527:function(Ln,en,se){"use strict";var ce=se(67294),Ue=se(71230),Fe=se(15746),it=se(66368),ve=se(71577),Le=se(35598),Me=se(71736),Se=se(84279),me=se(67294);const Pe=(0,ce.forwardRef)(({callback:st,showSaveButton:Re,value:Et=""},ht)=>{const lt=(0,ce.useRef)(),et=[{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 "}]}]}],ke=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],vt=ut=>{lt.current.setValue(lt.current.getValue()+" "+ut.value+" ")},jt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:me.createElement(Ue.Z,{className:Me.Z.lists,gutter:[10,10]},et.map((ut,Ee)=>me.createElement(Fe.Z,{flex:"110px",className:Me.Z.item},me.createElement("div",null,me.createElement(Le.Z,{value:`$$${ut.value}$$`}),ut.name),me.createElement("div",{className:Me.Z.children},ut.children.map((we,je)=>me.createElement("div",{key:je},me.createElement("h1",null,we.name),me.createElement(Ue.Z,{gutter:[10,10]},we.data.map((Ye,Lt)=>me.createElement(Fe.Z,{key:Lt,onClick:()=>vt(Ye),className:Me.Z.diamond},me.createElement(Le.Z,{value:"`$$"+Ye.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:me.createElement(Ue.Z,{className:Me.Z.lists,gutter:[10,10]},ke.map((ut,Ee)=>me.createElement(Fe.Z,{flex:"110px",className:Me.Z.item},me.createElement("div",null,me.createElement(Le.Z,{value:"`$$"+ut.value+"$$`"}),ut.name),me.createElement("div",{className:Me.Z.children},ut.children.map((we,je)=>me.createElement("div",{key:je},we.name&&me.createElement("h1",null,we.name),me.createElement(Ue.Z,{gutter:[10,10]},we.data.map((Ye,Lt)=>me.createElement(Fe.Z,{key:Lt,onClick:()=>vt(Ye),className:Me.Z.diamond},me.createElement(Le.Z,{value:"`$$"+Ye.value+"$$`"}))))))))))}],tt=()=>{var ut=document.createElement("div");ut.innerHTML=lt.current.getValue();var Ee=ut.innerText;return st&&st(Ee),Ee};return(0,ce.useImperativeHandle)(ht,()=>({getData:tt})),me.createElement("div",{className:Me.Z.mathWrap},me.createElement(it.default,{defaultActiveKey:"1",items:jt}),me.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:lt,style:{width:800,marginTop:30,fontSize:18}},Et||""),Re&&me.createElement("div",{className:Me.Z.button},me.createElement(ve.ZP,{size:"large",onClick:tt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});en.Z=Pe},71865:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return it}});var ce=se(67294),Ue=se(33054),Fe=se(99398),it=()=>{const[ve,Le]=(0,ce.useState)(""),[Me,Se]=(0,ce.useState)(0);let[me,Pe]=(0,ce.useState)(),[st,Re]=(0,ce.useState)();const[Et,ht]=(0,ce.useState)(!1),lt=(0,ce.useRef)("");(0,ce.useEffect)(()=>Ue.Z.subscribe("preview-image",Lt=>{Le(Lt),console.log(we.current),document.body.style.overflow="hidden"}),[]),(0,ce.useEffect)(()=>(document.addEventListener("keydown",et),()=>{document.removeEventListener("keydown",et)}),[]),(0,ce.useEffect)(()=>{lt.current=ve},[ve]);function et(Ye){Ye.keyCode==27&&lt.current&&ke()}function ke(){document.body.style.overflow="auto",Pe(void 0),Re(void 0),Se(0),Le("")}function vt(){Se(Me+90)}function jt(){me=we.current.width*1.1,st=we.current.height*1.1,Re(st),Pe(me)}function tt(){me=we.current.width/1.1,st=we.current.height/1.1,Re(st),Pe(me)}const ut=(0,ce.useRef)(),Ee=(0,ce.useRef)(),we=(0,ce.useRef)(),je=Ye=>{(Ye.nativeEvent.target===ut.current||Ye.nativeEvent.target===Ee.current)&&ke()};return ce.createElement(ce.Fragment,null,ve?ce.createElement("div",null,ce.createElement("div",{className:"preview-wrp-group",ref:Ee},ce.createElement(Fe.Z,{className:"image-preview",src:ve,style:{display:"none"},preview:{visible:!0,src:ve,movable:!1,onVisibleChange:Ye=>{Le("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},57444:function(Ln,en,se){"use strict";se.d(en,{h:function(){return ut}});var ce=se(67294),Ue=se(11713),Fe=se(22150),it=se(71577),ve=se(4631),Le=se.n(ve),Me=se(71749),Se=se(30483),me=Object.defineProperty,Pe=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(Ee,we,je)=>we in Ee?me(Ee,we,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ee[we]=je,et=(Ee,we)=>{for(var je in we||(we={}))Et.call(we,je)&&lt(Ee,je,we[je]);if(Re)for(var je of Re(we))ht.call(we,je)&&lt(Ee,je,we[je]);return Ee},ke=(Ee,we)=>Pe(Ee,st(we));const vt=Ue.default.Option,jt={labelCol:{span:4},wrapperCol:{span:20}},tt={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"]};en.Z=({callback:Ee,onCancel:we})=>{const[je,Ye]=(0,ce.useState)("python");function Lt(Bt){Ye(tt[Bt][1])}function Ct(Bt){Ee(Bt)}return ce.createElement(Fe.default,ke(et({},jt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ct,style:{width:500}}),ce.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(Ue.default,{getPopupContainer:Bt=>Bt.parentNode,onChange:Lt},Object.keys(tt).map(Bt=>ce.createElement(vt,{key:Bt,value:Bt},tt[Bt][0])))),ce.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(ut,{mode:je})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(it.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(it.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))};function ut({value:Ee,onChange:we,mode:je,options:Ye={}}){const Lt=(0,ce.useRef)(),[Ct,Bt]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if(Ct){let at=function(Vt){const $t=Vt.getValue();we&&we($t)};return Ct.on("change",at),()=>{Ct.off("change",at)}}},[Ct,we]),(0,ce.useEffect)(()=>{Ct&&Ct.setOption("mode",je)},[Ct,je]),(0,ce.useEffect)(()=>{Ct&&(Ee!==Ct.getValue()||Ee==="")&&setTimeout(()=>{Ct.setValue(Ee||"")},300)},[Ct,Ee]),(0,ce.useEffect)(()=>{if(Lt.current&&!Ct){const at=Le().fromTextArea(Lt.current,et({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ye));Bt(at)}},[Lt.current,Ct]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:Lt}))}},91304:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Vn}});var ce=se(67294),Ue=se(4631),Fe=se.n(Ue),it=se(91033),ve=se(71749),Le=se(57341),Me=se(82801),Se=se(88386),me=se(49047),Pe=se(80785),st=se(35598),Re=({value:Nn="",className:Qe,showTextOnly:rt,showLines:pt,style:Rt={}})=>{const We=(0,ce.useMemo)(()=>"",[Nn]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:We}}))},Et=se(67294),ht=Object.defineProperty,lt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,tt=(Nn,Qe,rt)=>Qe in Nn?ht(Nn,Qe,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Nn[Qe]=rt,ut=(Nn,Qe)=>{for(var rt in Qe||(Qe={}))vt.call(Qe,rt)&&tt(Nn,rt,Qe[rt]);if(ke)for(var rt of ke(Qe))jt.call(Qe,rt)&&tt(Nn,rt,Qe[rt]);return Nn},Ee=(Nn,Qe)=>lt(Nn,et(Qe));let we=[{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\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",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 je({onActionCallback:Nn,title:Qe,icon:rt,actionName:pt,className:Rt="",children:We}){function mt(){Nn(pt)}return Et.createElement("a",{title:Qe,className:Rt,onClick:mt},Et.createElement("i",{className:`${rt}`}),We)}var Ye=({watch:Nn,showNullButton:Qe,showNullProgramButton:rt,onActionCallback:pt,fullScreen:Rt,insertTemp:We,hidetoolBar:mt,extraUse:Dt})=>{const gt=[...we,{title:`${Nn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Nn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Et.createElement("ul",{className:"markdown-toolbar-container"},!mt&&gt.map((qt,Yt)=>Et.createElement("li",{key:Yt},qt.actionName?Et.createElement(je,Ee(ut({},qt),{onActionCallback:pt})):Et.createElement("span",{className:"v-line"}))),Qe?Et.createElement("li",null,Et.createElement(je,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pt},Et.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,rt?Et.createElement(Et.Fragment,null,Et.createElement("li",null,Et.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:pt},Et.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Et.createElement("li",null,Et.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:pt},Et.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,We&&Et.createElement("li",null,Et.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${We}`,onActionCallback:pt},Et.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Dt&&Et.createElement("li",null,Dt),Et.createElement("li",{className:"btn-full-screen"},Et.createElement(je,{icon:`${Rt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Rt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pt})))},Lt=se(76621),Ct=se(22150),Bt=se(69677),at=se(71577),Vt=Object.defineProperty,$t=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,yn=(Nn,Qe,rt)=>Qe in Nn?Vt(Nn,Qe,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Nn[Qe]=rt,Ge=(Nn,Qe)=>{for(var rt in Qe||(Qe={}))on.call(Qe,rt)&&yn(Nn,rt,Qe[rt]);if(dt)for(var rt of dt(Qe))En.call(Qe,rt)&&yn(Nn,rt,Qe[rt]);return Nn},De=(Nn,Qe)=>$t(Nn,xn(Qe));const Zt={labelCol:{span:4},wrapperCol:{span:20}};var In=({callback:Nn,onCancel:Qe})=>{function rt(pt){Nn(pt)}return ce.createElement(Ct.default,De(Ge({},Zt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rt,style:{width:500}}),ce.createElement(Ct.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(Bt.default,null)),ce.createElement(Ct.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(Bt.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(at.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(at.ZP,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))},fn=se(57444),ot=se(70859),ft=se(14446),Jt=se(71230),Bn=se(63205),wn=se(67294),Nt=({callback:Nn,onCancel:Qe})=>{const rt=document.createElement("canvas"),pt=rt.getContext("2d");rt.width=1e3,rt.height=800,pt.fillStyle="#ffffff",pt.fillRect(0,0,rt.width,rt.height);const Rt=rt.toDataURL("image/png");return wn.createElement(ft.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},wn.createElement(Jt.Z,{style:{height:"100vh"}},wn.createElement(Bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Rt,visible:!0,title:String(Date.now())},onOk:We=>{Nn({src:We.url})},onClose:Qe})))},Xt=se(72565),Dn=se(15746),Mn=se(2453),Te={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},de=se(67294),pe=(0,ce.forwardRef)(({onCancel:Nn,editImgId:Qe,callback:rt},pt)=>{let Rt=(0,ce.useRef)(),We=(0,ce.useRef)(),mt=(0,ce.useRef)(),Dt=(0,ce.useRef)(!1);const gt=(0,ce.useRef)(!1);console.log("ref:",pt);const[qt,Yt]=(0,ce.useState)(0),[Rn,br]=(0,ce.useState)("100vh");return(0,ce.useEffect)(()=>{Yt(1);try{indexedDB.databases().then(Wn=>{Wn.forEach(Jn=>indexedDB.deleteDatabase(Jn.name))})}catch(Wn){}},[]),(0,ce.useImperativeHandle)(pt,()=>({setHeight:br})),de.createElement("div",{ref:gt,className:"body-overflow-initial"},de.createElement(Xt.Z,{width:"100vw",height:Rn,footer:null,closable:!0,placement:"bottom",open:!!qt,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Te.drawerWrap}`,onClose:()=>{window.saveDrawData(Wn=>{rt({src:`/api/attachments/${Wn}`,id:Wn})})},title:de.createElement(Jt.Z,{align:"middle"},de.createElement(Dn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),de.createElement(Dn.Z,{onClick:()=>{br(Rn==="60px"?"100vh":"60px")}},de.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),de.createElement(Dn.Z,{onClick:()=>{window.saveDrawData(Wn=>{if(Wn===null){Mn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Mn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),rt({src:`/api/attachments/${Wn}`,id:Wn,disabledClose:!0})})}},de.createElement(at.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},de.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${Qe||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:We})))}),he=se(11320),oe=se(78045),Ie=se(31795);const Je=oe.ZP.Group,_t={margin:"0 8px"};var Kt=({callback:Nn,onCancel:Qe})=>{function rt(pt){Nn(pt)}return ce.createElement(Ct.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rt},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:_t},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:_t},"\u884C\u6570"),ce.createElement(Ct.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(Ie.Z,null)),ce.createElement("span",{style:_t},"\u5217\u6570"),ce.createElement(Ct.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(Ie.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:_t},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement(Ct.default.Item,{name:"align"},ce.createElement(Je,null,ce.createElement(oe.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(oe.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(oe.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(oe.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(at.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(at.ZP,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))},Ht=se(47897),Qt=se(61016),Gt=se.n(Qt),gr=(0,ce.forwardRef)(({use3d:Nn,width:Qe,height:rt,callback:pt,showSaveButton:Rt},We)=>{const mt=(0,ce.useRef)(),Dt=(0,ce.useRef)(),[gt,qt]=(0,ce.useState)(!1),Yt=(0,ce.useRef)({id:mt,appName:"graphing",width:Qe||1e3,height:rt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{Dt.current=new(Gt())(Yt.current,!0),window.onload=function(){Dt.current.inject("applet_container")}},[]);const Rn=()=>{var br=window.ggbApplet.getPNGBase64(1,!0,72);return pt&&pt(br),br};return(0,ce.useEffect)(()=>{Yt.current.appName=gt?"3D":"graphing",Dt.current.inject("applet_container")},[gt]),(0,ce.useEffect)(()=>{qt(Nn)},[Nn]),(0,ce.useImperativeHandle)(We,()=>({getImgData:Rn})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:mt}),ce.createElement(Jt.Z,{align:"middle"},ce.createElement(Dn.Z,{flex:1},ce.createElement(Ht.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:gt,onChange:br=>qt(br)})),ce.createElement(Dn.Z,null,ce.createElement(at.ZP,{size:"large",onClick:Rn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ut=se(36527),pn=se(25934);const ir="link",Lr="upload-image",$n="add-flowchart",Cr="draw-image",Ii="add-flowchart",li="code-block",ci="add-table",Jr="------------",Di={default:Jr,left:`:${Jr}`,center:`:${Jr}:`,right:`${Jr}:`};var Ei=se(99914),Pi=(Nn,Qe,rt)=>new Promise((pt,Rt)=>{var We=gt=>{try{Dt(rt.next(gt))}catch(qt){Rt(qt)}},mt=gt=>{try{Dt(rt.throw(gt))}catch(qt){Rt(qt)}},Dt=gt=>gt.done?pt(gt.value):Promise.resolve(gt.value).then(We,mt);Dt((rt=rt.apply(Nn,Qe)).next())});function xr(){}let Pr=0;const Gi=1e4,ma="\u2581",ba="@\u2581\u2581@",va="@\u2581@",Vi=`
**\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`,At=["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 On(Nn){return/^\d+$/.test(Nn)?`${Nn}px`:Nn}const zt=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",rn={[zt+"-B"]:"bold",[zt+"-I"]:"italic"},cn={[ir]:"\u6DFB\u52A0\u94FE\u63A5",[li]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Lr]:"\u6DFB\u52A0\u56FE\u7247",[Cr]:"\u6DFB\u52A0\u753B\u56FE",[$n]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ci]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Vn=({defaultValue:Nn="",onChange:Qe,width:rt="100%",height:pt=400,miniToolbar:Rt=!1,isFocus:We=!1,watch:mt,insertTemp:Dt,mode:gt="markdown",id:qt="markdown-editor-id",showResizeBar:Yt=!1,noStorage:Rn=!1,showNullButton:br=!1,showNullProgramButton:Wn=!1,hidetoolBar:Jn=!1,fullScreen:or=!1,onBlur:lr,onCMBeforeChange:Rr,onFullScreen:bn,className:An="",disablePaste:hi=!1,disabled:xi=!1,disabledFill:ai=!1,placeholder:sr="",values:vi="",extraUse:ur,onAddBlank:Qr})=>{const[kn,ia]=(0,ce.useState)(null),[zi,Ma]=(0,ce.useState)(Nn),[Ji,Zi]=(0,ce.useState)(mt),[xa,aa]=(0,ce.useState)(or),[Ni,fa]=(0,ce.useState)(""),[Ta,ga]=(0,ce.useState)(0),[Hi,Ia]=(0,ce.useState)(pt),[Oa,wa]=(0,ce.useState)(!1),_i=(0,ce.useRef)((0,pn.Z)()),Mt=(0,ce.useRef)(!1),wt=(0,ce.useRef)(),[tn,vn]=(0,ce.useState)(0),[Kn,Ar]=(0,ce.useState)(0),Tr=(0,ce.useRef)(),Hr=(0,ce.useRef)(),Xr=(0,ce.useRef)(),Zr=(0,ce.useRef)(),wi=(0,ce.useRef)(),ki=(0,ce.useRef)(),Ri=()=>Pi(void 0,null,function*(){var Cn;const gn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:_i.current}});(Cn=gn==null?void 0:gn.attachments)!=null&&Cn.length&&(console.log("cm:",kn,Tr),gn.attachments.map(Pn=>{Pn.content_type.indexOf("image")>-1?kn.replaceSelection(`![,](/api/attachments/${Pn.id}?type=${Pn.content_type})`):Pn.content_type.indexOf("video")>-1?kn.replaceSelection(`<video width="100%" controls src="${he.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Pn.content_type.indexOf("pdf")>-1?kn.replaceSelection(`<a href="${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type}&disposition=inline" target="_blank">${Pn.name}</a>`):kn.replaceSelection(`[${Pn.name}](${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type})`)}))});(0,ce.useEffect)(()=>{const Cn=window.scrollY||window.pageYOffset;Ma(vi),kn==null||kn.setValue(vi),window.scrollTo(0,Cn)},[vi]),(0,ce.useEffect)(()=>{bn==null||bn(xa)},[xa]),(0,ce.useEffect)(()=>{if(Tr.current){let Cn=function(Pn,Fn){var dr;if(hi){Fn.preventDefault();return}const Xn=Fn.clipboardData;if(Xn){const Zn=Xn.types.toString(),Qn=Xn.items;if(Zn==="Files"||Xn.types.indexOf("Files")>-1){if(Fn.preventDefault(),gt=="stex")return;try{let Ze=Qn[1];((dr=Qn[0])==null?void 0:dr.kind)==="file"&&(Ze=Qn[0]);const ze=Ze.getAsFile(),xe=ze.name.split(".").pop();(0,ot.I)(ze,Ae=>{var qe,Xe,St;Ae.id?((qe=ze==null?void 0:ze.type)==null?void 0:qe.indexOf("image"))>-1?gn.replaceSelection(`<img width="100%" src="/api/attachments/${Ae.id}?type=${Ae.content_type})" alt="" />`):((Xe=ze==null?void 0:ze.type)==null?void 0:Xe.indexOf("video"))>-1?gn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ae.id}"></video>`):((St=ze==null?void 0:ze.type)==null?void 0:St.indexOf("pdf"))>-1?gn.replaceSelection(`<a href="/api/attachments/${Ae.id}?type=${ze.type}&disposition=inline" target="_blank">${ze.name}</a>`):At.includes(xe)?gn.replaceSelection(`<a href="/api/attachments/${Ae.id}?type=office&disposition=inline" target="_blank">${ze.name}</a>`):gn.replaceSelection(`[${ze.name}](/api/attachments/${Ae.id}?type=${Ae.content_type})`):(Ae==null?void 0:Ae.status)===401&&(Mn.ZP.warning((Ae==null?void 0:Ae.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(Ze){Mn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const gn=Fe().fromTextArea(Tr.current,{mode:gt,lineNumbers:!Rt,lineWrapping:!0,value:Nn,autoCloseTags:!Wn,autoCloseBrackets:!0});return gn.on("keyup",function(Pn,Fn){Fn.keyCode===8&&(Pn.getValue()==""?gn.setOption("placeholder",sr):gn.setOption("placeholder",null))}),gn.on("keydown",function(Pn,Fn){if(Fn.keyCode===8){var dr=Wi(Pn);dr&&Fn.preventDefault()}}),We&&gn.focus(),gn.on("paste",Cn),gn.on("dragleave",function(Pn,Fn){Hr.current.classList.remove("mouse-hover-md")}),xi&&gn.on("beforeChange",function(Pn,Fn){(Fn.origin==="paste"||Fn.origin==="+input")&&Fn.cancel()}),ia(gn),()=>{gn.off("paste",Cn)}}},[]);const oa=(0,ce.useCallback)(()=>{if(Hr.current)try{}catch(Cn){console.log(Cn,"---- to set md editor body height")}},[Hi,Hr,xa]);(0,ce.useEffect)(()=>{function Cn(){let gn=new it.Z(Pn=>{for(let Fn of Pn)(Fn.target.offsetHeight>0||Fn.target.offsetWidth>0)&&(oa(),kn.setSize("100%","100%"),kn.refresh())});return gn.observe(Tr.current.parentElement),gn}if(kn){const gn=Cn();return()=>{var Pn,Fn;(Pn=Tr.current)!=null&&Pn.parentElement&&gn.unobserve((Fn=Tr.current)==null?void 0:Fn.parentElement)}}},[kn,oa]),(0,ce.useEffect)(()=>{if(kn){let Cn=[];for(const[gn,Pn]of Object.entries(rn)){let Fn={[gn]:()=>{Xi(Pn)}};Cn.push(Fn),kn.addKeyMap(Fn)}return wt.current=setInterval(()=>{Mt.current&&Ri()},4e3),()=>{clearInterval(wt.current);for(let gn of Cn)kn.removeKeyMap(gn)}}},[kn]),(0,ce.useEffect)(()=>{or!==xa&&aa(or)},[or]),(0,Ei.Z)(()=>{if(!Rn&&Ta>0){let Cn=new Date().getTime(),gn=window.sessionStorage.getItem(qt);Cn>=Ta+Gi&&(!gn||gn!==zi)&&(window.sessionStorage.setItem(qt,zi),wa(!0))}},Gi),(0,ce.useEffect)(()=>{Zi(mt)},[kn,mt]),(0,ce.useEffect)(()=>{kn&&We&&kn.focus()},[kn,We]),(0,ce.useEffect)(()=>{if(Ji&&kn){let Cn=function(Pn){let Fn=Pn.target;if(Zr.current){let dr=Fn.scrollTop/Fn.scrollHeight;Zr.current.scrollTop=Zr.current.scrollHeight*dr}};const gn=kn.getScrollerElement();return gn.addEventListener("scroll",Cn),()=>{gn.removeEventListener("scroll",Cn)}}},[kn,Ji]),(0,ce.useEffect)(()=>{if(kn&&Rr){let Cn=function(gn,Pn){Rr(gn,Pn)};return kn.on("beforeChange",Cn),()=>{kn.off("beforeChange",Cn)}}},[kn,Rr]),(0,ce.useEffect)(()=>{if(kn&&lr){let Cn=function(){lr(kn.getValue())};return kn.on("blur",Cn),()=>{kn.off("blur",Cn)}}},[kn,lr]);function Wi(Cn,gn){var Pn=Cn.getDoc(),Fn=Pn.getCursor(),dr=Pn.getLine(Fn.line),Xn=dr.charAt(Fn.ch-1),Zn=dr.lastIndexOf("@\u2581@",Fn.ch),Qn=dr.lastIndexOf("@\u2581\u2581@",Fn.ch),Ze=Zn>Qn?Zn:Qn,ze=Zn>Qn?3:4;if(ba.indexOf(Xn)===-1)return null;if(console.log("change1:",gn,Cn,dr,Fn,Ze,Zn,Qn,Xn),Ze>=0&&Fn.ch-Ze<5){var xe=Ze+ze;return Pn.replaceRange("",{line:Fn.line,ch:Ze},{line:Fn.line,ch:xe}),{line:Fn.line,ch:xe}}return null}(0,ce.useEffect)(()=>{if(kn){let Cn=function(gn,Pn){const Fn=gn.getValue();Ma(Fn),ga(new Date().getTime()),gn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qe&&(Wn?Qe(Fn,sn(Fn)):Qe(Fn))};return kn.on("change",Cn),()=>{kn.off("change",Cn)}}},[kn,Qe]),(0,ce.useEffect)(()=>{if(kn)if(Nn==null)kn.setValue(""),Ma("");else{const Cn=window.scrollY||window.pageYOffset;Nn!==kn.getValue()&&(kn.setValue(Nn),Ma(Nn),kn.setCursor(xi?1:kn.lineCount(),0),window.scrollTo(0,Cn))}},[kn,Nn]);const Xi=(0,ce.useCallback)(Cn=>{const gn=kn.getCursor(),Pn=kn.getSelection();let Fn=Pn.split(`
`);switch(Cn){case"bold":return kn.replaceSelection("**"+Pn+"**"),Pn===""&&kn.setCursor(gn.line,gn.ch+2),kn.focus();case"italic":return kn.replaceSelection("*"+Pn+"*"),Pn===""&&kn.setCursor(gn.line,gn.ch+1),kn.focus();case"code":return kn.replaceSelection("`"+Pn+"`"),Pn===""&&kn.setCursor(gn.line,gn.ch+1),kn.focus();case"inline-latex":return fa("inline-latex"),kn.focus();case"latex":return kn.replaceSelection("```latex\n"+Pn+"\n```"),kn.setCursor(gn.line+1,Pn.length+1),kn.focus();case"line-break":return kn.replaceSelection(`<br/>
`),kn.focus();case"list-ul":return Pn===""?kn.replaceSelection("- "+Pn):kn.replaceSelection(Fn.map(dr=>dr===""?"":`- ${dr}`).join(`
`)),kn.focus();case"list-ol":return Pn===""?kn.replaceSelection("1. "+Pn):kn.replaceSelection(Fn.map((dr,Xn)=>dr===""?"":`${Xn+1}. ${dr}`).join(`
`)),kn.focus();case"add-null-ch":Qr==null||Qr();return;case"add-signal":return Pn===""&&kn.setCursor(gn.line,gn.ch),kn.replaceSelection(va),kn.focus();case"add-multiple":return Pn===""&&kn.setCursor(gn.line,gn.ch),kn.replaceSelection(ba),kn.focus();case"inster-template-1":return Pn===""&&kn.setCursor(gn.line,gn.ch),kn.replaceSelection(Vi),kn.focus();case"eraser":return kn.setValue(""),kn.focus();case"trigger-watch":return Zi(!Ji),kn.focus();case"trigger-full-screen":return aa(!xa),kn.focus();case ir:fa(ir);return;case li:fa(li);return;case Lr:fa(Lr);return;case Cr:fa(Cr);return;case"maths-latex":fa("maths-latex");return;case $n:wi.current="",sessionStorage.removeItem("file_id"),fa($n);return;case ci:fa(ci);return;default:throw new Error}},[kn,Ji,xa]),Oe=(0,ce.useCallback)((Cn,gn)=>{var Pn,Fn,dr,Xn,Zn,Qn;fa("");const{src:Ze,alt:ze,id:xe}=Cn||{};switch(Ni){case ir:const{title:Ft,link:Wt}=Cn;return kn.replaceSelection(`[${Ft}](${Wt})`),kn.focus();case li:const{language:an,content:nn}=Cn;return kn.replaceSelection(["```"+an,nn,"```"].join(`
`)),kn.focus();case"maths-latex":for(var Ae=atob(Cn),qe=new Uint8Array(Ae.length),Xe=0;Xe<Ae.length;Xe++)qe[Xe]=Ae.charCodeAt(Xe);var St=new Blob([qe],{type:"image/png"});(0,ot.I)(St,fr=>{fr.id?kn.replaceSelection(`![,](/api/attachments/${fr.id}?type=${fr.content_type})`):(fr==null?void 0:fr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":kn.replaceSelection("`$$"+Cn+"$$`");break;case Ii:if(!xe)return;kn.focus(),kn.getValue().indexOf(Ze)===-1?kn.replaceSelection(`<center><img id="${xe}" width="80%" src="${Ze}" class="draw-flowchart" alt="${ze||""}" /></center>`):document.getElementById(xe).src=he.Z.API_SERVER+Ze+"?t="+Date.now();try{setTimeout(()=>{lr(kn.getValue())},100)}catch(fr){}break;case Lr:case Cr:const Ot=gn,un=(dr=(Fn=(Pn=Ot==null?void 0:Ot.name)==null?void 0:Pn.split("."))==null?void 0:Fn.pop)==null?void 0:dr.call(Fn);return((Xn=Ot==null?void 0:Ot.type)==null?void 0:Xn.indexOf("image"))>-1||!(Ot!=null&&Ot.type)?Ot!=null&&Ot.align||Ot!=null&&Ot.width?kn.replaceSelection(`<p style="text-align:${Ot.align||"initial"}"><img width="${Ot.width?Ot.width+"%":"initial"}" src="${Ze}" alt="${ze||""}" /></p>`):kn.replaceSelection(`<img width="100%" src="${Ze}" alt="${ze||""}" />`):((Zn=Ot==null?void 0:Ot.type)==null?void 0:Zn.indexOf("video"))>-1?kn.replaceSelection(`<video width="100%" controls src="${Ze}"></video>`):((Qn=Ot==null?void 0:Ot.type)==null?void 0:Qn.indexOf("pdf"))>-1?kn.replaceSelection(`<a href="${Ze}?type=${Ot.type}&disposition=inline" target="_blank">${Ot.name}</a>`):At.includes(un)?kn.replaceSelection(`<a href="${Ze}?type=office&disposition=inline" target="_blank">${Ot.name}</a>`):kn.replaceSelection(`[${Ot.name}](${Ze})`),kn.focus();case ci:const{row:hn,col:zn,align:Sn}=Cn;let qn=`
`;for(let fr=0;fr<hn;fr++){let er=[],mr=[];for(let jn=0;jn<zn;jn++)fr===1&&mr.push(Di[Sn]),er.push(" ");fr===1&&(qn+=`| ${mr.join(" | ")} |
`),qn+=`| ${er.join(zn===1?"":" | ")} |
`}return kn.replaceSelection(qn+`
`),kn.focus();default:throw new Error}},[kn,Ni]),He=(0,ce.useMemo)(()=>{switch(Ni){case ir:return ce.createElement(In,{callback:Oe,onCancel:Ke});case li:return ce.createElement(fn.Z,{callback:Oe,onCancel:Ke});case Lr:return ce.createElement(ot.Z,{callback:Oe,onCancel:Ke});case $n:return ce.createElement(pe,{editImgId:wi.current,callback:Oe,onCancel:Ke});case ci:return ce.createElement(Kt,{callback:Oe,onCancel:Ke});case"maths-latex":return ce.createElement(gr,{showSaveButton:!0,callback:Oe});case"inline-latex":return ce.createElement(Ut.Z,{showSaveButton:!0,callback:Oe});default:return null}},[Ni]);function Ke(){fa("")}(0,ce.useEffect)(()=>{if(Xr.current){let Cn=function(Zn){dr=!0,Xn=Zn.pageY},gn=function(){dr=!1},Pn=function(Zn){if(dr){let Qn=Zn.pageY-Xn;Qn<0&&(Qn=0),Qn>300&&(Qn=300);let Ze=pt+Qn+"px";Ia(Ze)}},Fn=Xr.current,dr=!1,Xn=0;return Fn.addEventListener("mousedown",Cn),document.addEventListener("mousemove",Pn),document.addEventListener("mouseup",gn),()=>{Fn.removeEventListener("mousedown",Cn),document.removeEventListener("mousemove",Pn),document.removeEventListener("mouseup",gn)}}},[kn,Xr]),(0,ce.useEffect)(()=>{Ia(pt)},[pt]);const Ve=On(rt),ct=On(Hi),yt={width:Ve,height:ct},kt=(0,ce.useMemo)(()=>{if(Ta){let Cn=new Date(Ta),gn=Cn.getHours(),Pn=Cn.getMinutes(),Fn=Cn.getSeconds();return gn=gn<10?"0"+gn:gn,Pn=Pn<10?"0"+Pn:Pn,Fn=Fn<10?"0"+Fn:Fn,`${gn}:${Pn}:${Fn}`}return 0},[Ta]),sn=Cn=>{const gn=[];if(Wn){let Pn=-1;Cn=Cn.replace(/(@▁▁@|@▁@)/g,function(Fn,dr,Xn){gn.push({multiLine:Fn!==va})})}return gn};function dn(){window.sessionStorage.removeItem(qt),wa(!1),ga(0)}function Gn(){wa(!1),ga(0),kn.setValue(window.sessionStorage.getItem(qt))}(0,ce.useEffect)(()=>{cn[Ni]&&Ni!==Cr&&Ni!==$n&&setTimeout(()=>{const Cn=document.getElementsByClassName("markdown-popup-form")[0],gn=window.innerWidth/2-Cn.offsetWidth/2,Pn=window.innerHeight/2-Cn.offsetHeight/2;vn(gn),Ar(Pn)},0)},[Ni]);const pr=Cn=>{Cn.preventDefault();const gn=Cn.clientX-tn,Pn=Cn.clientY-Kn;document.body.onmousemove=Fn=>{let dr=Fn.clientX-gn,Xn=Fn.clientY-Pn;const Zn=document.getElementsByClassName("markdown-popup-form")[0],Qn=window.innerWidth-Zn.offsetWidth,Ze=window.innerHeight-Zn.offsetHeight;dr=Math.max(0,Math.min(dr,Qn)),Xn=Math.max(0,Math.min(Xn,Ze)),Hn(Fn.clientX,Fn.clientY,gn,Pn)&&(vn(dr),Ar(Xn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Hn=(Cn,gn,Pn,Fn)=>{const dr=document.body.clientHeight,Xn=document.body.clientWidth;return Cn<20&&Pn>Cn||Cn>Xn-20&&Pn<Cn||gn<20&&Fn>gn||gn>dr-20&&Fn<gn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:Hr},ce.createElement("div",{className:`markdown-editor-container ${An} ${Ji?"on-preview":""} ${Rt?"mini":""} ${xa?"full-screen":""}`,style:yt},ce.createElement(Ye,{insertTemp:Dt,watch:Ji,fullScreen:xa,showNullButton:br,showNullProgramButton:Wn,onActionCallback:Xi,hidetoolBar:Jn,extraUse:ur}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:Tr,placeholder:sr})),Ji?ce.createElement("div",{ref:Zr,className:"preview-container"},gt==="stex"&&ce.createElement(Re,{value:zi}),gt!=="stex"&&ce.createElement(st.Z,{edit:!0,disabledFill:ai,showProgramFill:Wn,value:zi,openEditor:Cn=>{var gn;wi.current=Cn,(gn=ki.current)==null||gn.setHeight("100vh"),setTimeout(()=>{fa("add-flowchart")},150)}})):null))),Yt?ce.createElement("a",{ref:Xr,className:"editor-resize"}):null,Ni===Cr&&ce.createElement(Nt,{callback:Oe,onCancel:Ke}),Ni===$n&&ce.createElement(pe,{ref:ki,editImgId:wi.current,callback:Oe,onCancel:Ke}),ce.createElement(Lt.Z,null,cn[Ni]&&Ni!==Cr&&Ni!==$n?ce.createElement(ft.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:tn,top:Kn},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:pr},cn[Ni]),open:!0,onCancel:Ke,footer:null,destroyOnClose:!0,width:Ni===$n?"1200px":null,height:Ni===$n?"80vh":null,className:"markdown-popup-form"},He):null))}},70859:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return je},I:function(){return Lt}});var ce=se(22150),Ue=se(2453),Fe=se(69677),it=se(93421),ve=se(31795),Le=se(78045),Me=se(71577),Se=se(15476),me=se(67294),Pe=se(52262),st=se(67294),Re=Object.defineProperty,Et=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,vt=(Ct,Bt,at)=>Bt in Ct?Re(Ct,Bt,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ct[Bt]=at,jt=(Ct,Bt)=>{for(var at in Bt||(Bt={}))et.call(Bt,at)&&vt(Ct,at,Bt[at]);if(lt)for(var at of lt(Bt))ke.call(Bt,at)&&vt(Ct,at,Bt[at]);return Ct},tt=(Ct,Bt)=>Et(Ct,ht(Bt));const{useForm:ut}=ce.default,Ee={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ct,onCancel:Bt})=>{const[at]=ut();let Vt=(0,me.useRef)();function $t(on){Vt.current.width=at.getFieldValue("width"),Vt.current.align=at.getFieldValue("align"),Ct(on,Vt.current)}function xn(on,En){if(on.status===-1){Ue.ZP.error(on.message);return}at.setFieldsValue({src:`/api/attachments/${on.id}`,type:En.type})}function dt(on){let En=on.target.files[0];Vt.current=En,Lt(En,xn)}return st.createElement(ce.default,tt(jt({form:at},we),{className:"upload-image-panel",onFinish:$t,style:{width:470,overflow:"hidden"}}),st.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},st.createElement("div",{className:"flex-container"},st.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},st.createElement(Fe.default,{style:Ee})),st.createElement(Ye,{onFileChange:dt}))),st.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},st.createElement(Fe.default,{style:{width:264}})),st.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},st.createElement(it.Z,null,st.createElement(ce.default.Item,{name:"width",style:{margin:0}},st.createElement(ve.Z,{style:{width:264}})),st.createElement("span",{className:"ml8"},"%"))),st.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},st.createElement(Le.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"}]})),st.createElement("aside",null,st.createElement(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},st.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Me.ZP,{type:"default",onClick:Bt},"\u53D6\u6D88"))))};function Ye({onFileChange:Ct}){return st.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",st.createElement("input",{type:"file",onChange:Ct}))}function Lt(Ct,Bt){if(!Ct)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Pe.bg)())throw Ue.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let at=new FormData;at.append("editormd-image-file",Ct),at.append("file_param_name","editormd-image-file"),at.append("byxhr","true");var Vt=new window.XMLHttpRequest;Vt.withCredentials=!0,Vt.addEventListener("load",function($t){Bt(JSON.parse($t.target.responseText),Ct)},!1),Vt.addEventListener("error",function($t){console.error($t)},!1),Vt.open("POST",`${Se.KI}/api/attachments.json`),Vt.send(at)}},76621:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Fe}});var ce=se(67294),Ue=se(73935);class Fe extends ce.Component{constructor(ve){super(ve);const Le=window.document;this.node=Le.createElement("div"),Le.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,Ue.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ue}});var ce=se(67294);function Ue(Fe,it){const ve=(0,ce.useRef)();(0,ce.useEffect)(()=>{ve.current=Fe}),(0,ce.useEffect)(()=>{function Le(){ve.current()}if(it!==null){let Me=setInterval(Le,it);return()=>clearInterval(Me)}},[it])}},44081:function(Ln,en,se){"use strict";se.r(en),se.d(en,{default:function(){return On}});var ce=se(67294),Ue=se(35973),Fe=se(11320),it=se(71230),ve=se(15746),Le=se(71577),Me={wrap:"wrap___oiJRJ",head:"head___zCLJu",recommendItem:"recommendItem___Z46_0",buttonWrap:"buttonWrap___Gol4S",privateMessage:"privateMessage___UCiuy",flex1:"flex1___FVk7y",mWidth147:"mWidth147___f_pcl"},Se=se(13703),me=Object.defineProperty,Pe=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,lt=(Pt,zt,rn)=>zt in Pt?me(Pt,zt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Pt[zt]=rn,et=(Pt,zt)=>{for(var rn in zt||(zt={}))Et.call(zt,rn)&&lt(Pt,rn,zt[rn]);if(Re)for(var rn of Re(zt))ht.call(zt,rn)&&lt(Pt,rn,zt[rn]);return Pt},ke=(Pt,zt)=>Pe(Pt,st(zt)),vt=(Pt,zt)=>{var rn={};for(var cn in Pt)Et.call(Pt,cn)&&zt.indexOf(cn)<0&&(rn[cn]=Pt[cn]);if(Pt!=null&&Re)for(var cn of Re(Pt))zt.indexOf(cn)<0&&ht.call(Pt,cn)&&(rn[cn]=Pt[cn]);return rn},jt=(Pt,zt,rn)=>new Promise((cn,Vn)=>{var Nn=pt=>{try{rt(rn.next(pt))}catch(Rt){Vn(Rt)}},Qe=pt=>{try{rt(rn.throw(pt))}catch(Rt){Vn(Rt)}},rt=pt=>pt.done?cn(pt.value):Promise.resolve(pt.value).then(Nn,Qe);rt((rn=rn.apply(Pt,zt)).next())});const tt=Pt=>{var zt=Pt,{user:rn,forumsDetail:cn,globalSetting:Vn,loading:Nn,dispatch:Qe}=zt,rt=vt(zt,["user","forumsDetail","globalSetting","loading","dispatch"]),pt,Rt,We,mt;const{author_info:Dt,memo:gt,recommend_shixuns:qt}=cn.forumsDetailData||{},Yt=()=>jt(void 0,null,function*(){(Dt!=null&&Dt.watched?yield(0,Se.Sr)({user_id:Dt.login}):yield(0,Se.YP)({user_id:Dt.login}))&&Qe({type:"forumsDetail/setForumsDetailData",payload:ke(et({},cn.forumsDetailData),{author_info:ke(et({},Dt),{watched:!(Dt!=null&&Dt.watched)})})})});return ce.createElement("section",{className:Me.wrap},ce.createElement("aside",{className:"ml20"},ce.createElement("div",{className:`bg-white pt40 pb40 pl20 pr20 ${Me.head}`},ce.createElement("a",{href:`/users/${Dt==null?void 0:Dt.login}`,target:"_blank"},(Dt==null?void 0:Dt.image_url)&&ce.createElement("img",{src:`${Fe.Z.API_SERVER}/images/${Dt==null?void 0:Dt.image_url}`})),ce.createElement("div",{className:"tc font20"},Dt==null?void 0:Dt.username),ce.createElement("div",{className:"tc c-grey-999"},Dt==null?void 0:Dt.identity),((pt=rn.userInfo)==null?void 0:pt.user_id)!==(Dt==null?void 0:Dt.user_id)&&ce.createElement(it.Z,{justify:"center",className:`mt30 ${Me.buttonWrap}`},ce.createElement(ve.Z,null,ce.createElement(Le.ZP,{type:"primary",className:"mr10",onClick:Yt},Dt!=null&&Dt.watched?"\u53D6\u6D88\u5173\u6CE8":"\u5173\u6CE8")),ce.createElement(ve.Z,null,ce.createElement(Le.ZP,{className:Me.privateMessage,href:`/messages/${(Rt=rn.userInfo)==null?void 0:Rt.login}/message_detail?target_ids=${Dt==null?void 0:Dt.user_id}`,target:"_blank"},"\u79C1\u4FE1")))),!!((We=gt==null?void 0:gt.tag)!=null&&We.length)&&ce.createElement("div",{className:"bg-white mt10 pt40 pb40 pl20 pr20"},ce.createElement("div",{className:"font16"},"\u8BDD\u9898\u6807\u7B7E"),ce.createElement("div",{className:`mt10 ${Me.tag}`},(mt=gt==null?void 0:gt.tag)==null?void 0:mt.map((Rn,br)=>ce.createElement("span",{key:br,className:"c-light-primary mr10"},Rn)))),ce.createElement("div",{className:"pt10 pb10 pl10 pr10"},ce.createElement("div",{className:"font16 mb20"},"\u63A8\u8350\u5B9E\u8BAD"),ce.createElement("div",{className:Me.recommend},qt==null?void 0:qt.map(Rn=>ce.createElement("div",{className:Me.recommendItem},ce.createElement("a",{href:`/shixuns/${Rn.identifier}/challenges`,target:"_blank"},ce.createElement("img",{alt:Rn.id,src:`${Rn.image_url}`})),ce.createElement("div",{className:`${Me.flex1} ml10`},ce.createElement("a",{href:`/shixuns/${Rn.identifier}/challenges`,target:"_blank",title:Rn.name,className:`${Me.mWidth147} multi-llipsis1e c-grey-666 mb10`},Rn.name),ce.createElement("div",{className:"c-grey-999"},Rn.myshixuns_count," \u4EBA\u5B66\u4E60"))))))))};var ut=(0,Ue.connect)(({user:Pt,forumsDetail:zt,loading:rn,globalSetting:cn})=>({user:Pt,forumsDetail:zt,globalSetting:cn,loading:rn.models.forumsDetail}))(tt),Ee=se(27484),we=se.n(Ee),je=se(35598),Ye=se(2453),Lt=se(14446),Ct=se(69677),Bt=se(68508),at=se(85673),Vt=se(85418),$t=se(83062),xn=se(91304),dt=se(84249),on={flex_box_center:"flex_box_center___nMc3G",flex_space_between:"flex_space_between___gTlaF",flex_box_vertical_center:"flex_box_vertical_center___GQv6O",flex_box_center_end:"flex_box_center_end___nrFEP",flex_box_column:"flex_box_column___Ls1oQ",reply:"reply___jb23w",replyList:"replyList___ryiUt",comment:"comment___QJ1eT",content:"content___X2UnY",commentItem:"commentItem___h_wnY"},En=Object.defineProperty,yn=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,fn=(Pt,zt,rn)=>zt in Pt?En(Pt,zt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Pt[zt]=rn,ot=(Pt,zt)=>{for(var rn in zt||(zt={}))Zt.call(zt,rn)&&fn(Pt,rn,zt[rn]);if(De)for(var rn of De(zt))In.call(zt,rn)&&fn(Pt,rn,zt[rn]);return Pt},ft=(Pt,zt)=>yn(Pt,Ge(zt)),Jt=(Pt,zt,rn)=>new Promise((cn,Vn)=>{var Nn=pt=>{try{rt(rn.next(pt))}catch(Rt){Vn(Rt)}},Qe=pt=>{try{rt(rn.throw(pt))}catch(Rt){Vn(Rt)}},rt=pt=>pt.done?cn(pt.value):Promise.resolve(pt.value).then(Nn,Qe);rt((rn=rn.apply(Pt,zt)).next())});we().locale("ZH-cn");function Bn({user:Pt,vlist:zt=[],dispatch:rn,params:cn,id:Vn,memo_replies:Nn,forumsDetail:Qe}){return ce.createElement("aside",{className:on.comment},zt.map(function(rt,pt){var Rt,We;return ce.createElement(it.Z,{key:pt,className:on.commentItem},ce.createElement(ve.Z,{span:24},ce.createElement(it.Z,null,ce.createElement(ve.Z,{flex:"1"},ce.createElement("a",{href:`/users/${rt.user_login}`,target:"_blank",className:"c-light-black"},rt==null?void 0:rt.username),ce.createElement("span",{className:"c-light-black ml10"},rt.time)),(rt.can_delete||rt.user_id===((Rt=Pt.userInfo)==null?void 0:Rt.user_id)||rt.user_login===((We=Pt.userInfo)==null?void 0:We.login))&&ce.createElement(ve.Z,{className:"forums-comment-delete",style:{display:"none"}},ce.createElement($t.Z,{title:"\u5220\u9664"},ce.createElement(dt.Z,{className:"current",onClick:()=>{Lt.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ce.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>Jt(this,null,function*(){const mt=yield(0,Se.sW)({id:rt.id}),Dt=Nn.find(gt=>gt.id===Vn).children.filter(gt=>gt.id!==rt.id);Nn.find(gt=>gt.id===Vn).children=Dt,rn({type:"forumsDetail/setForumsDetailData",payload:ft(ot({},Qe.forumsDetailData),{memo_replies:[...Nn]})})})})}}))))),ce.createElement(ve.Z,null,ce.createElement(je.Z,{value:rt.content})))}))}var wn=Bn,Nt=se(28706),Xt=Object.defineProperty,Dn=Object.defineProperties,Mn=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,pe=(Pt,zt,rn)=>zt in Pt?Xt(Pt,zt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Pt[zt]=rn,he=(Pt,zt)=>{for(var rn in zt||(zt={}))de.call(zt,rn)&&pe(Pt,rn,zt[rn]);if(Te)for(var rn of Te(zt))le.call(zt,rn)&&pe(Pt,rn,zt[rn]);return Pt},oe=(Pt,zt)=>Dn(Pt,Mn(zt)),Ie=(Pt,zt)=>{var rn={};for(var cn in Pt)de.call(Pt,cn)&&zt.indexOf(cn)<0&&(rn[cn]=Pt[cn]);if(Pt!=null&&Te)for(var cn of Te(Pt))zt.indexOf(cn)<0&&le.call(Pt,cn)&&(rn[cn]=Pt[cn]);return rn},Je=(Pt,zt,rn)=>new Promise((cn,Vn)=>{var Nn=pt=>{try{rt(rn.next(pt))}catch(Rt){Vn(Rt)}},Qe=pt=>{try{rt(rn.throw(pt))}catch(Rt){Vn(Rt)}},rt=pt=>pt.done?cn(pt.value):Promise.resolve(pt.value).then(Nn,Qe);rt((rn=rn.apply(Pt,zt)).next())});we().locale("ZH-cn");const _t=(Pt,zt)=>{var rn=Pt,{user:cn,forumsDetail:Vn,globalSetting:Nn,loading:Qe,dispatch:rt,handleClick:pt}=rn,Rt=Ie(rn,["user","forumsDetail","globalSetting","loading","dispatch","handleClick"]);const{memo:We,memo_replies:mt}=Vn.forumsDetailData||{},Dt=(0,Ue.useParams)(),[gt,qt]=(0,ce.useState)(""),[Yt,Rn]=(0,ce.useState)(""),[br,Wn]=(0,ce.useState)(-1),[Jn,or]=(0,ce.useState)(!1),[lr,Rr]=(0,ce.useState)(1),[bn,An]=(0,ce.useState)(!1);(0,ce.useImperativeHandle)(zt,()=>({onMdFouch:ai})),(0,ce.useEffect)(()=>{or((We==null?void 0:We.replies_count)>10)},[We==null?void 0:We.replies_count]);const hi=()=>Je(void 0,null,function*(){var sr;const vi=lr+1;Rr(vi);const ur=yield(0,Se.z5)({id:Dt.memoId,page:vi});ur!=null&&ur.memo_replies&&(rt({type:"forumsDetail/setForumsDetailData",payload:oe(he({},Vn.forumsDetailData),{memo_replies:[...mt,...ur.memo_replies]})}),or(((sr=ur.memo_replies)==null?void 0:sr.length)===10))}),xi=sr=>{var vi,ur,Qr,kn;return oe(he({},sr),{image_url:(vi=cn.userInfo)==null?void 0:vi.image_url,children:[],user_id:(ur=cn.userInfo)==null?void 0:ur.user_id,user_login:(Qr=cn.userInfo)==null?void 0:Qr.login,username:(kn=cn.userInfo)==null?void 0:kn.username,time:`${(0,Nt.li)((new Date().getTime()-new Date(sr.created_at).getTime())/1e3)}\u524D`})},ai=()=>{An(!0)};return ce.createElement("section",{className:on.wrap},!!(mt!=null&&mt.length)&&ce.createElement("aside",{className:on.content},ce.createElement("div",{style:{padding:"10px 15px 5px 15px",justifyContent:"space-between",display:"flex"}},ce.createElement("span",null,"\u5168\u90E8\u56DE\u590D\uFF08",We.replies_count,"\uFF09")),ce.createElement("aside",{className:on.replyList},mt==null?void 0:mt.map(function(sr,vi){var ur;return ce.createElement(it.Z,{gutter:[12,12],key:vi},ce.createElement(ve.Z,{flex:"40px"},ce.createElement("a",{href:`/users/${sr.user_login}`,target:"_blank"},ce.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"50",height:"50",src:`${Fe.Z.IMG_SERVER}/images/${sr==null?void 0:sr.image_url}`}))),ce.createElement(ve.Z,{flex:"1"},ce.createElement(it.Z,{align:"middle"},ce.createElement(ve.Z,{span:24},ce.createElement("a",{href:`/users/${sr.user_login}`,target:"_blank"},ce.createElement("span",{className:"c-light-black"},sr==null?void 0:sr.username)),ce.createElement("span",{className:"c-light-black ml10"},sr.time)),ce.createElement(ve.Z,{span:24},ce.createElement("div",{onClick:pt},ce.createElement(je.Z,{value:sr.content}))),!!((ur=sr==null?void 0:sr.children)!=null&&ur.length)&&ce.createElement(wn,{user:cn,id:sr==null?void 0:sr.id,vlist:sr==null?void 0:sr.children,dispatch:rt,params:Dt,memo_replies:mt,forumsDetail:Vn}),ce.createElement(ve.Z,{span:24,className:"mt5 c-light-black"},br===vi?ce.createElement("aside",null,ce.createElement(xn.Z,{onChange:Qr=>{Rn(Qr)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),ce.createElement(it.Z,null,ce.createElement(ve.Z,{span:24,className:"tr"},ce.createElement(Le.ZP,{type:"primary",size:"middle",onClick:()=>Je(this,null,function*(){if(Yt==="")Ye.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Qr=yield(0,Se.ts)({parent_id:sr.id,content:Yt});Rn(null),Qr&&(Wn(-1),mt.find(kn=>kn.id===Qr.parent_id).children.push(xi(Qr)),rt({type:"forumsDetail/setForumsDetailData",payload:oe(he({},Vn.forumsDetailData),{memo:oe(he({},We),{replies_count:We.replies_count+1}),memo_replies:[...mt]})}))}})},"\u53D1\u9001")))):ce.createElement("div",{className:"tr"},ce.createElement("span",{className:"iconfont icon-huifu1 mr15 ml30 current",onClick:()=>Wn(vi)}),ce.createElement($t.Z,{title:sr.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ce.createElement("span",{className:sr.user_praise?"c-orange":"c-gery-888"},ce.createElement("i",{className:"iconfont icon-dianzan mr3 current",onClick:()=>Je(this,null,function*(){const Qr=yield(0,Se.vL)({id:sr.id,container_type:"Memo",type:sr.user_praise?0:1});(Qr==null?void 0:Qr.praise_count)>=0&&(mt.find(kn=>kn.id===sr.id).user_praise=!sr.user_praise,mt.find(kn=>kn.id===sr.id).praise_count=Qr==null?void 0:Qr.praise_count,rt({type:"forumsDetail/setForumsDetailData",payload:oe(he({},Vn.forumsDetailData),{memo_replies:[...mt]})}))})}),sr.praise_count>0?sr.praise_count:"")))))))}))),Jn&&ce.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center"}},ce.createElement(it.Z,{justify:"space-between"},ce.createElement(ve.Z,null),ce.createElement(ve.Z,null,Jn&&ce.createElement("a",{className:"c-black",onClick:hi},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA")))),ce.createElement("aside",{className:on.reply},ce.createElement(xn.Z,{onBlur:()=>An(!1),isFocus:bn,defaultValue:gt,id:"writeForumsReviewId",onChange:sr=>{qt(sr)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ce.createElement(it.Z,null,ce.createElement(ve.Z,{flex:"1"}),ce.createElement(ve.Z,null,ce.createElement(Le.ZP,{type:"primary",size:"middle",onClick:()=>Je(void 0,null,function*(){if(gt==="")Ye.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const sr=yield(0,Se.ts)({parent_id:We.id,content:gt});qt(null),sr&&rt({type:"forumsDetail/setForumsDetailData",payload:oe(he({},Vn.forumsDetailData),{memo:oe(he({},We),{replies_count:We.replies_count+1}),memo_replies:[xi(sr),...mt]})})}})},"\u53D1\u9001")))))};var Kt=(0,Ue.connect)(({user:Pt,forumsDetail:zt,loading:rn,globalSetting:cn})=>({user:Pt,forumsDetail:zt,globalSetting:cn,loading:rn.models.forumsDetail}),null,null,{forwardRef:!0})((0,ce.forwardRef)(_t)),Ht={wrap:"wrap___Soi3l",header:"header___vk3EC",title:"title___WJAyR",menu:"menu___yMPKF",top:"top___ZqzEM",line:"line___EQKlG",flexCenter:"flexCenter___Rcnhr",like:"like___uNtmq",canLike:"canLike___Lu04z",attachmentName:"attachmentName___nwdzp"},Qt=se(55304),Gt=se(71865),nr=se(33054),gr=Object.defineProperty,Ut=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,ir=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Cr=(Pt,zt,rn)=>zt in Pt?gr(Pt,zt,{enumerable:!0,configurable:!0,writable:!0,value:rn}):Pt[zt]=rn,Ii=(Pt,zt)=>{for(var rn in zt||(zt={}))Lr.call(zt,rn)&&Cr(Pt,rn,zt[rn]);if(ir)for(var rn of ir(zt))$n.call(zt,rn)&&Cr(Pt,rn,zt[rn]);return Pt},li=(Pt,zt)=>Ut(Pt,pn(zt)),ci=(Pt,zt)=>{var rn={};for(var cn in Pt)Lr.call(Pt,cn)&&zt.indexOf(cn)<0&&(rn[cn]=Pt[cn]);if(Pt!=null&&ir)for(var cn of ir(Pt))zt.indexOf(cn)<0&&$n.call(Pt,cn)&&(rn[cn]=Pt[cn]);return rn},Jr=(Pt,zt,rn)=>new Promise((cn,Vn)=>{var Nn=pt=>{try{rt(rn.next(pt))}catch(Rt){Vn(Rt)}},Qe=pt=>{try{rt(rn.throw(pt))}catch(Rt){Vn(Rt)}},rt=pt=>pt.done?cn(pt.value):Promise.resolve(pt.value).then(Nn,Qe);rt((rn=rn.apply(Pt,zt)).next())});const Di={5:"\u6280\u672F\u5206\u4EAB",3:"\u64CD\u4F5C\u6307\u5357",16:"\u901A\u77E5\u516C\u544A"},Ei=Pt=>{var zt=Pt,{user:rn,forumsDetail:cn,globalSetting:Vn,loading:Nn,dispatch:Qe}=zt,rt=ci(zt,["user","forumsDetail","globalSetting","loading","dispatch"]),pt,Rt,We,mt;const{author_info:Dt,memo:gt,attachments_list:qt}=cn.forumsDetailData||{},Yt=(0,ce.useRef)(),Rn=(0,ce.useRef)(),br=()=>Jr(void 0,null,function*(){const An={id:gt.id,sticky:gt.sticky?0:1},hi=yield(0,Se.B0)(An);(hi==null?void 0:hi.status)===0&&Qe({type:"forumsDetail/setForumsDetailData",payload:li(Ii({},cn.forumsDetailData),{memo:li(Ii({},gt),{sticky:!(gt!=null&&gt.sticky)})})})}),Wn=()=>Jr(void 0,null,function*(){const An=yield(0,Se.sW)({id:gt==null?void 0:gt.id});(An==null?void 0:An.status)===0&&(Ye.ZP.success("\u5220\u9664\u6210\u529F"),Ue.history.push("/forums")),(An==null?void 0:An.status)===-1&&Ue.history.push("/forums")}),Jn=()=>Jr(void 0,null,function*(){Lt.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5956\u52B1\u8BBE\u7F6E",content:ce.createElement("div",{className:"font14 tc"},ce.createElement(Ct.default,{defaultValue:Yt.current,onChange:An=>Yt.current=An.target.value})),onOk:()=>Jr(void 0,null,function*(){const An=yield(0,Se.eh)({id:gt==null?void 0:gt.id,container_type:"Memo",score:Yt.current?Number(Yt.current):0,user_id:Dt==null?void 0:Dt.user_id});if(Yt.current=null,(An==null?void 0:An.code)>0){Qe({type:"forumsDetail/setForumsDetailData",payload:li(Ii({},cn.forumsDetailData),{memo:li(Ii({},gt),{reward:An==null?void 0:An.code})})}),Ye.ZP.success("\u5956\u52B1\u6210\u529F");return}Ye.ZP.success("\u5956\u52B1\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7CFB\u7EDF\u7BA1\u7406\u5458\uFF01")})})}),or=()=>{Rn.current.onMdFouch&&Rn.current.onMdFouch()},lr=()=>Jr(void 0,null,function*(){const An=yield(0,Se.vL)({id:gt.id,container_type:"Memo",type:1});(An==null?void 0:An.praise_count)>=0&&Qe({type:"forumsDetail/setForumsDetailData",payload:li(Ii({},cn.forumsDetailData),{memo:li(Ii({},gt),{user_praise:!(gt!=null&&gt.user_praise),memo_praise_count:An==null?void 0:An.praise_count})})})}),Rr=ce.createElement(Bt.default,{className:Ht.menu},((pt=rn.userInfo)==null?void 0:pt.admin)&&(gt==null?void 0:gt.sticky)&&ce.createElement(Bt.default.Item,null,ce.createElement("a",{onClick:()=>br()},"\u53D6\u6D88\u7F6E\u9876")),((Rt=rn.userInfo)==null?void 0:Rt.admin)&&!(gt!=null&&gt.sticky)&&ce.createElement(Bt.default.Item,null,ce.createElement("a",{onClick:()=>br()},"\u7F6E\xA0\xA0\u9876")),ce.createElement(Bt.default.Item,null,ce.createElement(Ue.Link,{to:`/forums/${gt==null?void 0:gt.id}/edit`},"\u7F16\xA0\xA0\u8F91")),ce.createElement(Bt.default.Item,null,ce.createElement("a",{onClick:()=>{Lt.default.confirm({title:"\u63D0\u793A",icon:ce.createElement(Qt.Z,null),content:"\u5E16\u5B50\u5C06\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u6062\u590D\u3002\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",okText:"\u786E\u8BA4",onOk:()=>{Wn()},cancelText:"\u53D6\u6D88"})}},"\u5220\xA0\xA0\u9664"))),bn=An=>{let{nodeName:hi,src:xi}=An.target;hi==="IMG"&&(nr.Z.publish("preview-image",xi),console.log("src:",xi))};return(0,ce.useEffect)(()=>{},[]),ce.createElement("section",{className:Ht.wrap},ce.createElement(at.Z,{separator:"/",className:"mb5"},ce.createElement(at.Z.Item,null,ce.createElement(Ue.Link,{to:`/forums/categories/${gt==null?void 0:gt.forum_id}`},Di[gt==null?void 0:gt.forum_id])),ce.createElement(at.Z.Item,null,"\u8BE6\u60C5")),ce.createElement("header",{className:`bg-white pt40 pb40 pl30 pr30 ${Ht.header}`},ce.createElement(it.Z,{align:"middle"},ce.createElement(ve.Z,{flex:1,className:"font24 mb5"},ce.createElement("span",{className:Ht.title},gt==null?void 0:gt.subject),(gt==null?void 0:gt.sticky)&&ce.createElement("span",{className:Ht.top},"\u7F6E\u9876")),ce.createElement(ve.Z,null,(((We=rn.userInfo)==null?void 0:We.admin)||((mt=rn.userInfo)==null?void 0:mt.user_id)===(Dt==null?void 0:Dt.user_id))&&ce.createElement(Vt.Z,{dropdownRender:()=>Rr},ce.createElement("i",{className:"fa fa-bars font-16 current c-grey-bcb"})))),ce.createElement(it.Z,{align:"middle",className:"font14"},ce.createElement(ve.Z,{flex:1,className:"c-grey-999"},ce.createElement("span",null,we()(gt==null?void 0:gt.time).fromNow()," \u66F4\u65B0")),ce.createElement(ve.Z,{className:"c-grey-999"},ce.createElement("span",{className:`pr10 pl10 ${gt!=null&&gt.replies_count?Ht.line:""}`},ce.createElement("i",{className:"iconfont icon-liulanyan font18 mr5"}),gt==null?void 0:gt.viewed_count),!!(gt!=null&&gt.replies_count)&&ce.createElement($t.Z,{placement:"bottom",title:"\u5199\u8BC4\u8BBA"},ce.createElement("span",{className:"current pl10",onClick:or},ce.createElement("i",{className:"iconfont icon-huifu1 font18 mr5"}),gt==null?void 0:gt.replies_count))))),ce.createElement("main",{className:"bg-white pt40 pb40 pl40 pr40"},ce.createElement("div",{onClick:bn},ce.createElement(je.Z,{value:gt==null?void 0:gt.content})),ce.createElement("div",{className:"bg-white pl40 pr40 mt40"},ce.createElement("div",{className:`mt10 mb20 ${Ht.flexCenter}`},ce.createElement("div",{className:`${Ht.like} ${gt!=null&&gt.user_praise?"":Ht.canLike}`,onClick:lr},ce.createElement("i",{className:"iconfont icon-dianzan font18"}),ce.createElement("br",null),ce.createElement("span",null,gt==null?void 0:gt.memo_praise_count)))),!!(qt!=null&&qt.length)&&ce.createElement("div",{className:"mt40"},qt==null?void 0:qt.map(An=>ce.createElement("div",{className:`c-grey-888 ${Ht.flexCenter}`},ce.createElement("i",{className:"iconfont icon-fujian mr10 font14 c-green-29b"}),ce.createElement("a",{href:An==null?void 0:An.url,title:An==null?void 0:An.title,className:`${Ht.attachmentName} mr10`},An==null?void 0:An.title),ce.createElement("span",{className:"font12 c-grey-666 mt3"},An==null?void 0:An.filesize))))),ce.createElement(Kt,{ref:Rn,handleClick:bn}),ce.createElement(Gt.Z,null))};var Pi=(0,Ue.connect)(({user:Pt,forumsDetail:zt,loading:rn,globalSetting:cn})=>({user:Pt,forumsDetail:zt,globalSetting:cn,loading:rn.effects}))(Ei),xr={flex:"flex___fgmSn"},Pr=se(57953),Gi=Object.getOwnPropertySymbols,ma=Object.prototype.hasOwnProperty,ba=Object.prototype.propertyIsEnumerable,va=(Pt,zt)=>{var rn={};for(var cn in Pt)ma.call(Pt,cn)&&zt.indexOf(cn)<0&&(rn[cn]=Pt[cn]);if(Pt!=null&&Gi)for(var cn of Gi(Pt))zt.indexOf(cn)<0&&ba.call(Pt,cn)&&(rn[cn]=Pt[cn]);return rn},Vi=(Pt,zt,rn)=>new Promise((cn,Vn)=>{var Nn=pt=>{try{rt(rn.next(pt))}catch(Rt){Vn(Rt)}},Qe=pt=>{try{rt(rn.throw(pt))}catch(Rt){Vn(Rt)}},rt=pt=>pt.done?cn(pt.value):Promise.resolve(pt.value).then(Nn,Qe);rt((rn=rn.apply(Pt,zt)).next())});const At=Pt=>{var zt=Pt,{forumsDetail:rn,globalSetting:cn,loading:Vn,dispatch:Nn}=zt,Qe=va(zt,["forumsDetail","globalSetting","loading","dispatch"]);const rt=(0,Ue.useParams)(),[pt,Rt]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{We()},[rt.memoId]);const We=()=>Vi(void 0,null,function*(){Rt(!0);let mt=yield Nn({type:"forumsDetail/getForumsDetailData",payload:{id:rt.memoId}});Rt(!1)});return ce.createElement(Pr.Z,{spinning:pt},ce.createElement("section",{className:`edu-container mb20 mt30 ${xr.flex}`},ce.createElement(Pi,null),ce.createElement(ut,null)))};var On=(0,Ue.connect)(({forumsDetail:Pt,loading:zt,globalSetting:rn})=>({forumsDetail:Pt,globalSetting:rn,loading:zt.models.forumsDetail}))(At)},9708:function(Ln,en,se){"use strict";se.d(en,{F:function(){return ve},Z:function(){return it}});var ce=se(94184),Ue=se.n(ce);const Fe=null;function it(Le,Me,Se){return Ue()({[`${Le}-status-success`]:Me==="success",[`${Le}-status-warning`]:Me==="warning",[`${Le}-status-error`]:Me==="error",[`${Le}-status-validating`]:Me==="validating",[`${Le}-has-feedback`]:Se})}const ve=(Le,Me)=>Me||Le},85673:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return xn}});var ce=se(94184),Ue=se.n(ce),Fe=se(37419),it=se(1337),ve=se(67294),Le=se(96159),Me=se(53124),Se=se(42922),me=se(35874);const Pe=dt=>{let{children:on}=dt;const{getPrefixCls:En}=ve.useContext(Me.E_),yn=En("breadcrumb");return ve.createElement("li",{className:`${yn}-separator`,"aria-hidden":"true"},on===""?on:on||"/")};Pe.__ANT_BREADCRUMB_SEPARATOR=!0;var st=Pe,Re=function(dt,on){var En={};for(var yn in dt)Object.prototype.hasOwnProperty.call(dt,yn)&&on.indexOf(yn)<0&&(En[yn]=dt[yn]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,yn=Object.getOwnPropertySymbols(dt);Ge<yn.length;Ge++)on.indexOf(yn[Ge])<0&&Object.prototype.propertyIsEnumerable.call(dt,yn[Ge])&&(En[yn[Ge]]=dt[yn[Ge]]);return En};function Et(dt,on){if(dt.title===void 0||dt.title===null)return null;const En=Object.keys(on).join("|");return typeof dt.title=="object"?dt.title:String(dt.title).replace(new RegExp(`:(${En})`,"g"),(yn,Ge)=>on[Ge]||yn)}function ht(dt,on,En,yn){if(En==null)return null;const{className:Ge,onClick:De}=on,Zt=Re(on,["className","onClick"]),In=Object.assign(Object.assign({},(0,it.Z)(Zt,{data:!0,aria:!0})),{onClick:De});return yn!==void 0?ve.createElement("a",Object.assign({},In,{className:Ue()(`${dt}-link`,Ge),href:yn}),En):ve.createElement("span",Object.assign({},In,{className:Ue()(`${dt}-link`,Ge)}),En)}function lt(dt,on){return(yn,Ge,De,Zt,In)=>{if(on)return on(yn,Ge,De,Zt);const fn=Et(yn,Ge);return ht(dt,yn,fn,In)}}var et=function(dt,on){var En={};for(var yn in dt)Object.prototype.hasOwnProperty.call(dt,yn)&&on.indexOf(yn)<0&&(En[yn]=dt[yn]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,yn=Object.getOwnPropertySymbols(dt);Ge<yn.length;Ge++)on.indexOf(yn[Ge])<0&&Object.prototype.propertyIsEnumerable.call(dt,yn[Ge])&&(En[yn[Ge]]=dt[yn[Ge]]);return En};const ke=dt=>{const{prefixCls:on,separator:En="/",children:yn,menu:Ge,overlay:De,dropdownProps:Zt,href:In}=dt,ot=(ft=>{if(Ge||De){const Jt=Object.assign({},Zt);if(Ge){const Bn=Ge||{},{items:wn}=Bn,Nt=et(Bn,["items"]);Jt.menu=Object.assign(Object.assign({},Nt),{items:wn==null?void 0:wn.map((Xt,Dn)=>{var{key:Mn,title:Te,label:de,path:le}=Xt,pe=et(Xt,["key","title","label","path"]);let he=de!=null?de:Te;return le&&(he=ve.createElement("a",{href:`${In}${le}`},he)),Object.assign(Object.assign({},pe),{key:Mn!=null?Mn:Dn,label:he})})})}else De&&(Jt.overlay=De);return ve.createElement(me.Z,Object.assign({placement:"bottom"},Jt),ve.createElement("span",{className:`${on}-overlay-link`},ft,ve.createElement(Se.Z,null)))}return ft})(yn);return ot!=null?ve.createElement(ve.Fragment,null,ve.createElement("li",null,ot),En&&ve.createElement(st,null,En)):null},vt=dt=>{const{prefixCls:on,children:En,href:yn}=dt,Ge=et(dt,["prefixCls","children","href"]),{getPrefixCls:De}=ve.useContext(Me.E_),Zt=De("breadcrumb",on);return ve.createElement(ke,Object.assign({},Ge,{prefixCls:Zt}),ht(Zt,Ge,En,yn))};vt.__ANT_BREADCRUMB_ITEM=!0;var jt=vt,tt=se(14747),ut=se(67968),Ee=se(45503);const we=dt=>{const{componentCls:on,iconCls:En}=dt;return{[on]:Object.assign(Object.assign({},(0,tt.Wf)(dt)),{color:dt.itemColor,fontSize:dt.fontSize,[En]:{fontSize:dt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:dt.linkColor,transition:`color ${dt.motionDurationMid}`,padding:`0 ${dt.paddingXXS}px`,borderRadius:dt.borderRadiusSM,height:dt.lineHeight*dt.fontSize,display:"inline-block",marginInline:-dt.marginXXS,"&:hover":{color:dt.linkHoverColor,backgroundColor:dt.colorBgTextHover}},(0,tt.Qy)(dt)),"li:last-child":{color:dt.lastItemColor},[`${on}-separator`]:{marginInline:dt.separatorMargin,color:dt.separatorColor},[`${on}-link`]:{[`
> ${En} + span,
> ${En} + a
`]:{marginInlineStart:dt.marginXXS}},[`${on}-overlay-link`]:{borderRadius:dt.borderRadiusSM,height:dt.lineHeight*dt.fontSize,display:"inline-block",padding:`0 ${dt.paddingXXS}px`,marginInline:-dt.marginXXS,[`> ${En}`]:{marginInlineStart:dt.marginXXS,fontSize:dt.fontSizeIcon},"&:hover":{color:dt.linkHoverColor,backgroundColor:dt.colorBgTextHover,a:{color:dt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${dt.componentCls}-rtl`]:{direction:"rtl"}})}};var je=(0,ut.Z)("Breadcrumb",dt=>{const on=(0,Ee.TS)(dt,{});return[we(on)]},dt=>({itemColor:dt.colorTextDescription,lastItemColor:dt.colorText,iconFontSize:dt.fontSize,linkColor:dt.colorTextDescription,linkHoverColor:dt.colorText,separatorColor:dt.colorTextDescription,separatorMargin:dt.marginXS})),Ye=function(dt,on){var En={};for(var yn in dt)Object.prototype.hasOwnProperty.call(dt,yn)&&on.indexOf(yn)<0&&(En[yn]=dt[yn]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,yn=Object.getOwnPropertySymbols(dt);Ge<yn.length;Ge++)on.indexOf(yn[Ge])<0&&Object.prototype.propertyIsEnumerable.call(dt,yn[Ge])&&(En[yn[Ge]]=dt[yn[Ge]]);return En};function Lt(dt){const{breadcrumbName:on,children:En}=dt,yn=Ye(dt,["breadcrumbName","children"]),Ge=Object.assign({title:on},yn);return En&&(Ge.menu={items:En.map(De=>{var{breadcrumbName:Zt}=De,In=Ye(De,["breadcrumbName"]);return Object.assign(Object.assign({},In),{title:Zt})})}),Ge}function Ct(dt,on){return(0,ve.useMemo)(()=>dt||(on?on.map(Lt):null),[dt,on])}var Bt=function(dt,on){var En={};for(var yn in dt)Object.prototype.hasOwnProperty.call(dt,yn)&&on.indexOf(yn)<0&&(En[yn]=dt[yn]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,yn=Object.getOwnPropertySymbols(dt);Ge<yn.length;Ge++)on.indexOf(yn[Ge])<0&&Object.prototype.propertyIsEnumerable.call(dt,yn[Ge])&&(En[yn[Ge]]=dt[yn[Ge]]);return En};const at=(dt,on)=>{if(on===void 0)return on;let En=(on||"").replace(/^\//,"");return Object.keys(dt).forEach(yn=>{En=En.replace(`:${yn}`,dt[yn])}),En},Vt=dt=>{const{prefixCls:on,separator:En="/",style:yn,className:Ge,rootClassName:De,routes:Zt,items:In,children:fn,itemRender:ot,params:ft={}}=dt,Jt=Bt(dt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Bn,direction:wn,breadcrumb:Nt}=ve.useContext(Me.E_);let Xt;const Dn=Bn("breadcrumb",on),[Mn,Te]=je(Dn),de=Ct(In,Zt),le=lt(Dn,ot);if(de&&de.length>0){const oe=[],Ie=In||Zt;Xt=de.map((Je,_t)=>{const{path:Kt,key:Ht,type:Qt,menu:Gt,overlay:nr,onClick:gr,className:Ut,separator:pn,dropdownProps:ir}=Je,Lr=at(ft,Kt);Lr!==void 0&&oe.push(Lr);const $n=Ht!=null?Ht:_t;if(Qt==="separator")return ve.createElement(st,{key:$n},pn);const Cr={},Ii=_t===de.length-1;Gt?Cr.menu=Gt:nr&&(Cr.overlay=nr);let{href:li}=Je;return oe.length&&Lr!==void 0&&(li=`#/${oe.join("/")}`),ve.createElement(ke,Object.assign({key:$n},Cr,(0,it.Z)(Je,{data:!0,aria:!0}),{className:Ut,dropdownProps:ir,href:li,separator:Ii?"":En,onClick:gr,prefixCls:Dn}),le(Je,ft,Ie,oe,li))})}else if(fn){const oe=(0,Fe.Z)(fn).length;Xt=(0,Fe.Z)(fn).map((Ie,Je)=>{if(!Ie)return Ie;const _t=Je===oe-1;return(0,Le.Tm)(Ie,{separator:_t?"":En,key:Je})})}const pe=Ue()(Dn,Nt==null?void 0:Nt.className,{[`${Dn}-rtl`]:wn==="rtl"},Ge,De,Te),he=Object.assign(Object.assign({},Nt==null?void 0:Nt.style),yn);return Mn(ve.createElement("nav",Object.assign({className:pe,style:he},Jt),ve.createElement("ol",null,Xt)))};Vt.Item=jt,Vt.Separator=st;var $t=Vt,xn=$t},88258:function(Ln,en,se){"use strict";var ce=se(67294),Ue=se(53124),Fe=se(32983);const it=ve=>{const{componentName:Le}=ve,{getPrefixCls:Me}=(0,ce.useContext)(Ue.E_),Se=Me("empty");switch(Le){case"Table":case"List":return ce.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ce.createElement(Fe.Z,{image:Fe.Z.PRESENTED_IMAGE_SIMPLE,className:`${Se}-small`});default:return ce.createElement(Fe.Z,null)}};en.Z=it},72565:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return _i}});var ce=se(94184),Ue=se.n(ce),Fe=se(1413),it=se(97685),ve=se(67294),Le=se(73935);function Me(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Se={};function me(Mt,wt){}function Pe(Mt,wt){}function st(){Se={}}function Re(Mt,wt,tn){!wt&&!Se[tn]&&(Mt(!1,tn),Se[tn]=!0)}function Et(Mt,wt){Re(me,Mt,wt)}function ht(Mt,wt){Re(Pe,Mt,wt)}var lt=null,et=se(71002),ke=se(18459);function vt(Mt,wt,tn){var vn=ve.useRef({});return(!("value"in vn.current)||tn(vn.current.condition,wt))&&(vn.current.value=Mt(),vn.current.condition=wt),vn.current.value}function jt(Mt,wt){typeof Mt=="function"?Mt(wt):(0,et.Z)(Mt)==="object"&&Mt&&"current"in Mt&&(Mt.current=wt)}function tt(){for(var Mt=arguments.length,wt=new Array(Mt),tn=0;tn<Mt;tn++)wt[tn]=arguments[tn];var vn=wt.filter(function(Kn){return Kn});return vn.length<=1?vn[0]:function(Kn){wt.forEach(function(Ar){jt(Ar,Kn)})}}function ut(){for(var Mt=arguments.length,wt=new Array(Mt),tn=0;tn<Mt;tn++)wt[tn]=arguments[tn];return vt(function(){return tt.apply(void 0,wt)},wt,function(vn,Kn){return vn.length===Kn.length&&vn.every(function(Ar,Tr){return Ar===Kn[Tr]})})}function Ee(Mt){var wt,tn,vn=(0,ke.isMemo)(Mt)?Mt.type.type:Mt.type;return!(typeof vn=="function"&&!((wt=vn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Mt=="function"&&!((tn=Mt.prototype)!==null&&tn!==void 0&&tn.render))}var we=ve.createContext(null),je=we,Ye=se(74902),Lt=Me()?ve.useLayoutEffect:ve.useEffect,Ct=Lt,Bt=function(wt,tn){var vn=React.useRef(!0);Lt(function(){if(!vn.current)return wt()},tn),Lt(function(){return vn.current=!1,function(){vn.current=!0}},[])},at=[];function Vt(Mt,wt){var tn=ve.useState(function(){if(!Me())return null;var Wi=document.createElement("div");return Wi}),vn=(0,it.Z)(tn,1),Kn=vn[0],Ar=ve.useRef(!1),Tr=ve.useContext(je),Hr=ve.useState(at),Xr=(0,it.Z)(Hr,2),Zr=Xr[0],wi=Xr[1],ki=Tr||(Ar.current?void 0:function(Wi){wi(function(Xi){var Oe=[Wi].concat((0,Ye.Z)(Xi));return Oe})});function Ri(){Kn.parentElement||document.body.appendChild(Kn),Ar.current=!0}function oa(){var Wi;(Wi=Kn.parentElement)===null||Wi===void 0||Wi.removeChild(Kn),Ar.current=!1}return Ct(function(){return Mt?Tr?Tr(Ri):Ri():oa(),oa},[Mt]),Ct(function(){Zr.length&&(Zr.forEach(function(Wi){return Wi()}),wi(at))},[Zr]),[Kn,ki]}function $t(Mt,wt){if(!Mt)return!1;if(Mt.contains)return Mt.contains(wt);for(var tn=wt;tn;){if(tn===Mt)return!0;tn=tn.parentNode}return!1}var xn="data-rc-order",dt="rc-util-key",on=new Map;function En(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},wt=Mt.mark;return wt?wt.startsWith("data-")?wt:"data-".concat(wt):dt}function yn(Mt){if(Mt.attachTo)return Mt.attachTo;var wt=document.querySelector("head");return wt||document.body}function Ge(Mt){return Mt==="queue"?"prependQueue":Mt?"prepend":"append"}function De(Mt){return Array.from((on.get(Mt)||Mt).children).filter(function(wt){return wt.tagName==="STYLE"})}function Zt(Mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Me())return null;var tn=wt.csp,vn=wt.prepend,Kn=document.createElement("style");Kn.setAttribute(xn,Ge(vn)),tn!=null&&tn.nonce&&(Kn.nonce=tn==null?void 0:tn.nonce),Kn.innerHTML=Mt;var Ar=yn(wt),Tr=Ar.firstChild;if(vn){if(vn==="queue"){var Hr=De(Ar).filter(function(Xr){return["prepend","prependQueue"].includes(Xr.getAttribute(xn))});if(Hr.length)return Ar.insertBefore(Kn,Hr[Hr.length-1].nextSibling),Kn}Ar.insertBefore(Kn,Tr)}else Ar.appendChild(Kn);return Kn}function In(Mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tn=yn(wt);return De(tn).find(function(vn){return vn.getAttribute(En(wt))===Mt})}function fn(Mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tn=In(Mt,wt);if(tn){var vn=yn(wt);vn.removeChild(tn)}}function ot(Mt,wt){var tn=on.get(Mt);if(!tn||!$t(document,tn)){var vn=Zt("",wt),Kn=vn.parentNode;on.set(Mt,Kn),Mt.removeChild(vn)}}function ft(){on.clear()}function Jt(Mt,wt){var tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vn=yn(tn);ot(vn,tn);var Kn=In(wt,tn);if(Kn){var Ar,Tr;if((Ar=tn.csp)!==null&&Ar!==void 0&&Ar.nonce&&Kn.nonce!==((Tr=tn.csp)===null||Tr===void 0?void 0:Tr.nonce)){var Hr;Kn.nonce=(Hr=tn.csp)===null||Hr===void 0?void 0:Hr.nonce}return Kn.innerHTML!==Mt&&(Kn.innerHTML=Mt),Kn}var Xr=Zt(Mt,tn);return Xr.setAttribute(En(tn),wt),Xr}var Bn;function wn(Mt){if(typeof document=="undefined")return 0;if(Mt||Bn===void 0){var wt=document.createElement("div");wt.style.width="100%",wt.style.height="200px";var tn=document.createElement("div"),vn=tn.style;vn.position="absolute",vn.top="0",vn.left="0",vn.pointerEvents="none",vn.visibility="hidden",vn.width="200px",vn.height="150px",vn.overflow="hidden",tn.appendChild(wt),document.body.appendChild(tn);var Kn=wt.offsetWidth;tn.style.overflow="scroll";var Ar=wt.offsetWidth;Kn===Ar&&(Ar=tn.clientWidth),document.body.removeChild(tn),Bn=Kn-Ar}return Bn}function Nt(Mt){var wt=Mt.match(/^(.*)px$/),tn=Number(wt==null?void 0:wt[1]);return Number.isNaN(tn)?wn():tn}function Xt(Mt){if(typeof document=="undefined"||!Mt||!(Mt instanceof Element))return{width:0,height:0};var wt=getComputedStyle(Mt,"::-webkit-scrollbar"),tn=wt.width,vn=wt.height;return{width:Nt(tn),height:Nt(vn)}}function Dn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Mn="rc-util-locker-".concat(Date.now()),Te=0;function de(Mt){var wt=!!Mt,tn=ve.useState(function(){return Te+=1,"".concat(Mn,"_").concat(Te)}),vn=(0,it.Z)(tn,1),Kn=vn[0];Ct(function(){if(wt){var Ar=Xt(document.body).width,Tr=Dn();Jt(`
html body {
overflow-y: hidden;
`.concat(Tr?"width: calc(100% - ".concat(Ar,"px);"):"",`
}`),Kn)}else fn(Kn);return function(){fn(Kn)}},[wt,Kn])}var le=!1;function pe(Mt){return typeof Mt=="boolean"&&(le=Mt),le}var he=function(wt){return wt===!1?!1:!Me()||!wt?null:typeof wt=="string"?document.querySelector(wt):typeof wt=="function"?wt():wt},oe=ve.forwardRef(function(Mt,wt){var tn=Mt.open,vn=Mt.autoLock,Kn=Mt.getContainer,Ar=Mt.debug,Tr=Mt.autoDestroy,Hr=Tr===void 0?!0:Tr,Xr=Mt.children,Zr=ve.useState(tn),wi=(0,it.Z)(Zr,2),ki=wi[0],Ri=wi[1],oa=ki||tn;ve.useEffect(function(){(Hr||tn)&&Ri(tn)},[tn,Hr]);var Wi=ve.useState(function(){return he(Kn)}),Xi=(0,it.Z)(Wi,2),Oe=Xi[0],He=Xi[1];ve.useEffect(function(){var Cn=he(Kn);He(Cn!=null?Cn:null)});var Ke=Vt(oa&&!Oe,Ar),Ve=(0,it.Z)(Ke,2),ct=Ve[0],yt=Ve[1],kt=Oe!=null?Oe:ct;de(vn&&tn&&Me()&&(kt===ct||kt===document.body));var sn=null;if(Xr&&Ee(Xr)&&wt){var dn=Xr;sn=dn.ref}var Gn=ut(sn,wt);if(!oa||!Me()||Oe===void 0)return null;var pr=kt===!1||pe(),Hn=Xr;return wt&&(Hn=ve.cloneElement(Xr,{ref:Gn})),ve.createElement(je.Provider,{value:yt},pr?Hn:(0,Le.createPortal)(Hn,kt))}),Ie=oe,Je=Ie;function _t(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Kt=_t()?ve.useLayoutEffect:ve.useEffect,Ht=function(wt,tn){var vn=ve.useRef(!0);Kt(function(){return wt(vn.current)},tn),Kt(function(){return vn.current=!1,function(){vn.current=!0}},[])},Qt=function(wt,tn){Ht(function(vn){if(!vn)return wt()},tn)},Gt=Ht,nr=ve.createContext(null),gr=ve.createContext({}),Ut=nr,pn=se(4942),ir=se(87462),Lr=se(62874),$n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(wt){var tn=wt.keyCode;if(wt.altKey&&!wt.ctrlKey||wt.metaKey||tn>=$n.F1&&tn<=$n.F12)return!1;switch(tn){case $n.ALT:case $n.CAPS_LOCK:case $n.CONTEXT_MENU:case $n.CTRL:case $n.DOWN:case $n.END:case $n.ESC:case $n.HOME:case $n.INSERT:case $n.LEFT:case $n.MAC_FF_META:case $n.META:case $n.NUMLOCK:case $n.NUM_CENTER:case $n.PAGE_DOWN:case $n.PAGE_UP:case $n.PAUSE:case $n.PRINT_SCREEN:case $n.RIGHT:case $n.SHIFT:case $n.UP:case $n.WIN_KEY:case $n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(wt){if(wt>=$n.ZERO&&wt<=$n.NINE||wt>=$n.NUM_ZERO&&wt<=$n.NUM_MULTIPLY||wt>=$n.A&&wt<=$n.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&wt===0)return!0;switch(wt){case $n.SPACE:case $n.QUESTION_MARK:case $n.NUM_PLUS:case $n.NUM_MINUS:case $n.NUM_PERIOD:case $n.NUM_DIVISION:case $n.SEMICOLON:case $n.DASH:case $n.EQUALS:case $n.COMMA:case $n.PERIOD:case $n.SLASH:case $n.APOSTROPHE:case $n.SINGLE_QUOTE:case $n.OPEN_SQUARE_BRACKET:case $n.BACKSLASH:case $n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Cr=$n,Ii=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,li=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,ci="".concat(Ii," ").concat(li).split(/[\s\n]+/),Jr="aria-",Di="data-";function Ei(Mt,wt){return Mt.indexOf(wt)===0}function Pi(Mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tn;wt===!1?tn={aria:!0,data:!0,attr:!0}:wt===!0?tn={aria:!0}:tn=(0,Fe.Z)({},wt);var vn={};return Object.keys(Mt).forEach(function(Kn){(tn.aria&&(Kn==="role"||Ei(Kn,Jr))||tn.data&&Ei(Kn,Di)||tn.attr&&ci.includes(Kn))&&(vn[Kn]=Mt[Kn])}),vn}function xr(Mt){var wt=React.useRef();wt.current=Mt;var tn=React.useCallback(function(){for(var vn,Kn=arguments.length,Ar=new Array(Kn),Tr=0;Tr<Kn;Tr++)Ar[Tr]=arguments[Tr];return(vn=wt.current)===null||vn===void 0?void 0:vn.call.apply(vn,[wt].concat(Ar))},[]);return tn}function Pr(Mt){var wt=React.useRef(!1),tn=React.useState(Mt),vn=_slicedToArray(tn,2),Kn=vn[0],Ar=vn[1];React.useEffect(function(){return wt.current=!1,function(){wt.current=!0}},[]);function Tr(Hr,Xr){Xr&&wt.current||Ar(Hr)}return[Kn,Tr]}function Gi(Mt){return Mt!==void 0}function ma(Mt,wt){var tn=wt||{},vn=tn.defaultValue,Kn=tn.value,Ar=tn.onChange,Tr=tn.postState,Hr=useState(function(){return Gi(Kn)?Kn:Gi(vn)?typeof vn=="function"?vn():vn:typeof Mt=="function"?Mt():Mt}),Xr=_slicedToArray(Hr,2),Zr=Xr[0],wi=Xr[1],ki=Kn!==void 0?Kn:Zr,Ri=Tr?Tr(ki):ki,oa=useEvent(Ar),Wi=useState([ki]),Xi=_slicedToArray(Wi,2),Oe=Xi[0],He=Xi[1];useLayoutUpdateEffect(function(){var Ve=Oe[0];Zr!==Ve&&oa(Zr,Ve)},[Oe]),useLayoutUpdateEffect(function(){Gi(Kn)||wi(Kn)},[Kn]);var Ke=useEvent(function(Ve,ct){wi(Ve,ct),He([ki],ct)});return[Ri,Ke]}var ba=se(33993);function va(Mt,wt,tn){var vn=ve.useRef({});return(!("value"in vn.current)||tn(vn.current.condition,wt))&&(vn.current.value=Mt(),vn.current.condition=wt),vn.current.value}function Vi(Mt,wt){typeof Mt=="function"?Mt(wt):(0,et.Z)(Mt)==="object"&&Mt&&"current"in Mt&&(Mt.current=wt)}function At(){for(var Mt=arguments.length,wt=new Array(Mt),tn=0;tn<Mt;tn++)wt[tn]=arguments[tn];var vn=wt.filter(function(Kn){return Kn});return vn.length<=1?vn[0]:function(Kn){wt.forEach(function(Ar){Vi(Ar,Kn)})}}function On(){for(var Mt=arguments.length,wt=new Array(Mt),tn=0;tn<Mt;tn++)wt[tn]=arguments[tn];return va(function(){return At.apply(void 0,wt)},wt,function(vn,Kn){return vn.length!==Kn.length||vn.every(function(Ar,Tr){return Ar!==Kn[Tr]})})}function Pt(Mt){var wt,tn,vn=isMemo(Mt)?Mt.type.type:Mt.type;return!(typeof vn=="function"&&!((wt=vn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Mt=="function"&&!((tn=Mt.prototype)!==null&&tn!==void 0&&tn.render))}function zt(Mt){return!isValidElement(Mt)||isFragment(Mt)?!1:Pt(Mt)}function rn(Mt,wt,tn,vn){if(!wt.length)return tn;var Kn=_toArray(wt),Ar=Kn[0],Tr=Kn.slice(1),Hr;return!Mt&&typeof Ar=="number"?Hr=[]:Array.isArray(Mt)?Hr=_toConsumableArray(Mt):Hr=_objectSpread({},Mt),vn&&tn===void 0&&Tr.length===1?delete Hr[Ar][Tr[0]]:Hr[Ar]=rn(Hr[Ar],Tr,tn,vn),Hr}function cn(Mt,wt,tn){var vn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return wt.length&&vn&&tn===void 0&&!get(Mt,wt.slice(0,-1))?Mt:rn(Mt,wt,tn,vn)}function Vn(Mt){return _typeof(Mt)==="object"&&Mt!==null&&Object.getPrototypeOf(Mt)===Object.prototype}function Nn(Mt){return Array.isArray(Mt)?[]:{}}var Qe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function rt(){for(var Mt=arguments.length,wt=new Array(Mt),tn=0;tn<Mt;tn++)wt[tn]=arguments[tn];var vn=Nn(wt[0]);return wt.forEach(function(Kn){function Ar(Tr,Hr){var Xr=new Set(Hr),Zr=get(Kn,Tr),wi=Array.isArray(Zr);if(wi||Vn(Zr)){if(!Xr.has(Zr)){Xr.add(Zr);var ki=get(vn,Tr);wi?vn=cn(vn,Tr,[]):(!ki||_typeof(ki)!=="object")&&(vn=cn(vn,Tr,Nn(Zr))),Qe(Zr).forEach(function(Ri){Ar([].concat(_toConsumableArray(Tr),[Ri]),Xr)})}}else vn=cn(vn,Tr,Zr)}Ar([])}),vn}var pt={},Rt=[],We=function(wt){Rt.push(wt)};function mt(Mt,wt){if(0)var tn}function Dt(Mt,wt){if(0)var tn}function gt(){pt={}}function qt(Mt,wt,tn){!wt&&!pt[tn]&&(Mt(!1,tn),pt[tn]=!0)}function Yt(Mt,wt){qt(mt,Mt,wt)}function Rn(Mt,wt){qt(Dt,Mt,wt)}Yt.preMessage=We,Yt.resetWarned=gt,Yt.noteOnce=Rn;var br=Yt,Wn=function(wt){var tn=wt.prefixCls,vn=wt.className,Kn=wt.style,Ar=wt.children,Tr=wt.containerRef,Hr=wt.id,Xr=wt.onMouseEnter,Zr=wt.onMouseOver,wi=wt.onMouseLeave,ki=wt.onClick,Ri=wt.onKeyDown,oa=wt.onKeyUp,Wi={onMouseEnter:Xr,onMouseOver:Zr,onMouseLeave:wi,onClick:ki,onKeyDown:Ri,onKeyUp:oa},Xi=ve.useContext(gr),Oe=Xi.panel,He=On(Oe,Tr);return ve.createElement(ve.Fragment,null,ve.createElement("div",(0,ir.Z)({id:Hr,className:Ue()("".concat(tn,"-content"),vn),style:(0,Fe.Z)({},Kn),"aria-modal":"true",role:"dialog",ref:He},Wi),Ar))},Jn=Wn;function or(Mt){return typeof Mt=="string"&&String(Number(Mt))===Mt?(br(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Mt)):Mt}function lr(Mt){warning(!("wrapperClassName"in Mt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Mt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Rr={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function bn(Mt,wt){var tn,vn,Kn,Ar,Tr=Mt.prefixCls,Hr=Mt.open,Xr=Mt.placement,Zr=Mt.inline,wi=Mt.push,ki=Mt.forceRender,Ri=Mt.autoFocus,oa=Mt.keyboard,Wi=Mt.rootClassName,Xi=Mt.rootStyle,Oe=Mt.zIndex,He=Mt.className,Ke=Mt.id,Ve=Mt.style,ct=Mt.motion,yt=Mt.width,kt=Mt.height,sn=Mt.children,dn=Mt.contentWrapperStyle,Gn=Mt.mask,pr=Mt.maskClosable,Hn=Mt.maskMotion,Cn=Mt.maskClassName,gn=Mt.maskStyle,Pn=Mt.afterOpenChange,Fn=Mt.onClose,dr=Mt.onMouseEnter,Xn=Mt.onMouseOver,Zn=Mt.onMouseLeave,Qn=Mt.onClick,Ze=Mt.onKeyDown,ze=Mt.onKeyUp,xe=ve.useRef(),Ae=ve.useRef(),qe=ve.useRef();ve.useImperativeHandle(wt,function(){return xe.current});var Xe=function(ar){var Mr=ar.keyCode,Nr=ar.shiftKey;switch(Mr){case Cr.TAB:{if(Mr===Cr.TAB){if(!Nr&&document.activeElement===qe.current){var rr;(rr=Ae.current)===null||rr===void 0||rr.focus({preventScroll:!0})}else if(Nr&&document.activeElement===Ae.current){var Dr;(Dr=qe.current)===null||Dr===void 0||Dr.focus({preventScroll:!0})}}break}case Cr.ESC:{Fn&&oa&&(ar.stopPropagation(),Fn(ar));break}}};ve.useEffect(function(){if(Hr&&Ri){var jn;(jn=xe.current)===null||jn===void 0||jn.focus({preventScroll:!0})}},[Hr]);var St=ve.useState(!1),Ft=(0,it.Z)(St,2),Wt=Ft[0],an=Ft[1],nn=ve.useContext(Ut),Ot;wi===!1?Ot={distance:0}:wi===!0?Ot={}:Ot=wi||{};var un=(tn=(vn=(Kn=Ot)===null||Kn===void 0?void 0:Kn.distance)!==null&&vn!==void 0?vn:nn==null?void 0:nn.pushDistance)!==null&&tn!==void 0?tn:180,hn=ve.useMemo(function(){return{pushDistance:un,push:function(){an(!0)},pull:function(){an(!1)}}},[un]);ve.useEffect(function(){if(Hr){var jn;nn==null||(jn=nn.push)===null||jn===void 0||jn.call(nn)}else{var ar;nn==null||(ar=nn.pull)===null||ar===void 0||ar.call(nn)}},[Hr]),ve.useEffect(function(){return function(){var jn;nn==null||(jn=nn.pull)===null||jn===void 0||jn.call(nn)}},[]);var zn=Gn&&ve.createElement(Lr.Z,(0,ir.Z)({key:"mask"},Hn,{visible:Hr}),function(jn,ar){var Mr=jn.className,Nr=jn.style;return ve.createElement("div",{className:Ue()("".concat(Tr,"-mask"),Mr,Cn),style:(0,Fe.Z)((0,Fe.Z)({},Nr),gn),onClick:pr&&Hr?Fn:void 0,ref:ar})}),Sn=typeof ct=="function"?ct(Xr):ct,qn={};if(Wt&&un)switch(Xr){case"top":qn.transform="translateY(".concat(un,"px)");break;case"bottom":qn.transform="translateY(".concat(-un,"px)");break;case"left":qn.transform="translateX(".concat(un,"px)");break;default:qn.transform="translateX(".concat(-un,"px)");break}Xr==="left"||Xr==="right"?qn.width=or(yt):qn.height=or(kt);var fr={onMouseEnter:dr,onMouseOver:Xn,onMouseLeave:Zn,onClick:Qn,onKeyDown:Ze,onKeyUp:ze},er=ve.createElement(Lr.Z,(0,ir.Z)({key:"panel"},Sn,{visible:Hr,forceRender:ki,onVisibleChanged:function(ar){Pn==null||Pn(ar)},removeOnLeave:!1,leavedClassName:"".concat(Tr,"-content-wrapper-hidden")}),function(jn,ar){var Mr=jn.className,Nr=jn.style;return ve.createElement("div",(0,ir.Z)({className:Ue()("".concat(Tr,"-content-wrapper"),Mr),style:(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},qn),Nr),dn)},Pi(Mt,{data:!0})),ve.createElement(Jn,(0,ir.Z)({id:Ke,containerRef:ar,prefixCls:Tr,className:He,style:Ve},fr),sn))}),mr=(0,Fe.Z)({},Xi);return Oe&&(mr.zIndex=Oe),ve.createElement(Ut.Provider,{value:hn},ve.createElement("div",{className:Ue()(Tr,"".concat(Tr,"-").concat(Xr),Wi,(Ar={},(0,pn.Z)(Ar,"".concat(Tr,"-open"),Hr),(0,pn.Z)(Ar,"".concat(Tr,"-inline"),Zr),Ar)),style:mr,tabIndex:-1,ref:xe,onKeyDown:Xe},zn,ve.createElement("div",{tabIndex:0,ref:Ae,style:Rr,"aria-hidden":"true","data-sentinel":"start"}),er,ve.createElement("div",{tabIndex:0,ref:qe,style:Rr,"aria-hidden":"true","data-sentinel":"end"})))}var An=ve.forwardRef(bn),hi=An,xi=function(wt){var tn=wt.open,vn=tn===void 0?!1:tn,Kn=wt.prefixCls,Ar=Kn===void 0?"rc-drawer":Kn,Tr=wt.placement,Hr=Tr===void 0?"right":Tr,Xr=wt.autoFocus,Zr=Xr===void 0?!0:Xr,wi=wt.keyboard,ki=wi===void 0?!0:wi,Ri=wt.width,oa=Ri===void 0?378:Ri,Wi=wt.mask,Xi=Wi===void 0?!0:Wi,Oe=wt.maskClosable,He=Oe===void 0?!0:Oe,Ke=wt.getContainer,Ve=wt.forceRender,ct=wt.afterOpenChange,yt=wt.destroyOnClose,kt=wt.onMouseEnter,sn=wt.onMouseOver,dn=wt.onMouseLeave,Gn=wt.onClick,pr=wt.onKeyDown,Hn=wt.onKeyUp,Cn=wt.panelRef,gn=ve.useState(!1),Pn=(0,it.Z)(gn,2),Fn=Pn[0],dr=Pn[1],Xn=ve.useState(!1),Zn=(0,it.Z)(Xn,2),Qn=Zn[0],Ze=Zn[1];Gt(function(){Ze(!0)},[]);var ze=Qn?vn:!1,xe=ve.useRef(),Ae=ve.useRef();Gt(function(){ze&&(Ae.current=document.activeElement)},[ze]);var qe=function(an){var nn;if(dr(an),ct==null||ct(an),!an&&Ae.current&&!((nn=xe.current)!==null&&nn!==void 0&&nn.contains(Ae.current))){var Ot;(Ot=Ae.current)===null||Ot===void 0||Ot.focus({preventScroll:!0})}},Xe=ve.useMemo(function(){return{panel:Cn}},[Cn]);if(!Ve&&!Fn&&!ze&&yt)return null;var St={onMouseEnter:kt,onMouseOver:sn,onMouseLeave:dn,onClick:Gn,onKeyDown:pr,onKeyUp:Hn},Ft=(0,Fe.Z)((0,Fe.Z)({},wt),{},{open:ze,prefixCls:Ar,placement:Hr,autoFocus:Zr,keyboard:ki,width:oa,mask:Xi,maskClosable:He,inline:Ke===!1,afterOpenChange:qe,ref:xe},St);return ve.createElement(gr.Provider,{value:Xe},ve.createElement(Je,{open:ze||Ve||Fn,autoDestroy:!1,getContainer:Ke,autoLock:Xi&&(ze||Fn)},ve.createElement(hi,Ft)))},ai=xi,sr=ai,vi=se(33603),ur=se(53124),Qr=se(65223),kn=se(69760),zi=Mt=>{const{prefixCls:wt,title:tn,footer:vn,extra:Kn,closeIcon:Ar,closable:Tr,onClose:Hr,headerStyle:Xr,drawerStyle:Zr,bodyStyle:wi,footerStyle:ki,children:Ri}=Mt,oa=ve.useCallback(Ke=>ve.createElement("button",{type:"button",onClick:Hr,"aria-label":"Close",className:`${wt}-close`},Ke),[Hr]),[Wi,Xi]=(0,kn.Z)(Tr,Ar,oa,void 0,!0),Oe=ve.useMemo(()=>!tn&&!Wi?null:ve.createElement("div",{style:Xr,className:Ue()(`${wt}-header`,{[`${wt}-header-close-only`]:Wi&&!tn&&!Kn})},ve.createElement("div",{className:`${wt}-header-title`},Xi,tn&&ve.createElement("div",{className:`${wt}-title`},tn)),Kn&&ve.createElement("div",{className:`${wt}-extra`},Kn)),[Wi,Xi,Kn,Xr,wt,tn]),He=ve.useMemo(()=>{if(!vn)return null;const Ke=`${wt}-footer`;return ve.createElement("div",{className:Ke,style:ki},vn)},[vn,ki,wt]);return ve.createElement("div",{className:`${wt}-wrapper-body`,style:Zr},Oe,ve.createElement("div",{className:`${wt}-body`,style:wi},Ri),He)},Ma=se(4173),Ji=se(67968),Zi=se(45503),aa=Mt=>{const{componentCls:wt,motionDurationSlow:tn}=Mt,vn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${tn}`}}};return{[wt]:{[`${wt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${tn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${wt}-panel-motion`]:{"&-left":[vn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[vn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[vn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[vn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Ni=Mt=>{const{componentCls:wt,zIndexPopup:tn,colorBgMask:vn,colorBgElevated:Kn,motionDurationSlow:Ar,motionDurationMid:Tr,padding:Hr,paddingLG:Xr,fontSizeLG:Zr,lineHeightLG:wi,lineWidth:ki,lineType:Ri,colorSplit:oa,marginSM:Wi,colorIcon:Xi,colorIconHover:Oe,colorText:He,fontWeightStrong:Ke,footerPaddingBlock:Ve,footerPaddingInline:ct}=Mt,yt=`${wt}-content-wrapper`;return{[wt]:{position:"fixed",inset:0,zIndex:tn,pointerEvents:"none","&-pure":{position:"relative",background:Kn,[`&${wt}-left`]:{boxShadow:Mt.boxShadowDrawerLeft},[`&${wt}-right`]:{boxShadow:Mt.boxShadowDrawerRight},[`&${wt}-top`]:{boxShadow:Mt.boxShadowDrawerUp},[`&${wt}-bottom`]:{boxShadow:Mt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${wt}-mask`]:{position:"absolute",inset:0,zIndex:tn,background:vn,pointerEvents:"auto"},[yt]:{position:"absolute",zIndex:tn,maxWidth:"100vw",transition:`all ${Ar}`,"&-hidden":{display:"none"}},[`&-left > ${yt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Mt.boxShadowDrawerLeft},[`&-right > ${yt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Mt.boxShadowDrawerRight},[`&-top > ${yt}`]:{top:0,insetInline:0,boxShadow:Mt.boxShadowDrawerUp},[`&-bottom > ${yt}`]:{bottom:0,insetInline:0,boxShadow:Mt.boxShadowDrawerDown},[`${wt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Kn,pointerEvents:"auto"},[`${wt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${wt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Hr}px ${Xr}px`,fontSize:Zr,lineHeight:wi,borderBottom:`${ki}px ${Ri} ${oa}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${wt}-extra`]:{flex:"none"},[`${wt}-close`]:{display:"inline-block",marginInlineEnd:Wi,color:Xi,fontWeight:Ke,fontSize:Zr,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Tr}`,textRendering:"auto","&:focus, &:hover":{color:Oe,textDecoration:"none"}},[`${wt}-title`]:{flex:1,margin:0,color:He,fontWeight:Mt.fontWeightStrong,fontSize:Zr,lineHeight:wi},[`${wt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Xr,overflow:"auto"},[`${wt}-footer`]:{flexShrink:0,padding:`${Ve}px ${ct}px`,borderTop:`${ki}px ${Ri} ${oa}`},"&-rtl":{direction:"rtl"}}}};var fa=(0,Ji.Z)("Drawer",Mt=>{const wt=(0,Zi.TS)(Mt,{});return[Ni(wt),aa(wt)]},Mt=>({zIndexPopup:Mt.zIndexPopupBase,footerPaddingBlock:Mt.paddingXS,footerPaddingInline:Mt.padding})),Ta=se(16569),ga=function(Mt,wt){var tn={};for(var vn in Mt)Object.prototype.hasOwnProperty.call(Mt,vn)&&wt.indexOf(vn)<0&&(tn[vn]=Mt[vn]);if(Mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kn=0,vn=Object.getOwnPropertySymbols(Mt);Kn<vn.length;Kn++)wt.indexOf(vn[Kn])<0&&Object.prototype.propertyIsEnumerable.call(Mt,vn[Kn])&&(tn[vn[Kn]]=Mt[vn[Kn]]);return tn};const Hi=null,Ia={distance:180},Oa=Mt=>{var wt;const{rootClassName:tn,width:vn,height:Kn,size:Ar="default",mask:Tr=!0,push:Hr=Ia,open:Xr,afterOpenChange:Zr,onClose:wi,prefixCls:ki,getContainer:Ri,style:oa,className:Wi,visible:Xi,afterVisibleChange:Oe}=Mt,He=ga(Mt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Ke,getPrefixCls:Ve,direction:ct,drawer:yt}=ve.useContext(ur.E_),kt=Ve("drawer",ki),[sn,dn]=fa(kt),Gn=Ri===void 0&&Ke?()=>Ke(document.body):Ri,pr=Ue()({"no-mask":!Tr,[`${kt}-rtl`]:ct==="rtl"},tn,dn),Hn=ve.useMemo(()=>vn!=null?vn:Ar==="large"?736:378,[vn,Ar]),Cn=ve.useMemo(()=>Kn!=null?Kn:Ar==="large"?736:378,[Kn,Ar]),gn={motionName:(0,vi.m)(kt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Pn=dr=>({motionName:(0,vi.m)(kt,`panel-motion-${dr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Fn=(0,Ta.H)();return sn(ve.createElement(Ma.BR,null,ve.createElement(Qr.Ux,{status:!0,override:!0},ve.createElement(sr,Object.assign({prefixCls:kt,onClose:wi,maskMotion:gn,motion:Pn},He,{open:Xr!=null?Xr:Xi,mask:Tr,push:Hr,width:Hn,height:Cn,style:Object.assign(Object.assign({},yt==null?void 0:yt.style),oa),className:Ue()(yt==null?void 0:yt.className,Wi),rootClassName:pr,getContainer:Gn,afterOpenChange:Zr!=null?Zr:Oe,panelRef:Fn}),ve.createElement(zi,Object.assign({prefixCls:kt},He,{onClose:wi}))))))},wa=Mt=>{const{prefixCls:wt,style:tn,className:vn,placement:Kn="right"}=Mt,Ar=ga(Mt,["prefixCls","style","className","placement"]),{getPrefixCls:Tr}=ve.useContext(ur.E_),Hr=Tr("drawer",wt),[Xr,Zr]=fa(Hr),wi=Ue()(Hr,`${Hr}-pure`,`${Hr}-${Kn}`,Zr,vn);return Xr(ve.createElement("div",{className:wi,style:tn},ve.createElement(zi,Object.assign({prefixCls:Hr},Ar))))};Oa._InternalPanelDoNotUseOrYouWillBeFired=wa;var _i=Oa},35874:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return he}});var ce=se(67294),Ue=se(91034),Fe=se(94184),it=se.n(Fe),ve=se(87462),Le=se(4942),Me=se(97685),Se=se(45987),me=se(62709),Pe=se(71002),st=se(12060);function Re(oe,Ie,Je){var _t=React.useRef({});return(!("value"in _t.current)||Je(_t.current.condition,Ie))&&(_t.current.value=oe(),_t.current.condition=Ie),_t.current.value}function Et(oe,Ie){typeof oe=="function"?oe(Ie):(0,Pe.Z)(oe)==="object"&&oe&&"current"in oe&&(oe.current=Ie)}function ht(){for(var oe=arguments.length,Ie=new Array(oe),Je=0;Je<oe;Je++)Ie[Je]=arguments[Je];var _t=Ie.filter(function(Kt){return Kt});return _t.length<=1?_t[0]:function(Kt){Ie.forEach(function(Ht){Et(Ht,Kt)})}}function lt(){for(var oe=arguments.length,Ie=new Array(oe),Je=0;Je<oe;Je++)Ie[Je]=arguments[Je];return useMemo(function(){return ht.apply(void 0,Ie)},Ie,function(_t,Kt){return _t.length===Kt.length&&_t.every(function(Ht,Qt){return Ht===Kt[Qt]})})}function et(oe){var Ie,Je,_t=(0,st.isMemo)(oe)?oe.type.type:oe.type;return!(typeof _t=="function"&&!((Ie=_t.prototype)!==null&&Ie!==void 0&&Ie.render)||typeof oe=="function"&&!((Je=oe.prototype)!==null&&Je!==void 0&&Je.render))}var ke={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ie){var Je=Ie.keyCode;if(Ie.altKey&&!Ie.ctrlKey||Ie.metaKey||Je>=ke.F1&&Je<=ke.F12)return!1;switch(Je){case ke.ALT:case ke.CAPS_LOCK:case ke.CONTEXT_MENU:case ke.CTRL:case ke.DOWN:case ke.END:case ke.ESC:case ke.HOME:case ke.INSERT:case ke.LEFT:case ke.MAC_FF_META:case ke.META:case ke.NUMLOCK:case ke.NUM_CENTER:case ke.PAGE_DOWN:case ke.PAGE_UP:case ke.PAUSE:case ke.PRINT_SCREEN:case ke.RIGHT:case ke.SHIFT:case ke.UP:case ke.WIN_KEY:case ke.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ie){if(Ie>=ke.ZERO&&Ie<=ke.NINE||Ie>=ke.NUM_ZERO&&Ie<=ke.NUM_MULTIPLY||Ie>=ke.A&&Ie<=ke.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ie===0)return!0;switch(Ie){case ke.SPACE:case ke.QUESTION_MARK:case ke.NUM_PLUS:case ke.NUM_MINUS:case ke.NUM_PERIOD:case ke.NUM_DIVISION:case ke.SEMICOLON:case ke.DASH:case ke.EQUALS:case ke.COMMA:case ke.PERIOD:case ke.SLASH:case ke.APOSTROPHE:case ke.SINGLE_QUOTE:case ke.OPEN_SQUARE_BRACKET:case ke.BACKSLASH:case ke.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},vt=ke,jt=function(Ie){return+setTimeout(Ie,16)},tt=function(Ie){return clearTimeout(Ie)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(jt=function(Ie){return window.requestAnimationFrame(Ie)},tt=function(Ie){return window.cancelAnimationFrame(Ie)});var ut=0,Ee=new Map;function we(oe){Ee.delete(oe)}var je=function(Ie){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ut+=1;var _t=ut;function Kt(Ht){if(Ht===0)we(_t),Ie();else{var Qt=jt(function(){Kt(Ht-1)});Ee.set(_t,Qt)}}return Kt(Je),_t};je.cancel=function(oe){var Ie=Ee.get(oe);return we(Ie),tt(Ie)};var Ye=je,Lt=vt.ESC,Ct=vt.TAB;function Bt(oe){var Ie=oe.visible,Je=oe.triggerRef,_t=oe.onVisibleChange,Kt=oe.autoFocus,Ht=oe.overlayRef,Qt=ce.useRef(!1),Gt=function(){if(Ie){var pn,ir;(pn=Je.current)===null||pn===void 0||(ir=pn.focus)===null||ir===void 0||ir.call(pn),_t==null||_t(!1)}},nr=function(){var pn;return(pn=Ht.current)!==null&&pn!==void 0&&pn.focus?(Ht.current.focus(),Qt.current=!0,!0):!1},gr=function(pn){switch(pn.keyCode){case Lt:Gt();break;case Ct:{var ir=!1;Qt.current||(ir=nr()),ir?pn.preventDefault():Gt();break}}};ce.useEffect(function(){return Ie?(window.addEventListener("keydown",gr),Kt&&Ye(nr,3),function(){window.removeEventListener("keydown",gr),Qt.current=!1}):function(){Qt.current=!1}},[Ie])}var at=(0,ce.forwardRef)(function(oe,Ie){var Je=oe.overlay,_t=oe.arrow,Kt=oe.prefixCls,Ht=(0,ce.useMemo)(function(){var Gt;return typeof Je=="function"?Gt=Je():Gt=Je,Gt},[Je]),Qt=ht(Ie,Ht==null?void 0:Ht.ref);return ce.createElement(ce.Fragment,null,_t&&ce.createElement("div",{className:"".concat(Kt,"-arrow")}),ce.cloneElement(Ht,{ref:et(Ht)?Qt:void 0}))}),Vt=at,$t={adjustX:1,adjustY:1},xn=[0,0],dt={topLeft:{points:["bl","tl"],overflow:$t,offset:[0,-4],targetOffset:xn},top:{points:["bc","tc"],overflow:$t,offset:[0,-4],targetOffset:xn},topRight:{points:["br","tr"],overflow:$t,offset:[0,-4],targetOffset:xn},bottomLeft:{points:["tl","bl"],overflow:$t,offset:[0,4],targetOffset:xn},bottom:{points:["tc","bc"],overflow:$t,offset:[0,4],targetOffset:xn},bottomRight:{points:["tr","br"],overflow:$t,offset:[0,4],targetOffset:xn}},on=dt,En=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function yn(oe,Ie){var Je,_t=oe.arrow,Kt=_t===void 0?!1:_t,Ht=oe.prefixCls,Qt=Ht===void 0?"rc-dropdown":Ht,Gt=oe.transitionName,nr=oe.animation,gr=oe.align,Ut=oe.placement,pn=Ut===void 0?"bottomLeft":Ut,ir=oe.placements,Lr=ir===void 0?on:ir,$n=oe.getPopupContainer,Cr=oe.showAction,Ii=oe.hideAction,li=oe.overlayClassName,ci=oe.overlayStyle,Jr=oe.visible,Di=oe.trigger,Ei=Di===void 0?["hover"]:Di,Pi=oe.autoFocus,xr=oe.overlay,Pr=oe.children,Gi=oe.onVisibleChange,ma=(0,Se.Z)(oe,En),ba=ce.useState(),va=(0,Me.Z)(ba,2),Vi=va[0],At=va[1],On="visible"in oe?Jr:Vi,Pt=ce.useRef(null),zt=ce.useRef(null),rn=ce.useRef(null);ce.useImperativeHandle(Ie,function(){return Pt.current});var cn=function(Dt){At(Dt),Gi==null||Gi(Dt)};Bt({visible:On,triggerRef:rn,onVisibleChange:cn,autoFocus:Pi,overlayRef:zt});var Vn=function(Dt){var gt=oe.onOverlayClick;At(!1),gt&&gt(Dt)},Nn=function(){return ce.createElement(Vt,{ref:zt,overlay:xr,prefixCls:Qt,arrow:Kt})},Qe=function(){return typeof xr=="function"?Nn:Nn()},rt=function(){var Dt=oe.minOverlayWidthMatchTrigger,gt=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?Dt:!gt},pt=function(){var Dt=oe.openClassName;return Dt!==void 0?Dt:"".concat(Qt,"-open")},Rt=ce.cloneElement(Pr,{className:it()((Je=Pr.props)===null||Je===void 0?void 0:Je.className,On&&pt()),ref:et(Pr)?ht(rn,Pr.ref):void 0}),We=Ii;return!We&&Ei.indexOf("contextMenu")!==-1&&(We=["click"]),ce.createElement(me.Z,(0,ve.Z)({builtinPlacements:Lr},ma,{prefixCls:Qt,ref:Pt,popupClassName:it()(li,(0,Le.Z)({},"".concat(Qt,"-show-arrow"),Kt)),popupStyle:ci,action:Ei,showAction:Cr,hideAction:We,popupPlacement:pn,popupAlign:gr,popupTransitionName:Gt,popupAnimation:nr,popupVisible:On,stretch:rt()?"minWidth":"",popup:Qe(),onPopupVisibleChange:cn,onPopupClick:Vn,getPopupContainer:$n}),Rt)}var Ge=ce.forwardRef(yn),De=Ge,Zt=se(60276),In=se(5663),fn=se(10366),ot=se(80636),ft=se(8745),Jt=se(96159),Bn=se(53124),wn=se(68508),Nt=se(76529),Xt=se(29691),Dn=se(66748);const Mn=null,Te=oe=>{const{menu:Ie,arrow:Je,prefixCls:_t,children:Kt,trigger:Ht,disabled:Qt,dropdownRender:Gt,getPopupContainer:nr,overlayClassName:gr,rootClassName:Ut,open:pn,onOpenChange:ir,visible:Lr,onVisibleChange:$n,mouseEnterDelay:Cr=.15,mouseLeaveDelay:Ii=.1,autoAdjustOverflow:li=!0,placement:ci="",overlay:Jr,transitionName:Di}=oe,{getPopupContainer:Ei,getPrefixCls:Pi,direction:xr}=ce.useContext(Bn.E_),Pr=ce.useMemo(()=>{const Rt=Pi();return Di!==void 0?Di:ci.includes("top")?`${Rt}-slide-down`:`${Rt}-slide-up`},[Pi,ci,Di]),Gi=ce.useMemo(()=>ci?ci.includes("Center")?ci.slice(0,ci.indexOf("Center")):ci:xr==="rtl"?"bottomRight":"bottomLeft",[ci,xr]),ma=Pi("dropdown",_t),[ba,va]=(0,Dn.Z)(ma),[,Vi]=(0,Xt.Z)(),At=ce.Children.only(Kt),On=(0,Jt.Tm)(At,{className:it()(`${ma}-trigger`,{[`${ma}-rtl`]:xr==="rtl"},At.props.className),disabled:Qt}),Pt=Qt?[]:Ht;let zt;Pt&&Pt.includes("contextMenu")&&(zt=!0);const[rn,cn]=(0,In.Z)(!1,{value:pn!=null?pn:Lr}),Vn=(0,Zt.useEvent)(Rt=>{ir==null||ir(Rt),$n==null||$n(Rt),cn(Rt)}),Nn=it()(gr,Ut,va,{[`${ma}-rtl`]:xr==="rtl"}),Qe=(0,ot.Z)({arrowPointAtCenter:typeof Je=="object"&&Je.pointAtCenter,autoAdjustOverflow:li,offset:Vi.marginXXS,arrowWidth:Je?Vi.sizePopupArrow:0,borderRadius:Vi.borderRadius}),rt=ce.useCallback(()=>{cn(!1)},[]),pt=()=>{let Rt;return Ie!=null&&Ie.items?Rt=ce.createElement(wn.default,Object.assign({},Ie)):typeof Jr=="function"?Rt=Jr():Rt=Jr,Gt&&(Rt=Gt(Rt)),Rt=ce.Children.only(typeof Rt=="string"?ce.createElement("span",null,Rt):Rt),ce.createElement(Nt.J,{prefixCls:`${ma}-menu`,expandIcon:ce.createElement("span",{className:`${ma}-menu-submenu-arrow`},ce.createElement(Ue.Z,{className:`${ma}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:rt,validator:We=>{let{mode:mt}=We}},Rt)};return ba(ce.createElement(De,Object.assign({alignPoint:zt},(0,fn.Z)(oe,["rootClassName"]),{mouseEnterDelay:Cr,mouseLeaveDelay:Ii,visible:rn,builtinPlacements:Qe,arrow:!!Je,overlayClassName:Nn,prefixCls:ma,getPopupContainer:nr||Ei,transitionName:Pr,trigger:Pt,overlay:pt,placement:Gi,onVisibleChange:Vn}),On))};function de(oe){return Object.assign(Object.assign({},oe),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,ft.Z)(Te,"dropdown",oe=>oe,de),pe=oe=>ce.createElement(le,Object.assign({},oe),ce.createElement("span",null));Te._InternalPanelDoNotUseOrYouWillBeFired=pe;var he=Te},85418:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return lt}});var ce=se(35874),Ue=se(94184),Fe=se.n(Ue),it=se(67294),ve=se(25877),Le=se(71577),Me=se(53124),Se=se(93421),me=se(4173),Pe=se(66748),st=function(et,ke){var vt={};for(var jt in et)Object.prototype.hasOwnProperty.call(et,jt)&&ke.indexOf(jt)<0&&(vt[jt]=et[jt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var tt=0,jt=Object.getOwnPropertySymbols(et);tt<jt.length;tt++)ke.indexOf(jt[tt])<0&&Object.prototype.propertyIsEnumerable.call(et,jt[tt])&&(vt[jt[tt]]=et[jt[tt]]);return vt};const Re=et=>{const{getPopupContainer:ke,getPrefixCls:vt,direction:jt}=it.useContext(Me.E_),{prefixCls:tt,type:ut="default",danger:Ee,disabled:we,loading:je,onClick:Ye,htmlType:Lt,children:Ct,className:Bt,menu:at,arrow:Vt,autoFocus:$t,overlay:xn,trigger:dt,align:on,open:En,onOpenChange:yn,placement:Ge,getPopupContainer:De,href:Zt,icon:In=it.createElement(ve.Z,null),title:fn,buttonsRender:ot=Qt=>Qt,mouseEnterDelay:ft,mouseLeaveDelay:Jt,overlayClassName:Bn,overlayStyle:wn,destroyPopupOnHide:Nt,dropdownRender:Xt}=et,Dn=st(et,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Mn=vt("dropdown",tt),Te=`${Mn}-button`,[de,le]=(0,Pe.Z)(Mn),pe={menu:at,arrow:Vt,autoFocus:$t,align:on,disabled:we,trigger:we?[]:dt,onOpenChange:yn,getPopupContainer:De||ke,mouseEnterDelay:ft,mouseLeaveDelay:Jt,overlayClassName:Bn,overlayStyle:wn,destroyPopupOnHide:Nt,dropdownRender:Xt},{compactSize:he,compactItemClassnames:oe}=(0,me.ri)(Mn,jt),Ie=Fe()(Te,oe,Bt,le);"overlay"in et&&(pe.overlay=xn),"open"in et&&(pe.open=En),"placement"in et?pe.placement=Ge:pe.placement=jt==="rtl"?"bottomLeft":"bottomRight";const Je=it.createElement(Le.ZP,{type:ut,danger:Ee,disabled:we,loading:je,onClick:Ye,htmlType:Lt,href:Zt,title:fn},Ct),_t=it.createElement(Le.ZP,{type:ut,danger:Ee,icon:In}),[Kt,Ht]=ot([Je,_t]);return de(it.createElement(Se.Z.Compact,Object.assign({className:Ie,size:he,block:!0},Dn),Kt,it.createElement(ce.Z,Object.assign({},pe),Ht)))};Re.__ANT_BUTTON=!0;var Et=Re;const ht=ce.Z;ht.Button=Et;var lt=ht},66748:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return st}});var ce=se(14747),Ue=se(67771),Fe=se(33297),it=se(50438),ve=se(97414),Le=se(67968),Me=se(45503),me=Re=>{const{componentCls:Et,menuCls:ht,colorError:lt,colorTextLightSolid:et}=Re,ke=`${ht}-item`;return{[`${Et}, ${Et}-menu-submenu`]:{[`${ht} ${ke}`]:{[`&${ke}-danger:not(${ke}-disabled)`]:{color:lt,"&:hover":{color:et,backgroundColor:lt}}}}}};const Pe=Re=>{const{componentCls:Et,menuCls:ht,zIndexPopup:lt,dropdownArrowDistance:et,sizePopupArrow:ke,antCls:vt,iconCls:jt,motionDurationMid:tt,dropdownPaddingVertical:ut,fontSize:Ee,dropdownEdgeChildPadding:we,colorTextDisabled:je,fontSizeIcon:Ye,controlPaddingHorizontal:Lt,colorBgElevated:Ct}=Re;return[{[Et]:Object.assign(Object.assign({},(0,ce.Wf)(Re)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:lt,display:"block","&::before":{position:"absolute",insetBlock:-et+ke/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${vt}-btn`]:{[`& > ${jt}-down, & > ${vt}-btn-icon > ${jt}-down`]:{fontSize:Ye}},[`${Et}-wrap`]:{position:"relative",[`${vt}-btn > ${jt}-down`]:{fontSize:Ye},[`${jt}-down::before`]:{transition:`transform ${tt}`}},[`${Et}-wrap-open`]:{[`${jt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${vt}-slide-down-enter${vt}-slide-down-enter-active${Et}-placement-bottomLeft,
&${vt}-slide-down-appear${vt}-slide-down-appear-active${Et}-placement-bottomLeft,
&${vt}-slide-down-enter${vt}-slide-down-enter-active${Et}-placement-bottom,
&${vt}-slide-down-appear${vt}-slide-down-appear-active${Et}-placement-bottom,
&${vt}-slide-down-enter${vt}-slide-down-enter-active${Et}-placement-bottomRight,
&${vt}-slide-down-appear${vt}-slide-down-appear-active${Et}-placement-bottomRight`]:{animationName:Ue.fJ},[`&${vt}-slide-up-enter${vt}-slide-up-enter-active${Et}-placement-topLeft,
&${vt}-slide-up-appear${vt}-slide-up-appear-active${Et}-placement-topLeft,
&${vt}-slide-up-enter${vt}-slide-up-enter-active${Et}-placement-top,
&${vt}-slide-up-appear${vt}-slide-up-appear-active${Et}-placement-top,
&${vt}-slide-up-enter${vt}-slide-up-enter-active${Et}-placement-topRight,
&${vt}-slide-up-appear${vt}-slide-up-appear-active${Et}-placement-topRight`]:{animationName:Ue.Qt},[`&${vt}-slide-down-leave${vt}-slide-down-leave-active${Et}-placement-bottomLeft,
&${vt}-slide-down-leave${vt}-slide-down-leave-active${Et}-placement-bottom,
&${vt}-slide-down-leave${vt}-slide-down-leave-active${Et}-placement-bottomRight`]:{animationName:Ue.Uw},[`&${vt}-slide-up-leave${vt}-slide-up-leave-active${Et}-placement-topLeft,
&${vt}-slide-up-leave${vt}-slide-up-leave-active${Et}-placement-top,
&${vt}-slide-up-leave${vt}-slide-up-leave-active${Et}-placement-topRight`]:{animationName:Ue.ly}})},(0,ve.ZP)(Re,{colorBg:Ct,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${Et} ${ht}`]:{position:"relative",margin:0},[`${ht}-submenu-popup`]:{position:"absolute",zIndex:lt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Et}, ${Et}-menu-submenu`]:{[ht]:Object.assign(Object.assign({padding:we,listStyleType:"none",backgroundColor:Ct,backgroundClip:"padding-box",borderRadius:Re.borderRadiusLG,outline:"none",boxShadow:Re.boxShadowSecondary},(0,ce.Qy)(Re)),{[`${ht}-item-group-title`]:{padding:`${ut}px ${Lt}px`,color:Re.colorTextDescription,transition:`all ${tt}`},[`${ht}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ht}-item-icon`]:{minWidth:Ee,marginInlineEnd:Re.marginXS,fontSize:Re.fontSizeSM},[`${ht}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${tt}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ht}-item, ${ht}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ut}px ${Lt}px`,color:Re.colorText,fontWeight:"normal",fontSize:Ee,lineHeight:Re.lineHeight,cursor:"pointer",transition:`all ${tt}`,borderRadius:Re.borderRadiusSM,"&:hover, &-active":{backgroundColor:Re.controlItemBgHover}},(0,ce.Qy)(Re)),{"&-selected":{color:Re.colorPrimary,backgroundColor:Re.controlItemBgActive,"&:hover, &-active":{backgroundColor:Re.controlItemBgActiveHover}},"&-disabled":{color:je,cursor:"not-allowed","&:hover":{color:je,backgroundColor:Ct,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Re.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Re.colorSplit},[`${Et}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Re.paddingXS,[`${Et}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Re.colorTextDescription,fontSize:Ye,fontStyle:"normal"}}}),[`${ht}-item-group-list`]:{margin:`0 ${Re.marginXS}px`,padding:0,listStyle:"none"},[`${ht}-submenu-title`]:{paddingInlineEnd:Lt+Re.fontSizeSM},[`${ht}-submenu-vertical`]:{position:"relative"},[`${ht}-submenu${ht}-submenu-disabled ${Et}-menu-submenu-title`]:{[`&, ${Et}-menu-submenu-arrow-icon`]:{color:je,backgroundColor:Ct,cursor:"not-allowed"}},[`${ht}-submenu-selected ${Et}-menu-submenu-title`]:{color:Re.colorPrimary}})}},[(0,Ue.oN)(Re,"slide-up"),(0,Ue.oN)(Re,"slide-down"),(0,Fe.Fm)(Re,"move-up"),(0,Fe.Fm)(Re,"move-down"),(0,it._y)(Re,"zoom-big")]]};var st=(0,Le.Z)("Dropdown",(Re,Et)=>{let{rootPrefixCls:ht}=Et;const{marginXXS:lt,sizePopupArrow:et,controlHeight:ke,fontSize:vt,lineHeight:jt,paddingXXS:tt,componentCls:ut,borderRadiusLG:Ee}=Re,we=(ke-vt*jt)/2,{dropdownArrowOffset:je}=(0,ve.fS)({contentRadius:Ee}),Ye=(0,Me.TS)(Re,{menuCls:`${ut}-menu`,rootPrefixCls:ht,dropdownArrowDistance:et/2+lt,dropdownArrowOffset:je,dropdownPaddingVertical:we,dropdownEdgeChildPadding:tt});return[Pe(Ye),me(Ye)]},Re=>({zIndexPopup:Re.zIndexPopupBase+50}))},32983:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return tt}});var ce=se(94184),Ue=se.n(ce),Fe=se(67294),it=se(53124),ve=se(10110),Le=se(84780),Me=se(29691),me=()=>{const[,ut]=(0,Me.Z)(),we=new Le.C(ut.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Fe.createElement("svg",{style:we,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{fill:"none",fillRule:"evenodd"},Fe.createElement("g",{transform:"translate(24 31.67)"},Fe.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Fe.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"}),Fe.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)"}),Fe.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"}),Fe.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"})),Fe.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"}),Fe.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Fe.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Fe.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},st=()=>{const[,ut]=(0,Me.Z)(),{colorFill:Ee,colorFillTertiary:we,colorFillQuaternary:je,colorBgContainer:Ye}=ut,{borderColor:Lt,shadowColor:Ct,contentColor:Bt}=(0,Fe.useMemo)(()=>({borderColor:new Le.C(Ee).onBackground(Ye).toHexShortString(),shadowColor:new Le.C(we).onBackground(Ye).toHexShortString(),contentColor:new Le.C(je).onBackground(Ye).toHexShortString()}),[Ee,we,je,Ye]);return Fe.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Fe.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Fe.createElement("ellipse",{fill:Ct,cx:"32",cy:"33",rx:"32",ry:"7"}),Fe.createElement("g",{fillRule:"nonzero",stroke:Lt},Fe.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"}),Fe.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:Bt}))))},Re=se(67968),Et=se(45503);const ht=ut=>{const{componentCls:Ee,margin:we,marginXS:je,marginXL:Ye,fontSize:Lt,lineHeight:Ct}=ut;return{[Ee]:{marginInline:je,fontSize:Lt,lineHeight:Ct,textAlign:"center",[`${Ee}-image`]:{height:ut.emptyImgHeight,marginBottom:je,opacity:ut.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ee}-description`]:{color:ut.colorText},[`${Ee}-footer`]:{marginTop:we},"&-normal":{marginBlock:Ye,color:ut.colorTextDisabled,[`${Ee}-description`]:{color:ut.colorTextDisabled},[`${Ee}-image`]:{height:ut.emptyImgHeightMD}},"&-small":{marginBlock:je,color:ut.colorTextDisabled,[`${Ee}-image`]:{height:ut.emptyImgHeightSM}}}}};var lt=(0,Re.Z)("Empty",ut=>{const{componentCls:Ee,controlHeightLG:we}=ut,je=(0,Et.TS)(ut,{emptyImgCls:`${Ee}-img`,emptyImgHeight:we*2.5,emptyImgHeightMD:we,emptyImgHeightSM:we*.875});return[ht(je)]}),et=function(ut,Ee){var we={};for(var je in ut)Object.prototype.hasOwnProperty.call(ut,je)&&Ee.indexOf(je)<0&&(we[je]=ut[je]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ye=0,je=Object.getOwnPropertySymbols(ut);Ye<je.length;Ye++)Ee.indexOf(je[Ye])<0&&Object.prototype.propertyIsEnumerable.call(ut,je[Ye])&&(we[je[Ye]]=ut[je[Ye]]);return we};const ke=Fe.createElement(me,null),vt=Fe.createElement(st,null),jt=ut=>{var{className:Ee,rootClassName:we,prefixCls:je,image:Ye=ke,description:Lt,children:Ct,imageStyle:Bt,style:at}=ut,Vt=et(ut,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:$t,direction:xn,empty:dt}=Fe.useContext(it.E_),on=$t("empty",je),[En,yn]=lt(on),[Ge]=(0,ve.Z)("Empty"),De=typeof Lt!="undefined"?Lt:Ge==null?void 0:Ge.description,Zt=typeof De=="string"?De:"empty";let In=null;return typeof Ye=="string"?In=Fe.createElement("img",{alt:Zt,src:Ye}):In=Ye,En(Fe.createElement("div",Object.assign({className:Ue()(yn,on,dt==null?void 0:dt.className,{[`${on}-normal`]:Ye===vt,[`${on}-rtl`]:xn==="rtl"},Ee,we),style:Object.assign(Object.assign({},dt==null?void 0:dt.style),at)},Vt),Fe.createElement("div",{className:`${on}-image`,style:Bt},In),De&&Fe.createElement("div",{className:`${on}-description`},De),Ct&&Fe.createElement("div",{className:`${on}-footer`},Ct)))};jt.PRESENTED_IMAGE_DEFAULT=ke,jt.PRESENTED_IMAGE_SIMPLE=vt;var tt=jt},22150:function(Ln,en,se){"use strict";se.d(en,{default:function(){return Rt}});var ce=se(74902),Ue=se(94184),Fe=se.n(Ue),it=se(38379),ve=se(67294),Le=se(33603),Me=se(65223);function Se(We){const[mt,Dt]=ve.useState(We);return ve.useEffect(()=>{const gt=setTimeout(()=>{Dt(We)},We.length?0:10);return()=>{clearTimeout(gt)}},[We]),mt}var me=se(14747),Pe=se(50438),st=se(33507),Re=se(45503),Et=se(67968),lt=We=>{const{componentCls:mt}=We,Dt=`${mt}-show-help`,gt=`${mt}-show-help-item`;return{[Dt]:{transition:`opacity ${We.motionDurationSlow} ${We.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[gt]:{overflow:"hidden",transition:`height ${We.motionDurationSlow} ${We.motionEaseInOut},
opacity ${We.motionDurationSlow} ${We.motionEaseInOut},
transform ${We.motionDurationSlow} ${We.motionEaseInOut} !important`,[`&${gt}-appear, &${gt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${gt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const et=We=>({legend:{display:"block",width:"100%",marginBottom:We.marginLG,padding:0,color:We.colorTextDescription,fontSize:We.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`},label:{fontSize:We.fontSize},'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 ${We.controlOutlineWidth}px ${We.controlOutline}`},output:{display:"block",paddingTop:15,color:We.colorText,fontSize:We.fontSize,lineHeight:We.lineHeight}}),ke=(We,mt)=>{const{formItemCls:Dt}=We;return{[Dt]:{[`${Dt}-label > label`]:{height:mt},[`${Dt}-control-input`]:{minHeight:mt}}}},vt=We=>{const{componentCls:mt}=We;return{[We.componentCls]:Object.assign(Object.assign(Object.assign({},(0,me.Wf)(We)),et(We)),{[`${mt}-text`]:{display:"inline-block",paddingInlineEnd:We.paddingSM},"&-small":Object.assign({},ke(We,We.controlHeightSM)),"&-large":Object.assign({},ke(We,We.controlHeightLG))})}},jt=We=>{const{formItemCls:mt,iconCls:Dt,componentCls:gt,rootPrefixCls:qt,labelRequiredMarkColor:Yt,labelColor:Rn,labelFontSize:br,labelHeight:Wn,labelColonMarginInlineStart:Jn,labelColonMarginInlineEnd:or,itemMarginBottom:lr}=We;return{[mt]:Object.assign(Object.assign({},(0,me.Wf)(We)),{marginBottom:lr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${qt}-row`]:{display:"none"},"&-has-warning":{[`${mt}-split`]:{color:We.colorError}},"&-has-error":{[`${mt}-split`]:{color:We.colorWarning}},[`${mt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${We.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Wn,color:Rn,fontSize:br,[`> ${Dt}`]:{fontSize:We.fontSize,verticalAlign:"top"},[`&${mt}-required:not(${mt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:We.marginXXS,color:Yt,fontSize:We.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${gt}-hide-required-mark &`]:{display:"none"}},[`${mt}-optional`]:{display:"inline-block",marginInlineStart:We.marginXXS,color:We.colorTextDescription,[`${gt}-hide-required-mark &`]:{display:"none"}},[`${mt}-tooltip`]:{color:We.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:We.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Jn,marginInlineEnd:or},[`&${mt}-no-colon::after`]:{content:'"\\a0"'}}},[`${mt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${qt}-col-'"]):not([class*="' ${qt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:We.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[mt]:{"&-explain, &-extra":{clear:"both",color:We.colorTextDescription,fontSize:We.fontSize,lineHeight:We.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:We.controlHeightSM,transition:`color ${We.motionDurationMid} ${We.motionEaseOut}`},"&-explain":{"&-error":{color:We.colorError},"&-warning":{color:We.colorWarning}}},[`&-with-help ${mt}-explain`]:{height:"auto",opacity:1},[`${mt}-feedback-icon`]:{fontSize:We.fontSize,textAlign:"center",visibility:"visible",animationName:Pe.kr,animationDuration:We.motionDurationMid,animationTimingFunction:We.motionEaseOutBack,pointerEvents:"none","&-success":{color:We.colorSuccess},"&-error":{color:We.colorError},"&-warning":{color:We.colorWarning},"&-validating":{color:We.colorPrimary}}})}},tt=We=>{const{componentCls:mt,formItemCls:Dt}=We;return{[`${mt}-horizontal`]:{[`${Dt}-label`]:{flexGrow:0},[`${Dt}-control`]:{flex:"1 1 0",minWidth:0},[`${Dt}-label[class$='-24'], ${Dt}-label[class*='-24 ']`]:{[`& + ${Dt}-control`]:{minWidth:"unset"}}}}},ut=We=>{const{componentCls:mt,formItemCls:Dt}=We;return{[`${mt}-inline`]:{display:"flex",flexWrap:"wrap",[Dt]:{flex:"none",marginInlineEnd:We.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Dt}-label,
> ${Dt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Dt}-label`]:{flex:"none"},[`${mt}-text`]:{display:"inline-block"},[`${Dt}-has-feedback`]:{display:"inline-block"}}}}},Ee=We=>({padding:We.verticalLabelPadding,margin:We.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),we=We=>{const{componentCls:mt,formItemCls:Dt,rootPrefixCls:gt}=We;return{[`${Dt} ${Dt}-label`]:Ee(We),[mt]:{[Dt]:{flexWrap:"wrap",[`${Dt}-label, ${Dt}-control`]:{[`&:not([class*=" ${gt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},je=We=>{const{componentCls:mt,formItemCls:Dt,rootPrefixCls:gt}=We;return{[`${mt}-vertical`]:{[Dt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${mt}-item-control`]:{width:"100%"}}},[`${mt}-vertical ${Dt}-label,
.${gt}-col-24${Dt}-label,
.${gt}-col-xl-24${Dt}-label`]:Ee(We),[`@media (max-width: ${We.screenXSMax}px)`]:[we(We),{[mt]:{[`.${gt}-col-xs-24${Dt}-label`]:Ee(We)}}],[`@media (max-width: ${We.screenSMMax}px)`]:{[mt]:{[`.${gt}-col-sm-24${Dt}-label`]:Ee(We)}},[`@media (max-width: ${We.screenMDMax}px)`]:{[mt]:{[`.${gt}-col-md-24${Dt}-label`]:Ee(We)}},[`@media (max-width: ${We.screenLGMax}px)`]:{[mt]:{[`.${gt}-col-lg-24${Dt}-label`]:Ee(We)}}}},Ye=(We,mt)=>(0,Re.TS)(We,{formItemCls:`${We.componentCls}-item`,rootPrefixCls:mt});var Lt=(0,Et.Z)("Form",(We,mt)=>{let{rootPrefixCls:Dt}=mt;const gt=Ye(We,Dt);return[vt(gt),jt(gt),lt(gt),tt(gt),ut(gt),je(gt),(0,st.Z)(gt),Pe.kr]},We=>({labelRequiredMarkColor:We.colorError,labelColor:We.colorTextHeading,labelFontSize:We.fontSize,labelHeight:We.controlHeight,labelColonMarginInlineStart:We.marginXXS/2,labelColonMarginInlineEnd:We.marginXS,itemMarginBottom:We.marginLG,verticalLabelPadding:`0 0 ${We.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ct=[];function Bt(We,mt,Dt){let gt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof We=="string"?We:`${mt}-${gt}`,error:We,errorStatus:Dt}}var Vt=We=>{let{help:mt,helpStatus:Dt,errors:gt=Ct,warnings:qt=Ct,className:Yt,fieldId:Rn,onVisibleChanged:br}=We;const{prefixCls:Wn}=ve.useContext(Me.Rk),Jn=`${Wn}-item-explain`,[,or]=Lt(Wn),lr=(0,ve.useMemo)(()=>(0,Le.Z)(Wn),[Wn]),Rr=Se(gt),bn=Se(qt),An=ve.useMemo(()=>mt!=null?[Bt(mt,"help",Dt)]:[].concat((0,ce.Z)(Rr.map((xi,ai)=>Bt(xi,"error","error",ai))),(0,ce.Z)(bn.map((xi,ai)=>Bt(xi,"warning","warning",ai)))),[mt,Dt,Rr,bn]),hi={};return Rn&&(hi.id=`${Rn}_help`),ve.createElement(it.default,{motionDeadline:lr.motionDeadline,motionName:`${Wn}-show-help`,visible:!!An.length,onVisibleChanged:br},xi=>{const{className:ai,style:sr}=xi;return ve.createElement("div",Object.assign({},hi,{className:Fe()(Jn,ai,Yt,or),style:sr,role:"alert"}),ve.createElement(it.CSSMotionList,Object.assign({keys:An},(0,Le.Z)(Wn),{motionName:`${Wn}-show-help-item`,component:!1}),vi=>{const{key:ur,error:Qr,errorStatus:kn,className:ia,style:zi}=vi;return ve.createElement("div",{key:ur,className:Fe()(ia,{[`${Jn}-${kn}`]:kn}),style:zi},Qr)}))})},$t=se(46660),xn=se(53124),dt=se(98866),on=se(97647),En=se(98675),yn=se(17423);const Ge=["parentNode"],De="form_item";function Zt(We){return We===void 0||We===!1?[]:Array.isArray(We)?We:[We]}function In(We,mt){if(!We.length)return;const Dt=We.join("_");return mt?`${mt}_${Dt}`:Ge.includes(Dt)?`${De}_${Dt}`:Dt}function fn(We,mt,Dt,gt,qt,Yt){let Rn=gt;return Yt!==void 0?Rn=Yt:Dt.validating?Rn="validating":We.length?Rn="error":mt.length?Rn="warning":(Dt.touched||qt&&Dt.validated)&&(Rn="success"),Rn}function ot(We){return Zt(We).join("_")}function ft(We){const[mt]=(0,$t.useForm)(),Dt=ve.useRef({}),gt=ve.useMemo(()=>We!=null?We:Object.assign(Object.assign({},mt),{__INTERNAL__:{itemRef:qt=>Yt=>{const Rn=ot(qt);Yt?Dt.current[Rn]=Yt:delete Dt.current[Rn]}},scrollToField:function(qt){let Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Rn=Zt(qt),br=In(Rn,gt.__INTERNAL__.name),Wn=br?document.getElementById(br):null;Wn&&(0,yn.Z)(Wn,Object.assign({scrollMode:"if-needed",block:"nearest"},Yt))},getFieldInstance:qt=>{const Yt=ot(qt);return Dt.current[Yt]}}),[We,mt]);return[gt]}var Jt=se(37920),Bn=function(We,mt){var Dt={};for(var gt in We)Object.prototype.hasOwnProperty.call(We,gt)&&mt.indexOf(gt)<0&&(Dt[gt]=We[gt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,gt=Object.getOwnPropertySymbols(We);qt<gt.length;qt++)mt.indexOf(gt[qt])<0&&Object.prototype.propertyIsEnumerable.call(We,gt[qt])&&(Dt[gt[qt]]=We[gt[qt]]);return Dt};const wn=(We,mt)=>{const Dt=ve.useContext(dt.Z),{getPrefixCls:gt,direction:qt,form:Yt}=ve.useContext(xn.E_),{prefixCls:Rn,className:br,rootClassName:Wn,size:Jn,disabled:or=Dt,form:lr,colon:Rr,labelAlign:bn,labelWrap:An,labelCol:hi,wrapperCol:xi,hideRequiredMark:ai,layout:sr="horizontal",scrollToFirstError:vi,requiredMark:ur,onFinishFailed:Qr,name:kn,style:ia,feedbackIcons:zi}=We,Ma=Bn(We,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ji=(0,En.Z)(Jn),Zi=ve.useContext(Jt.Z),xa=(0,ve.useMemo)(()=>ur!==void 0?ur:Yt&&Yt.requiredMark!==void 0?Yt.requiredMark:!ai,[ai,ur,Yt]),aa=Rr!=null?Rr:Yt==null?void 0:Yt.colon,Ni=gt("form",Rn),[fa,Ta]=Lt(Ni),ga=Fe()(Ni,`${Ni}-${sr}`,{[`${Ni}-hide-required-mark`]:xa===!1,[`${Ni}-rtl`]:qt==="rtl",[`${Ni}-${Ji}`]:Ji},Ta,Yt==null?void 0:Yt.className,br,Wn),[Hi]=ft(lr),{__INTERNAL__:Ia}=Hi;Ia.name=kn;const Oa=(0,ve.useMemo)(()=>({name:kn,labelAlign:bn,labelCol:hi,labelWrap:An,wrapperCol:xi,vertical:sr==="vertical",colon:aa,requiredMark:xa,itemRef:Ia.itemRef,form:Hi,feedbackIcons:zi}),[kn,bn,hi,xi,sr,aa,xa,Hi,zi]);ve.useImperativeHandle(mt,()=>Hi);const wa=(Mt,wt)=>{if(Mt){let tn={block:"nearest"};typeof Mt=="object"&&(tn=Mt),Hi.scrollToField(wt,tn)}},_i=Mt=>{if(Qr==null||Qr(Mt),Mt.errorFields.length){const wt=Mt.errorFields[0].name;if(vi!==void 0){wa(vi,wt);return}Yt&&Yt.scrollToFirstError!==void 0&&wa(Yt.scrollToFirstError,wt)}};return fa(ve.createElement(dt.n,{disabled:or},ve.createElement(on.q,{size:Ji},ve.createElement(Me.RV,Object.assign({},{validateMessages:Zi}),ve.createElement(Me.q3.Provider,{value:Oa},ve.createElement($t.default,Object.assign({id:kn},Ma,{name:kn,onFinishFailed:_i,form:Hi,style:Object.assign(Object.assign({},Yt==null?void 0:Yt.style),ia),className:ga})))))))};var Xt=ve.forwardRef(wn),Dn=se(9475),Mn=se(17799),Te=se(96159),de=se(37419);function le(We){if(typeof We=="function")return We;const mt=(0,de.Z)(We);return mt.length<=1?mt[0]:mt}const pe=()=>{const{status:We,errors:mt=[],warnings:Dt=[]}=(0,ve.useContext)(Me.aM);return{status:We,errors:mt,warnings:Dt}};pe.Context=Me.aM;var he=pe,oe=se(96523);function Ie(We){const[mt,Dt]=ve.useState(We),gt=(0,ve.useRef)(null),qt=(0,ve.useRef)([]),Yt=(0,ve.useRef)(!1);ve.useEffect(()=>(Yt.current=!1,()=>{Yt.current=!0,oe.Z.cancel(gt.current),gt.current=null}),[]);function Rn(br){Yt.current||(gt.current===null&&(qt.current=[],gt.current=(0,oe.Z)(()=>{gt.current=null,Dt(Wn=>{let Jn=Wn;return qt.current.forEach(or=>{Jn=or(Jn)}),Jn})})),qt.current.push(br))}return[mt,Rn]}function Je(){const{itemRef:We}=ve.useContext(Me.q3),mt=ve.useRef({});function Dt(gt,qt){const Yt=qt&&typeof qt=="object"&&qt.ref,Rn=gt.join("_");return(mt.current.name!==Rn||mt.current.originRef!==Yt)&&(mt.current.name=Rn,mt.current.originRef=Yt,mt.current.ref=(0,Mn.sQ)(We(gt),Yt)),mt.current.ref}return Dt}var _t=se(48130),Kt=se(14075),Ht=se(10366),Qt=se(92820),Gt=se(21584);const nr=We=>{const{formItemCls:mt}=We;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${mt}-control`]:{display:"flex"}}}};var gr=(0,Et.b)(["Form","item-item"],(We,mt)=>{let{rootPrefixCls:Dt}=mt;const gt=Ye(We,Dt);return[nr(gt)]}),pn=We=>{const{prefixCls:mt,status:Dt,wrapperCol:gt,children:qt,errors:Yt,warnings:Rn,_internalItemRender:br,extra:Wn,help:Jn,fieldId:or,marginBottom:lr,onErrorVisibleChanged:Rr}=We,bn=`${mt}-item`,An=ve.useContext(Me.q3),hi=gt||An.wrapperCol||{},xi=Fe()(`${bn}-control`,hi.className),ai=ve.useMemo(()=>Object.assign({},An),[An]);delete ai.labelCol,delete ai.wrapperCol;const sr=ve.createElement("div",{className:`${bn}-control-input`},ve.createElement("div",{className:`${bn}-control-input-content`},qt)),vi=ve.useMemo(()=>({prefixCls:mt,status:Dt}),[mt,Dt]),ur=lr!==null||Yt.length||Rn.length?ve.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ve.createElement(Me.Rk.Provider,{value:vi},ve.createElement(Vt,{fieldId:or,errors:Yt,warnings:Rn,help:Jn,helpStatus:Dt,className:`${bn}-explain-connected`,onVisibleChanged:Rr})),!!lr&&ve.createElement("div",{style:{width:0,height:lr}})):null,Qr={};or&&(Qr.id=`${or}_extra`);const kn=Wn?ve.createElement("div",Object.assign({},Qr,{className:`${bn}-extra`}),Wn):null,ia=br&&br.mark==="pro_table_render"&&br.render?br.render(We,{input:sr,errorList:ur,extra:kn}):ve.createElement(ve.Fragment,null,sr,ur,kn);return ve.createElement(Me.q3.Provider,{value:ai},ve.createElement(Gt.Z,Object.assign({},hi,{className:xi}),ia),ve.createElement(gr,{prefixCls:mt}))},ir=se(17663),Lr=se(24457),$n=se(10110),Cr=se(83062),Ii=function(We,mt){var Dt={};for(var gt in We)Object.prototype.hasOwnProperty.call(We,gt)&&mt.indexOf(gt)<0&&(Dt[gt]=We[gt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,gt=Object.getOwnPropertySymbols(We);qt<gt.length;qt++)mt.indexOf(gt[qt])<0&&Object.prototype.propertyIsEnumerable.call(We,gt[qt])&&(Dt[gt[qt]]=We[gt[qt]]);return Dt};function li(We){return We?typeof We=="object"&&!ve.isValidElement(We)?We:{title:We}:null}var Jr=We=>{let{prefixCls:mt,label:Dt,htmlFor:gt,labelCol:qt,labelAlign:Yt,colon:Rn,required:br,requiredMark:Wn,tooltip:Jn}=We;var or;const[lr]=(0,$n.Z)("Form"),{vertical:Rr,labelAlign:bn,labelCol:An,labelWrap:hi,colon:xi}=ve.useContext(Me.q3);if(!Dt)return null;const ai=qt||An||{},sr=Yt||bn,vi=`${mt}-item-label`,ur=Fe()(vi,sr==="left"&&`${vi}-left`,ai.className,{[`${vi}-wrap`]:!!hi});let Qr=Dt;const kn=Rn===!0||xi!==!1&&Rn!==!1;kn&&!Rr&&typeof Dt=="string"&&Dt.trim()!==""&&(Qr=Dt.replace(/[:|]\s*$/,""));const zi=li(Jn);if(zi){const{icon:xa=ve.createElement(ir.Z,null)}=zi,aa=Ii(zi,["icon"]),Ni=ve.createElement(Cr.Z,Object.assign({},aa),ve.cloneElement(xa,{className:`${mt}-item-tooltip`,title:""}));Qr=ve.createElement(ve.Fragment,null,Qr,Ni)}const Ma=Wn==="optional",Ji=typeof Wn=="function";Ji?Qr=Wn(Qr,{required:!!br}):Ma&&!br&&(Qr=ve.createElement(ve.Fragment,null,Qr,ve.createElement("span",{className:`${mt}-item-optional`,title:""},(lr==null?void 0:lr.optional)||((or=Lr.Z.Form)===null||or===void 0?void 0:or.optional))));const Zi=Fe()({[`${mt}-item-required`]:br,[`${mt}-item-required-mark-optional`]:Ma||Ji,[`${mt}-item-no-colon`]:!kn});return ve.createElement(Gt.Z,Object.assign({},ai,{className:ur}),ve.createElement("label",{htmlFor:gt,className:Zi,title:typeof Dt=="string"?Dt:""},Qr))},Di=se(87725),Ei=se(16646),Pi=se(87995),xr=se(3407);const Pr={success:Di.Z,warning:Pi.Z,error:Ei.Z,validating:xr.Z};function Gi(We){let{children:mt,errors:Dt,warnings:gt,hasFeedback:qt,validateStatus:Yt,prefixCls:Rn,meta:br,noStyle:Wn}=We;const Jn=`${Rn}-item`,{feedbackIcons:or}=ve.useContext(Me.q3),lr=fn(Dt,gt,br,null,!!qt,Yt),{isFormItemInput:Rr,status:bn}=ve.useContext(Me.aM),An=ve.useMemo(()=>{var hi;let xi;if(qt){const vi=qt!==!0&&qt.icons||or,ur=lr&&((hi=vi==null?void 0:vi({status:lr,errors:Dt,warnings:gt}))===null||hi===void 0?void 0:hi[lr]),Qr=lr&&Pr[lr];xi=ur!==!1&&Qr?ve.createElement("span",{className:Fe()(`${Jn}-feedback-icon`,`${Jn}-feedback-icon-${lr}`)},ur||ve.createElement(Qr,null)):null}let ai=!0,sr=lr||"";return Wn&&(ai=Rr,sr=(lr!=null?lr:bn)||""),{status:sr,errors:Dt,warnings:gt,hasFeedback:!!qt,feedbackIcon:xi,isFormItemInput:ai}},[lr,qt,Wn,Rr,bn]);return ve.createElement(Me.aM.Provider,{value:An},mt)}var ma=function(We,mt){var Dt={};for(var gt in We)Object.prototype.hasOwnProperty.call(We,gt)&&mt.indexOf(gt)<0&&(Dt[gt]=We[gt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,gt=Object.getOwnPropertySymbols(We);qt<gt.length;qt++)mt.indexOf(gt[qt])<0&&Object.prototype.propertyIsEnumerable.call(We,gt[qt])&&(Dt[gt[qt]]=We[gt[qt]]);return Dt};function ba(We){const{prefixCls:mt,className:Dt,rootClassName:gt,style:qt,help:Yt,errors:Rn,warnings:br,validateStatus:Wn,meta:Jn,hasFeedback:or,hidden:lr,children:Rr,fieldId:bn,required:An,isRequired:hi,onSubItemMetaChange:xi}=We,ai=ma(We,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),sr=`${mt}-item`,{requiredMark:vi}=ve.useContext(Me.q3),ur=ve.useRef(null),Qr=Se(Rn),kn=Se(br),ia=Yt!=null,zi=!!(ia||Rn.length||br.length),Ma=!!ur.current&&(0,_t.Z)(ur.current),[Ji,Zi]=ve.useState(null);(0,Kt.Z)(()=>{if(zi&&ur.current){const Ta=getComputedStyle(ur.current);Zi(parseInt(Ta.marginBottom,10))}},[zi,Ma]);const xa=Ta=>{Ta||Zi(null)},Ni=function(){let Ta=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const ga=Ta?Qr:Jn.errors,Hi=Ta?kn:Jn.warnings;return fn(ga,Hi,Jn,"",!!or,Wn)}(),fa=Fe()(sr,Dt,gt,{[`${sr}-with-help`]:ia||Qr.length||kn.length,[`${sr}-has-feedback`]:Ni&&or,[`${sr}-has-success`]:Ni==="success",[`${sr}-has-warning`]:Ni==="warning",[`${sr}-has-error`]:Ni==="error",[`${sr}-is-validating`]:Ni==="validating",[`${sr}-hidden`]:lr});return ve.createElement("div",{className:fa,style:qt,ref:ur},ve.createElement(Qt.Z,Object.assign({className:`${sr}-row`},(0,Ht.Z)(ai,["_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(Jr,Object.assign({htmlFor:bn},We,{requiredMark:vi,required:An!=null?An:hi,prefixCls:mt})),ve.createElement(pn,Object.assign({},We,Jn,{errors:Qr,warnings:kn,prefixCls:mt,status:Ni,help:Yt,marginBottom:Ji,onErrorVisibleChanged:xa}),ve.createElement(Me.qI.Provider,{value:xi},ve.createElement(Gi,{prefixCls:mt,meta:Jn,errors:Jn.errors,warnings:Jn.warnings,hasFeedback:or,validateStatus:Ni},Rr)))),!!Ji&&ve.createElement("div",{className:`${sr}-margin-offset`,style:{marginBottom:-Ji}}))}const va="__SPLIT__",Vi=null,At=ve.memo(We=>{let{children:mt}=We;return mt},(We,mt)=>We.value===mt.value&&We.update===mt.update&&We.childProps.length===mt.childProps.length&&We.childProps.every((Dt,gt)=>Dt===mt.childProps[gt]));function On(We){return We!=null}function Pt(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function zt(We){const{name:mt,noStyle:Dt,className:gt,dependencies:qt,prefixCls:Yt,shouldUpdate:Rn,rules:br,children:Wn,required:Jn,label:or,messageVariables:lr,trigger:Rr="onChange",validateTrigger:bn,hidden:An,help:hi}=We,{getPrefixCls:xi}=ve.useContext(xn.E_),{name:ai}=ve.useContext(Me.q3),sr=le(Wn),vi=typeof sr=="function",ur=ve.useContext(Me.qI),{validateTrigger:Qr}=ve.useContext($t.FieldContext),kn=bn!==void 0?bn:Qr,ia=On(mt),zi=xi("form",Yt),[Ma,Ji]=Lt(zi),Zi=ve.useContext($t.ListContext),xa=ve.useRef(),[aa,Ni]=Ie({}),[fa,Ta]=(0,Dn.Z)(()=>Pt()),ga=wt=>{const tn=Zi==null?void 0:Zi.getKey(wt.name);if(Ta(wt.destroy?Pt():wt,!0),Dt&&hi!==!1&&ur){let vn=wt.name;if(wt.destroy)vn=xa.current||vn;else if(tn!==void 0){const[Kn,Ar]=tn;vn=[Kn].concat((0,ce.Z)(Ar)),xa.current=vn}ur(wt,vn)}},Hi=(wt,tn)=>{Ni(vn=>{const Kn=Object.assign({},vn),Tr=[].concat((0,ce.Z)(wt.name.slice(0,-1)),(0,ce.Z)(tn)).join(va);return wt.destroy?delete Kn[Tr]:Kn[Tr]=wt,Kn})},[Ia,Oa]=ve.useMemo(()=>{const wt=(0,ce.Z)(fa.errors),tn=(0,ce.Z)(fa.warnings);return Object.values(aa).forEach(vn=>{wt.push.apply(wt,(0,ce.Z)(vn.errors||[])),tn.push.apply(tn,(0,ce.Z)(vn.warnings||[]))}),[wt,tn]},[aa,fa.errors,fa.warnings]),wa=Je();function _i(wt,tn,vn){return Dt&&!An?ve.createElement(Gi,{prefixCls:zi,hasFeedback:We.hasFeedback,validateStatus:We.validateStatus,meta:fa,errors:Ia,warnings:Oa,noStyle:!0},wt):ve.createElement(ba,Object.assign({key:"row"},We,{className:Fe()(gt,Ji),prefixCls:zi,fieldId:tn,isRequired:vn,errors:Ia,warnings:Oa,meta:fa,onSubItemMetaChange:Hi}),wt)}if(!ia&&!vi&&!qt)return Ma(_i(sr));let Mt={};return typeof or=="string"?Mt.label=or:mt&&(Mt.label=String(mt)),lr&&(Mt=Object.assign(Object.assign({},Mt),lr)),Ma(ve.createElement($t.Field,Object.assign({},We,{messageVariables:Mt,trigger:Rr,validateTrigger:kn,onMetaChange:ga}),(wt,tn,vn)=>{const Kn=Zt(mt).length&&tn?tn.name:[],Ar=In(Kn,ai),Tr=Jn!==void 0?Jn:!!(br&&br.some(Zr=>{if(Zr&&typeof Zr=="object"&&Zr.required&&!Zr.warningOnly)return!0;if(typeof Zr=="function"){const wi=Zr(vn);return wi&&wi.required&&!wi.warningOnly}return!1})),Hr=Object.assign({},wt);let Xr=null;if(Array.isArray(sr)&&ia)Xr=sr;else if(!(vi&&(!(Rn||qt)||ia))){if(!(qt&&!vi&&!ia))if((0,Te.l$)(sr)){const Zr=Object.assign(Object.assign({},sr.props),Hr);if(Zr.id||(Zr.id=Ar),hi||Ia.length>0||Oa.length>0||We.extra){const Ri=[];(hi||Ia.length>0)&&Ri.push(`${Ar}_help`),We.extra&&Ri.push(`${Ar}_extra`),Zr["aria-describedby"]=Ri.join(" ")}Ia.length>0&&(Zr["aria-invalid"]="true"),Tr&&(Zr["aria-required"]="true"),(0,Mn.Yr)(sr)&&(Zr.ref=wa(Kn,sr)),new Set([].concat((0,ce.Z)(Zt(Rr)),(0,ce.Z)(Zt(kn)))).forEach(Ri=>{Zr[Ri]=function(){for(var oa,Wi,Xi,Oe,He,Ke=arguments.length,Ve=new Array(Ke),ct=0;ct<Ke;ct++)Ve[ct]=arguments[ct];(Xi=Hr[Ri])===null||Xi===void 0||(oa=Xi).call.apply(oa,[Hr].concat(Ve)),(He=(Oe=sr.props)[Ri])===null||He===void 0||(Wi=He).call.apply(Wi,[Oe].concat(Ve))}});const ki=[Zr["aria-required"],Zr["aria-invalid"],Zr["aria-describedby"]];Xr=ve.createElement(At,{value:Hr[We.valuePropName||"value"],update:sr,childProps:ki},(0,Te.Tm)(sr,Zr))}else vi&&(Rn||qt)&&!ia?Xr=sr(vn):Xr=sr}return _i(Xr,Ar,Tr)}))}const rn=zt;rn.useStatus=he;var cn=rn,Vn=function(We,mt){var Dt={};for(var gt in We)Object.prototype.hasOwnProperty.call(We,gt)&&mt.indexOf(gt)<0&&(Dt[gt]=We[gt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,gt=Object.getOwnPropertySymbols(We);qt<gt.length;qt++)mt.indexOf(gt[qt])<0&&Object.prototype.propertyIsEnumerable.call(We,gt[qt])&&(Dt[gt[qt]]=We[gt[qt]]);return Dt},Qe=We=>{var{prefixCls:mt,children:Dt}=We,gt=Vn(We,["prefixCls","children"]);const{getPrefixCls:qt}=ve.useContext(xn.E_),Yt=qt("form",mt),Rn=ve.useMemo(()=>({prefixCls:Yt,status:"error"}),[Yt]);return ve.createElement($t.List,Object.assign({},gt),(br,Wn,Jn)=>ve.createElement(Me.Rk.Provider,{value:Rn},Dt(br.map(or=>Object.assign(Object.assign({},or),{fieldKey:or.key})),Wn,{errors:Jn.errors,warnings:Jn.warnings})))};function rt(){const{form:We}=(0,ve.useContext)(Me.q3);return We}const pt=Xt;pt.Item=cn,pt.List=Qe,pt.ErrorList=Vt,pt.useForm=ft,pt.useFormInstance=rt,pt.useWatch=$t.useWatch,pt.Provider=Me.RV,pt.create=()=>{};var Rt=pt},99398:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Qn}});var ce=se(67294),Ue=se.t(ce,2),Fe=se(99569),it=se(94184),ve=se.n(it),Le=se(87462),Me=se(1413),Se=se(4942),me=se(97685),Pe=se(71002),st=se(45987),Re=/margin|padding|width|height|max|min|offset/,Et={left:!0,top:!0},ht={cssFloat:1,styleFloat:1,float:1};function lt(Ze){return Ze.nodeType===1?Ze.ownerDocument.defaultView.getComputedStyle(Ze,null):{}}function et(Ze,ze,xe){if(ze=ze.toLowerCase(),xe==="auto"){if(ze==="height")return Ze.offsetHeight;if(ze==="width")return Ze.offsetWidth}return ze in Et||(Et[ze]=Re.test(ze)),Et[ze]?parseFloat(xe)||0:xe}function ke(Ze,ze){var xe=arguments.length,Ae=lt(Ze);return ze=ht[ze]?"cssFloat"in Ze.style?"cssFloat":"styleFloat":ze,xe===1?Ae:et(Ze,ze,Ae[ze]||Ze.style[ze])}function vt(Ze,ze,xe){var Ae=arguments.length;if(ze=ht[ze]?"cssFloat"in Ze.style?"cssFloat":"styleFloat":ze,Ae===3)return typeof xe=="number"&&Re.test(ze)&&(xe="".concat(xe,"px")),Ze.style[ze]=xe,xe;for(var qe in ze)ze.hasOwnProperty(qe)&&vt(Ze,qe,ze[qe]);return lt(Ze)}function jt(Ze){return Ze===document.body?document.documentElement.clientWidth:Ze.offsetWidth}function tt(Ze){return Ze===document.body?window.innerHeight||document.documentElement.clientHeight:Ze.offsetHeight}function ut(){var Ze=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ze=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ze,height:ze}}function Ee(){var Ze=document.documentElement.clientWidth,ze=window.innerHeight||document.documentElement.clientHeight;return{width:Ze,height:ze}}function we(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function je(Ze){var ze=Ze.getBoundingClientRect(),xe=document.documentElement;return{left:ze.left+(window.pageXOffset||xe.scrollLeft)-(xe.clientLeft||document.body.clientLeft||0),top:ze.top+(window.pageYOffset||xe.scrollTop)-(xe.clientTop||document.body.clientTop||0)}}function Ye(Ze){var ze=ce.useRef();ze.current=Ze;var xe=ce.useCallback(function(){for(var Ae,qe=arguments.length,Xe=new Array(qe),St=0;St<qe;St++)Xe[St]=arguments[St];return(Ae=ze.current)===null||Ae===void 0?void 0:Ae.call.apply(Ae,[ze].concat(Xe))},[]);return xe}function Lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ct=Lt()?ce.useLayoutEffect:ce.useEffect,Bt=function(ze,xe){var Ae=ce.useRef(!0);Ct(function(){return ze(Ae.current)},xe),Ct(function(){return Ae.current=!1,function(){Ae.current=!0}},[])},at=function(ze,xe){Bt(function(Ae){if(!Ae)return ze()},xe)},Vt=null;function $t(Ze){var ze=ce.useRef(!1),xe=ce.useState(Ze),Ae=(0,me.Z)(xe,2),qe=Ae[0],Xe=Ae[1];ce.useEffect(function(){return ze.current=!1,function(){ze.current=!0}},[]);function St(Ft,Wt){Wt&&ze.current||Xe(Ft)}return[qe,St]}function xn(Ze){return Ze!==void 0}function dt(Ze,ze){var xe=ze||{},Ae=xe.defaultValue,qe=xe.value,Xe=xe.onChange,St=xe.postState,Ft=$t(function(){return xn(qe)?qe:xn(Ae)?typeof Ae=="function"?Ae():Ae:typeof Ze=="function"?Ze():Ze}),Wt=(0,me.Z)(Ft,2),an=Wt[0],nn=Wt[1],Ot=qe!==void 0?qe:an,un=St?St(Ot):Ot,hn=Ye(Xe),zn=$t([Ot]),Sn=(0,me.Z)(zn,2),qn=Sn[0],fr=Sn[1];at(function(){var mr=qn[0];an!==mr&&hn(an,mr)},[qn]),at(function(){xn(qe)||nn(qe)},[qe]);var er=Ye(function(mr,jn){nn(mr,jn),fr([Ot],jn)});return[un,er]}var on=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],En=ce.createContext(null),yn=0;function Ge(Ze,ze){var xe=ce.useState(function(){return yn+=1,String(yn)}),Ae=(0,me.Z)(xe,1),qe=Ae[0],Xe=ce.useContext(En),St={data:ze,canPreview:Ze};return ce.useEffect(function(){if(Xe)return Xe.register(qe,St)},[]),ce.useEffect(function(){Xe&&Xe.register(qe,St)},[Ze,ze]),qe}function De(Ze){return new Promise(function(ze){var xe=document.createElement("img");xe.onerror=function(){return ze(!1)},xe.onload=function(){return ze(!0)},xe.src=Ze})}function Zt(Ze){var ze=Ze.src,xe=Ze.isCustomPlaceholder,Ae=Ze.fallback,qe=(0,ce.useState)(xe?"loading":"normal"),Xe=(0,me.Z)(qe,2),St=Xe[0],Ft=Xe[1],Wt=(0,ce.useRef)(!1),an=St==="error";(0,ce.useEffect)(function(){De(ze).then(function(hn){hn||Ft("error")})},[ze]),(0,ce.useEffect)(function(){xe&&!Wt.current?Ft("loading"):an&&Ft("normal")},[ze]);var nn=function(){Ft("normal")},Ot=function(zn){Wt.current=!1,St==="loading"&&zn!=null&&zn.complete&&(zn.naturalWidth||zn.naturalHeight)&&(Wt.current=!0,nn())},un=an&&Ae?{src:Ae}:{onLoad:nn,src:ze};return[Ot,un,St]}var In=se(2788),fn=ce.createContext({});function ot(Ze,ze){if(!Ze)return!1;if(Ze.contains)return Ze.contains(ze);for(var xe=ze;xe;){if(xe===Ze)return!0;xe=xe.parentNode}return!1}function ft(){var Ze=(0,Me.Z)({},Ue);return Ze.useId}var Jt=0;function Bn(){}function wn(Ze){var ze=ce.useState("ssr-id"),xe=(0,me.Z)(ze,2),Ae=xe[0],qe=xe[1],Xe=ft(),St=Xe==null?void 0:Xe();return ce.useEffect(function(){if(!Xe){var Ft=Jt;Jt+=1,qe("rc_unique_".concat(Ft))}},[]),Ze||St||Ae}var Nt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ze){var xe=ze.keyCode;if(ze.altKey&&!ze.ctrlKey||ze.metaKey||xe>=Nt.F1&&xe<=Nt.F12)return!1;switch(xe){case Nt.ALT:case Nt.CAPS_LOCK:case Nt.CONTEXT_MENU:case Nt.CTRL:case Nt.DOWN:case Nt.END:case Nt.ESC:case Nt.HOME:case Nt.INSERT:case Nt.LEFT:case Nt.MAC_FF_META:case Nt.META:case Nt.NUMLOCK:case Nt.NUM_CENTER:case Nt.PAGE_DOWN:case Nt.PAGE_UP:case Nt.PAUSE:case Nt.PRINT_SCREEN:case Nt.RIGHT:case Nt.SHIFT:case Nt.UP:case Nt.WIN_KEY:case Nt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ze){if(ze>=Nt.ZERO&&ze<=Nt.NINE||ze>=Nt.NUM_ZERO&&ze<=Nt.NUM_MULTIPLY||ze>=Nt.A&&ze<=Nt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ze===0)return!0;switch(ze){case Nt.SPACE:case Nt.QUESTION_MARK:case Nt.NUM_PLUS:case Nt.NUM_MINUS:case Nt.NUM_PERIOD:case Nt.NUM_DIVISION:case Nt.SEMICOLON:case Nt.DASH:case Nt.EQUALS:case Nt.COMMA:case Nt.PERIOD:case Nt.SLASH:case Nt.APOSTROPHE:case Nt.SINGLE_QUOTE:case Nt.OPEN_SQUARE_BRACKET:case Nt.BACKSLASH:case Nt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Xt=Nt,Dn=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Mn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Te="".concat(Dn," ").concat(Mn).split(/[\s\n]+/),de="aria-",le="data-";function pe(Ze,ze){return Ze.indexOf(ze)===0}function he(Ze){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe;ze===!1?xe={aria:!0,data:!0,attr:!0}:ze===!0?xe={aria:!0}:xe=(0,Me.Z)({},ze);var Ae={};return Object.keys(Ze).forEach(function(qe){(xe.aria&&(qe==="role"||pe(qe,de))||xe.data&&pe(qe,le)||xe.attr&&Te.includes(qe))&&(Ae[qe]=Ze[qe])}),Ae}function oe(Ze,ze,xe){var Ae=ze;return!Ae&&xe&&(Ae="".concat(Ze,"-").concat(xe)),Ae}function Ie(Ze,ze){var xe=Ze["page".concat(ze?"Y":"X","Offset")],Ae="scroll".concat(ze?"Top":"Left");if(typeof xe!="number"){var qe=Ze.document;xe=qe.documentElement[Ae],typeof xe!="number"&&(xe=qe.body[Ae])}return xe}function Je(Ze){var ze=Ze.getBoundingClientRect(),xe={left:ze.left,top:ze.top},Ae=Ze.ownerDocument,qe=Ae.defaultView||Ae.parentWindow;return xe.left+=Ie(qe),xe.top+=Ie(qe,!0),xe}var _t=se(62874),Kt=se(59864);function Ht(Ze,ze,xe){var Ae=ce.useRef({});return(!("value"in Ae.current)||xe(Ae.current.condition,ze))&&(Ae.current.value=Ze(),Ae.current.condition=ze),Ae.current.value}function Qt(Ze,ze){typeof Ze=="function"?Ze(ze):(0,Pe.Z)(Ze)==="object"&&Ze&&"current"in Ze&&(Ze.current=ze)}function Gt(){for(var Ze=arguments.length,ze=new Array(Ze),xe=0;xe<Ze;xe++)ze[xe]=arguments[xe];var Ae=ze.filter(function(qe){return qe});return Ae.length<=1?Ae[0]:function(qe){ze.forEach(function(Xe){Qt(Xe,qe)})}}function nr(){for(var Ze=arguments.length,ze=new Array(Ze),xe=0;xe<Ze;xe++)ze[xe]=arguments[xe];return Ht(function(){return Gt.apply(void 0,ze)},ze,function(Ae,qe){return Ae.length===qe.length&&Ae.every(function(Xe,St){return Xe===qe[St]})})}function gr(Ze){var ze,xe,Ae=isMemo(Ze)?Ze.type.type:Ze.type;return!(typeof Ae=="function"&&!((ze=Ae.prototype)!==null&&ze!==void 0&&ze.render)||typeof Ze=="function"&&!((xe=Ze.prototype)!==null&&xe!==void 0&&xe.render))}var Ut=ce.memo(function(Ze){var ze=Ze.children;return ze},function(Ze,ze){var xe=ze.shouldUpdate;return!xe}),pn={width:0,height:0,overflow:"hidden",outline:"none"},ir=ce.forwardRef(function(Ze,ze){var xe=Ze.prefixCls,Ae=Ze.className,qe=Ze.style,Xe=Ze.title,St=Ze.ariaId,Ft=Ze.footer,Wt=Ze.closable,an=Ze.closeIcon,nn=Ze.onClose,Ot=Ze.children,un=Ze.bodyStyle,hn=Ze.bodyProps,zn=Ze.modalRender,Sn=Ze.onMouseDown,qn=Ze.onMouseUp,fr=Ze.holderRef,er=Ze.visible,mr=Ze.forceRender,jn=Ze.width,ar=Ze.height,Mr=ce.useContext(fn),Nr=Mr.panel,rr=nr(fr,Nr),Dr=(0,ce.useRef)(),$r=(0,ce.useRef)();ce.useImperativeHandle(ze,function(){return{focus:function(){var Gr;(Gr=Dr.current)===null||Gr===void 0||Gr.focus()},changeActive:function(Gr){var wr=document,Fr=wr.activeElement;Gr&&Fr===$r.current?Dr.current.focus():!Gr&&Fr===Dr.current&&$r.current.focus()}}});var mi={};jn!==void 0&&(mi.width=jn),ar!==void 0&&(mi.height=ar);var ri;Ft&&(ri=ce.createElement("div",{className:"".concat(xe,"-footer")},Ft));var Ur;Xe&&(Ur=ce.createElement("div",{className:"".concat(xe,"-header")},ce.createElement("div",{className:"".concat(xe,"-title"),id:St},Xe)));var ui;Wt&&(ui=ce.createElement("button",{type:"button",onClick:nn,"aria-label":"Close",className:"".concat(xe,"-close")},an||ce.createElement("span",{className:"".concat(xe,"-close-x")})));var pi=ce.createElement("div",{className:"".concat(xe,"-content")},ui,Ur,ce.createElement("div",(0,Le.Z)({className:"".concat(xe,"-body"),style:un},hn),Ot),ri);return ce.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":Xe?St:null,"aria-modal":"true",ref:rr,style:(0,Me.Z)((0,Me.Z)({},qe),mi),className:ve()(xe,Ae),onMouseDown:Sn,onMouseUp:qn},ce.createElement("div",{tabIndex:0,ref:Dr,style:pn,"aria-hidden":"true"}),ce.createElement(Ut,{shouldUpdate:er||mr},zn?zn(pi):pi),ce.createElement("div",{tabIndex:0,ref:$r,style:pn,"aria-hidden":"true"}))}),Lr=ir,$n=ce.forwardRef(function(Ze,ze){var xe=Ze.prefixCls,Ae=Ze.title,qe=Ze.style,Xe=Ze.className,St=Ze.visible,Ft=Ze.forceRender,Wt=Ze.destroyOnClose,an=Ze.motionName,nn=Ze.ariaId,Ot=Ze.onVisibleChanged,un=Ze.mousePosition,hn=(0,ce.useRef)(),zn=ce.useState(),Sn=(0,me.Z)(zn,2),qn=Sn[0],fr=Sn[1],er={};qn&&(er.transformOrigin=qn);function mr(){var jn=Je(hn.current);fr(un?"".concat(un.x-jn.left,"px ").concat(un.y-jn.top,"px"):"")}return ce.createElement(_t.Z,{visible:St,onVisibleChanged:Ot,onAppearPrepare:mr,onEnterPrepare:mr,forceRender:Ft,motionName:an,removeOnLeave:Wt,ref:hn},function(jn,ar){var Mr=jn.className,Nr=jn.style;return ce.createElement(Lr,(0,Le.Z)({},Ze,{ref:ze,title:Ae,ariaId:nn,prefixCls:xe,holderRef:ar,style:(0,Me.Z)((0,Me.Z)((0,Me.Z)({},Nr),qe),er),className:ve()(Xe,Mr)}))})});$n.displayName="Content";var Cr=$n;function Ii(Ze){var ze=Ze.prefixCls,xe=Ze.style,Ae=Ze.visible,qe=Ze.maskProps,Xe=Ze.motionName;return ce.createElement(_t.Z,{key:"mask",visible:Ae,motionName:Xe,leavedClassName:"".concat(ze,"-mask-hidden")},function(St,Ft){var Wt=St.className,an=St.style;return ce.createElement("div",(0,Le.Z)({ref:Ft,style:(0,Me.Z)((0,Me.Z)({},an),xe),className:ve()("".concat(ze,"-mask"),Wt)},qe))})}function li(Ze){var ze=Ze.prefixCls,xe=ze===void 0?"rc-dialog":ze,Ae=Ze.zIndex,qe=Ze.visible,Xe=qe===void 0?!1:qe,St=Ze.keyboard,Ft=St===void 0?!0:St,Wt=Ze.focusTriggerAfterClose,an=Wt===void 0?!0:Wt,nn=Ze.wrapStyle,Ot=Ze.wrapClassName,un=Ze.wrapProps,hn=Ze.onClose,zn=Ze.afterOpenChange,Sn=Ze.afterClose,qn=Ze.transitionName,fr=Ze.animation,er=Ze.closable,mr=er===void 0?!0:er,jn=Ze.mask,ar=jn===void 0?!0:jn,Mr=Ze.maskTransitionName,Nr=Ze.maskAnimation,rr=Ze.maskClosable,Dr=rr===void 0?!0:rr,$r=Ze.maskStyle,mi=Ze.maskProps,ri=Ze.rootClassName,Ur=(0,ce.useRef)(),ui=(0,ce.useRef)(),pi=(0,ce.useRef)(),jr=ce.useState(Xe),Gr=(0,me.Z)(jr,2),wr=Gr[0],Fr=Gr[1],Yr=wn();function fi(){ot(ui.current,document.activeElement)||(Ur.current=document.activeElement)}function ua(){if(!ot(ui.current,document.activeElement)){var zr;(zr=pi.current)===null||zr===void 0||zr.focus()}}function ha(zr){if(zr)ua();else{if(Fr(!1),ar&&Ur.current&&an){try{Ur.current.focus({preventScroll:!0})}catch(Li){}Ur.current=null}wr&&(Sn==null||Sn())}zn==null||zn(zr)}function Bi(zr){hn==null||hn(zr)}var $i=(0,ce.useRef)(!1),ei=(0,ce.useRef)(),Wr=function(){clearTimeout(ei.current),$i.current=!0},Yi=function(){ei.current=setTimeout(function(){$i.current=!1})},qr=null;Dr&&(qr=function(Li){$i.current?$i.current=!1:ui.current===Li.target&&Bi(Li)});function vr(zr){if(Ft&&zr.keyCode===Xt.ESC){zr.stopPropagation(),Bi(zr);return}Xe&&zr.keyCode===Xt.TAB&&pi.current.changeActive(!zr.shiftKey)}return(0,ce.useEffect)(function(){Xe&&(Fr(!0),fi())},[Xe]),(0,ce.useEffect)(function(){return function(){clearTimeout(ei.current)}},[]),ce.createElement("div",(0,Le.Z)({className:ve()("".concat(xe,"-root"),ri)},he(Ze,{data:!0})),ce.createElement(Ii,{prefixCls:xe,visible:ar&&Xe,motionName:oe(xe,Mr,Nr),style:(0,Me.Z)({zIndex:Ae},$r),maskProps:mi}),ce.createElement("div",(0,Le.Z)({tabIndex:-1,onKeyDown:vr,className:ve()("".concat(xe,"-wrap"),Ot),ref:ui,onClick:qr,style:(0,Me.Z)((0,Me.Z)({zIndex:Ae},nn),{},{display:wr?null:"none"})},un),ce.createElement(Cr,(0,Le.Z)({},Ze,{onMouseDown:Wr,onMouseUp:Yi,ref:pi,closable:mr,ariaId:Yr,prefixCls:xe,visible:Xe&&wr,onClose:Bi,onVisibleChanged:ha,motionName:oe(xe,qn,fr)}))))}var ci=function(ze){var xe=ze.visible,Ae=ze.getContainer,qe=ze.forceRender,Xe=ze.destroyOnClose,St=Xe===void 0?!1:Xe,Ft=ze.afterClose,Wt=ze.panelRef,an=ce.useState(xe),nn=(0,me.Z)(an,2),Ot=nn[0],un=nn[1],hn=ce.useMemo(function(){return{panel:Wt}},[Wt]);return ce.useEffect(function(){xe&&un(!0)},[xe]),!qe&&St&&!Ot?null:ce.createElement(fn.Provider,{value:hn},ce.createElement(In.Z,{open:xe||qe||Ot,autoDestroy:!1,getContainer:Ae,autoLock:xe||Ot},ce.createElement(li,(0,Le.Z)({},ze,{destroyOnClose:St,afterClose:function(){Ft==null||Ft(),un(!1)}}))))};ci.displayName="Dialog";var Jr=ci,Di=Jr,Ei=se(73935);function Pi(Ze,ze,xe,Ae){var qe=Ei.unstable_batchedUpdates?function(St){Ei.unstable_batchedUpdates(xe,St)}:xe;return Ze!=null&&Ze.addEventListener&&Ze.addEventListener(ze,qe,Ae),{remove:function(){Ze!=null&&Ze.removeEventListener&&Ze.removeEventListener(ze,qe,Ae)}}}var xr={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ze){var xe=ze.keyCode;if(ze.altKey&&!ze.ctrlKey||ze.metaKey||xe>=xr.F1&&xe<=xr.F12)return!1;switch(xe){case xr.ALT:case xr.CAPS_LOCK:case xr.CONTEXT_MENU:case xr.CTRL:case xr.DOWN:case xr.END:case xr.ESC:case xr.HOME:case xr.INSERT:case xr.LEFT:case xr.MAC_FF_META:case xr.META:case xr.NUMLOCK:case xr.NUM_CENTER:case xr.PAGE_DOWN:case xr.PAGE_UP:case xr.PAUSE:case xr.PRINT_SCREEN:case xr.RIGHT:case xr.SHIFT:case xr.UP:case xr.WIN_KEY:case xr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ze){if(ze>=xr.ZERO&&ze<=xr.NINE||ze>=xr.NUM_ZERO&&ze<=xr.NUM_MULTIPLY||ze>=xr.A&&ze<=xr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ze===0)return!0;switch(ze){case xr.SPACE:case xr.QUESTION_MARK:case xr.NUM_PLUS:case xr.NUM_MINUS:case xr.NUM_PERIOD:case xr.NUM_DIVISION:case xr.SEMICOLON:case xr.DASH:case xr.EQUALS:case xr.COMMA:case xr.PERIOD:case xr.SLASH:case xr.APOSTROPHE:case xr.SINGLE_QUOTE:case xr.OPEN_SQUARE_BRACKET:case xr.BACKSLASH:case xr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Pr=xr,Gi={},ma=[],ba=function(ze){ma.push(ze)};function va(Ze,ze){if(0)var xe}function Vi(Ze,ze){if(0)var xe}function At(){Gi={}}function On(Ze,ze,xe){!ze&&!Gi[xe]&&(Ze(!1,xe),Gi[xe]=!0)}function Pt(Ze,ze){On(va,Ze,ze)}function zt(Ze,ze){On(Vi,Ze,ze)}Pt.preMessage=ba,Pt.resetWarned=At,Pt.noteOnce=zt;var rn=Pt;function cn(Ze,ze,xe,Ae){var qe=ze+xe,Xe=(xe-Ae)/2;if(xe>Ae){if(ze>0)return(0,Se.Z)({},Ze,Xe);if(ze<0&&qe<Ae)return(0,Se.Z)({},Ze,-Xe)}else if(ze<0||qe>Ae)return(0,Se.Z)({},Ze,ze<0?Xe:-Xe);return{}}function Vn(Ze,ze,xe,Ae){var qe=Ee(),Xe=qe.width,St=qe.height,Ft=null;return Ze<=Xe&&ze<=St?Ft={x:0,y:0}:(Ze>Xe||ze>St)&&(Ft=(0,Me.Z)((0,Me.Z)({},cn("x",xe,Ze,Xe)),cn("y",Ae,ze,St))),Ft}function Nn(Ze,ze){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ae=new Set;function qe(Xe,St){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Wt=Ae.has(Xe);if(rn(!Wt,"Warning: There may be circular references"),Wt)return!1;if(Xe===St)return!0;if(xe&&Ft>1)return!1;Ae.add(Xe);var an=Ft+1;if(Array.isArray(Xe)){if(!Array.isArray(St)||Xe.length!==St.length)return!1;for(var nn=0;nn<Xe.length;nn++)if(!qe(Xe[nn],St[nn],an))return!1;return!0}if(Xe&&St&&(0,Pe.Z)(Xe)==="object"&&(0,Pe.Z)(St)==="object"){var Ot=Object.keys(Xe);return Ot.length!==Object.keys(St).length?!1:Ot.every(function(un){return qe(Xe[un],St[un],an)})}return!1}return qe(Ze,ze)}var Qe=Nn,rt=function(ze){return+setTimeout(ze,16)},pt=function(ze){return clearTimeout(ze)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(rt=function(ze){return window.requestAnimationFrame(ze)},pt=function(ze){return window.cancelAnimationFrame(ze)});var Rt=0,We=new Map;function mt(Ze){We.delete(Ze)}var Dt=function(ze){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Rt+=1;var Ae=Rt;function qe(Xe){if(Xe===0)mt(Ae),ze();else{var St=rt(function(){qe(Xe-1)});We.set(Ae,St)}}return qe(xe),Ae};Dt.cancel=function(Ze){var ze=We.get(Ze);return mt(ze),pt(ze)};var gt=Dt,qt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Yt(Ze,ze,xe,Ae){var qe=(0,ce.useRef)(null),Xe=(0,ce.useRef)([]),St=(0,ce.useState)(qt),Ft=(0,me.Z)(St,2),Wt=Ft[0],an=Ft[1],nn=function(zn){an(qt),Ae&&!Qe(qt,Wt)&&Ae({transform:qt,action:zn})},Ot=function(zn,Sn){qe.current===null&&(Xe.current=[],qe.current=gt(function(){an(function(qn){var fr=qn;return Xe.current.forEach(function(er){fr=(0,Me.Z)((0,Me.Z)({},fr),er)}),qe.current=null,Ae==null||Ae({transform:fr,action:Sn}),fr})})),Xe.current.push((0,Me.Z)((0,Me.Z)({},Wt),zn))},un=function(zn,Sn,qn,fr){var er=Ze.current,mr=er.width,jn=er.height,ar=er.offsetWidth,Mr=er.offsetHeight,Nr=er.offsetLeft,rr=er.offsetTop,Dr=zn,$r=Wt.scale*zn;$r>xe?(Dr=xe/Wt.scale,$r=xe):$r<ze&&(Dr=ze/Wt.scale,$r=ze);var mi=qn!=null?qn:innerWidth/2,ri=fr!=null?fr:innerHeight/2,Ur=Dr-1,ui=Ur*mr*.5,pi=Ur*jn*.5,jr=Ur*(mi-Wt.x-Nr),Gr=Ur*(ri-Wt.y-rr),wr=Wt.x-(jr-ui),Fr=Wt.y-(Gr-pi);if(zn<1&&$r===1){var Yr=ar*$r,fi=Mr*$r,ua=Ee(),ha=ua.width,Bi=ua.height;Yr<=ha&&fi<=Bi&&(wr=0,Fr=0)}Ot({x:wr,y:Fr,scale:$r},Sn)};return{transform:Wt,resetTransform:nn,updateTransform:Ot,dispatchZoomChange:un}}var Rn=function(ze){var xe=ze.visible,Ae=ze.maskTransitionName,qe=ze.getContainer,Xe=ze.prefixCls,St=ze.rootClassName,Ft=ze.icons,Wt=ze.countRender,an=ze.showSwitch,nn=ze.showProgress,Ot=ze.current,un=ze.transform,hn=ze.count,zn=ze.scale,Sn=ze.minScale,qn=ze.maxScale,fr=ze.closeIcon,er=ze.onSwitchLeft,mr=ze.onSwitchRight,jn=ze.onClose,ar=ze.onZoomIn,Mr=ze.onZoomOut,Nr=ze.onRotateRight,rr=ze.onRotateLeft,Dr=ze.onFlipX,$r=ze.onFlipY,mi=ze.toolbarRender,ri=(0,ce.useContext)(En),Ur=Ft.rotateLeft,ui=Ft.rotateRight,pi=Ft.zoomIn,jr=Ft.zoomOut,Gr=Ft.close,wr=Ft.left,Fr=Ft.right,Yr=Ft.flipX,fi=Ft.flipY,ua="".concat(Xe,"-operations-operation");ce.useEffect(function(){var ei=function(Yi){Yi.keyCode===Pr.ESC&&jn()};return xe&&window.addEventListener("keydown",ei),function(){window.removeEventListener("keydown",ei)}},[xe]);var ha=[{icon:fi,onClick:$r,type:"flipY"},{icon:Yr,onClick:Dr,type:"flipX"},{icon:Ur,onClick:rr,type:"rotateLeft"},{icon:ui,onClick:Nr,type:"rotateRight"},{icon:jr,onClick:Mr,type:"zoomOut",disabled:zn===Sn},{icon:pi,onClick:ar,type:"zoomIn",disabled:zn===qn}],Bi=ha.map(function(ei){var Wr,Yi=ei.icon,qr=ei.onClick,vr=ei.type,zr=ei.disabled;return ce.createElement("div",{className:ve()(ua,(Wr={},(0,Se.Z)(Wr,"".concat(Xe,"-operations-operation-").concat(vr),!0),(0,Se.Z)(Wr,"".concat(Xe,"-operations-operation-disabled"),!!zr),Wr)),onClick:qr,key:vr},Yi)}),$i=ce.createElement("div",{className:"".concat(Xe,"-operations")},Bi);return ce.createElement(_t.Z,{visible:xe,motionName:Ae},function(ei){var Wr=ei.className,Yi=ei.style;return ce.createElement(In.Z,{open:!0,getContainer:qe!=null?qe:document.body},ce.createElement("div",{className:ve()("".concat(Xe,"-operations-wrapper"),Wr,St),style:Yi},fr===null?null:ce.createElement("button",{className:"".concat(Xe,"-close"),onClick:jn},fr||Gr),an&&ce.createElement(ce.Fragment,null,ce.createElement("div",{className:ve()("".concat(Xe,"-switch-left"),(0,Se.Z)({},"".concat(Xe,"-switch-left-disabled"),Ot===0)),onClick:er},wr),ce.createElement("div",{className:ve()("".concat(Xe,"-switch-right"),(0,Se.Z)({},"".concat(Xe,"-switch-right-disabled"),Ot===hn-1)),onClick:mr},Fr)),ce.createElement("div",{className:"".concat(Xe,"-footer")},nn&&ce.createElement("div",{className:"".concat(Xe,"-progress")},Wt?Wt(Ot+1,hn):"".concat(Ot+1," / ").concat(hn)),mi?mi($i,(0,Me.Z)({icons:{flipYIcon:Bi[0],flipXIcon:Bi[1],rotateLeftIcon:Bi[2],rotateRightIcon:Bi[3],zoomOutIcon:Bi[4],zoomInIcon:Bi[5]},actions:{onFlipY:$r,onFlipX:Dr,onRotateLeft:rr,onRotateRight:Nr,onZoomOut:Mr,onZoomIn:ar},transform:un},ri?{current:Ot,total:hn}:{})):$i)))})},br=Rn,Wn=1,Jn=1,or=["fallback","src","imgRef"],lr=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],Rr=function(ze){var xe=ze.fallback,Ae=ze.src,qe=ze.imgRef,Xe=(0,st.Z)(ze,or),St=Zt({src:Ae,fallback:xe}),Ft=(0,me.Z)(St,2),Wt=Ft[0],an=Ft[1];return ce.createElement("img",(0,Le.Z)({ref:function(Ot){qe.current=Ot,Wt(Ot)}},Xe,an))},bn=function(ze){var xe=ze.prefixCls,Ae=ze.src,qe=ze.alt,Xe=ze.fallback,St=ze.movable,Ft=St===void 0?!0:St,Wt=ze.onClose,an=ze.visible,nn=ze.icons,Ot=nn===void 0?{}:nn,un=ze.rootClassName,hn=ze.closeIcon,zn=ze.getContainer,Sn=ze.current,qn=Sn===void 0?0:Sn,fr=ze.count,er=fr===void 0?1:fr,mr=ze.countRender,jn=ze.scaleStep,ar=jn===void 0?.5:jn,Mr=ze.minScale,Nr=Mr===void 0?1:Mr,rr=ze.maxScale,Dr=rr===void 0?50:rr,$r=ze.transitionName,mi=$r===void 0?"zoom":$r,ri=ze.maskTransitionName,Ur=ri===void 0?"fade":ri,ui=ze.imageRender,pi=ze.imgCommonProps,jr=ze.toolbarRender,Gr=ze.onTransform,wr=ze.onChange,Fr=(0,st.Z)(ze,lr),Yr=(0,ce.useRef)(),fi=(0,ce.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),ua=(0,ce.useState)(!1),ha=(0,me.Z)(ua,2),Bi=ha[0],$i=ha[1],ei=(0,ce.useContext)(En),Wr=ei&&er>1,Yi=ei&&er>=1,qr=Yt(Yr,Nr,Dr,Gr),vr=qr.transform,zr=qr.resetTransform,Li=qr.updateTransform,yi=qr.dispatchZoomChange,ji=(0,ce.useState)(!0),ti=(0,me.Z)(ji,2),ta=ti[0],qi=ti[1],Ki=vr.rotate,Ui=vr.scale,sa=vr.x,Aa=vr.y,da=ve()((0,Se.Z)({},"".concat(xe,"-moving"),Bi));(0,ce.useEffect)(function(){ta||qi(!0)},[ta]);var Sa=function(){zr("close")},za=function(){yi(Wn+ar,"zoomIn")},ja=function(){yi(Wn/(Wn+ar),"zoomOut")},Qa=function(){Li({rotate:Ki+90},"rotateRight")},Ra=function(){Li({rotate:Ki-90},"rotateLeft")},la=function(){Li({flipX:!vr.flipX},"flipX")},di=function(){Li({flipY:!vr.flipY},"flipY")},Mi=function(Br){Br==null||Br.preventDefault(),Br==null||Br.stopPropagation(),qn>0&&(qi(!1),zr("prev"),wr==null||wr(qn-1,qn))},Qi=function(Br){Br==null||Br.preventDefault(),Br==null||Br.stopPropagation(),qn<er-1&&(qi(!1),zr("next"),wr==null||wr(qn+1,qn))},pa=function(){if(an&&Bi){$i(!1);var Br=fi.current,gi=Br.transformX,ya=Br.transformY,na=sa!==gi&&Aa!==ya;if(!na)return;var Va=Yr.current.offsetWidth*Ui,Za=Yr.current.offsetHeight*Ui,Do=Yr.current.getBoundingClientRect(),zo=Do.left,as=Do.top,ea=Ki%180!==0,_r=Vn(ea?Za:Va,ea?Va:Za,zo,as);_r&&Li((0,Me.Z)({},_r),"dragRebound")}},Ka=function(Br){!Ft||Br.button!==0||(Br.preventDefault(),Br.stopPropagation(),fi.current={deltaX:Br.pageX-vr.x,deltaY:Br.pageY-vr.y,transformX:vr.x,transformY:vr.y},$i(!0))},eo=function(Br){an&&Bi&&Li({x:Br.pageX-fi.current.deltaX,y:Br.pageY-fi.current.deltaY},"move")},uo=function(Br){if(!(!an||Br.deltaY==0)){var gi=Math.abs(Br.deltaY/100),ya=Math.min(gi,Jn),na=Wn+ya*ar;Br.deltaY>0&&(na=Wn/na),yi(na,"wheel",Br.clientX,Br.clientY)}},_o=function(Br){!an||!Wr||(Br.keyCode===Pr.LEFT?Mi():Br.keyCode===Pr.RIGHT&&Qi())},ko=function(Br){an&&(Ui!==1?Li({x:0,y:0,scale:1},"doubleClick"):yi(Wn+ar,"doubleClick",Br.clientX,Br.clientY))};(0,ce.useEffect)(function(){var Da,Br,gi,ya;if(Ft){gi=Pi(window,"mouseup",pa,!1),ya=Pi(window,"mousemove",eo,!1);try{window.top!==window.self&&(Da=Pi(window.top,"mouseup",pa,!1),Br=Pi(window.top,"mousemove",eo,!1))}catch(na){va(!1,"[rc-image] ".concat(na))}}return function(){var na,Va,Za,Do;(na=gi)===null||na===void 0||na.remove(),(Va=ya)===null||Va===void 0||Va.remove(),(Za=Da)===null||Za===void 0||Za.remove(),(Do=Br)===null||Do===void 0||Do.remove()}},[an,Bi,sa,Aa,Ki,Ft]),(0,ce.useEffect)(function(){var Da=Pi(window,"keydown",_o,!1);return function(){Da.remove()}},[an,Wr,qn]);var to=ce.createElement(Rr,(0,Le.Z)({},pi,{width:ze.width,height:ze.height,imgRef:Yr,className:"".concat(xe,"-img"),alt:qe,style:{transform:"translate3d(".concat(vr.x,"px, ").concat(vr.y,"px, 0) scale3d(").concat(vr.flipX?"-":"").concat(Ui,", ").concat(vr.flipY?"-":"").concat(Ui,", 1) rotate(").concat(Ki,"deg)"),transitionDuration:!ta&&"0s"},fallback:Xe,src:Ae,onWheel:uo,onMouseDown:Ka,onDoubleClick:ko}));return ce.createElement(ce.Fragment,null,ce.createElement(Di,(0,Le.Z)({transitionName:mi,maskTransitionName:Ur,closable:!1,keyboard:!0,prefixCls:xe,onClose:Wt,visible:an,wrapClassName:da,rootClassName:un,getContainer:zn},Fr,{afterClose:Sa}),ce.createElement("div",{className:"".concat(xe,"-img-wrapper")},ui?ui(to,(0,Me.Z)({transform:vr},ei?{current:qn}:{})):to)),ce.createElement(br,{visible:an,transform:vr,maskTransitionName:Ur,closeIcon:hn,getContainer:zn,prefixCls:xe,rootClassName:un,icons:Ot,countRender:mr,showSwitch:Wr,showProgress:Yi,current:qn,count:er,scale:Ui,minScale:Nr,maxScale:Dr,toolbarRender:jr,onSwitchLeft:Mi,onSwitchRight:Qi,onZoomIn:za,onZoomOut:ja,onRotateRight:Qa,onRotateLeft:Ra,onFlipX:la,onFlipY:di,onClose:Wt}))},An=bn,hi=se(74902);function xi(Ze){var ze=ce.useState({}),xe=(0,me.Z)(ze,2),Ae=xe[0],qe=xe[1],Xe=ce.useCallback(function(Ft,Wt){return qe(function(an){return(0,Me.Z)((0,Me.Z)({},an),{},(0,Se.Z)({},Ft,Wt))}),function(){qe(function(an){var nn=(0,Me.Z)({},an);return delete nn[Ft],nn})}},[]),St=ce.useMemo(function(){return Ze?Ze.map(function(Ft){if(typeof Ft=="string")return{data:{src:Ft}};var Wt={};return Object.keys(Ft).forEach(function(an){["src"].concat((0,hi.Z)(on)).includes(an)&&(Wt[an]=Ft[an])}),{data:Wt}}):Object.keys(Ae).reduce(function(Ft,Wt){var an=Ae[Wt],nn=an.canPreview,Ot=an.data;return nn&&Ft.push({data:Ot,id:Wt}),Ft},[])},[Ze,Ae]);return[St,Xe]}var ai=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],sr=["src"],vi=function(ze){var xe,Ae=ze.previewPrefixCls,qe=Ae===void 0?"rc-image-preview":Ae,Xe=ze.children,St=ze.icons,Ft=St===void 0?{}:St,Wt=ze.items,an=ze.preview,nn=ze.fallback,Ot=(0,Pe.Z)(an)==="object"?an:{},un=Ot.visible,hn=Ot.onVisibleChange,zn=Ot.getContainer,Sn=Ot.current,qn=Ot.movable,fr=Ot.minScale,er=Ot.maxScale,mr=Ot.countRender,jn=Ot.closeIcon,ar=Ot.onChange,Mr=Ot.onTransform,Nr=Ot.toolbarRender,rr=Ot.imageRender,Dr=(0,st.Z)(Ot,ai),$r=xi(Wt),mi=(0,me.Z)($r,2),ri=mi[0],Ur=mi[1],ui=dt(0,{value:Sn}),pi=(0,me.Z)(ui,2),jr=pi[0],Gr=pi[1],wr=(0,ce.useState)(!1),Fr=(0,me.Z)(wr,2),Yr=Fr[0],fi=Fr[1],ua=((xe=ri[jr])===null||xe===void 0?void 0:xe.data)||{},ha=ua.src,Bi=(0,st.Z)(ua,sr),$i=dt(!!un,{value:un,onChange:function(Ki,Ui){hn==null||hn(Ki,Ui,jr)}}),ei=(0,me.Z)($i,2),Wr=ei[0],Yi=ei[1],qr=(0,ce.useState)(null),vr=(0,me.Z)(qr,2),zr=vr[0],Li=vr[1],yi=ce.useCallback(function(qi,Ki,Ui){var sa=ri.findIndex(function(Aa){return Aa.id===qi});Yi(!0),Li({x:Ki,y:Ui}),Gr(sa<0?0:sa),fi(!0)},[ri]);ce.useEffect(function(){Wr?Yr||Gr(0):fi(!1)},[Wr]);var ji=function(Ki,Ui){Gr(Ki),ar==null||ar(Ki,Ui)},ti=function(){Yi(!1),Li(null)},ta=ce.useMemo(function(){return{register:Ur,onPreview:yi}},[Ur,yi]);return ce.createElement(En.Provider,{value:ta},Xe,ce.createElement(An,(0,Le.Z)({"aria-hidden":!Wr,movable:qn,visible:Wr,prefixCls:qe,closeIcon:jn,onClose:ti,mousePosition:zr,imgCommonProps:Bi,src:ha,fallback:nn,icons:Ft,minScale:fr,maxScale:er,getContainer:zn,current:jr,count:ri.length,countRender:mr,onTransform:Mr,toolbarRender:Nr,imageRender:rr,onChange:ji},Dr)))},ur=vi,Qr=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],kn=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],ia=function(ze){var xe=ze.src,Ae=ze.alt,qe=ze.onPreviewClose,Xe=ze.prefixCls,St=Xe===void 0?"rc-image":Xe,Ft=ze.previewPrefixCls,Wt=Ft===void 0?"".concat(St,"-preview"):Ft,an=ze.placeholder,nn=ze.fallback,Ot=ze.width,un=ze.height,hn=ze.style,zn=ze.preview,Sn=zn===void 0?!0:zn,qn=ze.className,fr=ze.onClick,er=ze.onError,mr=ze.wrapperClassName,jn=ze.wrapperStyle,ar=ze.rootClassName,Mr=(0,st.Z)(ze,Qr),Nr=an&&an!==!0,rr=(0,Pe.Z)(Sn)==="object"?Sn:{},Dr=rr.src,$r=rr.visible,mi=$r===void 0?void 0:$r,ri=rr.onVisibleChange,Ur=ri===void 0?qe:ri,ui=rr.getContainer,pi=ui===void 0?void 0:ui,jr=rr.mask,Gr=rr.maskClassName,wr=rr.movable,Fr=rr.icons,Yr=rr.scaleStep,fi=rr.minScale,ua=rr.maxScale,ha=rr.imageRender,Bi=rr.toolbarRender,$i=(0,st.Z)(rr,kn),ei=Dr!=null?Dr:xe,Wr=dt(!!mi,{value:mi,onChange:Ur}),Yi=(0,me.Z)(Wr,2),qr=Yi[0],vr=Yi[1],zr=Zt({src:xe,isCustomPlaceholder:Nr,fallback:nn}),Li=(0,me.Z)(zr,3),yi=Li[0],ji=Li[1],ti=Li[2],ta=(0,ce.useState)(null),qi=(0,me.Z)(ta,2),Ki=qi[0],Ui=qi[1],sa=(0,ce.useContext)(En),Aa=!!Sn,da=function(){vr(!1),Ui(null)},Sa=ve()(St,mr,ar,(0,Se.Z)({},"".concat(St,"-error"),ti==="error")),za=(0,ce.useMemo)(function(){var la={};return on.forEach(function(di){ze[di]!==void 0&&(la[di]=ze[di])}),la},on.map(function(la){return ze[la]})),ja=(0,ce.useMemo)(function(){return(0,Me.Z)((0,Me.Z)({},za),{},{src:ei})},[ei,za]),Qa=Ge(Aa,ja),Ra=function(di){var Mi=je(di.target),Qi=Mi.left,pa=Mi.top;sa?sa.onPreview(Qa,Qi,pa):(Ui({x:Qi,y:pa}),vr(!0)),fr==null||fr(di)};return ce.createElement(ce.Fragment,null,ce.createElement("div",(0,Le.Z)({},Mr,{className:Sa,onClick:Aa?Ra:fr,style:(0,Me.Z)({width:Ot,height:un},jn)}),ce.createElement("img",(0,Le.Z)({},za,{className:ve()("".concat(St,"-img"),(0,Se.Z)({},"".concat(St,"-img-placeholder"),an===!0),qn),style:(0,Me.Z)({height:un},hn),ref:yi},ji,{width:Ot,height:un,onError:er})),ti==="loading"&&ce.createElement("div",{"aria-hidden":"true",className:"".concat(St,"-placeholder")},an),jr&&Aa&&ce.createElement("div",{className:ve()("".concat(St,"-mask"),Gr),style:{display:(hn==null?void 0:hn.display)==="none"?"none":void 0}},jr)),!sa&&Aa&&ce.createElement(An,(0,Le.Z)({"aria-hidden":!qr,visible:qr,prefixCls:Wt,onClose:da,mousePosition:Ki,src:ei,alt:Ae,fallback:nn,getContainer:pi,icons:Fr,movable:wr,scaleStep:Yr,minScale:fi,maxScale:ua,rootClassName:ar,imageRender:ha,imgCommonProps:za,toolbarRender:Bi},$i)))};ia.PreviewGroup=ur,ia.displayName="Image";var zi=ia,Ma=zi,Ji=se(33603),Zi=se(53124),xa=se(24457),aa=se(73475),Ni=se(22751),fa=se(91034),Ta={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},ga=Ta,Hi=se(84089),Ia=function(ze,xe){return ce.createElement(Hi.Z,(0,Le.Z)({},ze,{ref:xe,icon:ga}))},Oa=ce.forwardRef(Ia),wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},_i=wa,Mt=function(ze,xe){return ce.createElement(Hi.Z,(0,Le.Z)({},ze,{ref:xe,icon:_i}))},wt=ce.forwardRef(Mt),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},vn=tn,Kn=function(ze,xe){return ce.createElement(Hi.Z,(0,Le.Z)({},ze,{ref:xe,icon:vn}))},Ar=ce.forwardRef(Kn),Tr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},Hr=Tr,Xr=function(ze,xe){return ce.createElement(Hi.Z,(0,Le.Z)({},ze,{ref:xe,icon:Hr}))},Zr=ce.forwardRef(Xr),wi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},ki=wi,Ri=function(ze,xe){return ce.createElement(Hi.Z,(0,Le.Z)({},ze,{ref:xe,icon:ki}))},oa=ce.forwardRef(Ri),Wi=se(84780),Xi=se(71194),Oe=se(14747),He=se(50438),Ke=se(16932),Ve=se(67968),ct=se(45503);const yt=Ze=>({position:Ze||"absolute",inset:0}),kt=Ze=>{const{iconCls:ze,motionDurationSlow:xe,paddingXXS:Ae,marginXXS:qe,prefixCls:Xe,colorTextLightSolid:St}=Ze;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:St,background:new Wi.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${xe}`,[`.${Xe}-mask-info`]:Object.assign(Object.assign({},Oe.vS),{padding:`0 ${Ae}px`,[ze]:{marginInlineEnd:qe,svg:{verticalAlign:"baseline"}}})}},sn=Ze=>{const{previewCls:ze,modalMaskBg:xe,paddingSM:Ae,marginXL:qe,margin:Xe,paddingLG:St,previewOperationColorDisabled:Ft,previewOperationHoverColor:Wt,motionDurationSlow:an,iconCls:nn,colorTextLightSolid:Ot}=Ze,un=new Wi.C(xe).setAlpha(.1),hn=un.clone().setAlpha(.2);return{[`${ze}-footer`]:{position:"fixed",bottom:qe,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:Ze.previewOperationColor},[`${ze}-progress`]:{marginBottom:Xe},[`${ze}-close`]:{position:"fixed",top:qe,right:{_skip_check_:!0,value:qe},display:"flex",color:Ot,backgroundColor:un.toRgbString(),borderRadius:"50%",padding:Ae,outline:0,border:0,cursor:"pointer",transition:`all ${an}`,"&:hover":{backgroundColor:hn.toRgbString()},[`& > ${nn}`]:{fontSize:Ze.previewOperationSize}},[`${ze}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${St}px`,backgroundColor:un.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:Ae,padding:Ae,cursor:"pointer",transition:`all ${an}`,userSelect:"none",[`&:not(${ze}-operations-operation-disabled):hover > ${nn}`]:{color:Wt},"&-disabled":{color:Ft,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${nn}`]:{fontSize:Ze.previewOperationSize}}}}},dn=Ze=>{const{modalMaskBg:ze,iconCls:xe,previewOperationColorDisabled:Ae,previewCls:qe,zIndexPopup:Xe,motionDurationSlow:St}=Ze,Ft=new Wi.C(ze).setAlpha(.1),Wt=Ft.clone().setAlpha(.2);return{[`${qe}-switch-left, ${qe}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:Xe+1,display:"flex",alignItems:"center",justifyContent:"center",width:Ze.imagePreviewSwitchSize,height:Ze.imagePreviewSwitchSize,marginTop:-Ze.imagePreviewSwitchSize/2,color:Ze.previewOperationColor,background:Ft.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${St}`,userSelect:"none","&:hover":{background:Wt.toRgbString()},"&-disabled":{"&, &:hover":{color:Ae,background:"transparent",cursor:"not-allowed",[`> ${xe}`]:{cursor:"not-allowed"}}},[`> ${xe}`]:{fontSize:Ze.previewOperationSize}},[`${qe}-switch-left`]:{insetInlineStart:Ze.marginSM},[`${qe}-switch-right`]:{insetInlineEnd:Ze.marginSM}}},Gn=Ze=>{const{motionEaseOut:ze,previewCls:xe,motionDurationSlow:Ae,componentCls:qe}=Ze;return[{[`${qe}-preview-root`]:{[xe]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${xe}-body`]:Object.assign(Object.assign({},yt()),{overflow:"hidden"}),[`${xe}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${Ae} ${ze} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},yt()),{transition:`transform ${Ae} ${ze} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${xe}-moving`]:{[`${xe}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${qe}-preview-root`]:{[`${xe}-wrap`]:{zIndex:Ze.zIndexPopup}}},{[`${qe}-preview-operations-wrapper`]:{position:"fixed",zIndex:Ze.zIndexPopup+1},"&":[sn(Ze),dn(Ze)]}]},pr=Ze=>{const{componentCls:ze}=Ze;return{[ze]:{position:"relative",display:"inline-block",[`${ze}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${ze}-img-placeholder`]:{backgroundColor:Ze.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${ze}-mask`]:Object.assign({},kt(Ze)),[`${ze}-mask:hover`]:{opacity:1},[`${ze}-placeholder`]:Object.assign({},yt())}}},Hn=Ze=>{const{previewCls:ze}=Ze;return{[`${ze}-root`]:(0,He._y)(Ze,"zoom"),"&":(0,Ke.J$)(Ze,!0)}};var Cn=(0,Ve.Z)("Image",Ze=>{const ze=`${Ze.componentCls}-preview`,xe=(0,ct.TS)(Ze,{previewCls:ze,modalMaskBg:new Wi.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:Ze.controlHeightLG});return[pr(xe),Gn(xe),(0,Xi.QA)((0,ct.TS)(xe,{componentCls:ze})),Hn(xe)]},Ze=>({zIndexPopup:Ze.zIndexPopupBase+80,previewOperationColor:new Wi.C(Ze.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Wi.C(Ze.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Wi.C(Ze.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:Ze.fontSizeIcon*1.5})),gn=function(Ze,ze){var xe={};for(var Ae in Ze)Object.prototype.hasOwnProperty.call(Ze,Ae)&&ze.indexOf(Ae)<0&&(xe[Ae]=Ze[Ae]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Ae=Object.getOwnPropertySymbols(Ze);qe<Ae.length;qe++)ze.indexOf(Ae[qe])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ae[qe])&&(xe[Ae[qe]]=Ze[Ae[qe]]);return xe};const Pn={rotateLeft:ce.createElement(Oa,null),rotateRight:ce.createElement(wt,null),zoomIn:ce.createElement(Zr,null),zoomOut:ce.createElement(oa,null),close:ce.createElement(aa.Z,null),left:ce.createElement(Ni.Z,null),right:ce.createElement(fa.Z,null),flipX:ce.createElement(Ar,null),flipY:ce.createElement(Ar,{rotate:90})};var dr=Ze=>{var{previewPrefixCls:ze,preview:xe}=Ze,Ae=gn(Ze,["previewPrefixCls","preview"]);const{getPrefixCls:qe}=ce.useContext(Zi.E_),Xe=qe("image",ze),St=`${Xe}-preview`,Ft=qe(),[Wt,an]=Cn(Xe),nn=ce.useMemo(()=>{var Ot;if(xe===!1)return xe;const un=typeof xe=="object"?xe:{},hn=ve()(an,(Ot=un.rootClassName)!==null&&Ot!==void 0?Ot:"");return Object.assign(Object.assign({},un),{transitionName:(0,Ji.m)(Ft,"zoom",un.transitionName),maskTransitionName:(0,Ji.m)(Ft,"fade",un.maskTransitionName),rootClassName:hn})},[xe]);return Wt(ce.createElement(Ma.PreviewGroup,Object.assign({preview:nn,previewPrefixCls:St,icons:Pn},Ae)))},Xn=function(Ze,ze){var xe={};for(var Ae in Ze)Object.prototype.hasOwnProperty.call(Ze,Ae)&&ze.indexOf(Ae)<0&&(xe[Ae]=Ze[Ae]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Ae=Object.getOwnPropertySymbols(Ze);qe<Ae.length;qe++)ze.indexOf(Ae[qe])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ae[qe])&&(xe[Ae[qe]]=Ze[Ae[qe]]);return xe};const Zn=Ze=>{const{prefixCls:ze,preview:xe,className:Ae,rootClassName:qe,style:Xe}=Ze,St=Xn(Ze,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:Ft,locale:Wt=xa.Z,getPopupContainer:an,image:nn}=ce.useContext(Zi.E_),Ot=Ft("image",ze),un=Ft(),hn=Wt.Image||xa.Z.Image,[zn,Sn]=Cn(Ot),qn=ve()(qe,Sn),fr=ve()(Ae,Sn,nn==null?void 0:nn.className),er=ce.useMemo(()=>{if(xe===!1)return xe;const jn=typeof xe=="object"?xe:{},{getContainer:ar}=jn,Mr=Xn(jn,["getContainer"]);return Object.assign(Object.assign({mask:ce.createElement("div",{className:`${Ot}-mask-info`},ce.createElement(Fe.Z,null),hn==null?void 0:hn.preview),icons:Pn},Mr),{getContainer:ar||an,transitionName:(0,Ji.m)(un,"zoom",jn.transitionName),maskTransitionName:(0,Ji.m)(un,"fade",jn.maskTransitionName)})},[xe,hn]),mr=Object.assign(Object.assign({},nn==null?void 0:nn.style),Xe);return zn(ce.createElement(Ma,Object.assign({prefixCls:Ot,preview:er,rootClassName:qn,className:fr,style:mr},St)))};Zn.PreviewGroup=dr;var Qn=Zn},31795:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Nn}});var ce=se(42922),Ue=se(53978),Fe=se(94184),it=se.n(Fe),ve=se(87462),Le=se(4942),Me=se(71002),Se=se(97685),me=se(45987),Pe=se(15671),st=se(43144);function Re(){return typeof BigInt=="function"}function Et(Qe){return!Qe&&Qe!==0&&!Number.isNaN(Qe)||!String(Qe).trim()}function ht(Qe){var rt=Qe.trim(),pt=rt.startsWith("-");pt&&(rt=rt.slice(1)),rt=rt.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),rt.startsWith(".")&&(rt="0".concat(rt));var Rt=rt||"0",We=Rt.split("."),mt=We[0]||"0",Dt=We[1]||"0";mt==="0"&&Dt==="0"&&(pt=!1);var gt=pt?"-":"";return{negative:pt,negativeStr:gt,trimStr:Rt,integerStr:mt,decimalStr:Dt,fullStr:"".concat(gt).concat(Rt)}}function lt(Qe){var rt=String(Qe);return!Number.isNaN(Number(rt))&&rt.includes("e")}function et(Qe){var rt=String(Qe);if(lt(Qe)){var pt=Number(rt.slice(rt.indexOf("e-")+2)),Rt=rt.match(/\.(\d+)/);return Rt!=null&&Rt[1]&&(pt+=Rt[1].length),pt}return rt.includes(".")&&vt(rt)?rt.length-rt.indexOf(".")-1:0}function ke(Qe){var rt=String(Qe);if(lt(Qe)){if(Qe>Number.MAX_SAFE_INTEGER)return String(Re()?BigInt(Qe).toString():Number.MAX_SAFE_INTEGER);if(Qe<Number.MIN_SAFE_INTEGER)return String(Re()?BigInt(Qe).toString():Number.MIN_SAFE_INTEGER);rt=Qe.toFixed(et(rt))}return ht(rt).fullStr}function vt(Qe){return typeof Qe=="number"?!Number.isNaN(Qe):Qe?/^\s*-?\d+(\.\d+)?\s*$/.test(Qe)||/^\s*-?\d+\.\s*$/.test(Qe)||/^\s*-?\.\d+\s*$/.test(Qe):!1}var jt=function(){function Qe(rt){if((0,Pe.Z)(this,Qe),(0,Le.Z)(this,"origin",""),(0,Le.Z)(this,"negative",void 0),(0,Le.Z)(this,"integer",void 0),(0,Le.Z)(this,"decimal",void 0),(0,Le.Z)(this,"decimalLen",void 0),(0,Le.Z)(this,"empty",void 0),(0,Le.Z)(this,"nan",void 0),Et(rt)){this.empty=!0;return}if(this.origin=String(rt),rt==="-"||Number.isNaN(rt)){this.nan=!0;return}var pt=rt;if(lt(pt)&&(pt=Number(pt)),pt=typeof pt=="string"?pt:ke(pt),vt(pt)){var Rt=ht(pt);this.negative=Rt.negative;var We=Rt.trimStr.split(".");this.integer=BigInt(We[0]);var mt=We[1]||"0";this.decimal=BigInt(mt),this.decimalLen=mt.length}else this.nan=!0}return(0,st.Z)(Qe,[{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(pt){var Rt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(pt,"0"));return BigInt(Rt)}},{key:"negate",value:function(){var pt=new Qe(this.toString());return pt.negative=!pt.negative,pt}},{key:"cal",value:function(pt,Rt,We){var mt=Math.max(this.getDecimalStr().length,pt.getDecimalStr().length),Dt=this.alignDecimal(mt),gt=pt.alignDecimal(mt),qt=Rt(Dt,gt).toString(),Yt=We(mt),Rn=ht(qt),br=Rn.negativeStr,Wn=Rn.trimStr,Jn="".concat(br).concat(Wn.padStart(Yt+1,"0"));return new Qe("".concat(Jn.slice(0,-Yt),".").concat(Jn.slice(-Yt)))}},{key:"add",value:function(pt){if(this.isInvalidate())return new Qe(pt);var Rt=new Qe(pt);return Rt.isInvalidate()?this:this.cal(Rt,function(We,mt){return We+mt},function(We){return We})}},{key:"multi",value:function(pt){var Rt=new Qe(pt);return this.isInvalidate()||Rt.isInvalidate()?new Qe(NaN):this.cal(Rt,function(We,mt){return We*mt},function(We){return We*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(pt){return this.toString()===(pt==null?void 0:pt.toString())}},{key:"lessEquals",value:function(pt){return this.add(pt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return pt?this.isInvalidate()?"":ht("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Qe}(),tt=function(){function Qe(rt){if((0,Pe.Z)(this,Qe),(0,Le.Z)(this,"origin",""),(0,Le.Z)(this,"number",void 0),(0,Le.Z)(this,"empty",void 0),Et(rt)){this.empty=!0;return}this.origin=String(rt),this.number=Number(rt)}return(0,st.Z)(Qe,[{key:"negate",value:function(){return new Qe(-this.toNumber())}},{key:"add",value:function(pt){if(this.isInvalidate())return new Qe(pt);var Rt=Number(pt);if(Number.isNaN(Rt))return this;var We=this.number+Rt;if(We>Number.MAX_SAFE_INTEGER)return new Qe(Number.MAX_SAFE_INTEGER);if(We<Number.MIN_SAFE_INTEGER)return new Qe(Number.MIN_SAFE_INTEGER);var mt=Math.max(et(this.number),et(Rt));return new Qe(We.toFixed(mt))}},{key:"multi",value:function(pt){var Rt=Number(pt);if(this.isInvalidate()||Number.isNaN(Rt))return new Qe(NaN);var We=this.number*Rt;if(We>Number.MAX_SAFE_INTEGER)return new Qe(Number.MAX_SAFE_INTEGER);if(We<Number.MIN_SAFE_INTEGER)return new Qe(Number.MIN_SAFE_INTEGER);var mt=Math.max(et(this.number),et(Rt));return new Qe(We.toFixed(mt))}},{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(pt){return this.toNumber()===(pt==null?void 0:pt.toNumber())}},{key:"lessEquals",value:function(pt){return this.add(pt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return pt?this.isInvalidate()?"":ke(this.number):this.origin}}]),Qe}();function ut(Qe){return Re()?new jt(Qe):new tt(Qe)}function Ee(Qe,rt,pt){var Rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Qe==="")return"";var We=ht(Qe),mt=We.negativeStr,Dt=We.integerStr,gt=We.decimalStr,qt="".concat(rt).concat(gt),Yt="".concat(mt).concat(Dt);if(pt>=0){var Rn=Number(gt[pt]);if(Rn>=5&&!Rt){var br=ut(Qe).add("".concat(mt,"0.").concat("0".repeat(pt)).concat(10-Rn));return Ee(br.toString(),rt,pt,Rt)}return pt===0?Yt:"".concat(Yt).concat(rt).concat(gt.padEnd(pt,"0").slice(0,pt))}return qt===".0"?Yt:"".concat(Yt).concat(qt)}var we=ut,je=se(67656),Ye=se(67294);function Lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ct=Lt()?Ye.useLayoutEffect:Ye.useEffect,Bt=function(rt,pt){var Rt=Ye.useRef(!0);Ct(function(){return rt(Rt.current)},pt),Ct(function(){return Rt.current=!1,function(){Rt.current=!0}},[])},at=function(rt,pt){Bt(function(Rt){if(!Rt)return rt()},pt)},Vt=Bt,$t=se(27183);function xn(Qe,rt,pt){var Rt=React.useRef({});return(!("value"in Rt.current)||pt(Rt.current.condition,rt))&&(Rt.current.value=Qe(),Rt.current.condition=rt),Rt.current.value}function dt(Qe,rt){typeof Qe=="function"?Qe(rt):(0,Me.Z)(Qe)==="object"&&Qe&&"current"in Qe&&(Qe.current=rt)}function on(){for(var Qe=arguments.length,rt=new Array(Qe),pt=0;pt<Qe;pt++)rt[pt]=arguments[pt];var Rt=rt.filter(function(We){return We});return Rt.length<=1?Rt[0]:function(We){rt.forEach(function(mt){dt(mt,We)})}}function En(){for(var Qe=arguments.length,rt=new Array(Qe),pt=0;pt<Qe;pt++)rt[pt]=arguments[pt];return useMemo(function(){return on.apply(void 0,rt)},rt,function(Rt,We){return Rt.length!==We.length||Rt.every(function(mt,Dt){return mt!==We[Dt]})})}function yn(Qe){var rt,pt,Rt=isMemo(Qe)?Qe.type.type:Qe.type;return!(typeof Rt=="function"&&!((rt=Rt.prototype)!==null&&rt!==void 0&&rt.render)||typeof Qe=="function"&&!((pt=Qe.prototype)!==null&&pt!==void 0&&pt.render))}function Ge(Qe){return!isValidElement(Qe)||isFragment(Qe)?!1:yn(Qe)}var De={},Zt=[],In=function(rt){Zt.push(rt)};function fn(Qe,rt){if(0)var pt}function ot(Qe,rt){if(0)var pt}function ft(){De={}}function Jt(Qe,rt,pt){!rt&&!De[pt]&&(Qe(!1,pt),De[pt]=!0)}function Bn(Qe,rt){Jt(fn,Qe,rt)}function wn(Qe,rt){Jt(ot,Qe,rt)}Bn.preMessage=In,Bn.resetWarned=ft,Bn.noteOnce=wn;var Nt=Bn;function Xt(Qe,rt){var pt=(0,Ye.useRef)(null);function Rt(){try{var mt=Qe.selectionStart,Dt=Qe.selectionEnd,gt=Qe.value,qt=gt.substring(0,mt),Yt=gt.substring(Dt);pt.current={start:mt,end:Dt,value:gt,beforeTxt:qt,afterTxt:Yt}}catch(Rn){}}function We(){if(Qe&&pt.current&&rt)try{var mt=Qe.value,Dt=pt.current,gt=Dt.beforeTxt,qt=Dt.afterTxt,Yt=Dt.start,Rn=mt.length;if(mt.endsWith(qt))Rn=mt.length-pt.current.afterTxt.length;else if(mt.startsWith(gt))Rn=gt.length;else{var br=gt[Yt-1],Wn=mt.indexOf(br,Yt-1);Wn!==-1&&(Rn=Wn+1)}Qe.setSelectionRange(Rn,Rn)}catch(Jn){Nt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Jn.message))}}return[Rt,We]}var Dn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Qe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Qe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Qe==null?void 0:Qe.substr(0,4))},Mn=function(){var rt=(0,Ye.useState)(!1),pt=(0,Se.Z)(rt,2),Rt=pt[0],We=pt[1];return Vt(function(){We(Dn())},[]),Rt},Te=Mn,de=function(rt){return+setTimeout(rt,16)},le=function(rt){return clearTimeout(rt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(de=function(rt){return window.requestAnimationFrame(rt)},le=function(rt){return window.cancelAnimationFrame(rt)});var pe=0,he=new Map;function oe(Qe){he.delete(Qe)}var Ie=function(rt){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pe+=1;var Rt=pe;function We(mt){if(mt===0)oe(Rt),rt();else{var Dt=de(function(){We(mt-1)});he.set(Rt,Dt)}}return We(pt),Rt};Ie.cancel=function(Qe){var rt=he.get(Qe);return oe(rt),le(rt)};var Je=Ie,_t=200,Kt=600;function Ht(Qe){var rt=Qe.prefixCls,pt=Qe.upNode,Rt=Qe.downNode,We=Qe.upDisabled,mt=Qe.downDisabled,Dt=Qe.onStep,gt=Ye.useRef(),qt=Ye.useRef([]),Yt=Ye.useRef();Yt.current=Dt;var Rn=function(){clearTimeout(gt.current)},br=function(hi,xi){hi.preventDefault(),Rn(),Yt.current(xi);function ai(){Yt.current(xi),gt.current=setTimeout(ai,_t)}gt.current=setTimeout(ai,Kt)};Ye.useEffect(function(){return function(){Rn(),qt.current.forEach(function(An){return Je.cancel(An)})}},[]);var Wn=Te();if(Wn)return null;var Jn="".concat(rt,"-handler"),or=it()(Jn,"".concat(Jn,"-up"),(0,Le.Z)({},"".concat(Jn,"-up-disabled"),We)),lr=it()(Jn,"".concat(Jn,"-down"),(0,Le.Z)({},"".concat(Jn,"-down-disabled"),mt)),Rr=function(){return qt.current.push(Je(Rn))},bn={unselectable:"on",role:"button",onMouseUp:Rr,onMouseLeave:Rr};return Ye.createElement("div",{className:"".concat(Jn,"-wrap")},Ye.createElement("span",(0,ve.Z)({},bn,{onMouseDown:function(hi){br(hi,!0)},"aria-label":"Increase Value","aria-disabled":We,className:or}),pt||Ye.createElement("span",{unselectable:"on",className:"".concat(rt,"-handler-up-inner")})),Ye.createElement("span",(0,ve.Z)({},bn,{onMouseDown:function(hi){br(hi,!1)},"aria-label":"Decrease Value","aria-disabled":mt,className:lr}),Rt||Ye.createElement("span",{unselectable:"on",className:"".concat(rt,"-handler-down-inner")})))}function Qt(Qe){var rt=typeof Qe=="number"?ke(Qe):ht(Qe).fullStr,pt=rt.includes(".");return pt?ht(rt.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Qe+"0"}var Gt=se(87887),nr=function(){var Qe=(0,Ye.useRef)(0),rt=function(){Je.cancel(Qe.current)};return(0,Ye.useEffect)(function(){return rt},[]),function(pt){rt(),Qe.current=Je(function(){pt()})}},gr=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Ut=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],pn=function(rt,pt){return rt||pt.isEmpty()?pt.toString():pt.toNumber()},ir=function(rt){var pt=we(rt);return pt.isInvalidate()?null:pt},Lr=Ye.forwardRef(function(Qe,rt){var pt,Rt=Qe.prefixCls,We=Rt===void 0?"rc-input-number":Rt,mt=Qe.className,Dt=Qe.style,gt=Qe.min,qt=Qe.max,Yt=Qe.step,Rn=Yt===void 0?1:Yt,br=Qe.defaultValue,Wn=Qe.value,Jn=Qe.disabled,or=Qe.readOnly,lr=Qe.upHandler,Rr=Qe.downHandler,bn=Qe.keyboard,An=Qe.controls,hi=An===void 0?!0:An,xi=Qe.classNames,ai=Qe.stringMode,sr=Qe.parser,vi=Qe.formatter,ur=Qe.precision,Qr=Qe.decimalSeparator,kn=Qe.onChange,ia=Qe.onInput,zi=Qe.onPressEnter,Ma=Qe.onStep,Ji=(0,me.Z)(Qe,gr),Zi="".concat(We,"-input"),xa=Ye.useRef(null),aa=Ye.useState(!1),Ni=(0,Se.Z)(aa,2),fa=Ni[0],Ta=Ni[1],ga=Ye.useRef(!1),Hi=Ye.useRef(!1),Ia=Ye.useRef(!1),Oa=Ye.useState(function(){return we(Wn!=null?Wn:br)}),wa=(0,Se.Z)(Oa,2),_i=wa[0],Mt=wa[1];function wt(Xn){Wn===void 0&&Mt(Xn)}var tn=Ye.useCallback(function(Xn,Zn){if(!Zn)return ur>=0?ur:Math.max(et(Xn),et(Rn))},[ur,Rn]),vn=Ye.useCallback(function(Xn){var Zn=String(Xn);if(sr)return sr(Zn);var Qn=Zn;return Qr&&(Qn=Qn.replace(Qr,".")),Qn.replace(/[^\w.-]+/g,"")},[sr,Qr]),Kn=Ye.useRef(""),Ar=Ye.useCallback(function(Xn,Zn){if(vi)return vi(Xn,{userTyping:Zn,input:String(Kn.current)});var Qn=typeof Xn=="number"?ke(Xn):Xn;if(!Zn){var Ze=tn(Qn,Zn);if(vt(Qn)&&(Qr||Ze>=0)){var ze=Qr||".";Qn=Ee(Qn,ze,Ze)}}return Qn},[vi,tn,Qr]),Tr=Ye.useState(function(){var Xn=br!=null?br:Wn;return _i.isInvalidate()&&["string","number"].includes((0,Me.Z)(Xn))?Number.isNaN(Xn)?"":Xn:Ar(_i.toString(),!1)}),Hr=(0,Se.Z)(Tr,2),Xr=Hr[0],Zr=Hr[1];Kn.current=Xr;function wi(Xn,Zn){Zr(Ar(Xn.isInvalidate()?Xn.toString(!1):Xn.toString(!Zn),Zn))}var ki=Ye.useMemo(function(){return ir(qt)},[qt,ur]),Ri=Ye.useMemo(function(){return ir(gt)},[gt,ur]),oa=Ye.useMemo(function(){return!ki||!_i||_i.isInvalidate()?!1:ki.lessEquals(_i)},[ki,_i]),Wi=Ye.useMemo(function(){return!Ri||!_i||_i.isInvalidate()?!1:_i.lessEquals(Ri)},[Ri,_i]),Xi=Xt(xa.current,fa),Oe=(0,Se.Z)(Xi,2),He=Oe[0],Ke=Oe[1],Ve=function(Zn){return ki&&!Zn.lessEquals(ki)?ki:Ri&&!Ri.lessEquals(Zn)?Ri:null},ct=function(Zn){return!Ve(Zn)},yt=function(Zn,Qn){var Ze=Zn,ze=ct(Ze)||Ze.isEmpty();if(!Ze.isEmpty()&&!Qn&&(Ze=Ve(Ze)||Ze,ze=!0),!or&&!Jn&&ze){var xe=Ze.toString(),Ae=tn(xe,Qn);return Ae>=0&&(Ze=we(Ee(xe,".",Ae)),ct(Ze)||(Ze=we(Ee(xe,".",Ae,!0)))),Ze.equals(_i)||(wt(Ze),kn==null||kn(Ze.isEmpty()?null:pn(ai,Ze)),Wn===void 0&&wi(Ze,Qn)),Ze}return _i},kt=nr(),sn=function Xn(Zn){if(He(),Kn.current=Zn,Zr(Zn),!Hi.current){var Qn=vn(Zn),Ze=we(Qn);Ze.isNaN()||yt(Ze,!0)}ia==null||ia(Zn),kt(function(){var ze=Zn;sr||(ze=Zn.replace(/。/g,".")),ze!==Zn&&Xn(ze)})},dn=function(){Hi.current=!0},Gn=function(){Hi.current=!1,sn(xa.current.value)},pr=function(Zn){sn(Zn.target.value)},Hn=function(Zn){var Qn;if(!(Zn&&oa||!Zn&&Wi)){ga.current=!1;var Ze=we(Ia.current?Qt(Rn):Rn);Zn||(Ze=Ze.negate());var ze=(_i||we(0)).add(Ze.toString()),xe=yt(ze,!1);Ma==null||Ma(pn(ai,xe),{offset:Ia.current?Qt(Rn):Rn,type:Zn?"up":"down"}),(Qn=xa.current)===null||Qn===void 0||Qn.focus()}},Cn=function(Zn){var Qn=we(vn(Xr)),Ze=Qn;Qn.isNaN()?Ze=yt(_i,Zn):Ze=yt(Qn,Zn),Wn!==void 0?wi(_i,!1):Ze.isNaN()||wi(Ze,!1)},gn=function(){ga.current=!0},Pn=function(Zn){var Qn=Zn.key,Ze=Zn.shiftKey;ga.current=!0,Ia.current=Ze,Qn==="Enter"&&(Hi.current||(ga.current=!1),Cn(!1),zi==null||zi(Zn)),bn!==!1&&!Hi.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Qn)&&(Hn(Qn==="Up"||Qn==="ArrowUp"),Zn.preventDefault())},Fn=function(){ga.current=!1,Ia.current=!1},dr=function(){Cn(!1),Ta(!1),ga.current=!1};return at(function(){_i.isInvalidate()||wi(_i,!1)},[ur]),at(function(){var Xn=we(Wn);Mt(Xn);var Zn=we(vn(Xr));(!Xn.equals(Zn)||!ga.current||vi)&&wi(Xn,ga.current)},[Wn]),at(function(){vi&&Ke()},[Xr]),Ye.createElement("div",{className:it()(We,xi==null?void 0:xi.input,mt,(pt={},(0,Le.Z)(pt,"".concat(We,"-focused"),fa),(0,Le.Z)(pt,"".concat(We,"-disabled"),Jn),(0,Le.Z)(pt,"".concat(We,"-readonly"),or),(0,Le.Z)(pt,"".concat(We,"-not-a-number"),_i.isNaN()),(0,Le.Z)(pt,"".concat(We,"-out-of-range"),!_i.isInvalidate()&&!ct(_i)),pt)),style:Dt,onFocus:function(){Ta(!0)},onBlur:dr,onKeyDown:Pn,onKeyUp:Fn,onCompositionStart:dn,onCompositionEnd:Gn,onBeforeInput:gn},hi&&Ye.createElement(Ht,{prefixCls:We,upNode:lr,downNode:Rr,upDisabled:oa,downDisabled:Wi,onStep:Hn}),Ye.createElement("div",{className:"".concat(Zi,"-wrap")},Ye.createElement("input",(0,ve.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":gt,"aria-valuemax":qt,"aria-valuenow":_i.isInvalidate()?null:_i.toString(),step:Rn},Ji,{ref:on(xa,rt),className:Zi,value:Xr,onChange:pr,disabled:Jn,readOnly:or}))))}),$n=Ye.forwardRef(function(Qe,rt){var pt=Qe.disabled,Rt=Qe.style,We=Qe.prefixCls,mt=Qe.value,Dt=Qe.prefix,gt=Qe.suffix,qt=Qe.addonBefore,Yt=Qe.addonAfter,Rn=Qe.classes,br=Qe.className,Wn=Qe.classNames,Jn=(0,me.Z)(Qe,Ut),or=Ye.useRef(null),lr=function(bn){or.current&&(0,Gt.nH)(or.current,bn)};return Ye.createElement(je.BaseInput,{inputElement:Ye.createElement(Lr,(0,ve.Z)({prefixCls:We,disabled:pt,classNames:Wn,ref:on(or,rt)},Jn)),className:br,triggerFocus:lr,prefixCls:We,value:mt,disabled:pt,style:Rt,prefix:Dt,suffix:gt,addonAfter:Yt,addonBefore:qt,classes:Rn,classNames:Wn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});$n.displayName="InputNumber";var Cr=$n,Ii=Cr,li=se(9708),ci=se(53124),Jr=se(46735),Di=se(98866),Ei=se(98675),Pi=se(65223),xr=se(4173),Pr=se(47673),Gi=se(14747),ma=se(80110),ba=se(67968),va=se(45503);const Vi=(Qe,rt)=>{let{componentCls:pt,borderRadiusSM:Rt,borderRadiusLG:We}=Qe;const mt=rt==="lg"?We:Rt;return{[`&-${rt}`]:{[`${pt}-handler-wrap`]:{borderStartEndRadius:mt,borderEndEndRadius:mt},[`${pt}-handler-up`]:{borderStartEndRadius:mt},[`${pt}-handler-down`]:{borderEndEndRadius:mt}}}},At=Qe=>{const{componentCls:rt,lineWidth:pt,lineType:Rt,colorBorder:We,borderRadius:mt,fontSizeLG:Dt,controlHeightLG:gt,controlHeightSM:qt,colorError:Yt,paddingInlineSM:Rn,colorTextDescription:br,motionDurationMid:Wn,handleHoverColor:Jn,paddingInline:or,paddingBlock:lr,handleBg:Rr,handleActiveBg:bn,colorTextDisabled:An,borderRadiusSM:hi,borderRadiusLG:xi,controlWidth:ai,handleVisible:sr,handleBorderColor:vi}=Qe;return[{[rt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Gi.Wf)(Qe)),(0,Pr.ik)(Qe)),(0,Pr.bi)(Qe,rt)),{display:"inline-block",width:ai,margin:0,padding:0,border:`${pt}px ${Rt} ${We}`,borderRadius:mt,"&-rtl":{direction:"rtl",[`${rt}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Dt,borderRadius:xi,[`input${rt}-input`]:{height:gt-2*pt}},"&-sm":{padding:0,borderRadius:hi,[`input${rt}-input`]:{height:qt-2*pt,padding:`0 ${Rn}px`}},"&:hover":Object.assign({},(0,Pr.pU)(Qe)),"&-focused":Object.assign({},(0,Pr.M1)(Qe)),"&-out-of-range":{[`${rt}-input-wrap`]:{input:{color:Yt}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Gi.Wf)(Qe)),(0,Pr.s7)(Qe)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${rt}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${rt}-group-addon`]:{borderRadius:xi,fontSize:Qe.fontSizeLG}},"&-sm":{[`${rt}-group-addon`]:{borderRadius:hi}},[`${rt}-wrapper-disabled > ${rt}-group-addon`]:Object.assign({},(0,Pr.Xy)(Qe))}}),[`&-disabled ${rt}-input`]:{cursor:"not-allowed"},[rt]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Gi.Wf)(Qe)),{width:"100%",padding:`${lr}px ${or}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:mt,outline:0,transition:`all ${Wn} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Pr.nz)(Qe.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[rt]:Object.assign(Object.assign(Object.assign({[`&:hover ${rt}-handler-wrap, &-focused ${rt}-handler-wrap`]:{opacity:1},[`${rt}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Qe.handleWidth,height:"100%",background:Rr,borderStartStartRadius:0,borderStartEndRadius:mt,borderEndEndRadius:mt,borderEndStartRadius:0,opacity:sr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Wn} linear ${Wn}`,[`${rt}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${rt}-handler-up-inner,
${rt}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:Qe.handleFontSize}}},[`${rt}-handler`]:{height:"50%",overflow:"hidden",color:br,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${pt}px ${Rt} ${vi}`,transition:`all ${Wn} linear`,"&:active":{background:bn},"&:hover":{height:"60%",[`
${rt}-handler-up-inner,
${rt}-handler-down-inner
`]:{color:Jn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Gi.Ro)()),{color:br,transition:`all ${Wn} linear`,userSelect:"none"})},[`${rt}-handler-up`]:{borderStartEndRadius:mt},[`${rt}-handler-down`]:{borderBlockStart:`${pt}px ${Rt} ${vi}`,borderEndEndRadius:mt}},Vi(Qe,"lg")),Vi(Qe,"sm")),{"&-disabled, &-readonly":{[`${rt}-handler-wrap`]:{display:"none"},[`${rt}-input`]:{color:"inherit"}},[`
${rt}-handler-up-disabled,
${rt}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${rt}-handler-up-disabled:hover &-handler-up-inner,
${rt}-handler-down-disabled:hover &-handler-down-inner
`]:{color:An}})},{[`${rt}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${rt}-handler-down`]:{borderBlockStartWidth:0}}}]},On=Qe=>{const{componentCls:rt,paddingBlock:pt,paddingInline:Rt,inputAffixPadding:We,controlWidth:mt,borderRadiusLG:Dt,borderRadiusSM:gt}=Qe;return{[`${rt}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Pr.ik)(Qe)),(0,Pr.bi)(Qe,`${rt}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:mt,padding:0,paddingInlineStart:Rt,"&-lg":{borderRadius:Dt},"&-sm":{borderRadius:gt},[`&:not(${rt}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Pr.pU)(Qe)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${rt}-disabled`]:{background:"transparent"},[`> div${rt}`]:{width:"100%",border:"none",outline:"none",[`&${rt}-focused`]:{boxShadow:"none !important"}},[`input${rt}-input`]:{padding:`${pt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${rt}-handler-wrap`]:{zIndex:2},[rt]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:We},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Rt,marginInlineStart:We}}})}};var Pt=(0,ba.Z)("InputNumber",Qe=>{const rt=(0,va.TS)(Qe,(0,Pr.e5)(Qe));return[At(rt),On(rt),(0,ma.c)(rt)]},Qe=>Object.assign(Object.assign({},(0,Pr.TM)(Qe)),{controlWidth:90,handleWidth:Qe.controlHeightSM-Qe.lineWidth*2,handleFontSize:Qe.fontSize/2,handleVisible:"auto",handleActiveBg:Qe.colorFillAlter,handleBg:Qe.colorBgContainer,handleHoverColor:Qe.colorPrimary,handleBorderColor:Qe.colorBorder})),zt=function(Qe,rt){var pt={};for(var Rt in Qe)Object.prototype.hasOwnProperty.call(Qe,Rt)&&rt.indexOf(Rt)<0&&(pt[Rt]=Qe[Rt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Rt=Object.getOwnPropertySymbols(Qe);We<Rt.length;We++)rt.indexOf(Rt[We])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Rt[We])&&(pt[Rt[We]]=Qe[Rt[We]]);return pt};const rn=Ye.forwardRef((Qe,rt)=>{const{getPrefixCls:pt,direction:Rt}=Ye.useContext(ci.E_),We=Ye.useRef(null);Ye.useImperativeHandle(rt,()=>We.current);const{className:mt,rootClassName:Dt,size:gt,disabled:qt,prefixCls:Yt,addonBefore:Rn,addonAfter:br,prefix:Wn,bordered:Jn=!0,readOnly:or,status:lr,controls:Rr}=Qe,bn=zt(Qe,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),An=pt("input-number",Yt),[hi,xi]=Pt(An),{compactSize:ai,compactItemClassnames:sr}=(0,xr.ri)(An,Rt);let vi=Ye.createElement(Ue.Z,{className:`${An}-handler-up-inner`}),ur=Ye.createElement(ce.Z,{className:`${An}-handler-down-inner`});const Qr=typeof Rr=="boolean"?Rr:void 0;typeof Rr=="object"&&(vi=typeof Rr.upIcon=="undefined"?vi:Ye.createElement("span",{className:`${An}-handler-up-inner`},Rr.upIcon),ur=typeof Rr.downIcon=="undefined"?ur:Ye.createElement("span",{className:`${An}-handler-down-inner`},Rr.downIcon));const{hasFeedback:kn,status:ia,isFormItemInput:zi,feedbackIcon:Ma}=Ye.useContext(Pi.aM),Ji=(0,li.F)(ia,lr),Zi=(0,Ei.Z)(ga=>{var Hi;return(Hi=gt!=null?gt:ai)!==null&&Hi!==void 0?Hi:ga}),xa=Ye.useContext(Di.Z),aa=qt!=null?qt:xa,Ni=it()({[`${An}-lg`]:Zi==="large",[`${An}-sm`]:Zi==="small",[`${An}-rtl`]:Rt==="rtl",[`${An}-borderless`]:!Jn,[`${An}-in-form-item`]:zi},(0,li.Z)(An,Ji),sr,xi),fa=`${An}-group`,Ta=Ye.createElement(Ii,Object.assign({ref:We,disabled:aa,className:it()(mt,Dt),upHandler:vi,downHandler:ur,prefixCls:An,readOnly:or,controls:Qr,prefix:Wn,suffix:kn&&Ma,addonAfter:br&&Ye.createElement(xr.BR,null,Ye.createElement(Pi.Ux,{override:!0,status:!0},br)),addonBefore:Rn&&Ye.createElement(xr.BR,null,Ye.createElement(Pi.Ux,{override:!0,status:!0},Rn)),classNames:{input:Ni},classes:{affixWrapper:it()((0,li.Z)(`${An}-affix-wrapper`,Ji,kn),{[`${An}-affix-wrapper-sm`]:Zi==="small",[`${An}-affix-wrapper-lg`]:Zi==="large",[`${An}-affix-wrapper-rtl`]:Rt==="rtl",[`${An}-affix-wrapper-borderless`]:!Jn},xi),wrapper:it()({[`${fa}-rtl`]:Rt==="rtl",[`${An}-wrapper-disabled`]:aa},xi),group:it()({[`${An}-group-wrapper-sm`]:Zi==="small",[`${An}-group-wrapper-lg`]:Zi==="large",[`${An}-group-wrapper-rtl`]:Rt==="rtl"},(0,li.Z)(`${An}-group-wrapper`,Ji,kn),xi)}},bn));return hi(Ta)}),cn=rn,Vn=Qe=>Ye.createElement(Jr.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ye.createElement(rn,Object.assign({},Qe)));cn._InternalPanelDoNotUseOrYouWillBeFired=Vn;var Nn=cn},82586:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return jt},n:function(){return ke}});var ce=se(16646),Ue=se(94184),Fe=se.n(Ue),it=se(67656),ve=se(17799),Le=se(67294),Me=se(9708),Se=se(53124),me=se(98866),Pe=se(98675),st=se(65223),Re=se(4173),Et=se(72922),ht=se(47673);function lt(tt){return!!(tt.prefix||tt.suffix||tt.allowClear)}var et=function(tt,ut){var Ee={};for(var we in tt)Object.prototype.hasOwnProperty.call(tt,we)&&ut.indexOf(we)<0&&(Ee[we]=tt[we]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,we=Object.getOwnPropertySymbols(tt);je<we.length;je++)ut.indexOf(we[je])<0&&Object.prototype.propertyIsEnumerable.call(tt,we[je])&&(Ee[we[je]]=tt[we[je]]);return Ee};function ke(tt,ut){if(!tt)return;tt.focus(ut);const{cursor:Ee}=ut||{};if(Ee){const we=tt.value.length;switch(Ee){case"start":tt.setSelectionRange(0,0);break;case"end":tt.setSelectionRange(we,we);break;default:tt.setSelectionRange(0,we);break}}}var jt=(0,Le.forwardRef)((tt,ut)=>{var Ee;const{prefixCls:we,bordered:je=!0,status:Ye,size:Lt,disabled:Ct,onBlur:Bt,onFocus:at,suffix:Vt,allowClear:$t,addonAfter:xn,addonBefore:dt,className:on,style:En,styles:yn,rootClassName:Ge,onChange:De,classNames:Zt}=tt,In=et(tt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:fn,direction:ot,input:ft}=Le.useContext(Se.E_),Jt=fn("input",we),Bn=(0,Le.useRef)(null),[wn,Nt]=(0,ht.ZP)(Jt),{compactSize:Xt,compactItemClassnames:Dn}=(0,Re.ri)(Jt,ot),Mn=(0,Pe.Z)(gr=>{var Ut;return(Ut=Lt!=null?Lt:Xt)!==null&&Ut!==void 0?Ut:gr}),Te=Le.useContext(me.Z),de=Ct!=null?Ct:Te,{status:le,hasFeedback:pe,feedbackIcon:he}=(0,Le.useContext)(st.aM),oe=(0,Me.F)(le,Ye),Ie=lt(tt)||!!pe,Je=(0,Le.useRef)(Ie);(0,Le.useEffect)(()=>{var gr;Ie&&Je.current,Je.current=Ie},[Ie]);const _t=(0,Et.Z)(Bn,!0),Kt=gr=>{_t(),Bt==null||Bt(gr)},Ht=gr=>{_t(),at==null||at(gr)},Qt=gr=>{_t(),De==null||De(gr)},Gt=(pe||Vt)&&Le.createElement(Le.Fragment,null,Vt,pe&&he);let nr;return typeof $t=="object"&&($t!=null&&$t.clearIcon)?nr=$t:$t&&(nr={clearIcon:Le.createElement(ce.Z,null)}),wn(Le.createElement(it.default,Object.assign({ref:(0,ve.sQ)(ut,Bn),prefixCls:Jt,autoComplete:ft==null?void 0:ft.autoComplete},In,{disabled:de,onBlur:Kt,onFocus:Ht,style:Object.assign(Object.assign({},ft==null?void 0:ft.style),En),styles:Object.assign(Object.assign({},ft==null?void 0:ft.styles),yn),suffix:Gt,allowClear:nr,className:Fe()(on,Ge,Dn,ft==null?void 0:ft.className),onChange:Qt,addonAfter:xn&&Le.createElement(Re.BR,null,Le.createElement(st.Ux,{override:!0,status:!0},xn)),addonBefore:dt&&Le.createElement(Re.BR,null,Le.createElement(st.Ux,{override:!0,status:!0},dt)),classNames:Object.assign(Object.assign(Object.assign({},Zt),ft==null?void 0:ft.classNames),{input:Fe()({[`${Jt}-sm`]:Mn==="small",[`${Jt}-lg`]:Mn==="large",[`${Jt}-rtl`]:ot==="rtl",[`${Jt}-borderless`]:!je},!Ie&&(0,Me.Z)(Jt,oe),Zt==null?void 0:Zt.input,(Ee=ft==null?void 0:ft.classNames)===null||Ee===void 0?void 0:Ee.input,Nt)}),classes:{affixWrapper:Fe()({[`${Jt}-affix-wrapper-sm`]:Mn==="small",[`${Jt}-affix-wrapper-lg`]:Mn==="large",[`${Jt}-affix-wrapper-rtl`]:ot==="rtl",[`${Jt}-affix-wrapper-borderless`]:!je},(0,Me.Z)(`${Jt}-affix-wrapper`,oe,pe),Nt),wrapper:Fe()({[`${Jt}-group-rtl`]:ot==="rtl"},Nt),group:Fe()({[`${Jt}-group-wrapper-sm`]:Mn==="small",[`${Jt}-group-wrapper-lg`]:Mn==="large",[`${Jt}-group-wrapper-rtl`]:ot==="rtl",[`${Jt}-group-wrapper-disabled`]:de},(0,Me.Z)(`${Jt}-group-wrapper`,oe,pe),Nt)}})))})},96330:function(Ln,en,se){"use strict";var ce=se(16646),Ue=se(94184),Fe=se.n(Ue),it=se(64701),ve=se(67294),Le=se(9708),Me=se(53124),Se=se(98866),me=se(98675),Pe=se(65223),st=se(82586),Re=se(47673),Et=function(lt,et){var ke={};for(var vt in lt)Object.prototype.hasOwnProperty.call(lt,vt)&&et.indexOf(vt)<0&&(ke[vt]=lt[vt]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,vt=Object.getOwnPropertySymbols(lt);jt<vt.length;jt++)et.indexOf(vt[jt])<0&&Object.prototype.propertyIsEnumerable.call(lt,vt[jt])&&(ke[vt[jt]]=lt[vt[jt]]);return ke};const ht=(0,ve.forwardRef)((lt,et)=>{const{prefixCls:ke,bordered:vt=!0,size:jt,disabled:tt,status:ut,allowClear:Ee,showCount:we,classNames:je,rootClassName:Ye,className:Lt}=lt,Ct=Et(lt,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Bt,direction:at}=ve.useContext(Me.E_),Vt=(0,me.Z)(jt),$t=ve.useContext(Se.Z),xn=tt!=null?tt:$t,{status:dt,hasFeedback:on,feedbackIcon:En}=ve.useContext(Pe.aM),yn=(0,Le.F)(dt,ut),Ge=ve.useRef(null);ve.useImperativeHandle(et,()=>{var ot;return{resizableTextArea:(ot=Ge.current)===null||ot===void 0?void 0:ot.resizableTextArea,focus:ft=>{var Jt,Bn;(0,st.n)((Bn=(Jt=Ge.current)===null||Jt===void 0?void 0:Jt.resizableTextArea)===null||Bn===void 0?void 0:Bn.textArea,ft)},blur:()=>{var ft;return(ft=Ge.current)===null||ft===void 0?void 0:ft.blur()}}});const De=Bt("input",ke);let Zt;typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?Zt=Ee:Ee&&(Zt={clearIcon:ve.createElement(ce.Z,null)});const[In,fn]=(0,Re.ZP)(De);return In(ve.createElement(it.default,Object.assign({},Ct,{disabled:xn,allowClear:Zt,className:Fe()(Lt,Ye),classes:{affixWrapper:Fe()(`${De}-textarea-affix-wrapper`,{[`${De}-affix-wrapper-rtl`]:at==="rtl",[`${De}-affix-wrapper-borderless`]:!vt,[`${De}-affix-wrapper-sm`]:Vt==="small",[`${De}-affix-wrapper-lg`]:Vt==="large",[`${De}-textarea-show-count`]:we},(0,Le.Z)(`${De}-affix-wrapper`,yn),fn)},classNames:Object.assign(Object.assign({},je),{textarea:Fe()({[`${De}-borderless`]:!vt,[`${De}-sm`]:Vt==="small",[`${De}-lg`]:Vt==="large"},(0,Le.Z)(De,yn),fn,je==null?void 0:je.textarea)}),prefixCls:De,suffix:on&&ve.createElement("span",{className:`${De}-textarea-suffix`},En),showCount:we,ref:Ge})))});en.Z=ht},72922:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ue}});var ce=se(67294);function Ue(Fe,it){const ve=(0,ce.useRef)([]),Le=()=>{ve.current.push(setTimeout(()=>{var Me,Se,me,Pe;!((Me=Fe.current)===null||Me===void 0)&&Me.input&&((Se=Fe.current)===null||Se===void 0?void 0:Se.input.getAttribute("type"))==="password"&&(!((me=Fe.current)===null||me===void 0)&&me.input.hasAttribute("value"))&&((Pe=Fe.current)===null||Pe===void 0||Pe.input.removeAttribute("value"))}))};return(0,ce.useEffect)(()=>(it&&Le(),()=>ve.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),Le}},69677:function(Ln,en,se){"use strict";se.d(en,{default:function(){return Vt}});var ce=se(94184),Ue=se.n(ce),Fe=se(67294),it=se(53124),ve=se(65223),Le=se(47673),Se=$t=>{const{getPrefixCls:xn,direction:dt}=(0,Fe.useContext)(it.E_),{prefixCls:on,className:En}=$t,yn=xn("input-group",on),Ge=xn("input"),[De,Zt]=(0,Le.ZP)(Ge),In=Ue()(yn,{[`${yn}-lg`]:$t.size==="large",[`${yn}-sm`]:$t.size==="small",[`${yn}-compact`]:$t.compact,[`${yn}-rtl`]:dt==="rtl"},Zt,En),fn=(0,Fe.useContext)(ve.aM),ot=(0,Fe.useMemo)(()=>Object.assign(Object.assign({},fn),{isFormItemInput:!1}),[fn]);return De(Fe.createElement("span",{className:In,style:$t.style,onMouseEnter:$t.onMouseEnter,onMouseLeave:$t.onMouseLeave,onFocus:$t.onFocus,onBlur:$t.onBlur},Fe.createElement(ve.aM.Provider,{value:ot},$t.children)))},me=se(82586),Pe=se(63237),st=se(99569),Re=se(10366),Et=se(17799),ht=se(72922),lt=function($t,xn){var dt={};for(var on in $t)Object.prototype.hasOwnProperty.call($t,on)&&xn.indexOf(on)<0&&(dt[on]=$t[on]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var En=0,on=Object.getOwnPropertySymbols($t);En<on.length;En++)xn.indexOf(on[En])<0&&Object.prototype.propertyIsEnumerable.call($t,on[En])&&(dt[on[En]]=$t[on[En]]);return dt};const et=$t=>$t?Fe.createElement(st.Z,null):Fe.createElement(Pe.Z,null),ke={click:"onClick",hover:"onMouseOver"};var jt=Fe.forwardRef(($t,xn)=>{const{visibilityToggle:dt=!0}=$t,on=typeof dt=="object"&&dt.visible!==void 0,[En,yn]=(0,Fe.useState)(()=>on?dt.visible:!1),Ge=(0,Fe.useRef)(null);Fe.useEffect(()=>{on&&yn(dt.visible)},[on,dt]);const De=(0,ht.Z)(Ge),Zt=()=>{const{disabled:de}=$t;de||(En&&De(),yn(le=>{var pe;const he=!le;return typeof dt=="object"&&((pe=dt.onVisibleChange)===null||pe===void 0||pe.call(dt,he)),he}))},In=de=>{const{action:le="click",iconRender:pe=et}=$t,he=ke[le]||"",oe=pe(En),Ie={[he]:Zt,className:`${de}-icon`,key:"passwordIcon",onMouseDown:Je=>{Je.preventDefault()},onMouseUp:Je=>{Je.preventDefault()}};return Fe.cloneElement(Fe.isValidElement(oe)?oe:Fe.createElement("span",null,oe),Ie)},{className:fn,prefixCls:ot,inputPrefixCls:ft,size:Jt}=$t,Bn=lt($t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:wn}=Fe.useContext(it.E_),Nt=wn("input",ft),Xt=wn("input-password",ot),Dn=dt&&In(Xt),Mn=Ue()(Xt,fn,{[`${Xt}-${Jt}`]:!!Jt}),Te=Object.assign(Object.assign({},(0,Re.Z)(Bn,["suffix","iconRender","visibilityToggle"])),{type:En?"text":"password",className:Mn,prefixCls:Nt,suffix:Dn});return Jt&&(Te.size=Jt),Fe.createElement(me.Z,Object.assign({ref:(0,Et.sQ)(xn,Ge)},Te))}),tt=se(72395),ut=se(96159),Ee=se(71577),we=se(98675),je=se(4173),Ye=function($t,xn){var dt={};for(var on in $t)Object.prototype.hasOwnProperty.call($t,on)&&xn.indexOf(on)<0&&(dt[on]=$t[on]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var En=0,on=Object.getOwnPropertySymbols($t);En<on.length;En++)xn.indexOf(on[En])<0&&Object.prototype.propertyIsEnumerable.call($t,on[En])&&(dt[on[En]]=$t[on[En]]);return dt},Ct=Fe.forwardRef(($t,xn)=>{const{prefixCls:dt,inputPrefixCls:on,className:En,size:yn,suffix:Ge,enterButton:De=!1,addonAfter:Zt,loading:In,disabled:fn,onSearch:ot,onChange:ft,onCompositionStart:Jt,onCompositionEnd:Bn}=$t,wn=Ye($t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Nt,direction:Xt}=Fe.useContext(it.E_),Dn=Fe.useRef(!1),Mn=Nt("input-search",dt),Te=Nt("input",on),{compactSize:de}=(0,je.ri)(Mn,Xt),le=(0,we.Z)(pn=>{var ir;return(ir=yn!=null?yn:de)!==null&&ir!==void 0?ir:pn}),pe=Fe.useRef(null),he=pn=>{pn&&pn.target&&pn.type==="click"&&ot&&ot(pn.target.value,pn,{source:"clear"}),ft&&ft(pn)},oe=pn=>{var ir;document.activeElement===((ir=pe.current)===null||ir===void 0?void 0:ir.input)&&pn.preventDefault()},Ie=pn=>{var ir,Lr;ot&&ot((Lr=(ir=pe.current)===null||ir===void 0?void 0:ir.input)===null||Lr===void 0?void 0:Lr.value,pn,{source:"input"})},Je=pn=>{Dn.current||In||Ie(pn)},_t=typeof De=="boolean"?Fe.createElement(tt.Z,null):null,Kt=`${Mn}-button`;let Ht;const Qt=De||{},Gt=Qt.type&&Qt.type.__ANT_BUTTON===!0;Gt||Qt.type==="button"?Ht=(0,ut.Tm)(Qt,Object.assign({onMouseDown:oe,onClick:pn=>{var ir,Lr;(Lr=(ir=Qt==null?void 0:Qt.props)===null||ir===void 0?void 0:ir.onClick)===null||Lr===void 0||Lr.call(ir,pn),Ie(pn)},key:"enterButton"},Gt?{className:Kt,size:le}:{})):Ht=Fe.createElement(Ee.ZP,{className:Kt,type:De?"primary":void 0,size:le,disabled:fn,key:"enterButton",onMouseDown:oe,onClick:Ie,loading:In,icon:_t},De),Zt&&(Ht=[Ht,(0,ut.Tm)(Zt,{key:"addonAfter"})]);const nr=Ue()(Mn,{[`${Mn}-rtl`]:Xt==="rtl",[`${Mn}-${le}`]:!!le,[`${Mn}-with-button`]:!!De},En),gr=pn=>{Dn.current=!0,Jt==null||Jt(pn)},Ut=pn=>{Dn.current=!1,Bn==null||Bn(pn)};return Fe.createElement(me.Z,Object.assign({ref:(0,Et.sQ)(pe,xn),onPressEnter:Je},wn,{size:le,onCompositionStart:gr,onCompositionEnd:Ut,prefixCls:Te,addonAfter:Ht,suffix:Ge,onChange:he,className:nr,disabled:fn}))}),Bt=se(96330);const at=me.Z;at.Group=Se,at.Search=Ct,at.TextArea=Bt.Z,at.Password=jt;var Vt=at},47673:function(Ln,en,se){"use strict";se.d(en,{M1:function(){return Me},TM:function(){return ut},Xy:function(){return Se},bi:function(){return st},e5:function(){return tt},ik:function(){return Re},nz:function(){return ve},pU:function(){return Le},s7:function(){return Et},x0:function(){return Pe}});var ce=se(14747),Ue=se(80110),Fe=se(45503),it=se(67968);const ve=Ee=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ee,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Le=Ee=>({borderColor:Ee.hoverBorderColor}),Me=Ee=>({borderColor:Ee.activeBorderColor,boxShadow:Ee.activeShadow,outline:0}),Se=Ee=>({color:Ee.colorTextDisabled,backgroundColor:Ee.colorBgContainerDisabled,borderColor:Ee.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Le((0,Fe.TS)(Ee,{hoverBorderColor:Ee.colorBorder})))}),me=Ee=>{const{paddingBlockLG:we,fontSizeLG:je,lineHeightLG:Ye,borderRadiusLG:Lt,paddingInlineLG:Ct}=Ee;return{padding:`${we}px ${Ct}px`,fontSize:je,lineHeight:Ye,borderRadius:Lt}},Pe=Ee=>({padding:`${Ee.paddingBlockSM}px ${Ee.paddingInlineSM}px`,borderRadius:Ee.borderRadiusSM}),st=(Ee,we)=>{const{componentCls:je,colorError:Ye,colorWarning:Lt,errorActiveShadow:Ct,warningActiveShadow:Bt,colorErrorBorderHover:at,colorWarningBorderHover:Vt}=Ee;return{[`&-status-error:not(${we}-disabled):not(${we}-borderless)${we}`]:{borderColor:Ye,"&:hover":{borderColor:at},"&:focus, &-focused":Object.assign({},Me((0,Fe.TS)(Ee,{activeBorderColor:Ye,activeShadow:Ct}))),[`${je}-prefix, ${je}-suffix`]:{color:Ye}},[`&-status-warning:not(${we}-disabled):not(${we}-borderless)${we}`]:{borderColor:Lt,"&:hover":{borderColor:Vt},"&:focus, &-focused":Object.assign({},Me((0,Fe.TS)(Ee,{activeBorderColor:Lt,activeShadow:Bt}))),[`${je}-prefix, ${je}-suffix`]:{color:Lt}}}},Re=Ee=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Ee.paddingBlock}px ${Ee.paddingInline}px`,color:Ee.colorText,fontSize:Ee.fontSize,lineHeight:Ee.lineHeight,backgroundColor:Ee.colorBgContainer,backgroundImage:"none",borderWidth:Ee.lineWidth,borderStyle:Ee.lineType,borderColor:Ee.colorBorder,borderRadius:Ee.borderRadius,transition:`all ${Ee.motionDurationMid}`},ve(Ee.colorTextPlaceholder)),{"&:hover":Object.assign({},Le(Ee)),"&:focus, &-focused":Object.assign({},Me(Ee)),"&-disabled, &[disabled]":Object.assign({},Se(Ee)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Ee.controlHeight,lineHeight:Ee.lineHeight,verticalAlign:"bottom",transition:`all ${Ee.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},me(Ee)),"&-sm":Object.assign({},Pe(Ee)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Et=Ee=>{const{componentCls:we,antCls:je}=Ee;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ee.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${we}, &-lg > ${we}-group-addon`]:Object.assign({},me(Ee)),[`&-sm ${we}, &-sm > ${we}-group-addon`]:Object.assign({},Pe(Ee)),[`&-lg ${je}-select-single ${je}-select-selector`]:{height:Ee.controlHeightLG},[`&-sm ${je}-select-single ${je}-select-selector`]:{height:Ee.controlHeightSM},[`> ${we}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${we}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Ee.paddingInline}px`,color:Ee.colorText,fontWeight:"normal",fontSize:Ee.fontSize,textAlign:"center",backgroundColor:Ee.colorFillAlter,border:`${Ee.lineWidth}px ${Ee.lineType} ${Ee.colorBorder}`,borderRadius:Ee.borderRadius,transition:`all ${Ee.motionDurationSlow}`,lineHeight:1,[`${je}-select`]:{margin:`-${Ee.paddingBlock+1}px -${Ee.paddingInline}px`,[`&${je}-select-single:not(${je}-select-customize-input)`]:{[`${je}-select-selector`]:{backgroundColor:"inherit",border:`${Ee.lineWidth}px ${Ee.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${je}-select-selector`]:{color:Ee.colorPrimary}}},[`${je}-cascader-picker`]:{margin:`-9px -${Ee.paddingInline}px`,backgroundColor:"transparent",[`${je}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${we}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${we}-search-with-button &`]:{zIndex:0}}},[`> ${we}:first-child, ${we}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${je}-select ${je}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${we}-affix-wrapper`]:{[`&:not(:first-child) ${we}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${we}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${we}:last-child, ${we}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${je}-select ${je}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${we}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${we}-search &`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius}},[`&:not(:first-child), ${we}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${we}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ce.dF)()),{[`${we}-group-addon, ${we}-group-wrap, > ${we}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ee.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${we}-affix-wrapper,
& > ${we}-number-affix-wrapper,
& > ${je}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ee.lineWidth,borderInlineEndWidth:Ee.lineWidth},[`${we}`]:{float:"none"},[`& > ${je}-select > ${je}-select-selector,
& > ${je}-select-auto-complete ${we},
& > ${je}-cascader-picker ${we},
& > ${we}-group-wrapper ${we}`]:{borderInlineEndWidth:Ee.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${je}-select-focused`]:{zIndex:1},[`& > ${je}-select > ${je}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${je}-select:first-child > ${je}-select-selector,
& > ${je}-select-auto-complete:first-child ${we},
& > ${je}-cascader-picker:first-child ${we}`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius},[`& > *:last-child,
& > ${je}-select:last-child > ${je}-select-selector,
& > ${je}-cascader-picker:last-child ${we},
& > ${je}-cascader-picker-focused:last-child ${we}`]:{borderInlineEndWidth:Ee.lineWidth,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius},[`& > ${je}-select-auto-complete ${we}`]:{verticalAlign:"top"},[`${we}-group-wrapper + ${we}-group-wrapper`]:{marginInlineStart:-Ee.lineWidth,[`${we}-affix-wrapper`]:{borderRadius:0}},[`${we}-group-wrapper:not(:last-child)`]:{[`&${we}-search > ${we}-group`]:{[`& > ${we}-group-addon > ${we}-search-button`]:{borderRadius:0},[`& > ${we}`]:{borderStartStartRadius:Ee.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ee.borderRadius}}}})}},ht=Ee=>{const{componentCls:we,controlHeightSM:je,lineWidth:Ye}=Ee,Ct=(je-Ye*2-16)/2;return{[we]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(Ee)),Re(Ee)),st(Ee,we)),{'&[type="color"]':{height:Ee.controlHeight,[`&${we}-lg`]:{height:Ee.controlHeightLG},[`&${we}-sm`]:{height:je,paddingTop:Ct,paddingBottom:Ct}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},lt=Ee=>{const{componentCls:we}=Ee;return{[`${we}-clear-icon`]:{margin:0,color:Ee.colorTextQuaternary,fontSize:Ee.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Ee.motionDurationSlow}`,"&:hover":{color:Ee.colorTextTertiary},"&:active":{color:Ee.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Ee.inputAffixPadding}px`}}}},et=Ee=>{const{componentCls:we,inputAffixPadding:je,colorTextDescription:Ye,motionDurationSlow:Lt,colorIcon:Ct,colorIconHover:Bt,iconCls:at}=Ee;return{[`${we}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Re(Ee)),{display:"inline-flex",[`&:not(${we}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Le(Ee)),{zIndex:1,[`${we}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${we}[disabled]`]:{background:"transparent"}},[`> input${we}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${we}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Ee.paddingXS}},"&-show-count-suffix":{color:Ye},"&-show-count-has-suffix":{marginInlineEnd:Ee.paddingXXS},"&-prefix":{marginInlineEnd:je},"&-suffix":{marginInlineStart:je}}}),lt(Ee)),{[`${at}${we}-password-icon`]:{color:Ct,cursor:"pointer",transition:`all ${Lt}`,"&:hover":{color:Bt}}}),st(Ee,`${we}-affix-wrapper`))}},ke=Ee=>{const{componentCls:we,colorError:je,colorWarning:Ye,borderRadiusLG:Lt,borderRadiusSM:Ct}=Ee;return{[`${we}-group`]:Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(Ee)),Et(Ee)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${we}-group-addon`]:{borderRadius:Lt,fontSize:Ee.fontSizeLG}},"&-sm":{[`${we}-group-addon`]:{borderRadius:Ct}},"&-status-error":{[`${we}-group-addon`]:{color:je,borderColor:je}},"&-status-warning":{[`${we}-group-addon`]:{color:Ye,borderColor:Ye}},"&-disabled":{[`${we}-group-addon`]:Object.assign({},Se(Ee))},[`&:not(${we}-compact-first-item):not(${we}-compact-last-item)${we}-compact-item`]:{[`${we}, ${we}-group-addon`]:{borderRadius:0}},[`&:not(${we}-compact-last-item)${we}-compact-first-item`]:{[`${we}, ${we}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${we}-compact-first-item)${we}-compact-last-item`]:{[`${we}, ${we}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},vt=Ee=>{const{componentCls:we,antCls:je}=Ee,Ye=`${we}-search`;return{[Ye]:{[`${we}`]:{"&:hover, &:focus":{borderColor:Ee.colorPrimaryHover,[`+ ${we}-group-addon ${Ye}-button:not(${je}-btn-primary)`]:{borderInlineStartColor:Ee.colorPrimaryHover}}},[`${we}-affix-wrapper`]:{borderRadius:0},[`${we}-lg`]:{lineHeight:Ee.lineHeightLG-2e-4},[`> ${we}-group`]:{[`> ${we}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ye}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ye}-button:not(${je}-btn-primary)`]:{color:Ee.colorTextDescription,"&:hover":{color:Ee.colorPrimaryHover},"&:active":{color:Ee.colorPrimaryActive},[`&${je}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ye}-button`]:{height:Ee.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ye}-button`]:{height:Ee.controlHeightLG},[`&-small ${Ye}-button`]:{height:Ee.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${we}-compact-item`]:{[`&:not(${we}-compact-last-item)`]:{[`${we}-group-addon`]:{[`${we}-search-button`]:{marginInlineEnd:-Ee.lineWidth,borderRadius:0}}},[`&:not(${we}-compact-first-item)`]:{[`${we},${we}-affix-wrapper`]:{borderRadius:0}},[`> ${we}-group-addon ${we}-search-button,
> ${we},
${we}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${we}-affix-wrapper-focused`]:{zIndex:2}}}}},jt=Ee=>{const{componentCls:we,paddingLG:je}=Ee,Ye=`${we}-textarea`;return{[Ye]:{position:"relative","&-show-count":{[`> ${we}`]:{height:"100%"},[`${we}-data-count`]:{position:"absolute",bottom:-Ee.fontSize*Ee.lineHeight,insetInlineEnd:0,color:Ee.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${we}`]:{paddingInlineEnd:je}},[`&-affix-wrapper${Ye}-has-feedback`]:{[`${we}`]:{paddingInlineEnd:je}},[`&-affix-wrapper${we}-affix-wrapper`]:{padding:0,[`> textarea${we}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${we}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${we}-clear-icon`]:{position:"absolute",insetInlineEnd:Ee.paddingXS,insetBlockStart:Ee.paddingXS},[`${Ye}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ee.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function tt(Ee){return(0,Fe.TS)(Ee,{inputAffixPadding:Ee.paddingXXS})}const ut=Ee=>{const{controlHeight:we,fontSize:je,lineHeight:Ye,lineWidth:Lt,controlHeightSM:Ct,controlHeightLG:Bt,fontSizeLG:at,lineHeightLG:Vt,paddingSM:$t,controlPaddingHorizontalSM:xn,controlPaddingHorizontal:dt,colorFillAlter:on,colorPrimaryHover:En,controlOutlineWidth:yn,controlOutline:Ge,colorErrorOutline:De,colorWarningOutline:Zt}=Ee;return{paddingBlock:Math.max(Math.round((we-je*Ye)/2*10)/10-Lt,3),paddingBlockSM:Math.max(Math.round((Ct-je*Ye)/2*10)/10-Lt,0),paddingBlockLG:Math.ceil((Bt-at*Vt)/2*10)/10-Lt,paddingInline:$t-Lt,paddingInlineSM:xn-Lt,paddingInlineLG:dt-Lt,addonBg:on,activeBorderColor:En,hoverBorderColor:En,activeShadow:`0 0 0 ${yn}px ${Ge}`,errorActiveShadow:`0 0 0 ${yn}px ${De}`,warningActiveShadow:`0 0 0 ${yn}px ${Zt}`}};en.ZP=(0,it.Z)("Input",Ee=>{const we=(0,Fe.TS)(Ee,tt(Ee));return[ht(we),jt(we),et(we),ke(we),vt(we),(0,Ue.c)(we)]},ut)},71322:function(Ln,en,se){"use strict";se.d(en,{D:function(){return jt},Z:function(){return Ee}});var ce=se(87462),Ue=se(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},it=Fe,ve=se(84089),Le=function(je,Ye){return Ue.createElement(ve.Z,(0,ce.Z)({},je,{ref:Ye,icon:it}))},Me=Ue.forwardRef(Le),Se=se(22751),me=se(91034),Pe=se(94184),st=se.n(Pe),Re=se(10366),ht=we=>!isNaN(parseFloat(we))&&isFinite(we),lt=se(53124),et=se(84321),ke=function(we,je){var Ye={};for(var Lt in we)Object.prototype.hasOwnProperty.call(we,Lt)&&je.indexOf(Lt)<0&&(Ye[Lt]=we[Lt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,Lt=Object.getOwnPropertySymbols(we);Ct<Lt.length;Ct++)je.indexOf(Lt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(we,Lt[Ct])&&(Ye[Lt[Ct]]=we[Lt[Ct]]);return Ye};const vt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},jt=Ue.createContext({}),tt=(()=>{let we=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return we+=1,`${je}${we}`}})();var Ee=Ue.forwardRef((we,je)=>{const{prefixCls:Ye,className:Lt,trigger:Ct,children:Bt,defaultCollapsed:at=!1,theme:Vt="dark",style:$t={},collapsible:xn=!1,reverseArrow:dt=!1,width:on=200,collapsedWidth:En=80,zeroWidthTriggerStyle:yn,breakpoint:Ge,onCollapse:De,onBreakpoint:Zt}=we,In=ke(we,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:fn}=(0,Ue.useContext)(et.Gs),[ot,ft]=(0,Ue.useState)("collapsed"in we?we.collapsed:at),[Jt,Bn]=(0,Ue.useState)(!1);(0,Ue.useEffect)(()=>{"collapsed"in we&&ft(we.collapsed)},[we.collapsed]);const wn=(de,le)=>{"collapsed"in we||ft(de),De==null||De(de,le)},Nt=(0,Ue.useRef)();Nt.current=de=>{Bn(de.matches),Zt==null||Zt(de.matches),ot!==de.matches&&wn(de.matches,"responsive")},(0,Ue.useEffect)(()=>{function de(pe){return Nt.current(pe)}let le;if(typeof window!="undefined"){const{matchMedia:pe}=window;if(pe&&Ge&&Ge in vt){le=pe(`(max-width: ${vt[Ge]})`);try{le.addEventListener("change",de)}catch(he){le.addListener(de)}de(le)}}return()=>{try{le==null||le.removeEventListener("change",de)}catch(pe){le==null||le.removeListener(de)}}},[Ge]),(0,Ue.useEffect)(()=>{const de=tt("ant-sider-");return fn.addSider(de),()=>fn.removeSider(de)},[]);const Xt=()=>{wn(!ot,"clickTrigger")},{getPrefixCls:Dn}=(0,Ue.useContext)(lt.E_),Mn=()=>{const de=Dn("layout-sider",Ye),le=(0,Re.Z)(In,["collapsed"]),pe=ot?En:on,he=ht(pe)?`${pe}px`:String(pe),oe=parseFloat(String(En||0))===0?Ue.createElement("span",{onClick:Xt,className:st()(`${de}-zero-width-trigger`,`${de}-zero-width-trigger-${dt?"right":"left"}`),style:yn},Ct||Ue.createElement(Me,null)):null,_t={expanded:dt?Ue.createElement(me.Z,null):Ue.createElement(Se.Z,null),collapsed:dt?Ue.createElement(Se.Z,null):Ue.createElement(me.Z,null)}[ot?"collapsed":"expanded"],Kt=Ct!==null?oe||Ue.createElement("div",{className:`${de}-trigger`,onClick:Xt,style:{width:he}},Ct||_t):null,Ht=Object.assign(Object.assign({},$t),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),Qt=st()(de,`${de}-${Vt}`,{[`${de}-collapsed`]:!!ot,[`${de}-has-trigger`]:xn&&Ct!==null&&!oe,[`${de}-below`]:!!Jt,[`${de}-zero-width`]:parseFloat(he)===0},Lt);return Ue.createElement("aside",Object.assign({className:Qt},le,{style:Ht,ref:je}),Ue.createElement("div",{className:`${de}-children`},Bt),xn||Jt&&oe?Kt:null)},Te=Ue.useMemo(()=>({siderCollapsed:ot}),[ot]);return Ue.createElement(jt.Provider,{value:Te},Mn())})},84321:function(Ln,en,se){"use strict";se.d(en,{VY:function(){return tt},$_:function(){return jt},h4:function(){return vt},Gs:function(){return Et},ZP:function(){return ut}});var ce=se(74902),Ue=se(94184),Fe=se.n(Ue),it=se(10366),ve=se(67294),Le=se(53124),Me=se(67968),me=Ee=>{const{componentCls:we,bodyBg:je,lightSiderBg:Ye,lightTriggerBg:Lt,lightTriggerColor:Ct}=Ee;return{[`${we}-sider-light`]:{background:Ye,[`${we}-sider-trigger`]:{color:Ct,background:Lt},[`${we}-sider-zero-width-trigger`]:{color:Ct,background:Lt,border:`1px solid ${je}`,borderInlineStart:0}}}};const Pe=Ee=>{const{antCls:we,componentCls:je,colorText:Ye,triggerColor:Lt,footerBg:Ct,triggerBg:Bt,headerHeight:at,headerPadding:Vt,headerColor:$t,footerPadding:xn,triggerHeight:dt,zeroTriggerHeight:on,zeroTriggerWidth:En,motionDurationMid:yn,motionDurationSlow:Ge,fontSize:De,borderRadius:Zt,bodyBg:In,headerBg:fn,siderBg:ot}=Ee;return{[je]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:In,"&, *":{boxSizing:"border-box"},[`&${je}-has-sider`]:{flexDirection:"row",[`> ${je}, > ${je}-content`]:{width:0}},[`${je}-header, &${je}-footer`]:{flex:"0 0 auto"},[`${je}-sider`]:{position:"relative",minWidth:0,background:ot,transition:`all ${yn}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${we}-menu${we}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:dt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:dt,color:Lt,lineHeight:`${dt}px`,textAlign:"center",background:Bt,cursor:"pointer",transition:`all ${yn}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:at,insetInlineEnd:-En,zIndex:1,width:En,height:on,color:Lt,fontSize:Ee.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ot,borderStartStartRadius:0,borderStartEndRadius:Zt,borderEndEndRadius:Zt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Ge} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Ge}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-En,borderStartStartRadius:Zt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Zt}}}}},me(Ee)),{"&-rtl":{direction:"rtl"}}),[`${je}-header`]:{height:at,padding:Vt,color:$t,lineHeight:`${at}px`,background:fn,[`${we}-menu`]:{lineHeight:"inherit"}},[`${je}-footer`]:{padding:xn,color:Ye,fontSize:De,background:Ct},[`${je}-content`]:{flex:"auto",minHeight:0}}};var st=(0,Me.Z)("Layout",Ee=>[Pe(Ee)],Ee=>{const{colorBgLayout:we,controlHeight:je,controlHeightLG:Ye,colorText:Lt,controlHeightSM:Ct,marginXXS:Bt,colorTextLightSolid:at,colorBgContainer:Vt}=Ee,$t=Ye*1.25;return{colorBgHeader:"#001529",colorBgBody:we,colorBgTrigger:"#002140",bodyBg:we,headerBg:"#001529",headerHeight:je*2,headerPadding:`0 ${$t}px`,headerColor:Lt,footerPadding:`${Ct}px ${$t}px`,footerBg:we,siderBg:"#001529",triggerHeight:Ye+Bt*2,triggerBg:"#002140",triggerColor:at,zeroTriggerWidth:Ye,zeroTriggerHeight:Ye,lightSiderBg:Vt,lightTriggerBg:Vt,lightTriggerColor:Lt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Re=function(Ee,we){var je={};for(var Ye in Ee)Object.prototype.hasOwnProperty.call(Ee,Ye)&&we.indexOf(Ye)<0&&(je[Ye]=Ee[Ye]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,Ye=Object.getOwnPropertySymbols(Ee);Lt<Ye.length;Lt++)we.indexOf(Ye[Lt])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Ye[Lt])&&(je[Ye[Lt]]=Ee[Ye[Lt]]);return je};const Et=ve.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ht(Ee){let{suffixCls:we,tagName:je,displayName:Ye}=Ee;return Lt=>ve.forwardRef((Bt,at)=>ve.createElement(Lt,Object.assign({ref:at,suffixCls:we,tagName:je},Bt)))}const lt=ve.forwardRef((Ee,we)=>{const{prefixCls:je,suffixCls:Ye,className:Lt,tagName:Ct}=Ee,Bt=Re(Ee,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:at}=ve.useContext(Le.E_),Vt=at("layout",je),[$t,xn]=st(Vt),dt=Ye?`${Vt}-${Ye}`:Vt;return $t(ve.createElement(Ct,Object.assign({className:Fe()(je||dt,Lt,xn),ref:we},Bt)))}),et=ve.forwardRef((Ee,we)=>{const{direction:je}=ve.useContext(Le.E_),[Ye,Lt]=ve.useState([]),{prefixCls:Ct,className:Bt,rootClassName:at,children:Vt,hasSider:$t,tagName:xn,style:dt}=Ee,on=Re(Ee,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),En=(0,it.Z)(on,["suffixCls"]),{getPrefixCls:yn,layout:Ge}=ve.useContext(Le.E_),De=yn("layout",Ct),[Zt,In]=st(De),fn=Fe()(De,{[`${De}-has-sider`]:typeof $t=="boolean"?$t:Ye.length>0,[`${De}-rtl`]:je==="rtl"},Ge==null?void 0:Ge.className,Bt,at,In),ot=ve.useMemo(()=>({siderHook:{addSider:ft=>{Lt(Jt=>[].concat((0,ce.Z)(Jt),[ft]))},removeSider:ft=>{Lt(Jt=>Jt.filter(Bn=>Bn!==ft))}}}),[]);return Zt(ve.createElement(Et.Provider,{value:ot},ve.createElement(xn,Object.assign({ref:we,className:fn,style:Object.assign(Object.assign({},Ge==null?void 0:Ge.style),dt)},En),Vt)))}),ke=ht({tagName:"div",displayName:"Layout"})(et),vt=ht({suffixCls:"header",tagName:"header",displayName:"Header"})(lt),jt=ht({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(lt),tt=ht({suffixCls:"content",tagName:"main",displayName:"Content"})(lt);var ut=ke},76529:function(Ln,en,se){"use strict";se.d(en,{J:function(){return Le}});var ce=se(67294),Ue=se(4173),Fe=se(60276),it=function(Me,Se){var me={};for(var Pe in Me)Object.prototype.hasOwnProperty.call(Me,Pe)&&Se.indexOf(Pe)<0&&(me[Pe]=Me[Pe]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Pe=Object.getOwnPropertySymbols(Me);st<Pe.length;st++)Se.indexOf(Pe[st])<0&&Object.prototype.propertyIsEnumerable.call(Me,Pe[st])&&(me[Pe[st]]=Me[Pe[st]]);return me};const ve=ce.createContext(null),Le=ce.forwardRef((Me,Se)=>{const{children:me}=Me,Pe=it(Me,["children"]),st=ce.useContext(ve),Re=ce.useMemo(()=>Object.assign(Object.assign({},st),Pe),[st,Pe.prefixCls,Pe.mode,Pe.selectable]);return ce.createElement(ve.Provider,{value:Re},ce.createElement(Ue.BR,null,(0,Fe.supportNodeRef)(me)?ce.cloneElement(me,{ref:Se}):me))});en.Z=ve},68508:function(Ln,en,se){"use strict";se.d(en,{default:function(){return de}});var ce=se(78595),Ue=se(67294),Fe=se(71322),it=se(94184),ve=se.n(it),Le=se(53124),Me=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(le);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ie])&&(he[oe[Ie]]=le[oe[Ie]]);return he},me=le=>{const{prefixCls:pe,className:he,dashed:oe}=le,Ie=Me(le,["prefixCls","className","dashed"]),{getPrefixCls:Je}=Ue.useContext(Le.E_),_t=Je("menu",pe),Kt=ve()({[`${_t}-item-divider-dashed`]:!!oe},he);return Ue.createElement(ce.iz,Object.assign({className:Kt},Ie))},Pe=se(37419),st=se(10366),Re=se(83062),Et=se(96159),lt=(0,Ue.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ke=le=>{var pe;const{className:he,children:oe,icon:Ie,title:Je,danger:_t}=le,{prefixCls:Kt,firstLevel:Ht,direction:Qt,disableMenuItemTitleTooltip:Gt,inlineCollapsed:nr}=Ue.useContext(lt),gr=Cr=>{const Ii=Ue.createElement("span",{className:`${Kt}-title-content`},oe);return(!Ie||(0,Et.l$)(oe)&&oe.type==="span")&&oe&&Cr&&Ht&&typeof oe=="string"?Ue.createElement("div",{className:`${Kt}-inline-collapsed-noicon`},oe.charAt(0)):Ii},{siderCollapsed:Ut}=Ue.useContext(Fe.D);let pn=Je;typeof Je=="undefined"?pn=Ht?oe:"":Je===!1&&(pn="");const ir={title:pn};!Ut&&!nr&&(ir.title=null,ir.open=!1);const Lr=(0,Pe.Z)(oe).length;let $n=Ue.createElement(ce.ck,Object.assign({},(0,st.Z)(le,["title","icon","danger"]),{className:ve()({[`${Kt}-item-danger`]:_t,[`${Kt}-item-only-child`]:(Ie?Lr+1:Lr)===1},he),title:typeof Je=="string"?Je:void 0}),(0,Et.Tm)(Ie,{className:ve()((0,Et.l$)(Ie)?(pe=Ie.props)===null||pe===void 0?void 0:pe.className:"",`${Kt}-item-icon`)}),gr(nr));return Gt||($n=Ue.createElement(Re.Z,Object.assign({},ir,{placement:Qt==="rtl"?"left":"right",overlayClassName:`${Kt}-inline-collapsed-tooltip`}),$n)),$n},jt=le=>{var pe;const{popupClassName:he,icon:oe,title:Ie,theme:Je}=le,_t=Ue.useContext(lt),{prefixCls:Kt,inlineCollapsed:Ht,theme:Qt}=_t,Gt=(0,ce.Xl)();let nr;if(!oe)nr=Ht&&!Gt.length&&Ie&&typeof Ie=="string"?Ue.createElement("div",{className:`${Kt}-inline-collapsed-noicon`},Ie.charAt(0)):Ue.createElement("span",{className:`${Kt}-title-content`},Ie);else{const Ut=(0,Et.l$)(Ie)&&Ie.type==="span";nr=Ue.createElement(Ue.Fragment,null,(0,Et.Tm)(oe,{className:ve()((0,Et.l$)(oe)?(pe=oe.props)===null||pe===void 0?void 0:pe.className:"",`${Kt}-item-icon`)}),Ut?Ie:Ue.createElement("span",{className:`${Kt}-title-content`},Ie))}const gr=Ue.useMemo(()=>Object.assign(Object.assign({},_t),{firstLevel:!1}),[_t]);return Ue.createElement(lt.Provider,{value:gr},Ue.createElement(ce.Wd,Object.assign({},(0,st.Z)(le,["icon"]),{title:nr,popupClassName:ve()(Kt,he,`${Kt}-${Je||Qt}`)})))},tt=se(25877),ut=se(60276),Ee=se(33603),we=se(76529),je=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(le);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ie])&&(he[oe[Ie]]=le[oe[Ie]]);return he};function Ye(le){return(le||[]).map((pe,he)=>{if(pe&&typeof pe=="object"){const oe=pe,{label:Ie,children:Je,key:_t,type:Kt}=oe,Ht=je(oe,["label","children","key","type"]),Qt=_t!=null?_t:`tmp-${he}`;return Je||Kt==="group"?Kt==="group"?Ue.createElement(ce.BW,Object.assign({key:Qt},Ht,{title:Ie}),Ye(Je)):Ue.createElement(jt,Object.assign({key:Qt},Ht,{title:Ie}),Ye(Je)):Kt==="divider"?Ue.createElement(me,Object.assign({key:Qt},Ht)):Ue.createElement(ke,Object.assign({key:Qt},Ht),Ie)}return null}).filter(pe=>pe)}function Lt(le){return Ue.useMemo(()=>le&&Ye(le),[le])}var Ct=se(84780),Bt=se(14747),at=se(33507),Vt=se(67771),$t=se(50438),xn=se(67968),dt=se(45503),En=le=>{const{componentCls:pe,motionDurationSlow:he,horizontalLineHeight:oe,colorSplit:Ie,lineWidth:Je,lineType:_t,itemPaddingInline:Kt}=le;return{[`${pe}-horizontal`]:{lineHeight:oe,border:0,borderBottom:`${Je}px ${_t} ${Ie}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${pe}-item, ${pe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Kt},[`> ${pe}-item:hover,
> ${pe}-item-active,
> ${pe}-submenu ${pe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${pe}-item, ${pe}-submenu-title`]:{transition:[`border-color ${he}`,`background ${he}`].join(",")},[`${pe}-submenu-arrow`]:{display:"none"}}}},Ge=le=>{let{componentCls:pe,menuArrowOffset:he}=le;return{[`${pe}-rtl`]:{direction:"rtl"},[`${pe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${pe}-rtl${pe}-vertical,
${pe}-submenu-rtl ${pe}-vertical`]:{[`${pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${he})`},"&::after":{transform:`rotate(45deg) translateY(${he})`}}}}};const De=le=>Object.assign({},(0,Bt.oN)(le));var In=(le,pe)=>{const{componentCls:he,itemColor:oe,itemSelectedColor:Ie,groupTitleColor:Je,itemBg:_t,subMenuItemBg:Kt,itemSelectedBg:Ht,activeBarHeight:Qt,activeBarWidth:Gt,activeBarBorderWidth:nr,motionDurationSlow:gr,motionEaseInOut:Ut,motionEaseOut:pn,itemPaddingInline:ir,motionDurationMid:Lr,itemHoverColor:$n,lineType:Cr,colorSplit:Ii,itemDisabledColor:li,dangerItemColor:ci,dangerItemHoverColor:Jr,dangerItemSelectedColor:Di,dangerItemActiveBg:Ei,dangerItemSelectedBg:Pi,itemHoverBg:xr,itemActiveBg:Pr,menuSubMenuBg:Gi,horizontalItemSelectedColor:ma,horizontalItemSelectedBg:ba,horizontalItemBorderRadius:va,horizontalItemHoverBg:Vi,popupBg:At}=le;return{[`${he}-${pe}, ${he}-${pe} > ${he}`]:{color:oe,background:_t,[`&${he}-root:focus-visible`]:Object.assign({},De(le)),[`${he}-item-group-title`]:{color:Je},[`${he}-submenu-selected`]:{[`> ${he}-submenu-title`]:{color:Ie}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{color:`${li} !important`},[`${he}-item:not(${he}-item-selected):not(${he}-submenu-selected)`]:{[`&:hover, > ${he}-submenu-title:hover`]:{color:$n}},[`&:not(${he}-horizontal)`]:{[`${he}-item:not(${he}-item-selected)`]:{"&:hover":{backgroundColor:xr},"&:active":{backgroundColor:Pr}},[`${he}-submenu-title`]:{"&:hover":{backgroundColor:xr},"&:active":{backgroundColor:Pr}}},[`${he}-item-danger`]:{color:ci,[`&${he}-item:hover`]:{[`&:not(${he}-item-selected):not(${he}-submenu-selected)`]:{color:Jr}},[`&${he}-item:active`]:{background:Ei}},[`${he}-item a`]:{"&, &:hover":{color:"inherit"}},[`${he}-item-selected`]:{color:Ie,[`&${he}-item-danger`]:{color:Di},"a, a:hover":{color:"inherit"}},[`& ${he}-item-selected`]:{backgroundColor:Ht,[`&${he}-item-danger`]:{backgroundColor:Pi}},[`${he}-item, ${he}-submenu-title`]:{[`&:not(${he}-item-disabled):focus-visible`]:Object.assign({},De(le))},[`&${he}-submenu > ${he}`]:{backgroundColor:Gi},[`&${he}-popup > ${he}`]:{backgroundColor:At},[`&${he}-horizontal`]:Object.assign(Object.assign({},pe==="dark"?{borderBottom:0}:{}),{[`> ${he}-item, > ${he}-submenu`]:{top:nr,marginTop:-nr,marginBottom:0,borderRadius:va,"&::after":{position:"absolute",insetInline:ir,bottom:0,borderBottom:`${Qt}px solid transparent`,transition:`border-color ${gr} ${Ut}`,content:'""'},"&:hover, &-active, &-open":{background:Vi,"&::after":{borderBottomWidth:Qt,borderBottomColor:ma}},"&-selected":{color:ma,backgroundColor:ba,"&:hover":{backgroundColor:ba},"&::after":{borderBottomWidth:Qt,borderBottomColor:ma}}}}),[`&${he}-root`]:{[`&${he}-inline, &${he}-vertical`]:{borderInlineEnd:`${nr}px ${Cr} ${Ii}`}},[`&${he}-inline`]:{[`${he}-sub${he}-inline`]:{background:Kt},[`${he}-item, ${he}-submenu-title`]:nr&&Gt?{width:`calc(100% + ${nr}px)`}:{},[`${he}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Gt}px solid ${Ie}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Lr} ${pn}`,`opacity ${Lr} ${pn}`].join(","),content:'""'},[`&${he}-item-danger`]:{"&::after":{borderInlineEndColor:Di}}},[`${he}-selected, ${he}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Lr} ${Ut}`,`opacity ${Lr} ${Ut}`].join(",")}}}}}};const fn=le=>{const{componentCls:pe,itemHeight:he,itemMarginInline:oe,padding:Ie,menuArrowSize:Je,marginXS:_t,itemMarginBlock:Kt}=le,Ht=Ie+Je+_t;return{[`${pe}-item`]:{position:"relative",overflow:"hidden"},[`${pe}-item, ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`,paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:oe,marginBlock:Kt,width:`calc(100% - ${oe*2}px)`},[`> ${pe}-item,
> ${pe}-submenu > ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`},[`${pe}-item-group-list ${pe}-submenu-title,
${pe}-submenu-title`]:{paddingInlineEnd:Ht}}};var ft=le=>{const{componentCls:pe,iconCls:he,itemHeight:oe,colorTextLightSolid:Ie,dropdownWidth:Je,controlHeightLG:_t,motionDurationMid:Kt,motionEaseOut:Ht,paddingXL:Qt,itemMarginInline:Gt,fontSizeLG:nr,motionDurationSlow:gr,paddingXS:Ut,boxShadowSecondary:pn,collapsedWidth:ir,collapsedIconSize:Lr}=le,$n={height:oe,lineHeight:`${oe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[pe]:{"&-inline, &-vertical":Object.assign({[`&${pe}-root`]:{boxShadow:"none"}},fn(le))},[`${pe}-submenu-popup`]:{[`${pe}-vertical`]:Object.assign(Object.assign({},fn(le)),{boxShadow:pn})}},{[`${pe}-submenu-popup ${pe}-vertical${pe}-sub`]:{minWidth:Je,maxHeight:`calc(100vh - ${_t*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${pe}-inline`]:{width:"100%",[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${gr}`,`background ${gr}`,`padding ${Kt} ${Ht}`].join(","),[`> ${pe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${pe}-sub${pe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${pe}-submenu > ${pe}-submenu-title`]:$n,[`& ${pe}-item-group-title`]:{paddingInlineStart:Qt}},[`${pe}-item`]:$n}},{[`${pe}-inline-collapsed`]:{width:ir,[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu ${pe}-submenu-title`]:{[`> ${pe}-inline-collapsed-noicon`]:{fontSize:nr,textAlign:"center"}}},[`> ${pe}-item,
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-item,
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-submenu > ${pe}-submenu-title,
> ${pe}-submenu > ${pe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${nr/2}px - ${Gt}px)`,textOverflow:"clip",[`
${pe}-submenu-arrow,
${pe}-submenu-expand-icon
`]:{opacity:0},[`${pe}-item-icon, ${he}`]:{margin:0,fontSize:Lr,lineHeight:`${oe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${pe}-item-icon, ${he}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${pe}-item-icon, ${he}`]:{display:"none"},"a, a:hover":{color:Ie}},[`${pe}-item-group-title`]:Object.assign(Object.assign({},Bt.vS),{paddingInline:Ut})}}]};const Jt=le=>{const{componentCls:pe,motionDurationSlow:he,motionDurationMid:oe,motionEaseInOut:Ie,motionEaseOut:Je,iconCls:_t,iconSize:Kt,iconMarginInlineEnd:Ht}=le;return{[`${pe}-item, ${pe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${he}`,`background ${he}`,`padding ${he} ${Ie}`].join(","),[`${pe}-item-icon, ${_t}`]:{minWidth:Kt,fontSize:Kt,transition:[`font-size ${oe} ${Je}`,`margin ${he} ${Ie}`,`color ${he}`].join(","),"+ span":{marginInlineStart:Ht,opacity:1,transition:[`opacity ${he} ${Ie}`,`margin ${he}`,`color ${he}`].join(",")}},[`${pe}-item-icon`]:Object.assign({},(0,Bt.Ro)()),[`&${pe}-item-only-child`]:{[`> ${_t}, > ${pe}-item-icon`]:{marginInlineEnd:0}}},[`${pe}-item-disabled, ${pe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${pe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Bn=le=>{const{componentCls:pe,motionDurationSlow:he,motionEaseInOut:oe,borderRadius:Ie,menuArrowSize:Je,menuArrowOffset:_t}=le;return{[`${pe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:Je,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${he} ${oe}, opacity ${he}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Je*.6,height:Je*.15,backgroundColor:"currentcolor",borderRadius:Ie,transition:[`background ${he} ${oe}`,`transform ${he} ${oe}`,`top ${he} ${oe}`,`color ${he} ${oe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${_t})`},"&::after":{transform:`rotate(-45deg) translateY(${_t})`}}}}},wn=le=>{const{antCls:pe,componentCls:he,fontSize:oe,motionDurationSlow:Ie,motionDurationMid:Je,motionEaseInOut:_t,paddingXS:Kt,padding:Ht,colorSplit:Qt,lineWidth:Gt,zIndexPopup:nr,borderRadiusLG:gr,subMenuItemBorderRadius:Ut,menuArrowSize:pn,menuArrowOffset:ir,lineType:Lr,menuPanelMaskInset:$n,groupTitleLineHeight:Cr,groupTitleFontSize:Ii}=le;return[{"":{[`${he}`]:Object.assign(Object.assign({},(0,Bt.dF)()),{"&-hidden":{display:"none"}})},[`${he}-submenu-hidden`]:{display:"none"}},{[he]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Bt.Wf)(le)),(0,Bt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:oe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Ie} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${he}-item`]:{flex:"none"}},[`${he}-item, ${he}-submenu, ${he}-submenu-title`]:{borderRadius:le.itemBorderRadius},[`${he}-item-group-title`]:{padding:`${Kt}px ${Ht}px`,fontSize:Ii,lineHeight:Cr,transition:`all ${Ie}`},[`&-horizontal ${he}-submenu`]:{transition:[`border-color ${Ie} ${_t}`,`background ${Ie} ${_t}`].join(",")},[`${he}-submenu, ${he}-submenu-inline`]:{transition:[`border-color ${Ie} ${_t}`,`background ${Ie} ${_t}`,`padding ${Je} ${_t}`].join(",")},[`${he}-submenu ${he}-sub`]:{cursor:"initial",transition:[`background ${Ie} ${_t}`,`padding ${Ie} ${_t}`].join(",")},[`${he}-title-content`]:{transition:`color ${Ie}`},[`${he}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${he}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Qt,borderStyle:Lr,borderWidth:0,borderTopWidth:Gt,marginBlock:Gt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Jt(le)),{[`${he}-item-group`]:{[`${he}-item-group-list`]:{margin:0,padding:0,[`${he}-item, ${he}-submenu-title`]:{paddingInline:`${oe*2}px ${Ht}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:nr,borderRadius:gr,boxShadow:"none",transformOrigin:"0 0",[`&${he}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${$n}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:$n},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:le.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:le.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:le.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:le.paddingXS},[`> ${he}`]:Object.assign(Object.assign(Object.assign({borderRadius:gr},Jt(le)),Bn(le)),{[`${he}-item, ${he}-submenu > ${he}-submenu-title`]:{borderRadius:Ut},[`${he}-submenu-title::after`]:{transition:`transform ${Ie} ${_t}`}})}}),Bn(le)),{[`&-inline-collapsed ${he}-submenu-arrow,
&-inline ${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ir})`},"&::after":{transform:`rotate(45deg) translateX(-${ir})`}},[`${he}-submenu-open${he}-submenu-inline > ${he}-submenu-title > ${he}-submenu-arrow`]:{transform:`translateY(-${pn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${ir})`},"&::before":{transform:`rotate(45deg) translateX(${ir})`}}})},{[`${pe}-layout-header`]:{[he]:{lineHeight:"inherit"}}}]};var Nt=(le,pe)=>(0,xn.Z)("Menu",oe=>{if(pe===!1)return[];const{colorBgElevated:Ie,colorPrimary:Je,colorTextLightSolid:_t,controlHeightLG:Kt,fontSize:Ht,darkItemColor:Qt,darkDangerItemColor:Gt,darkItemBg:nr,darkSubMenuItemBg:gr,darkItemSelectedColor:Ut,darkItemSelectedBg:pn,darkDangerItemSelectedBg:ir,darkItemHoverBg:Lr,darkGroupTitleColor:$n,darkItemHoverColor:Cr,darkItemDisabledColor:Ii,darkDangerItemHoverColor:li,darkDangerItemSelectedColor:ci,darkDangerItemActiveBg:Jr}=oe,Di=Ht/7*5,Ei=(0,dt.TS)(oe,{menuArrowSize:Di,menuHorizontalHeight:Kt*1.15,menuArrowOffset:`${Di*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ie}),Pi=(0,dt.TS)(Ei,{itemColor:Qt,itemHoverColor:Cr,groupTitleColor:$n,itemSelectedColor:Ut,itemBg:nr,popupBg:nr,subMenuItemBg:gr,itemActiveBg:"transparent",itemSelectedBg:pn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Lr,itemDisabledColor:Ii,dangerItemColor:Gt,dangerItemHoverColor:li,dangerItemSelectedColor:ci,dangerItemActiveBg:Jr,dangerItemSelectedBg:ir,menuSubMenuBg:gr,horizontalItemSelectedColor:_t,horizontalItemSelectedBg:Je});return[wn(Ei),En(Ei),ft(Ei),In(Ei,"light"),In(Pi,"dark"),Ge(Ei),(0,at.Z)(Ei),(0,Vt.oN)(Ei,"slide-up"),(0,Vt.oN)(Ei,"slide-down"),(0,$t._y)(Ei,"zoom-big")]},oe=>{const{colorPrimary:Ie,colorError:Je,colorTextDisabled:_t,colorErrorBg:Kt,colorText:Ht,colorTextDescription:Qt,colorBgContainer:Gt,colorFillAlter:nr,colorFillContent:gr,lineWidth:Ut,lineWidthBold:pn,controlItemBgActive:ir,colorBgTextHover:Lr,controlHeightLG:$n,lineHeight:Cr,colorBgElevated:Ii,marginXXS:li,padding:ci,fontSize:Jr,controlHeightSM:Di,fontSizeLG:Ei,colorTextLightSolid:Pi,colorErrorHover:xr}=oe,Pr=new Ct.C(Pi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:oe.zIndexPopupBase+50,radiusItem:oe.borderRadiusLG,itemBorderRadius:oe.borderRadiusLG,radiusSubMenuItem:oe.borderRadiusSM,subMenuItemBorderRadius:oe.borderRadiusSM,colorItemText:Ht,itemColor:Ht,colorItemTextHover:Ht,itemHoverColor:Ht,colorItemTextHoverHorizontal:Ie,horizontalItemHoverColor:Ie,colorGroupTitle:Qt,groupTitleColor:Qt,colorItemTextSelected:Ie,itemSelectedColor:Ie,colorItemTextSelectedHorizontal:Ie,horizontalItemSelectedColor:Ie,colorItemBg:Gt,itemBg:Gt,colorItemBgHover:Lr,itemHoverBg:Lr,colorItemBgActive:gr,itemActiveBg:ir,colorSubItemBg:nr,subMenuItemBg:nr,colorItemBgSelected:ir,itemSelectedBg:ir,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:pn,activeBarHeight:pn,colorActiveBarBorderSize:Ut,activeBarBorderWidth:Ut,colorItemTextDisabled:_t,itemDisabledColor:_t,colorDangerItemText:Je,dangerItemColor:Je,colorDangerItemTextHover:Je,dangerItemHoverColor:Je,colorDangerItemTextSelected:Je,dangerItemSelectedColor:Je,colorDangerItemBgActive:Kt,dangerItemActiveBg:Kt,colorDangerItemBgSelected:Kt,dangerItemSelectedBg:Kt,itemMarginInline:oe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:$n,groupTitleLineHeight:Cr,collapsedWidth:$n*2,popupBg:Ii,itemMarginBlock:li,itemPaddingInline:ci,horizontalLineHeight:`${$n*1.15}px`,iconSize:Jr,iconMarginInlineEnd:Di-Jr,collapsedIconSize:Ei,groupTitleFontSize:Jr,darkItemDisabledColor:new Ct.C(Pi).setAlpha(.25).toRgbString(),darkItemColor:Pr,darkDangerItemColor:Je,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Pi,darkItemSelectedBg:Ie,darkDangerItemSelectedBg:Je,darkItemHoverBg:"transparent",darkGroupTitleColor:Pr,darkItemHoverColor:Pi,darkDangerItemHoverColor:xr,darkDangerItemSelectedColor:Pi,darkDangerItemActiveBg:Je}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(le),Xt=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,oe=Object.getOwnPropertySymbols(le);Ie<oe.length;Ie++)pe.indexOf(oe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Ie])&&(he[oe[Ie]]=le[oe[Ie]]);return he},Mn=(0,Ue.forwardRef)((le,pe)=>{var he,oe;const Ie=Ue.useContext(we.Z),Je=Ie||{},{getPrefixCls:_t,getPopupContainer:Kt,direction:Ht,menu:Qt}=Ue.useContext(Le.E_),Gt=_t(),{prefixCls:nr,className:gr,style:Ut,theme:pn="light",expandIcon:ir,_internalDisableMenuItemTitleTooltip:Lr,inlineCollapsed:$n,siderCollapsed:Cr,items:Ii,children:li,rootClassName:ci,mode:Jr,selectable:Di,onClick:Ei,overflowedIndicatorPopupClassName:Pi}=le,xr=Xt(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Pr=(0,st.Z)(xr,["collapsedWidth"]),Gi=Lt(Ii)||li;(he=Je.validator)===null||he===void 0||he.call(Je,{mode:Jr});const ma=(0,ut.useEvent)(function(){var Nn;Ei==null||Ei.apply(void 0,arguments),(Nn=Je.onClick)===null||Nn===void 0||Nn.call(Je)}),ba=Je.mode||Jr,va=Di!=null?Di:Je.selectable,Vi=Ue.useMemo(()=>Cr!==void 0?Cr:$n,[$n,Cr]),At={horizontal:{motionName:`${Gt}-slide-up`},inline:(0,Ee.Z)(Gt),other:{motionName:`${Gt}-zoom-big`}},On=_t("menu",nr||Je.prefixCls),[Pt,zt]=Nt(On,!Ie),rn=ve()(`${On}-${pn}`,Qt==null?void 0:Qt.className,gr);let cn;if(typeof ir=="function")cn=ir;else if(ir===null||ir===!1)cn=null;else if(Je.expandIcon===null||Je.expandIcon===!1)cn=null;else{const Nn=ir!=null?ir:Je.expandIcon;cn=(0,Et.Tm)(Nn,{className:ve()(`${On}-submenu-expand-icon`,(0,Et.l$)(Nn)?(oe=Nn.props)===null||oe===void 0?void 0:oe.className:"")})}const Vn=Ue.useMemo(()=>({prefixCls:On,inlineCollapsed:Vi||!1,direction:Ht,firstLevel:!0,theme:pn,mode:ba,disableMenuItemTitleTooltip:Lr}),[On,Vi,Ht,Lr,pn]);return Pt(Ue.createElement(we.Z.Provider,{value:null},Ue.createElement(lt.Provider,{value:Vn},Ue.createElement(ce.ZP,Object.assign({getPopupContainer:Kt,overflowedIndicator:Ue.createElement(tt.Z,null),overflowedIndicatorPopupClassName:ve()(On,`${On}-${pn}`,Pi),mode:ba,selectable:va,onClick:ma},Pr,{inlineCollapsed:Vi,style:Object.assign(Object.assign({},Qt==null?void 0:Qt.style),Ut),className:rn,prefixCls:On,direction:Ht,defaultMotions:At,expandIcon:cn,ref:pe,rootClassName:ve()(ci,zt)}),Gi))))});const Te=(0,Ue.forwardRef)((le,pe)=>{const he=(0,Ue.useRef)(null),oe=Ue.useContext(Fe.D);return(0,Ue.useImperativeHandle)(pe,()=>({menu:he.current,focus:Ie=>{var Je;(Je=he.current)===null||Je===void 0||Je.focus(Ie)}})),Ue.createElement(Mn,Object.assign({ref:he},le,oe))});Te.Item=ke,Te.SubMenu=jt,Te.Divider=me,Te.ItemGroup=ce.BW;var de=Te},78045:function(Ln,en,se){"use strict";se.d(en,{ZP:function(){return Ge}});var ce=se(94184),Ue=se.n(ce),Fe=se(5663),it=se(1337),ve=se(67294),Le=se(53124),Me=se(98675);const Se=ve.createContext(null),me=Se.Provider;var Pe=Se;const st=ve.createContext(null),Re=st.Provider;var Et=se(95860),ht=se(17799),lt=se(98866),et=se(65223),ke=se(14747),vt=se(67968),jt=se(45503);const tt=De=>{const{componentCls:Zt,antCls:In}=De,fn=`${Zt}-group`;return{[fn]:Object.assign(Object.assign({},(0,ke.Wf)(De)),{display:"inline-block",fontSize:0,[`&${fn}-rtl`]:{direction:"rtl"},[`${In}-badge ${In}-badge-count`]:{zIndex:1},[`> ${In}-badge:not(:first-child) > ${In}-button-wrapper`]:{borderInlineStart:"none"}})}},ut=De=>{const{componentCls:Zt,wrapperMarginInlineEnd:In,colorPrimary:fn,radioSize:ot,motionDurationSlow:ft,motionDurationMid:Jt,motionEaseInOutCirc:Bn,colorBgContainer:wn,colorBorder:Nt,lineWidth:Xt,dotSize:Dn,colorBgContainerDisabled:Mn,colorTextDisabled:Te,paddingXS:de,dotColorDisabled:le,lineType:pe,radioDotDisabledSize:he,wireframe:oe,colorWhite:Ie}=De,Je=`${Zt}-inner`;return{[`${Zt}-wrapper`]:Object.assign(Object.assign({},(0,ke.Wf)(De)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:In,cursor:"pointer",[`&${Zt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:De.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Zt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Xt}px ${pe} ${fn}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Zt]:Object.assign(Object.assign({},(0,ke.Wf)(De)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Zt}-wrapper:hover &,
&:hover ${Je}`]:{borderColor:fn},[`${Zt}-input:focus-visible + ${Je}`]:Object.assign({},(0,ke.oN)(De)),[`${Zt}:hover::after, ${Zt}-wrapper:hover &::after`]:{visibility:"visible"},[`${Zt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:ot,height:ot,marginBlockStart:ot/-2,marginInlineStart:ot/-2,backgroundColor:oe?fn:Ie,borderBlockStart:0,borderInlineStart:0,borderRadius:ot,transform:"scale(0)",opacity:0,transition:`all ${ft} ${Bn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:ot,height:ot,backgroundColor:wn,borderColor:Nt,borderStyle:"solid",borderWidth:Xt,borderRadius:"50%",transition:`all ${Jt}`},[`${Zt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Zt}-checked`]:{[Je]:{borderColor:fn,backgroundColor:oe?wn:fn,"&::after":{transform:`scale(${Dn/ot})`,opacity:1,transition:`all ${ft} ${Bn}`}}},[`${Zt}-disabled`]:{cursor:"not-allowed",[Je]:{backgroundColor:Mn,borderColor:Nt,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${Zt}-input`]:{cursor:"not-allowed"},[`${Zt}-disabled + span`]:{color:Te,cursor:"not-allowed"},[`&${Zt}-checked`]:{[Je]:{"&::after":{transform:`scale(${he/ot})`}}}},[`span${Zt} + *`]:{paddingInlineStart:de,paddingInlineEnd:de}})}},Ee=De=>{const{buttonColor:Zt,controlHeight:In,componentCls:fn,lineWidth:ot,lineType:ft,colorBorder:Jt,motionDurationSlow:Bn,motionDurationMid:wn,buttonPaddingInline:Nt,fontSize:Xt,buttonBg:Dn,fontSizeLG:Mn,controlHeightLG:Te,controlHeightSM:de,paddingXS:le,borderRadius:pe,borderRadiusSM:he,borderRadiusLG:oe,buttonCheckedBg:Ie,buttonSolidCheckedColor:Je,colorTextDisabled:_t,colorBgContainerDisabled:Kt,buttonCheckedBgDisabled:Ht,buttonCheckedColorDisabled:Qt,colorPrimary:Gt,colorPrimaryHover:nr,colorPrimaryActive:gr,buttonSolidCheckedBg:Ut,buttonSolidCheckedHoverBg:pn,buttonSolidCheckedActiveBg:ir}=De;return{[`${fn}-button-wrapper`]:{position:"relative",display:"inline-block",height:In,margin:0,paddingInline:Nt,paddingBlock:0,color:Zt,fontSize:Xt,lineHeight:`${In-ot*2}px`,background:Dn,border:`${ot}px ${ft} ${Jt}`,borderBlockStartWidth:ot+.02,borderInlineStartWidth:0,borderInlineEndWidth:ot,cursor:"pointer",transition:[`color ${wn}`,`background ${wn}`,`box-shadow ${wn}`].join(","),a:{color:Zt},[`> ${fn}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-ot,insetInlineStart:-ot,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:ot,paddingInline:0,backgroundColor:Jt,transition:`background-color ${Bn}`,content:'""'}},"&:first-child":{borderInlineStart:`${ot}px ${ft} ${Jt}`,borderStartStartRadius:pe,borderEndStartRadius:pe},"&:last-child":{borderStartEndRadius:pe,borderEndEndRadius:pe},"&:first-child:last-child":{borderRadius:pe},[`${fn}-group-large &`]:{height:Te,fontSize:Mn,lineHeight:`${Te-ot*2}px`,"&:first-child":{borderStartStartRadius:oe,borderEndStartRadius:oe},"&:last-child":{borderStartEndRadius:oe,borderEndEndRadius:oe}},[`${fn}-group-small &`]:{height:de,paddingInline:le-ot,paddingBlock:0,lineHeight:`${de-ot*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:Gt},"&:has(:focus-visible)":Object.assign({},(0,ke.oN)(De)),[`${fn}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${fn}-button-wrapper-disabled)`]:{zIndex:1,color:Gt,background:Ie,borderColor:Gt,"&::before":{backgroundColor:Gt},"&:first-child":{borderColor:Gt},"&:hover":{color:nr,borderColor:nr,"&::before":{backgroundColor:nr}},"&:active":{color:gr,borderColor:gr,"&::before":{backgroundColor:gr}}},[`${fn}-group-solid &-checked:not(${fn}-button-wrapper-disabled)`]:{color:Je,background:Ut,borderColor:Ut,"&:hover":{color:Je,background:pn,borderColor:pn},"&:active":{color:Je,background:ir,borderColor:ir}},"&-disabled":{color:_t,backgroundColor:Kt,borderColor:Jt,cursor:"not-allowed","&:first-child, &:hover":{color:_t,backgroundColor:Kt,borderColor:Jt}},[`&-disabled${fn}-button-wrapper-checked`]:{color:Qt,backgroundColor:Ht,borderColor:Jt,boxShadow:"none"}}}},we=De=>De-4*2;var je=(0,vt.Z)("Radio",De=>{const{controlOutline:Zt,controlOutlineWidth:In,radioSize:fn}=De,ot=`0 0 0 ${In}px ${Zt}`,ft=ot,Jt=we(fn),Bn=(0,jt.TS)(De,{radioDotDisabledSize:Jt,radioFocusShadow:ot,radioButtonFocusShadow:ft});return[tt(Bn),ut(Bn),Ee(Bn)]},De=>{const{wireframe:Zt,padding:In,marginXS:fn,lineWidth:ot,fontSizeLG:ft,colorText:Jt,colorBgContainer:Bn,colorTextDisabled:wn,controlItemBgActiveDisabled:Nt,colorTextLightSolid:Xt,colorPrimary:Dn,colorPrimaryHover:Mn,colorPrimaryActive:Te}=De,de=4,le=ft,pe=Zt?we(le):le-(de+ot)*2;return{radioSize:le,dotSize:pe,dotColorDisabled:wn,buttonSolidCheckedColor:Xt,buttonSolidCheckedBg:Dn,buttonSolidCheckedHoverBg:Mn,buttonSolidCheckedActiveBg:Te,buttonBg:Bn,buttonCheckedBg:Bn,buttonColor:Jt,buttonCheckedBgDisabled:Nt,buttonCheckedColorDisabled:wn,buttonPaddingInline:In-ot,wrapperMarginInlineEnd:fn}}),Ye=se(45353),Lt=se(92429),Ct=function(De,Zt){var In={};for(var fn in De)Object.prototype.hasOwnProperty.call(De,fn)&&Zt.indexOf(fn)<0&&(In[fn]=De[fn]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,fn=Object.getOwnPropertySymbols(De);ot<fn.length;ot++)Zt.indexOf(fn[ot])<0&&Object.prototype.propertyIsEnumerable.call(De,fn[ot])&&(In[fn[ot]]=De[fn[ot]]);return In};const Bt=(De,Zt)=>{var In,fn;const ot=ve.useContext(Pe),ft=ve.useContext(st),{getPrefixCls:Jt,direction:Bn,radio:wn}=ve.useContext(Le.E_),Nt=ve.useRef(null),Xt=(0,ht.sQ)(Zt,Nt),{isFormItemInput:Dn}=ve.useContext(et.aM),Mn=gr=>{var Ut,pn;(Ut=De.onChange)===null||Ut===void 0||Ut.call(De,gr),(pn=ot==null?void 0:ot.onChange)===null||pn===void 0||pn.call(ot,gr)},{prefixCls:Te,className:de,rootClassName:le,children:pe,style:he}=De,oe=Ct(De,["prefixCls","className","rootClassName","children","style"]),Ie=Jt("radio",Te),Je=((ot==null?void 0:ot.optionType)||ft)==="button",_t=Je?`${Ie}-button`:Ie,[Kt,Ht]=je(Ie),Qt=Object.assign({},oe),Gt=ve.useContext(lt.Z);ot&&(Qt.name=ot.name,Qt.onChange=Mn,Qt.checked=De.value===ot.value,Qt.disabled=(In=Qt.disabled)!==null&&In!==void 0?In:ot.disabled),Qt.disabled=(fn=Qt.disabled)!==null&&fn!==void 0?fn:Gt;const nr=Ue()(`${_t}-wrapper`,{[`${_t}-wrapper-checked`]:Qt.checked,[`${_t}-wrapper-disabled`]:Qt.disabled,[`${_t}-wrapper-rtl`]:Bn==="rtl",[`${_t}-wrapper-in-form-item`]:Dn},wn==null?void 0:wn.className,de,le,Ht);return Kt(ve.createElement(Ye.Z,{component:"Radio",disabled:Qt.disabled},ve.createElement("label",{className:nr,style:Object.assign(Object.assign({},wn==null?void 0:wn.style),he),onMouseEnter:De.onMouseEnter,onMouseLeave:De.onMouseLeave},ve.createElement(Et.Z,Object.assign({},Qt,{className:Ue()(Qt.className,!Je&&Lt.A),type:"radio",prefixCls:_t,ref:Xt})),pe!==void 0?ve.createElement("span",null,pe):null)))};var Vt=ve.forwardRef(Bt);const $t=ve.forwardRef((De,Zt)=>{const{getPrefixCls:In,direction:fn}=ve.useContext(Le.E_),[ot,ft]=(0,Fe.Z)(De.defaultValue,{value:De.value}),Jt=Ut=>{const pn=ot,ir=Ut.target.value;"value"in De||ft(ir);const{onChange:Lr}=De;Lr&&ir!==pn&&Lr(Ut)},{prefixCls:Bn,className:wn,rootClassName:Nt,options:Xt,buttonStyle:Dn="outline",disabled:Mn,children:Te,size:de,style:le,id:pe,onMouseEnter:he,onMouseLeave:oe,onFocus:Ie,onBlur:Je}=De,_t=In("radio",Bn),Kt=`${_t}-group`,[Ht,Qt]=je(_t);let Gt=Te;Xt&&Xt.length>0&&(Gt=Xt.map(Ut=>typeof Ut=="string"||typeof Ut=="number"?ve.createElement(Vt,{key:Ut.toString(),prefixCls:_t,disabled:Mn,value:Ut,checked:ot===Ut},Ut):ve.createElement(Vt,{key:`radio-group-value-options-${Ut.value}`,prefixCls:_t,disabled:Ut.disabled||Mn,value:Ut.value,checked:ot===Ut.value,title:Ut.title,style:Ut.style},Ut.label)));const nr=(0,Me.Z)(de),gr=Ue()(Kt,`${Kt}-${Dn}`,{[`${Kt}-${nr}`]:nr,[`${Kt}-rtl`]:fn==="rtl"},wn,Nt,Qt);return Ht(ve.createElement("div",Object.assign({},(0,it.Z)(De,{aria:!0,data:!0}),{className:gr,style:le,onMouseEnter:he,onMouseLeave:oe,onFocus:Ie,onBlur:Je,id:pe,ref:Zt}),ve.createElement(me,{value:{onChange:Jt,value:ot,disabled:De.disabled,name:De.name,optionType:De.optionType}},Gt)))});var xn=ve.memo($t),dt=function(De,Zt){var In={};for(var fn in De)Object.prototype.hasOwnProperty.call(De,fn)&&Zt.indexOf(fn)<0&&(In[fn]=De[fn]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,fn=Object.getOwnPropertySymbols(De);ot<fn.length;ot++)Zt.indexOf(fn[ot])<0&&Object.prototype.propertyIsEnumerable.call(De,fn[ot])&&(In[fn[ot]]=De[fn[ot]]);return In};const on=(De,Zt)=>{const{getPrefixCls:In}=ve.useContext(Le.E_),{prefixCls:fn}=De,ot=dt(De,["prefixCls"]),ft=In("radio",fn);return ve.createElement(Re,{value:"button"},ve.createElement(Vt,Object.assign({prefixCls:ft},ot,{type:"radio",ref:Zt})))};var En=ve.forwardRef(on);const yn=Vt;yn.Button=En,yn.Group=xn,yn.__ANT_RADIO=!0;var Ge=yn},11713:function(Ln,en,se){"use strict";se.d(en,{default:function(){return ze}});var ce=se(94184),Ue=se.n(ce),Fe=se(87462),it=se(74902),ve=se(4942),Le=se(1413),Me=se(97685),Se=se(45987),me=se(71002),Pe=se(67294);function st(xe){var Ae=Pe.useRef();Ae.current=xe;var qe=Pe.useCallback(function(){for(var Xe,St=arguments.length,Ft=new Array(St),Wt=0;Wt<St;Wt++)Ft[Wt]=arguments[Wt];return(Xe=Ae.current)===null||Xe===void 0?void 0:Xe.call.apply(Xe,[Ae].concat(Ft))},[]);return qe}function Re(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Et=Re()?Pe.useLayoutEffect:Pe.useEffect,ht=Et,lt=function(Ae,qe){var Xe=Pe.useRef(!0);Et(function(){if(!Xe.current)return Ae()},qe),Et(function(){return Xe.current=!1,function(){Xe.current=!0}},[])};function et(xe){var Ae=Pe.useRef(!1),qe=Pe.useState(xe),Xe=(0,Me.Z)(qe,2),St=Xe[0],Ft=Xe[1];Pe.useEffect(function(){return Ae.current=!1,function(){Ae.current=!0}},[]);function Wt(an,nn){nn&&Ae.current||Ft(an)}return[St,Wt]}function ke(xe){return xe!==void 0}function vt(xe,Ae){var qe=Ae||{},Xe=qe.defaultValue,St=qe.value,Ft=qe.onChange,Wt=qe.postState,an=et(function(){return ke(St)?St:ke(Xe)?typeof Xe=="function"?Xe():Xe:typeof xe=="function"?xe():xe}),nn=(0,Me.Z)(an,2),Ot=nn[0],un=nn[1],hn=St!==void 0?St:Ot,zn=Wt?Wt(hn):hn,Sn=st(Ft),qn=et([hn]),fr=(0,Me.Z)(qn,2),er=fr[0],mr=fr[1];lt(function(){var ar=er[0];Ot!==ar&&Sn(Ot,ar)},[er]),lt(function(){ke(St)||un(St)},[St]);var jn=st(function(ar,Mr){un(ar,Mr),mr([hn],Mr)});return[zn,jn]}var jt={};function tt(xe,Ae){}function ut(xe,Ae){}function Ee(){jt={}}function we(xe,Ae,qe){!Ae&&!jt[qe]&&(xe(!1,qe),jt[qe]=!0)}function je(xe,Ae){we(tt,xe,Ae)}function Ye(xe,Ae){we(ut,xe,Ae)}var Lt=je,Ct=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var xe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(xe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(xe==null?void 0:xe.substr(0,4))},Bt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ae){var qe=Ae.keyCode;if(Ae.altKey&&!Ae.ctrlKey||Ae.metaKey||qe>=Bt.F1&&qe<=Bt.F12)return!1;switch(qe){case Bt.ALT:case Bt.CAPS_LOCK:case Bt.CONTEXT_MENU:case Bt.CTRL:case Bt.DOWN:case Bt.END:case Bt.ESC:case Bt.HOME:case Bt.INSERT:case Bt.LEFT:case Bt.MAC_FF_META:case Bt.META:case Bt.NUMLOCK:case Bt.NUM_CENTER:case Bt.PAGE_DOWN:case Bt.PAGE_UP:case Bt.PAUSE:case Bt.PRINT_SCREEN:case Bt.RIGHT:case Bt.SHIFT:case Bt.UP:case Bt.WIN_KEY:case Bt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ae){if(Ae>=Bt.ZERO&&Ae<=Bt.NINE||Ae>=Bt.NUM_ZERO&&Ae<=Bt.NUM_MULTIPLY||Ae>=Bt.A&&Ae<=Bt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ae===0)return!0;switch(Ae){case Bt.SPACE:case Bt.QUESTION_MARK:case Bt.NUM_PLUS:case Bt.NUM_MINUS:case Bt.NUM_PERIOD:case Bt.NUM_DIVISION:case Bt.SEMICOLON:case Bt.DASH:case Bt.EQUALS:case Bt.COMMA:case Bt.PERIOD:case Bt.SLASH:case Bt.APOSTROPHE:case Bt.SINGLE_QUOTE:case Bt.OPEN_SQUARE_BRACKET:case Bt.BACKSLASH:case Bt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},at=Bt,Vt=se(47655);function $t(xe,Ae,qe){var Xe=Pe.useRef({});return(!("value"in Xe.current)||qe(Xe.current.condition,Ae))&&(Xe.current.value=xe(),Xe.current.condition=Ae),Xe.current.value}function xn(xe,Ae){typeof xe=="function"?xe(Ae):(0,me.Z)(xe)==="object"&&xe&&"current"in xe&&(xe.current=Ae)}function dt(){for(var xe=arguments.length,Ae=new Array(xe),qe=0;qe<xe;qe++)Ae[qe]=arguments[qe];var Xe=Ae.filter(function(St){return St});return Xe.length<=1?Xe[0]:function(St){Ae.forEach(function(Ft){xn(Ft,St)})}}function on(){for(var xe=arguments.length,Ae=new Array(xe),qe=0;qe<xe;qe++)Ae[qe]=arguments[qe];return $t(function(){return dt.apply(void 0,Ae)},Ae,function(Xe,St){return Xe.length===St.length&&Xe.every(function(Ft,Wt){return Ft===St[Wt]})})}function En(xe){var Ae,qe,Xe=isMemo(xe)?xe.type.type:xe.type;return!(typeof Xe=="function"&&!((Ae=Xe.prototype)!==null&&Ae!==void 0&&Ae.render)||typeof xe=="function"&&!((qe=xe.prototype)!==null&&qe!==void 0&&qe.render))}var yn=function(Ae){var qe=Ae.className,Xe=Ae.customizeIcon,St=Ae.customizeIconProps,Ft=Ae.onMouseDown,Wt=Ae.onClick,an=Ae.children,nn;return typeof Xe=="function"?nn=Xe(St):nn=Xe,Pe.createElement("span",{className:qe,onMouseDown:function(un){un.preventDefault(),Ft&&Ft(un)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Wt,"aria-hidden":!0},nn!==void 0?nn:Pe.createElement("span",{className:Ue()(qe.split(/\s+/).map(function(Ot){return"".concat(Ot,"-icon")}))},an))},Ge=yn;function De(xe,Ae,qe,Xe,St){var Ft=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Wt=arguments.length>6?arguments[6]:void 0,an=arguments.length>7?arguments[7]:void 0,nn=Pe.useMemo(function(){if((0,me.Z)(Xe)==="object")return Xe.clearIcon;if(St)return St},[Xe,St]),Ot=Pe.useMemo(function(){return!!(!Ft&&Xe&&(qe.length||Wt)&&!(an==="combobox"&&Wt===""))},[Xe,Ft,qe.length,Wt,an]);return{allowClear:Ot,clearIcon:Pe.createElement(Ge,{className:"".concat(xe,"-clear"),onMouseDown:Ae,customizeIcon:nn},"\xD7")}}var Zt=Pe.createContext(null);function In(){return Pe.useContext(Zt)}function fn(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ae=Pe.useState(!1),qe=(0,Me.Z)(Ae,2),Xe=qe[0],St=qe[1],Ft=Pe.useRef(null),Wt=function(){window.clearTimeout(Ft.current)};Pe.useEffect(function(){return Wt},[]);var an=function(Ot,un){Wt(),Ft.current=window.setTimeout(function(){St(Ot),un&&un()},xe)};return[Xe,an,Wt]}function ot(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ae=Pe.useRef(null),qe=Pe.useRef(null);Pe.useEffect(function(){return function(){window.clearTimeout(qe.current)}},[]);function Xe(St){(St||Ae.current===null)&&(Ae.current=St),window.clearTimeout(qe.current),qe.current=window.setTimeout(function(){Ae.current=null},xe)}return[function(){return Ae.current},Xe]}function ft(xe,Ae,qe,Xe){var St=Pe.useRef(null);St.current={open:Ae,triggerOpen:qe,customizedTrigger:Xe},Pe.useEffect(function(){function Ft(Wt){var an;if(!((an=St.current)!==null&&an!==void 0&&an.customizedTrigger)){var nn=Wt.target;nn.shadowRoot&&Wt.composed&&(nn=Wt.composedPath()[0]||nn),St.current.open&&xe().filter(function(Ot){return Ot}).every(function(Ot){return!Ot.contains(nn)&&Ot!==nn})&&St.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ft),function(){return window.removeEventListener("mousedown",Ft)}},[])}var Jt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Bn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,wn="".concat(Jt," ").concat(Bn).split(/[\s\n]+/),Nt="aria-",Xt="data-";function Dn(xe,Ae){return xe.indexOf(Ae)===0}function Mn(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe;Ae===!1?qe={aria:!0,data:!0,attr:!0}:Ae===!0?qe={aria:!0}:qe=(0,Le.Z)({},Ae);var Xe={};return Object.keys(xe).forEach(function(St){(qe.aria&&(St==="role"||Dn(St,Nt))||qe.data&&Dn(St,Xt)||qe.attr&&wn.includes(St))&&(Xe[St]=xe[St])}),Xe}var Te=se(48555),de=se(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],pe=void 0;function he(xe,Ae){var qe=xe.prefixCls,Xe=xe.invalidate,St=xe.item,Ft=xe.renderItem,Wt=xe.responsive,an=xe.responsiveDisabled,nn=xe.registerSize,Ot=xe.itemKey,un=xe.className,hn=xe.style,zn=xe.children,Sn=xe.display,qn=xe.order,fr=xe.component,er=fr===void 0?"div":fr,mr=(0,Se.Z)(xe,le),jn=Wt&&!Sn;function ar($r){nn(Ot,$r)}Pe.useEffect(function(){return function(){ar(null)}},[]);var Mr=Ft&&St!==pe?Ft(St):zn,Nr;Xe||(Nr={opacity:jn?0:1,height:jn?0:pe,overflowY:jn?"hidden":pe,order:Wt?qn:pe,pointerEvents:jn?"none":pe,position:jn?"absolute":pe});var rr={};jn&&(rr["aria-hidden"]=!0);var Dr=Pe.createElement(er,(0,Fe.Z)({className:Ue()(!Xe&&qe,un),style:(0,Le.Z)((0,Le.Z)({},Nr),hn)},rr,mr,{ref:Ae}),Mr);return Wt&&(Dr=Pe.createElement(Te.Z,{onResize:function(mi){var ri=mi.offsetWidth;ar(ri)},disabled:an},Dr)),Dr}var oe=Pe.forwardRef(he);oe.displayName="Item";var Ie=oe,Je=se(77527),_t=se(73935),Kt=se(96523);function Ht(xe){if(typeof MessageChannel=="undefined")(0,Kt.Z)(xe);else{var Ae=new MessageChannel;Ae.port1.onmessage=function(){return xe()},Ae.port2.postMessage(void 0)}}function Qt(){var xe=Pe.useRef(null),Ae=function(Xe){xe.current||(xe.current=[],Ht(function(){(0,_t.unstable_batchedUpdates)(function(){xe.current.forEach(function(St){St()}),xe.current=null})})),xe.current.push(Xe)};return Ae}function Gt(xe,Ae){var qe=Pe.useState(Ae),Xe=(0,Me.Z)(qe,2),St=Xe[0],Ft=Xe[1],Wt=(0,Je.Z)(function(an){xe(function(){Ft(an)})});return[St,Wt]}var nr=Pe.createContext(null),gr=["component"],Ut=["className"],pn=["className"],ir=function(Ae,qe){var Xe=Pe.useContext(nr);if(!Xe){var St=Ae.component,Ft=St===void 0?"div":St,Wt=(0,Se.Z)(Ae,gr);return Pe.createElement(Ft,(0,Fe.Z)({},Wt,{ref:qe}))}var an=Xe.className,nn=(0,Se.Z)(Xe,Ut),Ot=Ae.className,un=(0,Se.Z)(Ae,pn);return Pe.createElement(nr.Provider,{value:null},Pe.createElement(Ie,(0,Fe.Z)({ref:qe,className:Ue()(an,Ot)},nn,un)))},Lr=Pe.forwardRef(ir);Lr.displayName="RawItem";var $n=Lr,Cr=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ii="responsive",li="invalidate";function ci(xe){return"+ ".concat(xe.length," ...")}function Jr(xe,Ae){var qe=xe.prefixCls,Xe=qe===void 0?"rc-overflow":qe,St=xe.data,Ft=St===void 0?[]:St,Wt=xe.renderItem,an=xe.renderRawItem,nn=xe.itemKey,Ot=xe.itemWidth,un=Ot===void 0?10:Ot,hn=xe.ssr,zn=xe.style,Sn=xe.className,qn=xe.maxCount,fr=xe.renderRest,er=xe.renderRawRest,mr=xe.suffix,jn=xe.component,ar=jn===void 0?"div":jn,Mr=xe.itemComponent,Nr=xe.onVisibleChange,rr=(0,Se.Z)(xe,Cr),Dr=hn==="full",$r=Qt(),mi=Gt($r,null),ri=(0,Me.Z)(mi,2),Ur=ri[0],ui=ri[1],pi=Ur||0,jr=Gt($r,new Map),Gr=(0,Me.Z)(jr,2),wr=Gr[0],Fr=Gr[1],Yr=Gt($r,0),fi=(0,Me.Z)(Yr,2),ua=fi[0],ha=fi[1],Bi=Gt($r,0),$i=(0,Me.Z)(Bi,2),ei=$i[0],Wr=$i[1],Yi=Gt($r,0),qr=(0,Me.Z)(Yi,2),vr=qr[0],zr=qr[1],Li=(0,Pe.useState)(null),yi=(0,Me.Z)(Li,2),ji=yi[0],ti=yi[1],ta=(0,Pe.useState)(null),qi=(0,Me.Z)(ta,2),Ki=qi[0],Ui=qi[1],sa=Pe.useMemo(function(){return Ki===null&&Dr?Number.MAX_SAFE_INTEGER:Ki||0},[Ki,Ur]),Aa=(0,Pe.useState)(!1),da=(0,Me.Z)(Aa,2),Sa=da[0],za=da[1],ja="".concat(Xe,"-item"),Qa=Math.max(ua,ei),Ra=qn===Ii,la=Ft.length&&Ra,di=qn===li,Mi=la||typeof qn=="number"&&Ft.length>qn,Qi=(0,Pe.useMemo)(function(){var ea=Ft;return la?Ur===null&&Dr?ea=Ft:ea=Ft.slice(0,Math.min(Ft.length,pi/un)):typeof qn=="number"&&(ea=Ft.slice(0,qn)),ea},[Ft,un,Ur,qn,la]),pa=(0,Pe.useMemo)(function(){return la?Ft.slice(sa+1):Ft.slice(Qi.length)},[Ft,Qi,la,sa]),Ka=(0,Pe.useCallback)(function(ea,_r){var Si;return typeof nn=="function"?nn(ea):(Si=nn&&(ea==null?void 0:ea[nn]))!==null&&Si!==void 0?Si:_r},[nn]),eo=(0,Pe.useCallback)(Wt||function(ea){return ea},[Wt]);function uo(ea,_r,Si){Ki===ea&&(_r===void 0||_r===ji)||(Ui(ea),Si||(za(ea<Ft.length-1),Nr==null||Nr(ea)),_r!==void 0&&ti(_r))}function _o(ea,_r){ui(_r.clientWidth)}function ko(ea,_r){Fr(function(Si){var Ci=new Map(Si);return _r===null?Ci.delete(ea):Ci.set(ea,_r),Ci})}function to(ea,_r){Wr(_r),ha(ei)}function Da(ea,_r){zr(_r)}function Br(ea){return wr.get(Ka(Qi[ea],ea))}(0,de.Z)(function(){if(pi&&typeof Qa=="number"&&Qi){var ea=vr,_r=Qi.length,Si=_r-1;if(!_r){uo(0,null);return}for(var Ci=0;Ci<_r;Ci+=1){var Ai=Br(Ci);if(Dr&&(Ai=Ai||0),Ai===void 0){uo(Ci-1,void 0,!0);break}if(ea+=Ai,Si===0&&ea<=pi||Ci===Si-1&&ea+Br(Si)<=pi){uo(Si,null);break}else if(ea+Qa>pi){uo(Ci-1,ea-Ai-vr+ei);break}}mr&&Br(0)+vr>pi&&ti(null)}},[pi,wr,ei,vr,Ka,Qi]);var gi=Sa&&!!pa.length,ya={};ji!==null&&la&&(ya={position:"absolute",left:ji,top:0});var na={prefixCls:ja,responsive:la,component:Mr,invalidate:di},Va=an?function(ea,_r){var Si=Ka(ea,_r);return Pe.createElement(nr.Provider,{key:Si,value:(0,Le.Z)((0,Le.Z)({},na),{},{order:_r,item:ea,itemKey:Si,registerSize:ko,display:_r<=sa})},an(ea,_r))}:function(ea,_r){var Si=Ka(ea,_r);return Pe.createElement(Ie,(0,Fe.Z)({},na,{order:_r,key:Si,item:ea,renderItem:eo,itemKey:Si,registerSize:ko,display:_r<=sa}))},Za,Do={order:gi?sa:Number.MAX_SAFE_INTEGER,className:"".concat(ja,"-rest"),registerSize:to,display:gi};if(er)er&&(Za=Pe.createElement(nr.Provider,{value:(0,Le.Z)((0,Le.Z)({},na),Do)},er(pa)));else{var zo=fr||ci;Za=Pe.createElement(Ie,(0,Fe.Z)({},na,Do),typeof zo=="function"?zo(pa):zo)}var as=Pe.createElement(ar,(0,Fe.Z)({className:Ue()(!di&&Xe,Sn),style:zn,ref:Ae},rr),Qi.map(Va),Mi?Za:null,mr&&Pe.createElement(Ie,(0,Fe.Z)({},na,{responsive:Ra,responsiveDisabled:!la,order:sa,className:"".concat(ja,"-suffix"),registerSize:Da,display:!0,style:ya}),mr));return Ra&&(as=Pe.createElement(Te.Z,{onResize:_o,disabled:!la},as)),as}var Di=Pe.forwardRef(Jr);Di.displayName="Overflow",Di.Item=$n,Di.RESPONSIVE=Ii,Di.INVALIDATE=li;var Ei=Di,Pi=Ei,xr=function(Ae,qe){var Xe,St,Ft=Ae.prefixCls,Wt=Ae.id,an=Ae.inputElement,nn=Ae.disabled,Ot=Ae.tabIndex,un=Ae.autoFocus,hn=Ae.autoComplete,zn=Ae.editable,Sn=Ae.activeDescendantId,qn=Ae.value,fr=Ae.maxLength,er=Ae.onKeyDown,mr=Ae.onMouseDown,jn=Ae.onChange,ar=Ae.onPaste,Mr=Ae.onCompositionStart,Nr=Ae.onCompositionEnd,rr=Ae.open,Dr=Ae.attrs,$r=an||Pe.createElement("input",null),mi=$r,ri=mi.ref,Ur=mi.props,ui=Ur.onKeyDown,pi=Ur.onChange,jr=Ur.onMouseDown,Gr=Ur.onCompositionStart,wr=Ur.onCompositionEnd,Fr=Ur.style;return"maxLength"in $r.props,$r=Pe.cloneElement($r,(0,Le.Z)((0,Le.Z)((0,Le.Z)({type:"search"},Ur),{},{id:Wt,ref:dt(qe,ri),disabled:nn,tabIndex:Ot,autoComplete:hn||"off",autoFocus:un,className:Ue()("".concat(Ft,"-selection-search-input"),(Xe=$r)===null||Xe===void 0||(St=Xe.props)===null||St===void 0?void 0:St.className),role:"combobox","aria-label":"Search","aria-expanded":rr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Wt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Wt,"_list"),"aria-activedescendant":rr?Sn:void 0},Dr),{},{value:zn?qn:"",maxLength:fr,readOnly:!zn,unselectable:zn?null:"on",style:(0,Le.Z)((0,Le.Z)({},Fr),{},{opacity:zn?null:0}),onKeyDown:function(fi){er(fi),ui&&ui(fi)},onMouseDown:function(fi){mr(fi),jr&&jr(fi)},onChange:function(fi){jn(fi),pi&&pi(fi)},onCompositionStart:function(fi){Mr(fi),Gr&&Gr(fi)},onCompositionEnd:function(fi){Nr(fi),wr&&wr(fi)},onPaste:ar})),$r},Pr=Pe.forwardRef(xr);Pr.displayName="Input";var Gi=Pr;function ma(xe){return Array.isArray(xe)?xe:xe!==void 0?[xe]:[]}var ba=typeof window!="undefined"&&window.document&&window.document.documentElement,va=ba;function Vi(xe){return xe!=null}function At(xe){return!xe&&xe!==0}function On(xe){return["string","number"].includes((0,me.Z)(xe))}function Pt(xe){var Ae=void 0;return xe&&(On(xe.title)?Ae=xe.title.toString():On(xe.label)&&(Ae=xe.label.toString())),Ae}function zt(xe,Ae){va?Pe.useLayoutEffect(xe,Ae):Pe.useEffect(xe,Ae)}function rn(xe){var Ae;return(Ae=xe.key)!==null&&Ae!==void 0?Ae:xe.value}var cn=function(Ae){Ae.preventDefault(),Ae.stopPropagation()},Vn=function(Ae){var qe=Ae.id,Xe=Ae.prefixCls,St=Ae.values,Ft=Ae.open,Wt=Ae.searchValue,an=Ae.autoClearSearchValue,nn=Ae.inputRef,Ot=Ae.placeholder,un=Ae.disabled,hn=Ae.mode,zn=Ae.showSearch,Sn=Ae.autoFocus,qn=Ae.autoComplete,fr=Ae.activeDescendantId,er=Ae.tabIndex,mr=Ae.removeIcon,jn=Ae.maxTagCount,ar=Ae.maxTagTextLength,Mr=Ae.maxTagPlaceholder,Nr=Mr===void 0?function(ti){return"+ ".concat(ti.length," ...")}:Mr,rr=Ae.tagRender,Dr=Ae.onToggleOpen,$r=Ae.onRemove,mi=Ae.onInputChange,ri=Ae.onInputPaste,Ur=Ae.onInputKeyDown,ui=Ae.onInputMouseDown,pi=Ae.onInputCompositionStart,jr=Ae.onInputCompositionEnd,Gr=Pe.useRef(null),wr=(0,Pe.useState)(0),Fr=(0,Me.Z)(wr,2),Yr=Fr[0],fi=Fr[1],ua=(0,Pe.useState)(!1),ha=(0,Me.Z)(ua,2),Bi=ha[0],$i=ha[1],ei="".concat(Xe,"-selection"),Wr=Ft||hn==="multiple"&&an===!1||hn==="tags"?Wt:"",Yi=hn==="tags"||hn==="multiple"&&an===!1||zn&&(Ft||Bi);zt(function(){fi(Gr.current.scrollWidth)},[Wr]);function qr(ti,ta,qi,Ki,Ui){return Pe.createElement("span",{className:Ue()("".concat(ei,"-item"),(0,ve.Z)({},"".concat(ei,"-item-disabled"),qi)),title:Pt(ti)},Pe.createElement("span",{className:"".concat(ei,"-item-content")},ta),Ki&&Pe.createElement(Ge,{className:"".concat(ei,"-item-remove"),onMouseDown:cn,onClick:Ui,customizeIcon:mr},"\xD7"))}function vr(ti,ta,qi,Ki,Ui){var sa=function(da){cn(da),Dr(!Ft)};return Pe.createElement("span",{onMouseDown:sa},rr({label:ta,value:ti,disabled:qi,closable:Ki,onClose:Ui}))}function zr(ti){var ta=ti.disabled,qi=ti.label,Ki=ti.value,Ui=!un&&!ta,sa=qi;if(typeof ar=="number"&&(typeof qi=="string"||typeof qi=="number")){var Aa=String(sa);Aa.length>ar&&(sa="".concat(Aa.slice(0,ar),"..."))}var da=function(za){za&&za.stopPropagation(),$r(ti)};return typeof rr=="function"?vr(Ki,sa,ta,Ui,da):qr(ti,sa,ta,Ui,da)}function Li(ti){var ta=typeof Nr=="function"?Nr(ti):Nr;return qr({title:ta},ta,!1)}var yi=Pe.createElement("div",{className:"".concat(ei,"-search"),style:{width:Yr},onFocus:function(){$i(!0)},onBlur:function(){$i(!1)}},Pe.createElement(Gi,{ref:nn,open:Ft,prefixCls:Xe,id:qe,inputElement:null,disabled:un,autoFocus:Sn,autoComplete:qn,editable:Yi,activeDescendantId:fr,value:Wr,onKeyDown:Ur,onMouseDown:ui,onChange:mi,onPaste:ri,onCompositionStart:pi,onCompositionEnd:jr,tabIndex:er,attrs:Mn(Ae,!0)}),Pe.createElement("span",{ref:Gr,className:"".concat(ei,"-search-mirror"),"aria-hidden":!0},Wr,"\xA0")),ji=Pe.createElement(Pi,{prefixCls:"".concat(ei,"-overflow"),data:St,renderItem:zr,renderRest:Li,suffix:yi,itemKey:rn,maxCount:jn});return Pe.createElement(Pe.Fragment,null,ji,!St.length&&!Wr&&Pe.createElement("span",{className:"".concat(ei,"-placeholder")},Ot))},Nn=Vn,Qe=function(Ae){var qe=Ae.inputElement,Xe=Ae.prefixCls,St=Ae.id,Ft=Ae.inputRef,Wt=Ae.disabled,an=Ae.autoFocus,nn=Ae.autoComplete,Ot=Ae.activeDescendantId,un=Ae.mode,hn=Ae.open,zn=Ae.values,Sn=Ae.placeholder,qn=Ae.tabIndex,fr=Ae.showSearch,er=Ae.searchValue,mr=Ae.activeValue,jn=Ae.maxLength,ar=Ae.onInputKeyDown,Mr=Ae.onInputMouseDown,Nr=Ae.onInputChange,rr=Ae.onInputPaste,Dr=Ae.onInputCompositionStart,$r=Ae.onInputCompositionEnd,mi=Ae.title,ri=Pe.useState(!1),Ur=(0,Me.Z)(ri,2),ui=Ur[0],pi=Ur[1],jr=un==="combobox",Gr=jr||fr,wr=zn[0],Fr=er||"";jr&&mr&&!ui&&(Fr=mr),Pe.useEffect(function(){jr&&pi(!1)},[jr,mr]);var Yr=un!=="combobox"&&!hn&&!fr?!1:!!Fr,fi=mi===void 0?Pt(wr):mi,ua=function(){if(wr)return null;var Bi=Yr?{visibility:"hidden"}:void 0;return Pe.createElement("span",{className:"".concat(Xe,"-selection-placeholder"),style:Bi},Sn)};return Pe.createElement(Pe.Fragment,null,Pe.createElement("span",{className:"".concat(Xe,"-selection-search")},Pe.createElement(Gi,{ref:Ft,prefixCls:Xe,id:St,open:hn,inputElement:qe,disabled:Wt,autoFocus:an,autoComplete:nn,editable:Gr,activeDescendantId:Ot,value:Fr,onKeyDown:ar,onMouseDown:Mr,onChange:function(Bi){pi(!0),Nr(Bi)},onPaste:rr,onCompositionStart:Dr,onCompositionEnd:$r,tabIndex:qn,attrs:Mn(Ae,!0),maxLength:jr?jn:void 0})),!jr&&wr?Pe.createElement("span",{className:"".concat(Xe,"-selection-item"),title:fi,style:Yr?{visibility:"hidden"}:void 0},wr.label):null,ua())},rt=Qe;function pt(xe){return![at.ESC,at.SHIFT,at.BACKSPACE,at.TAB,at.WIN_KEY,at.ALT,at.META,at.WIN_KEY_RIGHT,at.CTRL,at.SEMICOLON,at.EQUALS,at.CAPS_LOCK,at.CONTEXT_MENU,at.F1,at.F2,at.F3,at.F4,at.F5,at.F6,at.F7,at.F8,at.F9,at.F10,at.F11,at.F12].includes(xe)}var Rt=function(Ae,qe){var Xe=(0,Pe.useRef)(null),St=(0,Pe.useRef)(!1),Ft=Ae.prefixCls,Wt=Ae.open,an=Ae.mode,nn=Ae.showSearch,Ot=Ae.tokenWithEnter,un=Ae.autoClearSearchValue,hn=Ae.onSearch,zn=Ae.onSearchSubmit,Sn=Ae.onToggleOpen,qn=Ae.onInputKeyDown,fr=Ae.domRef;Pe.useImperativeHandle(qe,function(){return{focus:function(){Xe.current.focus()},blur:function(){Xe.current.blur()}}});var er=ot(0),mr=(0,Me.Z)(er,2),jn=mr[0],ar=mr[1],Mr=function(Fr){var Yr=Fr.which;(Yr===at.UP||Yr===at.DOWN)&&Fr.preventDefault(),qn&&qn(Fr),Yr===at.ENTER&&an==="tags"&&!St.current&&!Wt&&(zn==null||zn(Fr.target.value)),pt(Yr)&&Sn(!0)},Nr=function(){ar(!0)},rr=(0,Pe.useRef)(null),Dr=function(Fr){hn(Fr,!0,St.current)!==!1&&Sn(!0)},$r=function(){St.current=!0},mi=function(Fr){St.current=!1,an!=="combobox"&&Dr(Fr.target.value)},ri=function(Fr){var Yr=Fr.target.value;if(Ot&&rr.current&&/[\r\n]/.test(rr.current)){var fi=rr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Yr=Yr.replace(fi,rr.current)}rr.current=null,Dr(Yr)},Ur=function(Fr){var Yr=Fr.clipboardData,fi=Yr.getData("text");rr.current=fi},ui=function(Fr){var Yr=Fr.target;if(Yr!==Xe.current){var fi=document.body.style.msTouchAction!==void 0;fi?setTimeout(function(){Xe.current.focus()}):Xe.current.focus()}},pi=function(Fr){var Yr=jn();Fr.target!==Xe.current&&!Yr&&an!=="combobox"&&Fr.preventDefault(),(an!=="combobox"&&(!nn||!Yr)||!Wt)&&(Wt&&un!==!1&&hn("",!0,!1),Sn())},jr={inputRef:Xe,onInputKeyDown:Mr,onInputMouseDown:Nr,onInputChange:ri,onInputPaste:Ur,onInputCompositionStart:$r,onInputCompositionEnd:mi},Gr=an==="multiple"||an==="tags"?Pe.createElement(Nn,(0,Fe.Z)({},Ae,jr)):Pe.createElement(rt,(0,Fe.Z)({},Ae,jr));return Pe.createElement("div",{ref:fr,className:"".concat(Ft,"-selector"),onClick:ui,onMouseDown:pi},Gr)},We=Pe.forwardRef(Rt);We.displayName="Selector";var mt=We,Dt=se(62709),gt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],qt=function(Ae){var qe=Ae===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:qe,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:qe,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:qe,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:qe,adjustY:1},htmlRegion:"scroll"}}},Yt=function(Ae,qe){var Xe=Ae.prefixCls,St=Ae.disabled,Ft=Ae.visible,Wt=Ae.children,an=Ae.popupElement,nn=Ae.animation,Ot=Ae.transitionName,un=Ae.dropdownStyle,hn=Ae.dropdownClassName,zn=Ae.direction,Sn=zn===void 0?"ltr":zn,qn=Ae.placement,fr=Ae.builtinPlacements,er=Ae.dropdownMatchSelectWidth,mr=Ae.dropdownRender,jn=Ae.dropdownAlign,ar=Ae.getPopupContainer,Mr=Ae.empty,Nr=Ae.getTriggerDOMNode,rr=Ae.onPopupVisibleChange,Dr=Ae.onPopupMouseEnter,$r=(0,Se.Z)(Ae,gt),mi="".concat(Xe,"-dropdown"),ri=an;mr&&(ri=mr(an));var Ur=Pe.useMemo(function(){return fr||qt(er)},[fr,er]),ui=nn?"".concat(mi,"-").concat(nn):Ot,pi=typeof er=="number",jr=Pe.useMemo(function(){return pi?null:er===!1?"minWidth":"width"},[er,pi]),Gr=un;pi&&(Gr=(0,Le.Z)((0,Le.Z)({},Gr),{},{width:er}));var wr=Pe.useRef(null);return Pe.useImperativeHandle(qe,function(){return{getPopupElement:function(){return wr.current}}}),Pe.createElement(Dt.Z,(0,Fe.Z)({},$r,{showAction:rr?["click"]:[],hideAction:rr?["click"]:[],popupPlacement:qn||(Sn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ur,prefixCls:mi,popupTransitionName:ui,popup:Pe.createElement("div",{ref:wr,onMouseEnter:Dr},ri),stretch:jr,popupAlign:jn,popupVisible:Ft,getPopupContainer:ar,popupClassName:Ue()(hn,(0,ve.Z)({},"".concat(mi,"-empty"),Mr)),popupStyle:Gr,getTriggerDOMNode:Nr,onPopupVisibleChange:rr}),Wt)},Rn=Pe.forwardRef(Yt);Rn.displayName="SelectTrigger";var br=Rn,Wn=se(84506);function Jn(xe,Ae){var qe=xe.key,Xe;return"value"in xe&&(Xe=xe.value),qe!=null?qe:Xe!==void 0?Xe:"rc-index-key-".concat(Ae)}function or(xe,Ae){var qe=xe||{},Xe=qe.label,St=qe.value,Ft=qe.options,Wt=qe.groupLabel,an=Xe||(Ae?"children":"label");return{label:an,value:St||"value",options:Ft||"options",groupLabel:Wt||an}}function lr(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qe=Ae.fieldNames,Xe=Ae.childrenAsData,St=[],Ft=or(qe,!1),Wt=Ft.label,an=Ft.value,nn=Ft.options,Ot=Ft.groupLabel;function un(hn,zn){hn.forEach(function(Sn){if(zn||!(nn in Sn)){var qn=Sn[an];St.push({key:Jn(Sn,St.length),groupOption:zn,data:Sn,label:Sn[Wt],value:qn})}else{var fr=Sn[Ot];fr===void 0&&Xe&&(fr=Sn.label),St.push({key:Jn(Sn,St.length),group:!0,data:Sn,label:fr}),un(Sn[nn],!0)}})}return un(xe,!1),St}function Rr(xe){var Ae=(0,Le.Z)({},xe);return"props"in Ae||Object.defineProperty(Ae,"props",{get:function(){return Lt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ae}}),Ae}function bn(xe,Ae){if(!Ae||!Ae.length)return null;var qe=!1;function Xe(Ft,Wt){var an=(0,Wn.Z)(Wt),nn=an[0],Ot=an.slice(1);if(!nn)return[Ft];var un=Ft.split(nn);return qe=qe||un.length>1,un.reduce(function(hn,zn){return[].concat((0,it.Z)(hn),(0,it.Z)(Xe(zn,Ot)))},[]).filter(function(hn){return hn})}var St=Xe(xe,Ae);return qe?St:null}var An=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],hi=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xi(xe){return xe==="tags"||xe==="multiple"}var ai=Pe.forwardRef(function(xe,Ae){var qe,Xe,St=xe.id,Ft=xe.prefixCls,Wt=xe.className,an=xe.showSearch,nn=xe.tagRender,Ot=xe.direction,un=xe.omitDomProps,hn=xe.displayValues,zn=xe.onDisplayValuesChange,Sn=xe.emptyOptions,qn=xe.notFoundContent,fr=qn===void 0?"Not Found":qn,er=xe.onClear,mr=xe.mode,jn=xe.disabled,ar=xe.loading,Mr=xe.getInputElement,Nr=xe.getRawInputElement,rr=xe.open,Dr=xe.defaultOpen,$r=xe.onDropdownVisibleChange,mi=xe.activeValue,ri=xe.onActiveValueChange,Ur=xe.activeDescendantId,ui=xe.searchValue,pi=xe.autoClearSearchValue,jr=xe.onSearch,Gr=xe.onSearchSplit,wr=xe.tokenSeparators,Fr=xe.allowClear,Yr=xe.suffixIcon,fi=xe.clearIcon,ua=xe.OptionList,ha=xe.animation,Bi=xe.transitionName,$i=xe.dropdownStyle,ei=xe.dropdownClassName,Wr=xe.dropdownMatchSelectWidth,Yi=xe.dropdownRender,qr=xe.dropdownAlign,vr=xe.placement,zr=xe.builtinPlacements,Li=xe.getPopupContainer,yi=xe.showAction,ji=yi===void 0?[]:yi,ti=xe.onFocus,ta=xe.onBlur,qi=xe.onKeyUp,Ki=xe.onKeyDown,Ui=xe.onMouseDown,sa=(0,Se.Z)(xe,An),Aa=xi(mr),da=(an!==void 0?an:Aa)||mr==="combobox",Sa=(0,Le.Z)({},sa);hi.forEach(function($a){delete Sa[$a]}),un==null||un.forEach(function($a){delete Sa[$a]});var za=Pe.useState(!1),ja=(0,Me.Z)(za,2),Qa=ja[0],Ra=ja[1];Pe.useEffect(function(){Ra(Ct())},[]);var la=Pe.useRef(null),di=Pe.useRef(null),Mi=Pe.useRef(null),Qi=Pe.useRef(null),pa=Pe.useRef(null),Ka=fn(),eo=(0,Me.Z)(Ka,3),uo=eo[0],_o=eo[1],ko=eo[2];Pe.useImperativeHandle(Ae,function(){var $a,Ca;return{focus:($a=Qi.current)===null||$a===void 0?void 0:$a.focus,blur:(Ca=Qi.current)===null||Ca===void 0?void 0:Ca.blur,scrollTo:function(ts){var Ea;return(Ea=pa.current)===null||Ea===void 0?void 0:Ea.scrollTo(ts)}}});var to=Pe.useMemo(function(){var $a;if(mr!=="combobox")return ui;var Ca=($a=hn[0])===null||$a===void 0?void 0:$a.value;return typeof Ca=="string"||typeof Ca=="number"?String(Ca):""},[ui,mr,hn]),Da=mr==="combobox"&&typeof Mr=="function"&&Mr()||null,Br=typeof Nr=="function"&&Nr(),gi=on(di,Br==null||(qe=Br.props)===null||qe===void 0?void 0:qe.ref),ya=Pe.useState(!1),na=(0,Me.Z)(ya,2),Va=na[0],Za=na[1];ht(function(){Za(!0)},[]);var Do=vt(!1,{defaultValue:Dr,value:rr}),zo=(0,Me.Z)(Do,2),as=zo[0],ea=zo[1],_r=Va?as:!1,Si=!fr&&Sn;(jn||Si&&_r&&mr==="combobox")&&(_r=!1);var Ci=Si?!1:_r,Ai=Pe.useCallback(function($a){var Ca=$a!==void 0?$a:!_r;jn||(ea(Ca),_r!==Ca&&($r==null||$r(Ca)))},[jn,_r,ea,$r]),Ga=Pe.useMemo(function(){return(wr||[]).some(function($a){return[`
`,`\r
`].includes($a)})},[wr]),Ja=function(Ca,Zo,ts){var Ea=!0,Ua=Ca;ri==null||ri(null);var Ha=ts?null:bn(Ca,wr);return mr!=="combobox"&&Ha&&(Ua="",Gr==null||Gr(Ha),Ai(!1),Ea=!1),jr&&to!==Ua&&jr(Ua,{source:Zo?"typing":"effect"}),Ea},Ko=function(Ca){!Ca||!Ca.trim()||jr(Ca,{source:"submit"})};Pe.useEffect(function(){!_r&&!Aa&&mr!=="combobox"&&Ja("",!1,!1)},[_r]),Pe.useEffect(function(){as&&jn&&ea(!1),jn&&_o(!1)},[jn]);var jo=ot(),us=(0,Me.Z)(jo,2),_a=us[0],Bo=us[1],ds=function(Ca){var Zo=_a(),ts=Ca.which;if(ts===at.ENTER&&(mr!=="combobox"&&Ca.preventDefault(),_r||Ai(!0)),Bo(!!to),ts===at.BACKSPACE&&!Zo&&Aa&&!to&&hn.length){for(var Ea=(0,it.Z)(hn),Ua=null,Ha=Ea.length-1;Ha>=0;Ha-=1){var mo=Ea[Ha];if(!mo.disabled){Ea.splice(Ha,1),Ua=mo;break}}Ua&&zn(Ea,{type:"remove",values:[Ua]})}for(var os=arguments.length,Hs=new Array(os>1?os-1:0),gs=1;gs<os;gs++)Hs[gs-1]=arguments[gs];if(_r&&pa.current){var Jl;(Jl=pa.current).onKeyDown.apply(Jl,[Ca].concat(Hs))}Ki==null||Ki.apply(void 0,[Ca].concat(Hs))},ul=function(Ca){for(var Zo=arguments.length,ts=new Array(Zo>1?Zo-1:0),Ea=1;Ea<Zo;Ea++)ts[Ea-1]=arguments[Ea];if(_r&&pa.current){var Ua;(Ua=pa.current).onKeyUp.apply(Ua,[Ca].concat(ts))}qi==null||qi.apply(void 0,[Ca].concat(ts))},As=function(Ca){var Zo=hn.filter(function(ts){return ts!==Ca});zn(Zo,{type:"remove",values:[Ca]})},ms=Pe.useRef(!1),Ho=function(){_o(!0),jn||(ti&&!ms.current&&ti.apply(void 0,arguments),ji.includes("focus")&&Ai(!0)),ms.current=!0},Ts=function(){_o(!1,function(){ms.current=!1,Ai(!1)}),!jn&&(to&&(mr==="tags"?jr(to,{source:"submit"}):mr==="multiple"&&jr("",{source:"blur"})),ta&&ta.apply(void 0,arguments))},Is=[];Pe.useEffect(function(){return function(){Is.forEach(function($a){return clearTimeout($a)}),Is.splice(0,Is.length)}},[]);var qs=function(Ca){var Zo,ts=Ca.target,Ea=(Zo=Mi.current)===null||Zo===void 0?void 0:Zo.getPopupElement();if(Ea&&Ea.contains(ts)){var Ua=setTimeout(function(){var Hs=Is.indexOf(Ua);if(Hs!==-1&&Is.splice(Hs,1),ko(),!Qa&&!Ea.contains(document.activeElement)){var gs;(gs=Qi.current)===null||gs===void 0||gs.focus()}});Is.push(Ua)}for(var Ha=arguments.length,mo=new Array(Ha>1?Ha-1:0),os=1;os<Ha;os++)mo[os-1]=arguments[os];Ui==null||Ui.apply(void 0,[Ca].concat(mo))},fo=Pe.useState({}),Ba=(0,Me.Z)(fo,2),no=Ba[1];function vo(){no({})}var bo;Br&&(bo=function(Ca){Ai(Ca)}),ft(function(){var $a;return[la.current,($a=Mi.current)===null||$a===void 0?void 0:$a.getPopupElement()]},Ci,Ai,!!Br);var Wo=Pe.useMemo(function(){return(0,Le.Z)((0,Le.Z)({},xe),{},{notFoundContent:fr,open:_r,triggerOpen:Ci,id:St,showSearch:da,multiple:Aa,toggleOpen:Ai})},[xe,fr,Ci,_r,St,da,Aa,Ai]),So=!!Yr||ar,xs;So&&(xs=Pe.createElement(Ge,{className:Ue()("".concat(Ft,"-arrow"),(0,ve.Z)({},"".concat(Ft,"-arrow-loading"),ar)),customizeIcon:Yr,customizeIconProps:{loading:ar,searchValue:to,open:_r,focused:uo,showSearch:da}}));var Xl=function(){var Ca;er==null||er(),(Ca=Qi.current)===null||Ca===void 0||Ca.focus(),zn([],{type:"clear",values:hn}),Ja("",!1,!1)},Yl=De(Ft,Xl,hn,Fr,fi,jn,to,mr),vc=Yl.allowClear,Xc=Yl.clearIcon,Ks=Pe.createElement(ua,{ref:pa}),Ds=Ue()(Ft,Wt,(Xe={},(0,ve.Z)(Xe,"".concat(Ft,"-focused"),uo),(0,ve.Z)(Xe,"".concat(Ft,"-multiple"),Aa),(0,ve.Z)(Xe,"".concat(Ft,"-single"),!Aa),(0,ve.Z)(Xe,"".concat(Ft,"-allow-clear"),Fr),(0,ve.Z)(Xe,"".concat(Ft,"-show-arrow"),So),(0,ve.Z)(Xe,"".concat(Ft,"-disabled"),jn),(0,ve.Z)(Xe,"".concat(Ft,"-loading"),ar),(0,ve.Z)(Xe,"".concat(Ft,"-open"),_r),(0,ve.Z)(Xe,"".concat(Ft,"-customize-input"),Da),(0,ve.Z)(Xe,"".concat(Ft,"-show-search"),da),Xe)),yc=Pe.createElement(br,{ref:Mi,disabled:jn,prefixCls:Ft,visible:Ci,popupElement:Ks,animation:ha,transitionName:Bi,dropdownStyle:$i,dropdownClassName:ei,direction:Ot,dropdownMatchSelectWidth:Wr,dropdownRender:Yi,dropdownAlign:qr,placement:vr,builtinPlacements:zr,getPopupContainer:Li,empty:Sn,getTriggerDOMNode:function(){return di.current},onPopupVisibleChange:bo,onPopupMouseEnter:vo},Br?Pe.cloneElement(Br,{ref:gi}):Pe.createElement(mt,(0,Fe.Z)({},xe,{domRef:di,prefixCls:Ft,inputElement:Da,ref:Qi,id:St,showSearch:da,autoClearSearchValue:pi,mode:mr,activeDescendantId:Ur,tagRender:nn,values:hn,open:_r,onToggleOpen:Ai,activeValue:mi,searchValue:to,onSearch:Ja,onSearchSubmit:Ko,onRemove:As,tokenWithEnter:Ga}))),ql;return Br?ql=yc:ql=Pe.createElement("div",(0,Fe.Z)({className:Ds},Sa,{ref:la,onMouseDown:qs,onKeyDown:ds,onKeyUp:ul,onFocus:Ho,onBlur:Ts}),uo&&!_r&&Pe.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(hn.map(function($a){var Ca=$a.label,Zo=$a.value;return["number","string"].includes((0,me.Z)(Ca))?Ca:Zo}).join(", "))),yc,xs,vc&&Xc),Pe.createElement(Zt.Provider,{value:Wo},ql)}),sr=ai,vi=function(xe,Ae){var qe=Pe.useRef({values:new Map,options:new Map}),Xe=Pe.useMemo(function(){var Ft=qe.current,Wt=Ft.values,an=Ft.options,nn=xe.map(function(hn){if(hn.label===void 0){var zn;return(0,Le.Z)((0,Le.Z)({},hn),{},{label:(zn=Wt.get(hn.value))===null||zn===void 0?void 0:zn.label})}return hn}),Ot=new Map,un=new Map;return nn.forEach(function(hn){Ot.set(hn.value,hn),un.set(hn.value,Ae.get(hn.value)||an.get(hn.value))}),qe.current.values=Ot,qe.current.options=un,nn},[xe,Ae]),St=Pe.useCallback(function(Ft){return Ae.get(Ft)||qe.current.options.get(Ft)},[Ae]);return[Xe,St]};function ur(xe,Ae){return ma(xe).join("").toUpperCase().includes(Ae)}var Qr=function(xe,Ae,qe,Xe,St){return Pe.useMemo(function(){if(!qe||Xe===!1)return xe;var Ft=Ae.options,Wt=Ae.label,an=Ae.value,nn=[],Ot=typeof Xe=="function",un=qe.toUpperCase(),hn=Ot?Xe:function(Sn,qn){return St?ur(qn[St],un):qn[Ft]?ur(qn[Wt!=="children"?Wt:"label"],un):ur(qn[an],un)},zn=Ot?function(Sn){return Rr(Sn)}:function(Sn){return Sn};return xe.forEach(function(Sn){if(Sn[Ft]){var qn=hn(qe,zn(Sn));if(qn)nn.push(Sn);else{var fr=Sn[Ft].filter(function(er){return hn(qe,zn(er))});fr.length&&nn.push((0,Le.Z)((0,Le.Z)({},Sn),{},(0,ve.Z)({},Ft,fr)))}return}hn(qe,zn(Sn))&&nn.push(Sn)}),nn},[xe,Xe,St,qe,Ae])},kn=0,ia=Re();function zi(){var xe;return ia?(xe=kn,kn+=1):xe="TEST_OR_SSR",xe}function Ma(xe){var Ae=Pe.useState(),qe=(0,Me.Z)(Ae,2),Xe=qe[0],St=qe[1];return Pe.useEffect(function(){St("rc_select_".concat(zi()))},[]),xe||Xe}function Ji(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qe=[];return Pe.Children.forEach(xe,function(Xe){Xe==null&&!Ae.keepEmpty||(Array.isArray(Xe)?qe=qe.concat(Ji(Xe)):(0,Vt.isFragment)(Xe)&&Xe.props?qe=qe.concat(Ji(Xe.props.children,Ae)):qe.push(Xe))}),qe}var Zi=["children","value"],xa=["children"];function aa(xe){var Ae=xe,qe=Ae.key,Xe=Ae.props,St=Xe.children,Ft=Xe.value,Wt=(0,Se.Z)(Xe,Zi);return(0,Le.Z)({key:qe,value:Ft!==void 0?Ft:qe,children:St},Wt)}function Ni(xe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ji(xe).map(function(qe,Xe){if(!Pe.isValidElement(qe)||!qe.type)return null;var St=qe,Ft=St.type.isSelectOptGroup,Wt=St.key,an=St.props,nn=an.children,Ot=(0,Se.Z)(an,xa);return Ae||!Ft?aa(qe):(0,Le.Z)((0,Le.Z)({key:"__RC_SELECT_GRP__".concat(Wt===null?Xe:Wt,"__"),label:Wt},Ot),{},{options:Ni(nn)})}).filter(function(qe){return qe})}function fa(xe,Ae,qe,Xe,St){return Pe.useMemo(function(){var Ft=xe,Wt=!xe;Wt&&(Ft=Ni(Ae));var an=new Map,nn=new Map,Ot=function(zn,Sn,qn){qn&&typeof qn=="string"&&zn.set(Sn[qn],Sn)};function un(hn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Sn=0;Sn<hn.length;Sn+=1){var qn=hn[Sn];!qn[qe.options]||zn?(an.set(qn[qe.value],qn),Ot(nn,qn,qe.label),Ot(nn,qn,Xe),Ot(nn,qn,St)):un(qn[qe.options],!0)}}return un(Ft),{options:Ft,valueOptions:an,labelOptions:nn}},[xe,Ae,qe,Xe,St])}function Ta(xe){var Ae=Pe.useRef();Ae.current=xe;var qe=Pe.useCallback(function(){return Ae.current.apply(Ae,arguments)},[]);return qe}var ga=function(){return null};ga.isSelectOptGroup=!0;var Hi=ga,Ia=function(){return null};Ia.isSelectOption=!0;var Oa=Ia;function wa(xe,Ae){var qe=(0,Le.Z)({},xe);return Array.isArray(Ae)&&Ae.forEach(function(Xe){delete qe[Xe]}),qe}var _i=se(73299),Mt=Pe.createContext(null),wt=Mt;function tn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var vn=["disabled","title","children","style","className"];function Kn(xe){return typeof xe=="string"||typeof xe=="number"}var Ar=function(Ae,qe){var Xe=In(),St=Xe.prefixCls,Ft=Xe.id,Wt=Xe.open,an=Xe.multiple,nn=Xe.mode,Ot=Xe.searchValue,un=Xe.toggleOpen,hn=Xe.notFoundContent,zn=Xe.onPopupScroll,Sn=Pe.useContext(wt),qn=Sn.flattenOptions,fr=Sn.onActiveValue,er=Sn.defaultActiveFirstOption,mr=Sn.onSelect,jn=Sn.menuItemSelectedIcon,ar=Sn.rawValues,Mr=Sn.fieldNames,Nr=Sn.virtual,rr=Sn.direction,Dr=Sn.listHeight,$r=Sn.listItemHeight,mi="".concat(St,"-item"),ri=$t(function(){return qn},[Wt,qn],function(qr,vr){return vr[0]&&qr[1]!==vr[1]}),Ur=Pe.useRef(null),ui=function(vr){vr.preventDefault()},pi=function(vr){Ur.current&&Ur.current.scrollTo(typeof vr=="number"?{index:vr}:vr)},jr=function(vr){for(var zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Li=ri.length,yi=0;yi<Li;yi+=1){var ji=(vr+yi*zr+Li)%Li,ti=ri[ji],ta=ti.group,qi=ti.data;if(!ta&&!qi.disabled)return ji}return-1},Gr=Pe.useState(function(){return jr(0)}),wr=(0,Me.Z)(Gr,2),Fr=wr[0],Yr=wr[1],fi=function(vr){var zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Yr(vr);var Li={source:zr?"keyboard":"mouse"},yi=ri[vr];if(!yi){fr(null,-1,Li);return}fr(yi.value,vr,Li)};(0,Pe.useEffect)(function(){fi(er!==!1?jr(0):-1)},[ri.length,Ot]);var ua=Pe.useCallback(function(qr){return ar.has(qr)&&nn!=="combobox"},[nn,(0,it.Z)(ar).toString(),ar.size]);(0,Pe.useEffect)(function(){var qr=setTimeout(function(){if(!an&&Wt&&ar.size===1){var zr=Array.from(ar)[0],Li=ri.findIndex(function(yi){var ji=yi.data;return ji.value===zr});Li!==-1&&(fi(Li),pi(Li))}});if(Wt){var vr;(vr=Ur.current)===null||vr===void 0||vr.scrollTo(void 0)}return function(){return clearTimeout(qr)}},[Wt,Ot,qn.length]);var ha=function(vr){vr!==void 0&&mr(vr,{selected:!ar.has(vr)}),an||un(!1)};if(Pe.useImperativeHandle(qe,function(){return{onKeyDown:function(vr){var zr=vr.which,Li=vr.ctrlKey;switch(zr){case at.N:case at.P:case at.UP:case at.DOWN:{var yi=0;if(zr===at.UP?yi=-1:zr===at.DOWN?yi=1:tn()&&Li&&(zr===at.N?yi=1:zr===at.P&&(yi=-1)),yi!==0){var ji=jr(Fr+yi,yi);pi(ji),fi(ji,!0)}break}case at.ENTER:{var ti=ri[Fr];ti&&!ti.data.disabled?ha(ti.value):ha(void 0),Wt&&vr.preventDefault();break}case at.ESC:un(!1),Wt&&vr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(vr){pi(vr)}}}),ri.length===0)return Pe.createElement("div",{role:"listbox",id:"".concat(Ft,"_list"),className:"".concat(mi,"-empty"),onMouseDown:ui},hn);var Bi=Object.keys(Mr).map(function(qr){return Mr[qr]}),$i=function(vr){return vr.label};function ei(qr,vr){var zr=qr.group;return{role:zr?"presentation":"option",id:"".concat(Ft,"_list_").concat(vr)}}var Wr=function(vr){var zr=ri[vr];if(!zr)return null;var Li=zr.data||{},yi=Li.value,ji=zr.group,ti=Mn(Li,!0),ta=$i(zr);return zr?Pe.createElement("div",(0,Fe.Z)({"aria-label":typeof ta=="string"&&!ji?ta:null},ti,{key:vr},ei(zr,vr),{"aria-selected":ua(yi)}),yi):null},Yi={role:"listbox",id:"".concat(Ft,"_list")};return Pe.createElement(Pe.Fragment,null,Nr&&Pe.createElement("div",(0,Fe.Z)({},Yi,{style:{height:0,width:0,overflow:"hidden"}}),Wr(Fr-1),Wr(Fr),Wr(Fr+1)),Pe.createElement(_i.Z,{itemKey:"key",ref:Ur,data:ri,height:Dr,itemHeight:$r,fullHeight:!1,onMouseDown:ui,onScroll:zn,virtual:Nr,direction:rr,innerProps:Nr?null:Yi},function(qr,vr){var zr,Li=qr.group,yi=qr.groupOption,ji=qr.data,ti=qr.label,ta=qr.value,qi=ji.key;if(Li){var Ki,Ui=(Ki=ji.title)!==null&&Ki!==void 0?Ki:Kn(ti)?ti.toString():void 0;return Pe.createElement("div",{className:Ue()(mi,"".concat(mi,"-group")),title:Ui},ti!==void 0?ti:qi)}var sa=ji.disabled,Aa=ji.title,da=ji.children,Sa=ji.style,za=ji.className,ja=(0,Se.Z)(ji,vn),Qa=wa(ja,Bi),Ra=ua(ta),la="".concat(mi,"-option"),di=Ue()(mi,la,za,(zr={},(0,ve.Z)(zr,"".concat(la,"-grouped"),yi),(0,ve.Z)(zr,"".concat(la,"-active"),Fr===vr&&!sa),(0,ve.Z)(zr,"".concat(la,"-disabled"),sa),(0,ve.Z)(zr,"".concat(la,"-selected"),Ra),zr)),Mi=$i(qr),Qi=!jn||typeof jn=="function"||Ra,pa=typeof Mi=="number"?Mi:Mi||ta,Ka=Kn(pa)?pa.toString():void 0;return Aa!==void 0&&(Ka=Aa),Pe.createElement("div",(0,Fe.Z)({},Mn(Qa),Nr?{}:ei(qr,vr),{"aria-selected":Ra,className:di,title:Ka,onMouseMove:function(){Fr===vr||sa||fi(vr)},onClick:function(){sa||ha(ta)},style:Sa}),Pe.createElement("div",{className:"".concat(la,"-content")},pa),Pe.isValidElement(jn)||Ra,Qi&&Pe.createElement(Ge,{className:"".concat(mi,"-option-state"),customizeIcon:jn,customizeIconProps:{isSelected:Ra}},Ra?"\u2713":null))}))},Tr=Pe.forwardRef(Ar);Tr.displayName="OptionList";var Hr=Tr;function Xr(xe){var Ae=xe.mode,qe=xe.options,Xe=xe.children,St=xe.backfill,Ft=xe.allowClear,Wt=xe.placeholder,an=xe.getInputElement,nn=xe.showSearch,Ot=xe.onSearch,un=xe.defaultOpen,hn=xe.autoFocus,zn=xe.labelInValue,Sn=xe.value,qn=xe.inputValue,fr=xe.optionLabelProp,er=isMultiple(Ae),mr=nn!==void 0?nn:er||Ae==="combobox",jn=qe||convertChildrenToData(Xe);if(warning(Ae!=="tags"||jn.every(function(rr){return!rr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ae==="tags"||Ae==="combobox"){var ar=jn.some(function(rr){return rr.options?rr.options.some(function(Dr){return typeof("value"in Dr?Dr.value:Dr.key)=="number"}):typeof("value"in rr?rr.value:rr.key)=="number"});warning(!ar,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ae!=="combobox"||!fr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ae==="combobox"||!St,"`backfill` only works with `combobox` mode."),warning(Ae==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(Ae!=="combobox"||!an||!Ft||!Wt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ot&&!mr&&Ae!=="combobox"&&Ae!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!un||hn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Sn!=null){var Mr=toArray(Sn);warning(!zn||Mr.every(function(rr){return _typeof(rr)==="object"&&("key"in rr||"value"in rr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!er||Array.isArray(Sn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Xe){var Nr=null;toNodeArray(Xe).some(function(rr){if(!React.isValidElement(rr)||!rr.type)return!1;var Dr=rr,$r=Dr.type;if($r.isSelectOption)return!1;if($r.isSelectOptGroup){var mi=toNodeArray(rr.props.children).every(function(ri){return!React.isValidElement(ri)||!rr.type||ri.type.isSelectOption?!0:(Nr=ri.type,!1)});return!mi}return Nr=$r,!0}),Nr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Nr.displayName||Nr.name||Nr,"`.")),warning(qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Zr(xe,Ae){if(xe){var qe=function Xe(St){for(var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=0;Wt<St.length;Wt++){var an=St[Wt];if(an[Ae==null?void 0:Ae.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ft&&Array.isArray(an[Ae==null?void 0:Ae.options])&&Xe(an[Ae==null?void 0:Ae.options],!0))break}};qe(xe)}}var wi=null,ki=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Ri=["inputValue"];function oa(xe){return!xe||(0,me.Z)(xe)!=="object"}var Wi=Pe.forwardRef(function(xe,Ae){var qe=xe.id,Xe=xe.mode,St=xe.prefixCls,Ft=St===void 0?"rc-select":St,Wt=xe.backfill,an=xe.fieldNames,nn=xe.inputValue,Ot=xe.searchValue,un=xe.onSearch,hn=xe.autoClearSearchValue,zn=hn===void 0?!0:hn,Sn=xe.onSelect,qn=xe.onDeselect,fr=xe.dropdownMatchSelectWidth,er=fr===void 0?!0:fr,mr=xe.filterOption,jn=xe.filterSort,ar=xe.optionFilterProp,Mr=xe.optionLabelProp,Nr=xe.options,rr=xe.children,Dr=xe.defaultActiveFirstOption,$r=xe.menuItemSelectedIcon,mi=xe.virtual,ri=xe.direction,Ur=xe.listHeight,ui=Ur===void 0?200:Ur,pi=xe.listItemHeight,jr=pi===void 0?20:pi,Gr=xe.value,wr=xe.defaultValue,Fr=xe.labelInValue,Yr=xe.onChange,fi=(0,Se.Z)(xe,ki),ua=Ma(qe),ha=xi(Xe),Bi=!!(!Nr&&rr),$i=Pe.useMemo(function(){return mr===void 0&&Xe==="combobox"?!1:mr},[mr,Xe]),ei=Pe.useMemo(function(){return or(an,Bi)},[JSON.stringify(an),Bi]),Wr=vt("",{value:Ot!==void 0?Ot:nn,postState:function(Si){return Si||""}}),Yi=(0,Me.Z)(Wr,2),qr=Yi[0],vr=Yi[1],zr=fa(Nr,rr,ei,ar,Mr),Li=zr.valueOptions,yi=zr.labelOptions,ji=zr.options,ti=Pe.useCallback(function(_r){var Si=ma(_r);return Si.map(function(Ci){var Ai,Ga,Ja,Ko,jo;if(oa(Ci))Ai=Ci;else{var us;Ja=Ci.key,Ga=Ci.label,Ai=(us=Ci.value)!==null&&us!==void 0?us:Ja}var _a=Li.get(Ai);if(_a){var Bo;if(Ga===void 0&&(Ga=_a==null?void 0:_a[Mr||ei.label]),Ja===void 0&&(Ja=(Bo=_a==null?void 0:_a.key)!==null&&Bo!==void 0?Bo:Ai),Ko=_a==null?void 0:_a.disabled,jo=_a==null?void 0:_a.title,0)var ds}return{label:Ga,value:Ai,key:Ja,disabled:Ko,title:jo}})},[ei,Mr,Li]),ta=vt(wr,{value:Gr}),qi=(0,Me.Z)(ta,2),Ki=qi[0],Ui=qi[1],sa=Pe.useMemo(function(){var _r,Si=ti(Ki);return Xe==="combobox"&&At((_r=Si[0])===null||_r===void 0?void 0:_r.value)?[]:Si},[Ki,ti,Xe]),Aa=vi(sa,Li),da=(0,Me.Z)(Aa,2),Sa=da[0],za=da[1],ja=Pe.useMemo(function(){if(!Xe&&Sa.length===1){var _r=Sa[0];if(_r.value===null&&(_r.label===null||_r.label===void 0))return[]}return Sa.map(function(Si){var Ci;return(0,Le.Z)((0,Le.Z)({},Si),{},{label:(Ci=Si.label)!==null&&Ci!==void 0?Ci:Si.value})})},[Xe,Sa]),Qa=Pe.useMemo(function(){return new Set(Sa.map(function(_r){return _r.value}))},[Sa]);Pe.useEffect(function(){if(Xe==="combobox"){var _r,Si=(_r=Sa[0])===null||_r===void 0?void 0:_r.value;vr(Vi(Si)?String(Si):"")}},[Sa]);var Ra=Ta(function(_r,Si){var Ci,Ai=Si!=null?Si:_r;return Ci={},(0,ve.Z)(Ci,ei.value,_r),(0,ve.Z)(Ci,ei.label,Ai),Ci}),la=Pe.useMemo(function(){if(Xe!=="tags")return ji;var _r=(0,it.Z)(ji),Si=function(Ai){return Li.has(Ai)};return(0,it.Z)(Sa).sort(function(Ci,Ai){return Ci.value<Ai.value?-1:1}).forEach(function(Ci){var Ai=Ci.value;Si(Ai)||_r.push(Ra(Ai,Ci.label))}),_r},[Ra,ji,Li,Sa,Xe]),di=Qr(la,ei,qr,$i,ar),Mi=Pe.useMemo(function(){return Xe!=="tags"||!qr||di.some(function(_r){return _r[ar||"value"]===qr})||di.some(function(_r){return _r[ei.value]===qr})?di:[Ra(qr)].concat((0,it.Z)(di))},[Ra,ar,Xe,di,qr,ei]),Qi=Pe.useMemo(function(){return jn?(0,it.Z)(Mi).sort(function(_r,Si){return jn(_r,Si)}):Mi},[Mi,jn]),pa=Pe.useMemo(function(){return lr(Qi,{fieldNames:ei,childrenAsData:Bi})},[Qi,ei,Bi]),Ka=function(Si){var Ci=ti(Si);if(Ui(Ci),Yr&&(Ci.length!==Sa.length||Ci.some(function(Ja,Ko){var jo;return((jo=Sa[Ko])===null||jo===void 0?void 0:jo.value)!==(Ja==null?void 0:Ja.value)}))){var Ai=Fr?Ci:Ci.map(function(Ja){return Ja.value}),Ga=Ci.map(function(Ja){return Rr(za(Ja.value))});Yr(ha?Ai:Ai[0],ha?Ga:Ga[0])}},eo=Pe.useState(null),uo=(0,Me.Z)(eo,2),_o=uo[0],ko=uo[1],to=Pe.useState(0),Da=(0,Me.Z)(to,2),Br=Da[0],gi=Da[1],ya=Dr!==void 0?Dr:Xe!=="combobox",na=Pe.useCallback(function(_r,Si){var Ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ai=Ci.source,Ga=Ai===void 0?"keyboard":Ai;gi(Si),Wt&&Xe==="combobox"&&_r!==null&&Ga==="keyboard"&&ko(String(_r))},[Wt,Xe]),Va=function(Si,Ci,Ai){var Ga=function(){var ms,Ho=za(Si);return[Fr?{label:Ho==null?void 0:Ho[ei.label],value:Si,key:(ms=Ho==null?void 0:Ho.key)!==null&&ms!==void 0?ms:Si}:Si,Rr(Ho)]};if(Ci&&Sn){var Ja=Ga(),Ko=(0,Me.Z)(Ja,2),jo=Ko[0],us=Ko[1];Sn(jo,us)}else if(!Ci&&qn&&Ai!=="clear"){var _a=Ga(),Bo=(0,Me.Z)(_a,2),ds=Bo[0],ul=Bo[1];qn(ds,ul)}},Za=Ta(function(_r,Si){var Ci,Ai=ha?Si.selected:!0;Ai?Ci=ha?[].concat((0,it.Z)(Sa),[_r]):[_r]:Ci=Sa.filter(function(Ga){return Ga.value!==_r}),Ka(Ci),Va(_r,Ai),Xe==="combobox"?ko(""):(!xi||zn)&&(vr(""),ko(""))}),Do=function(Si,Ci){Ka(Si);var Ai=Ci.type,Ga=Ci.values;(Ai==="remove"||Ai==="clear")&&Ga.forEach(function(Ja){Va(Ja.value,!1,Ai)})},zo=function(Si,Ci){if(vr(Si),ko(null),Ci.source==="submit"){var Ai=(Si||"").trim();if(Ai){var Ga=Array.from(new Set([].concat((0,it.Z)(Qa),[Ai])));Ka(Ga),Va(Ai,!0),vr("")}return}Ci.source!=="blur"&&(Xe==="combobox"&&Ka(Si),un==null||un(Si))},as=function(Si){var Ci=Si;Xe!=="tags"&&(Ci=Si.map(function(Ga){var Ja=yi.get(Ga);return Ja==null?void 0:Ja.value}).filter(function(Ga){return Ga!==void 0}));var Ai=Array.from(new Set([].concat((0,it.Z)(Qa),(0,it.Z)(Ci))));Ka(Ai),Ai.forEach(function(Ga){Va(Ga,!0)})},ea=Pe.useMemo(function(){var _r=mi!==!1&&er!==!1;return(0,Le.Z)((0,Le.Z)({},zr),{},{flattenOptions:pa,onActiveValue:na,defaultActiveFirstOption:ya,onSelect:Za,menuItemSelectedIcon:$r,rawValues:Qa,fieldNames:ei,virtual:_r,direction:ri,listHeight:ui,listItemHeight:jr,childrenAsData:Bi})},[zr,pa,na,ya,Za,$r,Qa,ei,mi,er,ui,jr,Bi]);return Pe.createElement(wt.Provider,{value:ea},Pe.createElement(sr,(0,Fe.Z)({},fi,{id:ua,prefixCls:Ft,ref:Ae,omitDomProps:Ri,mode:Xe,displayValues:ja,onDisplayValuesChange:Do,direction:ri,searchValue:qr,onSearch:zo,autoClearSearchValue:zn,onSearchSplit:as,dropdownMatchSelectWidth:er,OptionList:Hr,emptyOptions:!pa.length,activeValue:_o,activeDescendantId:"".concat(ua,"_list_").concat(Br)})))}),Xi=Wi;Xi.Option=Oa,Xi.OptGroup=Hi;var Oe=Xi,He=Oe,Ke=se(10366),Ve=se(8745),ct=se(33603),yt=se(9708),kt=se(53124),sn=se(98866),dn=se(88258),Gn=se(98675),pr=se(65223),Hn=se(4173),Cn=se(87244),gn=se(13458),Pn=se(78642),Fn=se(46163),dr=function(xe,Ae){var qe={};for(var Xe in xe)Object.prototype.hasOwnProperty.call(xe,Xe)&&Ae.indexOf(Xe)<0&&(qe[Xe]=xe[Xe]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,Xe=Object.getOwnPropertySymbols(xe);St<Xe.length;St++)Ae.indexOf(Xe[St])<0&&Object.prototype.propertyIsEnumerable.call(xe,Xe[St])&&(qe[Xe[St]]=xe[Xe[St]]);return qe};const Xn="SECRET_COMBOBOX_MODE_DO_NOT_USE",Zn=(xe,Ae)=>{var qe,{prefixCls:Xe,bordered:St=!0,className:Ft,rootClassName:Wt,getPopupContainer:an,popupClassName:nn,dropdownClassName:Ot,listHeight:un=256,placement:hn,listItemHeight:zn=24,size:Sn,disabled:qn,notFoundContent:fr,status:er,builtinPlacements:mr,dropdownMatchSelectWidth:jn,popupMatchSelectWidth:ar,direction:Mr,style:Nr,allowClear:rr}=xe,Dr=dr(xe,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:$r,getPrefixCls:mi,renderEmpty:ri,direction:Ur,virtual:ui,popupMatchSelectWidth:pi,popupOverflow:jr,select:Gr}=Pe.useContext(kt.E_),wr=mi("select",Xe),Fr=mi(),Yr=Mr!=null?Mr:Ur,{compactSize:fi,compactItemClassnames:ua}=(0,Hn.ri)(wr,Yr),[ha,Bi]=(0,Cn.Z)(wr),$i=Pe.useMemo(()=>{const{mode:la}=Dr;if(la!=="combobox")return la===Xn?"combobox":la},[Dr.mode]),ei=$i==="multiple"||$i==="tags",Wr=(0,Pn.Z)(Dr.suffixIcon,Dr.showArrow),Yi=(qe=ar!=null?ar:jn)!==null&&qe!==void 0?qe:pi,{status:qr,hasFeedback:vr,isFormItemInput:zr,feedbackIcon:Li}=Pe.useContext(pr.aM),yi=(0,yt.F)(qr,er);let ji;fr!==void 0?ji=fr:$i==="combobox"?ji=null:ji=(ri==null?void 0:ri("Select"))||Pe.createElement(dn.Z,{componentName:"Select"});const{suffixIcon:ti,itemIcon:ta,removeIcon:qi,clearIcon:Ki}=(0,Fn.Z)(Object.assign(Object.assign({},Dr),{multiple:ei,hasFeedback:vr,feedbackIcon:Li,showSuffixIcon:Wr,prefixCls:wr,showArrow:Dr.showArrow,componentName:"Select"})),Ui=rr===!0?{clearIcon:Ki}:rr,sa=(0,Ke.Z)(Dr,["suffixIcon","itemIcon"]),Aa=Ue()(nn||Ot,{[`${wr}-dropdown-${Yr}`]:Yr==="rtl"},Wt,Bi),da=(0,Gn.Z)(la=>{var di;return(di=Sn!=null?Sn:fi)!==null&&di!==void 0?di:la}),Sa=Pe.useContext(sn.Z),za=qn!=null?qn:Sa,ja=Ue()({[`${wr}-lg`]:da==="large",[`${wr}-sm`]:da==="small",[`${wr}-rtl`]:Yr==="rtl",[`${wr}-borderless`]:!St,[`${wr}-in-form-item`]:zr},(0,yt.Z)(wr,yi,vr),ua,Gr==null?void 0:Gr.className,Ft,Wt,Bi),Qa=Pe.useMemo(()=>hn!==void 0?hn:Yr==="rtl"?"bottomRight":"bottomLeft",[hn,Yr]),Ra=(0,gn.Z)(mr,jr);return ha(Pe.createElement(He,Object.assign({ref:Ae,virtual:ui,showSearch:Gr==null?void 0:Gr.showSearch},sa,{style:Object.assign(Object.assign({},Gr==null?void 0:Gr.style),Nr),dropdownMatchSelectWidth:Yi,builtinPlacements:Ra,transitionName:(0,ct.m)(Fr,"slide-up",Dr.transitionName),listHeight:un,listItemHeight:zn,mode:$i,prefixCls:wr,placement:Qa,direction:Yr,suffixIcon:ti,menuItemSelectedIcon:ta,removeIcon:qi,allowClear:Ui,notFoundContent:ji,className:ja,getPopupContainer:an||$r,dropdownClassName:Aa,disabled:za})))},Qn=Pe.forwardRef(Zn),Ze=(0,Ve.Z)(Qn);Qn.SECRET_COMBOBOX_MODE_DO_NOT_USE=Xn,Qn.Option=Oa,Qn.OptGroup=Hi,Qn._InternalPanelDoNotUseOrYouWillBeFired=Ze;var ze=Qn},87244:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ee}});var ce=se(14747),Ue=se(80110),Fe=se(45503),it=se(67968),ve=se(67771),Le=se(33297);const Me=we=>{const{optionHeight:je,optionFontSize:Ye,optionLineHeight:Lt,optionPadding:Ct}=we;return{position:"relative",display:"block",minHeight:je,padding:Ct,color:we.colorText,fontWeight:"normal",fontSize:Ye,lineHeight:Lt,boxSizing:"border-box"}};var me=we=>{const{antCls:je,componentCls:Ye}=we,Lt=`${Ye}-item`,Ct=`&${je}-slide-up-enter${je}-slide-up-enter-active`,Bt=`&${je}-slide-up-appear${je}-slide-up-appear-active`,at=`&${je}-slide-up-leave${je}-slide-up-leave-active`,Vt=`${Ye}-dropdown-placement-`;return[{[`${Ye}-dropdown`]:Object.assign(Object.assign({},(0,ce.Wf)(we)),{position:"absolute",top:-9999,zIndex:we.zIndexPopup,boxSizing:"border-box",padding:we.paddingXXS,overflow:"hidden",fontSize:we.fontSize,fontVariant:"initial",backgroundColor:we.colorBgElevated,borderRadius:we.borderRadiusLG,outline:"none",boxShadow:we.boxShadowSecondary,[`
${Ct}${Vt}bottomLeft,
${Bt}${Vt}bottomLeft
`]:{animationName:ve.fJ},[`
${Ct}${Vt}topLeft,
${Bt}${Vt}topLeft,
${Ct}${Vt}topRight,
${Bt}${Vt}topRight
`]:{animationName:ve.Qt},[`${at}${Vt}bottomLeft`]:{animationName:ve.Uw},[`
${at}${Vt}topLeft,
${at}${Vt}topRight
`]:{animationName:ve.ly},"&-hidden":{display:"none"},[`${Lt}`]:Object.assign(Object.assign({},Me(we)),{cursor:"pointer",transition:`background ${we.motionDurationSlow} ease`,borderRadius:we.borderRadiusSM,"&-group":{color:we.colorTextDescription,fontSize:we.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ce.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Lt}-option-disabled)`]:{backgroundColor:we.optionActiveBg},[`&-selected:not(${Lt}-option-disabled)`]:{color:we.optionSelectedColor,fontWeight:we.optionSelectedFontWeight,backgroundColor:we.optionSelectedBg,[`${Lt}-option-state`]:{color:we.colorPrimary}},"&-disabled":{[`&${Lt}-option-selected`]:{backgroundColor:we.colorBgContainerDisabled},color:we.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:we.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ve.oN)(we,"slide-up"),(0,ve.oN)(we,"slide-down"),(0,Le.Fm)(we,"move-up"),(0,Le.Fm)(we,"move-down")]};const Pe=2,st=we=>{let{controlHeightSM:je,controlHeight:Ye,lineWidth:Lt}=we;const Ct=(Ye-je)/2-Lt,Bt=Math.ceil(Ct/2);return[Ct,Bt]};function Re(we,je){const{componentCls:Ye,iconCls:Lt}=we,Ct=`${Ye}-selection-overflow`,Bt=we.multipleSelectItemHeight,[at]=st(we),Vt=je?`${Ye}-${je}`:"";return{[`${Ye}-multiple${Vt}`]:{fontSize:we.fontSize,[Ct]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ye}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${at-Pe}px ${Pe*2}px`,borderRadius:we.borderRadius,[`${Ye}-show-search&`]:{cursor:"text"},[`${Ye}-disabled&`]:{background:we.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Pe}px 0`,lineHeight:`${Bt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${Ye}-show-arrow ${Ye}-selector,
&${Ye}-allow-clear ${Ye}-selector
`]:{paddingInlineEnd:we.fontSizeIcon+we.controlPaddingHorizontal},[`${Ye}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Bt,marginTop:Pe,marginBottom:Pe,lineHeight:`${Bt-we.lineWidth*2}px`,background:we.multipleItemBg,border:`${we.lineWidth}px ${we.lineType} ${we.multipleItemBorderColor}`,borderRadius:we.borderRadiusSM,cursor:"default",transition:`font-size ${we.motionDurationSlow}, line-height ${we.motionDurationSlow}, height ${we.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Pe*2,paddingInlineStart:we.paddingXS,paddingInlineEnd:we.paddingXS/2,[`${Ye}-disabled&`]:{color:we.multipleItemColorDisabled,borderColor:we.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:we.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ce.Ro)()),{display:"inline-flex",alignItems:"center",color:we.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Lt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:we.colorIconHover}})},[`${Ct}-item + ${Ct}-item`]:{[`${Ye}-selection-search`]:{marginInlineStart:0}},[`${Ye}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:we.inputPaddingHorizontalBase-at,"\n &-input,\n &-mirror\n ":{height:Bt,fontFamily:we.fontFamily,lineHeight:`${Bt}px`,transition:`all ${we.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ye}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:we.inputPaddingHorizontalBase,insetInlineEnd:we.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${we.motionDurationSlow}`}}}}var ht=we=>{const{componentCls:je}=we,Ye=(0,Fe.TS)(we,{controlHeight:we.controlHeightSM,multipleSelectItemHeight:we.controlHeightXS,borderRadius:we.borderRadiusSM,borderRadiusSM:we.borderRadiusXS}),Lt=(0,Fe.TS)(we,{fontSize:we.fontSizeLG,controlHeight:we.controlHeightLG,multipleSelectItemHeight:we.multipleItemHeightLG,borderRadius:we.borderRadiusLG,borderRadiusSM:we.borderRadius}),[,Ct]=st(we);return[Re(we),Re(Ye,"sm"),{[`${je}-multiple${je}-sm`]:{[`${je}-selection-placeholder`]:{insetInline:we.controlPaddingHorizontalSM-we.lineWidth},[`${je}-selection-search`]:{marginInlineStart:Ct}}},Re(Lt,"lg")]};function lt(we,je){const{componentCls:Ye,inputPaddingHorizontalBase:Lt,borderRadius:Ct}=we,Bt=we.controlHeight-we.lineWidth*2,at=Math.ceil(we.fontSize*1.25),Vt=je?`${Ye}-${je}`:"";return{[`${Ye}-single${Vt}`]:{fontSize:we.fontSize,[`${Ye}-selector`]:Object.assign(Object.assign({},(0,ce.Wf)(we)),{display:"flex",borderRadius:Ct,[`${Ye}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Lt,insetInlineEnd:Lt,bottom:0,"&-input":{width:"100%"}},[`
${Ye}-selection-item,
${Ye}-selection-placeholder
`]:{padding:0,lineHeight:`${Bt}px`,transition:`all ${we.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Bt}px`}},[`${Ye}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ye}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ye}-selection-item:after`,`${Ye}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${Ye}-show-arrow ${Ye}-selection-item,
&${Ye}-show-arrow ${Ye}-selection-placeholder
`]:{paddingInlineEnd:at},[`&${Ye}-open ${Ye}-selection-item`]:{color:we.colorTextPlaceholder},[`&:not(${Ye}-customize-input)`]:{[`${Ye}-selector`]:{width:"100%",height:we.controlHeight,padding:`0 ${Lt}px`,[`${Ye}-selection-search-input`]:{height:Bt},"&:after":{lineHeight:`${Bt}px`}}},[`&${Ye}-customize-input`]:{[`${Ye}-selector`]:{"&:after":{display:"none"},[`${Ye}-selection-search`]:{position:"static",width:"100%"},[`${Ye}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Lt}px`,"&:after":{display:"none"}}}}}}}function et(we){const{componentCls:je}=we,Ye=we.controlPaddingHorizontalSM-we.lineWidth;return[lt(we),lt((0,Fe.TS)(we,{controlHeight:we.controlHeightSM,borderRadius:we.borderRadiusSM}),"sm"),{[`${je}-single${je}-sm`]:{[`&:not(${je}-customize-input)`]:{[`${je}-selection-search`]:{insetInlineStart:Ye,insetInlineEnd:Ye},[`${je}-selector`]:{padding:`0 ${Ye}px`},[`&${je}-show-arrow ${je}-selection-search`]:{insetInlineEnd:Ye+we.fontSize*1.5},[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:we.fontSize*1.5}}}},lt((0,Fe.TS)(we,{controlHeight:we.singleItemHeightLG,fontSize:we.fontSizeLG,borderRadius:we.borderRadiusLG}),"lg")]}const ke=we=>{const{componentCls:je,selectorBg:Ye}=we;return{position:"relative",backgroundColor:Ye,border:`${we.lineWidth}px ${we.lineType} ${we.colorBorder}`,transition:`all ${we.motionDurationMid} ${we.motionEaseInOut}`,input:{cursor:"pointer"},[`${je}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${je}-disabled&`]:{color:we.colorTextDisabled,background:we.colorBgContainerDisabled,cursor:"not-allowed",[`${je}-multiple&`]:{background:we.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},vt=function(we,je){let Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Lt,borderHoverColor:Ct,outlineColor:Bt,antCls:at}=je,Vt=Ye?{[`${Lt}-selector`]:{borderColor:Ct}}:{};return{[we]:{[`&:not(${Lt}-disabled):not(${Lt}-customize-input):not(${at}-pagination-size-changer)`]:Object.assign(Object.assign({},Vt),{[`${Lt}-focused& ${Lt}-selector`]:{borderColor:Ct,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${Bt}`,outline:0},[`&:hover ${Lt}-selector`]:{borderColor:Ct}})}}},jt=we=>{const{componentCls:je}=we;return{[`${je}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},tt=we=>{const{componentCls:je,inputPaddingHorizontalBase:Ye,iconCls:Lt}=we;return{[je]:Object.assign(Object.assign({},(0,ce.Wf)(we)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${je}-customize-input) ${je}-selector`]:Object.assign(Object.assign({},ke(we)),jt(we)),[`${je}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ce.vS),[`${je}-selection-placeholder`]:Object.assign(Object.assign({},ce.vS),{flex:1,color:we.colorTextPlaceholder,pointerEvents:"none"}),[`${je}-arrow`]:Object.assign(Object.assign({},(0,ce.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ye,height:we.fontSizeIcon,marginTop:-we.fontSizeIcon/2,color:we.colorTextQuaternary,fontSize:we.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Lt]:{verticalAlign:"top",transition:`transform ${we.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${je}-suffix)`]:{pointerEvents:"auto"}},[`${je}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${je}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ye,zIndex:1,display:"inline-block",width:we.fontSizeIcon,height:we.fontSizeIcon,marginTop:-we.fontSizeIcon/2,color:we.colorTextQuaternary,fontSize:we.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:we.clearBg,cursor:"pointer",opacity:0,transition:`color ${we.motionDurationMid} ease, opacity ${we.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:we.colorTextTertiary}},"&:hover":{[`${je}-clear`]:{opacity:1}}}),[`${je}-has-feedback`]:{[`${je}-clear`]:{insetInlineEnd:Ye+we.fontSize+we.paddingXS}}}},ut=we=>{const{componentCls:je}=we;return[{[je]:{[`&-borderless ${je}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${je}-in-form-item`]:{width:"100%"}}},tt(we),et(we),ht(we),me(we),{[`${je}-rtl`]:{direction:"rtl"}},vt(je,(0,Fe.TS)(we,{borderHoverColor:we.colorPrimaryHover,outlineColor:we.controlOutline})),vt(`${je}-status-error`,(0,Fe.TS)(we,{borderHoverColor:we.colorErrorHover,outlineColor:we.colorErrorOutline}),!0),vt(`${je}-status-warning`,(0,Fe.TS)(we,{borderHoverColor:we.colorWarningHover,outlineColor:we.colorWarningOutline}),!0),(0,Ue.c)(we,{borderElCls:`${je}-selector`,focusElCls:`${je}-focused`})]};var Ee=(0,it.Z)("Select",(we,je)=>{let{rootPrefixCls:Ye}=je;const Lt=(0,Fe.TS)(we,{rootPrefixCls:Ye,inputPaddingHorizontalBase:we.paddingSM-1,multipleSelectItemHeight:we.multipleItemHeight});return[ut(Lt)]},we=>{const{fontSize:je,lineHeight:Ye,controlHeight:Lt,controlPaddingHorizontal:Ct,zIndexPopupBase:Bt,colorText:at,fontWeightStrong:Vt,controlItemBgActive:$t,controlItemBgHover:xn,colorBgContainer:dt,colorFillSecondary:on,controlHeightLG:En,controlHeightSM:yn,colorBgContainerDisabled:Ge,colorTextDisabled:De}=we;return{zIndexPopup:Bt+50,optionSelectedColor:at,optionSelectedFontWeight:Vt,optionSelectedBg:$t,optionActiveBg:xn,optionPadding:`${(Lt-je*Ye)/2}px ${Ct}px`,optionFontSize:je,optionLineHeight:Ye,optionHeight:Lt,selectorBg:dt,clearBg:dt,singleItemHeightLG:En,multipleItemBg:on,multipleItemBorderColor:"transparent",multipleItemHeight:yn,multipleItemHeightLG:Lt,multipleSelectorBgDisabled:Ge,multipleItemColorDisabled:De,multipleItemBorderColorDisabled:"transparent"}})},13458:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ue}});const ce=Fe=>{const ve={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Fe==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ve),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ve),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ve),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ve),{points:["br","tr"],offset:[0,-4]})}};function Ue(Fe,it){return Fe||ce(it)}},78642:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return ce}});function ce(Ue,Fe){return Fe!==void 0?Fe:Ue!==null}},46163:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Se}});var ce=se(18299),Ue=se(16646),Fe=se(73475),it=se(42922),ve=se(3407),Le=se(72395),Me=se(67294);function Se(me){let{suffixIcon:Pe,clearIcon:st,menuItemSelectedIcon:Re,removeIcon:Et,loading:ht,multiple:lt,hasFeedback:et,prefixCls:ke,showSuffixIcon:vt,feedbackIcon:jt,showArrow:tt,componentName:ut}=me;const Ee=st!=null?st:Me.createElement(Ue.Z,null),we=Ct=>Pe===null&&!et&&!tt?null:Me.createElement(Me.Fragment,null,vt!==!1&&Ct,et&&jt);let je=null;if(Pe!==void 0)je=we(Pe);else if(ht)je=we(Me.createElement(ve.Z,{spin:!0}));else{const Ct=`${ke}-suffix`;je=Bt=>{let{open:at,showSearch:Vt}=Bt;return we(at&&Vt?Me.createElement(Le.Z,{className:Ct}):Me.createElement(it.Z,{className:Ct}))}}let Ye=null;Re!==void 0?Ye=Re:lt?Ye=Me.createElement(ce.Z,null):Ye=null;let Lt=null;return Et!==void 0?Lt=Et:Lt=Me.createElement(Fe.Z,null),{clearIcon:Ee,suffixIcon:je,itemIcon:Ye,removeIcon:Lt}}},33507:function(Ln,en){"use strict";const se=ce=>({[ce.componentCls]:{[`${ce.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${ce.motionDurationMid} ${ce.motionEaseInOut},
opacity ${ce.motionDurationMid} ${ce.motionEaseInOut} !important`}},[`${ce.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${ce.motionDurationMid} ${ce.motionEaseInOut},
opacity ${ce.motionDurationMid} ${ce.motionEaseInOut} !important`}}});en.Z=se},33297:function(Ln,en,se){"use strict";se.d(en,{Fm:function(){return Re}});var ce=se(34367),Ue=se(93590);const Fe=new ce.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),it=new ce.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ve=new ce.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Le=new ce.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Me=new ce.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Se=new ce.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new ce.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Pe=new ce.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),st={"move-up":{inKeyframes:me,outKeyframes:Pe},"move-down":{inKeyframes:Fe,outKeyframes:it},"move-left":{inKeyframes:ve,outKeyframes:Le},"move-right":{inKeyframes:Me,outKeyframes:Se}},Re=(Et,ht)=>{const{antCls:lt}=Et,et=`${lt}-${ht}`,{inKeyframes:ke,outKeyframes:vt}=st[ht];return[(0,Ue.R)(et,ke,vt,Et.motionDurationMid),{[`
${et}-enter,
${et}-appear
`]:{opacity:0,animationTimingFunction:Et.motionEaseOutCirc},[`${et}-leave`]:{animationTimingFunction:Et.motionEaseInOutCirc}}]}},67771:function(Ln,en,se){"use strict";se.d(en,{Qt:function(){return ve},Uw:function(){return it},fJ:function(){return Fe},ly:function(){return Le},oN:function(){return Re}});var ce=se(34367),Ue=se(93590);const Fe=new ce.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),it=new ce.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ve=new ce.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Le=new ce.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Me=new ce.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Se=new ce.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),me=new ce.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Pe=new ce.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),st={"slide-up":{inKeyframes:Fe,outKeyframes:it},"slide-down":{inKeyframes:ve,outKeyframes:Le},"slide-left":{inKeyframes:Me,outKeyframes:Se},"slide-right":{inKeyframes:me,outKeyframes:Pe}},Re=(Et,ht)=>{const{antCls:lt}=Et,et=`${lt}-${ht}`,{inKeyframes:ke,outKeyframes:vt}=st[ht];return[(0,Ue.R)(et,ke,vt,Et.motionDurationMid),{[`
${et}-enter,
${et}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Et.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${et}-leave`]:{animationTimingFunction:Et.motionEaseInQuint}}]}},47897:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return pe}});var ce=se(3407),Ue=se(94184),Fe=se.n(Ue);function it(){return it=Object.assign?Object.assign.bind():function(he){for(var oe=1;oe<arguments.length;oe++){var Ie=arguments[oe];for(var Je in Ie)Object.prototype.hasOwnProperty.call(Ie,Je)&&(he[Je]=Ie[Je])}return he},it.apply(this,arguments)}function ve(he){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},ve(he)}function Le(he,oe){if(ve(he)!=="object"||he===null)return he;var Ie=he[Symbol.toPrimitive];if(Ie!==void 0){var Je=Ie.call(he,oe||"default");if(ve(Je)!=="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(he)}function Me(he){var oe=Le(he,"string");return ve(oe)==="symbol"?oe:String(oe)}function Se(he,oe,Ie){return oe=Me(oe),oe in he?Object.defineProperty(he,oe,{value:Ie,enumerable:!0,configurable:!0,writable:!0}):he[oe]=Ie,he}function me(he){if(Array.isArray(he))return he}function Pe(he,oe){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var Je,_t,Kt,Ht,Qt=[],Gt=!0,nr=!1;try{if(Kt=(Ie=Ie.call(he)).next,oe===0){if(Object(Ie)!==Ie)return;Gt=!1}else for(;!(Gt=(Je=Kt.call(Ie)).done)&&(Qt.push(Je.value),Qt.length!==oe);Gt=!0);}catch(gr){nr=!0,_t=gr}finally{try{if(!Gt&&Ie.return!=null&&(Ht=Ie.return(),Object(Ht)!==Ht))return}finally{if(nr)throw _t}}return Qt}}function st(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ie=0,Je=new Array(oe);Ie<oe;Ie++)Je[Ie]=he[Ie];return Je}function Re(he,oe){if(he){if(typeof he=="string")return st(he,oe);var Ie=Object.prototype.toString.call(he).slice(8,-1);if(Ie==="Object"&&he.constructor&&(Ie=he.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(he);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return st(he,oe)}}function Et(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(he,oe){return me(he)||Pe(he,oe)||Re(he,oe)||Et()}function lt(he,oe){if(he==null)return{};var Ie={},Je=Object.keys(he),_t,Kt;for(Kt=0;Kt<Je.length;Kt++)_t=Je[Kt],!(oe.indexOf(_t)>=0)&&(Ie[_t]=he[_t]);return Ie}function et(he,oe){if(he==null)return{};var Ie=lt(he,oe),Je,_t;if(Object.getOwnPropertySymbols){var Kt=Object.getOwnPropertySymbols(he);for(_t=0;_t<Kt.length;_t++)Je=Kt[_t],!(oe.indexOf(Je)>=0)&&Object.prototype.propertyIsEnumerable.call(he,Je)&&(Ie[Je]=he[Je])}return Ie}var ke=se(67294);function vt(he){if(Array.isArray(he))return he}function jt(he,oe){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var Je,_t,Kt,Ht,Qt=[],Gt=!0,nr=!1;try{if(Kt=(Ie=Ie.call(he)).next,oe===0){if(Object(Ie)!==Ie)return;Gt=!1}else for(;!(Gt=(Je=Kt.call(Ie)).done)&&(Qt.push(Je.value),Qt.length!==oe);Gt=!0);}catch(gr){nr=!0,_t=gr}finally{try{if(!Gt&&Ie.return!=null&&(Ht=Ie.return(),Object(Ht)!==Ht))return}finally{if(nr)throw _t}}return Qt}}function tt(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Ie=0,Je=new Array(oe);Ie<oe;Ie++)Je[Ie]=he[Ie];return Je}function ut(he,oe){if(he){if(typeof he=="string")return tt(he,oe);var Ie=Object.prototype.toString.call(he).slice(8,-1);if(Ie==="Object"&&he.constructor&&(Ie=he.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(he);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return tt(he,oe)}}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(he,oe){return vt(he)||jt(he,oe)||ut(he,oe)||Ee()}function je(he){var oe=ke.useRef();oe.current=he;var Ie=ke.useCallback(function(){for(var Je,_t=arguments.length,Kt=new Array(_t),Ht=0;Ht<_t;Ht++)Kt[Ht]=arguments[Ht];return(Je=oe.current)===null||Je===void 0?void 0:Je.call.apply(Je,[oe].concat(Kt))},[]);return Ie}function Ye(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Lt=Ye()?ke.useLayoutEffect:ke.useEffect,Ct=function(oe,Ie){var Je=ke.useRef(!0);Lt(function(){return oe(Je.current)},Ie),Lt(function(){return Je.current=!1,function(){Je.current=!0}},[])},Bt=function(oe,Ie){Ct(function(Je){if(!Je)return oe()},Ie)},at=null;function Vt(he){var oe=ke.useRef(!1),Ie=ke.useState(he),Je=we(Ie,2),_t=Je[0],Kt=Je[1];ke.useEffect(function(){return oe.current=!1,function(){oe.current=!0}},[]);function Ht(Qt,Gt){Gt&&oe.current||Kt(Qt)}return[_t,Ht]}function $t(he){return he!==void 0}function xn(he,oe){var Ie=oe||{},Je=Ie.defaultValue,_t=Ie.value,Kt=Ie.onChange,Ht=Ie.postState,Qt=Vt(function(){return $t(_t)?_t:$t(Je)?typeof Je=="function"?Je():Je:typeof he=="function"?he():he}),Gt=we(Qt,2),nr=Gt[0],gr=Gt[1],Ut=_t!==void 0?_t:nr,pn=Ht?Ht(Ut):Ut,ir=je(Kt),Lr=Vt([Ut]),$n=we(Lr,2),Cr=$n[0],Ii=$n[1];Bt(function(){var ci=Cr[0];nr!==ci&&ir(nr,ci)},[Cr]),Bt(function(){$t(_t)||gr(_t)},[_t]);var li=je(function(ci,Jr){gr(ci,Jr),Ii([Ut],Jr)});return[pn,li]}var dt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(oe){var Ie=oe.keyCode;if(oe.altKey&&!oe.ctrlKey||oe.metaKey||Ie>=dt.F1&&Ie<=dt.F12)return!1;switch(Ie){case dt.ALT:case dt.CAPS_LOCK:case dt.CONTEXT_MENU:case dt.CTRL:case dt.DOWN:case dt.END:case dt.ESC:case dt.HOME:case dt.INSERT:case dt.LEFT:case dt.MAC_FF_META:case dt.META:case dt.NUMLOCK:case dt.NUM_CENTER:case dt.PAGE_DOWN:case dt.PAGE_UP:case dt.PAUSE:case dt.PRINT_SCREEN:case dt.RIGHT:case dt.SHIFT:case dt.UP:case dt.WIN_KEY:case dt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(oe){if(oe>=dt.ZERO&&oe<=dt.NINE||oe>=dt.NUM_ZERO&&oe<=dt.NUM_MULTIPLY||oe>=dt.A&&oe<=dt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&oe===0)return!0;switch(oe){case dt.SPACE:case dt.QUESTION_MARK:case dt.NUM_PLUS:case dt.NUM_MINUS:case dt.NUM_PERIOD:case dt.NUM_DIVISION:case dt.SEMICOLON:case dt.DASH:case dt.EQUALS:case dt.COMMA:case dt.PERIOD:case dt.SLASH:case dt.APOSTROPHE:case dt.SINGLE_QUOTE:case dt.OPEN_SQUARE_BRACKET:case dt.BACKSLASH:case dt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},on=dt,En=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yn=ke.forwardRef(function(he,oe){var Ie,Je=he.prefixCls,_t=Je===void 0?"rc-switch":Je,Kt=he.className,Ht=he.checked,Qt=he.defaultChecked,Gt=he.disabled,nr=he.loadingIcon,gr=he.checkedChildren,Ut=he.unCheckedChildren,pn=he.onClick,ir=he.onChange,Lr=he.onKeyDown,$n=et(he,En),Cr=xn(!1,{value:Ht,defaultValue:Qt}),Ii=ht(Cr,2),li=Ii[0],ci=Ii[1];function Jr(xr,Pr){var Gi=li;return Gt||(Gi=xr,ci(Gi),ir==null||ir(Gi,Pr)),Gi}function Di(xr){xr.which===on.LEFT?Jr(!1,xr):xr.which===on.RIGHT&&Jr(!0,xr),Lr==null||Lr(xr)}function Ei(xr){var Pr=Jr(!li,xr);pn==null||pn(Pr,xr)}var Pi=Fe()(_t,Kt,(Ie={},Se(Ie,"".concat(_t,"-checked"),li),Se(Ie,"".concat(_t,"-disabled"),Gt),Ie));return ke.createElement("button",it({},$n,{type:"button",role:"switch","aria-checked":li,disabled:Gt,className:Pi,ref:oe,onKeyDown:Di,onClick:Ei}),nr,ke.createElement("span",{className:"".concat(_t,"-inner")},ke.createElement("span",{className:"".concat(_t,"-inner-checked")},gr),ke.createElement("span",{className:"".concat(_t,"-inner-unchecked")},Ut)))});yn.displayName="Switch";var Ge=yn,De=se(45353),Zt=se(53124),In=se(98866),fn=se(98675),ot=se(84780),ft=se(14747),Jt=se(67968),Bn=se(45503);const wn=he=>{const{componentCls:oe,trackHeightSM:Ie,trackPadding:Je,trackMinWidthSM:_t,innerMinMarginSM:Kt,innerMaxMarginSM:Ht,handleSizeSM:Qt}=he,Gt=`${oe}-inner`;return{[oe]:{[`&${oe}-small`]:{minWidth:_t,height:Ie,lineHeight:`${Ie}px`,[`${oe}-inner`]:{paddingInlineStart:Ht,paddingInlineEnd:Kt,[`${Gt}-checked`]:{marginInlineStart:`calc(-100% + ${Qt+Je*2}px - ${Ht*2}px)`,marginInlineEnd:`calc(100% - ${Qt+Je*2}px + ${Ht*2}px)`},[`${Gt}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`${oe}-handle`]:{width:Qt,height:Qt},[`${oe}-loading-icon`]:{top:(Qt-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${oe}-checked`]:{[`${oe}-inner`]:{paddingInlineStart:Kt,paddingInlineEnd:Ht,[`${Gt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Gt}-unchecked`]:{marginInlineStart:`calc(100% - ${Qt+Je*2}px + ${Ht*2}px)`,marginInlineEnd:`calc(-100% + ${Qt+Je*2}px - ${Ht*2}px)`}},[`${oe}-handle`]:{insetInlineStart:`calc(100% - ${Qt+Je}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Gt}`]:{[`${Gt}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${oe}-checked ${Gt}`]:{[`${Gt}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},Nt=he=>{const{componentCls:oe,handleSize:Ie}=he;return{[oe]:{[`${oe}-loading-icon${he.iconCls}`]:{position:"relative",top:(Ie-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${oe}-checked ${oe}-loading-icon`]:{color:he.switchColor}}}},Xt=he=>{const{componentCls:oe,motion:Ie,trackPadding:Je,handleBg:_t,handleShadow:Kt,handleSize:Ht}=he,Qt=`${oe}-handle`;return{[oe]:{[Qt]:{position:"absolute",top:Je,insetInlineStart:Je,width:Ht,height:Ht,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:_t,borderRadius:Ht/2,boxShadow:Kt,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${oe}-checked ${Qt}`]:{insetInlineStart:`calc(100% - ${Ht+Je}px)`},[`&:not(${oe}-disabled):active`]:Ie?{[`${Qt}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${oe}-checked ${Qt}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},Dn=he=>{const{componentCls:oe,trackHeight:Ie,trackPadding:Je,innerMinMargin:_t,innerMaxMargin:Kt,handleSize:Ht}=he,Qt=`${oe}-inner`;return{[oe]:{[Qt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Kt,paddingInlineEnd:_t,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${Qt}-checked, ${Qt}-unchecked`]:{display:"block",color:he.colorTextLightSolid,fontSize:he.fontSizeSM,transition:`margin-inline-start ${he.switchDuration} ease-in-out, margin-inline-end ${he.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Qt}-checked`]:{marginInlineStart:`calc(-100% + ${Ht+Je*2}px - ${Kt*2}px)`,marginInlineEnd:`calc(100% - ${Ht+Je*2}px + ${Kt*2}px)`},[`${Qt}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`&${oe}-checked ${Qt}`]:{paddingInlineStart:_t,paddingInlineEnd:Kt,[`${Qt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Qt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ht+Je*2}px + ${Kt*2}px)`,marginInlineEnd:`calc(-100% + ${Ht+Je*2}px - ${Kt*2}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Qt}`]:{[`${Qt}-unchecked`]:{marginInlineStart:Je*2,marginInlineEnd:-Je*2}},[`&${oe}-checked ${Qt}`]:{[`${Qt}-checked`]:{marginInlineStart:-Je*2,marginInlineEnd:Je*2}}}}}},Mn=he=>{const{componentCls:oe,trackHeight:Ie,trackMinWidth:Je}=he;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Je,height:Ie,lineHeight:`${Ie}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${oe}-disabled)`]:{background:he.colorTextTertiary}}),(0,ft.Qy)(he)),{[`&${oe}-checked`]:{background:he.switchColor,[`&:hover:not(${oe}-disabled)`]:{background:he.colorPrimaryHover}},[`&${oe}-loading, &${oe}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${oe}-rtl`]:{direction:"rtl"}})}};var Te=(0,Jt.Z)("Switch",he=>{const oe=(0,Bn.TS)(he,{switchDuration:he.motionDurationMid,switchColor:he.colorPrimary,switchDisabledOpacity:he.opacityLoading,switchLoadingIconSize:he.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${he.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Mn(oe),Dn(oe),Xt(oe),Nt(oe),wn(oe)]},he=>{const{fontSize:oe,lineHeight:Ie,controlHeight:Je,colorWhite:_t}=he,Kt=oe*Ie,Ht=Je/2,Qt=2,Gt=Kt-Qt*2,nr=Ht-Qt*2;return{trackHeight:Kt,trackHeightSM:Ht,trackMinWidth:Gt*2+Qt*4,trackMinWidthSM:nr*2+Qt*2,trackPadding:Qt,handleBg:_t,handleSize:Gt,handleSizeSM:nr,handleShadow:`0 2px 4px 0 ${new ot.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Gt/2,innerMaxMargin:Gt+Qt+Qt*2,innerMinMarginSM:nr/2,innerMaxMarginSM:nr+Qt+Qt*2}}),de=function(he,oe){var Ie={};for(var Je in he)Object.prototype.hasOwnProperty.call(he,Je)&&oe.indexOf(Je)<0&&(Ie[Je]=he[Je]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Je=Object.getOwnPropertySymbols(he);_t<Je.length;_t++)oe.indexOf(Je[_t])<0&&Object.prototype.propertyIsEnumerable.call(he,Je[_t])&&(Ie[Je[_t]]=he[Je[_t]]);return Ie};const le=ke.forwardRef((he,oe)=>{const{prefixCls:Ie,size:Je,disabled:_t,loading:Kt,className:Ht,rootClassName:Qt,style:Gt}=he,nr=de(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:gr,direction:Ut,switch:pn}=ke.useContext(Zt.E_),ir=ke.useContext(In.Z),Lr=(_t!=null?_t:ir)||Kt,$n=gr("switch",Ie),Cr=ke.createElement("div",{className:`${$n}-handle`},Kt&&ke.createElement(ce.Z,{className:`${$n}-loading-icon`})),[Ii,li]=Te($n),ci=(0,fn.Z)(Je),Jr=Fe()(pn==null?void 0:pn.className,{[`${$n}-small`]:ci==="small",[`${$n}-loading`]:Kt,[`${$n}-rtl`]:Ut==="rtl"},Ht,Qt,li),Di=Object.assign(Object.assign({},pn==null?void 0:pn.style),Gt);return Ii(ke.createElement(De.Z,{component:"Switch"},ke.createElement(Ge,Object.assign({},nr,{prefixCls:$n,className:Jr,style:Di,disabled:Lr,ref:oe,loadingIcon:Cr}))))});le.__ANT_SWITCH=!0;var pe=le},66368:function(Ln,en,se){"use strict";se.d(en,{default:function(){return Xi}});var ce=se(73475),Ue=se(25877),Fe=se(38308),it=se(94184),ve=se.n(it),Le=se(87462),Me=se(4942),Se=se(1413),me=se(97685),Pe=se(71002),st=se(45987),Re=se(67294),Et=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Oe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Oe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Oe==null?void 0:Oe.substr(0,4))};function ht(Oe){var He=Re.useRef();He.current=Oe;var Ke=Re.useCallback(function(){for(var Ve,ct=arguments.length,yt=new Array(ct),kt=0;kt<ct;kt++)yt[kt]=arguments[kt];return(Ve=He.current)===null||Ve===void 0?void 0:Ve.call.apply(Ve,[He].concat(yt))},[]);return Ke}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var et=lt()?Re.useLayoutEffect:Re.useEffect,ke=function(He,Ke){var Ve=Re.useRef(!0);et(function(){return He(Ve.current)},Ke),et(function(){return Ve.current=!1,function(){Ve.current=!0}},[])},vt=function(He,Ke){ke(function(Ve){if(!Ve)return He()},Ke)},jt=null;function tt(Oe){var He=Re.useRef(!1),Ke=Re.useState(Oe),Ve=(0,me.Z)(Ke,2),ct=Ve[0],yt=Ve[1];Re.useEffect(function(){return He.current=!1,function(){He.current=!0}},[]);function kt(sn,dn){dn&&He.current||yt(sn)}return[ct,kt]}function ut(Oe){return Oe!==void 0}function Ee(Oe,He){var Ke=He||{},Ve=Ke.defaultValue,ct=Ke.value,yt=Ke.onChange,kt=Ke.postState,sn=tt(function(){return ut(ct)?ct:ut(Ve)?typeof Ve=="function"?Ve():Ve:typeof Oe=="function"?Oe():Oe}),dn=(0,me.Z)(sn,2),Gn=dn[0],pr=dn[1],Hn=ct!==void 0?ct:Gn,Cn=kt?kt(Hn):Hn,gn=ht(yt),Pn=tt([Hn]),Fn=(0,me.Z)(Pn,2),dr=Fn[0],Xn=Fn[1];vt(function(){var Qn=dr[0];Gn!==Qn&&gn(Gn,Qn)},[dr]),vt(function(){ut(ct)||pr(ct)},[ct]);var Zn=ht(function(Qn,Ze){pr(Qn,Ze),Xn([Hn],Ze)});return[Cn,Zn]}var we=se(62874),je=(0,Re.createContext)(null),Ye=Re.forwardRef(function(Oe,He){var Ke=Oe.prefixCls,Ve=Oe.className,ct=Oe.style,yt=Oe.id,kt=Oe.active,sn=Oe.tabKey,dn=Oe.children;return Re.createElement("div",{id:yt&&"".concat(yt,"-panel-").concat(sn),role:"tabpanel",tabIndex:kt?0:-1,"aria-labelledby":yt&&"".concat(yt,"-tab-").concat(sn),"aria-hidden":!kt,style:ct,className:ve()(Ke,kt&&"".concat(Ke,"-active"),Ve),ref:He},dn)}),Lt=Ye,Ct=["key","forceRender","style","className"];function Bt(Oe){var He=Oe.id,Ke=Oe.activeKey,Ve=Oe.animated,ct=Oe.tabPosition,yt=Oe.destroyInactiveTabPane,kt=Re.useContext(je),sn=kt.prefixCls,dn=kt.tabs,Gn=Ve.tabPane,pr="".concat(sn,"-tabpane");return Re.createElement("div",{className:ve()("".concat(sn,"-content-holder"))},Re.createElement("div",{className:ve()("".concat(sn,"-content"),"".concat(sn,"-content-").concat(ct),(0,Me.Z)({},"".concat(sn,"-content-animated"),Gn))},dn.map(function(Hn){var Cn=Hn.key,gn=Hn.forceRender,Pn=Hn.style,Fn=Hn.className,dr=(0,st.Z)(Hn,Ct),Xn=Cn===Ke;return Re.createElement(we.Z,(0,Le.Z)({key:Cn,visible:Xn,forceRender:gn,removeOnLeave:!!yt,leavedClassName:"".concat(pr,"-hidden")},Ve.tabPaneMotion),function(Zn,Qn){var Ze=Zn.style,ze=Zn.className;return Re.createElement(Lt,(0,Le.Z)({},dr,{prefixCls:pr,id:He,tabKey:Cn,animated:Gn,active:Xn,style:(0,Se.Z)((0,Se.Z)({},Pn),Ze),className:ve()(Fn,ze),ref:Qn}))})})))}var at=se(74902),Vt=se(48555),$t=se(59864);function xn(Oe,He,Ke){var Ve=Re.useRef({});return(!("value"in Ve.current)||Ke(Ve.current.condition,He))&&(Ve.current.value=Oe(),Ve.current.condition=He),Ve.current.value}function dt(Oe,He){typeof Oe=="function"?Oe(He):(0,Pe.Z)(Oe)==="object"&&Oe&&"current"in Oe&&(Oe.current=He)}function on(){for(var Oe=arguments.length,He=new Array(Oe),Ke=0;Ke<Oe;Ke++)He[Ke]=arguments[Ke];var Ve=He.filter(function(ct){return ct});return Ve.length<=1?Ve[0]:function(ct){He.forEach(function(yt){dt(yt,ct)})}}function En(){for(var Oe=arguments.length,He=new Array(Oe),Ke=0;Ke<Oe;Ke++)He[Ke]=arguments[Ke];return xn(function(){return on.apply(void 0,He)},He,function(Ve,ct){return Ve.length===ct.length&&Ve.every(function(yt,kt){return yt===ct[kt]})})}function yn(Oe){var He,Ke,Ve=isMemo(Oe)?Oe.type.type:Oe.type;return!(typeof Ve=="function"&&!((He=Ve.prototype)!==null&&He!==void 0&&He.render)||typeof Oe=="function"&&!((Ke=Oe.prototype)!==null&&Ke!==void 0&&Ke.render))}var Ge={width:0,height:0,left:0,top:0};function De(Oe,He,Ke){return(0,Re.useMemo)(function(){for(var Ve,ct=new Map,yt=He.get((Ve=Oe[0])===null||Ve===void 0?void 0:Ve.key)||Ge,kt=yt.left+yt.width,sn=0;sn<Oe.length;sn+=1){var dn=Oe[sn].key,Gn=He.get(dn);if(!Gn){var pr;Gn=He.get((pr=Oe[sn-1])===null||pr===void 0?void 0:pr.key)||Ge}var Hn=ct.get(dn)||(0,Se.Z)({},Gn);Hn.right=kt-Hn.left-Hn.width,ct.set(dn,Hn)}return ct},[Oe.map(function(Ve){return Ve.key}).join("_"),He,Ke])}function Zt(Oe,He){var Ke=Re.useRef(Oe),Ve=Re.useState({}),ct=(0,me.Z)(Ve,2),yt=ct[1];function kt(sn){var dn=typeof sn=="function"?sn(Ke.current):sn;dn!==Ke.current&&He(dn,Ke.current),Ke.current=dn,yt({})}return[Ke.current,kt]}var In=.1,fn=.01,ot=20,ft=Math.pow(.995,ot);function Jt(Oe,He){var Ke=(0,Re.useState)(),Ve=(0,me.Z)(Ke,2),ct=Ve[0],yt=Ve[1],kt=(0,Re.useState)(0),sn=(0,me.Z)(kt,2),dn=sn[0],Gn=sn[1],pr=(0,Re.useState)(0),Hn=(0,me.Z)(pr,2),Cn=Hn[0],gn=Hn[1],Pn=(0,Re.useState)(),Fn=(0,me.Z)(Pn,2),dr=Fn[0],Xn=Fn[1],Zn=(0,Re.useRef)();function Qn(Xe){var St=Xe.touches[0],Ft=St.screenX,Wt=St.screenY;yt({x:Ft,y:Wt}),window.clearInterval(Zn.current)}function Ze(Xe){if(ct){Xe.preventDefault();var St=Xe.touches[0],Ft=St.screenX,Wt=St.screenY;yt({x:Ft,y:Wt});var an=Ft-ct.x,nn=Wt-ct.y;He(an,nn);var Ot=Date.now();Gn(Ot),gn(Ot-dn),Xn({x:an,y:nn})}}function ze(){if(ct&&(yt(null),Xn(null),dr)){var Xe=dr.x/Cn,St=dr.y/Cn,Ft=Math.abs(Xe),Wt=Math.abs(St);if(Math.max(Ft,Wt)<In)return;var an=Xe,nn=St;Zn.current=window.setInterval(function(){if(Math.abs(an)<fn&&Math.abs(nn)<fn){window.clearInterval(Zn.current);return}an*=ft,nn*=ft,He(an*ot,nn*ot)},ot)}}var xe=(0,Re.useRef)();function Ae(Xe){var St=Xe.deltaX,Ft=Xe.deltaY,Wt=0,an=Math.abs(St),nn=Math.abs(Ft);an===nn?Wt=xe.current==="x"?St:Ft:an>nn?(Wt=St,xe.current="x"):(Wt=Ft,xe.current="y"),He(-Wt,-Wt)&&Xe.preventDefault()}var qe=(0,Re.useRef)(null);qe.current={onTouchStart:Qn,onTouchMove:Ze,onTouchEnd:ze,onWheel:Ae},Re.useEffect(function(){function Xe(an){qe.current.onTouchStart(an)}function St(an){qe.current.onTouchMove(an)}function Ft(an){qe.current.onTouchEnd(an)}function Wt(an){qe.current.onWheel(an)}return document.addEventListener("touchmove",St,{passive:!1}),document.addEventListener("touchend",Ft,{passive:!1}),Oe.current.addEventListener("touchstart",Xe,{passive:!1}),Oe.current.addEventListener("wheel",Wt),function(){document.removeEventListener("touchmove",St),document.removeEventListener("touchend",Ft)}},[])}function Bn(Oe){var He=(0,Re.useState)(0),Ke=(0,me.Z)(He,2),Ve=Ke[0],ct=Ke[1],yt=(0,Re.useRef)(0),kt=(0,Re.useRef)();return kt.current=Oe,vt(function(){var sn;(sn=kt.current)===null||sn===void 0||sn.call(kt)},[Ve]),function(){yt.current===Ve&&(yt.current+=1,ct(yt.current))}}function wn(Oe){var He=(0,Re.useRef)([]),Ke=(0,Re.useState)({}),Ve=(0,me.Z)(Ke,2),ct=Ve[1],yt=(0,Re.useRef)(typeof Oe=="function"?Oe():Oe),kt=Bn(function(){var dn=yt.current;He.current.forEach(function(Gn){dn=Gn(dn)}),He.current=[],yt.current=dn,ct({})});function sn(dn){He.current.push(dn),kt()}return[yt.current,sn]}var Nt={width:0,height:0,left:0,top:0,right:0};function Xt(Oe,He,Ke,Ve,ct,yt,kt){var sn=kt.tabs,dn=kt.tabPosition,Gn=kt.rtl,pr,Hn,Cn;return["top","bottom"].includes(dn)?(pr="width",Hn=Gn?"right":"left",Cn=Math.abs(Ke)):(pr="height",Hn="top",Cn=-Ke),(0,Re.useMemo)(function(){if(!sn.length)return[0,0];for(var gn=sn.length,Pn=gn,Fn=0;Fn<gn;Fn+=1){var dr=Oe.get(sn[Fn].key)||Nt;if(dr[Hn]+dr[pr]>Cn+He){Pn=Fn-1;break}}for(var Xn=0,Zn=gn-1;Zn>=0;Zn-=1){var Qn=Oe.get(sn[Zn].key)||Nt;if(Qn[Hn]<Cn){Xn=Zn+1;break}}return Xn>=Pn?[0,0]:[Xn,Pn]},[Oe,He,Ve,ct,yt,Cn,dn,sn.map(function(gn){return gn.key}).join("_"),Gn])}function Dn(Oe){var He;return Oe instanceof Map?(He={},Oe.forEach(function(Ke,Ve){He[Ve]=Ke})):He=Oe,JSON.stringify(He)}var Mn="TABS_DQ";function Te(Oe){return String(Oe).replace(/"/g,Mn)}function de(Oe,He,Ke,Ve){return!(!Ke||Ve||Oe===!1||Oe===void 0&&(He===!1||He===null))}function le(Oe,He){var Ke=Oe.prefixCls,Ve=Oe.editable,ct=Oe.locale,yt=Oe.style;return!Ve||Ve.showAdd===!1?null:Re.createElement("button",{ref:He,type:"button",className:"".concat(Ke,"-nav-add"),style:yt,"aria-label":(ct==null?void 0:ct.addAriaLabel)||"Add tab",onClick:function(sn){Ve.onEdit("add",{event:sn})}},Ve.addIcon||"+")}var pe=Re.forwardRef(le),he=Re.forwardRef(function(Oe,He){var Ke=Oe.position,Ve=Oe.prefixCls,ct=Oe.extra;if(!ct)return null;var yt,kt={};return(0,Pe.Z)(ct)==="object"&&!Re.isValidElement(ct)?kt=ct:kt.right=ct,Ke==="right"&&(yt=kt.right),Ke==="left"&&(yt=kt.left),yt?Re.createElement("div",{className:"".concat(Ve,"-extra-content"),ref:He},yt):null}),oe=he,Ie=se(62709);function Je(Oe,He,Ke){var Ve=React.useRef({});return(!("value"in Ve.current)||Ke(Ve.current.condition,He))&&(Ve.current.value=Oe(),Ve.current.condition=He),Ve.current.value}function _t(Oe,He){typeof Oe=="function"?Oe(He):(0,Pe.Z)(Oe)==="object"&&Oe&&"current"in Oe&&(Oe.current=He)}function Kt(){for(var Oe=arguments.length,He=new Array(Oe),Ke=0;Ke<Oe;Ke++)He[Ke]=arguments[Ke];var Ve=He.filter(function(ct){return ct});return Ve.length<=1?Ve[0]:function(ct){He.forEach(function(yt){_t(yt,ct)})}}function Ht(){for(var Oe=arguments.length,He=new Array(Oe),Ke=0;Ke<Oe;Ke++)He[Ke]=arguments[Ke];return useMemo(function(){return Kt.apply(void 0,He)},He,function(Ve,ct){return Ve.length===ct.length&&Ve.every(function(yt,kt){return yt===ct[kt]})})}function Qt(Oe){var He,Ke,Ve=(0,$t.isMemo)(Oe)?Oe.type.type:Oe.type;return!(typeof Ve=="function"&&!((He=Ve.prototype)!==null&&He!==void 0&&He.render)||typeof Oe=="function"&&!((Ke=Oe.prototype)!==null&&Ke!==void 0&&Ke.render))}var Gt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(He){var Ke=He.keyCode;if(He.altKey&&!He.ctrlKey||He.metaKey||Ke>=Gt.F1&&Ke<=Gt.F12)return!1;switch(Ke){case Gt.ALT:case Gt.CAPS_LOCK:case Gt.CONTEXT_MENU:case Gt.CTRL:case Gt.DOWN:case Gt.END:case Gt.ESC:case Gt.HOME:case Gt.INSERT:case Gt.LEFT:case Gt.MAC_FF_META:case Gt.META:case Gt.NUMLOCK:case Gt.NUM_CENTER:case Gt.PAGE_DOWN:case Gt.PAGE_UP:case Gt.PAUSE:case Gt.PRINT_SCREEN:case Gt.RIGHT:case Gt.SHIFT:case Gt.UP:case Gt.WIN_KEY:case Gt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(He){if(He>=Gt.ZERO&&He<=Gt.NINE||He>=Gt.NUM_ZERO&&He<=Gt.NUM_MULTIPLY||He>=Gt.A&&He<=Gt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&He===0)return!0;switch(He){case Gt.SPACE:case Gt.QUESTION_MARK:case Gt.NUM_PLUS:case Gt.NUM_MINUS:case Gt.NUM_PERIOD:case Gt.NUM_DIVISION:case Gt.SEMICOLON:case Gt.DASH:case Gt.EQUALS:case Gt.COMMA:case Gt.PERIOD:case Gt.SLASH:case Gt.APOSTROPHE:case Gt.SINGLE_QUOTE:case Gt.OPEN_SQUARE_BRACKET:case Gt.BACKSLASH:case Gt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},nr=Gt,gr=function(He){return+setTimeout(He,16)},Ut=function(He){return clearTimeout(He)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(gr=function(He){return window.requestAnimationFrame(He)},Ut=function(He){return window.cancelAnimationFrame(He)});var pn=0,ir=new Map;function Lr(Oe){ir.delete(Oe)}var $n=function(He){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pn+=1;var Ve=pn;function ct(yt){if(yt===0)Lr(Ve),He();else{var kt=gr(function(){ct(yt-1)});ir.set(Ve,kt)}}return ct(Ke),Ve};$n.cancel=function(Oe){var He=ir.get(Oe);return Lr(He),Ut(He)};var Cr=$n,Ii=nr.ESC,li=nr.TAB;function ci(Oe){var He=Oe.visible,Ke=Oe.triggerRef,Ve=Oe.onVisibleChange,ct=Oe.autoFocus,yt=Oe.overlayRef,kt=Re.useRef(!1),sn=function(){if(He){var Hn,Cn;(Hn=Ke.current)===null||Hn===void 0||(Cn=Hn.focus)===null||Cn===void 0||Cn.call(Hn),Ve==null||Ve(!1)}},dn=function(){var Hn;return(Hn=yt.current)!==null&&Hn!==void 0&&Hn.focus?(yt.current.focus(),kt.current=!0,!0):!1},Gn=function(Hn){switch(Hn.keyCode){case Ii:sn();break;case li:{var Cn=!1;kt.current||(Cn=dn()),Cn?Hn.preventDefault():sn();break}}};Re.useEffect(function(){return He?(window.addEventListener("keydown",Gn),ct&&Cr(dn,3),function(){window.removeEventListener("keydown",Gn),kt.current=!1}):function(){kt.current=!1}},[He])}var Jr=(0,Re.forwardRef)(function(Oe,He){var Ke=Oe.overlay,Ve=Oe.arrow,ct=Oe.prefixCls,yt=(0,Re.useMemo)(function(){var sn;return typeof Ke=="function"?sn=Ke():sn=Ke,sn},[Ke]),kt=Kt(He,yt==null?void 0:yt.ref);return Re.createElement(Re.Fragment,null,Ve&&Re.createElement("div",{className:"".concat(ct,"-arrow")}),Re.cloneElement(yt,{ref:Qt(yt)?kt:void 0}))}),Di=Jr,Ei={adjustX:1,adjustY:1},Pi=[0,0],xr={topLeft:{points:["bl","tl"],overflow:Ei,offset:[0,-4],targetOffset:Pi},top:{points:["bc","tc"],overflow:Ei,offset:[0,-4],targetOffset:Pi},topRight:{points:["br","tr"],overflow:Ei,offset:[0,-4],targetOffset:Pi},bottomLeft:{points:["tl","bl"],overflow:Ei,offset:[0,4],targetOffset:Pi},bottom:{points:["tc","bc"],overflow:Ei,offset:[0,4],targetOffset:Pi},bottomRight:{points:["tr","br"],overflow:Ei,offset:[0,4],targetOffset:Pi}},Pr=xr,Gi=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ma(Oe,He){var Ke,Ve=Oe.arrow,ct=Ve===void 0?!1:Ve,yt=Oe.prefixCls,kt=yt===void 0?"rc-dropdown":yt,sn=Oe.transitionName,dn=Oe.animation,Gn=Oe.align,pr=Oe.placement,Hn=pr===void 0?"bottomLeft":pr,Cn=Oe.placements,gn=Cn===void 0?Pr:Cn,Pn=Oe.getPopupContainer,Fn=Oe.showAction,dr=Oe.hideAction,Xn=Oe.overlayClassName,Zn=Oe.overlayStyle,Qn=Oe.visible,Ze=Oe.trigger,ze=Ze===void 0?["hover"]:Ze,xe=Oe.autoFocus,Ae=Oe.overlay,qe=Oe.children,Xe=Oe.onVisibleChange,St=(0,st.Z)(Oe,Gi),Ft=Re.useState(),Wt=(0,me.Z)(Ft,2),an=Wt[0],nn=Wt[1],Ot="visible"in Oe?Qn:an,un=Re.useRef(null),hn=Re.useRef(null),zn=Re.useRef(null);Re.useImperativeHandle(He,function(){return un.current});var Sn=function(rr){nn(rr),Xe==null||Xe(rr)};ci({visible:Ot,triggerRef:zn,onVisibleChange:Sn,autoFocus:xe,overlayRef:hn});var qn=function(rr){var Dr=Oe.onOverlayClick;nn(!1),Dr&&Dr(rr)},fr=function(){return Re.createElement(Di,{ref:hn,overlay:Ae,prefixCls:kt,arrow:ct})},er=function(){return typeof Ae=="function"?fr:fr()},mr=function(){var rr=Oe.minOverlayWidthMatchTrigger,Dr=Oe.alignPoint;return"minOverlayWidthMatchTrigger"in Oe?rr:!Dr},jn=function(){var rr=Oe.openClassName;return rr!==void 0?rr:"".concat(kt,"-open")},ar=Re.cloneElement(qe,{className:ve()((Ke=qe.props)===null||Ke===void 0?void 0:Ke.className,Ot&&jn()),ref:Qt(qe)?Kt(zn,qe.ref):void 0}),Mr=dr;return!Mr&&ze.indexOf("contextMenu")!==-1&&(Mr=["click"]),Re.createElement(Ie.Z,(0,Le.Z)({builtinPlacements:gn},St,{prefixCls:kt,ref:un,popupClassName:ve()(Xn,(0,Me.Z)({},"".concat(kt,"-show-arrow"),ct)),popupStyle:Zn,action:ze,showAction:Fn,hideAction:Mr,popupPlacement:Hn,popupAlign:Gn,popupTransitionName:sn,popupAnimation:dn,popupVisible:Ot,stretch:mr()?"minWidth":"",popup:er(),onPopupVisibleChange:Sn,onPopupClick:qn,getPopupContainer:Pn}),ar)}var ba=Re.forwardRef(ma),va=ba,Vi=se(78595),At={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(He){var Ke=He.keyCode;if(He.altKey&&!He.ctrlKey||He.metaKey||Ke>=At.F1&&Ke<=At.F12)return!1;switch(Ke){case At.ALT:case At.CAPS_LOCK:case At.CONTEXT_MENU:case At.CTRL:case At.DOWN:case At.END:case At.ESC:case At.HOME:case At.INSERT:case At.LEFT:case At.MAC_FF_META:case At.META:case At.NUMLOCK:case At.NUM_CENTER:case At.PAGE_DOWN:case At.PAGE_UP:case At.PAUSE:case At.PRINT_SCREEN:case At.RIGHT:case At.SHIFT:case At.UP:case At.WIN_KEY:case At.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(He){if(He>=At.ZERO&&He<=At.NINE||He>=At.NUM_ZERO&&He<=At.NUM_MULTIPLY||He>=At.A&&He<=At.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&He===0)return!0;switch(He){case At.SPACE:case At.QUESTION_MARK:case At.NUM_PLUS:case At.NUM_MINUS:case At.NUM_PERIOD:case At.NUM_DIVISION:case At.SEMICOLON:case At.DASH:case At.EQUALS:case At.COMMA:case At.PERIOD:case At.SLASH:case At.APOSTROPHE:case At.SINGLE_QUOTE:case At.OPEN_SQUARE_BRACKET:case At.BACKSLASH:case At.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},On=At;function Pt(Oe,He){var Ke=Oe.prefixCls,Ve=Oe.id,ct=Oe.tabs,yt=Oe.locale,kt=Oe.mobile,sn=Oe.moreIcon,dn=sn===void 0?"More":sn,Gn=Oe.moreTransitionName,pr=Oe.style,Hn=Oe.className,Cn=Oe.editable,gn=Oe.tabBarGutter,Pn=Oe.rtl,Fn=Oe.removeAriaLabel,dr=Oe.onTabClick,Xn=Oe.getPopupContainer,Zn=Oe.popupClassName,Qn=(0,Re.useState)(!1),Ze=(0,me.Z)(Qn,2),ze=Ze[0],xe=Ze[1],Ae=(0,Re.useState)(null),qe=(0,me.Z)(Ae,2),Xe=qe[0],St=qe[1],Ft="".concat(Ve,"-more-popup"),Wt="".concat(Ke,"-dropdown"),an=Xe!==null?"".concat(Ft,"-").concat(Xe):null,nn=yt==null?void 0:yt.dropdownAriaLabel;function Ot(er,mr){er.preventDefault(),er.stopPropagation(),Cn.onEdit("remove",{key:mr,event:er})}var un=Re.createElement(Vi.ZP,{onClick:function(mr){var jn=mr.key,ar=mr.domEvent;dr(jn,ar),xe(!1)},prefixCls:"".concat(Wt,"-menu"),id:Ft,tabIndex:-1,role:"listbox","aria-activedescendant":an,selectedKeys:[Xe],"aria-label":nn!==void 0?nn:"expanded dropdown"},ct.map(function(er){var mr=er.closable,jn=er.disabled,ar=er.closeIcon,Mr=er.key,Nr=er.label,rr=de(mr,ar,Cn,jn);return Re.createElement(Vi.sN,{key:Mr,id:"".concat(Ft,"-").concat(Mr),role:"option","aria-controls":Ve&&"".concat(Ve,"-panel-").concat(Mr),disabled:jn},Re.createElement("span",null,Nr),rr&&Re.createElement("button",{type:"button","aria-label":Fn||"remove",tabIndex:0,className:"".concat(Wt,"-menu-item-remove"),onClick:function($r){$r.stopPropagation(),Ot($r,Mr)}},ar||Cn.removeIcon||"\xD7"))}));function hn(er){for(var mr=ct.filter(function(rr){return!rr.disabled}),jn=mr.findIndex(function(rr){return rr.key===Xe})||0,ar=mr.length,Mr=0;Mr<ar;Mr+=1){jn=(jn+er+ar)%ar;var Nr=mr[jn];if(!Nr.disabled){St(Nr.key);return}}}function zn(er){var mr=er.which;if(!ze){[On.DOWN,On.SPACE,On.ENTER].includes(mr)&&(xe(!0),er.preventDefault());return}switch(mr){case On.UP:hn(-1),er.preventDefault();break;case On.DOWN:hn(1),er.preventDefault();break;case On.ESC:xe(!1);break;case On.SPACE:case On.ENTER:Xe!==null&&dr(Xe,er);break}}(0,Re.useEffect)(function(){var er=document.getElementById(an);er&&er.scrollIntoView&&er.scrollIntoView(!1)},[Xe]),(0,Re.useEffect)(function(){ze||St(null)},[ze]);var Sn=(0,Me.Z)({},Pn?"marginRight":"marginLeft",gn);ct.length||(Sn.visibility="hidden",Sn.order=1);var qn=ve()((0,Me.Z)({},"".concat(Wt,"-rtl"),Pn)),fr=kt?null:Re.createElement(va,{prefixCls:Wt,overlay:un,trigger:["hover"],visible:ct.length?ze:!1,transitionName:Gn,onVisibleChange:xe,overlayClassName:ve()(qn,Zn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Xn},Re.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:Sn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Ft,id:"".concat(Ve,"-more"),"aria-expanded":ze,onKeyDown:zn},dn));return Re.createElement("div",{className:ve()("".concat(Ke,"-nav-operations"),Hn),style:pr,ref:He},fr,Re.createElement(pe,{prefixCls:Ke,locale:yt,editable:Cn}))}var zt=Re.memo(Re.forwardRef(Pt),function(Oe,He){return He.tabMoving});function rn(Oe){var He,Ke=Oe.prefixCls,Ve=Oe.id,ct=Oe.active,yt=Oe.tab,kt=yt.key,sn=yt.label,dn=yt.disabled,Gn=yt.closeIcon,pr=Oe.closable,Hn=Oe.renderWrapper,Cn=Oe.removeAriaLabel,gn=Oe.editable,Pn=Oe.onClick,Fn=Oe.onFocus,dr=Oe.style,Xn="".concat(Ke,"-tab"),Zn=de(pr,Gn,gn,dn);function Qn(xe){dn||Pn(xe)}function Ze(xe){xe.preventDefault(),xe.stopPropagation(),gn.onEdit("remove",{key:kt,event:xe})}var ze=Re.createElement("div",{key:kt,"data-node-key":Te(kt),className:ve()(Xn,(He={},(0,Me.Z)(He,"".concat(Xn,"-with-remove"),Zn),(0,Me.Z)(He,"".concat(Xn,"-active"),ct),(0,Me.Z)(He,"".concat(Xn,"-disabled"),dn),He)),style:dr,onClick:Qn},Re.createElement("div",{role:"tab","aria-selected":ct,id:Ve&&"".concat(Ve,"-tab-").concat(kt),className:"".concat(Xn,"-btn"),"aria-controls":Ve&&"".concat(Ve,"-panel-").concat(kt),"aria-disabled":dn,tabIndex:dn?null:0,onClick:function(Ae){Ae.stopPropagation(),Qn(Ae)},onKeyDown:function(Ae){[On.SPACE,On.ENTER].includes(Ae.which)&&(Ae.preventDefault(),Qn(Ae))},onFocus:Fn},sn),Zn&&Re.createElement("button",{type:"button","aria-label":Cn||"remove",tabIndex:0,className:"".concat(Xn,"-remove"),onClick:function(Ae){Ae.stopPropagation(),Ze(Ae)}},Gn||gn.removeIcon||"\xD7"));return Hn?Hn(ze):ze}var cn=rn,Vn=function(He){return+setTimeout(He,16)},Nn=function(He){return clearTimeout(He)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Vn=function(He){return window.requestAnimationFrame(He)},Nn=function(He){return window.cancelAnimationFrame(He)});var Qe=0,rt=new Map;function pt(Oe){rt.delete(Oe)}var Rt=function(He){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Qe+=1;var Ve=Qe;function ct(yt){if(yt===0)pt(Ve),He();else{var kt=Vn(function(){ct(yt-1)});rt.set(Ve,kt)}}return ct(Ke),Ve};Rt.cancel=function(Oe){var He=rt.get(Oe);return pt(He),Nn(He)};var We=Rt,mt=function(He){var Ke=He.activeTabOffset,Ve=He.horizontal,ct=He.rtl,yt=He.indicatorSize,kt=(0,Re.useState)(),sn=(0,me.Z)(kt,2),dn=sn[0],Gn=sn[1],pr=(0,Re.useRef)(),Hn=function(Pn){return typeof yt=="function"?yt(Pn):typeof yt=="number"?yt:Pn};function Cn(){We.cancel(pr.current)}return(0,Re.useEffect)(function(){var gn={};return Ke&&(Ve?(ct?(gn.right=Ke.right+Ke.width/2,gn.transform="translateX(50%)"):(gn.left=Ke.left+Ke.width/2,gn.transform="translateX(-50%)"),gn.width=Hn(Ke.width)):(gn.top=Ke.top+Ke.height/2,gn.transform="translateY(-50%)",gn.height=Hn(Ke.height))),Cn(),pr.current=We(function(){Gn(gn)}),Cn},[Ke,Ve,ct,yt]),{style:dn}},Dt=mt,gt=function(He){var Ke=He.current||{},Ve=Ke.offsetWidth,ct=Ve===void 0?0:Ve,yt=Ke.offsetHeight,kt=yt===void 0?0:yt;return[ct,kt]},qt=function(He,Ke){return He[Ke?0:1]};function Yt(Oe,He){var Ke,Ve=Re.useContext(je),ct=Ve.prefixCls,yt=Ve.tabs,kt=Oe.className,sn=Oe.style,dn=Oe.id,Gn=Oe.animated,pr=Oe.activeKey,Hn=Oe.rtl,Cn=Oe.extra,gn=Oe.editable,Pn=Oe.locale,Fn=Oe.tabPosition,dr=Oe.tabBarGutter,Xn=Oe.children,Zn=Oe.onTabClick,Qn=Oe.onTabScroll,Ze=Oe.indicatorSize,ze=(0,Re.useRef)(),xe=(0,Re.useRef)(),Ae=(0,Re.useRef)(),qe=(0,Re.useRef)(),Xe=(0,Re.useRef)(),St=(0,Re.useRef)(),Ft=(0,Re.useRef)(),Wt=Fn==="top"||Fn==="bottom",an=Zt(0,function(Br,gi){Wt&&Qn&&Qn({direction:Br>gi?"left":"right"})}),nn=(0,me.Z)(an,2),Ot=nn[0],un=nn[1],hn=Zt(0,function(Br,gi){!Wt&&Qn&&Qn({direction:Br>gi?"top":"bottom"})}),zn=(0,me.Z)(hn,2),Sn=zn[0],qn=zn[1],fr=(0,Re.useState)([0,0]),er=(0,me.Z)(fr,2),mr=er[0],jn=er[1],ar=(0,Re.useState)([0,0]),Mr=(0,me.Z)(ar,2),Nr=Mr[0],rr=Mr[1],Dr=(0,Re.useState)([0,0]),$r=(0,me.Z)(Dr,2),mi=$r[0],ri=$r[1],Ur=(0,Re.useState)([0,0]),ui=(0,me.Z)(Ur,2),pi=ui[0],jr=ui[1],Gr=wn(new Map),wr=(0,me.Z)(Gr,2),Fr=wr[0],Yr=wr[1],fi=De(yt,Fr,Nr[0]),ua=qt(mr,Wt),ha=qt(Nr,Wt),Bi=qt(mi,Wt),$i=qt(pi,Wt),ei=ua<ha+Bi,Wr=ei?ua-$i:ua-Bi,Yi="".concat(ct,"-nav-operations-hidden"),qr=0,vr=0;Wt&&Hn?(qr=0,vr=Math.max(0,ha-Wr)):(qr=Math.min(0,Wr-ha),vr=0);function zr(Br){return Br<qr?qr:Br>vr?vr:Br}var Li=(0,Re.useRef)(),yi=(0,Re.useState)(),ji=(0,me.Z)(yi,2),ti=ji[0],ta=ji[1];function qi(){ta(Date.now())}function Ki(){window.clearTimeout(Li.current)}Jt(qe,function(Br,gi){function ya(na,Va){na(function(Za){var Do=zr(Za+Va);return Do})}return ei?(Wt?ya(un,Br):ya(qn,gi),Ki(),qi(),!0):!1}),(0,Re.useEffect)(function(){return Ki(),ti&&(Li.current=window.setTimeout(function(){ta(0)},100)),Ki},[ti]);var Ui=Xt(fi,Wr,Wt?Ot:Sn,ha,Bi,$i,(0,Se.Z)((0,Se.Z)({},Oe),{},{tabs:yt})),sa=(0,me.Z)(Ui,2),Aa=sa[0],da=sa[1],Sa=ht(function(){var Br=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pr,gi=fi.get(Br)||{width:0,height:0,left:0,right:0,top:0};if(Wt){var ya=Ot;Hn?gi.right<Ot?ya=gi.right:gi.right+gi.width>Ot+Wr&&(ya=gi.right+gi.width-Wr):gi.left<-Ot?ya=-gi.left:gi.left+gi.width>-Ot+Wr&&(ya=-(gi.left+gi.width-Wr)),qn(0),un(zr(ya))}else{var na=Sn;gi.top<-Sn?na=-gi.top:gi.top+gi.height>-Sn+Wr&&(na=-(gi.top+gi.height-Wr)),un(0),qn(zr(na))}}),za={};Fn==="top"||Fn==="bottom"?za[Hn?"marginRight":"marginLeft"]=dr:za.marginTop=dr;var ja=yt.map(function(Br,gi){var ya=Br.key;return Re.createElement(cn,{id:dn,prefixCls:ct,key:ya,tab:Br,style:gi===0?void 0:za,closable:Br.closable,editable:gn,active:ya===pr,renderWrapper:Xn,removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,onClick:function(Va){Zn(ya,Va)},onFocus:function(){Sa(ya),qi(),qe.current&&(Hn||(qe.current.scrollLeft=0),qe.current.scrollTop=0)}})}),Qa=function(){return Yr(function(){var gi=new Map;return yt.forEach(function(ya){var na,Va=ya.key,Za=(na=Xe.current)===null||na===void 0?void 0:na.querySelector('[data-node-key="'.concat(Te(Va),'"]'));Za&&gi.set(Va,{width:Za.offsetWidth,height:Za.offsetHeight,left:Za.offsetLeft,top:Za.offsetTop})}),gi})};(0,Re.useEffect)(function(){Qa()},[yt.map(function(Br){return Br.key}).join("_")]);var Ra=Bn(function(){var Br=gt(ze),gi=gt(xe),ya=gt(Ae);jn([Br[0]-gi[0]-ya[0],Br[1]-gi[1]-ya[1]]);var na=gt(Ft);ri(na);var Va=gt(St);jr(Va);var Za=gt(Xe);rr([Za[0]-na[0],Za[1]-na[1]]),Qa()}),la=yt.slice(0,Aa),di=yt.slice(da+1),Mi=[].concat((0,at.Z)(la),(0,at.Z)(di)),Qi=fi.get(pr),pa=Dt({activeTabOffset:Qi,horizontal:Wt,rtl:Hn,indicatorSize:Ze}),Ka=pa.style;(0,Re.useEffect)(function(){Sa()},[pr,qr,vr,Dn(Qi),Dn(fi),Wt]),(0,Re.useEffect)(function(){Ra()},[Hn]);var eo=!!Mi.length,uo="".concat(ct,"-nav-wrap"),_o,ko,to,Da;return Wt?Hn?(ko=Ot>0,_o=Ot!==vr):(_o=Ot<0,ko=Ot!==qr):(to=Sn<0,Da=Sn!==qr),Re.createElement(Vt.Z,{onResize:Ra},Re.createElement("div",{ref:En(He,ze),role:"tablist",className:ve()("".concat(ct,"-nav"),kt),style:sn,onKeyDown:function(){qi()}},Re.createElement(oe,{ref:xe,position:"left",extra:Cn,prefixCls:ct}),Re.createElement(Vt.Z,{onResize:Ra},Re.createElement("div",{className:ve()(uo,(Ke={},(0,Me.Z)(Ke,"".concat(uo,"-ping-left"),_o),(0,Me.Z)(Ke,"".concat(uo,"-ping-right"),ko),(0,Me.Z)(Ke,"".concat(uo,"-ping-top"),to),(0,Me.Z)(Ke,"".concat(uo,"-ping-bottom"),Da),Ke)),ref:qe},Re.createElement(Vt.Z,{onResize:Ra},Re.createElement("div",{ref:Xe,className:"".concat(ct,"-nav-list"),style:{transform:"translate(".concat(Ot,"px, ").concat(Sn,"px)"),transition:ti?"none":void 0}},ja,Re.createElement(pe,{ref:Ft,prefixCls:ct,locale:Pn,editable:gn,style:(0,Se.Z)((0,Se.Z)({},ja.length===0?void 0:za),{},{visibility:eo?"hidden":null})}),Re.createElement("div",{className:ve()("".concat(ct,"-ink-bar"),(0,Me.Z)({},"".concat(ct,"-ink-bar-animated"),Gn.inkBar)),style:Ka}))))),Re.createElement(zt,(0,Le.Z)({},Oe,{removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,ref:St,prefixCls:ct,tabs:Mi,className:!eo&&Yi,tabMoving:!!ti})),Re.createElement(oe,{ref:Ae,position:"right",extra:Cn,prefixCls:ct})))}var Rn=Re.forwardRef(Yt),br=["renderTabBar"],Wn=["label","key"];function Jn(Oe){var He=Oe.renderTabBar,Ke=(0,st.Z)(Oe,br),Ve=Re.useContext(je),ct=Ve.tabs;if(He){var yt=(0,Se.Z)((0,Se.Z)({},Ke),{},{panes:ct.map(function(kt){var sn=kt.label,dn=kt.key,Gn=(0,st.Z)(kt,Wn);return Re.createElement(Lt,(0,Le.Z)({tab:sn,key:dn,tabKey:dn},Gn))})});return He(yt,Rn)}return Re.createElement(Rn,Ke)}var or={},lr=[],Rr=function(He){lr.push(He)};function bn(Oe,He){if(0)var Ke}function An(Oe,He){if(0)var Ke}function hi(){or={}}function xi(Oe,He,Ke){!He&&!or[Ke]&&(Oe(!1,Ke),or[Ke]=!0)}function ai(Oe,He){xi(bn,Oe,He)}function sr(Oe,He){xi(An,Oe,He)}ai.preMessage=Rr,ai.resetWarned=hi,ai.noteOnce=sr;var vi=null;function ur(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},He;return Oe===!1?He={inkBar:!1,tabPane:!1}:Oe===!0?He={inkBar:!0,tabPane:!1}:He=(0,Se.Z)({inkBar:!0},(0,Pe.Z)(Oe)==="object"?Oe:{}),He.tabPaneMotion&&He.tabPane===void 0&&(He.tabPane=!0),!He.tabPaneMotion&&He.tabPane&&(He.tabPane=!1),He}var Qr=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],kn=0;function ia(Oe,He){var Ke,Ve=Oe.id,ct=Oe.prefixCls,yt=ct===void 0?"rc-tabs":ct,kt=Oe.className,sn=Oe.items,dn=Oe.direction,Gn=Oe.activeKey,pr=Oe.defaultActiveKey,Hn=Oe.editable,Cn=Oe.animated,gn=Oe.tabPosition,Pn=gn===void 0?"top":gn,Fn=Oe.tabBarGutter,dr=Oe.tabBarStyle,Xn=Oe.tabBarExtraContent,Zn=Oe.locale,Qn=Oe.moreIcon,Ze=Oe.moreTransitionName,ze=Oe.destroyInactiveTabPane,xe=Oe.renderTabBar,Ae=Oe.onChange,qe=Oe.onTabClick,Xe=Oe.onTabScroll,St=Oe.getPopupContainer,Ft=Oe.popupClassName,Wt=Oe.indicatorSize,an=(0,st.Z)(Oe,Qr),nn=Re.useMemo(function(){return(sn||[]).filter(function(jr){return jr&&(0,Pe.Z)(jr)==="object"&&"key"in jr})},[sn]),Ot=dn==="rtl",un=ur(Cn),hn=(0,Re.useState)(!1),zn=(0,me.Z)(hn,2),Sn=zn[0],qn=zn[1];(0,Re.useEffect)(function(){qn(Et())},[]);var fr=Ee(function(){var jr;return(jr=nn[0])===null||jr===void 0?void 0:jr.key},{value:Gn,defaultValue:pr}),er=(0,me.Z)(fr,2),mr=er[0],jn=er[1],ar=(0,Re.useState)(function(){return nn.findIndex(function(jr){return jr.key===mr})}),Mr=(0,me.Z)(ar,2),Nr=Mr[0],rr=Mr[1];(0,Re.useEffect)(function(){var jr=nn.findIndex(function(wr){return wr.key===mr});if(jr===-1){var Gr;jr=Math.max(0,Math.min(Nr,nn.length-1)),jn((Gr=nn[jr])===null||Gr===void 0?void 0:Gr.key)}rr(jr)},[nn.map(function(jr){return jr.key}).join("_"),mr,Nr]);var Dr=Ee(null,{value:Ve}),$r=(0,me.Z)(Dr,2),mi=$r[0],ri=$r[1];(0,Re.useEffect)(function(){Ve||(ri("rc-tabs-".concat(kn)),kn+=1)},[]);function Ur(jr,Gr){qe==null||qe(jr,Gr);var wr=jr!==mr;jn(jr),wr&&(Ae==null||Ae(jr))}var ui={id:mi,activeKey:mr,animated:un,tabPosition:Pn,rtl:Ot,mobile:Sn},pi=(0,Se.Z)((0,Se.Z)({},ui),{},{editable:Hn,locale:Zn,moreIcon:Qn,moreTransitionName:Ze,tabBarGutter:Fn,onTabClick:Ur,onTabScroll:Xe,extra:Xn,style:dr,panes:null,getPopupContainer:St,popupClassName:Ft,indicatorSize:Wt});return Re.createElement(je.Provider,{value:{tabs:nn,prefixCls:yt}},Re.createElement("div",(0,Le.Z)({ref:He,id:Ve,className:ve()(yt,"".concat(yt,"-").concat(Pn),(Ke={},(0,Me.Z)(Ke,"".concat(yt,"-mobile"),Sn),(0,Me.Z)(Ke,"".concat(yt,"-editable"),Hn),(0,Me.Z)(Ke,"".concat(yt,"-rtl"),Ot),Ke),kt)},an),Re.createElement(Jn,(0,Le.Z)({},pi,{renderTabBar:xe})),Re.createElement(Bt,(0,Le.Z)({destroyInactiveTabPane:ze},ui,{animated:un}))))}var zi=Re.forwardRef(ia),Ma=zi,Ji=Ma,Zi=se(53124),xa=se(98675),Ni=()=>null,fa=se(33603);const Ta={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ga(Oe){let He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ke;return He===!1?Ke={inkBar:!1,tabPane:!1}:He===!0?Ke={inkBar:!0,tabPane:!0}:Ke=Object.assign({inkBar:!0},typeof He=="object"?He:{}),Ke.tabPane&&(Ke.tabPaneMotion=Object.assign(Object.assign({},Ta),{motionName:(0,fa.m)(Oe,"switch")})),Ke}var Hi=se(37419),Ia=function(Oe,He){var Ke={};for(var Ve in Oe)Object.prototype.hasOwnProperty.call(Oe,Ve)&&He.indexOf(Ve)<0&&(Ke[Ve]=Oe[Ve]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ve=Object.getOwnPropertySymbols(Oe);ct<Ve.length;ct++)He.indexOf(Ve[ct])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Ve[ct])&&(Ke[Ve[ct]]=Oe[Ve[ct]]);return Ke};function Oa(Oe){return Oe.filter(He=>He)}function wa(Oe,He){if(Oe)return Oe;const Ke=(0,Hi.Z)(He).map(Ve=>{if(Re.isValidElement(Ve)){const{key:ct,props:yt}=Ve,kt=yt||{},{tab:sn}=kt,dn=Ia(kt,["tab"]);return Object.assign(Object.assign({key:String(ct)},dn),{label:sn})}return null});return Oa(Ke)}var _i=se(14747),Mt=se(67968),wt=se(45503),tn=se(67771),Kn=Oe=>{const{componentCls:He,motionDurationSlow:Ke}=Oe;return[{[He]:{[`${He}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ke}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ke}`}}}}},[(0,tn.oN)(Oe,"slide-up"),(0,tn.oN)(Oe,"slide-down")]]};const Ar=Oe=>{const{componentCls:He,tabsCardPadding:Ke,cardBg:Ve,cardGutter:ct,colorBorderSecondary:yt,itemSelectedColor:kt}=Oe;return{[`${He}-card`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab`]:{margin:0,padding:Ke,background:Ve,border:`${Oe.lineWidth}px ${Oe.lineType} ${yt}`,transition:`all ${Oe.motionDurationSlow} ${Oe.motionEaseInOut}`},[`${He}-tab-active`]:{color:kt,background:Oe.colorBgContainer},[`${He}-ink-bar`]:{visibility:"hidden"}},[`&${He}-top, &${He}-bottom`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab + ${He}-tab`]:{marginLeft:{_skip_check_:!0,value:`${ct}px`}}}},[`&${He}-top`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab`]:{borderRadius:`${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0 0`},[`${He}-tab-active`]:{borderBottomColor:Oe.colorBgContainer}}},[`&${He}-bottom`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab`]:{borderRadius:`0 0 ${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px`},[`${He}-tab-active`]:{borderTopColor:Oe.colorBgContainer}}},[`&${He}-left, &${He}-right`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab + ${He}-tab`]:{marginTop:`${ct}px`}}},[`&${He}-left`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Oe.borderRadiusLG}px 0 0 ${Oe.borderRadiusLG}px`}},[`${He}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:Oe.colorBgContainer}}}},[`&${He}-right`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0`}},[`${He}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:Oe.colorBgContainer}}}}}}},Tr=Oe=>{const{componentCls:He,itemHoverColor:Ke,dropdownEdgeChildVerticalPadding:Ve}=Oe;return{[`${He}-dropdown`]:Object.assign(Object.assign({},(0,_i.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Oe.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${He}-dropdown-menu`]:{maxHeight:Oe.tabsDropdownHeight,margin:0,padding:`${Ve}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:Oe.colorBgContainer,backgroundClip:"padding-box",borderRadius:Oe.borderRadiusLG,outline:"none",boxShadow:Oe.boxShadowSecondary,"&-item":Object.assign(Object.assign({},_i.vS),{display:"flex",alignItems:"center",minWidth:Oe.tabsDropdownWidth,margin:0,padding:`${Oe.paddingXXS}px ${Oe.paddingSM}px`,color:Oe.colorText,fontWeight:"normal",fontSize:Oe.fontSize,lineHeight:Oe.lineHeight,cursor:"pointer",transition:`all ${Oe.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:Oe.marginSM},color:Oe.colorTextDescription,fontSize:Oe.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Ke}},"&:hover":{background:Oe.controlItemBgHover},"&-disabled":{"&, &:hover":{color:Oe.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Hr=Oe=>{const{componentCls:He,margin:Ke,colorBorderSecondary:Ve,horizontalMargin:ct,verticalItemPadding:yt,verticalItemMargin:kt}=Oe;return{[`${He}-top, ${He}-bottom`]:{flexDirection:"column",[`> ${He}-nav, > div > ${He}-nav`]:{margin:ct,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Oe.lineWidth}px ${Oe.lineType} ${Ve}`,content:"''"},[`${He}-ink-bar`]:{height:Oe.lineWidthBold,"&-animated":{transition:`width ${Oe.motionDurationSlow}, left ${Oe.motionDurationSlow},
right ${Oe.motionDurationSlow}`}},[`${He}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:Oe.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:Oe.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:Oe.boxShadowTabsOverflowRight},[`&${He}-nav-wrap-ping-left::before`]:{opacity:1},[`&${He}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${He}-top`]:{[`> ${He}-nav,
> div > ${He}-nav`]:{"&::before":{bottom:0},[`${He}-ink-bar`]:{bottom:0}}},[`${He}-bottom`]:{[`> ${He}-nav, > div > ${He}-nav`]:{order:1,marginTop:`${Ke}px`,marginBottom:0,"&::before":{top:0},[`${He}-ink-bar`]:{top:0}},[`> ${He}-content-holder, > div > ${He}-content-holder`]:{order:0}},[`${He}-left, ${He}-right`]:{[`> ${He}-nav, > div > ${He}-nav`]:{flexDirection:"column",minWidth:Oe.controlHeight*1.25,[`${He}-tab`]:{padding:yt,textAlign:"center"},[`${He}-tab + ${He}-tab`]:{margin:kt},[`${He}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:Oe.controlHeight},"&::before":{top:0,boxShadow:Oe.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:Oe.boxShadowTabsOverflowBottom},[`&${He}-nav-wrap-ping-top::before`]:{opacity:1},[`&${He}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${He}-ink-bar`]:{width:Oe.lineWidthBold,"&-animated":{transition:`height ${Oe.motionDurationSlow}, top ${Oe.motionDurationSlow}`}},[`${He}-nav-list, ${He}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${He}-left`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${He}-content-holder, > div > ${He}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${Oe.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${Oe.lineWidth}px ${Oe.lineType} ${Oe.colorBorder}`},[`> ${He}-content > ${He}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:Oe.paddingLG}}}},[`${He}-right`]:{[`> ${He}-nav, > div > ${He}-nav`]:{order:1,[`${He}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${He}-content-holder, > div > ${He}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-Oe.lineWidth},borderRight:{_skip_check_:!0,value:`${Oe.lineWidth}px ${Oe.lineType} ${Oe.colorBorder}`},[`> ${He}-content > ${He}-tabpane`]:{paddingRight:{_skip_check_:!0,value:Oe.paddingLG}}}}}},Xr=Oe=>{const{componentCls:He,cardPaddingSM:Ke,cardPaddingLG:Ve,horizontalItemPaddingSM:ct,horizontalItemPaddingLG:yt}=Oe;return{[He]:{"&-small":{[`> ${He}-nav`]:{[`${He}-tab`]:{padding:ct,fontSize:Oe.titleFontSizeSM}}},"&-large":{[`> ${He}-nav`]:{[`${He}-tab`]:{padding:yt,fontSize:Oe.titleFontSizeLG}}}},[`${He}-card`]:{[`&${He}-small`]:{[`> ${He}-nav`]:{[`${He}-tab`]:{padding:Ke}},[`&${He}-bottom`]:{[`> ${He}-nav ${He}-tab`]:{borderRadius:`0 0 ${Oe.borderRadius}px ${Oe.borderRadius}px`}},[`&${He}-top`]:{[`> ${He}-nav ${He}-tab`]:{borderRadius:`${Oe.borderRadius}px ${Oe.borderRadius}px 0 0`}},[`&${He}-right`]:{[`> ${He}-nav ${He}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Oe.borderRadius}px ${Oe.borderRadius}px 0`}}},[`&${He}-left`]:{[`> ${He}-nav ${He}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Oe.borderRadius}px 0 0 ${Oe.borderRadius}px`}}}},[`&${He}-large`]:{[`> ${He}-nav`]:{[`${He}-tab`]:{padding:Ve}}}}}},Zr=Oe=>{const{componentCls:He,itemActiveColor:Ke,itemHoverColor:Ve,iconCls:ct,tabsHorizontalItemMargin:yt,horizontalItemPadding:kt,itemSelectedColor:sn,itemColor:dn}=Oe,Gn=`${He}-tab`;return{[Gn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:kt,fontSize:Oe.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:dn,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ke}},(0,_i.Qy)(Oe)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-Oe.marginXXS},marginLeft:{_skip_check_:!0,value:Oe.marginXS},color:Oe.colorTextDescription,fontSize:Oe.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${Oe.motionDurationSlow}`,"&:hover":{color:Oe.colorTextHeading}},"&:hover":{color:Ve},[`&${Gn}-active ${Gn}-btn`]:{color:sn,textShadow:Oe.tabsActiveTextShadow},[`&${Gn}-disabled`]:{color:Oe.colorTextDisabled,cursor:"not-allowed"},[`&${Gn}-disabled ${Gn}-btn, &${Gn}-disabled ${He}-remove`]:{"&:focus, &:active":{color:Oe.colorTextDisabled}},[`& ${Gn}-remove ${ct}`]:{margin:0},[ct]:{marginRight:{_skip_check_:!0,value:Oe.marginSM}}},[`${Gn} + ${Gn}`]:{margin:{_skip_check_:!0,value:yt}}}},wi=Oe=>{const{componentCls:He,tabsHorizontalItemMarginRTL:Ke,iconCls:Ve,cardGutter:ct}=Oe;return{[`${He}-rtl`]:{direction:"rtl",[`${He}-nav`]:{[`${He}-tab`]:{margin:{_skip_check_:!0,value:Ke},[`${He}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Ve]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${Oe.marginSM}px`}},[`${He}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${Oe.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${Oe.marginXXS}px`},[Ve]:{margin:0}}}},[`&${He}-left`]:{[`> ${He}-nav`]:{order:1},[`> ${He}-content-holder`]:{order:0}},[`&${He}-right`]:{[`> ${He}-nav`]:{order:0},[`> ${He}-content-holder`]:{order:1}},[`&${He}-card${He}-top, &${He}-card${He}-bottom`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-tab + ${He}-tab`]:{marginRight:{_skip_check_:!0,value:ct},marginLeft:{_skip_check_:!0,value:0}}}}},[`${He}-dropdown-rtl`]:{direction:"rtl"},[`${He}-menu-item`]:{[`${He}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},ki=Oe=>{const{componentCls:He,tabsCardPadding:Ke,cardHeight:Ve,cardGutter:ct,itemHoverColor:yt,itemActiveColor:kt,colorBorderSecondary:sn}=Oe;return{[He]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,_i.Wf)(Oe)),{display:"flex",[`> ${He}-nav, > div > ${He}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${He}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${Oe.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${He}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${Oe.motionDurationSlow}`},[`${He}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${He}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${He}-nav-more`]:{position:"relative",padding:Ke,background:"transparent",border:0,color:Oe.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:Oe.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${He}-nav-add`]:Object.assign({minWidth:Ve,marginLeft:{_skip_check_:!0,value:ct},padding:`0 ${Oe.paddingXS}px`,background:"transparent",border:`${Oe.lineWidth}px ${Oe.lineType} ${sn}`,borderRadius:`${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:Oe.colorText,transition:`all ${Oe.motionDurationSlow} ${Oe.motionEaseInOut}`,"&:hover":{color:yt},"&:active, &:focus:not(:focus-visible)":{color:kt}},(0,_i.Qy)(Oe))},[`${He}-extra-content`]:{flex:"none"},[`${He}-ink-bar`]:{position:"absolute",background:Oe.inkBarColor,pointerEvents:"none"}}),Zr(Oe)),{[`${He}-content`]:{position:"relative",width:"100%"},[`${He}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${He}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${He}-centered`]:{[`> ${He}-nav, > div > ${He}-nav`]:{[`${He}-nav-wrap`]:{[`&:not([class*='${He}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Ri=(0,Mt.Z)("Tabs",Oe=>{const He=(0,wt.TS)(Oe,{tabsCardPadding:Oe.cardPadding||`${(Oe.cardHeight-Math.round(Oe.fontSize*Oe.lineHeight))/2-Oe.lineWidth}px ${Oe.padding}px`,dropdownEdgeChildVerticalPadding:Oe.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Oe.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${Oe.horizontalItemGutter}px`});return[Xr(He),wi(He),Hr(He),Tr(He),Ar(He),ki(He),Kn(He)]},Oe=>{const He=Oe.controlHeightLG;return{zIndexPopup:Oe.zIndexPopupBase+50,cardBg:Oe.colorFillAlter,cardHeight:He,cardPadding:"",cardPaddingSM:`${Oe.paddingXXS*1.5}px ${Oe.padding}px`,cardPaddingLG:`${Oe.paddingXS}px ${Oe.padding}px ${Oe.paddingXXS*1.5}px`,titleFontSize:Oe.fontSize,titleFontSizeLG:Oe.fontSizeLG,titleFontSizeSM:Oe.fontSize,inkBarColor:Oe.colorPrimary,horizontalMargin:`0 0 ${Oe.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${Oe.paddingSM}px 0`,horizontalItemPaddingSM:`${Oe.paddingXS}px 0`,horizontalItemPaddingLG:`${Oe.padding}px 0`,verticalItemPadding:`${Oe.paddingXS}px ${Oe.paddingLG}px`,verticalItemMargin:`${Oe.margin}px 0 0 0`,itemColor:Oe.colorText,itemSelectedColor:Oe.colorPrimary,itemHoverColor:Oe.colorPrimaryHover,itemActiveColor:Oe.colorPrimaryActive,cardGutter:Oe.marginXXS/2}}),oa=function(Oe,He){var Ke={};for(var Ve in Oe)Object.prototype.hasOwnProperty.call(Oe,Ve)&&He.indexOf(Ve)<0&&(Ke[Ve]=Oe[Ve]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ve=Object.getOwnPropertySymbols(Oe);ct<Ve.length;ct++)He.indexOf(Ve[ct])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Ve[ct])&&(Ke[Ve[ct]]=Oe[Ve[ct]]);return Ke};const Wi=Oe=>{const{type:He,className:Ke,rootClassName:Ve,size:ct,onEdit:yt,hideAdd:kt,centered:sn,addIcon:dn,popupClassName:Gn,children:pr,items:Hn,animated:Cn,style:gn,indicatorSize:Pn}=Oe,Fn=oa(Oe,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:dr,moreIcon:Xn=Re.createElement(Ue.Z,null)}=Fn,{direction:Zn,tabs:Qn,getPrefixCls:Ze,getPopupContainer:ze}=Re.useContext(Zi.E_),xe=Ze("tabs",dr),[Ae,qe]=Ri(xe);let Xe;He==="editable-card"&&(Xe={onEdit:(Ot,un)=>{let{key:hn,event:zn}=un;yt==null||yt(Ot==="add"?zn:hn,Ot)},removeIcon:Re.createElement(ce.Z,null),addIcon:dn||Re.createElement(Fe.Z,null),showAdd:kt!==!0});const St=Ze(),Ft=wa(Hn,pr),Wt=ga(xe,Cn),an=(0,xa.Z)(ct),nn=Object.assign(Object.assign({},Qn==null?void 0:Qn.style),gn);return Ae(Re.createElement(Ji,Object.assign({direction:Zn,getPopupContainer:ze,moreTransitionName:`${St}-slide-up`},Fn,{items:Ft,className:ve()({[`${xe}-${an}`]:an,[`${xe}-card`]:["card","editable-card"].includes(He),[`${xe}-editable-card`]:He==="editable-card",[`${xe}-centered`]:sn},Qn==null?void 0:Qn.className,Ke,Ve,qe),popupClassName:ve()(Gn,qe),style:nn,editable:Xe,moreIcon:Xn,prefixCls:xe,animated:Wt,indicatorSize:Pn!=null?Pn:Qn==null?void 0:Qn.indicatorSize})))};Wi.TabPane=Ni;var Xi=Wi},72665:function(Ln,en){"use strict";var se;var ce=typeof Symbol=="function"&&Symbol.for,Ue=ce?Symbol.for("react.element"):60103,Fe=ce?Symbol.for("react.portal"):60106,it=ce?Symbol.for("react.fragment"):60107,ve=ce?Symbol.for("react.strict_mode"):60108,Le=ce?Symbol.for("react.profiler"):60114,Me=ce?Symbol.for("react.provider"):60109,Se=ce?Symbol.for("react.context"):60110,me=ce?Symbol.for("react.async_mode"):60111,Pe=ce?Symbol.for("react.concurrent_mode"):60111,st=ce?Symbol.for("react.forward_ref"):60112,Re=ce?Symbol.for("react.suspense"):60113,Et=ce?Symbol.for("react.suspense_list"):60120,ht=ce?Symbol.for("react.memo"):60115,lt=ce?Symbol.for("react.lazy"):60116,et=ce?Symbol.for("react.block"):60121,ke=ce?Symbol.for("react.fundamental"):60117,vt=ce?Symbol.for("react.responder"):60118,jt=ce?Symbol.for("react.scope"):60119;function tt(Ee){if(typeof Ee=="object"&&Ee!==null){var we=Ee.$$typeof;switch(we){case Ue:switch(Ee=Ee.type,Ee){case me:case Pe:case it:case Le:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case st:case lt:case ht:case Me:return Ee;default:return we}}case Fe:return we}}}function ut(Ee){return tt(Ee)===Pe}se=me,se=Pe,se=Se,se=Me,se=Ue,se=st,se=it,se=lt,se=ht,se=Fe,se=Le,se=ve,se=Re,se=function(Ee){return ut(Ee)||tt(Ee)===me},se=ut,se=function(Ee){return tt(Ee)===Se},se=function(Ee){return tt(Ee)===Me},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Ue},se=function(Ee){return tt(Ee)===st},se=function(Ee){return tt(Ee)===it},se=function(Ee){return tt(Ee)===lt},en.isMemo=function(Ee){return tt(Ee)===ht},se=function(Ee){return tt(Ee)===Fe},se=function(Ee){return tt(Ee)===Le},se=function(Ee){return tt(Ee)===ve},se=function(Ee){return tt(Ee)===Re},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===it||Ee===Pe||Ee===Le||Ee===ve||Ee===Re||Ee===Et||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===lt||Ee.$$typeof===ht||Ee.$$typeof===Me||Ee.$$typeof===Se||Ee.$$typeof===st||Ee.$$typeof===ke||Ee.$$typeof===vt||Ee.$$typeof===jt||Ee.$$typeof===et)},se=tt},12060:function(Ln,en,se){"use strict";Ln.exports=se(72665)},41771:function(Ln,en){"use strict";var se;var ce=typeof Symbol=="function"&&Symbol.for,Ue=ce?Symbol.for("react.element"):60103,Fe=ce?Symbol.for("react.portal"):60106,it=ce?Symbol.for("react.fragment"):60107,ve=ce?Symbol.for("react.strict_mode"):60108,Le=ce?Symbol.for("react.profiler"):60114,Me=ce?Symbol.for("react.provider"):60109,Se=ce?Symbol.for("react.context"):60110,me=ce?Symbol.for("react.async_mode"):60111,Pe=ce?Symbol.for("react.concurrent_mode"):60111,st=ce?Symbol.for("react.forward_ref"):60112,Re=ce?Symbol.for("react.suspense"):60113,Et=ce?Symbol.for("react.suspense_list"):60120,ht=ce?Symbol.for("react.memo"):60115,lt=ce?Symbol.for("react.lazy"):60116,et=ce?Symbol.for("react.block"):60121,ke=ce?Symbol.for("react.fundamental"):60117,vt=ce?Symbol.for("react.responder"):60118,jt=ce?Symbol.for("react.scope"):60119;function tt(Ee){if(typeof Ee=="object"&&Ee!==null){var we=Ee.$$typeof;switch(we){case Ue:switch(Ee=Ee.type,Ee){case me:case Pe:case it:case Le:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case st:case lt:case ht:case Me:return Ee;default:return we}}case Fe:return we}}}function ut(Ee){return tt(Ee)===Pe}se=me,se=Pe,se=Se,se=Me,se=Ue,se=st,se=it,se=lt,se=ht,se=Fe,se=Le,se=ve,se=Re,se=function(Ee){return ut(Ee)||tt(Ee)===me},se=ut,se=function(Ee){return tt(Ee)===Se},se=function(Ee){return tt(Ee)===Me},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Ue},se=function(Ee){return tt(Ee)===st},en.isFragment=function(Ee){return tt(Ee)===it},se=function(Ee){return tt(Ee)===lt},se=function(Ee){return tt(Ee)===ht},se=function(Ee){return tt(Ee)===Fe},se=function(Ee){return tt(Ee)===Le},se=function(Ee){return tt(Ee)===ve},se=function(Ee){return tt(Ee)===Re},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===it||Ee===Pe||Ee===Le||Ee===ve||Ee===Re||Ee===Et||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===lt||Ee.$$typeof===ht||Ee.$$typeof===Me||Ee.$$typeof===Se||Ee.$$typeof===st||Ee.$$typeof===ke||Ee.$$typeof===vt||Ee.$$typeof===jt||Ee.$$typeof===et)},se=tt},47655:function(Ln,en,se){"use strict";Ln.exports=se(41771)},64701:function(Ln,en,se){"use strict";se.r(en),se.d(en,{ResizableTextArea:function(){return In},default:function(){return wn}});var ce=se(87462),Ue=se(1413),Fe=se(4942),it=se(71002),ve=se(97685),Le=se(45987),Me=se(74902),Se=se(94184),me=se.n(Se),Pe=se(67656),st=se(87887),Re=se(67294);function Et(Nt){var Xt=Re.useRef();Xt.current=Nt;var Dn=Re.useCallback(function(){for(var Mn,Te=arguments.length,de=new Array(Te),le=0;le<Te;le++)de[le]=arguments[le];return(Mn=Xt.current)===null||Mn===void 0?void 0:Mn.call.apply(Mn,[Xt].concat(de))},[]);return Dn}function ht(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=ht()?Re.useLayoutEffect:Re.useEffect,et=lt,ke=function(Xt,Dn){var Mn=Re.useRef(!0);lt(function(){if(!Mn.current)return Xt()},Dn),lt(function(){return Mn.current=!1,function(){Mn.current=!0}},[])};function vt(Nt){var Xt=Re.useRef(!1),Dn=Re.useState(Nt),Mn=(0,ve.Z)(Dn,2),Te=Mn[0],de=Mn[1];Re.useEffect(function(){return Xt.current=!1,function(){Xt.current=!0}},[]);function le(pe,he){he&&Xt.current||de(pe)}return[Te,le]}function jt(Nt){return Nt!==void 0}function tt(Nt,Xt){var Dn=Xt||{},Mn=Dn.defaultValue,Te=Dn.value,de=Dn.onChange,le=Dn.postState,pe=vt(function(){return jt(Te)?Te:jt(Mn)?typeof Mn=="function"?Mn():Mn:typeof Nt=="function"?Nt():Nt}),he=(0,ve.Z)(pe,2),oe=he[0],Ie=he[1],Je=Te!==void 0?Te:oe,_t=le?le(Je):Je,Kt=Et(de),Ht=vt([Je]),Qt=(0,ve.Z)(Ht,2),Gt=Qt[0],nr=Qt[1];ke(function(){var Ut=Gt[0];oe!==Ut&&Kt(oe,Ut)},[Gt]),ke(function(){jt(Te)||Ie(Te)},[Te]);var gr=Et(function(Ut,pn){Ie(Ut,pn),nr([Je],pn)});return[_t,gr]}var ut=se(48555),Ee=function(Xt){return+setTimeout(Xt,16)},we=function(Xt){return clearTimeout(Xt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ee=function(Xt){return window.requestAnimationFrame(Xt)},we=function(Xt){return window.cancelAnimationFrame(Xt)});var je=0,Ye=new Map;function Lt(Nt){Ye.delete(Nt)}var Ct=function(Xt){var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;je+=1;var Mn=je;function Te(de){if(de===0)Lt(Mn),Xt();else{var le=Ee(function(){Te(de-1)});Ye.set(Mn,le)}}return Te(Dn),Mn};Ct.cancel=function(Nt){var Xt=Ye.get(Nt);return Lt(Xt),we(Xt)};var Bt=Ct,at=`
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;
`,Vt=["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"],$t={},xn;function dt(Nt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dn=Nt.getAttribute("id")||Nt.getAttribute("data-reactid")||Nt.getAttribute("name");if(Xt&&$t[Dn])return $t[Dn];var Mn=window.getComputedStyle(Nt),Te=Mn.getPropertyValue("box-sizing")||Mn.getPropertyValue("-moz-box-sizing")||Mn.getPropertyValue("-webkit-box-sizing"),de=parseFloat(Mn.getPropertyValue("padding-bottom"))+parseFloat(Mn.getPropertyValue("padding-top")),le=parseFloat(Mn.getPropertyValue("border-bottom-width"))+parseFloat(Mn.getPropertyValue("border-top-width")),pe=Vt.map(function(oe){return"".concat(oe,":").concat(Mn.getPropertyValue(oe))}).join(";"),he={sizingStyle:pe,paddingSize:de,borderSize:le,boxSizing:Te};return Xt&&Dn&&($t[Dn]=he),he}function on(Nt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Mn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xn||(xn=document.createElement("textarea"),xn.setAttribute("tab-index","-1"),xn.setAttribute("aria-hidden","true"),document.body.appendChild(xn)),Nt.getAttribute("wrap")?xn.setAttribute("wrap",Nt.getAttribute("wrap")):xn.removeAttribute("wrap");var Te=dt(Nt,Xt),de=Te.paddingSize,le=Te.borderSize,pe=Te.boxSizing,he=Te.sizingStyle;xn.setAttribute("style","".concat(he,";").concat(at)),xn.value=Nt.value||Nt.placeholder||"";var oe=void 0,Ie=void 0,Je,_t=xn.scrollHeight;if(pe==="border-box"?_t+=le:pe==="content-box"&&(_t-=de),Dn!==null||Mn!==null){xn.value=" ";var Kt=xn.scrollHeight-de;Dn!==null&&(oe=Kt*Dn,pe==="border-box"&&(oe=oe+de+le),_t=Math.max(oe,_t)),Mn!==null&&(Ie=Kt*Mn,pe==="border-box"&&(Ie=Ie+de+le),Je=_t>Ie?"":"hidden",_t=Math.min(Ie,_t))}var Ht={height:_t,overflowY:Je,resize:"none"};return oe&&(Ht.minHeight=oe),Ie&&(Ht.maxHeight=Ie),Ht}var En=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],yn=0,Ge=1,De=2,Zt=Re.forwardRef(function(Nt,Xt){var Dn=Nt,Mn=Dn.prefixCls,Te=Dn.onPressEnter,de=Dn.defaultValue,le=Dn.value,pe=Dn.autoSize,he=Dn.onResize,oe=Dn.className,Ie=Dn.style,Je=Dn.disabled,_t=Dn.onChange,Kt=Dn.onInternalAutoSize,Ht=(0,Le.Z)(Dn,En),Qt=tt(de,{value:le,postState:function(zt){return zt!=null?zt:""}}),Gt=(0,ve.Z)(Qt,2),nr=Gt[0],gr=Gt[1],Ut=function(zt){gr(zt.target.value),_t==null||_t(zt)},pn=Re.useRef();Re.useImperativeHandle(Xt,function(){return{textArea:pn.current}});var ir=Re.useMemo(function(){return pe&&(0,it.Z)(pe)==="object"?[pe.minRows,pe.maxRows]:[]},[pe]),Lr=(0,ve.Z)(ir,2),$n=Lr[0],Cr=Lr[1],Ii=!!pe,li=function(){try{if(document.activeElement===pn.current){var zt=pn.current,rn=zt.selectionStart,cn=zt.selectionEnd,Vn=zt.scrollTop;pn.current.setSelectionRange(rn,cn),pn.current.scrollTop=Vn}}catch(Nn){}},ci=Re.useState(De),Jr=(0,ve.Z)(ci,2),Di=Jr[0],Ei=Jr[1],Pi=Re.useState(),xr=(0,ve.Z)(Pi,2),Pr=xr[0],Gi=xr[1],ma=function(){Ei(yn)};et(function(){Ii&&ma()},[le,$n,Cr,Ii]),et(function(){if(Di===yn)Ei(Ge);else if(Di===Ge){var Pt=on(pn.current,!1,$n,Cr);Ei(De),Gi(Pt)}else li()},[Di]);var ba=Re.useRef(),va=function(){Bt.cancel(ba.current)},Vi=function(zt){Di===De&&(he==null||he(zt),pe&&(va(),ba.current=Bt(function(){ma()})))};Re.useEffect(function(){return va},[]);var At=Ii?Pr:null,On=(0,Ue.Z)((0,Ue.Z)({},Ie),At);return(Di===yn||Di===Ge)&&(On.overflowY="hidden",On.overflowX="hidden"),Re.createElement(ut.Z,{onResize:Vi,disabled:!(pe||he)},Re.createElement("textarea",(0,ce.Z)({},Ht,{ref:pn,style:On,className:me()(Mn,oe,(0,Fe.Z)({},"".concat(Mn,"-disabled"),Je)),disabled:Je,value:nr,onChange:Ut})))}),In=Zt,fn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ot(Nt,Xt){return(0,Me.Z)(Nt||"").slice(0,Xt).join("")}function ft(Nt,Xt,Dn,Mn){var Te=Dn;return Nt?Te=ot(Dn,Mn):(0,Me.Z)(Xt||"").length<Dn.length&&(0,Me.Z)(Dn||"").length>Mn&&(Te=Xt),Te}var Jt=Re.forwardRef(function(Nt,Xt){var Dn,Mn=Nt.defaultValue,Te=Nt.value,de=Nt.onFocus,le=Nt.onBlur,pe=Nt.onChange,he=Nt.allowClear,oe=Nt.maxLength,Ie=Nt.onCompositionStart,Je=Nt.onCompositionEnd,_t=Nt.suffix,Kt=Nt.prefixCls,Ht=Kt===void 0?"rc-textarea":Kt,Qt=Nt.classes,Gt=Nt.showCount,nr=Nt.className,gr=Nt.style,Ut=Nt.disabled,pn=Nt.hidden,ir=Nt.classNames,Lr=Nt.styles,$n=Nt.onResize,Cr=(0,Le.Z)(Nt,fn),Ii=tt(Mn,{value:Te,defaultValue:Mn}),li=(0,ve.Z)(Ii,2),ci=li[0],Jr=li[1],Di=(0,Re.useRef)(null),Ei=Re.useState(!1),Pi=(0,ve.Z)(Ei,2),xr=Pi[0],Pr=Pi[1],Gi=Re.useState(!1),ma=(0,ve.Z)(Gi,2),ba=ma[0],va=ma[1],Vi=Re.useRef(),At=Re.useRef(0),On=Re.useState(null),Pt=(0,ve.Z)(On,2),zt=Pt[0],rn=Pt[1],cn=function(){var or;(or=Di.current)===null||or===void 0||or.textArea.focus()};(0,Re.useImperativeHandle)(Xt,function(){return{resizableTextArea:Di.current,focus:cn,blur:function(){var or;(or=Di.current)===null||or===void 0||or.textArea.blur()}}}),(0,Re.useEffect)(function(){Pr(function(Jn){return!Ut&&Jn})},[Ut]);var Vn=Number(oe)>0,Nn=function(or){va(!0),Vi.current=ci,At.current=or.currentTarget.selectionStart,Ie==null||Ie(or)},Qe=function(or){va(!1);var lr=or.currentTarget.value;if(Vn){var Rr,bn=At.current>=oe+1||At.current===((Rr=Vi.current)===null||Rr===void 0?void 0:Rr.length);lr=ft(bn,Vi.current,lr,oe)}lr!==ci&&(Jr(lr),(0,st.rJ)(or.currentTarget,or,pe,lr)),Je==null||Je(or)},rt=function(or){var lr=or.target.value;if(!ba&&Vn){var Rr=or.target.selectionStart>=oe+1||or.target.selectionStart===lr.length||!or.target.selectionStart;lr=ft(Rr,ci,lr,oe)}Jr(lr),(0,st.rJ)(or.currentTarget,or,pe,lr)},pt=function(or){var lr=Cr.onPressEnter,Rr=Cr.onKeyDown;or.key==="Enter"&&lr&&lr(or),Rr==null||Rr(or)},Rt=function(or){Pr(!0),de==null||de(or)},We=function(or){Pr(!1),le==null||le(or)},mt=function(or){var lr;Jr(""),cn(),(0,st.rJ)((lr=Di.current)===null||lr===void 0?void 0:lr.textArea,or,pe)},Dt=(0,st.D7)(ci);!ba&&Vn&&Te==null&&(Dt=ot(Dt,oe));var gt=_t,qt;if(Gt){var Yt=(0,Me.Z)(Dt).length;(0,it.Z)(Gt)==="object"?qt=Gt.formatter({value:Dt,count:Yt,maxLength:oe}):qt="".concat(Yt).concat(Vn?" / ".concat(oe):""),gt=Re.createElement(Re.Fragment,null,gt,Re.createElement("span",{className:me()("".concat(Ht,"-data-count"),ir==null?void 0:ir.count),style:Lr==null?void 0:Lr.count},qt))}var Rn=function(or){var lr;$n==null||$n(or),(lr=Di.current)!==null&&lr!==void 0&&lr.textArea.style.height&&rn(!0)},br=!Cr.autoSize&&!Gt&&!he,Wn=Re.createElement(Pe.BaseInput,{value:Dt,allowClear:he,handleReset:mt,suffix:gt,prefixCls:Ht,classes:{affixWrapper:me()(Qt==null?void 0:Qt.affixWrapper,(Dn={},(0,Fe.Z)(Dn,"".concat(Ht,"-show-count"),Gt),(0,Fe.Z)(Dn,"".concat(Ht,"-textarea-allow-clear"),he),Dn))},disabled:Ut,focused:xr,className:nr,style:(0,Ue.Z)((0,Ue.Z)({},gr),zt&&!br?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof qt=="string"?qt:void 0}},hidden:pn,inputElement:Re.createElement(In,(0,ce.Z)({},Cr,{onKeyDown:pt,onChange:rt,onFocus:Rt,onBlur:We,onCompositionStart:Nn,onCompositionEnd:Qe,className:ir==null?void 0:ir.textarea,style:(0,Ue.Z)((0,Ue.Z)({},Lr==null?void 0:Lr.textarea),{},{resize:gr==null?void 0:gr.resize}),disabled:Ut,prefixCls:Ht,onResize:Rn,ref:Di}))});return Wn}),Bn=Jt,wn=Bn},1337:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Se}});var ce=se(1413),Ue=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Fe=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,it="".concat(Ue," ").concat(Fe).split(/[\s\n]+/),ve="aria-",Le="data-";function Me(me,Pe){return me.indexOf(Pe)===0}function Se(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st;Pe===!1?st={aria:!0,data:!0,attr:!0}:Pe===!0?st={aria:!0}:st=(0,ce.Z)({},Pe);var Re={};return Object.keys(me).forEach(function(Et){(st.aria&&(Et==="role"||Me(Et,ve))||st.data&&Me(Et,Le)||st.attr&&it.includes(Et))&&(Re[Et]=me[Et])}),Re}},88386:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){ce.defineOption("placeholder","",function(Se,me,Pe){var st=Pe&&Pe!=ce.Init;if(me&&!st)Se.on("blur",ve),Se.on("change",Le),Se.on("swapDoc",Le),ce.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){it(Se)}),Le(Se);else if(!me&&st){Se.off("blur",ve),Se.off("change",Le),Se.off("swapDoc",Le),ce.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),Ue(Se);var Re=Se.getWrapperElement();Re.className=Re.className.replace(" CodeMirror-empty","")}me&&!Se.hasFocus()&&ve(Se)});function Ue(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function Fe(Se){Ue(Se);var me=Se.state.placeholder=document.createElement("pre");me.style.cssText="height: 0; overflow: visible",me.style.direction=Se.getOption("direction"),me.className="CodeMirror-placeholder CodeMirror-line-like";var Pe=Se.getOption("placeholder");typeof Pe=="string"&&(Pe=document.createTextNode(Pe)),me.appendChild(Pe),Se.display.lineSpace.insertBefore(me,Se.display.lineSpace.firstChild)}function it(Se){setTimeout(function(){var me=!1,Pe=Se.getInputField();Pe.nodeName=="TEXTAREA"?me=!Pe.value:Se.lineCount()==1&&(me=!/[^\u200b]/.test(Pe.querySelector(".CodeMirror-line").textContent)),me?Fe(Se):Ue(Se)},20)}function ve(Se){Me(Se)&&Fe(Se)}function Le(Se){var me=Se.getWrapperElement(),Pe=Me(Se);me.className=me.className.replace(" CodeMirror-empty","")+(Pe?" CodeMirror-empty":""),Pe?Fe(Se):Ue(Se)}function Me(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},82801:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){var Ue={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(lt,et,ke){ke&&ke!=ce.Init&&(lt.removeKeyMap(ve),lt.state.closeBrackets=null),et&&(Le(it(et,"pairs")),lt.state.closeBrackets=et,lt.addKeyMap(ve))});function it(lt,et){return et=="pairs"&&typeof lt=="string"?lt:typeof lt=="object"&&lt[et]!=null?lt[et]:Ue[et]}var ve={Backspace:me,Enter:Pe};function Le(lt){for(var et=0;et<lt.length;et++){var ke=lt.charAt(et),vt="'"+ke+"'";ve[vt]||(ve[vt]=Me(ke))}}Le(Ue.pairs+"`");function Me(lt){return function(et){return Re(et,lt)}}function Se(lt){var et=lt.state.closeBrackets;if(!et||et.override)return et;var ke=lt.getModeAt(lt.getCursor());return ke.closeBrackets||et}function me(lt){var et=Se(lt);if(!et||lt.getOption("disableInput"))return ce.Pass;for(var ke=it(et,"pairs"),vt=lt.listSelections(),jt=0;jt<vt.length;jt++){if(!vt[jt].empty())return ce.Pass;var tt=Et(lt,vt[jt].head);if(!tt||ke.indexOf(tt)%2!=0)return ce.Pass}for(var jt=vt.length-1;jt>=0;jt--){var ut=vt[jt].head;lt.replaceRange("",Fe(ut.line,ut.ch-1),Fe(ut.line,ut.ch+1),"+delete")}}function Pe(lt){var et=Se(lt),ke=et&&it(et,"explode");if(!ke||lt.getOption("disableInput"))return ce.Pass;for(var vt=lt.listSelections(),jt=0;jt<vt.length;jt++){if(!vt[jt].empty())return ce.Pass;var tt=Et(lt,vt[jt].head);if(!tt||ke.indexOf(tt)%2!=0)return ce.Pass}lt.operation(function(){var ut=lt.lineSeparator()||`
`;lt.replaceSelection(ut+ut,null),lt.execCommand("goCharLeft"),vt=lt.listSelections();for(var Ee=0;Ee<vt.length;Ee++){var we=vt[Ee].head.line;lt.indentLine(we,null,!0),lt.indentLine(we+1,null,!0)}})}function st(lt){var et=ce.cmpPos(lt.anchor,lt.head)>0;return{anchor:new Fe(lt.anchor.line,lt.anchor.ch+(et?-1:1)),head:new Fe(lt.head.line,lt.head.ch+(et?1:-1))}}function Re(lt,et){var ke=Se(lt);if(!ke||lt.getOption("disableInput"))return ce.Pass;var vt=it(ke,"pairs"),jt=vt.indexOf(et);if(jt==-1)return ce.Pass;for(var tt=it(ke,"closeBefore"),ut=it(ke,"triples"),Ee=vt.charAt(jt+1)==et,we=lt.listSelections(),je=jt%2==0,Ye,Lt=0;Lt<we.length;Lt++){var Ct=we[Lt],Bt=Ct.head,at,Vt=lt.getRange(Bt,Fe(Bt.line,Bt.ch+1));if(je&&!Ct.empty())at="surround";else if((Ee||!je)&&Vt==et)Ee&&ht(lt,Bt)?at="both":ut.indexOf(et)>=0&&lt.getRange(Bt,Fe(Bt.line,Bt.ch+3))==et+et+et?at="skipThree":at="skip";else if(Ee&&Bt.ch>1&&ut.indexOf(et)>=0&&lt.getRange(Fe(Bt.line,Bt.ch-2),Bt)==et+et){if(Bt.ch>2&&/\bstring/.test(lt.getTokenTypeAt(Fe(Bt.line,Bt.ch-2))))return ce.Pass;at="addFour"}else if(Ee){var $t=Bt.ch==0?" ":lt.getRange(Fe(Bt.line,Bt.ch-1),Bt);if(!ce.isWordChar(Vt)&&$t!=et&&!ce.isWordChar($t))at="both";else return ce.Pass}else if(je&&(Vt.length===0||/\s/.test(Vt)||tt.indexOf(Vt)>-1))at="both";else return ce.Pass;if(!Ye)Ye=at;else if(Ye!=at)return ce.Pass}var xn=jt%2?vt.charAt(jt-1):et,dt=jt%2?et:vt.charAt(jt+1);lt.operation(function(){if(Ye=="skip")lt.execCommand("goCharRight");else if(Ye=="skipThree")for(var on=0;on<3;on++)lt.execCommand("goCharRight");else if(Ye=="surround"){for(var En=lt.getSelections(),on=0;on<En.length;on++)En[on]=xn+En[on]+dt;lt.replaceSelections(En,"around"),En=lt.listSelections().slice();for(var on=0;on<En.length;on++)En[on]=st(En[on]);lt.setSelections(En)}else Ye=="both"?(lt.replaceSelection(xn+dt,null),lt.triggerElectric(xn+dt),lt.execCommand("goCharLeft")):Ye=="addFour"&&(lt.replaceSelection(xn+xn+xn+xn,"before"),lt.execCommand("goCharRight"))})}function Et(lt,et){var ke=lt.getRange(Fe(et.line,et.ch-1),Fe(et.line,et.ch+1));return ke.length==2?ke:null}function ht(lt,et){var ke=lt.getTokenAt(Fe(et.line,et.ch+1));return/\bstring/.test(ke.type)&&ke.start==et.ch&&(et.ch==0||!/\bstring/.test(lt.getTokenTypeAt(et)))}})},57341:function(Ln,en,se){(function(ce){ce(se(4631),se(4786))})(function(ce){ce.defineOption("autoCloseTags",!1,function(me,Pe,st){if(st!=ce.Init&&st&&me.removeKeyMap("autoCloseTags"),!!Pe){var Re={name:"autoCloseTags"};(typeof Pe!="object"||Pe.whenClosing!==!1)&&(Re["'/'"]=function(Et){return Le(Et)}),(typeof Pe!="object"||Pe.whenOpening!==!1)&&(Re["'>'"]=function(Et){return it(Et)}),me.addKeyMap(Re)}});var Ue=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function it(me){if(me.getOption("disableInput"))return ce.Pass;for(var Pe=me.listSelections(),st=[],Re=me.getOption("autoCloseTags"),Et=0;Et<Pe.length;Et++){if(!Pe[Et].empty())return ce.Pass;var ht=Pe[Et].head,lt=me.getTokenAt(ht),et=ce.innerMode(me.getMode(),lt.state),ke=et.state,vt=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ke),jt=vt&&vt.name;if(!jt)return ce.Pass;var tt=et.mode.configuration=="html",ut=typeof Re=="object"&&Re.dontCloseTags||tt&&Ue,Ee=typeof Re=="object"&&Re.indentTags||tt&&Fe;lt.end>ht.ch&&(jt=jt.slice(0,jt.length-lt.end+ht.ch));var we=jt.toLowerCase();if(!jt||lt.type=="string"&&(lt.end!=ht.ch||!/[\"\']/.test(lt.string.charAt(lt.string.length-1))||lt.string.length==1)||lt.type=="tag"&&vt.close||lt.string.indexOf("/")==ht.ch-lt.start-1||ut&&Me(ut,we)>-1||Se(me,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ke)||[],jt,ht,!0))return ce.Pass;var je=typeof Re=="object"&&Re.emptyTags;if(je&&Me(je,jt)>-1){st[Et]={text:"/>",newPos:ce.Pos(ht.line,ht.ch+2)};continue}var Ye=Ee&&Me(Ee,we)>-1;st[Et]={indent:Ye,text:">"+(Ye?`
`:"")+"</"+jt+">",newPos:Ye?ce.Pos(ht.line+1,0):ce.Pos(ht.line,ht.ch+1)}}for(var Lt=typeof Re=="object"&&Re.dontIndentOnAutoClose,Et=Pe.length-1;Et>=0;Et--){var Ct=st[Et];me.replaceRange(Ct.text,Pe[Et].head,Pe[Et].anchor,"+insert");var Bt=me.listSelections().slice(0);Bt[Et]={head:Ct.newPos,anchor:Ct.newPos},me.setSelections(Bt),!Lt&&Ct.indent&&(me.indentLine(Ct.newPos.line,null,!0),me.indentLine(Ct.newPos.line+1,null,!0))}}function ve(me,Pe){for(var st=me.listSelections(),Re=[],Et=Pe?"/":"</",ht=me.getOption("autoCloseTags"),lt=typeof ht=="object"&&ht.dontIndentOnSlash,et=0;et<st.length;et++){if(!st[et].empty())return ce.Pass;var ke=st[et].head,vt=me.getTokenAt(ke),jt=ce.innerMode(me.getMode(),vt.state),tt=jt.state;if(Pe&&(vt.type=="string"||vt.string.charAt(0)!="<"||vt.start!=ke.ch-1))return ce.Pass;var ut,Ee=jt.mode.name!="xml"&&me.getMode().name=="htmlmixed";if(Ee&&jt.mode.name=="javascript")ut=Et+"script";else if(Ee&&jt.mode.name=="css")ut=Et+"style";else{var we=jt.mode.xmlCurrentContext&&jt.mode.xmlCurrentContext(tt);if(!we||we.length&&Se(me,we,we[we.length-1],ke))return ce.Pass;ut=Et+we[we.length-1]}me.getLine(ke.line).charAt(vt.end)!=">"&&(ut+=">"),Re[et]=ut}if(me.replaceSelections(Re),st=me.listSelections(),!lt)for(var et=0;et<st.length;et++)(et==st.length-1||st[et].head.line<st[et+1].head.line)&&me.indentLine(st[et].head.line)}function Le(me){return me.getOption("disableInput")?ce.Pass:ve(me,!0)}ce.commands.closeTag=function(me){return ve(me)};function Me(me,Pe){if(me.indexOf)return me.indexOf(Pe);for(var st=0,Re=me.length;st<Re;++st)if(me[st]==Pe)return st;return-1}function Se(me,Pe,st,Re,Et){if(!ce.scanForClosingTag)return!1;var ht=Math.min(me.lastLine()+1,Re.line+500),lt=ce.scanForClosingTag(me,Re,null,ht);if(!lt||lt.tag!=st)return!1;for(var et=Et?1:0,ke=Pe.length-1;ke>=0&&Pe[ke]==st;ke--)++et;Re=lt.to;for(var ke=1;ke<et;ke++){var vt=ce.scanForClosingTag(me,Re,null,ht);if(!vt||vt.tag!=st)return!1;Re=vt.to}return!0}})},4786:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){"use strict";var Ue=ce.Pos;function Fe(ke,vt){return ke.line-vt.line||ke.ch-vt.ch}var it="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",ve=it+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Le=new RegExp("<(/?)(["+it+"]["+ve+"]*)","g");function Me(ke,vt,jt,tt){this.line=vt,this.ch=jt,this.cm=ke,this.text=ke.getLine(vt),this.min=tt?Math.max(tt.from,ke.firstLine()):ke.firstLine(),this.max=tt?Math.min(tt.to-1,ke.lastLine()):ke.lastLine()}function Se(ke,vt){var jt=ke.cm.getTokenTypeAt(Ue(ke.line,vt));return jt&&/\btag\b/.test(jt)}function me(ke){if(!(ke.line>=ke.max))return ke.ch=0,ke.text=ke.cm.getLine(++ke.line),!0}function Pe(ke){if(!(ke.line<=ke.min))return ke.text=ke.cm.getLine(--ke.line),ke.ch=ke.text.length,!0}function st(ke){for(;;){var vt=ke.text.indexOf(">",ke.ch);if(vt==-1){if(me(ke))continue;return}if(!Se(ke,vt+1)){ke.ch=vt+1;continue}var jt=ke.text.lastIndexOf("/",vt),tt=jt>-1&&!/\S/.test(ke.text.slice(jt+1,vt));return ke.ch=vt+1,tt?"selfClose":"regular"}}function Re(ke){for(;;){var vt=ke.ch?ke.text.lastIndexOf("<",ke.ch-1):-1;if(vt==-1){if(Pe(ke))continue;return}if(!Se(ke,vt+1)){ke.ch=vt;continue}Le.lastIndex=vt,ke.ch=vt;var jt=Le.exec(ke.text);if(jt&&jt.index==vt)return jt}}function Et(ke){for(;;){Le.lastIndex=ke.ch;var vt=Le.exec(ke.text);if(!vt){if(me(ke))continue;return}if(!Se(ke,vt.index+1)){ke.ch=vt.index+1;continue}return ke.ch=vt.index+vt[0].length,vt}}function ht(ke){for(;;){var vt=ke.ch?ke.text.lastIndexOf(">",ke.ch-1):-1;if(vt==-1){if(Pe(ke))continue;return}if(!Se(ke,vt+1)){ke.ch=vt;continue}var jt=ke.text.lastIndexOf("/",vt),tt=jt>-1&&!/\S/.test(ke.text.slice(jt+1,vt));return ke.ch=vt+1,tt?"selfClose":"regular"}}function lt(ke,vt){for(var jt=[];;){var tt=Et(ke),ut,Ee=ke.line,we=ke.ch-(tt?tt[0].length:0);if(!tt||!(ut=st(ke)))return;if(ut!="selfClose")if(tt[1]){for(var je=jt.length-1;je>=0;--je)if(jt[je]==tt[2]){jt.length=je;break}if(je<0&&(!vt||vt==tt[2]))return{tag:tt[2],from:Ue(Ee,we),to:Ue(ke.line,ke.ch)}}else jt.push(tt[2])}}function et(ke,vt){for(var jt=[];;){var tt=ht(ke);if(!tt)return;if(tt=="selfClose"){Re(ke);continue}var ut=ke.line,Ee=ke.ch,we=Re(ke);if(!we)return;if(we[1])jt.push(we[2]);else{for(var je=jt.length-1;je>=0;--je)if(jt[je]==we[2]){jt.length=je;break}if(je<0&&(!vt||vt==we[2]))return{tag:we[2],from:Ue(ke.line,ke.ch),to:Ue(ut,Ee)}}}}ce.registerHelper("fold","xml",function(ke,vt){for(var jt=new Me(ke,vt.line,0);;){var tt=Et(jt);if(!tt||jt.line!=vt.line)return;var ut=st(jt);if(!ut)return;if(!tt[1]&&ut!="selfClose"){var Ee=Ue(jt.line,jt.ch),we=lt(jt,tt[2]);return we&&Fe(we.from,Ee)>0?{from:Ee,to:we.from}:null}}}),ce.findMatchingTag=function(ke,vt,jt){var tt=new Me(ke,vt.line,vt.ch,jt);if(!(tt.text.indexOf(">")==-1&&tt.text.indexOf("<")==-1)){var ut=st(tt),Ee=ut&&Ue(tt.line,tt.ch),we=ut&&Re(tt);if(!(!ut||!we||Fe(tt,vt)>0)){var je={from:Ue(tt.line,tt.ch),to:Ee,tag:we[2]};return ut=="selfClose"?{open:je,close:null,at:"open"}:we[1]?{open:et(tt,we[2]),close:je,at:"close"}:(tt=new Me(ke,Ee.line,Ee.ch,jt),{open:je,close:lt(tt,we[2]),at:"open"})}}},ce.findEnclosingTag=function(ke,vt,jt,tt){for(var ut=new Me(ke,vt.line,vt.ch,jt);;){var Ee=et(ut,tt);if(!Ee)break;var we=new Me(ke,vt.line,vt.ch,jt),je=lt(we,Ee.tag);if(je)return{open:Ee,close:je}}},ce.scanForClosingTag=function(ke,vt,jt,tt){var ut=new Me(ke,vt.line,vt.ch,tt?{from:0,to:tt}:null);return lt(ut,jt)}})},4631:function(Ln){(function(en,se){Ln.exports=se()})(this,function(){"use strict";var en=navigator.userAgent,se=navigator.platform,ce=/gecko\/\d/i.test(en),Ue=/MSIE \d/.test(en),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(en),it=/Edge\/(\d+)/.exec(en),ve=Ue||Fe||it,Le=ve&&(Ue?document.documentMode||6:+(it||Fe)[1]),Me=!it&&/WebKit\//.test(en),Se=Me&&/Qt\/\d+\.\d+/.test(en),me=!it&&/Chrome\//.test(en),Pe=/Opera\//.test(en),st=/Apple Computer/.test(navigator.vendor),Re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(en),Et=/PhantomJS/.test(en),ht=!it&&/AppleWebKit/.test(en)&&/Mobile\/\w+/.test(en),lt=/Android/.test(en),et=ht||lt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(en),ke=ht||/Mac/.test(se),vt=/\bCrOS\b/.test(en),jt=/win/i.test(se),tt=Pe&&en.match(/Version\/(\d*\.\d*)/);tt&&(tt=Number(tt[1])),tt&&tt>=15&&(Pe=!1,Me=!0);var ut=ke&&(Se||Pe&&(tt==null||tt<12.11)),Ee=ce||ve&&Le>=9;function we(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var je=function(x,z){var ne=x.className,te=we(z).exec(ne);if(te){var ie=ne.slice(te.index+te[0].length);x.className=ne.slice(0,te.index)+(ie?te[1]+ie:"")}};function Ye(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function Lt(x,z){return Ye(x).appendChild(z)}function Ct(x,z,ne,te){var ie=document.createElement(x);if(ne&&(ie.className=ne),te&&(ie.style.cssText=te),typeof z=="string")ie.appendChild(document.createTextNode(z));else if(z)for(var ue=0;ue<z.length;++ue)ie.appendChild(z[ue]);return ie}function Bt(x,z,ne,te){var ie=Ct(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var at;document.createRange?at=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:at=function(x,z,ne){var te=document.body.createTextRange();try{te.moveToElementText(x.parentNode)}catch(ie){return te}return te.collapse(!0),te.moveEnd("character",ne),te.moveStart("character",z),te};function Vt(x,z){if(z.nodeType==3&&(z=z.parentNode),x.contains)return x.contains(z);do if(z.nodeType==11&&(z=z.host),z==x)return!0;while(z=z.parentNode)}function $t(){var x;try{x=document.activeElement}catch(z){x=document.body||null}for(;x&&x.shadowRoot&&x.shadowRoot.activeElement;)x=x.shadowRoot.activeElement;return x}function xn(x,z){var ne=x.className;we(z).test(ne)||(x.className+=(ne?" ":"")+z)}function dt(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!we(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var on=function(x){x.select()};ht?on=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ve&&(on=function(x){try{x.select()}catch(z){}});function En(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function yn(x,z,ne){z||(z={});for(var te in x)x.hasOwnProperty(te)&&(ne!==!1||!z.hasOwnProperty(te))&&(z[te]=x[te]);return z}function Ge(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ue=te||0,ye=ie||0;;){var _e=x.indexOf(" ",ue);if(_e<0||_e>=z)return ye+(z-ue);ye+=_e-ue,ye+=ne-ye%ne,ue=_e+1}}var De=function(){this.id=null,this.f=null,this.time=0,this.handler=En(this.onTimeout,this)};De.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},De.prototype.set=function(x,z){this.f=z;var ne=+new Date+x;(!this.id||ne<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=ne)};function Zt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var In=50,fn={toString:function(){return"CodeMirror.Pass"}},ot={scroll:!1},ft={origin:"*mouse"},Jt={origin:"+move"};function Bn(x,z,ne){for(var te=0,ie=0;;){var ue=x.indexOf(" ",te);ue==-1&&(ue=x.length);var ye=ue-te;if(ue==x.length||ie+ye>=z)return te+Math.min(ye,z-ie);if(ie+=ue-te,ie+=ne-ie%ne,te=ue+1,ie>=z)return te}}var wn=[""];function Nt(x){for(;wn.length<=x;)wn.push(Xt(wn)+" ");return wn[x]}function Xt(x){return x[x.length-1]}function Dn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function Mn(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function Te(){}function de(x,z){var ne;return Object.create?ne=Object.create(x):(Te.prototype=x,ne=new Te),z&&yn(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||le.test(x))}function he(x,z){return z?z.source.indexOf("\\w")>-1&&pe(x)?!0:z.test(x):pe(x)}function oe(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Ie=/[\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 Je(x){return x.charCodeAt(0)>=768&&Ie.test(x)}function _t(x,z,ne){for(;(ne<0?z>0:z<x.length)&&Je(x.charAt(z));)z+=ne;return z}function Kt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ie=(z+ne)/2,ue=te<0?Math.ceil(ie):Math.floor(ie);if(ue==z)return x(ue)?z:ne;x(ue)?ne=ue:z=ue+te}}function Ht(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ue=0;ue<x.length;++ue){var ye=x[ue];(ye.from<ne&&ye.to>z||z==ne&&ye.to==z)&&(te(Math.max(ye.from,z),Math.min(ye.to,ne),ye.level==1?"rtl":"ltr",ue),ie=!0)}ie||te(z,ne,"ltr")}var Qt=null;function Gt(x,z,ne){var te;Qt=null;for(var ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.from<z&&ue.to>z)return ie;ue.to==z&&(ue.from!=ue.to&&ne=="before"?te=ie:Qt=ie),ue.from==z&&(ue.from!=ue.to&&ne!="before"?te=ie:Qt=ie)}return te!=null?te:Qt}var nr=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Be){return Be<=247?x.charAt(Be):1424<=Be&&Be<=1524?"R":1536<=Be&&Be<=1785?z.charAt(Be-1536):1774<=Be&&Be<=2220?"r":8192<=Be&&Be<=8203?"w":Be==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ue=/[LRr]/,ye=/[Lb1n]/,_e=/[1n]/;function Ne(Be,bt,It){this.level=Be,this.from=bt,this.to=It}return function(Be,bt){var It=bt=="ltr"?"L":"R";if(Be.length==0||bt=="ltr"&&!te.test(Be))return!1;for(var mn=Be.length,ln=[],Yn=0;Yn<mn;++Yn)ln.push(ne(Be.charCodeAt(Yn)));for(var hr=0,Ir=It;hr<mn;++hr){var Vr=ln[hr];Vr=="m"?ln[hr]=Ir:Ir=Vr}for(var ni=0,Kr=It;ni<mn;++ni){var ii=ln[ni];ii=="1"&&Kr=="r"?ln[ni]="n":ue.test(ii)&&(Kr=ii,ii=="r"&&(ln[ni]="R"))}for(var Oi=1,Fi=ln[0];Oi<mn-1;++Oi){var La=ln[Oi];La=="+"&&Fi=="1"&&ln[Oi+1]=="1"?ln[Oi]="1":La==","&&Fi==ln[Oi+1]&&(Fi=="1"||Fi=="n")&&(ln[Oi]=Fi),Fi=La}for(var so=0;so<mn;++so){var Uo=ln[so];if(Uo==",")ln[so]="N";else if(Uo=="%"){var xo=void 0;for(xo=so+1;xo<mn&&ln[xo]=="%";++xo);for(var fs=so&&ln[so-1]=="!"||xo<mn&&ln[xo]=="1"?"1":"N",hs=so;hs<xo;++hs)ln[hs]=fs;so=xo-1}}for(var No=0,ps=It;No<mn;++No){var ca=ln[No];ps=="L"&&ca=="1"?ln[No]="L":ue.test(ca)&&(ps=ca)}for(var Co=0;Co<mn;++Co)if(ie.test(ln[Co])){var wo=void 0;for(wo=Co+1;wo<mn&&ie.test(ln[wo]);++wo);for(var Eo=(Co?ln[Co-1]:It)=="L",Ao=(wo<mn?ln[wo]:It)=="L",Wl=Eo==Ao?Eo?"L":"R":It,ys=Co;ys<wo;++ys)ln[ys]=Wl;Co=wo-1}for(var Yo=[],Xa,$o=0;$o<mn;)if(ye.test(ln[$o])){var Mu=$o;for(++$o;$o<mn&&ye.test(ln[$o]);++$o);Yo.push(new Ne(0,Mu,$o))}else{var sl=$o,xl=Yo.length,js=bt=="rtl"?1:0;for(++$o;$o<mn&&ln[$o]!="L";++$o);for(var Ro=sl;Ro<$o;)if(_e.test(ln[Ro])){sl<Ro&&(Yo.splice(xl,0,new Ne(1,sl,Ro)),xl+=js);var Zl=Ro;for(++Ro;Ro<$o&&_e.test(ln[Ro]);++Ro);Yo.splice(xl,0,new Ne(2,Zl,Ro)),xl+=js,sl=Ro}else++Ro;sl<$o&&Yo.splice(xl,0,new Ne(1,sl,$o))}return bt=="ltr"&&(Yo[0].level==1&&(Xa=Be.match(/^\s+/))&&(Yo[0].from=Xa[0].length,Yo.unshift(new Ne(0,0,Xa[0].length))),Xt(Yo).level==1&&(Xa=Be.match(/\s+$/))&&(Xt(Yo).to-=Xa[0].length,Yo.push(new Ne(0,mn-Xa[0].length,mn)))),bt=="rtl"?Yo.reverse():Yo}}();function gr(x,z){var ne=x.order;return ne==null&&(ne=x.order=nr(x.text,z)),ne}var Ut=[],pn=function(x,z,ne){if(x.addEventListener)x.addEventListener(z,ne,!1);else if(x.attachEvent)x.attachEvent("on"+z,ne);else{var te=x._handlers||(x._handlers={});te[z]=(te[z]||Ut).concat(ne)}};function ir(x,z){return x._handlers&&x._handlers[z]||Ut}function Lr(x,z,ne){if(x.removeEventListener)x.removeEventListener(z,ne,!1);else if(x.detachEvent)x.detachEvent("on"+z,ne);else{var te=x._handlers,ie=te&&te[z];if(ie){var ue=Zt(ie,ne);ue>-1&&(te[z]=ie.slice(0,ue).concat(ie.slice(ue+1)))}}}function $n(x,z){var ne=ir(x,z);if(ne.length)for(var te=Array.prototype.slice.call(arguments,2),ie=0;ie<ne.length;++ie)ne[ie].apply(null,te)}function Cr(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),$n(x,ne||z.type,x,z),Ei(z)||z.codemirrorIgnore}function Ii(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var ne=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),te=0;te<z.length;++te)Zt(ne,z[te])==-1&&ne.push(z[te])}function li(x,z){return ir(x,z).length>0}function ci(x){x.prototype.on=function(z,ne){pn(this,z,ne)},x.prototype.off=function(z,ne){Lr(this,z,ne)}}function Jr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Di(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Ei(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Pi(x){Jr(x),Di(x)}function xr(x){return x.target||x.srcElement}function Pr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),ke&&x.ctrlKey&&z==1&&(z=3),z}var Gi=function(){if(ve&&Le<9)return!1;var x=Ct("div");return"draggable"in x||"dragDrop"in x}(),ma;function ba(x){if(ma==null){var z=Ct("span","\u200B");Lt(x,Ct("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(ma=z.offsetWidth<=1&&z.offsetHeight>2&&!(ve&&Le<8))}var ne=ma?Ct("span","\u200B"):Ct("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var va;function Vi(x){if(va!=null)return va;var z=Lt(x,document.createTextNode("A\u062EA")),ne=at(z,0,1).getBoundingClientRect(),te=at(z,1,2).getBoundingClientRect();return Ye(x),!ne||ne.left==ne.right?!1:va=te.right-ne.right<3}var At=`
b`.split(/\n/).length!=3?function(x){for(var z=0,ne=[],te=x.length;z<=te;){var ie=x.indexOf(`
`,z);ie==-1&&(ie=x.length);var ue=x.slice(z,x.charAt(ie-1)=="\r"?ie-1:ie),ye=ue.indexOf("\r");ye!=-1?(ne.push(ue.slice(0,ye)),z+=ye+1):(ne.push(ue),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},On=window.getSelection?function(x){try{return x.selectionStart!=x.selectionEnd}catch(z){return!1}}:function(x){var z;try{z=x.ownerDocument.selection.createRange()}catch(ne){}return!z||z.parentElement()!=x?!1:z.compareEndPoints("StartToEnd",z)!=0},Pt=function(){var x=Ct("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),zt=null;function rn(x){if(zt!=null)return zt;var z=Lt(x,Ct("span","x")),ne=z.getBoundingClientRect(),te=at(z,0,1).getBoundingClientRect();return zt=Math.abs(ne.left-te.left)>1}var cn={},Vn={};function Nn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),cn[x]=z}function Qe(x,z){Vn[x]=z}function rt(x){if(typeof x=="string"&&Vn.hasOwnProperty(x))x=Vn[x];else if(x&&typeof x.name=="string"&&Vn.hasOwnProperty(x.name)){var z=Vn[x.name];typeof z=="string"&&(z={name:z}),x=de(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return rt("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return rt("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function pt(x,z){z=rt(z);var ne=cn[z.name];if(!ne)return pt(x,"text/plain");var te=ne(x,z);if(Rt.hasOwnProperty(z.name)){var ie=Rt[z.name];for(var ue in ie)ie.hasOwnProperty(ue)&&(te.hasOwnProperty(ue)&&(te["_"+ue]=te[ue]),te[ue]=ie[ue])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var ye in z.modeProps)te[ye]=z.modeProps[ye];return te}var Rt={};function We(x,z){var ne=Rt.hasOwnProperty(x)?Rt[x]:Rt[x]={};yn(z,ne)}function mt(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var ne={};for(var te in z){var ie=z[te];ie instanceof Array&&(ie=ie.concat([])),ne[te]=ie}return ne}function Dt(x,z){for(var ne;x.innerMode&&(ne=x.innerMode(z),!(!ne||ne.mode==x));)z=ne.state,x=ne.mode;return ne||{mode:x,state:z}}function gt(x,z,ne){return x.startState?x.startState(z,ne):!0}var qt=function(x,z,ne){this.pos=this.start=0,this.string=x,this.tabSize=z||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ne};qt.prototype.eol=function(){return this.pos>=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qt.prototype.eat=function(x){var z=this.string.charAt(this.pos),ne;if(typeof x=="string"?ne=z==x:ne=z&&(x.test?x.test(z):x(z)),ne)return++this.pos,z},qt.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},qt.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},qt.prototype.backUp=function(x){this.pos-=x},qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return Ge(this.string,null,this.tabSize)-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},qt.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(ye){return ne?ye.toLowerCase():ye},ie=this.string.substr(this.pos,x.length);if(te(ie)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var ue=this.string.slice(this.pos).match(x);return ue&&ue.index>0?null:(ue&&z!==!1&&(this.pos+=ue[0].length),ue)}},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},qt.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},qt.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function Yt(x,z){if(z-=x.first,z<0||z>=x.size)throw new Error("There is no line "+(z+x.first)+" in the document.");for(var ne=x;!ne.lines;)for(var te=0;;++te){var ie=ne.children[te],ue=ie.chunkSize();if(z<ue){ne=ie;break}z-=ue}return ne.lines[z]}function Rn(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ue){var ye=ue.text;ie==ne.line&&(ye=ye.slice(0,ne.ch)),ie==z.line&&(ye=ye.slice(z.ch)),te.push(ye),++ie}),te}function br(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function Wn(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function Jn(x){if(x.parent==null)return null;for(var z=x.parent,ne=Zt(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ie=0;te.children[ie]!=z;++ie)ne+=te.children[ie].chunkSize();return ne+z.first}function or(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ie=x.children[te],ue=ie.height;if(z<ue){x=ie;continue e}z-=ue,ne+=ie.chunkSize()}return ne}while(!x.lines);for(var ye=0;ye<x.lines.length;++ye){var _e=x.lines[ye],Ne=_e.height;if(z<Ne)break;z-=Ne}return ne+ye}function lr(x,z){return z>=x.first&&z<x.first+x.size}function Rr(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function bn(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof bn))return new bn(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function An(x,z){return x.line-z.line||x.ch-z.ch}function hi(x,z){return x.sticky==z.sticky&&An(x,z)==0}function xi(x){return bn(x.line,x.ch)}function ai(x,z){return An(x,z)<0?z:x}function sr(x,z){return An(x,z)<0?x:z}function vi(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function ur(x,z){if(z.line<x.first)return bn(x.first,0);var ne=x.first+x.size-1;return z.line>ne?bn(ne,Yt(x,ne).text.length):Qr(z,Yt(x,z.line).text.length)}function Qr(x,z){var ne=x.ch;return ne==null||ne>z?bn(x.line,z):ne<0?bn(x.line,0):x}function kn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=ur(x,z[te]);return ne}var ia=function(x,z){this.state=x,this.lookAhead=z},zi=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};zi.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},zi.prototype.baseToken=function(x){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=x;)this.baseTokenPos+=2;var z=this.baseTokens[this.baseTokenPos+1];return{type:z&&z.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-x}},zi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},zi.fromSaved=function(x,z,ne){return z instanceof ia?new zi(x,mt(x.mode,z.state),ne,z.lookAhead):new zi(x,mt(x.mode,z),ne)},zi.prototype.save=function(x){var z=x!==!1?mt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ia(z,this.maxLookAhead):z};function Ma(x,z,ne,te){var ie=[x.state.modeGen],ue={};Hi(x,z.text,x.doc.mode,ne,function(Be,bt){return ie.push(Be,bt)},ue,te);for(var ye=ne.state,_e=function(Be){ne.baseTokens=ie;var bt=x.state.overlays[Be],It=1,mn=0;ne.state=!0,Hi(x,z.text,bt.mode,ne,function(ln,Yn){for(var hr=It;mn<ln;){var Ir=ie[It];Ir>ln&&ie.splice(It,1,ln,ie[It+1],Ir),It+=2,mn=Math.min(ln,Ir)}if(Yn)if(bt.opaque)ie.splice(hr,It-hr,ln,"overlay "+Yn),It=hr+2;else for(;hr<It;hr+=2){var Vr=ie[hr+1];ie[hr+1]=(Vr?Vr+" ":"")+"overlay "+Yn}},ue),ne.state=ye,ne.baseTokens=null,ne.baseTokenPos=1},Ne=0;Ne<x.state.overlays.length;++Ne)_e(Ne);return{styles:ie,classes:ue.bgClass||ue.textClass?ue:null}}function Ji(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=Zi(x,Jn(z)),ie=z.text.length>x.options.maxHighlightLength&&mt(x.doc.mode,te.state),ue=Ma(x,z,te);ie&&(te.state=ie),z.stateAfter=te.save(!ie),z.styles=ue.styles,ue.classes?z.styleClasses=ue.classes:z.styleClasses&&(z.styleClasses=null),ne===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function Zi(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new zi(te,!0,z);var ue=Ia(x,z,ne),ye=ue>te.first&&Yt(te,ue-1).stateAfter,_e=ye?zi.fromSaved(te,ye,ue):new zi(te,gt(te.mode),ue);return te.iter(ue,z,function(Ne){xa(x,Ne.text,_e);var Be=_e.line;Ne.stateAfter=Be==z-1||Be%5==0||Be>=ie.viewFrom&&Be<ie.viewTo?_e.save():null,_e.nextLine()}),ne&&(te.modeFrontier=_e.line),_e}function xa(x,z,ne,te){var ie=x.doc.mode,ue=new qt(z,x.options.tabSize,ne);for(ue.start=ue.pos=te||0,z==""&&aa(ie,ne.state);!ue.eol();)Ni(ie,ue,ne.state),ue.start=ue.pos}function aa(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=Dt(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function Ni(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=Dt(x,ne).mode);var ue=x.token(z,ne);if(z.pos>z.start)return ue}throw new Error("Mode "+x.name+" failed to advance stream.")}var fa=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Ta(x,z,ne,te){var ie=x.doc,ue=ie.mode,ye;z=ur(ie,z);var _e=Yt(ie,z.line),Ne=Zi(x,z.line,ne),Be=new qt(_e.text,x.options.tabSize,Ne),bt;for(te&&(bt=[]);(te||Be.pos<z.ch)&&!Be.eol();)Be.start=Be.pos,ye=Ni(ue,Be,Ne.state),te&&bt.push(new fa(Be,ye,mt(ie.mode,Ne.state)));return te?bt:new fa(Be,ye,Ne.state)}function ga(x,z){if(x)for(;;){var ne=x.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ne)break;x=x.slice(0,ne.index)+x.slice(ne.index+ne[0].length);var te=ne[1]?"bgClass":"textClass";z[te]==null?z[te]=ne[2]:new RegExp("(?:^|\\s)"+ne[2]+"(?:$|\\s)").test(z[te])||(z[te]+=" "+ne[2])}return x}function Hi(x,z,ne,te,ie,ue,ye){var _e=ne.flattenSpans;_e==null&&(_e=x.options.flattenSpans);var Ne=0,Be=null,bt=new qt(z,x.options.tabSize,te),It,mn=x.options.addModeClass&&[null];for(z==""&&ga(aa(ne,te.state),ue);!bt.eol();){if(bt.pos>x.options.maxHighlightLength?(_e=!1,ye&&xa(x,z,te,bt.pos),bt.pos=z.length,It=null):It=ga(Ni(ne,bt,te.state,mn),ue),mn){var ln=mn[0].name;ln&&(It="m-"+(It?ln+" "+It:ln))}if(!_e||Be!=It){for(;Ne<bt.start;)Ne=Math.min(bt.start,Ne+5e3),ie(Ne,Be);Be=It}bt.start=bt.pos}for(;Ne<bt.pos;){var Yn=Math.min(bt.pos,Ne+5e3);ie(Yn,Be),Ne=Yn}}function Ia(x,z,ne){for(var te,ie,ue=x.doc,ye=ne?-1:z-(x.doc.mode.innerMode?1e3:100),_e=z;_e>ye;--_e){if(_e<=ue.first)return ue.first;var Ne=Yt(ue,_e-1),Be=Ne.stateAfter;if(Be&&(!ne||_e+(Be instanceof ia?Be.lookAhead:0)<=ue.modeFrontier))return _e;var bt=Ge(Ne.text,null,x.options.tabSize);(ie==null||te>bt)&&(ie=_e-1,te=bt)}return ie}function Oa(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var ne=x.first,te=z-1;te>ne;te--){var ie=Yt(x,te).stateAfter;if(ie&&(!(ie instanceof ia)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var wa=!1,_i=!1;function Mt(){wa=!0}function wt(){_i=!0}function tn(x,z,ne){this.marker=x,this.from=z,this.to=ne}function vn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function Kn(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Ar(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Tr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],ye=ue.marker,_e=ue.from==null||(ye.inclusiveLeft?ue.from<=z:ue.from<z);if(_e||ue.from==z&&ye.type=="bookmark"&&(!ne||!ue.marker.insertLeft)){var Ne=ue.to==null||(ye.inclusiveRight?ue.to>=z:ue.to>z);(te||(te=[])).push(new tn(ye,ue.from,Ne?null:ue.to))}}return te}function Hr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],ye=ue.marker,_e=ue.to==null||(ye.inclusiveRight?ue.to>=z:ue.to>z);if(_e||ue.from==z&&ye.type=="bookmark"&&(!ne||ue.marker.insertLeft)){var Ne=ue.from==null||(ye.inclusiveLeft?ue.from<=z:ue.from<z);(te||(te=[])).push(new tn(ye,Ne?null:ue.from-z,ue.to==null?null:ue.to-z))}}return te}function Xr(x,z){if(z.full)return null;var ne=lr(x,z.from.line)&&Yt(x,z.from.line).markedSpans,te=lr(x,z.to.line)&&Yt(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ue=z.to.ch,ye=An(z.from,z.to)==0,_e=Tr(ne,ie,ye),Ne=Hr(te,ue,ye),Be=z.text.length==1,bt=Xt(z.text).length+(Be?ie:0);if(_e)for(var It=0;It<_e.length;++It){var mn=_e[It];if(mn.to==null){var ln=vn(Ne,mn.marker);ln?Be&&(mn.to=ln.to==null?null:ln.to+bt):mn.to=ie}}if(Ne)for(var Yn=0;Yn<Ne.length;++Yn){var hr=Ne[Yn];if(hr.to!=null&&(hr.to+=bt),hr.from==null){var Ir=vn(_e,hr.marker);Ir||(hr.from=bt,Be&&(_e||(_e=[])).push(hr))}else hr.from+=bt,Be&&(_e||(_e=[])).push(hr)}_e&&(_e=Zr(_e)),Ne&&Ne!=_e&&(Ne=Zr(Ne));var Vr=[_e];if(!Be){var ni=z.text.length-2,Kr;if(ni>0&&_e)for(var ii=0;ii<_e.length;++ii)_e[ii].to==null&&(Kr||(Kr=[])).push(new tn(_e[ii].marker,null,null));for(var Oi=0;Oi<ni;++Oi)Vr.push(Kr);Vr.push(Ne)}return Vr}function Zr(x){for(var z=0;z<x.length;++z){var ne=x[z];ne.from!=null&&ne.from==ne.to&&ne.marker.clearWhenEmpty!==!1&&x.splice(z--,1)}return x.length?x:null}function wi(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(ln){if(ln.markedSpans)for(var Yn=0;Yn<ln.markedSpans.length;++Yn){var hr=ln.markedSpans[Yn].marker;hr.readOnly&&(!te||Zt(te,hr)==-1)&&(te||(te=[])).push(hr)}}),!te)return null;for(var ie=[{from:z,to:ne}],ue=0;ue<te.length;++ue)for(var ye=te[ue],_e=ye.find(0),Ne=0;Ne<ie.length;++Ne){var Be=ie[Ne];if(!(An(Be.to,_e.from)<0||An(Be.from,_e.to)>0)){var bt=[Ne,1],It=An(Be.from,_e.from),mn=An(Be.to,_e.to);(It<0||!ye.inclusiveLeft&&!It)&&bt.push({from:Be.from,to:_e.from}),(mn>0||!ye.inclusiveRight&&!mn)&&bt.push({from:_e.to,to:Be.to}),ie.splice.apply(ie,bt),Ne+=bt.length-3}}return ie}function ki(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Ri(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function oa(x){return x.inclusiveLeft?-1:0}function Wi(x){return x.inclusiveRight?1:0}function Xi(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ue=An(te.from,ie.from)||oa(x)-oa(z);if(ue)return-ue;var ye=An(te.to,ie.to)||Wi(x)-Wi(z);return ye||z.id-x.id}function Oe(x,z){var ne=_i&&x.markedSpans,te;if(ne)for(var ie=void 0,ue=0;ue<ne.length;++ue)ie=ne[ue],ie.marker.collapsed&&(z?ie.from:ie.to)==null&&(!te||Xi(te,ie.marker)<0)&&(te=ie.marker);return te}function He(x){return Oe(x,!0)}function Ke(x){return Oe(x,!1)}function Ve(x,z){var ne=_i&&x.markedSpans,te;if(ne)for(var ie=0;ie<ne.length;++ie){var ue=ne[ie];ue.marker.collapsed&&(ue.from==null||ue.from<z)&&(ue.to==null||ue.to>z)&&(!te||Xi(te,ue.marker)<0)&&(te=ue.marker)}return te}function ct(x,z,ne,te,ie){var ue=Yt(x,z),ye=_i&&ue.markedSpans;if(ye)for(var _e=0;_e<ye.length;++_e){var Ne=ye[_e];if(Ne.marker.collapsed){var Be=Ne.marker.find(0),bt=An(Be.from,ne)||oa(Ne.marker)-oa(ie),It=An(Be.to,te)||Wi(Ne.marker)-Wi(ie);if(!(bt>=0&&It<=0||bt<=0&&It>=0)&&(bt<=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?An(Be.to,ne)>=0:An(Be.to,ne)>0)||bt>=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?An(Be.from,te)<=0:An(Be.from,te)<0)))return!0}}}function yt(x){for(var z;z=He(x);)x=z.find(-1,!0).line;return x}function kt(x){for(var z;z=Ke(x);)x=z.find(1,!0).line;return x}function sn(x){for(var z,ne;z=Ke(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function dn(x,z){var ne=Yt(x,z),te=yt(ne);return ne==te?z:Jn(te)}function Gn(x,z){if(z>x.lastLine())return z;var ne=Yt(x,z),te;if(!pr(x,ne))return z;for(;te=Ke(ne);)ne=te.find(1,!0).line;return Jn(ne)+1}function pr(x,z){var ne=_i&&z.markedSpans;if(ne){for(var te=void 0,ie=0;ie<ne.length;++ie)if(te=ne[ie],!!te.marker.collapsed){if(te.from==null)return!0;if(!te.marker.widgetNode&&te.from==0&&te.marker.inclusiveLeft&&Hn(x,z,te))return!0}}}function Hn(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return Hn(x,te.line,vn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ie=void 0,ue=0;ue<z.markedSpans.length;++ue)if(ie=z.markedSpans[ue],ie.marker.collapsed&&!ie.marker.widgetNode&&ie.from==ne.to&&(ie.to==null||ie.to!=ne.from)&&(ie.marker.inclusiveLeft||ne.marker.inclusiveRight)&&Hn(x,z,ie))return!0}function Cn(x){x=yt(x);for(var z=0,ne=x.parent,te=0;te<ne.lines.length;++te){var ie=ne.lines[te];if(ie==x)break;z+=ie.height}for(var ue=ne.parent;ue;ne=ue,ue=ne.parent)for(var ye=0;ye<ue.children.length;++ye){var _e=ue.children[ye];if(_e==ne)break;z+=_e.height}return z}function gn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=He(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=Ke(te);){var ue=ne.find(0,!0);z-=te.text.length-ue.from.ch,te=ue.to.line,z+=te.text.length-ue.to.ch}return z}function Pn(x){var z=x.display,ne=x.doc;z.maxLine=Yt(ne,ne.first),z.maxLineLength=gn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=gn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var Fn=function(x,z,ne){this.text=x,Ri(this,z),this.height=ne?ne(this):1};Fn.prototype.lineNo=function(){return Jn(this)},ci(Fn);function dr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),ki(x),Ri(x,ne);var ie=te?te(x):1;ie!=x.height&&Wn(x,ie)}function Xn(x){x.parent=null,ki(x)}var Zn={},Qn={};function Ze(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?Qn:Zn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function ze(x,z){var ne=Bt("span",null,null,Me?"padding-right: .1px":null),te={pre:Bt("pre",[ne],"CodeMirror-line"),content:ne,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var ie=0;ie<=(z.rest?z.rest.length:0);ie++){var ue=ie?z.rest[ie-1]:z.line,ye=void 0;te.pos=0,te.addToken=Ae,Vi(x.display.measure)&&(ye=gr(ue,x.doc.direction))&&(te.addToken=Xe(te.addToken,ye)),te.map=[];var _e=z!=x.display.externalMeasured&&Jn(ue);Ft(ue,te,Ji(x,ue,_e)),ue.styleClasses&&(ue.styleClasses.bgClass&&(te.bgClass=dt(ue.styleClasses.bgClass,te.bgClass||"")),ue.styleClasses.textClass&&(te.textClass=dt(ue.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(ba(x.display.measure))),ie==0?(z.measure.map=te.map,z.measure.cache={}):((z.measure.maps||(z.measure.maps=[])).push(te.map),(z.measure.caches||(z.measure.caches=[])).push({}))}if(Me){var Ne=te.content.lastChild;(/\bcm-tab\b/.test(Ne.className)||Ne.querySelector&&Ne.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return $n(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=dt(te.pre.className,te.textClass||"")),te}function xe(x){var z=Ct("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ae(x,z,ne,te,ie,ue,ye){if(z){var _e=x.splitSpaces?qe(z,x.trailingSpace):z,Ne=x.cm.state.specialChars,Be=!1,bt;if(!Ne.test(z))x.col+=z.length,bt=document.createTextNode(_e),x.map.push(x.pos,x.pos+z.length,bt),ve&&Le<9&&(Be=!0),x.pos+=z.length;else{bt=document.createDocumentFragment();for(var It=0;;){Ne.lastIndex=It;var mn=Ne.exec(z),ln=mn?mn.index-It:z.length-It;if(ln){var Yn=document.createTextNode(_e.slice(It,It+ln));ve&&Le<9?bt.appendChild(Ct("span",[Yn])):bt.appendChild(Yn),x.map.push(x.pos,x.pos+ln,Yn),x.col+=ln,x.pos+=ln}if(!mn)break;It+=ln+1;var hr=void 0;if(mn[0]==" "){var Ir=x.cm.options.tabSize,Vr=Ir-x.col%Ir;hr=bt.appendChild(Ct("span",Nt(Vr),"cm-tab")),hr.setAttribute("role","presentation"),hr.setAttribute("cm-text"," "),x.col+=Vr}else mn[0]=="\r"||mn[0]==`
`?(hr=bt.appendChild(Ct("span",mn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),hr.setAttribute("cm-text",mn[0]),x.col+=1):(hr=x.cm.options.specialCharPlaceholder(mn[0]),hr.setAttribute("cm-text",mn[0]),ve&&Le<9?bt.appendChild(Ct("span",[hr])):bt.appendChild(hr),x.col+=1);x.map.push(x.pos,x.pos+1,hr),x.pos++}}if(x.trailingSpace=_e.charCodeAt(z.length-1)==32,ne||te||ie||Be||ue||ye){var ni=ne||"";te&&(ni+=te),ie&&(ni+=ie);var Kr=Ct("span",[bt],ni,ue);if(ye)for(var ii in ye)ye.hasOwnProperty(ii)&&ii!="style"&&ii!="class"&&Kr.setAttribute(ii,ye[ii]);return x.content.appendChild(Kr)}x.content.appendChild(bt)}}function qe(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ie=0;ie<x.length;ie++){var ue=x.charAt(ie);ue==" "&&ne&&(ie==x.length-1||x.charCodeAt(ie+1)==32)&&(ue="\xA0"),te+=ue,ne=ue==" "}return te}function Xe(x,z){return function(ne,te,ie,ue,ye,_e,Ne){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Be=ne.pos,bt=Be+te.length;;){for(var It=void 0,mn=0;mn<z.length&&(It=z[mn],!(It.to>Be&&It.from<=Be));mn++);if(It.to>=bt)return x(ne,te,ie,ue,ye,_e,Ne);x(ne,te.slice(0,It.to-Be),ie,ue,null,_e,Ne),ue=null,te=te.slice(It.to-Be),Be=It.to}}}function St(x,z,ne,te){var ie=!te&&ne.widgetNode;ie&&x.map.push(x.pos,x.pos+z,ie),!te&&x.cm.display.input.needsContentAttribute&&(ie||(ie=x.content.appendChild(document.createElement("span"))),ie.setAttribute("cm-marker",ne.id)),ie&&(x.cm.display.input.setUneditable(ie),x.content.appendChild(ie)),x.pos+=z,x.trailingSpace=!1}function Ft(x,z,ne){var te=x.markedSpans,ie=x.text,ue=0;if(!te){for(var ye=1;ye<ne.length;ye+=2)z.addToken(z,ie.slice(ue,ue=ne[ye]),Ze(ne[ye+1],z.cm.options));return}for(var _e=ie.length,Ne=0,Be=1,bt="",It,mn,ln=0,Yn,hr,Ir,Vr,ni;;){if(ln==Ne){Yn=hr=Ir=mn="",ni=null,Vr=null,ln=1/0;for(var Kr=[],ii=void 0,Oi=0;Oi<te.length;++Oi){var Fi=te[Oi],La=Fi.marker;if(La.type=="bookmark"&&Fi.from==Ne&&La.widgetNode)Kr.push(La);else if(Fi.from<=Ne&&(Fi.to==null||Fi.to>Ne||La.collapsed&&Fi.to==Ne&&Fi.from==Ne)){if(Fi.to!=null&&Fi.to!=Ne&&ln>Fi.to&&(ln=Fi.to,hr=""),La.className&&(Yn+=" "+La.className),La.css&&(mn=(mn?mn+";":"")+La.css),La.startStyle&&Fi.from==Ne&&(Ir+=" "+La.startStyle),La.endStyle&&Fi.to==ln&&(ii||(ii=[])).push(La.endStyle,Fi.to),La.title&&((ni||(ni={})).title=La.title),La.attributes)for(var so in La.attributes)(ni||(ni={}))[so]=La.attributes[so];La.collapsed&&(!Vr||Xi(Vr.marker,La)<0)&&(Vr=Fi)}else Fi.from>Ne&&ln>Fi.from&&(ln=Fi.from)}if(ii)for(var Uo=0;Uo<ii.length;Uo+=2)ii[Uo+1]==ln&&(hr+=" "+ii[Uo]);if(!Vr||Vr.from==Ne)for(var xo=0;xo<Kr.length;++xo)St(z,0,Kr[xo]);if(Vr&&(Vr.from||0)==Ne){if(St(z,(Vr.to==null?_e+1:Vr.to)-Ne,Vr.marker,Vr.from==null),Vr.to==null)return;Vr.to==Ne&&(Vr=!1)}}if(Ne>=_e)break;for(var fs=Math.min(_e,ln);;){if(bt){var hs=Ne+bt.length;if(!Vr){var No=hs>fs?bt.slice(0,fs-Ne):bt;z.addToken(z,No,It?It+Yn:Yn,Ir,Ne+No.length==ln?hr:"",mn,ni)}if(hs>=fs){bt=bt.slice(fs-Ne),Ne=fs;break}Ne=hs,Ir=""}bt=ie.slice(ue,ue=ne[Be++]),It=Ze(ne[Be++],z.cm.options)}}}function Wt(x,z,ne){this.line=z,this.rest=sn(z),this.size=this.rest?Jn(Xt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=pr(x,z)}function an(x,z,ne){for(var te=[],ie,ue=z;ue<ne;ue=ie){var ye=new Wt(x.doc,Yt(x.doc,ue),ue);ie=ue+ye.size,te.push(ye)}return te}var nn=null;function Ot(x){nn?nn.ops.push(x):x.ownsGroup=nn={ops:[x],delayedCallbacks:[]}}function un(x){var z=x.delayedCallbacks,ne=0;do{for(;ne<z.length;ne++)z[ne].call(null);for(var te=0;te<x.ops.length;te++){var ie=x.ops[te];if(ie.cursorActivityHandlers)for(;ie.cursorActivityCalled<ie.cursorActivityHandlers.length;)ie.cursorActivityHandlers[ie.cursorActivityCalled++].call(null,ie.cm)}}while(ne<z.length)}function hn(x,z){var ne=x.ownsGroup;if(ne)try{un(ne)}finally{nn=null,z(ne)}}var zn=null;function Sn(x,z){var ne=ir(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;nn?ie=nn.delayedCallbacks:zn?ie=zn:(ie=zn=[],setTimeout(qn,0));for(var ue=function(_e){ie.push(function(){return ne[_e].apply(null,te)})},ye=0;ye<ne.length;++ye)ue(ye)}}function qn(){var x=zn;zn=null;for(var z=0;z<x.length;++z)x[z]()}function fr(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ue=z.changes[ie];ue=="text"?ar(x,z):ue=="gutter"?Nr(x,z,ne,te):ue=="class"?Mr(x,z):ue=="widget"&&rr(x,z,te)}z.changes=null}function er(x){return x.node==x.text&&(x.node=Ct("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ve&&Le<8&&(x.node.style.zIndex=2)),x.node}function mr(x,z){var ne=z.bgClass?z.bgClass+" "+(z.line.bgClass||""):z.line.bgClass;if(ne&&(ne+=" CodeMirror-linebackground"),z.background)ne?z.background.className=ne:(z.background.parentNode.removeChild(z.background),z.background=null);else if(ne){var te=er(z);z.background=te.insertBefore(Ct("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function jn(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):ze(x,z)}function ar(x,z){var ne=z.text.className,te=jn(x,z);z.text==z.node&&(z.node=te.pre),z.text.parentNode.replaceChild(te.pre,z.text),z.text=te.pre,te.bgClass!=z.bgClass||te.textClass!=z.textClass?(z.bgClass=te.bgClass,z.textClass=te.textClass,Mr(x,z)):ne&&(z.text.className=ne)}function Mr(x,z){mr(x,z),z.line.wrapClass?er(z).className=z.line.wrapClass:z.node!=z.text&&(z.node.className="");var ne=z.textClass?z.textClass+" "+(z.line.textClass||""):z.line.textClass;z.text.className=ne||""}function Nr(x,z,ne,te){if(z.gutter&&(z.node.removeChild(z.gutter),z.gutter=null),z.gutterBackground&&(z.node.removeChild(z.gutterBackground),z.gutterBackground=null),z.line.gutterClass){var ie=er(z);z.gutterBackground=Ct("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px; width: "+te.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),ie.insertBefore(z.gutterBackground,z.text)}var ue=z.line.gutterMarkers;if(x.options.lineNumbers||ue){var ye=er(z),_e=z.gutter=Ct("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(_e),ye.insertBefore(_e,z.text),z.line.gutterClass&&(_e.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ue||!ue["CodeMirror-linenumbers"])&&(z.lineNumber=_e.appendChild(Ct("div",Rr(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ue)for(var Ne=0;Ne<x.display.gutterSpecs.length;++Ne){var Be=x.display.gutterSpecs[Ne].className,bt=ue.hasOwnProperty(Be)&&ue[Be];bt&&_e.appendChild(Ct("div",[bt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Be]+"px; width: "+te.gutterWidth[Be]+"px"))}}}function rr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=we("CodeMirror-linewidget"),ie=z.node.firstChild,ue=void 0;ie;ie=ue)ue=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);$r(x,z,ne)}function Dr(x,z,ne,te){var ie=jn(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),Mr(x,z),Nr(x,z,ne,te),$r(x,z,te),z.node}function $r(x,z,ne){if(mi(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)mi(x,z.rest[te],z,ne,!1)}function mi(x,z,ne,te,ie){if(z.widgets)for(var ue=er(ne),ye=0,_e=z.widgets;ye<_e.length;++ye){var Ne=_e[ye],Be=Ct("div",[Ne.node],"CodeMirror-linewidget"+(Ne.className?" "+Ne.className:""));Ne.handleMouseEvents||Be.setAttribute("cm-ignore-events","true"),ri(Ne,Be,ne,te),x.display.input.setUneditable(Be),ie&&Ne.above?ue.insertBefore(Be,ne.gutter||ne.text):ue.appendChild(Be),Sn(Ne,"redraw")}}function ri(x,z,ne,te){if(x.noHScroll){(ne.alignable||(ne.alignable=[])).push(z);var ie=te.wrapperWidth;z.style.left=te.fixedPos+"px",x.coverGutter||(ie-=te.gutterTotalWidth,z.style.paddingLeft=te.gutterTotalWidth+"px"),z.style.width=ie+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-te.gutterTotalWidth+"px"))}function Ur(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Vt(document.body,x.node)){var ne="position: relative;";x.coverGutter&&(ne+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(ne+="width: "+z.display.wrapper.clientWidth+"px;"),Lt(z.display.measure,Ct("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function ui(x,z){for(var ne=xr(z);ne!=x.wrapper;ne=ne.parentNode)if(!ne||ne.nodeType==1&&ne.getAttribute("cm-ignore-events")=="true"||ne.parentNode==x.sizer&&ne!=x.mover)return!0}function pi(x){return x.lineSpace.offsetTop}function jr(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function Gr(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=Lt(x.measure,Ct("pre","x","CodeMirror-line-like")),ne=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,te={left:parseInt(ne.paddingLeft),right:parseInt(ne.paddingRight)};return!isNaN(te.left)&&!isNaN(te.right)&&(x.cachedPaddingH=te),te}function wr(x){return In-x.display.nativeBarWidth}function Fr(x){return x.display.scroller.clientWidth-wr(x)-x.display.barWidth}function Yr(x){return x.display.scroller.clientHeight-wr(x)-x.display.barHeight}function fi(x,z,ne){var te=x.options.lineWrapping,ie=te&&Fr(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ue=z.measure.heights=[];if(te){z.measure.width=ie;for(var ye=z.text.firstChild.getClientRects(),_e=0;_e<ye.length-1;_e++){var Ne=ye[_e],Be=ye[_e+1];Math.abs(Ne.bottom-Be.bottom)>2&&ue.push((Ne.bottom+Be.top)/2-ne.top)}}ue.push(ne.bottom-ne.top)}}function ua(x,z,ne){if(x.line==z)return{map:x.measure.map,cache:x.measure.cache};for(var te=0;te<x.rest.length;te++)if(x.rest[te]==z)return{map:x.measure.maps[te],cache:x.measure.caches[te]};for(var ie=0;ie<x.rest.length;ie++)if(Jn(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function ha(x,z){z=yt(z);var ne=Jn(z),te=x.display.externalMeasured=new Wt(x.doc,z,ne);te.lineN=ne;var ie=te.built=ze(x,te);return te.text=ie.pre,Lt(x.display.lineMeasure,ie.pre),te}function Bi(x,z,ne,te){return Wr(x,ei(x,z),ne,te)}function $i(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[Br(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function ei(x,z){var ne=Jn(z),te=$i(x,ne);te&&!te.text?te=null:te&&te.changes&&(fr(x,te,ne,uo(x)),x.curOp.forceUpdate=!0),te||(te=ha(x,z));var ie=ua(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Wr(x,z,ne,te,ie){z.before&&(ne=-1);var ue=ne+(te||""),ye;return z.cache.hasOwnProperty(ue)?ye=z.cache[ue]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(fi(x,z.view,z.rect),z.hasHeights=!0),ye=zr(x,z,ne,te),ye.bogus||(z.cache[ue]=ye)),{left:ye.left,right:ye.right,top:ie?ye.rtop:ye.top,bottom:ie?ye.rbottom:ye.bottom}}var Yi={left:0,right:0,top:0,bottom:0};function qr(x,z,ne){for(var te,ie,ue,ye,_e,Ne,Be=0;Be<x.length;Be+=3)if(_e=x[Be],Ne=x[Be+1],z<_e?(ie=0,ue=1,ye="left"):z<Ne?(ie=z-_e,ue=ie+1):(Be==x.length-3||z==Ne&&x[Be+3]>z)&&(ue=Ne-_e,ie=ue-1,z>=Ne&&(ye="right")),ie!=null){if(te=x[Be+2],_e==Ne&&ne==(te.insertLeft?"left":"right")&&(ye=ne),ne=="left"&&ie==0)for(;Be&&x[Be-2]==x[Be-3]&&x[Be-1].insertLeft;)te=x[(Be-=3)+2],ye="left";if(ne=="right"&&ie==Ne-_e)for(;Be<x.length-3&&x[Be+3]==x[Be+4]&&!x[Be+5].insertLeft;)te=x[(Be+=3)+2],ye="right";break}return{node:te,start:ie,end:ue,collapse:ye,coverStart:_e,coverEnd:Ne}}function vr(x,z){var ne=Yi;if(z=="left")for(var te=0;te<x.length&&(ne=x[te]).left==ne.right;te++);else for(var ie=x.length-1;ie>=0&&(ne=x[ie]).left==ne.right;ie--);return ne}function zr(x,z,ne,te){var ie=qr(z.map,ne,te),ue=ie.node,ye=ie.start,_e=ie.end,Ne=ie.collapse,Be;if(ue.nodeType==3){for(var bt=0;bt<4;bt++){for(;ye&&Je(z.line.text.charAt(ie.coverStart+ye));)--ye;for(;ie.coverStart+_e<ie.coverEnd&&Je(z.line.text.charAt(ie.coverStart+_e));)++_e;if(ve&&Le<9&&ye==0&&_e==ie.coverEnd-ie.coverStart?Be=ue.parentNode.getBoundingClientRect():Be=vr(at(ue,ye,_e).getClientRects(),te),Be.left||Be.right||ye==0)break;_e=ye,ye=ye-1,Ne="right"}ve&&Le<11&&(Be=Li(x.display.measure,Be))}else{ye>0&&(Ne=te="right");var It;x.options.lineWrapping&&(It=ue.getClientRects()).length>1?Be=It[te=="right"?It.length-1:0]:Be=ue.getBoundingClientRect()}if(ve&&Le<9&&!ye&&(!Be||!Be.left&&!Be.right)){var mn=ue.parentNode.getClientRects()[0];mn?Be={left:mn.left,right:mn.left+eo(x.display),top:mn.top,bottom:mn.bottom}:Be=Yi}for(var ln=Be.top-z.rect.top,Yn=Be.bottom-z.rect.top,hr=(ln+Yn)/2,Ir=z.view.measure.heights,Vr=0;Vr<Ir.length-1&&!(hr<Ir[Vr]);Vr++);var ni=Vr?Ir[Vr-1]:0,Kr=Ir[Vr],ii={left:(Ne=="right"?Be.right:Be.left)-z.rect.left,right:(Ne=="left"?Be.left:Be.right)-z.rect.left,top:ni,bottom:Kr};return!Be.left&&!Be.right&&(ii.bogus=!0),x.options.singleCursorHeightPerLine||(ii.rtop=ln,ii.rbottom=Yn),ii}function Li(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!rn(x))return z;var ne=screen.logicalXDPI/screen.deviceXDPI,te=screen.logicalYDPI/screen.deviceYDPI;return{left:z.left*ne,right:z.right*ne,top:z.top*te,bottom:z.bottom*te}}function yi(x){if(x.measure&&(x.measure.cache={},x.measure.heights=null,x.rest))for(var z=0;z<x.rest.length;z++)x.measure.caches[z]={}}function ji(x){x.display.externalMeasure=null,Ye(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)yi(x.display.view[z])}function ti(x){ji(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function ta(){return me&&lt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function qi(){return me&&lt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ki(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=Ur(x.widgets[ne]));return z}function Ui(x,z,ne,te,ie){if(!ie){var ue=Ki(z);ne.top+=ue,ne.bottom+=ue}if(te=="line")return ne;te||(te="local");var ye=Cn(z);if(te=="local"?ye+=pi(x.display):ye-=x.display.viewOffset,te=="page"||te=="window"){var _e=x.display.lineSpace.getBoundingClientRect();ye+=_e.top+(te=="window"?0:qi());var Ne=_e.left+(te=="window"?0:ta());ne.left+=Ne,ne.right+=Ne}return ne.top+=ye,ne.bottom+=ye,ne}function sa(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=ta(),ie-=qi();else if(ne=="local"||!ne){var ue=x.display.sizer.getBoundingClientRect();te+=ue.left,ie+=ue.top}var ye=x.display.lineSpace.getBoundingClientRect();return{left:te-ye.left,top:ie-ye.top}}function Aa(x,z,ne,te,ie){return te||(te=Yt(x.doc,z.line)),Ui(x,te,Bi(x,te,z.ch,ie),ne)}function da(x,z,ne,te,ie,ue){te=te||Yt(x.doc,z.line),ie||(ie=ei(x,te));function ye(Yn,hr){var Ir=Wr(x,ie,Yn,hr?"right":"left",ue);return hr?Ir.left=Ir.right:Ir.right=Ir.left,Ui(x,te,Ir,ne)}var _e=gr(te,x.doc.direction),Ne=z.ch,Be=z.sticky;if(Ne>=te.text.length?(Ne=te.text.length,Be="before"):Ne<=0&&(Ne=0,Be="after"),!_e)return ye(Be=="before"?Ne-1:Ne,Be=="before");function bt(Yn,hr,Ir){var Vr=_e[hr],ni=Vr.level==1;return ye(Ir?Yn-1:Yn,ni!=Ir)}var It=Gt(_e,Ne,Be),mn=Qt,ln=bt(Ne,It,Be=="before");return mn!=null&&(ln.other=bt(Ne,mn,Be!="before")),ln}function Sa(x,z){var ne=0;z=ur(x.doc,z),x.options.lineWrapping||(ne=eo(x.display)*z.ch);var te=Yt(x.doc,z.line),ie=Cn(te)+pi(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function za(x,z,ne,te,ie){var ue=bn(x,z,ne);return ue.xRel=ie,te&&(ue.outside=te),ue}function ja(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return za(te.first,0,null,-1,-1);var ie=or(te,ne),ue=te.first+te.size-1;if(ie>ue)return za(te.first+te.size-1,Yt(te,ue).text.length,null,1,1);z<0&&(z=0);for(var ye=Yt(te,ie);;){var _e=di(x,ye,ie,z,ne),Ne=Ve(ye,_e.ch+(_e.xRel>0||_e.outside>0?1:0));if(!Ne)return _e;var Be=Ne.find(1);if(Be.line==ie)return Be;ye=Yt(te,ie=Be.line)}}function Qa(x,z,ne,te){te-=Ki(z);var ie=z.text.length,ue=Kt(function(ye){return Wr(x,ne,ye-1).bottom<=te},ie,0);return ie=Kt(function(ye){return Wr(x,ne,ye).top>te},ue,ie),{begin:ue,end:ie}}function Ra(x,z,ne,te){ne||(ne=ei(x,z));var ie=Ui(x,z,Wr(x,ne,te),"line").top;return Qa(x,z,ne,ie)}function la(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function di(x,z,ne,te,ie){ie-=Cn(z);var ue=ei(x,z),ye=Ki(z),_e=0,Ne=z.text.length,Be=!0,bt=gr(z,x.doc.direction);if(bt){var It=(x.options.lineWrapping?Qi:Mi)(x,z,ne,ue,bt,te,ie);Be=It.level!=1,_e=Be?It.from:It.to-1,Ne=Be?It.to:It.from-1}var mn=null,ln=null,Yn=Kt(function(Oi){var Fi=Wr(x,ue,Oi);return Fi.top+=ye,Fi.bottom+=ye,la(Fi,te,ie,!1)?(Fi.top<=ie&&Fi.left<=te&&(mn=Oi,ln=Fi),!0):!1},_e,Ne),hr,Ir,Vr=!1;if(ln){var ni=te-ln.left<ln.right-te,Kr=ni==Be;Yn=mn+(Kr?0:1),Ir=Kr?"after":"before",hr=ni?ln.left:ln.right}else{!Be&&(Yn==Ne||Yn==_e)&&Yn++,Ir=Yn==0?"after":Yn==z.text.length?"before":Wr(x,ue,Yn-(Be?1:0)).bottom+ye<=ie==Be?"after":"before";var ii=da(x,bn(ne,Yn,Ir),"line",z,ue);hr=ii.left,Vr=ie<ii.top?-1:ie>=ii.bottom?1:0}return Yn=_t(z.text,Yn,1),za(ne,Yn,Ir,Vr,te-hr)}function Mi(x,z,ne,te,ie,ue,ye){var _e=Kt(function(It){var mn=ie[It],ln=mn.level!=1;return la(da(x,bn(ne,ln?mn.to:mn.from,ln?"before":"after"),"line",z,te),ue,ye,!0)},0,ie.length-1),Ne=ie[_e];if(_e>0){var Be=Ne.level!=1,bt=da(x,bn(ne,Be?Ne.from:Ne.to,Be?"after":"before"),"line",z,te);la(bt,ue,ye,!0)&&bt.top>ye&&(Ne=ie[_e-1])}return Ne}function Qi(x,z,ne,te,ie,ue,ye){var _e=Qa(x,z,te,ye),Ne=_e.begin,Be=_e.end;/\s/.test(z.text.charAt(Be-1))&&Be--;for(var bt=null,It=null,mn=0;mn<ie.length;mn++){var ln=ie[mn];if(!(ln.from>=Be||ln.to<=Ne)){var Yn=ln.level!=1,hr=Wr(x,te,Yn?Math.min(Be,ln.to)-1:Math.max(Ne,ln.from)).right,Ir=hr<ue?ue-hr+1e9:hr-ue;(!bt||It>Ir)&&(bt=ln,It=Ir)}}return bt||(bt=ie[ie.length-1]),bt.from<Ne&&(bt={from:Ne,to:bt.to,level:bt.level}),bt.to>Be&&(bt={from:bt.from,to:Be,level:bt.level}),bt}var pa;function Ka(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(pa==null){pa=Ct("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)pa.appendChild(document.createTextNode("x")),pa.appendChild(Ct("br"));pa.appendChild(document.createTextNode("x"))}Lt(x.measure,pa);var ne=pa.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ye(x.measure),ne||1}function eo(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=Ct("span","xxxxxxxxxx"),ne=Ct("pre",[z],"CodeMirror-line-like");Lt(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function uo(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ue=z.gutters.firstChild,ye=0;ue;ue=ue.nextSibling,++ye){var _e=x.display.gutterSpecs[ye].className;ne[_e]=ue.offsetLeft+ue.clientLeft+ie,te[_e]=ue.clientWidth}return{fixedPos:_o(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function _o(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function ko(x){var z=Ka(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/eo(x.display)-3);return function(ie){if(pr(x.doc,ie))return 0;var ue=0;if(ie.widgets)for(var ye=0;ye<ie.widgets.length;ye++)ie.widgets[ye].height&&(ue+=ie.widgets[ye].height);return ne?ue+(Math.ceil(ie.text.length/te)||1)*z:ue+z}}function to(x){var z=x.doc,ne=ko(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&Wn(te,ie)})}function Da(x,z,ne,te){var ie=x.display;if(!ne&&xr(z).getAttribute("cm-not-content")=="true")return null;var ue,ye,_e=ie.lineSpace.getBoundingClientRect();try{ue=z.clientX-_e.left,ye=z.clientY-_e.top}catch(It){return null}var Ne=ja(x,ue,ye),Be;if(te&&Ne.xRel>0&&(Be=Yt(x.doc,Ne.line).text).length==Ne.ch){var bt=Ge(Be,Be.length,x.options.tabSize)-Be.length;Ne=bn(Ne.line,Math.max(0,Math.round((ue-Gr(x.display).left)/eo(x.display))-bt))}return Ne}function Br(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var ne=x.display.view,te=0;te<ne.length;te++)if(z-=ne[te].size,z<0)return te}function gi(x,z,ne,te){z==null&&(z=x.doc.first),ne==null&&(ne=x.doc.first+x.doc.size),te||(te=0);var ie=x.display;if(te&&ne<ie.viewTo&&(ie.updateLineNumbers==null||ie.updateLineNumbers>z)&&(ie.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=ie.viewTo)_i&&dn(x.doc,z)<ie.viewTo&&na(x);else if(ne<=ie.viewFrom)_i&&Gn(x.doc,ne+te)>ie.viewFrom?na(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)na(x);else if(z<=ie.viewFrom){var ue=Va(x,ne,ne+te,1);ue?(ie.view=ie.view.slice(ue.index),ie.viewFrom=ue.lineN,ie.viewTo+=te):na(x)}else if(ne>=ie.viewTo){var ye=Va(x,z,z,-1);ye?(ie.view=ie.view.slice(0,ye.index),ie.viewTo=ye.lineN):na(x)}else{var _e=Va(x,z,z,-1),Ne=Va(x,ne,ne+te,1);_e&&Ne?(ie.view=ie.view.slice(0,_e.index).concat(an(x,_e.lineN,Ne.lineN)).concat(ie.view.slice(Ne.index)),ie.viewTo+=te):na(x)}var Be=ie.externalMeasured;Be&&(ne<Be.lineN?Be.lineN+=te:z<Be.lineN+Be.size&&(ie.externalMeasured=null))}function ya(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var ue=te.view[Br(x,z)];if(ue.node!=null){var ye=ue.changes||(ue.changes=[]);Zt(ye,ne)==-1&&ye.push(ne)}}}function na(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function Va(x,z,ne,te){var ie=Br(x,z),ue,ye=x.display.view;if(!_i||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var _e=x.display.viewFrom,Ne=0;Ne<ie;Ne++)_e+=ye[Ne].size;if(_e!=z){if(te>0){if(ie==ye.length-1)return null;ue=_e+ye[ie].size-z,ie++}else ue=_e-z;z+=ue,ne+=ue}for(;dn(x.doc,ne)!=ne;){if(ie==(te<0?0:ye.length-1))return null;ne+=te*ye[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function Za(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=an(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=an(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(Br(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(an(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,Br(x,ne)))),te.viewTo=ne}function Do(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ie=z[te];!ie.hidden&&(!ie.node||ie.changes)&&++ne}return ne}function zo(x){x.display.input.showSelection(x.display.input.prepareSelection())}function as(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ue=te.selection=document.createDocumentFragment(),ye=0;ye<ne.sel.ranges.length;ye++)if(!(!z&&ye==ne.sel.primIndex)){var _e=ne.sel.ranges[ye];if(!(_e.from().line>=x.display.viewTo||_e.to().line<x.display.viewFrom)){var Ne=_e.empty();(Ne||x.options.showCursorWhenSelecting)&&ea(x,_e.head,ie),Ne||Si(x,_e,ue)}}return te}function ea(x,z,ne){var te=da(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(Ct("div","\xA0","CodeMirror-cursor"));if(ie.style.left=te.left+"px",ie.style.top=te.top+"px",ie.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var ue=ne.appendChild(Ct("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ue.style.display="",ue.style.left=te.other.left+"px",ue.style.top=te.other.top+"px",ue.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function _r(x,z){return x.top-z.top||x.left-z.left}function Si(x,z,ne){var te=x.display,ie=x.doc,ue=document.createDocumentFragment(),ye=Gr(x.display),_e=ye.left,Ne=Math.max(te.sizerWidth,Fr(x)-te.sizer.offsetLeft)-ye.right,Be=ie.direction=="ltr";function bt(Kr,ii,Oi,Fi){ii<0&&(ii=0),ii=Math.round(ii),Fi=Math.round(Fi),ue.appendChild(Ct("div",null,"CodeMirror-selected","position: absolute; left: "+Kr+`px;
top: `+ii+"px; width: "+(Oi==null?Ne-Kr:Oi)+`px;
height: `+(Fi-ii)+"px"))}function It(Kr,ii,Oi){var Fi=Yt(ie,Kr),La=Fi.text.length,so,Uo;function xo(No,ps){return Aa(x,bn(Kr,No),"div",Fi,ps)}function fs(No,ps,ca){var Co=Ra(x,Fi,null,No),wo=ps=="ltr"==(ca=="after")?"left":"right",Eo=ca=="after"?Co.begin:Co.end-(/\s/.test(Fi.text.charAt(Co.end-1))?2:1);return xo(Eo,wo)[wo]}var hs=gr(Fi,ie.direction);return Ht(hs,ii||0,Oi==null?La:Oi,function(No,ps,ca,Co){var wo=ca=="ltr",Eo=xo(No,wo?"left":"right"),Ao=xo(ps-1,wo?"right":"left"),Wl=ii==null&&No==0,ys=Oi==null&&ps==La,Yo=Co==0,Xa=!hs||Co==hs.length-1;if(Ao.top-Eo.top<=3){var $o=(Be?Wl:ys)&&Yo,Mu=(Be?ys:Wl)&&Xa,sl=$o?_e:(wo?Eo:Ao).left,xl=Mu?Ne:(wo?Ao:Eo).right;bt(sl,Eo.top,xl-sl,Eo.bottom)}else{var js,Ro,Zl,qo;wo?(js=Be&&Wl&&Yo?_e:Eo.left,Ro=Be?Ne:fs(No,ca,"before"),Zl=Be?_e:fs(ps,ca,"after"),qo=Be&&ys&&Xa?Ne:Ao.right):(js=Be?fs(No,ca,"before"):_e,Ro=!Be&&Wl&&Yo?Ne:Eo.right,Zl=!Be&&ys&&Xa?_e:Ao.left,qo=Be?fs(ps,ca,"after"):Ne),bt(js,Eo.top,Ro-js,Eo.bottom),Eo.bottom<Ao.top&&bt(_e,Eo.bottom,null,Ao.top),bt(Zl,Ao.top,qo-Zl,Ao.bottom)}(!so||_r(Eo,so)<0)&&(so=Eo),_r(Ao,so)<0&&(so=Ao),(!Uo||_r(Eo,Uo)<0)&&(Uo=Eo),_r(Ao,Uo)<0&&(Uo=Ao)}),{start:so,end:Uo}}var mn=z.from(),ln=z.to();if(mn.line==ln.line)It(mn.line,mn.ch,ln.ch);else{var Yn=Yt(ie,mn.line),hr=Yt(ie,ln.line),Ir=yt(Yn)==yt(hr),Vr=It(mn.line,mn.ch,Ir?Yn.text.length+1:null).end,ni=It(ln.line,Ir?0:null,ln.ch).start;Ir&&(Vr.top<ni.top-2?(bt(Vr.right,Vr.top,null,Vr.bottom),bt(_e,ni.top,ni.left,ni.bottom)):bt(Vr.right,Vr.top,ni.left-Vr.right,Vr.bottom)),Vr.bottom<ni.top&&bt(_e,Vr.bottom,null,ni.top)}ne.appendChild(ue)}function Ci(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ne=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||Ko(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Ai(x){x.state.focused||(x.display.input.focus(),Ja(x))}function Ga(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Ko(x))},100)}function Ja(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||($n(x,"focus",x,z),x.state.focused=!0,xn(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),Me&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Ci(x))}function Ko(x,z){x.state.delayingBlurEvent||(x.state.focused&&($n(x,"blur",x,z),x.state.focused=!1,je(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function jo(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ue=x.options.lineWrapping,ye=void 0,_e=0;if(!ie.hidden){if(ve&&Le<8){var Ne=ie.node.offsetTop+ie.node.offsetHeight;ye=Ne-ne,ne=Ne}else{var Be=ie.node.getBoundingClientRect();ye=Be.bottom-Be.top,!ue&&ie.text.firstChild&&(_e=ie.text.firstChild.getBoundingClientRect().right-Be.left-1)}var bt=ie.line.height-ye;if((bt>.005||bt<-.005)&&(Wn(ie.line,ye),us(ie.line),ie.rest))for(var It=0;It<ie.rest.length;It++)us(ie.rest[It]);if(_e>x.display.sizerWidth){var mn=Math.ceil(_e/eo(x.display));mn>x.display.maxLineLength&&(x.display.maxLineLength=mn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function us(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ne=x.widgets[z],te=ne.node.parentNode;te&&(ne.height=te.offsetHeight)}}function _a(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-pi(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ue=or(z,te),ye=or(z,ie);if(ne&&ne.ensure){var _e=ne.ensure.from.line,Ne=ne.ensure.to.line;_e<ue?(ue=_e,ye=or(z,Cn(Yt(z,_e))+x.wrapper.clientHeight)):Math.min(Ne,z.lastLine())>=ye&&(ue=or(z,Cn(Yt(z,Ne))-x.wrapper.clientHeight),ye=Ne)}return{from:ue,to:Math.max(ye,ue+1)}}function Bo(x,z){if(!Cr(x,"scrollCursorIntoView")){var ne=x.display,te=ne.sizer.getBoundingClientRect(),ie=null;if(z.top+te.top<0?ie=!0:z.bottom+te.top>(window.innerHeight||document.documentElement.clientHeight)&&(ie=!1),ie!=null&&!Et){var ue=Ct("div","\u200B",null,`position: absolute;
top: `+(z.top-ne.viewOffset-pi(x.display))+`px;
height: `+(z.bottom-z.top+wr(x)+ne.barHeight)+`px;
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(ue),ue.scrollIntoView(ie),x.display.lineSpace.removeChild(ue)}}}function ds(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?bn(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?bn(z.line,z.ch+1,"before"):z);for(var ue=0;ue<5;ue++){var ye=!1,_e=da(x,z),Ne=!ne||ne==z?_e:da(x,ne);ie={left:Math.min(_e.left,Ne.left),top:Math.min(_e.top,Ne.top)-te,right:Math.max(_e.left,Ne.left),bottom:Math.max(_e.bottom,Ne.bottom)+te};var Be=As(x,ie),bt=x.doc.scrollTop,It=x.doc.scrollLeft;if(Be.scrollTop!=null&&(Ba(x,Be.scrollTop),Math.abs(x.doc.scrollTop-bt)>1&&(ye=!0)),Be.scrollLeft!=null&&(vo(x,Be.scrollLeft),Math.abs(x.doc.scrollLeft-It)>1&&(ye=!0)),!ye)break}return ie}function ul(x,z){var ne=As(x,z);ne.scrollTop!=null&&Ba(x,ne.scrollTop),ne.scrollLeft!=null&&vo(x,ne.scrollLeft)}function As(x,z){var ne=x.display,te=Ka(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ue=Yr(x),ye={};z.bottom-z.top>ue&&(z.bottom=z.top+ue);var _e=x.doc.height+jr(ne),Ne=z.top<te,Be=z.bottom>_e-te;if(z.top<ie)ye.scrollTop=Ne?0:z.top;else if(z.bottom>ie+ue){var bt=Math.min(z.top,(Be?_e:z.bottom)-ue);bt!=ie&&(ye.scrollTop=bt)}var It=x.options.fixedGutter?0:ne.gutters.offsetWidth,mn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-It,ln=Fr(x)-ne.gutters.offsetWidth,Yn=z.right-z.left>ln;return Yn&&(z.right=z.left+ln),z.left<10?ye.scrollLeft=0:z.left<mn?ye.scrollLeft=Math.max(0,z.left+It-(Yn?0:10)):z.right>ln+mn-3&&(ye.scrollLeft=z.right+(Yn?0:10)-ln),ye}function ms(x,z){z!=null&&(qs(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function Ho(x){qs(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ts(x,z,ne){(z!=null||ne!=null)&&qs(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Is(x,z){qs(x),x.curOp.scrollToPos=z}function qs(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=Sa(x,z.from),te=Sa(x,z.to);fo(x,ne,te,z.margin)}}function fo(x,z,ne,te){var ie=As(x,{left:Math.min(z.left,ne.left),top:Math.min(z.top,ne.top)-te,right:Math.max(z.right,ne.right),bottom:Math.max(z.bottom,ne.bottom)+te});Ts(x,ie.scrollLeft,ie.scrollTop)}function Ba(x,z){Math.abs(x.doc.scrollTop-z)<2||(ce||qc(x,{top:z}),no(x,z,!0),ce&&qc(x),os(x,100))}function no(x,z,ne){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ne)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function vo(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,ju(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function bo(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+jr(x.display));return{clientHeight:z.scroller.clientHeight,viewHeight:z.wrapper.clientHeight,scrollWidth:z.scroller.scrollWidth,clientWidth:z.scroller.clientWidth,viewWidth:z.wrapper.clientWidth,barLeft:x.options.fixedGutter?ne:0,docHeight:te,scrollHeight:te+wr(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Wo=function(x,z,ne){this.cm=ne;var te=this.vert=Ct("div",[Ct("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=Ct("div",[Ct("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),pn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),pn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&Le<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Wo.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var ue=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+ue)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ne?te:0,bottom:z?te:0}},Wo.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Wo.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Wo.prototype.zeroWidthHack=function(){var x=ke&&!Re?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new De,this.disableVert=new De},Wo.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ie=x.getBoundingClientRect(),ue=ne=="vert"?document.elementFromPoint(ie.right-1,(ie.top+ie.bottom)/2):document.elementFromPoint((ie.right+ie.left)/2,ie.bottom-1);ue!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},Wo.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var So=function(){};So.prototype.update=function(){return{bottom:0,right:0}},So.prototype.setScrollLeft=function(){},So.prototype.setScrollTop=function(){},So.prototype.clear=function(){};function xs(x,z){z||(z=bo(x));var ne=x.display.barWidth,te=x.display.barHeight;Xl(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&jo(x),Xl(x,bo(x)),ne=x.display.barWidth,te=x.display.barHeight}function Xl(x,z){var ne=x.display,te=ne.scrollbars.update(z);ne.sizer.style.paddingRight=(ne.barWidth=te.right)+"px",ne.sizer.style.paddingBottom=(ne.barHeight=te.bottom)+"px",ne.heightForcer.style.borderBottom=te.bottom+"px solid transparent",te.right&&te.bottom?(ne.scrollbarFiller.style.display="block",ne.scrollbarFiller.style.height=te.bottom+"px",ne.scrollbarFiller.style.width=te.right+"px"):ne.scrollbarFiller.style.display="",te.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ne.gutterFiller.style.display="block",ne.gutterFiller.style.height=te.bottom+"px",ne.gutterFiller.style.width=z.gutterWidth+"px"):ne.gutterFiller.style.display=""}var Yl={native:Wo,null:So};function vc(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&je(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Yl[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),pn(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ne){ne=="horizontal"?vo(x,z):Ba(x,z)},x),x.display.scrollbars.addClass&&xn(x.display.wrapper,x.display.scrollbars.addClass)}var Xc=0;function Ks(x){x.curOp={cm:x,viewChanged:!1,startHeight:x.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:++Xc},Ot(x.curOp)}function Ds(x){var z=x.curOp;z&&hn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;yc(ne)})}function yc(x){for(var z=x.ops,ne=0;ne<z.length;ne++)ql(z[ne]);for(var te=0;te<z.length;te++)$a(z[te]);for(var ie=0;ie<z.length;ie++)Ca(z[ie]);for(var ue=0;ue<z.length;ue++)Zo(z[ue]);for(var ye=0;ye<z.length;ye++)ts(z[ye])}function ql(x){var z=x.cm,ne=z.display;Jl(z),x.updateMaxLine&&Pn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ne.viewFrom||x.scrollToPos.to.line>=ne.viewTo)||ne.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new gs(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function $a(x){x.updatedDisplay=x.mustUpdate&&Yc(x.cm,x.update)}function Ca(x){var z=x.cm,ne=z.display;x.updatedDisplay&&jo(z),x.barMeasure=bo(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Bi(z,ne.maxLine,ne.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(ne.scroller.clientWidth,ne.sizer.offsetLeft+x.adjustWidthTo+wr(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-Fr(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Zo(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&vo(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==$t();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&xs(z,x.barMeasure),x.updatedDisplay&&Qc(z,x.barMeasure),x.selectionChanged&&Ci(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Ai(x.cm)}function ts(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Uu(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&no(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&vo(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=ds(z,ur(te,x.scrollToPos.from),ur(te,x.scrollToPos.to),x.scrollToPos.margin);Bo(z,ie)}var ue=x.maybeHiddenMarkers,ye=x.maybeUnhiddenMarkers;if(ue)for(var _e=0;_e<ue.length;++_e)ue[_e].lines.length||$n(ue[_e],"hide");if(ye)for(var Ne=0;Ne<ye.length;++Ne)ye[Ne].lines.length&&$n(ye[Ne],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&$n(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function Ea(x,z){if(x.curOp)return z();Ks(x);try{return z()}finally{Ds(x)}}function Ua(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ks(x);try{return z.apply(x,arguments)}finally{Ds(x)}}}function Ha(x){return function(){if(this.curOp)return x.apply(this,arguments);Ks(this);try{return x.apply(this,arguments)}finally{Ds(this)}}}function mo(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ks(z);try{return x.apply(this,arguments)}finally{Ds(z)}}}function os(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,En(Hs,x))}function Hs(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=Zi(x,z.highlightFrontier),ie=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(ue){if(te.line>=x.display.viewFrom){var ye=ue.styles,_e=ue.text.length>x.options.maxHighlightLength?mt(z.mode,te.state):null,Ne=Ma(x,ue,te,!0);_e&&(te.state=_e),ue.styles=Ne.styles;var Be=ue.styleClasses,bt=Ne.classes;bt?ue.styleClasses=bt:Be&&(ue.styleClasses=null);for(var It=!ye||ye.length!=ue.styles.length||Be!=bt&&(!Be||!bt||Be.bgClass!=bt.bgClass||Be.textClass!=bt.textClass),mn=0;!It&&mn<ye.length;++mn)It=ye[mn]!=ue.styles[mn];It&&ie.push(te.line),ue.stateAfter=te.save(),te.nextLine()}else ue.text.length<=x.options.maxHighlightLength&&xa(x,ue.text,te),ue.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return os(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&Ea(x,function(){for(var ue=0;ue<ie.length;ue++)ya(x,ie[ue],"text")})}}var gs=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=_a(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=Fr(x),this.force=ne,this.dims=uo(x),this.events=[]};gs.prototype.signal=function(x,z){li(x,z)&&this.events.push(arguments)},gs.prototype.finish=function(){for(var x=0;x<this.events.length;x++)$n.apply(null,this.events[x])};function Jl(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=wr(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=wr(x)+"px",z.scrollbarsClipped=!0)}function Ud(x){if(x.hasFocus())return null;var z=$t();if(!z||!Vt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Vt(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function jd(x){if(!(!x||!x.activeElt||x.activeElt==$t())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Vt(document.body,x.anchorNode)&&Vt(document.body,x.focusNode))){var z=window.getSelection(),ne=document.createRange();ne.setEnd(x.anchorNode,x.anchorOffset),ne.collapse(!1),z.removeAllRanges(),z.addRange(ne),z.extend(x.focusNode,x.focusOffset)}}function Yc(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return na(x),!1;if(!z.force&&z.visible.from>=ne.viewFrom&&z.visible.to<=ne.viewTo&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo)&&ne.renderedView==ne.view&&Do(x)==0)return!1;bc(x)&&(na(x),z.dims=uo(x));var ie=te.first+te.size,ue=Math.max(z.visible.from-x.options.viewportMargin,te.first),ye=Math.min(ie,z.visible.to+x.options.viewportMargin);ne.viewFrom<ue&&ue-ne.viewFrom<20&&(ue=Math.max(te.first,ne.viewFrom)),ne.viewTo>ye&&ne.viewTo-ye<20&&(ye=Math.min(ie,ne.viewTo)),_i&&(ue=dn(x.doc,ue),ye=Gn(x.doc,ye));var _e=ue!=ne.viewFrom||ye!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;Za(x,ue,ye),ne.viewOffset=Cn(Yt(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Ne=Do(x);if(!_e&&Ne==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Be=Ud(x);return Ne>4&&(ne.lineDiv.style.display="none"),Vd(x,ne.updateLineNumbers,z.dims),Ne>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,jd(Be),Ye(ne.cursorDiv),Ye(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,_e&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,os(x,400)),ne.updateLineNumbers=null,!0}function Uu(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==Fr(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+jr(x.display)-Yr(x),ne.top)}),z.visible=_a(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=_a(x.display,x.doc,ne));if(!Yc(x,z))break;jo(x);var ie=bo(x);zo(x),xs(x,ie),Qc(x,ie),z.force=!1}z.signal(x,"update",x),(x.display.viewFrom!=x.display.reportedViewFrom||x.display.viewTo!=x.display.reportedViewTo)&&(z.signal(x,"viewportChange",x,x.display.viewFrom,x.display.viewTo),x.display.reportedViewFrom=x.display.viewFrom,x.display.reportedViewTo=x.display.viewTo)}function qc(x,z){var ne=new gs(x,z);if(Yc(x,ne)){jo(x),Uu(x,ne);var te=bo(x);zo(x),xs(x,te),Qc(x,te),ne.finish()}}function Vd(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ue=te.lineDiv,ye=ue.firstChild;function _e(Yn){var hr=Yn.nextSibling;return Me&&ke&&x.display.currentWheelTarget==Yn?Yn.style.display="none":Yn.parentNode.removeChild(Yn),hr}for(var Ne=te.view,Be=te.viewFrom,bt=0;bt<Ne.length;bt++){var It=Ne[bt];if(!It.hidden)if(!It.node||It.node.parentNode!=ue){var mn=Dr(x,It,Be,ne);ue.insertBefore(mn,ye)}else{for(;ye!=It.node;)ye=_e(ye);var ln=ie&&z!=null&&z<=Be&&It.lineNumber;It.changes&&(Zt(It.changes,"gutter")>-1&&(ln=!1),fr(x,It,Be,ne)),ln&&(Ye(It.lineNumber),It.lineNumber.appendChild(document.createTextNode(Rr(x.options,Be)))),ye=It.node.nextSibling}Be+=It.size}for(;ye;)ye=_e(ye)}function Jc(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Qc(x,z){x.display.sizer.style.minHeight=z.docHeight+"px",x.display.heightForcer.style.top=z.docHeight+"px",x.display.gutters.style.height=z.docHeight+x.display.barHeight+wr(x)+"px"}function ju(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=_o(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ue=te+"px",ye=0;ye<ne.length;ye++)if(!ne[ye].hidden){x.options.fixedGutter&&(ne[ye].gutter&&(ne[ye].gutter.style.left=ue),ne[ye].gutterBackground&&(ne[ye].gutterBackground.style.left=ue));var _e=ne[ye].alignable;if(_e)for(var Ne=0;Ne<_e.length;Ne++)_e[Ne].style.left=ue}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function bc(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Rr(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(Ct("div",[Ct("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ue=ie.firstChild.offsetWidth,ye=ie.offsetWidth-ue;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ue,te.lineGutter.offsetWidth-ye)+1,te.lineNumWidth=te.lineNumInnerWidth+ye,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Jc(x.display),!0}return!1}function eu(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ue=x[ie],ye=null;if(typeof ue!="string"&&(ye=ue.style,ue=ue.className),ue=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ue,style:ye})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Vu(x){var z=x.gutters,ne=x.gutterSpecs;Ye(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ue=ie.className,ye=ie.style,_e=z.appendChild(Ct("div",null,"CodeMirror-gutter "+ue));ye&&(_e.style.cssText=ye),ue=="CodeMirror-linenumbers"&&(x.lineGutter=_e,_e.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Jc(x)}function Ql(x){Vu(x.display),gi(x),ju(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=Ct("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=Ct("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=Bt("div",null,"CodeMirror-code"),ie.selectionDiv=Ct("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=Ct("div",null,"CodeMirror-cursors"),ie.measure=Ct("div",null,"CodeMirror-measure"),ie.lineMeasure=Ct("div",null,"CodeMirror-measure"),ie.lineSpace=Bt("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ue=Bt("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=Ct("div",[ue],null,"position: relative"),ie.sizer=Ct("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=Ct("div",null,null,"position: absolute; height: "+In+"px; width: 1px;"),ie.gutters=Ct("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=Ct("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=Ct("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ve&&Le<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Me&&!(ce&&et)&&(ie.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ie.wrapper):x(ie.wrapper)),ie.viewFrom=ie.viewTo=z.first,ie.reportedViewFrom=ie.reportedViewTo=z.first,ie.view=[],ie.renderedView=null,ie.externalMeasured=null,ie.viewOffset=0,ie.lastWrapHeight=ie.lastWrapWidth=0,ie.updateLineNumbers=null,ie.nativeBarWidth=ie.barHeight=ie.barWidth=0,ie.scrollbarsClipped=!1,ie.lineNumWidth=ie.lineNumInnerWidth=ie.lineNumChars=null,ie.alignWidgets=!1,ie.cachedCharWidth=ie.cachedTextHeight=ie.cachedPaddingH=null,ie.maxLine=null,ie.maxLineLength=0,ie.maxLineChanged=!1,ie.wheelDX=ie.wheelDY=ie.wheelStartX=ie.wheelStartY=null,ie.shift=!1,ie.selForContextMenu=null,ie.activeTouch=null,ie.gutterSpecs=eu(te.gutters,te.lineNumbers),Vu(ie),ne.init(ie)}var xc=0,Vo=null;ve?Vo=-.53:ce?Vo=15:me?Vo=-.7:st&&(Vo=-1/3);function Pl(x){var z=x.wheelDeltaX,ne=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ne==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ne=x.detail:ne==null&&(ne=x.wheelDelta),{x:z,y:ne}}function Gu(x){var z=Pl(x);return z.x*=Vo,z.y*=Vo,z}function Xu(x,z){var ne=Pl(z),te=ne.x,ie=ne.y,ue=x.display,ye=ue.scroller,_e=ye.scrollWidth>ye.clientWidth,Ne=ye.scrollHeight>ye.clientHeight;if(te&&_e||ie&&Ne){if(ie&&ke&&Me){e:for(var Be=z.target,bt=ue.view;Be!=ye;Be=Be.parentNode)for(var It=0;It<bt.length;It++)if(bt[It].node==Be){x.display.currentWheelTarget=Be;break e}}if(te&&!ce&&!Pe&&Vo!=null){ie&&Ne&&Ba(x,Math.max(0,ye.scrollTop+ie*Vo)),vo(x,Math.max(0,ye.scrollLeft+te*Vo)),(!ie||ie&&Ne)&&Jr(z),ue.wheelStartX=null;return}if(ie&&Vo!=null){var mn=ie*Vo,ln=x.doc.scrollTop,Yn=ln+ue.wrapper.clientHeight;mn<0?ln=Math.max(0,ln+mn-50):Yn=Math.min(x.doc.height,Yn+mn+50),qc(x,{top:ln,bottom:Yn})}xc<20&&(ue.wheelStartX==null?(ue.wheelStartX=ye.scrollLeft,ue.wheelStartY=ye.scrollTop,ue.wheelDX=te,ue.wheelDY=ie,setTimeout(function(){if(ue.wheelStartX!=null){var hr=ye.scrollLeft-ue.wheelStartX,Ir=ye.scrollTop-ue.wheelStartY,Vr=Ir&&ue.wheelDY&&Ir/ue.wheelDY||hr&&ue.wheelDX&&hr/ue.wheelDX;ue.wheelStartX=ue.wheelStartY=null,Vr&&(Vo=(Vo*xc+Vr)/(xc+1),++xc)}},200)):(ue.wheelDX+=te,ue.wheelDY+=ie))}}var vs=function(x,z){this.ranges=x,this.primIndex=z};vs.prototype.primary=function(){return this.ranges[this.primIndex]},vs.prototype.equals=function(x){if(x==this)return!0;if(x.primIndex!=this.primIndex||x.ranges.length!=this.ranges.length)return!1;for(var z=0;z<this.ranges.length;z++){var ne=this.ranges[z],te=x.ranges[z];if(!hi(ne.anchor,te.anchor)||!hi(ne.head,te.head))return!1}return!0},vs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new qa(xi(this.ranges[z].anchor),xi(this.ranges[z].head));return new vs(x,this.primIndex)},vs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(An(z,te.from())>=0&&An(x,te.to())<=0)return ne}return-1};var qa=function(x,z){this.anchor=x,this.head=z};qa.prototype.from=function(){return sr(this.anchor,this.head)},qa.prototype.to=function(){return ai(this.anchor,this.head)},qa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ms(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(mn,ln){return An(mn.from(),ln.from())}),ne=Zt(z,ie);for(var ue=1;ue<z.length;ue++){var ye=z[ue],_e=z[ue-1],Ne=An(_e.to(),ye.from());if(te&&!ye.empty()?Ne>0:Ne>=0){var Be=sr(_e.from(),ye.from()),bt=ai(_e.to(),ye.to()),It=_e.empty()?ye.from()==ye.head:_e.from()==_e.head;ue<=ne&&--ne,z.splice(--ue,2,new qa(It?bt:Be,It?Be:bt))}}return new vs(z,ne)}function Ps(x,z){return new vs([new qa(x,z||x)],0)}function Js(x){return x.text?bn(x.from.line+x.text.length-1,Xt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function Yu(x,z){if(An(x,z.from)<0)return x;if(An(x,z.to)<=0)return Js(z);var ne=x.line+z.text.length-(z.to.line-z.from.line)-1,te=x.ch;return x.line==z.to.line&&(te+=Js(z).ch-z.to.ch),bn(ne,te)}function tu(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new qa(Yu(ie.anchor,z),Yu(ie.head,z)))}return Ms(x.cm,ne,x.sel.primIndex)}function Ol(x,z,ne){return x.line==z.line?bn(ne.line,x.ch-z.ch+ne.ch):bn(ne.line+(x.line-z.line),x.ch)}function nu(x,z,ne){for(var te=[],ie=bn(x.first,0),ue=ie,ye=0;ye<z.length;ye++){var _e=z[ye],Ne=Ol(_e.from,ie,ue),Be=Ol(Js(_e),ie,ue);if(ie=_e.to,ue=Be,ne=="around"){var bt=x.sel.ranges[ye],It=An(bt.head,bt.anchor)<0;te[ye]=new qa(It?Be:Ne,It?Ne:Be)}else te[ye]=new qa(Ne,Ne)}return new vs(te,x.sel.primIndex)}function ru(x){x.doc.mode=pt(x.options,x.doc.modeOption),Nl(x)}function Nl(x){x.doc.iter(function(z){z.stateAfter&&(z.stateAfter=null),z.styles&&(z.styles=null)}),x.doc.modeFrontier=x.doc.highlightFrontier=x.doc.first,os(x,100),x.state.modeGen++,x.curOp&&gi(x)}function qu(x,z){return z.from.ch==0&&z.to.ch==0&&Xt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function iu(x,z,ne,te){function ie(ni){return ne?ne[ni]:null}function ue(ni,Kr,ii){dr(ni,Kr,ii,te),Sn(ni,"change",ni,z)}function ye(ni,Kr){for(var ii=[],Oi=ni;Oi<Kr;++Oi)ii.push(new Fn(Be[Oi],ie(Oi),te));return ii}var _e=z.from,Ne=z.to,Be=z.text,bt=Yt(x,_e.line),It=Yt(x,Ne.line),mn=Xt(Be),ln=ie(Be.length-1),Yn=Ne.line-_e.line;if(z.full)x.insert(0,ye(0,Be.length)),x.remove(Be.length,x.size-Be.length);else if(qu(x,z)){var hr=ye(0,Be.length-1);ue(It,It.text,ln),Yn&&x.remove(_e.line,Yn),hr.length&&x.insert(_e.line,hr)}else if(bt==It)if(Be.length==1)ue(bt,bt.text.slice(0,_e.ch)+mn+bt.text.slice(Ne.ch),ln);else{var Ir=ye(1,Be.length-1);Ir.push(new Fn(mn+bt.text.slice(Ne.ch),ln,te)),ue(bt,bt.text.slice(0,_e.ch)+Be[0],ie(0)),x.insert(_e.line+1,Ir)}else if(Be.length==1)ue(bt,bt.text.slice(0,_e.ch)+Be[0]+It.text.slice(Ne.ch),ie(0)),x.remove(_e.line+1,Yn);else{ue(bt,bt.text.slice(0,_e.ch)+Be[0],ie(0)),ue(It,mn+It.text.slice(Ne.ch),ln);var Vr=ye(1,Be.length-1);Yn>1&&x.remove(_e.line+1,Yn-1),x.insert(_e.line+1,Vr)}Sn(x,"change",x,z)}function Qs(x,z,ne){function te(ie,ue,ye){if(ie.linked)for(var _e=0;_e<ie.linked.length;++_e){var Ne=ie.linked[_e];if(Ne.doc!=ue){var Be=ye&&Ne.sharedHist;ne&&!Be||(z(Ne.doc,Be),te(Ne.doc,ie,Be))}}}te(x,null,!0)}function wc(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,to(x),ru(x),Sc(x),x.options.lineWrapping||Pn(x),x.options.mode=z.modeOption,gi(x)}function Sc(x){(x.doc.direction=="rtl"?xn:je)(x.display.lineDiv,"CodeMirror-rtl")}function au(x){Ea(x,function(){Sc(x),gi(x)})}function Cc(x){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=x||1}function ou(x,z){var ne={from:xi(z.from),to:Js(z),text:Rn(x,z.from,z.to)};return uu(x,ne,z.from.line,z.to.line+1),Qs(x,function(te){return uu(te,ne,z.from.line,z.to.line+1)},!0),ne}function Ju(x){for(;x.length;){var z=Xt(x);if(z.ranges)x.pop();else break}}function su(x,z){if(z)return Ju(x.done),Xt(x.done);if(x.done.length&&!Xt(x.done).ranges)return Xt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Xt(x.done)}function Ec(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ue=+new Date,ye,_e;if((ie.lastOp==te||ie.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ie.lastModTime>ue-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(ye=su(ie,ie.lastOp==te)))_e=Xt(ye.changes),An(z.from,z.to)==0&&An(z.from,_e.to)==0?_e.to=Js(z):ye.changes.push(ou(x,z));else{var Ne=Xt(ie.done);for((!Ne||!Ne.ranges)&&Mc(x.sel,ie.done),ye={changes:[ou(x,z)],generation:ie.generation},ie.done.push(ye);ie.done.length>ie.undoDepth;)ie.done.shift(),ie.done[0].ranges||ie.done.shift()}ie.done.push(ne),ie.generation=++ie.maxGeneration,ie.lastModTime=ie.lastSelTime=ue,ie.lastOp=ie.lastSelOp=te,ie.lastOrigin=ie.lastSelOrigin=z.origin,_e||$n(x,"historyAdded")}function lu(x,z,ne,te){var ie=z.charAt(0);return ie=="*"||ie=="+"&&ne.ranges.length==te.ranges.length&&ne.somethingSelected()==te.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function cu(x,z,ne,te){var ie=x.history,ue=te&&te.origin;ne==ie.lastSelOp||ue&&ie.lastSelOrigin==ue&&(ie.lastModTime==ie.lastSelTime&&ie.lastOrigin==ue||lu(x,ue,Xt(ie.done),z))?ie.done[ie.done.length-1]=z:Mc(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ue,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Ju(ie.undone)}function Mc(x,z){var ne=Xt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function uu(x,z,ne,te){var ie=z["spans_"+x.id],ue=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(ye){ye.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ue]=ye.markedSpans),++ue})}function du(x){if(!x)return null;for(var z,ne=0;ne<x.length;++ne)x[ne].marker.explicitlyCleared?z||(z=x.slice(0,ne)):z&&z.push(x[ne]);return z?z.length?z:null:x}function Xd(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(du(ne[ie]));return te}function Qu(x,z){var ne=Xd(x,z),te=Xr(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ue=ne[ie],ye=te[ie];if(ue&&ye)e:for(var _e=0;_e<ye.length;++_e){for(var Ne=ye[_e],Be=0;Be<ue.length;++Be)if(ue[Be].marker==Ne.marker)continue e;ue.push(Ne)}else ye&&(ne[ie]=ye)}return ne}function Rl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.ranges){te.push(ne?vs.prototype.deepCopy.call(ue):ue);continue}var ye=ue.changes,_e=[];te.push({changes:_e});for(var Ne=0;Ne<ye.length;++Ne){var Be=ye[Ne],bt=void 0;if(_e.push({from:Be.from,to:Be.to,text:Be.text}),z)for(var It in Be)(bt=It.match(/^spans_(\d+)$/))&&Zt(z,Number(bt[1]))>-1&&(Xt(_e)[It]=Be[It],delete Be[It])}}return te}function fu(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ue=An(z,ie)<0;ue!=An(ne,ie)<0?(ie=z,z=ne):ue!=An(z,ne)<0&&(z=ne)}return new qa(ie,z)}else return new qa(ne||z,z)}function Bl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),Po(x,new vs([fu(x.sel.primary(),z,ne,ie)],0),te)}function oi(x,z,ne){for(var te=[],ie=x.cm&&(x.cm.display.shift||x.extend),ue=0;ue<x.sel.ranges.length;ue++)te[ue]=fu(x.sel.ranges[ue],z[ue],null,ie);var ye=Ms(x.cm,te,x.sel.primIndex);Po(x,ye,ne)}function ws(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,Po(x,Ms(x.cm,ie,x.sel.primIndex),te)}function ed(x,z,ne,te){Po(x,Ps(z,ne),te)}function Yd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ue=0;ue<ie.length;ue++)this.ranges[ue]=new qa(ur(x,ie[ue].anchor),ur(x,ie[ue].head))},origin:ne&&ne.origin};return $n(x,"beforeSelectionChange",x,te),x.cm&&$n(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Ms(x.cm,te.ranges,te.ranges.length-1):z}function ss(x,z,ne){var te=x.history.done,ie=Xt(te);ie&&ie.ranges?(te[te.length-1]=z,_c(x,z,ne)):Po(x,z,ne)}function Po(x,z,ne){_c(x,z,ne),cu(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function _c(x,z,ne){(li(x,"beforeSelectionChange")||x.cm&&li(x.cm,"beforeSelectionChange"))&&(z=Yd(x,z,ne));var te=ne&&ne.bias||(An(z.primary().head,x.sel.primary().head)<0?-1:1);qd(x,$l(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&Ho(x.cm)}function qd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Ii(x.cm)),Sn(x,"cursorActivity",x))}function Jd(x){qd(x,$l(x,x.sel,null,!1))}function $l(x,z,ne,te){for(var ie,ue=0;ue<z.ranges.length;ue++){var ye=z.ranges[ue],_e=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ue],Ne=hu(x,ye.anchor,_e&&_e.anchor,ne,te),Be=hu(x,ye.head,_e&&_e.head,ne,te);(ie||Ne!=ye.anchor||Be!=ye.head)&&(ie||(ie=z.ranges.slice(0,ue)),ie[ue]=new qa(Ne,Be))}return ie?Ms(x.cm,ie,z.primIndex):z}function ls(x,z,ne,te,ie){var ue=Yt(x,z.line);if(ue.markedSpans)for(var ye=0;ye<ue.markedSpans.length;++ye){var _e=ue.markedSpans[ye],Ne=_e.marker,Be="selectLeft"in Ne?!Ne.selectLeft:Ne.inclusiveLeft,bt="selectRight"in Ne?!Ne.selectRight:Ne.inclusiveRight;if((_e.from==null||(Be?_e.from<=z.ch:_e.from<z.ch))&&(_e.to==null||(bt?_e.to>=z.ch:_e.to>z.ch))){if(ie&&($n(Ne,"beforeCursorEnter"),Ne.explicitlyCleared))if(ue.markedSpans){--ye;continue}else break;if(!Ne.atomic)continue;if(ne){var It=Ne.find(te<0?1:-1),mn=void 0;if((te<0?bt:Be)&&(It=el(x,It,-te,It&&It.line==z.line?ue:null)),It&&It.line==z.line&&(mn=An(It,ne))&&(te<0?mn<0:mn>0))return ls(x,It,z,te,ie)}var ln=Ne.find(te<0?-1:1);return(te<0?Be:bt)&&(ln=el(x,ln,te,ln.line==z.line?ue:null)),ln?ls(x,ln,z,te,ie):null}}return z}function hu(x,z,ne,te,ie){var ue=te||1,ye=ls(x,z,ne,ue,ie)||!ie&&ls(x,z,ne,ue,!0)||ls(x,z,ne,-ue,ie)||!ie&&ls(x,z,ne,-ue,!0);return ye||(x.cantEdit=!0,bn(x.first,0))}function el(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?ur(x,bn(z.line-1)):null:ne>0&&z.ch==(te||Yt(x,z.line)).text.length?z.line<x.first+x.size-1?bn(z.line+1,0):null:new bn(z.line,z.ch+ne)}function td(x){x.setSelection(bn(x.firstLine(),0),bn(x.lastLine()),ot)}function pu(x,z,ne){var te={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return te.canceled=!0}};return ne&&(te.update=function(ie,ue,ye,_e){ie&&(te.from=ur(x,ie)),ue&&(te.to=ur(x,ue)),ye&&(te.text=ye),_e!==void 0&&(te.origin=_e)}),$n(x,"beforeChange",x,te),x.cm&&$n(x.cm,"beforeChange",x.cm,te),te.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:te.from,to:te.to,text:te.text,origin:te.origin}}function dl(x,z,ne){if(x.cm){if(!x.cm.curOp)return Ua(x.cm,dl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((li(x,"beforeChange")||x.cm&&li(x.cm,"beforeChange"))&&(z=pu(x,z,!0),!z))){var te=wa&&!ne&&wi(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)nd(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else nd(x,z)}}function nd(x,z){if(!(z.text.length==1&&z.text[0]==""&&An(z.from,z.to)==0)){var ne=tu(x,z);Ec(x,z,ne,x.cm?x.cm.curOp.id:NaN),Fl(x,z,ne,Xr(x,z));var te=[];Qs(x,function(ie,ue){!ue&&Zt(te,ie.history)==-1&&(kc(ie.history,z),te.push(ie.history)),Fl(ie,z,null,Xr(ie,z))})}}function tl(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ue,ye=x.sel,_e=z=="undo"?ie.done:ie.undone,Ne=z=="undo"?ie.undone:ie.done,Be=0;Be<_e.length&&(ue=_e[Be],!(ne?ue.ranges&&!ue.equals(x.sel):!ue.ranges));Be++);if(Be!=_e.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ue=_e.pop(),ue.ranges){if(Mc(ue,Ne),ne&&!ue.equals(x.sel)){Po(x,ue,{clearRedo:!1});return}ye=ue}else if(te){_e.push(ue);return}else break;var bt=[];Mc(ye,Ne),Ne.push({changes:bt,generation:ie.generation}),ie.generation=ue.generation||++ie.maxGeneration;for(var It=li(x,"beforeChange")||x.cm&&li(x.cm,"beforeChange"),mn=function(hr){var Ir=ue.changes[hr];if(Ir.origin=z,It&&!pu(x,Ir,!1))return _e.length=0,{};bt.push(ou(x,Ir));var Vr=hr?tu(x,Ir):Xt(_e);Fl(x,Ir,Vr,Qu(x,Ir)),!hr&&x.cm&&x.cm.scrollIntoView({from:Ir.from,to:Js(Ir)});var ni=[];Qs(x,function(Kr,ii){!ii&&Zt(ni,Kr.history)==-1&&(kc(Kr.history,Ir),ni.push(Kr.history)),Fl(Kr,Ir,null,Qu(Kr,Ir))})},ln=ue.changes.length-1;ln>=0;--ln){var Yn=mn(ln);if(Yn)return Yn.v}}}}function mu(x,z){if(z!=0&&(x.first+=z,x.sel=new vs(Dn(x.sel.ranges,function(ie){return new qa(bn(ie.anchor.line+z,ie.anchor.ch),bn(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){gi(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)ya(x.cm,te,"gutter")}}function Fl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return Ua(x.cm,Fl)(x,z,ne,te);if(z.to.line<x.first){mu(x,z.text.length-1-(z.to.line-z.from.line));return}if(!(z.from.line>x.lastLine())){if(z.from.line<x.first){var ie=z.text.length-1-(x.first-z.from.line);mu(x,ie),z={from:bn(x.first,0),to:bn(z.to.line+ie,z.to.ch),text:[Xt(z.text)],origin:z.origin}}var ue=x.lastLine();z.to.line>ue&&(z={from:z.from,to:bn(ue,Yt(x,ue).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Rn(x,z.from,z.to),ne||(ne=tu(x,z)),x.cm?Qd(x.cm,z,te):iu(x,z,te),_c(x,ne,ot),x.cantEdit&&hu(x,bn(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ue=z.from,ye=z.to,_e=!1,Ne=ue.line;x.options.lineWrapping||(Ne=Jn(yt(Yt(te,ue.line))),te.iter(Ne,ye.line+1,function(ln){if(ln==ie.maxLine)return _e=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Ii(x),iu(te,z,ne,ko(x)),x.options.lineWrapping||(te.iter(Ne,ue.line+z.text.length,function(ln){var Yn=gn(ln);Yn>ie.maxLineLength&&(ie.maxLine=ln,ie.maxLineLength=Yn,ie.maxLineChanged=!0,_e=!1)}),_e&&(x.curOp.updateMaxLine=!0)),Oa(te,ue.line),os(x,400);var Be=z.text.length-(ye.line-ue.line)-1;z.full?gi(x):ue.line==ye.line&&z.text.length==1&&!qu(x.doc,z)?ya(x,ue.line,"text"):gi(x,ue.line,ye.line+1,Be);var bt=li(x,"changes"),It=li(x,"change");if(It||bt){var mn={from:ue,to:ye,text:z.text,removed:z.removed,origin:z.origin};It&&Sn(x,"change",x,mn),bt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(mn)}x.display.selForContextMenu=null}function ec(x,z,ne,te,ie){var ue;te||(te=ne),An(te,ne)<0&&(ue=[te,ne],ne=ue[0],te=ue[1]),typeof z=="string"&&(z=x.splitLines(z)),dl(x,{from:ne,to:te,text:z,origin:ie})}function ef(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function tf(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ue=x[ie],ye=!0;if(ue.ranges){ue.copied||(ue=x[ie]=ue.deepCopy(),ue.copied=!0);for(var _e=0;_e<ue.ranges.length;_e++)ef(ue.ranges[_e].anchor,z,ne,te),ef(ue.ranges[_e].head,z,ne,te);continue}for(var Ne=0;Ne<ue.changes.length;++Ne){var Be=ue.changes[Ne];if(ne<Be.from.line)Be.from=bn(Be.from.line+te,Be.from.ch),Be.to=bn(Be.to.line+te,Be.to.ch);else if(z<=Be.to.line){ye=!1;break}}ye||(x.splice(0,ie+1),ie=0)}}function kc(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;tf(x.done,ne,te,ie),tf(x.undone,ne,te,ie)}function Lc(x,z,ne,te){var ie=z,ue=z;return typeof z=="number"?ue=Yt(x,vi(x,z)):ie=Jn(z),ie==null?null:(te(ue,ie)&&x.cm&&ya(x.cm,ie,ne),ue)}function fl(x){this.lines=x,this.parent=null;for(var z=0,ne=0;ne<x.length;++ne)x[ne].parent=this,z+=x[ne].height;this.height=z}fl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ie=this.lines[ne];this.height-=ie.height,Xn(ie),Sn(ie,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,ne){this.height+=ne,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var te=0;te<z.length;++te)z[te].parent=this},iterN:function(x,z,ne){for(var te=x+z;x<te;++x)if(ne(this.lines[x]))return!0}};function tc(x){this.children=x;for(var z=0,ne=0,te=0;te<x.length;++te){var ie=x[te];z+=ie.chunkSize(),ne+=ie.height,ie.parent=this}this.size=z,this.height=ne,this.parent=null}tc.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var ne=0;ne<this.children.length;++ne){var te=this.children[ne],ie=te.chunkSize();if(x<ie){var ue=Math.min(z,ie-x),ye=te.height;if(te.removeInner(x,ue),this.height-=ye-te.height,ie==ue&&(this.children.splice(ne--,1),te.parent=null),(z-=ue)==0)break;x=0}else x-=ie}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof fl))){var _e=[];this.collapse(_e),this.children=[new fl(_e)],this.children[0].parent=this}},collapse:function(x){for(var z=0;z<this.children.length;++z)this.children[z].collapse(x)},insertInner:function(x,z,ne){this.size+=z.length,this.height+=ne;for(var te=0;te<this.children.length;++te){var ie=this.children[te],ue=ie.chunkSize();if(x<=ue){if(ie.insertInner(x,z,ne),ie.lines&&ie.lines.length>50){for(var ye=ie.lines.length%25+25,_e=ye;_e<ie.lines.length;){var Ne=new fl(ie.lines.slice(_e,_e+=25));ie.height-=Ne.height,this.children.splice(++te,0,Ne),Ne.parent=this}ie.lines=ie.lines.slice(0,ye),this.maybeSpill()}break}x-=ue}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new tc(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=Zt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new tc(x.children);te.parent=x,x.children=[te,ne],x=te}ne.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,ne){for(var te=0;te<this.children.length;++te){var ie=this.children[te],ue=ie.chunkSize();if(x<ue){var ye=Math.min(z,ue-x);if(ie.iterN(x,ye,ne))return!0;if((z-=ye)==0)break;x=0}else x-=ue}}};var nc=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};nc.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=Jn(ne);if(!(te==null||!z)){for(var ie=0;ie<z.length;++ie)z[ie]==this&&z.splice(ie--,1);z.length||(ne.widgets=null);var ue=Ur(this);Wn(ne,Math.max(0,ne.height-ue)),x&&(Ea(x,function(){nf(x,ne,-ue),ya(x,te,"widget")}),Sn(x,"lineWidgetCleared",x,this,te))}},nc.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=Ur(this)-z;ie&&(pr(this.doc,te)||Wn(te,te.height+ie),ne&&Ea(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Sn(ne,"lineWidgetChanged",ne,x,Jn(te))}))},ci(nc);function nf(x,z,ne){Cn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&ms(x,ne)}function rf(x,z,ne,te){var ie=new nc(x,ne,te),ue=x.cm;return ue&&ie.noHScroll&&(ue.display.alignWidgets=!0),Lc(x,z,"widget",function(ye){var _e=ye.widgets||(ye.widgets=[]);if(ie.insertAt==null?_e.push(ie):_e.splice(Math.min(_e.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ye,ue&&!pr(x,ye)){var Ne=Cn(ye)<x.scrollTop;Wn(ye,ye.height+Ur(ie)),Ne&&ms(ue,ie.height),ue.curOp.forceUpdate=!0}return!0}),ue&&Sn(ue,"lineWidgetAdded",ue,ie,typeof z=="number"?z:Jn(z)),ie}var af=0,hl=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};hl.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ks(x),li(this,"clear")){var ne=this.find();ne&&Sn(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ue=0;ue<this.lines.length;++ue){var ye=this.lines[ue],_e=vn(ye.markedSpans,this);x&&!this.collapsed?ya(x,Jn(ye),"text"):x&&(_e.to!=null&&(ie=Jn(ye)),_e.from!=null&&(te=Jn(ye))),ye.markedSpans=Kn(ye.markedSpans,_e),_e.from==null&&this.collapsed&&!pr(this.doc,ye)&&x&&Wn(ye,Ka(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Ne=0;Ne<this.lines.length;++Ne){var Be=yt(this.lines[Ne]),bt=gn(Be);bt>x.display.maxLineLength&&(x.display.maxLine=Be,x.display.maxLineLength=bt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&gi(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Jd(x.doc)),x&&Sn(x,"markerCleared",x,this,te,ie),z&&Ds(x),this.parent&&this.parent.clear()}},hl.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ue=this.lines[ie],ye=vn(ue.markedSpans,this);if(ye.from!=null&&(ne=bn(z?ue:Jn(ue),ye.from),x==-1))return ne;if(ye.to!=null&&(te=bn(z?ue:Jn(ue),ye.to),x==1))return te}return ne&&{from:ne,to:te}},hl.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||Ea(te,function(){var ie=z.line,ue=Jn(z.line),ye=$i(te,ue);if(ye&&(yi(ye),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!pr(ne.doc,ie)&&ne.height!=null){var _e=ne.height;ne.height=null;var Ne=Ur(ne)-_e;Ne&&Wn(ie,ie.height+Ne)}Sn(te,"markerChanged",te,x)})},hl.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Zt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},hl.prototype.detachLine=function(x){if(this.lines.splice(Zt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},ci(hl);function nl(x,z,ne,te,ie){if(te&&te.shared)return ho(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return Ua(x.cm,nl)(x,z,ne,te,ie);var ue=new hl(x,ie),ye=An(z,ne);if(te&&yn(te,ue,!1),ye>0||ye==0&&ue.clearWhenEmpty!==!1)return ue;if(ue.replacedWith&&(ue.collapsed=!0,ue.widgetNode=Bt("span",[ue.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ue.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ue.widgetNode.insertLeft=!0)),ue.collapsed){if(ct(x,z.line,z,ne,ue)||z.line!=ne.line&&ct(x,ne.line,z,ne,ue))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt()}ue.addToHistory&&Ec(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var _e=z.line,Ne=x.cm,Be;if(x.iter(_e,ne.line+1,function(It){Ne&&ue.collapsed&&!Ne.options.lineWrapping&&yt(It)==Ne.display.maxLine&&(Be=!0),ue.collapsed&&_e!=z.line&&Wn(It,0),Ar(It,new tn(ue,_e==z.line?z.ch:null,_e==ne.line?ne.ch:null)),++_e}),ue.collapsed&&x.iter(z.line,ne.line+1,function(It){pr(x,It)&&Wn(It,0)}),ue.clearOnEnter&&pn(ue,"beforeCursorEnter",function(){return ue.clear()}),ue.readOnly&&(Mt(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ue.collapsed&&(ue.id=++af,ue.atomic=!0),Ne){if(Be&&(Ne.curOp.updateMaxLine=!0),ue.collapsed)gi(Ne,z.line,ne.line+1);else if(ue.className||ue.startStyle||ue.endStyle||ue.css||ue.attributes||ue.title)for(var bt=z.line;bt<=ne.line;bt++)ya(Ne,bt,"text");ue.atomic&&Jd(Ne.doc),Sn(Ne,"markerAdded",Ne,ue)}return ue}var ka=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};ka.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Sn(this,"clear")}},ka.prototype.find=function(x,z){return this.primary.find(x,z)},ci(ka);function ho(x,z,ne,te,ie){te=yn(te),te.shared=!1;var ue=[nl(x,z,ne,te,ie)],ye=ue[0],_e=te.widgetNode;return Qs(x,function(Ne){_e&&(te.widgetNode=_e.cloneNode(!0)),ue.push(nl(Ne,ur(Ne,z),ur(Ne,ne),te,ie));for(var Be=0;Be<Ne.linked.length;++Be)if(Ne.linked[Be].isParent)return;ye=Xt(ue)}),new ka(ue,ye)}function pl(x){return x.findMarks(bn(x.first,0),x.clipPos(bn(x.lastLine())),function(z){return z.parent})}function of(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ue=x.clipPos(ie.from),ye=x.clipPos(ie.to);if(An(ue,ye)){var _e=nl(x,ue,ye,te.primary,te.primary.type);te.markers.push(_e),_e.parent=te}}}function Ss(x){for(var z=function(te){var ie=x[te],ue=[ie.primary.doc];Qs(ie.primary.doc,function(Ne){return ue.push(Ne)});for(var ye=0;ye<ie.markers.length;ye++){var _e=ie.markers[ye];Zt(ue,_e.doc)==-1&&(_e.parent=null,ie.markers.splice(ye--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Lo=function(x,z,ne,te,ie){if(!(this instanceof Lo))return new Lo(x,z,ne,te,ie);ne==null&&(ne=0),tc.call(this,[new fl([new Fn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ue=bn(ne,0);this.sel=Ps(ue),this.history=new Cc(null),this.id=++sf,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),iu(this,{from:ue,to:ue,text:x}),Po(this,Ps(ue),ot)};Lo.prototype=de(tc.prototype,{constructor:Lo,iter:function(x,z,ne){ne?this.iterN(x-this.first,z-x,ne):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var ne=0,te=0;te<z.length;++te)ne+=z[te].height;this.insertInner(x-this.first,z,ne)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=br(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:mo(function(x){var z=bn(this.first,0),ne=this.first+this.size-1;dl(this,{from:z,to:bn(ne,Yt(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ts(this.cm,0,0),Po(this,Ps(z),ot)}),replaceRange:function(x,z,ne,te){z=ur(this,z),ne=ne?ur(this,ne):z,ec(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Rn(this,ur(this,x),ur(this,z));return ne===!1?te:te.join(ne||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(lr(this,x))return Yt(this,x)},getLineNumber:function(x){return Jn(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=Yt(this,x)),yt(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return ur(this,x)},getCursor:function(x){var z=this.sel.primary(),ne;return x==null||x=="head"?ne=z.head:x=="anchor"?ne=z.anchor:x=="end"||x=="to"||x===!1?ne=z.to():ne=z.from(),ne},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:mo(function(x,z,ne){ed(this,ur(this,typeof x=="number"?bn(x,z||0):x),null,ne)}),setSelection:mo(function(x,z,ne){ed(this,ur(this,x),ur(this,z||x),ne)}),extendSelection:mo(function(x,z,ne){Bl(this,ur(this,x),z&&ur(this,z),ne)}),extendSelections:mo(function(x,z){oi(this,kn(this,x),z)}),extendSelectionsBy:mo(function(x,z){var ne=Dn(this.sel.ranges,x);oi(this,kn(this,ne),z)}),setSelections:mo(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new qa(ur(this,x[ie].anchor),ur(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Po(this,Ms(this.cm,te,z),ne)}}),addSelection:mo(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new qa(ur(this,x),ur(this,z||x))),Po(this,Ms(this.cm,te,te.length-1),ne)}),getSelection:function(x){for(var z=this.sel.ranges,ne,te=0;te<z.length;te++){var ie=Rn(this,z[te].from(),z[te].to());ne=ne?ne.concat(ie):ie}return x===!1?ne:ne.join(x||this.lineSeparator())},getSelections:function(x){for(var z=[],ne=this.sel.ranges,te=0;te<ne.length;te++){var ie=Rn(this,ne[te].from(),ne[te].to());x!==!1&&(ie=ie.join(x||this.lineSeparator())),z[te]=ie}return z},replaceSelection:function(x,z,ne){for(var te=[],ie=0;ie<this.sel.ranges.length;ie++)te[ie]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:mo(function(x,z,ne){for(var te=[],ie=this.sel,ue=0;ue<ie.ranges.length;ue++){var ye=ie.ranges[ue];te[ue]={from:ye.from(),to:ye.to(),text:this.splitLines(x[ue]),origin:ne}}for(var _e=z&&z!="end"&&nu(this,te,z),Ne=te.length-1;Ne>=0;Ne--)dl(this,te[Ne]);_e?ss(this,_e):this.cm&&Ho(this.cm)}),undo:mo(function(){tl(this,"undo")}),redo:mo(function(){tl(this,"redo")}),undoSelection:mo(function(){tl(this,"undo",!0)}),redoSelection:mo(function(){tl(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ne=0,te=0;te<x.done.length;te++)x.done[te].ranges||++z;for(var ie=0;ie<x.undone.length;ie++)x.undone[ie].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new Cc(this.history.maxGeneration),Qs(this,function(z){return z.history=x.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(x){return x&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(x){return this.history.generation==(x||this.cleanGeneration)},getHistory:function(){return{done:Rl(this.history.done),undone:Rl(this.history.undone)}},setHistory:function(x){var z=this.history=new Cc(this.history.maxGeneration);z.done=Rl(x.done.slice(0),null,!0),z.undone=Rl(x.undone.slice(0),null,!0)},setGutterMarker:mo(function(x,z,ne){return Lc(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&oe(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:mo(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Lc(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,oe(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!lr(this,x)||(z=x,x=Yt(this,x),!x))return null}else if(z=Jn(x),z==null)return null;return{line:z,handle:x,text:x.text,gutterMarkers:x.gutterMarkers,textClass:x.textClass,bgClass:x.bgClass,wrapClass:x.wrapClass,widgets:x.widgets}},addLineClass:mo(function(x,z,ne){return Lc(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!te[ie])te[ie]=ne;else{if(we(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:mo(function(x,z,ne){return Lc(this,x,z=="gutter"?"gutter":"class",function(te){var ie=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",ue=te[ie];if(ue)if(ne==null)te[ie]=null;else{var ye=ue.match(we(ne));if(!ye)return!1;var _e=ye.index+ye[0].length;te[ie]=ue.slice(0,ye.index)+(!ye.index||_e==ue.length?"":" ")+ue.slice(_e)||null}else return!1;return!0})}),addLineWidget:mo(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return nl(this,ur(this,x),ur(this,z),ne,ne&&ne.type||"range")},setBookmark:function(x,z){var ne={replacedWith:z&&(z.nodeType==null?z.widget:z),insertLeft:z&&z.insertLeft,clearWhenEmpty:!1,shared:z&&z.shared,handleMouseEvents:z&&z.handleMouseEvents};return x=ur(this,x),nl(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=ur(this,x);var z=[],ne=Yt(this,x.line).markedSpans;if(ne)for(var te=0;te<ne.length;++te){var ie=ne[te];(ie.from==null||ie.from<=x.ch)&&(ie.to==null||ie.to>=x.ch)&&z.push(ie.marker.parent||ie.marker)}return z},findMarks:function(x,z,ne){x=ur(this,x),z=ur(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ue){var ye=ue.markedSpans;if(ye)for(var _e=0;_e<ye.length;_e++){var Ne=ye[_e];!(Ne.to!=null&&ie==x.line&&x.ch>=Ne.to||Ne.from==null&&ie!=x.line||Ne.from!=null&&ie==z.line&&Ne.from>=z.ch)&&(!ne||ne(Ne.marker))&&te.push(Ne.marker.parent||Ne.marker)}++ie}),te},getAllMarks:function(){var x=[];return this.iter(function(z){var ne=z.markedSpans;if(ne)for(var te=0;te<ne.length;++te)ne[te].from!=null&&x.push(ne[te].marker)}),x},posFromIndex:function(x){var z,ne=this.first,te=this.lineSeparator().length;return this.iter(function(ie){var ue=ie.text.length+te;if(ue>x)return z=x,!0;x-=ue,++ne}),ur(this,bn(ne,z))},indexFromPos:function(x){x=ur(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var ne=this.lineSeparator().length;return this.iter(this.first,x.line,function(te){z+=te.text.length+ne}),z},copy:function(x){var z=new Lo(br(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return z.scrollTop=this.scrollTop,z.scrollLeft=this.scrollLeft,z.sel=this.sel,z.extend=!1,x&&(z.history.undoDepth=this.history.undoDepth,z.setHistory(this.getHistory())),z},linkedDoc:function(x){x||(x={});var z=this.first,ne=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<ne&&(ne=x.to);var te=new Lo(br(this,z,ne),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(te.history=this.history),(this.linked||(this.linked=[])).push({doc:te,sharedHist:x.sharedHist}),te.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],of(te,pl(this)),te},unlinkDoc:function(x){if(x instanceof ra&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var ne=this.linked[z];if(ne.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),Ss(pl(this));break}}if(x.history==this.history){var te=[x.id];Qs(x,function(ie){return te.push(ie.id)},!0),x.history=new Cc(null),x.history.done=Rl(this.history.done,te),x.history.undone=Rl(this.history.undone,te)}},iterLinkedDocs:function(x){Qs(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):At(x)},lineSeparator:function(){return this.lineSep||`
`},setDirection:mo(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&au(this.cm))})}),Lo.prototype.eachLine=Lo.prototype.iter;var rd=0;function eh(x){var z=this;if(rc(z),!(Cr(z,x)||ui(z.display,x))){Jr(x),ve&&(rd=+new Date);var ne=Da(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ue=Array(ie),ye=0,_e=function(){++ye==ie&&Ua(z,function(){ne=ur(z.doc,ne);var ln={from:ne,to:ne,text:z.doc.splitLines(ue.filter(function(Yn){return Yn!=null}).join(z.doc.lineSeparator())),origin:"paste"};dl(z.doc,ln),ss(z.doc,Ps(ur(z.doc,ne),ur(z.doc,Js(ln))))})()},Ne=function(ln,Yn){if(z.options.allowDropFileTypes&&Zt(z.options.allowDropFileTypes,ln.type)==-1){_e();return}var hr=new FileReader;hr.onerror=function(){return _e()},hr.onload=function(){var Ir=hr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ir)){_e();return}ue[Yn]=Ir,_e()},hr.readAsText(ln)},Be=0;Be<te.length;Be++)Ne(te[Be],Be);else{if(z.state.draggingText&&z.doc.sel.contains(ne)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var bt=x.dataTransfer.getData("Text");if(bt){var It;if(z.state.draggingText&&!z.state.draggingText.copy&&(It=z.listSelections()),_c(z.doc,Ps(ne,ne)),It)for(var mn=0;mn<It.length;++mn)ec(z.doc,"",It[mn].anchor,It[mn].head,"drag");z.replaceSelection(bt,"around","paste"),z.display.input.focus()}}catch(ln){}}}}function th(x,z){if(ve&&(!x.state.draggingText||+new Date-rd<100)){Pi(z);return}if(!(Cr(x,z)||ui(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!st)){var ne=Ct("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Pe&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Pe&&ne.parentNode.removeChild(ne)}}function id(x,z){var ne=Da(x,z);if(ne){var te=document.createDocumentFragment();ea(x,ne,te),x.display.dragCursor||(x.display.dragCursor=Ct("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),Lt(x.display.dragCursor,te)}}function rc(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function ic(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ie=z[te].CodeMirror;ie&&ne.push(ie)}ne.length&&ne[0].operation(function(){for(var ue=0;ue<ne.length;ue++)x(ne[ue])})}}var Er=!1;function ad(){Er||(gu(),Er=!0)}function gu(){var x;pn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,ic(vu)},100))}),pn(window,"blur",function(){return ic(Ko)})}function vu(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Os={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"},Ac=0;Ac<10;Ac++)Os[Ac+48]=Os[Ac+96]=String(Ac);for(var yu=65;yu<=90;yu++)Os[yu]=String.fromCharCode(yu);for(var Tc=1;Tc<=12;Tc++)Os[Tc+111]=Os[Tc+63235]="F"+Tc;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=ke?ao.macDefault:ao.pcDefault;function nh(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ue,ye=0;ye<z.length-1;ye++){var _e=z[ye];if(/^(cmd|meta|m)$/i.test(_e))ue=!0;else if(/^a(lt)?$/i.test(_e))ne=!0;else if(/^(c|ctrl|control)$/i.test(_e))te=!0;else if(/^s(hift)?$/i.test(_e))ie=!0;else throw new Error("Unrecognized modifier name: "+_e)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ue&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function od(x){var z={};for(var ne in x)if(x.hasOwnProperty(ne)){var te=x[ne];if(/^(name|fallthrough|(de|at)tach)$/.test(ne))continue;if(te=="..."){delete x[ne];continue}for(var ie=Dn(ne.split(" "),nh),ue=0;ue<ie.length;ue++){var ye=void 0,_e=void 0;ue==ie.length-1?(_e=ie.join(" "),ye=te):(_e=ie.slice(0,ue+1).join(" "),ye="...");var Ne=z[_e];if(!Ne)z[_e]=ye;else if(Ne!=ye)throw new Error("Inconsistent bindings for "+_e)}delete x[ne]}for(var Be in z)x[Be]=z[Be];return x}function rl(x,z,ne,te){z=cs(z);var ie=z.call?z.call(x,te):z[x];if(ie===!1)return"nothing";if(ie==="...")return"multi";if(ie!=null&&ne(ie))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return rl(x,z.fallthrough,ne,te);for(var ue=0;ue<z.fallthrough.length;ue++){var ye=rl(x,z.fallthrough[ue],ne,te);if(ye)return ye}}}function Ic(x){var z=typeof x=="string"?x:Os[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function ml(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(ut?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(ut?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zl(x,z){if(Pe&&x.keyCode==34&&x.char)return!1;var ne=Os[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),ml(ne,x,z))}function cs(x){return typeof x=="string"?ao[x]:x}function _s(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ue=z(ne[ie]);te.length&&An(ue.from,Xt(te).to)<=0;){var ye=te.pop();if(An(ye.from,ue.from)<0){ue.from=ye.from;break}}te.push(ue)}Ea(x,function(){for(var _e=te.length-1;_e>=0;_e--)ec(x.doc,"",te[_e].from,te[_e].to,"+delete");Ho(x)})}function Go(x,z,ne){var te=_t(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Ws(x,z,ne){var te=Go(x,z.ch,ne);return te==null?null:new bn(z.line,te,ne<0?"after":"before")}function Kl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ue=gr(ne,z.doc.direction);if(ue){var ye=ie<0?Xt(ue):ue[0],_e=ie<0==(ye.level==1),Ne=_e?"after":"before",Be;if(ye.level>0||z.doc.direction=="rtl"){var bt=ei(z,ne);Be=ie<0?ne.text.length-1:0;var It=Wr(z,bt,Be).top;Be=Kt(function(mn){return Wr(z,bt,mn).top==It},ie<0==(ye.level==1)?ye.from:ye.to-1,Be),Ne=="before"&&(Be=Go(ne,Be,1))}else Be=ie<0?ye.to:ye.from;return new bn(te,Be,Ne)}}return new bn(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Zs(x,z,ne,te){var ie=gr(z,x.doc.direction);if(!ie)return Ws(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var ue=Gt(ie,ne.ch,ne.sticky),ye=ie[ue];if(x.doc.direction=="ltr"&&ye.level%2==0&&(te>0?ye.to>ne.ch:ye.from<ne.ch))return Ws(z,ne,te);var _e=function(Vr,ni){return Go(z,Vr instanceof bn?Vr.ch:Vr,ni)},Ne,Be=function(Vr){return x.options.lineWrapping?(Ne=Ne||ei(x,z),Ra(x,z,Ne,Vr)):{begin:0,end:z.text.length}},bt=Be(ne.sticky=="before"?_e(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ye.level==1){var It=ye.level==1==te<0,mn=_e(ne,It?1:-1);if(mn!=null&&(It?mn<=ye.to&&mn<=bt.end:mn>=ye.from&&mn>=bt.begin)){var ln=It?"before":"after";return new bn(ne.line,mn,ln)}}var Yn=function(Vr,ni,Kr){for(var ii=function(so,Uo){return Uo?new bn(ne.line,_e(so,1),"before"):new bn(ne.line,so,"after")};Vr>=0&&Vr<ie.length;Vr+=ni){var Oi=ie[Vr],Fi=ni>0==(Oi.level!=1),La=Fi?Kr.begin:_e(Kr.end,-1);if(Oi.from<=La&&La<Oi.to||(La=Fi?Oi.from:_e(Oi.to,-1),Kr.begin<=La&&La<Kr.end))return ii(La,Fi)}},hr=Yn(ue+te,te,bt);if(hr)return hr;var Ir=te>0?bt.end:_e(bt.begin,-1);return Ir!=null&&!(te>0&&Ir==z.text.length)&&(hr=Yn(te>0?0:ie.length-1,te,Be(Ir)),hr)?hr:null}var ac={selectAll:td,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),ot)},killLine:function(x){return _s(x,function(z){if(z.empty()){var ne=Yt(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:bn(z.head.line+1,0)}:{from:z.head,to:bn(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return _s(x,function(z){return{from:bn(z.from().line,0),to:ur(x.doc,bn(z.to().line+1,0))}})},delLineLeft:function(x){return _s(x,function(z){return{from:bn(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return{from:te,to:z.from()}})},delWrappedLineRight:function(x){return _s(x,function(z){var ne=x.charCoords(z.head,"div").top+5,te=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div");return{from:z.from(),to:te}})},undo:function(x){return x.undo()},redo:function(x){return x.redo()},undoSelection:function(x){return x.undoSelection()},redoSelection:function(x){return x.redoSelection()},goDocStart:function(x){return x.extendSelection(bn(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(bn(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return sd(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return lf(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ld(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div")},Jt)},goLineLeft:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:0,top:ne},"div")},Jt)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5,te=x.coordsChar({left:0,top:ne},"div");return te.ch<x.getLine(te.line).search(/\S/)?lf(x,z.head):te},Jt)},goLineUp:function(x){return x.moveV(-1,"line")},goLineDown:function(x){return x.moveV(1,"line")},goPageUp:function(x){return x.moveV(-1,"page")},goPageDown:function(x){return x.moveV(1,"page")},goCharLeft:function(x){return x.moveH(-1,"char")},goCharRight:function(x){return x.moveH(1,"char")},goColumnLeft:function(x){return x.moveH(-1,"column")},goColumnRight:function(x){return x.moveH(1,"column")},goWordLeft:function(x){return x.moveH(-1,"word")},goGroupRight:function(x){return x.moveH(1,"group")},goGroupLeft:function(x){return x.moveH(-1,"group")},goWordRight:function(x){return x.moveH(1,"word")},delCharBefore:function(x){return x.deleteH(-1,"codepoint")},delCharAfter:function(x){return x.deleteH(1,"char")},delWordBefore:function(x){return x.deleteH(-1,"word")},delWordAfter:function(x){return x.deleteH(1,"word")},delGroupBefore:function(x){return x.deleteH(-1,"group")},delGroupAfter:function(x){return x.deleteH(1,"group")},indentAuto:function(x){return x.indentSelection("smart")},indentMore:function(x){return x.indentSelection("add")},indentLess:function(x){return x.indentSelection("subtract")},insertTab:function(x){return x.replaceSelection(" ")},insertSoftTab:function(x){for(var z=[],ne=x.listSelections(),te=x.options.tabSize,ie=0;ie<ne.length;ie++){var ue=ne[ie].from(),ye=Ge(x.getLine(ue.line),ue.ch,te);z.push(Nt(te-ye%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return Ea(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ue=Yt(x.doc,ie.line).text;if(ue){if(ie.ch==ue.length&&(ie=new bn(ie.line,ie.ch-1)),ie.ch>0)ie=new bn(ie.line,ie.ch+1),x.replaceRange(ue.charAt(ie.ch-1)+ue.charAt(ie.ch-2),bn(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ye=Yt(x.doc,ie.line-1).text;ye&&(ie=new bn(ie.line,1),x.replaceRange(ue.charAt(0)+x.doc.lineSeparator()+ye.charAt(ye.length-1),bn(ie.line-1,ye.length-1),ie,"+transpose"))}}ne.push(new qa(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return Ea(x,function(){for(var z=x.listSelections(),ne=z.length-1;ne>=0;ne--)x.replaceRange(x.doc.lineSeparator(),z[ne].anchor,z[ne].head,"+input");z=x.listSelections();for(var te=0;te<z.length;te++)x.indentLine(z[te].from().line,null,!0);Ho(x)})},openLine:function(x){return x.replaceSelection(`
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function sd(x,z){var ne=Yt(x.doc,z),te=yt(ne);return te!=ne&&(z=Jn(te)),Kl(!0,x,te,z,1)}function ld(x,z){var ne=Yt(x.doc,z),te=kt(ne);return te!=ne&&(z=Jn(te)),Kl(!0,x,ne,z,-1)}function lf(x,z){var ne=sd(x,z.line),te=Yt(x.doc,ne.line),ie=gr(te,x.doc.direction);if(!ie||ie[0].level==0){var ue=Math.max(ne.ch,te.text.search(/\S/)),ye=z.line==ne.line&&z.ch<=ue&&z.ch;return bn(ne.line,ye?0:ue,ne.sticky)}return ne}function Oo(x,z,ne){if(typeof z=="string"&&(z=ac[z],!z))return!1;x.display.input.ensurePolled();var te=x.display.shift,ie=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ne&&(x.display.shift=!1),ie=z(x)!=fn}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Us(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=rl(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&rl(z,x.options.extraKeys,ne,x)||rl(z,x.options.keyMap,ne,x)}var rh=new De;function oc(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Ic(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:rh.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),bu(x,ie+" "+z,ne,te))return!0}return bu(x,z,ne,te)}function bu(x,z,ne,te){var ie=Us(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Sn(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Jr(ne),Ci(x)),!!ie}function Na(x,z){var ne=zl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?oc(x,"Shift-"+ne,z,function(te){return Oo(x,te,!0)})||oc(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Oo(x,te)}):oc(x,ne,z,function(te){return Oo(x,te)}):!1}function sc(x,z,ne){return oc(x,"'"+ne+"'",z,function(te){return Oo(x,te,!0)})}var il=null;function Dc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=$t(),!Cr(z,x))){ve&&Le<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=Na(z,x);Pe&&(il=te?ne:null,!te&&ne==88&&!Pt&&(ke?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),ce&&!ke&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&Un(z)}}function Un(x){var z=x.display.lineDiv;xn(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(je(z,"CodeMirror-crosshair"),Lr(document,"keyup",ne),Lr(document,"mouseover",ne))}pn(document,"keyup",ne),pn(document,"mouseover",ne)}function cf(x){x.keyCode==16&&(this.doc.sel.shift=!1),Cr(this,x)}function uf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(ui(z.display,x)||Cr(z,x)||x.ctrlKey&&!x.altKey||ke&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Pe&&ne==il){il=null,Jr(x);return}if(!(Pe&&(!x.which||x.which<10)&&Na(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(sc(z,x,ie)||z.display.input.onKeyPress(x))}}}var cd=400,ud=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};ud.prototype.compare=function(x,z,ne){return this.time+cd>x&&An(z,this.pos)==0&&ne==this.button};var al,Pc;function ih(x,z){var ne=+new Date;return Pc&&Pc.compare(ne,x,z)?(al=Pc=null,"triple"):al&&al.compare(ne,x,z)?(Pc=new ud(ne,x,z),al=null,"double"):(al=new ud(ne,x,z),Pc=null,"single")}function Xo(x){var z=this,ne=z.display;if(!(Cr(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,ui(ne,x)){Me||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!ns(z,x)){var te=Da(z,x),ie=Pr(x),ue=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&gl(z,ie,te,ue,x))&&(ie==1?te?wu(z,te,ue,x):xr(x)==ne.scroller&&Jr(x):ie==2?(te&&Bl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(Ee?z.display.input.onContextMenu(x):Ga(z)))}}}function gl(x,z,ne,te,ie){var ue="Click";return te=="double"?ue="Double"+ue:te=="triple"&&(ue="Triple"+ue),ue=(z==1?"Left":z==2?"Middle":"Right")+ue,oc(x,ml(ue,ie),ie,function(ye){if(typeof ye=="string"&&(ye=ac[ye]),!ye)return!1;var _e=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),_e=ye(x,ne)!=fn}finally{x.state.suppressEdits=!1}return _e})}function xu(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ue=vt?ne.shiftKey&&ne.metaKey:ne.altKey;ie.unit=ue?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(ie.extend==null||x.doc.extend)&&(ie.extend=x.doc.extend||ne.shiftKey),ie.addNew==null&&(ie.addNew=ke?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(ke?ne.altKey:ne.ctrlKey)),ie}function wu(x,z,ne,te){ve?setTimeout(En(Ai,x),0):x.curOp.focus=$t();var ie=xu(x,ne,te),ue=x.doc.sel,ye;x.options.dragDrop&&Gi&&!x.isReadOnly()&&ne=="single"&&(ye=ue.contains(z))>-1&&(An((ye=ue.ranges[ye]).from(),z)<0||z.xRel>0)&&(An(ye.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):dd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,ue=!1,ye=Ua(x,function(Be){Me&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Lr(ie.wrapper.ownerDocument,"mouseup",ye),Lr(ie.wrapper.ownerDocument,"mousemove",_e),Lr(ie.scroller,"dragstart",Ne),Lr(ie.scroller,"drop",ye),ue||(Jr(Be),te.addNew||Bl(x.doc,ne,null,null,te.extend),Me&&!st||ve&&Le==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),_e=function(Be){ue=ue||Math.abs(z.clientX-Be.clientX)+Math.abs(z.clientY-Be.clientY)>=10},Ne=function(){return ue=!0};Me&&(ie.scroller.draggable=!0),x.state.draggingText=ye,ye.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),pn(ie.wrapper.ownerDocument,"mouseup",ye),pn(ie.wrapper.ownerDocument,"mousemove",_e),pn(ie.scroller,"dragstart",Ne),pn(ie.scroller,"drop",ye),Ga(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new qa(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new qa(bn(z.line,0),ur(x.doc,bn(z.line+1,0)));var te=ne(x,z);return new qa(te.from,te.to)}function dd(x,z,ne,te){var ie=x.display,ue=x.doc;Jr(z);var ye,_e,Ne=ue.sel,Be=Ne.ranges;if(te.addNew&&!te.extend?(_e=ue.sel.contains(ne),_e>-1?ye=Be[_e]:ye=new qa(ne,ne)):(ye=ue.sel.primary(),_e=ue.sel.primIndex),te.unit=="rectangle")te.addNew||(ye=new qa(ne,ne)),ne=Da(x,z,!0,!0),_e=-1;else{var bt=df(x,ne,te.unit);te.extend?ye=fu(ye,bt.anchor,bt.head,te.extend):ye=bt}te.addNew?_e==-1?(_e=Be.length,Po(ue,Ms(x,Be.concat([ye]),_e),{scroll:!1,origin:"*mouse"})):Be.length>1&&Be[_e].empty()&&te.unit=="char"&&!te.extend?(Po(ue,Ms(x,Be.slice(0,_e).concat(Be.slice(_e+1)),0),{scroll:!1,origin:"*mouse"}),Ne=ue.sel):ws(ue,_e,ye,ft):(_e=0,Po(ue,new vs([ye],0),ft),Ne=ue.sel);var It=ne;function mn(Kr){if(An(It,Kr)!=0)if(It=Kr,te.unit=="rectangle"){for(var ii=[],Oi=x.options.tabSize,Fi=Ge(Yt(ue,ne.line).text,ne.ch,Oi),La=Ge(Yt(ue,Kr.line).text,Kr.ch,Oi),so=Math.min(Fi,La),Uo=Math.max(Fi,La),xo=Math.min(ne.line,Kr.line),fs=Math.min(x.lastLine(),Math.max(ne.line,Kr.line));xo<=fs;xo++){var hs=Yt(ue,xo).text,No=Bn(hs,so,Oi);so==Uo?ii.push(new qa(bn(xo,No),bn(xo,No))):hs.length>No&&ii.push(new qa(bn(xo,No),bn(xo,Bn(hs,Uo,Oi))))}ii.length||ii.push(new qa(ne,ne)),Po(ue,Ms(x,Ne.ranges.slice(0,_e).concat(ii),_e),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Kr)}else{var ps=ye,ca=df(x,Kr,te.unit),Co=ps.anchor,wo;An(ca.anchor,Co)>0?(wo=ca.head,Co=sr(ps.from(),ca.anchor)):(wo=ca.anchor,Co=ai(ps.to(),ca.head));var Eo=Ne.ranges.slice(0);Eo[_e]=ff(x,new qa(ur(ue,Co),wo)),Po(ue,Ms(x,Eo,_e),ft)}}var ln=ie.wrapper.getBoundingClientRect(),Yn=0;function hr(Kr){var ii=++Yn,Oi=Da(x,Kr,!0,te.unit=="rectangle");if(Oi)if(An(Oi,It)!=0){x.curOp.focus=$t(),mn(Oi);var Fi=_a(ie,ue);(Oi.line>=Fi.to||Oi.line<Fi.from)&&setTimeout(Ua(x,function(){Yn==ii&&hr(Kr)}),150)}else{var La=Kr.clientY<ln.top?-20:Kr.clientY>ln.bottom?20:0;La&&setTimeout(Ua(x,function(){Yn==ii&&(ie.scroller.scrollTop+=La,hr(Kr))}),50)}}function Ir(Kr){x.state.selectingText=!1,Yn=1/0,Kr&&(Jr(Kr),ie.input.focus()),Lr(ie.wrapper.ownerDocument,"mousemove",Vr),Lr(ie.wrapper.ownerDocument,"mouseup",ni),ue.history.lastSelOrigin=null}var Vr=Ua(x,function(Kr){Kr.buttons===0||!Pr(Kr)?Ir(Kr):hr(Kr)}),ni=Ua(x,Ir);x.state.selectingText=ni,pn(ie.wrapper.ownerDocument,"mousemove",Vr),pn(ie.wrapper.ownerDocument,"mouseup",ni)}function ff(x,z){var ne=z.anchor,te=z.head,ie=Yt(x.doc,ne.line);if(An(ne,te)==0&&ne.sticky==te.sticky)return z;var ue=gr(ie);if(!ue)return z;var ye=Gt(ue,ne.ch,ne.sticky),_e=ue[ye];if(_e.from!=ne.ch&&_e.to!=ne.ch)return z;var Ne=ye+(_e.from==ne.ch==(_e.level!=1)?0:1);if(Ne==0||Ne==ue.length)return z;var Be;if(te.line!=ne.line)Be=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var bt=Gt(ue,te.ch,te.sticky),It=bt-ye||(te.ch-ne.ch)*(_e.level==1?-1:1);bt==Ne-1||bt==Ne?Be=It<0:Be=It>0}var mn=ue[Ne+(Be?-1:0)],ln=Be==(mn.level==1),Yn=ln?mn.from:mn.to,hr=ln?"after":"before";return ne.ch==Yn&&ne.sticky==hr?z:new qa(new bn(ne.line,Yn,hr),te)}function Oc(x,z,ne,te){var ie,ue;if(z.touches)ie=z.touches[0].clientX,ue=z.touches[0].clientY;else try{ie=z.clientX,ue=z.clientY}catch(mn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Jr(z);var ye=x.display,_e=ye.lineDiv.getBoundingClientRect();if(ue>_e.bottom||!li(x,ne))return Ei(z);ue-=_e.top-ye.viewOffset;for(var Ne=0;Ne<x.display.gutterSpecs.length;++Ne){var Be=ye.gutters.childNodes[Ne];if(Be&&Be.getBoundingClientRect().right>=ie){var bt=or(x.doc,ue),It=x.display.gutterSpecs[Ne];return $n(x,ne,x,bt,It.className,z),Ei(z)}}}function ns(x,z){return Oc(x,z,"gutterClick",!0)}function vl(x,z){ui(x.display,z)||hf(x,z)||Cr(x,z,"contextmenu")||Ee||x.display.input.onContextMenu(z)}function hf(x,z){return li(x,"gutterContextMenu")?Oc(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ti(x)}var yl={toString:function(){return"CodeMirror.Init"}},pf={},Su={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ue,ye){x.defaults[te]=ie,ue&&(z[te]=ye?function(_e,Ne,Be){Be!=yl&&ue(_e,Ne,Be)}:ue)}x.defineOption=ne,x.Init=yl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,ru(te)},!0),ne("indentUnit",2,ru,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Nl(te),ti(te),gi(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ue=[],ye=te.doc.first;te.doc.iter(function(Ne){for(var Be=0;;){var bt=Ne.text.indexOf(ie,Be);if(bt==-1)break;Be=bt+ie.length,ue.push(bn(ye,bt))}ye++});for(var _e=ue.length-1;_e>=0;_e--)ec(te.doc,ie,ue[_e],bn(ue[_e].line,ue[_e].ch+ie.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ie,ue){te.state.specialChars=new RegExp(ie.source+(ie.test(" ")?"":"| "),"g"),ue!=yl&&te.refresh()}),ne("specialCharPlaceholder",xe,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ne("spellcheck",!1,function(te,ie){return te.getInputField().spellcheck=ie},!0),ne("autocorrect",!1,function(te,ie){return te.getInputField().autocorrect=ie},!0),ne("autocapitalize",!1,function(te,ie){return te.getInputField().autocapitalize=ie},!0),ne("rtlMoveVisually",!jt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){fd(te),Ql(te)},!0),ne("keyMap","default",function(te,ie,ue){var ye=cs(ie),_e=ue!=yl&&cs(ue);_e&&_e.detach&&_e.detach(te,ye),ye.attach&&ye.attach(te,_e||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=eu(ie,te.options.lineNumbers),Ql(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?_o(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return xs(te)},!0),ne("scrollbarStyle","native",function(te){vc(te),xs(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ie){te.display.gutterSpecs=eu(te.options.gutters,ie),Ql(te)},!0),ne("firstLineNumber",1,Ql,!0),ne("lineNumberFormatter",function(te){return te},Ql,!0),ne("showCursorWhenSelecting",!1,zo,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Ko(te),te.display.input.blur()),te.display.input.readOnlyChanged(ie)}),ne("screenReaderLabel",null,function(te,ie){ie=ie===""?null:ie,te.display.input.screenReaderLabelChanged(ie)}),ne("disableInput",!1,function(te,ie){ie||te.display.input.reset()},!0),ne("dragDrop",!0,sh),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,zo,!0),ne("singleCursorHeightPerLine",!0,zo,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Nl,!0),ne("addModeClass",!1,Nl,!0),ne("pollInterval",100),ne("undoDepth",200,function(te,ie){return te.doc.history.undoDepth=ie}),ne("historyEventDelay",1250),ne("viewportMargin",10,function(te){return te.refresh()},!0),ne("maxHighlightLength",1e4,Nl,!0),ne("moveInputWithCursor",!0,function(te,ie){ie||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ie){return te.display.input.getField().tabIndex=ie||""}),ne("autofocus",null),ne("direction","ltr",function(te,ie){return te.doc.setDirection(ie)},!0),ne("phrases",null)}function sh(x,z,ne){var te=ne&&ne!=yl;if(!z!=!te){var ie=x.display.dragFunctions,ue=z?pn:Lr;ue(x.display.scroller,"dragstart",ie.start),ue(x.display.scroller,"dragenter",ie.enter),ue(x.display.scroller,"dragover",ie.over),ue(x.display.scroller,"dragleave",ie.leave),ue(x.display.scroller,"drop",ie.drop)}}function mf(x){x.options.lineWrapping?(xn(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(je(x.display.wrapper,"CodeMirror-wrap"),Pn(x)),to(x),gi(x),ti(x),setTimeout(function(){return xs(x)},100)}function ra(x,z){var ne=this;if(!(this instanceof ra))return new ra(x,z);this.options=z=z?yn(z):{},yn(pf,z,!1);var te=z.value;typeof te=="string"?te=new Lo(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new ra.inputStyles[z.inputStyle](this),ue=this.display=new Gd(x,te,ie,z);ue.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vc(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},z.autofocus&&!et&&ue.input.focus(),ve&&Le<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),ad(),Ks(this),this.curOp.forceUpdate=!0,wc(this,te),z.autofocus&&!et||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&Ja(ne)},20):Ko(this);for(var ye in Su)Su.hasOwnProperty(ye)&&Su[ye](this,z[ye],yl);bc(this),z.finishInit&&z.finishInit(this);for(var _e=0;_e<hd.length;++_e)hd[_e](this);Ds(this),Me&&z.lineWrapping&&getComputedStyle(ue.lineDiv).textRendering=="optimizelegibility"&&(ue.lineDiv.style.textRendering="auto")}ra.defaults=pf,ra.optionHandlers=Su;function lh(x){var z=x.display;pn(z.scroller,"mousedown",Ua(x,Xo)),ve&&Le<11?pn(z.scroller,"dblclick",Ua(x,function(Ne){if(!Cr(x,Ne)){var Be=Da(x,Ne);if(!(!Be||ns(x,Ne)||ui(x.display,Ne))){Jr(Ne);var bt=x.findWordAt(Be);Bl(x.doc,bt.anchor,bt.head)}}})):pn(z.scroller,"dblclick",function(Ne){return Cr(x,Ne)||Jr(Ne)}),pn(z.scroller,"contextmenu",function(Ne){return vl(x,Ne)}),pn(z.input.getField(),"contextmenu",function(Ne){z.scroller.contains(Ne.target)||vl(x,Ne)});var ne,te={end:0};function ie(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function ue(Ne){if(Ne.touches.length!=1)return!1;var Be=Ne.touches[0];return Be.radiusX<=1&&Be.radiusY<=1}function ye(Ne,Be){if(Be.left==null)return!0;var bt=Be.left-Ne.left,It=Be.top-Ne.top;return bt*bt+It*It>20*20}pn(z.scroller,"touchstart",function(Ne){if(!Cr(x,Ne)&&!ue(Ne)&&!ns(x,Ne)){z.input.ensurePolled(),clearTimeout(ne);var Be=+new Date;z.activeTouch={start:Be,moved:!1,prev:Be-te.end<=300?te:null},Ne.touches.length==1&&(z.activeTouch.left=Ne.touches[0].pageX,z.activeTouch.top=Ne.touches[0].pageY)}}),pn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),pn(z.scroller,"touchend",function(Ne){var Be=z.activeTouch;if(Be&&!ui(z,Ne)&&Be.left!=null&&!Be.moved&&new Date-Be.start<300){var bt=x.coordsChar(z.activeTouch,"page"),It;!Be.prev||ye(Be,Be.prev)?It=new qa(bt,bt):!Be.prev.prev||ye(Be,Be.prev.prev)?It=x.findWordAt(bt):It=new qa(bn(bt.line,0),ur(x.doc,bn(bt.line+1,0))),x.setSelection(It.anchor,It.head),x.focus(),Jr(Ne)}ie()}),pn(z.scroller,"touchcancel",ie),pn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ba(x,z.scroller.scrollTop),vo(x,z.scroller.scrollLeft,!0),$n(x,"scroll",x))}),pn(z.scroller,"mousewheel",function(Ne){return Xu(x,Ne)}),pn(z.scroller,"DOMMouseScroll",function(Ne){return Xu(x,Ne)}),pn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Ne){Cr(x,Ne)||Pi(Ne)},over:function(Ne){Cr(x,Ne)||(id(x,Ne),Pi(Ne))},start:function(Ne){return th(x,Ne)},drop:Ua(x,eh),leave:function(Ne){Cr(x,Ne)||rc(x)}};var _e=z.input.getField();pn(_e,"keyup",function(Ne){return cf.call(x,Ne)}),pn(_e,"keydown",Ua(x,Dc)),pn(_e,"keypress",Ua(x,uf)),pn(_e,"focus",function(Ne){return Ja(x,Ne)}),pn(_e,"blur",function(Ne){return Ko(x,Ne)})}var hd=[];ra.defineInitHook=function(x){return hd.push(x)};function Ns(x,z,ne,te){var ie=x.doc,ue;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ue=Zi(x,z).state:ne="prev");var ye=x.options.tabSize,_e=Yt(ie,z),Ne=Ge(_e.text,null,ye);_e.stateAfter&&(_e.stateAfter=null);var Be=_e.text.match(/^\s*/)[0],bt;if(!te&&!/\S/.test(_e.text))bt=0,ne="not";else if(ne=="smart"&&(bt=ie.mode.indent(ue,_e.text.slice(Be.length),_e.text),bt==fn||bt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?bt=Ge(Yt(ie,z-1).text,null,ye):bt=0:ne=="add"?bt=Ne+x.options.indentUnit:ne=="subtract"?bt=Ne-x.options.indentUnit:typeof ne=="number"&&(bt=Ne+ne),bt=Math.max(0,bt);var It="",mn=0;if(x.options.indentWithTabs)for(var ln=Math.floor(bt/ye);ln;--ln)mn+=ye,It+=" ";if(mn<bt&&(It+=Nt(bt-mn)),It!=Be)return ec(ie,It,bn(z,0),bn(z,Be.length),"+input"),_e.stateAfter=null,!0;for(var Yn=0;Yn<ie.sel.ranges.length;Yn++){var hr=ie.sel.ranges[Yn];if(hr.head.line==z&&hr.head.ch<Be.length){var Ir=bn(z,Be.length);ws(ie,Yn,new qa(Ir,Ir));break}}}var Rs=null;function bl(x){Rs=x}function pd(x,z,ne,te,ie){var ue=x.doc;x.display.shift=!1,te||(te=ue.sel);var ye=+new Date-200,_e=ie=="paste"||x.state.pasteIncoming>ye,Ne=At(z),Be=null;if(_e&&te.ranges.length>1)if(Rs&&Rs.text.join(`
`)==z){if(te.ranges.length%Rs.text.length==0){Be=[];for(var bt=0;bt<Rs.text.length;bt++)Be.push(ue.splitLines(Rs.text[bt]))}}else Ne.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Be=Dn(Ne,function(Vr){return[Vr]}));for(var It=x.curOp.updateInput,mn=te.ranges.length-1;mn>=0;mn--){var ln=te.ranges[mn],Yn=ln.from(),hr=ln.to();ln.empty()&&(ne&&ne>0?Yn=bn(Yn.line,Yn.ch-ne):x.state.overwrite&&!_e?hr=bn(hr.line,Math.min(Yt(ue,hr.line).text.length,hr.ch+Xt(Ne).length)):_e&&Rs&&Rs.lineWise&&Rs.text.join(`
`)==Ne.join(`
`)&&(Yn=hr=bn(Yn.line,0)));var Ir={from:Yn,to:hr,text:Be?Be[mn%Be.length]:Ne,origin:ie||(_e?"paste":x.state.cutIncoming>ye?"cut":"+input")};dl(x.doc,Ir),Sn(x,"inputRead",x,Ir)}z&&!_e&&gd(x,z),Ho(x),x.curOp.updateInput<2&&(x.curOp.updateInput=It),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function md(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&Ea(z,function(){return pd(z,ne,0,null,"paste")}),!0}function gd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var ue=x.getModeAt(ie.head),ye=!1;if(ue.electricChars){for(var _e=0;_e<ue.electricChars.length;_e++)if(z.indexOf(ue.electricChars.charAt(_e))>-1){ye=Ns(x,ie.head.line,"smart");break}}else ue.electricInput&&ue.electricInput.test(Yt(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ye=Ns(x,ie.head.line,"smart"));ye&&Sn(x,"electricInput",x,ie.head.line)}}}function lc(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ie=x.doc.sel.ranges[te].head.line,ue={anchor:bn(ie,0),head:bn(ie+1,0)};ne.push(ue),z.push(x.getRange(ue.anchor,ue.head))}return{text:z,ranges:ne}}function gf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function vd(){var x=Ct("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=Ct("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?x.style.width="1000px":x.setAttribute("wrap","off"),ht&&(x.style.border="1px solid black"),gf(x),z}function yd(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var ue=this.options,ye=ue[te];ue[te]==ie&&te!="mode"||(ue[te]=ie,z.hasOwnProperty(te)&&Ua(this,z[te])(this,ie,ye),$n(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ie){this.state.keyMaps[ie?"push":"unshift"](cs(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ue=0;ue<ie.length;++ue)if(ie[ue]==te||ie[ue].name==te)return ie.splice(ue,1),!0},addOverlay:Ha(function(te,ie){var ue=te.token?te:x.getMode(this.options,te);if(ue.startState)throw new Error("Overlays may not be stateful.");Mn(this.state.overlays,{mode:ue,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ye){return ye.priority}),this.state.modeGen++,gi(this)}),removeOverlay:Ha(function(te){for(var ie=this.state.overlays,ue=0;ue<ie.length;++ue){var ye=ie[ue].modeSpec;if(ye==te||typeof te=="string"&&ye.name==te){ie.splice(ue,1),this.state.modeGen++,gi(this);return}}}),indentLine:Ha(function(te,ie,ue){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),lr(this.doc,te)&&Ns(this,te,ie,ue)}),indentSelection:Ha(function(te){for(var ie=this.doc.sel.ranges,ue=-1,ye=0;ye<ie.length;ye++){var _e=ie[ye];if(_e.empty())_e.head.line>ue&&(Ns(this,_e.head.line,te,!0),ue=_e.head.line,ye==this.doc.sel.primIndex&&Ho(this));else{var Ne=_e.from(),Be=_e.to(),bt=Math.max(ue,Ne.line);ue=Math.min(this.lastLine(),Be.line-(Be.ch?0:1))+1;for(var It=bt;It<ue;++It)Ns(this,It,te);var mn=this.doc.sel.ranges;Ne.ch==0&&ie.length==mn.length&&mn[ye].from().ch>0&&ws(this.doc,ye,new qa(Ne,mn[ye].to()),ot)}}}),getTokenAt:function(te,ie){return Ta(this,te,ie)},getLineTokens:function(te,ie){return Ta(this,bn(te),ie,!0)},getTokenTypeAt:function(te){te=ur(this.doc,te);var ie=Ji(this,Yt(this.doc,te.line)),ue=0,ye=(ie.length-1)/2,_e=te.ch,Ne;if(_e==0)Ne=ie[2];else for(;;){var Be=ue+ye>>1;if((Be?ie[Be*2-1]:0)>=_e)ye=Be;else if(ie[Be*2+1]<_e)ue=Be+1;else{Ne=ie[Be*2+2];break}}var bt=Ne?Ne.indexOf("overlay "):-1;return bt<0?Ne:bt==0?null:Ne.slice(0,bt-1)},getModeAt:function(te){var ie=this.doc.mode;return ie.innerMode?x.innerMode(ie,this.getTokenAt(te).state).mode:ie},getHelper:function(te,ie){return this.getHelpers(te,ie)[0]},getHelpers:function(te,ie){var ue=[];if(!ne.hasOwnProperty(ie))return ue;var ye=ne[ie],_e=this.getModeAt(te);if(typeof _e[ie]=="string")ye[_e[ie]]&&ue.push(ye[_e[ie]]);else if(_e[ie])for(var Ne=0;Ne<_e[ie].length;Ne++){var Be=ye[_e[ie][Ne]];Be&&ue.push(Be)}else _e.helperType&&ye[_e.helperType]?ue.push(ye[_e.helperType]):ye[_e.name]&&ue.push(ye[_e.name]);for(var bt=0;bt<ye._global.length;bt++){var It=ye._global[bt];It.pred(_e,this)&&Zt(ue,It.val)==-1&&ue.push(It.val)}return ue},getStateAfter:function(te,ie){var ue=this.doc;return te=vi(ue,te==null?ue.first+ue.size-1:te),Zi(this,te+1,ie).state},cursorCoords:function(te,ie){var ue,ye=this.doc.sel.primary();return te==null?ue=ye.head:typeof te=="object"?ue=ur(this.doc,te):ue=te?ye.from():ye.to(),da(this,ue,ie||"page")},charCoords:function(te,ie){return Aa(this,ur(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=sa(this,te,ie||"page"),ja(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=sa(this,{top:te,left:0},ie||"page").top,or(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ue){var ye=!1,_e;if(typeof te=="number"){var Ne=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Ne&&(te=Ne,ye=!0),_e=Yt(this.doc,te)}else _e=te;return Ui(this,_e,{top:0,left:0},ie||"page",ue||ye).top+(ye?this.doc.height-Cn(_e):0)},defaultTextHeight:function(){return Ka(this.display)},defaultCharWidth:function(){return eo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ue,ye,_e){var Ne=this.display;te=da(this,ur(this.doc,te));var Be=te.bottom,bt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Ne.sizer.appendChild(ie),ye=="over")Be=te.top;else if(ye=="above"||ye=="near"){var It=Math.max(Ne.wrapper.clientHeight,this.doc.height),mn=Math.max(Ne.sizer.clientWidth,Ne.lineSpace.clientWidth);(ye=="above"||te.bottom+ie.offsetHeight>It)&&te.top>ie.offsetHeight?Be=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=It&&(Be=te.bottom),bt+ie.offsetWidth>mn&&(bt=mn-ie.offsetWidth)}ie.style.top=Be+"px",ie.style.left=ie.style.right="",_e=="right"?(bt=Ne.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(_e=="left"?bt=0:_e=="middle"&&(bt=(Ne.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=bt+"px"),ue&&ul(this,{left:bt,top:Be,right:bt+ie.offsetWidth,bottom:Be+ie.offsetHeight})},triggerOnKeyDown:Ha(Dc),triggerOnKeyPress:Ha(uf),triggerOnKeyUp:cf,triggerOnMouseDown:Ha(Xo),execCommand:function(te){if(ac.hasOwnProperty(te))return ac[te].call(null,this)},triggerElectric:Ha(function(te){gd(this,te)}),findPosH:function(te,ie,ue,ye){var _e=1;ie<0&&(_e=-1,ie=-ie);for(var Ne=ur(this.doc,te),Be=0;Be<ie&&(Ne=Cu(this.doc,Ne,_e,ue,ye),!Ne.hitSide);++Be);return Ne},moveH:Ha(function(te,ie){var ue=this;this.extendSelectionsBy(function(ye){return ue.display.shift||ue.doc.extend||ye.empty()?Cu(ue.doc,ye.head,te,ie,ue.options.rtlMoveVisually):te<0?ye.from():ye.to()},Jt)}),deleteH:Ha(function(te,ie){var ue=this.doc.sel,ye=this.doc;ue.somethingSelected()?ye.replaceSelection("",null,"+delete"):_s(this,function(_e){var Ne=Cu(ye,_e.head,te,ie,!1);return te<0?{from:Ne,to:_e.head}:{from:_e.head,to:Ne}})}),findPosV:function(te,ie,ue,ye){var _e=1,Ne=ye;ie<0&&(_e=-1,ie=-ie);for(var Be=ur(this.doc,te),bt=0;bt<ie;++bt){var It=da(this,Be,"div");if(Ne==null?Ne=It.left:It.left=Ne,Be=vf(this,It,_e,ue),Be.hitSide)break}return Be},moveV:Ha(function(te,ie){var ue=this,ye=this.doc,_e=[],Ne=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(bt){if(Ne)return te<0?bt.from():bt.to();var It=da(ue,bt.head,"div");bt.goalColumn!=null&&(It.left=bt.goalColumn),_e.push(It.left);var mn=vf(ue,It,te,ie);return ie=="page"&&bt==ye.sel.primary()&&ms(ue,Aa(ue,mn,"div").top-It.top),mn},Jt),_e.length)for(var Be=0;Be<ye.sel.ranges.length;Be++)ye.sel.ranges[Be].goalColumn=_e[Be]}),findWordAt:function(te){var ie=this.doc,ue=Yt(ie,te.line).text,ye=te.ch,_e=te.ch;if(ue){var Ne=this.getHelper(te,"wordChars");(te.sticky=="before"||_e==ue.length)&&ye?--ye:++_e;for(var Be=ue.charAt(ye),bt=he(Be,Ne)?function(It){return he(It,Ne)}:/\s/.test(Be)?function(It){return/\s/.test(It)}:function(It){return!/\s/.test(It)&&!he(It)};ye>0&&bt(ue.charAt(ye-1));)--ye;for(;_e<ue.length&&bt(ue.charAt(_e));)++_e}return new qa(bn(te.line,ye),bn(te.line,_e))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?xn(this.display.cursorDiv,"CodeMirror-overwrite"):je(this.display.cursorDiv,"CodeMirror-overwrite"),$n(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==$t()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ha(function(te,ie){Ts(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-wr(this)-this.display.barHeight,width:te.scrollWidth-wr(this)-this.display.barWidth,clientHeight:Yr(this),clientWidth:Fr(this)}},scrollIntoView:Ha(function(te,ie){te==null?(te={from:this.doc.sel.primary().head,to:null},ie==null&&(ie=this.options.cursorScrollMargin)):typeof te=="number"?te={from:bn(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ie||0,te.from.line!=null?Is(this,te):fo(this,te.from,te.to,te.margin)}),setSize:Ha(function(te,ie){var ue=this,ye=function(Ne){return typeof Ne=="number"||/^\d+$/.test(String(Ne))?Ne+"px":Ne};te!=null&&(this.display.wrapper.style.width=ye(te)),ie!=null&&(this.display.wrapper.style.height=ye(ie)),this.options.lineWrapping&&ji(this);var _e=this.display.viewFrom;this.doc.iter(_e,this.display.viewTo,function(Ne){if(Ne.widgets){for(var Be=0;Be<Ne.widgets.length;Be++)if(Ne.widgets[Be].noHScroll){ya(ue,_e,"widget");break}}++_e}),this.curOp.forceUpdate=!0,$n(this,"refresh",this)}),operation:function(te){return Ea(this,te)},startOperation:function(){return Ks(this)},endOperation:function(){return Ds(this)},refresh:Ha(function(){var te=this.display.cachedTextHeight;gi(this),this.curOp.forceUpdate=!0,ti(this),Ts(this,this.doc.scrollLeft,this.doc.scrollTop),Jc(this.display),(te==null||Math.abs(te-Ka(this.display))>.5||this.options.lineWrapping)&&to(this),$n(this,"refresh",this)}),swapDoc:Ha(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),wc(this,te),ti(this),this.display.input.reset(),Ts(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Sn(this,"swapDoc",this,ie),ie}),phrase:function(te){var ie=this.options.phrases;return ie&&Object.prototype.hasOwnProperty.call(ie,te)?ie[te]:te},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}},ci(x),x.registerHelper=function(te,ie,ue){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ie]=ue},x.registerGlobalHelper=function(te,ie,ue,ye){x.registerHelper(te,ie,ye),ne[te]._global.push({pred:ue,val:ye})}}function Cu(x,z,ne,te,ie){var ue=z,ye=ne,_e=Yt(x,z.line),Ne=ie&&x.direction=="rtl"?-ne:ne;function Be(){var ni=z.line+Ne;return ni<x.first||ni>=x.first+x.size?!1:(z=new bn(ni,z.ch,z.sticky),_e=Yt(x,ni))}function bt(ni){var Kr;if(te=="codepoint"){var ii=_e.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(ii)?Kr=null:Kr=new bn(z.line,Math.max(0,Math.min(_e.text.length,z.ch+ne*(ii>=55296&&ii<56320?2:1))),-ne)}else ie?Kr=Zs(x.cm,_e,z,ne):Kr=Ws(_e,z,ne);if(Kr==null)if(!ni&&Be())z=Kl(ie,x.cm,_e,z.line,Ne);else return!1;else z=Kr;return!0}if(te=="char"||te=="codepoint")bt();else if(te=="column")bt(!0);else if(te=="word"||te=="group")for(var It=null,mn=te=="group",ln=x.cm&&x.cm.getHelper(z,"wordChars"),Yn=!0;!(ne<0&&!bt(!Yn));Yn=!1){var hr=_e.text.charAt(z.ch)||`
`,Ir=he(hr,ln)?"w":mn&&hr==`
`?"n":!mn||/\s/.test(hr)?null:"p";if(mn&&!Yn&&!Ir&&(Ir="s"),It&&It!=Ir){ne<0&&(ne=1,bt(),z.sticky="after");break}if(Ir&&(It=Ir),ne>0&&!bt(!Yn))break}var Vr=hu(x,z,ue,ye,!0);return hi(ue,Vr)&&(Vr.hitSide=!0),Vr}function vf(x,z,ne,te){var ie=x.doc,ue=z.left,ye;if(te=="page"){var _e=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ne=Math.max(_e-.5*Ka(x.display),3);ye=(ne>0?z.bottom:z.top)+ne*Ne}else te=="line"&&(ye=ne>0?z.bottom+3:z.top-3);for(var Be;Be=ja(x,ue,ye),!!Be.outside;){if(ne<0?ye<=0:ye>=ie.height){Be.hitSide=!0;break}ye+=ne*5}return Be}var ro=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new De,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ro.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;gf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ue(_e){for(var Ne=_e.target;Ne;Ne=Ne.parentNode){if(Ne==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ne.className))break}return!1}pn(ie,"paste",function(_e){!ue(_e)||Cr(te,_e)||md(_e,te)||Le<=11&&setTimeout(Ua(te,function(){return z.updateFromDOM()}),20)}),pn(ie,"compositionstart",function(_e){z.composing={data:_e.data,done:!1}}),pn(ie,"compositionupdate",function(_e){z.composing||(z.composing={data:_e.data,done:!1})}),pn(ie,"compositionend",function(_e){z.composing&&(_e.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),pn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),pn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ye(_e){if(!(!ue(_e)||Cr(te,_e))){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()}),_e.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Ne=lc(te);bl({lineWise:!0,text:Ne.text}),_e.type=="cut"&&te.operation(function(){te.setSelections(Ne.ranges,0,ot),te.replaceSelection("",null,"cut")})}else return;if(_e.clipboardData){_e.clipboardData.clearData();var Be=Rs.text.join(`
`);if(_e.clipboardData.setData("Text",Be),_e.clipboardData.getData("Text")==Be){_e.preventDefault();return}}var bt=vd(),It=bt.firstChild;te.display.lineSpace.insertBefore(bt,te.display.lineSpace.firstChild),It.value=Rs.text.join(`
`);var mn=document.activeElement;on(It),setTimeout(function(){te.display.lineSpace.removeChild(bt),mn.focus(),mn==ie&&ne.showPrimarySelection()},50)}}pn(ie,"copy",ye),pn(ie,"cut",ye)},ro.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},ro.prototype.prepareSelection=function(){var x=as(this.cm,!1);return x.focus=document.activeElement==this.div,x},ro.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},ro.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ro.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ie=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ie.line<z.display.viewFrom){x.removeAllRanges();return}var ue=Eu(z,x.anchorNode,x.anchorOffset),ye=Eu(z,x.focusNode,x.focusOffset);if(!(ue&&!ue.bad&&ye&&!ye.bad&&An(sr(ue,ye),te)==0&&An(ai(ue,ye),ie)==0)){var _e=z.display.view,Ne=te.line>=z.display.viewFrom&&yf(z,te)||{node:_e[0].measure.map[2],offset:0},Be=ie.line<z.display.viewTo&&yf(z,ie);if(!Be){var bt=_e[_e.length-1].measure,It=bt.maps?bt.maps[bt.maps.length-1]:bt.map;Be={node:It[It.length-1],offset:It[It.length-2]-It[It.length-3]}}if(!Ne||!Be){x.removeAllRanges();return}var mn=x.rangeCount&&x.getRangeAt(0),ln;try{ln=at(Ne.node,Ne.offset,Be.offset,Be.node)}catch(Yn){}ln&&(!ce&&z.state.focused?(x.collapse(Ne.node,Ne.offset),ln.collapsed||(x.removeAllRanges(),x.addRange(ln))):(x.removeAllRanges(),x.addRange(ln)),mn&&x.anchorNode==null?x.addRange(mn):ce&&this.startGracePeriod()),this.rememberSelection()}},ro.prototype.startGracePeriod=function(){var x=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){x.gracePeriod=!1,x.selectionChanged()&&x.cm.operation(function(){return x.cm.curOp.selectionChanged=!0})},20)},ro.prototype.showMultipleSelections=function(x){Lt(this.cm.display.cursorDiv,x.cursors),Lt(this.cm.display.selectionDiv,x.selection)},ro.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},ro.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Vt(this.div,z)},ro.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ro.prototype.blur=function(){this.div.blur()},ro.prototype.getField=function(){return this.div},ro.prototype.supportsTouch=function(){return!0},ro.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():Ea(this.cm,function(){return x.cm.curOp.selectionChanged=!0});function z(){x.cm.state.focused&&(x.pollSelection(),x.polling.set(x.cm.options.pollInterval,z))}this.polling.set(this.cm.options.pollInterval,z)},ro.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},ro.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(lt&&me&&this.cm.display.gutterSpecs.length&&ch(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Eu(z,x.anchorNode,x.anchorOffset),te=Eu(z,x.focusNode,x.focusOffset);ne&&te&&Ea(z,function(){Po(z.doc,Ps(ne,te),ot),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},ro.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,ne=x.doc.sel.primary(),te=ne.from(),ie=ne.to();if(te.ch==0&&te.line>x.firstLine()&&(te=bn(te.line-1,Yt(x.doc,te.line-1).length)),ie.ch==Yt(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=bn(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ue,ye,_e;te.line==z.viewFrom||(ue=Br(x,te.line))==0?(ye=Jn(z.view[0].line),_e=z.view[0].node):(ye=Jn(z.view[ue].line),_e=z.view[ue-1].node.nextSibling);var Ne=Br(x,ie.line),Be,bt;if(Ne==z.view.length-1?(Be=z.viewTo-1,bt=z.lineDiv.lastChild):(Be=Jn(z.view[Ne+1].line)-1,bt=z.view[Ne+1].node.previousSibling),!_e)return!1;for(var It=x.doc.splitLines(uh(x,_e,bt,ye,Be)),mn=Rn(x.doc,bn(ye,0),bn(Be,Yt(x.doc,Be).text.length));It.length>1&&mn.length>1;)if(Xt(It)==Xt(mn))It.pop(),mn.pop(),Be--;else if(It[0]==mn[0])It.shift(),mn.shift(),ye++;else break;for(var ln=0,Yn=0,hr=It[0],Ir=mn[0],Vr=Math.min(hr.length,Ir.length);ln<Vr&&hr.charCodeAt(ln)==Ir.charCodeAt(ln);)++ln;for(var ni=Xt(It),Kr=Xt(mn),ii=Math.min(ni.length-(It.length==1?ln:0),Kr.length-(mn.length==1?ln:0));Yn<ii&&ni.charCodeAt(ni.length-Yn-1)==Kr.charCodeAt(Kr.length-Yn-1);)++Yn;if(It.length==1&&mn.length==1&&ye==te.line)for(;ln&&ln>te.ch&&ni.charCodeAt(ni.length-Yn-1)==Kr.charCodeAt(Kr.length-Yn-1);)ln--,Yn++;It[It.length-1]=ni.slice(0,ni.length-Yn).replace(/^\u200b+/,""),It[0]=It[0].slice(ln).replace(/\u200b+$/,"");var Oi=bn(ye,ln),Fi=bn(Be,mn.length?Xt(mn).length-Yn:0);if(It.length>1||It[0]||An(Oi,Fi))return ec(x.doc,It,Oi,Fi,"+input"),!0},ro.prototype.ensurePolled=function(){this.forceCompositionEnd()},ro.prototype.reset=function(){this.forceCompositionEnd()},ro.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ro.prototype.readFromDOMSoon=function(){var x=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(x.readDOMTimeout=null,x.composing)if(x.composing.done)x.composing=null;else return;x.updateFromDOM()},80))},ro.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&Ea(this.cm,function(){return gi(x.cm)})},ro.prototype.setUneditable=function(x){x.contentEditable="false"},ro.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||Ua(this.cm,pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},ro.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},ro.prototype.onContextMenu=function(){},ro.prototype.resetPosition=function(){},ro.prototype.needsContentAttribute=!0;function yf(x,z){var ne=$i(x,z.line);if(!ne||ne.hidden)return null;var te=Yt(x.doc,z.line),ie=ua(ne,te,z.line),ue=gr(te,x.doc.direction),ye="left";if(ue){var _e=Gt(ue,z.ch);ye=_e%2?"right":"left"}var Ne=qr(ie.map,z.ch,ye);return Ne.offset=Ne.collapse=="right"?Ne.end:Ne.start,Ne}function ch(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function cc(x,z){return z&&(x.bad=!0),x}function uh(x,z,ne,te,ie){var ue="",ye=!1,_e=x.doc.lineSeparator(),Ne=!1;function Be(ln){return function(Yn){return Yn.id==ln}}function bt(){ye&&(ue+=_e,Ne&&(ue+=_e),ye=Ne=!1)}function It(ln){ln&&(bt(),ue+=ln)}function mn(ln){if(ln.nodeType==1){var Yn=ln.getAttribute("cm-text");if(Yn){It(Yn);return}var hr=ln.getAttribute("cm-marker"),Ir;if(hr){var Vr=x.findMarks(bn(te,0),bn(ie+1,0),Be(+hr));Vr.length&&(Ir=Vr[0].find(0))&&It(Rn(x.doc,Ir.from,Ir.to).join(_e));return}if(ln.getAttribute("contenteditable")=="false")return;var ni=/^(pre|div|p|li|table|br)$/i.test(ln.nodeName);if(!/^br$/i.test(ln.nodeName)&&ln.textContent.length==0)return;ni&&bt();for(var Kr=0;Kr<ln.childNodes.length;Kr++)mn(ln.childNodes[Kr]);/^(pre|p)$/i.test(ln.nodeName)&&(Ne=!0),ni&&(ye=!0)}else ln.nodeType==3&&It(ln.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;mn(z),z!=ne;)z=z.nextSibling,Ne=!1;return ue}function Eu(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return cc(x.clipPos(bn(x.display.viewTo-1)),!0);z=null,ne=0}else for(te=z;;te=te.parentNode){if(!te||te==x.display.lineDiv)return null;if(te.parentNode&&te.parentNode==x.display.lineDiv)break}for(var ie=0;ie<x.display.view.length;ie++){var ue=x.display.view[ie];if(ue.node==te)return dh(ue,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ie=!1;if(!z||!Vt(te,z))return cc(bn(Jn(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ue=x.rest?Xt(x.rest):x.line;return cc(bn(Jn(ue),ue.text.length),ie)}var ye=z.nodeType==3?z:null,_e=z;for(!ye&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ye=z.firstChild,ne&&(ne=ye.nodeValue.length));_e.parentNode!=te;)_e=_e.parentNode;var Ne=x.measure,Be=Ne.maps;function bt(Ir,Vr,ni){for(var Kr=-1;Kr<(Be?Be.length:0);Kr++)for(var ii=Kr<0?Ne.map:Be[Kr],Oi=0;Oi<ii.length;Oi+=3){var Fi=ii[Oi+2];if(Fi==Ir||Fi==Vr){var La=Jn(Kr<0?x.line:x.rest[Kr]),so=ii[Oi]+ni;return(ni<0||Fi!=Ir)&&(so=ii[Oi+(ni?1:0)]),bn(La,so)}}}var It=bt(ye,_e,ne);if(It)return cc(It,ie);for(var mn=_e.nextSibling,ln=ye?ye.nodeValue.length-ne:0;mn;mn=mn.nextSibling){if(It=bt(mn,mn.firstChild,0),It)return cc(bn(It.line,It.ch-ln),ie);ln+=mn.textContent.length}for(var Yn=_e.previousSibling,hr=ne;Yn;Yn=Yn.previousSibling){if(It=bt(Yn,Yn.firstChild,-1),It)return cc(bn(It.line,It.ch+hr),ie);hr+=Yn.textContent.length}}var oo=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new De,this.hasSelection=!1,this.composing=null};oo.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ie=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),ht&&(ie.style.width="0px"),pn(ie,"input",function(){ve&&Le>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),pn(ie,"paste",function(ye){Cr(te,ye)||md(ye,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ue(ye){if(!Cr(te,ye)){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var _e=lc(te);bl({lineWise:!0,text:_e.text}),ye.type=="cut"?te.setSelections(_e.ranges,null,ot):(ne.prevInput="",ie.value=_e.text.join(`
`),on(ie))}else return;ye.type=="cut"&&(te.state.cutIncoming=+new Date)}}pn(ie,"cut",ue),pn(ie,"copy",ue),pn(x.scroller,"paste",function(ye){if(!(ui(x,ye)||Cr(te,ye))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var _e=new Event("paste");_e.clipboardData=ye.clipboardData,ie.dispatchEvent(_e)}}),pn(x.lineSpace,"selectstart",function(ye){ui(x,ye)||Jr(ye)}),pn(ie,"compositionstart",function(){var ye=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:ye,range:te.markText(ye,te.getCursor("to"),{className:"CodeMirror-composing"})}}),pn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},oo.prototype.createField=function(x){this.wrapper=vd(),this.textarea=this.wrapper.firstChild},oo.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},oo.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=as(x);if(x.options.moveInputWithCursor){var ie=da(x,ne.sel.primary().head,"div"),ue=z.wrapper.getBoundingClientRect(),ye=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+ye.top-ue.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+ye.left-ue.left))}return te},oo.prototype.showSelection=function(x){var z=this.cm,ne=z.display;Lt(ne.cursorDiv,x.cursors),Lt(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},oo.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ne=z.getSelection();this.textarea.value=ne,z.state.focused&&on(this.textarea),ve&&Le>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ve&&Le>=9&&(this.hasSelection=null))}},oo.prototype.getField=function(){return this.textarea},oo.prototype.supportsTouch=function(){return!1},oo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||$t()!=this.textarea))try{this.textarea.focus()}catch(x){}},oo.prototype.blur=function(){this.textarea.blur()},oo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},oo.prototype.receivedFocus=function(){this.slowPoll()},oo.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},oo.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ne(){var te=z.poll();!te&&!x?(x=!0,z.polling.set(60,ne)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ne)},oo.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||On(ne)&&!te&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var ie=ne.value;if(ie==te&&!z.somethingSelected())return!1;if(ve&&Le>=9&&this.hasSelection===ie||ke&&/[\uf700-\uf7ff]/.test(ie))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var ue=ie.charCodeAt(0);if(ue==8203&&!te&&(te="\u200B"),ue==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,_e=Math.min(te.length,ie.length);ye<_e&&te.charCodeAt(ye)==ie.charCodeAt(ye);)++ye;return Ea(z,function(){pd(z,ie.slice(ye),te.length-ye,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},oo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},oo.prototype.onKeyPress=function(){ve&&Le>=9&&(this.hasSelection=null),this.fastPoll()},oo.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ue=Da(ne,x),ye=te.scroller.scrollTop;if(!ue||Pe)return;var _e=ne.options.resetSelectionOnContextMenu;_e&&ne.doc.sel.contains(ue)==-1&&Ua(ne,Po)(ne.doc,Ps(ue),ot);var Ne=ie.style.cssText,Be=z.wrapper.style.cssText,bt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(x.clientY-bt.top-5)+"px; left: "+(x.clientX-bt.left-5)+`px;
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var It;Me&&(It=window.scrollY),te.input.focus(),Me&&window.scrollTo(null,It),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=ln,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function mn(){if(ie.selectionStart!=null){var hr=ne.somethingSelected(),Ir="\u200B"+(hr?ie.value:"");ie.value="\u21DA",ie.value=Ir,z.prevInput=hr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=Ir.length,te.selForContextMenu=ne.doc.sel}}function ln(){if(z.contextMenuPending==ln&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Be,ie.style.cssText=Ne,ve&&Le<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ye),ie.selectionStart!=null)){(!ve||ve&&Le<9)&&mn();var hr=0,Ir=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?Ua(ne,td)(ne):hr++<10?te.detectingSelectAll=setTimeout(Ir,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(Ir,200)}}if(ve&&Le>=9&&mn(),Ee){Pi(x);var Yn=function(){Lr(window,"mouseup",Yn),setTimeout(ln,20)};pn(window,"mouseup",Yn)}else setTimeout(ln,50)},oo.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},oo.prototype.setUneditable=function(){},oo.prototype.needsContentAttribute=!1;function Hl(x,z){if(z=z?yn(z):{},z.value=x.value,!z.tabindex&&x.tabIndex&&(z.tabindex=x.tabIndex),!z.placeholder&&x.placeholder&&(z.placeholder=x.placeholder),z.autofocus==null){var ne=$t();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=_e.getValue()}var ie;if(x.form&&(pn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ue=x.form;ie=ue.submit;try{var ye=ue.submit=function(){te(),ue.submit=ie,ue.submit(),ue.submit=ye}}catch(Ne){}}z.finishInit=function(Ne){Ne.save=te,Ne.getTextArea=function(){return x},Ne.toTextArea=function(){Ne.toTextArea=isNaN,te(),x.parentNode.removeChild(Ne.getWrapperElement()),x.style.display="",x.form&&(Lr(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var _e=ra(function(Ne){return x.parentNode.insertBefore(Ne,x.nextSibling)},z);return _e}function uc(x){x.off=Lr,x.on=pn,x.wheelEventPixels=Gu,x.Doc=Lo,x.splitLines=At,x.countColumn=Ge,x.findColumn=Bn,x.isWordChar=pe,x.Pass=fn,x.signal=$n,x.Line=Fn,x.changeEnd=Js,x.scrollbarModel=Yl,x.Pos=bn,x.cmpPos=An,x.modes=cn,x.mimeModes=Vn,x.resolveMode=rt,x.getMode=pt,x.modeExtensions=Rt,x.extendMode=We,x.copyState=mt,x.startState=gt,x.innerMode=Dt,x.commands=ac,x.keyMap=ao,x.keyName=zl,x.isModifierKey=Ic,x.lookupKey=rl,x.normalizeKeyMap=od,x.StringStream=qt,x.SharedTextMarker=ka,x.TextMarker=hl,x.LineWidget=nc,x.e_preventDefault=Jr,x.e_stopPropagation=Di,x.e_stop=Pi,x.addClass=xn,x.contains=Vt,x.rmClass=je,x.keyNames=Os}oh(ra),yd(ra);var ol="iter insert remove copy getEditor constructor".split(" ");for(var ks in Lo.prototype)Lo.prototype.hasOwnProperty(ks)&&Zt(ol,ks)<0&&(ra.prototype[ks]=function(x){return function(){return x.apply(this.doc,arguments)}}(Lo.prototype[ks]));return ci(Lo),ra.inputStyles={textarea:oo,contenteditable:ro},ra.defineMode=function(x){!ra.defaults.mode&&x!="null"&&(ra.defaults.mode=x),Nn.apply(this,arguments)},ra.defineMIME=Qe,ra.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),ra.defineMIME("text/plain","null"),ra.defineExtension=function(x,z){ra.prototype[x]=z},ra.defineDocExtension=function(x,z){Lo.prototype[x]=z},ra.fromTextArea=Hl,uc(ra),ra.version="5.58.2",ra})},49047:function(Ln,en,se){(function(ce){ce(se(4631),se(29589),se(52539))})(function(ce){"use strict";ce.defineMode("markdown",function(Ue,Fe){var it=ce.getMode(Ue,"text/html"),ve=it.name=="null";function Le(Ge){if(ce.findModeByName){var De=ce.findModeByName(Ge);De&&(Ge=De.mime||De.mimes[0])}var Zt=ce.getMode(Ue,Ge);return Zt.name=="null"?null:Zt}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Me={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Se in Me)Me.hasOwnProperty(Se)&&Fe.tokenTypeOverrides[Se]&&(Me[Se]=Fe.tokenTypeOverrides[Se]);var me=/^([*\-_])(?:\s*\1){2,}\s*$/,Pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,st=/^\[(x| )\](?=\s)/i,Re=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Et=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ht=/^[^#!\[\]*_\\<>` "'(~:]+/,lt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ke=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,vt=" ";function jt(Ge,De,Zt){return De.f=De.inline=Zt,Zt(Ge,De)}function tt(Ge,De,Zt){return De.f=De.block=Zt,Zt(Ge,De)}function ut(Ge){return!Ge||!/\S/.test(Ge.string)}function Ee(Ge){if(Ge.linkTitle=!1,Ge.linkHref=!1,Ge.linkText=!1,Ge.em=!1,Ge.strong=!1,Ge.strikethrough=!1,Ge.quote=0,Ge.indentedCode=!1,Ge.f==je){var De=ve;if(!De){var Zt=ce.innerMode(it,Ge.htmlState);De=Zt.mode.name=="xml"&&Zt.state.tagStart===null&&!Zt.state.context&&Zt.state.tokenize.isInText}De&&(Ge.f=Bt,Ge.block=we,Ge.htmlState=null)}return Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:null},null}function we(Ge,De){var Zt=Ge.column()===De.indentation,In=ut(De.prevLine.stream),fn=De.indentedCode,ot=De.prevLine.hr,ft=De.list!==!1,Jt=(De.listStack[De.listStack.length-1]||0)+3;De.indentedCode=!1;var Bn=De.indentation;if(De.indentationDiff===null&&(De.indentationDiff=De.indentation,ft)){for(De.list=null;Bn<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=Bn-De.listStack[De.listStack.length-1])}var wn=!In&&!ot&&!De.prevLine.header&&(!ft||!fn)&&!De.prevLine.fencedCodeEnd,Nt=(De.list===!1||ot||In)&&De.indentation<=Jt&&Ge.match(me),Xt=null;if(De.indentationDiff>=4&&(fn||De.prevLine.fencedCodeEnd||De.prevLine.header||In))return Ge.skipToEnd(),De.indentedCode=!0,Me.code;if(Ge.eatSpace())return null;if(Zt&&De.indentation<=Jt&&(Xt=Ge.match(Re))&&Xt[1].length<=6)return De.quote=0,De.header=Xt[1].length,De.thisLine.header=!0,Fe.highlightFormatting&&(De.formatting="header"),De.f=De.inline,Lt(De);if(De.indentation<=Jt&&Ge.eat(">"))return De.quote=Zt?1:De.quote+1,Fe.highlightFormatting&&(De.formatting="quote"),Ge.eatSpace(),Lt(De);if(!Nt&&!De.setext&&Zt&&De.indentation<=Jt&&(Xt=Ge.match(Pe))){var Dn=Xt[1]?"ol":"ul";return De.indentation=Bn+Ge.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,Fe.taskLists&&Ge.match(st,!1)&&(De.taskList=!0),De.f=De.inline,Fe.highlightFormatting&&(De.formatting=["list","list-"+Dn]),Lt(De)}else{if(Zt&&De.indentation<=Jt&&(Xt=Ge.match(lt,!0)))return De.quote=0,De.fencedEndRE=new RegExp(Xt[1]+"+ *$"),De.localMode=Fe.fencedCodeBlockHighlighting&&Le(Xt[2]||Fe.fencedCodeBlockDefaultMode),De.localMode&&(De.localState=ce.startState(De.localMode)),De.f=De.block=Ye,Fe.highlightFormatting&&(De.formatting="code-block"),De.code=-1,Lt(De);if(De.setext||(!wn||!ft)&&!De.quote&&De.list===!1&&!De.code&&!Nt&&!et.test(Ge.string)&&(Xt=Ge.lookAhead(1))&&(Xt=Xt.match(Et)))return De.setext?(De.header=De.setext,De.setext=0,Ge.skipToEnd(),Fe.highlightFormatting&&(De.formatting="header")):(De.header=Xt[0].charAt(0)=="="?1:2,De.setext=De.header),De.thisLine.header=!0,De.f=De.inline,Lt(De);if(Nt)return Ge.skipToEnd(),De.hr=!0,De.thisLine.hr=!0,Me.hr;if(Ge.peek()==="[")return jt(Ge,De,dt)}return jt(Ge,De,De.inline)}function je(Ge,De){var Zt=it.token(Ge,De.htmlState);if(!ve){var In=ce.innerMode(it,De.htmlState);(In.mode.name=="xml"&&In.state.tagStart===null&&!In.state.context&&In.state.tokenize.isInText||De.md_inside&&Ge.current().indexOf(">")>-1)&&(De.f=Bt,De.block=we,De.htmlState=null)}return Zt}function Ye(Ge,De){var Zt=De.listStack[De.listStack.length-1]||0,In=De.indentation<Zt,fn=Zt+3;if(De.fencedEndRE&&De.indentation<=fn&&(In||Ge.match(De.fencedEndRE))){Fe.highlightFormatting&&(De.formatting="code-block");var ot;return In||(ot=Lt(De)),De.localMode=De.localState=null,De.block=we,De.f=Bt,De.fencedEndRE=null,De.code=0,De.thisLine.fencedCodeEnd=!0,In?tt(Ge,De,De.block):ot}else return De.localMode?De.localMode.token(Ge,De.localState):(Ge.skipToEnd(),Me.code)}function Lt(Ge){var De=[];if(Ge.formatting){De.push(Me.formatting),typeof Ge.formatting=="string"&&(Ge.formatting=[Ge.formatting]);for(var Zt=0;Zt<Ge.formatting.length;Zt++)De.push(Me.formatting+"-"+Ge.formatting[Zt]),Ge.formatting[Zt]==="header"&&De.push(Me.formatting+"-"+Ge.formatting[Zt]+"-"+Ge.header),Ge.formatting[Zt]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Ge.quote?De.push(Me.formatting+"-"+Ge.formatting[Zt]+"-"+Ge.quote):De.push("error"))}if(Ge.taskOpen)return De.push("meta"),De.length?De.join(" "):null;if(Ge.taskClosed)return De.push("property"),De.length?De.join(" "):null;if(Ge.linkHref?De.push(Me.linkHref,"url"):(Ge.strong&&De.push(Me.strong),Ge.em&&De.push(Me.em),Ge.strikethrough&&De.push(Me.strikethrough),Ge.emoji&&De.push(Me.emoji),Ge.linkText&&De.push(Me.linkText),Ge.code&&De.push(Me.code),Ge.image&&De.push(Me.image),Ge.imageAltText&&De.push(Me.imageAltText,"link"),Ge.imageMarker&&De.push(Me.imageMarker)),Ge.header&&De.push(Me.header,Me.header+"-"+Ge.header),Ge.quote&&(De.push(Me.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=Ge.quote?De.push(Me.quote+"-"+Ge.quote):De.push(Me.quote+"-"+Fe.maxBlockquoteDepth)),Ge.list!==!1){var In=(Ge.listStack.length-1)%3;In?In===1?De.push(Me.list2):De.push(Me.list3):De.push(Me.list1)}return Ge.trailingSpaceNewLine?De.push("trailing-space-new-line"):Ge.trailingSpace&&De.push("trailing-space-"+(Ge.trailingSpace%2?"a":"b")),De.length?De.join(" "):null}function Ct(Ge,De){if(Ge.match(ht,!0))return Lt(De)}function Bt(Ge,De){var Zt=De.text(Ge,De);if(typeof Zt!="undefined")return Zt;if(De.list)return De.list=null,Lt(De);if(De.taskList){var In=Ge.match(st,!0)[1]===" ";return In?De.taskOpen=!0:De.taskClosed=!0,Fe.highlightFormatting&&(De.formatting="task"),De.taskList=!1,Lt(De)}if(De.taskOpen=!1,De.taskClosed=!1,De.header&&Ge.match(/^#+$/,!0))return Fe.highlightFormatting&&(De.formatting="header"),Lt(De);var fn=Ge.next();if(De.linkTitle){De.linkTitle=!1;var ot=fn;fn==="("&&(ot=")"),ot=(ot+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ft="^\\s*(?:[^"+ot+"\\\\]+|\\\\\\\\|\\\\.)"+ot;if(Ge.match(new RegExp(ft),!0))return Me.linkHref}if(fn==="`"){var Jt=De.formatting;Fe.highlightFormatting&&(De.formatting="code"),Ge.eatWhile("`");var Bn=Ge.current().length;if(De.code==0&&(!De.quote||Bn==1))return De.code=Bn,Lt(De);if(Bn==De.code){var wn=Lt(De);return De.code=0,wn}else return De.formatting=Jt,Lt(De)}else if(De.code)return Lt(De);if(fn==="\\"&&(Ge.next(),Fe.highlightFormatting)){var Nt=Lt(De),Xt=Me.formatting+"-escape";return Nt?Nt+" "+Xt:Xt}if(fn==="!"&&Ge.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return De.imageMarker=!0,De.image=!0,Fe.highlightFormatting&&(De.formatting="image"),Lt(De);if(fn==="["&&De.imageMarker&&Ge.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return De.imageMarker=!1,De.imageAltText=!0,Fe.highlightFormatting&&(De.formatting="image"),Lt(De);if(fn==="]"&&De.imageAltText){Fe.highlightFormatting&&(De.formatting="image");var Nt=Lt(De);return De.imageAltText=!1,De.image=!1,De.inline=De.f=Vt,Nt}if(fn==="["&&!De.image)return De.linkText&&Ge.match(/^.*?\]/)||(De.linkText=!0,Fe.highlightFormatting&&(De.formatting="link")),Lt(De);if(fn==="]"&&De.linkText){Fe.highlightFormatting&&(De.formatting="link");var Nt=Lt(De);return De.linkText=!1,De.inline=De.f=Ge.match(/\(.*?\)| ?\[.*?\]/,!1)?Vt:Bt,Nt}if(fn==="<"&&Ge.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){De.f=De.inline=at,Fe.highlightFormatting&&(De.formatting="link");var Nt=Lt(De);return Nt?Nt+=" ":Nt="",Nt+Me.linkInline}if(fn==="<"&&Ge.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){De.f=De.inline=at,Fe.highlightFormatting&&(De.formatting="link");var Nt=Lt(De);return Nt?Nt+=" ":Nt="",Nt+Me.linkEmail}if(Fe.xml&&fn==="<"&&Ge.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Dn=Ge.string.indexOf(">",Ge.pos);if(Dn!=-1){var Mn=Ge.string.substring(Ge.start,Dn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Mn)&&(De.md_inside=!0)}return Ge.backUp(1),De.htmlState=ce.startState(it),tt(Ge,De,je)}if(Fe.xml&&fn==="<"&&Ge.match(/^\/\w*?>/))return De.md_inside=!1,"tag";if(fn==="*"||fn==="_"){for(var Te=1,de=Ge.pos==1?" ":Ge.string.charAt(Ge.pos-2);Te<3&&Ge.eat(fn);)Te++;var le=Ge.peek()||" ",pe=!/\s/.test(le)&&(!ke.test(le)||/\s/.test(de)||ke.test(de)),he=!/\s/.test(de)&&(!ke.test(de)||/\s/.test(le)||ke.test(le)),oe=null,Ie=null;if(Te%2&&(!De.em&&pe&&(fn==="*"||!he||ke.test(de))?oe=!0:De.em==fn&&he&&(fn==="*"||!pe||ke.test(le))&&(oe=!1)),Te>1&&(!De.strong&&pe&&(fn==="*"||!he||ke.test(de))?Ie=!0:De.strong==fn&&he&&(fn==="*"||!pe||ke.test(le))&&(Ie=!1)),Ie!=null||oe!=null){Fe.highlightFormatting&&(De.formatting=oe==null?"strong":Ie==null?"em":"strong em"),oe===!0&&(De.em=fn),Ie===!0&&(De.strong=fn);var wn=Lt(De);return oe===!1&&(De.em=!1),Ie===!1&&(De.strong=!1),wn}}else if(fn===" "&&(Ge.eat("*")||Ge.eat("_"))){if(Ge.peek()===" ")return Lt(De);Ge.backUp(1)}if(Fe.strikethrough){if(fn==="~"&&Ge.eatWhile(fn)){if(De.strikethrough){Fe.highlightFormatting&&(De.formatting="strikethrough");var wn=Lt(De);return De.strikethrough=!1,wn}else if(Ge.match(/^[^\s]/,!1))return De.strikethrough=!0,Fe.highlightFormatting&&(De.formatting="strikethrough"),Lt(De)}else if(fn===" "&&Ge.match(/^~~/,!0)){if(Ge.peek()===" ")return Lt(De);Ge.backUp(2)}}if(Fe.emoji&&fn===":"&&Ge.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){De.emoji=!0,Fe.highlightFormatting&&(De.formatting="emoji");var Je=Lt(De);return De.emoji=!1,Je}return fn===" "&&(Ge.match(/^ +$/,!1)?De.trailingSpace++:De.trailingSpace&&(De.trailingSpaceNewLine=!0)),Lt(De)}function at(Ge,De){var Zt=Ge.next();if(Zt===">"){De.f=De.inline=Bt,Fe.highlightFormatting&&(De.formatting="link");var In=Lt(De);return In?In+=" ":In="",In+Me.linkInline}return Ge.match(/^[^>]+/,!0),Me.linkInline}function Vt(Ge,De){if(Ge.eatSpace())return null;var Zt=Ge.next();return Zt==="("||Zt==="["?(De.f=De.inline=xn(Zt==="("?")":"]"),Fe.highlightFormatting&&(De.formatting="link-string"),De.linkHref=!0,Lt(De)):"error"}var $t={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function xn(Ge){return function(De,Zt){var In=De.next();if(In===Ge){Zt.f=Zt.inline=Bt,Fe.highlightFormatting&&(Zt.formatting="link-string");var fn=Lt(Zt);return Zt.linkHref=!1,fn}return De.match($t[Ge]),Zt.linkHref=!0,Lt(Zt)}}function dt(Ge,De){return Ge.match(/^([^\]\\]|\\.)*\]:/,!1)?(De.f=on,Ge.next(),Fe.highlightFormatting&&(De.formatting="link"),De.linkText=!0,Lt(De)):jt(Ge,De,Bt)}function on(Ge,De){if(Ge.match(/^\]:/,!0)){De.f=De.inline=En,Fe.highlightFormatting&&(De.formatting="link");var Zt=Lt(De);return De.linkText=!1,Zt}return Ge.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function En(Ge,De){return Ge.eatSpace()?null:(Ge.match(/^[^\s]+/,!0),Ge.peek()===void 0?De.linkTitle=!0:Ge.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),De.f=De.inline=Bt,Me.linkHref+" url")}var yn={startState:function(){return{f:we,prevLine:{stream:null},thisLine:{stream:null},block:we,htmlState:null,indentation:0,inline:Bt,text:Ct,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(Ge){return{f:Ge.f,prevLine:Ge.prevLine,thisLine:Ge.thisLine,block:Ge.block,htmlState:Ge.htmlState&&ce.copyState(it,Ge.htmlState),indentation:Ge.indentation,localMode:Ge.localMode,localState:Ge.localMode?ce.copyState(Ge.localMode,Ge.localState):null,inline:Ge.inline,text:Ge.text,formatting:!1,linkText:Ge.linkText,linkTitle:Ge.linkTitle,linkHref:Ge.linkHref,code:Ge.code,em:Ge.em,strong:Ge.strong,strikethrough:Ge.strikethrough,emoji:Ge.emoji,header:Ge.header,setext:Ge.setext,hr:Ge.hr,taskList:Ge.taskList,list:Ge.list,listStack:Ge.listStack.slice(0),quote:Ge.quote,indentedCode:Ge.indentedCode,trailingSpace:Ge.trailingSpace,trailingSpaceNewLine:Ge.trailingSpaceNewLine,md_inside:Ge.md_inside,fencedEndRE:Ge.fencedEndRE}},token:function(Ge,De){if(De.formatting=!1,Ge!=De.thisLine.stream){if(De.header=0,De.hr=!1,Ge.match(/^\s*$/,!0))return Ee(De),null;if(De.prevLine=De.thisLine,De.thisLine={stream:Ge},De.taskList=!1,De.trailingSpace=0,De.trailingSpaceNewLine=!1,!De.localState&&(De.f=De.block,De.f!=je)){var Zt=Ge.match(/^\s*/,!0)[0].replace(/\t/g,vt).length;if(De.indentation=Zt,De.indentationDiff=null,Zt>0)return null}}return De.f(Ge,De)},innerMode:function(Ge){return Ge.block==je?{state:Ge.htmlState,mode:it}:Ge.localState?{state:Ge.localState,mode:Ge.localMode}:{state:Ge,mode:yn}},indent:function(Ge,De,Zt){return Ge.block==je&&it.indent?it.indent(Ge.htmlState,De,Zt):Ge.localState&&Ge.localMode.indent?Ge.localMode.indent(Ge.localState,De,Zt):ce.Pass},blankLine:Ee,getType:Lt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return yn},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},52539:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){"use strict";ce.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 Ue=0;Ue<ce.modeInfo.length;Ue++){var Fe=ce.modeInfo[Ue];Fe.mimes&&(Fe.mime=Fe.mimes[0])}ce.findModeByMIME=function(it){it=it.toLowerCase();for(var ve=0;ve<ce.modeInfo.length;ve++){var Le=ce.modeInfo[ve];if(Le.mime==it)return Le;if(Le.mimes){for(var Me=0;Me<Le.mimes.length;Me++)if(Le.mimes[Me]==it)return Le}}if(/\+xml$/.test(it))return ce.findModeByMIME("application/xml");if(/\+json$/.test(it))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(it){it=it.toLowerCase();for(var ve=0;ve<ce.modeInfo.length;ve++){var Le=ce.modeInfo[ve];if(Le.ext){for(var Me=0;Me<Le.ext.length;Me++)if(Le.ext[Me]==it)return Le}}},ce.findModeByFileName=function(it){for(var ve=0;ve<ce.modeInfo.length;ve++){var Le=ce.modeInfo[ve];if(Le.file&&Le.file.test(it))return Le}var Me=it.lastIndexOf("."),Se=Me>-1&&it.substring(Me+1,it.length);if(Se)return ce.findModeByExtension(Se)},ce.findModeByName=function(it){it=it.toLowerCase();for(var ve=0;ve<ce.modeInfo.length;ve++){var Le=ce.modeInfo[ve];if(Le.name.toLowerCase()==it)return Le;if(Le.alias){for(var Me=0;Me<Le.alias.length;Me++)if(Le.alias[Me].toLowerCase()==it)return Le}}}})},80785:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){"use strict";ce.defineMode("stex",function(Ue,Fe){"use strict";function it(ht,lt){ht.cmdState.push(lt)}function ve(ht){return ht.cmdState.length>0?ht.cmdState[ht.cmdState.length-1]:null}function Le(ht){var lt=ht.cmdState.pop();lt&&lt.closeBracket()}function Me(ht){for(var lt=ht.cmdState,et=lt.length-1;et>=0;et--){var ke=lt[et];if(ke.name!="DEFAULT")return ke}return{styleIdentifier:function(){return null}}}function Se(ht,lt,et){return function(){this.name=ht,this.bracketNo=0,this.style=lt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var me={};me.importmodule=Se("importmodule","tag",["string","builtin"]),me.documentclass=Se("documentclass","tag",["","atom"]),me.usepackage=Se("usepackage","tag",["atom"]),me.begin=Se("begin","tag",["atom"]),me.end=Se("end","tag",["atom"]),me.label=Se("label","tag",["atom"]),me.ref=Se("ref","tag",["atom"]),me.eqref=Se("eqref","tag",["atom"]),me.cite=Se("cite","tag",["atom"]),me.bibitem=Se("bibitem","tag",["atom"]),me.Bibitem=Se("Bibitem","tag",["atom"]),me.RBibitem=Se("RBibitem","tag",["atom"]),me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Pe(ht,lt){ht.f=lt}function st(ht,lt){var et;if(ht.match(/^\\[a-zA-Z@]+/)){var ke=ht.current().slice(1);return et=me.hasOwnProperty(ke)?me[ke]:me.DEFAULT,et=new et,it(lt,et),Pe(lt,Et),et.style}if(ht.match(/^\\[$&%#{}_]/)||ht.match(/^\\[,;!\/\\]/))return"tag";if(ht.match("\\["))return Pe(lt,function(jt,tt){return Re(jt,tt,"\\]")}),"keyword";if(ht.match("\\("))return Pe(lt,function(jt,tt){return Re(jt,tt,"\\)")}),"keyword";if(ht.match("$$"))return Pe(lt,function(jt,tt){return Re(jt,tt,"$$")}),"keyword";if(ht.match("$"))return Pe(lt,function(jt,tt){return Re(jt,tt,"$")}),"keyword";var vt=ht.next();if(vt=="%")return ht.skipToEnd(),"comment";if(vt=="}"||vt=="]"){if(et=ve(lt),et)et.closeBracket(vt),Pe(lt,Et);else return"error";return"bracket"}else return vt=="{"||vt=="["?(et=me.DEFAULT,et=new et,it(lt,et),"bracket"):/\d/.test(vt)?(ht.eatWhile(/[\w.%]/),"atom"):(ht.eatWhile(/[\w\-_]/),et=Me(lt),et.name=="begin"&&(et.argument=ht.current()),et.styleIdentifier())}function Re(ht,lt,et){if(ht.eatSpace())return null;if(et&&ht.match(et))return Pe(lt,st),"keyword";if(ht.match(/^\\[a-zA-Z@]+/))return"tag";if(ht.match(/^[a-zA-Z]+/))return"variable-2";if(ht.match(/^\\[$&%#{}_]/)||ht.match(/^\\[,;!\/]/)||ht.match(/^[\^_&]/))return"tag";if(ht.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ht.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ke=ht.next();return ke=="{"||ke=="}"||ke=="["||ke=="]"||ke=="("||ke==")"?"bracket":ke=="%"?(ht.skipToEnd(),"comment"):"error"}function Et(ht,lt){var et=ht.peek(),ke;return et=="{"||et=="["?(ke=ve(lt),ke.openBracket(et),ht.eat(et),Pe(lt,st),"bracket"):/[ \t\r]/.test(et)?(ht.eat(et),null):(Pe(lt,st),Le(lt),st(ht,lt))}return{startState:function(){var ht=Fe.inMathMode?function(lt,et){return Re(lt,et)}:st;return{cmdState:[],f:ht}},copyState:function(ht){return{cmdState:ht.cmdState.slice(),f:ht.f}},token:function(ht,lt){return lt.f(ht,lt)},blankLine:function(ht){ht.f=st,ht.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},29589:function(Ln,en,se){(function(ce){ce(se(4631))})(function(ce){"use strict";var Ue={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(it,ve){var Le=it.indentUnit,Me={},Se=ve.htmlMode?Ue:Fe;for(var me in Se)Me[me]=Se[me];for(var me in ve)Me[me]=ve[me];var Pe,st;function Re(at,Vt){function $t(on){return Vt.tokenize=on,on(at,Vt)}var xn=at.next();if(xn=="<")return at.eat("!")?at.eat("[")?at.match("CDATA[")?$t(lt("atom","]]>")):null:at.match("--")?$t(lt("comment","-->")):at.match("DOCTYPE",!0,!0)?(at.eatWhile(/[\w\._\-]/),$t(et(1))):null:at.eat("?")?(at.eatWhile(/[\w\._\-]/),Vt.tokenize=lt("meta","?>"),"meta"):(Pe=at.eat("/")?"closeTag":"openTag",Vt.tokenize=Et,"tag bracket");if(xn=="&"){var dt;return at.eat("#")?at.eat("x")?dt=at.eatWhile(/[a-fA-F\d]/)&&at.eat(";"):dt=at.eatWhile(/[\d]/)&&at.eat(";"):dt=at.eatWhile(/[\w\.\-:]/)&&at.eat(";"),dt?"atom":"error"}else return at.eatWhile(/[^&<]/),null}Re.isInText=!0;function Et(at,Vt){var $t=at.next();if($t==">"||$t=="/"&&at.eat(">"))return Vt.tokenize=Re,Pe=$t==">"?"endTag":"selfcloseTag","tag bracket";if($t=="=")return Pe="equals",null;if($t=="<"){Vt.tokenize=Re,Vt.state=tt,Vt.tagName=Vt.tagStart=null;var xn=Vt.tokenize(at,Vt);return xn?xn+" tag error":"tag error"}else return/[\'\"]/.test($t)?(Vt.tokenize=ht($t),Vt.stringStartCol=at.column(),Vt.tokenize(at,Vt)):(at.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ht(at){var Vt=function($t,xn){for(;!$t.eol();)if($t.next()==at){xn.tokenize=Et;break}return"string"};return Vt.isInAttribute=!0,Vt}function lt(at,Vt){return function($t,xn){for(;!$t.eol();){if($t.match(Vt)){xn.tokenize=Re;break}$t.next()}return at}}function et(at){return function(Vt,$t){for(var xn;(xn=Vt.next())!=null;){if(xn=="<")return $t.tokenize=et(at+1),$t.tokenize(Vt,$t);if(xn==">")if(at==1){$t.tokenize=Re;break}else return $t.tokenize=et(at-1),$t.tokenize(Vt,$t)}return"meta"}}function ke(at,Vt,$t){this.prev=at.context,this.tagName=Vt,this.indent=at.indented,this.startOfLine=$t,(Me.doNotIndent.hasOwnProperty(Vt)||at.context&&at.context.noIndent)&&(this.noIndent=!0)}function vt(at){at.context&&(at.context=at.context.prev)}function jt(at,Vt){for(var $t;;){if(!at.context||($t=at.context.tagName,!Me.contextGrabbers.hasOwnProperty($t)||!Me.contextGrabbers[$t].hasOwnProperty(Vt)))return;vt(at)}}function tt(at,Vt,$t){return at=="openTag"?($t.tagStart=Vt.column(),ut):at=="closeTag"?Ee:tt}function ut(at,Vt,$t){return at=="word"?($t.tagName=Vt.current(),st="tag",Ye):Me.allowMissingTagName&&at=="endTag"?(st="tag bracket",Ye(at,Vt,$t)):(st="error",ut)}function Ee(at,Vt,$t){if(at=="word"){var xn=Vt.current();return $t.context&&$t.context.tagName!=xn&&Me.implicitlyClosed.hasOwnProperty($t.context.tagName)&&vt($t),$t.context&&$t.context.tagName==xn||Me.matchClosing===!1?(st="tag",we):(st="tag error",je)}else return Me.allowMissingTagName&&at=="endTag"?(st="tag bracket",we(at,Vt,$t)):(st="error",je)}function we(at,Vt,$t){return at!="endTag"?(st="error",we):(vt($t),tt)}function je(at,Vt,$t){return st="error",we(at,Vt,$t)}function Ye(at,Vt,$t){if(at=="word")return st="attribute",Lt;if(at=="endTag"||at=="selfcloseTag"){var xn=$t.tagName,dt=$t.tagStart;return $t.tagName=$t.tagStart=null,at=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(xn)?jt($t,xn):(jt($t,xn),$t.context=new ke($t,xn,dt==$t.indented)),tt}return st="error",Ye}function Lt(at,Vt,$t){return at=="equals"?Ct:(Me.allowMissing||(st="error"),Ye(at,Vt,$t))}function Ct(at,Vt,$t){return at=="string"?Bt:at=="word"&&Me.allowUnquoted?(st="string",Ye):(st="error",Ye(at,Vt,$t))}function Bt(at,Vt,$t){return at=="string"?Bt:Ye(at,Vt,$t)}return{startState:function(at){var Vt={tokenize:Re,state:tt,indented:at||0,tagName:null,tagStart:null,context:null};return at!=null&&(Vt.baseIndent=at),Vt},token:function(at,Vt){if(!Vt.tagName&&at.sol()&&(Vt.indented=at.indentation()),at.eatSpace())return null;Pe=null;var $t=Vt.tokenize(at,Vt);return($t||Pe)&&$t!="comment"&&(st=null,Vt.state=Vt.state(Pe||$t,at,Vt),st&&($t=st=="error"?$t+" error":st)),$t},indent:function(at,Vt,$t){var xn=at.context;if(at.tokenize.isInAttribute)return at.tagStart==at.indented?at.stringStartCol+1:at.indented+Le;if(xn&&xn.noIndent)return ce.Pass;if(at.tokenize!=Et&&at.tokenize!=Re)return $t?$t.match(/^(\s*)/)[0].length:0;if(at.tagName)return Me.multilineTagIndentPastTag!==!1?at.tagStart+at.tagName.length+2:at.tagStart+Le*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Vt))return 0;var dt=Vt&&/^<(\/)?([\w_:\.-]*)/.exec(Vt);if(dt&&dt[1])for(;xn;)if(xn.tagName==dt[2]){xn=xn.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(xn.tagName))xn=xn.prev;else break;else if(dt)for(;xn;){var on=Me.contextGrabbers[xn.tagName];if(on&&on.hasOwnProperty(dt[2]))xn=xn.prev;else break}for(;xn&&xn.prev&&!xn.startOfLine;)xn=xn.prev;return xn?xn.indent+Le:at.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(at){at.state==Ct&&(at.state=Ye)},xmlCurrentTag:function(at){return at.tagName?{name:at.tagName,close:at.type=="closeTag"}:null},xmlCurrentContext:function(at){for(var Vt=[],$t=at.context;$t;$t=$t.prev)$t.tagName&&Vt.push($t.tagName);return Vt.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(Ln,en,se){"use strict";se.d(en,{hP:function(){return Mn}});var ce=function(Te,de){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,pe){le.__proto__=pe}||function(le,pe){for(var he in pe)Object.prototype.hasOwnProperty.call(pe,he)&&(le[he]=pe[he])})(Te,de)};function Ue(Te,de){function le(){this.constructor=Te}ce(Te,de),Te.prototype=de===null?Object.create(de):(le.prototype=de.prototype,new le)}function Fe(Te,de,le,pe){return new(le||(le=Promise))(function(he,oe){function Ie(Kt){try{_t(pe.next(Kt))}catch(Ht){oe(Ht)}}function Je(Kt){try{_t(pe.throw(Kt))}catch(Ht){oe(Ht)}}function _t(Kt){var Ht;Kt.done?he(Kt.value):(Ht=Kt.value,Ht instanceof le?Ht:new le(function(Qt){Qt(Ht)})).then(Ie,Je)}_t((pe=pe.apply(Te,de||[])).next())})}function it(Te,de){var le,pe,he,oe,Ie={label:0,sent:function(){if(1&he[0])throw he[1];return he[1]},trys:[],ops:[]};return oe={next:Je(0),throw:Je(1),return:Je(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Je(_t){return function(Kt){return function(Ht){if(le)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(le=1,pe&&(he=2&Ht[0]?pe.return:Ht[0]?pe.throw||((he=pe.return)&&he.call(pe),0):pe.next)&&!(he=he.call(pe,Ht[1])).done)return he;switch(pe=0,he&&(Ht=[2&Ht[0],he.value]),Ht[0]){case 0:case 1:he=Ht;break;case 4:return Ie.label++,{value:Ht[1],done:!1};case 5:Ie.label++,pe=Ht[1],Ht=[0];continue;case 7:Ht=Ie.ops.pop(),Ie.trys.pop();continue;default:if(he=Ie.trys,!((he=he.length>0&&he[he.length-1])||Ht[0]!==6&&Ht[0]!==2)){Ie=0;continue}if(Ht[0]===3&&(!he||Ht[1]>he[0]&&Ht[1]<he[3])){Ie.label=Ht[1];break}if(Ht[0]===6&&Ie.label<he[1]){Ie.label=he[1],he=Ht;break}if(he&&Ie.label<he[2]){Ie.label=he[2],Ie.ops.push(Ht);break}he[2]&&Ie.ops.pop(),Ie.trys.pop();continue}Ht=de.call(Te,Ie)}catch(Qt){Ht=[6,Qt],pe=0}finally{le=he=0}if(5&Ht[0])throw Ht[1];return{value:Ht[0]?Ht[1]:void 0,done:!0}}([_t,Kt])}}}function ve(){for(var Te=0,de=0,le=arguments.length;de<le;de++)Te+=arguments[de].length;var pe=Array(Te),he=0;for(de=0;de<le;de++)for(var oe=arguments[de],Ie=0,Je=oe.length;Ie<Je;Ie++,he++)pe[he]=oe[Ie];return pe}var Le=function(){function Te(){}return Te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Te.setAttributes=function(de,le){for(var pe=0,he=le;pe<he.length;pe++){var oe=he[pe],Ie=oe[0],Je=oe[1];de.setAttribute(Ie,Je)}},Te.createRect=function(de,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","rect");return he.setAttribute("width",de.toString()),he.setAttribute("height",le.toString()),pe&&Te.setAttributes(he,pe),he},Te.createLine=function(de,le,pe,he,oe){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",de.toString()),Ie.setAttribute("y1",le.toString()),Ie.setAttribute("x2",pe.toString()),Ie.setAttribute("y2",he.toString()),oe&&Te.setAttributes(Ie,oe),Ie},Te.createPolygon=function(de,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return pe.setAttribute("points",de),le&&Te.setAttributes(pe,le),pe},Te.createCircle=function(de,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","circle");return pe.setAttribute("cx",(de/2).toString()),pe.setAttribute("cy",(de/2).toString()),pe.setAttribute("r",de.toString()),le&&Te.setAttributes(pe,le),pe},Te.createEllipse=function(de,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return he.setAttribute("cx",(de/2).toString()),he.setAttribute("cy",(le/2).toString()),he.setAttribute("rx",(de/2).toString()),he.setAttribute("ry",(le/2).toString()),pe&&Te.setAttributes(he,pe),he},Te.createGroup=function(de){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return de&&Te.setAttributes(le,de),le},Te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Te.createMarker=function(de,le,pe,he,oe,Ie,Je){var _t=document.createElementNS("http://www.w3.org/2000/svg","marker");return Te.setAttributes(_t,[["id",de],["orient",le],["markerWidth",pe.toString()],["markerHeight",he.toString()],["refX",oe.toString()],["refY",Ie.toString()]]),_t.appendChild(Je),_t},Te.createText=function(de){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),de&&Te.setAttributes(le,de),le},Te.createTSpan=function(de,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return pe.textContent=de,le&&Te.setAttributes(pe,le),pe},Te.createImage=function(de){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return de&&Te.setAttributes(le,de),le},Te.createPoint=function(de,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return pe.x=de,pe.y=le,pe},Te.createPath=function(de,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","path");return pe.setAttribute("d",de),le&&Te.setAttributes(pe,le),pe},Te}(),Me=function(){function Te(){}return Te.addKey=function(de){Te.key=de},Object.defineProperty(Te,"isLicensed",{get:function(){return!!Te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Te.key)},enumerable:!1,configurable:!0}),Te}(),Se=function(){function Te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Te.prototype.rasterize=function(de,le,pe){var he=this;return new Promise(function(oe){var Ie=pe!==void 0?pe:document.createElement("canvas");de===null&&(he.markersOnly=!0,he.naturalSize=!1);var Je=document.createElementNS("http://www.w3.org/2000/svg","svg");Je.setAttribute("xmlns","http://www.w3.org/2000/svg"),Je.setAttribute("width",le.width.baseVal.valueAsString),Je.setAttribute("height",le.height.baseVal.valueAsString),Je.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),Je.innerHTML=le.innerHTML,he.naturalSize===!0?(Je.width.baseVal.value=de.naturalWidth,Je.height.baseVal.value=de.naturalHeight):he.width!==void 0&&he.height!==void 0&&(Je.width.baseVal.value=he.width,Je.height.baseVal.value=he.height),Ie.width=Je.width.baseVal.value,Ie.height=Je.height.baseVal.value;var _t=Je.outerHTML,Kt=Ie.getContext("2d");he.markersOnly!==!0&&Kt.drawImage(de,0,0,Ie.width,Ie.height);var Ht=window.URL,Qt=new Image(Ie.width,Ie.height);Qt.setAttribute("crossOrigin","anonymous");var Gt=new Blob([_t],{type:"image/svg+xml"}),nr=Ht.createObjectURL(Gt);Qt.onload=function(){Kt.drawImage(Qt,0,0),Ht.revokeObjectURL(nr);var gr=Ie.toDataURL(he.imageType,he.imageQuality);oe(gr)},Qt.src=nr})},Te}(),me=function(){},Pe=function(){function Te(de){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+de+"_"}return Object.defineProperty(Te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Te.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(Te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Te.prototype.addClass=function(de){return this.styleSheet===void 0&&this.addStyleSheet(),de.name=""+this.classNamePrefix+de.localName,this.classes.push(de),this.styleSheet.sheet.insertRule("."+de.name+" {"+de.style+"}",this.styleSheet.sheet.cssRules.length),de},Te.prototype.addRule=function(de){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(de),this.styleSheet.sheet.insertRule(de.selector+" {"+de.style+"}",this.styleSheet.sheet.cssRules.length)},Te.prototype.addStyleSheet=function(){var de;this.styleSheet=document.createElement("style"),((de=this.styleSheetRoot)!==null&&de!==void 0?de:document.head).appendChild(this.styleSheet),this.addRule(new st("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Re("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Re("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Te.prototype.removeStyleSheet=function(){var de;this.styleSheet&&(((de=this.styleSheetRoot)!==null&&de!==void 0?de:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Te}(),st=function(Te,de){this.selector=Te,this.style=de},Re=function(Te,de){this.localName=Te,this.style=de},Et=function(){function Te(de,le,pe,he,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=de,this.displayMode=le,this.markerItems=pe,this.uiStyleSettings=he,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Te.prototype.show=function(de){var le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=de,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var pe=document.createElement("div");pe.className=this.toolbarBlockStyleClass.name,pe.style.whiteSpace="nowrap",this.uiContainer.appendChild(pe),this.addActionButton(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(pe,'<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(oe){var Ie=document.createElement("div");Ie.className=""+le.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",oe.typeName),Ie.innerHTML=oe.icon,Ie.addEventListener("click",function(){le.markerToolbarButtonClicked(Ie,oe)}),le.buttons.push(Ie),le.markerButtons.push(Ie)}),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 he=document.createElement("div");he.className=this.toolbarBlockStyleClass.name,he.style.whiteSpace="nowrap",he.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(he),this.addActionButton(he,'<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(he,'<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()},Te.prototype.addButtonClickListener=function(de){this.buttonClickListeners.push(de)},Te.prototype.removeButtonClickListener=function(de){this.buttonClickListeners.indexOf(de)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(de),1)},Te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var de=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var le=0;le<this.markerButtons.length;le++)le<de||le===de&&this.markerButtons.length-1===de?this.markerButtonBlock.appendChild(this.markerButtons[le]):(le===de&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[le]))}},Te.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")},Te.prototype.resetButtonStyles=function(){var de=this;this.buttons.forEach(function(le){le.className=le.className.replace(de.uiStyleSettings.toolbarButtonStyleColorsClassName?de.uiStyleSettings.toolbarButtonStyleColorsClassName:de.toolbarButtonStyleColorsClass.name,"").trim(),le.className=le.className.replace(de.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?de.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:de.toolbarActiveButtonStyleColorsClass.name,"").trim(),le.className+=" "+(de.uiStyleSettings.toolbarButtonStyleColorsClassName?de.uiStyleSettings.toolbarButtonStyleColorsClassName:de.toolbarButtonStyleColorsClass.name)})},Te.prototype.addActionButton=function(de,le,pe){var he=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=le,oe.setAttribute("data-action",pe),oe.addEventListener("click",function(){he.actionToolbarButtonClicked(oe,pe)}),pe){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}de.appendChild(oe),this.buttons.push(oe)},Te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Re("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 Re("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Re("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Re("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 Re("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var de=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Re("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*de)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*de)+`px;
padding: `+de+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Re("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Re("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Te.prototype.markerToolbarButtonClicked=function(de,le){this.setActiveButton(de),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},Te.prototype.actionToolbarButtonClicked=function(de,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Te.prototype.setActiveButton=function(de){this.resetButtonStyles(),de.className=de.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),de.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Te.prototype.setActiveMarkerButton=function(de){var le=this.markerButtons.find(function(pe){return pe.getAttribute("data-type-name")===de});le&&this.setActiveButton(le)},Te.prototype.setCurrentMarker=function(de){var le=this;this.currentMarker=de,this.buttons.filter(function(pe){return/delete|notes/.test(pe.getAttribute("data-action"))}).forEach(function(pe){le.currentMarker===void 0?(pe.style.fillOpacity="0.4",pe.style.pointerEvents="none"):(pe.style.fillOpacity="1",pe.style.pointerEvents="all")})},Te}(),ht=function(){function Te(de,le,pe,he){this.panels=[],this.panelButtons=[],this.markerjsContainer=de,this.displayMode=le,this.uiStyleSettings=pe,this.styles=he,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Te.prototype.addStyles=function(){var de;this.toolboxStyleClass=this.styles.addClass(new Re("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 Re("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Re("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Re("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Re("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 Re("toolbox-panel-row_colors",`
background-color: `+((de=this.uiStyleSettings.toolboxBackgroundColor)!==null&&de!==void 0?de:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Re("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
padding: `+le+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Re("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Re("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new st("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new st("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Te.prototype.show=function(de){var le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=de,this.uiContainer.className=this.toolboxStyleClass.name+" "+((le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Te.prototype.setPanelButtons=function(de){var le,pe,he=this;this.panels=de,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((pe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&pe!==void 0?pe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ie;oe.uiStyleSettings=he.uiStyleSettings;var Je=document.createElement("div");Je.className=he.toolboxButtonStyleClass.name+" "+((Ie=he.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:he.toolboxButtonStyleColorsClass.name),Je.innerHTML=oe.icon,Je.title=oe.title,Je.addEventListener("click",function(){he.panelButtonClick(oe)}),he.panelButtons.push(Je),he.buttonRow.appendChild(Je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Te.prototype.panelButtonClick=function(de){var le=this,pe=-1;if(de!==this.activePanel){pe=this.panels.indexOf(de),this.panelRow.innerHTML="";var he=de.getUi();he.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(he),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=de}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){le.displayMode==="inline"?le.panelRow.style.display="none":le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ie){var Je,_t;oe.className=le.toolboxButtonStyleClass.name+" "+(Ie===pe?""+((Je=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Je!==void 0?Je:le.toolboxActiveButtonStyleColorsClass.name):""+((_t=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:le.toolboxButtonStyleColorsClass.name))})},Te}(),lt=function(Te,de){this.title=Te,this.icon=de},et=function(Te){function de(le,pe,he,oe){var Ie=Te.call(this,le,oe||'<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 Ie.colors=[],Ie.addTransparent=!1,Ie.colorBoxes=[],Ie.colors=pe,Ie.currentColor=he,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.whiteSpace="nowrap",this.colors.forEach(function(he){var oe=le.getColorBox(he);pe.appendChild(oe),le.colorBoxes.push(oe)}),pe},de.prototype.getColorBox=function(le){var pe=this,he=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-he,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=oe-2+"px",Ie.style.height=oe-2+"px",Ie.style.padding="1px",Ie.style.marginRight="2px",Ie.style.marginBottom="2px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderRadius=(oe+2)/2+"px",Ie.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){pe.setCurrentColor(le,Ie)});var Je=document.createElement("div");return Je.style.display="inline-block",Je.style.width=oe-2+"px",Je.style.height=oe-2+"px",Je.style.backgroundColor=le,Je.style.borderRadius=oe/2+"px",le==="transparent"&&(Je.style.fill=this.uiStyleSettings.toolboxAccentColor,Je.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>`),Ie.appendChild(Je),Ie},de.prototype.setCurrentColor=function(le,pe){var he=this;this.currentColor=le,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},de}(lt),ke=function(){function Te(de,le,pe){this._state="new",this._isSelected=!1,this._container=de,this._overlayContainer=le,this.globalSettings=pe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Te.prototype.ownsTarget=function(de){return!1},Object.defineProperty(Te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Te.prototype.pointerDown=function(de,le){},Te.prototype.dblClick=function(de,le){},Te.prototype.manipulate=function(de){},Te.prototype.pointerUp=function(de){this.stateChanged()},Te.prototype.dispose=function(){},Te.prototype.addMarkerVisualToContainer=function(de){this.container.childNodes.length>0?this.container.insertBefore(de,this.container.childNodes[0]):this.container.appendChild(de)},Te.prototype.getState=function(){return{typeName:Te.typeName,state:this.state,notes:this.notes}},Te.prototype.restoreState=function(de){this._state=de.state,this.notes=de.notes},Te.prototype.scale=function(de,le){},Te.prototype.colorChanged=function(de){this.onColorChanged&&this.onColorChanged(de),this.stateChanged()},Te.prototype.fillColorChanged=function(de){this.onFillColorChanged&&this.onFillColorChanged(de),this.stateChanged()},Te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var de=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),de.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(de)&&this.onStateChanged(this)}},Te.typeName="MarkerBase",Te}(),vt=function(){function Te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Te.prototype.findGripByVisual=function(de){return this.topLeft.ownsTarget(de)?this.topLeft:this.topCenter.ownsTarget(de)?this.topCenter:this.topRight.ownsTarget(de)?this.topRight:this.centerLeft.ownsTarget(de)?this.centerLeft:this.centerRight.ownsTarget(de)?this.centerRight:this.bottomLeft.ownsTarget(de)?this.bottomLeft:this.bottomCenter.ownsTarget(de)?this.bottomCenter:this.bottomRight.ownsTarget(de)?this.bottomRight:void 0},Te}(),jt=function(){function Te(){this.GRIP_SIZE=10,this.visual=Le.createGroup(),this.visual.appendChild(Le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Te.prototype.ownsTarget=function(de){return de===this.visual||de===this.visual.childNodes[0]||de===this.visual.childNodes[1]},Te}(),tt=function(){function Te(){}return Te.toITransformMatrix=function(de){return{a:de.a,b:de.b,c:de.c,d:de.d,e:de.e,f:de.f}},Te.toSVGMatrix=function(de,le){return de.a=le.a,de.b=le.b,de.c=le.c,de.d=le.d,de.e=le.e,de.f=le.f,de},Te}(),ut=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(Le.createTransform()),oe.setupControlBox(),oe}return Ue(de,Te),Object.defineProperty(de.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"visual",{get:function(){return this._visual},set:function(le){this._visual=le;var pe=Le.createTransform();this._visual.transform.baseVal.appendItem(pe)},enumerable:!1,configurable:!0}),de.prototype.ownsTarget=function(le){return!!Te.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.left=le.x,this.top=le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var he=this.unrotatePoint(le);if(this.manipulationStartX=he.x,this.manipulationStartY=he.y,this.offsetX=he.x-this.left,this.offsetY=he.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(pe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(pe)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},de.prototype.pointerUp=function(le){var pe=this.state;Te.prototype.pointerUp.call(this,le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(le),this._state="select",pe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},de.prototype.moveVisual=function(le){this.visual.style.transform="translate("+le.x+"px, "+le.y+"px)"},de.prototype.manipulate=function(le){var pe=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(pe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(pe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(pe):this.state==="rotate"&&this.rotate(le)},de.prototype.resize=function(le){var pe=this.manipulationStartLeft,he=this.manipulationStartWidth,oe=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:pe=this.manipulationStartLeft+le.x-this.manipulationStartX,he=this.manipulationStartWidth+this.manipulationStartLeft-pe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:he=this.manipulationStartWidth+le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+le.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+le.y-this.manipulationStartY}he>=0?(this.left=pe,this.width=he):(this.left=pe+he,this.width=-he),Ie>=0?(this.top=oe,this.height=Ie):(this.top=oe+Ie,this.height=-Ie),this.setSize()},de.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},de.prototype.rotate=function(le){if(Math.abs(le.x-this.centerX)>.1){var pe=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*pe,this.applyRotation()}},de.prototype.applyRotation=function(){var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0)},de.prototype.rotatePoint=function(le){if(this.rotationAngle===0)return le;var pe=this.container.getCTM(),he=Le.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},de.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var pe=this.container.getCTM();pe=pe.inverse();var he=Le.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},de.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},de.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},de.prototype.setupControlBox=function(){this.controlBox=Le.createGroup();var le=Le.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=Le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new vt,this.addControlGrips(),this.controlBox.style.display="none"},de.prototype.adjustControlBox=function(){var le=this.controlBox.transform.baseVal.getItem(0);le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(le,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()},de.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()},de.prototype.createGrip=function(){var le=new jt;return le.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(le.visual),le},de.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,pe=-le/2,he=pe,oe=(this.width+this.CB_DISTANCE)/2-le/2,Ie=(this.height+this.CB_DISTANCE)/2-le/2,Je=this.height+this.CB_DISTANCE-le/2,_t=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,pe,he),this.positionGrip(this.controlGrips.topCenter.visual,oe,he),this.positionGrip(this.controlGrips.topRight.visual,_t,he),this.positionGrip(this.controlGrips.centerLeft.visual,pe,Ie),this.positionGrip(this.controlGrips.centerRight.visual,_t,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,pe,Je),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Je),this.positionGrip(this.controlGrips.bottomRight.visual,_t,Je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,he-3*this.CB_DISTANCE)},de.prototype.positionGrip=function(le,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,0)},de.prototype.hideControlBox=function(){this.controlBox.style.display="none"},de.prototype.showControlBox=function(){this.controlBox.style.display=""},de.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:tt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:tt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Te.prototype.getState.call(this))},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var pe=le;this.left=pe.left,this.top=pe.top,this.width=pe.width,this.height=pe.height,this.rotationAngle=pe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,pe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,pe.containerTransformMatrix))},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe);var he=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:he.x*le,y:he.y*pe});this.left=oe.x,this.top=oe.y,this.width=this.width*le,this.height=this.height*pe,this.adjustControlBox()},de}(ke),Ee=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual)},de.prototype.createVisual=function(){this.visual=Le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},de.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le)},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},de.prototype.setSize=function(){Te.prototype.setSize.call(this),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},de.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize()},de.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},de.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},de.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},de.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},de.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this))},de.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.setSize()},de.title="Rectangle marker",de}(ut),we=function(Te){function de(le,pe,he,oe){var Ie=Te.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ie.widths=[],Ie.widthBoxes=[],Ie.widths=pe,Ie.currentWidth=he,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.widths.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentWidth(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.innerText=he.toString(),Ie.style.marginRight="5px",oe.appendChild(Ie);var Je=document.createElement("div");Je.style.minHeight="20px",Je.style.flexGrow="2",Je.style.display="flex",Je.style.alignItems="center";var _t=document.createElement("hr");_t.style.minWidth="20px",_t.style.border="0px",_t.style.borderTop=he+"px solid "+le.uiStyleSettings.toolboxColor,_t.style.flexGrow="2",Je.appendChild(_t),oe.appendChild(Je),le.widthBoxes.push(oe)}),pe},de.prototype.setCurrentWidth=function(le,pe){var he=this;this.currentWidth=le,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},de}(lt),je=function(Te){function de(le,pe,he,oe){var Ie=Te.call(this,le,oe||'<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 Ie.styles=[],Ie.styleBoxes=[],Ie.styles=pe,Ie.currentStyle=he,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.styles.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.styles.length-5+"%",oe.style.borderColor=he===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentStyle(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var Je=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(he!==""?'stroke-dasharray="'+he+'"':"")+` />
</svg>`;Ie.innerHTML=Je,oe.appendChild(Ie),le.styleBoxes.push(oe)}),pe},de.prototype.setCurrentStyle=function(le,pe){var he=this;this.currentStyle=le,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},de}(lt),Ye=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ue(de,Te),Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=de.typeName,le},de.typeName="FrameMarker",de.title="Frame marker",de.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',de}(Ee),Lt=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"},Ct=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!!Te.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.state==="new"&&(this.x1=le.x,this.y1=le.y,this.x2=le.x,this.y2=le.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(pe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(pe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},de.prototype.pointerUp=function(le){var pe=this.state;Te.prototype.pointerUp.call(this,le),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(le),this._state="select",pe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},de.prototype.adjustVisual=function(){},de.prototype.manipulate=function(le){this.state==="creating"?this.resize(le):this.state==="move"?(this.x1=this.manipulationStartX1+le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(le)},de.prototype.resize=function(le){switch(this.activeGrip){case this.grip1:this.x1=le.x,this.y1=le.y;break;case this.grip2:case void 0:this.x2=le.x,this.y2=le.y}this.adjustVisual(),this.adjustControlBox()},de.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},de.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},de.prototype.setupControlBox=function(){this.controlBox=Le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},de.prototype.adjustControlBox=function(){this.positionGrips()},de.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},de.prototype.createGrip=function(){var le=new jt;return le.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(le.visual),le},de.prototype.positionGrips=function(){var le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-le/2,this.y1-le/2),this.positionGrip(this.grip2.visual,this.x2-le/2,this.y2-le/2)},de.prototype.positionGrip=function(le,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,0)},de.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Te.prototype.getState.call(this))},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var pe=le;this.x1=pe.x1,this.y1=pe.y1,this.x2=pe.x2,this.y2=pe.y2},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.x1=this.x1*le,this.y1=this.y1*pe,this.x2=this.x2*le,this.y2=this.y2*pe,this.adjustVisual(),this.adjustControlBox()},de}(ke),Bt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},de.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorLine=Le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},de.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},de.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},de.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},de.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.createVisual(),this.adjustVisual()},de.typeName="LineMarker",de.title="Line marker",de.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',de}(Ct),at=function(Te){function de(le,pe,he,oe){var Ie=Te.call(this,le,oe||'<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 Ie.fonts=[],Ie.fontBoxes=[],Ie.fonts=pe,Ie.currentFont=he,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.flexGrow="2",this.fonts.forEach(function(he){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.fonts.length-5+"%",oe.style.borderColor=he===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentFont(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=he,Ie.style.overflow="hidden";var Je=document.createElement("div");Je.style.whiteSpace="nowrap",Je.style.overflow="hidden",Je.style.textOverflow="ellipsis",Je.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(Je),oe.appendChild(Ie),le.fontBoxes.push(oe)}),pe},de.prototype.setCurrentFont=function(le,pe){var he=this;this.currentFont=le,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},de}(lt),Vt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=he.defaultColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new et("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new at("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){if(Te.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var pe=!1;return this.textElement.childNodes.forEach(function(he){he===le&&(pe=!0)}),pe},de.prototype.createVisual=function(){this.visual=Le.createGroup(),this.bgRectangle=Le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},de.prototype.renderText=function(){var le=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(pe){le.textElement.appendChild(Le.createTSpan(pe.trim()===""?" ":pe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},de.prototype.getTextScale=function(){var le=this.textElement.getBBox(),pe=1;if(le.width>0&&le.height>0){var he=(1*this.width-this.width*this.padding*2/100)/le.width,oe=(1*this.height-this.height*this.padding*2/100)/le.height;pe=Math.min(he,oe)}return pe},de.prototype.getTextPosition=function(le){var pe=this.textElement.getBBox(),he=0,oe=0;return pe.width>0&&pe.height>0&&(he=(this.width-pe.width*le)/2,oe=this.height/2-pe.height*le/2),{x:he,y:oe}},de.prototype.sizeText=function(){var le=this.textElement.getBBox(),pe=this.getTextScale(),he=this.getTextPosition(pe);he.y-=le.y*pe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+he.x+"px, "+he.y+"px) scale("+pe+", "+pe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(he.x,he.y),this.textElement.transform.baseVal.getItem(1).setScale(pe,pe))},de.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},de.prototype.setSize=function(){Te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},de.prototype.pointerUp=function(le){var pe=this.state;pe==="creating"&&(this._suppressMarkerCreateEvent=!0),Te.prototype.pointerUp.call(this,le),this.setSize(),(pe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},de.prototype.showTextEditor=function(){var le=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(pe){pe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var pe=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&pe>.9;)pe-=.1,le.textEditor.style.fontSize=Math.max(pe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(pe){if(pe.clipboardData){var he=pe.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(he)),pe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){le.textEditDivClicked(le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},de.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var le=this.getTextScale(),pe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),he=this.textElement.getBBox(),oe={x:he.width*le,y:he.height*le};pe.x-=oe.x/2,pe.y-=oe.y/2,this.textEditor.style.top=pe.y+"px",this.textEditor.style.left=pe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-pe.x+"px",this.textEditor.style.fontSize=Math.max(16*le,12)+"px",this.textElement.style.display="none"}},de.prototype.textEditDivClicked=function(le){this.text=le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},de.prototype.select=function(){Te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},de.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Te.prototype.deselect.call(this)},de.prototype.dblClick=function(le,pe){Te.prototype.dblClick.call(this,le,pe),this.showTextEditor()},de.prototype.setColor=function(le){this.textElement&&Le.setAttributes(this.textElement,[["fill",le]]),this.color=le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(le)},de.prototype.setFont=function(le){this.textElement&&Le.setAttributes(this.textElement,[["font-family",le]]),this.fontFamily=le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},de.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},de.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){var pe=le;this.color=pe.color,this.fontFamily=pe.fontFamily,this.padding=pe.padding,this.text=pe.text,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.setSize(),this.sizeText(),this.positionTextEditor()},de.typeName="TextMarker",de.title="Text marker",de.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>',de}(ut),$t=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=he.defaultColor,oe.lineWidth=he.defaultStrokeWidth,oe.pixelRatio=he.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new et("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},de.prototype.createVisual=function(){this.visual=Le.createGroup(),this.drawingImage=Le.createImage(),this.visual.appendChild(this.drawingImage);var le=Le.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},de.prototype.pointerDown=function(le,pe){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(le.x,le.y),this.drawing=!0):Te.prototype.pointerDown.call(this,le,pe)},de.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):Te.prototype.manipulate.call(this,le)},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},de.prototype.pointerUp=function(le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Te.prototype.pointerUp.call(this,le)},de.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)},de.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.select.call(this)},de.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.deselect.call(this)},de.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),pe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],he=pe[0],oe=pe[1],Ie=pe[2],Je=pe[3],_t=!1,Kt=0;Kt<this.canvasElement.height;Kt++)for(var Ht=0;Ht<this.canvasElement.width;Ht++)le.data[Kt*this.canvasElement.width*4+4*Ht+3]>0&&(_t=!0,Kt<oe&&(oe=Kt),Ht<he&&(he=Ht),Kt>Je&&(Je=Kt),Ht>Ie&&(Ie=Ht));if(_t){this.left=he/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ie-he)/this.pixelRatio,this.height=(Je-oe)/this.pixelRatio;var Qt=document.createElement("canvas");Qt.width=Ie-he,Qt.height=Je-oe,Qt.getContext("2d").putImageData(this.canvasContext.getImageData(he,oe,Ie-he,Je-oe),0,0),this.drawingImgUrl=Qt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},de.prototype.setDrawingImage=function(){Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},de.prototype.setColor=function(le){this.color=le,this.colorChanged(le)},de.prototype.setLineWidth=function(le){this.lineWidth=le},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({drawingImgUrl:this.drawingImgUrl},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){this.createVisual(),Te.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.setDrawingImage()},de.typeName="FreehandMarker",de.title="Freehand marker",de.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>',de}(ut),xn=function(Te){function de(le,pe,he){var oe=Te.call(this,le,he||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=pe,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2";for(var he=function(Je){var _t="both";switch(Je){case 0:_t="both";break;case 1:_t="start";break;case 2:_t="end";break;case 3:_t="none"}var Kt=document.createElement("div");if(Kt.style.display="flex",Kt.style.flexGrow="2",Kt.style.alignItems="center",Kt.style.justifyContent="space-between",Kt.style.padding="5px",Kt.style.borderWidth="2px",Kt.style.borderStyle="solid",Kt.style.borderColor=_t===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Kt.addEventListener("click",function(){le.setCurrentType(_t,Kt)}),pe.appendChild(Kt),_t==="both"||_t==="start"){var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ht.style.marginLeft="5px",Kt.appendChild(Ht)}var Qt=document.createElement("div");Qt.style.display="flex",Qt.style.alignItems="center",Qt.style.minHeight="20px",Qt.style.flexGrow="2";var Gt=document.createElement("hr");if(Gt.style.minWidth="20px",Gt.style.border="0px",Gt.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Gt.style.flexGrow="2",Qt.appendChild(Gt),Kt.appendChild(Qt),_t==="both"||_t==="end"){var nr=document.createElement("div");nr.style.display="flex",nr.style.alignItems="center",nr.style.minHeight="20px",nr.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,nr.style.marginRight="5px",Kt.appendChild(nr)}oe.typeBoxes.push(Kt)},oe=this,Ie=0;Ie<4;Ie++)he(Ie);return pe},de.prototype.setCurrentType=function(le,pe){var he=this;this.currentType=le,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings!==void 0?he.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},de}(lt),dt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new xn("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},de.prototype.getArrowPoints=function(le,pe){var he=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return le-he/2+","+(pe+oe/2)+" "+le+","+(pe-oe/2)+" "+(le+he/2)+","+(pe+oe/2)},de.prototype.createTips=function(){this.arrow1=Le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow2)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},de.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var le=0;Math.abs(this.x1-this.x2)>.1&&(le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var pe=this.arrow1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(pe,0);var he=this.arrow2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(he,0)}},de.prototype.setArrowType=function(le){this.arrowType=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({arrowType:this.arrowType},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var pe=le;this.arrowType=pe.arrowType,this.createTips(),this.adjustVisual()},de.typeName="ArrowMarker",de.title="Arrow marker",de.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',de}(Bt),on=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.fillColor=he.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new et("Color",he.defaultColorSet,he.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return Ue(de,Te),Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=de.typeName,le},de.typeName="CoverMarker",de.title="Cover marker",de.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',de}(Ee),En=function(Te){function de(le,pe,he,oe){var Ie=Te.call(this,le,oe||'<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 Ie.opacities=[],Ie.opacityBoxes=[],Ie.opacities=pe,Ie.currentOpacity=he,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return Ue(de,Te),de.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",pe.style.justifyContent="space-between",this.opacities.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentOpacity(he,oe)}),pe.appendChild(oe);var Ie=document.createElement("div");Ie.innerText=100*he+"%",oe.appendChild(Ie),le.opacityBoxes.push(oe)}),pe},de.prototype.setCurrentOpacity=function(le,pe){var he=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},de}(lt),yn=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=he.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=he.defaultHighlightOpacity,oe.fillPanel=new et("Color",he.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new En("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Ue(de,Te),de.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=de.typeName,le},de.typeName="HighlightMarker",de.title="Highlight marker",de.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>',de}(on),Ge='<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>',Zt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=he.defaultStrokeColor,oe.bgColor=he.defaultFillColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new et("Text color",he.defaultColorSet,oe.color,Ge),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new et("Fill color",he.defaultColorSet,oe.bgColor,De),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new at("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new jt,oe.tipGrip.visual.transform.baseVal.appendItem(Le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return Te.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},de.prototype.createTip=function(){Le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},de.prototype.pointerDown=function(le,pe){this.state==="new"&&Te.prototype.pointerDown.call(this,le,pe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(pe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Te.prototype.pointerDown.call(this,le,pe)},de.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Te.prototype.pointerUp.call(this,le);else{var pe=this.state==="creating";Te.prototype.pointerUp.call(this,le),this.setTipPoints(pe),this.positionTip()}},de.prototype.manipulate=function(le){if(this.tipMoving){var pe=this.unrotatePoint(le);this.tipPosition={x:pe.x-this.manipulationStartLeft,y:pe.y-this.manipulationStartTop},this.positionTip()}else Te.prototype.manipulate.call(this,le)},de.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(Le.setAttributes(this.bgRectangle,[["fill",le]]),Le.setAttributes(this.tip,[["fill",le]])),this.bgColor=le,this.fillColorChanged(le)},de.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},de.prototype.setTipPoints=function(le){le===void 0&&(le=!1);var pe=Math.min(this.height/2,15),he=this.height/5;le&&(this.tipPosition={x:pe+he/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:0},this.tipBase2Position={x:pe+he,y:0}):(this.tipBase1Position={x:0,y:pe},this.tipBase2Position={x:0,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:0},this.tipBase2Position={x:this.width-pe,y:0}):(this.tipBase1Position={x:this.width,y:pe},this.tipBase2Position={x:this.width,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:this.height},this.tipBase2Position={x:this.width-pe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-pe-he},this.tipBase2Position={x:this.width,y:this.height-pe}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:this.height},this.tipBase2Position={x:pe+he,y:this.height}):(this.tipBase1Position={x:0,y:this.height-pe},this.tipBase2Position={x:0,y:this.height-pe-he})},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.positionTip()},de.prototype.positionTip=function(){Le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var le=this.tipGrip.visual.transform.baseVal.getItem(0);le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(le,0)},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),de.prototype.select=function(){this.positionTip(),Te.prototype.select.call(this)},de.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){var pe=le;this.bgColor=pe.bgColor,this.tipPosition=pe.tipPosition,Te.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*pe},this.positionTip()},de.typeName="CalloutMarker",de.title="Callout marker",de.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>',de}(Vt),In=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new et("Line color",ve(he.defaultColorSet,["transparent"]),he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new et("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,De),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new En("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual)},de.prototype.createVisual=function(){this.visual=Le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},de.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le)},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},de.prototype.setSize=function(){Te.prototype.setSize.call(this),Le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},de.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize()},de.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},de.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},de.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},de.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},de.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.setSize()},de.typeName="EllipseMarker",de.title="Ellipse marker",de.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>',de}(ut),fn=function(Te){function de(le,pe,he){return Te.call(this,le,pe,he)||this}return Ue(de,Te),Object.defineProperty(de.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},de.prototype.createTips=function(){this.tip1=Le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.tip2)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},de.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),pe=this.tip1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(pe,0);var he=this.tip2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(he,0)}},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le),this.createTips(),this.adjustVisual()},de.typeName="MeasurementMarker",de.title="Measurement marker",de.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>',de}(Bt),ot=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.strokePanel.colors=he.defaultColorSet,oe.fillColor="transparent",oe}return Ue(de,Te),Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Te.prototype.getState.call(this);return le.typeName=de.typeName,le},de.typeName="EllipseFrameMarker",de.title="Ellipse frame marker",de.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>',de}(In),ft=function(){function Te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Te.prototype.addUndoStep=function(de){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(de)||(this.undoStack.push(de),JSON.stringify(this.lastRedoStep)!==JSON.stringify(de)&&this.redoStack.splice(0,this.redoStack.length))},Te.prototype.replaceLastUndoStep=function(de){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=de)},Te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Te.prototype.undo=function(){if(this.undoStack.length>1){var de=this.undoStack.pop();return de!==void 0&&this.redoStack.push(de),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Te}(),Jt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new et("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorCurve&&le!==this.visibleCurve&&!this.curveGrip.ownsTarget(le))},de.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},de.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorCurve=Le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=le.x,this.curveY=le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(pe)&&(this.activeGrip=this.curveGrip,this._state="resize")},de.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},de.prototype.setupControlBox=function(){Te.prototype.setupControlBox.call(this),this.curveControlLine1=Le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},de.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Te.prototype.addControlGrips.call(this)},de.prototype.positionGrips=function(){Te.prototype.positionGrips.call(this);var le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-le/2,this.curveY-le/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()))},de.prototype.manipulate=function(le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+le.y-this.manipulationStartY),Te.prototype.manipulate.call(this,le)},de.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),Te.prototype.resize.call(this,le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},de.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},de.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},de.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual()},de.prototype.scale=function(le,pe){this.curveX=this.curveX*le,this.curveY=this.curveY*pe,Te.prototype.scale.call(this,le,pe)},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Te.prototype.getState.call(this));return le.typeName=de.typeName,le},de.prototype.restoreState=function(le){Te.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.curveX=pe.curveX,this.curveY=pe.curveY,this.createVisual(),this.adjustVisual()},de.typeName="CurveMarker",de.title="Curve marker",de.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>',de}(Ct),Bn=function(Te){function de(le,pe,he){var oe=Te.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.textColor=he.defaultStrokeColor,oe.fontFamily=he.defaultFontFamily,oe.fontSize=he.defaultCaptionFontSize,oe.captionText=he.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new et("Line color",ve(he.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new et("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,De),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new we("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new at("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new et("Text color",he.defaultColorSet,oe.textColor,Ge),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return Ue(de,Te),de.prototype.ownsTarget=function(le){return!(!Te.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},de.prototype.createVisual=function(){this.visual=Le.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Le.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Le.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Le.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},de.prototype.setCaptionText=function(le){this.captionText=le,this.captionElement.textContent=this.captionText,this.sizeCaption()},de.prototype.pointerDown=function(le,pe){Te.prototype.pointerDown.call(this,le,pe),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},de.prototype.manipulate=function(le){Te.prototype.manipulate.call(this,le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(le.x-this.pointerDownPoint.x)>5||Math.abs(le.y-this.pointerDownPoint.y)>5)},de.prototype.resize=function(le){Te.prototype.resize.call(this,le),this.setSize()},de.prototype.sizeCaption=function(){var le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=le.width+2*this.PADDING,this.captionBoxHeight=le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Le.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Le.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},de.prototype.showTextEditor=function(){var le=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(pe){pe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(pe){pe.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){le.finishTextEditing(le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){le.finishTextEditing(le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},de.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"))},de.prototype.finishTextEditing=function(le){this.setCaptionText(le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},de.prototype.setFont=function(le){this.captionElement&&Le.setAttributes(this.captionElement,[["font-family",le]]),this.fontFamily=le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},de.prototype.setTextColor=function(le){this.captionElement&&Le.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},de.prototype.setSize=function(){Te.prototype.setSize.call(this),Le.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},de.prototype.pointerUp=function(le){Te.prototype.pointerUp.call(this,le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},de.prototype.dblClick=function(le,pe){Te.prototype.dblClick.call(this,le,pe),this.showTextEditor()},de.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&Le.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},de.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&Le.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},de.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&Le.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},de.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&Le.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(de.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),de.prototype.getState=function(){var le=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},Te.prototype.getState.call(this));return le.typeName=this.typeName,le},de.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.textColor=pe.textColor,this.fontFamily=pe.fontFamily,this.captionText=pe.captionText,this.fontSize=pe.fontSize,this.createVisual(),Te.prototype.restoreState.call(this,le),this.setSize()},de.prototype.scale=function(le,pe){Te.prototype.scale.call(this,le,pe),this.setSize()},de.typeName="CaptionFrameMarker",de.title="Caption frame marker",de.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>',de}(ut),wn=function(){function Te(de,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=de,this.cancelable=le}return Object.defineProperty(Te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Te.prototype.preventDefault=function(){this._defaultPrevented=!0},Te}(),Nt=function(Te){function de(le,pe,he){var oe=Te.call(this,le,!1)||this;return oe.dataUrl=pe,oe.state=he,oe}return Ue(de,Te),de}(wn),Xt=function(Te){function de(le,pe,he){he===void 0&&(he=!1);var oe=Te.call(this,le,he)||this;return oe.marker=pe,oe}return Ue(de,Te),de}(wn),Dn=function(){function Te(){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 Te.prototype.addEventListener=function(de,le){this[de].push(le)},Te.prototype.removeEventListener=function(de,le){var pe=this[de].indexOf(le);pe>-1&&this[de].splice(pe,1)},Te}(),Mn=function(){function Te(de){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Lt,this._isOpen=!1,this.undoRedoManager=new ft,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 Dn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Te.instanceCounter++,this.styles=new Pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=de,this.targetRoot=document.body,this.width=de.clientWidth,this.height=de.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(Te.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ye,$t,dt,Vt,ot,In,yn,Zt,fn,on,Bt,Jt,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ye,$t,dt,Vt,In,yn,Zt]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ye,$t,dt,Vt,yn]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(de){var le=this;this._availableMarkerTypes.splice(0),de.forEach(function(pe){if(typeof pe=="string"){var he=le.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===pe});he!==void 0&&le._availableMarkerTypes.push(he)}else le._availableMarkerTypes.push(pe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(de){this._zoomLevel=de,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(Te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Te.prototype.show=function(){var de=this;this.styles.styleSheetRoot===void 0&&me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(le){return le(new wn(de))})},Te.prototype.render=function(){return Fe(this,void 0,void 0,function(){var de;return it(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(de=new Se).naturalSize=this.renderAtNaturalSize,de.imageType=this.renderImageType,de.imageQuality=this.renderImageQuality,de.markersOnly=this.renderMarkersOnly,de.width=this.renderWidth,de.height=this.renderHeight,[4,de.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return le.sent(),[4,de.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,le.sent()]}})})},Te.prototype.close=function(de){var le=this;if(de===void 0&&(de=!1),this.isOpen){var pe=!1;de||this.eventListeners.beforeclose.forEach(function(he){var oe=new wn(le,!0);he(oe),oe.defaultPrevented&&(pe=!0)}),pe||(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(he){return he(new wn(le))}),this.detachEvents(),this._isOpen=!1)}},Te.prototype.addMarkersToToolbar=function(){for(var de,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];(de=this._availableMarkerTypes).push.apply(de,le)},Te.prototype.addRenderEventListener=function(de){this.addEventListener("render",function(le){de(le.dataUrl,le.state)})},Te.prototype.removeRenderEventListener=function(de){},Te.prototype.addCloseEventListener=function(de){this.addEventListener("close",function(){de()})},Te.prototype.removeCloseEventListener=function(de){},Te.prototype.setupResizeObserver=function(){var de=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){de.resize(de.target.clientWidth,de.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return de.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Te.prototype.onPopupTargetResize=function(){var de=1*this.target.clientWidth/this.target.clientHeight,le=this.editorCanvas.clientWidth/de>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*de:this.editorCanvas.clientWidth,pe=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/de;this.resize(le,pe)},Te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Te.prototype.resize=function(de,le){this._isResizing=!0;var pe=de/this.imageWidth,he=le/this.imageHeight;this.imageWidth=Math.round(de),this.imageHeight=Math.round(le),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(pe,he),this._isResizing=!1},Te.prototype.scaleMarkers=function(de,le){var pe,he=this;this._currentMarker&&this._currentMarker instanceof Vt?this._currentMarker.scale(de,le):(pe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==he._currentMarker&&oe.scale(de,le)}),pe!==void 0&&this.setCurrentMarker(pe)},Te.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"},Te.prototype.setTopLeft=function(){var de=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=de.left-le.left,this.top=de.top-le.top},Te.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)},Te.prototype.addDefs=function(){for(var de,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];this.defs=Le.createDefs(),this.addDefsToImage(),(de=this.defs).append.apply(de,le)},Te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Te.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)},Te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Te.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)},Te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Te.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)},Te.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 de=document.createElement("a");de.href="https://markerjs.com/",de.target="_blank",de.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>',de.title="Powered by marker.js",de.style.display="grid",de.style.alignItems="center",de.style.justifyItems="center",de.style.padding="3px",de.style.width="20px",de.style.height="20px",this.logoUI.appendChild(de),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Te.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")},Te.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"},Te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Te.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 de=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=de+"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 Et(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 ht(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Te.prototype.removeMarker=function(de){this.markerImage.removeChild(de.container),this.markers.indexOf(de)>-1&&this.markers.splice(this.markers.indexOf(de),1),de.dispose()},Te.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())},Te.prototype.toolbarButtonClicked=function(de,le){if(de==="marker"&&le!==void 0)this.createNewMarker(le);else if(de==="action")switch(le){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()}},Te.prototype.deleteSelectedMarker=function(){var de=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(he){var oe=new Xt(de,de._currentMarker,!0);he(oe),oe.defaultPrevented&&(le=!0)}),!le){var pe=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(he){return he(new Xt(de,pe))})}}},Te.prototype.clear=function(){var de=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var Je=new Xt(de,void 0,!0);Ie(Je),Je.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var pe=function(Ie){var Je=he.markers[Ie];he.setCurrentMarker(he.markers[Ie]),he._currentMarker.dispose(),he.markerImage.removeChild(he._currentMarker.container),he.markers.splice(he.markers.indexOf(he._currentMarker),1),he.eventListeners.markerdelete.forEach(function(_t){return _t(new Xt(de,Je))})},he=this,oe=this.markers.length-1;oe>=0;oe--)pe(oe);this.addUndoStep()}},Object.defineProperty(Te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Te.prototype.showNotesEditor=function(){var de;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=(de=this._currentMarker.notes)!==null&&de!==void 0?de:"",this.overlayContainer.appendChild(this.notesArea))},Te.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)},Te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Te.prototype.addUndoStep=function(){var de=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),pe=this.undoRedoManager.getLastUndoStep();if(!pe||pe.width===le.width&&pe.height===le.height){var he=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),he<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new wn(de))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(oe){return oe(new wn(de))})}},Te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Te.prototype.undoStep=function(){var de=this,le=this.undoRedoManager.undo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new wn(de))}))},Te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Te.prototype.redoStep=function(){var de=this,le=this.undoRedoManager.redo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(pe){return pe(new wn(de))}))},Te.prototype.stepZoom=function(){var de=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=de<this.zoomSteps.length-1?this.zoomSteps[de+1]:this.zoomSteps[0]},Te.prototype.panTo=function(de){this.contentDiv.scrollBy({left:this.prevPanPoint.x-de.x,top:this.prevPanPoint.y-de.y}),this.prevPanPoint=de},Te.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var de,le,pe=this;return it(this,function(he){switch(he.label){case 0:return[4,this.render()];case 1:return de=he.sent(),le=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new Nt(pe,de,le))}),this.close(!0),[2]}})})},Te.prototype.getState=function(de){de===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(pe){return le.markers.push(pe.getState())}),le},Te.prototype.restoreState=function(de){var le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);de.markers.forEach(function(pe){var he=le._availableMarkerTypes.find(function(Ie){return Ie.typeName===pe.typeName});if(he!==void 0){var oe=le.addNewMarker(he);oe.restoreState(pe),le.markers.push(oe)}}),de.width&&de.height&&(de.width!==this.imageWidth||de.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/de.width,this.imageHeight/de.height),this.eventListeners.restorestate.forEach(function(pe){return pe(new wn(le))})},Te.prototype.addNewMarker=function(de){var le=Le.createGroup();return this.markerImage.appendChild(le),new de(le,this.overlayContainer,this.settings)},Te.prototype.createNewMarker=function(de){var le,pe=this;(le=typeof de=="string"?this._availableMarkerTypes.find(function(he){return he.typeName===de}):de)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(le),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(le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(he){return he(new Xt(pe,pe._currentMarker))}))},Te.prototype.markerCreated=function(de){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(de),this.setCurrentMarker(de),de instanceof $t&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker($t):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(pe){return pe(new Xt(le,le._currentMarker))})},Te.prototype.colorChanged=function(de){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=de,this.settings.defaultStrokeColor=de)},Te.prototype.fillColorChanged=function(de){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=de)},Te.prototype.markerStateChanged=function(de){var le=this;this.eventListeners.markerchange.forEach(function(pe){return pe(new Xt(le,de))})},Te.prototype.setCurrentMarker=function(de){var le=this;this._currentMarker!==de&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(pe){return pe(new Xt(le,le._currentMarker))})),this._currentMarker=de,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(pe){return pe(new Xt(le,le._currentMarker))}))},Te.prototype.onPointerDown=function(de){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||de.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var le=this.markers.find(function(pe){return pe.ownsTarget(de.target)});le!==void 0?(this.setCurrentMarker(le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(de.clientX,de.clientY),de.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:de.clientX,y:de.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(de.clientX,de.clientY))},Te.prototype.onDblClick=function(de){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(pe){return pe.ownsTarget(de.target)});le!==void 0&&le!==this._currentMarker&&this.setCurrentMarker(le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(de.clientX,de.clientY),de.target):this.setCurrentMarker()}},Te.prototype.onPointerMove=function(de){this.touchPoints!==1&&de.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||de.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(de.clientX,de.clientY)):this.zoomLevel>1&&this.panTo({x:de.clientX,y:de.clientY}))},Te.prototype.onPointerUp=function(de){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(de.clientX,de.clientY)),this.isDragging=!1,this.addUndoStep()},Te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Te.prototype.onKeyUp=function(de){this._currentMarker===void 0||this.notesArea!==void 0||de.key!=="Delete"&&de.key!=="Backspace"||this.deleteSelectedMarker()},Te.prototype.clientToLocalCoordinates=function(de,le){var pe=this.markerImage.getBoundingClientRect();return{x:(de-pe.left)/this.zoomLevel,y:(le-pe.top)/this.zoomLevel}},Te.prototype.onWindowResize=function(){this.positionUI()},Te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var de=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=de+"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()},Te.prototype.addLicenseKey=function(de){Me.addKey(de)},Te.prototype.addEventListener=function(de,le){this.eventListeners.addEventListener(de,le)},Te.prototype.removeEventListener=function(de,le){this.eventListeners.removeEventListener(de,le)},Te.prototype.renderState=function(de){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(de),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Te.prototype.focus=function(){var de=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(le){return le(new wn(de))}))},Te.prototype.blur=function(){var de=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(le){return le(new wn(de))}))},Te.instanceCounter=0,Te}()},95860:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return tt}});var ce=se(87462),Ue=se(1413),Fe=se(4942),it=se(97685),ve=se(45987),Le=se(94184),Me=se.n(Le),Se=se(67294);function me(ut){var Ee=Se.useRef();Ee.current=ut;var we=Se.useCallback(function(){for(var je,Ye=arguments.length,Lt=new Array(Ye),Ct=0;Ct<Ye;Ct++)Lt[Ct]=arguments[Ct];return(je=Ee.current)===null||je===void 0?void 0:je.call.apply(je,[Ee].concat(Lt))},[]);return we}function Pe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var st=Pe()?Se.useLayoutEffect:Se.useEffect,Re=function(Ee,we){var je=Se.useRef(!0);st(function(){return Ee(je.current)},we),st(function(){return je.current=!1,function(){je.current=!0}},[])},Et=function(Ee,we){Re(function(je){if(!je)return Ee()},we)},ht=null;function lt(ut){var Ee=Se.useRef(!1),we=Se.useState(ut),je=(0,it.Z)(we,2),Ye=je[0],Lt=je[1];Se.useEffect(function(){return Ee.current=!1,function(){Ee.current=!0}},[]);function Ct(Bt,at){at&&Ee.current||Lt(Bt)}return[Ye,Ct]}function et(ut){return ut!==void 0}function ke(ut,Ee){var we=Ee||{},je=we.defaultValue,Ye=we.value,Lt=we.onChange,Ct=we.postState,Bt=lt(function(){return et(Ye)?Ye:et(je)?typeof je=="function"?je():je:typeof ut=="function"?ut():ut}),at=(0,it.Z)(Bt,2),Vt=at[0],$t=at[1],xn=Ye!==void 0?Ye:Vt,dt=Ct?Ct(xn):xn,on=me(Lt),En=lt([xn]),yn=(0,it.Z)(En,2),Ge=yn[0],De=yn[1];Et(function(){var In=Ge[0];Vt!==In&&on(Vt,In)},[Ge]),Et(function(){et(Ye)||$t(Ye)},[Ye]);var Zt=me(function(In,fn){$t(In,fn),De([xn],fn)});return[dt,Zt]}var vt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],jt=(0,Se.forwardRef)(function(ut,Ee){var we,je=ut.prefixCls,Ye=je===void 0?"rc-checkbox":je,Lt=ut.className,Ct=ut.style,Bt=ut.checked,at=ut.disabled,Vt=ut.defaultChecked,$t=Vt===void 0?!1:Vt,xn=ut.type,dt=xn===void 0?"checkbox":xn,on=ut.title,En=ut.onChange,yn=(0,ve.Z)(ut,vt),Ge=(0,Se.useRef)(null),De=ke($t,{value:Bt}),Zt=(0,it.Z)(De,2),In=Zt[0],fn=Zt[1];(0,Se.useImperativeHandle)(Ee,function(){return{focus:function(){var Bn;(Bn=Ge.current)===null||Bn===void 0||Bn.focus()},blur:function(){var Bn;(Bn=Ge.current)===null||Bn===void 0||Bn.blur()},input:Ge.current}});var ot=Me()(Ye,Lt,(we={},(0,Fe.Z)(we,"".concat(Ye,"-checked"),In),(0,Fe.Z)(we,"".concat(Ye,"-disabled"),at),we)),ft=function(Bn){at||("checked"in ut||fn(Bn.target.checked),En==null||En({target:(0,Ue.Z)((0,Ue.Z)({},ut),{},{type:dt,checked:Bn.target.checked}),stopPropagation:function(){Bn.stopPropagation()},preventDefault:function(){Bn.preventDefault()},nativeEvent:Bn.nativeEvent}))};return Se.createElement("span",{className:ot,title:on,style:Ct},Se.createElement("input",(0,ce.Z)({},yn,{className:"".concat(Ye,"-input"),ref:Ge,onChange:ft,disabled:at,checked:!!In,type:dt})),Se.createElement("span",{className:"".concat(Ye,"-inner")}))}),tt=jt},26819:function(Ln,en){"use strict";var se;var ce=typeof Symbol=="function"&&Symbol.for,Ue=ce?Symbol.for("react.element"):60103,Fe=ce?Symbol.for("react.portal"):60106,it=ce?Symbol.for("react.fragment"):60107,ve=ce?Symbol.for("react.strict_mode"):60108,Le=ce?Symbol.for("react.profiler"):60114,Me=ce?Symbol.for("react.provider"):60109,Se=ce?Symbol.for("react.context"):60110,me=ce?Symbol.for("react.async_mode"):60111,Pe=ce?Symbol.for("react.concurrent_mode"):60111,st=ce?Symbol.for("react.forward_ref"):60112,Re=ce?Symbol.for("react.suspense"):60113,Et=ce?Symbol.for("react.suspense_list"):60120,ht=ce?Symbol.for("react.memo"):60115,lt=ce?Symbol.for("react.lazy"):60116,et=ce?Symbol.for("react.block"):60121,ke=ce?Symbol.for("react.fundamental"):60117,vt=ce?Symbol.for("react.responder"):60118,jt=ce?Symbol.for("react.scope"):60119;function tt(Ee){if(typeof Ee=="object"&&Ee!==null){var we=Ee.$$typeof;switch(we){case Ue:switch(Ee=Ee.type,Ee){case me:case Pe:case it:case Le:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case Se:case st:case lt:case ht:case Me:return Ee;default:return we}}case Fe:return we}}}function ut(Ee){return tt(Ee)===Pe}se=me,se=Pe,se=Se,se=Me,se=Ue,se=st,se=it,se=lt,se=ht,se=Fe,se=Le,se=ve,se=Re,se=function(Ee){return ut(Ee)||tt(Ee)===me},se=ut,se=function(Ee){return tt(Ee)===Se},se=function(Ee){return tt(Ee)===Me},se=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Ue},se=function(Ee){return tt(Ee)===st},se=function(Ee){return tt(Ee)===it},se=function(Ee){return tt(Ee)===lt},en.isMemo=function(Ee){return tt(Ee)===ht},se=function(Ee){return tt(Ee)===Fe},se=function(Ee){return tt(Ee)===Le},se=function(Ee){return tt(Ee)===ve},se=function(Ee){return tt(Ee)===Re},se=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===it||Ee===Pe||Ee===Le||Ee===ve||Ee===Re||Ee===Et||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===lt||Ee.$$typeof===ht||Ee.$$typeof===Me||Ee.$$typeof===Se||Ee.$$typeof===st||Ee.$$typeof===ke||Ee.$$typeof===vt||Ee.$$typeof===jt||Ee.$$typeof===et)},se=tt},18459:function(Ln,en,se){"use strict";Ln.exports=se(26819)},16651:function(Ln,en){"use strict";var se;var ce=Symbol.for("react.element"),Ue=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),it=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Le=Symbol.for("react.provider"),Me=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(ke){if(typeof ke=="object"&&ke!==null){var vt=ke.$$typeof;switch(vt){case ce:switch(ke=ke.type,ke){case Fe:case ve:case it:case Pe:case st:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case Se:case Me:case me:case Et:case Re:case Le:return ke;default:return vt}}case Ue:return vt}}}se=Me,se=Le,se=ce,se=me,se=Fe,se=Et,se=Re,se=Ue,se=ve,se=it,se=Pe,se=st,se=function(){return!1},se=function(){return!1},se=function(ke){return et(ke)===Me},se=function(ke){return et(ke)===Le},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===ce},se=function(ke){return et(ke)===me},se=function(ke){return et(ke)===Fe},se=function(ke){return et(ke)===Et},se=function(ke){return et(ke)===Re},se=function(ke){return et(ke)===Ue},se=function(ke){return et(ke)===ve},se=function(ke){return et(ke)===it},se=function(ke){return et(ke)===Pe},se=function(ke){return et(ke)===st},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Fe||ke===ve||ke===it||ke===Pe||ke===st||ke===ht||typeof ke=="object"&&ke!==null&&(ke.$$typeof===Et||ke.$$typeof===Re||ke.$$typeof===Le||ke.$$typeof===Me||ke.$$typeof===me||ke.$$typeof===lt||ke.getModuleId!==void 0)},se=et},33993:function(Ln,en,se){"use strict";se(16651)},82523:function(Ln,en){"use strict";var se;var ce=Symbol.for("react.element"),Ue=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),it=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Le=Symbol.for("react.provider"),Me=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(ke){if(typeof ke=="object"&&ke!==null){var vt=ke.$$typeof;switch(vt){case ce:switch(ke=ke.type,ke){case Fe:case ve:case it:case Pe:case st:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case Se:case Me:case me:case Et:case Re:case Le:return ke;default:return vt}}case Ue:return vt}}}se=Me,se=Le,se=ce,se=me,se=Fe,se=Et,se=Re,se=Ue,se=ve,se=it,se=Pe,se=st,se=function(){return!1},se=function(){return!1},se=function(ke){return et(ke)===Me},se=function(ke){return et(ke)===Le},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===ce},se=function(ke){return et(ke)===me},se=function(ke){return et(ke)===Fe},se=function(ke){return et(ke)===Et},se=function(ke){return et(ke)===Re},se=function(ke){return et(ke)===Ue},se=function(ke){return et(ke)===ve},se=function(ke){return et(ke)===it},se=function(ke){return et(ke)===Pe},se=function(ke){return et(ke)===st},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Fe||ke===ve||ke===it||ke===Pe||ke===st||ke===ht||typeof ke=="object"&&ke!==null&&(ke.$$typeof===Et||ke.$$typeof===Re||ke.$$typeof===Le||ke.$$typeof===Me||ke.$$typeof===me||ke.$$typeof===lt||ke.getModuleId!==void 0)},se=et},27183:function(Ln,en,se){"use strict";se(82523)},67656:function(Ln,en,se){"use strict";se.r(en),se.d(en,{BaseInput:function(){return Pe},default:function(){return jt}});var ce=se(87462),Ue=se(1413),Fe=se(4942),it=se(71002),ve=se(94184),Le=se.n(ve),Me=se(67294),Se=se(87887),me=function(ut){var Ee,we,je=ut.inputElement,Ye=ut.prefixCls,Lt=ut.prefix,Ct=ut.suffix,Bt=ut.addonBefore,at=ut.addonAfter,Vt=ut.className,$t=ut.style,xn=ut.disabled,dt=ut.readOnly,on=ut.focused,En=ut.triggerFocus,yn=ut.allowClear,Ge=ut.value,De=ut.handleReset,Zt=ut.hidden,In=ut.classes,fn=ut.classNames,ot=ut.dataAttrs,ft=ut.styles,Jt=ut.components,Bn=(Jt==null?void 0:Jt.affixWrapper)||"span",wn=(Jt==null?void 0:Jt.groupWrapper)||"span",Nt=(Jt==null?void 0:Jt.wrapper)||"span",Xt=(Jt==null?void 0:Jt.groupAddon)||"span",Dn=(0,Me.useRef)(null),Mn=function(Qt){var Gt;(Gt=Dn.current)!==null&&Gt!==void 0&&Gt.contains(Qt.target)&&(En==null||En())},Te=function(){var Qt;if(!yn)return null;var Gt=!xn&&!dt&&Ge,nr="".concat(Ye,"-clear-icon"),gr=(0,it.Z)(yn)==="object"&&yn!==null&&yn!==void 0&&yn.clearIcon?yn.clearIcon:"\u2716";return Me.createElement("span",{onClick:De,onMouseDown:function(pn){return pn.preventDefault()},className:Le()(nr,(Qt={},(0,Fe.Z)(Qt,"".concat(nr,"-hidden"),!Gt),(0,Fe.Z)(Qt,"".concat(nr,"-has-suffix"),!!Ct),Qt)),role:"button",tabIndex:-1},gr)},de=(0,Me.cloneElement)(je,{value:Ge,hidden:Zt,className:Le()((Ee=je.props)===null||Ee===void 0?void 0:Ee.className,!(0,Se.X3)(ut)&&!(0,Se.He)(ut)&&Vt)||null,style:(0,Ue.Z)((0,Ue.Z)({},(we=je.props)===null||we===void 0?void 0:we.style),!(0,Se.X3)(ut)&&!(0,Se.He)(ut)?$t:{})});if((0,Se.X3)(ut)){var le,pe="".concat(Ye,"-affix-wrapper"),he=Le()(pe,(le={},(0,Fe.Z)(le,"".concat(pe,"-disabled"),xn),(0,Fe.Z)(le,"".concat(pe,"-focused"),on),(0,Fe.Z)(le,"".concat(pe,"-readonly"),dt),(0,Fe.Z)(le,"".concat(pe,"-input-with-clear-btn"),Ct&&yn&&Ge),le),!(0,Se.He)(ut)&&Vt,In==null?void 0:In.affixWrapper,fn==null?void 0:fn.affixWrapper),oe=(Ct||yn)&&Me.createElement("span",{className:Le()("".concat(Ye,"-suffix"),fn==null?void 0:fn.suffix),style:ft==null?void 0:ft.suffix},Te(),Ct);de=Me.createElement(Bn,(0,ce.Z)({className:he,style:(0,Ue.Z)((0,Ue.Z)({},(0,Se.He)(ut)?void 0:$t),ft==null?void 0:ft.affixWrapper),hidden:!(0,Se.He)(ut)&&Zt,onClick:Mn},ot==null?void 0:ot.affixWrapper,{ref:Dn}),Lt&&Me.createElement("span",{className:Le()("".concat(Ye,"-prefix"),fn==null?void 0:fn.prefix),style:ft==null?void 0:ft.prefix},Lt),(0,Me.cloneElement)(je,{value:Ge,hidden:null}),oe)}if((0,Se.He)(ut)){var Ie="".concat(Ye,"-group"),Je="".concat(Ie,"-addon"),_t=Le()("".concat(Ye,"-wrapper"),Ie,In==null?void 0:In.wrapper),Kt=Le()("".concat(Ye,"-group-wrapper"),Vt,In==null?void 0:In.group);return Me.createElement(wn,{className:Kt,style:$t,hidden:Zt},Me.createElement(Nt,{className:_t},Bt&&Me.createElement(Xt,{className:Je},Bt),(0,Me.cloneElement)(de,{hidden:null}),at&&Me.createElement(Xt,{className:Je},at)))}return de},Pe=me,st=se(74902),Re=se(97685),Et=se(45987),ht=se(21770),lt=se(98423),et=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ke=(0,Me.forwardRef)(function(tt,ut){var Ee=tt.autoComplete,we=tt.onChange,je=tt.onFocus,Ye=tt.onBlur,Lt=tt.onPressEnter,Ct=tt.onKeyDown,Bt=tt.prefixCls,at=Bt===void 0?"rc-input":Bt,Vt=tt.disabled,$t=tt.htmlSize,xn=tt.className,dt=tt.maxLength,on=tt.suffix,En=tt.showCount,yn=tt.type,Ge=yn===void 0?"text":yn,De=tt.classes,Zt=tt.classNames,In=tt.styles,fn=(0,Et.Z)(tt,et),ot=(0,ht.Z)(tt.defaultValue,{value:tt.value}),ft=(0,Re.Z)(ot,2),Jt=ft[0],Bn=ft[1],wn=(0,Me.useState)(!1),Nt=(0,Re.Z)(wn,2),Xt=Nt[0],Dn=Nt[1],Mn=(0,Me.useRef)(null),Te=function(Kt){Mn.current&&(0,Se.nH)(Mn.current,Kt)};(0,Me.useImperativeHandle)(ut,function(){return{focus:Te,blur:function(){var Kt;(Kt=Mn.current)===null||Kt===void 0||Kt.blur()},setSelectionRange:function(Kt,Ht,Qt){var Gt;(Gt=Mn.current)===null||Gt===void 0||Gt.setSelectionRange(Kt,Ht,Qt)},select:function(){var Kt;(Kt=Mn.current)===null||Kt===void 0||Kt.select()},input:Mn.current}}),(0,Me.useEffect)(function(){Dn(function(_t){return _t&&Vt?!1:_t})},[Vt]);var de=function(Kt){tt.value===void 0&&Bn(Kt.target.value),Mn.current&&(0,Se.rJ)(Mn.current,Kt,we)},le=function(Kt){Lt&&Kt.key==="Enter"&&Lt(Kt),Ct==null||Ct(Kt)},pe=function(Kt){Dn(!0),je==null||je(Kt)},he=function(Kt){Dn(!1),Ye==null||Ye(Kt)},oe=function(Kt){Bn(""),Te(),Mn.current&&(0,Se.rJ)(Mn.current,Kt,we)},Ie=function(){var Kt=(0,lt.Z)(tt,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Me.createElement("input",(0,ce.Z)({autoComplete:Ee},Kt,{onChange:de,onFocus:pe,onBlur:he,onKeyDown:le,className:Le()(at,(0,Fe.Z)({},"".concat(at,"-disabled"),Vt),Zt==null?void 0:Zt.input),style:In==null?void 0:In.input,ref:Mn,size:$t,type:Ge}))},Je=function(){var Kt=Number(dt)>0;if(on||En){var Ht=(0,Se.D7)(Jt),Qt=(0,st.Z)(Ht).length,Gt=(0,it.Z)(En)==="object"?En.formatter({value:Ht,count:Qt,maxLength:dt}):"".concat(Qt).concat(Kt?" / ".concat(dt):"");return Me.createElement(Me.Fragment,null,!!En&&Me.createElement("span",{className:Le()("".concat(at,"-show-count-suffix"),(0,Fe.Z)({},"".concat(at,"-show-count-has-suffix"),!!on),Zt==null?void 0:Zt.count),style:(0,Ue.Z)({},In==null?void 0:In.count)},Gt),on)}return null};return Me.createElement(Pe,(0,ce.Z)({},fn,{prefixCls:at,className:xn,inputElement:Ie(),handleReset:oe,value:(0,Se.D7)(Jt),focused:Xt,triggerFocus:Te,suffix:Je(),disabled:Vt,classes:De,classNames:Zt,styles:In}))}),vt=ke,jt=vt},87887:function(Ln,en,se){"use strict";se.d(en,{D7:function(){return ve},He:function(){return ce},X3:function(){return Ue},nH:function(){return it},rJ:function(){return Fe}});function ce(Le){return!!(Le.addonBefore||Le.addonAfter)}function Ue(Le){return!!(Le.prefix||Le.suffix||Le.allowClear)}function Fe(Le,Me,Se,me){if(Se){var Pe=Me;if(Me.type==="click"){var st=Le.cloneNode(!0);Pe=Object.create(Me,{target:{value:st},currentTarget:{value:st}}),st.value="",Se(Pe);return}if(me!==void 0){Pe=Object.create(Me,{target:{value:Le},currentTarget:{value:Le}}),Le.value=me,Se(Pe);return}Se(Pe)}}function it(Le,Me){if(Le){Le.focus(Me);var Se=Me||{},me=Se.cursor;if(me){var Pe=Le.value.length;switch(me){case"start":Le.setSelectionRange(0,0);break;case"end":Le.setSelectionRange(Pe,Pe);break;default:Le.setSelectionRange(0,Pe)}}}}function ve(Le){return typeof Le=="undefined"||Le===null?"":String(Le)}},78595:function(Ln,en,se){"use strict";se.d(en,{iz:function(){return Xr},ck:function(){return Qr},BW:function(){return Hr},sN:function(){return Qr},Wd:function(){return tn},ZP:function(){return He},Xl:function(){return Gt}});var ce=se(87462),Ue=se(4942),Fe=se(1413),it=se(74902),ve=se(97685),Le=se(45987),Me=se(94184),Se=se.n(Me),me=se(67294),Pe=se(48555);function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Re=st()?me.useLayoutEffect:me.useEffect,Et=function(Ve,ct){var yt=me.useRef(!0);Re(function(){return Ve(yt.current)},ct),Re(function(){return yt.current=!1,function(){yt.current=!0}},[])},ht=function(Ve,ct){Et(function(yt){if(!yt)return Ve()},ct)},lt=Et,et=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ke=void 0;function vt(Ke,Ve){var ct=Ke.prefixCls,yt=Ke.invalidate,kt=Ke.item,sn=Ke.renderItem,dn=Ke.responsive,Gn=Ke.responsiveDisabled,pr=Ke.registerSize,Hn=Ke.itemKey,Cn=Ke.className,gn=Ke.style,Pn=Ke.children,Fn=Ke.display,dr=Ke.order,Xn=Ke.component,Zn=Xn===void 0?"div":Xn,Qn=(0,Le.Z)(Ke,et),Ze=dn&&!Fn;function ze(St){pr(Hn,St)}me.useEffect(function(){return function(){ze(null)}},[]);var xe=sn&&kt!==ke?sn(kt):Pn,Ae;yt||(Ae={opacity:Ze?0:1,height:Ze?0:ke,overflowY:Ze?"hidden":ke,order:dn?dr:ke,pointerEvents:Ze?"none":ke,position:Ze?"absolute":ke});var qe={};Ze&&(qe["aria-hidden"]=!0);var Xe=me.createElement(Zn,(0,ce.Z)({className:Se()(!yt&&ct,Cn),style:(0,Fe.Z)((0,Fe.Z)({},Ae),gn)},qe,Qn,{ref:Ve}),xe);return dn&&(Xe=me.createElement(Pe.Z,{onResize:function(Ft){var Wt=Ft.offsetWidth;ze(Wt)},disabled:Gn},Xe)),Xe}var jt=me.forwardRef(vt);jt.displayName="Item";var tt=jt;function ut(Ke){var Ve=me.useRef();Ve.current=Ke;var ct=me.useCallback(function(){for(var yt,kt=arguments.length,sn=new Array(kt),dn=0;dn<kt;dn++)sn[dn]=arguments[dn];return(yt=Ve.current)===null||yt===void 0?void 0:yt.call.apply(yt,[Ve].concat(sn))},[]);return ct}var Ee=se(73935),we=function(Ve){return+setTimeout(Ve,16)},je=function(Ve){return clearTimeout(Ve)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(we=function(Ve){return window.requestAnimationFrame(Ve)},je=function(Ve){return window.cancelAnimationFrame(Ve)});var Ye=0,Lt=new Map;function Ct(Ke){Lt.delete(Ke)}var Bt=function(Ve){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ye+=1;var yt=Ye;function kt(sn){if(sn===0)Ct(yt),Ve();else{var dn=we(function(){kt(sn-1)});Lt.set(yt,dn)}}return kt(ct),yt};Bt.cancel=function(Ke){var Ve=Lt.get(Ke);return Ct(Ve),je(Ve)};var at=Bt;function Vt(Ke){if(typeof MessageChannel=="undefined")at(Ke);else{var Ve=new MessageChannel;Ve.port1.onmessage=function(){return Ke()},Ve.port2.postMessage(void 0)}}function $t(){var Ke=me.useRef(null),Ve=function(yt){Ke.current||(Ke.current=[],Vt(function(){(0,Ee.unstable_batchedUpdates)(function(){Ke.current.forEach(function(kt){kt()}),Ke.current=null})})),Ke.current.push(yt)};return Ve}function xn(Ke,Ve){var ct=me.useState(Ve),yt=(0,ve.Z)(ct,2),kt=yt[0],sn=yt[1],dn=ut(function(Gn){Ke(function(){sn(Gn)})});return[kt,dn]}var dt=me.createContext(null),on=["component"],En=["className"],yn=["className"],Ge=function(Ve,ct){var yt=me.useContext(dt);if(!yt){var kt=Ve.component,sn=kt===void 0?"div":kt,dn=(0,Le.Z)(Ve,on);return me.createElement(sn,(0,ce.Z)({},dn,{ref:ct}))}var Gn=yt.className,pr=(0,Le.Z)(yt,En),Hn=Ve.className,Cn=(0,Le.Z)(Ve,yn);return me.createElement(dt.Provider,{value:null},me.createElement(tt,(0,ce.Z)({ref:ct,className:Se()(Gn,Hn)},pr,Cn)))},De=me.forwardRef(Ge);De.displayName="RawItem";var Zt=De,In=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],fn="responsive",ot="invalidate";function ft(Ke){return"+ ".concat(Ke.length," ...")}function Jt(Ke,Ve){var ct=Ke.prefixCls,yt=ct===void 0?"rc-overflow":ct,kt=Ke.data,sn=kt===void 0?[]:kt,dn=Ke.renderItem,Gn=Ke.renderRawItem,pr=Ke.itemKey,Hn=Ke.itemWidth,Cn=Hn===void 0?10:Hn,gn=Ke.ssr,Pn=Ke.style,Fn=Ke.className,dr=Ke.maxCount,Xn=Ke.renderRest,Zn=Ke.renderRawRest,Qn=Ke.suffix,Ze=Ke.component,ze=Ze===void 0?"div":Ze,xe=Ke.itemComponent,Ae=Ke.onVisibleChange,qe=(0,Le.Z)(Ke,In),Xe=gn==="full",St=$t(),Ft=xn(St,null),Wt=(0,ve.Z)(Ft,2),an=Wt[0],nn=Wt[1],Ot=an||0,un=xn(St,new Map),hn=(0,ve.Z)(un,2),zn=hn[0],Sn=hn[1],qn=xn(St,0),fr=(0,ve.Z)(qn,2),er=fr[0],mr=fr[1],jn=xn(St,0),ar=(0,ve.Z)(jn,2),Mr=ar[0],Nr=ar[1],rr=xn(St,0),Dr=(0,ve.Z)(rr,2),$r=Dr[0],mi=Dr[1],ri=(0,me.useState)(null),Ur=(0,ve.Z)(ri,2),ui=Ur[0],pi=Ur[1],jr=(0,me.useState)(null),Gr=(0,ve.Z)(jr,2),wr=Gr[0],Fr=Gr[1],Yr=me.useMemo(function(){return wr===null&&Xe?Number.MAX_SAFE_INTEGER:wr||0},[wr,an]),fi=(0,me.useState)(!1),ua=(0,ve.Z)(fi,2),ha=ua[0],Bi=ua[1],$i="".concat(yt,"-item"),ei=Math.max(er,Mr),Wr=dr===fn,Yi=sn.length&&Wr,qr=dr===ot,vr=Yi||typeof dr=="number"&&sn.length>dr,zr=(0,me.useMemo)(function(){var di=sn;return Yi?an===null&&Xe?di=sn:di=sn.slice(0,Math.min(sn.length,Ot/Cn)):typeof dr=="number"&&(di=sn.slice(0,dr)),di},[sn,Cn,an,dr,Yi]),Li=(0,me.useMemo)(function(){return Yi?sn.slice(Yr+1):sn.slice(zr.length)},[sn,zr,Yi,Yr]),yi=(0,me.useCallback)(function(di,Mi){var Qi;return typeof pr=="function"?pr(di):(Qi=pr&&(di==null?void 0:di[pr]))!==null&&Qi!==void 0?Qi:Mi},[pr]),ji=(0,me.useCallback)(dn||function(di){return di},[dn]);function ti(di,Mi,Qi){wr===di&&(Mi===void 0||Mi===ui)||(Fr(di),Qi||(Bi(di<sn.length-1),Ae==null||Ae(di)),Mi!==void 0&&pi(Mi))}function ta(di,Mi){nn(Mi.clientWidth)}function qi(di,Mi){Sn(function(Qi){var pa=new Map(Qi);return Mi===null?pa.delete(di):pa.set(di,Mi),pa})}function Ki(di,Mi){Nr(Mi),mr(Mr)}function Ui(di,Mi){mi(Mi)}function sa(di){return zn.get(yi(zr[di],di))}lt(function(){if(Ot&&typeof ei=="number"&&zr){var di=$r,Mi=zr.length,Qi=Mi-1;if(!Mi){ti(0,null);return}for(var pa=0;pa<Mi;pa+=1){var Ka=sa(pa);if(Xe&&(Ka=Ka||0),Ka===void 0){ti(pa-1,void 0,!0);break}if(di+=Ka,Qi===0&&di<=Ot||pa===Qi-1&&di+sa(Qi)<=Ot){ti(Qi,null);break}else if(di+ei>Ot){ti(pa-1,di-Ka-$r+Mr);break}}Qn&&sa(0)+$r>Ot&&pi(null)}},[Ot,zn,Mr,$r,yi,zr]);var Aa=ha&&!!Li.length,da={};ui!==null&&Yi&&(da={position:"absolute",left:ui,top:0});var Sa={prefixCls:$i,responsive:Yi,component:xe,invalidate:qr},za=Gn?function(di,Mi){var Qi=yi(di,Mi);return me.createElement(dt.Provider,{key:Qi,value:(0,Fe.Z)((0,Fe.Z)({},Sa),{},{order:Mi,item:di,itemKey:Qi,registerSize:qi,display:Mi<=Yr})},Gn(di,Mi))}:function(di,Mi){var Qi=yi(di,Mi);return me.createElement(tt,(0,ce.Z)({},Sa,{order:Mi,key:Qi,item:di,renderItem:ji,itemKey:Qi,registerSize:qi,display:Mi<=Yr}))},ja,Qa={order:Aa?Yr:Number.MAX_SAFE_INTEGER,className:"".concat($i,"-rest"),registerSize:Ki,display:Aa};if(Zn)Zn&&(ja=me.createElement(dt.Provider,{value:(0,Fe.Z)((0,Fe.Z)({},Sa),Qa)},Zn(Li)));else{var Ra=Xn||ft;ja=me.createElement(tt,(0,ce.Z)({},Sa,Qa),typeof Ra=="function"?Ra(Li):Ra)}var la=me.createElement(ze,(0,ce.Z)({className:Se()(!qr&&yt,Fn),style:Pn,ref:Ve},qe),zr.map(za),vr?ja:null,Qn&&me.createElement(tt,(0,ce.Z)({},Sa,{responsive:Wr,responsiveDisabled:!Yi,order:Yr,className:"".concat($i,"-suffix"),registerSize:Ui,display:!0,style:da}),Qn));return Wr&&(la=me.createElement(Pe.Z,{onResize:ta,disabled:!Yi},la)),la}var Bn=me.forwardRef(Jt);Bn.displayName="Overflow",Bn.Item=Zt,Bn.RESPONSIVE=fn,Bn.INVALIDATE=ot;var wn=Bn,Nt=wn,Xt=se(21770),Dn=se(80334),Mn=se(91881),Te=me.createContext(null);function de(Ke,Ve){return Ke===void 0?null:"".concat(Ke,"-").concat(Ve)}function le(Ke){var Ve=me.useContext(Te);return de(Ve,Ke)}var pe=se(56982),he=["children","locked"],oe=me.createContext(null);function Ie(Ke,Ve){var ct=(0,Fe.Z)({},Ke);return Object.keys(Ve).forEach(function(yt){var kt=Ve[yt];kt!==void 0&&(ct[yt]=kt)}),ct}function Je(Ke){var Ve=Ke.children,ct=Ke.locked,yt=(0,Le.Z)(Ke,he),kt=me.useContext(oe),sn=(0,pe.Z)(function(){return Ie(kt,yt)},[kt,yt],function(dn,Gn){return!ct&&(dn[0]!==Gn[0]||!(0,Mn.Z)(dn[1],Gn[1],!0))});return me.createElement(oe.Provider,{value:sn},Ve)}var _t=[],Kt=me.createContext(null);function Ht(){return me.useContext(Kt)}var Qt=me.createContext(_t);function Gt(Ke){var Ve=me.useContext(Qt);return me.useMemo(function(){return Ke!==void 0?[].concat((0,it.Z)(Ve),[Ke]):Ve},[Ve,Ke])}var nr=me.createContext(null),gr=me.createContext({}),Ut=gr,pn=se(15105),ir=se(75164),Lr=function(Ke){if(!Ke)return!1;if(Ke instanceof Element){if(Ke.offsetParent)return!0;if(Ke.getBBox){var Ve=Ke.getBBox(),ct=Ve.width,yt=Ve.height;if(ct||yt)return!0}if(Ke.getBoundingClientRect){var kt=Ke.getBoundingClientRect(),sn=kt.width,dn=kt.height;if(sn||dn)return!0}}return!1};function $n(Ke){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Lr(Ke)){var ct=Ke.nodeName.toLowerCase(),yt=["input","select","textarea","button"].includes(ct)||Ke.isContentEditable||ct==="a"&&!!Ke.getAttribute("href"),kt=Ke.getAttribute("tabindex"),sn=Number(kt),dn=null;return kt&&!Number.isNaN(sn)?dn=sn:yt&&dn===null&&(dn=0),yt&&Ke.disabled&&(dn=null),dn!==null&&(dn>=0||Ve&&dn<0)}return!1}function Cr(Ke){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=(0,it.Z)(Ke.querySelectorAll("*")).filter(function(yt){return $n(yt,Ve)});return $n(Ke,Ve)&&ct.unshift(Ke),ct}var Ii=null;function li(){Ii=document.activeElement}function ci(){Ii=null}function Jr(){if(Ii)try{Ii.focus()}catch(Ke){}}function Di(Ke,Ve){if(Ve.keyCode===9){var ct=Cr(Ke),yt=ct[Ve.shiftKey?0:ct.length-1],kt=yt===document.activeElement||Ke===document.activeElement;if(kt){var sn=ct[Ve.shiftKey?ct.length-1:0];sn.focus(),Ve.preventDefault()}}}var Ei=pn.Z.LEFT,Pi=pn.Z.RIGHT,xr=pn.Z.UP,Pr=pn.Z.DOWN,Gi=pn.Z.ENTER,ma=pn.Z.ESC,ba=pn.Z.HOME,va=pn.Z.END,Vi=[xr,Pr,Ei,Pi];function At(Ke,Ve,ct,yt){var kt,sn,dn,Gn,pr="prev",Hn="next",Cn="children",gn="parent";if(Ke==="inline"&&yt===Gi)return{inlineTrigger:!0};var Pn=(kt={},(0,Ue.Z)(kt,xr,pr),(0,Ue.Z)(kt,Pr,Hn),kt),Fn=(sn={},(0,Ue.Z)(sn,Ei,ct?Hn:pr),(0,Ue.Z)(sn,Pi,ct?pr:Hn),(0,Ue.Z)(sn,Pr,Cn),(0,Ue.Z)(sn,Gi,Cn),sn),dr=(dn={},(0,Ue.Z)(dn,xr,pr),(0,Ue.Z)(dn,Pr,Hn),(0,Ue.Z)(dn,Gi,Cn),(0,Ue.Z)(dn,ma,gn),(0,Ue.Z)(dn,Ei,ct?Cn:gn),(0,Ue.Z)(dn,Pi,ct?gn:Cn),dn),Xn={inline:Pn,horizontal:Fn,vertical:dr,inlineSub:Pn,horizontalSub:dr,verticalSub:dr},Zn=(Gn=Xn["".concat(Ke).concat(Ve?"":"Sub")])===null||Gn===void 0?void 0:Gn[yt];switch(Zn){case pr:return{offset:-1,sibling:!0};case Hn:return{offset:1,sibling:!0};case gn:return{offset:-1,sibling:!1};case Cn:return{offset:1,sibling:!1};default:return null}}function On(Ke){for(var Ve=Ke;Ve;){if(Ve.getAttribute("data-menu-list"))return Ve;Ve=Ve.parentElement}return null}function Pt(Ke,Ve){for(var ct=Ke||document.activeElement;ct;){if(Ve.has(ct))return ct;ct=ct.parentElement}return null}function zt(Ke,Ve){var ct=Cr(Ke,!0);return ct.filter(function(yt){return Ve.has(yt)})}function rn(Ke,Ve,ct){var yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ke)return null;var kt=zt(Ke,Ve),sn=kt.length,dn=kt.findIndex(function(Gn){return ct===Gn});return yt<0?dn===-1?dn=sn-1:dn-=1:yt>0&&(dn+=1),dn=(dn+sn)%sn,kt[dn]}function cn(Ke,Ve,ct,yt,kt,sn,dn,Gn,pr,Hn){var Cn=me.useRef(),gn=me.useRef();gn.current=Ve;var Pn=function(){ir.Z.cancel(Cn.current)};return me.useEffect(function(){return function(){Pn()}},[]),function(Fn){var dr=Fn.which;if([].concat(Vi,[Gi,ma,ba,va]).includes(dr)){var Xn,Zn,Qn,Ze=function(){Xn=new Set,Zn=new Map,Qn=new Map;var hn=sn();return hn.forEach(function(zn){var Sn=document.querySelector("[data-menu-id='".concat(de(yt,zn),"']"));Sn&&(Xn.add(Sn),Qn.set(Sn,zn),Zn.set(zn,Sn))}),Xn};Ze();var ze=Zn.get(Ve),xe=Pt(ze,Xn),Ae=Qn.get(xe),qe=At(Ke,dn(Ae,!0).length===1,ct,dr);if(!qe&&dr!==ba&&dr!==va)return;(Vi.includes(dr)||[ba,va].includes(dr))&&Fn.preventDefault();var Xe=function(hn){if(hn){var zn=hn,Sn=hn.querySelector("a");Sn!=null&&Sn.getAttribute("href")&&(zn=Sn);var qn=Qn.get(hn);Gn(qn),Pn(),Cn.current=(0,ir.Z)(function(){gn.current===qn&&zn.focus()})}};if([ba,va].includes(dr)||qe.sibling||!xe){var St;!xe||Ke==="inline"?St=kt.current:St=On(xe);var Ft,Wt=zt(St,Xn);dr===ba?Ft=Wt[0]:dr===va?Ft=Wt[Wt.length-1]:Ft=rn(St,Xn,xe,qe.offset),Xe(Ft)}else if(qe.inlineTrigger)pr(Ae);else if(qe.offset>0)pr(Ae,!0),Pn(),Cn.current=(0,ir.Z)(function(){Ze();var un=xe.getAttribute("aria-controls"),hn=document.getElementById(un),zn=rn(hn,Xn);Xe(zn)},5);else if(qe.offset<0){var an=dn(Ae,!0),nn=an[an.length-2],Ot=Zn.get(nn);pr(nn,!1),Xe(Ot)}}Hn==null||Hn(Fn)}}function Vn(Ke){Promise.resolve().then(Ke)}var Nn="__RC_UTIL_PATH_SPLIT__",Qe=function(Ve){return Ve.join(Nn)},rt=function(Ve){return Ve.split(Nn)},pt="rc-menu-more";function Rt(){var Ke=me.useState({}),Ve=(0,ve.Z)(Ke,2),ct=Ve[1],yt=(0,me.useRef)(new Map),kt=(0,me.useRef)(new Map),sn=me.useState([]),dn=(0,ve.Z)(sn,2),Gn=dn[0],pr=dn[1],Hn=(0,me.useRef)(0),Cn=(0,me.useRef)(!1),gn=function(){Cn.current||ct({})},Pn=(0,me.useCallback)(function(ze,xe){var Ae=Qe(xe);kt.current.set(Ae,ze),yt.current.set(ze,Ae),Hn.current+=1;var qe=Hn.current;Vn(function(){qe===Hn.current&&gn()})},[]),Fn=(0,me.useCallback)(function(ze,xe){var Ae=Qe(xe);kt.current.delete(Ae),yt.current.delete(ze)},[]),dr=(0,me.useCallback)(function(ze){pr(ze)},[]),Xn=(0,me.useCallback)(function(ze,xe){var Ae=yt.current.get(ze)||"",qe=rt(Ae);return xe&&Gn.includes(qe[0])&&qe.unshift(pt),qe},[Gn]),Zn=(0,me.useCallback)(function(ze,xe){return ze.some(function(Ae){var qe=Xn(Ae,!0);return qe.includes(xe)})},[Xn]),Qn=function(){var xe=(0,it.Z)(yt.current.keys());return Gn.length&&xe.push(pt),xe},Ze=(0,me.useCallback)(function(ze){var xe="".concat(yt.current.get(ze)).concat(Nn),Ae=new Set;return(0,it.Z)(kt.current.keys()).forEach(function(qe){qe.startsWith(xe)&&Ae.add(kt.current.get(qe))}),Ae},[]);return me.useEffect(function(){return function(){Cn.current=!0}},[]),{registerPath:Pn,unregisterPath:Fn,refreshOverflowKeys:dr,isSubPathKey:Zn,getKeyPath:Xn,getKeys:Qn,getSubPathKeys:Ze}}function We(Ke){var Ve=me.useRef(Ke);Ve.current=Ke;var ct=me.useCallback(function(){for(var yt,kt=arguments.length,sn=new Array(kt),dn=0;dn<kt;dn++)sn[dn]=arguments[dn];return(yt=Ve.current)===null||yt===void 0?void 0:yt.call.apply(yt,[Ve].concat(sn))},[]);return Ke?ct:void 0}var mt=Math.random().toFixed(5).toString().slice(2),Dt=0;function gt(Ke){var Ve=(0,Xt.Z)(Ke,{value:Ke}),ct=(0,ve.Z)(Ve,2),yt=ct[0],kt=ct[1];return me.useEffect(function(){Dt+=1;var sn="".concat(mt,"-").concat(Dt);kt("rc-menu-uuid-".concat(sn))},[]),yt}var qt=se(15671),Yt=se(43144),Rn=se(60136),br=se(51630),Wn=se(98423),Jn=se(42550);function or(Ke,Ve,ct,yt){var kt=me.useContext(oe),sn=kt.activeKey,dn=kt.onActive,Gn=kt.onInactive,pr={active:sn===Ke};return Ve||(pr.onMouseEnter=function(Hn){ct==null||ct({key:Ke,domEvent:Hn}),dn(Ke)},pr.onMouseLeave=function(Hn){yt==null||yt({key:Ke,domEvent:Hn}),Gn(Ke)}),pr}function lr(Ke){var Ve=me.useContext(oe),ct=Ve.mode,yt=Ve.rtl,kt=Ve.inlineIndent;if(ct!=="inline")return null;var sn=Ke;return yt?{paddingRight:sn*kt}:{paddingLeft:sn*kt}}function Rr(Ke){var Ve=Ke.icon,ct=Ke.props,yt=Ke.children,kt;return Ve===null||Ve===!1?null:(typeof Ve=="function"?kt=me.createElement(Ve,(0,Fe.Z)({},ct)):typeof Ve!="boolean"&&(kt=Ve),kt||yt||null)}var bn=["item"];function An(Ke){var Ve=Ke.item,ct=(0,Le.Z)(Ke,bn);return Object.defineProperty(ct,"item",{get:function(){return(0,Dn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ve}}),ct}var hi=["title","attribute","elementRef"],xi=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ai=["active"],sr=function(Ke){(0,Rn.Z)(ct,Ke);var Ve=(0,br.Z)(ct);function ct(){return(0,qt.Z)(this,ct),Ve.apply(this,arguments)}return(0,Yt.Z)(ct,[{key:"render",value:function(){var kt=this.props,sn=kt.title,dn=kt.attribute,Gn=kt.elementRef,pr=(0,Le.Z)(kt,hi),Hn=(0,Wn.Z)(pr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Dn.ZP)(!dn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),me.createElement(Nt.Item,(0,ce.Z)({},dn,{title:typeof sn=="string"?sn:void 0},Hn,{ref:Gn}))}}]),ct}(me.Component),vi=me.forwardRef(function(Ke,Ve){var ct,yt=Ke.style,kt=Ke.className,sn=Ke.eventKey,dn=Ke.warnKey,Gn=Ke.disabled,pr=Ke.itemIcon,Hn=Ke.children,Cn=Ke.role,gn=Ke.onMouseEnter,Pn=Ke.onMouseLeave,Fn=Ke.onClick,dr=Ke.onKeyDown,Xn=Ke.onFocus,Zn=(0,Le.Z)(Ke,xi),Qn=le(sn),Ze=me.useContext(oe),ze=Ze.prefixCls,xe=Ze.onItemClick,Ae=Ze.disabled,qe=Ze.overflowDisabled,Xe=Ze.itemIcon,St=Ze.selectedKeys,Ft=Ze.onActive,Wt=me.useContext(Ut),an=Wt._internalRenderMenuItem,nn="".concat(ze,"-item"),Ot=me.useRef(),un=me.useRef(),hn=Ae||Gn,zn=(0,Jn.x1)(Ve,un),Sn=Gt(sn),qn=function(Ur){return{key:sn,keyPath:(0,it.Z)(Sn).reverse(),item:Ot.current,domEvent:Ur}},fr=pr||Xe,er=or(sn,hn,gn,Pn),mr=er.active,jn=(0,Le.Z)(er,ai),ar=St.includes(sn),Mr=lr(Sn.length),Nr=function(Ur){if(!hn){var ui=qn(Ur);Fn==null||Fn(An(ui)),xe(ui)}},rr=function(Ur){if(dr==null||dr(Ur),Ur.which===pn.Z.ENTER){var ui=qn(Ur);Fn==null||Fn(An(ui)),xe(ui)}},Dr=function(Ur){Ft(sn),Xn==null||Xn(Ur)},$r={};Ke.role==="option"&&($r["aria-selected"]=ar);var mi=me.createElement(sr,(0,ce.Z)({ref:Ot,elementRef:zn,role:Cn===null?"none":Cn||"menuitem",tabIndex:Gn?null:-1,"data-menu-id":qe&&Qn?null:Qn},Zn,jn,$r,{component:"li","aria-disabled":Gn,style:(0,Fe.Z)((0,Fe.Z)({},Mr),yt),className:Se()(nn,(ct={},(0,Ue.Z)(ct,"".concat(nn,"-active"),mr),(0,Ue.Z)(ct,"".concat(nn,"-selected"),ar),(0,Ue.Z)(ct,"".concat(nn,"-disabled"),hn),ct),kt),onClick:Nr,onKeyDown:rr,onFocus:Dr}),Hn,me.createElement(Rr,{props:(0,Fe.Z)((0,Fe.Z)({},Ke),{},{isSelected:ar}),icon:fr}));return an&&(mi=an(mi,Ke,{selected:ar})),mi});function ur(Ke,Ve){var ct=Ke.eventKey,yt=Ht(),kt=Gt(ct);return me.useEffect(function(){if(yt)return yt.registerPath(ct,kt),function(){yt.unregisterPath(ct,kt)}},[kt]),yt?null:me.createElement(vi,(0,ce.Z)({},Ke,{ref:Ve}))}var Qr=me.forwardRef(ur),kn=["className","children"],ia=function(Ve,ct){var yt=Ve.className,kt=Ve.children,sn=(0,Le.Z)(Ve,kn),dn=me.useContext(oe),Gn=dn.prefixCls,pr=dn.mode,Hn=dn.rtl;return me.createElement("ul",(0,ce.Z)({className:Se()(Gn,Hn&&"".concat(Gn,"-rtl"),"".concat(Gn,"-sub"),"".concat(Gn,"-").concat(pr==="inline"?"inline":"vertical"),yt),role:"menu"},sn,{"data-menu-list":!0,ref:ct}),kt)},zi=me.forwardRef(ia);zi.displayName="SubMenuList";var Ma=zi,Ji=se(50344);function Zi(Ke,Ve){return(0,Ji.Z)(Ke).map(function(ct,yt){if(me.isValidElement(ct)){var kt,sn,dn=ct.key,Gn=(kt=(sn=ct.props)===null||sn===void 0?void 0:sn.eventKey)!==null&&kt!==void 0?kt:dn,pr=Gn==null;pr&&(Gn="tmp_key-".concat([].concat((0,it.Z)(Ve),[yt]).join("-")));var Hn={key:Gn,eventKey:Gn};return me.cloneElement(ct,Hn)}return ct})}var xa=se(62709),aa={adjustX:1,adjustY:1},Ni={topLeft:{points:["bl","tl"],overflow:aa},topRight:{points:["br","tr"],overflow:aa},bottomLeft:{points:["tl","bl"],overflow:aa},bottomRight:{points:["tr","br"],overflow:aa},leftTop:{points:["tr","tl"],overflow:aa},leftBottom:{points:["br","bl"],overflow:aa},rightTop:{points:["tl","tr"],overflow:aa},rightBottom:{points:["bl","br"],overflow:aa}},fa={topLeft:{points:["bl","tl"],overflow:aa},topRight:{points:["br","tr"],overflow:aa},bottomLeft:{points:["tl","bl"],overflow:aa},bottomRight:{points:["tr","br"],overflow:aa},rightTop:{points:["tr","tl"],overflow:aa},rightBottom:{points:["br","bl"],overflow:aa},leftTop:{points:["tl","tr"],overflow:aa},leftBottom:{points:["bl","br"],overflow:aa}},Ta=null;function ga(Ke,Ve,ct){if(Ve)return Ve;if(ct)return ct[Ke]||ct.other}var Hi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ia(Ke){var Ve=Ke.prefixCls,ct=Ke.visible,yt=Ke.children,kt=Ke.popup,sn=Ke.popupStyle,dn=Ke.popupClassName,Gn=Ke.popupOffset,pr=Ke.disabled,Hn=Ke.mode,Cn=Ke.onVisibleChange,gn=me.useContext(oe),Pn=gn.getPopupContainer,Fn=gn.rtl,dr=gn.subMenuOpenDelay,Xn=gn.subMenuCloseDelay,Zn=gn.builtinPlacements,Qn=gn.triggerSubMenuAction,Ze=gn.forceSubMenuRender,ze=gn.rootClassName,xe=gn.motion,Ae=gn.defaultMotions,qe=me.useState(!1),Xe=(0,ve.Z)(qe,2),St=Xe[0],Ft=Xe[1],Wt=Fn?(0,Fe.Z)((0,Fe.Z)({},fa),Zn):(0,Fe.Z)((0,Fe.Z)({},Ni),Zn),an=Hi[Hn],nn=ga(Hn,xe,Ae),Ot=me.useRef(nn);Hn!=="inline"&&(Ot.current=nn);var un=(0,Fe.Z)((0,Fe.Z)({},Ot.current),{},{leavedClassName:"".concat(Ve,"-hidden"),removeOnLeave:!1,motionAppear:!0}),hn=me.useRef();return me.useEffect(function(){return hn.current=(0,ir.Z)(function(){Ft(ct)}),function(){ir.Z.cancel(hn.current)}},[ct]),me.createElement(xa.Z,{prefixCls:Ve,popupClassName:Se()("".concat(Ve,"-popup"),(0,Ue.Z)({},"".concat(Ve,"-rtl"),Fn),dn,ze),stretch:Hn==="horizontal"?"minWidth":null,getPopupContainer:Pn,builtinPlacements:Wt,popupPlacement:an,popupVisible:St,popup:kt,popupStyle:sn,popupAlign:Gn&&{offset:Gn},action:pr?[]:[Qn],mouseEnterDelay:dr,mouseLeaveDelay:Xn,onPopupVisibleChange:Cn,forceRender:Ze,popupMotion:un,fresh:!0},yt)}var Oa=se(62874);function wa(Ke){var Ve=Ke.id,ct=Ke.open,yt=Ke.keyPath,kt=Ke.children,sn="inline",dn=me.useContext(oe),Gn=dn.prefixCls,pr=dn.forceSubMenuRender,Hn=dn.motion,Cn=dn.defaultMotions,gn=dn.mode,Pn=me.useRef(!1);Pn.current=gn===sn;var Fn=me.useState(!Pn.current),dr=(0,ve.Z)(Fn,2),Xn=dr[0],Zn=dr[1],Qn=Pn.current?ct:!1;me.useEffect(function(){Pn.current&&Zn(!1)},[gn]);var Ze=(0,Fe.Z)({},ga(sn,Hn,Cn));yt.length>1&&(Ze.motionAppear=!1);var ze=Ze.onVisibleChanged;return Ze.onVisibleChanged=function(xe){return!Pn.current&&!xe&&Zn(!0),ze==null?void 0:ze(xe)},Xn?null:me.createElement(Je,{mode:sn,locked:!Pn.current},me.createElement(Oa.Z,(0,ce.Z)({visible:Qn},Ze,{forceRender:pr,removeOnLeave:!1,leavedClassName:"".concat(Gn,"-hidden")}),function(xe){var Ae=xe.className,qe=xe.style;return me.createElement(Ma,{id:Ve,className:Ae,style:qe},kt)}))}var _i=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Mt=["active"],wt=function(Ve){var ct,yt=Ve.style,kt=Ve.className,sn=Ve.title,dn=Ve.eventKey,Gn=Ve.warnKey,pr=Ve.disabled,Hn=Ve.internalPopupClose,Cn=Ve.children,gn=Ve.itemIcon,Pn=Ve.expandIcon,Fn=Ve.popupClassName,dr=Ve.popupOffset,Xn=Ve.popupStyle,Zn=Ve.onClick,Qn=Ve.onMouseEnter,Ze=Ve.onMouseLeave,ze=Ve.onTitleClick,xe=Ve.onTitleMouseEnter,Ae=Ve.onTitleMouseLeave,qe=(0,Le.Z)(Ve,_i),Xe=le(dn),St=me.useContext(oe),Ft=St.prefixCls,Wt=St.mode,an=St.openKeys,nn=St.disabled,Ot=St.overflowDisabled,un=St.activeKey,hn=St.selectedKeys,zn=St.itemIcon,Sn=St.expandIcon,qn=St.onItemClick,fr=St.onOpenChange,er=St.onActive,mr=me.useContext(Ut),jn=mr._internalRenderSubMenuItem,ar=me.useContext(nr),Mr=ar.isSubPathKey,Nr=Gt(),rr="".concat(Ft,"-submenu"),Dr=nn||pr,$r=me.useRef(),mi=me.useRef(),ri=gn!=null?gn:zn,Ur=Pn!=null?Pn:Sn,ui=an.includes(dn),pi=!Ot&&ui,jr=Mr(hn,dn),Gr=or(dn,Dr,xe,Ae),wr=Gr.active,Fr=(0,Le.Z)(Gr,Mt),Yr=me.useState(!1),fi=(0,ve.Z)(Yr,2),ua=fi[0],ha=fi[1],Bi=function(Ui){Dr||ha(Ui)},$i=function(Ui){Bi(!0),Qn==null||Qn({key:dn,domEvent:Ui})},ei=function(Ui){Bi(!1),Ze==null||Ze({key:dn,domEvent:Ui})},Wr=me.useMemo(function(){return wr||(Wt!=="inline"?ua||Mr([un],dn):!1)},[Wt,wr,un,ua,dn,Mr]),Yi=lr(Nr.length),qr=function(Ui){Dr||(ze==null||ze({key:dn,domEvent:Ui}),Wt==="inline"&&fr(dn,!ui))},vr=We(function(Ki){Zn==null||Zn(An(Ki)),qn(Ki)}),zr=function(Ui){Wt!=="inline"&&fr(dn,Ui)},Li=function(){er(dn)},yi=Xe&&"".concat(Xe,"-popup"),ji=me.createElement("div",(0,ce.Z)({role:"menuitem",style:Yi,className:"".concat(rr,"-title"),tabIndex:Dr?null:-1,ref:$r,title:typeof sn=="string"?sn:null,"data-menu-id":Ot&&Xe?null:Xe,"aria-expanded":pi,"aria-haspopup":!0,"aria-controls":yi,"aria-disabled":Dr,onClick:qr,onFocus:Li},Fr),sn,me.createElement(Rr,{icon:Wt!=="horizontal"?Ur:void 0,props:(0,Fe.Z)((0,Fe.Z)({},Ve),{},{isOpen:pi,isSubMenu:!0})},me.createElement("i",{className:"".concat(rr,"-arrow")}))),ti=me.useRef(Wt);if(Wt!=="inline"&&Nr.length>1?ti.current="vertical":ti.current=Wt,!Ot){var ta=ti.current;ji=me.createElement(Ia,{mode:ta,prefixCls:rr,visible:!Hn&&pi&&Wt!=="inline",popupClassName:Fn,popupOffset:dr,popupStyle:Xn,popup:me.createElement(Je,{mode:ta==="horizontal"?"vertical":ta},me.createElement(Ma,{id:yi,ref:mi},Cn)),disabled:Dr,onVisibleChange:zr},ji)}var qi=me.createElement(Nt.Item,(0,ce.Z)({role:"none"},qe,{component:"li",style:yt,className:Se()(rr,"".concat(rr,"-").concat(Wt),kt,(ct={},(0,Ue.Z)(ct,"".concat(rr,"-open"),pi),(0,Ue.Z)(ct,"".concat(rr,"-active"),Wr),(0,Ue.Z)(ct,"".concat(rr,"-selected"),jr),(0,Ue.Z)(ct,"".concat(rr,"-disabled"),Dr),ct)),onMouseEnter:$i,onMouseLeave:ei}),ji,!Ot&&me.createElement(wa,{id:yi,open:pi,keyPath:Nr},Cn));return jn&&(qi=jn(qi,Ve,{selected:jr,active:Wr,open:pi,disabled:Dr})),me.createElement(Je,{onItemClick:vr,mode:Wt==="horizontal"?"vertical":Wt,itemIcon:ri,expandIcon:Ur},qi)};function tn(Ke){var Ve=Ke.eventKey,ct=Ke.children,yt=Gt(Ve),kt=Zi(ct,yt),sn=Ht();me.useEffect(function(){if(sn)return sn.registerPath(Ve,yt),function(){sn.unregisterPath(Ve,yt)}},[yt]);var dn;return sn?dn=kt:dn=me.createElement(wt,Ke,kt),me.createElement(Qt.Provider,{value:yt},dn)}var vn=se(71002),Kn=["className","title","eventKey","children"],Ar=["children"],Tr=function(Ve){var ct=Ve.className,yt=Ve.title,kt=Ve.eventKey,sn=Ve.children,dn=(0,Le.Z)(Ve,Kn),Gn=me.useContext(oe),pr=Gn.prefixCls,Hn="".concat(pr,"-item-group");return me.createElement("li",(0,ce.Z)({role:"presentation"},dn,{onClick:function(gn){return gn.stopPropagation()},className:Se()(Hn,ct)}),me.createElement("div",{role:"presentation",className:"".concat(Hn,"-title"),title:typeof yt=="string"?yt:void 0},yt),me.createElement("ul",{role:"group",className:"".concat(Hn,"-list")},sn))};function Hr(Ke){var Ve=Ke.children,ct=(0,Le.Z)(Ke,Ar),yt=Gt(ct.eventKey),kt=Zi(Ve,yt),sn=Ht();return sn?kt:me.createElement(Tr,(0,Wn.Z)(ct,["warnKey"]),kt)}function Xr(Ke){var Ve=Ke.className,ct=Ke.style,yt=me.useContext(oe),kt=yt.prefixCls,sn=Ht();return sn?null:me.createElement("li",{role:"separator",className:Se()("".concat(kt,"-item-divider"),Ve),style:ct})}var Zr=["label","children","key","type"];function wi(Ke){return(Ke||[]).map(function(Ve,ct){if(Ve&&(0,vn.Z)(Ve)==="object"){var yt=Ve,kt=yt.label,sn=yt.children,dn=yt.key,Gn=yt.type,pr=(0,Le.Z)(yt,Zr),Hn=dn!=null?dn:"tmp-".concat(ct);return sn||Gn==="group"?Gn==="group"?me.createElement(Hr,(0,ce.Z)({key:Hn},pr,{title:kt}),wi(sn)):me.createElement(tn,(0,ce.Z)({key:Hn},pr,{title:kt}),wi(sn)):Gn==="divider"?me.createElement(Xr,(0,ce.Z)({key:Hn},pr)):me.createElement(Qr,(0,ce.Z)({key:Hn},pr),kt)}return null}).filter(function(Ve){return Ve})}function ki(Ke,Ve,ct){var yt=Ke;return Ve&&(yt=wi(Ve)),Zi(yt,ct)}var Ri=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],oa=[],Wi=me.forwardRef(function(Ke,Ve){var ct,yt,kt=Ke,sn=kt.prefixCls,dn=sn===void 0?"rc-menu":sn,Gn=kt.rootClassName,pr=kt.style,Hn=kt.className,Cn=kt.tabIndex,gn=Cn===void 0?0:Cn,Pn=kt.items,Fn=kt.children,dr=kt.direction,Xn=kt.id,Zn=kt.mode,Qn=Zn===void 0?"vertical":Zn,Ze=kt.inlineCollapsed,ze=kt.disabled,xe=kt.disabledOverflow,Ae=kt.subMenuOpenDelay,qe=Ae===void 0?.1:Ae,Xe=kt.subMenuCloseDelay,St=Xe===void 0?.1:Xe,Ft=kt.forceSubMenuRender,Wt=kt.defaultOpenKeys,an=kt.openKeys,nn=kt.activeKey,Ot=kt.defaultActiveFirst,un=kt.selectable,hn=un===void 0?!0:un,zn=kt.multiple,Sn=zn===void 0?!1:zn,qn=kt.defaultSelectedKeys,fr=kt.selectedKeys,er=kt.onSelect,mr=kt.onDeselect,jn=kt.inlineIndent,ar=jn===void 0?24:jn,Mr=kt.motion,Nr=kt.defaultMotions,rr=kt.triggerSubMenuAction,Dr=rr===void 0?"hover":rr,$r=kt.builtinPlacements,mi=kt.itemIcon,ri=kt.expandIcon,Ur=kt.overflowedIndicator,ui=Ur===void 0?"...":Ur,pi=kt.overflowedIndicatorPopupClassName,jr=kt.getPopupContainer,Gr=kt.onClick,wr=kt.onOpenChange,Fr=kt.onKeyDown,Yr=kt.openAnimation,fi=kt.openTransitionName,ua=kt._internalRenderMenuItem,ha=kt._internalRenderSubMenuItem,Bi=(0,Le.Z)(kt,Ri),$i=me.useMemo(function(){return ki(Fn,Pn,oa)},[Fn,Pn]),ei=me.useState(!1),Wr=(0,ve.Z)(ei,2),Yi=Wr[0],qr=Wr[1],vr=me.useRef(),zr=gt(Xn),Li=dr==="rtl",yi=(0,Xt.Z)(Wt,{value:an,postState:function(Ba){return Ba||oa}}),ji=(0,ve.Z)(yi,2),ti=ji[0],ta=ji[1],qi=function(Ba){var no=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function vo(){ta(Ba),wr==null||wr(Ba)}no?(0,Ee.flushSync)(vo):vo()},Ki=me.useState(ti),Ui=(0,ve.Z)(Ki,2),sa=Ui[0],Aa=Ui[1],da=me.useRef(!1),Sa=me.useMemo(function(){return(Qn==="inline"||Qn==="vertical")&&Ze?["vertical",Ze]:[Qn,!1]},[Qn,Ze]),za=(0,ve.Z)(Sa,2),ja=za[0],Qa=za[1],Ra=ja==="inline",la=me.useState(ja),di=(0,ve.Z)(la,2),Mi=di[0],Qi=di[1],pa=me.useState(Qa),Ka=(0,ve.Z)(pa,2),eo=Ka[0],uo=Ka[1];me.useEffect(function(){Qi(ja),uo(Qa),da.current&&(Ra?ta(sa):qi(oa))},[ja,Qa]);var _o=me.useState(0),ko=(0,ve.Z)(_o,2),to=ko[0],Da=ko[1],Br=to>=$i.length-1||Mi!=="horizontal"||xe;me.useEffect(function(){Ra&&Aa(ti)},[ti]),me.useEffect(function(){return da.current=!0,function(){da.current=!1}},[]);var gi=Rt(),ya=gi.registerPath,na=gi.unregisterPath,Va=gi.refreshOverflowKeys,Za=gi.isSubPathKey,Do=gi.getKeyPath,zo=gi.getKeys,as=gi.getSubPathKeys,ea=me.useMemo(function(){return{registerPath:ya,unregisterPath:na}},[ya,na]),_r=me.useMemo(function(){return{isSubPathKey:Za}},[Za]);me.useEffect(function(){Va(Br?oa:$i.slice(to+1).map(function(fo){return fo.key}))},[to,Br]);var Si=(0,Xt.Z)(nn||Ot&&((ct=$i[0])===null||ct===void 0?void 0:ct.key),{value:nn}),Ci=(0,ve.Z)(Si,2),Ai=Ci[0],Ga=Ci[1],Ja=We(function(fo){Ga(fo)}),Ko=We(function(){Ga(void 0)});(0,me.useImperativeHandle)(Ve,function(){return{list:vr.current,focus:function(Ba){var no,vo=Ai!=null?Ai:(no=$i.find(function(xs){return!xs.props.disabled}))===null||no===void 0?void 0:no.key;if(vo){var bo,Wo,So;(bo=vr.current)===null||bo===void 0||(Wo=bo.querySelector("li[data-menu-id='".concat(de(zr,vo),"']")))===null||Wo===void 0||(So=Wo.focus)===null||So===void 0||So.call(Wo,Ba)}}}});var jo=(0,Xt.Z)(qn||[],{value:fr,postState:function(Ba){return Array.isArray(Ba)?Ba:Ba==null?oa:[Ba]}}),us=(0,ve.Z)(jo,2),_a=us[0],Bo=us[1],ds=function(Ba){if(hn){var no=Ba.key,vo=_a.includes(no),bo;Sn?vo?bo=_a.filter(function(So){return So!==no}):bo=[].concat((0,it.Z)(_a),[no]):bo=[no],Bo(bo);var Wo=(0,Fe.Z)((0,Fe.Z)({},Ba),{},{selectedKeys:bo});vo?mr==null||mr(Wo):er==null||er(Wo)}!Sn&&ti.length&&Mi!=="inline"&&qi(oa)},ul=We(function(fo){Gr==null||Gr(An(fo)),ds(fo)}),As=We(function(fo,Ba){var no=ti.filter(function(bo){return bo!==fo});if(Ba)no.push(fo);else if(Mi!=="inline"){var vo=as(fo);no=no.filter(function(bo){return!vo.has(bo)})}(0,Mn.Z)(ti,no,!0)||qi(no,!0)}),ms=function(Ba,no){var vo=no!=null?no:!ti.includes(Ba);As(Ba,vo)},Ho=cn(Mi,Ai,Li,zr,vr,zo,Do,Ga,ms,Fr);me.useEffect(function(){qr(!0)},[]);var Ts=me.useMemo(function(){return{_internalRenderMenuItem:ua,_internalRenderSubMenuItem:ha}},[ua,ha]),Is=Mi!=="horizontal"||xe?$i:$i.map(function(fo,Ba){return me.createElement(Je,{key:fo.key,overflowDisabled:Ba>to},fo)}),qs=me.createElement(Nt,(0,ce.Z)({id:Xn,ref:vr,prefixCls:"".concat(dn,"-overflow"),component:"ul",itemComponent:Qr,className:Se()(dn,"".concat(dn,"-root"),"".concat(dn,"-").concat(Mi),Hn,(yt={},(0,Ue.Z)(yt,"".concat(dn,"-inline-collapsed"),eo),(0,Ue.Z)(yt,"".concat(dn,"-rtl"),Li),yt),Gn),dir:dr,style:pr,role:"menu",tabIndex:gn,data:Is,renderRawItem:function(Ba){return Ba},renderRawRest:function(Ba){var no=Ba.length,vo=no?$i.slice(-no):null;return me.createElement(tn,{eventKey:pt,title:ui,disabled:Br,internalPopupClose:no===0,popupClassName:pi},vo)},maxCount:Mi!=="horizontal"||xe?Nt.INVALIDATE:Nt.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ba){Da(Ba)},onKeyDown:Ho},Bi));return me.createElement(Ut.Provider,{value:Ts},me.createElement(Te.Provider,{value:zr},me.createElement(Je,{prefixCls:dn,rootClassName:Gn,mode:Mi,openKeys:ti,rtl:Li,disabled:ze,motion:Yi?Mr:null,defaultMotions:Yi?Nr:null,activeKey:Ai,onActive:Ja,onInactive:Ko,selectedKeys:_a,inlineIndent:ar,subMenuOpenDelay:qe,subMenuCloseDelay:St,forceSubMenuRender:Ft,builtinPlacements:$r,triggerSubMenuAction:Dr,getPopupContainer:jr,itemIcon:mi,expandIcon:ri,onItemClick:ul,onOpenChange:As},me.createElement(nr.Provider,{value:_r},qs),me.createElement("div",{style:{display:"none"},"aria-hidden":!0},me.createElement(Kt.Provider,{value:ea},$i)))))}),Xi=Wi,Oe=Xi;Oe.Item=Qr,Oe.SubMenu=tn,Oe.ItemGroup=Hr,Oe.Divider=Xr;var He=Oe},66680:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ue}});var ce=se(67294);function Ue(Fe){var it=ce.useRef();it.current=Fe;var ve=ce.useCallback(function(){for(var Le,Me=arguments.length,Se=new Array(Me),me=0;me<Me;me++)Se[me]=arguments[me];return(Le=it.current)===null||Le===void 0?void 0:Le.call.apply(Le,[it].concat(Se))},[]);return ve}},21770:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Le}});var ce=se(97685),Ue=se(66680),Fe=se(8410),it=se(63896);function ve(Me){return Me!==void 0}function Le(Me,Se){var me=Se||{},Pe=me.defaultValue,st=me.value,Re=me.onChange,Et=me.postState,ht=(0,it.Z)(function(){return ve(st)?st:ve(Pe)?typeof Pe=="function"?Pe():Pe:typeof Me=="function"?Me():Me}),lt=(0,ce.Z)(ht,2),et=lt[0],ke=lt[1],vt=st!==void 0?st:et,jt=Et?Et(vt):vt,tt=(0,Ue.Z)(Re),ut=(0,it.Z)([vt]),Ee=(0,ce.Z)(ut,2),we=Ee[0],je=Ee[1];(0,Fe.o)(function(){var Lt=we[0];et!==Lt&&tt(et,Lt)},[we]),(0,Fe.o)(function(){ve(st)||ke(st)},[st]);var Ye=(0,Ue.Z)(function(Lt,Ct){ke(Lt,Ct),je([vt],Ct)});return[jt,Ye]}},91881:function(Ln,en,se){"use strict";var ce=se(71002),Ue=se(80334);function Fe(it,ve){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Me=new Set;function Se(me,Pe){var st=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Re=Me.has(me);if((0,Ue.ZP)(!Re,"Warning: There may be circular references"),Re)return!1;if(me===Pe)return!0;if(Le&&st>1)return!1;Me.add(me);var Et=st+1;if(Array.isArray(me)){if(!Array.isArray(Pe)||me.length!==Pe.length)return!1;for(var ht=0;ht<me.length;ht++)if(!Se(me[ht],Pe[ht],Et))return!1;return!0}if(me&&Pe&&(0,ce.Z)(me)==="object"&&(0,ce.Z)(Pe)==="object"){var lt=Object.keys(me);return lt.length!==Object.keys(Pe).length?!1:lt.every(function(et){return Se(me[et],Pe[et],Et)})}return!1}return Se(it,ve)}en.Z=Fe},98423:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Ue}});var ce=se(1413);function Ue(Fe,it){var ve=(0,ce.Z)({},Fe);return Array.isArray(it)&&it.forEach(function(Le){delete ve[Le]}),ve}},73299:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Vi}});var ce=se(87462),Ue=se(1413),Fe=se(71002),it=se(97685),ve=se(4942),Le=se(45987),Me=se(67294),Se=se(73935),me=se(94184),Pe=se.n(me),st=se(48555),Re=Me.forwardRef(function(At,On){var Pt=At.height,zt=At.offsetY,rn=At.offsetX,cn=At.children,Vn=At.prefixCls,Nn=At.onInnerResize,Qe=At.innerProps,rt=At.rtl,pt=At.extra,Rt={},We={display:"flex",flexDirection:"column"};if(zt!==void 0){var mt;Rt={height:Pt,position:"relative",overflow:"hidden"},We=(0,Ue.Z)((0,Ue.Z)({},We),{},(mt={transform:"translateY(".concat(zt,"px)")},(0,ve.Z)(mt,rt?"marginRight":"marginLeft",-rn),(0,ve.Z)(mt,"position","absolute"),(0,ve.Z)(mt,"left",0),(0,ve.Z)(mt,"right",0),(0,ve.Z)(mt,"top",0),mt))}return Me.createElement("div",{style:Rt},Me.createElement(st.Z,{onResize:function(gt){var qt=gt.offsetHeight;qt&&Nn&&Nn()}},Me.createElement("div",(0,ce.Z)({style:We,className:Pe()((0,ve.Z)({},"".concat(Vn,"-holder-inner"),Vn)),ref:On},Qe),cn,pt)))});Re.displayName="Filler";var Et=Re,ht=function(On){return+setTimeout(On,16)},lt=function(On){return clearTimeout(On)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ht=function(On){return window.requestAnimationFrame(On)},lt=function(On){return window.cancelAnimationFrame(On)});var et=0,ke=new Map;function vt(At){ke.delete(At)}var jt=function(On){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;et+=1;var zt=et;function rn(cn){if(cn===0)vt(zt),On();else{var Vn=ht(function(){rn(cn-1)});ke.set(zt,Vn)}}return rn(Pt),zt};jt.cancel=function(At){var On=ke.get(At);return vt(On),lt(On)};var tt=jt;function ut(At,On){var Pt="touches"in At?At.touches[0]:At;return Pt[On?"pageX":"pageY"]}var Ee=Me.forwardRef(function(At,On){var Pt,zt=At.prefixCls,rn=At.rtl,cn=At.scrollOffset,Vn=At.scrollRange,Nn=At.onStartMove,Qe=At.onStopMove,rt=At.onScroll,pt=At.horizontal,Rt=At.spinSize,We=At.containerSize,mt=At.style,Dt=At.thumbStyle,gt=Me.useState(!1),qt=(0,it.Z)(gt,2),Yt=qt[0],Rn=qt[1],br=Me.useState(null),Wn=(0,it.Z)(br,2),Jn=Wn[0],or=Wn[1],lr=Me.useState(null),Rr=(0,it.Z)(lr,2),bn=Rr[0],An=Rr[1],hi=!rn,xi=Me.useRef(),ai=Me.useRef(),sr=Me.useState(!1),vi=(0,it.Z)(sr,2),ur=vi[0],Qr=vi[1],kn=Me.useRef(),ia=function(){clearTimeout(kn.current),Qr(!0),kn.current=setTimeout(function(){Qr(!1)},3e3)},zi=Vn-We||0,Ma=We-Rt||0,Ji=zi>0,Zi=Me.useMemo(function(){if(cn===0||zi===0)return 0;var Oa=cn/zi;return Oa*Ma},[cn,zi,Ma]),xa=function(wa){wa.stopPropagation(),wa.preventDefault()},aa=Me.useRef({top:Zi,dragging:Yt,pageY:Jn,startTop:bn});aa.current={top:Zi,dragging:Yt,pageY:Jn,startTop:bn};var Ni=function(wa){Rn(!0),or(ut(wa,pt)),An(aa.current.top),Nn(),wa.stopPropagation(),wa.preventDefault()};Me.useEffect(function(){var Oa=function(wt){wt.preventDefault()},wa=xi.current,_i=ai.current;return wa.addEventListener("touchstart",Oa),_i.addEventListener("touchstart",Ni),function(){wa.removeEventListener("touchstart",Oa),_i.removeEventListener("touchstart",Ni)}},[]);var fa=Me.useRef();fa.current=zi;var Ta=Me.useRef();Ta.current=Ma,Me.useEffect(function(){if(Yt){var Oa,wa=function(wt){var tn=aa.current,vn=tn.dragging,Kn=tn.pageY,Ar=tn.startTop;if(tt.cancel(Oa),vn){var Tr=ut(wt,pt)-Kn,Hr=Ar;!hi&&pt?Hr-=Tr:Hr+=Tr;var Xr=fa.current,Zr=Ta.current,wi=Zr?Hr/Zr:0,ki=Math.ceil(wi*Xr);ki=Math.max(ki,0),ki=Math.min(ki,Xr),Oa=tt(function(){rt(ki,pt)})}},_i=function(){Rn(!1),Qe()};return window.addEventListener("mousemove",wa),window.addEventListener("touchmove",wa),window.addEventListener("mouseup",_i),window.addEventListener("touchend",_i),function(){window.removeEventListener("mousemove",wa),window.removeEventListener("touchmove",wa),window.removeEventListener("mouseup",_i),window.removeEventListener("touchend",_i),tt.cancel(Oa)}}},[Yt]),Me.useEffect(function(){ia()},[cn]),Me.useImperativeHandle(On,function(){return{delayHidden:ia}});var ga="".concat(zt,"-scrollbar"),Hi={position:"absolute",visibility:ur&&Ji?null:"hidden"},Ia={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return pt?(Hi.height=8,Hi.left=0,Hi.right=0,Hi.bottom=0,Ia.height="100%",Ia.width=Rt,hi?Ia.left=Zi:Ia.right=Zi):(Hi.width=8,Hi.top=0,Hi.bottom=0,hi?Hi.right=0:Hi.left=0,Ia.width="100%",Ia.height=Rt,Ia.top=Zi),Me.createElement("div",{ref:xi,className:Pe()(ga,(Pt={},(0,ve.Z)(Pt,"".concat(ga,"-horizontal"),pt),(0,ve.Z)(Pt,"".concat(ga,"-vertical"),!pt),(0,ve.Z)(Pt,"".concat(ga,"-visible"),ur),Pt)),style:(0,Ue.Z)((0,Ue.Z)({},Hi),mt),onMouseDown:xa,onMouseMove:ia},Me.createElement("div",{ref:ai,className:Pe()("".concat(ga,"-thumb"),(0,ve.Z)({},"".concat(ga,"-thumb-moving"),Yt)),style:(0,Ue.Z)((0,Ue.Z)({},Ia),Dt),onMouseDown:Ni}))}),we=Ee;function je(At){var On=At.children,Pt=At.setRef,zt=Me.useCallback(function(rn){Pt(rn)},[]);return Me.cloneElement(On,{ref:zt})}function Ye(At,On,Pt,zt,rn,cn,Vn){var Nn=Vn.getKey;return At.slice(On,Pt+1).map(function(Qe,rt){var pt=On+rt,Rt=cn(Qe,pt,{style:{width:zt}}),We=Nn(Qe);return Me.createElement(je,{key:We,setRef:function(Dt){return rn(Qe,Dt)}},Rt)})}function Lt(At){return At instanceof HTMLElement||At instanceof SVGElement}function Ct(At){return Lt(At)?At:At instanceof Me.Component?Se.findDOMNode(At):null}var Bt=se(15671),at=se(43144),Vt=function(){function At(){(0,Bt.Z)(this,At),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,at.Z)(At,[{key:"set",value:function(Pt,zt){this.maps[Pt]=zt,this.id+=1}},{key:"get",value:function(Pt){return this.maps[Pt]}}]),At}(),$t=Vt;function xn(At,On,Pt){var zt=Me.useState(0),rn=(0,it.Z)(zt,2),cn=rn[0],Vn=rn[1],Nn=(0,Me.useRef)(new Map),Qe=(0,Me.useRef)(new $t),rt=(0,Me.useRef)();function pt(){tt.cancel(rt.current)}function Rt(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pt();var Dt=function(){Nn.current.forEach(function(qt,Yt){if(qt&&qt.offsetParent){var Rn=Ct(qt),br=Rn.offsetHeight;Qe.current.get(Yt)!==br&&Qe.current.set(Yt,Rn.offsetHeight)}}),Vn(function(qt){return qt+1})};mt?Dt():rt.current=tt(Dt)}function We(mt,Dt){var gt=At(mt),qt=Nn.current.get(gt);Dt?(Nn.current.set(gt,Dt),Rt()):Nn.current.delete(gt),!qt!=!Dt&&(Dt?On==null||On(mt):Pt==null||Pt(mt))}return(0,Me.useEffect)(function(){return pt},[]),[We,Rt,Qe.current,cn]}function dt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var on=dt()?Me.useLayoutEffect:Me.useEffect,En=function(On,Pt){var zt=Me.useRef(!0);on(function(){return On(zt.current)},Pt),on(function(){return zt.current=!1,function(){zt.current=!0}},[])},yn=function(On,Pt){En(function(zt){if(!zt)return On()},Pt)},Ge=En;function De(At){var On=Me.useRef();On.current=At;var Pt=Me.useCallback(function(){for(var zt,rn=arguments.length,cn=new Array(rn),Vn=0;Vn<rn;Vn++)cn[Vn]=arguments[Vn];return(zt=On.current)===null||zt===void 0?void 0:zt.call.apply(zt,[On].concat(cn))},[]);return Pt}function Zt(At){var On=React.useRef(!1),Pt=React.useState(At),zt=_slicedToArray(Pt,2),rn=zt[0],cn=zt[1];React.useEffect(function(){return On.current=!1,function(){On.current=!0}},[]);function Vn(Nn,Qe){Qe&&On.current||cn(Nn)}return[rn,Vn]}function In(At){return At!==void 0}function fn(At,On){var Pt=On||{},zt=Pt.defaultValue,rn=Pt.value,cn=Pt.onChange,Vn=Pt.postState,Nn=useState(function(){return In(rn)?rn:In(zt)?typeof zt=="function"?zt():zt:typeof At=="function"?At():At}),Qe=_slicedToArray(Nn,2),rt=Qe[0],pt=Qe[1],Rt=rn!==void 0?rn:rt,We=Vn?Vn(Rt):Rt,mt=useEvent(cn),Dt=useState([Rt]),gt=_slicedToArray(Dt,2),qt=gt[0],Yt=gt[1];useLayoutUpdateEffect(function(){var br=qt[0];rt!==br&&mt(rt,br)},[qt]),useLayoutUpdateEffect(function(){In(rn)||pt(rn)},[rn]);var Rn=useEvent(function(br,Wn){pt(br,Wn),Yt([Rt],Wn)});return[We,Rn]}var ot=se(31461);function ft(At,On,Pt){var zt=React.useRef({});return(!("value"in zt.current)||Pt(zt.current.condition,On))&&(zt.current.value=At(),zt.current.condition=On),zt.current.value}function Jt(At,On){typeof At=="function"?At(On):_typeof(At)==="object"&&At&&"current"in At&&(At.current=On)}function Bn(){for(var At=arguments.length,On=new Array(At),Pt=0;Pt<At;Pt++)On[Pt]=arguments[Pt];var zt=On.filter(function(rn){return rn});return zt.length<=1?zt[0]:function(rn){On.forEach(function(cn){Jt(cn,rn)})}}function wn(){for(var At=arguments.length,On=new Array(At),Pt=0;Pt<At;Pt++)On[Pt]=arguments[Pt];return useMemo(function(){return Bn.apply(void 0,On)},On,function(zt,rn){return zt.length!==rn.length||zt.every(function(cn,Vn){return cn!==rn[Vn]})})}function Nt(At){var On,Pt,zt=isMemo(At)?At.type.type:At.type;return!(typeof zt=="function"&&!((On=zt.prototype)!==null&&On!==void 0&&On.render)||typeof At=="function"&&!((Pt=At.prototype)!==null&&Pt!==void 0&&Pt.render))}function Xt(At){return!isValidElement(At)||isFragment(At)?!1:Nt(At)}function Dn(At,On,Pt,zt){if(!On.length)return Pt;var rn=_toArray(On),cn=rn[0],Vn=rn.slice(1),Nn;return!At&&typeof cn=="number"?Nn=[]:Array.isArray(At)?Nn=_toConsumableArray(At):Nn=_objectSpread({},At),zt&&Pt===void 0&&Vn.length===1?delete Nn[cn][Vn[0]]:Nn[cn]=Dn(Nn[cn],Vn,Pt,zt),Nn}function Mn(At,On,Pt){var zt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return On.length&&zt&&Pt===void 0&&!get(At,On.slice(0,-1))?At:Dn(At,On,Pt,zt)}function Te(At){return _typeof(At)==="object"&&At!==null&&Object.getPrototypeOf(At)===Object.prototype}function de(At){return Array.isArray(At)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function pe(){for(var At=arguments.length,On=new Array(At),Pt=0;Pt<At;Pt++)On[Pt]=arguments[Pt];var zt=de(On[0]);return On.forEach(function(rn){function cn(Vn,Nn){var Qe=new Set(Nn),rt=get(rn,Vn),pt=Array.isArray(rt);if(pt||Te(rt)){if(!Qe.has(rt)){Qe.add(rt);var Rt=get(zt,Vn);pt?zt=Mn(zt,Vn,[]):(!Rt||_typeof(Rt)!=="object")&&(zt=Mn(zt,Vn,de(rt))),le(rt).forEach(function(We){cn([].concat(_toConsumableArray(Vn),[We]),Qe)})}}else zt=Mn(zt,Vn,rt)}cn([])}),zt}var he={},oe=[],Ie=function(On){oe.push(On)};function Je(At,On){if(0)var Pt}function _t(At,On){if(0)var Pt}function Kt(){he={}}function Ht(At,On,Pt){!On&&!he[Pt]&&(At(!1,Pt),he[Pt]=!0)}function Qt(At,On){Ht(Je,At,On)}function Gt(At,On){Ht(_t,At,On)}Qt.preMessage=Ie,Qt.resetWarned=Kt,Qt.noteOnce=Gt;var nr=null,gr=10;function Ut(At,On,Pt,zt,rn,cn,Vn,Nn){var Qe=Me.useRef(),rt=Me.useState(null),pt=(0,it.Z)(rt,2),Rt=pt[0],We=pt[1];return Ge(function(){if(Rt&&Rt.times<gr){if(!At.current){We(function(ia){return(0,Ue.Z)({},ia)});return}cn();var mt=Rt.targetAlign,Dt=Rt.originAlign,gt=Rt.index,qt=Rt.offset,Yt=At.current.clientHeight,Rn=!1,br=mt,Wn=null;if(Yt){for(var Jn=mt||Dt,or=0,lr=0,Rr=0,bn=Math.min(On.length-1,gt),An=0;An<=bn;An+=1){var hi=rn(On[An]);lr=or;var xi=Pt.get(hi);Rr=lr+(xi===void 0?zt:xi),or=Rr}for(var ai=Jn==="top"?qt:Yt-qt,sr=bn;sr>=0;sr-=1){var vi=rn(On[sr]),ur=Pt.get(vi);if(ur===void 0){Rn=!0;break}if(ai-=ur,ai<=0)break}switch(Jn){case"top":Wn=lr-qt;break;case"bottom":Wn=Rr-Yt+qt;break;default:{var Qr=At.current.scrollTop,kn=Qr+Yt;lr<Qr?br="top":Rr>kn&&(br="bottom")}}Wn!==null&&Vn(Wn),Wn!==Rt.lastTop&&(Rn=!0)}Rn&&We(function(ia){return(0,Ue.Z)((0,Ue.Z)({},ia),{},{times:ia.times+1,targetAlign:br,lastTop:Wn})})}},[Rt,At.current]),function(mt){if(mt==null){Nn();return}if(tt.cancel(Qe.current),typeof mt=="number")Vn(mt);else if(mt&&(0,Fe.Z)(mt)==="object"){var Dt,gt=mt.align;"index"in mt?Dt=mt.index:Dt=On.findIndex(function(Rn){return rn(Rn)===mt.key});var qt=mt.offset,Yt=qt===void 0?0:qt;We({times:0,index:Dt,offset:Yt,originAlign:gt})}}}function pn(At,On,Pt,zt){var rn=Pt-At,cn=On-Pt,Vn=Math.min(rn,cn)*2;if(zt<=Vn){var Nn=Math.floor(zt/2);return zt%2?Pt+Nn+1:Pt-Nn}return rn>cn?Pt-(zt-cn):Pt+(zt-rn)}function ir(At,On,Pt){var zt=At.length,rn=On.length,cn,Vn;if(zt===0&&rn===0)return null;zt<rn?(cn=At,Vn=On):(cn=On,Vn=At);var Nn={__EMPTY_ITEM__:!0};function Qe(Dt){return Dt!==void 0?Pt(Dt):Nn}for(var rt=null,pt=Math.abs(zt-rn)!==1,Rt=0;Rt<Vn.length;Rt+=1){var We=Qe(cn[Rt]),mt=Qe(Vn[Rt]);if(We!==mt){rt=Rt,pt=pt||We!==Qe(Vn[Rt+1]);break}}return rt===null?null:{index:rt,multiple:pt}}function Lr(At,On,Pt){var zt=Me.useState(At),rn=(0,it.Z)(zt,2),cn=rn[0],Vn=rn[1],Nn=Me.useState(null),Qe=(0,it.Z)(Nn,2),rt=Qe[0],pt=Qe[1];return Me.useEffect(function(){var Rt=ir(cn||[],At||[],On);(Rt==null?void 0:Rt.index)!==void 0&&(Pt==null||Pt(Rt.index),pt(At[Rt.index])),Vn(At)},[At]),[rt]}var $n=(typeof navigator=="undefined"?"undefined":(0,Fe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Cr=$n,Ii=function(At,On){var Pt=(0,Me.useRef)(!1),zt=(0,Me.useRef)(null);function rn(){clearTimeout(zt.current),Pt.current=!0,zt.current=setTimeout(function(){Pt.current=!1},50)}var cn=(0,Me.useRef)({top:At,bottom:On});return cn.current.top=At,cn.current.bottom=On,function(Vn){var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qe=Vn<0&&cn.current.top||Vn>0&&cn.current.bottom;return Nn&&Qe?(clearTimeout(zt.current),Pt.current=!1):(!Qe||Pt.current)&&rn(),!Pt.current&&Qe}};function li(At,On,Pt,zt,rn){var cn=(0,Me.useRef)(0),Vn=(0,Me.useRef)(null),Nn=(0,Me.useRef)(null),Qe=(0,Me.useRef)(!1),rt=Ii(On,Pt);function pt(qt,Yt){tt.cancel(Vn.current),cn.current+=Yt,Nn.current=Yt,!rt(Yt)&&(Cr||qt.preventDefault(),Vn.current=tt(function(){var Rn=Qe.current?10:1;rn(cn.current*Rn),cn.current=0}))}function Rt(qt,Yt){rn(Yt,!0),Cr||qt.preventDefault()}var We=(0,Me.useRef)(null),mt=(0,Me.useRef)(null);function Dt(qt){if(At){tt.cancel(mt.current),mt.current=tt(function(){We.current=null},2);var Yt=qt.deltaX,Rn=qt.deltaY,br=qt.shiftKey,Wn=Yt,Jn=Rn;(We.current==="sx"||!We.current&&br&&Rn&&!Yt)&&(Wn=Rn,Jn=0,We.current="sx");var or=Math.abs(Wn),lr=Math.abs(Jn);We.current===null&&(We.current=zt&&or>lr?"x":"y"),We.current==="y"?pt(qt,Jn):Rt(qt,Wn)}}function gt(qt){At&&(Qe.current=qt.detail===Nn.current)}return[Dt,gt]}var ci=14/15;function Jr(At,On,Pt){var zt=(0,Me.useRef)(!1),rn=(0,Me.useRef)(0),cn=(0,Me.useRef)(null),Vn=(0,Me.useRef)(null),Nn,Qe=function(We){if(zt.current){var mt=Math.ceil(We.touches[0].pageY),Dt=rn.current-mt;rn.current=mt,Pt(Dt)&&We.preventDefault(),clearInterval(Vn.current),Vn.current=setInterval(function(){Dt*=ci,(!Pt(Dt,!0)||Math.abs(Dt)<=.1)&&clearInterval(Vn.current)},16)}},rt=function(){zt.current=!1,Nn()},pt=function(We){Nn(),We.touches.length===1&&!zt.current&&(zt.current=!0,rn.current=Math.ceil(We.touches[0].pageY),cn.current=We.target,cn.current.addEventListener("touchmove",Qe),cn.current.addEventListener("touchend",rt))};Nn=function(){cn.current&&(cn.current.removeEventListener("touchmove",Qe),cn.current.removeEventListener("touchend",rt))},Ge(function(){return At&&On.current.addEventListener("touchstart",pt),function(){var Rt;(Rt=On.current)===null||Rt===void 0||Rt.removeEventListener("touchstart",pt),Nn(),clearInterval(Vn.current)}},[At])}var Di=20;function Ei(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Pt=At/On*100;return isNaN(Pt)&&(Pt=0),Pt=Math.max(Pt,Di),Pt=Math.min(Pt,At/2),Math.floor(Pt)}function Pi(At,On,Pt,zt){var rn=Me.useMemo(function(){return[new Map,[]]},[At,Pt.id,zt]),cn=(0,it.Z)(rn,2),Vn=cn[0],Nn=cn[1],Qe=function(pt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,We=Vn.get(pt),mt=Vn.get(Rt);if(We===void 0||mt===void 0)for(var Dt=At.length,gt=Nn.length;gt<Dt;gt+=1){var qt,Yt=At[gt],Rn=On(Yt);Vn.set(Rn,gt);var br=(qt=Pt.get(Rn))!==null&&qt!==void 0?qt:zt;if(Nn[gt]=(Nn[gt-1]||0)+br,Rn===pt&&(We=gt),Rn===Rt&&(mt=gt),We!==void 0&&mt!==void 0)break}return{top:Nn[We-1]||0,bottom:Nn[mt]}};return Qe}var xr=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Pr=[],Gi={overflowY:"auto",overflowAnchor:"none"};function ma(At,On){var Pt=At.prefixCls,zt=Pt===void 0?"rc-virtual-list":Pt,rn=At.className,cn=At.height,Vn=At.itemHeight,Nn=At.fullHeight,Qe=Nn===void 0?!0:Nn,rt=At.style,pt=At.data,Rt=At.children,We=At.itemKey,mt=At.virtual,Dt=At.direction,gt=At.scrollWidth,qt=At.component,Yt=qt===void 0?"div":qt,Rn=At.onScroll,br=At.onVirtualScroll,Wn=At.onVisibleChange,Jn=At.innerProps,or=At.extraRender,lr=At.styles,Rr=(0,Le.Z)(At,xr),bn=!!(mt!==!1&&cn&&Vn),An=bn&&pt&&(Vn*pt.length>cn||!!gt),hi=Dt==="rtl",xi=Pe()(zt,(0,ve.Z)({},"".concat(zt,"-rtl"),hi),rn),ai=pt||Pr,sr=(0,Me.useRef)(),vi=(0,Me.useRef)(),ur=(0,Me.useState)(0),Qr=(0,it.Z)(ur,2),kn=Qr[0],ia=Qr[1],zi=(0,Me.useState)(0),Ma=(0,it.Z)(zi,2),Ji=Ma[0],Zi=Ma[1],xa=(0,Me.useState)(!1),aa=(0,it.Z)(xa,2),Ni=aa[0],fa=aa[1],Ta=function(){fa(!0)},ga=function(){fa(!1)},Hi=Me.useCallback(function(Ot){return typeof We=="function"?We(Ot):Ot==null?void 0:Ot[We]},[We]),Ia={getKey:Hi};function Oa(Ot){ia(function(un){var hn;typeof Ot=="function"?hn=Ot(un):hn=Ot;var zn=Gn(hn);return sr.current.scrollTop=zn,zn})}var wa=(0,Me.useRef)({start:0,end:ai.length}),_i=(0,Me.useRef)(),Mt=Lr(ai,Hi),wt=(0,it.Z)(Mt,1),tn=wt[0];_i.current=tn;var vn=xn(Hi,null,null),Kn=(0,it.Z)(vn,4),Ar=Kn[0],Tr=Kn[1],Hr=Kn[2],Xr=Kn[3],Zr=Me.useMemo(function(){if(!bn)return{scrollHeight:void 0,start:0,end:ai.length-1,offset:void 0};if(!An){var Ot;return{scrollHeight:((Ot=vi.current)===null||Ot===void 0?void 0:Ot.offsetHeight)||0,start:0,end:ai.length-1,offset:void 0}}for(var un=0,hn,zn,Sn,qn=ai.length,fr=0;fr<qn;fr+=1){var er=ai[fr],mr=Hi(er),jn=Hr.get(mr),ar=un+(jn===void 0?Vn:jn);ar>=kn&&hn===void 0&&(hn=fr,zn=un),ar>kn+cn&&Sn===void 0&&(Sn=fr),un=ar}return hn===void 0&&(hn=0,zn=0,Sn=Math.ceil(cn/Vn)),Sn===void 0&&(Sn=ai.length-1),Sn=Math.min(Sn+1,ai.length-1),{scrollHeight:un,start:hn,end:Sn,offset:zn}},[An,bn,kn,ai,Xr,cn]),wi=Zr.scrollHeight,ki=Zr.start,Ri=Zr.end,oa=Zr.offset;wa.current.start=ki,wa.current.end=Ri;var Wi=Me.useState({width:0,height:cn}),Xi=(0,it.Z)(Wi,2),Oe=Xi[0],He=Xi[1],Ke=function(un){He({width:un.width||un.offsetWidth,height:un.height||un.offsetHeight})},Ve=(0,Me.useRef)(),ct=(0,Me.useRef)(),yt=Me.useMemo(function(){return Ei(Oe.width,gt)},[Oe.width,gt]),kt=Me.useMemo(function(){return Ei(Oe.height,wi)},[Oe.height,wi]),sn=wi-cn,dn=(0,Me.useRef)(sn);dn.current=sn;function Gn(Ot){var un=Ot;return Number.isNaN(dn.current)||(un=Math.min(un,dn.current)),un=Math.max(un,0),un}var pr=kn<=0,Hn=kn>=sn,Cn=Ii(pr,Hn),gn=function(){return{x:hi?-Ji:Ji,y:kn}},Pn=(0,Me.useRef)(gn()),Fn=De(function(){if(br){var Ot=gn();(Pn.current.x!==Ot.x||Pn.current.y!==Ot.y)&&(br(Ot),Pn.current=Ot)}});function dr(Ot,un){var hn=Ot;un?((0,Se.flushSync)(function(){Zi(hn)}),Fn()):Oa(hn)}function Xn(Ot){var un=Ot.currentTarget.scrollTop;un!==kn&&Oa(un),Rn==null||Rn(Ot),Fn()}var Zn=function(un){var hn=un,zn=gt-Oe.width;return hn=Math.max(hn,0),hn=Math.min(hn,zn),hn},Qn=De(function(Ot,un){un?((0,Se.flushSync)(function(){Zi(function(hn){var zn=hn+(hi?-Ot:Ot);return Zn(zn)})}),Fn()):Oa(function(hn){var zn=hn+Ot;return zn})}),Ze=li(bn,pr,Hn,!!gt,Qn),ze=(0,it.Z)(Ze,2),xe=ze[0],Ae=ze[1];Jr(bn,sr,function(Ot,un){return Cn(Ot,un)?!1:(xe({preventDefault:function(){},deltaY:Ot}),!0)}),Ge(function(){function Ot(hn){bn&&hn.preventDefault()}var un=sr.current;return un.addEventListener("wheel",xe),un.addEventListener("DOMMouseScroll",Ae),un.addEventListener("MozMousePixelScroll",Ot),function(){un.removeEventListener("wheel",xe),un.removeEventListener("DOMMouseScroll",Ae),un.removeEventListener("MozMousePixelScroll",Ot)}},[bn]),Ge(function(){gt&&Zi(function(Ot){return Zn(Ot)})},[Oe.width,gt]);var qe=function(){var un,hn;(un=Ve.current)===null||un===void 0||un.delayHidden(),(hn=ct.current)===null||hn===void 0||hn.delayHidden()},Xe=Ut(sr,ai,Hr,Vn,Hi,function(){return Tr(!0)},Oa,qe);Me.useImperativeHandle(On,function(){return{getScrollInfo:gn,scrollTo:function(un){function hn(zn){return zn&&(0,Fe.Z)(zn)==="object"&&("left"in zn||"top"in zn)}hn(un)?(un.left!==void 0&&Zi(Zn(un.left)),Xe(un.top)):Xe(un)}}}),Ge(function(){if(Wn){var Ot=ai.slice(ki,Ri+1);Wn(Ot,ai)}},[ki,Ri,ai]);var St=Pi(ai,Hi,Hr,Vn),Ft=or==null?void 0:or({start:ki,end:Ri,virtual:An,offsetX:Ji,offsetY:oa,rtl:hi,getSize:St}),Wt=Ye(ai,ki,Ri,gt,Ar,Rt,Ia),an=null;cn&&(an=(0,Ue.Z)((0,ve.Z)({},Qe?"height":"maxHeight",cn),Gi),bn&&(an.overflowY="hidden",gt&&(an.overflowX="hidden"),Ni&&(an.pointerEvents="none")));var nn={};return hi&&(nn.dir="rtl"),Me.createElement("div",(0,ce.Z)({style:(0,Ue.Z)((0,Ue.Z)({},rt),{},{position:"relative"}),className:xi},nn,Rr),Me.createElement(st.Z,{onResize:Ke},Me.createElement(Yt,{className:"".concat(zt,"-holder"),style:an,ref:sr,onScroll:Xn,onMouseEnter:qe},Me.createElement(Et,{prefixCls:zt,height:wi,offsetX:Ji,offsetY:oa,scrollWidth:gt,onInnerResize:Tr,ref:vi,innerProps:Jn,rtl:hi,extra:Ft},Wt))),An&&wi>cn&&Me.createElement(we,{ref:Ve,prefixCls:zt,scrollOffset:kn,scrollRange:wi,rtl:hi,onScroll:dr,onStartMove:Ta,onStopMove:ga,spinSize:kt,containerSize:Oe.height,style:lr==null?void 0:lr.verticalScrollBar,thumbStyle:lr==null?void 0:lr.verticalScrollBarThumb}),An&&gt&&Me.createElement(we,{ref:ct,prefixCls:zt,scrollOffset:Ji,scrollRange:gt,rtl:hi,onScroll:dr,onStartMove:Ta,onStopMove:ga,spinSize:yt,containerSize:Oe.width,horizontal:!0,style:lr==null?void 0:lr.horizontalScrollBar,thumbStyle:lr==null?void 0:lr.horizontalScrollBarThumb}))}var ba=Me.forwardRef(ma);ba.displayName="List";var va=ba,Vi=va},66392:function(Ln,en){"use strict";var se;var ce=Symbol.for("react.element"),Ue=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),it=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Le=Symbol.for("react.provider"),Me=Symbol.for("react.context"),Se=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),lt;lt=Symbol.for("react.module.reference");function et(ke){if(typeof ke=="object"&&ke!==null){var vt=ke.$$typeof;switch(vt){case ce:switch(ke=ke.type,ke){case Fe:case ve:case it:case Pe:case st:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case Se:case Me:case me:case Et:case Re:case Le:return ke;default:return vt}}case Ue:return vt}}}se=Me,se=Le,se=ce,se=me,se=Fe,se=Et,se=Re,se=Ue,se=ve,se=it,se=Pe,se=st,se=function(){return!1},se=function(){return!1},se=function(ke){return et(ke)===Me},se=function(ke){return et(ke)===Le},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===ce},se=function(ke){return et(ke)===me},se=function(ke){return et(ke)===Fe},se=function(ke){return et(ke)===Et},se=function(ke){return et(ke)===Re},se=function(ke){return et(ke)===Ue},se=function(ke){return et(ke)===ve},se=function(ke){return et(ke)===it},se=function(ke){return et(ke)===Pe},se=function(ke){return et(ke)===st},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Fe||ke===ve||ke===it||ke===Pe||ke===st||ke===ht||typeof ke=="object"&&ke!==null&&(ke.$$typeof===Et||ke.$$typeof===Re||ke.$$typeof===Le||ke.$$typeof===Me||ke.$$typeof===me||ke.$$typeof===lt||ke.getModuleId!==void 0)},se=et},31461:function(Ln,en,se){"use strict";se(66392)},84279:function(Ln,en,se){"use strict";var ce=Object.defineProperty,Ue=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Me=(a,y,b)=>y in a?ce(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,Se=(a,y)=>{for(var b in y||(y={}))ve.call(y,b)&&Me(a,b,y[b]);if(it)for(var b of it(y))Le.call(y,b)&&Me(a,b,y[b]);return a},me=(a,y)=>Ue(a,Fe(y)),Pe=a=>typeof a=="symbol"?a:a+"",st=(a,y)=>{var b={};for(var E in a)ve.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&it)for(var E of it(a))y.indexOf(E)<0&&Le.call(a,E)&&(b[E]=a[E]);return b};function Re(a){return Array.isArray(a)}var Et={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function ht(){return"window"in globalThis&&"document"in globalThis}function lt(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function et(){return typeof navigator.vibrate=="function"}function ke(){var a,y;if(!ht())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function vt(){if(!ht())return!0;if(/firefox/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/firefox\/(\d+)/i);return a?parseInt(a[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const a=navigator.userAgent.match(/edg\/(\d+)/i);return a?parseInt(a[1])>=79:!1}return!0}function jt(){return HTMLElement.prototype.hasOwnProperty("popover")}var tt={strings:Et,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return tt._locale||(tt._locale=ht()?navigator.language.slice(0,5):"en-US"),tt._locale},set locale(a){tt._locale=a,tt._numberFormatter=void 0,tt.dirty=!0},get numberFormatter(){return tt._numberFormatter||(tt._numberFormatter=new Intl.NumberFormat(tt.locale)),tt._numberFormatter},merge(a,y){if(typeof a=="string"&&y)tt.strings[a]=Se(Se({},tt.strings[a]),y),tt.dirty=!0;else for(const b of Object.keys(a))tt.merge(b,a[b])},get dirty(){return tt._dirty},set dirty(a){tt._dirty||tt._dirty===a||(tt._dirty=!0,setTimeout(()=>{tt._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return tt._subscribers.push(a),tt._subscribers.length-1},unsubscribe(a){a<0||a>=tt._subscribers.length||(tt._subscribers[a]=void 0)},update(a){let y=a.querySelectorAll("[data-l10n-tooltip]");for(const b of y){const E=b.getAttribute("data-l10n-tooltip");if(E){const ee=ut(E);ee&&b.setAttribute("data-tooltip",ee)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const ee=ut(E);ee&&b.setAttribute("aria-label",ee)}}}};function ut(a,...y){if(a===void 0)return;let b="";const E=tt.locale;tt.strings[E]&&(b=tt.strings[E][a]);const ee=E.slice(0,2);if(!b&&tt.strings[ee]&&(b=tt.strings[ee][a]),b||(b=tt.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),fe=0;for(;ae;){if(y[fe++]){const be=ae[2]?parseInt(ae[2],10)-1:fe-1;let Ce=y[be];typeof Ce=="number"&&(Ce=tt.numberFormatter.format(Ce)),b=b.replace(ae[1],Ce)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var Ee={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},we={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},je={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},Ye={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},Lt={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},Ct={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function Bt(a){var y,b,E,ee,re,ae;const fe=a.split("!");let ge,be,Ce,$e=255,nt=255,xt=255,Tt=-1;const Tn=fe.length>0&&fe[0].startsWith("-");Tn&&(fe[0]=fe[0].slice(1));for(let Sr=0;Sr<fe.length;Sr++){ge=$e,be=nt,Ce=xt;const _n=(y=fe[Sr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],tr=_n==null?void 0:_n.toLowerCase(),kr=_n&&(ae=(re=(ee=(E=(b=Ye[tr])!=null?b:Ye[Lt[_n]])!=null?E:we[_n])!=null?ee:Ct[_n])!=null?re:Ee[_n])!=null?ae:fe[Sr].trim();let cr=kr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(cr!=null&&cr[1]&&cr[2]&&cr[3])$e=Math.max(0,Math.min(255,Number.parseInt(cr[1],16))),nt=Math.max(0,Math.min(255,Number.parseInt(cr[2],16))),xt=Math.max(0,Math.min(255,Number.parseInt(cr[3],16)));else if(cr=kr.match(/^#([\da-f]{3})$/i),cr!=null&&cr[1]){const si=Number.parseInt(cr[1][0],16),Ti=Number.parseInt(cr[1][1],16),bi=Number.parseInt(cr[1][2],16);$e=Math.max(0,Math.min(255,si*16+si)),nt=Math.max(0,Math.min(255,Ti*16+Ti)),xt=Math.max(0,Math.min(255,bi*16+bi))}else if(cr=kr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),cr!=null&&cr[1]&&cr[2]&&cr[3])$e=Math.max(0,Math.min(255,Number.parseInt(cr[1]))),nt=Math.max(0,Math.min(255,Number.parseInt(cr[2]))),xt=Math.max(0,Math.min(255,Number.parseInt(cr[3])));else return;Tt>=0&&($e=(1-Tt)*$e+Tt*ge,nt=(1-Tt)*nt+Tt*be,xt=(1-Tt)*xt+Tt*Ce,Tt=-1),Sr+1<fe.length&&(Tt=Math.max(0,Math.min(100,Number.parseInt(fe[++Sr])))/100)}return Tt>=0&&($e=Tt*$e+(1-Tt)*ge,nt=Tt*nt+(1-Tt)*be,xt=Tt*xt+(1-Tt)*Ce),Tn&&($e=255-$e,nt=255-nt,xt=255-xt),"#"+("00"+Math.round($e).toString(16)).slice(-2)+("00"+Math.round(nt).toString(16)).slice(-2)+("00"+Math.round(xt).toString(16)).slice(-2)}function at(a){var y,b;return a=a.trim(),(b=(y=je[a.toLowerCase()])!=null?y:je[Lt[a]])!=null?b:Bt(a)}function Vt(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&y.a===void 0&&(y.a=1),y}function $t(a,y,b){return b<0&&(b+=6),b>=6&&(b-=6),b<1?(y-a)*b+a:b<3?y:b<4?(y-a)*(4-b)+a:a}function xn(a){let[y,b,E]=[a.h,a.s,a.l];y=(y+360)%360/60,E=Math.max(0,Math.min(E,1)),b=Math.max(0,Math.min(b,1));const ee=E<=.5?E*(b+1):E+b-E*b,re=E*2-ee;return{r:Math.round(255*$t(re,ee,y+2)),g:Math.round(255*$t(re,ee,y)),b:Math.round(255*$t(re,ee,y-2))}}function dt(a){return a<0?0:a>255?255:Math.round(a)}function on(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(dt(y)<<16)+(dt(b)<<8)+dt(E)).toString(16).slice(1);return ee[0]===ee[1]&&ee[2]===ee[3]&&ee[4]===ee[5]&&ee[6]===ee[7]&&(ee=ee[0]+ee[2]+ee[4]),"#"+ee}function En(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ee=Math.min(y,b,E),re=Math.max(y,b,E),ae=re-ee;let fe,ge;re===ee?fe=0:y===re?fe=(b-E)/ae:b===re?fe=2+(E-y)/ae:E===re&&(fe=4+(y-b)/ae),fe=Math.min(fe*60,360),fe<0&&(fe+=360);const be=(ee+re)/2;return re===ee?ge=0:be<=.5?ge=ae/(re+ee):ge=ae/(2-re-ee),{h:fe,s:ge,l:be}}function yn(a){let y=Vt(a);if(!y)return a;let{h:b,s:E,l:ee}=En(y);return E+=.1,ee-=.1,on(xn({h:b,s:E,l:ee}))}var Ge={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},De={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Zt=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function In(a,y,b){if(!/[A-Za-z\d]/.test(a)||(b==="up"&&(b=void 0),!y&&!b))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of Zt)if((!y||ee.variant===y)&&(!b||ee.style===b)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(De[re]||re)}return a}function fn(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in De)if(De[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of Zt)if(a>=b.start&&a<b.start+b.len)return{char:String.fromCodePoint(a-b.start+b.offset),variant:b.variant,style:b.style};return{char:String.fromCodePoint(a)}}function ot(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ee=(y=E.codePointAt(0))!=null?y:0;let re=Ge[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:fe,style:ge}=fn(ee);switch(re=ae,fe){case"double-struck":re=`\\mathbb{${re}}`;break;case"fraktur":re=`\\mathfrak{${re}}`;break;case"script":re=`\\mathscr{${re}}`;break;case"sans-serif":re=`\\mathsf{${re}}`;break;case"monospace":re=`\\mathtt{${re}}`;break;case"calligraphic":re=`\\mathcal{${re}}`;break}switch(ge){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function ft(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Jt={},Bn=Se({},Ge),wn={},Nt={},Xt={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},Dn={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},Mn={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},Te={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:Mn},"amsmath.sty":{package:Dn,primitive:!0},"texvc.sty":{package:Xt,primitive:!1}},de={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},le=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,pe,he;vt()?(pe=new RegExp("\\p{Letter}","u"),he=new RegExp("[0-9\\p{Letter}]","u")):(pe=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,he=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function oe(a,y,b="mord",E){y!==void 0&&(Jt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},Bn[y]||(Bn[y]=a))}function Ie(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);oe(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)oe(E,ee,re!=null?re:y,ae!=null?ae:b)}function Je(a,y){for(let b=a;b<=y;b++)oe(String.fromCodePoint(b),b)}function _t(a){var y;return(y=Nt[a])!=null?y:null}function Kt(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in wn)ae.startsWith(y)&&!wn[ae].infix&&ee.push({match:ae,frequency:(b=wn[ae].frequency)!=null?b:0});for(const ae in Jt)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=Jt[ae].frequency)!=null?E:0});const re=y.substring(1);for(const ae of Object.keys(a.options.macros))ae.startsWith(re)&&ee.push({match:"\\"+ae,frequency:0});return ee.sort((ae,fe)=>{var ge,be;return ae.frequency===fe.frequency?ae.match.length===fe.match.length?ae.match<fe.match?-1:1:ae.match.length-fe.match.length:((ge=fe.frequency)!=null?ge:0)-((be=ae.frequency)!=null?be:0)}),ee.map(ae=>ae.match)}function Ht(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function Qt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Ht(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Qt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Ht(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Qt(b[E]))}return y}function Gt(a){if(!a)return"";let y="",b=!0;for(const E of a)typeof E.value=="string"?y+=E.value:b=!1;return b?y:""}function nr(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Nt[E]=b}function gr(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:Qt(y),createAtom:b};for(const re of a)Nt[re]=ee}function Ut(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:Qt(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(ee=b.infix)!=null?ee:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")wn["\\"+a]=re;else for(const ae of a)wn["\\"+ae]=re}var pn;function ir(a){return pn||(pn=$n(Te)),a?$n(Se(Se({},pn),a)):pn}function Lr(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const fe=a;return/(^|[^\\])#1/.test(fe)&&(ae=1),/(^|[^\\])#2/.test(fe)&&(ae=2),/(^|[^\\])#3/.test(fe)&&(ae=3),/(^|[^\\])#4/.test(fe)&&(ae=4),/(^|[^\\])#5/.test(fe)&&(ae=5),/(^|[^\\])#6/.test(fe)&&(ae=6),/(^|[^\\])#7/.test(fe)&&(ae=7),/(^|[^\\])#8/.test(fe)&&(ae=8),/(^|[^\\])#9/.test(fe)&&(ae=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:ae,def:fe}}return Se({expand:(ee=y==null?void 0:y.expand)!=null?ee:!0,captureSelection:(re=y==null?void 0:y.captureSelection)!=null?re:!0,args:0},a)}function $n(a){if(!a)return{};const y={};for(const b of Object.keys(a)){const E=a[b];if(E==null)delete y[b];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))y[ee]=Lr(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Lr(E)}return y}function Cr(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=wn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Jt[a]:de[a]&&(b={definitionType:"symbol",type:"mord",codepoint:de[a]})}else if(y==="math"){if(b=Jt[a],!b&&a.length===1){const E=li("math",a.codePointAt(0));return E.startsWith("\\")?me(Se({},Cr(E,"math")),{command:E}):null}}else de[a]?b={definitionType:"symbol",type:"mord",codepoint:de[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Ii(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function li(a,y){if(y===void 0)return"";if(a==="math"&&Bn[y])return Bn[y];if(a==="text"){const b=Object.keys(de).find(E=>de[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var ci=[0,.68889,0,0,.72222],Jr=[0,.68889,0,0,.66667],Di=[0,.68889,0,0,.77778],Ei=[0,.68889,0,0,.61111],Pi=[.16667,.68889,0,0,.77778],xr=[0,.68889,0,0,.55556],Pr=[0,0,0,0,.25],Gi=[0,.825,0,0,2.33334],ma=[0,.9,0,0,2.33334],ba=[0,.68889,0,0,.54028],va=[-.03598,.46402,0,0,.5],Vi=[-.13313,.36687,0,0,1],At=[.01354,.52239,0,0,1],On=[.01354,.52239,0,0,1.11111],Pt=[0,.54986,0,0,1],zt=[0,.69224,0,0,.5],rn=[0,.43056,0,0,1],cn=[.08198,.58198,0,0,.77778],Vn=[.19444,.69224,0,0,.41667],Nn=[.1808,.675,0,0,1],Qe=[.19444,.69224,0,0,.83334],rt=[.13667,.63667,0,0,1],pt=[-.064,.437,0,0,1.334],Rt=[.08167,.58167,0,0,.77778],We=[0,.69224,0,0,.72222],mt=[0,.69224,0,0,.66667],Dt=[-.13313,.36687,0,0,.77778],gt=[.06062,.54986,0,0,.77778],qt=[0,.69224,0,0,.77778],Yt=[.25583,.75583,0,0,.77778],Rn=[.25142,.75726,0,0,.77778],br=[.20576,.70576,0,0,.77778],Wn=[.30274,.79383,0,0,.77778],Jn=[.22958,.72958,0,0,.77778],or=[.1808,.675,0,0,.77778],lr=[.13667,.63667,0,0,.77778],Rr=[.13597,.63597,0,0,.77778],bn=[.03517,.54986,0,0,.77778],An=[0,.675,0,0,.77778],hi=[.19444,.69224,0,0,.61111],xi=[0,.54986,0,0,.76042],ai=[0,.54986,0,0,.66667],sr=[.0391,.5391,0,0,.77778],vi=[.03517,.54986,0,0,1.33334],ur=[.38569,.88569,0,0,.77778],Qr=[.23222,.74111,0,0,.77778],kn=[.19444,.69224,0,0,.77778],ia=[0,.37788,0,0,.5],zi=[0,.54986,0,0,.72222],Ma=[0,.69224,0,0,.83334],Ji=[.11111,.69224,0,0,.66667],Zi=[.26167,.75726,0,0,.77778],xa=[.48256,.98256,0,0,.77778],aa=[.28481,.79383,0,0,.77778],Ni=[.08167,.58167,0,0,.22222],fa=[.08167,.58167,0,0,.38889],Ta=[0,.43056,.04028,0,.66667],ga=[.41951,.91951,0,0,.77778],Hi=[.24982,.74947,0,0,.38865],Ia=[.08319,.58283,0,0,.75623],Oa=[0,.10803,0,0,.27764],wa=[0,.47534,0,0,.50181],_i=[.18906,.47534,0,0,.50181],Mt=[0,.69141,0,0,.50181],wt=[.24982,.74947,0,0,.27764],tn=[0,.69141,0,0,.21471],vn=[.25,.75,0,0,.44722],Kn=[0,.64444,0,0,.575],Ar=[.08556,.58556,0,0,.89444],Tr=[0,.69444,0,0,.89444],Hr=[0,.68611,0,0,.9],Xr=[0,.68611,0,0,.86944],Zr=[.25,.75,0,0,.575],wi=[.25,.75,0,0,.31944],ki=[0,.69444,0,0,.63889],Ri=[0,.69444,0,0,.31944],oa=[0,.44444,0,0,.63889],Wi=[0,.44444,0,0,.51111],Xi=[0,.69444,0,0,.575],Oe=[.13333,.63333,0,0,.89444],He=[0,.44444,0,0,.31944],Ke=[0,.69444,0,0,.86944],Ve=[0,.68611,0,0,.69166],ct=[0,.68611,0,0,.83055],yt=[0,.68611,0,0,.89444],kt=[0,.69444,0,0,.60278],sn=[.19444,.69444,0,0,.51111],dn=[0,.69444,0,0,.83055],Gn=[-.10889,.39111,0,0,1.14999],pr=[.19444,.69444,0,0,.575],Hn=[.19444,.69444,0,0,1.14999],Cn=[.19444,.69444,0,0,.70277],gn=[.05556,.75,0,0,.575],Pn=[0,.68611,0,0,.95833],Fn=[.08556,.58556,0,0,.76666],dr=[-.02639,.47361,0,0,.575],Xn=[0,.44444,0,0,.89444],Zn=[0,.55556,0,0,.76666],Qn=[-.10889,.39111,0,0,.89444],Ze=[.00222,.50222,0,0,.89444],ze=[.19667,.69667,0,0,.89444],xe=[.08556,.58556,0,0,1.14999],Ae=[0,.69444,0,0,.70277],qe=[-.02778,.47222,0,0,.575],Xe=[.25,.75,0,0,.51111],St=[-.13889,.36111,0,0,1.14999],Ft=[.19444,.69444,0,0,1.02222],Wt=[.12963,.69444,0,0,.89444],an=[.19444,.69444,0,0,.44722],nn=[0,.64444,.13167,0,.59111],Ot=[.19444,.64444,.13167,0,.59111],un=[0,.68611,.17208,0,.8961],hn=[.19444,.44444,.105,0,.53222],zn=[0,.44444,.085,0,.82666],Sn=[0,.69444,.06709,0,.59111],qn=[0,.69444,.12945,0,.35555],fr=[0,.69444,0,0,.94888],er=[0,.69444,.11472,0,.59111],mr=[0,.68611,.10778,0,.88555],jn=[0,.69444,.07939,0,.62055],ar=[0,.69444,.12417,0,.30667],Mr=[0,.64444,.13556,0,.51111],Nr=[.19444,.64444,.13556,0,.51111],rr=[0,.68333,.16389,0,.74333],Dr=[.19444,.43056,.08847,0,.46],$r=[0,.43056,.07514,0,.71555],mi=[0,.69444,.06646,0,.51111],ri=[0,.69444,0,0,.83129],Ur=[0,.69444,.1225,0,.51111],ui=[0,.68333,.09403,0,.76666],pi=[0,.68333,.11111,0,.76666],jr=[0,.69444,.06961,0,.51444],Gr=[0,.69444,0,0,.27778],wr=[.25,.75,0,0,.38889],Fr=[0,.64444,0,0,.5],Yr=[0,.69444,0,0,.77778],fi=[0,.68333,0,0,.75],ua=[0,.68333,0,0,.77778],ha=[0,.68333,0,0,.68056],Bi=[0,.68333,0,0,.72222],$i=[.25,.75,0,0,.5],ei=[.25,.75,0,0,.27778],Wr=[0,.69444,0,0,.5],Yi=[0,.69444,0,0,.55556],qr=[0,.43056,0,0,.44445],vr=[0,.43056,0,0,.5],zr=[.19444,.43056,0,0,.55556],Li=[0,.43056,0,0,.55556],yi=[.08333,.58333,0,0,.77778],ji=[0,.43056,0,0,.27778],ti=[0,.66786,0,0,.27778],ta=[0,.69444,0,0,.75],qi=[0,.66786,0,0,.5],Ki=[0,.68333,0,0,.625],Ui=[.19444,.69444,0,0,.44445],sa=[0,.69444,0,0,.72222],Aa=[.19444,.69444,0,0,.5],da=[.19444,.69444,0,0,1],Sa=[.011,.511,0,0,1.126],za=[.19444,.69444,0,0,.61111],ja=[.05556,.75,0,0,.5],Qa=[0,.68333,0,0,.83334],Ra=[.0391,.5391,0,0,.66667],la=[-.05555,.44445,0,0,.5],di=[0,.43056,0,0,.77778],Mi=[0,.55556,0,0,.66667],Qi=[-.03625,.46375,0,0,.77778],pa=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],eo=[0,.69444,0,0,.61111],uo=[-.03472,.46528,0,0,.5],_o=[.25,.75,0,0,.44445],ko=[-.14236,.35764,0,0,1],to=[.244,.744,0,0,.412],Da=[.19444,.69444,0,0,.88889],Br=[.12963,.69444,0,0,.77778],gi=[.19444,.69444,0,0,.38889],ya=[.011,.511,0,0,1.638],na=[.19444,.69444,0,0,0],Va=[0,.44444,0,0,.575],Za=[.19444,.44444,0,0,.575],Do=[0,.68611,0,0,.75555],zo=[0,.69444,0,0,.66759],as=[0,.68611,0,0,.80555],ea=[0,.68611,.08229,0,.98229],_r=[0,.68611,0,0,.76666],Si=[0,.44444,0,0,.58472],Ci=[.19444,.44444,0,0,.6118],Ai=[.19444,.43056,0,0,.5],Ga=[0,.68333,.02778,.08334,.76278],Ja=[0,.68333,.08125,.05556,.83125],Ko=[0,.43056,0,.05556,.48472],jo=[.19444,.43056,0,.08334,.51702],us=[.25,.75,0,0,.42778],_a=[0,.69444,0,0,.55],Bo=[0,.69444,0,0,.73334],ds=[0,.69444,0,0,.79445],ul=[0,.69444,0,0,.51945],As=[0,.69444,0,0,.70278],ms=[0,.69444,0,0,.76389],Ho=[.25,.75,0,0,.34306],Ts=[0,.69444,0,0,.56111],Is=[0,.69444,0,0,.25556],qs=[.19444,.45833,0,0,.56111],fo=[0,.45833,0,0,.56111],Ba=[0,.69444,0,0,.30556],no=[0,.69444,0,0,.58056],vo=[0,.69444,0,0,.67223],bo=[0,.69444,0,0,.85556],Wo=[0,.69444,0,0,.55834],So=[0,.65556,.11156,0,.5],xs=[0,.69444,.08094,0,.70834],Xl=[.17014,0,0,0,.44445],Yl=[0,.69444,.0799,0,.5],vc=[0,.69444,0,0,.73752],Xc=[0,.69444,.09205,0,.5],Ks=[0,.69444,.09031,0,.77778],Ds=[0,.69444,.07816,0,.27778],yc=[0,.69444,.00316,0,.5],ql=[.19444,.69444,0,0,.83334],$a=[.05556,.75,0,0,.83334],Ca=[0,.75,0,0,.5],Zo=[.125,.08333,0,0,.27778],ts=[0,.08333,0,0,.27778],Ea=[0,.65556,0,0,.5],Ua=[0,.69444,0,0,.47222],Ha=[0,.69444,0,0,.66667],mo=[0,.69444,0,0,.59722],os=[0,.69444,0,0,.54167],Hs=[0,.69444,0,0,.70834],gs=[.25,.75,0,0,.28889],Jl=[0,.69444,0,0,.51667],Ud=[0,.44444,0,0,.44445],jd=[.19444,.44444,0,0,.51667],Yc=[0,.44444,0,0,.38333],Uu=[0,.44444,0,0,.51667],qc=[0,.69444,0,0,.83334],Vd=[.35001,.85,0,0,.45834],Jc=[.35001,.85,0,0,.57778],Qc=[.35001,.85,0,0,.41667],ju=[.35001,.85,0,0,.58334],bc=[0,.72222,0,0,.55556],eu=[1e-5,.6,0,0,.66667],Vu=[1e-5,.6,0,0,.77778],Ql=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],xc=[.30612,.805,.19445,0,.47222],Vo=[.25001,.75,0,0,.83334],Pl=[.35001,.85,0,0,.47222],Gu=[.25001,.75,0,0,1.11111],Xu=[.65002,1.15,0,0,.59722],vs=[.65002,1.15,0,0,.81111],qa=[.65002,1.15,0,0,.47222],Ms=[.65002,1.15,0,0,.66667],Ps=[0,.75,0,0,1],Js=[.55001,1.05,0,0,1.27778],Yu=[.862,1.36,.44445,0,.55556],tu=[.86225,1.36,.44445,0,.55556],Ol=[.55001,1.05,0,0,1.11111],nu=[.65002,1.15,0,0,.52778],ru=[.65002,1.15,0,0,.61111],Nl=[.55001,1.05,0,0,1.51112],qu=[.95003,1.45,0,0,.73611],iu=[.95003,1.45,0,0,1.04445],Qs=[.95003,1.45,0,0,.52778],wc=[.95003,1.45,0,0,.75],Sc=[0,.75,0,0,1.44445],au=[.95003,1.45,0,0,.58334],Cc=[1.25003,1.75,0,0,.79167],ou=[1.25003,1.75,0,0,1.27778],Ju=[1.25003,1.75,0,0,.58334],su=[1.25003,1.75,0,0,.80556],Ec=[0,.825,0,0,1.8889],lu=[1.25003,1.75,0,0,.63889],cu=[.64502,1.155,0,0,.875],Mc=[1e-5,.6,0,0,.875],uu=[-99e-5,.601,0,0,.66667],du=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Qu=[.65002,1.15,0,0,.88889],Rl=[.90001,0,0,0,.88889],fu=[-.00499,.605,0,0,1.05556],Bl=[0,.12,0,0,.45],oi=[0,.61111,0,0,.525],ws=[.08333,.69444,0,0,.525],ed=[-.08056,.53055,0,0,.525],Yd=[-.05556,.55556,0,0,.525],ss=[0,.43056,0,0,.525],Po=[.22222,.43056,0,0,.525],_c=[0,0,0,0,.525],qd={"AMS-Regular":{32:Pr,65:ci,66:Jr,67:ci,68:ci,69:Jr,70:Ei,71:Di,72:Di,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Di,76:Jr,77:[0,.68889,0,0,.94445],78:ci,79:Pi,80:Ei,81:Pi,82:ci,83:xr,84:Jr,85:ci,86:ci,87:[0,.68889,0,0,1],88:ci,89:ci,90:Jr,107:xr,160:Pr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:xr,295:ba,710:Gi,732:ma,770:Gi,771:ma,989:Rt,1008:Ta,8245:[0,.54986,0,0,.275],8463:ba,8487:ci,8498:xr,8502:Jr,8503:[0,.68889,0,0,.44445],8504:Jr,8513:[0,.68889,0,0,.63889],8592:va,8594:va,8602:Vi,8603:Vi,8606:At,8608:At,8610:On,8611:On,8619:Pt,8620:Pt,8621:[-.13313,.37788,0,0,1.38889],8622:Vi,8624:zt,8625:zt,8630:rn,8631:rn,8634:cn,8635:cn,8638:Vn,8639:Vn,8642:Vn,8643:Vn,8644:Nn,8646:Nn,8647:Nn,8648:Qe,8649:Nn,8650:Qe,8651:At,8652:At,8653:Vi,8654:Vi,8655:Vi,8666:rt,8667:rt,8669:[-.13313,.37788,0,0,1],8672:pt,8674:pt,8705:[0,.825,0,0,.5],8708:xr,8709:Rt,8717:[0,.43056,0,0,.42917],8722:va,8724:[.08198,.69224,0,0,.77778],8726:Rt,8733:qt,8736:We,8737:We,8738:[.03517,.52239,0,0,.72222],8739:Ni,8740:[.25142,.74111,0,0,.27778],8741:fa,8742:[.25142,.74111,0,0,.5],8756:mt,8757:mt,8764:Dt,8765:[-.13313,.37788,0,0,.77778],8769:Dt,8770:Qi,8774:Wn,8776:pa,8778:Rt,8782:gt,8783:gt,8785:cn,8786:cn,8787:cn,8790:qt,8791:Jn,8796:[.08198,.91667,0,0,.77778],8806:Yt,8807:Yt,8808:Rn,8809:Rn,8812:[.25583,.75583,0,0,.5],8814:br,8815:br,8816:Wn,8817:Wn,8818:Jn,8819:Jn,8822:or,8823:or,8828:lr,8829:lr,8830:Jn,8831:Jn,8832:br,8833:br,8840:Wn,8841:Wn,8842:Rr,8843:Rr,8847:bn,8848:bn,8858:cn,8859:cn,8861:cn,8862:An,8863:An,8864:An,8865:An,8872:[0,.69224,0,0,.61111],8873:We,8874:[0,.69224,0,0,.88889],8876:Ei,8877:Ei,8878:ci,8879:ci,8882:bn,8883:bn,8884:lr,8885:lr,8888:[0,.54986,0,0,1.11111],8890:zr,8891:hi,8892:hi,8901:[0,.54986,0,0,.27778],8903:Rt,8905:Rt,8906:Rt,8907:qt,8908:qt,8909:[-.03598,.46402,0,0,.77778],8910:xi,8911:xi,8912:bn,8913:bn,8914:ai,8915:ai,8916:mt,8918:sr,8919:sr,8920:vi,8921:vi,8922:ur,8923:ur,8926:lr,8927:lr,8928:Wn,8929:Wn,8934:Qr,8935:Qr,8936:Qr,8937:Qr,8938:br,8939:br,8940:Wn,8941:Wn,8994:kn,8995:kn,9416:[.15559,.69224,0,0,.90222],9484:zt,9488:zt,9492:ia,9496:ia,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:An,9633:An,9650:zi,9651:zi,9654:bn,9660:zi,9661:zi,9664:bn,9674:Ji,9733:[.19444,.69224,0,0,.94445],10003:Ma,10016:Ma,10731:Ji,10846:[.19444,.75583,0,0,.61111],10877:lr,10878:lr,10885:Yt,10886:Yt,10887:Rr,10888:Rr,10889:Zi,10890:Zi,10891:xa,10892:xa,10901:lr,10902:lr,10933:Rn,10934:Rn,10935:Zi,10936:Zi,10937:Zi,10938:Zi,10949:Yt,10950:Yt,10955:aa,10956:aa,57350:Ni,57351:fa,57352:Rt,57353:Ta,57356:Rn,57357:Rn,57358:ga,57359:Wn,57360:Wn,57361:ga,57366:Rn,57367:Rn,57368:Rn,57369:Rn,57370:Rr,57371:Rr},"Caligraphic-Regular":{32:Pr,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:Pr},"Fraktur-Regular":{32:Pr,33:[0,.69141,0,0,.29574],34:tn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Hi,41:Hi,42:[0,.62119,0,0,.27764],43:Ia,44:Oa,45:Ia,46:Oa,47:[.24982,.74947,0,0,.50181],48:wa,49:wa,50:wa,51:_i,52:_i,53:_i,54:Mt,55:_i,56:Mt,57:_i,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:wt,93:wt,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:Pr,8216:tn,8217:tn,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:Pr,33:[0,.69444,0,0,.35],34:kt,35:[.19444,.69444,0,0,.95833],36:gn,37:[.05556,.75,0,0,.95833],38:Tr,39:Ri,40:vn,41:vn,42:[0,.75,0,0,.575],43:Oe,44:[.19444,.15556,0,0,.31944],45:Yc,46:[0,.15556,0,0,.31944],47:Zr,48:Kn,49:Kn,50:Kn,51:Kn,52:Kn,53:Kn,54:Kn,55:Kn,56:Kn,57:Kn,58:He,59:[.19444,.44444,0,0,.31944],60:Ar,61:Qn,62:Ar,63:[0,.69444,0,0,.54305],64:Tr,65:Xr,66:[0,.68611,0,0,.81805],67:ct,68:[0,.68611,0,0,.88194],69:Do,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Hr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Ve,77:[0,.68611,0,0,1.09166],78:Hr,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:Xr,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:wi,92:Zr,93:wi,94:Xi,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:ki,99:Wi,100:ki,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:ki,105:Ri,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Ri,109:[0,.44444,0,0,.95833],110:oa,111:Va,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:oa,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:Wi,123:Zr,124:wi,125:Zr,126:[.35,.34444,0,0,.575],160:Pr,163:[0,.69444,0,0,.86853],168:Xi,172:[0,.44444,0,0,.76666],176:Ke,177:Oe,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Oe,216:[.04861,.73472,0,0,.89444],223:mo,230:[0,.44444,0,0,.83055],247:Oe,248:[.09722,.54167,0,0,.575],305:He,338:[0,.68611,0,0,1.16944],339:Xn,567:[.19444,.44444,0,0,.35139],710:Xi,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Xi,715:Xi,728:Xi,729:Ri,730:Ke,732:Xi,733:Xi,915:Ve,916:Pn,920:yt,923:as,926:_r,928:Hr,931:ct,933:yt,934:ct,936:yt,937:ct,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Ri,8217:Ri,8220:kt,8221:kt,8224:sn,8225:sn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:zo,8465:dn,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:dn,8501:Ae,8592:Gn,8593:pr,8594:Gn,8595:pr,8596:Gn,8597:Zr,8598:Hn,8599:Hn,8600:Hn,8601:Hn,8636:Gn,8637:Gn,8640:Gn,8641:Gn,8656:Gn,8657:Cn,8658:Gn,8659:Cn,8660:Gn,8661:[.25,.75,0,0,.70277],8704:ki,8706:[0,.69444,.06389,0,.62847],8707:ki,8709:gn,8711:Pn,8712:Fn,8715:Fn,8722:Oe,8723:Oe,8725:Zr,8726:Zr,8727:qe,8728:dr,8729:dr,8730:[.18,.82,0,0,.95833],8733:Xn,8734:[0,.44444,0,0,1.14999],8736:We,8739:wi,8741:Zr,8743:Zn,8744:Zn,8745:Zn,8746:Zn,8747:[.19444,.69444,.12778,0,.56875],8764:Qn,8768:[.19444,.69444,0,0,.31944],8771:Ze,8776:[.02444,.52444,0,0,.89444],8781:Ze,8801:Ze,8804:ze,8805:ze,8810:xe,8811:xe,8826:Ar,8827:Ar,8834:Ar,8835:Ar,8838:ze,8839:ze,8846:Zn,8849:ze,8850:ze,8851:Zn,8852:Zn,8853:Oe,8854:Oe,8855:Oe,8856:Oe,8857:Oe,8866:Ae,8867:Ae,8868:Tr,8869:Tr,8900:dr,8901:[-.02639,.47361,0,0,.31944],8902:qe,8968:Xe,8969:Xe,8970:Xe,8971:Xe,8994:St,8995:St,9651:Ft,9657:qe,9661:Ft,9667:qe,9711:Hn,9824:Wt,9825:Wt,9826:Wt,9827:Wt,9837:[0,.75,0,0,.44722],9838:an,9839:an,10216:vn,10217:vn,10815:Hr,10927:ze,10928:ze,57376:na},"Main-BoldItalic":{32:Pr,33:[0,.69444,.11417,0,.38611],34:jn,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:qn,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:nn,49:nn,50:nn,51:nn,52:Ot,53:nn,54:nn,55:Ot,56:nn,57:nn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:er,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:un,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:un,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:Sn,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:hn,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:hn,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:Pr,168:[0,.69444,.11473,0,.59111],176:fr,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:zn,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:zn,567:[.19444,.44444,.04611,0,.385],710:Sn,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:qn,730:fr,732:er,733:er,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:un,931:[0,.68611,.11431,0,.82666],933:mr,934:[0,.68611,.05632,0,.82666],936:mr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:qn,8217:qn,8220:[0,.69444,.16772,0,.62055],8221:jn},"Main-Italic":{32:Pr,33:ar,34:jr,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:ar,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Mr,49:Mr,50:Mr,51:Mr,52:Nr,53:Mr,54:Mr,55:Nr,56:Mr,57:Mr,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Ur,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:rr,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:rr,79:ui,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:rr,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:mi,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:Dr,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:Dr,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:Pr,168:[0,.66786,.10474,0,.51111],176:ri,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:$r,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:$r,710:mi,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:ri,732:[0,.66786,.11585,0,.51111],733:Ur,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:ui,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:rr,931:[0,.68333,.12028,0,.71555],933:pi,934:[0,.68333,.05986,0,.71555],936:pi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:ar,8217:ar,8220:[0,.69444,.1685,0,.51444],8221:jr,8463:ba},"Main-Regular":{32:Pr,33:Gr,34:Wr,35:ql,36:ja,37:$a,38:Yr,39:Gr,40:wr,41:wr,42:Ca,43:yi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:$i,48:Fr,49:Fr,50:Fr,51:Fr,52:Fr,53:Fr,54:Fr,55:Fr,56:Fr,57:Fr,58:ji,59:[.19444,.43056,0,0,.27778],60:sr,61:Dt,62:sr,63:Ua,64:Yr,65:fi,66:[0,.68333,0,0,.70834],67:Bi,68:[0,.68333,0,0,.76389],69:ha,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:fi,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:ua,76:Ki,77:[0,.68333,0,0,.91667],78:fi,79:ua,80:ha,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Bi,85:fi,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:fi,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:ei,92:$i,93:ei,94:Wr,95:[.31,.12056,.02778,0,.5],97:vr,98:Yi,99:qr,100:Yi,101:qr,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Yi,105:ti,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Gr,109:[0,.43056,0,0,.83334],110:Li,111:vr,112:zr,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:Li,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:qr,123:$i,124:ei,125:$i,126:[.35,.31786,0,0,.5],160:Pr,163:[0,.69444,0,0,.76909],167:Ui,168:qi,172:[0,.43056,0,0,.66667],176:ta,177:yi,182:za,184:Xl,198:[0,.68333,0,0,.90278],215:yi,216:[.04861,.73194,0,0,.77778],223:Wr,230:[0,.43056,0,0,.72222],247:yi,248:[.09722,.52778,0,0,.5],305:ji,338:[0,.68333,0,0,1.01389],339:di,567:[.19444,.43056,0,0,.30556],710:Wr,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Wr,715:Wr,728:Wr,729:ti,730:ta,732:qi,733:Wr,915:Ki,916:Qa,920:ua,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:fi,931:Bi,933:ua,934:Bi,936:ua,937:Bi,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Gr,8217:Gr,8220:Wr,8221:Wr,8224:Ui,8225:Ui,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:ba,8465:sa,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:sa,8501:eo,8592:Vi,8593:Aa,8594:Vi,8595:Aa,8596:Vi,8597:$i,8598:da,8599:da,8600:da,8601:da,8614:[.011,.511,0,0,1],8617:Sa,8618:Sa,8636:Vi,8637:Vi,8640:Vi,8641:Vi,8652:[.011,.671,0,0,1],8656:Vi,8657:za,8658:Vi,8659:za,8660:Vi,8661:[.25,.75,0,0,.61111],8704:Yi,8706:[0,.69444,.05556,.08334,.5309],8707:Yi,8709:ja,8711:Qa,8712:Ra,8715:Ra,8722:yi,8723:yi,8725:$i,8726:$i,8727:uo,8728:la,8729:la,8730:[.2,.8,0,0,.83334],8733:di,8734:rn,8736:We,8739:ei,8741:$i,8743:Mi,8744:Mi,8745:Mi,8746:Mi,8747:[.19444,.69444,.11111,0,.41667],8764:Dt,8768:[.19444,.69444,0,0,.27778],8771:Qi,8773:[-.022,.589,0,0,1],8776:pa,8781:Qi,8784:[-.133,.67,0,0,.778],8801:Qi,8804:Rr,8805:Rr,8810:Ka,8811:Ka,8826:sr,8827:sr,8834:sr,8835:sr,8838:Rr,8839:Rr,8846:Mi,8849:Rr,8850:Rr,8851:Mi,8852:Mi,8853:yi,8854:yi,8855:yi,8856:yi,8857:yi,8866:eo,8867:eo,8868:Yr,8869:Yr,8872:[.249,.75,0,0,.867],8900:la,8901:[-.05555,.44445,0,0,.27778],8902:uo,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:_o,8969:_o,8970:_o,8971:_o,8994:ko,8995:ko,9136:to,9137:to,9651:Da,9657:uo,9661:Da,9667:uo,9711:da,9824:Br,9825:Br,9826:Br,9827:Br,9837:[0,.75,0,0,.38889],9838:gi,9839:gi,10216:wr,10217:wr,10222:to,10223:to,10229:[.011,.511,0,0,1.609],10230:ya,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:ya,10815:fi,10927:Rr,10928:Rr,57376:na},"Math-BoldItalic":{32:Pr,48:Va,49:Va,50:Va,51:Za,52:Za,53:Za,54:Kn,55:Za,56:Kn,57:Za,65:Xr,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:ea,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Do,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:zo,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Si,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:Pr,915:[0,.68611,.15972,0,.65694],916:Pn,920:[0,.68611,.03194,0,.86722],923:as,926:[0,.68611,.07458,0,.84125],928:ea,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:_r,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:Si,960:[0,.44444,.03704,0,.68241],961:Ci,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:Ci,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Pr,48:vr,49:vr,50:vr,51:Ai,52:Ai,53:Ai,54:Fr,55:Ai,56:Fr,57:Ai,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:Ja,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Ga,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Ko,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:Pr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ga,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Ja,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Ko,960:[0,.43056,.03588,0,.57003],961:jo,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:jo,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Pr,33:[0,.69444,0,0,.36667],34:Wo,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ba,40:us,41:us,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:_a,49:_a,50:_a,51:_a,52:_a,53:_a,54:_a,55:_a,56:_a,57:_a,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:ul,64:Bo,65:Bo,66:Bo,67:As,68:ds,69:[0,.69444,0,0,.64167],70:eo,71:Bo,72:ds,73:[0,.69444,0,0,.33056],74:ul,75:ms,76:no,77:[0,.69444,0,0,.97778],78:ds,79:ds,80:As,81:[.10556,.69444,0,0,.79445],82:As,83:eo,84:Bo,85:ms,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Bo,89:[0,.69444,.0275,0,.73334],90:vo,91:Ho,93:Ho,94:_a,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ts,99:[0,.45833,0,0,.48889],100:Ts,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ts,105:Is,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Is,109:[0,.45833,0,0,.86667],110:fo,111:[0,.45833,0,0,.55],112:qs,113:qs,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:fo,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:Pr,168:_a,176:Bo,180:_a,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:_a,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:_a,729:Ba,730:Bo,732:_a,733:_a,915:no,916:[0,.69444,0,0,.91667],920:bo,923:vo,926:Bo,928:ds,931:ds,933:bo,934:ds,936:bo,937:ds,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ba,8217:Ba,8220:Wo,8221:Wo},"SansSerif-Italic":{32:Pr,33:[0,.69444,.05733,0,.31945],34:yc,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:Ds,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Zo,45:[0,.44444,.01946,0,.33333],46:ts,47:[.25,.75,.13164,0,.5],48:So,49:So,50:So,51:So,52:So,53:So,54:So,55:So,56:So,57:So,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:Ha,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:xs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:os,77:[0,.69444,.08094,0,.875],78:xs,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Yl,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:Pr,168:[0,.67937,.06385,0,.5],176:vc,184:Xl,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Yl,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Xc,715:Wr,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:vc,732:[0,.67659,.08826,0,.5],733:Xc,915:[0,.69444,.13372,0,.54167],916:qc,920:[0,.69444,.07555,0,.77778],923:eo,926:[0,.69444,.12816,0,.66667],928:xs,931:[0,.69444,.11983,0,.72222],933:Ks,934:[0,.69444,.04603,0,.72222],936:Ks,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ds,8217:Ds,8220:[0,.69444,.14205,0,.5],8221:yc},"SansSerif-Regular":{32:Pr,33:[0,.69444,0,0,.31945],34:Wr,35:ql,36:ja,37:$a,38:[0,.69444,0,0,.75834],39:Gr,40:wr,41:wr,42:Ca,43:yi,44:Zo,45:[0,.44444,0,0,.33333],46:ts,47:$i,48:Ea,49:Ea,50:Ea,51:Ea,52:Ea,53:Ea,54:Ea,55:Ea,56:Ea,57:Ea,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Ua,64:Ha,65:Ha,66:Ha,67:ki,68:[0,.69444,0,0,.72223],69:mo,70:[0,.69444,0,0,.56945],71:Ha,72:Hs,73:Gr,74:Ua,75:[0,.69444,0,0,.69445],76:os,77:[0,.69444,0,0,.875],78:Hs,79:[0,.69444,0,0,.73611],80:ki,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Yi,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:Ha,89:[0,.69444,.025,0,.66667],90:eo,91:gs,93:gs,94:Wr,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Jl,99:Ud,100:Jl,101:Ud,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Jl,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:Uu,111:[0,.44444,0,0,.5],112:jd,113:jd,114:[0,.44444,.01389,0,.34167],115:Yc,116:[0,.57143,0,0,.36111],117:Uu,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:Pr,168:[0,.67937,0,0,.5],176:Ha,184:Xl,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Wr,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Wr,715:Wr,728:Wr,729:[0,.67937,0,0,.27778],730:Ha,732:[0,.67659,0,0,.5],733:Wr,915:os,916:qc,920:Yr,923:eo,926:Ha,928:Hs,931:sa,933:Yr,934:sa,936:Yr,937:sa,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Gr,8217:Gr,8220:Wr,8221:Wr},"Script-Regular":{32:Pr,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:Pr},"Size1-Regular":{32:Pr,40:Vd,41:Vd,47:Jc,91:Qc,92:Jc,93:Qc,123:ju,125:ju,160:Pr,710:bc,732:bc,770:bc,771:bc,8214:[-99e-5,.601,0,0,.77778],8593:eu,8595:eu,8657:Vu,8659:Vu,8719:Ql,8720:Ql,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:xc,8748:Gd,8749:Gd,8750:xc,8896:Vo,8897:Vo,8898:Vo,8899:Vo,8968:Pl,8969:Pl,8970:Pl,8971:Pl,9168:uu,10216:Pl,10217:Pl,10752:Gu,10753:Gu,10754:Gu,10756:Vo,10758:Vo},"Size2-Regular":{32:Pr,40:Xu,41:Xu,47:vs,91:qa,92:vs,93:qa,123:Ms,125:Ms,160:Pr,710:Ps,732:Ps,770:Ps,771:Ps,8719:Js,8720:Js,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:tu,8748:Yu,8749:Yu,8750:tu,8896:Ol,8897:Ol,8898:Ol,8899:Ol,8968:nu,8969:nu,8970:nu,8971:nu,10216:ru,10217:ru,10752:Nl,10753:Nl,10754:Nl,10756:Ol,10758:Ol},"Size3-Regular":{32:Pr,40:qu,41:qu,47:iu,91:Qs,92:iu,93:Qs,123:wc,125:wc,160:Pr,710:Sc,732:Sc,770:Sc,771:Sc,8730:[.95003,1.45,0,0,1],8968:au,8969:au,8970:au,8971:au,10216:wc,10217:wc},"Size4-Regular":{32:Pr,40:Cc,41:Cc,47:ou,91:Ju,92:ou,93:Ju,123:su,125:su,160:Pr,710:Ec,732:Ec,770:Ec,771:Ec,8730:[1.25003,1.75,0,0,1],8968:lu,8969:lu,8970:lu,8971:lu,9115:cu,9116:Mc,9117:cu,9118:cu,9119:Mc,9120:cu,9121:du,9122:uu,9123:du,9124:du,9125:uu,9126:du,9127:Xd,9128:Qu,9129:Rl,9130:[0,.3,0,0,.88889],9131:Xd,9132:Qu,9133:Rl,9143:[.88502,.915,0,0,1.05556],10216:su,10217:su,57344:fu,57345:fu,57680:Bl,57681:Bl,57682:Bl,57683:Bl},"Typewriter-Regular":{32:_c,33:oi,34:oi,35:oi,36:ws,37:ws,38:oi,39:oi,40:ws,41:ws,42:[0,.52083,0,0,.525],43:ed,44:[.13889,.125,0,0,.525],45:ed,46:[0,.125,0,0,.525],47:ws,48:oi,49:oi,50:oi,51:oi,52:oi,53:oi,54:oi,55:oi,56:oi,57:oi,58:ss,59:[.13889,.43056,0,0,.525],60:Yd,61:[-.19549,.41562,0,0,.525],62:Yd,63:oi,64:oi,65:oi,66:oi,67:oi,68:oi,69:oi,70:oi,71:oi,72:oi,73:oi,74:oi,75:oi,76:oi,77:oi,78:oi,79:oi,80:oi,81:[.13889,.61111,0,0,.525],82:oi,83:oi,84:oi,85:oi,86:oi,87:oi,88:oi,89:oi,90:oi,91:ws,92:ws,93:ws,94:oi,95:[.09514,0,0,0,.525],96:oi,97:ss,98:oi,99:ss,100:oi,101:ss,102:oi,103:Po,104:oi,105:oi,106:[.22222,.61111,0,0,.525],107:oi,108:oi,109:ss,110:ss,111:ss,112:Po,113:Po,114:ss,115:ss,116:[0,.55358,0,0,.525],117:ss,118:ss,119:ss,120:ss,121:Po,122:ss,123:ws,124:ws,125:ws,126:oi,127:oi,160:_c,176:oi,184:[.19445,0,0,0,.525],305:ss,567:Po,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:oi,715:oi,728:oi,730:oi,770:oi,771:oi,776:oi,915:oi,916:oi,920:oi,923:oi,926:oi,928:oi,931:oi,933:oi,934:oi,936:oi,937:oi,8216:oi,8217:oi,8242:oi,9251:[.11111,.21944,0,0,.525]}},Jd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,$l=10,ls=.25,hu=1.2,el=.431,td={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[el,el,el],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[ls,ls,ls],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},pu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dl=5,nd={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function tl(a,y){a===void 0&&(a=77);const b=qd[y][a];if(b)return{defaultMetrics:!1,depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]};if(a===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const E=String.fromCodePoint(a);if(E in nd)a=nd[E].codePointAt(0);else if(Jd.test(E))return a=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var mu={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Fl={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Qd={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
c -179 0 -524 -115 -524 -115
c -5 -1 -9 -5 -9 -10
c 0 -1 1 -2 1 -3
l 4 -22
c 1 -5 5 -9 11 -9
h 2
s 338 93 512 92
c 174 0 513 -92 513 -92
h 2
c 5 0 9 4 11 9
l 5 22
c 1 6 -2 12 -8 13
c 0 0 -342 115 -520 115
z
`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function ec(a){if(Fl[a]){const[be,Ce,$e]=Fl[a],nt=`<span class="stretchy" style="height:${$e}em"><svg width="100%" height="${$e}em" viewBox="0 0 ${be} ${Ce}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*$e/2)/100}em;min-width:0">${nt}</span>`}const[y,b,E,ee]=mu[a];let re,ae;const fe=E/1e3;y.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const ge=y.map((be,Ce)=>`<span class="${re[Ce]}" style=height:${fe}em><svg width=400em height=${fe}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[Ce]} slice"><path fill="currentcolor" d="${Qd[be]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${fe}em;min-width:${b}em;">${ge}</span>`}function ef(a){return mu[a]?mu[a][2]/1e3:Fl[a][2]}function tf(a){const y=[];for(let b=0;b<a.length;b++){let E=a.charCodeAt(b);if(E===13&&a.charCodeAt(b+1)===10&&(E=10,b++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(b+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Dl(2,16)+re*Dl(2,10)+ae,b++}}y.push(E)}return y}var kc=8205,Lc=[[kc,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,tc=[127462,127487];function nc(a){var y;if(fl===void 0){fl={};for(const b of Lc)for(let E=b[0];E<=b[0]+b[1]-1;E++)fl[E]=!0}return(y=fl[a])!=null?y:!1}function nf(a){return a>=tc[0]&&a<=tc[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=tf(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===kc){const ae=E-1;for(E+=2;b[E]===kc;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(nc(re)){const ae=E-1;for(;nc(b[E]);)E+=b[E]===kc?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var af=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rf(a)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(a){const y=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return y!=null&&y[0]?(this.pos+=y[0].length,y[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const a=this.get();if(a==="\\"){if(!this.end()){let y=this.match(/^[a-zA-Z\*]+/);return y?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):y=this.get(),"\\"+y}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const y=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(y)return String.fromCodePoint(Number.parseInt(y.slice(y.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let y=!1;if(/[\d?@]/.test(this.peek())&&(y=!0,this.pos+1<this.s.length)){const b=this.s[this.pos+1];y=/[^\dA-Za-z]/.test(b)}return y?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function hl(a,y){var b,E,ee,re;const ae=[];let fe=a.next();if(fe&&fe!=="\\relax"){if(fe==="\\noexpand")fe=a.next(),fe&&ae.push(fe);else if(fe==="\\obeyspaces")a.obeyspaces=!0;else if(fe==="\\bgroup")ae.push("<{>");else if(fe==="\\egroup")ae.push("<}>");else if(fe==="\\string"){if(fe=a.next(),fe)if(fe.startsWith("\\"))for(const ge of fe)ae.push(ge==="\\"?"\\backslash":ge);else fe==="<{>"?ae.push("\\{"):fe==="<space>"?ae.push("~"):fe==="<}>"&&ae.push("\\}")}else if(fe==="\\csname"){for(;a.peek()==="<space>";)a.next();let ge="",be=!1,Ce=[];do{if(Ce.length===0)if(/^#[\d?@]$/.test(a.peek())){const $e=a.get().slice(1);Ce=nl((E=(b=y==null?void 0:y($e))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),fe=Ce[0]}else fe=a.next(),Ce=fe?[fe]:[];be=Ce.length===0,!be&&fe==="\\endcsname"&&(be=!0,Ce.shift()),be||(be=fe==="<$>"||fe==="<$$>"||fe==="<{>"||fe==="<}>"||typeof fe=="string"&&fe.length>1&&fe.startsWith("\\")),be||(ge+=Ce.shift())}while(!be);ge&&ae.push("\\"+ge),ae.push(...Ce)}else if(fe!=="\\endcsname")if(fe.length>1&&fe.startsWith("#")){const ge=fe.slice(1);ae.push(...nl((re=(ee=y==null?void 0:y(ge))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(fe)}return ae}function nl(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const fe=ae.match(/((?:\\%)|[^%])*/);fe!==null&&b.push(fe[0])}const ee=new af(ot(b.join(""))),re=[];do re.push(...hl(ee,y));while(!ee.end());return re}function ka(a){let y="";const b=[];for(const E of a)E&&(y&&/^[a-zA-Z\*]/.test(E)&&b.push(y),b.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&b.push(" "),y=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return b.join("")}function ho(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ka([a,...y.map(b=>`{${b}}`)])}function pl(a){return ka(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var of=class Zd{constructor(y){Zd._registry[y]=this}static createAtom(y,b,E){return Zd._registry[y].createAtom(b,Cr(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of sf(y)){const ae=Zd._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return ka(ee)}return ka(th(y,b))}static getFont(y,b,E){return Zd._registry[y].getFont(b,E)}};of._registry={};var Ss=of;function sf(a){const y=[];let b=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(b.length>0&&y.push(b),b=[ee],E=ee.mode):b.push(ee));return b.length>0&&y.push(b),y}function Lo(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;y==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[y],ae===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=ae)}return E.length>0&&b.push(E),b}function rd(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const fe=y.defaultMode;for(const ge of Lo(ae,"color")){const be=ge[0].computedStyle,Ce=Ss._registry[ge[0].mode].serialize(ge,me(Se({},y),{defaultMode:fe==="text"?"text":"math"}));!y.skipStyles&&be.color&&be.color!=="none"&&(!E||ee!==be.color)?re.push(ho("\\textcolor",(b=be.verbatimColor)!=null?b:be.color,ka(Ce))):re.push(ka(Ce))}}return re}function eh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Lo(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const ae=ee[0].computedStyle;if(ae.backgroundColor&&ae.backgroundColor!=="none"&&(!b||E!==ae.backgroundColor))return ho("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,ka(rd(ee,me(Se({},y),{defaultMode:"text"}))))}return ka(rd(ee,y))})}function th(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ee=[];for(const re of Lo(a,"fontSize")){const ae=re[0].computedStyle.fontSize,fe=eh(re,y);fe&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...fe):ee.push(...fe))}return ee}function id(a){return a?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[a]:void 0}function rc(a){if(a.length===0)return"ord";const y=id(a[0].type),b=id(a[a.length-1].type);return y&&y===b?y:"ord"}function ic(a,y){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const b=Math.ceil(100*a)/100;return b===0?"0":b.toString()+(y!=null?y:"")}return""}var Er=class Ep{constructor(y,b){var E,ee,re,ae,fe;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Re(y)?this.children=y.filter(be=>be!==null):y&&y instanceof Ep&&(this.children=[y]),this.children)for(const be of this.children)be.parent=this;this.type=(E=b==null?void 0:b.type)!=null?E:"ignore",this.isSelected=(b==null?void 0:b.isSelected)===!0,b!=null&&b.caret&&(this.caret=b.caret),this.classes=(ee=b==null?void 0:b.classes)!=null?ee:"",this.isTight=(re=b==null?void 0:b.isTight)!=null?re:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let ge=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(ge=(fe=Ss.getFont((ae=b.mode)!=null?ae:"math",this,me(Se({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?fe:void 0),ge||(ge="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(b==null?void 0:b.maxFontSize)!==void 0&&(this.maxFontSize=b.maxFontSize),Ac(this,ge)}set atomID(y){y===void 0||y.length===0||(this.id=y)}selected(y){if(this.isSelected!==y&&(this.isSelected=y,this.children))for(const b of this.children)b.selected(y)}setStyle(y,b,E){if(b===void 0)return;const ee=ic(b,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ee)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ic(y,"em"),this.height-=y,this.depth+=y)}get left(){var y;return(y=this.cssProperties)!=null&&y["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ic(y,"em")))}set right(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ic(y,"em")))}set bottom(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ic(y,"em")))}get width(){return this._width*this.scale}set width(y){this._width=y,this.hasExplicitWidth=!0}set softWidth(y){}get height(){return this._height*this.scale}set height(y){this._height=y}get depth(){return this._depth*this.scale}set depth(y){this._depth=y}wrap(y){const b=y.parent;if(!b)return this;y.isPhantom&&this.setStyle("opacity",0);const E=y.color;E&&E!==b.color&&this.setStyle("color",E);let ee=y.backgroundColor;this.isSelected&&(ee=yn(ee)),ee&&ee!==b.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=y.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var y,b,E,ee;let re=(y=this.value)!=null?y:"";if(this.children)for(const xt of this.children)re+=xt.toMarkup();let ae="";if(this.svgBody)ae=ec(this.svgBody);else if(this.svgOverlay){ae='<span style="',ae+="display: inline-block;",ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,ae+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,ae+='">',ae+=re,ae+="</span>",ae+='<svg style="position:absolute;overflow:visible;',ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const xt=(b=this.cssProperties)==null?void 0:b.padding;xt?(ae+=`top:${xt};`,ae+=`left:${xt};`,ae+=`width:calc(100% - 2 * ${xt} );`):ae+="top:0;left:0;width:100%;",ae+="z-index:2;",ae+='"',this.svgStyle&&(ae+=this.svgStyle),ae+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,ae+=`>${this.svgOverlay}</svg>`}let fe="";const ge=this.classes.split(" ");ge.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&ge.push("ML__latex-caret"),this.isSelected&&ge.push("ML__selected");const be=ge.length===1?ge[0]:ge.filter((xt,Tt,Tn)=>xt.length>0&&Tn.indexOf(xt)===Tt).join(" ");if(be.length>0&&(fe+=` class="${be}"`),this.id&&(fe+=` data-atom-id=${this.id}`),this.cssId&&(fe+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(fe+=" "+Object.keys(this.attributes).map(xt=>`${xt}="${this.attributes[xt]}"`).join(" ")),this.htmlData){const xt=this.htmlData.split(",");for(const Tt of xt){const Tn=Tt.match(/([^=]+)=(.+$)/);if(Tn){const Sr=Tn[1].trim().replace(/ /g,"-");Sr&&(fe+=` data-${Sr}="${Tn[2]}" `)}else{const Sr=Tt.trim().replace(/ /g,"-");Sr&&(fe+=` data-${Sr} `)}}}const Ce=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&Ce.width===void 0&&(Ce.width=`${Math.ceil(this._width*100)/100}em`);const $e=Object.keys(Ce).map(xt=>`${xt}:${Ce[xt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&$e.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const xt=this.htmlStyle.split(";");let Tt="";for(const Tn of xt){const Sr=Tn.match(/([^=]+):(.+$)/);if(Sr){const _n=Sr[1].trim().replace(/ /g,"-");_n&&(Tt+=`${_n}:${Sr[2]};`)}}Tt&&(fe+=` style="${Tt}"`)}$e.length>0&&(fe+=` style="${$e.join(";")}"`);let nt="";return fe.length>0||ae.length>0?nt=`<span${fe}>${re}${ae}</span>`:nt=re,this.caret==="text"?nt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(nt+='<span class="ML__caret"></span>'),nt}tryCoalesceWith(y){if(this.svgBody||!this.value||y.svgBody||!y.value)return!1;const b=this.children&&this.children.length>0,E=y.children&&y.children.length>0;if(b||E)return!1;if(y.cssProperties||this.cssProperties){for(const ge of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&ge in y.cssProperties||this.cssProperties&&ge in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=y.cssProperties?Object.keys(y.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const ge of Object.keys(this.cssProperties))if(this.cssProperties[ge]!==y.cssProperties[ge])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),fe=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==fe.length)return!1;ae.sort(),fe.sort();for(const[ge,be]of ae.entries())if(be==="vertical-separator"||be!==fe[ge])return!1;return this.value+=y.value,this.height=Math.max(this.height,y.height),this.depth=Math.max(this.depth,y.depth),this._width=this._width+y._width,this.maxFontSize=Math.max(this.maxFontSize,y.maxFontSize),this.italic=y.italic,!0}};function ad(a){if(!a||a.length===0)return[];a[0].children=ad(a[0].children);const y=[a[0]];for(let b=1;b<a.length;b++)y[y.length-1].tryCoalesceWith(a[b])||(a[b].children=ad(a[b].children),y.push(a[b]));return y}function gu(a){return a.children&&(a.children=ad(a.children)),a}function vu(a,y){if(!a)return new Er(null,y);const b=new Er(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const ee=new Er(null,{classes:"ML__strut--bottom",type:"ignore"});ee.setStyle("height",a.height+a.depth,"em"),ee.setStyle("vertical-align",-a.depth,"em"),E.push(ee)}return E.push(a),new Er(E,me(Se({},y),{type:"lift"}))}function Os(a){const y=ef(a)/2,b=new Er(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function Ac(a,y){var b;if(a.type==="latex"){a.height=.9,a.depth=.2,a._width=1;return}if(a.value){a.height=-1/0,a.depth=-1/0,a._width=0,a.skew=-1/0,a.italic=-1/0;for(let E=0;E<a.value.length;E++){const ee=tl(a.value.codePointAt(E),y);a.height=Math.max(a.height,ee.height),a.depth=Math.max(a.depth,ee.depth),a._width+=ee.width,a.skew=ee.skew,a.italic=ee.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ee=-1/0,re=0;for(const ae of a.children)ae.height>E&&(E=ae.height),ae.depth>ee&&(ee=ae.depth),re=Math.max(re,(b=ae.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,fe)=>ae+fe.width,0),a.maxFontSize=re}}function yu(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ee=-b.shift-b.box.depth;let re=ee;for(let ae=1;ae<y.length;ae++){const fe=y[ae],ge=-fe.shift-re-fe.box.depth,be=ge-(b.box.height+b.box.depth);re=re+ge,E.push(be),E.push(fe),b=fe}return[E,ee]}if("top"in a){let y=a.top;for(const b of a.children)y-=typeof b=="number"?b:b.box.height+b.box.depth;return[a.children,y]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const y=a.firstBaseline[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-y.box.depth]}else if("shift"in a){const y=a.children[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.children,-y.box.depth-a.shift]}}return[null,0]}function Tc(a){var y;const[b,E]=yu(a);if(!b)return[[],0,0];const ee=new Er(null,{classes:"pstrut"});let re=0;for(const Tt of b)if(typeof Tt!="number"){const Tn=Tt.box;re=Math.max(re,Tn.maxFontSize,Tn.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let fe=E,ge=E,be=E,Ce=0;for(const Tt of b){if(typeof Tt=="number")be+=Tt;else{const Tn=Tt.box,Sr=(y=Tt.classes)!=null?y:[],_n=new Er([ee,Tn],{classes:Sr.join(" "),style:Tt.style});Tn.setStyle("height",Tn.height+Tn.depth,"em"),Tn.setStyle("display","inline-block"),_n.setStyle("top",-re-be-Tn.depth,"em"),Tt.marginLeft&&_n.setStyle("margin-left",Tt.marginLeft,"em"),Tt.marginRight&&_n.setStyle("margin-right",Tt.marginRight,"em"),ae.push(_n),be+=Tn.height+Tn.depth,Ce=Math.max(Ce,_n.width)}fe=Math.min(fe,be),ge=Math.max(ge,be)}ae.forEach(Tt=>{Tt.softWidth=Ce});const $e=new Er(ae,{classes:"vlist"});if($e.softWidth=Ce,$e.height=ge,$e.setStyle("height",ge,"em"),fe>=0)return[[new Er($e,{classes:"vlist-r"})],ge,-fe];const nt=new Er(new Er(null),{classes:"vlist"});nt.height=-fe,nt.setStyle("height",-fe,"em");const xt=new Er(8203,{classes:"vlist-s",maxFontSize:0});return xt.softWidth=0,xt.height=0,xt.depth=0,[[new Er([$e,xt],{classes:"vlist-r"}),new Er(nt,{classes:"vlist-r"})],ge,-fe]}var ao=class extends Er{constructor(a,y){var b;const[E,ee,re]=Tc(a);super(E.length===1?E[0]:E,{type:y==null?void 0:y.type,classes:((b=y==null?void 0:y.classes)!=null?b:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,fe)=>Math.max(ae,fe.width),0)}};function nh(a,y){var b,E,ee,re,ae;const fe=a.metrics,ge=new Er(y.base),be=(b=y.baseShift)!=null?b:0,Ce=(E=y.slant)!=null?E:0;let $e=0,nt=0;y.above&&($e=(ee=y.aboveShift)!=null?ee:Math.max(fe.bigOpSpacing1,fe.bigOpSpacing3-y.above.depth)),y.below&&(nt=(re=y.belowShift)!=null?re:Math.max(fe.bigOpSpacing2,fe.bigOpSpacing4-y.below.height));let xt=null;if(y.below&&y.above){const Tt=fe.bigOpSpacing5+y.below.height+y.below.depth+nt+ge.depth+be;xt=new ao({bottom:Tt,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-Ce,classes:["ML__center"]},nt,{box:ge,classes:["ML__center"]},$e,{box:y.above,marginLeft:Ce,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)xt=new ao({top:ge.height-be,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-Ce,classes:["ML__center"]},nt,{box:ge,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const Tt=ge.depth+be;xt=new ao({bottom:Tt,children:[{box:ge,classes:["ML__center"]},$e,{box:y.above,marginLeft:Ce,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else{const Tt=ge.depth+be;xt=new ao({bottom:Tt,children:[{box:ge},fe.bigOpSpacing5]}).wrap(a)}return new Er(xt,{type:(ae=y.type)!=null?ae:"op"})}var od=7,rl=6,Ic=5,ml=4,zl=3,cs=2,_s=1,Go=0,Ws=class{constructor(a,y,b){this.id=a,this.sizeDelta=y,this.cramped=b;const E={"-4":2,"-3":1,0:0}[y];this.metrics=Object.keys(td).reduce((ee,re)=>me(Se({},ee),{[re]:td[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Zs[[Go,_s,Go,_s,cs,zl,cs,zl][this.id]]}get sub(){return Zs[[Go,Go,Go,Go,cs,cs,cs,cs][this.id]]}get fracNum(){return Zs[[Go,_s,Go,_s,cs,zl,ml,Ic][this.id]]}get fracDen(){return Zs[[Go,Go,Go,Go,cs,cs,ml,ml][this.id]]}get cramp(){return Zs[[Go,Go,cs,cs,ml,ml,rl,rl][this.id]]}get isTight(){return this.sizeDelta<0}},Kl={7:new Ws(od,0,!1),6:new Ws(rl,0,!0),5:new Ws(Ic,0,!1),4:new Ws(ml,0,!0),3:new Ws(zl,-3,!1),2:new Ws(cs,-3,!0),1:new Ws(_s,-4,!1),0:new Ws(Go,-4,!0)},Zs=me(Se({},Kl),{displaystyle:Kl[od],textstyle:Kl[Ic],scriptstyle:Kl[zl],scriptscriptstyle:Kl[_s]});function ac(a,y){var b;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:$l,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(b=a.unit)!=null?b:"pt"];if(Number.isFinite(y)){const ee=Dl(10,y);return Math.round(a.dimension/$l*E*ee)/ee}return a.dimension*E}function sd(a,y){if(a===null)return 0;const b=ac(a)/$l;if(Number.isFinite(y)){const E=Dl(10,y);return Math.round(b*E)/E}return b}function ld(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function lf(a){let y=ld(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ld(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ld(a.shrink)}`),y}function Oo(a){var y,b;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(y=a.unit)!=null?y:"pt"}`),"glue"in a&&(E=lf(a)),"number"in a)if(!("base"in a)||a.base==="decimal")E=Number(a.number).toString();else if(a.base==="alpha")E=`\`${String.fromCodePoint(a.number)}`;else{const ee=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ee).toString(16).toUpperCase(),ee<=255?E=E.padStart(2,"0"):ee<=65535?E=E.padStart(4,"0"):ee<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ee).toString(8),ee<=63?E=E.padStart(2,"0"):ee<=30583?E=E.padStart(4,"0"):E=E.padStart(8,"0"),E=`'${E}`)}return"register"in a&&("factor"in a&&(a.factor===-1?E="-":a.factor!==1&&(E=Number(a.factor).toString())),"global"in a&&a.global&&(E+="\\global"),E+=`\\${a.register}`),"string"in a&&(E=a.string),(b=a.relax)!=null&&b&&(E+="\\relax"),E}function Us(a,y){return a==null?null:"number"in a?me(Se({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?me(Se({},a),{factor:a.factor*y}):me(Se({},a),{factor:y}):"dimension"in a?me(Se({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:Us(a.glue,y),shrink:Us(a.shrink,y),grow:Us(a.grow,y)}:a.shrink?{glue:Us(a.glue,y),shrink:Us(a.shrink,y)}:a.grow?{glue:Us(a.glue,y),grow:Us(a.grow,y)}:{glue:Us(a.glue,y)}:null}var rh={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function oc(){return Se({},rh)}function bu(){return{registers:oc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:tt.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:Bt,backgroundColorMap:at,getMacro:a=>Ii(a,ir())}}var Na=class Mp{constructor(y,b){var E,ee,re,ae,fe,ge,be,Ce,$e,nt,xt,Tt,Tn,Sr,_n;let tr;y!=null&&y.parent?(this.parent=y.parent,tr=y.parent,this.registers={}):(tr=Se(Se({},bu()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=tr.registers),tr.atomIdsSettings&&(this.atomIdsSettings=Se({},tr.atomIdsSettings)),this.renderPlaceholder=tr.renderPlaceholder,this.isPhantom=(ae=(re=y==null?void 0:y.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=tr.letterShapeStyle,this.minFontScale=tr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(ge=(fe=this.parent)==null?void 0:fe.color)!=null?ge:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(Ce=(be=this.parent)==null?void 0:be.backgroundColor)!=null?Ce:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==(($e=this.parent)==null?void 0:$e.size)?this.size=b.fontSize:this.size=(xt=(nt=this.parent)==null?void 0:nt.size)!=null?xt:dl;let kr=(Tn=(Tt=this.parent)==null?void 0:Tt.mathstyle)!=null?Tn:Zs.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(tr instanceof Mp)switch(y.mathstyle){case"cramp":kr=kr.cramp;break;case"superscript":kr=kr.sup;break;case"subscript":kr=kr.sub;break;case"numerator":kr=kr.fracNum;break;case"denominator":kr=kr.fracDen;break}switch(y.mathstyle){case"textstyle":kr=Zs.textstyle;break;case"displaystyle":kr=Zs.displaystyle;break;case"scriptstyle":kr=Zs.scriptstyle;break;case"scriptscriptstyle":kr=Zs.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=kr,this.smartFence=tr.smartFence,this.placeholderSymbol=tr.placeholderSymbol,this.colorMap=(Sr=tr.colorMap)!=null?Sr:cr=>cr,this.backgroundColorMap=(_n=tr.backgroundColorMap)!=null?_n:cr=>cr,this.getMacro=tr.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===od||this.mathstyle.id===rl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(pu[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(y){var b;if((b=this.registers)!=null&&b[y])return this.registers[y];if(this.parent)return this.parent.getRegister(y)}getRegisterAsNumber(y){const b=this.getRegister(y);if(typeof b=="number")return b;if(typeof b=="string")return Number(b)}getRegisterAsGlue(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E:typeof E=="object"&&"dimension"in E?{glue:{dimension:E.dimension}}:typeof E=="number"?{glue:{dimension:E}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(y)}getRegisterAsEm(y,b){return sd(this.getRegisterAsDimension(y),b)}getRegisterAsDimension(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E.glue:typeof E=="object"&&"dimension"in E?E:typeof E=="number"?{dimension:E}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(y)}setRegister(y,b){if(b===void 0){delete this.registers[y];return}this.registers[y]=b}evaluate(y){if(!y||!("register"in y))return y;let b=this;if("global"in y&&y.global)for(;b.parent;)b=b.parent;let E=1;"factor"in y&&y.factor!==1&&y.factor!==void 0&&(E=y.factor);const ee=b.getRegister(y.register);if(ee===void 0)return;if(typeof ee=="string")return{string:Number(ee).toString()+ee};if(typeof ee=="number")return{number:E*ee};const re=b.evaluate(ee);if(re!==void 0)return"string"in re?{string:Number(ee).toString()+re.string}:"number"in re?{number:E*re.number}:"dimension"in re?me(Se({},re),{dimension:E*re.dimension}):"glue"in re?me(Se({},re),{glue:me(Se({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?me(Se({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?me(Se({},re.grow),{dimension:E*re.grow.dimension}):void 0}):y}toDimension(y){const b=this.evaluate(y);return b===void 0?null:"dimension"in b?b:"glue"in b?b.glue:"number"in b?{dimension:b.number}:null}toEm(y,b){if(y===null)return 0;const E=this.toDimension(y);return E===null?0:ac(E,b)/$l}toNumber(y){if(y===null)return null;const b=this.evaluate(y);return b===void 0?null:"number"in b?b.number:"dimension"in b?b.dimension:"glue"in b?b.glue.dimension:"string"in b?Number(b.string):null}toColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.colorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}},sc=["body","above","below","superscript","subscript"];function il(a){return typeof a=="string"&&sc.includes(a)}function Dc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Un=class Vl{constructor(y){var b,E,ee,re,ae,fe;this.type=y.type,typeof y.value=="string"&&(this.value=y.value),this.command=(E=(b=y.command)!=null?b:this.value)!=null?E:"",this.mode=(ee=y.mode)!=null?ee:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=Se({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=y.captureSelection)!=null?ae:!1,this.skipBoundary=(fe=y.skipBoundary)!=null?fe:!1,y.verbatimLatex!==void 0&&y.verbatimLatex!==null&&(this.verbatimLatex=y.verbatimLatex),y.args&&(this.args=y.args),y.body&&(this.body=y.body),this._changeCounter=0}static createBox(y,b,E){var ee;if(!b)return null;const re=cf(b),ae=[];for(const ge of re){const be=ge[0].style,Ce=uf(y,ge,{style:{color:be.color,backgroundColor:be.backgroundColor,fontSize:be.fontSize}});Ce&&ae.push(Ce)}if(ae.length===0)return null;const fe=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!fe&&!(E!=null&&E.type)?ae[0].wrap(y):new Er(ae,{classes:fe,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Ss.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:ee}=y;for(;ee;)E.add(ee),ee=ee.parent;for(ee=b.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(y){return typeof y=="string"?new Vl({type:"mord",value:y,mode:"math"}):new Vl(y)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const y={};if(this.type&&(y.type=this.type),this.mode!=="math"&&(y.mode=this.mode),this.command&&this.command!==this.value&&(y.command=this.command),this.value!==void 0&&(y.value=this.value),this.style&&Object.keys(this.style).length>0&&(y.style=Se({},this.style)),this.verbatimLatex!==void 0&&(y.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),this.isFunction&&(y.isFunction=!0),this.displayContainsHighlight&&(y.displayContainsHighlight=!0),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.skipBoundary&&(y.skipBoundary=!0),this.captureSelection&&(y.captureSelection=!0),this.args&&(y.args=ud(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ka([ho(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ka([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Ss.serialize(this.body,me(Se({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Ss.serialize(this.above,y)}belowToLatex(y){return Ss.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=me(Se({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Ss.serialize(this.subscript,y);E.length===0?b+="_{}":E.length===1?/^[0-9]$/.test(E)?b+=`_${E}`:b+=`_{${E}}`:b+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=Ss.serialize(this.superscript,y);E.length===0?b+="^{}":E.length===1?E==="\u2032"?b+="^\\prime ":E==="\u2033"?b+="^\\doubleprime ":/^[0-9]$/.test(E)?b+=`^${E}`:b+=`^{${E}}`:b+=`^{${E}}`}return b}get treeDepth(){let y=1,b=this.parent;for(;b;)b=b.parent,y+=1;return y}get inCaptureSelection(){let y=this;for(;y;){if(y.captureSelection)return!0;y=y.parent}return!1}get parentPrompt(){let y=this.parent;for(;y;){if(y.type==="prompt"&&!y.captureSelection)return y;y=y.parent}return null}branch(y){if(il(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of sc)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(il(y)),il(y)?(this._branches?this._branches[y]||(this._branches[y]=[this.makeFirstAtom(y)]):this._branches={[y]:[this.makeFirstAtom(y)]},this.isDirty=!0,this._branches[y]):[]}get row(){return Dc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Dc(this.parentBranch)?this.parentBranch[1]:-1}get body(){var y;return(y=this._branches)==null?void 0:y.body}set body(y){this.setChildren(y,"body")}get superscript(){var y;return(y=this._branches)==null?void 0:y.superscript}set superscript(y){this.setChildren(y,"superscript")}get subscript(){var y;return(y=this._branches)==null?void 0:y.subscript}set subscript(y){this.setChildren(y,"subscript")}get above(){var y;return(y=this._branches)==null?void 0:y.above}set above(y){this.setChildren(y,"above")}get below(){var y;return(y=this._branches)==null?void 0:y.below}set below(y){this.setChildren(y,"below")}get computedStyle(){var y,b;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=Se(Se({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(y){this.isDirty=!0,this.style=Se(Se({},this.style),y),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const b of this.children)b.applyStyle(y)}getInitialBaseElement(){var y,b,E;return this.hasEmptyBranch("body")?this:(console.assert(((y=this.body)==null?void 0:y[0].type)==="first"),(E=(b=this.body[1])==null?void 0:b.getInitialBaseElement())!=null?E:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(y){const b=this.branch(y);return b?(console.assert(b.length>0),console.assert(b[0].type==="first"),b.length===1):!0}setChildren(y,b){var E;if(!y||(console.assert(il(b)),!il(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ee:this._branches={[b]:ee};for(const re of y)re.parent=this,re.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new Vl({type:"first",mode:this.mode});return b.parent=this,b.parentBranch=y,b}addChild(y,b){console.assert(y.type!=="first"),this.createBranch(b).push(y),this.isDirty=!0,y.parent=this,y.parentBranch=b}addChildBefore(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b),0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildAfter(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildren(y,b){const E=this.createBranch(b);for(const ee of y)ee.parent=this,ee.parentBranch=b,E.push(ee);this.isDirty=!0}addChildrenAfter(y,b){console.assert(y.length===0||y[0].type!=="first"),console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,...y),this.isDirty=!0;for(const ee of y)ee.parent=this,ee.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(il(y)&&(this._branches[y]=void 0),!b)return[];for(const E of b)E.parent=void 0,E.parentBranch=void 0;return console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}removeChild(y){if(console.assert(y.parent===this),y.type==="first")return;const b=this.branch(y.parentBranch),E=b.indexOf(y);console.assert(E>=0),b.splice(E,1),this.isDirty=!0,y.parent=void 0,y.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:y}=this;return y[y.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:y}=this;return y[y.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const y=[];for(const b of sc)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=Cr(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new Na({parent:y},this.style);let ee=this.createBox(E,{classes:this.parent?"":"ML__base"});return ee?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(ee=this.attachSupsub(E,{base:ee})),ee.wrap(E)):null}attachSupsub(y,b){var E;const ee=b.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let fe=null,ge=null;const be=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let Ce=0;if(re){const Tn=new Na({parent:y,mathstyle:"superscript"});fe=Vl.createBox(Tn,re),be||(Ce=ee.height-y.metrics.supDrop*Tn.scalingFactor)}let $e=0;if(ae){const Tn=new Na({parent:y,mathstyle:"subscript"});ge=Vl.createBox(Tn,ae),be||($e=ee.depth+y.metrics.subDrop*Tn.scalingFactor)}let nt;y.isDisplayStyle?nt=y.metrics.sup1:y.isCramped?nt=y.metrics.sup3:nt=y.metrics.sup2;const xt=.5/$l/y.scalingFactor;let Tt=null;if(ge&&fe){Ce=Math.max(Ce,nt,fe.depth+.25*y.metrics.xHeight),$e=Math.max($e,y.metrics.sub2);const Tn=y.metrics.defaultRuleThickness;if(Ce-fe.depth-(ge.height-$e)<4*Tn){$e=4*Tn-(Ce-fe.depth)+ge.height;const _n=.8*y.metrics.xHeight-(Ce-fe.depth);_n>0&&(Ce+=_n,$e-=_n)}const Sr=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;Tt=new ao({individualShift:[{box:ge,shift:$e,marginLeft:Sr},{box:fe,shift:-Ce}]}).wrap(y)}else ge&&!fe?($e=Math.max($e,y.metrics.sub1,ge.height-.8*el),Tt=new ao({shift:$e,children:[{box:ge,marginRight:xt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!ge&&fe&&(Ce=Math.max(Ce,nt,fe.depth+.25*el),Tt=new ao({shift:-Ce,children:[{box:fe,marginRight:xt}]}));return new Er([ee,new Er(Tt,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Vl.createBox(new Na({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?Vl.createBox(new Na({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):nh(y,me(Se({},b),{above:E,below:ee}))}bind(y,b){if(!b||y.isPhantom||this.value==="\u200B")return b;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=y.makeID()),b.atomID=this.id),b}createBox(y,b){var E,ee,re,ae;const fe=(E=this.value)!=null?E:this.body,ge=(ee=b==null?void 0:b.boxType)!=null?ee:id(this.type);let be=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(be+=" ML__text");const Ce=typeof fe=="string"||fe===void 0?new Er(fe!=null?fe:null,{type:ge,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:me(Se({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:be}):(ae=Vl.createBox(y,fe,{type:ge,classes:be}))!=null?ae:new Er(null);return y.isTight&&(Ce.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(Ce.italic=0),Ce.right=Ce.italic,this.bind(y,Ce),this.caret&&!this.superscript&&!this.subscript&&(Ce.caret=this.caret),Ce}isDigit(){var y;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((y=this.body)==null?void 0:y.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var y;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((y=this.body)==null?void 0:y.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function cf(a){let y;const b=[];let E=[];for(const ee of a)if(!y&&!ee.style)E.push(ee);else{const re=ee.computedStyle;y&&re.color===y.color&&re.backgroundColor===y.backgroundColor&&re.fontSize===y.fontSize?E.push(ee):(E.length>0&&b.push(E),E=[ee],y=re)}return E.length>0&&b.push(E),b}function uf(a,y,b){var E,ee,re,ae,fe;if(!y||y.length===0)return null;const ge=new Na({parent:a},b.style),be=!((E=ge.atomIdsSettings)!=null&&E.groupNumbers);let Ce=[];if(y.length===1){const nt=y[0],xt=nt.render(ge);xt&&(be&&nt.isSelected&&xt.selected(!0),Ce=[xt])}else{let nt="",xt=!0;for(const Tt of y){(ee=ge.atomIdsSettings)!=null&&ee.groupNumbers&&nt&&(xt&&Tt.isDigit()||!xt&&cd(Tt))&&(ge.atomIdsSettings.overrideID=nt);const Tn=Tt.render(ge);ge.atomIdsSettings&&(ge.atomIdsSettings.overrideID=void 0),Tn&&((re=ge.atomIdsSettings)!=null&&re.groupNumbers&&((Tt.isDigit()||cd(Tt))&&(!nt||xt!==Tt.isDigit())&&(xt=Tt.isDigit(),nt=(ae=Tt.id)!=null?ae:""),nt&&(!(Tt.isDigit()||cd(Tt))||!Tt.hasEmptyBranch("superscript")||!Tt.hasEmptyBranch("subscript"))&&(nt="")),be&&Tt.isSelected&&Tn.selected(!0),Ce.push(Tn))}}if(Ce.length===0)return null;const $e=new Er(Ce,me(Se({isTight:ge.isTight},b),{type:(fe=b.type)!=null?fe:"lift"}));return $e.isSelected=Ce.every(nt=>nt.isSelected),$e.wrap(ge)}function cd(a){return a.mode==="text"}function ud(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Un?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var al=class _p extends Un{constructor(y,b,E){super({type:"text",command:y,mode:"text",displayContainsHighlight:!0}),this.value=b,this.verbatimLatex=b,this.applyStyle(E)}static fromJson(y){return new _p(y.command,y.value,y.style)}render(y){const b=this.createBox(y);return this.caret&&(b.caret=this.caret),b}_serialize(y){var b;return(b=this.verbatimLatex)!=null?b:li("text",this.value.codePointAt(0))}};function Pc(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&ih(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function ih(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Xo(a){let y=1/0,b=-1/0;for(const E of a.ranges)y=Math.min(y,E[0],E[1]),b=Math.max(b,E[0],E[1]);return[y,b]}function gl(a){return typeof a=="number"&&!Number.isNaN(a)}function xu(a){return Array.isArray(a)&&a.length===2}function wu(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&&ee;)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,y){if(!y)return"";if(typeof y=="string")return y;if(!a||y.after===void 0)return y.value;let b=!1,E=!1,ee=!1,re=!1,ae=!1,fe=!1,ge=!1,be=!1,Ce=!1,$e=!1,nt=!1,xt=!1,Tt=!1,Tn=!1,Sr=!1,_n=a[0],tr=0;for(;_n!=null&&_n.type&&/^(subsup|placeholder)$/.test(_n.type);)tr+=1,_n=a[tr];return b=!_n||_n.type==="first",_n&&(Tn=_n.mode==="text",E=!Tn&&_n.type==="mord"&&pe.test(_n.value),ee=!Tn&&_n.type==="mord"&&/\d+$/.test(_n.value),re=!Tn&&_n.isFunction,ae=_n.type==="genfrac",fe=_n.type==="surd",ge=_n.type==="mbin",be=_n.type==="mrel",Ce=_n.type==="mop"||_n.type==="operator"||_n.type==="extensible-symbol",$e=_n.type==="mpunct"||_n.type==="minner",nt=_n.type==="array",xt=_n.type==="mopen",Tt=_n.type==="mclose"||_n.type==="leftright",Sr=_n.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&ee||y.after.includes("function")&&re||y.after.includes("frac")&&ae||y.after.includes("surd")&&fe||y.after.includes("binop")&&ge||y.after.includes("relop")&&be||y.after.includes("operator")&&Ce||y.after.includes("punct")&&$e||y.after.includes("array")&&nt||y.after.includes("openfence")&&xt||y.after.includes("closefence")&&Tt||y.after.includes("text")&&Tn||y.after.includes("space")&&Sr?y.value:""}function dd(a,y,b){return b?df(a,b[y]):""}var ff={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function Oc(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=pf(a)),E==="ascii-math"?(a=a.replace(/\u2061/gu,""),a=a.replace(/\u3016/gu,"{"),a=a.replace(/\u3017/gu,"}"),a=a.replace(/([^\\])sinx/g,"$1\\sin x"),a=a.replace(/([^\\])cosx/g,"$1\\cos x "),a=a.replace(/\u2013/g,"-"),["ascii-math",ns(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function ns(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const fe=(b=y.inlineShortcuts)!=null?b:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=ns(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=ns(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=ns(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=vl(ae[1],{inlineShortcuts:fe,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=ns(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=ns(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ns(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=ns(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ns(ae[2],y),re=!0)),!re)if(ae=vl(a,{inlineShortcuts:fe,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const ge=vl(ae.rest.slice(1),{inlineShortcuts:fe,noWrap:!0});ge.match&&(a="\\frac{"+ae.match+"}{"+ge.match+"}"+ns(ge.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+ns(ae.rest,y):ae.match+ns(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+ns(ae[2],y),re=!0)),a}function vl(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,fe=1;for(;fe<a.length&&ae>0;)a[fe]===ee&&ae++,a[fe]===re&&ae--,fe++;ae===0?(y.noWrap&&ee==="("?b=ns(a.substring(1,fe-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+ns(a.substring(1,fe-1),y)+"\\right"+re),E=a.slice(Math.max(0,fe))):(b=a.substring(1,fe),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let fe=dd(null,a,y.inlineShortcuts);if(fe)return fe=fe.replace("_{#?}",""),fe=fe.replace("^{#?}",""),{match:fe,rest:a.slice(fe.length)}}if(ae=a.match(/^([a-zA-Z])/),ae)return{match:ae[1],rest:a.slice(1)};if(ae=a.match(/^(-)?\d+(\.\d*)?/),ae)return{match:ae[0],rest:a.slice(ae[0].length)};/^\\(left|right)/.test(a)||(ae=a.match(/^(\\[a-zA-Z]+)/),ae&&(E=a.slice(ae[1].length),b=ae[1]))}return{match:b,rest:E}}function hf(a,y){let b=dd(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function yl(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=yl(a),y?["latex",a]:a.startsWith("`")&&a.endsWith("`")?(a=a.substring(1,a.length-1),["ascii-math",a]):a.includes("\\")?["latex",a]:/\$.+\$/.test(a)?["latex",`\\text{${a}}`]:[void 0,a]}var Su="$$",oh="$$",sh=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${Su} ${y} ${oh}`),y),mf=class Qf{constructor(y){Qf._modes[y]=this}static onPaste(y,b,E){var ee;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const ae=new DataTransfer;ae.setData("text/plain",E),E=ae}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=b.host)!=null&&ee.dispatchEvent(re)?Qf._modes[y].onPaste(b,E):!1}static copyToClipboard(y,b){if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const E=y.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:Xo(E.selection),re=E.getValue(ee,b);navigator.clipboard.writeText(re).then(()=>{},()=>y.model.announce("plonk"))}static onCopy(y,b){var E;if(!b.clipboardData)return;if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const ee=y.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:Xo(ee.selection);let ae=ee.getAtoms(re);if(ae.every(fe=>fe.mode==="text"||!fe.mode))b.clipboardData.setData("text/plain",ae.filter(fe=>fe instanceof al).map(fe=>fe.value).join(""));else if(ae.every(fe=>fe.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(fe=>{var ge;return(ge=fe.value)!=null?ge:""}).join(""));else{let fe;ae.length===1&&ae[0].verbatimLatex!==void 0?fe=ae[0].verbatimLatex:fe=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",fe);try{b.clipboardData.setData("text/plain",y.options.onExport(y,fe,re))}catch(ge){}if(ae.length===1){const ge=ae[0];(ge.type==="root"||ge.type==="group")&&(ae=ge.body.filter(be=>be.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(ge=>ge.toJson())))}catch(ge){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const ge=window.MathfieldElement.computeEngine;if(ge)try{const be=ge.jsonSerializationOptions;ge.jsonSerializationOptions={metadata:["latex"]};const Ce=ge.parse(ee.getValue(re,"latex-unstyled"));ge.jsonSerializationOptions=be;const $e=JSON.stringify(Ce.json);$e&&b.clipboardData.setData("application/json",$e)}catch(be){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return Qf._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};mf._modes={};var ra=mf,lh=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],hd={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Ns(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Rs(a){var y,b;return(b=(y=a.querySelector(".ML__caret"))!=null?y:a.querySelector(".ML__text-caret"))!=null?b:a.querySelector(".ML__latex-caret")}function bl(a){const y=Rs(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function pd(a){var y;if(!a.parent)return"root";let b=(y=a.parent.id)!=null?y:"";return b+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,b}function md(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,ae=Math.ceil(y.left-E.left+a.field.scrollLeft*b),fe=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:fe,bottom:fe+re}}function gd(a){const y=a.getBoundingClientRect(),b=parseInt(getComputedStyle(a).marginRight),E={top:y.top-1,bottom:y.bottom,left:y.left,right:y.right-1+b};if(a.children.length===0||a.tagName.toUpperCase()==="SVG")return E;for(const ee of a.children)if(ee.nodeType===1&&"atomId"in ee.dataset&&!ee.classList.contains("pstrut")){const re=gd(ee);E.left=Math.min(E.left,re.left),E.right=Math.max(E.right,re.right),E.top=Math.min(E.top,re.top),E.bottom=Math.max(E.bottom,re.bottom)}return E}function lc(a,y){var b,E;if(!y.id)return null;let ee=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ee=re?gd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function gf(a,y,b){const E=new Map;for(const ee of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let ge=Math.floor(re.getBoundingClientRect().width)/ae;ge=isNaN(ge)?1:ge;const be=md(a,lc(a,ee),ge);if(be){const Ce=pd(ee);if(E.has(Ce)){const $e=E.get(Ce);E.set(Ce,{left:Math.min($e.left,be.left),right:Math.max($e.right,be.right),top:Math.min($e.top,be.top),bottom:Math.max($e.bottom,be.bottom)})}else E.set(Ce,be)}}return[...E.values()]}function vd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...gf(a,E,y)),[])}function yd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Cu(a){let y=0,b=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ee)}var vf=`@keyframes ML__caret-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.ML__container {
display: inline-flex;
flex-flow: row;
justify-content: space-between;
align-items: flex-end;
min-height: 39px;
/* Need some room for the virtual keyboard toggle */
width: 100%;
/* Encourage browsers to consider allocating a hardware accelerated
layer for this element. */
isolation: isolate;
/* Prevent the browser from trying to interpret touch gestures in the field */
/* "Disabling double-tap to zoom removes the need for browsers to
delay the generation of click events when the user taps the screen." */
touch-action: none;
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
--_selection-color: var(--selection-color, #000);
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
--_smart-fence-color: var(--smart-fence-color, currentColor);
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
--_correct-color: var(--correct-color, #10a000);
--_incorrect-color: var(--incorrect-color, #a01b00);
--_composition-background-color: var(--composition-background-color, #fff1c2);
--_composition-text-color: var(--composition-text-color, black);
--_composition-underline-color: var(--composition-underline-color, transparent);
}
/* This is the actual field content (formula) */
.ML__content {
display: flex;
align-items: center;
align-self: center;
position: relative;
overflow: hidden;
padding: 2px 3px 2px 1px;
width: 100%;
}
.ML__virtual-keyboard-toggle,
.ML__menu-toggle {
box-sizing: border-box;
display: flex;
align-self: center;
align-items: center;
flex-shrink: 0;
flex-direction: column;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
margin-right: 4px;
cursor: pointer;
/* Avoid some weird blinking with :hover */
border-radius: 8px;
border: 1px solid transparent;
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
color: hsl(var(--_hue), 40%, 50%);
fill: currentColor;
background: transparent;
}
.ML__virtual-keyboard-toggle:hover,
.ML__menu-toggle:hover {
background: hsla(0, 0%, 70%, 0.3);
color: #333;
fill: currentColor;
}
.ML__virtual-keyboard-toggle > span,
.ML__menu-toggle > span {
display: flex;
align-self: center;
align-items: center;
}
/* The invisible element used to capture keyboard events. We're just trying
really hard to make sure it doesn't show. */
.ML__keyboard-sink {
display: inline-block;
resize: none;
outline: none;
border: none;
/* Need these for Microsoft Edge */
position: fixed;
clip: rect(0 0 0 0);
/* Need this to prevent iOS Safari from auto-zooming */
font-size: 1em;
font-family: KaTeX_Main;
line-height: 0.5;
/* On Chromium, if this is 0, no keyboard events are received */
}
[part="placeholder"] {
color: var(--neutral-400);
}
.ML__composition {
background: var(--_composition-background-color);
color: var(--_composition-text-color);
text-decoration: underline var(--_composition-underline-color);
}
.ML__caret::after {
content: '';
visibility: hidden;
width: 0;
display: inline-block;
height: 0.76em;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_caret-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.045em;
bottom: -0.05em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__text-caret::after {
content: '';
visibility: hidden;
width: 0;
display: inline-block;
height: 0.76em;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_caret-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.045em;
bottom: -0.05em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__latex-caret::after {
content: '';
visibility: hidden;
--_caret-width: clamp(2px, 0.08em, 10px);
border: none;
border-radius: calc(var(--_caret-width) / 2);
border-right: var(--_caret-width) solid var(--_latex-color);
margin-right: calc(-1 * var(--_caret-width));
position: relative;
left: -0.019em;
animation: ML__caret-blink 1.05s step-end forwards infinite;
}
.ML__focused .ML__latex-caret::after,
.ML__focused .ML__text-caret::after,
.ML__focused .ML__caret::after {
visibility: visible;
}
.ML__focused .ML__text {
background: var(--_text-highlight-background-color);
}
/* When using smartFence, the anticipated closing fence is displayed
with this style */
.ML__smart-fence__close {
opacity: var(--_smart-fence-opacity);
color: var(--_smart-fence-color);
}
.ML__selected,
.ML__focused .ML__selected .ML__contains-caret,
.ML__focused .ML__selected .ML__smart-fence__close,
.ML__focused .ML__selected .ML__placeholder {
color: var(--_selection-color);
opacity: 1;
}
.ML__selection {
box-sizing: border-box;
background: var(--_selection-background-color) !important;
}
.ML__contains-caret.ML__close,
.ML__contains-caret.ML__open,
.ML__contains-caret > .ML__close,
.ML__contains-caret > .ML__open,
.ML__contains-caret .ML__sqrt-sign,
.ML__contains-caret .ML__sqrt-line {
color: var(--_caret-color);
}
.ML__contains-highlight {
box-sizing: border-box;
background: transparent;
}
.ML__focused .ML__contains-highlight {
background: var(--_contains-highlight-background-color);
}
.ML__raw-latex {
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
font-weight: 400;
font-size: 0.8em;
letter-spacing: -0.05em;
color: var(--_latex-color);
}
.ML__suggestion {
color: var(--neutral-500);
}
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
background: hsl(var(--_hue), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
.ML__virtual-keyboard-toggle:focus {
outline: none;
border-radius: 8px;
border: 2px solid hsl(var(--_hue), 40%, 50%);
}
.ML__virtual-keyboard-toggle.is-pressed,
.ML__virtual-keyboard-toggle.is-active:hover,
.ML__virtual-keyboard-toggle.is-active {
background: hsl(var(--_hue), 25%, 35%);
color: #fafafa;
fill: currentColor;
}
/* Add an attribute 'data-tooltip' to automatically show a
tooltip over a element on hover.
*/
[data-tooltip] {
position: relative;
}
[data-tooltip]::after {
content: attr(data-tooltip);
position: absolute;
display: block;
z-index: 2;
pointer-events: none;
right: auto;
top: calc(-100% - 4px);
width: max-content;
max-width: 200px;
padding: 8px 8px;
border-radius: 4px;
background: #616161;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
text-align: center;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-style: normal;
font-weight: 400;
font-size: 13px;
/* Phone */
opacity: 0;
transform: scale(0.5);
}
@media only screen and (max-width: 767px) {
[data-tooltip]::after {
padding: 8px 16px;
font-size: 16px;
}
}
menu [data-tooltip]::after {
left: 100%;
top: 0%;
}
menu .ML__base {
cursor: default;
}
/** Don't display if we're tracking, i.e. have the pointer down */
.tracking [data-tooltip]:hover::after {
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
visibility: hidden;
}
/** But do display if tracking and inside a menu */
.tracking menu li[data-tooltip]:hover::after,
[data-tooltip]:hover::after {
visibility: visible;
opacity: 1;
transform: scale(1);
transition-property: opacity, scale;
transition-duration: 0.15s;
transition-delay: 1s;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ML__prompt {
border-radius: 2px;
}
.ML__editablePromptBox {
outline: 1px solid #acacac;
border-radius: 2px;
z-index: -1;
}
.ML__focusedPromptBox {
outline: highlight auto 1px;
}
.ML__lockedPromptBox {
background-color: rgba(142, 142, 141, 0.4);
z-index: -1;
}
.ML__correctPromptBox {
outline: 1px solid var(--_correct-color);
box-shadow: 0 0 5px var(--_correct-color);
}
.ML__incorrectPromptBox {
outline: 1px solid var(--_incorrect-color);
box-shadow: 0 0 5px var(--_incorrect-color);
}
.variant-submenu {
display: flex;
flex-direction: column;
padding: 8px;
}
.variant-submenu [part=menu-item] {
font-size: 2rem;
text-align: center;
margin: 0;
}
.insert-matrix-submenu {
display: grid;
padding: 8px;
align-content: center;
justify-content: center;
grid-template-columns: repeat(5, minmax(0, 1fr));
}
.insert-matrix-submenu [part=menu-item] {
font-size: 21px;
border: none;
border-radius: 0;
line-height: 21px;
text-align: center;
padding: 0;
margin: 0;
}
.border-submenu [part=menu-item] {
font-size: 2rem;
line-height: 1.2;
text-align: center;
}
.swatches-submenu {
--_swatch-size: 2rem;
--_columns: 4;
display: flex;
flex-flow: wrap;
padding: 8px;
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
box-sizing: border-box;
}
.menu-swatch {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: fit-content;
height: fit-content;
margin: 2px;
padding: 0;
background: var(--neutral-200);
}
.menu-swatch > .label {
padding: 0;
margin: 0;
line-height: 0;
}
.menu-swatch > .label > span {
display: inline-block;
margin: 6px;
min-width: var(--_swatch-size);
min-height: var(--_swatch-size);
border-radius: 50%;
}
.menu-swatch.active {
background: var(--neutral-100);
scale: 1.4;
}
.menu-swatch.active > .label > span {
border-radius: 2px;
}
.menu-swatch .ui-checkmark,
.menu-swatch .ui-mixedmark {
position: absolute;
margin: 0;
padding: 0;
color: white;
}
.menu-swatch.dark-contrast .ui-checkmark,
.menu-swatch.dark-contrast .ui-mixedmark {
color: #000;
}
`,ro=`.ML__container {
min-height: auto !important;
--_hue: var(--hue, 212);
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
}
.ML__sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.ML__is-inline {
display: inline-block;
}
.ML__base {
visibility: inherit;
display: inline-block;
position: relative;
cursor: text;
padding: 0;
margin: 0;
box-sizing: content-box;
border: 0;
outline: 0;
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
text-decoration: none;
width: min-content;
}
.ML__strut,
.ML__strut--bottom {
display: inline-block;
min-height: 0.5em;
}
.ML__small-delim {
font-family: KaTeX_Main;
}
/* Text mode */
.ML__text {
font-family: var(--_text-font-family);
white-space: pre;
}
/* Use cmr for 'math upright' */
.ML__cmr {
font-family: KaTeX_Main;
font-style: normal;
}
.ML__mathit {
font-family: KaTeX_Math;
/* The KaTeX_Math font is italic by default, so the font-style below is only
useful when a fallback font is used
*/
font-style: italic;
}
.ML__mathbf {
font-family: KaTeX_Main;
font-weight: bold;
}
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
to match TeX idiosyncratic behavior */
.lcGreek.ML__mathbf {
font-family: KaTeX_Math;
font-weight: normal;
}
.ML__mathbfit {
font-family: KaTeX_Math;
font-weight: bold;
font-style: italic;
}
.ML__ams {
font-family: KaTeX_AMS;
}
/* Blackboard */
.ML__bb {
font-family: KaTeX_AMS;
}
.ML__cal {
font-family: KaTeX_Caligraphic;
}
.ML__frak {
font-family: KaTeX_Fraktur;
}
.ML__tt {
font-family: KaTeX_Typewriter;
}
.ML__script {
font-family: KaTeX_Script;
}
.ML__sans {
font-family: KaTeX_SansSerif;
}
.ML__series_ul {
font-weight: 100;
}
.ML__series_el {
font-weight: 100;
}
.ML__series_l {
font-weight: 200;
}
.ML__series_sl {
font-weight: 300;
}
.ML__series_sb {
font-weight: 500;
}
.ML__bold,
.ML__boldsymbol {
font-weight: 700;
}
.ML__series_eb {
font-weight: 800;
}
.ML__series_ub {
font-weight: 900;
}
.ML__series_uc {
font-stretch: ultra-condensed;
}
.ML__series_ec {
font-stretch: extra-condensed;
}
.ML__series_c {
font-stretch: condensed;
}
.ML__series_sc {
font-stretch: semi-condensed;
}
.ML__series_sx {
font-stretch: semi-expanded;
}
.ML__series_x {
font-stretch: expanded;
}
.ML__series_ex {
font-stretch: extra-expanded;
}
.ML__series_ux {
font-stretch: ultra-expanded;
}
.ML__it {
font-style: italic;
}
.ML__shape_ol {
-webkit-text-stroke: 1px black;
text-stroke: 1px black;
color: transparent;
}
.ML__shape_sc {
font-variant: small-caps;
}
.ML__shape_sl {
font-style: oblique;
}
/* First level emphasis */
.ML__emph {
color: #bc2612;
}
/* Second level emphasis */
.ML__emph .ML__emph {
color: #0c7f99;
}
.ML__highlight {
color: #007cb2;
background: #edd1b0;
}
.ML__center {
text-align: center;
}
.ML__label_padding {
padding: 0 0.5em;
}
.ML__frac-line {
width: 100%;
min-height: 1px;
}
.ML__frac-line:after {
content: '';
display: block;
margin-top: max(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
/* There's a bug since Chrome 62 where
sub-pixel border lines don't draw at some zoom
levels (110%, 90%).
Setting the min-height used to work around it, but that workaround
broke in Chrome 84 or so.
Setting the background (and the min-height) seems to work for now.
*/
background: currentColor;
box-sizing: content-box;
/* Vuetify sets the box-sizing to inherit
causes the fraction line to not draw at all sizes (see #26) */
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt {
display: inline-block;
}
.ML__sqrt-sign {
display: inline-block;
position: relative;
}
.ML__sqrt-line {
display: inline-block;
height: max(1px, 0.04em);
width: 100%;
}
.ML__sqrt-line:before {
content: '';
display: block;
margin-top: min(-1px, -0.04em);
min-height: max(1px, 0.04em);
/* Ensure the line is visible when printing even if "turn off background images" is on*/
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
background: currentColor;
/* On some versions of Firefox on Windows, the line fails to
draw at some zoom levels, but setting the transform triggers
the hardware accelerated path, which works */
transform: translate(0, 0);
}
.ML__sqrt-line:after {
border-bottom-width: 1px;
content: ' ';
display: block;
margin-top: -0.1em;
}
.ML__sqrt-index {
margin-left: 0.27777778em;
margin-right: -0.55555556em;
}
.ML__delim-size1 {
font-family: KaTeX_Size1;
}
.ML__delim-size2 {
font-family: KaTeX_Size2;
}
.ML__delim-size3 {
font-family: KaTeX_Size3;
}
.ML__delim-size4 {
font-family: KaTeX_Size4;
}
.ML__delim-mult .delim-size1 > span {
font-family: KaTeX_Size1;
}
.ML__delim-mult .delim-size4 > span {
font-family: KaTeX_Size4;
}
.ML__accent-body > span {
font-family: KaTeX_Main;
width: 0;
}
.ML__accent-vec {
position: relative;
left: 0.24em;
}
/** The markup for a LaTeX formula, either in an editable mathfield or
in a static display.
*/
.ML__latex {
display: inline-block;
direction: ltr;
text-align: left;
text-indent: 0;
text-rendering: auto;
font-family: KaTeX_Main, 'Times New Roman', serif;
font-style: normal;
font-size-adjust: none;
font-stretch: normal;
font-variant-caps: normal;
letter-spacing: normal;
line-height: 1.2;
word-wrap: normal;
word-spacing: normal;
white-space: nowrap;
text-shadow: none;
-webkit-user-select: none;
user-select: none;
width: min-content;
}
.ML__latex .style-wrap {
position: relative;
}
.ML__latex .mfrac {
display: inline-block;
}
.ML__latex .left-right {
display: inline-block;
}
.ML__latex .vlist-t {
display: inline-table;
table-layout: fixed;
border-collapse: collapse;
}
.ML__latex .vlist-r {
display: table-row;
}
.ML__latex .vlist {
display: table-cell;
vertical-align: bottom;
position: relative;
}
.ML__latex .vlist > span {
display: block;
height: 0;
position: relative;
}
.ML__latex .vlist > span > span {
display: inline-block;
}
.ML__latex .vlist > span > .pstrut {
overflow: hidden;
width: 0;
}
.ML__latex .vlist-t2 {
margin-right: -2px;
}
.ML__latex .vlist-s {
display: table-cell;
vertical-align: bottom;
font-size: 1px;
width: 2px;
min-width: 2px;
}
.ML__latex .msubsup {
text-align: left;
}
.ML__latex .negativethinspace {
display: inline-block;
margin-left: -0.16667em;
height: 0.71em;
}
.ML__latex .thinspace {
display: inline-block;
width: 0.16667em;
height: 0.71em;
}
.ML__latex .mediumspace {
display: inline-block;
width: 0.22222em;
height: 0.71em;
}
.ML__latex .thickspace {
display: inline-block;
width: 0.27778em;
height: 0.71em;
}
.ML__latex .enspace {
display: inline-block;
width: 0.5em;
height: 0.71em;
}
.ML__latex .quad {
display: inline-block;
width: 1em;
height: 0.71em;
}
.ML__latex .qquad {
display: inline-block;
width: 2em;
height: 0.71em;
}
.ML__latex .llap,
.ML__latex .rlap {
width: 0;
position: relative;
display: inline-block;
}
.ML__latex .llap > .inner,
.ML__latex .rlap > .inner {
position: absolute;
}
.ML__latex .llap > .fix,
.ML__latex .rlap > .fix {
display: inline-block;
}
.ML__latex .llap > .inner {
right: 0;
}
.ML__latex .rlap > .inner {
left: 0;
}
.ML__latex .rule {
display: inline-block;
border: solid 0;
position: relative;
box-sizing: border-box;
}
.ML__latex .overline .overline-line,
.ML__latex .underline .underline-line {
width: 100%;
}
.ML__latex .overline .overline-line:before,
.ML__latex .underline .underline-line:before {
content: '';
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
display: block;
}
.ML__latex .overline .overline-line:after,
.ML__latex .underline .underline-line:after {
border-bottom-style: solid;
border-bottom-width: max(1px, 0.04em);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
content: '';
display: block;
margin-top: -1px;
}
.ML__latex .stretchy {
display: block;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__latex .stretchy:before,
.ML__latex .stretchy:after {
content: '';
}
.ML__latex .stretchy svg {
display: block;
position: absolute;
width: 100%;
height: inherit;
fill: currentColor;
stroke: currentColor;
fill-rule: nonzero;
fill-opacity: 1;
stroke-width: 1;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-miterlimit: 4;
stroke-dasharray: none;
stroke-dashoffset: 0;
stroke-opacity: 1;
}
.ML__latex .slice-1-of-2 {
display: inline-flex;
position: absolute;
left: 0;
width: 50.2%;
overflow: hidden;
}
.ML__latex .slice-2-of-2 {
display: inline-flex;
position: absolute;
right: 0;
width: 50.2%;
overflow: hidden;
}
.ML__latex .slice-1-of-3 {
display: inline-flex;
position: absolute;
left: 0;
width: 25.1%;
overflow: hidden;
}
.ML__latex .slice-2-of-3 {
display: inline-flex;
position: absolute;
left: 25%;
width: 50%;
overflow: hidden;
}
.ML__latex .slice-3-of-3 {
display: inline-flex;
position: absolute;
right: 0;
width: 25.1%;
overflow: hidden;
}
.ML__latex .slice-1-of-1 {
display: inline-flex;
position: absolute;
width: 100%;
left: 0;
overflow: hidden;
}
.ML__latex .nulldelimiter {
display: inline-block;
}
.ML__latex .op-group {
display: inline-block;
}
.ML__latex .op-symbol {
position: relative;
}
.ML__latex .op-symbol.small-op {
font-family: KaTeX_Size1;
}
.ML__latex .op-symbol.large-op {
font-family: KaTeX_Size2;
}
.ML__latex .mtable .vertical-separator {
display: inline-block;
min-width: 1px;
box-sizing: border-box;
}
.ML__latex .mtable .arraycolsep {
display: inline-block;
}
.ML__latex .mtable .col-align-m > .vlist-t {
text-align: center;
}
.ML__latex .mtable .col-align-c > .vlist-t {
text-align: center;
}
.ML__latex .mtable .col-align-l > .vlist-t {
text-align: left;
}
.ML__latex .mtable .col-align-r > .vlist-t {
text-align: right;
}
.ML__error {
display: inline-block;
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
background-color: hsla(341, 100%, 40%, 0.1);
background-repeat: repeat-x;
background-size: 3px 3px;
padding-bottom: 3px;
background-position: 0 100%;
}
.ML__error > .ML__error {
background: transparent;
padding: 0;
}
.ML__placeholder {
color: var(--_placeholder-color);
opacity: var(--_placeholder-opacity);
padding-left: 0.4ex;
padding-right: 0.4ex;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}
.ML__notation {
position: absolute;
box-sizing: border-box;
line-height: 0;
}
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
For UI elements, see \`[data-ML__tooltip]\`
*/
.ML__tooltip-container {
position: relative;
transform: scale(0);
}
.ML__tooltip-container .ML__tooltip-content {
position: fixed;
display: inline-table;
visibility: hidden;
z-index: 2;
width: max-content;
max-width: 400px;
padding: 12px 12px;
border-radius: 8px;
background: #616161;
--_selection-color: #fff;
color: #fff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
opacity: 0;
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
}
.ML__tooltip-container .ML__tooltip-content .ML__text {
white-space: normal;
}
.ML__tooltip-container .ML__tooltip-content .ML__base {
display: contents;
}
.ML__tooltip-container:hover .ML__tooltip-content {
visibility: visible;
opacity: 1;
font-size: 0.75em;
transform: scale(1) translate(0, 3em);
}
`,yf=`#mathlive-environment-popover.is-visible {
visibility: visible;
}
#mathlive-environment-popover {
--_environment-panel-height: var(--environment-panel-height, 70px);
--_accent-color: var(--accent-color, #aaa);
--_background: var(--environment-panel-background, #fff);
--_button-background: var(--environment-panel-button-background, white);
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
--_button-text: var(--environment-panel-button-text, #e3e4e8);
position: absolute;
width: calc(var(--_environment-panel-height) * 2);
height: var(--_environment-panel-height);
border-radius: 4px;
border: 1.5px solid var(--_accent-color);
background-color: var(--_background);
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
pointer-events: all;
visibility: hidden;
}
#mathlive-environment-popover .MLEP__array-buttons {
height: calc(var(--_environment-panel-height) * 5/4);
width: calc(var(--_environment-panel-height) * 5/4);
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
}
#mathlive-environment-popover .MLEP__array-buttons .font {
fill: white;
}
#mathlive-environment-popover .MLEP__array-buttons circle {
fill: #7f7f7f;
transition: fill 300ms;
}
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
fill-opacity: 1;
fill: var(--_background);
stroke: var(--_accent-color);
stroke-width: 3px;
}
#mathlive-environment-popover .MLEP__array-buttons line {
stroke: var(--_accent-color);
stroke-opacity: 0;
stroke-width: 40;
pointer-events: none;
transition: stroke-opacity 300ms;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
fill: var(--_accent-color);
}
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
stroke-opacity: 1;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
height: 100%;
width: 50%;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
width: var(--_environment-panel-height);
height: var(--_environment-panel-height);
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: space-around;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
pointer-events: all;
margin-top: 2px;
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
height: calc(var(--_environment-panel-height) / 3 - 2px);
border-radius: calc(var(--_environment-panel-height) / 25);
background-color: var(--_button-background);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
background-color: var(--_button-background-hover);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
stroke: var(--_button-text);
stroke-width: 2;
stroke-linecap: round;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
fill-opacity: 0;
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
pointer-events: none;
background-color: var(--_button-background-active);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
stroke: var(--_accent-color);
}
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
fill: var(--_accent-color);
}
`,ch=`/* The element that display info while in latex mode */
#mathlive-suggestion-popover {
background-color: rgba(97, 97, 97);
color: #fff;
text-align: center;
border-radius: 8px;
position: fixed;
z-index: 1;
display: none;
flex-direction: column;
justify-content: center;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
#mathlive-suggestion-popover.top-tip::after {
content: '';
position: absolute;
top: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-bottom: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.bottom-tip::after {
content: '';
position: absolute;
bottom: -15px;
left: calc(50% - 15px);
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid rgba(97, 97, 97);
font-size: 1rem;
}
#mathlive-suggestion-popover.is-animated {
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
}
#mathlive-suggestion-popover.is-visible {
display: flex;
}
@keyframes ML__fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* The wrapper class for the entire content of the popover panel */
#mathlive-suggestion-popover ul {
display: flex;
flex-flow: column;
list-style: none;
margin: 0;
padding: 0;
align-items: flex-start;
max-height: 400px;
overflow-y: auto;
}
#mathlive-suggestion-popover li {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 8px;
padding: 8px;
width: calc(100% - 16px - 16px);
column-gap: 1em;
border-radius: 8px;
cursor: pointer;
/* Since the content can be clicked on, provide feedback on hover */
}
#mathlive-suggestion-popover li a {
color: #5ea6fd;
padding-top: 0.3em;
margin-top: 0.4em;
display: block;
}
#mathlive-suggestion-popover li a:hover {
color: #5ea6fd;
text-decoration: underline;
}
#mathlive-suggestion-popover li:hover,
#mathlive-suggestion-popover li.is-pressed,
#mathlive-suggestion-popover li.is-active {
background: rgba(255, 255, 255, 0.1);
}
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
.ML__popover__command {
font-size: 1.6rem;
font-family: KaTeX_Main;
}
.ML__popover__current {
background: #5ea6fd;
color: #fff;
}
.ML__popover__latex {
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
align-self: center;
}
/* The keyboard shortcuts for a symbol as displayed in the popover */
.ML__popover__keybinding {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 0.8em;
opacity: 0.7;
}
/* Style for the character that joins the modifiers of a keyboard shortcut
(usually a "+" sign)*/
.ML__shortcut-join {
opacity: 0.5;
}
`,cc=`/* The element that displays the keys as the user type them */
#mathlive-keystroke-caption-panel {
visibility: hidden;
/*min-width: 160px;*/
/*background-color: rgba(97, 97, 200, .95);*/
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
border-color: var(--secondary-border, hsl(0, 0%, 91%));
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
text-align: center;
border-radius: 6px;
padding: 16px;
position: absolute;
z-index: 1;
display: flex;
flex-direction: row-reverse;
justify-content: center;
--keystroke: white;
--on-keystroke: #555;
--keystroke-border: #f7f7f7;
}
@media (prefers-color-scheme: dark) {
body:not([theme='light']) #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--_hue), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 50%, 25%);
}
}
body[theme='dark'] #mathlive-keystroke-caption-panel {
--keystroke: hsl(var(--_hue), 50%, 30%);
--on-keystroke: hsl(0, 0%, 98%);
--keystroke-border: hsl(var(--_hue), 50%, 25%);
}
#mathlive-keystroke-caption-panel > span {
min-width: 14px;
/*height: 8px;*/
margin: 0 8px 0 0;
padding: 4px;
background-color: var(--keystroke);
color: var(--on-keystroke);
fill: currentColor;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 1em;
border-radius: 6px;
border: 2px solid var(--keystroke-border);
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
}
`,uh=`.ML__keyboard {
--_keyboard-height: 0;
--_keyboard-zindex: var(--keyboard-zindex, 105);
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
--_padding-top: var(--keyboard-padding-top, 5px);
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_keycap-height: var(--keycap-height, 60px);
/* Keycap width (incl. margin) */
--_keycap-max-width: var(--keycap-max-width, 100px);
--_keycap-gap: var(--keycap-gap, 8px);
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
--_variant-keycap-length: var(--variant-keycap-length, 70px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
}
.is-math-mode .MLK__rows .if-text-mode,
.is-text-mode .MLK__rows .if-math-mode {
display: none;
}
.if-can-undo,
.if-can-redo,
.if-can-copy,
.if-can-cut,
.if-can-paste {
opacity: 0.4;
pointer-events: none;
}
.can-undo .if-can-undo,
.can-redo .if-can-redo,
.can-copy .if-can-copy,
.can-cut .if-can-cut,
.can-paste .if-can-paste {
opacity: 1;
pointer-events: all;
}
body > .ML__keyboard {
position: fixed;
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
}
body > .ML__keyboard.is-visible > .MLK__backdrop {
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
border-top: 1px solid var(--_border);
}
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
box-shadow: none;
border: none;
}
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
transition-property: transform, opacity;
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ML__keyboard {
position: relative;
overflow: hidden;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: var(--_keyboard-zindex);
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
opacity: 1;
transform: none;
pointer-events: none;
}
.ML__keyboard :where(div) {
box-sizing: border-box;
outline: none;
border: none;
margin: 0;
padding: 0;
line-height: 1;
overflow-wrap: unset;
text-align: left;
vertical-align: baseline;
cursor: auto;
white-space: pre;
box-shadow: none;
transform: none;
}
.MLK__backdrop {
position: absolute;
bottom: calc(-1 * var(--_keyboard-height));
width: 100%;
height: var(--_keyboard-height);
box-sizing: border-box;
padding-top: var(--_padding-top);
padding-bottom: var(--_padding-bottom);
padding-left: var(--_padding-horizontal);
padding-right: var(--_padding-horizontal);
opacity: 0;
visibility: hidden;
transform: translate(0, 0);
background: var(--_background);
}
.backdrop-is-transparent .MLK__backdrop {
background: transparent;
}
/* If a custom layout has a custom container/backdrop
(backdrop-is-transparent), make sure to let pointer event go through. */
.backdrop-is-transparent .MLK__plate {
background: transparent;
pointer-events: none;
}
/* If a custom layout has a custom container/backdrop, make sure to
allow pointer events on it. */
.backdrop-is-transparent .MLK__layer > div > div {
pointer-events: all;
}
.ML__keyboard.is-visible > .MLK__backdrop {
transform: translate(0, calc(-1 * var(--_keyboard-height)));
opacity: 1;
visibility: visible;
}
.caps-lock-indicator {
display: none;
width: 8px;
height: 8px;
background: #0cbc0c;
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
border-radius: 8px;
right: 8px;
top: 8px;
position: absolute;
}
.ML__keyboard.is-caps-lock .caps-lock-indicator {
display: block;
}
.ML__keyboard.is-caps-lock .shift {
background: var(--_keycap-background-active);
color: var(--_keycap-text-active);
}
.MLK__plate {
position: absolute;
top: var(--_padding-top);
left: var(--_padding-horizontal);
width: calc(100% - 2 * var(--_padding-horizontal));
margin: 0;
padding: 0;
box-sizing: border-box;
container-type: inline-size;
touch-action: none;
-webkit-user-select: none;
user-select: none;
pointer-events: all;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
/* Size of toolbar labels */
font-weight: 400;
text-shadow: none;
}
.ML__box-placeholder {
color: var(--_box-placeholder-color);
}
.MLK__tex {
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__tex-math {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
font-style: italic;
}
.MLK__layer {
display: none;
outline: none;
}
.MLK__layer.is-visible {
display: flex;
flex-flow: column;
}
/* Keyboard layouts are made or rows of keys... */
.MLK__rows {
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
display: flex;
flex-flow: column;
align-items: center;
border-collapse: separate;
clear: both;
border: 0;
margin: 0;
margin-bottom: var(--_keycap-gap);
gap: var(--_keycap-gap);
/* If the styling include, e.g., some shadows, they will be
cut off by the overflow. In that case, set the padding to
compensate. */
padding-left: var(--_row-padding-left);
padding-right: var(--_row-padding-right);
overflow: visible;
touch-action: none;
}
.MLK__rows > .MLK__row {
display: flex;
flex-flow: row;
justify-content: center;
width: 100%;
gap: var(--_keycap-gap);
margin: 0;
padding: 0;
/* For the alignment of the text on some modifiers (e.g. shift) */
/* Extra spacing between two adjacent keys */
}
.MLK__rows > .MLK__row .tex {
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .MLK__row .tex-math {
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
}
.MLK__rows > .MLK__row .big-op {
font-size: calc(1.25 * var(--_keycap-font-size));
}
.MLK__rows > .MLK__row .small {
font-size: var(--_keycap-small-font-size);
}
.MLK__rows > .MLK__row .bottom {
justify-content: flex-end;
}
.MLK__rows > .MLK__row .left {
align-items: flex-start;
padding-left: 12px;
}
.MLK__rows > .MLK__row .right {
align-items: flex-end;
padding-right: 12px;
}
.MLK__rows > .MLK__row .w0 {
width: 0;
}
.MLK__rows > .MLK__row .w5 {
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w15 {
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w20 {
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w40 {
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .w50 {
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
}
.MLK__rows > .MLK__row .MLK__keycap.w50 {
font-size: 80%;
padding-top: 10px;
font-weight: 100;
}
.MLK__rows > .MLK__row .separator {
background: transparent;
border: none;
pointer-events: none;
}
.MLK__rows > .MLK__row .horizontal-rule {
height: 6px;
margin-top: 3px;
margin-bottom: 0;
width: 100%;
border-radius: 0;
border-top: var(--_horizontal-rule);
}
.MLK__rows > .MLK__row .ghost {
background: var(--_toolbar-background);
border: none;
color: var(--_toolbar-text);
}
.MLK__rows > .MLK__row .ghost:hover {
background: var(--_toolbar-background-hover);
}
.MLK__rows > .MLK__row .bigfnbutton {
font-size: var(--_keycap-extra-small-font-size);
}
.MLK__rows > .MLK__row .shift,
.MLK__rows > .MLK__row .action {
color: var(--_keycap-secondary-text);
background: var(--_keycap-secondary-background);
border-color: var(--_keycap-secondary-border);
border-bottom-color: var(--_keycap-secondary-border-bottom);
line-height: 0.8;
font-size: min(1rem, var(--_keycap-small-font-size));
font-weight: 600;
padding: 8px 12px 8px 12px;
}
.MLK__rows > .MLK__row .shift:hover,
.MLK__rows > .MLK__row .action:hover {
background: var(--_keycap-secondary-background-hover);
}
.MLK__rows > .MLK__row .action.primary {
background: var(--_keycap-primary-background);
color: var(--_keycap-primary-text);
}
.MLK__rows > .MLK__row .action.primary:hover {
background: var(--_keycap-primary-background-hover);
color: var(--_keycap-primary-text);
}
.MLK__rows > .MLK__row .shift.selected,
.MLK__rows > .MLK__row .action.selected {
color: var(--_toolbar-text-active);
}
.MLK__rows > .MLK__row .shift.selected.is-pressed,
.MLK__rows > .MLK__row .action.selected.is-pressed,
.MLK__rows > .MLK__row .shift.selected.is-active,
.MLK__rows > .MLK__row .action.selected.is-active {
color: white;
}
.MLK__rows > .MLK__row .warning {
background: #cd0030;
color: white;
}
.MLK__rows > .MLK__row .warning svg.svg-glyph {
width: 24px;
height: 24px;
min-height: 24px;
}
/** A regular keycap
* Use the :where() pseudo-class to give it a very low specifity,
* so that it can be overriden by custom style.
*/
:where(.MLK__rows > .MLK__row div) {
display: flex;
flex-flow: column;
align-items: center;
justify-content: space-evenly;
width: calc(var(--_keycap-width) - var(--_keycap-gap));
height: var(--_keycap-height);
box-sizing: border-box;
padding: 0;
vertical-align: top;
text-align: center;
float: left;
color: var(--_keycap-text);
fill: currentColor;
font-size: var(--_keycap-font-size);
background: var(--_keycap-background);
border: 1px solid var(--_keycap-border);
border-bottom-color: var(--_keycap-border-bottom);
border-radius: 6px;
cursor: pointer;
touch-action: none;
/* Keys with a variants panel */
position: relative;
overflow: hidden;
-webkit-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
:where(.MLK__rows > .MLK__row div):hover {
overflow: visible;
background: var(--_keycap-background-hover);
}
:where(.MLK__rows > .MLK__row div) .ML__latex {
pointer-events: none;
touch-action: none;
}
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
margin: 8px 0;
width: 20px;
height: 20px;
min-height: 20px;
}
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
margin: 8px 0;
width: 24px;
height: 24px;
min-height: 24px;
}
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
font-size: 25px;
}
:where(.MLK__rows > .MLK__row div).is-pressed {
background: var(--_keycap-background-pressed);
color: var(--_keycap-text-pressed);
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
:where(.MLK__rows > .MLK__row div).action.is-active,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
:where(.MLK__rows > .MLK__row div).action.is-pressed {
z-index: calc(var(--_keyboard-zindex) - 5);
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
:where(.MLK__rows > .MLK__row div).action.is-active aside,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
display: none;
}
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
display: none;
}
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
:where(.MLK__rows > .MLK__row div).action.is-pressed {
background: var(--_keycap-background-pressed);
color: var(--_keycap-text-pressed);
}
:where(.MLK__rows > .MLK__row div).shift.is-active,
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
:where(.MLK__rows > .MLK__row div).action.is-active {
background: var(--_keycap-background-active);
color: var(--_keycap-text-active);
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
}
:where(.MLK__rows > .MLK__row div) small {
color: var(--_keycap-secondary-text);
}
:where(.MLK__rows > .MLK__row div) aside {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 10px;
line-height: 10px;
color: var(--_keycap-secondary-text);
}
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
Note there are a different set of tooltip rules for the keyboard toggle
(it's in a different CSS tree) */
.ML__keyboard [data-tooltip] {
position: relative;
}
.ML__keyboard [data-tooltip]::after {
position: absolute;
display: inline-table;
content: attr(data-tooltip);
top: inherit;
bottom: 100%;
width: max-content;
max-width: 200px;
padding: 8px 8px;
background: #616161;
color: #fff;
text-align: center;
z-index: 2;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
border-radius: 2px;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-weight: 400;
font-size: 12px;
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
opacity: 0;
transform: scale(0.5);
}
.ML__keyboard [data-tooltip]:hover {
position: relative;
}
.ML__keyboard [data-tooltip]:hover::after {
opacity: 1;
transform: scale(1);
}
.MLK__toolbar {
align-self: center;
display: flex;
flex-flow: row;
justify-content: space-between;
width: 100%;
max-width: 996px;
min-height: 32px;
/* Icons for undo/redo, etc. */
}
.MLK__toolbar svg {
height: 20px;
width: 20px;
}
.MLK__toolbar > .left {
position: relative;
display: flex;
justify-content: flex-start;
flex-flow: row;
}
.MLK__toolbar > .right {
display: flex;
justify-content: flex-end;
flex-flow: row;
}
.MLK__toolbar > div > div {
/* "button" in the toolbar */
display: flex;
align-items: center;
justify-content: center;
color: var(--_toolbar-text);
fill: currentColor;
background: var(--_toolbar-background);
font-size: var(--_toolbar-font-size);
padding: 4px 15px;
cursor: pointer;
width: max-content;
min-width: 42px;
min-height: 34px;
border: none;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 8px;
padding-top: 8px;
margin-top: 0;
margin-bottom: 4px;
margin-left: 4px;
margin-right: 4px;
border-radius: 8px;
box-shadow: none;
border-bottom: 2px solid transparent;
}
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
background: var(--_toolbar-background-hover);
}
.MLK__toolbar > div > div.disabled svg,
.MLK__toolbar > div > div.disabled:hover svg,
.MLK__toolbar > div > div.disabled.is-pressed svg {
color: var(--_toolbar-text);
opacity: 0.2;
}
.MLK__toolbar > div > div:hover,
.MLK__toolbar > div > div:active,
.MLK__toolbar > div > div.is-pressed,
.MLK__toolbar > div > div.is-active {
color: var(--_toolbar-text-active);
}
.MLK__toolbar > div > div.selected {
color: var(--_toolbar-text-active);
background: var(--_toolbar-background-selected);
border-radius: 0;
border-bottom-color: var(--_toolbar-text-active);
padding-bottom: 4px;
margin-bottom: 8px;
}
/* This is the element that displays variants on press+hold */
.MLK__variant-panel {
visibility: hidden;
position: fixed;
display: flex;
flex-flow: row wrap-reverse;
justify-content: center;
align-content: center;
margin: 0;
padding: 0;
bottom: auto;
top: 0;
box-sizing: content-box;
transform: none;
z-index: calc(var(--_keyboard-zindex) + 1);
touch-action: none;
max-width: 350px;
background: var(--_variant-panel-background);
text-align: center;
border-radius: 6px;
padding: 6px;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
transition: none;
}
.MLK__variant-panel.is-visible {
visibility: visible;
}
.MLK__variant-panel.compact {
--_variant-keycap-length: var(--variant-keycap-length, 50px);
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
}
.MLK__variant-panel .item {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: var(--_variant-keycap-font-size);
height: var(--_variant-keycap-length);
width: var(--_variant-keycap-length);
margin: 0;
box-sizing: border-box;
border-radius: 5px;
border: 1px solid transparent;
background: transparent;
pointer-events: all;
cursor: pointer;
color: var(--_variant-keycap-text);
fill: currentColor;
}
@media (max-height: 412px) {
.MLK__variant-panel .item {
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--variant-keycap-length, 50px);
}
}
.MLK__variant-panel .item .ML__latex {
pointer-events: none;
}
.MLK__variant-panel .item.is-active {
background: var(--_variant-keycap-background-active);
color: var(--_variant-keycap-text-active);
}
.MLK__variant-panel .item.is-pressed {
background: var(--_variant-keycap-background-pressed);
color: var(--_variant-keycap-text-pressed);
}
.MLK__variant-panel .item.small {
font-size: var(--_keycap-small-font-size);
}
.MLK__variant-panel .item.swatch-button {
box-sizing: border-box;
background: #fbfbfb;
}
.MLK__variant-panel .item.swatch-button > span {
display: inline-block;
margin: 6px;
width: calc(100% - 12px);
height: calc(100% - 12px);
border-radius: 50%;
}
.MLK__variant-panel .item.swatch-button:hover {
background: #f0f0f0;
}
.MLK__variant-panel .item.swatch-button:hover > span {
border-radius: 2px;
}
.MLK__variant-panel .item.box > div,
.MLK__variant-panel .item.box > span {
border: 1px dashed rgba(0, 0, 0, 0.24);
}
.MLK__variant-panel .item .warning {
min-height: 60px;
min-width: 60px;
background: #cd0030;
color: white;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
}
.MLK__variant-panel .item .warning.is-pressed,
.MLK__variant-panel .item .warning.is-active {
background: red;
}
.MLK__variant-panel .item .warning svg.svg-glyph {
width: 50px;
height: 50px;
}
.MLK__variant-panel .item aside {
font-size: var(--_variant-keycap-aside-font-size);
line-height: 12px;
opacity: 0.78;
padding-top: 2px;
}
.MLK__keycap {
position: relative;
}
.MLK__shift {
display: block;
position: absolute;
right: 4px;
top: 4px;
font-size: var(--_keycap-shift-font-size);
color: var(--_keycap-shift-color);
}
.hide-shift .MLK__shift {
display: none;
}
@media (max-width: 414px) {
.MLK__variant-panel {
max-width: 350px;
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
--_variant-keycap-length: var(--variant-keycap-length, 50px);
}
}
/* @xs breakpoint: iPhone 5 */
@container (max-width: 414px) {
.MLK__rows {
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
--_keycap-height: max(var(--_keycap-height), 42px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
}
.MLK__toolbar > div > div {
font-size: 100%;
margin-left: 2px;
margin-right: 2px;
}
.MLK__rows .shift,
.MLK__rows .action {
font-size: 65%;
}
.MLK__rows .warning svg.svg-glyph {
width: 14px;
height: 14px;
min-height: 14px;
}
}
@container (max-width: 744px) {
.MLK__rows {
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
--_keycap-height: max(var(--keycap-height, 52px), 52px);
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
}
.MLK__toolbar > div > div {
padding-left: 0;
padding-right: 0;
}
.MLK__tooltip::after {
padding: 8px 16px;
font-size: 16px;
}
.MLK__rows > .MLK__row > div.fnbutton {
font-size: 16px;
}
.MLK__rows > .MLK__row > div.bigfnbutton {
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
}
.MLK__rows > .MLK__row > div.small {
font-size: 13px;
}
.MLK__rows > .MLK__row > div > aside {
display: none;
}
.MLK__shift {
display: none;
}
}
/* Medium breakpoint: larger phones */
@container (max-width: 768px) {
.MLK__rows {
--_keycap-height: max(var(--keycap-height, 42px), 42px);
}
.MLK__rows > .MLK__row > div > small {
font-size: 14px;
}
}
@media (max-height: 768px) {
.MLK__rows {
--_keycap-height: max(var(--keycap-height, 42px), 42px);
}
.MLK__rows > .MLK__row > div > small {
font-size: 14px;
}
}
@container (max-width: 1444px) {
.MLK__rows .if-wide {
display: none;
}
}
@media (prefers-color-scheme: dark) {
.ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
}
/* Same as the media query, but with a class */
[theme='dark'] .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
--_background: var(--keyboard-background, #151515);
--_border: var(--keyboard-border, transparent);
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
--keyboard-toolbar-background-hover: #303030;
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
--_keycap-background: var(--keycap-background, #1f2022);
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
--_keycap-border: var(--_keycap-border, transparent);
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
--_keycap-text: var(--keycap-text, #e3e4e8);
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
--keycap-secondary-border: transparent;
--keycap-secondary-border-bottom: transparent;
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
--_variant-panel-background: var(--variant-panel-background, #303030);
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
}
[theme='light'] .ML__keyboard {
--_accent-color: var(--keyboard-accent-color, #0c75d8);
--_background: var(--keyboard-background, #cacfd7);
--_border: var(--keyboard-border, #ddd);
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
--_keycap-background: var(--keycap-background, white);
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
--_keycap-border: var(--_keycap-border, #e5e6e9);
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
--_keycap-text: var(--keycap-text, #000);
--_keycap-text-active: var(--keycap-text-active, #fff);
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
--_variant-panel-background: var(--variant-panel-background, #fff);
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
}
`,Eu=`:host {
--primary-color: #5898ff;
--primary-color-dimmed: #c0c0f0;
--primary-color-dark: var(--blue-500);
--primary-color-light: var(--blue-100);
--primary-color-reverse: #ffffff;
--secondary-color: #ff8a65;
--secondary-color-dimmed: #f0d5c5;
--secondary-color-dark: var(--orange-500);
--secondary-color-light: var(--orange-100);
--secondary-color-reverse: #ffffff;
--link-color: #5898ff;
--link-color-dimmed: #c5c5c5;
--link-color-dark: #121212;
--link-color-light: #e2e2e2;
--link-color-reverse: #ffffff;
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--neutral-100: #f5f5f5;
--neutral-200: #eeeeee;
--neutral-300: #e0e0e0;
--neutral-400: #bdbdbd;
--neutral-500: #9e9e9e;
--neutral-600: #757575;
--neutral-700: #616161;
--neutral-800: #424242;
--neutral-900: #212121;
--red-25: #fff8f7;
--red-50: #fff1ef;
--red-100: #ffeae6;
--red-200: #ffcac1;
--red-300: #ffa495;
--red-400: #ff7865;
--red-500: #f21c0d;
--red-600: #e50018;
--red-700: #d30024;
--red-800: #bd002c;
--red-900: #a1002f;
--orange-25: #fffbf8;
--orange-50: #fff7f1;
--orange-100: #fff3ea;
--orange-200: #ffe1c9;
--orange-300: #ffcca2;
--orange-400: #ffb677;
--orange-500: #fe9310;
--orange-600: #f58700;
--orange-700: #ea7c00;
--orange-800: #dc6d00;
--orange-900: #ca5b00;
--brown-25: #fff8ef;
--brown-50: #fff1df;
--brown-100: #ffe9ce;
--brown-200: #ebcca6;
--brown-300: #cdaf8a;
--brown-400: #af936f;
--brown-500: #856a47;
--brown-600: #7f5e34;
--brown-700: #78511f;
--brown-800: #6e4200;
--brown-900: #593200;
--yellow-25: #fffdf9;
--yellow-50: #fffcf2;
--yellow-100: #fffaec;
--yellow-200: #fff2ce;
--yellow-300: #ffe8ab;
--yellow-400: #ffdf85;
--yellow-500: #ffcf33;
--yellow-600: #f1c000;
--yellow-700: #dfb200;
--yellow-800: #c9a000;
--yellow-900: #ad8a00;
--lime-25: #f4ffee;
--lime-50: #e9ffdd;
--lime-100: #ddffca;
--lime-200: #a8fb6f;
--lime-300: #94e659;
--lime-400: #80d142;
--lime-500: #63b215;
--lime-600: #45a000;
--lime-700: #268e00;
--lime-800: #007417;
--lime-900: #005321;
--green-25: #f5fff5;
--green-50: #ebffea;
--green-100: #e0ffdf;
--green-200: #a7ffa7;
--green-300: #5afa65;
--green-400: #45e953;
--green-500: #17cf36;
--green-600: #00b944;
--green-700: #00a34a;
--green-800: #008749;
--green-900: #00653e;
--teal-25: #f3ffff;
--teal-50: #e6fffe;
--teal-100: #d9fffe;
--teal-200: #8dfffe;
--teal-300: #57f4f4;
--teal-400: #43e5e5;
--teal-500: #17cfcf;
--teal-600: #00c2c0;
--teal-700: #00b5b1;
--teal-800: #00a49e;
--teal-900: #009087;
--cyan-25: #f7fcff;
--cyan-50: #eff8ff;
--cyan-100: #e7f5ff;
--cyan-200: #c2e6ff;
--cyan-300: #95d5ff;
--cyan-400: #61c4ff;
--cyan-500: #13a7ec;
--cyan-600: #069eda;
--cyan-700: #0095c9;
--cyan-800: #0088b2;
--cyan-900: #0a7897;
--blue-25: #f7faff;
--blue-50: #eef5ff;
--blue-100: #e5f1ff;
--blue-200: #bfdbff;
--blue-300: #92c2ff;
--blue-400: #63a8ff;
--blue-500: #0d80f2;
--blue-600: #0077db;
--blue-700: #006dc4;
--blue-800: #0060a7;
--blue-900: #005086;
--indigo-25: #f8f7ff;
--indigo-50: #f1efff;
--indigo-100: #eae7ff;
--indigo-200: #ccc3ff;
--indigo-300: #ac99ff;
--indigo-400: #916aff;
--indigo-500: #63c;
--indigo-600: #5a21b2;
--indigo-700: #4e0b99;
--indigo-800: #3b0071;
--indigo-900: #220040;
--purple-25: #fbf7ff;
--purple-50: #f8f0ff;
--purple-100: #f4e8ff;
--purple-200: #e4c4ff;
--purple-300: #d49aff;
--purple-400: #c36aff;
--purple-500: #a219e6;
--purple-600: #9000c4;
--purple-700: #7c009f;
--purple-800: #600073;
--purple-900: #3d0043;
--magenta-25: #fff8fb;
--magenta-50: #fff2f6;
--magenta-100: #ffebf2;
--magenta-200: #ffcddf;
--magenta-300: #ffa8cb;
--magenta-400: #ff7fb7;
--magenta-500: #eb4799;
--magenta-600: #da3689;
--magenta-700: #c82179;
--magenta-800: #b00065;
--magenta-900: #8a004c;
}
@media (prefers-color-scheme: dark) {
:host {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
}
:host([theme='dark']) {
--semantic-blue: var(--blue-700);
--semantic-red: var(--red-400);
--semantic-orange: var(--orange-400);
--semantic-green: var(--green-700);
--semantic-bg-blue: var(--blue-25);
--semantic-bg-red: var(--red-25);
--semantic-bg-orange: var(--orange-25);
--semantic-bg-green: var(--green-25);
--neutral-100: #121212;
--neutral-200: #424242;
--neutral-300: #616161;
--neutral-400: #757575;
--neutral-500: #9e9e9e;
--neutral-600: #bdbdbd;
--neutral-700: #e0e0e0;
--neutral-800: #eeeeee;
--neutral-900: #f5f5f5;
}
/* @media (prefers-color-scheme: dark) {
:host {
--label-color: #fff;
--active-label-color: #000;
--menu-bg: #525252;
--active-bg: #5898ff;
--active-bg-dimmed: #5c5c5c;
}
} */
:host {
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
--ui-font-size: 14px;
--ui-line-height: 1.5;
--ui-letter-spacing: 0.007em;
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
--ui-layer-1: var(--neutral-100);
--ui-layer-2: var(--neutral-200);
--ui-layer-3: var(--neutral-300);
--ui-layer-4: var(--neutral-400);
--ui-layer-5: var(--neutral-500);
--ui-layer-6: var(--neutral-600);
--ui-border-color: var(--primary-color);
--ui-border-radius: 4px;
--ui-text: var(--neutral-900);
--ui-text-secondary: var(--neutral-700);
--ui-text-placeholder: var(--neutral-500);
--ui-text-muted: var(--neutral-300);
/** A field is a UI element in which a user can type data, for
* example an input or textarea element.
*/
--ui-field-bg: var(--neutral-100);
--ui-field-bg-hover: var(--neutral-100);
--ui-field-bg-disabled: var(--neutral-300);
--ui-field-bg-invalid: var(--red-100);
--ui-field-bg-focus: var(--neutral-100);
--ui-field-border: 0.5px solid var(--border-color);
--ui-field-border-hover: 0.5px solid var(--border-color);
--ui-field-border-disabled: 0.5px solid var(--border-color);
--ui-field-border-invalid: 0.5px solid var(--border-color);
--ui-field-border-focus: 0.5px solid var(--border-color);
--ui-menu-bg: var(--neutral-100);
--ui-menu-text: var(--neutral-900);
--ui-menu-bg-hover: var(--neutral-200);
--ui-menu-text-hover: var(--neutral-900);
/** The \`active\` state is used for the state of menu items
* when they are selected.
*/
--ui-menu-bg-active: var(--primary-color);
--ui-menu-text-active: var(--primary-color-reverse);
/** The \`active-muted\` set is used for the state of
* submenus when they are open.
*/
--ui-menu-bg-active-muted: var(--neutral-300);
--ui-menu-text-active-muted: var(--neutral-900);
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
--ui-menu-divider: 0.5px solid #c7c7c7;
/* var(--neutral-300); */
--ui-menu-z-index: 10000;
--page-bg: var(--neutral-100);
--content-bg: var(--neutral-200);
}
@media (prefers-color-scheme: dark) {
:host {
--ui-menu-bg: var(--neutral-200);
}
}
:host([theme='dark']) {
--ui-menu-bg: var(--neutral-200);
}
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
Noto is a Linux/Android font.
*/
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh) {
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
}
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
}
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac) {
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
}
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(ko-kr-apple) {
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
}
:lang(zh-cn),
:lang(zh-sg),
:lang(zh-my),
:lang(zh),
:lang(zh-tw),
:lang(zh-hk),
:lang(zh-mo),
:lang(ja),
:lang(ja-jp),
:lang(ja-jp-mac),
:lang(ko),
:lang(ko-kr),
:lang(ko-kr-std),
:lang(ko-kr-apple) {
--ui-font-size: 1rem;
--ui-line-height: 1.7;
--ui-letter-spacing: 0;
}
:dir(rtl) {
--ui-line-height: auto;
--ui-letter-spacing: 0;
}
`,dh=`.ui-menu *,
.ui-menu ::before,
.ui-menu ::after {
box-sizing: border-box;
}
.ui-menu {
display: none;
color-scheme: light dark;
-webkit-user-select: none;
/* Important: Safari iOS doesn't respect user-select */
user-select: none;
cursor: default;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0 0 0 0);
--active-label-color: #fff;
/* ui-menu-text-active */
--label-color: #121212;
/* ui-menu-text */
--menu-bg: #e2e2e2;
/* ui-menu-background */
--active-bg: #5898ff;
/* ui-menu-background-active */
--active-bg-dimmed: #c5c5c5;
/* ui-menu-background-active-muted */
}
/** Use the :where pseudo selector to make the specificity of the
* selector 0, so that it can be overridden by the user.
*/
:where(.ui-menu-container) {
position: absolute;
overflow: visible;
width: auto;
height: auto;
z-index: 10000;
border-radius: 8px;
background: var(--ui-menu-bg);
box-shadow: var(--ui-menu-shadow);
list-style: none;
padding: 6px 0 6px 0;
margin: 0;
user-select: none;
cursor: default;
color: var(--ui-menu-text);
font-weight: normal;
font-style: normal;
text-shadow: none;
text-transform: none;
letter-spacing: 0;
outline: none;
opacity: 1;
/* The [popover] elements have a 1px solid black border. Ugh. */
border: none;
width: fit-content;
height: fit-content;
}
:where(.ui-menu-container > li) {
display: flex;
flex-flow: row;
align-items: center;
padding: 1px 7px 1px 7px;
margin-top: 0;
margin-left: 6px;
margin-right: 6px;
border-radius: 4px;
white-space: nowrap;
position: relative;
outline: none;
fill: currentColor;
user-select: none;
cursor: default;
text-align: left;
color: inherit;
font-family: var(--ui-font-family);
font-size: var(--ui-font-size);
line-height: var(--ui-line-height);
letter-spacing: var(--ui-letter-spacing);
}
:where(.ui-menu-container > li > .label) {
appearance: none;
background: none;
outline: none;
width: 100%;
margin: 0;
padding: 1px 2px 1px 1px;
overflow: visible;
border: 1px solid transparent;
white-space: nowrap;
text-align: start;
}
:where(.ui-menu-container > li:has(.heading)) {
margin-top: 0.5em;
}
:where(.ui-menu-container > li > .label.heading) {
font-weight: bold;
opacity: 0.4;
}
:where(.ui-menu-container > li.indent > .label) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li > .label.indent) {
margin-inline-start: 12px;
}
:where(.ui-menu-container > li[role='divider']) {
border-bottom: 1px solid var(--ui-menu-divider);
border-radius: 0;
padding: 0;
margin-left: 15px;
margin-right: 15px;
padding-top: 5px;
margin-bottom: 5px;
width: calc(100% - 30px);
/** 100% - (margin-left + margin-right) */
}
:where(.ui-menu-container > li[aria-disabled='true']) {
opacity: 0.5;
}
:where(.ui-menu-container > li.active) {
background: var(--ui-menu-bg-active);
background: -apple-system-control-accent;
color: var(--ui-menu-text-active);
}
:where(.ui-menu-container > li.active.is-submenu-open) {
background: var(--ui-menu-bg-active-muted);
color: inherit;
}
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
padding-inline-end: 0;
}
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
color: var(--ui-menu-text-active);
}
/** Keyboard shortcut */
:where(.ui-menu-container > li > kbd) {
font-family: var(--ui-font-family);
margin-inline-start: 12px;
opacity: 0.4;
}
:where(.ui-menu-container > li.active > kbd) {
opacity: 0.85;
}
.ui-trailing-chevron {
display: flex;
margin-inline-start: 24px;
width: 10px;
height: 10px;
margin-bottom: 4px;
}
.ui-trailing-chevron:dir(rtl) {
transform: scaleX(-1);
}
.ui-checkmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
.ui-mixedmark {
display: flex;
margin-inline-end: -11px;
margin-inline-start: -4px;
margin-top: 2px;
width: 16px;
height: 16px;
}
`,oo;function Hl(a){let y="";switch(a){case"mathfield-element":y=`
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
:host([hidden]) { display: none; }
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
:host(:focus), :host(:focus-within) {
outline: Highlight auto 1px; /* For Firefox */
outline: -webkit-focus-ring-color auto 1px;
}
:host([readonly]:focus), :host([readonly]:focus-within),
:host([read-only]:focus), :host([read-only]:focus-within) {
outline: none;
}
@media (hover: none) and (pointer: coarse) {
:host(:not(:focus)) :first-child { pointer-events: none !important; }
}`;break;case"core":y=ro;break;case"mathfield":y=vf;break;case"environment-popover":y=yf;break;case"suggestion-popover":y=ch;break;case"keystroke-caption":y=cc;break;case"virtual-keyboard":y=uh;break;case"ui":y=Eu;break;case"menu":y=dh;break;default:debugger}return y}function uc(a){return oo||(oo={}),oo[a]||(oo[a]=new CSSStyleSheet,oo[a].replaceSync(Hl(a))),oo[a]}var ol;function ks(a){var y;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const b=window.document.createElement("style");b.id=`mathlive-style-${a}`,b.append(window.document.createTextNode(Hl(a))),window.document.head.appendChild(b);return}if(ol||(ol={}),((y=ol[a])!=null?y:0)!==0)ol[a]+=1;else{const b=uc(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ol[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ol!=null&&ol[a]&&(ol[a]-=1,ol[a]<=0)){const y=oo[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class kp extends Un{constructor(y){var b;super(me(Se({},y),{type:"accent",body:(b=y.body)!=null?b:void 0})),y.accentChar?this.accent=y.accentChar:this.svgAccent=y==null?void 0:y.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(y){return new kp(y)}toJson(){return me(Se({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new Na({parent:y,mathstyle:"cramp"},this.style),ee=(b=Un.createBox(E,this.body))!=null?b:new Er("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let ae=Math.min(ee.height,el),fe;if(this.svgAccent)fe=Os(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const be=new Er(this.accent,{fontFamily:"Main-Regular"});be.italic=0;const Ce=this.accent===8407?" ML__accent-vec":"";fe=new Er(new Er(be),{classes:"ML__accent-body"+Ce})}fe=new ao({shift:0,children:[{box:new Er(ee)},-ae,{box:fe,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const ge=new Er(fe,{type:"lift"});return this.caret&&(ge.caret=this.caret),this.bind(E,ge.wrap(E)),this.attachSupsub(E,{base:ge})}},ne={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},te=Object.fromEntries(Object.entries(ne).map(([a,y])=>[y,a]));function ie(a){var y;return(y={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[a])!=null?y:a.codePointAt(0)}function ue(a,y,b,E){var ee;const ae=new Er(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&ae.setTop((1-y.scalingFactor)*ls),ae}function ye(a,y,b,E,ee){var re,ae;const fe=new Na({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),ge=new Er(ie(a),{fontFamily:`Size${y}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${y}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(fe);return b&&ge.setTop((1-fe.scalingFactor)*ls),ge}function _e(a,y,b,E,ee){var re;let ae,fe,ge,be;ae=ge=be=ie(a),fe=null;let Ce="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?ge=ae=be=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?ge=ae=be=8741:a==="\\uparrow"?ge=be=9168:a==="\\Uparrow"?ge=be=8214:a==="\\downarrow"?ae=ge=9168:a==="\\Downarrow"?ae=ge=8214:a==="\\updownarrow"?(ae=8593,ge=9168,be=8595):a==="\\Updownarrow"?(ae=8657,ge=8214,be=8659):a==="["||a==="\\lbrack"?(ae=9121,ge=9122,be=9123,Ce="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,ge=9125,be=9126,Ce="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(ge=ae=9122,be=9123,Ce="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,ge=be=9122,Ce="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(ge=ae=9125,be=9126,Ce="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,ge=be=9125,Ce="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,ge=9116,be=9117,Ce="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,ge=9119,be=9120,Ce="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,fe=9128,be=9129,ge=9130,Ce="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,fe=9132,be=9133,ge=9130,Ce="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,be=9129,ge=9130,Ce="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,be=9133,ge=9130,Ce="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,be=9133,ge=9130,Ce="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,be=9129,ge=9130,Ce="Size4-Regular"):a==="\\surd"?(ae=57345,be=9143,ge=57344,Ce="Size4-Regular"):a==="\\ulcorner"?(ae=9484,ge=be=32):a==="\\urcorner"?(ae=9488,ge=be=32):a==="\\llcorner"?(be=9492,ge=ae=32):a==="\\lrcorner"&&(ae=9496,ge=ae=32);const $e=tl(ae,Ce),nt=$e.height+$e.depth,xt=tl(ge,Ce),Tt=xt.height+xt.depth,Tn=tl(be,Ce),Sr=Tn.height+Tn.depth;let _n=0,tr=1;if(fe!==null){const Qo=tl(fe,Ce);_n=Qo.height+Qo.depth,tr=2}const kr=nt+Sr+_n,cr=Math.max(0,Math.ceil((y-kr)/(tr*Tt))),si=kr+cr*tr*Tt;let Ti=ls;b&&(Ti=Ti*E.scalingFactor);const bi=si/2-Ti,Fa=.008,io=[];io.push({box:new Er(be,{fontFamily:Ce})}),io.push(-Fa);const Or=new Er(ge,{fontFamily:Ce});if(fe===null)for(let Qo=0;Qo<cr;Qo++)io.push({box:Or});else{for(let Qo=0;Qo<cr;Qo++)io.push({box:Or});io.push(-Fa),io.push({box:new Er(fe,{fontFamily:Ce})}),io.push(-Fa);for(let Qo=0;Qo<cr;Qo++)io.push({box:Or})}io.push(-Fa),io.push({box:new Er(ae,{fontFamily:Ce})});let Fs="";Ce==="Size1-Regular"?Fs=" delim-size1":Ce==="Size4-Regular"&&(Fs=" delim-size4");const kl=new ao({bottom:bi,children:io},{classes:Fs});return new Er(kl,me(Se({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Ne=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Be=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),bt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),It=[0,1.2,1.8,2.4,3];function mn(a,y,b,E){return a===void 0||a==="."?ii(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Ne.has(a)||bt.has(a)?ye(a,y,!1,b,E):Be.has(a)?_e(a,It[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var ln=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Yn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],hr=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Ir(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Vr(a,y,b,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<b.length&&b[re].type!=="stack";re++){const ae=tl(a,Ir(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let fe=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?fe*=Math.max(pu[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(fe*=Math.max(pu[Math.max(1,E.size-1)],E.minFontScale))),fe>y)return b[re]}return b[b.length-1]}function ni(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return ii(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;bt.has(y)?ae=ln:Ne.has(y)?ae=hr:ae=Yn;const fe=Vr(ie(y),b,ae,ee),ge=new Na({parent:ee,mathstyle:fe.mathstyle},re==null?void 0:re.style);return fe.type==="small"?ue(y,ge,E,me(Se({},re),{type:a})):fe.type==="large"?ye(y,fe.size,E,ge,me(Se({},re),{type:a})):(console.assert(fe.type==="stack"),_e(y,b,E,ge,me(Se({},re),{type:a})))}function Kr(a,y,b,E,ee,re){if(y===".")return ii(ee,re==null?void 0:re.classes);const ae=ls*ee.scalingFactor,fe=901,ge=5/$l,be=Math.max(b-ae,E+ae),Ce=Math.max(be/500*fe,2*be-ge);return ni(a,y,Ce,!0,ee,re)}function ii(a,y){const b=new Er(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new Na({parent:a,mathstyle:"textstyle"}))}var Oi=class Lp extends Un{constructor(y){var b;super({type:"placeholder",command:"\\placeholder",mode:(b=y==null?void 0:y.mode)!=null?b:"math",style:y==null?void 0:y.style}),this.captureSelection=!0}static fromJson(y){return new Lp(y)}toJson(){return super.toJson()}render(y){let b;return this.value=y.placeholderSymbol,typeof y.renderPlaceholder=="function"?b=y.renderPlaceholder(y):b=this.createBox(y),this.caret&&(b.classes+=" ML__placeholder-selected"),b}_serialize(y){return y.skipPlaceholders?"":"\\placeholder{}"}},Fi=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],La=["cases","dcases","rcases"],so=["align","align*","aligned","gather","gathered","split"],Uo=["array","subequations","eqnarray"];function xo(a){return Uo.concat(so).concat(La).concat(Fi).includes(a)}function fs(a){return Fi.includes(a)}function hs(a){return La.includes(a)}function No(a){return so.includes(a)}function ps(a,y,b){let E=0;for(const be of b)"align"in be&&(E+=1);let ee=0;const re=[];for(const be of y){let Ce=0;for(ee=Math.max(ee,Math.min(be.length,E));Ce<be.length;){const $e=[],nt=Math.min(be.length,Ce+E);for(;Ce<nt;){const xt=be[Ce];xt.length===0?$e.push([new Un({type:"first",mode:a.mode})]):xt[0].type!=="first"?$e.push([new Un({type:"first",mode:a.mode}),...xt]):(console.assert(!xt.slice(1).some(Tt=>Tt.type==="first")),$e.push(xt)),Ce+=1}re.push($e)}}re.length>0&&re[re.length-1].length===1&&re[re.length-1][0].length===1&&re[re.length-1][0][0].type==="first"&&re.pop();const ae=[];for(const be of re){if(be.length!==ee)for(let Ce=be.length;Ce<ee;Ce++)be.push([new Un({type:"first",mode:a.mode}),new Oi]);ae.push(be)}let fe=0,ge=0;for(const be of ae){ge=0;for(const Ce of be){for(const $e of Ce)$e.parent=a,$e.parentBranch=[fe,ge];ge+=1}fe+=1}return a.isDirty=!0,ae}var ca=class Ap extends Un{constructor(y,b,E,ee={}){var re;super({type:"array"}),this.environmentName=y,this.rowGaps=E,ee.mathstyleName&&(this.mathstyleName=ee.mathstyleName),ee.columns&&(ee.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ee.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=ps(this,b,this.colFormat),ee.leftDelim&&(this.leftDelim=ee.leftDelim),ee.rightDelim&&(this.rightDelim=ee.rightDelim),ee.arraycolsep!==void 0&&(this.arraycolsep=ee.arraycolsep),this.colSeparationType=ee.colSeparationType,ee.arraystretch!==void 0&&(this.arraystretch=ee.arraystretch),this.minColumns=(re=ee.minColumns)!=null?re:1}static fromJson(y){return new Ap(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=me(Se({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(y.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(y.arraycolsep=this.arraycolsep),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}branch(y){var b;if(Dc(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Dc(y)?(this.isDirty=!0,(b=this.branch(y))!=null?b:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(y=>!!y.align).length}removeBranch(y){if(il(y))return super.removeBranch(y);const b=this.branch(y);return this.array[y[0]][y[1]]=void 0,b.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}get hasChildren(){return this.children.length>0}get children(){const y=[];for(const b of this.array)for(const E of b)if(E)for(const ee of E)y.push(...ee.children),y.push(ee);return[...y,...super.children]}render(y){var b,E,ee,re,ae,fe;const ge=new Na({parent:y,mathstyle:this.mathstyleName},this.style),be=ge.getRegisterAsEm("arrayrulewidth"),Ce=ge.getRegisterAsEm("arraycolsep"),$e=ge.getRegisterAsEm("doublerulesep"),nt=(E=(b=this.arraystretch)!=null?b:ge.getRegisterAsNumber("arraystretch"))!=null?E:1;let xt=typeof this.arraycolsep=="number"?this.arraycolsep:Ce;this.colSeparationType==="small"&&(xt=.2778*(new Na({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const Tt=nt*hu,Tn=.7*Tt,Sr=.3*Tt;let _n=0;const tr=[];let kr=0;const cr=this.array.length;for(let co=0;co<cr;++co){const Io=this.array[co];kr=Math.max(kr,Io.length);const es=new Na({parent:ge,mathstyle:this.mathstyleName},this.style);let Ll=Tn/es.scalingFactor,Al=Sr/es.scalingFactor;const Tl={cells:[],height:0,depth:0,pos:0};for(const cl of Io){const e0=(ee=Un.createBox(es,cl,{type:"ignore"}))!=null?ee:new Er(null,{type:"ignore"});Al=Math.max(Al,e0.depth),Ll=Math.max(Ll,e0.height),Tl.cells.push(e0)}let Il=(re=sd(this.rowGaps[co]))!=null?re:0;Il>0&&(Il+=Sr,Al=Math.max(Al,Il),Il=0),co<cr-1&&!fs(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Al+=ge.getRegisterAsEm("jot")),Tl.height=Ll,Tl.depth=Al,_n+=Ll,Tl.pos=_n,_n+=Al+Il,tr.push(Tl)}const si=_n/2+ls,Ti=[];for(let co=0;co<kr;co++){const Io=[];for(const es of tr){const Ll=es.cells[co];Ll.depth=es.depth,Ll.height=es.height,Io.push({box:Ll,shift:es.pos-si})}Io.length>0&&Ti.push(new ao({individualShift:Io}))}const bi=[];let Fa=!1,io=!1,Or=0,Fs=!this.leftDelim;const{colFormat:kl}=this;for(const co of kl){if("align"in co&&Or>=Ti.length)break;if("align"in co)Fa?bi.push(wo(2*xt)):(io||Fs)&&bi.push(wo(xt)),bi.push(new Er(Ti[Or],{classes:"col-align-"+co.align})),Or++,Fa=!0,io=!1,Fs=!1;else if("gap"in co){if(typeof co.gap=="number")bi.push(wo(co.gap));else{const Io=Eo(y,tr,si,co.gap);Io&&bi.push(Io)}Fa=!1,io=!1,Fs=!1}else if("separator"in co){const Io=new Er(null,{classes:"vertical-separator"});Io.height=_n,Io.setStyle("height",_n,"em"),Io.setStyle("border-right",`${be}em ${co.separator} currentColor`),Io.setStyle("vertical-align",-(_n-si),"em");let es=0;io?es=$e-be:Fa&&(es=xt-be),Io.left=es,bi.push(Io),Fa=!1,io=!0,Fs=!1}}Fa&&!this.rightDelim&&bi.push(wo(xt));const Xs=new Er(bi,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Xs.caret=this.caret),this.bind(y,Xs);const Qo=Xs.height,zs=Xs.depth,Es=this.bind(y,new Er([this.bind(y,Kr("open",(ae=this.leftDelim)!=null?ae:".",Qo,zs,ge,{isSelected:this.isSelected})),Xs,this.bind(y,Kr("close",(fe=this.rightDelim)!=null?fe:".",Qo,zs,ge,{isSelected:this.isSelected}))],{type:"ord"}));return Es?(Es.setStyle("display","inline-block"),this.caret&&(Es.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Es}))):null}_serialize(y){var b;const E=[];if(this.environmentName==="lines"?E.push("{\\displaylines"):E.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(E.push("{"),this.colFormat!==void 0)for(const ee of this.colFormat)"align"in ee&&typeof ee.align=="string"?E.push(ee.align):"separator"in ee&&ee.separator==="solid"?E.push("|"):"separator"in ee&&ee.separator==="dashed"&&E.push(":");E.push("}")}for(let ee=0;ee<this.array.length;ee++){for(let re=0;re<this.array[ee].length;re++)re>0&&E.push(" & "),E.push(Un.serialize(this.array[ee][re],y));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(b=re.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ka(E)}getCell(y,b){return this.array[y][b]}setCell(y,b,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[y][b]!==void 0);for(const re of this.array[y][b])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new Un({type:"first",mode:this.mode}),...E]),this.array[y][b]=ee;for(const re of ee)re.parent=this,re.parentBranch=[y,b];this.isDirty=!0}addRowBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(Co(this));this.array.splice(y,0,b);for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addRowAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(Co(this));this.array.splice(y+1,0,b);for(let E=y+1;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}removeRow(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>y);const b=this.array.splice(y,1);for(const E of b)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addColumnBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,Co(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumnAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y+1,0,Co(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>y);for(const b of this.array){const E=b.splice(y,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}get cells(){const y=[];for(const b of this.array)for(const E of b)E&&y.push(E.filter(ee=>ee.type!=="first"));return y}};function Co(a){const y=new Un({type:"first",mode:a.mode});y.parent=a;const b=new Oi;return b.parent=a,[y,b]}function wo(a){const y=new Er(null,{classes:"arraycolsep"});return y.width=a,y}function Eo(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Un.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new ao({individualShift:ee}).wrap(a)}var Ao=class Tp extends Un{constructor(y){super({mode:y.mode,command:y.command,style:y.style,body:y.body,type:"box"}),this.framecolor=y.framecolor,this.backgroundcolor=y.backgroundcolor,this.padding=y.padding,this.offset=y.offset,this.border=y.border}static fromJson(y){return new Tp(y)}toJson(){return me(Se({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,ee,re;const ae=Un.createBox(y,this.body,{type:"lift"});if(!ae)return null;const fe=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=fe,ae.setStyle("display","inline-block"),ae.setStyle("position","relative"),ae.setStyle("height",Math.floor(100*ae.height+ae.depth)/100,"em"),ae.setStyle("vertical-align",-Math.floor(100*ae.height)/100,"em");const ge=new Na({parent:y},this.style),be=ge.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),Ce=new Er(null,{classes:"ML__box"});Ce.height=ae.height+be,Ce.depth=ae.depth+be,Ce.setStyle("box-sizing","border-box"),Ce.setStyle("position","absolute"),Ce.setStyle("top",-be+.3,"em"),Ce.setStyle("left",0),Ce.setStyle("height",Ce.height+Ce.depth,"em"),Ce.setStyle("width","100%"),this.backgroundcolor&&Ce.setStyle("background-color",(ee=ge.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&Ce.setStyle("border",`${ge.getRegisterAsEm("fboxrule",2)}em solid ${(re=ge.toColor(this.framecolor))!=null?re:"black"}`),this.border&&Ce.setStyle("border",this.border);const $e=new Er([Ce,ae],{type:"lift"});return $e.setStyle("display","inline-block"),$e.setStyle("position","relative"),$e.setStyle("line-height",0),$e.height=ae.height+be+(fe>0?fe:0),$e.depth=ae.depth+be+(fe<0?-fe:0),$e.setStyle("padding-left",be,"em"),$e.setStyle("padding-right",be,"em"),$e.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*be+Math.abs(fe)))/100,"em"),$e.setStyle("margin-top",-be,"em"),$e.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*be-fe))/100,"em"),$e.setStyle("vertical-align",Math.floor(100*(ae.depth+2*be))/100,"em"),this.caret&&($e.caret=this.caret),this.attachSupsub(y,{base:$e})}_serialize(y){return y.skipStyles?ka([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Wl=class Ip extends Un{constructor(y,b){var E;super({type:"composition",mode:(E=b==null?void 0:b.mode)!=null?E:"math",value:y})}static fromJson(y){return new Ip(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Er(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},ys=class Dp extends Un{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Dp(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Yo=class Pp extends Un{constructor(y,b,E){super({type:"group",mode:b,style:E}),this.body=y,this.boxType=y.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,y&&y.length===1&&y[0].command===","&&(this.captureSelection=!0)}static fromJson(y){return new Pp(y.body,y.mode,y.style)}render(y){const b=Un.createBox(y,this.body,{type:this.boxType});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Xa=class Op extends Un{constructor(y,b,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=y,this.body=b,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(y){var b;return new Op((b=y.variant)!=null?b:"",y.body,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}_serialize(y){var b,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?ka(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?ka(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):ka([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),ee])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=ne[E])!=null?b:E}render(y){var b,E;const ee=new Na({parent:y},this.style);console.assert(this.body!==void 0);const re=new Na({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Un.createBox(ee,this.body,{type:"inner"}))!=null?b:new Er(null,{type:"inner"}),fe=ae.height/re.scalingFactor,ge=ae.depth/re.scalingFactor,be=[];if(this.leftDelim&&be.push(this.bind(re,Kr("open",this.leftDelim,fe,ge,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&($o(ae.children,this,ee,fe,ge),be.push(ae)),this.rightDelim){let xt=this.containsCaret?" ML__contains-caret":"",Tt=this.rightDelim;Tt==="?"&&(ee.smartFence?(Tt=this.matchingRightDelim(),xt+=" ML__smart-fence__close"):Tt="."),be.push(this.bind(re,Kr("close",Tt,fe,ge,re,{isSelected:this.isSelected,classes:xt+" ML__close",mode:this.mode,style:this.style})))}let Ce=this.variant==="mleft...mright";const $e=this.leftSibling;$e&&(!Ce&&$e.isFunction&&(Ce=!0),!Ce&&$e.type==="subsup"&&((E=$e.leftSibling)!=null&&E.isFunction)&&(Ce=!0));const nt=new Er(be,{type:Ce?"close":"inner",classes:"left-right"});return nt.setStyle("margin-top",`${-ae.depth}em`),nt.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(nt.caret=this.caret),this.bind(ee,nt.wrap(ee))}};function $o(a,y,b,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=y.bind(b,Kr("inner",ae.value,E,ee,b,{isSelected:y.isSelected})),a[re].caret=ae.caret,a[re].isSelected=ae.isSelected,a[re].cssId=ae.cssId,a[re].htmlData=ae.htmlData,a[re].htmlStyle=ae.htmlStyle,a[re].attributes=ae.attributes,a[re].cssProperties=ae.cssProperties):ae.children&&$o(ae.children,y,b,E,ee)}}var Mu=class Np extends Un{constructor(y,b){var E;super({type:"macro",command:y,style:b.style}),this.body=b.body,b.captureSelection===void 0?b.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=b.captureSelection,this.macroArgs=b.args,this.expand=(E=b.expand)!=null?E:!1}static fromJson(y){return new Np(y.command,y)}toJson(){const y=super.toJson();return this.expand&&(y.expand=!0),this.captureSelection!==void 0&&(y.captureSelection=this.captureSelection),this.macroArgs&&(y.args=this.macroArgs),y}_serialize(y){var b;return y.expandMacro&&this.expand?this.bodyToLatex(y):this.command+((b=this.macroArgs)!=null?b:"")}render(y){const b=Un.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},sl=class Rp extends Un{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Rp}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},xl=class Bp extends Un{constructor(y,b,E=!1,ee,re){var ae;super({type:"prompt",mode:(ae=re==null?void 0:re.mode)!=null?ae:"math",style:re==null?void 0:re.style,command:"\\placeholder"}),this.body=ee,this.correctness=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new Bp(y.placeholderId,y.correctness,y.locked,y.body,y)}toJson(){const y=super.toJson();return this.placeholderId&&(y.placeholderId=this.placeholderId),this.body||delete y.body,this.body&&(y.body=this.body.filter(b=>b.type!=="first").map(b=>b.toJson())),this.correctness&&(y.correctness=this.correctness),y.locked=this.locked,y}render(y){const b=new Na({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Un.createBox(y,this.body);if(!ae)return null;ae.height||(ae.height=b.metrics.xHeight),ae.setStyle("vertical-align",-ae.height,"em"),this.correctness==="correct"?ae.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&ae.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const fe=new Er(ae,{type:"ord"});fe.setStyle("display","inline-block"),fe.setStyle("height",ae.height+ae.depth,"em"),fe.setStyle("vertical-align",-re,"em");let ge="ML__prompt ";this.locked?ge+=" ML__lockedPromptBox ":ge+=" ML__editablePromptBox ",this.correctness==="correct"?ge+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(ge+=" ML__incorrectPromptBox "),this.containsCaret&&(ge+=" ML__focusedPromptBox ");const be=new Er(null,{classes:ge,attributes:{part:"prompt"}});be.height=fe.height+re,be.depth=fe.depth+re,be.width=fe.width+2*ee,be.setStyle("box-sizing","border-box"),be.setStyle("position","absolute"),be.setStyle("height",fe.height+fe.depth+2*re,"em"),ee===0&&be.setStyle("width","100%"),ee!==0&&(be.setStyle("width",`calc(100% + ${2*ee}em)`),be.setStyle("top",E,"em"),be.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(be.width=3*ee,be.setStyle("width",`calc(100% + ${3*ee}em)`),be.setStyle("left",-1.5*ee,"em"));let Ce="";this.correctness==="incorrect"&&(Ce+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),Ce&&(be.svgOverlay=Ce);const $e=new Er([be,fe],{classes:"ML__prompt-atom"});return $e.setStyle("position","relative"),$e.setStyle("display","inline-block"),$e.setStyle("line-height",0),$e.height=fe.height+re+.2,$e.depth=fe.depth+re,$e.left=ee,$e.right=ee,$e.setStyle("height",fe.height+re,"em"),$e.setStyle("top",fe.depth-fe.height,"em"),$e.setStyle("vertical-align",fe.depth+re,"em"),$e.setStyle("margin-left",.5,"em"),$e.setStyle("margin-right",.5,"em"),this.caret&&($e.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:$e}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let ee="\\placeholder";return this.placeholderId&&(ee+=`[${this.placeholderId}]`),this.correctness==="correct"?ee+="[correct]":this.correctness==="incorrect"&&(ee+="[incorrect]"),this.locked&&(ee+="[locked]"),ho(ee,E)}},js=class $p extends Un{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new $p(y);for(const E of sc)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new Na({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new Er(null),ae=new Er(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(y,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Ro(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Zl=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;b!=null||(b={}),this.tokens=a,this.context=y instanceof Na&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new Na({from:y,mathstyle:b.mathstyle},b.style),this.args=(E=b.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=b.style)!=null?ee:{},parseMode:(re=b.parseMode)!=null?re:"math",mathstyle:(ae=b.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:Se({},ee.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:ee.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b:ee.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=re}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(Se({before:pl(this.tokens.slice(this.index,this.index+10)),after:pl(this.tokens.slice(Math.max(0,this.index-10),this.index))},a))}get mathlist(){return this.parsingContext.mathlist}set mathlist(a){this.parsingContext.mathlist=a}get parseMode(){return this.parsingContext.parseMode}set parseMode(a){this.parsingContext.parseMode=a}get tabularMode(){return this.parsingContext.tabular}get style(){let a=this.parsingContext;for(;a;){if(a.style)return Se({},a.style);a=a.parent}return{}}set style(a){this.parsingContext.style=a}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(a){return this.tokens[this.index]===a?(this.index++,!0):!1}lastSubsupAtom(){let a;return this.mathlist.length>0&&(a=this.mathlist[this.mathlist.length-1],a.type==="subsup"||a.subsupPlacement!==void 0)||(a=new js({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:y}=this;if(y<this.tokens.length&&this.tokens[y].startsWith("\\")){const b=Cr(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const y=(a=this.args)==null?void 0:a.call(this,"?");return y?qo(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Oi({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let y=this.tokens[this.index];for(;y&&y!==a;)y=this.tokens[++this.index];y===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const y=this.index;let b=this.end(),E="";for(;!b;){const re=this.get();Ro(re)?(E+=re,b=this.end()||E.length>=a.length):b=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=y),ee}scanString(){let a="";for(;!this.end();){const y=this.peek();if(y==="]")return a;if(y==="<space>")a+=" ";else if(y.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=y.substring(1);else if(Ro(y))a+=y;else return a;this.next()}return a}scanBalancedString(){let a="",y=this.end(),b=1;for(;!y;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",b+=1):E==="<}>"?(b-=1,b>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,y=b===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let y="",b=1;for(;b>0&&!this.end();){const E=this.get();E==="<}>"?(b-=1,b>0&&(y+="}")):E==="<{>"?(b+=1,y+="{"):(/\\[a-zA-Z]+$/.test(y)&&/^[a-zA-Z]/.test(E)&&(y+=" "),y+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return y}scanNumber(a=!0){var y,b;let E=!1,ee=this.peek();for(;ee==="<space>"||ee==="+"||ee==="-";)this.get(),ee==="-"&&(E=!E),ee=this.peek();a=!!a;let re=10,ae=/\d/;if(this.match("'"))re=8,ae=/[0-7]/,a=!0;else if(this.match('"'))re=16,ae=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,ae=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ee=this.get(),ee?ee.length===2&&ee.startsWith("\\")?{number:(E?-1:1)*((y=ee.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ee.codePointAt(0))!=null?b:0),base:"alpha"}:null;let fe="";for(;this.hasPattern(ae);)fe+=this.get();if(!a&&(this.match(".")||this.match(",")))for(fe+=".";this.hasPattern(ae);)fe+=this.get();const ge=a?Number.parseInt(fe,re):Number.parseFloat(fe);return Number.isNaN(ge)?null:{number:E?-ge:ge,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const y=this.index,b=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return b;let E=!1;if(b===null)for(;;){const re=this.peek();if(re==="-")E=!E;else if(re!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const re=this.get();return re.startsWith("\\")?b?{register:re,global:!0,factor:(E?-1:1)*b.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=y,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||b!==null?{register:ee,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ee}:(this.index=y,null)):(this.index=y,null)}scanValue(){const a=this.scanRegister();if(a)return a;const y=this.index,b=this.scanGlueOrDimen();if(b&&("unit"in b||"glue"in b&&"unit"in b.glue))return b;this.index=y;const E=this.scanNumber();if(E)return E;if(this.end()||!Ro(this.peek()))return null;const ee=this.scanString();return ee.length>0?{string:ee}:null}scanDimen(){const a=this.scanNumber(!1);if(a===null)return null;const y=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let b;return this.matchKeyword("pt")?b="pt":this.matchKeyword("mm")?b="mm":this.matchKeyword("cm")?b="cm":this.matchKeyword("ex")?b="ex":this.matchKeyword("px")?b="px":this.matchKeyword("em")?b="em":this.matchKeyword("bp")?b="bp":this.matchKeyword("dd")?b="dd":this.matchKeyword("pc")?b="pc":this.matchKeyword("in")?b="in":this.matchKeyword("mu")&&(b="mu"),b?{dimension:y,unit:b}:{dimension:y}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const y={glue:a};if(this.matchKeyword("plus")){const b=this.scanDimen();if(b)y.grow=b;else return y}if(this.skipWhitespace(),this.match("\\relax"))return y;if(this.skipWhitespace(),this.matchKeyword("minus")){const b=this.scanDimen();if(b)y.shrink=b;else return y}return!y.grow&&!y.shrink?a:y}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const y=this.get();y==="c"||y==="r"||y==="l"?a.push({align:y}):y==="|"?a.push({separator:"solid"}):y===":"?a.push({separator:"dashed"}):y==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(b=>b==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return a}scanModeSet(){let a;if(this.match("\\(")&&(a="textstyle"),!a&&this.match("\\[")&&(a="displaystyle"),!a)return null;this.beginContext({mode:"math",mathstyle:a});const y=this.scan(b=>b===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const y=this.scan(b=>b===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const y=_t(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const fe of y.params)if(fe.isOptional)b.push(this.scanOptionalArgument(fe.type));else{const ge=this.scanArgument(fe.type);ge||this.onError({code:"missing-argument",arg:a}),b.push(ge)}this.beginContext({tabular:y.tabular});const E=[],ee=[];let re=[],ae=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae)if(this.matchColumnSeparator())re.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){re.push(this.mathlist),this.mathlist=[];let fe=null;this.skipWhitespace(),this.match("[")&&(fe=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(fe!=null?fe:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(fe=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(fe)));while(!ae);return re.push(this.mathlist),re.length>0&&E.push(re),this.endContext(),y.createAtom(a,E,ee,b)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const y=this.mathlist;return this.mathlist=a,y}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let y="",b=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=Cr(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Yo(y,this.parseMode,this.style);return b.verbatimLatex=pl(this.tokens.slice(a,this.index)),b}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let a=1;for(;!this.end()&&a!==0;)this.match("(")&&(a+=1),this.match(")")&&(a-=1),a!==0&&this.parseExpression();const y=new Xa("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),y}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Ro(a)&&!a.startsWith("\\"))return null;this.next();const y=Cr(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new ys("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new ys("\\mright");let y="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;y="\\mright"}const b=this.scanDelim();if(!b)return this.onError({code:"unexpected-delimiter"}),new ys(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Xa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const y=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?y.addChild(new Un({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Un({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(ft(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),y=!a&&this.match("\\nolimits"),b=!y&&!a&&this.match("\\displaylimits");if(!a&&!y&&!b)return!1;const E=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return E===null?!1:(E.explicitSubsupPlacement=!0,a&&(E.subsupPlacement="over-under"),y&&(E.subsupPlacement="adjacent"),b&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let y;const b=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?b.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?b.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?y=ee.type.slice(0,-1):b.push(this.scanArgument(ee.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Ro(a)){const b=Ss.createAtom(this.parseMode,a,Se({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=Cr(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new ys(a)];if(b.definitionType==="symbol"){const E=Se({},this.style);b.variant&&(E.variant=b.variant),y=new Un({type:b.type,command:a,style:E,value:String.fromCodePoint(b.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(b.applyMode||b.applyStyle||b.infix)return this.onError({code:"invalid-command",arg:a}),[new ys(a)];b.createAtom&&(y=b.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return y?[y]:null}scanArgument(a){var y;this.skipFiller();const b=this.parseMode;if(a==="auto"&&(a=b),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(y=this.scanDelim())!=null?y:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==b&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}return a==="balanced-string"||console.assert(!1),null}if(a==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}return a==="string"?E=this.scanString():a==="balanced-string"?E=this.scanBalancedString():a==="colspec"?E=this.scanColspec():a==="value"&&(E=this.scanValue()),this.skipUntilToken("<}>"),E}scanOptionalArgument(a){if(a=a==="auto"?this.parseMode:a,this.skipFiller(),!this.match("["))return null;let y=null;for(;!this.end()&&!this.match("]");)if(a==="string")y=this.scanString();else if(a==="value")y=this.scanValue();else if(a==="colspec")y=this.scanColspec();else if(a==="bbox"){const b={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)b.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?b.border=ae[1]:b.backgroundcolor={string:ee}}}y=b}else a==="math"&&(this.beginContext({mode:"math"}),y=this.mathlist.concat(this.scan(b=>b==="]")),this.endContext());return y}scanSymbolOrCommand(a){var y,b,E;if(a==="\\placeholder"){const fe=this.scanOptionalArgument("string"),ge=this.scanOptionalArgument("math"),be=Un.serialize(ge,{defaultMode:"math"});let Ce=[],$e;!$e&&be==="correct"?$e="correct":!$e&&be==="incorrect"?$e="incorrect":be!==""&&(Ce=ge);const nt=this.scanOptionalArgument("string")==="locked",xt=this.scanArgument("auto");let Tt;return xt&&Array.isArray(xt)&&xt.length>0?Tt=xt:xt&&typeof xt=="object"&&"group"in xt?Tt=xt.group:Tt=Ce,fe?[new xl(fe,$e,nt,Tt!=null?Tt:Ce,{mode:this.parseMode,style:this.style})]:[new Oi({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const fe=this.index,ge=this.scanLiteralGroup()||this.next();if(!ge)return null;if(this.context.registers[ge.substring(1)]){const be=this.scanArgument("string");be!==null&&(this.context.registers[ge.substring(1)]=be);const Ce=ka([a,pl(this.tokens.slice(fe,this.index))]);return[new Un({type:"text",value:"",verbatimLatex:Ce})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Cr(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(fe=>new Un({type:"text",value:fe,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new ys(a)]);const ae=this.index;if(re.definitionType==="symbol"){const fe=Se({},this.style);re.variant&&(fe.variant=re.variant),ee=new Un({type:re.type,command:a,style:fe,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const fe=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let ge,be=[];if(re.parse?be=re.parse(this):[ge,be]=this.scanArguments(re),this.parseMode=fe,re.applyMode&&!re.applyStyle&&!re.createAtom)return ft(be[0]);if(re.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof re.createAtom=="function")ee=re.createAtom({command:a,args:be,style:this.style,mode:this.parseMode}),ge&&(ee.body=ft(this.scanArgument(ge)));else if(typeof re.applyStyle=="function"){const Ce=Se(Se({},this.style),re.applyStyle(a,be,this.context)),$e=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),ge){const nt=this.style;this.style=Ce;const xt=this.scanArgument(ge);return this.style=nt,this.parseMode=$e,ft(xt)}this.style=Ce}else ee=new Un({type:"mord",command:(b=re.command)!=null?b:a,style:Se({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof Un&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const fe=ka([a,pl(this.tokens.slice(ae,this.index))]);fe&&(ee.verbatimLatex=fe)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const fe=this.scanSmartFence();if(fe)return[ee,fe]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Ro(a)){const y=Ss.createAtom(this.parseMode,a,Se({},this.style));if(!y)return null;if(y.isFunction&&this.smartFence){const b=this.scanSmartFence();if(b)return[y,b]}return[y]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new al(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var y;const b=this.context.getMacro(a);if(!b)return null;const E=this.index,ee=b.args,re={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let ae=1;ae<=ee;ae++){let fe=this.scanLiteralGroup();if(!fe){const ge=this.index;this.scanExpression(),fe=pl(this.tokens.slice(ge,this.index))}re[ae]=fe}return new Mu(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:pl(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:qo(b.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ee=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(ee===null){if(this.parseSupSub()||this.parseLimits())return!0;ee=this.scanSymbolCommandOrLiteral()}return ee?(Array.isArray(ee)?this.mathlist.push(...ee):this.mathlist.push(ee),!0):!1}};function qo(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,fe=new Zl(nl(a,ae),y==null?void 0:y.context,{args:ae,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ee=y==null?void 0:y.parseMode)!=null?ee:"math",style:(re=y==null?void 0:y.style)!=null?re:{}}),ge=[];for(;!fe.end();)ge.push(...fe.scan(()=>!1));return ge}function t0(a,y){var b;const E=new Zl(nl(a,null),y==null?void 0:y.context,{mathstyle:"displaystyle",parseMode:(b=y==null?void 0:y.parseMode)!=null?b:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Fp extends Un{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=yo.go(yr.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=qo(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new Fp(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return me(Se({},super.toJson()),{arg:this.arg})}render(y){const b=Un.createBox(y,this.body,{type:"inner"});return this.caret&&(b.caret=this.caret),this.bind(y,b)}_serialize(y){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};Ut(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var yr={go:function(a,y){if(!a)return[];y===void 0&&(y="ce");var b="0",E={};E.parenthesisLevel=0,a=a.replace(/\n/g," "),a=a.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),a=a.replace(/[\u2026]/g,"...");for(var ee,re=10,ae=[];;){ee!==a?(re=10,ee=a):re--;var fe=yr.stateMachines[y],ge=fe.transitions[b]||fe.transitions["*"];e:for(var be=0;be<ge.length;be++){var Ce=yr.patterns.match_(ge[be].pattern,a);if(Ce){for(var $e=ge[be].task,nt=0;nt<$e.action_.length;nt++){var xt;if(fe.actions[$e.action_[nt].type_])xt=fe.actions[$e.action_[nt].type_](E,Ce.match_,$e.action_[nt].option);else if(yr.actions[$e.action_[nt].type_])xt=yr.actions[$e.action_[nt].type_](E,Ce.match_,$e.action_[nt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+$e.action_[nt].type_+")"];yr.concatArray(ae,xt)}if(b=$e.nextState||b,a.length>0){if($e.revisit||(a=Ce.remainder),!$e.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,y){if(y)if(Object.prototype.toString.call(y)==="[object Array]")for(var b=0;b<y.length;b++)a.push(y[b]);else a.push(y)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"(-)(9)^(-9)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"state of aggregation $":function(a){var y=yr.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(y&&y.remainder.match(/^($|[\s,;\)\]\}])/))return y;var b=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return yr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return yr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return yr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return yr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return yr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return yr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return yr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return yr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return yr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return yr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return yr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return yr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return yr.patterns.findObserveGroups(a,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return yr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return yr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return yr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return yr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return yr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return yr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return yr.patterns.findObserveGroups(a,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(a){var y;if(y=a.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),y)return{match_:y[0],remainder:a.substr(y[0].length)};var b=yr.patterns.findObserveGroups(a,"","$","$","");return b&&(y=b.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),y)?{match_:y[0],remainder:a.substr(y[0].length)}:null},amount2:function(a){return this.amount(a)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(a){if(a.match(/^\([a-z]+\)$/))return null;var y=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,y,b,E,ee,re,ae,fe,ge,be){var Ce=function(_n,tr){if(typeof tr=="string")return _n.indexOf(tr)!==0?null:tr;var kr=_n.match(tr);return kr?kr[0]:null},$e=function(_n,tr,kr){for(var cr=0;tr<_n.length;){var si=_n.charAt(tr),Ti=Ce(_n.substr(tr),kr);if(Ti!==null&&cr===0)return{endMatchBegin:tr,endMatchEnd:tr+Ti.length};if(si==="{")cr++;else if(si==="}"){if(cr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];cr--}tr++}return cr>0,null},nt=Ce(a,y);if(nt===null||(a=a.substr(nt.length),nt=Ce(a,b),nt===null))return null;var xt=$e(a,nt.length,E||ee);if(xt===null)return null;var Tt=a.substring(0,E?xt.endMatchEnd:xt.endMatchBegin);if(re||ae){var Tn=this.findObserveGroups(a.substr(xt.endMatchEnd),re,ae,fe,ge);if(Tn===null)return null;var Sr=[Tt,Tn.match_];return{match_:be?Sr.join(""):Sr,remainder:Tn.remainder}}else return{match_:Tt,remainder:a.substr(xt.endMatchEnd)}},match_:function(a,y){var b=yr.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return yr.patterns.patterns[a](y);var E=y.match(b);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:y.substr(E[0].length)}}return null}},actions:{"a=":function(a,y){a.a=(a.a||"")+y},"b=":function(a,y){a.b=(a.b||"")+y},"p=":function(a,y){a.p=(a.p||"")+y},"o=":function(a,y){a.o=(a.o||"")+y},"q=":function(a,y){a.q=(a.q||"")+y},"d=":function(a,y){a.d=(a.d||"")+y},"rm=":function(a,y){a.rm=(a.rm||"")+y},"text=":function(a,y){a.text_=(a.text_||"")+y},insert:function(a,y,b){return{type_:b}},"insert+p1":function(a,y,b){return{type_:b,p1:y}},"insert+p1+p2":function(a,y,b){return{type_:b,p1:y[0],p2:y[1]}},copy:function(a,y){return y},rm:function(a,y){return{type_:"rm",p1:y||""}},text:function(a,y){return yr.go(y,"text")},"{text}":function(a,y){var b=["{"];return yr.concatArray(b,yr.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return yr.go(y,"tex-math")},"tex-math tight":function(a,y){return yr.go(y,"tex-math tight")},bond:function(a,y,b){return{type_:"bond",kind_:b||y}},"color0-output":function(a,y){return{type_:"color0",color:y[0]}},ce:function(a,y){return yr.go(y)},"1/2":function(a,y){var b=[];y.match(/^[+\-]/)&&(b.push(y.substr(0,1)),y=y.substr(1));var E=y.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),b.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),b.push({type_:"tex-math",p1:E[3]})),b},"9,9":function(a,y){return yr.go(y,"9,9")}},createTransitions:function(a){var y,b,E,ee,re={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[y][b];if(ae.action_){ae.action_=[].concat(ae.action_);for(var fe=0;fe<ae.action_.length;fe++)typeof ae.action_[fe]=="string"&&(ae.action_[fe]={type_:ae.action_[fe]})}else ae.action_=[];for(var ge=y.split("|"),be=0;be<ge.length;be++)if(E[ee]==="*")for(var Ce in re)re[Ce].push({pattern:ge[be],task:ae});else re[E[ee]].push({pattern:ge[be],task:ae})}return re},stateMachines:{}};yr.stateMachines={ce:{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(a,y){var b;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,b=this.output(a),a.b=E}else b=this.output(a);return yr.actions["o="](a,y),b},"d= kv":function(a,y){a.d=y,a.dType="kv"},"charge or bond":function(a,y){if(a.beginsWithBond){var b=[];return yr.concatArray(b,this.output(a)),yr.concatArray(b,yr.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=yr.patterns.match_("orbital",a.o||""),ee=yr.patterns.match_("one lowercase greek letter $",a.o||""),re=yr.patterns.match_("one lowercase latin letter $",a.o||""),ae=yr.patterns.match_("$one lowercase latin letter$ $",a.o||""),fe=y==="-"&&(E&&E.remainder===""||ee||re||ae);fe&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var ge=[];return fe?(yr.concatArray(ge,this.output(a)),ge.push({type_:"hyphen"})):(E=yr.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(yr.concatArray(ge,yr.actions["d="](a,y)),yr.concatArray(ge,this.output(a))):(yr.concatArray(ge,this.output(a)),yr.concatArray(ge,yr.actions.bond(a,y,"-")))),ge},"a to o":function(a){a.o=a.a,a.a=void 0},"sb=true":function(a){a.sb=!0},"sb=false":function(a){a.sb=!1},"beginsWithBond=true":function(a){a.beginsWithBond=!0},"beginsWithBond=false":function(a){a.beginsWithBond=!1},"parenthesisLevel++":function(a){a.parenthesisLevel++},"parenthesisLevel--":function(a){a.parenthesisLevel--},"state of aggregation":function(a,y){return{type_:"state of aggregation",p1:yr.go(y,"o")}},comma:function(a,y){var b=y.replace(/\s*$/,""),E=b!==y;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:b}:{type_:"comma enumeration M",p1:b}},output:function(a,y,b){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!b||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&b!==2?(a.o=a.a,a.a=void 0):!a.o&&!a.q&&!a.d&&(a.b||a.p)?(a.o=a.a,a.d=a.b,a.q=a.p,a.a=a.b=a.p=void 0):a.o&&a.dType==="kv"&&yr.patterns.match_("d-oxidation$",a.d||"")?a.dType="oxidation":a.o&&a.dType==="kv"&&!a.q&&(a.dType=void 0),E.push({type_:"chemfive",a:yr.go(a.a,"a"),b:yr.go(a.b,"bd"),p:yr.go(a.p,"pq"),o:yr.go(a.o,"o"),q:yr.go(a.q,"pq"),d:yr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=yr.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=yr.go(a.rd);var re;a.rqt==="M"?re=yr.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=yr.go(a.rq),E={type_:"arrow",r:a.r,rd:ee,rq:re}}for(var ae in a)ae!=="parenthesisLevel"&&ae!=="beginsWithBond"&&delete a[ae];return E},"oxidation-output":function(a,y){var b=["{"];return yr.concatArray(b,yr.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:yr.go(y[0]),p2:yr.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:yr.go(y[0]),p2:yr.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:yr.go(y[0]),p2:yr.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:yr.go(y[0]),p2:yr.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:yr.go(y[1])}},"r=":function(a,y){a.r=y},"rdt=":function(a,y){a.rdt=y},"rd=":function(a,y){a.rd=y},"rqt=":function(a,y){a.rqt=y},"rq=":function(a,y){a.rq=y},operator:function(a,y,b){return{type_:"operator",kind_:b||y}}}},a:{transitions:yr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:yr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(a){if(a.text_){var y={type_:"text",p1:a.text_};for(var b in a)delete a[b];return y}}}},pq:{transitions:yr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(a,y){return{type_:"state of aggregation subscript",p1:yr.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:yr.go(y[1],"pq")}}}},bd:{transitions:yr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(a,y){return{type_:"color",color1:y[0],color2:yr.go(y[1],"bd")}}}},oxidation:{transitions:yr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,y){return{type_:"roman numeral",p1:y||""}}}},"tex-math":{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"tex-math tight":{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,y){a.o=(a.o||"")+"{"+y+"}"},output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"9,9":{transitions:yr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),y[1]&&(yr.concatArray(b,yr.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?yr.concatArray(b,yr.go(y[2],"pu-9,9")):b.push(y[2])),(y[3]||y[4])&&(y[3]==="e"||y[4]==="*"?b.push({type_:"cdot"}):b.push({type_:"times"}))),y[5]&&b.push("10^{"+y[5]+"}"),b},"number^":function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),yr.concatArray(b,yr.go(y[1],"pu-9,9")),b.push("^{"+y[2]+"}"),b},operator:function(a,y,b){return{type_:"operator",kind_:b||y}},space:function(){return{type_:"pu-space-1"}},output:function(a){var y,b=yr.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=yr.patterns.match_("{(...)}",a.q||"");if(E&&E.remainder===""&&(a.q=E.match_),a.d&&(a.d=a.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.d=a.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),a.q){a.q=a.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),a.q=a.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var ee={d:yr.go(a.d,"pu"),q:yr.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:ee.d,p2:ee.q}:(y=ee.d,ee.d.length>1||ee.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),yr.concatArray(y,ee.q))}else y=yr.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:yr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(a,y){a.rm+="^{"+y+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var y=[];if(a.rm){var b=yr.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=yr.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:yr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){var b=a.text_.length%3;b===0&&(b=3);for(var E=a.text_.length-3;E>0;E-=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(0,b)),y.reverse()}else y.push(a.text_);for(var ee in a)delete a[ee];return y},"output-o":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){for(var b=a.text_.length-3,E=0;E<b;E+=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(E))}else y.push(a.text_);for(var ee in a)delete a[ee];return y}}}};var yo={go:function(a,y){if(!a)return"";for(var b="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?b+=re:(b+=yo._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&yo.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:yo._goInner(a.a),b:yo._goInner(a.b),p:yo._goInner(a.p),o:yo._goInner(a.o),q:yo._goInner(a.q),d:yo._goInner(a.d)};b.a&&(b.a.match(/^[+\-]/)&&(b.a="{"+b.a+"}"),y+=b.a+"\\,"),(b.b||b.p)&&(y+="{\\vphantom{X}}",y+="^{\\hphantom{"+(b.b||"")+"}}_{\\hphantom{"+(b.p||"")+"}}",y+="{\\vphantom{X}}",y+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(b.b||"")+"}}",y+="_{\\vphantom{2}\\llap{\\smash[t]{"+(b.p||"")+"}}}"),b.o&&(b.o.match(/^[+\-]/)&&(b.o="{"+b.o+"}"),y+=b.o),a.dType==="kv"?((b.d||b.q)&&(y+="{\\vphantom{X}}"),b.d&&(y+="^{"+b.d+"}"),b.q&&(y+="_{\\smash[t]{"+b.q+"}}")):a.dType==="oxidation"?(b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"),b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}")):(b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}"),b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"));break;case"rm":y="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),y="\\mathrm{"+a.p1+"}"):y="\\text{"+a.p1+"}";break;case"roman numeral":y="\\mathrm{"+a.p1+"}";break;case"state of aggregation":y="\\mskip2mu "+yo._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+yo._goInner(a.p1);break;case"bond":if(y=yo._getBond(a.kind_),!y)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";y="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+yo._goInner(a.p1)+"}{"+yo._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+yo._goInner(a.p1)+"}{"+yo._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+yo._goInner(a.p1)+"}{"+yo._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+yo._goInner(a.p1)+"}{"+yo._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+yo._goInner(a.p1)+"}_{"+yo._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+yo._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:yo._goInner(a.rd),rq:yo._goInner(a.rq)},ae=yo._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(ae="\\long"+ae,re.rd&&(ae="\\overset{"+re.rd+"}{"+ae+"}"),re.rq&&(a.r==="<-->"?ae="\\underset{\\lower2mu{"+re.rq+"}}{"+ae+"}":ae="\\underset{\\lower6mu{"+re.rq+"}}{"+ae+"}"),ae=" {}\\mathrel{"+ae+"}{} "):(re.rq&&(ae+="[{"+re.rq+"}]"),ae+="{"+re.rd+"}",ae=" {}\\mathrel{\\x"+ae+"}{} "):ae=" {}\\mathrel{\\long"+ae+"}{} ",y=ae;break;case"operator":y=yo._getOperator(a.kind_);break;case"1st-level escape":y=a.p1+" ";break;case"space":y=" ";break;case"entitySkip":y="~";break;case"pu-space-1":y="~";break;case"pu-space-2":y="\\mkern3mu ";break;case"1000 separator":y="\\mkern2mu ";break;case"commaDecimal":y="{,}";break;case"comma enumeration L":y="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":y="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":y="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":y="\\text{-}";break;case"addition compound":y="\\,{\\cdot}\\,";break;case"electron dot":y="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":y="{\\times}";break;case"prime":y="\\prime ";break;case"cdot":y="\\cdot ";break;case"tight cdot":y="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":y="\\times ";break;case"circa":y="{\\sim}";break;case"^":y="uparrow";break;case"v":y="downarrow";break;case"ellipsis":y="\\ldots ";break;case"/":y="/";break;case" / ":y="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return y},_getArrow:function(a){switch(a){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(a){switch(a){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(a){switch(a){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function M1(a){}function _1(a){}var r0=class zp extends Un{constructor(y){super(me(Se({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return me(Se({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Er(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):ho(this.command,this.value)}},i0=class Kp extends Un{constructor(y){super(me(Se({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Kp(y)}toJson(){return me(Se({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=mn(this.value,this.size,y,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return b?(b=this.bind(y,b),this.caret&&(b.caret=this.caret),b):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):ho(this.command,this.value)}},bd=class Hp extends Un{constructor(y,b,E,ee){var re,ae;super({type:"enclose",command:y,style:ee.style}),this.body=b,this.backgroundcolor=ee.backgroundcolor,E.updiagonalarrow&&(E.updiagonalstrike=!1),E.box&&(E.left=!1,E.right=!1,E.bottom=!1,E.top=!1),this.notation=E,this.shadow=(re=ee.shadow)!=null?re:"none",this.strokeWidth=(ae=ee.strokeWidth)!=null?ae:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=ee.strokeStyle,this.svgStrokeStyle=ee.svgStrokeStyle,this.strokeColor=ee.strokeColor,this.borderStyle=ee.borderStyle,this.padding=ee.padding,this.captureSelection=!1}static fromJson(y){return new Hp(y.command,y.body,y.notation,y)}toJson(){return me(Se({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(y){var b;if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Cr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",ae="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=ae+'mathbackground="'+this.backgroundcolor+'"',ae=","),this.shadow&&this.shadow!=="auto"&&(re+=ae+'shadow="'+this.shadow+'"',ae=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=ae+this.borderStyle,ae=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=ae+'mathcolor="'+this.strokeColor+'"',ae=","),re&&(ee+=`[${re}]`)}return ho(ee,this.bodyToLatex(y))}render(y){const b=new Na({parent:y},this.style),E=Un.createBox(b,this.body);if(!E)return null;const ee=im(this.borderStyle),re=b.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",re,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const ae=new Er(null,{classes:"ML__notation"});let fe=E.height+E.depth+2*re;const ge=E.width+2*re;let be="";if(this.notation.horizontalstrike&&(be+=this.line(3,50,97,50)),this.notation.verticalstrike&&(be+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(be+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(be+=this.line(3,3,97,97)),this.notation.updiagonalarrow){be+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const Tt=.03*Math.sqrt(ge*ge+fe*fe)*1,Tn=E.width*Tt,Sr=(E.depth+E.height)*Tt,_n=re+E.width;let tr=re;tr+Sr-.4*Tn<0&&(tr=.4*Tn-Sr),be+='<polygon points="',be+=`${_n},${tr} ${_n-Tn-.4*Sr},${tr+Sr-.4*Tn} `,be+=`${_n-.7*Tn},${tr+.7*Sr} ${_n-Tn+.4*Sr},${tr+Sr+.4*Tn} `,be+=`${_n},${tr}`,be+=`" stroke='none' fill="${this.strokeColor}"`,be+="/>"}let Ce=0;if(this.notation.phasorangle){const nt=a0(b),xt=(E.height+E.depth+2*nt+re).toString(),Tt=(E.height+E.depth)/2;be+=this.line(re.toString(),xt,(re+Tt+E.width).toString(),xt),be+=this.line(re.toString(),xt,(re+Tt).toString(),(re-nt).toString()),fe+=nt,Ce=Tt,E.left+=fe/2-re}if(this.notation.longdiv){const nt=a0(b);fe+=nt,be+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const xt=.3;Ce=xt+nt,E.left+=xt+nt,E.setTop(re+nt),be+='<path d="',be+=`M ${re} ${re} a${xt} ${(E.depth+E.height+2*nt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*nt} "`,be+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,be+="/>"}if(ae.width=E.width+2*re+Ce,ae.height=E.height+re,ae.depth=E.depth+re,ae.setStyle("box-sizing","border-box"),ae.setStyle("left",`calc(-${ee} / 2 )`),ae.setStyle("height",`${Math.floor(100*fe)/100}em`),ae.setStyle("top",`calc(${ee} / 2 )`),this.backgroundcolor&&ae.setStyle("background-color",this.backgroundcolor),this.notation.box&&ae.setStyle("border","1px solid red"),this.notation.actuarial&&(ae.setStyle("border-top",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(ae.setStyle("border-bottom",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(ae.setStyle("border-radius","8px"),ae.setStyle("border",this.borderStyle)),this.notation.circle&&(ae.setStyle("border-radius","50%"),ae.setStyle("border",this.borderStyle)),this.notation.top&&ae.setStyle("border-top",this.borderStyle),this.notation.left&&ae.setStyle("border-left",this.borderStyle),this.notation.right&&ae.setStyle("border-right",this.borderStyle),this.notation.bottom&&ae.setStyle("border-bottom",this.borderStyle),be){let nt="";this.shadow==="auto"&&(nt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(nt+=`filter: drop-shadow(${this.shadow})`),nt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,nt+=' stroke-linecap="round"',this.svgStrokeStyle&&(nt+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=nt,ae.svgOverlay=be}const $e=new Er([ae,E]);return $e.setStyle("position","relative"),$e.setStyle("vertical-align",re,"em"),$e.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),$e.setStyle("display","inline-block"),$e.height=ae.height,$e.depth=ae.depth,$e.width=ae.width-2*re,$e.left=re,$e.right=re,this.caret&&($e.caret=this.caret),$e.wrap(b)}line(y,b,E,ee){return`<line x1="${bf(y)}" y1="${bf(b)}" x2="${bf(E)}" y2="${bf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const y=a.match(/([0-9][a-zA-Z\%]+)/);return y===null?"1px":y[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const y=a.isDisplayStyle?el:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var _u=class Wp extends Un{constructor(y,b,E){var ee,re;super(me(Se({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,this.hasBarLine=(ee=E==null?void 0:E.hasBarLine)!=null?ee:!0,this.continuousFraction=(re=E==null?void 0:E.continuousFraction)!=null?re:!1,this.numerPrefix=E==null?void 0:E.numerPrefix,this.denomPrefix=E==null?void 0:E.denomPrefix,this.mathstyleName=E==null?void 0:E.mathstyleName,this.leftDelim=E==null?void 0:E.leftDelim,this.rightDelim=E==null?void 0:E.rightDelim,this.fractionNavigationOrder=E==null?void 0:E.fractionNavigationOrder}static fromJson(y){return new Wp(y.above,y.below,y)}toJson(){const y={};return this.continuousFraction&&(y.continuousFraction=!0),this.numerPrefix&&(y.numerPrefix=this.numerPrefix),this.denomPrefix&&(y.denomPrefix=this.denomPrefix),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),this.hasBarLine||(y.hasBarLine=!1),this.mathstyleName&&(y.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(y.fractionNavigationOrder=this.fractionNavigationOrder),Se(Se({},super.toJson()),y)}get children(){if(this._children)return this._children;const y=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const b of this.below)y.push(...b.children),y.push(b);for(const b of this.above)y.push(...b.children),y.push(b)}else{for(const b of this.above)y.push(...b.children),y.push(b);for(const b of this.below)y.push(...b.children),y.push(b)}return this._children=y,y}render(y){var b,E;const ee=new Na({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new Na({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),fe=this.numerPrefix?new Er([new Er(this.numerPrefix),Un.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Un.createBox(ae,this.above,{type:"ignore"}))!=null?b:new Er(null,{type:"ignore"}),ge=new Na({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),be=this.denomPrefix?new Er([new Er(this.denomPrefix),Un.createBox(ge,this.below,{type:"ignore"})]):(E=Un.createBox(ge,this.below,{type:"ignore"}))!=null?E:new Er(null,{type:"ignore"}),Ce=this.hasBarLine?re.defaultRuleThickness:0;let $e,nt=0,xt;ee.isDisplayStyle?($e=ae.metrics.num1,nt=Ce>0?3*Ce:7*Ce,xt=ge.metrics.denom1):(Ce>0?($e=ae.metrics.num2,nt=Ce):($e=ae.metrics.num3,nt=3*re.defaultRuleThickness),xt=ge.metrics.denom2);const Tt=[];this.isSelected&&Tt.push("ML__selected");const Tn=fe.depth,Sr=be.height;let _n;if(Ce<=0){const bi=$e-Tn-(Sr-xt);bi<nt&&($e+=(nt-bi)/2,xt+=(nt-bi)/2),_n=new ao({individualShift:[{box:fe,shift:-$e,classes:[...Tt,"ML__center"]},{box:be,shift:xt,classes:[...Tt,"ML__center"]}]}).wrap(ee)}else{const bi=new Er(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});bi.softWidth=Math.max(fe.width,be.width),bi.height=Ce/2,bi.depth=Ce/2;const Fa=ls+Ce/2;$e<nt+Tn+Fa&&($e=nt+Tn+Fa);const io=ls-Ce/2;xt<nt+Sr-io&&(xt=nt+Sr-io),_n=new ao({individualShift:[{box:be,shift:xt,classes:[...Tt,"ML__center"]},{box:bi,shift:-io,classes:Tt},{box:fe,shift:-$e,classes:[...Tt,"ML__center"]}]}).wrap(ee)}const tr=ee.isDisplayStyle?re.delim1:re.delim2,kr=this.leftDelim?this.bind(y,ni("open",this.leftDelim,tr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):ii(ee,"open");let cr=null;this.continuousFraction?cr=new Er(null,{type:"close"}):this.rightDelim?cr=this.bind(y,ni("close",this.rightDelim,tr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):cr=ii(ee,"close");const si=new Er([kr,_n,cr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),Ti=this.bind(y,si);return this.caret&&(Ti.caret=this.caret),this.attachSupsub(y,{base:Ti})}},rs=class Zp extends Un{constructor(y,b){var E;super({type:"latex",value:y,mode:"latex"}),this.isSuggestion=(E=b==null?void 0:b.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(y){const b=new Zp(y.value);return y.isSuggestion&&(b.isSuggestion=!0),y.isError&&(b.isError=!0),b}toJson(){const y={};return this.isSuggestion&&(y.isSuggestion=!0),this.isError&&(y.isError=!0),Se({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Er(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},xd=class Up extends Un{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new rs(b)),this.skipBoundary=!1}static fromJson(y){return new Up("")}toJson(){return super.toJson()}render(y){const b=Un.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){var b,E;return(E=(b=this.body)==null?void 0:b.map(ee=>ee.value).join(""))!=null?E:""}},fh=class jp extends Un{constructor(y,b){super(me(Se({},b),{type:"extensible-symbol",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new jp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.value&&(y.symbol=this.value),y}render(y){var b;const E=y.isDisplayStyle&&this.value!=="\\smallint",ee=new Er(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:y.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-ls*y.scalingFactor,ae=ee.italic;ee.setTop(re);let fe=ee;if(this.superscript||this.subscript){const ge=(b=this.subsupPlacement)!=null?b:"auto";fe=ge==="over-under"||ge==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new Er(this.bind(y,fe),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[];return E.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ka(E)}},Nc=class Vp extends Un{constructor(y){const b=y.body;super(me(Se({},y),{type:"overlap",body:typeof b=="string"?[new Un({value:b})]:b,style:y==null?void 0:y.style})),this.skipBoundary=!0,this.align=y==null?void 0:y.align,this.boxType=y==null?void 0:y.boxType}static fromJson(y){return new Vp(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),Se(Se({},super.toJson()),y)}render(y){const b=Un.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Er([b,new Er(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Vs=class Gp extends Un{constructor(y){var b,E,ee,re;super({type:"overunder",command:y.command,style:y.style,mode:y.mode,body:y.body,skipBoundary:(b=y.skipBoundary)!=null?b:!0}),this.subsupPlacement=y.supsubPlacement,this.svgAbove=y.svgAbove,this.svgBelow=y.svgBelow,this.svgBody=y.svgBody,this.above=y.above,this.below=y.below,this.boxType=(E=y.boxType)!=null?E:"ord",this.paddedBody=(ee=y.paddedBody)!=null?ee:!1,this.paddedLabels=(re=y.paddedLabels)!=null?re:!1}static fromJson(y){return new Gp(y)}toJson(){const y=super.toJson();return this.skipBoundary||(y.skipBoundary=!1),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.svgAbove&&(y.svgAbove=this.svgAbove),this.svgBelow&&(y.svgBelow=this.svgBelow),this.svgBody&&(y.svgBody=this.svgBody),this.boxType!=="ord"&&(y.boxType=this.boxType),this.paddedBody&&(y.paddedBody=!0),this.paddedLabels&&(y.paddedLabels=!0),y}render(y){let b=this.svgBody?Os(this.svgBody):Un.createBox(y,this.body,{type:"ignore"});const E=new Na({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Os(this.svgAbove):this.above&&(ee=Un.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Os(this.svgBelow):this.below&&(re=Un.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Er([ii(y,"open"),b,ii(y,"close")],{type:"ignore"}));let ae=om(y,{base:b,above:ee,below:re,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return ae?(this.subsupPlacement==="over-under"?ae=this.attachLimits(y,{base:ae,type:ae.type}):ae=this.attachSupsub(y,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(y,ae)):null}};function om(a,y){if(!y.base)return null;if(!y.above&&!y.below){const fe=new Er(y.base,{type:y.type});return fe.setStyle("position","relative"),fe}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ee=y.base,re=0,ae=["ML__center"];if(y.paddedAboveBelow&&ae.push("ML__label_padding"),y.below&&y.above){const fe=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new ao({bottom:fe,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]})}else y.below?E=new ao({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new ao({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new Er(E,{type:y.type})}var wd=class Xp extends Un{constructor(y){var b,E,ee,re;super(me(Se({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(ee=y.smashHeight)!=null?ee:!1,this.smashWidth=(re=y.smashWidth)!=null?re:!1}static fromJson(y){return new Xp(y)}toJson(){const y={};return this.isInvisible&&(y.isInvisible=!0),this.smashDepth&&(y.smashDepth=!0),this.smashHeight&&(y.smashHeight=!0),this.smashWidth&&(y.smashWidth=!0),Se(Se({},super.toJson()),y)}render(y){const b=new Na({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Un.createBox(b,this.body,{classes:"inner"});const E=Un.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new Er(null,{classes:"fix"});return new Er([E,ee],{classes:"rlap"}).wrap(y)}if(!this.smashHeight&&!this.smashDepth)return E;if(this.smashHeight&&(E.height=0),this.smashDepth&&(E.depth=0),E.children)for(const ee of E.children)this.smashHeight&&(ee.height=0),this.smashDepth&&(ee.depth=0);return new ao({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Sd=class Yp extends Un{constructor(y){var b;super(Se({type:"spacing"},y)),this.width=y==null?void 0:y.width,this._braced=(b=y==null?void 0:y.braced)!=null?b:!1}static fromJson(y){return new Yp(y)}toJson(){const y=super.toJson();return this.width!==void 0&&(y.width=this.width),this._braced&&(y.braced=!0),y}render(y){var b;if(this.command==="space")return new Er(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Er(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const ee=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Er(null,{classes:ee})}return E=this.bind(y,E),this.caret&&(E.caret=this.caret),E}_serialize(y){var b;if(!y.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Cr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Oo(this.width)}}`:`${ee}${Oo(this.width)}`}},o0=class qp extends Un{constructor(y){var b;super(me(Se({},y),{type:"surd",mode:(b=y.mode)!=null?b:"math",style:y.style,displayContainsHighlight:!0,body:y.body})),this.above=y.index}static fromJson(y){return new qp(me(Se({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?ho(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:ho(E,ee)}get children(){if(this._children)return this._children;const y=[];if(this.above)for(const b of this.above)y.push(...b.children),y.push(b);if(this.body)for(const b of this.body)y.push(...b.children),y.push(b);return this._children=y,y}render(y){var b;const E=new Na({parent:y,mathstyle:"cramp"},this.style),ee=(b=Un.createBox(E,this.body,{type:"inner"}))!=null?b:new Er(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,fe=y.isDisplayStyle?el:ae,ge=new Er(null,{classes:"ML__sqrt-line",style:this.style});ge.height=ae,ge.softWidth=ee.width;let be=re*(ae+fe/4);const $e=Math.max(re*2*fe,ee.height+ee.depth)+be+ae,nt=new Na({parent:y},this.style),xt=this.bind(nt,new Er(ni("inner","\\surd",$e,!1,nt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!xt)return null;const Tt=xt.height+xt.depth-ae;Tt>ee.height+ee.depth+be&&(be=(be+Tt-(ee.height+ee.depth))/2),xt.setTop(xt.height-ee.height-be);const Tn=this.bind(y,new ao({firstBaseline:[{box:new Er(ee)},be-2*ae,{box:ge},ae]})),Sr=Un.createBox(new Na({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Sr){const kr=new Er([xt,Tn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return kr.setStyle("display","inline-block"),kr.setStyle("height",kr.height+kr.depth,"em"),this.caret&&(kr.caret=this.caret),this.bind(y,kr)}const _n=new ao({shift:-.6*(Math.max(xt.height,Tn.height)-Math.max(xt.depth,Tn.depth)),children:[{box:Sr}]}),tr=new Er([new Er(_n,{classes:"ML__sqrt-index",type:"ignore"}),xt,Tn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return tr.height=xt.height,tr.depth=xt.depth,this.caret&&(tr.caret=this.caret),this.bind(y,tr)}},sm=class extends Er{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function xf(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ee=E-1;for(;ee>=0&&b[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,y);return}E>0&&b[E-1].type==="skip"?b[E-1].width+=y:b.splice(E,0,new sm(y))}var lm={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},cm={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function um(a){Ed(a,(y,b)=>{b.type==="bin"&&(!y||/^(middle|bin|op|rel|open|punct)$/.test(y.type))&&(b.type="ord"),(y==null?void 0:y.type)==="bin"&&/^(rel|close|punct)$/.test(b.type)&&(y.type="ord"),b.type!=="ignore"&&(y=b)})}function Cd(a,y){if(!a.children)return a;const b=a.children;um(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return Ed(b,(ae,fe)=>{var ge,be,Ce;if(!ae)return;const $e=ae.type,nt=fe.isTight?(ge=cm[$e])!=null?ge:null:(be=lm[$e])!=null?be:null,xt=(Ce=nt==null?void 0:nt[fe.type])!=null?Ce:null;xt===3&&xf(fe,E),xt===4&&xf(fe,ee),xt===5&&xf(fe,re)}),a}function Ed(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Ed(E.children,y,b):E.type==="ignore"?Ed(E.children,y):(y(b,E),Ed(E.children,y),b=E);return b}var hh=class Jp extends Un{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Un({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new Jp(me(Se({},y),{tooltip:dc(y.tooltip)}))}toJson(){var y;const b=(y=this.tooltip.body)==null?void 0:y.filter(E=>E.type!=="first").map(E=>E.toJson());return me(Se({},super.toJson()),{tooltip:b})}render(y){const b=Un.createBox(new Na,this.body);if(!b)return null;const E=new Na({parent:y,mathstyle:"displaystyle"},{fontSize:dl}),ee=gu(Cd(new Er(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Er([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Rc=class Qp extends Un{constructor(y,b){super(me(Se({},b),{type:"operator",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.variantStyle=b==null?void 0:b.variantStyle,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Qp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.variantStyle&&(y.variantStyle=this.variantStyle),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.value&&(y.symbol=this.value),y}render(y){var b;const E=new Er(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(b=this.subsupPlacement)!=null?b:"auto";ee=re==="over-under"||re==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Er(this.bind(y,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ka(E)}};function dc(a){if(Re(a))return a.map(E=>dc(E));if(typeof a=="string")return Un.fromJson(a);a=Se({},a);for(const E of sc)a[E]&&(a[E]=dc(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=dc(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=ca.fromJson(a)),y==="box"&&(b=Ao.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=Wl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=bd.fromJson(a)),y==="error"&&(b=ys.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=_u.fromJson(a)),y==="group"&&(b=Yo.fromJson(a)),y==="latex"&&(b=rs.fromJson(a)),y==="latexgroup"&&(b=xd.fromJson(a)),y==="leftright"&&(b=Xa.fromJson(a)),y==="macro"&&(b=Mu.fromJson(a)),y==="macro-argument"&&(b=sl.fromJson(a)),y==="operator"&&(b=Rc.fromJson(a)),y==="overlap"&&(b=Nc.fromJson(a)),y==="overunder"&&(b=Vs.fromJson(a)),y==="placeholder"&&(b=Oi.fromJson(a)),y==="prompt"&&(b=xl.fromJson(a)),y==="phantom"&&(b=wd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=Sd.fromJson(a)),y==="subsup"&&(b=js.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=al.fromJson(a)),y==="tooltip"&&(b=hh.fromJson(a)),b||(console.assert(!y||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(y),`MathLive 0.98.5: an unexpected atom type "${y}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),b=Un.fromJson(a));for(const E of sc)a[E]&&b.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(b.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(b.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),a.isFunction&&(b.isFunction=!0),a.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),a.skipBoundary&&(b.skipBoundary=!0),a.captureSelection&&(b.captureSelection=!0),b}function dm(a){if(a&&Array.isArray(a))return a.map(y=>y==="<null>"?null:typeof y=="object"&&"group"in y?{group:y.group.map(b=>dc(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>dc(b)):y)}var s0={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},ph={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},l0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,l0,fm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Ss{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Un({type:"mord",mode:"math",command:a,value:a,style:b});const fe=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const be=new Un({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return fe&&(be.isFunction=!0),a.startsWith("\\")&&(be.verbatimLatex=a),be}const ge=new Un({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return fe&&(ge.isFunction=!0),a.startsWith("\\")&&(ge.verbatimLatex=a),ge}serialize(a,y){const b=gm(a,me(Se({},y),{defaultMode:"math"}));return b.length===0||y.defaultMode!=="text"?b:["$ ",...b," $"]}getFont(a,y){console.assert(y.variant!==void 0);let{variant:b}=y,{variantStyle:E}=y;b==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(b="main",E="italic"),b==="normal"&&!E&&a.value.length===1&&hm.forEach((fe,ge)=>{var be;fe.test(a.value)&&pm[(be=y.letterShapeStyle)!=null?be:"tex"][ge]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=In(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function gm(a,y){const{parent:b}=a[0],E=c0(b);return Lo(a,"variant").map(ee=>{const re=c0(ee[0]);let ae="";re&&re!==E&&(ae={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[re],console.assert(ae!==void 0));const fe=ka(ee.map(ge=>ge._serialize(y)));return ae?ho(ae,fe):fe})}function c0(a){if(!a)return"";const{style:y}=a;if(y.variant===void 0)return"";let b=y.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(y.variant)&&y.variantStyle&&y.variantStyle!=="up"&&(b+="-"+y.variantStyle),b}new mm;function vm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Lo(a,"fontShape").map(b=>{const E=vm(b,y),{fontShape:ee}=b[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${ho("\\fontshape",ee)}${ka(E)}}`:re?ho(re,ka(E)):ka(E)})}function bm(a,y){return Lo(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ee}=b[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${ho("\\fontseries",ee)}${ka(E)}}`:re?ho(re,ka(E)):ka(E)})}function xm(a,y){return Lo(a,"fontSize").map(b=>{var E,ee;const re=bm(b,y),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${ka(re)}`:ka(re)})}function wm(a,y,b){return Lo(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),fe=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return fe?`\\${fe}{${ka(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ka(ae)}}`:b?`\\text{${ka(ae)}}`:ka(ae)})}var u0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Ss{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new al(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,me(Se({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:fe}=y;if(u0[fe]?a.classes+=" "+u0[fe]:fe&&a.setStyle("font-family",fe),y.fontShape&&(a.classes+=" ",a.classes+=(b={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[y.fontShape])!=null?b:""),y.fontSeries){const ge=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);ge&&(a.classes+=" ",a.classes+=(ee={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(E=ge[1])!=null?E:""])!=null?ee:"",a.classes+=" ",a.classes+=(ae={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(re=ge[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Ss{constructor(){super("latex")}createAtom(a){return new rs(a)}serialize(a,y){return a.filter(b=>b instanceof rs&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var Em={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},mh={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},d0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},f0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Mm={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},_m={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},km={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Lm={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Am={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Tm={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Im={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Dm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pm={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function h0(a){const y=a.split("+"),b={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:y.pop()};return y.includes("shift")&&(b.shift=!0),y.includes("alt")&&(b.alt=!0),y.includes("ctrl")&&(b.ctrl=!0),y.includes("cmd")&&(b.cmd=!0),y.includes("win")&&(b.win=!0),y.includes("meta")&&(b.meta=!0),b}function ku(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Om={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Md=[],_d;function gh(){switch(ke()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Bs(a){(!a.platform||a.platform===gh())&&Md.push(a)}function Nm(a,y){var b;const E={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!a)return E;for(const[ee,re]of Object.entries(y.mapping)){if(re[0]===a)return E.key=`[${ee}]`,E;if(re[1]===a)return E.shift=!0,E.key=`[${ee}]`,E;if(re[2]===a)return E.alt=!0,E.key=`[${ee}]`,E;if(re[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ee}]`,E}return E.key=(b=Om[a])!=null?b:"",E}function Rm(a){if(a.code)return a;const y=Object.entries(kd().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,fe]of y)if(fe[re]===a.key){ee=ae,re===3?(b=!0,E=!0):re===2?b=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,me(Se({},a),{altKey:b,shiftKey:E,code:ee}))}function Bm(a){var y,b;if(!a||a.key==="Unidentified"||a.key==="Dead")return;const E=a.shiftKey&&a.altKey?3:a.altKey?2:a.shiftKey?1:0;for(const ee of Md)((y=ee.mapping[a.code])==null?void 0:y[E])===a.key?ee.score+=1:(b=ee.mapping[a.code])!=null&&b[E]&&(ee.score=0);Md.sort((ee,re)=>re.score-ee.score)}function $m(a){_d=Md.find(y=>a.startsWith(y.locale))}function kd(){return _d!=null?_d:Md[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":Bs(mh),Bs(Mm),Bs(Im),Bs(Lm);break;case"windows":Bs(d0),Bs(_m),Bs(Dm),Bs(Am);break;case"linux":Bs(f0),Bs(km),Bs(Pm),Bs(Tm);break}Bs(Em);function vh(a){var y;const b=/macos|ios/.test(ke()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=b?"\u2009":'<span class="ML__shortcut-join">+</span>'),re.startsWith("[Key")?ee+=re.slice(4,5):re.startsWith("Key")?ee+=re.slice(3,4):re.startsWith("[Digit")?ee+=re.slice(6,7):re.startsWith("Digit")?ee+=re.slice(5,6):ee+=(y={cmd:"\u2318",meta:b?"\u2318":"Ctrl",shift:b?"\u21E7":"Shift",alt:b?"\u2325":"Alt",ctrl:b?"\u2303":"Ctrl","\n":b?"\u23CE":"Return","[return]":b?"\u23CE":"Return","[enter]":b?"\u2324":"Enter","[tab]":b?"\u21E5":"Tab","[escape]":"Esc","[backspace]":b?"\u232B":"Backspace","[delete]":b?"\u2326":"Del","[pageup]":b?"\u21DE":"Page Up","[pagedown]":b?"\u21DF":"Page Down","[home]":b?"\u2912":"Home","[end]":b?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* &#128290;",numpaddivide:"/ &#128290;",numpadsubtract:"- &#128290;",numpadadd:"+ &#128290;",numpaddecimal:". &#128290;",numpadcomma:", &#128290;",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[re.toLowerCase()])!=null?y:re.toUpperCase();return ee}function wf(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const y=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function Bc(a){const y={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(y.alt=!0),a.ctrlKey&&(y.control=!0),a.metaKey&&(y.meta=!0),a.shiftKey&&(y.shift=!0)),y}function zm(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.meta}var Km=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Sf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var wl=class Gl{static get scrim(){return Gl._scrim||(Gl._scrim=new Gl),Gl._scrim}static open(y){Gl.scrim.open(y)}static close(){Gl.scrim.close()}static get state(){return Gl.scrim.state}static get element(){return Gl.scrim.element}constructor(y){var b,E;this.lightDismiss=(b=y==null?void 0:y.lightDismiss)!=null?b:!0,this.translucent=(E=y==null?void 0:y.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const y=document.createElement("div");return y.setAttribute("role","presentation"),y.style.position="fixed",y.style.contain="content",y.style.top="0",y.style.left="0",y.style.right="0",y.style.bottom="0",y.style.zIndex="var(--scrim-zindex, 10099)",y.style.outline="none",this.translucent?(y.style.background="rgba(255, 255, 255, .2)",y.style.backdropFilter="contrast(40%)"):y.style.background="transparent",this._element=y,y}open(y){var b;if(this.state!=="closed")return;this.state="opening",this.onDismiss=y==null?void 0:y.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((b=y==null?void 0:y.root)!=null?b:document.body).appendChild(E),E.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const ee=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const re=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${re+ee}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,ee;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:re}=this;re.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),re.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,ae=!1,fe=!1;const ge=new AbortController,be=ge.signal;return a.addEventListener("keydown",Ce=>{if(re||Ce.key==="Process"||Ce.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(Ce.code)){E=null;return}E=Ce,ee=null,b.onKeystroke(Ce)?a.textContent="":E=null},{capture:!0,signal:be}),a.addEventListener("keypress",Ce=>{re||(E&&ee&&b.onKeystroke(E),ee=Ce)},{capture:!0,signal:be}),a.addEventListener("compositionstart",Ce=>{a.textContent="",re=!0,b.onCompositionStart(Ce.data)},{capture:!0,signal:be}),a.addEventListener("compositionupdate",Ce=>{re&&b.onCompositionUpdate(Ce.data)},{capture:!0,signal:be}),a.addEventListener("compositionend",Ce=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(Ce.data))},{capture:!0,signal:be}),a.addEventListener("beforeinput",Ce=>Ce.stopImmediatePropagation(),{signal:be}),a.addEventListener("input",Ce=>{var $e;if(!re&&(a.textContent="",Ce.inputType!=="insertCompositionText")){if(Ce.inputType==="insertFromPaste"){Ce.preventDefault(),Ce.stopPropagation();return}b.onInput(($e=Ce.data)!=null?$e:""),Ce.preventDefault(),Ce.stopPropagation()}},{signal:be}),a.addEventListener("paste",Ce=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(Ce)||Ce.preventDefault(),Ce.stopImmediatePropagation()},{signal:be}),a.addEventListener("cut",Ce=>b.onCut(Ce),{capture:!0,signal:be}),a.addEventListener("copy",Ce=>b.onCopy(Ce),{capture:!0,signal:be}),a.addEventListener("blur",Ce=>{var $e,nt;if(((nt=($e=Ce.relatedTarget)==null?void 0:$e._mathfield)==null?void 0:nt.element)===y){a.focus({preventScroll:!0}),Ce.preventDefault(),Ce.stopPropagation();return}const xt=wl.state;if(xt==="open"||xt==="opening"){Ce.preventDefault(),Ce.stopPropagation();return}if(Ce.relatedTarget===Ce.target.getRootNode().host){Ce.preventDefault(),Ce.stopPropagation();return}fe||ae||(fe=!0,E=null,ee=null,b.onBlur(),fe=!1)},{capture:!0,signal:be}),a.addEventListener("focus",Ce=>{fe||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:be}),{dispose:()=>ge.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!ae&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Cf()===a,setAriaLabel:Ce=>a.setAttribute("aria-label",Ce),setValue:Ce=>{var $e;a.textContent=Ce,a.style.left="-1000px",($e=window.getSelection())==null||$e.selectAllChildren(a)},moveTo:(Ce,$e)=>{a.style.top=`${$e}px`,a.style.left=`${Ce}px`}}}function Lu(a){var y;if(!a||!Sf(a))return"";let b;return a.key==="Unidentified"&&a.target&&(b=a.target.value),b=(y=b!=null?b:a.key)!=null?y:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(b)&&(b=""),b}function p0(a){a=Rm(a);const y=[];return a.ctrlKey&&y.push("ctrl"),a.metaKey&&y.push("meta"),a.altKey&&y.push("alt"),a.shiftKey&&y.push("shift"),y.length===0?`[${a.code}]`:(y.push(`[${a.code}]`),y.join("+"))}function Wm(a){if(ht()){const y=ke(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Zm(a,y,b){if(a.length===0)return"";const E=ku(h0(p0(b))),ee=ku({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(ke()),cmd:!1,win:!1});for(let re=a.length-1;re>=0;re--)if((a[re].key===E||a[re].key===ee)&&(!a[re].ifMode||a[re].ifMode===y))return a[re].command;return""}function m0(a){let y=a;return Re(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function Um(a,y){let b=[];if(typeof y=="string"){const re=hd[y];Re(re)?b=re.slice():re&&b.push(re)}const E=m0(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&b.push(re.key);return b.map(vh)}function jm(a,y){if(a.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(a.ifPlatform))throw new Error(`Unexpected platform "${a.ifPlatform}" for keybinding ${a.key}`);if(a.ifLayout!==void 0&&(y.score===0||!a.ifLayout.includes(y.id)))return;const b=h0(a.key);let E=a.ifPlatform;if(b.cmd){if(E&&E!=="macos"&&E!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+E+`"
"cmd" modifier can only be used with macOS or iOS platform.`);E||(E=ke()==="ios"?"ios":"macos"),b.win=!1,b.cmd=!1,b.meta=!0}if(b.win){if(E&&E!=="windows")throw new Error('Unexpected "win" modifier with platform "'+E+`"
"win" modifier can only be used with Windows platform.`);E="windows",b.win=!1,b.cmd=!1,b.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(b.key))return me(Se({},a),{key:ku(b)});const ee=Nm(b.key,y);if(!ee)return me(Se({},a),{key:ku(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${ku(ee)} using the ${y.displayName} keyboard layout`);return ee.shift=ee.shift||b.shift,ee.alt=ee.alt||b.alt,ee.meta=b.meta,ee.ctrl=b.ctrl,me(Se({},a),{key:ku(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function Vm(a,y){const b=[],E=[];for(const ee of a)try{const re=jm(ee,y);if(!re)continue;const ae=E.find(fe=>fe.key===re.key&&fe.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${ae.key} (${yh(ae.command)}) with the ${y.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&b.push(re.message)}return[E,b]}var Gm=class extends ra{constructor(){super("latex")}createAtom(a){return new rs(a)}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("application/x-latex")||y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(a)),a.startRecording(),!0):!1}insert(a,y,b){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b||(b={}),b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Xo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const ge of y)le.test(ge)&&re.push(new rs(ge));let ae=a.at(a.position);if(ae instanceof xd&&(ae=ae.lastChild),!(ae.parent instanceof xd)){const ge=new xd("");ae.parent.addChildAfter(ge,ae),ae=ge.firstChild}const fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function Ld(a){var y,b;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ee=>ee.type==="latex"))!=null?b:[]:[]}function g0(a,y){var b;let E=0,ee=!1;const re=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=re&&!ee;){const ge=a.at(E);ee=ge instanceof rs&&ge.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,fe=!1;for(;ae<=re&&!fe;){const ge=a.at(ae);fe=!(ge instanceof rs&&ge.isSuggestion),fe||ae++}return[E-1,ae-1]}new Gm;function Ef(a){const y=Ld(a.model).filter(b=>b.isSuggestion);if(y.length!==0){a.model.position=a.model.offsetOf(y[0].leftSibling);for(const b of y)b.parent.removeChild(b)}}function Ad(a,y){var b;const{model:E}=a;Ef(a);for(const Ce of Ld(E))Ce.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Tu(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof rs&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof rs&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof rs&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(Ce=>Ce.value).join(""),fe=Kt(a,ae);if(fe.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const Ce of ee)Ce.isError=!0;Tu(a);return}const ge=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=ge<0?fe.length-1:ge%fe.length;const be=fe[a.suggestionIndex];if(be!==ae){const Ce=ee[ee.length-1];Ce.parent.addChildrenAfter([...be.slice(ae.length-be.length)].map($e=>new rs($e,{isSuggestion:!0})),Ce),$c(a,{interactive:!0})}qm(a,fe)}function v0(a){const[y,b]=g0(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Au(a,y="accept",b){var E,ee;Tu(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const be=Ld(a.model).filter(Ce=>Ce.isSuggestion);if(be.length!==0){for(const Ce of be)Ce.isSuggestion=!1;a.model.position=a.model.offsetOf(be[be.length-1])}if(y==="accept-suggestion")return be.length!==0}const fe=Ld(a.model).filter(be=>!be.isSuggestion).map(be=>be.value).join(""),ge=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(ge),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(ra.insert(a.model,fe,{selectionMode:(ee=b==null?void 0:b.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Mf(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function Ym(a,y){const b=new Na({from:a.context}),E=new Un({mode:"math",type:"root",body:qo(y,{context:b})}),ee=gu(Cd(new Er(E.render(b),{classes:"ML__base"}),b));return vu(ee,{classes:"ML__latex"}).toMarkup()}function qm(a,y){var b;if(y.length===0){Tu(a);return}let E="";for(const[re,ae]of y.entries()){const fe=ae,ge=Ym(a,ae),be=Um(a.keybindings,fe).join("<br>");E+=`<li role="button" data-command="${fe}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${fe}</span><span class="ML__popover__command">${ge}</span>`,be&&(E+=`<span class="ML__popover__keybinding">${be}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xh()&&(ee.classList.add("is-visible"),_f(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function _f(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){Tu(a);return}if(y!=null&&y.deferred){setTimeout(()=>_f(a),32);return}const E=bl(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ae=window.innerWidth-document.documentElement.clientWidth,fe=window.innerHeight-document.documentElement.clientHeight,ge=window.mathVirtualKeyboard.boundingRect.height,be=document.getElementById("mathlive-suggestion-popover");E.x+be.offsetWidth/2>re-ae?be.style.left=`${re-be.offsetWidth-ae}px`:E.x-be.offsetWidth/2<0?be.style.left="0":be.style.left=`${E.x-be.offsetWidth/2}px`;const Ce=E.y-E.height;ee-fe-ge-E.y<Ce?(be.classList.add("ML__popover--reverse-direction"),be.classList.remove("top-tip"),be.classList.add("bottom-tip"),be.style.top=`${E.y-E.height-be.offsetHeight-15}px`):(be.classList.remove("ML__popover--reverse-direction"),be.classList.add("top-tip"),be.classList.remove("bottom-tip"),be.style.top=`${E.y+15}px`)}function Tu(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Mf("mathlive-suggestion-popover"),ks("suggestion-popover"),ks("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Au(a,"reject"),ra.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),b.innerHTML=window.MathfieldElement.createHTML(y),b}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(bh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function eg(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
`);if(a.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let y=a[1],b=y.match(/http.*\.ts[\?:]/);return b&&(y=a[2]),b=y.match(/(https?:.*):[0-9]+:[0-9]+/),b||(b=y.match(/at (.*(\.ts))[\?:]/),b||(b=y.match(/at (.*(\.mjs|\.js))[\?:]/))),b?b[1]:(console.error(a),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${y}").`),"")}var kf=null,y0,b0,wh=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return gc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(kf===null)try{const y=yield fetch(wh,{method:"HEAD"});y.status===200&&(kf=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wh}")`)}return new URL(a,kf!=null?kf:wh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var $s="not-loaded";function ng(){return gc(this,null,function*(){return $s="not-loaded",Lf()})}function Lf(){return gc(this,null,function*(){var a;if($s!=="not-loaded")return;if($s="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){$s="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const b=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],E=Array.from(document.fonts).map(ae=>ae.family);if(b.every(ae=>E.includes(ae))){$s="ready";return}if(!window.MathfieldElement.fontsDirectory){$s="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),$s="error";return}const re=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(ae=>tg(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(fe=>{try{return fe.load()}catch(ge){}}))).forEach(fe=>document.fonts.add(fe)),$s="ready";return}catch(ae){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ee}"`,{cause:ae}),document.body.classList.add("ML__fonts-did-not-load")}$s="error"}})}function rg(a){let y=0;for(let b=0;b<a.length;b++)y=y*31+a.charCodeAt(b),y=y|0;return Math.abs(y)}function Mo(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Ns(a)&&a.dirty&&(a.atomBoundsCache=new Map,$c(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new Na({from:me(Se({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Un.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(b=y.forHighlighting)!=null?b:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return vu(Cd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function w0(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const ee of b.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(b.selectionIsCollapsed){const ee=b.at(b.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=b.getAtoms(b.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return ig(a,y).toMarkup()}function $c(a,y){if(!Ns(a))return;y!=null||(y={});const b=a.element.querySelector("[part=virtual-keyboard-toggle]");b&&(b.style.display=a.hasEditableContent?"":"none");const E=a.field;if(!E)return;const ee=a.isSelectionEditable&&a.hasFocus(),re=E.classList.contains("ML__focused");re&&!ee?E.classList.remove("ML__focused"):!re&&ee&&E.classList.add("ML__focused");let ae=w0(a,y);const fe=a.element.querySelector("[part=menu-toggle]");if(fe&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?fe.style.display="none":fe.style.display=""),a.model.atoms.length<=1){const ge=a.options.contentPlaceholder;ge&&(ae+=`<span part=placeholder class="ML__content-placeholder">${Jo(ge)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Af(a,y.interactive),a.dirty=!1}function Af(a,y){const b=a.field;if(!b)return;for(const fe of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))fe.remove();!(y!=null&&y)&&$s!=="error"&&$s!=="ready"&&setTimeout(()=>{$s==="ready"?Af(a):setTimeout(()=>Af(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){_f(a,{deferred:!0});let fe=E.at(E.position);for(;fe&&fe.type!=="prompt"&&!(fe.containsCaret&&fe.displayContainsHighlight);)fe=fe.parent;if(fe!=null&&fe.containsCaret&&fe.displayContainsHighlight){const ge=md(a,lc(a,fe),ae);if(ge){ge.left/=ae,ge.right/=ae,ge.top/=ae,ge.bottom/=ae;const be=document.createElement("div");be.classList.add("ML__contains-highlight"),be.style.position="absolute",be.style.left=`${ge.left+1}px`,be.style.top=`${Math.ceil(ge.top)}px`,be.style.width=`${Math.ceil(ge.right-ge.left)}px`,be.style.height=`${Math.ceil(ge.bottom-ge.top)}px`,b.insertBefore(be,b.childNodes[0])}}return}for(const fe of ag(vd(a,{excludeAtomsWithBackground:!0}))){fe.left/=ae,fe.right/=ae,fe.top/=ae,fe.bottom/=ae;const ge=document.createElement("div");ge.classList.add("ML__selection"),ge.style.position="absolute",ge.style.left=`${fe.left}px`,ge.style.top=`${fe.top}px`,ge.style.width=`${Math.ceil(fe.right-fe.left)}px`,ge.style.height=`${Math.ceil(fe.bottom-fe.top-1)}px`,b.insertBefore(ge,b.childNodes[0])}}function ag(a){let y=[];for(const b of a){let E=!1;for(const ee of y)if(b.left===ee.left&&b.right===ee.right&&b.top===ee.top&&b.bottom===ee.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const ee of a)if(b.left>=ee.left&&b.right<=ee.right&&b.top>=ee.top&&b.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var S0=3,Sl;function Ls(a,y){y=Se({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Sl||(Sl={});for(const b of Object.keys(a))console.assert(!Sl[b],"Selector already defined: ",b),Sl[b]=me(Se({},y),{fn:a[b]})}function Sh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Sl[y]}function Iu(a){var y;return(y=Sh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;Re(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,be=>be[1].toUpperCase());const fe=Sl[E],ge=fe==null?void 0:fe.target;if(ge==="model"){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Ef(a),Sl[E].fn(a.model,...ee),Ad(a),ae=!0,re=!0}else if(ge==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Sl[E]){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=Sl[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return ge!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||fe!=null&&fe.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),fe!=null&&fe.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Mo(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&et()&&navigator.vibrate(S0);const E=Sh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Ls({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return Ad(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return Ad(a,{atIndex:a.suggestionIndex-1}),!1}Ls({complete:Au},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ls({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Tf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Tf}var ug=class em{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new em),this._singleton}set alphabeticLayout(y){this.sendMessage("update-setting",{alphabeticLayout:y})}set layouts(y){this.sendMessage("update-setting",{layouts:y})}get normalizedLayouts(){return[]}set editToolbar(y){this.sendMessage("update-setting",{editToolbar:y})}set actionKeycap(y){this.sendMessage("update-setting",{actionKeycap:y})}set shiftKeycap(y){this.sendMessage("update-setting",{shiftKeycap:y})}set backspaceKeycap(y){this.sendMessage("update-setting",{backspaceKeycap:y})}set tabKeycap(y){this.sendMessage("update-setting",{tabKeycap:y})}set container(y){throw new Error("Container inside an iframe cannot be changed")}show(y){this.sendMessage("show",y)}hide(y){this.sendMessage("hide",y)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(y){y?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(y){return this.sendMessage("execute-command",{command:y}),!0}updateToolbar(y){this.sendMessage("update-toolbar",y)}update(y){this.sendMessage("update-setting",y)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");this.handleMessage(y.data)}}handleMessage(y){const{action:b}=y;if(b==="execute-command"){const{command:E}=y;Iu(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(b==="synchronize-proxy"){this._boundingRect=y.boundingRect,this._isShifted=y.isShifted;return}if(b==="geometry-changed"){this._boundingRect=y.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(y,b={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(Se({type:Tf,action:y},b),this.targetOrigin)}},C0={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"&alpha;&beta;&gamma;",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>&#x03c6;</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>&#x03c2;</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>&#x03f5;</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>&rho;</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>&tau;</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>&upsilon;</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>&theta;</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>&iota;</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>&omicron;</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>&pi;</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>&alpha;</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>&sigma;</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>&delta;</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>&gamma;</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>&eta;</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>&xi;</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>&kappa;</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>&lambda;</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>&zeta;</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>&chi;</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>&psi;</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>&omega;</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>&beta;</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>&nu;</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>&mu;</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>&#x03b5;</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>&#x03d1;</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>&#x3f0;</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>&#x03d6;</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>&#x03f1;</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"&infin;\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
.minimalist-backdrop {
display: flex;
justify-content: center;
}
.minimalist-container {
--keycap-height: 40px;
--keycap-max-width: 53px;
--keycap-small-font-size: 12px;
background: var(--keyboard-background);
padding: 20px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border: 1px solid var(--keyboard-border);
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
}
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},If={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},Td;function E0(a,y){var b,E,ee;const re=fc.singleton;if(!re)return;const ae=Du(a),fe=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof fe=="string"&&!M0(fe)||Array.isArray(fe)&&fe.length===0){y==null||y();return}const ge={};let be="";for(const Tn of fg(fe)){const Sr=k0(Tn),_n=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);ge[_n]=Sr;const[tr,kr]=Df(Sr);be+=`<div id=${_n} class="item ${kr}">${tr}</div>`}const Ce=document.createElement("div");Ce.setAttribute("aria-hidden","true"),Ce.className="MLK__variant-panel",Ce.style.height="auto";const $e=Object.keys(ge).length;let nt=5;$e===1?nt=1:$e===2||$e===4?nt=2:$e===3||$e===5||$e===6?nt=3:$e>=7&&$e<14&&(nt=4),Ce.style.width=`calc(var(--variant-keycap-length) * ${nt} + 12px)`,Ce.innerHTML=vp.createHTML(be),wl.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:Ce}),Td=new AbortController;const{signal:xt}=Td,Tt=a==null?void 0:a.getBoundingClientRect();if(Tt){Tt.top-Ce.clientHeight<0&&(Ce.style.width="auto",$e<=6?Ce.style.height="56px":$e<=12?Ce.style.height="108px":$e<=18?Ce.style.height="205px":Ce.classList.add("compact"));const Tn=Math.max(0,Math.min(window.innerWidth-Ce.offsetWidth,(Tt.left+Tt.right-Ce.offsetWidth)/2)),Sr=Tt.top-Ce.clientHeight+5;Ce.style.transform=`translate(${Tn}px, ${Sr}px)`,Ce.classList.add("is-visible"),requestAnimationFrame(()=>{Ce.addEventListener("pointerup",_n=>{const tr=Du(_n.target);!(tr!=null&&tr.id)||!ge[tr.id]||(Eh(ge[tr.id]),Id(),y==null||y(),_n.preventDefault())},{capture:!0,passive:!1,signal:xt}),Ce.addEventListener("pointerenter",_n=>{const tr=Du(_n.target);!(tr!=null&&tr.id)||!ge[tr.id]||tr.classList.add("is-active")},{capture:!0,signal:xt}),Ce.addEventListener("pointerleave",_n=>{const tr=Du(_n.target);!(tr!=null&&tr.id)||!ge[tr.id]||tr.classList.remove("is-active")},{capture:!0,signal:xt}),window.addEventListener("pointercancel",()=>{Id(),y==null||y()},{signal:xt}),window.addEventListener("pointerup",()=>{Id(),y==null||y()},{signal:xt})})}}function Id(){Td==null||Td.abort(),Td=null,wl.state==="open"&&wl.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Ye))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ye[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(je))y.push({class:"swatch-button",label:'<span style="background:'+je[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function M0(a){return If[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(If[a]||(If[a]=(y=dg(a))!=null?y:[]),If[a])}function hg(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pg(a){return Object.keys(a).map(y=>`${y} {${hg(a[y])}}`).join("")}function Dd(a){if(!a)return"";const y=new Na,b=new Un({mode:"math",type:"root",body:qo(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=gu(Cd(new Er(b.render(y),{classes:"ML__base"}),y));return vu(E,{classes:"ML__latex"}).toMarkup()}function Pd(a){var y;if(Array.isArray(a))return a.map(E=>Pd(E)).flat();const b=typeof a=="string"?{markup:a}:a;return"rows"in b&&Array.isArray(b.rows)&&(b.rows=b.rows.map(E=>E.map(ee=>k0(ee)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mg(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const fe=kd();fe&&(E=fe.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[tt.locale.slice(0,2)])!=null?a:"qwerty")}const ee={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},re=(y=ee[E])!=null?y:ee.qwerty,ae=E==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const fe of re){const ge=[];for(const be of fe)/[a-z]/.test(be)?ge.push({label:be,class:"hide-shift",shift:{label:be.toUpperCase()},variants:M0(be)?be:void 0}):be==="~"?E!=="dvorak"?ge.push("[backspace]"):ge.push({label:"[backspace]",width:1}):be==="^"?ge.push("[shift]"):be===" "&&ge.push("[separator-5]");ae.push(ge)}return ae.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Pd({rows:ae})}}function _0(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),_0(C0[a]);let y;if("rows"in a&&Array.isArray(a.rows)){console.assert(!("layers"in a||"markup"in a),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const ee=a,{rows:re}=ee,ae=st(ee,["rows"]);y=me(Se({},ae),{layers:Pd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=st(ee,["markup"]);y=me(Se({},ae),{layers:Pd(a.markup)})}else y=Se({},a),"layers"in a?y.layers=Pd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const ee of y.layers)if(ee.rows)for(const re of ee.rows.flat()){Pu(re)&&(b=!0);const ae=re.command;typeof ae=="string"&&["undo","redo","cut","copy","paste"].includes(ae)&&(E=!0)}return(!("displayShiftedKeycaps"in a)||a.displayShiftedKeycaps===void 0)&&(y.displayShiftedKeycaps=b),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(y.displayEditToolbar=!E),y}function gg(a,y){var b,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const fe=ae,ge=[re===y?"selected":"layer-switch"];fe.tooltip&&ge.push("MLK__tooltip"),fe.labelClass&&ge.push(...fe.labelClass.split(" ")),ee+=`<div class="${ge.join(" ")}"`,fe.tooltip&&(ee+=" data-tooltip='"+((b=ut(fe.tooltip))!=null?b:fe.tooltip)+"' "),re!==y&&(ee+=`data-layer="${fe.layers[0].id}"`),ee+=`>${(E=fe.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function vg(a,y){let b="";if(a.editToolbar==="none")return"";const ee=[];y.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
data-command='"undo"'
data-tooltip='${ut("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${ut("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${ut("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${ut("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${ut("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return b+=ee.map(ae=>re[ae]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=fc.singleton;if(!y)return;const b={};if(!a.id){if(a.hasAttribute("data-label")&&(b.label=a.dataset.label),a.hasAttribute("data-latex")&&(b.latex=a.dataset.latex),a.hasAttribute("data-key")&&(b.key=a.dataset.key),a.hasAttribute("data-insert")&&(b.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(b.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(b.aside=a.dataset.aside),a.className&&(b.class=a.className),!b.label&&!b.latex&&!b.key&&!b.insert&&(b.latex=a.innerText,b.label=a.innerHTML),a.hasAttribute("data-command"))try{b.command=JSON.parse(a.dataset.command)}catch(E){}a.id=y.registerKeycap(b)}if(!a.innerHTML){const[E,ee]=Df(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){ks("virtual-keyboard"),ks("core"),Lf()}function wg(){x("core"),x("virtual-keyboard")}var Sg=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
</symbol>
<symbol id="svg-shift" viewBox="0 0 384 512">
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
</symbol>
<symbol id="svg-commit" viewBox="0 0 512 512">
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
</symbol>
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
<symbol id="svg-command" viewBox="0 0 640 512">
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
</symbol>
<symbol id="svg-undo" viewBox="0 0 512 512">
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
</symbol>
<symbol id="svg-redo" viewBox="0 0 512 512">
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
</symbol>
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
</symbol>
<symbol id="svg-tab" viewBox="0 0 448 512">
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
</symbol>
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
</symbol>
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
</symbol>
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
</symbol>
<symbol id="svg-trash" viewBox="0 0 448 512">
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
</symbol>
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
</svg>`;function Cg(a){a.resetKeycapRegistry(),xg();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(Sg+a.normalizedLayouts.map((ae,fe)=>Eg(a,ae,fe)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",_g,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",fe=>{var ge,be;let Ce=fe.target,$e="";for(;Ce&&!$e;)$e=(ge=Ce==null?void 0:Ce.getAttribute("data-command"))!=null?ge:"",Ce=(be=Ce==null?void 0:Ce.parentElement)!=null?be:null;$e&&a.executeCommand(JSON.parse($e))});yg(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=y.querySelectorAll(".MLK__layer");console.assert(re.length>0,"No virtual keyboards available");for(const ae of re)ae.addEventListener("pointerdown",fe=>fe.preventDefault());return a.currentLayer=a.latentLayer,y}function Eg(a,y,b){const E=[];if(!("layers"in y))return"";for(const ee of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(gg(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Mg(a,ee)),E.push("</div>");return E.join("")}function Mg(a,y){if(typeof y=="string")return y;let b="";if(typeof y.style=="string"?b+=`<style>${y.style}</style>`:typeof y.style=="object"&&(b+=`<style>${pg(y.style)}</style>`),y.backdrop&&(b+=`<div class='${y.backdrop}'>`),y.container&&(b+=`<div class='${y.container}'>`),y.rows){b+="<div class=MLK__rows>";for(const E of y.rows){b+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,fe]=Df(ee);/(^|\s)separator/.test(fe)?b+=`<div class="${fe}"`:b+=`<div tabindex="-1" id="${re}" class="${fe}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${ae}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Df(a,y={shifted:!1}){var b,E,ee,re,ae,fe,ge;let be="",Ce=(b=a.class)!=null?b:"";if(y.shifted&&Pu(a)&&(Ce+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?be=Dd(a.shift):typeof a.shift=="object"&&(be=a.shift.label?a.shift.label:(E=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(Ce=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(be=a.label?a.label:(ae=Dd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let $e;typeof a.shift=="string"?$e=Dd(a.shift):a.shift.label?$e=a.shift.label:$e=(fe=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?fe:"",be+=`<span class="MLK__shift">${$e}</span>`}a.aside&&(be+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(Ce)&&(Ce+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(Ce)||(Ce+=" MLK__keycap"),!/\bw[0-9]+\b/.test(Ce)&&a.width&&(Ce+=(ge={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?ge:""),[be,Ce||"MLK__keycap"]}var Fc={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"&#x2212;",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"&divide;"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"&times;",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function k0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Fc[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Fc[a.label]&&(b=me(Se(Se({},Fc[a.label]),a),{label:Fc[a.label].label})),"key"in a&&a.key&&Fc[a.key]&&(b=me(Se(Se({},Fc[a.key]),a),{key:Fc[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=Se(Se({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var Od;function _g(a){var y;if(a.button!==0)return;const b=fc.singleton;if(!b)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){b.currentLayer=(y=E.getAttribute("data-layer"))!=null?y:"",a.preventDefault();return}const ee=Du(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,fe=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointerleave",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointercancel",Pf(ae),{signal:fe}),ee.addEventListener("pointerup",Pf(ae),{signal:fe}),Pu(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Od&&clearTimeout(Od),Od=setTimeout(()=>{ee.classList.contains("is-pressed")&&(ee.classList.remove("is-pressed"),ee.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),E0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Pf(a){return y=>{const b=Du(y.target);if(!(b!=null&&b.id))return;const E=fc.singleton;if(!E)return;const ee=E.getKeycap(b.id);if(ee){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Od&&clearTimeout(Od),Pu(ee)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Eh(ee.shift):Eh(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Eh(a){var y;let b=a.command;!b&&a.insert&&(b=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!b&&a.key&&(b=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!b&&a.latex&&(b=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),b||(b=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(y=fc.singleton)==null||y.executeCommand(b)}function kg(a){if(a.nodeType!==1)return!1;const y=a.classList;return y.contains("MLK__keycap")||y.contains("shift")||y.contains("action")||y.contains("fnbutton")||y.contains("bigfnbutton")}function Du(a){if(!a)return;let y=a;for(;y&&!kg(y);)y=y.parentElement;return y!=null?y:void 0}function Pu(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var fc=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var y,b,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(b=(y=window.document)==null?void 0:y.body)!=null?b:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(ee=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(E=window.top)==null||E.addEventListener("message",this)}catch(ee){window.addEventListener("message",this)}document.body.addEventListener("focusin",ee=>{const re=ee.target;re!=null&&re.isConnected&&setTimeout(()=>{const ae=L0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&lt()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{L0()||this.hide()},300)})}get currentLayer(){var y,b,E;return(E=(b=(y=this._element)==null?void 0:y.querySelector(".MLK__layer.is-visible"))==null?void 0:b.id)!=null?E:""}set currentLayer(y){var b;if(!this._element){this.latentLayer=y;return}let E=y?this._element.querySelector(`#${y}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((b=this._element.querySelector(".MLK__layer.is-visible"))==null||b.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(y){var b;this._shiftPressCount=y>2||y<0?0:y,(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(y){const b="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[b]=y,b}getKeycap(y){return y?this.keycapRegistry[y]:void 0}getLayer(y){const b=this.normalizedLayouts;for(const E of b)for(const ee of E.layers)if(ee.id===y)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(y){this._alphabeticLayout=y,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(y){this._actionKeycap=typeof y=="string"?{label:y}:y}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(y){this._shiftKeycap=typeof y=="string"?{label:y}:y}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(y){this._backspaceKeycap=typeof y=="string"?{label:y}:y}get tabKeycap(){return this._tabKeycap}set tabKeycap(y){this._tabKeycap=typeof y=="string"?{label:y}:y}get layouts(){return this._layouts}set layouts(y){this.updateNormalizedLayouts(y),this.rebuild()}updateNormalizedLayouts(y){const b=Array.isArray(y)?[...y]:[y],E=b.findIndex(ee=>ee==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ee=>_0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(y){this._editToolbar=y,this.rebuild()}get container(){return this._container}set container(y){this._container=y,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(y){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}get element(){return this._element}set element(y){var b;this._element!==y&&((b=this._element)==null||b.remove(),this._element=y)}get visible(){return this._visible}set visible(y){y?this.show():this.hide()}get boundingRect(){var y;if(!this._visible)return new DOMRect;const b=(y=this._element)==null?void 0:y.getElementsByClassName("MLK__plate")[0];return b?b.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var y,b;const E=this.boundingRect.height;if(this.container===document.body){(y=this._element)==null||y.style.setProperty("--_keyboard-height",`calc(${E}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const ee=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ee}px)`:`${ee}px`}else(b=this._element)==null||b.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const y=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=y,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const y=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(y&&(y.backdrop||y.container)));const b=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(b)for(const E of b){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Df(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(y){var b;if(this._visible)return;const E=this.container;if(E&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const ee=this._element.getElementsByClassName("MLK__plate")[0];if(ee&&this.observer.observe(ee),E===window.document.body){const re=E.style.paddingBottom;this.originalContainerBottomPadding=re;const ae=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${ae}px)`:`${ae}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,y!=null&&y.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var ee;return(ee=this._element)==null?void 0:ee.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(y){var b;const E=this.container;if(E&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const ee=this._element.getElementsByClassName("MLK__plate")[0];ee&&this.observer.unobserve(ee),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),Id(),wg(),(b=this._element)==null||b.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var y,b;return(b=(y=this.element)==null?void 0:y.offsetHeight)!=null?b:0}buildAndAttachElement(){var y;console.assert(!this.element),this.element=Cg(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&E0(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");y.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:y.data.action!=="update-setting"&&y.data.action!=="proxy-created"&&y.data.action!=="execute-command"&&(console.assert(y.source!==void 0),this.connectedMathfieldWindow=y.source),this.handleMessage(y.data,y.source)}if(this._element)switch(y.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":y.button!==2&&y.preventDefault();break;case"keydown":{y.key==="Shift"&&!y.repeat&&(this.shiftPressCount=1);break}case"keyup":{(y.key==="Shift"||!y.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(y,b){const{action:E}=y;if(E==="execute-command"){const{command:ee}=y,re=Iu(ee);if(window.top!==void 0&&re!=="virtual-keyboard")return;this.executeCommand(ee);return}if((E==="connect"||E==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b),E!=="disconnect"&&window===window.top){if(E==="show"){typeof y.animate!="undefined"?this.show({animate:y.animate}):this.show();return}if(E==="hide"){typeof y.animate!="undefined"?this.hide({animate:y.animate}):this.hide();return}if(E==="update-setting"){y.alphabeticLayout&&(this.alphabeticLayout=y.alphabeticLayout),y.layouts&&(this.layouts=y.layouts),y.editToolbar&&(this.editToolbar=y.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b);return}}}sendMessage(y,b,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:Se({type:Tf,action:y},b)}));return}if(E)E.postMessage(Se({type:Tf,action:y},b),{targetOrigin:this.targetOrigin});else if(b.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:b.command})),y==="execute-command"&&Array.isArray(b.command)&&b.command[0]==="insert"){const ee=b.command[1].split("");for(const re of ee)this.dispatchEvent(new KeyboardEvent("keydown",{key:re,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:re,bubbles:!0}))}}stateWillChange(y){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:y},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(y){const b=this._element;if(!b)return;b.classList.toggle("is-math-mode",y.mode==="math"),b.classList.toggle("is-text-mode",y.mode==="text"),b.classList.toggle("can-undo",y.canUndo),b.classList.toggle("can-redo",y.canRedo),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-paste",!0);const E=b.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=vg(this,y)}update(y){this._style=y.style,this.updateToolbar(y)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(y){let b,E=[],ee=Iu(y);return Re(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Iu(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Sl[b].fn(void 0,...E):(this.sendMessage("execute-command",{command:y}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function L0(){var a,y;let b=Cf(),E=null;for(;b;){if("host"in b&&((y=(a=b.host)==null?void 0:a.tagName)==null?void 0:y.toLowerCase())==="math-field"){E=b.host;break}b=b.parentNode}return E}if(ht()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function Of(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(Re(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(fe=>parseInt(fe.trim()));y.scriptDepth=[re,ae]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ee=a.mathVirtualKeyboardPolicy.toLowerCase();if(ee==="sandboxed"){if(window!==window.top){const re=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?tt.locale.startsWith("fr")?y.letterShapeStyle="french":y.letterShapeStyle="tex":y.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?y.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),y.defaultMode="math");break;case"macros":y.macros=$n(a.macros);break;default:Re(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=Se({},a[b]):y[b]=a[b]}return y}function zc(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ee of b)a[ee]===null?E[ee]=null:Re(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=Se({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Nf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:Bt,backgroundColorMap:at,letterShapeStyle:tt.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lh,inlineShortcuts:ff,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function A0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function hc(a,y){!a||!y||(Re(a)?a.forEach(b=>hc(b,y)):typeof a=="object"&&!a.style.color&&!a.style.backgroundColor&&!a.style.fontFamily&&!a.style.fontShape&&!a.style.fontSeries&&!a.style.fontSize&&!a.style.variant&&!a.style.variantStyle&&(a.applyStyle(y),hc(a.body,y),hc(a.above,y),hc(a.below,y),hc(a.subscript,y),hc(a.superscript,y)))}function Mh(a,y,b,E){function ee(ae,fe){for(const ge of re)if(ge.style[ae]!==fe)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const re=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ee("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ee("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ee("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ee("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ee("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ee("fontSize",b.fontSize)&&(b.fontSize=dl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const ae of re)ae.applyStyle(b);return!0}function Lg(a,y){const b=a.at(a.position);if(b.type==="composition")b.value=y;else{const{caret:E}=b;b.caret=void 0;const ee=new Wl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Ag(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}nr(["math","displaymath"],Gs),nr("center",Gs),Ut("displaylines","",{parse:a=>{const y=[];let b=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(y.push([b]),b=[]):b.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),y.push([b]),y},createAtom:a=>new ca("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),gr("array","{columns:colspec}",(a,y,b,E)=>new ca(a,_h(y),b,{columns:E[0],mathstyleName:"textstyle"})),gr(["equation","equation*","subequations"],"",(a,y,b)=>new ca(a,_h(y),b,{columns:[{align:"c"}]})),gr(["multline","multline*"],"",Gs),gr(["align","align*","aligned","eqnarray"],"",Gs),gr("split","",Gs),gr(["gather","gathered"],"",Gs),gr(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Gs),gr(["smallmatrix","smallmatrix*"],"[columns:colspec]",Gs),gr(["cases","dcases","rcases"],"",Gs);function Tg(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function _h(a,y=1){return Tg(a)?Array(y).fill([[new Un({type:"first"}),new Oi]]):a.map(b=>b.length===0?[[new Un({type:"first"})]]:b.map(E=>E.length===0?[new Un({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Un({type:"first"})),E)))}function Gs(a,y=[[[]]],b=[],E=[]){switch(y=_h(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new ca(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new ca(a,y,b,{mathstyleName:"textstyle"});case"center":return new ca(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new ca(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new ca(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new ca(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Kc(E[0])});case"bmatrix":case"bmatrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Kc(E[0])});case"Bmatrix":case"Bmatrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Kc(E[0])});case"vmatrix":case"vmatrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Kc(E[0])});case"Vmatrix":case"Vmatrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Kc(E[0])});case"matrix":case"matrix*":return new ca(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Kc(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new ca(a,y,b,{mathstyleName:"scriptstyle",columns:Kc(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new ca(a,y,b,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new ca(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new ca(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const fe of y)ee=Math.max(ee,fe.length);const re=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let ae=2;for(;ae<ee;)re.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),ae+=2;return re.push({gap:0}),new ca(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new ca(a,y,b,{mathstyleName:"textstyle"})}function Kc(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof ca);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof ca)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=$f()),ee.length===0&&(ee=$f());let ae;return y.endsWith("column")?(ae=Gs("split",[[re,ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,0,1)?Wc(a,ae,0,1):a.position=a.offsetOf(E)):(ae=Gs("lines",[[re],[ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,1,0)?Wc(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Xa){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=$f()),re.length===0&&(re=$f());let fe="pmatrix";const ge=ee.leftDelim,be=ee.rightDelim;ge==="("&&(be===")"||be==="?")?fe="pmatrix":(ge==="["||ge==="\\lbrack")&&(be==="]"||be==="\\rbrack"||be==="?")?fe="bmatrix":ge==="\\vert"&&be==="\\vert"?fe="vmatrix":ge==="\\Vert"&&be==="\\Vert"?fe="Vmatrix":(ge==="{"||ge==="\\lbrace")&&(be==="."||be==="?")&&(fe="cases");const Ce=Gs(fe,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(Ce,ee),ee.parent.removeChild(ee),Hc(Ce,0,0)?Wc(a,Ce,0,0):y.endsWith("column")?Hc(Ce,0,1)?Wc(a,Ce,0,1):a.position=a.offsetOf(b):Hc(Ce,1,0)?Wc(a,Ce,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof ca?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Hc(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Wc(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Rf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Bf(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Rf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Rf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Rf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Rf(a,b,E,ee,"start");break}}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Og(a){return a.contentWillChange({inputType:"insertText"})?(Bf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function D0(a,y){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let b=".",E=".";switch(y){case"pmatrix":case"pmatrix*":b="(",E=")";break;case"bmatrix":case"bmatrix*":b="[",E="]";break;case"Bmatrix":case"Bmatrix*":b="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":b="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":b="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":b=".",E=".";break;case"cases":case"dcases":b="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=y,re.leftDelim=b,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof ca);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof ca){const E=b.parent,ee=b.parentBranch;let re;switch(y){case"row":if(E.rowCount>1){E.removeRow(ee[0]);const ae=E.getCell(Math.max(0,ee[0]-1),ee[1]);re=a.offsetOf(ae[ae.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ee[1]);const ae=E.getCell(ee[0],Math.max(0,ee[1]-1));re=a.offsetOf(ae[ae.length-1])}break}re&&a.setPositionHandlingPlaceholder(re)}}function Ng(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Rg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ls({addRowAfter:T0,addColumnAfter:I0,addRowBefore:Pg,addColumnBefore:Og,removeRow:Ng,removeColumn:Rg,setEnvironment:D0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function $f(){return[new Oi]}var O0=class nm{constructor(y){this.recording=!1,this.model=y,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(y){y&&this.index>=0&&(this.stack[this.index].selection=y),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(y){return this.recording?(y&&y===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>nm.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=y!=null?y:"",!0):!1}};O0.maximumDepth=1e3;var Bg=O0;function kh(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(he.test(a.at(y).value)){let re=y,ae;do ae=a.at(re).mode==="text"&&he.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}else if(/\s/.test(a.at(y).value)){let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&/\s/.test(a.at(re).value);)re+=E;if(!a.at(re))ee=re-E;else{let ae=!0;do ae=a.at(re).mode==="text"&&!/\s/.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}}else{let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&!/\s/.test(a.at(re).value);)re+=E;ee=a.at(re)?re:re-E;let ae=!0;for(;a.at(re)&&ae;)ae=a.at(re).mode==="text"&&/\s/.test(a.at(re).value),ae&&(ee=re),re+=E;ee=a.at(re)?re-2*E:re-E}return ee-(E>0?0:1)}function Ou(a,y,b){var E,ee,re,ae,fe,ge,be;const Ce=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let $e=a.at(a.position);if(y==="forward"&&($e.type==="subsup"?($e=$e.rightSibling,$e||($e=a.at(a.position+1))):$e=a.at(a.position+1)),!$e)return a.announce("plonk"),!1;let nt=a.offsetOf($e);if($e instanceof al)nt=kh(a,nt,y);else if($e instanceof rs)if($e.isSuggestion)for(console.assert(y==="forward");$e&&$e instanceof rs;)$e.isSuggestion=!1,nt=a.offsetOf($e),$e=$e.rightSibling;else if(y==="forward"){if($e=$e.rightSibling,!$e||!($e instanceof rs))return a.announce("plonk"),!1;for(;$e&&$e instanceof rs&&/[a-zA-Z\*]/.test($e.value);)nt=a.offsetOf($e),$e=$e.rightSibling}else{if($e=$e.leftSibling,!$e||!($e instanceof rs))return a.announce("plonk"),!1;for(;$e&&$e instanceof rs&&/[a-zA-Z\*]/.test($e.value);)nt=a.offsetOf($e),$e=$e.leftSibling}else if(y==="forward"&&$e.type==="mopen"){let xt=0;do $e.type==="mopen"?xt+=1:$e.type==="mclose"&&(xt-=1),$e=$e.rightSibling;while(!$e.isLastSibling&&xt!==0);nt=a.offsetOf($e.leftSibling)}else if(y==="backward"&&$e.type==="mclose"){let xt=0;do $e.type==="mopen"?xt+=1:$e.type==="mclose"&&(xt-=1),$e=$e.leftSibling;while(!$e.isFirstSibling&&xt!==0);nt=a.offsetOf($e)}else if(y==="backward")if($e.type==="first")for(;nt>0&&$e.type==="first";)nt-=1,$e=a.at(nt);else{const xt=$e.type;$e.type==="subsup"&&(nt=a.offsetOf(a.at(nt).leftSibling)),nt-=1;let Tt=(ee=a.at(nt))==null?void 0:ee.type;for(;nt>=0&&Tt===xt;)((re=a.at(nt))==null?void 0:re.type)==="subsup"?nt=a.offsetOf(a.at(nt).leftSibling):nt-=1,Tt=a.at(nt).type}else{const{type:xt}=$e;let Tt=(ae=a.at(nt))==null?void 0:ae.type;const{lastOffset:Tn}=a;for(;nt<=Tn&&(Tt===xt||Tt==="subsup");){for(;((fe=a.at(nt).rightSibling)==null?void 0:fe.type)==="subsup";)nt=a.offsetOf(a.at(nt).rightSibling);nt+=1,Tt=(ge=a.at(nt))==null?void 0:ge.type}nt-=1}if((be=b==null?void 0:b.extend)!=null&&be){if(!a.setSelection(a.anchor,nt))return a.announce("plonk"),!1}else{if(nt===a.position)return a.announce("plonk"),!1;a.position=nt}return a.announce("move",Ce),a.mathfield.stopCoalescingUndo(),!0}function Cl(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[fe,ge]=g0(a);fe!==void 0&&ge!==void 0&&a.deleteAtoms([fe,ge])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let fe=Ff(a,a.position,y);fe<0&&(fe=0),fe>a.lastOffset&&(fe=a.lastOffset);const ge=a.setSelection(a.anchor,fe);return a.mathfield.stopCoalescingUndo(),ge}if(a.selectionIsPlaceholder){a.collapseSelection(y);const fe=Cl(a,y);return a.mathfield.stopCoalescingUndo(),fe}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,N0(a,re)||(re=Ff(a,re,y))):re=Ff(a,re,y),re<0||re>a.lastOffset){let fe=!0;return a.silenceNotifications||(fe=(ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0),fe&&a.announce("plonk"),fe}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Ff(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||N0(a,y)?y:Ff(a,y,b)}function N0(a,y){var b;const E=a.at(y);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function $g(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=Cu(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function zf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(be=>be.type==="prompt"&&!be.captureSelection):b,fe=Cu(a.mathfield.getHTMLElement(y)).right,ge=a.offsetOf($g(a.mathfield,ae,fe))-(re?1:0);if(E){const[be,Ce]=a.selection.ranges[0];let $e;ge<(ee==="up"?be:Ce)?$e={ranges:[[ge,Ce]],direction:"backward"}:$e={ranges:[[be,ge]],direction:"forward"},a.setSelection($e)}else a.setPositionHandlingPlaceholder(ge);a.announce(`move ${ee}`)}function Fg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("backward");const re=()=>{var ge,be;let Ce=!0;return a.silenceNotifications||(Ce=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Ce?"plonk":"line"),Ce},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="below"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof ca);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof ca){const ge=fe.parent;if(fe.parentBranch[0]<1)return re();const be=fe.parentBranch[0]-1,Ce=ge.array[be][fe.parentBranch[1]];if(!Ce.some(nt=>nt.type==="prompt"&&!nt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Ce,ee,"up")}else if(fe){const ge=(E=fe.parent.branch("above"))!=null?E:fe.parent.createBranch("above");if(!ge.some(Ce=>Ce.type==="prompt"&&Ce.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("forward");const re=()=>{var ge,be;let Ce=!0;return a.silenceNotifications||(Ce=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Ce?"plonk":"line"),Ce},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="above"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof ca);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof ca){const ge=fe.parent;if(fe.parentBranch[0]+1>ge.array.length-1)return re();const be=fe.parentBranch[0]+1,Ce=ge.array[be][fe.parentBranch[1]];if(!Ce.some(nt=>nt.type==="prompt"&&!nt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Ce,ee,"down")}else if(fe){const ge=(E=fe.parent.branch("below"))!=null?E:fe.parent.createBranch("below");if(!ge.some(Ce=>Ce.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"down")}else return re();return!0}function R0(a){const y=a.position,b=a.at(y).parent;return b!=null&&b.parent?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),a.announce("move",y),!0):(a.announce("plonk"),!1)}function Kg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!1):E=!0,b=b.parent;return E?y:0}function Hg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!0):E=!1,b=b.parent;return E?y:0}function B0(a){var y;if(a.collapseSelection(),Kg(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=b.rightSibling)==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new js({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function $0(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new js({style:a.at(a.position).computedStyle}),b),b=a.at(a.position+1)),b.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.subscript[0]))),!0}function Wg(){function a(ge){const be=[],Ce=[];return[...ge.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((nt,xt)=>{const Tt=E(nt);Tt===0?be.push(nt):Ce.push({documentOrder:xt,tabIndex:Tt,node:nt})}),Ce.sort((nt,xt)=>nt.tabIndex===xt.tabIndex?nt.documentOrder-xt.documentOrder:nt.tabIndex-xt.tabIndex).map(nt=>nt.node).concat(be)}function y(ge){return!(!b(ge)||ee(ge)||E(ge)<0)}function b(ge){return!(ge.disabled||ge.type==="hidden"&&ge.tagName.toUpperCase()==="INPUT"||fe(ge))}function E(ge){var be;const Ce=Number.parseInt((be=ge.getAttribute("tabindex"))!=null?be:"NaN",10);return Number.isNaN(Ce)?ge.contentEditable==="true"||(ge.nodeName==="AUDIO"||ge.nodeName==="VIDEO")&&ge.getAttribute("tabindex")===null?0:ge.tabIndex:Ce}function ee(ge){return ge.tagName.toUpperCase()==="INPUT"&&ge.type==="radio"&&!ae(ge)}function re(ge,be){for(const Ce of ge)if(Ce.checked&&Ce.form===be)return Ce;return null}function ae(ge){var be;if(!ge.name)return!0;const $e=((be=ge.form)!=null?be:ge.ownerDocument).querySelectorAll('input[type="radio"][name="'+ge.name+'"]'),nt=re($e,ge.form);return!nt||nt===ge}function fe(ge){if(!ht()||ge===document.activeElement||ge.contains(document.activeElement))return!1;if(getComputedStyle(ge).visibility==="hidden")return!0;const be=ge.getBoundingClientRect();if(be.width===0||be.height===0)return!0;for(;ge;){if(getComputedStyle(ge).display==="none")return!0;ge=ge.parentElement}return!1}return ht()?a(document.body):[]}function bs(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ee=a.offsetOf(y[0]),re=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?bs(a,[y.leftSibling,y]):bs(a,[y,y.leftSibling])}function ll(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Cl(a,y);let ae;const fe=a.at(a.anchor).parentPrompt;fe?y==="forward"?ae=a.offsetOf(fe)+1:ae=a.offsetOf(fe.leftSibling):ae=Math.max(a.position+re,0);const ge=Lh(a,ae,y);if(!ge||y==="forward"&&a.offsetOf(ge)<ae||y==="backward"&&a.offsetOf(ge)>ae){if(!b||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const Ce=Wg();if(!document.activeElement||Ce.length<=1)return a.announce("plonk"),!1;let $e=Ce.indexOf(document.activeElement)+re;return $e<0&&($e=Ce.length-1),$e>=Ce.length&&($e=0),Ce[$e].focus(),a.mathfield.stopCoalescingUndo(),!0}return ll(a,ge),!0}function Lh(a,y=0,b="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,y,b)}Ls({moveToOpposite:a=>{const y={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},b=a.at(a.position),{parent:E}=b;if(!E)return a.announce("plonk"),!1;const ee=b.parentBranch;let re;if(typeof ee=="string"&&(re=y[ee]),!re){const fe=b.subsupPlacement?$0(a):B0(a);return a.mathfield.stopCoalescingUndo(),fe}E.branch(re)||E.createBranch(re);const ae=a.setSelection(a.getBranchRange(a.offsetOf(E),re));return a.mathfield.stopCoalescingUndo(),ae},moveBeforeParent:a=>{const{parent:y}=a.at(a.position);return y?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>R0(a),moveToNextChar:a=>Cl(a,"forward"),moveToPreviousChar:a=>Cl(a,"backward"),moveUp:a=>Cl(a,"upward"),moveDown:a=>Cl(a,"downward"),moveToNextWord:a=>Ou(a,"forward"),moveToPreviousWord:a=>Ou(a,"backward"),moveToGroupStart:a=>{const y=a.offsetOf(a.at(a.position).firstSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const y=a.offsetOf(a.at(a.position).lastSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var y,b,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Kf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let nt=re;for(;nt&&nt.mode==="text";)nt=nt.leftSibling;let xt=re;for(;((y=xt.rightSibling)==null?void 0:y.mode)==="text";)xt=xt.rightSibling;if(nt&&xt)return bs(a,[nt,xt])}if(re.rightSibling.mode==="text"){let nt=re;for(;nt&&nt.mode==="text";)nt=nt.rightSibling;return nt?(ll(a,(b=nt.leftSibling)!=null?b:nt),a.mathfield.switchMode("math"),!0):ll(a,a.lastOffset)}}const fe=a.at(a.anchor).parentPrompt,ge=fe?a.offsetOf(fe)+1:Math.max(a.position+1,0),be=Lh(a,ge,"forward");if(be)return ll(a,be);const Ce=F0(a,re,nt=>nt.type==="leftright"||nt.type==="text","forward");if(Ce){if(Ce.mode==="text"){let nt=Ce;for(;nt&&nt.mode==="text";)nt=nt.rightSibling;return bs(a,[(E=Ce.leftSibling)!=null?E:Ce,(ee=nt.leftSibling)!=null?ee:nt])}return bs(a,Ce)}const $e=re.parent;if($e){if($e.type==="leftright"||$e.type==="surd")return bs(a,$e);if(re.parentBranch==="superscript"&&$e.subscript)return bs(a,$e.subscript);if(re.parentBranch==="above"&&$e.below)return bs(a,$e.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return ll(a,$e);if(re.parentBranch==="above"||re.parentBranch==="below")return bs(a,$e)}return ll(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let fe=b;for(;fe&&fe.mode==="text";)fe=fe.leftSibling;let ge=b;for(;((y=ge.rightSibling)==null?void 0:y.mode)==="text";)ge=ge.rightSibling;if(fe&&ge)return bs(a,[fe,ge])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?ll(a,b):ll(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lh(a,re,"backward");if(ae)return ll(a,ae);if(E==="math"){const fe=F0(a,b,be=>be.type==="leftright"||be.type==="text","backward");if(fe){if(fe.mode==="text"){let be=fe;for(;be&&be.mode==="text";)be=be.leftSibling;return bs(a,[fe,be])}return bs(a,fe)}const ge=b.parent;if(ge){if(ge.type==="leftright"||ge.type==="surd")return bs(a,ge);if(b.parentBranch==="subscript"&&ge.superscript)return bs(a,ge.superscript);if(b.parentBranch==="below"&&ge.above)return bs(a,ge.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return ll(a,ge);if(b.parentBranch==="above"||b.parentBranch==="below")return bs(a,ge)}return ll(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:B0,moveToSubscript:$0},{target:"model",changeSelection:!0}),Ls({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function F0(a,y,b,E){if(E==="forward"){let re=y.rightSibling;for(;re&&!b(re);)re=re.rightSibling;return re}let ee=y.leftSibling;for(;ee&&!b(ee);)ee=ee.leftSibling;return ee}function Hf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=y===0||ae===void 0||ae.type==="first"||ae.mode!=="math"||!(ae.type&&/mord|mpunct|operator/.test(ae.type)||ae.type==="mop"&&/[a-zA-Z ]+/.test(ae.value))||!ae.hasEmptyBranch("superscript")||!ae.hasEmptyBranch("subscript")||typeof b=="function"&&!b(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Zc(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=y===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof b=="function"&&!b(ae),ee||(re.push(Un.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ka(re),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Zg(a){let y="",b=a.position,E=!1;for(;!E;){const ee=a.at(b);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(y=ee.value+y),b-=1}return y}function Ug(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Sf(b))return!1;const ee=Lu(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Zg(E)+ee;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Zc(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:fe}=E.at(E.position);if(ae&&fe instanceof Xa&&fe.leftDelim===ae)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(re))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(ee))return!0;if(/(^|[^a-zA-Z'])[a-zA-Z] $/.test(re))return Zc(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Zc(E,1);const ge=E.at(E.position);return ge.value="\u22C5",ge.style.variant="normal",ge.command="\\cdot",ge.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(re)||/\.\d$/.test(re)||/\([\d+\-.]$/.test(re))return Zc(E,1),!0;if(/\([a-z][,;]$/.test(re))return Zc(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Ah(E),!0}else{if(y==="[Space]")return Hf(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Hf(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Hf(E,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(re)&&!/(αβγ)$/.test(re))return Hf(E,void 0,ae=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(ae.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function jg(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=z0(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function Vg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Mf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(ks("keystroke-caption"),ks("core"),Mf("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,y){var b,E,ee;const{model:re}=a,ae=p0(y);if(y.isTrusted){Bm(y);const xt=kd();a.keyboardLayout!==xt.id&&(a.keyboardLayout=xt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,jg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let fe,ge="",be;const Ce=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")Ce.pop();else if(!Sf(y))a.flushInlineShortcutBuffer();else{const xt=Lu(y),Tt=[...(E=(b=Ce[Ce.length-1])==null?void 0:b.keystrokes)!=null?E:[],xt];Ce.push({state:re.getState(),keystrokes:Tt,leftSiblings:Xg(a)});let Tn=0,Sr="";for(;!fe&&Tn<Tt.length;)be=Ce.length-(Tt.length-Tn),Sr=Tt.slice(Tn).join(""),fe=dd(Ce[be].leftSiblings,Sr,a.options.inlineShortcuts),!fe&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Sr)&&(fe=a.options.onInlineShortcut(a,Sr)),Tn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(fe?a.switchMode("math"):Ug(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),ge=""))}if(!fe){if(ge||(ge=Zm(a.keybindings,re.mode,y)),!ge&&(ae==="[Enter]"||ae==="[Return]")){let xt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(xt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),xt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),xt}if((!ge||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return ra.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),ge="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const xt=re.at(re.position+1),Tt=re.at(re.position-1);if((xt==null?void 0:xt.mode)==="text"||(Tt==null?void 0:Tt.mode)==="text")return ra.insert(re," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ee=re.at(re.position))!=null&&ee.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Lu(y)===","&&(ge="insertDecimalSeparator")}}if(!fe&&!ge){if(re.mathfield.smartFence){if(Ih(re,Lu(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:xt}=re.at(re.position);if(xt instanceof Xa&&xt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),xt.isDirty=!0,xt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Lu(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const Tt=Lu(y);if(Tt==="("||Tt==="{"||Tt==="["){const Tn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Tt],Sr={"(":")","{":"\\rbrace","[":"\\rbrack"}[Tt],[_n,tr]=Xo(re.selection);return a.snapshot(),re.position=tr,ra.insert(re,Sr,{format:"latex"}),re.position=_n,ra.insert(re,Tn,{format:"latex"}),re.setSelection(_n+1,tr+1),re.contentDidChange({data:Tt,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const $e=re.at(Math.max(re.position,re.anchor)),{parent:nt}=$e;if(ge==="moveAfterParent"&&(nt==null?void 0:nt.type)==="leftright"&&$e.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(ge="",Mo(a)),a.keyboardDelegate.cancelComposition(),ge)a.executeCommand(ge);else if(fe){const xt=a.effectiveStyle;re.setState(Ce[be].state);const Tt=Ce[Ce.length-1].keystrokes;for(const Tn of Tt)ra.insert(re,Tn,{silenceNotifications:!0,style:xt});a.snapshot("insert-shortcut"),re.setState(Ce[be].state),re.deferNotifications({content:!0,selection:!0,data:fe,type:"insertText"},()=>(ra.insert(re,fe,{format:"latex",style:xt}),Ah(a.model),fe.endsWith(" ")&&(a.switchMode("text"),ra.insert(re," ",{style:xt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ee=rf(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(ge=>ge.toUpperCase())),b.simulateKeystroke){let ge=!0;for(const be of ee)K0(a,new KeyboardEvent("keypress",{key:be}))&&(ge=!1);if(ge)return}const ae=E.at(E.position),fe=Se(Se({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Xo(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Ef(a);for(const ge of ee)ra.insert(E,ge);a.snapshot("insert-latex"),Ad(a)});else if(E.mode==="text"){for(const ge of ee)ra.insert(E,ge,{style:fe});a.snapshot("insert-text")}else if(E.mode==="math")for(const ge of ee)Yg(a,ge,fe,ae);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function Yg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){qg(ee),ra.insert(ee,y,{style:b}),a.snapshot(),R0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const ae=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(ae==null?void 0:ae.type)==="mord"&&/[a-zA-Z0-9]/.test(ae.value)&&(b=Se({},b),ae.style.variant&&(b.variant=ae.style.variant),ae.style.variantStyle&&(b.variantStyle=ae.style.variantStyle))}ra.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function qg(a){a.selectionIsCollapsed||(a.deleteAtoms(Xo(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const ae=te[re],fe=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[ge,be]=Xo(a.selection),Ce=a.extractAtoms([ge,be]),$e=ee.addChildrenAfter([new Xa("left...right",Ce,{leftDelim:re,rightDelim:fe})],a.at(ge));return a.setSelection(a.offsetOf($e.firstChild),a.offsetOf($e.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const ge=ee instanceof Xa?ee.leftDelim+ee.rightDelim:"";if(ge==="\\lbrace\\rbrace"||ge==="\\{\\}"||ge==="\\lbrace?")return a.mathfield.snapshot(),ra.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(fe){if(ee instanceof Xa&&ee.firstChild===E&&(ee.leftDelim==="?"||ee.leftDelim==="."))return ee.leftDelim=re,ee.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ee instanceof Xa)){let $e=E;for(;$e&&!($e.type==="mclose"&&$e.value===fe);)$e=$e.rightSibling;if($e){a.mathfield.snapshot();const nt=a.extractAtoms([a.offsetOf(E),a.offsetOf($e)]);return nt.pop(),ee.addChildrenAfter([new Xa("left...right",nt,{leftDelim:re,rightDelim:fe})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const ge=a.offsetOf(E.lastSibling);let be;for(be=a.position;be<=ge;be++){const $e=a.at(be);if($e instanceof Xa&&($e.leftDelim==="?"||$e.leftDelim===".")&&H0(re,$e.rightDelim))break}const Ce=a.at(be);if(be<=ge&&Ce instanceof Xa){Ce.leftDelim=re,a.mathfield.snapshot();let $e=a.extractAtoms([a.position,be-1]);return $e=$e.filter(nt=>nt.type!=="first"),Ce.addChildren($e,Ce.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Xa&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const $e=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const nt of $e)ee.parent.addChildBefore(nt,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Xa&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),ra.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const $e=a.offsetOf(E.lastSibling),nt=a.extractAtoms([a.position,$e]);a.at(a.position).body=nt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let ge=E;for(;ge;){if(ge.type==="mopen"&&ge.value===ae){a.mathfield.snapshot();const xt=ge.leftSibling,Tt=a.extractAtoms([a.offsetOf(ge.leftSibling),a.offsetOf(E)]);Tt.shift();const Tn=new Xa("left...right",Tt,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([Tn],xt),a.position=a.offsetOf(Tn),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}ge=ge.leftSibling}if(ee instanceof Xa&&E.isLastSibling&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const be=a.offsetOf(E.firstSibling);let Ce;for(Ce=a.position;Ce>=be;Ce--){const xt=a.at(Ce);if(xt instanceof Xa&&(xt.rightDelim==="?"||xt.rightDelim===".")&&Dh(xt.leftDelim,re))break}const $e=a.at(Ce);if(Ce>=be&&$e instanceof Xa)return a.mathfield.snapshot(),$e.rightDelim=re,$e.addChildren(a.extractAtoms([Ce,a.position]),$e.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Xa&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const nt=ee.parent;return nt instanceof Xa&&(nt.rightDelim==="?"||nt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(nt),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function H0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ls({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:Vg,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{const E=a.getPrompts();let ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re=0;for(;E.includes(ee)&&re<100;){if(re===99)return console.error("could not find a unique ID after 100 tries"),!1;ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re++}return a.insert(`\\placeholder[${y!=null?y:ee}]{}`,b),!0}}),Ls({copyToClipboard:a=>(a.focus(),a.model.selectionIsCollapsed&&a.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Ls({cutToClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(y=>{y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(y,{mode:a.model.mode})&&(Ad(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Mo(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Ph(a,y),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&b.fontSeries===a.defaultStyle.fontSeries&&(b.fontSeries="auto"),b.fontShape&&b.fontShape===a.defaultStyle.fontShape&&(b.fontShape="auto"),b.color&&b.color===a.defaultStyle.color&&(b.color="none"),b.backgroundColor&&b.backgroundColor===a.defaultStyle.backgroundColor&&(b.backgroundColor="none"),b.fontSize&&b.fontSize===a.defaultStyle.fontSize&&(b.fontSize="auto"),a.defaultStyle=Se(Se({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Mh(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ls({applyStyle:Jg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,ae,fe,ge,be,Ce,$e;const nt={};if(typeof y.color=="string"){const Tt=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";Tt!==y.color&&(nt.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),nt.color=Tt}if(typeof y.backgroundColor=="string"){const Tt=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";Tt!==y.backgroundColor&&(nt.verbatimBackgroundColor=(fe=y.verbatimBackgroundColor)!=null?fe:y.backgroundColor),nt.backgroundColor=Tt}typeof y.fontFamily=="string"&&(nt.fontFamily=y.fontFamily),typeof y.series=="string"&&(nt.fontSeries=y.series),typeof y.fontSeries=="string"&&(nt.fontSeries=y.fontSeries.toLowerCase()),nt.fontSeries&&(nt.fontSeries=(ge={bold:"b",medium:"m",normal:"m"}[nt.fontSeries])!=null?ge:nt.fontSeries),typeof y.shape=="string"&&(nt.fontShape=y.shape),typeof y.fontShape=="string"&&(nt.fontShape=y.fontShape.toLowerCase()),nt.fontShape&&(nt.fontShape=(be={italic:"it",up:"n",upright:"n",normal:"n"}[nt.fontShape])!=null?be:nt.fontShape),y.variant&&(nt.variant=y.variant.toLowerCase()),y.variantStyle&&(nt.variantStyle=y.variantStyle.toLowerCase());const xt=(Ce=y.size)!=null?Ce:y.fontSize;return typeof xt=="number"?nt.fontSize=Math.max(1,Math.min(10,xt)):typeof xt=="string"&&(nt.fontSize=($e={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[xt.toLowerCase()])!=null?$e:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[xt]),nt}function Oh(a){let[y,b]=Xo(a.selection);if(y=W0(a,y,"backward"),b=W0(a,b,"forward"),y===b){const E=a.at(y);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,b);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(y-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(y-1,b)}else a.setSelection(y,b);return!0}function W0(a,y,b){var E,ee,re;let ae=a.at(y);if(!ae)return y;const fe=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!he.test(ae.value));)y+=fe,ae=a.at(y);return b==="backward"?y-1:y}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(b==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)y+=fe,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=fe,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=fe,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=fe,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+fe))!=null&&E.isDigit();)y+=fe;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let ge=(ee=a.at(y))==null?void 0:ee.style;for(;ge&&ge.variant===ae.style.variant&&ge.variantStyle===ae.style.variantStyle;)ge=(re=a.at(y+fe))==null?void 0:re.style,y+=fe;return b==="backward"?y-1:y}return y}return y}Ls({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Cl(a,"forward",{extend:!0}),extendSelectionBackward:a=>Cl(a,"backward",{extend:!0}),extendToNextWord:a=>Ou(a,"forward",{extend:!0}),extendToPreviousWord:a=>Ou(a,"backward",{extend:!0}),extendSelectionUpward:a=>Cl(a,"upward",{extend:!0}),extendSelectionDownward:a=>Cl(a,"downward",{extend:!0}),extendToNextBoundary:a=>Ou(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Ou(a,"backward",{extend:!0}),extendToGroupStart:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return y||a.announce("plonk"),y},extendToGroupEnd:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return y||a.announce("plonk"),y},extendToMathFieldStart:a=>{const y=a.setSelection(a.anchor,0);return y||a.announce("plonk"),y},extendToMathFieldEnd:a=>{const y=a.setSelection(a.anchor,a.lastOffset);return y||a.announce("plonk"),y}},{target:"model",changeSelection:!0});var Uc=null,Nd=0,Wf=class Ys{static start(y,b,E,ee){var re;Ys.element=y,(re=Ys.controller)==null||re.abort(),Ys.controller=new AbortController;const ae={signal:Ys.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Nh(b)&&(Ys.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var y;(y=Ys.controller)==null||y.abort(),Ys.controller=void 0,typeof Ys.pointerId=="number"&&(Ys.element.releasePointerCapture(Ys.pointerId),Ys.pointerId=void 0)}};function Nh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Z0(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,fe="none",ge=!1,be=!1;const Ce=y.clientX,$e=y.clientY,nt=Date.now(),xt=E.field,Tt=setInterval(()=>{ge?xt.scroll({top:0,left:xt.scrollLeft-16}):be&&xt.scroll({top:0,left:xt.scrollLeft+16})},32);function Tn(){Wf.stop(),re=!1,clearInterval(Tt),a.element.classList.remove("tracking"),y&&y.preventDefault()}function Sr(tr){if(!E.hasFocus()){Tn();return}const kr=tr.clientX,cr=tr.clientY,si=Nh(tr)&&tr.pointerType==="touch"?20:5;if(Date.now()<nt+500&&Math.abs(Ce-kr)<si&&Math.abs($e-cr)<si){tr.preventDefault(),tr.stopPropagation();return}const Ti=xt.getBoundingClientRect();be=kr>Ti.right,ge=kr<Ti.left;let bi=ee;Nh(tr)&&(tr.isPrimary||(bi=Rd(E,tr.clientX,tr.clientY,{bias:0})));const Fa=Rd(E,kr,cr,{bias:kr<=Ce?kr===Ce?0:-1:1});bi>=0&&Fa>=0&&(E.model.extendSelectionTo(bi,Fa),Mo(a)),ae&&Oh(E.model)}Uc&&Math.abs(Uc.x-Ce)<5&&Math.abs(Uc.y-$e)<5&&Date.now()<Uc.time+500?(Nd+=1,Uc.time=nt):(Uc={x:Ce,y:$e,time:nt},Nd=1);const _n=xt.getBoundingClientRect();if(Ce>=_n.left&&Ce<=_n.right&&$e>=_n.top&&$e<=_n.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Rd(a,Ce,$e,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const tr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||tr?fe="all":fe="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),fe="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),fe="selection"):(a.model.position=ee,v0(a.model)?fe="all":fe="selection");a.defaultStyle={},y.detail===3||Nd>2?(Tn(),(y.detail===3||Nd===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},fe="all")):re||(re=!0,Wf.start(xt,y,Sr,Tn),(y.detail===2||Nd===2)&&(ae=!0,Oh(a.model),fe="all"))}a.hasFocus()||(fe="none",a.focus({preventScroll:!0}))}else Uc=null;a.stopCoalescingUndo(),fe!=="none"&&(a.model.selectionIsCollapsed&&(fe="all"),Mo(a)),y.preventDefault()}function Qg(a,y,b){if(a>=b.left&&a<=b.right&&y>=b.top&&y<=b.bottom)return 0;const E=a-(b.left+b.right)/2,ee=y-(b.top+b.bottom)/2;return E*E+ee*ee}function U0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=lc(a,b);if(!re)return[1/0,null];let ae=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const fe of b.children){const ge=U0(a,y,fe,E,ee);ge[0]<=ae[0]&&(ae=ge)}return ae[1]||(ae=[Qg(E,ee,re),b]),y.set(b.id,ae),ae}function ev(a,y,b){const[,E]=U0(a,new Map,a.model.root,y,b);return E}function Rd(a,y,b,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(y>re.right||b>re.bottom+8)return a.model.lastOffset;if(y<re.left||b<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=ev(a,y,b);const fe=[];let ge=ae;for(;ge;)fe.unshift(ge),ge=ge.parent;for(const Ce of fe)if(Ce.captureSelection){ae=Ce;break}let be=a.model.offsetOf(ae);if(be<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const Ce=lc(a,ae);Ce&&y<(Ce.left+Ce.right)/2&&(be=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(be=a.model.offsetOf(ae.leftSibling));return be}var tv=class extends ra{constructor(){super("math")}onPaste(a,y){if(!y||!a.model.contentWillChange({data:typeof y=="string"?y:null,dataTransfer:typeof y=="string"?null:y,inputType:"insertFromPaste"}))return!1;let b="",E="auto",ee=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=dc(re),{model:fe}=a;fe.selectionIsCollapsed||fe.deleteAtoms(Xo(fe.selection));const ge=fe.at(fe.position);if(ge.parent instanceof ca){console.assert(ge.parentBranch!==void 0);const be=[];let Ce=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const Tt of ae)Tt.type==="first"&&Ce.length>0?(be.push(Ce),Ce=[Tt]):Ce.push(Tt);Ce.length>0&&be.push(Ce);let $e=Number(ge.parentBranch[0]),nt=Number(ge.parentBranch[1]);const xt=ge.parent.maxColumns;for(;ge.parent.colCount-nt<be.length&&ge.parent.colCount<xt;)ge.parent.addColumn();ge.parent.addChildrenAfter(be[0],ge);for(let Tt=1;Tt<be.length;Tt++)nt++,nt>=xt&&(nt=0,ge.parent.addRowAfter($e),$e++),ge.parent.setCell($e,nt,be[Tt])}else ge.parent.addChildrenAfter(ae.filter(be=>be.type!=="first"),ge);return fe.position=fe.offsetOf(ae[ae.length-1]),fe.contentDidChange({inputType:"insertFromPaste"}),Mo(a),!0}}catch(re){}if(ee=typeof y!="string"?y.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(b=re.latex),!b){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(b=ae.latex)}b||(E="latex")}catch(re){}if(!b&&typeof y!="string"&&(b=y.getData("application/x-latex"),b&&(E="latex")),b||(b=typeof y=="string"?y:y.getData("text/plain")),b){let re;return[re,b]=yl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Mo(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,ee;const re=typeof y=="string"?y:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?ee:"";if(!b.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:ae}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const fe=a.silenceNotifications;a.silenceNotifications=!0;const ge={"?":"\\placeholder{}","@":"\\placeholder{}"};ge[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Xo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward"),!a.at(a.position).isLastSibling&&a.at(a.position+1).type==="placeholder"?a.deleteAtoms([a.position,a.position+1]):a.at(a.position).type==="placeholder"&&a.deleteAtoms([a.position-1,a.position]);let be=-1;ge[0]?ge["@"]=ge[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(be=rv(a),be>=0&&(ge["@"]=a.getValue(be,a.position,"latex"))),ge[0]||(ge[0]=ge["?"]);let Ce=!1;const $e=kr=>(Ce=!0,ge[kr]);let[nt,xt]=j0(a,y,$e,b);if(!xt)return!1;const Tt=xt.length===1&&xt[0].type==="genfrac";Tt&&be>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(ge["@"]=ge["?"],Ce=!1,[nt,xt]=j0(a,y,$e,b)):be>=0&&a.deleteAtoms([be,a.position]);const{parent:Tn}=a.at(a.position),Sr=Tn.hasEmptyBranch("body");if(Tt&&nt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Tn instanceof Xa&&Tn.leftDelim==="("&&Sr){const kr=Tn.parent,cr=Tn.parentBranch;kr.removeChild(Tn),kr.setChildren(xt,cr)}const _n=a.at(a.position);_n.parent.addChildrenAfter(xt,_n),nt==="latex"&&typeof y=="string"&&(Tn==null?void 0:Tn.type)==="root"&&Sr&&!Ce&&(Tn.verbatimLatex=y),a.silenceNotifications=fe;const tr=xt[xt.length-1];if(b.selectionMode==="placeholder"){const kr=xt.flatMap(cr=>[cr,...cr.children]).find(cr=>cr.type==="placeholder");if(kr){const cr=a.offsetOf(kr);a.setSelection(cr-1,cr),a.announce("move")}else tr&&(a.position=a.offsetOf(tr))}else b.selectionMode==="before"||(b.selectionMode==="after"?tr&&(a.position=a.offsetOf(tr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(tr)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function j0(a,y,b,E){var ee;let re,ae=[];if(typeof y!="string"||E.format==="math-json"){const fe=window.MathfieldElement.computeEngine;if(!fe)return["math-json",[]];[re,y]=["latex",fe.box(y).latex],ae=qo(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Oc(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=qo(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Oc(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=yl(y)),ae=qo(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Zf(ae));return hc(ae,E.style),[re!=null?re:"latex",ae]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Xa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Zf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Xa&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;b.body[ae];ae++)b.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[y]=b.body[ee])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Zf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof ca)for(const b of y.cells)Zf(b)}}}function rv(a){let y=a.at(a.position);if(y.mode==="text"){for(;!y.isFirstSibling&&y.mode==="text";)y=y.leftSibling;return a.offsetOf(y)}const b=y;let E=!1;if(y.type==="mclose"){const ee=te[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===ee);)y=y.leftSibling;y.isFirstSibling||(y=y.leftSibling),E=!0}else y.type==="leftright"&&(y=y.leftSibling,E=!0);if(E)for(;!y.isFirstSibling&&(y.isFunction||V0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(V0(y)||ee.length>0);)y.type==="mclose"&&ee.unshift(y.value),y.type==="mopen"&&ee.length>0&&y.value===te[ee[0]]&&ee.shift(),y=y.leftSibling}return b===y?-1:a.offsetOf(y)}function V0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tv;var iv=class extends ra{constructor(){super("text")}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),Mo(a)),a.startRecording(),!0):!1}insert(a,y,b={}){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Xo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=av(y,a.mathfield.context);if(hc(re,b.style),!re)return!1;const ae=a.at(a.position),fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function av(a,y){return a=a.replace(/\\/g,"\\textbackslash "),a=a.replace(/#/g,"\\#"),a=a.replace(/\$/g,"\\$"),a=a.replace(/%/g,"\\%"),a=a.replace(/&/g,"\\&"),a=a.replace(/_/g,"\\_"),a=a.replace(/{/g,"\\textbraceleft "),a=a.replace(/}/g,"\\textbraceright "),a=a.replace(/lbrace/g,"\\textbraceleft "),a=a.replace(/rbrace/g,"\\textbraceright "),a=a.replace(/\^/g,"\\textasciicircum "),a=a.replace(/~/g,"\\textasciitilde "),a=a.replace(/£/g,"\\textsterling "),qo(a,{context:y,parseMode:"text"})}new iv;function El(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var po=4,Cs=20,Fo=2*(Cs+po),Uf=(a,y)=>`
<line x1="${a+Cs}" y1="${y+Cs}"
x2="${a>y?a+Cs:7*Cs+10*po}"
y2="${a<y?y+Cs:7*Cs+10*po}"/>
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
</svg>`,G0=(a,y)=>`
<line x1="${a+Cs}" y1="${y+Cs}"
x2="${a>y?a+Cs:7*Cs+10*po}"
y2="${a<y?y+Cs:7*Cs+10*po}"/>
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
</svg>`,jf=(a,y,b)=>`
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
<circle class="cls-2" cx="20" cy="20" r="20"/>
<g transform="rotate(${b})" transform-origin="20 20">
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
</g>
</svg>`,ov=`
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox=
"-2 -2 ${8*Cs+10*po+5} ${8*Cs+10*po+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${Fo+po}"
height="${3*Fo}"
width="${Fo}"
rx="${Fo/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${Fo+po}"
y="0"
height="${Fo}"
width="${3*Fo}"
rx="${Fo/2}"/>
<g data-command='"moveDown"'>
${jf(2*(po+Fo),2*po+3*Fo,0)}
</g>
<g data-command='"moveUp"'>
${jf(2*(po+Fo),2*po+Fo,180)}
</g>
<g data-command='"moveToNextWord"'>
${jf(2*po+3*Fo,2*(po+Fo),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${jf(2*po+Fo,2*(po+Fo),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Uf(2*po+Fo,po)}
</g>
<g data-command='"removeColumn"'>
${G0(2*po+2*Fo,po)}
</g>
<g data-command='"addColumnAfter"'>
${Uf(2*po+3*Fo,po)}
</g>
<g data-command='"addRowBefore"'>
${Uf(po,2*po+Fo)}
</g>
<g data-command='"removeRow"'>
${G0(po,2*po+2*Fo)}
</g>
<g data-command='"addRowAfter"'>
${Uf(po,2*po+3*Fo)}
</g>
</svg>`,sv=a=>`
<svg id="matrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","matrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,lv=a=>`
<svg id="pmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","pmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/></svg>`,X0=a=>`
<svg id="Bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","Bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,cv=a=>`
<svg id="bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","bmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m6,4h-3v16h3"/>
<path class="cls-2" d="m22,4h3v16h-3"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
</svg>`,uv=a=>`
<svg id="vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
</svg>`,dv=a=>`
<svg id="Vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
data-command='["setEnvironment","Vmatrix"]'>
<rect class="cls-1" width="28" height="24"/>
<circle cx="10" cy="8" r="1"/>
<circle cx="14" cy="12" r="1"/>
<circle cx="18" cy="16" r="1"/>
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
</svg>`,fv=a=>`
<svg id="cases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","cases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
<circle cx="13" cy="8" r="1"/>
<circle cx="13" cy="16" r="1"/>
<circle cx="21" cy="8" r="1"/>
<circle cx="21" cy="16" r="1"/>
</svg>`,hv=a=>`
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
data-command='["setEnvironment","rcases"]'>
<rect class="cls-1" width="28" height="24"/>
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
<circle cx="15" cy="8" r="1"/>
<circle cx="15" cy="16" r="1"/>
<circle cx="7" cy="8" r="1"/>
<circle cx="7" cy="16" r="1"/>
</svg>`,Rh={matrix:sv,pmatrix:lv,bmatrix:cv,Bmatrix:X0,vmatrix:uv,Vmatrix:dv},Bh={cases:fv,rcases:hv,Bmatrix:X0};function pv(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ee=0;E.forEach(Tt=>{(!ee||Tt.length>ee)&&(ee=Tt.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Mf("mathlive-environment-popover"),ks("environment-popover"),ks("core"),re.setAttribute("aria-hidden","true"));let ae;const fe=re.querySelector(".MLEP__environment-controls");fe?ae=fe:(ae=document.createElement("div"),re.innerHTML="",re.appendChild(ae)),ae.className="MLEP__environment-controls",ae.style.display="flex",ae.style.width="100%",ae.style.height="100%",ae.style.boxSizing="border-box",ae.innerHTML=ov;let ge=[],be="";const Ce=a.model.parentEnvironment.environmentName;if(fs(Ce)){const Tt=gv(Ce);be=Rh[Tt]("active");const Tn=Rh,{[Tt]:Sr}=Tn,_n=st(Tn,[Pe(Tt)]);ge=Object.values(_n).map(tr=>tr("inactive"))}else if(hs(Ce)){const Tt=vv(Ce);be=Bh[Tt]("active");const Tn=Bh,{[Tt]:Sr}=Tn,_n=st(Tn,[Pe(Tt)]);ge=Object.values(_n).map(tr=>tr("inactive"))}else No(Ce)&&(be=Rh.matrix("active"),ge=Object.values(Bh).map(Tt=>Tt("inactive")));const $e=document.createElement("div");$e.className="MLEP__environment-delimiter-controls",$e.style.display="flex",$e.style.flexDirection="column",$e.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${be}
${ge.join("")}
</div>`,be&&ae.appendChild($e),ae.querySelectorAll("[data-command]").forEach(Tt=>{const Tn=Tt.dataset.command;let Sr=Tn;try{Sr=JSON.parse(Tn)}catch(_n){}Tt.addEventListener("mousedown",_n=>_n.preventDefault()),Sr&&Tt.addEventListener("click",()=>a.executeCommand(Sr))});const xt=(b=a.field)==null?void 0:b.getBoundingClientRect();xt&&(re.style.top=`${window.scrollY+(xt.top-re.clientHeight-15)}px`,re.style.left=`${xt.left+20}px`,re.classList.add("is-visible"))}function $h(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Vf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&xo(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):$h()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function Y0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function q0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Fh(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="rtl"||b==="end"&&E==="ltr"||b==="top"||b==="right"?Math.max(0,a-y):a}function yv(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="ltr"||b==="end"&&E==="rtl"||b==="top"||b==="right"?a:a-y}function bv(a,y){var b,E,ee;const re=(b=Y0(a))!=null?b:"ltr";a.style.position="fixed",a.style.left="",a.style.top="",a.style.right="",a.style.bottom="",a.style.height="",a.style.width="";const ae=a.getBoundingClientRect(),fe=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let ge=Math.min(fe,(E=y.height)!=null?E:ae.height),be=Fh(y.location.y,ge,y.verticalPos,re);be+ge>window.innerHeight-8&&(y.alternateLocation?(be=Fh(y.alternateLocation.y,ge,y.verticalPos,re),be+ge>window.innerHeight-8&&(be=void 0)):be=void 0),Number.isFinite(be)||(be=Math.max(8,window.innerHeight-8-ge),8+ge>window.innerHeight-8&&(a.style.bottom="8px")),ge=Math.min(be+ge,window.innerHeight-8)-be;const Ce=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let $e=Math.min(Ce,(ee=y.width)!=null?ee:ae.width),nt=Fh(y.location.x,$e,y.horizontalPos,re);nt+$e>window.innerWidth-8&&(y.alternateLocation?(nt=yv(y.alternateLocation.x,$e,y.verticalPos,re),nt+$e>window.innerWidth-8&&(nt=void 0)):nt=void 0),Number.isFinite(nt)||(nt=Math.max(8,window.innerWidth-8-$e),8+$e>window.innerWidth-8&&(a.style.right="8px")),$e=Math.min(nt+$e,window.innerWidth-8)-nt,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-nt-$e).toString()}px`:a.style.left=`${Math.ceil(nt).toString()}px`,a.style.top=`${Math.ceil(be).toString()}px`,ge!==ae.height&&(a.style.height=`${Math.ceil(ge).toString()}px`),$e!==ae.width&&(a.style.width=`${Math.ceil($e).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Nu(a){return"submenu"in a}function Ml(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var J0={};function Hh(a){let y=J0[a];if(!y){let b;switch(a){case"checkmark":b=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
</span>`;break;case"trailing-chevron":b='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":b='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(b){const E=document.createElement("template");E.innerHTML=b,J0[a]=E,y=E}}if(y){if("content"in y)return y.content.cloneNode(!0);const b=document.createElement("svg");return b.innerHTML=y.innerHTML,b}}var Q0=80,ep=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,Nu(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=Ml(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ml(ee)&&(this.checked=Ml(ee)&&((y=Ru(ee.checked,a))!=null?y:!1)),(Ml(ee)||Nu(ee))&&(this.enabled=(b=Ru(ee.enabled,a))!=null?b:!0,this.visible=(E=Ru(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Ml(ee)||Kh(ee)||Nu(ee))&&(this.label=Ru(ee.label,a),this.tooltip=Ru(ee.tooltip,a),this.ariaLabel=Ru(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),Ml(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(Ml(this._declaration)||Kh(this._declaration)||Nu(this._declaration))&&this._declaration.class&&(a.className=this._declaration.class),a.setAttribute("part","menu-item"),a.setAttribute("tabindex","-1"),this.hasCheck?a.setAttribute("role","menuitemcheckbox"):a.setAttribute("role","menuitem"),this.type==="submenu"&&(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"));const y=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:y}),a.addEventListener("pointerleave",this,{signal:y}),a.addEventListener("pointerup",this,{signal:y}),a.addEventListener("click",this,{signal:y}),this._element}dispatchSelect(){if(!Ml(this._declaration))return;const a=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(a)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(a){var y;if(!(!this.visible||!this.enabled)){if(a.type==="click"){this.rootMenu.state==="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}if(a.type==="pointerenter"){const b=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((y=this.parentMenu.activeMenuItem)!=null&&y.movingTowardSubmenu(b))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(a.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(a.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Q0)},Q0)}openSubmenu(a){var y;if(this.type!=="submenu"||!this.element)return;if((y=a==null?void 0:a.withDelay)!=null&&y){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const b=this.element.getBoundingClientRect(),E=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:q0(b,"trailing",E),y:b.top-4},alternateLocation:{x:q0(b,"leading",E),y:b.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const y=this.rootMenu.lastMoveEvent;if(!y)return!1;const b=a.timeStamp-y.timeStamp;if(b>500)return!1;const E=a.clientX-y.clientX;if(wv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),fe=this.element.getBoundingClientRect();ae.left<fe.left+fe.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function Ru(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var tp=class Zu{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(ee=b==null?void 0:b.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=y}get children(){return this._menuItems}set menuItems(y){const b=this.parentMenu;this.dispose(),this.parentMenu=b,y=[...y],this._menuItems=y.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var y;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(y=this._menuItems)==null||y.forEach(b=>b.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(y){if(y.type==="wheel"&&this._element){const b=y;this._element.scrollBy(0,b.deltaY),y.stopPropagation()}}dispatchEvent(y){return this.rootMenu.dispatchEvent(y)}get rootMenu(){return this.parentMenu.rootMenu}updateState(y){var b,E,ee;this._menuItems.forEach(be=>be.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(be=>be.visible&&be.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(be=>be.updateState(y));let ae,fe=0;for(const be of this._menuItems)be.type==="heading"?(ae&&fe===0&&(ae.visible=!1),ae=be,fe=0):be.type==="divider"&&ae?(ae.visible=fe>0,ae=void 0,fe=0):ae&&be.visible&&(fe+=1);ae&&(ae.visible=fe>0);let ge=!0;for(const be of this._menuItems)be.type==="divider"?(be.visible=!ge,ge=!0):be.visible&&(ge=!1);(b=this.activeMenuItem)!=null&&b.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((ee=this.activeMenuItem)==null?void 0:ee.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible&&y.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible)}set dirty(y){console.assert(y===!0),this._dirty!==y&&y&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var y;if(this._element){this._element.textContent="";for(const{element:b,visible:E}of this._menuItems)b&&E&&this._element.append(b);(y=this._element.querySelector("li:first-of-type"))==null||y.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const y=document.createElement("menu");y.setAttribute("role","menu"),y.setAttribute("tabindex","-1"),y.setAttribute("aria-orientation","vertical"),y.setAttribute("part","ui-menu-container"),this._submenuClass&&y.classList.add(this._submenuClass),y.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const b=this._abortController.signal;return y.addEventListener("focus",this,{signal:b}),y.addEventListener("wheel",this,{passive:!0,signal:b}),this._element=y,this.updateElement(),y}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(y){var b,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(b=ae.submenu)==null||b.hide()}if(!((E=y==null?void 0:y.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=y,y&&(y.active=!0)}y?(ee=y.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const ee=E[y];b=ee.type!=="divider"&&ee.visible&&ee.enabled,y+=1}return b?E[y-1]:null}get lastMenuItem(){this.updateIfDirty();const y=this._menuItems;let b=y.length-1,E=!1;for(;!E&&b>=0;){const ee=y[b];E=ee.type!=="divider"&&ee.visible&&ee.enabled,b-=1}return E?y[b+1]:null}nextMenuItem(y){if(y===0)return this._activeMenuItem;if(!this._activeMenuItem)return y>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const b=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=b&&ee<=E;){ee+=y>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(y))return this._menuItems[ee];re+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return Zu._collator||(Zu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Zu._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(fe=>fe.type!=="divider"&&fe.visible&&fe.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(fe=>fe.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(fe=>Zu.collator.compare(y,fe.label.substring(ae,y.length))===0))!=null?b:null,ae++;return re}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),jt()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bv(this.element,{location:y.location,alternateLocation:y.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var y,b,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),jt()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(y){var b,E,ee,re;const ae=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",ae.toString())),(re=(ee=this.activeMenuItem)==null?void 0:ee.element)==null||re.classList.toggle("is-submenu-open",ae),this.isSubmenuOpen=ae}},np=class rm extends tp{constructor(y,b){var E;super(y),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=b==null?void 0:b.host)!=null?E:null,this.isDynamic=y.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(y){zm(this._modifiers,y)||(this._modifiers=y,this.dirty=!0)}get activeSubmenu(){let y=this;for(;y.isSubmenuOpen;)y=y.activeMenuItem.submenu;return y}set dirty(y){this._updating||(console.assert(y===!0),this._dirty!==y&&(this._dirty=!0,y&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(y){this._updating=!0,this.modifiers=y!=null?y:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(y){this.isDynamic&&(this.modifiers=Bc(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Bc(y));let re=!0;const ae=this.activeSubmenu,fe=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":fe==null||fe.select(Bc(y));break;case"ArrowRight":if((fe==null?void 0:fe.type)==="submenu")fe.select(Bc(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!fe)ae.activeMenuItem=ae.firstMenuItem;else{const ge=(b=ae.getMenuItemColumn(fe))!=null?b:-1;if(ge>=0&&ge<((E=ae.columnCount)!=null?E:1)-1){const be=ae.nextMenuItem(1);be&&(ae.activeMenuItem=be)}}break;case"ArrowLeft":if(ae===this.rootMenu)fe||(ae.activeMenuItem=ae.firstMenuItem);else if((fe&&(ee=ae.getMenuItemColumn(fe))!=null?ee:-1)<=0||!fe){ae.hide();const be=ae.parentMenu.activeMenuItem;if(be){const{element:Ce}=be;Ce==null||Ce.focus(),Ce==null||Ce.classList.remove("is-submenu-open")}}else{const be=ae.nextMenuItem(-1);be&&(ae.activeMenuItem=be)}break;case"ArrowDown":ae.activeMenuItem=ae.nextMenuItem(ae.columnCount);break;case"ArrowUp":ae.activeMenuItem=ae.nextMenuItem(-ae.columnCount);break;case"Home":case"PageUp":ae.activeMenuItem=ae.firstMenuItem;break;case"End":case"PageDown":ae.activeMenuItem=ae.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Sf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(y.preventDefault(),y.stopPropagation())}handleEvent(y){if(y.type==="keydown")this.handleKeydownEvent(y);else if(y.type==="keyup")this.handleKeyupEvent(y);else if(y.type==="pointermove")this.lastMoveEvent=y;else if(y.type==="pointerup"&&y.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(y.type==="contextmenu"){y.preventDefault(),y.stopPropagation();return}super.handleEvent(y)}dispatchEvent(y){return this._host?this._host.dispatchEvent(y):!0}get scrim(){return wl.element}connectScrim(y){const b=this.scrim;b.addEventListener("pointerup",this),b.addEventListener("contextmenu",this),b.addEventListener("keydown",this),b.addEventListener("keyup",this),b.addEventListener("pointermove",this),wl.open({root:y,onDismiss:()=>this.hide()})}disconnectScrim(){const y=this.scrim;y.removeEventListener("pointerup",this),y.removeEventListener("contextmenu",this),y.removeEventListener("keydown",this),y.removeEventListener("keyup",this),y.removeEventListener("pointermove",this),wl.state==="open"&&wl.scrim.close()}get rootMenu(){return this}show(y){return this._onDismiss=y==null?void 0:y.onDismiss,y!=null&&y.modifiers&&(this.modifiers=y.modifiers),this.updateState(),this.connectScrim(y==null?void 0:y.target),super.show(me(Se({},y),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,wl.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(y){this.cancelDelayedOperation();const b=rm.SUBMENU_DELAY;if(b<=0){y();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,y()},b)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var Sv=np;function rp(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Ml(a)||Nu(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Ml(a)&&typeof a.checked=="function"?!0:Nu(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=wf(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,fe=ae.signal;for(const ge of["pointermove","pointerup","pointercancel"])window.addEventListener(ge,be=>{if(be.type==="pointerup"||be.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(be.type==="pointermove"){const Ce=wf(be);Ce&&(ee=Ce)}},{passive:!0,signal:fe})})}function ip(a,y,b){return gc(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:wf(E),modifiers:Bc(E)}))return a.preventDefault(),a.stopPropagation(),!0}if(a.type==="keydown"){const E=a;if(E.code==="ContextMenu"||E.code==="F10"&&E.shiftKey){const ee=y==null?void 0:y.getBoundingClientRect();if(ee&&b.show({target:y,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:Bc(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&y!==E;)E=E.parentNode;if(!E||!b.visible)return!1;const ee=wf(a);if(yield Cv(a))return b.state!=="closed"?!1:(b.show({target:y,location:ee}),!0)}return!1})}var ap={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Ut(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(me(Se({},a),{body:ft(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Ut(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=Gt(ft(a.args[0]));return new z(me(Se({},a),{body:ft(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Ut(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(me(Se({},a),{body:ft(a.args[0]),svgAccent:"overarc"}))}),Ut(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Vs(me(Se({},a),{body:ft(a.args[0]),svgBelow:"underarc"}))}),Ut("utilde","{body:auto}",{createAtom:a=>{const y=ft(a.args[0]),b=Gt(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Vs(me(Se({},a),{body:y,svgBelow:E,boxType:rc(y)}))}}),Ut("^","{:string}",{createAtom:a=>{var y;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?y:"^"}))}}),Ut("`","{:string}",{createAtom:a=>{var y;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?y:"`"}))}}),Ut("'","{:string}",{createAtom:a=>{var y;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?y:"'"}))}}),Ut('"',"{:string}",{createAtom:a=>{var y,b;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?b:'"'+a.args[0]:'"'}))}}),Ut(".","{:string}",{createAtom:a=>{var y,b;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?b:"."+a.args[0]:"."}))}}),Ut("=","{:string}",{createAtom:a=>{var y,b;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?b:"="+a.args[0]:"="}))}}),Ut("~","{:string}",{createAtom:a=>{var y;return new Un(me(Se({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?y:"\xB4"}))}}),Ut("c","{:string}",{createAtom:a=>{var y;return new Un(me(Se({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Ut("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(y=a.style)!=null?y:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const fe of ae){const ge=fe.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(ge)ee.strokeWidth=ge[1],ee.strokeStyle=ge[2],ee.strokeColor=ge[3];else{const be=fe.match(/\s*([a-z]*)\s*=\s*"(.*)"/);be&&(be[1]==="mathbackground"?ee.backgroundcolor=be[2]:be[1]==="mathcolor"?ee.strokeColor=be[2]:be[1]==="padding"?ee.padding=be[2]:be[1]==="shadow"&&(ee.shadow=be[2]))}}ee.strokeStyle==="dashed"?ee.svgStrokeStyle="5,5":ee.strokeStyle==="dotted"&&(ee.svgStrokeStyle="1,5")}ee.borderStyle=`${ee.strokeWidth} ${ee.strokeStyle} ${ee.strokeColor}`;const re={};return((b=E[0])!=null?b:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new bd(a.command,ft(E[2]),re,ee)}}),Ut("cancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Ut("bcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Ut("xcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,ft(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Ut(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Vs(me(Se({},a),{body:ft((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Ut("overbrace","{:auto}",{createAtom:a=>new Vs(me(Se({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Ut(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Vs(me(Se({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Ut(["underbrace"],"{:auto}",{createAtom:a=>new Vs(me(Se({},a),{body:ft(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Ut(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:a=>{var y,b,E,ee,re;return new Vs(me(Se({},a),{svgBody:a.command.slice(1),above:((b=ft((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:ft((E=a.args)==null?void 0:E[1]),below:(re=ft((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,y)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(y)}]`)+`{${a.aboveToLatex(y)}}${a.supsubToLatex(y)}`}),Ut(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:a=>new Rc(a.command.slice(1),me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Ut(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Rc({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],me(Se({},a),{limits:"over-under",variant:"main"}))}),Ut(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Rc(a.command.slice(1),me(Se({},a),{limits:"over-under",variant:"main"}))}),Ut(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Rc(a.command.slice(1),me(Se({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Ut(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\ang{${a.bodyToLatex(y)}}`,render:(a,y)=>{const b=a.createBox(y),E=b.caret;b.caret=void 0;const ee=new Er("\xB0",{style:me(Se({},a.style),{variant:"normal",variantStyle:"up"})});return new Er([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Ut("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(me(Se({},a),{body:ft(a.args[1]),index:a.args[0]?ft(a.args[0]):void 0}))}),Ut(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=Se({},a),b=a.command,E=a.args;switch(b){case"\\dfrac":case"\\frac":case"\\tfrac":y.hasBarLine=!0;break;case"\\atopfrac":y.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":y.hasBarLine=!1,y.leftDelim="(",y.rightDelim=")";break;case"\\cfrac":y.hasBarLine=!0,y.continuousFraction=!0;break;default:}switch(b){case"\\dfrac":case"\\dbinom":y.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":y.mathstyleName="textstyle";break;default:}return new _u(E[0]?ft(E[0]):[new Oi],E[1]?ft(E[1]):[new Oi],y)},serialize:(a,y)=>{const b=a.aboveToLatex(y),E=a.belowToLatex(y);return/^[0-9]$/.test(b)&&/^[0-9]$/.test(E)?`${a.command}${b}${E}`:ho(a.command,b,E)}}),Ut(["brace","brack"],"",{infix:!0,createAtom:a=>new _u(ft(a.args[0]),ft(a.args[1]),me(Se({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ka([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Ut(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new _u(ft(E[0]),ft(E[1]),me(Se({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ka([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Ut(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var y,b;const E=a.args;return new _u(ft(E[0]),ft(E[1]),me(Se({},a),{leftDelim:(y=E[2])!=null?y:".",rightDelim:(b=E[3])!=null?b:".",hasBarLine:!1}))},serialize:(a,y)=>`${a.aboveToLatex(y)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(y)}`}),Ut("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new _u(ft(a.args[0]),ft(a.args[1]),me(Se({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Ut(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new fh({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[a.command.slice(1)],me(Se({},a),{limits:"auto",variant:"main"}))}),Ut("smallint","",{ifMode:"math",createAtom:a=>new Rc("\u222B",me(Se({},a),{limits:"adjacent",variant:"main"}))});var op={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};Ut(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,me(Se({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Ut(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Rc({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],me(Se({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Ut("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(me(Se({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Ut("the","{:value}",{createAtom:a=>new Un(me(Se({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new Na({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Er(((b=Oo(re))!=null?b:"").split("").map(ae=>new Er(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:Se({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ee}).wrap(E)},serialize:a=>{var y;return`\\the${(y=Oo(a.args[0]))!=null?y:"\\relax"}`}}),Ut("mathtip","{:auto}{:math}",{createAtom:a=>new hh(me(Se({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Un.serialize([a.tooltip],me(Se({},y),{defaultMode:"math"}))}}`}),Ut("texttip","{:auto}{:text}",{createAtom:a=>new hh(me(Se({},a),{body:ft(a.args[0]),tooltip:ft(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Un.serialize([a.tooltip],me(Se({},y),{defaultMode:"text"}))}}`}),Ut("error","{:math}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Ut("ensuremath","{:math}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(me(Se({},y),{defaultMode:"math"}))}}`}),Ut("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Oo(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Ut("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Oo(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Ut("boxed","{content:math}",{createAtom:a=>new Ao(me(Se({},a),{body:ft(a.args[0]),framecolor:{string:"black"}}))}),Ut("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Oo(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Ut("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new Ao(me(Se({},a),{body:ft(a.args[2]),framecolor:(y=a.args[0])!=null?y:{string:"blue"},backgroundcolor:(b=a.args[1])!=null?b:{string:"yellow"}}))},serialize:(a,y)=>{var b,E;return y.skipStyles?a.bodyToLatex(me(Se({},y),{defaultMode:"text"})):ho(a.command,(b=Oo(a.framecolor))!=null?b:"",(E=Oo(a.backgroundcolor))!=null?E:"",a.bodyToLatex(me(Se({},y),{defaultMode:"text"})))}}),Ut("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=ft(a.args[1]);return b?new Ao(me(Se({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new Ao(me(Se({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((b=Oo(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Oo(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return ho(ee,a.bodyToLatex(y))}}),Ut(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=new Na({parent:y,mathstyle:a.command.slice(1)},a.style),E=Un.createBox(b,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(y,E)},serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{${ka([a.command,a.bodyToLatex(y)])}}`}),Ut(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:a=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[a]})}),Ut("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Ut("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Ut("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Ut("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Ut("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Ut(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Ut("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Ut("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Ut("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Ut("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Ut("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Ut("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Ut("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Ut("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Ut("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Ut("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Ut("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Ut("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Ut("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Ut("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Ut("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Ut("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Ut("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Ut("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Ut("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Ut("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Ut("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Ut("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Ut("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Ut("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Ut("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Ut("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Ut("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Ut(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Ut(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Ut("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Ut("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Ut("mbox","{:text}",{ifMode:"math",createAtom:a=>new Un(me(Se({},a),{type:"mord",body:ft(a.args[0]),mode:"math"})),serialize:(a,y)=>ho("\\mbox",a.bodyToLatex(me(Se({},y),{defaultMode:"text"})))}),Ut("text","{:text}",{ifMode:"math",applyMode:"text"}),Ut(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[1])})),serialize:(a,y)=>!a.args[0]||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`,render:(a,y)=>{var b;return a.createBox(y,{classes:(b=a.args[0])!=null?b:""})}}),Ut(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.cssId=(b=a.args[0])!=null?b:"",E}}),Ut("htmlData","{data:string}{content:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlData=(b=a.args[0])!=null?b:"",E}}),Ut(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlStyle=(b=a.args[0])!=null?b:"",E}}),Ut("em","{:rest}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{\\em ${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})}),Ut("emph","{:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[1])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\emph{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})});var sp={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};Ut(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new i0(me(Se({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Ut(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Ut(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(Se({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Ut("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Un(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Ic||E===ml)&&(b=1),(E===zl||E===cs)&&(b=2),(E===_s||E===Go)&&(b=3);const ee=ft(a.args[b]);return Un.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Un.serialize(a.args[0],y)}}{${Un.serialize(a.args[1],y)}}{${Un.serialize(a.args[2],y)}}{${Un.serialize(a.args[3],y)}}`}),Ut("mathop","{:auto}",{createAtom:a=>new Un(me(Se({},a),{type:"mop",body:ft(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Un.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Er(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[ho(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ka(b)}}),Ut(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Un(me(Se({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:ft(a.args[0])}))}),Ut(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=ft(a.args[0]).map(b=>{var E;return b.type!=="first"&&(b.type="mord",b.value=(E={"\u2217":"*","\u2212":"-"}[b.value])!=null?E:b.value,b.isFunction=!1,!b.style.variant&&!b.style.variantStyle&&(b.style.variant="main",b.style.variantStyle="up")),b});return new Un(me(Se({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Un.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Er(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[ho(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ka(b)}}),Ut(["char","unicode"],"{charcode:value}",{createAtom:a=>new Un(me(Se({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Oo((y=a.args[0])!=null?y:{number:10067,base:"hexadecimal"})}`},render:(a,y)=>{let b=y.evaluate(a.args[0]);return(!b||!("number"in b))&&(b={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(b.number),a.createBox(y)}}),Ut("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Un(a),render:(a,y)=>{var b,E,ee;const re=new Na({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),fe=re.toEm((E=a.args[1])!=null?E:{dimension:10}),ge=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),be=new Er(null,{classes:"rule",type:"ord"});return be.width=fe,be.height=ge+ae,be.depth=-ae,be.setStyle("border-right-width",fe,"em"),be.setStyle("border-top-width",ge,"em"),be.setStyle("border-color",a.style.color),be.setStyle("vertical-align",ae,"em"),a.isSelected&&be.setStyle("opacity","50%"),a.bind(re,be),a.caret&&(be.caret=a.caret),be.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Oo(a.args[0])}]`:""}{${Oo(a.args[1])}}{${Oo(a.args[2])}}`}),Ut(["overline","underline"],"{:auto}",{createAtom:a=>new Un(me(Se({},a),{body:ft(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new Na({parent:y,mathstyle:"cramp"},a.style),ee=Un.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new Er(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let fe;return b==="overline"?fe=new ao({shift:0,children:[{box:ee},3*re,{box:ae},re]}):fe=new ao({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(fe.caret=a.caret),new Er(fe,{classes:b,type:"ignore"})}}),Ut("overset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Vs(me(Se({},a),{above:ft(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>ho(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Ut("underset","{:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[1]);return new Vs(me(Se({},a),{below:ft(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>ho(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Ut("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=ft(a.args[2]);return new Vs(me(Se({},a),{above:ft(a.args[0]),below:ft(a.args[1]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>ho(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Ut(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Vs(me(Se({},a),{body:ft(a.args[2]),above:ft(a.args[1]),below:ft(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>ho(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Ut("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new wd(me(Se({},a),{body:ft(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),Ut(["vphantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ft(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Ut(["hphantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ft(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Ut(["phantom"],"{:auto}",{createAtom:a=>new wd(me(Se({},a),{body:ft(a.args[0]),isInvisible:!0}))}),Ut("not","{:math}",{createAtom:a=>{const y=ft(a.args[0]);return y.length===0?new Un(me(Se({},a),{type:"mrel",value:"\uE020"})):new Un(me(Se({},a),{body:[new Nc(me(Se({},a),{body:"\uE020",align:"right"})),...y],captureSelection:!0}))},serialize:(a,y)=>{const b=a.args[0],E=b&&typeof b=="object"&&"group"in b;return a.value!=="\uE020"?E?`\\not{${Un.serialize(b.group,y)}}`:`\\not${Un.serialize(b,y)}`:E?"\\not{}":"\\not"},render:(a,y)=>{if(a.value)return a.createBox(y);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":rc(ft(a.args[0])),ee=Un.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Ut(["ne","neq"],"",{createAtom:a=>new Un(me(Se({},a),{type:"mrel",body:[new Nc(me(Se({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Un(me(Se({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Ut("rlap","{:auto}",{createAtom:a=>new Nc(me(Se({},a),{body:ft(a.args[0]),align:"right"}))}),Ut("llap","{:auto}",{createAtom:a=>new Nc(me(Se({},a),{body:ft(a.args[0]),align:"left"}))}),Ut("mathrlap","{:math}",{createAtom:a=>new Nc(me(Se({},a),{body:ft(a.args[0]),align:"left"}))}),Ut("mathllap","{:math}",{createAtom:a=>new Nc(me(Se({},a),{body:ft(a.args[0]),align:"left"}))}),Ut("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new Ao(me(Se({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return ho("\\raisebox",(b=Oo(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Ut("raise","{:value}{:auto}",{createAtom:a=>{var y;return new Ao(me(Se({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return ho("\\raise",(b=Oo(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Ut("lower","{:value}{:auto}",{createAtom:a=>{var y;return new Ao(me(Se({},a),{body:ft(a.args[1]),padding:{dimension:0},offset:(y=Us(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return ho("\\lower",(E=Oo(Us((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Ie("0123456789/@.?!"),Je(65,90),Je(97,122),Ie([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Ie([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Ie([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),Ie([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),Ie([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),Ie([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),Ie([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),Ie([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),Ie([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),Ie([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),Ie([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),Ie([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Ie([["\\wp",8472],["\\aleph",8501]]),Ie([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),Ie([["\\ ",160],["~",160]],"space"),Ut(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Sd(a)}),Ut("space","",{createAtom:a=>new Sd(a)}),Ie([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Ie([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Ie([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>&#x2061;</mo>",Xf="<mo>&#8290;</mo>";function Yf(a){return a.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lo(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Ev(a,y,b){var E,ee,re,ae,fe,ge,be,Ce,$e,nt,xt;let Tt=!1;y=y!=null?y:a.atoms.length;let Tn="",Sr="",_n=a.atoms[a.index];const tr=(ee=(E=_n.style)==null?void 0:E.variant)!=null?ee:"",kr=(ae=(re=_n.style)==null?void 0:re.variantStyle)!=null?ae:"";let cr="";if(tr||kr){const Ti=In(_n.value,(fe=_n.style)==null?void 0:fe.variant,(ge=_n.style)==null?void 0:ge.variantStyle);if(Ti!==_n.value)return a.index+=1,Tn=`<mi${lo(_n.id,b)}>${Ti}</mi>`,Ul(Tn,a,b)||(a.mathML+=Tn,a.lastType="mi"),!0;cr=(be={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[kr+tr])!=null?be:"",cr=` mathvariant="${cr}"`}const si={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(_n.command==="!")return a.index+=1,Tn="<mo>!</mo>",Ul(Tn,a,b)||(a.mathML+=Tn,a.lastType="mo"),!0;if(si[_n.command]){a.index+=1;let Ti=`<mi${lo(_n.id,b)}${cr}>${si[_n.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(Ti=Xf+Ti),Ul(Ti,a,b)||(a.mathML+=Ti,a.lastType="mi"),!0}if(_n.command==="\\operatorname")Sr=Bu(_n.body),a.index+=1;else if(tr||kr)for(;a.index<y&&(_n.type==="mord"||_n.type==="macro")&&!_n.isDigit()&&tr===(($e=(Ce=_n.style)==null?void 0:Ce.variant)!=null?$e:"")&&kr===((xt=(nt=_n.style)==null?void 0:nt.variantStyle)!=null?xt:"");)Sr+=Bu([_n]),a.index+=1,_n=a.atoms[a.index];else(_n.type==="mord"||_n.type==="macro")&&!_n.isDigit()&&(Sr+=Bu([_n]),a.index+=1);if(Sr.length>0){Tt=!0,Tn=`<mi${cr}>${Sr}</mi>`;const Ti=a.lastType;Tn.endsWith(">f</mi>")||Tn.endsWith(">g</mi>")?(Tn+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(Tn)?"mo":"mi",Ul(Tn,a,b)||((Ti==="mi"||Ti==="mn"||Ti==="mtext"||Ti==="fence")&&(Tn=Xf+Tn),a.mathML+=Tn)}return Tt}function Mv(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function _v(a){let y=-1,b=a.index,E=!1,ee=!1;for(;b<a.atoms.length&&!E&&!ee;){const re=a.atoms[b];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,b++}return ee&&(y=b-1),y}function Ul(a,y,b){var E;let ee=y.atoms[y.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")ee=y.atoms[y.index],y.index+=1;else return!1;const re=y.lastType;y.lastType="";const ae=Ya(ee.superscript,b);y.lastType="";const fe=Ya(ee.subscript,b);if(y.lastType=re,!ae&&!fe)return!1;let ge="";return ae&&fe?ge=`<msubsup>${a}${fe}${ae}</msubsup>`:ae?ge=`<msup>${a}${ae}</msup>`:fe&&(ge=`<msub>${a}${fe}</msub>`),y.mathML+=ge,y.lastType="",!0}function kv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="";for(;a.index<y&&a.atoms[a.index].mode==="text";)ee+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ee.length>0?(a.mathML+=`<mtext ${lo(a.atoms[E].id,b)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Lv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="",re=_v(a);for(re>=0&&re<y&&(y=re);a.index<y&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+lo(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Mv(a)&&(re=a.index,a.index+=1),Ul(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let ae=!1,fe=0;const ge=a.index;let be=-1,Ce=ge+1;for(;Ce<y&&!ae;)a.atoms[Ce].type==="mopen"?fe+=1:a.atoms[Ce].type==="mclose"&&(fe-=1),fe===-1&&(ae=!0,be=Ce),Ce+=1;ae&&(ee="<mrow>",ee+=jc(a.atoms[ge],b),ee+=Ya(a.atoms,b,ge+1,be),ee+=jc(a.atoms[be],b),ee+="</mrow>",a.index=be+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),Ul(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Tv(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const fe={"\\ne":"&ne;","\\neq":"&neq;","\\pm":"&#177;","\\times":"&#215;","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(fe[ae.command]){a.index+=1;const ge=`<mo${lo(ae.id,b)}>${fe[ae.command]}</mo>`;return Ul(ge,a,b)||(a.mathML+=ge,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const ge=jc(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+ge,ee+=Ya(ae.subscript,b),ee+=Ya(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+ge,ee+=Ya(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+ge,ee+=Ya(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const ge=a.atoms[a.index],be=ge.value==="\\operatorname",Ce=be?'<mi class="MathML-Unit"'+lo(ge.id,b)+">"+Bu(ge.value)+"</mi>":jc(ge,b);ee+=Ce,!be&&!/^<mo>(.*)<\/mo>$/.test(Ce)?(ee+=lp,re="applyfunction"):re=be?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,Ul(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Ya(a,y,b,E){y!=null||(y={});const ee={atoms:[],index:b!=null?b:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")ee.mathML=a.toString();else if(typeof a=="string")ee.mathML=a;else if(a instanceof Un)ee.mathML=Wh(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(kv(ee,E,y)||Lv(ee,E,y)||Ev(ee,E,y)||Tv(ee,E,y)||Av(ee,E,y))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],y);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>&#x2064;</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,Ul(ae,ee,y)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function jc(a,y){let b="";const E=Bu(a.value);return E&&(b="<mo"+lo(a.id,y)+">"+E+"</mo>"),b}function Bu(a){if(!a)return"";if(typeof a=="string")return Yf(a);if(!Array.isArray(a)&&typeof a.body=="string")return Yf(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return Yf(y)}function Wh(a,y){var b,E,ee,re,ae,fe,ge,be,Ce,$e,nt,xt,Tt,Tn,Sr,_n,tr,kr,cr,si,Ti,bi;if(a.mode==="text")return`<mi${lo(a.id,y)}>${a.value}</mi>`;const Fa={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},io={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Or="",Fs="",kl,Xs,Qo,zs,Es,co;const{command:Io}=a;if(a.command==="\\error")return`<merror${lo(a.id,y)}>${Ya(a.body,y)}</merror>`;const es={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ll={"\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};switch(a.type){case"first":break;case"group":case"root":Or=Ya(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Or+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Or+="<mo>"+(es[a.leftDelim]||a.leftDelim)+"</mo>")),Or+="<mtable",a.colFormat){for(Or+=' columnalign="',Qo=0;Qo<a.colFormat.length;Qo++)a.colFormat[Qo].align&&(Or+={l:"left",c:"center",r:"right"}[a.colFormat[Qo].align]+" ");Or+='"'}for(Or+=">",Xs=0;Xs<a.array.length;Xs++){for(Or+="<mtr>",kl=0;kl<a.array[Xs].length;kl++)Or+="<mtd>"+Ya(a.array[Xs][kl],y)+"</mtd>";Or+="</mtr>"}Or+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Or+="<mo>"+(es[a.leftDelim]||a.rightDelim)+"</mo>"),Or+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Or+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Or+="<mo"+lo(a.id,y)+">"+(es[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Or+="<mfrac>",Or+=Ya(a.above,y)||"<mi>&nbsp;</mi>",Or+=Ya(a.below,y)||"<mi>&nbsp;</mi>",Or+="</mfrac>"):(Or+="<mtable"+lo(a.id,y)+">",Or+="<mtr>"+Ya(a.above,y)+"</mtr>",Or+="<mtr>"+Ya(a.below,y)+"</mtr>",Or+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Or+="<mo"+lo(a.id,y)+">"+(es[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Or+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Or+="<msqrt"+lo(a.id,y)+">",Or+=Ya(a.body,y),Or+="</msqrt>"):(Or+="<mroot"+lo(a.id,y)+">",Or+=Ya(a.body,y),Or+=Ya(a.above,y),Or+="</mroot>");break;case"leftright":const Al=a,Tl=Al.leftDelim;Or="<mrow>",Tl&&Tl!=="."&&(Or+=`<mo${lo(a.id,y)}>${(b=es[Tl])!=null?b:Tl}</mo>`),a.body&&(Or+=Ya(a.body,y));const Il=Al.matchingRightDelim();Il&&Il!=="."&&(Or+=`<mo${lo(a.id,y)}>${(E=es[Il])!=null?E:Il}</mo>`),Or+="</mrow>";break;case"sizeddelim":case"delim":Or+=`<mo${lo(a.id,y)}>${es[a.value]||a.value}</mo>`;break;case"accent":Or+='<mover accent="true"'+lo(a.id,y)+">",Or+=Ya(a.body,y),Or+="<mo>"+(Ll[Io]||a.accent)+"</mo>",Or+="</mover>";break;case"line":case"overlap":break;case"overunder":Es=a.above,zs=a.below,(a.svgAbove||Es)&&(a.svgBelow||zs)?co=a.body:Es&&Es.length>0?(co=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(zs=a.body[0].below,co=a.body[0].body):((fe=(ae=a.body)==null?void 0:ae[0])==null?void 0:fe.type)==="first"&&((be=(ge=a.body)==null?void 0:ge[1])!=null&&be.below)&&(zs=a.body[1].below,co=a.body[1].body)):zs&&zs.length>0&&(co=a.body,($e=(Ce=a.body)==null?void 0:Ce[0])!=null&&$e.above?(Es=a.body[0].above,co=a.body[0].body):((xt=(nt=a.body)==null?void 0:nt[0])==null?void 0:xt.type)==="first"&&((Tn=(Tt=a.body)==null?void 0:Tt[1])!=null&&Tn.above)&&(Es=a.body[1].overscript,co=a.body[1].body)),(a.svgAbove||Es)&&(a.svgBelow||zs)?(Or+=`<munderover ${lo(a.id,y)}>`,Or+=(Sr=Fa[a.svgBody])!=null?Sr:Ya(co,y),Or+=(_n=Fa[a.svgBelow])!=null?_n:Ya(zs,y),Or+=(tr=Fa[a.svgAbove])!=null?tr:Ya(Es,y),Or+="</munderover>"):a.svgAbove||Es?(Or+=`<mover ${lo(a.id,y)}>`+((kr=Fa[a.svgBody])!=null?kr:Ya(co,y)),Or+=(cr=Fa[a.svgAbove])!=null?cr:Ya(Es,y),Or+="</mover>"):(a.svgBelow||zs)&&(Or+=`<munder ${lo(a.id,y)}>`+((si=Fa[a.svgBody])!=null?si:Ya(co,y)),Or+=(Ti=Fa[a.svgBelow])!=null?Ti:Ya(zs,y),Or+="</munder>");break;case"placeholder":Or+="?";break;case"mord":{Or=typeof a.value=="string"?a.value:Io,Io==="\\char"?Or="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Or.length>0&&Or.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Or="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Or=a.value.charAt(0):(console.error("Did not expect this"),Or=""));const cl=/\d/.test(Or)?"mn":"mi";Or=`<${cl}${lo(a.id,y)}>${Yf(Or)}</${cl}>`;break}case"mbin":case"mrel":case"minner":Or=jc(a,y);break;case"mpunct":Or='<mo separator="true"'+lo(a.id,y)+">"+Io+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Or="<mo"+lo(a.id,y)+">",Or+=Io==="\\operatorname"?a.body:Io||a.body,Or+="</mo>");break;case"box":Or='<menclose notation="box"',a.backgroundcolor&&(Or+=' mathbackground="'+a.backgroundcolor+'"'),Or+=lo(a.id,y)+">"+Ya(a.body,y)+"</menclose>";break;case"spacing":Or+='<mspace width="'+((bi=io[Io])!=null?bi:0)+'em"/>';break;case"enclose":Or='<menclose notation="';for(const cl in a.notation)Object.prototype.hasOwnProperty.call(a.notation,cl)&&a.notation[cl]&&(Or+=Fs+cl,Fs=" ");Or+=lo(a.id,y)+'">'+Ya(a.body,y)+"</menclose>";break;case"prompt":Or='<menclose notation="roundexbox""">'+Ya(a.body,y)+"</menclose>";break;case"space":Or+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Or+=jc(a,y);break;case"mclose":Or+=jc(a,y);break;case"macro":{const cl=a.command+Bu(a.macroArgs);cl&&(Or+=`<mo ${lo(a.id,y)}>${cl}</mo>`)}break;case"latexgroup":Or+=Ya(a.body,y);break;case"latex":Or+="<mtext"+lo(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Or+=Ya(a.body,y);break;case"text":Or+=`<mtext ${lo(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${lo(a.id,y)} displaystyle="true">${Ya(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${lo(a.id,y)} displaystyle="false">${Ya(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Or}var $u={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Zh={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function Bd(a){let y=0;if(Re(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(Re(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function cp(a){let y="";if(Re(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Pv(a){return a?a.map(y=>y.value).join(""):""}function Pa(a,y){var b,E,ee,re,ae;function fe(Ce){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(Ce)?` <say-as interpret-as="character">${Ce}</say-as>`:/[A-Z]/.test(Ce)?`capital <say-as interpret-as="character">${Ce.toLowerCase()}</say-as>`:Ce:/[a-z]/.test(Ce)?" '"+Ce.toUpperCase()+"'":/[A-Z]/.test(Ce)?" 'capital "+Ce.toUpperCase()+"'":Ce}function ge(Ce){return"<emphasis>"+Ce+"</emphasis>"}if(!y)return"";let be="";if(Re(y)){let Ce=!1,$e=!1;for(let nt=0;nt<y.length;nt++)y[nt].type!=="first"&&(y[nt].mode!=="text"&&($e=!1),nt<y.length-2&&y[nt].type==="mopen"&&y[nt+2].type==="mclose"&&y[nt+1].type==="mord"?(be+=" of ",be+=ge(Pa(a,y[nt+1])),nt+=2):y[nt].mode==="text"?$e?be+=(b=y[nt].value)!=null?b:" ":($e=!0,be+=Pa("text",y[nt])):y[nt].isDigit()?Ce?be+=y[nt].asDigit():(Ce=!0,be+=Pa(a,y[nt])):(Ce=!1,be+=Pa(a,y[nt])))}else if(y.mode==="text")y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>'),be+=y.value;else{y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>');let Ce="",$e="",nt="",xt=!1;const{command:Tt}=y;switch(Tt){case"\\vec":return"vector "+Pa(a,y.body);case"\\acute":return Pa(a,y.body)+" acute";case"\\grave":return Pa(a,y.body)+" grave";case"\\dot":return"dot over"+Pa(a,y.body);case"\\ddot":return"double dot over"+Pa(a,y.body);case"\\mathring":return"ring over"+Pa(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Pa(a,y.body);case"\\bar":return Pa(a,y.body)+" bar";case"\\breve":return Pa(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Pa(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Pa(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Pa(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Pa(a,y.body)}switch(y.type){case"prompt":const Tn=y.body.length>1?'start input . <break time="500ms"/> '+Pa(a,y.body)+'. <break time="500ms"/> end input':"blank";be+=' <break time="300ms"/> '+Tn+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const Sr=y.array,_n=y.environmentName;if(Object.keys(Zh).includes(_n)){be+=` begin ${Zh[_n]} `;for(let cr=0;cr<Sr.length;cr++){cr>0&&(be+=","),be+=` row ${cr+1} `;for(let si=0;si<Sr[cr].length;si++)si>0&&(be+=","),be+=` column ${si+1}: `,be+=Pa("math",Sr[cr][si])}be+=` end ${Zh[_n]} `}break;case"group":Tt==="\\ne"?be+=" not equal ":(Tt==="\\not"&&(be+=" not "),be+=Pa("math",y.body));break;case"root":be+=Pa("math",y.body);break;case"genfrac":if(Ce=Pa("math",y.above),$e=Pa("math",y.below),Bd(y.above)&&Bd(y.below)){const si={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[cp(y.above)+"/"+cp(y.below)];si?be=si:be+=Ce+" over "+$e}else be+=' the fraction <break time="150ms"/>'+Ce+' over <break time="150ms"/>'+$e+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(nt=Pa("math",y.body),y.hasEmptyBranch("above"))be+=Bd(y.body)?" the square root of "+nt+" , ":' the square root of <break time="200ms"/>'+nt+'. <break time="200ms"/> End square root';else{let cr=Pa("math",y.above);cr=cr.trim();const si=cr.replace(/<mark([^/]*)\/>/g,"");si==="3"?be+=' the cube root of <break time="200ms"/>'+nt+'. <break time="200ms"/> End cube root':si==="n"?be+=' the nth root of <break time="200ms"/>'+nt+'. <break time="200ms"/> End root':be+=' the root with index: <break time="200ms"/>'+cr+', of <break time="200ms"/>'+nt+'. <break time="200ms"/> End root'}break;case"leftright":{const cr=y;be+=(ee=cr.leftDelim?$u[cr.leftDelim]:void 0)!=null?ee:cr.leftDelim,be+=Pa("math",y.body),be+=(re=cr.rightDelim?$u[cr.rightDelim]:void 0)!=null?re:cr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const tr=Tt.replace(/^\\/g,""),kr=ir()[tr];kr&&(kr!=null&&kr.expand?be+=Pa("math",y.body):be+=`${tr} `);break;case"placeholder":be+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Tt==="\\mathbin"||Tt==="\\mathrel"||Tt==="\\mathopen"||Tt==="\\mathclose"||Tt==="\\mathpunct"||Tt==="\\mathord"||Tt==="\\mathinner"){be=Pa(a,y.body);break}let cr=y.isDigit()?y.asDigit():y.value,si=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(si=y.value,cr=si),a==="text")be+=cr;else{if(y.type==="mbin"&&(be+='<break time="150ms"/>'),cr){const Ti=$u[cr]||(si?$u[si.trim()]:"");if(Ti)be+=" "+Ti;else{const bi=si?Iv(si.trim()):"";be+=bi||fe(cr)}}else be+=Pa("math",y.body);y.type==="mbin"&&(be+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const cr=y.command;if(cr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let si=Pa("math",y.superscript);si=si.trim();let Ti=Pa("math",y.subscript);Ti=Ti.trim(),be+=' the summation from <break time="200ms"/>'+Ti+'<break time="200ms"/> to <break time="200ms"/>'+si+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the summation of";else{let si=Pa("math",y.subscript);si=si.trim(),be+=' the summation from <break time="200ms"/>'+si+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(cr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let si=Pa("math",y.superscript);si=si.trim();let Ti=Pa("math",y.subscript);Ti=Ti.trim(),be+=' the product from <break time="200ms"/>'+Ti+'<break time="200ms"/> to <break time="200ms"/>'+si+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the product of ";else{let si=Pa("math",y.subscript);si=si.trim(),be+=' the product from <break time="200ms"/>'+si+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(cr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let si=Pa("math",y.superscript);si=si.trim();let Ti=Pa("math",y.subscript);Ti=Ti.trim(),be+=' the integral from <break time="200ms"/>'+ge(Ti)+'<break time="200ms"/> to <break time="200ms"/>'+ge(si)+' <break time="200ms"/> of ',xt=!0}else be+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const si=(ae=$u[y.value])!=null?ae:y.command?$u[y.command]:void 0;be+=si||" "+y.value}else y.command&&(y.command==="\\mathop"?be+=Pa("math",y.body):y.command==="\\operatorname"?be+=Pv(y.body):be+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":nt=Pa("math",y.body),be+=" crossed out "+nt+". End crossed out.";break;case"space":case"spacing":break}if(!xt&&!y.hasEmptyBranch("superscript")){let Tn=Pa(a,y.superscript);Tn=Tn.trim();const Sr=Tn.replace(/<[^>]*>/g,"");if(Bd(y.superscript)){if(a==="math"){const _n=Dv(y.superscript);_n&&(be+='<mark name="'+_n+'"/>')}Sr==="\u2032"?be+=" prime ":Sr==="2"?be+=" squared ":Sr==="3"?be+=" cubed ":Number.isNaN(Number.parseInt(Sr))?be+=" to the "+Tn+"; ":be+=' to the <say-as interpret-as="ordinal">'+Sr+"</say-as> power; "}else Number.isNaN(Number.parseInt(Sr))?be+=" raised to the "+Tn+"; ":be+=' raised to the <say-as interpret-as="ordinal">'+Sr+"</say-as> power; "}if(!xt&&!y.hasEmptyBranch("subscript")){let Tn=Pa("math",y.subscript);Tn=Tn.trim(),be+=Bd(y.subscript)?" sub "+Tn:" subscript "+Tn+". End subscript. "}}return be}function Fu(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ya(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=me(Se({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=me(Se({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=me(Se({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&re.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let ae="";try{ae=re.toSpeech(ee)}catch(fe){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",fe)}return ae}return""}let E=Pa("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let ee="";window.MathfieldElement.speechEngineRate&&(ee='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),E='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+ee+"<p><s>"+E+"</s></p>"+(ee?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&ke()==="macos"?E=E.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):E=E.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return E}var $d={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},Fd={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Ov(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function To(a){var y,b,E,ee,re,ae,fe,ge,be,Ce,$e,nt,xt;if(!a)return"";if(Re(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(To).join("");if(a[0].mode==="text"){let kr=0,cr="";for(;((y=a[kr])==null?void 0:y.mode)==="text";)cr+=a[kr].body?To(a[kr].body):a[kr].value,kr++;return`"${cr}" ${To(a.slice(kr))}`}let _n=0;const tr=[];for(;a[_n]&&a[_n].mode==="math";){let kr="";for(;a[_n]&&a[_n].type==="mord"&&/\d/.test(a[_n].value);)kr+=a[_n++].value;kr?tr.push(kr):tr.push(To(a[_n++]))}return tr.push(To(a.slice(_n))),Ov(tr)}if(a.mode==="text")return`"${a.value}"`;let Tt="";const{command:Tn}=a;let Sr;if(Tn==="\\placeholder")return`(${To(a.body)})`;switch(a.type){case"accent":const _n={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Tn];Tt=`${_n!=null?_n:""} ${To(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(bi=>bi.value).join("");case"group":case"root":Tt=(b=$d[Tn])!=null?b:To(a.body);break;case"genfrac":{const bi=a;(bi.leftDelim||bi.rightDelim)&&(Tt=bi.leftDelim==="."||!bi.leftDelim?"{:":bi.leftDelim),bi.hasBarLine?(Tt+="(",Tt+=To(bi.above),Tt+=")/(",Tt+=To(bi.below),Tt+=")"):(Tt+="("+To(bi.above)+"),",Tt+="("+To(bi.below)+")"),(bi.leftDelim||bi.rightDelim)&&(Tt+=bi.rightDelim==="."||!bi.rightDelim?"{:":bi.rightDelim)}break;case"surd":Tt+=a.hasEmptyBranch("above")?"sqrt("+To(a.body)+")":"root("+To(a.above)+")("+To(a.body)+")";break;case"latex":Tt=a.value;break;case"leftright":{const bi=a,Fa=bi.leftDelim;Tt+=Fa==="."||!Fa?"{:":Fa,Tt+=To(bi.body);const io=bi.matchingRightDelim();Tt+=io==="."||!io?":}":io}break;case"sizeddelim":case"delim":Tt=a.value;break;case"overlap":break;case"overunder":break;case"mord":Tt=(ee=(E=$d[Tn])!=null?E:Tn)!=null?ee:typeof a.value=="string"?a.value:"",Tt.startsWith("\\")&&(Tt+=" "),Sr=Tn?Tn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Sr?Tt=String.fromCodePoint(Number.parseInt("0x"+Sr[1])):Tt.length>0&&Tt.startsWith("\\")&&(Tt=typeof a.value=="string"?a.value.charAt(0):a.command),Tt=Nv(Tt,a.style);break;case"mbin":case"mrel":case"minner":Tt=(ae=(re=$d[Tn])!=null?re:Fd[Tn])!=null?ae:a.value;break;case"mopen":case"mclose":Tt=a.value;break;case"mpunct":Tt=(fe=Fd[Tn])!=null?fe:Tn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Fd[Tn]?Tt=Fd[Tn]:Tt=Tn==="\\operatorname"?To(a.body):(ge=a.value)!=null?ge:Tn,Tt+=" ");break;case"array":const tr=a.array,kr=a.environmentName,cr=(be={bmatrix:["[","]"],"bmatrix*":["[","]"]}[kr])!=null?be:["(",")"],si=[];for(const bi of tr){const Fa=[];for(const io of bi)Fa.push(cr[0]+To(io)+cr[1]);si.push(Fa.join(","))}const Ti=(Ce={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[kr])!=null?Ce:["(",")"];Tt=Ti[0]+si.join(",")+Ti[1];break;case"box":break;case"spacing":Tt=($e=$d[Tn])!=null?$e:" ";break;case"enclose":Tt="("+To(a.body)+")";break;case"space":Tt=" ";break;case"subsup":Tt="";break;case"macro":Tt=(xt=(nt=$d[Tn])!=null?nt:Fd[Tn])!=null?xt:To(a.body);break}if(!a.hasEmptyBranch("subscript")){Tt+="_";const _n=To(a.subscript);Tt+=_n.length!==1?`(${_n})`:_n}if(!a.hasEmptyBranch("superscript")){Tt+="^";const _n=To(a.superscript);Tt+=_n.length!==1?`(${_n})`:_n}return Tt}function Nv(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function Jo(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new Na({from:me(Se({},bu()),{renderPlaceholder:()=>new Er(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Un({mode:"math",type:"root",body:qo(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(gu(Cd(ae,ee)),vu(ae,{classes:"ML__latex"}).toMarkup()):""}function k1(a){return t0(a,{context:bu()})}function Rv(a,y={}){return Ya(qo(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Bv(a){const y=qo(a,{parseMode:"math",mathstyle:"displaystyle"});return Fu(y)}var qf;function $v(a){var y,b;if(!qf){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?qf=new E:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(b=qf==null?void 0:qf.box(a).latex)!=null?b:""}function L1(a,y="math"){return To(new Un({type:"root",body:qo(a,{parseMode:y})}))}function A1(a){return Oc(a,{format:"ascii-math"})[1]}function Uh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?up(a):a}function zu(a){return a<0?0:a>255?255:Math.round(a)}function Fv(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&typeof y.a=="undefined"&&(y.a=1),y}function jh(a){const[y,b,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:y,a:b*Math.cos(ee),b:b*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zv(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.sqrt(b*b+E*E),ae=Math.atan2(E,b)*180/Math.PI,fe={L:y,C:ee,H:ae};return a.alpha!==void 0&&(fe.alpha=a.alpha),fe}function Vh(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),re=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),ae=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),fe=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,ge=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,be=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,Ce=$e=>{const nt=Math.abs($e);return nt<=.0031308?$e*12.92:(Math.sign($e)||1)*(1.055*Math.pow(nt,1/2.4)-.055)};return[Ce(fe),Ce(ge),Ce(be)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=zu(b*255),E=zu(E*255),ee=zu(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function up(a){let[y,b,E]=Vh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Vh(jh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,ae=a.L,fe=(re+ae)/2;ee.C=fe;const ge=.36/Math.pow(2,12);for(;ae-re>ge;)fe=(re+ae)/2,ee.C=fe,[y,b,E]=Vh(jh(ee)),Gh([y,b,E])?re=fe:ae=fe;return Xh([y,b,E],a.alpha)}function Kv(a){return up(jh(a))}function dp(a,y){const b=Uh(a),E=Uh(y),ee=.56,re=.57,ae=.62,fe=.65,ge=.022,be=1.414,Ce=.1,$e=5e-4,nt=1.14,xt=.027,Tt=1.14,Tn=.027;function Sr(bi){return bi>=ge?bi:bi+Dl(ge-bi,be)}function _n(bi){return(bi<0?-1:1)*Math.pow(Math.abs(bi),2.4)}const tr=Sr(_n(E.r/255)*.2126729+_n(E.g/255)*.7151522+_n(E.b/255)*.072175),kr=Sr(_n(b.r/255)*.2126729+_n(b.g/255)*.7151522+_n(b.b/255)*.072175);let cr,si,Ti;return Math.abs(kr-tr)<$e?si=0:kr>tr?(cr=Dl(kr,ee)-Dl(tr,re),si=cr*nt):(cr=Dl(kr,fe)-Dl(tr,ae),si=cr*Tt),Math.abs(si)<Ce?Ti=0:si>0?Ti=si-Tn:Ti=si+xt,Ti*100}function fp(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=dp(a,b),ee=dp(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=Uh(a);let b=((1<<24)+(zu(y.r)<<16)+(zu(y.g)<<8)+zu(y.b)).toString(16).slice(1);return y.alpha!==void 0&&y.alpha<1&&(b+=("00"+Math.round(y.alpha*255).toString(16)).slice(-2)),b[0]===b[1]&&b[2]===b[3]&&b[4]===b[5]&&b[6]===b[7]&&(b=b[0]+b[2]+b[4]+(y.alpha!==void 0&&y.alpha<1?b[6]:"")),"#"+b}function go(a){const y=hp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function hp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=hp(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Zv(a,y){return go(a).length>0}function Uv(a){return[Yh(a,"double-struck","mathbb","tooltip.blackboard"),Yh(a,"fraktur","mathfrak","tooltip.fraktur"),Yh(a,"calligraphic","mathcal","tooltip.caligraphic"),qh(a,"up","mathrm","tooltip.roman-upright"),qh(a,"bold","mathbf","tooltip.bold"),qh(a,"italic","mathit","tooltip.italic")]}function jv(a){return[{label:()=>Jo(`\\vec{${go(a)}}`),visible:()=>go(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\overrightarrow{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\overleftarrow{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\dot{${go(a)}}`),visible:()=>go(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\ddot{${go(a)}}`),visible:()=>go(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\bar{${go(a)}}`),visible:()=>go(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\overline{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\overgroup{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\overbrace{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\underline{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\undergroup{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\underbrace{${go(a)}}`),visible:()=>go(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vv(a){return[{label:()=>Jo(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Jo(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gv(a){const y=[];for(const b of Object.keys(je))y.push({class:(Hv(fp(je[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${je[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}function Xv(a){const y=[];for(const b of Object.keys(Ye))y.push({class:(fp(Ye[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ye[b]} "></span>`,ariaLabel:()=>{var E;return(E=ut(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var Yv=class extends ep{constructor(a,y,b,E){super(a,y),this.row=b,this.col=E}set active(a){const y=this.parentMenu.children;if(a)for(const b of y)b.element.classList.toggle("active",b.row<=this.row&&b.col<=this.col);else for(const b of y)b.element.classList.remove("active")}};function qv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new Yv(ee,re,b,E),label:"\u2610",tooltip:()=>ut("tooltip.row-by-col",b,E),data:{row:b,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(b).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return y}function Jv(a){return[{label:()=>ut("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Vc(a)},{label:()=>ut("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Vc(a)},{label:()=>ut("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Vc(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>ut("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ut("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Vc(a)},{label:()=>ut("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ut("menu.borders"),visible:()=>(Qv(a)||Vc(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>zd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>zd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>zd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>zd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>zd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ut("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:qv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ut("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ut("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ut("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ut("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ut("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Uv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ut("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>ut("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&go(a).length>0,submenu:Vv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ut("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=t1(a);if(!y){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${y}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(y,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>ut("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var y,b;if(a.model.selectionIsCollapsed){const E=(y=a.expression)==null?void 0:y.simplify();if(a.model.position=a.model.lastOffset,!E){a.model.announce("plonk");return}a.insert(`=${E.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var y;if(window.MathfieldElement.computeEngine===null)return"";const b=(y=a.expression)==null?void 0:y.unknowns[0];return b?ut("menu.solve-for",Jo(b)):ut("menu.solve")},id:"ce-solve",visible:()=>{var y;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((y=a.expression)==null?void 0:y.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var y;const b=a.expression,E=b==null?void 0:b.unknowns[0],ee=(y=b.solve(E))==null?void 0:y.map(re=>{var ae;return(ae=re.simplify().latex)!=null?ae:""});if(!ee){a.model.announce("plonk");return}a.insert(`${E}=${ee.length===1?ee[0]:"\\left\\lbrace"+(ee==null?void 0:ee.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>ut("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ut("menu.copy"),id:"copy",submenu:[{label:()=>ut("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>ra.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ut("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>ra.copyToClipboard(a,"ascii-math")},{label:()=>ut("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>ra.copyToClipboard(a,"math-ml")}]},{label:()=>ut("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ut("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Vc(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qv(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function zd(a,y){Ef(a),a.flushInlineShortcutBuffer(),D0(a.model,y),Mo(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yh(a,y,b,E){return{label:()=>Jo(`\\${b}{${go(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Wv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function qh(a,y,b,E){return{label:()=>Jo(`\\${b}{${go(a)}}`),tooltip:()=>{var ee;return(ee=ut(E))!=null?ee:E},visible:()=>Zv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Ku(a,y){return a+Fu(y)}Ls({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function ae(Ce){let $e=null;switch(Ce){case"all":$e=re.root;break;case"selection":$e=re.getAtoms(re.selection);break;case"left":{$e=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{$e=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":$e=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:nt}=re.at(re.position);nt!=null&&nt.parent?$e=nt:$e=re.root;break}default:$e=re.root}return $e}function fe(Ce){let $e="";switch(Ce){case"all":console.log("Internal failure: speak all failed");break;case"selection":$e="no selection";break;case"left":$e="at start";break;case"right":$e="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":$e="no parent";break;default:console.log('unknown speak_ param value: "'+Ce+'"');break}return $e}const ge=ae(y);if(ge===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,fe(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const be=Fu(ge);return ht()&&b.withHighlighting?(mc().readAloudMathfield=a,$c(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,be)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(be),!1}function r1(a){var y,b;if(!ht()){console.log("Speak:",a);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const E=new SpeechSynthesisUtterance(a);window.speechSynthesis.speak(E)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"mp3",VoiceId:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna")?"neural":"standard",Text:a,TextType:"ssml"};E.synthesizeSpeech(ee,(re,ae)=>{if(re)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);else if(ae!=null&&ae.AudioStream){const fe=new Uint8Array(ae.AudioStream),ge=new Blob([fe.buffer],{type:"audio/mpeg"}),be=URL.createObjectURL(ge);new Audio(be).play().catch($e=>console.log($e))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var y;let b;if(a.parent.type==="prompt")a.parentBranch==="body"&&(b="prompt");else if(a.parentBranch==="body")b=a.type&&(y={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?y:"parent";else if(a.parent.type==="genfrac"){if(a.parentBranch==="above")return"numerator";if(a.parentBranch==="below")return"denominator"}else a.parent.type==="surd"?a.parentBranch==="above"&&(b="index"):a.parentBranch==="superscript"?b="superscript":a.parentBranch==="subscript"&&(b="subscript");return b||console.log("unknown relationship"),b!=null?b:"parent"}function i1(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Ku("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=a1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(y==="replacement")ee=Ku("",a.model.at(a.model.position));else if(y==="line"){const re=Ku("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Ku(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=b.parent;const re=a.at(a.position).parent;for(;ee!==a.root&&ee!==re;)E+=`out of ${pp(ee)};`,ee=ee.parent;return E}function o1(a){if(!a.selectionIsCollapsed)return Ku("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=pp(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Ku("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ee={};if((y==null?void 0:y.type)==="undo"&&(ee={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=dc(a.content),this.selection=a.selection,this.silenceNotifications=re,this.contentDidChange(ee)}this.silenceNotifications=E}get atoms(){return this.root.children}get selection(){return this._selection}set selection(a){this.setSelection(a)}setSelection(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var b,E,ee;const re=this.normalizeSelection(a,y);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const Ce=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(Ce))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(Ce-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(Ce-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(Ce+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(Ce+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=Ce,this._position=Ce,this._selection=re;return}const ae=Xo(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const fe=this.at(ae[0]+1),ge=this.at(ae[1]),be=Un.commonAncestor(fe,ge);(be==null?void 0:be.type)==="array"&&fe.parent===be&&ge.parent===be?this._selection={ranges:[ae],direction:re.direction}:this._selection={ranges:[ae],direction:re.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(a){var y;const b=this.at(a);(b==null?void 0:b.type)==="placeholder"?this.setSelection(a-1,a):((y=b==null?void 0:b.rightSibling)==null?void 0:y.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,b instanceof rs&&b.isSuggestion&&(b.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(a){this.setSelection(a,a)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(a="forward"){return this._anchor===this._position?!1:(a==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(a){return this.atoms[a]}offsetOf(a){return this.atoms.indexOf(a)}getSiblingsRange(a){const y=this.at(a),{parent:b}=y;if(!b)return[0,this.lastOffset];const E=y.parent.branch(y.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,y){const b=this.at(a).branch(y);return[this.offsetOf(b[0]),this.offsetOf(b[b.length-1])]}getAtoms(a,y,b){let E=b!=null?b:{};if(wu(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((be,Ce)=>[...be,...this.getAtoms(Ce,E)],[]);a=a.ranges[0]}let ee,re;if(gl(a)){if(ee=a,!gl(y))return[];re=y}else[ee,re]=a,E=y!=null?y:{};if(!Number.isFinite(ee))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ee<0&&(ee=this.lastOffset-ee+1),re<0&&(re=this.lastOffset-re+1);const ae=Math.min(ee,re)+1,fe=Math.max(ee,re);if(!E.includeChildren&&ae===1&&fe===this.lastOffset)return[this.root];let ge=[];for(let be=ae;be<=fe;be++){const Ce=this.atoms[be];mp(this,Ce,ae,fe)&&ge.push(Ce)}return E.includeChildren||(ge=ge.filter(be=>{let Ce=!1,{parent:$e}=be;for(;$e&&!Ce;)Ce=mp(this,$e,ae,fe),$e=$e.parent;return!Ce})),ge}getAllAtoms(a=0){const y=[],b=this.lastOffset;for(let E=a;E<=b;E++)y.push(this.atoms[E]);for(let E=0;E<a;E++)y.push(this.atoms[E]);return y}findAtom(a,y=0,b="forward"){let E;const ee=this.lastOffset;if(b==="forward"){for(let re=y;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<y;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=y;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>y;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let y=this.getAtoms(a);if(y.length===1&&!y[0].parent)if(y[0].type==="root")y=[...y[0].body],y.shift();else return y=this.root.cells.flat(),this.root=new Un({type:"root",body:[]}),y;for(const b of y)b.parent.removeChild(b);return y}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,y){const b=y!=null?y:"latex";if(b.startsWith("latex"))return Un.serialize([a],{expandMacro:b==="latex-expanded",skipStyles:b==="latex-unstyled",skipPlaceholders:b==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(b==="math-ml")return Ya(a);if(b==="spoken")return Fu(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?To(a):(console.error(`MathLive 0.98.5: Unexpected format "${b}`),"")}getValue(a,y,b){if(a===void 0)return this.atomToString(this.root,"latex");if(typeof a=="string"&&a!=="math-json")return this.atomToString(this.root,a);let E,ee;if(gl(a)&&gl(y)?(E=[this.normalizeRange([a,y])],ee=b):xu(a)?(E=[this.normalizeRange(a)],ee=y):wu(a)?(E=a.ranges,ee=y):(E=[this.normalizeRange([0,-1])],ee=a),ee!=null||(ee="latex"),ee==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const re=this.getValue({ranges:E},"latex-unstyled");try{const ae=window.MathfieldElement.computeEngine.parse(re);return JSON.stringify(ae.json)}catch(ae){return JSON.stringify(["Error",`'${ae.toString()}'`])}}if(ee.startsWith("latex")){const re={expandMacro:ee==="latex-expanded",skipStyles:ee==="latex-unstyled",skipPlaceholders:ee==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ka(E.map(ae=>Un.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const b=this.normalizeRange([a,y]);let[E,ee]=b,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&Jh(this,re,[E,ee]);)E=this.offsetOf(re.leftSibling),re=re.parent;if(re=this.at(ee).parent,(re==null?void 0:re.type)==="genfrac")for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,y,b=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:y,atoms:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;y();const fe=this.root.changeCounter!==ae,ge=E!==this._anchor||ee!==this._position||Pc(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&fe&&this.contentDidChange({inputType:a.type}),a.selection&&ge&&this.selectionDidChange(),fe||ge}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[y,b]=a;return y=this.normalizeOffset(y),b=this.normalizeOffset(b),y<b?[y,b]:[b,y]}normalizeSelection(a,y){var b;let E;if(gl(a)){const ee=this.normalizeOffset(a);if(gl(y)){const re=this.normalizeOffset(y);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(xu(a)){const ee=this.normalizeOffset(a[0]),re=this.normalizeOffset(a[1]);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else wu(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(b=a.direction)!=null?b:"none"});return console.assert(E!==void 0),E}get parentEnvironment(){let a=this.at(this.position).parent;if(a){for(;a.parent&&a.type!=="array";)a=a.parent;if(a.type==="array")return a}}get cell(){var a;let y=this.at(this.position);if(y){for(;y&&((a=y.parent)==null?void 0:a.type)!=="array";)y=y.parent;if(!(!(y!=null&&y.parent)||y.parent.type!=="array"))return y.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const y=this.silenceNotifications;this.silenceNotifications=!0;const b=this.mathfield.onContentWillChange(a);return this.silenceNotifications=y,b}contentDidChange(a){var y;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",me(Se({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",bubbles:!0,composed:!0}))),this.silenceNotifications=b}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,y,b,E){const ee=a.offsetOf(y);if(ee<b||ee>E)return!1;if(!y.hasChildren)return!0;const re=a.offsetOf(y.firstChild);if(re>=b&&re<=E){const ae=a.offsetOf(y.lastChild);if(ae>=b&&ae<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),ae=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Kd(a,y,b,E){var ee,re,ae,fe,ge,be;const Ce=b.parent;if(Ce&&b instanceof Xa){const $e=!E&&y==="forward"||E==="body"&&y==="backward";let nt=$e?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return $e?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(Ce.addChildrenAfter(b.removeBranch("body"),b),Ce.removeChild(b),nt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(Ce.addChildrenAfter(b.removeBranch("body"),b),Ce.removeChild(b),nt--),a.position=nt,!0}if(Ce&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const $e=b.leftSibling;b.hasChildren&&Ce.addChildrenAfter(b.removeBranch("body"),b),Ce.removeChild(b),a.position=a.offsetOf($e)}else y==="forward"&&E==="body"?a.position=a.offsetOf(b):!E&&y==="backward"?b.hasChildren?a.position=a.offsetOf(b.lastChild):(a.position=Math.max(0,a.offsetOf(b)-1),Ce.removeChild(b)):E==="above"&&(b.hasEmptyBranch("above")&&b.removeBranch("above"),y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b.body[0]));return!0}if(Ce&&(b.type==="box"||b.type==="enclose")){const $e=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return Ce.addChildrenAfter(b.removeBranch("body"),b),Ce.removeChild(b),a.position=a.offsetOf($e),!0}if(b.type==="genfrac"||b.type==="overunder"){if(!E)return b.type==="overunder"&&b.hasEmptyBranch("body")||b.type==="genfrac"&&b.hasEmptyBranch("below")&&b.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(y==="forward"?b.firstChild:b.lastChild),!0);const $e=Hd.fractionNavigationOrder==="numerator-denominator"?"above":"below",nt=$e==="above"?"below":"above";if(Ce&&(y==="forward"&&E===$e||y==="backward"&&E===nt)){const xt=b.removeBranch($e),Tt=b.removeBranch(nt);return Ce.addChildrenAfter([...xt,...Tt],b),Ce.removeChild(b),a.position=a.offsetOf(xt.length>0?xt[xt.length-1]:Tt[0]),!0}return y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b),!0}if(b.isExtensibleSymbol||b.type==="subsup"){if(!E&&y==="forward")return!1;if(!E){if(b.subscript||b.superscript){const $e=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(be=(fe=b.subscript)==null?void 0:fe[0].lastSibling)!=null?be:(ge=b.superscript)==null?void 0:ge[0].lastSibling;return $e&&(a.position=a.offsetOf($e)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const $e=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=$e,!0}if(E==="superscript")if(y==="backward"){const $e=a.offsetOf(b.firstChild)-1;console.assert($e>=0),a.position=$e}else b.subscript?a.position=a.offsetOf(b.subscript[0]):a.position=a.offsetOf(b);else E==="subscript"&&(y==="backward"&&b.superscript?a.position=a.offsetOf(b.superscript[0].lastSibling):y==="backward"?a.position=a.offsetOf(b.firstChild)-1:a.position=a.offsetOf(b));if(E&&b.hasEmptyBranch(E)&&(b.removeBranch(E),b.type==="subsup"&&!b.subscript&&!b.superscript)){const $e=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=$e}return!0}if((Ce==null?void 0:Ce.type)==="genfrac"&&!E&&b.type!=="first"){let $e=a.offsetOf(b.leftSibling);return Ce.removeChild(b),Ce.hasEmptyBranch("above")&&Ce.hasEmptyBranch("below")?($e=a.offsetOf(Ce.leftSibling),Ce.parent.removeChild(Ce),a.announce("delete",void 0,[Ce]),a.position=$e,!0):(a.announce("delete",void 0,[b]),a.position=$e,!0)}if(y==="backward"&&((Ce==null?void 0:Ce.command)==="\\ln"||(Ce==null?void 0:Ce.command)==="\\log")&&b.parentBranch!=="body"){const $e=a.offsetOf(Ce.leftSibling);return Ce.parent.removeChild(Ce),a.announce("delete",void 0,[Ce]),a.position=$e,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let y=a.at(a.position);if(!(y&&Kd(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Kd(a,"backward",y.parent,y.parentBranch))return;y=null}if(!y){a.announce("plonk");return}a.position=a.offsetOf(y.leftSibling),y.parent.removeChild(y),a.announce("delete",void 0,[y])}}):_l(a,Xo(a.selection),"deleteContentBackward")}function c1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Kd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return;E=void 0}if(a.position===a.lastOffset||!E){a.announce("plonk");return}E.parent.removeChild(E);let ee=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):_l(a,Xo(a.selection),"deleteContentForward")}function _l(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let ee=E[0].parent.firstChild;ee.type==="first"&&(ee=ee.rightSibling);const re=E[E.length-1].parent.lastChild;let ae=E[0];ae.type==="first"&&(ae=ae.rightSibling);const fe=E[E.length-1];if(ae===ee&&fe===re){const ge=E[0].parent;ge.parent&&ge.type!=="prompt"&&(y=[a.offsetOf(ge.leftSibling),a.offsetOf(ge)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const ge=E[0].parent,be=E[0].parentBranch==="below"?"above":"below",Ce=a.offsetOf(ge.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var $e,nt;const xt=ge.removeBranch(be);if(xt.length===1&&xt[0].type==="placeholder")(nt=ge.parent)==null||nt.removeChild(ge),a.position=Math.max(0,Ce);else{const Tt=ge.parent.addChildrenAfter(xt,ge);($e=ge.parent)==null||$e.removeChild(ge),a.position=a.offsetOf(Tt)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ls({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&_l(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&_l(a,[a.anchor,kh(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&_l(a,[a.anchor,kh(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&_l(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&_l(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&_l(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var u1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ut("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,d1=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${ut("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=Se(me(Se({},Nf()),{macros:ir(),registers:oc()}),Of(y)),this.eventController=new AbortController;const re=this.eventController.signal;y.eventSink&&(this.host=y.eventSink),this.element=a,a.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let ae=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";ae=ae.trim();const fe=A0(this.options),ge=new Un({type:"root",mode:fe,body:qo(ae,{context:this.context})});this.model=new s1(this,fe,ge),this.undoManager=new Bg(this.model);const be=[];if(be.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),be.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),be.push("<span part=content class=ML__content>"),be.push(w0(this)),be.push("</span>"),window.mathVirtualKeyboard&&(be.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),be.push(u1),be.push("</div>")),be.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),be.push(d1),be.push("</div>"),be.push("</span>"),be.push("<span class=ML__sr-only>"),be.push("<span role=status aria-live=assertive aria-atomic=true></span>"),be.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(be.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=tt.subscribe(()=>tt.update(this.element)),tt.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",$e=>$e.stopImmediatePropagation(),{capture:!1,signal:re}),this.field.addEventListener("wheel",this,{passive:!1,signal:re}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:re}):this.field.addEventListener("mousedown",this,{signal:re}),(ee=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ee.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(El(this)))},{signal:re}),this._menu=new Sv(Jv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const Ce=this.element.querySelector("[part=menu-toggle]");Ce==null||Ce.addEventListener("pointerdown",$e=>{if($e.currentTarget!==Ce||this._menu.state!=="closed")return;this.element.classList.add("tracking");const nt=Ce.getBoundingClientRect();this._menu.modifiers=Bc($e),this._menu.show({target:Ce,location:{x:nt.left,y:nt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),$e.preventDefault(),$e.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(Ce.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Hm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:re}),document.addEventListener("scroll",this,{signal:re}),this.resizeObserver=new ResizeObserver(()=>Mo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),_d&&!tt.locale.startsWith(_d.locale)&&$m(tt.locale),$s!=="ready"&&document.fonts.ready.then(()=>Af(this)),a.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(a){this._defaultStyle=a}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const a=this.model.at(this.model.position),y=this.adoptStyle==="right"?a.rightSibling:a;if(!y)return this.defaultStyle;if(y.type==="group"){const b=y.branch("body");return!b||b.length<2?{}:this.adoptStyle==="right"?b[1].computedStyle:b[b.length-1].computedStyle}return y.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Vf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,$h())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:bl(this.field))!=null?b:void 0,ee=a==null?void 0:a.modifiers,re=this.element.querySelector("[part=container]");return this._menu.show({target:re,location:E,modifiers:ee})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:Bt(a)}}get backgroundColorMap(){return a=>{var y,b,E,ee,re,ae;return(ae=(re=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:at(a)}}get smartFence(){var a;return(a=this.options.smartFence)!=null?a:!1}get readOnly(){var a;return(a=this.options.readOnly)!=null?a:!1}get disabled(){var a,y;return(y=(a=this.host)==null?void 0:a.disabled)!=null?y:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const a=getComputedStyle(this.host);return a.getPropertyValue("user-select")||a.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(a=>a.type==="prompt"&&!a.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const a=this.model.at(this.model.anchor),y=this.model.at(this.model.position),b=Un.commonAncestor(a,y);return!!((b==null?void 0:b.type)==="prompt"||b!=null&&b.parentPrompt)}get letterShapeStyle(){var a;return(a=this.options.letterShapeStyle)!=null?a:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const a=this.model.getAtoms(this.model.selection);if(a.length===0)return{};const y=Se({},a[0].style);for(const b of a)for(const[E,ee]of Object.entries(b.style))y[E]!==ee&&delete y[E];return y}queryStyle(a){const y=Ph(this,a);"verbatimColor"in y&&delete y.verbatimColor,"verbatimBackgroundColor"in y&&delete y.verbatimBackgroundColor;const b=Object.keys(y).length;if(b===0)return"all";if(b>1){for(const ge of Object.keys(y)){const be=this.queryStyle({[ge]:y[ge]});if(be==="none")return"none";if(be==="some")return"some"}return"all"}const E=Object.keys(y)[0],ee=y[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===ee?"all":"none";const re=this.model.getAtoms(this.model.selection,{includeChildren:!0});let ae=re.length;if(ae===0)return"none";let fe=0;for(const ge of re){if(ge.type==="first"){ae-=1;continue}ge.style[E]===ee&&(fe+=1)}return fe===0?"none":fe===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=kd())!=null?a:Fm());return((y=kd())==null?void 0:y.score)>0&&(this._keybindings=b,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),b}get menu(){return this._menu}setOptions(a){var y;this.options=Se(Se({},this.options),Of(a)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let b=this.options.defaultMode;b==="inline-math"&&(b="math"),((y=this.model.root.firstChild)==null?void 0:y.mode)!==b&&(this.model.root.firstChild.mode=b),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=Un.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&ra.insert(this.model,E,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in a||"macros"in a||"registers"in a||"colorMap"in a||"backgroundColorMap"in a||"letterShapeStyle"in a||"minFontScale"in a||"readOnly"in a||"placeholderSymbol"in a)&&Mo(this)}getOptions(a){return zc(this.options,a)}getOption(a){return zc(this.options,a)}handleEvent(a){return gc(this,null,function*(){var y;if(Ns(this)){if(Ch(a)){if(!yd(a.origin,(y=this.options.originValidator)!=null?y:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:b}=a.data;if(b==="execute-command"){const E=a.data.command;if(Iu(E)==="virtual-keyboard")return;this.executeCommand(E)}else b==="update-state"||(b==="focus"?this.focus({preventScroll:!0}):b==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&Z0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Z0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Vf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ns(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Ns(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Ns(this))return;tt.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const a=this.element;delete a.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,Gg(),Qm(),mv()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(a){return Iu(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(El(this))),!1):og(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,y,b){return this.model.getValue(a,y,b)}setValue(a,y){var b;y=y!=null?y:{mode:"math"},y.insertionMode===void 0&&(y.insertionMode="replaceAll"),(y.format===void 0||y.format==="auto")&&(y.format="latex"),(y.mode===void 0||y.mode==="auto")&&(y.mode=(b=ah(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();ra.insert(this.model,a,y)&&(Mo(this),E||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const a=window.MathfieldElement.computeEngine;return a?a.box(a.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var a;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const E=window.mathVirtualKeyboard.boundingRect,ee=this.host.getBoundingClientRect();ee.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ee.bottom-E.top+8))}}this.dirty&&$c(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=bl(this.field);else{const E=vd(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const ae of E)ae.right>ee&&(ee=ae.right),ae.top<re&&(re=ae.top);b={x:ee+y.left-this.field.scrollLeft,y:re+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ee=b.y;let re=this.host.scrollTop;ee<E.top?re=ee-E.top+this.host.scrollTop:ee>E.bottom&&(re=ee-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:re,left:0})}if(b){const E=b.x-window.scrollX;let ee=this.field.scrollLeft;E<y.left?ee=E-y.left+this.field.scrollLeft-20:E>y.right&&(ee=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,y){return typeof a!="string"||a.length===0&&((y==null?void 0:y.insertionMode)==="insertBefore"||(y==null?void 0:y.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),y=y!=null?y:{mode:"math"},y.focus&&this.focus(),y.feedback&&(window.MathfieldElement.keypressVibration&&et()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?T0(this.model):a==="&"?I0(this.model):this.model.selectionIsCollapsed?ra.insert(this.model,a,Se({style:this.model.at(this.model.position).computedStyle},y)):ra.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Mo(this),y.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,y="",b=""){var E;if(this.model.mode===a||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const ee=this.model.mode;if(this.model.mode=a,!((E=this.host)!=null&&E.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=ee;return}const re=this.model.mode,{model:ae}=this;ae.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let fe=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const ge=qo(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}if(this.model.mode=a,a==="latex"){let ge=ae.selectionIsCollapsed;Au(this,"accept");let be,Ce=ae.at(ae.position);if(ge)be="\\";else{const nt=Xo(ae.selection);be=this.model.getValue(nt,"latex");const xt=this.model.extractAtoms(nt);xt.length===1&&xt[0].type==="placeholder"&&(be=y,ge=!0),Ce=ae.at(nt[0])}const $e=new xd(be);Ce.parent.addChildAfter($e,Ce),ge?ae.position=ae.offsetOf($e.lastChild):ae.setSelection(ae.offsetOf($e.firstChild),ae.offsetOf($e.lastChild))}else Ld(ae).forEach(ge=>{ge.isError=!1});if(b){const ge=qo(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}return Mo(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),fe}),this.model.mode=a,window.mathVirtualKeyboard.update(El(this))}hasFocus(){return!this.blurred}focus(a){var y;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(y=a==null?void 0:a.preventScroll)!=null&&y||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,y={}){var b,E;const ee={operation:"set",silenceNotifications:!1};xu(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Ph(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=Se(Se({},this.defaultStyle),re);return}const fe=Se({},this.defaultStyle);for(const ge of Object.keys(re))fe[ge]===re[ge]?(ge==="color"&&delete fe.verbatimColor,ge==="backgroundColor"&&delete fe.verbatimBackgroundColor,delete fe[ge]):fe[ge]=re[ge];this.defaultStyle=fe;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const fe of this.model.selection.ranges)Mh(this.model,fe,re,{operation:ae});else Mh(this.model,ee.range,re,{operation:ae})}),Mo(this)}toggleContextMenu(){var a;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(a=this.getCaretPoint())!=null?a:void 0,onDismiss:()=>{var y;return(y=this.element)==null?void 0:y.focus()}}),!0):!1}getCaretPoint(){const a=bl(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Rd(this,a,y,{bias:0});if(b<0)return!1;const E=this.model.position;return this.model.position=b,this.model.announce("move",E),Mo(this),!0}getPrompt(a){const y=this.model.findAtom(b=>b.type==="prompt"&&b.placeholderId===a);return console.assert(y!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),y}getPromptValue(a,y){const b=this.getPrompt(a);if(!b)return"";const E=this.model.offsetOf(b.firstChild),ee=this.model.offsetOf(b.lastChild);return this.model.getValue(E,ee,y)}getPrompts(a){return this.model.getAllAtoms().filter(y=>y.type!=="prompt"?!1:a?!(a.id&&y.placeholderId!==a.id||a.locked&&y.locked!==a.locked||a.correctness==="undefined"&&y.correctness||a.correctness&&y.correctness!==a.correctness):!0).map(y=>y.placeholderId)}setPromptValue(a,y,b){if(y!==void 0){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}const ee=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(ee),this.insert(y,me(Se({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),Mo(this)}setPromptState(a,y,b){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}y==="undefined"?E.correctness=void 0:typeof y=="string"&&(E.correctness=y),typeof b=="boolean"&&(E.locked=b,E.captureSelection=b),Mo(this)}getPromptState(a){const y=this.getPrompt(a);return y?[y.correctness,y.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const y=this.getPrompt(a);return y?this.model.getBranchRange(this.model.offsetOf(y),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(a){var y;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(y=this.host)==null||y.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var a;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var a;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var a;(a=this.undoManager)==null||a.reset()}onSelectionDidChange(){var a,y;const b=this.model;this.keyboardDelegate.setValue(b.getValue(this.model.selection,"latex-expanded"));{const E=b.at(b.position),ee=(a=E.mode)!=null?a:A0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Au(this,"accept",{mode:ee}),b.position=b.offsetOf(E)):this.switchMode(ee))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Vf(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",me(Se({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?E:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),$c(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var a,y,b;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Tu(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(y=this.host)==null||y.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(b=this.host)==null||b.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Mo(this),this.focusBlurInProgress=!1,$h();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Ns(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Xo(this.model.selection));const y=bl(this.field);y&&requestAnimationFrame(()=>{$c(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Mo(this)}onCompositionEnd(a){Ag(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),ra.onCopy(this,a),_l(this.model,Xo(this.model.selection),"deleteByCut"),this.snapshot("cut"),Mo(this))}onCopy(a){ra.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=ra.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),_f(this),Vf(this)}onWheel(a){const y=5*a.deltaX;if(!Number.isFinite(y)||y===0)return;const b=this.field;y<0&&b.scrollLeft===0||y>0&&b.offsetWidth+b.scrollLeft>=b.scrollWidth||(b.scrollBy({top:0,left:y}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let y=a;for(;!y.id&&y.hasChildren;)y=a.children[0];return this.field.querySelector(`[data-atom-id="${y.id}"]`)}get context(){var a,y;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(y=this.options.placeholderSymbol)!=null?y:"\u25A2",colorMap:b=>this.colorMap(b),backgroundColorMap:b=>this.backgroundColorMap(b),getMacro:b=>Ii(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function gp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)gp(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!ht())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(y);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};mc().readAloudElement=a,E.synthesizeSpeech(ee,(re,ae)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(ae!=null&&ae.AudioStream)){console.log("polly.synthesizeSpeech():",ae);return}const fe=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));mc().readAloudMarks=fe.split(`
`).map(ge=>ge?JSON.parse(ge):{}),mc().readAloudTokens=[];for(const ge of mc().readAloudMarks)ge.value&&mc().readAloudTokens.push(ge.value);mc().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(ge,be)=>{if(ge){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${ge}`);return}if(!(be!=null&&be.AudioStream))return;const Ce=new Uint8Array(be.AudioStream),$e=new Blob([Ce.buffer],{type:"audio/mpeg"}),nt=URL.createObjectURL($e),xt=mc();xt.readAloudAudio?xt.readAloudAudio.pause():(xt.readAloudAudio=new Audio,xt.readAloudAudio.addEventListener("ended",()=>{const Tt=xt.readAloudMathfield;xt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Tt?($c(Tt),xt.readAloudElement=null,xt.readAloudMathfield=null,xt.readAloudTokens=[],xt.readAloudMarks=[],xt.readAloudCurrentMark=""):gp(xt.readAloudElement)}),xt.readAloudAudio.addEventListener("timeupdate",()=>{let Tt="";const Tn=xt.readAloudAudio.currentTime*1e3+100;for(const Sr of xt.readAloudMarks)Sr.time<Tn&&(Tt=Sr.value);xt.readAloudCurrentMark!==Tt&&(xt.readAloudCurrentToken=Tt,Tt&&Tt===xt.readAloudFinalToken?xt.readAloudAudio.pause():(xt.readAloudCurrentMark=Tt,Qh(xt.readAloudElement,xt.readAloudCurrentMark)))})),xt.readAloudAudio.src=nt,xt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),xt.readAloudAudio.play()})})}ht()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Wa=new WeakMap,p1=.5,pc={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},is=class Gc extends HTMLElement{static get formAssociated(){return Hu()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(y){y!==this._fontsDirectory&&(this._fontsDirectory=y,ng())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(y){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(y){this._soundsDirectory=y,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(y){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(y){var b,E,ee;this.audioBuffers={},y===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof y=="string"?this._keypressSound={spacebar:y,return:y,delete:y,default:y}:typeof y=="object"&&"default"in y&&(this._keypressSound={spacebar:(b=y.spacebar)!=null?b:y.default,return:(E=y.return)!=null?E:y.default,delete:(ee=y.delete)!=null?ee:y.default,default:y.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(y){this.audioBuffers={},this._plonkSound=y}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(y){this._speechEngine=y}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(y){this._speechEngineRate=y}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(y){this._speechEngineVoice=y}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(y){this._textToSpeechMarkup=y}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(y){this._textToSpeechRules=y}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(y){this._textToSpeechRulesOptions=y}static get locale(){return tt.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),tt.locale=y}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(y){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return tt.strings}static set strings(y){tt.merge(y)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(y){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(y){this._decimalSeparator=y,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(y){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var y,b;if(this._computeEngine===void 0){const E=(y=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(b=this._computeEngine)!=null?b:null}static set computeEngine(y){this._computeEngine=y}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(y){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(y){this._isFunction=y}static loadSound(y){return gc(this,null,function*(){delete this.audioBuffers[y];let b="";switch(y){case"keypress":b=this._keypressSound.default;break;case"return":b=this._keypressSound.return;break;case"spacebar":b=this._keypressSound.spacebar;break;case"delete":b=this._keypressSound.delete;break;case"plonk":b=this.plonkSound;break}if(typeof b!="string")return;b=b.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||b==="none"||b==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${b}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=ae}catch(ee){}})}static playSound(y){return gc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(pc[E])if(pc[E].startsWith("mf."))if(pc[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);else{const ee=pc[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);if(b.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const E of b)console.warn(E);console.groupEnd()}}if(Hu()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[uc("core"),uc("mathfield"),uc("mathfield-element"),uc("ui"),uc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const b=document.createElement("slot");b.style.display="none",this.shadowRoot.appendChild(b)}else this.shadowRoot.innerHTML="<style>"+Hl("core")+Hl("mathfield")+Hl("mathfield-element")+Hl("ui")+Hl("menu")+'</style><span></span><slot style="display:none"></slot>';y&&this._setOptions(y),this.shadowRoot.addEventListener("slotchange",()=>{var b;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(b=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?b:""})}showMenu(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.showMenu(y))!=null?E:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",y=>{var b;y.target===this&&!((b=this._mathfield)!=null&&b.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:y.altKey,button:y.button,buttons:y.buttons,clientX:y.clientX,clientY:y.clientY,ctrlKey:y.ctrlKey,metaKey:y.metaKey,movementX:y.movementX,movementY:y.movementY,relatedTarget:y.relatedTarget,screenX:y.screenX,screenY:y.screenY,shiftKey:y.shiftKey}))},{once:!0})}getPromptValue(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ee:""}setPromptValue(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(y,b,E)}getPromptRange(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptRange(y))!=null?E:null}getPrompts(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPrompts(y))!=null?E:[]}get form(){var y;return(y=this._internals)==null?void 0:y.form}get name(){var y;return(y=this.getAttribute("name"))!=null?y:""}get type(){return this.localName}get mode(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.mode)!=null?b:this.defaultMode==="text"?"text":"math"}set mode(y){var b;(b=this._mathfield)==null||b.switchMode(y)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(y){var b,E;if(!this._mathfield)return;const ee=(E=(b=Gc.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;ee!==null&&this._mathfield.setValue(ee),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
Load the library, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.errors)!=null?b:[]}_getOptions(y){return this._mathfield?zc(this._mathfield.options,y):Wa.has(this)?Se({},zc(Se(Se({},Nf()),Of(Wa.get(this).options)),y)):null}getOptions(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?zc(this._mathfield.options,y):Wa.has(this)?zc(Se(Se({},Nf()),Of(Wa.get(this).options)),y):null}reflectAttributes(){const y=Nf(),b=this._getOptions();Object.keys(Gc.optionsAttributes).forEach(E=>{const ee=jl(E);Gc.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Gc.optionsAttributes[E]==="boolean"?b[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ee]=="string"||typeof b[ee]=="number")&&this.setAttribute(E,b[ee].toString()))})}getOption(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([y])[y]}_getOption(y){return this._getOptions([y])[y]}_setOptions(y){if(this._mathfield)this._mathfield.setOptions(y);else if(Wa.has(this)){const b=Se(Se({},Wa.get(this).options),y);Wa.set(this,me(Se({},Wa.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Wa.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:y,menuItems:void 0});this.reflectAttributes()}setOptions(y){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const b of Object.keys(y))pc[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${pc[b]}`);console.groupEnd(),this._setOptions(y)}executeCommand(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.executeCommand(y))!=null?E:!1}getValue(y,b,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Wa.has(this)){let ae,fe,ge;if(wu(y)?([ae,fe]=y.ranges[0],ge=b):xu(y)?([ae,fe]=y,ge=b):gl(y)&&gl(b)?(ae=y,fe=b,ge=E):(ae=0,fe=-1,ge=y),(ge===void 0||ge==="latex")&&ae===0&&fe===-1)return(re=(ee=Wa.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(Wa.has(this)){const ee=Wa.get(this).options;Wa.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Wd(this);Wa.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.hasFocus())!=null?b:!1}focus(){var y;(y=this._mathfield)==null||y.focus()}blur(){var y;(y=this._mathfield)==null||y.blur()}select(){var y;(y=this._mathfield)==null||y.select()}insert(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?ee:!1}applyStyle(y,b){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(y,b)}queryStyle(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.queryStyle(y))!=null?E:"none"}get caretPoint(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.getCaretPoint())!=null?b:null}set caretPoint(y){var b;y&&((b=this._mathfield)==null||b.setCaretPoint(y.x,y.y))}setCaretPoint(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?ee:!1}offsetFromPoint(y,b,E){return this._mathfield?Rd(this._mathfield,y,b,E):-1}hitboxFromOffset(y){if(!this._mathfield)return null;const b=this._mathfield.model.at(y);if(!b)return null;const E=lc(this._mathfield,b);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var y;(y=this._mathfield)==null||y.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(y){var b,E,ee,re;wl.state==="closed"&&((E=(b=this._mathfield)==null?void 0:b.menu)==null?void 0:E.state)==="closed"&&(y.type==="pointerdown"&&this.onPointerDown(),y.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),y.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var y,b,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,fe=re.userSelect!=="none";if(fe)ae.host.addEventListener("pointerdown",this,!0);else{const Ce=ae.querySelector("span");Ce.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Hu()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),fe&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const ge=ae.querySelector("slot:not([name])");if(ge)try{this._style=ge.assignedElements().filter(Ce=>Ce.tagName.toLowerCase()==="style").map(Ce=>Ce.textContent).join("")}catch(Ce){console.error(Ce)}if(this._style){const Ce=document.createElement("style");Ce.textContent=this._style,ae.appendChild(Ce)}let be="";if(this.hasAttribute("value")?be=this.getAttribute("value"):be=(y=ge==null?void 0:ge.assignedNodes().map(Ce=>Ce.nodeType===3?Ce.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(ae.querySelector(":host > span"),me(Se({},(E=(b=Wa.get(this))==null?void 0:b.options)!=null?E:Wd(this)),{eventSink:this,value:be})),!Wa.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const Ce of Object.keys(Gc.optionsAttributes))this.upgradeProperty(jl(Ce))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Wa.has(this)){const Ce=this._mathfield,$e=Wa.get(this),nt=$e.menuItems;Ce.model.deferNotifications({content:!1,selection:!1},()=>{const xt=$e.value;xt!==void 0&&Ce.setValue(xt),Ce.model.selection=$e.selection,Wa.delete(this)}),nt&&(this.menuItems=nt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Lf()}disconnectedCallback(){var y,b;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const E=zc(this._mathfield.options,Object.keys(Gc.optionsAttributes).map(ee=>jl(ee)));Wa.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(b=(y=this._mathfield.menu)==null?void 0:y.menuItems)!=null?b:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(y){if(this.hasOwnProperty(y)){const b=this[y];delete this[y],(y==="readonly"||y==="read-only")&&(y="readOnly"),this[y]=b}}attributeChangedCallback(y,b,E){if(b===E)return;const ee=E!==null;switch(y){case"contenteditable":Mo(this._mathfield);break;case"disabled":this.disabled=ee;break;case"read-only":case"readonly":this.readOnly=ee;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),Hu()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Hu()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:b})}get disabled(){return this.hasAttribute("disabled")}set disabled(y){var b;const E=!!y;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Hu()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((b=this._mathfield)!=null&&b.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(y){this.setValue(y)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(y){this._setOptions({defaultMode:y})}get macros(){return this._getOption("macros")}set macros(y){this._setOptions({macros:y})}get registers(){const y=this;return new Proxy({},{get:(b,E)=>{if(typeof E=="string")return y._getOption("registers")[E]},set(b,E,ee){return typeof E!="string"?!1:(y._setOptions({registers:me(Se({},y._getOption("registers")),{[E]:ee})}),!0)}})}set registers(y){this._setOptions({registers:y})}get colorMap(){return this._getOption("colorMap")}set colorMap(y){this._setOptions({colorMap:y})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(y){this._setOptions({backgroundColorMap:y})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(y){this._setOptions({letterShapeStyle:y})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(y){this._setOptions({minFontScale:y})}get smartMode(){return this._getOption("smartMode")}set smartMode(y){this._setOptions({smartMode:y})}get smartFence(){return this._getOption("smartFence")}set smartFence(y){this._setOptions({smartFence:y})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(y){this._setOptions({smartSuperscript:y})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(y){this._setOptions({scriptDepth:y})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(y){this._setOptions({removeExtraneousParentheses:y})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(y){this._setOptions({mathModeSpace:y})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(y){this._setOptions({placeholderSymbol:y})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(y){this._setOptions({popoverPolicy:y})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(y){this._setOptions({environmentPopoverPolicy:y})}get menuItems(){var y,b,E;return this._mathfield?(y=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?y:[]:(E=(b=Wa.get(this))==null?void 0:b.menuItems)!=null?E:[]}set menuItems(y){var b;if(this._mathfield){const E=(b=this._mathfield.element)==null?void 0:b.querySelector("[part=menu-toggle]");E&&(E.style.display=y.length===0?"none":""),this._mathfield.menu.menuItems=y}Wa.has(this)?Wa.set(this,me(Se({},Wa.get(this)),{menuItems:y})):Wa.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Wd(this),menuItems:y})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(y){this._setOptions({mathVirtualKeyboardPolicy:y})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(y){this._setOptions({inlineShortcuts:y})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(y){this._setOptions({inlineShortcutTimeout:y})}get keybindings(){return this._getOption("keybindings")}set keybindings(y){this._setOptions({keybindings:y})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(y){this._setOptions({onInlineShortcut:y})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(y){this._setOptions({onScrollIntoView:y})}get onExport(){return this._getOption("onExport")}set onExport(y){this._setOptions({onExport:y})}get readOnly(){return this._getOption("readOnly")}set readOnly(y){this._setOptions({readOnly:y})}get isSelectionEditable(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.isSelectionEditable)!=null?b:!1}setPromptState(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(y,b,E)}getPromptState(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptState(y))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(y){this._setOptions({virtualKeyboardTargetOrigin:y})}get selection(){return this._mathfield?this._mathfield.model.selection:Wa.has(this)?Wa.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(y){if(typeof y=="number"&&(y={ranges:[[y,y]]}),this._mathfield){this._mathfield.model.selection=y,Mo(this._mathfield);return}if(Wa.has(this)){Wa.set(this,me(Se({},Wa.get(this)),{selection:y}));return}Wa.set(this,{value:void 0,selection:y,options:Wd(this),menuItems:void 0})}get selectionIsCollapsed(){const y=this.selection;return y.ranges.length===1&&y.ranges[0][0]===y.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Wa.has(this)?Wa.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Mo(this._mathfield)),Wa.has(this)){Wa.set(this,me(Se({},Wa.get(this)),{selection:{ranges:[[y,y]]}}));return}Wa.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Wd(this),menuItems:void 0})}getOffsetDepth(y){var b,E;return this._mathfield?((E=(b=this._mathfield.model.at(y))==null?void 0:b.treeDepth)!=null?E:2)-2:0}get lastOffset(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.lastOffset)!=null?b:-1}};is.version="0.98.5",is._fontsDirectory="./fonts",is._soundsDirectory="./sounds",is.keypressVibration=!0,is._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},is._plonkSound="plonk.wav",is.audioBuffers={},is.createHTML=a=>a,is._speechEngineRate="100%",is._speechEngineVoice="Joanna",is._textToSpeechMarkup="",is._textToSpeechRules="mathlive",is._textToSpeechRulesOptions={},is.speakHook=r1,is.readAloudHook=h1,is._decimalSeparator=".",is.fractionNavigationOrder="numerator-denominator",is._isFunction=a=>{var y,b;const E=window.MathfieldElement.computeEngine;return(b=(y=E==null?void 0:E.parse(a).domain)==null?void 0:y.isFunction)!=null?b:!1};var Hd=is;function jl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Wd(a){const y={readOnly:!1},b=Hd.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ee!=null?ee:"":b[E]==="boolean"?y[jl(E)]=!0:b[E]==="on/off"?ee==="on"?y[jl(E)]=!0:ee==="off"?y[jl(E)]=!1:y[jl(E)]=void 0:b[E]==="number"?y[jl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[jl(E)]=ee}}),y}function Hu(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Hd,yp,bp,xp,wp;if(ht()&&!((yp=window.customElements)!=null&&yp.get("math-field"))){(xp=window[bp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[bp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Hd,(wp=window.customElements)==null||wp.define("math-field",Hd)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const ae=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const fe=ae.data;let ge=!0,be=0,Ce;Ce=fe.indexOf(y),Ce!==-1&&(be=Ce,be>0&&re.push({type:"text",data:fe.slice(0,be)}),ge=!1);let $e=!1;for(;!$e;){if(ge){if(Ce=fe.indexOf(y,be),Ce===-1){$e=!0;break}be!==Ce&&re.push({type:"text",data:fe.slice(be,Ce)}),be=Ce}else{if(Ce=m1(b,fe,be+y.length),Ce===-1){$e=!0;break}let nt=fe.slice(be+y.length,Ce);ee==="ascii-math"&&([,nt]=Oc(nt,{format:"ascii-math"})),re.push({type:"math",data:nt,rawData:fe.slice(be,Ce+b.length),mathstyle:E}),be=Ce+b.length}ge=!ge}be<fe.length&&re.push({type:"text",data:fe.slice(be)})}else re.push(ae);return re}function Sp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function g1(a,y){const b=document.createElement("span");b.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+y.renderToMathML(a)+"</math>";b.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),b.textContent=a}return b.className="ML__sr-only",b}function v1(a,y,b,E){try{const ee=y.renderToMarkup(a,{mathstyle:b,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=b==="displaystyle"?"flex":"inline-flex",re.setAttribute("aria-hidden","true"),re.setAttribute("translate","no"),re.innerHTML=window.MathfieldElement.createHTML(ee),re}catch(ee){if(console.error("Could not parse'"+a+"' with ",ee),E)return document.createTextNode(a)}return null}function Wu(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),ae=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const fe=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&fe.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const ge=document.createElement("span");ge.setAttribute("translate","no");const be=b.renderToSpeakableText(a);ge.innerHTML=window.MathfieldElement.createHTML(be),ge.className="ML__sr-only",fe.append(ge)}return fe.append(re),fe}return re}function y1(a,y){var b,E,ee;let re=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Wu(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=Sp(a,(E=y.TeX)==null?void 0:E.delimiters,(ee=y.asciiMath)==null?void 0:ee.delimiters);if(ae.length===1&&ae[0].type==="text")return null;re=document.createDocumentFragment();for(const fe of ae)if(fe.type==="text")re.appendChild(document.createTextNode(fe.data));else{const ge=Wu(fe.data,fe.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);ge&&re.appendChild(ge)}}return re}function Cp(a,y){var b,E,ee,re,ae,fe,ge,be,Ce,$e,nt,xt,Tt,Tn,Sr,_n;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const tr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(tr)){a.textContent="";const cr=Wu(tr,"",y,!0);cr&&a.append(cr);return}const kr=Sp(tr,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(kr.length===1&&kr[0].type==="math"){a.textContent="";const cr=Wu(kr[0].data,kr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);cr&&a.append(cr);return}if(kr.length===1&&kr[0].type==="text")return}for(let tr=a.childNodes.length-1;tr>=0;tr--){const kr=a.childNodes[tr];if(kr.nodeType===3){const cr=y1((ae=kr.textContent)!=null?ae:"",y);cr&&(tr+=cr.childNodes.length-1,kr.replaceWith(cr))}else if(kr.nodeType===1){const cr=kr,si=kr.nodeName.toLowerCase();if(si==="script"){const Ti=kr;let bi;if((fe=y.processScriptTypePattern)!=null&&fe.test(Ti.type))bi=(ge=Ti.textContent)!=null?ge:"";else if((be=y.processMathJSONScriptTypePattern)!=null&&be.test(Ti.type))try{bi=($e=y.serializeToLatex)==null?void 0:$e.call(y,JSON.parse((Ce=Ti.textContent)!=null?Ce:""))}catch(Fa){console.error(Fa)}if(bi){let Fa="textstyle";for(const Or of Ti.type.split(";")){const[Fs,kl]=Or.toLowerCase().split("=");Fs.trim()==="mode"&&(Fa=kl.trim()==="display"?"displaystyle":"textstyle")}const io=Wu(bi,Fa,y,!0);io&&Ti.parentNode.replaceChild(io,Ti)}}else if(((xt=(nt=y.processClassPattern)==null?void 0:nt.test(cr.className))!=null?xt:!1)||!((Tn=(Tt=y.skipTags)==null?void 0:Tt.includes(si))!=null&&Tn||(_n=(Sr=y.ignoreClassPattern)==null?void 0:Sr.test(cr.className))!=null&&_n))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const bi=a.textContent;a.textContent="";const Fa=Wu(bi!=null?bi:"","displaystyle",y,!0);Fa&&a.append(Fa)}else Cp(cr,y)}}}var b1={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function x1(a,y){var b,E,ee,re;try{const ae=Se(Se({},b1),y);ae.ignoreClassPattern=new RegExp((b=ae.ignoreClass)!=null?b:""),ae.processClassPattern=new RegExp((E=ae.processClass)!=null?E:""),ae.processScriptTypePattern=new RegExp((ee=ae.processScriptType)!=null?ee:""),ae.processMathJSONScriptTypePattern=new RegExp((re=ae.processMathJSONScriptType)!=null?re:""),Lf(),ks("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function w1(a,y){const b=fc.singleton;return b?(b.show(),Id(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function S1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Ls({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function mc(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function I1(a){E1(document.body,a)}function C1(a){if(typeof a=="string"){const y=document.getElementById(a);if(y===null)throw new Error(`The element with ID "${a}" could not be found.`);return y}return typeof a=="string"?null:a}function E1(a,y){var b,E,ee,re;const ae=C1(a);if(!ae)return;const fe=y!=null?y:{};(b=fe.renderToMarkup)!=null||(fe.renderToMarkup=Jo),(E=fe.renderToMathML)!=null||(fe.renderToMathML=Rv),(ee=fe.renderToSpeakableText)!=null||(fe.renderToSpeakableText=Bv),(re=fe.serializeToLatex)!=null||(fe.serializeToLatex=$v),x1(ae,fe)}var D1={mathlive:"0.98.5"}},17423:function(Ln,en,se){"use strict";se.d(en,{Z:function(){return Se}});const ce=me=>typeof me=="object"&&me!=null&&me.nodeType===1,Ue=(me,Pe)=>(!Pe||me!=="hidden")&&me!=="visible"&&me!=="clip",Fe=(me,Pe)=>{if(me.clientHeight<me.scrollHeight||me.clientWidth<me.scrollWidth){const st=getComputedStyle(me,null);return Ue(st.overflowY,Pe)||Ue(st.overflowX,Pe)||(Re=>{const Et=(ht=>{if(!ht.ownerDocument||!ht.ownerDocument.defaultView)return null;try{return ht.ownerDocument.defaultView.frameElement}catch(lt){return null}})(Re);return!!Et&&(Et.clientHeight<Re.scrollHeight||Et.clientWidth<Re.scrollWidth)})(me)}return!1},it=(me,Pe,st,Re,Et,ht,lt,et)=>ht<me&&lt>Pe||ht>me&&lt<Pe?0:ht<=me&&et<=st||lt>=Pe&&et>=st?ht-me-Re:lt>Pe&&et<st||ht<me&&et>st?lt-Pe+Et:0,ve=me=>{const Pe=me.parentElement;return Pe==null?me.getRootNode().host||null:Pe},Le=(me,Pe)=>{var st,Re,Et,ht;if(typeof document=="undefined")return[];const{scrollMode:lt,block:et,inline:ke,boundary:vt,skipOverflowHiddenElements:jt}=Pe,tt=typeof vt=="function"?vt:fn=>fn!==vt;if(!ce(me))throw new TypeError("Invalid target");const ut=document.scrollingElement||document.documentElement,Ee=[];let we=me;for(;ce(we)&&tt(we);){if(we=ve(we),we===ut){Ee.push(we);break}we!=null&&we===document.body&&Fe(we)&&!Fe(document.documentElement)||we!=null&&Fe(we,jt)&&Ee.push(we)}const je=(Re=(st=window.visualViewport)==null?void 0:st.width)!=null?Re:innerWidth,Ye=(ht=(Et=window.visualViewport)==null?void 0:Et.height)!=null?ht:innerHeight,{scrollX:Lt,scrollY:Ct}=window,{height:Bt,width:at,top:Vt,right:$t,bottom:xn,left:dt}=me.getBoundingClientRect(),{top:on,right:En,bottom:yn,left:Ge}=(fn=>{const ot=window.getComputedStyle(fn);return{top:parseFloat(ot.scrollMarginTop)||0,right:parseFloat(ot.scrollMarginRight)||0,bottom:parseFloat(ot.scrollMarginBottom)||0,left:parseFloat(ot.scrollMarginLeft)||0}})(me);let De=et==="start"||et==="nearest"?Vt-on:et==="end"?xn+yn:Vt+Bt/2-on+yn,Zt=ke==="center"?dt+at/2-Ge+En:ke==="end"?$t+En:dt-Ge;const In=[];for(let fn=0;fn<Ee.length;fn++){const ot=Ee[fn],{height:ft,width:Jt,top:Bn,right:wn,bottom:Nt,left:Xt}=ot.getBoundingClientRect();if(lt==="if-needed"&&Vt>=0&&dt>=0&&xn<=Ye&&$t<=je&&Vt>=Bn&&xn<=Nt&&dt>=Xt&&$t<=wn)return In;const Dn=getComputedStyle(ot),Mn=parseInt(Dn.borderLeftWidth,10),Te=parseInt(Dn.borderTopWidth,10),de=parseInt(Dn.borderRightWidth,10),le=parseInt(Dn.borderBottomWidth,10);let pe=0,he=0;const oe="offsetWidth"in ot?ot.offsetWidth-ot.clientWidth-Mn-de:0,Ie="offsetHeight"in ot?ot.offsetHeight-ot.clientHeight-Te-le:0,Je="offsetWidth"in ot?ot.offsetWidth===0?0:Jt/ot.offsetWidth:0,_t="offsetHeight"in ot?ot.offsetHeight===0?0:ft/ot.offsetHeight:0;if(ut===ot)pe=et==="start"?De:et==="end"?De-Ye:et==="nearest"?it(Ct,Ct+Ye,Ye,Te,le,Ct+De,Ct+De+Bt,Bt):De-Ye/2,he=ke==="start"?Zt:ke==="center"?Zt-je/2:ke==="end"?Zt-je:it(Lt,Lt+je,je,Mn,de,Lt+Zt,Lt+Zt+at,at),pe=Math.max(0,pe+Ct),he=Math.max(0,he+Lt);else{pe=et==="start"?De-Bn-Te:et==="end"?De-Nt+le+Ie:et==="nearest"?it(Bn,Nt,ft,Te,le+Ie,De,De+Bt,Bt):De-(Bn+ft/2)+Ie/2,he=ke==="start"?Zt-Xt-Mn:ke==="center"?Zt-(Xt+Jt/2)+oe/2:ke==="end"?Zt-wn+de+oe:it(Xt,wn,Jt,Mn,de+oe,Zt,Zt+at,at);const{scrollLeft:Kt,scrollTop:Ht}=ot;pe=_t===0?0:Math.max(0,Math.min(Ht+pe/_t,ot.scrollHeight-ft/_t+Ie)),he=Je===0?0:Math.max(0,Math.min(Kt+he/Je,ot.scrollWidth-Jt/Je+oe)),De+=Ht-pe,Zt+=Kt-he}In.push({el:ot,top:pe,left:he})}return In},Me=me=>me===!1?{block:"end",inline:"nearest"}:(Pe=>Pe===Object(Pe)&&Object.keys(Pe).length!==0)(me)?me:{block:"start",inline:"nearest"};function Se(me,Pe){if(!me.isConnected||!(Et=>{let ht=Et;for(;ht&&ht.parentNode;){if(ht.parentNode===document)return!0;ht=ht.parentNode instanceof ShadowRoot?ht.parentNode.host:ht.parentNode}return!1})(me))return;const st=(Et=>{const ht=window.getComputedStyle(Et);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(me);if((Et=>typeof Et=="object"&&typeof Et.behavior=="function")(Pe))return Pe.behavior(Le(me,Pe));const Re=typeof Pe=="boolean"||Pe==null?void 0:Pe.behavior;for(const{el:Et,top:ht,left:lt}of Le(me,Me(Pe))){const et=ht-st.top+st.bottom,ke=lt-st.left+st.right;Et.scroll({top:et,left:ke,behavior:Re})}}}}]);
}());