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__Classrooms__Lists__Board...

3527 lines
1.8 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 iu=Math.pow;var Bu=(kn,Vt,ae)=>new Promise((fe,Fe)=>{var Be=Ce=>{try{ve(ae.next(Ce))}catch(_e){Fe(_e)}},Ye=Ce=>{try{ve(ae.throw(Ce))}catch(_e){Fe(_e)}},ve=Ce=>Ce.done?fe(Ce.value):Promise.resolve(Ce.value).then(Be,Ye);ve((ae=ae.apply(kn,Vt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[43442],{52310:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},18299:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},84249:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},42922:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},90674:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},25877:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},63237:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},99569:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},33859:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},22751:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},24018:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},40043:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},38308:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},17663:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},91034:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},72395:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},53978:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return _e}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(ge,Te){return Fe.createElement(ve.Z,(0,fe.Z)({},ge,{ref:Te,icon:Ye}))},_e=Fe.forwardRef(Ce)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(kn,Vt){"use strict";Vt.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 kn={},Vt="5.0",ae={},fe=null,Fe=!1,Be=!1,Ye=null,ve=!1,Ce=null,_e=null,we=0;we<arguments.length;we++){var ge=arguments[we];if(ge!==null)switch(typeof ge){case"number":Vt=ge.toFixed(1);break;case"string":ge.match(new RegExp("^[0-9]\\.[0-9]+$"))?Vt=ge:Ye=ge;break;case"object":typeof ge.is3D!="undefined"?fe=ge:ae=ge;break;case"boolean":Fe=ge,Be=!0;break}}fe===null&&(fe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ae.material_id!==void 0&&!Be&&(Fe=!0)),Ye!==null&&ae.id===void 0&&(ae.id=Ye);var Te="",ft="",Re=!1,bt=null,ht=null,st=null,tt=!1,Le=null,xt=null,on=null,it=null,yt=null;ae.height!==void 0&&(ae.height=Math.round(ae.height)),ae.width!==void 0&&(ae.width=Math.round(ae.width));var Ee=function(Qe){return parseFloat(Qe)>4?parseFloat(Qe):5};kn.setHTML5Codebase=function(Qe,ut){_e=Qe,mt(Qe,ut)},kn.setJavaCodebase=kn.setJavaCodebaseVersion=kn.isCompiledInstalled=kn.setPreCompiledScriptPath=kn.setPreCompiledResourcePath=function(){},kn.setHTML5CodebaseVersion=function(Qe,ut){var Yt=parseFloat(Qe);if(Yt!==NaN&&Yt<5){console.log("The GeoGebra HTML5 codebase version "+Yt+" is deprecated. Using version latest instead.");return}Ce=Qe,Me(Qe,ut)},kn.getHTML5CodebaseVersion=function(){return ht},kn.getParameters=function(){return ae},kn.setFontsCSSURL=function(Qe){it=Qe},kn.setGiacJSURL=function(Qe){},kn.setJNLPFile=function(Qe){Te=Qe},kn.setJNLPBaseDir=function(Qe){},kn.inject=function(){function Qe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ut="auto",Yt=ae.id,Qt,tn=!1,_t=0;_t<arguments.length;_t++){var en=arguments[_t];typeof en=="string"?(en=en.toLowerCase(),en.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ut=en:Yt=arguments[_t]):typeof en=="boolean"?tn=en:en instanceof HTMLElement&&(Qt=en)}Cn();function Cn(){if(!ve){setTimeout(Cn,200);return}ut=cn(ut);var On=Qt||document.getElementById(Yt);if(!On){console.log("possibly bug on ajax loading? ");return}if(kn.removeExistingApplet(On,!1),ae.width===void 0&&On.clientWidth&&(ae.width=On.clientWidth),ae.height===void 0&&On.clientHeight&&(ae.height=On.clientHeight),!(ae.width&&ae.height)&&ut==="html5"&&(delete ae.width,delete ae.height),bt=ut,ut==="screenshot")pt(On,ae);else{var $e=!1;ae.hasOwnProperty("playButton")&&ae.playButton||ae.hasOwnProperty("clickToLoad")&&ae.clickToLoad?$e=!0:ae.hasOwnProperty("playButtonAutoDecide")&&ae.playButtonAutoDecide&&($e=(!de()||Qe())&&je()),$e?(bt="screenshot",rt(On,ae,tn,ut)):kt(On,ae,tn)}}};function de(){try{return window.self!==window.top}catch(Qe){return!0}}function je(){return ae.hasOwnProperty("screenshotGenerator")&&ae.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}kn.getViews=function(){return fe},kn.isJavaInstalled=function(){return!1};var ze=function(Qe){var ut=function(_t){var en=JSON.parse(_t),Cn=function(ce){return ce.type=="G"||ce.type=="E"},On=en.elements?en.elements.filter(Cn)[0]:en;if(!On||!On.url){Yt();return}ae.fileName=On.url,At(On.settings||{}),fe.is3D=!0;var $e="https://www.geogebra.org/images/";kn.setPreviewImage(Le||On.previewUrl,$e+"GeoGebra_loading.png",$e+"applet_play.png"),Qe()},Yt=function(){ae.onError&&ae.onError(),Gt("Error: Fetching material (id "+ae.material_id+") failed.",ae)},Qt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",tn="/materials/"+ae.material_id+"?scope=basic";ct("https://"+Qt+"/api/proxy.php?path="+encodeURIComponent(tn),ut,Yt)};function At(Qe){var ut=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Yt){Qe[Yt]=!!Qe[Yt]}),ut.forEach(function(Yt){ae[Yt]===void 0&&Qe[Yt]!==void 0&&(ae[Yt]=Qe[Yt])}),ae.showToolBarHelp===void 0&&(ae.showToolBarHelp=ae.showToolBar)}function ct(Qe,ut,Yt){var Qt=new XMLHttpRequest;Qt.open("GET",Qe),Qt.onload=function(){ut(Qt.responseText)},Qt.onerror=Yt,Qt.send()}kn.isHTML5Installed=function(){return!0},kn.getLoadedAppletType=function(){return bt},kn.setPreviewImage=function(Qe,ut,Yt){Le=Qe,xt=ut,on=Yt},kn.removeExistingApplet=function(Qe,ut){var Yt;typeof Qe=="string"&&(Qe=document.getElementById(Qe)),bt=null;var Qt=null;for(Yt=0;Yt<Qe.childNodes.length;Yt++){var tn=Qe.childNodes[Yt],_t=tn.className;_t==="applet_screenshot"?ut?(tn.style.display="block",bt="screenshot"):tn.style.display="none":_t!=="applet_scaler prerender"&&(Qe.removeChild(tn),Qt=_t&&_t.indexOf("appletParameters")!=-1?tn.id:null,Yt--)}var en=ae.id!==void 0?ae.id:Qt,Cn=window[en];Cn&&typeof Cn.getBase64=="function"&&(Cn.remove(),window[en]=null)},kn.refreshHitPoints=function(){if(Ee(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Qe=kn.getAppletObject();return Qe&&typeof Qe.recalculateEnvironments=="function"?(Qe.recalculateEnvironments(),!0):!1},kn.startAnimation=function(){var Qe=kn.getAppletObject();return Qe&&typeof Qe.startAnimation=="function"?(Qe.startAnimation(),!0):!1},kn.stopAnimation=function(){var Qe=kn.getAppletObject();return Qe&&typeof Qe.stopAnimation=="function"?(Qe.stopAnimation(),!0):!1},kn.getAppletObject=function(){var Qe=ae.id!==void 0?ae.id:"ggbApplet";return window[Qe]},kn.resize=function(){};var lt=function(Qe,ut,Yt){var Qt=document.createElement("param");Qt.setAttribute("name",ut),Qt.setAttribute("value",Yt),Qe.appendChild(Qt)},Ze=function(Qe){return Qe&&Qe!=="false"},kt=function(Qe,ut,Yt){Ee(ht)<=4.2&&(Yt=!0);var Qt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ht||ggbHTML5LoadedCodebaseIsWebSimple&&!tt)&&(Qt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var tn=document.createElement("div");tn.classList.add("appletParameters","notranslate");var _t=ut.width,en=ut.height;if(ut.disableAutoScale=ut.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ut.disableAutoScale,ut.width!==void 0)if(Ee(ht)<=4.4)Ze(ut.showToolBar)&&(ut.height-=7),Ze(ut.showAlgebraInput)&&(ut.height-=37),ut.width<605&&Ze(ut.showToolBar)&&(ut.width=605,_t=605);else{var Cn=100;(Ze(ut.showToolBar)||Ze(ut.showMenuBar))&&(ut.hasOwnProperty("customToolBar")&&(ut.customToolbar=ut.customToolBar),Cn=Ze(ut.showMenuBar)?245:155),_t<Cn&&(ut.width=Cn,_t=Cn)}tn.style.border="none",tn.style.display="inline-block";for(var On in ut)ut.hasOwnProperty(On)&&On!=="appletOnLoad"&&tn.setAttribute("data-param-"+On,ut[On]);it&&tn.setAttribute("data-param-fontscssurl",it),kn.resize=function(){GGBAppletUtils.responsiveResize(Qe,ut)},window.addEventListener("resize",function(rn){kn.resize()});var $e=typeof ut.appletOnLoad=="function"?ut.appletOnLoad:function(){};if(!Yt&&ut.width!==void 0){ut.hasOwnProperty("showSplash")||tn.setAttribute("data-param-showSplash","false");var ce=Qe.querySelector(".applet_scaler.prerender"),le=ce!==null;if(le)var me=ce.querySelector(".ggb_preview");else{var me=pn(_t,en,ut.borderColor,!1);ce=document.createElement("div"),ce.className="applet_scaler",ce.style.position="relative",ce.style.display="block",ce.style.width=_t+"px",ce.style.height=en+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ce,"66%"),Ee(ht)>=5?(ut.appletOnLoad=function(rn){var qn=Qe.querySelector(".ggb_preview");qn&&qn.parentNode.removeChild(qn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ce),window.GGBT_wsf_view&&$(window).trigger("resize"),$e(rn)},le||ce.appendChild(me)):tn.appendChild(me),ce.appendChild(tn),le||Qe.appendChild(ce),setTimeout(function(){kn.resize()},1)}else{var he=document.createElement("div");he.className="applet_scaler",he.style.position="relative",he.style.display="block",he.appendChild(tn),Qe.appendChild(he),ut.appletOnLoad=function(rn){kn.resize(),$e(rn)}}function se(rn,qn){qn&&typeof qn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(rn,qn.appletOnLoad):renderGGBElement(rn),Gt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",qn)}function Ie(rn,qn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:rn,params:qn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(lr){se(lr.article,lr.params)}),html5AppletsToProcess=null)},Ee(ht)<5&&(rn.className+=" geogebraweb")):se(rn,qn)}if(Qt){scriptLoadStarted=!0;for(var et=0;et<tn.childNodes.length;et++){var $t=tn.childNodes[et].tagName;$t==="TABLE"&&(tn.removeChild(tn.childNodes[et]),et--)}if(ggbHTML5LoadedScript!==null){var Ht=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ht!=null&&Ht.parentNode.removeChild(Ht)}var Xt=document.createElement("script"),jt=function(){Ie(tn,ut)};Xt.src=ft+st,ggbHTML5LoadedCodebaseIsWebSimple=tt,ggbHTML5LoadedCodebaseVersion=ht,ggbHTML5LoadedScript=Xt.src,Gt("GeoGebra HTML5 codebase loaded: '"+ft+"'.",ut),!_e&&(!Ce||Ce=="5.0")?(tt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),jt()):ft.requirejs?__webpack_require__.e(12).then(function(){var rn=[__webpack_require__(12)];jt.apply(null,rn)}.bind(this)).catch(__webpack_require__.oe):(Xt.onload=jt,Qe.appendChild(Xt))}else Ie(tn,ut);ut.height=en,ut.width=_t},pt=function(Qe,ut,Yt){var Qt=pn(ut.width,ut.height,ut.borderColor,Yt),tn=document.createElement("div");tn.style.position="relative",tn.style.display="block",tn.style.width=ut.width+"px",tn.style.height=ut.height+"px",tn.className="applet_screenshot applet_scaler"+(Yt?" applet_screenshot_play":""),tn.appendChild(Qt);var _t=GGBAppletUtils.getScale(ut,Qe,Yt);Yt?(Qe.appendChild(qt()),window.GGBT_wsf_view||(Qe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(tn,"66%"),Qe.appendChild(tn),_t!==1&&!isNaN(_t)&&(GGBAppletUtils.scaleElement(tn,_t),tn.style.width=ut.width+"px",tn.style.height=ut.height+"px",tn.parentNode.style.width=ut.width*_t+"px",tn.parentNode.style.height=ut.height*_t+"px"),kn.resize=function(){nn(Qe,Qt,tn,Yt)},window.addEventListener("resize",function(en){kn.resize()}),kn.resize()};function nn(Qe,ut,Yt,Qt){if(Qe.contains(ut)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Qe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Qe)}var tn=GGBAppletUtils.getScale(ae,Qe,Qt);Yt.parentNode!==null&&(!isNaN(tn)&&tn!==1?(GGBAppletUtils.scaleElement(Yt,tn),Yt.parentNode.style.width=ae.width*tn+"px",Yt.parentNode.style.height=ae.height*tn+"px"):(GGBAppletUtils.scaleElement(Yt,1),Yt.parentNode.style.width=ae.width+"px",Yt.parentNode.style.height=ae.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Qe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}kn.onExitFullscreen=function(Qe,ut){ut.appendChild(Qe)};var rt=function(Qe,ut,Yt,Qt){pt(Qe,ut,!0);for(var tn=function(){var Cn=[];for(en=0;en<Qe.childNodes.length;en++)Cn.push(Qe.childNodes[en]);if(window.GGBT_wsf_view){var On=window.GGBT_wsf_view.renderFullScreen(Qe,ut.id),$e=document.getElementById("fullscreencontainer"),ce=jQuery(Qe).find(".fullscreencontent");ce.length>0?(On.remove(),ce.attr("id","fullscreencontent").show(),jQuery($e).append(ce),window.dispatchEvent(new Event("resize"))):kt(On,ut,!1),window.GGBT_wsf_view.launchFullScreen($e)}else bt=Qt,kt(Qe,ut,!1);if(!window.GGBT_wsf_view)for(en=0;en<Cn.length;en++)Qe.removeChild(Cn[en])},_t=Qe.getElementsByClassName("ggb_preview_play"),en=0;en<_t.length;en++)_t[en].addEventListener("click",tn,!1),_t[en].addEventListener("ontouchstart",tn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Qe),je()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},qt=function(){var Qe=document.createElement("div");if(Qe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ut='.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");}',Yt=document.createElement("style");Yt.styleSheet?Yt.styleSheet.cssText=ut:Yt.appendChild(document.createTextNode(ut)),document.getElementsByTagName("head")[0].appendChild(Yt)}return Qe},pn=function(Qe,ut,Yt,Qt){var tn=document.createElement("div");tn.className="ggb_preview",tn.style.position="absolute",tn.style.zIndex="90",tn.style.width=Qe-2+"px",tn.style.height=ut-2+"px",tn.style.top="0px",tn.style.left="0px",tn.style.overflow="hidden",tn.style.backgroundColor="white";var _t="lightgrey";Yt!==void 0&&(Yt==="none"?_t="transparent":_t=Yt),tn.style.border="1px solid "+_t;var en=document.createElement("img");if(en.style.position="relative",en.style.zIndex="1000",en.style.top="-1px",en.style.left="-1px",Le!==null&&en.setAttribute("src",Le),en.style.opacity=.7,xt!==null){var Cn,On,$e;if(!Qt){Cn=document.createElement("img"),Cn.style.position="absolute",Cn.style.zIndex="1001",Cn.style.opacity=1,en.style.opacity=.3,On=360,On>Qe/4*3&&(On=Qe/4*3),$e=On/5.8,Cn.setAttribute("src",xt),Cn.setAttribute("width",On),Cn.setAttribute("height",$e);var ce=(Qe-On)/2,le=(ut-$e)/2;Cn.style.left=ce+"px",Cn.style.top=le+"px",tn.appendChild(Cn)}}return tn.appendChild(en),tn},cn=function(Qe){return Qe=Qe.toLowerCase(),Qe==="html5"||Qe==="screenshot"?Qe:"html5"},Xe=["web","webSimple","web3d","tablet","tablet3d","phone"],Me=function(Qe,ut){if(ht=Qe,ut){mt(ht,!0);return}var Yt=!Fe;if(Yt){var Qt=Ee(ht);!isNaN(Qt)&&Qt<4.4&&(Yt=!1)}var tn,_t;window.location.protocol.substr(0,4)==="http"?tn=window.location.protocol:tn="http:";var en=ht.indexOf("//");en>0?_t=ht:en===0?_t=tn+ht:_t="https://www.geogebra.org/apps/5.2.814.0/";for(var Cn in Xe)if(ht.slice(Xe[Cn].length*-1)===Xe[Cn]||ht.slice((Xe[Cn].length+1)*-1)===Xe[Cn]+"/"){mt(_t,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Yt&&!fe.is3D&&!fe.AV&&!fe.SV&&!fe.CV&&!fe.EV2&&!fe.CP&&!fe.PC&&!fe.DA&&!fe.FI&&!fe.PV&&!Ze(ae.showToolBar)&&!Ze(ae.showMenuBar)&&!Ze(ae.showAlgebraInput)&&!Ze(ae.enableRightClick)&&(!ae.appName||ae.appName=="classic")?_t+="webSimple/":_t+="web3d/",mt(_t,!1)},mt=function(Qe,ut){if(Qe.requirejs){ft=Qe;return}Qe.slice(-1)!=="/"&&(Qe+="/"),ft=Qe,ut===null&&(ut=Qe.indexOf("http")===-1),Re=ut,st="web.nocache.js",tt=!1;var Yt=ft.split("/");Yt.length>1&&(!ut&&Yt[Yt.length-2]==="webSimple"?(st="webSimple.nocache.js",tt=!0):Xe.indexOf(Yt[Yt.length-2])>=0&&(st=Yt[Yt.length-2]+".nocache.js")),Yt=Qe.split("/"),ht=Yt[Yt.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 Qt=parseFloat(ht);Qt!==NaN&&Qt<5&&Qe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Qt+" is deprecated. Using version latest instead."),Me("5.0",ut))},Gt=function(Qe,ut){window.console&&window.console.log&&(!ut||typeof ut.showLogging=="undefined"||ut.showLogging&&ut.showLogging!=="false")&&console.log(Qe)};ae.material_id!==void 0?ze(hn):hn();function hn(){var Qe=Vt;Ce!==null?Qe=Ce:parseFloat(Qe)<5&&(Qe="5.0"),Me(Qe,!1),_e!==null&&mt(_e,Re),ve=!0}return kn},GGBAppletUtils=function(){"use strict";function kn(){return window.GGBT_wsf_edit!==void 0}function Vt(ve,Ce){Ce!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+Ce+","+Ce+")",ve.style.webkitTransform="scale("+Ce+","+Ce+")",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 ae(ve,Ce,_e,we,ge,Te){var ft=null;if(Te!=null&&Te!="")for(var Re=ve.parentNode;Re!=null;)if((" "+Re.className+" ").indexOf(" "+Te+" ")>-1){ft=Re;break}else Re=Re.parentNode;var bt=0,ht=0,st=0,tt=0,Le=0,xt=0,on=0;if(ft)bt=ft.offsetWidth,ht=Math.max(we?ft.offsetWidth:0,ft.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(bt=Math.min(window.innerWidth,document.documentElement.clientWidth),ht=Math.min(window.innerHeight,document.documentElement.clientHeight),st=bt):(bt=window.innerWidth,ht=window.innerHeight,st=window.innerWidth),ve){var it=ve.getBoundingClientRect();it.left>0&&it.left<=bt&&(ge===void 0||!ge)&&(document.dir==="rtl"?(Le=bt-it.width-it.left,xt=st<=480?10:30):(xt=it.left,Le=st<=480?10:30),tt=xt+Le)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var yt=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(tt=40,on=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(tt=0,on=40)}}return ve&&((_e===void 0||!_e)&&Ce>0&&Ce+tt<bt?bt=Ce:bt-=tt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(_e===void 0||!_e)&&(ht-=on)),{width:bt,height:ht}}function fe(ve,Ce,_e,we,ge){if(ve.isScreenshoGenerator)return 1;var Te=we!==void 0&&we,ft=ve.noScaleMargin!=null&&ve.noScaleMargin,Re=function(yt){return yt&&yt!=="false"},bt=Re(ve.autoHeight),ht=ae(Ce,ve.width,_e,bt,Te&&window.GGBT_wsf_view||ft,ge),st=parseInt(ht.width),tt=ve.width,Le=ve.height;if(tt===void 0){var xt=Ce.querySelector(".appletParameters");xt&&(tt=xt.offsetWidth,Le=xt.offsetHeight)}var on=st/tt,it=Te?1:ht.height/Le;return _e!==void 0&&!_e&&(on=Math.min(1,on),it=Math.min(1,it)),Math.min(on,it)}function Fe(ve,Ce,_e){var we=1,ge,Te=!1;if(ve.hasOwnProperty("allowUpscale")&&(Te=ve.allowUpscale),ve.hasOwnProperty("scale")&&(we=parseFloat(ve.scale),(isNaN(we)||we===null||we===0)&&(we=1),we>1&&(Te=!0)),Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Te=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))ge=fe(ve,Ce,Te,_e,ve.scaleContainerClass);else return we;return Te&&(!ve.hasOwnProperty("scale")||we===1)?ge:Math.min(we,ge)}function Be(ve){var Ce=Math.min(window.innerWidth,document.documentElement.clientWidth),_e=Math.min(window.innerHeight,document.documentElement.clientHeight),we=ve.getBoundingClientRect(),ge=(Ce-we.width)/2,Te=(_e-we.height)/2;Te<0&&(Te=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ge<40?ve.style.left="40px":ve.style.left=ge+"px",ve.style.top=Te+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Te<40?ve.style.top="40px":ve.style.top=Te+"px",ve.style.left=ge+"px")}function Ye(ve,Ce){var _e=ve.querySelector(".appletParameters");if(_e){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ce.id!==_e.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(_e.parentElement&&/fullscreen/.test(_e.parentElement.className))return;var we=Fe(Ce,ve);kn()&&_e.setAttribute("data-param-scale",we);for(var ge=null,Te=0;Te<ve.childNodes.length;Te++)if(ve.childNodes[Te].className!==void 0&&ve.childNodes[Te].className.match(/^applet_scaler/)){ge=ve.childNodes[Te];break}if(ge!==null&&ge.querySelector(".noscale")!==null)return;var ft=Ce.id!==void 0?Ce.id:"ggbApplet",Re=window[ft];(Re==null||!Re.recalculateEnvironments)&&ge!==null&&!ge.className.match(/fullscreen/)&&(ge.parentNode.style.transform="",!isNaN(we)&&we!==1?(ge.parentNode.style.width=Ce.width*we+"px",ge.parentNode.style.height=Ce.height*we+"px",Vt(ge,we)):(Vt(ge,1),ge.parentNode.style.width=Ce.width+"px",ge.parentNode.style.height=Ce.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(_e).parents(".content-added-content"))}}return{responsiveResize:Ye,isFlexibleWorksheetEditor:kn,positionCenter:Be,getScale:Fe,scaleElement:Vt}}();__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 kn=n.location.search;return kn.indexOf(J)!=-1||kn.indexOf(K)!=-1}function q(kn,Vt){}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(kn){var Vt=s[L].bindings;s[L].bindings=function(){for(var ae=Vt?Vt():{},fe=kn[webModule.__softPermutationId],Fe=O;Fe<fe.length;Fe++){var Be=fe[Fe];ae[Be[O]]=Be[P]}return ae}};var t;function u(){return v(),t}function v(){if(!t){var kn=o.createElement(Q);if(kn.id=L,kn.style.cssText=R+S,kn.tabIndex=-1,o.body.appendChild(kn),t=kn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Vt=document.compatMode==U?V:W;t.write(Vt+X),t.close()}}}function w(kn){function Vt(fe){function Fe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=Fe();if(Be){fe();return}function Ye(){if(!Be){if(!Fe())return;Be=!0,fe(),o.removeEventListener&&o.removeEventListener(Z,Ye,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,Ye,!1);var ve=setInterval(function(){Ye()},$)}function ae(fe){var Fe=u(),Be=Fe.body,Ye=Fe.createElement(_);Ye.language=ab,Ye.crossOrigin=W,Ye.src=fe,webModule.__errFn&&(Ye.onerror=function(){webModule.__errFn(L,new Error(bb+fe))}),Be.appendChild(Ye)}Vt(function(){ae(kn)})}webModule.__startLoadingFragment=function(kn){return C(kn)},webModule.__installRunAsyncCode=function(kn){var Vt=u(),ae=Vt.body,fe=Vt.createElement(_);fe.language=ab,fe.text=kn,ae.appendChild(fe),ae.removeChild(fe)};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(kn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(kn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(kn){var Vt=c[kn];return Vt==null?null:Vt},r=d,webModule.__errFn=e}function B(){function kn(ve){var Ce=ve.lastIndexOf(rb);Ce==-1&&(Ce=ve.length);var _e=ve.indexOf(sb);_e==-1&&(_e=ve.length);var we=ve.lastIndexOf(tb,Math.min(_e,Ce));return we>=O?ve.substring(O,we+P):W}function Vt(ve){if(!ve.match(/^\w+:\/\//)){var Ce=o.createElement(ub);Ce.src=ve+vb,ve=kn(Ce.src)}return ve}function ae(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function fe(){for(var ve=o.getElementsByTagName(_),Ce=O;Ce<ve.length;++Ce)if(ve[Ce].src.indexOf(xb)!=-1)return kn(ve[Ce].src);return W}function Fe(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Be(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var Ye=ae();return Ye==W&&(Ye=fe()),Ye==W&&(Ye=Fe()),Ye==W&&Be()&&(Ye=kn(o.location.href)),Ye=Vt(Ye),Ye}function C(kn){return kn.match(/^\//)||kn.match(/^[a-zA-Z]+:\/\//)?kn:webModule.__moduleBase+kn}function D(){var kn=[],Vt=O,ae=[],fe=[];function Fe(ve){var Ce=fe[ve](),_e=ae[ve];if(Ce in _e)return Ce;var we=[];for(var ge in _e)we[_e[ge]]=ge;throw r&&r(ve,we,Ce),null}if(__gwt_isKnownPropertyValue=function(ve,Ce){return Ce in ae[ve]},webModule.__getPropMap=function(){var ve={};for(var Ce in ae)ae.hasOwnProperty(Ce)&&(ve[Ce]=Fe(Ce));return ve},webModule.__computePropValue=Fe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var Ye=Be.indexOf(Db);Ye!=-1&&(Vt=parseInt(Be.substring(Ye+P),$),Be=Be.substring(O,Ye))}catch(ve){}return webModule.__softPermutationId=Vt,C(Be+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(kn,Vt,ae){"use strict";ae.d(Vt,{Ax:function(){return Ye},Ds:function(){return ve},KI:function(){return _e},SI:function(){return Be},f1:function(){return Fe}});var fe=ae(11320);function Fe(we){let ge=!0;if(we.length>0){for(let Te=0;Te<we.length;Te++)if(we[Te].compile_success==0||!we[Te].compile_success){ge=!1;break}}else ge=!1;return ge}function Be(we,ge=""){let Te=[];for(let ft=0;ft<we.length;ft++){let Re=we[ft],bt=ge?`${ge}/${Re.name}`:`${Re.name}`;Te.push({title:Re.name,type:Re.type,isLeaf:Re.type!=="tree",key:bt})}return Te}function Ye(we,ge,Te){for(let ft=0;ft<we.length;ft++){let Re=we[ft];if(Re.key===ge){Re.children=Te;break}Re.children&&Ye(Re.children,ge,Te)}return we}function ve(we,ge,Te){let ft;return function(){let Re=this,bt=arguments,ht=function(){ft=null,Te||we.apply(Re,bt)},st=Te&&!ft;clearTimeout(ft),ft=setTimeout(ht,ge),st&&we.apply(Re,bt)}}const Ce=!0,_e=fe.Z.API_SERVER},63205:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return ft}});var fe=ae(67294),Fe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=ae(94184),Ye=ae.n(Be),ve=ae(57953),Ce=ae(15979),_e=ae(33170),we=ae(28706),ge=(Re,bt,ht)=>new Promise((st,tt)=>{var Le=it=>{try{on(ht.next(it))}catch(yt){tt(yt)}},xt=it=>{try{on(ht.throw(it))}catch(yt){tt(yt)}},on=it=>it.done?st(it.value):Promise.resolve(it.value).then(Le,xt);on((ht=ht.apply(Re,bt)).next())}),ft=({data:Re,className:bt,fullWidth:ht,style:st={},onClose:tt,onOk:Le,showFullTools:xt,noAssociationId:on})=>{const it=(0,fe.useRef)(null),yt=(0,fe.useRef)(null),Ee=(0,fe.useRef)(null),de=(0,fe.useRef)(null),[je,ze]=(0,fe.useState)(!1),[At,ct]=(0,fe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,fe.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&&lt()):(document.body.removeAttribute("data-custom"),Ee.current&&(document.head.removeChild(Ee.current),Ee.current=null))},[Re==null?void 0:Re.visible]);const lt=()=>ge(void 0,null,function*(){ze(!0),ct("\u6B63\u5728\u52A0\u8F7D\u4E2D");const rt=yield(0,we.ZJ)(Re==null?void 0:Re.src);it.current.src="",it.current.src=rt,it.current.onload=function(){nn()},ze(!1),ct("")}),Ze=()=>{document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",tt()},kt=rt=>ge(void 0,null,function*(){ze(!0),ct("\u6B63\u5728\u4FDD\u5B58\u4E2D");const qt=yield(0,_e.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Re.title,file:rt.dataUrl}});qt!=null&&qt.id&&!on?(yield(0,_e.ZP)(`/api/attachments/${Re.id}/add_subitem.json`,{method:"post",body:{subitem_id:qt==null?void 0:qt.id,settings:JSON.stringify(rt.state)}})).status===0&&Le():qt!=null&&qt.id&&Le(qt),document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",ze(!1),ct("")}),pt=()=>{const rt=document.querySelector('a[href="https://markerjs.com/"]');rt&&rt.parentNode&&(rt.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(pn=>{const cn=document.querySelector(pn.name);cn&&cn.setAttribute("title",pn.title)})},nn=()=>{yt.current=new Ce.hP(it.current),yt.current.targetRoot=de.current,yt.current.addEventListener("render",kt),yt.current.addEventListener("beforeclose",Ze),xt&&(yt.current.availableMarkerTypes=yt.current.ALL_MARKER_TYPES,yt.current.uiStyleSettings.redoButtonVisible=!0,yt.current.uiStyleSettings.notesButtonVisible=!0,yt.current.uiStyleSettings.zoomButtonVisible=!0,yt.current.uiStyleSettings.zoomOutButtonVisible=!0,yt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=yt.current.uiStyleSettings,yt.current.show(),Re!=null&&Re.snapshotData&&yt.current.restoreState(Re.snapshotData),setTimeout(()=>{window.scrollTo(0,0),pt()},300)};return fe.createElement(fe.Fragment,null,(Re==null?void 0:Re.visible)&&fe.createElement(ve.Z,{spinning:je,tip:At,style:{position:"absolute"}},fe.createElement("div",{ref:de,className:Ye()(Fe.imageDimensions,bt,ht?Fe.fullWidth:""),style:st},fe.createElement("img",{className:Fe.img,ref:it}))))}},36527:function(kn,Vt,ae){"use strict";var fe=ae(67294),Fe=ae(71230),Be=ae(15746),Ye=ae(66368),ve=ae(71577),Ce=ae(35598),_e=ae(71736),we=ae(84279),ge=ae(67294);const Te=(0,fe.forwardRef)(({callback:ft,showSaveButton:Re,value:bt=""},ht)=>{const st=(0,fe.useRef)(),tt=[{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 "}]}]}],Le=[{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}`}]}]}],xt=yt=>{st.current.setValue(st.current.getValue()+" "+yt.value+" ")},on=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ge.createElement(Fe.Z,{className:_e.Z.lists,gutter:[10,10]},tt.map((yt,Ee)=>ge.createElement(Be.Z,{flex:"110px",className:_e.Z.item},ge.createElement("div",null,ge.createElement(Ce.Z,{value:`$$${yt.value}$$`}),yt.name),ge.createElement("div",{className:_e.Z.children},yt.children.map((de,je)=>ge.createElement("div",{key:je},ge.createElement("h1",null,de.name),ge.createElement(Fe.Z,{gutter:[10,10]},de.data.map((ze,At)=>ge.createElement(Be.Z,{key:At,onClick:()=>xt(ze),className:_e.Z.diamond},ge.createElement(Ce.Z,{value:"`$$"+ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ge.createElement(Fe.Z,{className:_e.Z.lists,gutter:[10,10]},Le.map((yt,Ee)=>ge.createElement(Be.Z,{flex:"110px",className:_e.Z.item},ge.createElement("div",null,ge.createElement(Ce.Z,{value:"`$$"+yt.value+"$$`"}),yt.name),ge.createElement("div",{className:_e.Z.children},yt.children.map((de,je)=>ge.createElement("div",{key:je},de.name&&ge.createElement("h1",null,de.name),ge.createElement(Fe.Z,{gutter:[10,10]},de.data.map((ze,At)=>ge.createElement(Be.Z,{key:At,onClick:()=>xt(ze),className:_e.Z.diamond},ge.createElement(Ce.Z,{value:"`$$"+ze.value+"$$`"}))))))))))}],it=()=>{var yt=document.createElement("div");yt.innerHTML=st.current.getValue();var Ee=yt.innerText;return ft&&ft(Ee),Ee};return(0,fe.useImperativeHandle)(ht,()=>({getData:it})),ge.createElement("div",{className:_e.Z.mathWrap},ge.createElement(Ye.default,{defaultActiveKey:"1",items:on}),ge.createElement("math-field",{locale:"zh_cn",className:_e.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:st,style:{width:800,marginTop:30,fontSize:18}},bt||""),Re&&ge.createElement("div",{className:_e.Z.button},ge.createElement(ve.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Vt.Z=Te},65866:function(kn,Vt,ae){"use strict";ae.d(Vt,{z:function(){return cn},Z:function(){return Xe}});var fe=ae(67294),Fe=ae(59810),Be=ae(2453),Ye=ae(14446),ve=ae(71577),Ce=ae(11320),_e=ae(4440),we=Object.defineProperty,ge=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Re=(Me,mt,Gt)=>mt in Me?we(Me,mt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Me[mt]=Gt,bt=(Me,mt)=>{for(var Gt in mt||(mt={}))Te.call(mt,Gt)&&Re(Me,Gt,mt[Gt]);if(ge)for(var Gt of ge(mt))ft.call(mt,Gt)&&Re(Me,Gt,mt[Gt]);return Me},ht=(Me,mt,Gt)=>new Promise((hn,Qe)=>{var ut=tn=>{try{Qt(Gt.next(tn))}catch(_t){Qe(_t)}},Yt=tn=>{try{Qt(Gt.throw(tn))}catch(_t){Qe(_t)}},Qt=tn=>tn.done?hn(tn.value):Promise.resolve(tn.value).then(ut,Yt);Qt((Gt=Gt.apply(Me,mt)).next())});const st="\u3000\u3000";function tt(Me){var mt=["Bytes","KB","MB","GB","TB"];if(Me==0)return"0 Byte";var Gt=parseInt(""+Math.floor(Math.log(Me)/Math.log(1024)),10);return(Me/Math.pow(1024,Gt)).toFixed(1)+" "+mt[Gt]}var Le=({value:Me=[],action:mt,onChange:Gt,className:hn,maxSize:Qe=150,title:ut="\u6587\u4EF6\u4E0A\u4F20",accept:Yt=null})=>{const Qt={multiple:!1,fileList:Me,accept:Yt,withCredentials:!0,beforeUpload:_t=>_t.size/1024/1024<Qe?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Qe}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(_t){var en,Cn,On,$e;let ce=[..._t.fileList];if(ce=ce.map(le=>(le.name.indexOf(st)===-1&&(le.name=`${le.name}${st}${tt(le.size)}`),bt({},le))),_t.file.status==="done"&&((Cn=(en=_t.file)==null?void 0:en.response)==null?void 0:Cn.status)===-1){message.error(($e=(On=_t.file)==null?void 0:On.response)==null?void 0:$e.message),Gt([]);return}Gt(ce)},onRemove:_t=>ht(void 0,null,function*(){const en=_t.size/1024/1024;return _t.status==="uploading"?!0:en<Qe&&(_t.response?_t.response.id:_t.uid)?yield removeAttachment(_t.response?_t.response.id:_t.id):!0})};function tn(_t){_t.preventDefault(),_t.stopPropagation()}return React.createElement("div",{className:`single-upload ${hn||""}`},React.createElement(Upload,bt({},Qt),React.createElement(Button,{type:"primary",title:Me.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:Me.length>0,ghost:!0},ut),React.createElement("span",{onClick:tn,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",Qe,"M)"," ")))},xt=ae(33859),on=ae(96486),it=Object.defineProperty,yt=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,je=(Me,mt,Gt)=>mt in Me?it(Me,mt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Me[mt]=Gt,ze=(Me,mt)=>{for(var Gt in mt||(mt={}))Ee.call(mt,Gt)&&je(Me,Gt,mt[Gt]);if(yt)for(var Gt of yt(mt))de.call(mt,Gt)&&je(Me,Gt,mt[Gt]);return Me};const At=Me=>React.createElement("svg",ze({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},Me),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var ct="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",lt=Object.defineProperty,Ze=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,nn=(Me,mt,Gt)=>mt in Me?lt(Me,mt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Me[mt]=Gt,rt=(Me,mt)=>{for(var Gt in mt||(mt={}))kt.call(mt,Gt)&&nn(Me,Gt,mt[Gt]);if(Ze)for(var Gt of Ze(mt))pt.call(mt,Gt)&&nn(Me,Gt,mt[Gt]);return Me},qt=(Me,mt,Gt)=>new Promise((hn,Qe)=>{var ut=tn=>{try{Qt(Gt.next(tn))}catch(_t){Qe(_t)}},Yt=tn=>{try{Qt(Gt.throw(tn))}catch(_t){Qe(_t)}},Qt=tn=>tn.done?hn(tn.value):Promise.resolve(tn.value).then(ut,Yt);Qt((Gt=Gt.apply(Me,mt)).next())});const{Dragger:pn}=Fe.default;function cn(Me){let mt=[];return Me&&Me.length>0&&(mt=Me.map(Gt=>({uid:Gt.id,id:Gt.id,name:Gt.title+st+Gt.filesize,url:Gt.url,filesize:Gt.filesize,status:"done",response:{id:Gt.id}}))),mt}var Xe=({value:Me,onChange:mt,action:Gt,data:hn,className:Qe,maxSize:ut=150,title:Yt="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:Qt=!1,accept:tn="",additionalText:_t,isDragger:en,number:Cn=1e3,aloneClear:On=!1,realTimeRemove:$e=!0,uploadText:ce,setFileProgress:le,showFileProgress:me})=>{const[he,se]=(0,fe.useState)(!1);let[Ie,et]=(0,fe.useState)(Me||[]),[$t,Ht]=(0,fe.useState)(1);(0,fe.useEffect)(()=>{Me&&($t===1&&et([...Me]),Ht(2),Cn===(Me==null?void 0:Me.length)&&se(!0))},[Me]);const Xt=()=>{setTimeout(()=>{Ie.pop(),et([...Ie])},500)};me&&le(Ie.some(qn=>qn.status==="uploading"));const jt={multiple:!0,disabled:he,accept:tn,withCredentials:!0,fileList:Ie,beforeUpload:(qn,lr)=>{const Bt=qn.size/1024/1024;return Ie.concat(lr).length>Cn?(Ie.pop(),et([...Ie]),Be.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${Cn}\u4E2A\u6587\u4EF6`),On?Promise.reject():(Xt(),!1)):Bt<ut?!0:(Be.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${ut}MB).`),On?Promise.reject():(Xt(),!1))},data:hn,action:Gt||`${Ce.Z.API_SERVER}/api/attachments.json`,onChange(qn){var lr,Bt,Sn,dr;if(qn.file.status==="removed"?Ie=qn.fileList:Ie=(0,on.uniqBy)([...qn.fileList,...Ie],"uid"),qn.file.status==="done"&&((Bt=(lr=qn.file)==null?void 0:lr.response)==null?void 0:Bt.status)===-1){Be.ZP.error((dr=(Sn=qn.file)==null?void 0:Sn.response)==null?void 0:dr.message);return}Ie.length>=Cn?se(!0):se(!1),et([...Ie]),Ie=Ie.map(Wr=>{var gt,sn;return(gt=Wr==null?void 0:Wr.response)!=null&&gt.id&&(Wr.url=(sn=Wr==null?void 0:Wr.response)==null?void 0:sn.url),Wr.name.indexOf(st)===-1&&(Wr.name=`${Wr.name}${st}${tt(Wr.size)}`),rt({},Wr)}),console.log("info:",qn,Ie),mt(Ie)},onRemove:qn=>qt(void 0,null,function*(){if(!$e)return!0;const lr=()=>qt(void 0,null,function*(){if(qn.response?qn.response.id:qn.id){let Sn=yield(0,_e.JZ)(qn.response?qn.response.id:qn.uid);return Promise.resolve(Sn)}else return!0});return Qt?new Promise((Bt,Sn)=>{Ye.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:fe.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>qt(void 0,null,function*(){const dr=yield lr();Be.ZP.success("\u5220\u9664\u6210\u529F"),Bt(!0)}),onCancel:()=>Bt(!1)})}):yield lr()})};function rn(qn){qn.preventDefault(),qn.stopPropagation()}return fe.createElement("div",{className:`multi-upload ${Qe||""}`},en&&fe.createElement(pn,rt({},jt),fe.createElement("p",{className:"ant-upload-drag-icon"},fe.createElement(xt.Z,null)),fe.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",fe.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",ut,"MB)"," "),_t),!en&&fe.createElement(Fe.default,rt({},jt),fe.createElement(ve.ZP,{disabled:he,className:"upload_button"},fe.createElement("img",{className:"aBtn_img",src:ct}),Yt),fe.createElement("span",{onClick:rn,className:"upload_text"},ce||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${ut}MB)`)))}},57444:function(kn,Vt,ae){"use strict";ae.d(Vt,{h:function(){return yt}});var fe=ae(67294),Fe=ae(11713),Be=ae(22150),Ye=ae(71577),ve=ae(4631),Ce=ae.n(ve),_e=ae(71749),we=ae(30483),ge=Object.defineProperty,Te=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,st=(Ee,de,je)=>de in Ee?ge(Ee,de,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ee[de]=je,tt=(Ee,de)=>{for(var je in de||(de={}))bt.call(de,je)&&st(Ee,je,de[je]);if(Re)for(var je of Re(de))ht.call(de,je)&&st(Ee,je,de[je]);return Ee},Le=(Ee,de)=>Te(Ee,ft(de));const xt=Fe.default.Option,on={labelCol:{span:4},wrapperCol:{span:20}},it={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"]};Vt.Z=({callback:Ee,onCancel:de})=>{const[je,ze]=(0,fe.useState)("python");function At(lt){ze(it[lt][1])}function ct(lt){Ee(lt)}return fe.createElement(Be.default,Le(tt({},on),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ct,style:{width:500}}),fe.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},fe.createElement(Fe.default,{getPopupContainer:lt=>lt.parentNode,onChange:At},Object.keys(it).map(lt=>fe.createElement(xt,{key:lt,value:lt},it[lt][0])))),fe.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},fe.createElement(yt,{mode:je})),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Ye.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ye.ZP,{type:"ghost",onClick:de},"\u53D6\u6D88")))};function yt({value:Ee,onChange:de,mode:je,options:ze={}}){const At=(0,fe.useRef)(),[ct,lt]=(0,fe.useState)();return(0,fe.useEffect)(()=>{if(ct){let Ze=function(kt){const pt=kt.getValue();de&&de(pt)};return ct.on("change",Ze),()=>{ct.off("change",Ze)}}},[ct,de]),(0,fe.useEffect)(()=>{ct&&ct.setOption("mode",je)},[ct,je]),(0,fe.useEffect)(()=>{ct&&(Ee!==ct.getValue()||Ee==="")&&setTimeout(()=>{ct.setValue(Ee||"")},300)},[ct,Ee]),(0,fe.useEffect)(()=>{if(At.current&&!ct){const Ze=Ce().fromTextArea(At.current,tt({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ze));lt(Ze)}},[At.current,ct]),fe.createElement("div",{className:"my-codemirror-container"},fe.createElement("textarea",{ref:At}))}},91304:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Pr}});var fe=ae(67294),Fe=ae(4631),Be=ae.n(Fe),Ye=ae(91033),ve=ae(71749),Ce=ae(57341),_e=ae(82801),we=ae(88386),ge=ae(49047),Te=ae(80785),ft=ae(35598),Re=({value:nr="",className:ot,showTextOnly:Ct,showLines:zt,style:un={}})=>{const Je=(0,fe.useMemo)(()=>"",[nr]);return fe.createElement(fe.Fragment,null,fe.createElement("div",{dangerouslySetInnerHTML:{__html:Je}}))},bt=ae(67294),ht=Object.defineProperty,st=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,it=(nr,ot,Ct)=>ot in nr?ht(nr,ot,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):nr[ot]=Ct,yt=(nr,ot)=>{for(var Ct in ot||(ot={}))xt.call(ot,Ct)&&it(nr,Ct,ot[Ct]);if(Le)for(var Ct of Le(ot))on.call(ot,Ct)&&it(nr,Ct,ot[Ct]);return nr},Ee=(nr,ot)=>st(nr,tt(ot));let de=[{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:nr,title:ot,icon:Ct,actionName:zt,className:un="",children:Je}){function Mt(){nr(zt)}return bt.createElement("a",{title:ot,className:un,onClick:Mt},bt.createElement("i",{className:`${Ct}`}),Je)}var ze=({watch:nr,showNullButton:ot,showNullProgramButton:Ct,onActionCallback:zt,fullScreen:un,insertTemp:Je,hidetoolBar:Mt,extraUse:ln})=>{const Jt=[...de,{title:`${nr?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${nr?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return bt.createElement("ul",{className:"markdown-toolbar-container"},!Mt&&Jt.map((vn,bn)=>bt.createElement("li",{key:bn},vn.actionName?bt.createElement(je,Ee(yt({},vn),{onActionCallback:zt})):bt.createElement("span",{className:"v-line"}))),ot?bt.createElement("li",null,bt.createElement(je,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:zt},bt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Ct?bt.createElement(bt.Fragment,null,bt.createElement("li",null,bt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:zt},bt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),bt.createElement("li",null,bt.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:zt},bt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Je&&bt.createElement("li",null,bt.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Je}`,onActionCallback:zt},bt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ln&&bt.createElement("li",null,ln),bt.createElement("li",{className:"btn-full-screen"},bt.createElement(je,{icon:`${un?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:un?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:zt})))},At=ae(76621),ct=ae(22150),lt=ae(69677),Ze=ae(71577),kt=Object.defineProperty,pt=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,cn=(nr,ot,Ct)=>ot in nr?kt(nr,ot,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):nr[ot]=Ct,Xe=(nr,ot)=>{for(var Ct in ot||(ot={}))qt.call(ot,Ct)&&cn(nr,Ct,ot[Ct]);if(rt)for(var Ct of rt(ot))pn.call(ot,Ct)&&cn(nr,Ct,ot[Ct]);return nr},Me=(nr,ot)=>pt(nr,nn(ot));const mt={labelCol:{span:4},wrapperCol:{span:20}};var Gt=({callback:nr,onCancel:ot})=>{function Ct(zt){nr(zt)}return fe.createElement(ct.default,Me(Xe({},mt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ct,style:{width:500}}),fe.createElement(ct.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},fe.createElement(lt.default,null)),fe.createElement(ct.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},fe.createElement(lt.default,null)),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ze.ZP,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},hn=ae(57444),Qe=ae(70859),ut=ae(14446),Yt=ae(71230),Qt=ae(63205),tn=ae(67294),_t=({callback:nr,onCancel:ot})=>{const Ct=document.createElement("canvas"),zt=Ct.getContext("2d");Ct.width=1e3,Ct.height=800,zt.fillStyle="#ffffff",zt.fillRect(0,0,Ct.width,Ct.height);const un=Ct.toDataURL("image/png");return tn.createElement(ut.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},tn.createElement(Yt.Z,{style:{height:"100vh"}},tn.createElement(Qt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:un,visible:!0,title:String(Date.now())},onOk:Je=>{nr({src:Je.url})},onClose:ot})))},en=ae(72565),Cn=ae(15746),On=ae(2453),$e={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ce=ae(67294),me=(0,fe.forwardRef)(({onCancel:nr,editImgId:ot,callback:Ct},zt)=>{let un=(0,fe.useRef)(),Je=(0,fe.useRef)(),Mt=(0,fe.useRef)(),ln=(0,fe.useRef)(!1);const Jt=(0,fe.useRef)(!1);console.log("ref:",zt);const[vn,bn]=(0,fe.useState)(0),[Fn,Nr]=(0,fe.useState)("100vh");return(0,fe.useEffect)(()=>{bn(1);try{indexedDB.databases().then(Sr=>{Sr.forEach(vr=>indexedDB.deleteDatabase(vr.name))})}catch(Sr){}},[]),(0,fe.useImperativeHandle)(zt,()=>({setHeight:Nr})),ce.createElement("div",{ref:Jt,className:"body-overflow-initial"},ce.createElement(en.Z,{width:"100vw",height:Fn,footer:null,closable:!0,placement:"bottom",open:!!vn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${$e.drawerWrap}`,onClose:()=>{window.saveDrawData(Sr=>{Ct({src:`/api/attachments/${Sr}`,id:Sr})})},title:ce.createElement(Yt.Z,{align:"middle"},ce.createElement(Cn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ce.createElement(Cn.Z,{onClick:()=>{Nr(Fn==="60px"?"100vh":"60px")}},ce.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ce.createElement(Cn.Z,{onClick:()=>{window.saveDrawData(Sr=>{if(Sr===null){On.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}On.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Ct({src:`/api/attachments/${Sr}`,id:Sr,disabledClose:!0})})}},ce.createElement(Ze.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ce.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${ot||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Je})))}),he=ae(11320),se=ae(78045),Ie=ae(31795);const et=se.ZP.Group,$t={margin:"0 8px"};var Ht=({callback:nr,onCancel:ot})=>{function Ct(zt){nr(zt)}return fe.createElement(ct.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ct},fe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},fe.createElement("span",{style:$t},"\u5355\u5143\u683C\u6570\uFF1A"),fe.createElement("span",{style:$t},"\u884C\u6570"),fe.createElement(ct.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},fe.createElement(Ie.Z,null)),fe.createElement("span",{style:$t},"\u5217\u6570"),fe.createElement(ct.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},fe.createElement(Ie.Z,null))),fe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},fe.createElement("span",{style:$t},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),fe.createElement(ct.default.Item,{name:"align"},fe.createElement(et,null,fe.createElement(se.ZP,{value:"default"},fe.createElement("i",{className:"fa fa-align-justify"})),fe.createElement(se.ZP,{value:"left"},fe.createElement("i",{className:"fa fa-align-left"})),fe.createElement(se.ZP,{value:"center"},fe.createElement("i",{className:"fa fa-align-center"})),fe.createElement(se.ZP,{value:"right"},fe.createElement("i",{className:"fa fa-align-right"}))))),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ze.ZP,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},Xt=ae(47897),jt=ae(61016),rn=ae.n(jt),lr=(0,fe.forwardRef)(({use3d:nr,width:ot,height:Ct,callback:zt,showSaveButton:un},Je)=>{const Mt=(0,fe.useRef)(),ln=(0,fe.useRef)(),[Jt,vn]=(0,fe.useState)(!1),bn=(0,fe.useRef)({id:Mt,appName:"graphing",width:ot||1e3,height:Ct||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,fe.useEffect)(()=>{ln.current=new(rn())(bn.current,!0),window.onload=function(){ln.current.inject("applet_container")}},[]);const Fn=()=>{var Nr=window.ggbApplet.getPNGBase64(1,!0,72);return zt&&zt(Nr),Nr};return(0,fe.useEffect)(()=>{bn.current.appName=Jt?"3D":"graphing",ln.current.inject("applet_container")},[Jt]),(0,fe.useEffect)(()=>{vn(nr)},[nr]),(0,fe.useImperativeHandle)(Je,()=>({getImgData:Fn})),fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Mt}),fe.createElement(Yt.Z,{align:"middle"},fe.createElement(Cn.Z,{flex:1},fe.createElement(Xt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Jt,onChange:Nr=>vn(Nr)})),fe.createElement(Cn.Z,null,fe.createElement(Ze.ZP,{size:"large",onClick:Fn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Bt=ae(36527),Sn=ae(25934);const dr="link",Wr="upload-image",gt="add-flowchart",sn="draw-image",tr="add-flowchart",Zn="code-block",xr="add-table",Kr="------------",Jr={default:Kr,left:`:${Kr}`,center:`:${Kr}:`,right:`${Kr}:`};var Zr=ae(99914),ei=(nr,ot,Ct)=>new Promise((zt,un)=>{var Je=Jt=>{try{ln(Ct.next(Jt))}catch(vn){un(vn)}},Mt=Jt=>{try{ln(Ct.throw(Jt))}catch(vn){un(vn)}},ln=Jt=>Jt.done?zt(Jt.value):Promise.resolve(Jt.value).then(Je,Mt);ln((Ct=Ct.apply(nr,ot)).next())});function pi(){}let kr=0;const Ti=1e4,na="\u2581",ea="@\u2581\u2581@",oa="@\u2581@",Li=`
**\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`,Dt=["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 Hn(nr){return/^\d+$/.test(nr)?`${nr}px`:nr}const Gn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Lr={[Gn+"-B"]:"bold",[Gn+"-I"]:"italic"},yr={[dr]:"\u6DFB\u52A0\u94FE\u63A5",[Zn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Wr]:"\u6DFB\u52A0\u56FE\u7247",[sn]:"\u6DFB\u52A0\u753B\u56FE",[gt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[xr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Pr=({defaultValue:nr="",onChange:ot,width:Ct="100%",height:zt=400,miniToolbar:un=!1,isFocus:Je=!1,watch:Mt,insertTemp:ln,mode:Jt="markdown",id:vn="markdown-editor-id",showResizeBar:bn=!1,noStorage:Fn=!1,showNullButton:Nr=!1,showNullProgramButton:Sr=!1,hidetoolBar:vr=!1,fullScreen:Ir=!1,onBlur:_r,onCMBeforeChange:Lt,onFullScreen:wt,className:Ot="",disablePaste:Dn=!1,disabled:er=!1,disabledFill:An=!1,placeholder:Rn="",values:Nn="",extraUse:rr,onAddBlank:Dr})=>{const[yn,Si]=(0,fe.useState)(null),[di,ha]=(0,fe.useState)(nr),[ta,Wi]=(0,fe.useState)(Mt),[Ta,Gi]=(0,fe.useState)(Ir),[$i,ra]=(0,fe.useState)(""),[Ma,vi]=(0,fe.useState)(0),[Zi,xa]=(0,fe.useState)(zt),[Ya,Ba]=(0,fe.useState)(!1),ki=(0,fe.useRef)((0,Sn.Z)()),Rt=(0,fe.useRef)(!1),Tt=(0,fe.useRef)(),[mn,$n]=(0,fe.useState)(0),[Qn,Or]=(0,fe.useState)(0),Gr=(0,fe.useRef)(),ci=(0,fe.useRef)(),gi=(0,fe.useRef)(),li=(0,fe.useRef)(),Mi=(0,fe.useRef)(),Vi=(0,fe.useRef)(),Yr=()=>ei(void 0,null,function*(){var Wn;const Tn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ki.current}});(Wn=Tn==null?void 0:Tn.attachments)!=null&&Wn.length&&(console.log("cm:",yn,Gr),Tn.attachments.map(Jn=>{Jn.content_type.indexOf("image")>-1?yn.replaceSelection(`![,](/api/attachments/${Jn.id}?type=${Jn.content_type})`):Jn.content_type.indexOf("video")>-1?yn.replaceSelection(`<video width="100%" controls src="${he.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Jn.content_type.indexOf("pdf")>-1?yn.replaceSelection(`<a href="${he.Z.API_SERVER}/api/attachments/${Jn.id}?type=${Jn.content_type}&disposition=inline" target="_blank">${Jn.name}</a>`):yn.replaceSelection(`[${Jn.name}](${he.Z.API_SERVER}/api/attachments/${Jn.id}?type=${Jn.content_type})`)}))});(0,fe.useEffect)(()=>{const Wn=window.scrollY||window.pageYOffset;ha(Nn),yn==null||yn.setValue(Nn),window.scrollTo(0,Wn)},[Nn]),(0,fe.useEffect)(()=>{wt==null||wt(Ta)},[Ta]),(0,fe.useEffect)(()=>{if(Gr.current){let Wn=function(Jn,ar){var $r;if(Dn){ar.preventDefault();return}const mr=ar.clipboardData;if(mr){const gr=mr.types.toString(),Cr=mr.items;if(gr==="Files"||mr.types.indexOf("Files")>-1){if(ar.preventDefault(),Jt=="stex")return;try{let Er=Cr[1];(($r=Cr[0])==null?void 0:$r.kind)==="file"&&(Er=Cr[0]);const Fr=Er.getAsFile(),He=Fr.name.split(".").pop();(0,Qe.I)(Fr,Ge=>{var Ft,Et,dn;Ge.id?((Ft=Fr==null?void 0:Fr.type)==null?void 0:Ft.indexOf("image"))>-1?Tn.replaceSelection(`<img width="100%" src="/api/attachments/${Ge.id}?type=${Ge.content_type})" alt="" />`):((Et=Fr==null?void 0:Fr.type)==null?void 0:Et.indexOf("video"))>-1?Tn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ge.id}"></video>`):((dn=Fr==null?void 0:Fr.type)==null?void 0:dn.indexOf("pdf"))>-1?Tn.replaceSelection(`<a href="/api/attachments/${Ge.id}?type=${Fr.type}&disposition=inline" target="_blank">${Fr.name}</a>`):Dt.includes(He)?Tn.replaceSelection(`<a href="/api/attachments/${Ge.id}?type=office&disposition=inline" target="_blank">${Fr.name}</a>`):Tn.replaceSelection(`[${Fr.name}](/api/attachments/${Ge.id}?type=${Ge.content_type})`):(Ge==null?void 0:Ge.status)===401&&(On.ZP.warning((Ge==null?void 0:Ge.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(Er){On.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Tn=Be().fromTextArea(Gr.current,{mode:Jt,lineNumbers:!un,lineWrapping:!0,value:nr,autoCloseTags:!Sr,autoCloseBrackets:!0});return Tn.on("keyup",function(Jn,ar){ar.keyCode===8&&(Jn.getValue()==""?Tn.setOption("placeholder",Rn):Tn.setOption("placeholder",null))}),Tn.on("keydown",function(Jn,ar){if(ar.keyCode===8){var $r=sa(Jn);$r&&ar.preventDefault()}}),Je&&Tn.focus(),Tn.on("paste",Wn),Tn.on("dragleave",function(Jn,ar){ci.current.classList.remove("mouse-hover-md")}),er&&Tn.on("beforeChange",function(Jn,ar){(ar.origin==="paste"||ar.origin==="+input")&&ar.cancel()}),Si(Tn),()=>{Tn.off("paste",Wn)}}},[]);const Fi=(0,fe.useCallback)(()=>{if(ci.current)try{}catch(Wn){console.log(Wn,"---- to set md editor body height")}},[Zi,ci,Ta]);(0,fe.useEffect)(()=>{function Wn(){let Tn=new Ye.Z(Jn=>{for(let ar of Jn)(ar.target.offsetHeight>0||ar.target.offsetWidth>0)&&(Fi(),yn.setSize("100%","100%"),yn.refresh())});return Tn.observe(Gr.current.parentElement),Tn}if(yn){const Tn=Wn();return()=>{var Jn,ar;(Jn=Gr.current)!=null&&Jn.parentElement&&Tn.unobserve((ar=Gr.current)==null?void 0:ar.parentElement)}}},[yn,Fi]),(0,fe.useEffect)(()=>{if(yn){let Wn=[];for(const[Tn,Jn]of Object.entries(Lr)){let ar={[Tn]:()=>{Yi(Jn)}};Wn.push(ar),yn.addKeyMap(ar)}return Tt.current=setInterval(()=>{Rt.current&&Yr()},4e3),()=>{clearInterval(Tt.current);for(let Tn of Wn)yn.removeKeyMap(Tn)}}},[yn]),(0,fe.useEffect)(()=>{Ir!==Ta&&Gi(Ir)},[Ir]),(0,Zr.Z)(()=>{if(!Fn&&Ma>0){let Wn=new Date().getTime(),Tn=window.sessionStorage.getItem(vn);Wn>=Ma+Ti&&(!Tn||Tn!==di)&&(window.sessionStorage.setItem(vn,di),Ba(!0))}},Ti),(0,fe.useEffect)(()=>{Wi(Mt)},[yn,Mt]),(0,fe.useEffect)(()=>{yn&&Je&&yn.focus()},[yn,Je]),(0,fe.useEffect)(()=>{if(ta&&yn){let Wn=function(Jn){let ar=Jn.target;if(li.current){let $r=ar.scrollTop/ar.scrollHeight;li.current.scrollTop=li.current.scrollHeight*$r}};const Tn=yn.getScrollerElement();return Tn.addEventListener("scroll",Wn),()=>{Tn.removeEventListener("scroll",Wn)}}},[yn,ta]),(0,fe.useEffect)(()=>{if(yn&&Lt){let Wn=function(Tn,Jn){Lt(Tn,Jn)};return yn.on("beforeChange",Wn),()=>{yn.off("beforeChange",Wn)}}},[yn,Lt]),(0,fe.useEffect)(()=>{if(yn&&_r){let Wn=function(){_r(yn.getValue())};return yn.on("blur",Wn),()=>{yn.off("blur",Wn)}}},[yn,_r]);function sa(Wn,Tn){var Jn=Wn.getDoc(),ar=Jn.getCursor(),$r=Jn.getLine(ar.line),mr=$r.charAt(ar.ch-1),gr=$r.lastIndexOf("@\u2581@",ar.ch),Cr=$r.lastIndexOf("@\u2581\u2581@",ar.ch),Er=gr>Cr?gr:Cr,Fr=gr>Cr?3:4;if(ea.indexOf(mr)===-1)return null;if(console.log("change1:",Tn,Wn,$r,ar,Er,gr,Cr,mr),Er>=0&&ar.ch-Er<5){var He=Er+Fr;return Jn.replaceRange("",{line:ar.line,ch:Er},{line:ar.line,ch:He}),{line:ar.line,ch:He}}return null}(0,fe.useEffect)(()=>{if(yn){let Wn=function(Tn,Jn){const ar=Tn.getValue();ha(ar),vi(new Date().getTime()),Tn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ot&&(Sr?ot(ar,wn(ar)):ot(ar))};return yn.on("change",Wn),()=>{yn.off("change",Wn)}}},[yn,ot]),(0,fe.useEffect)(()=>{if(yn)if(nr==null)yn.setValue(""),ha("");else{const Wn=window.scrollY||window.pageYOffset;nr!==yn.getValue()&&(yn.setValue(nr),ha(nr),yn.setCursor(er?1:yn.lineCount(),0),window.scrollTo(0,Wn))}},[yn,nr]);const Yi=(0,fe.useCallback)(Wn=>{const Tn=yn.getCursor(),Jn=yn.getSelection();let ar=Jn.split(`
`);switch(Wn){case"bold":return yn.replaceSelection("**"+Jn+"**"),Jn===""&&yn.setCursor(Tn.line,Tn.ch+2),yn.focus();case"italic":return yn.replaceSelection("*"+Jn+"*"),Jn===""&&yn.setCursor(Tn.line,Tn.ch+1),yn.focus();case"code":return yn.replaceSelection("`"+Jn+"`"),Jn===""&&yn.setCursor(Tn.line,Tn.ch+1),yn.focus();case"inline-latex":return ra("inline-latex"),yn.focus();case"latex":return yn.replaceSelection("```latex\n"+Jn+"\n```"),yn.setCursor(Tn.line+1,Jn.length+1),yn.focus();case"line-break":return yn.replaceSelection(`<br/>
`),yn.focus();case"list-ul":return Jn===""?yn.replaceSelection("- "+Jn):yn.replaceSelection(ar.map($r=>$r===""?"":`- ${$r}`).join(`
`)),yn.focus();case"list-ol":return Jn===""?yn.replaceSelection("1. "+Jn):yn.replaceSelection(ar.map(($r,mr)=>$r===""?"":`${mr+1}. ${$r}`).join(`
`)),yn.focus();case"add-null-ch":Dr==null||Dr();return;case"add-signal":return Jn===""&&yn.setCursor(Tn.line,Tn.ch),yn.replaceSelection(oa),yn.focus();case"add-multiple":return Jn===""&&yn.setCursor(Tn.line,Tn.ch),yn.replaceSelection(ea),yn.focus();case"inster-template-1":return Jn===""&&yn.setCursor(Tn.line,Tn.ch),yn.replaceSelection(Li),yn.focus();case"eraser":return yn.setValue(""),yn.focus();case"trigger-watch":return Wi(!ta),yn.focus();case"trigger-full-screen":return Gi(!Ta),yn.focus();case dr:ra(dr);return;case Zn:ra(Zn);return;case Wr:ra(Wr);return;case sn:ra(sn);return;case"maths-latex":ra("maths-latex");return;case gt:Mi.current="",sessionStorage.removeItem("file_id"),ra(gt);return;case xr:ra(xr);return;default:throw new Error}},[yn,ta,Ta]),Oe=(0,fe.useCallback)((Wn,Tn)=>{var Jn,ar,$r,mr,gr,Cr;ra("");const{src:Er,alt:Fr,id:He}=Wn||{};switch($i){case dr:const{title:In,link:zn}=Wn;return yn.replaceSelection(`[${In}](${zn})`),yn.focus();case Zn:const{language:or,content:jn}=Wn;return yn.replaceSelection(["```"+or,jn,"```"].join(`
`)),yn.focus();case"maths-latex":for(var Ge=atob(Wn),Ft=new Uint8Array(Ge.length),Et=0;Et<Ge.length;Et++)Ft[Et]=Ge.charCodeAt(Et);var dn=new Blob([Ft],{type:"image/png"});(0,Qe.I)(dn,yi=>{yi.id?yn.replaceSelection(`![,](/api/attachments/${yi.id}?type=${yi.content_type})`):(yi==null?void 0:yi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":yn.replaceSelection("`$$"+Wn+"$$`");break;case tr:if(!He)return;yn.focus(),yn.getValue().indexOf(Er)===-1?yn.replaceSelection(`<center><img id="${He}" width="80%" src="${Er}" class="draw-flowchart" alt="${Fr||""}" /></center>`):document.getElementById(He).src=he.Z.API_SERVER+Er+"?t="+Date.now();try{setTimeout(()=>{_r(yn.getValue())},100)}catch(yi){}break;case Wr:case sn:const _n=Tn,cr=($r=(ar=(Jn=_n==null?void 0:_n.name)==null?void 0:Jn.split("."))==null?void 0:ar.pop)==null?void 0:$r.call(ar);return((mr=_n==null?void 0:_n.type)==null?void 0:mr.indexOf("image"))>-1||!(_n!=null&&_n.type)?_n!=null&&_n.align||_n!=null&&_n.width?yn.replaceSelection(`<p style="text-align:${_n.align||"initial"}"><img width="${_n.width?_n.width+"%":"initial"}" src="${Er}" alt="${Fr||""}" /></p>`):yn.replaceSelection(`<img width="100%" src="${Er}" alt="${Fr||""}" />`):((gr=_n==null?void 0:_n.type)==null?void 0:gr.indexOf("video"))>-1?yn.replaceSelection(`<video width="100%" controls src="${Er}"></video>`):((Cr=_n==null?void 0:_n.type)==null?void 0:Cr.indexOf("pdf"))>-1?yn.replaceSelection(`<a href="${Er}?type=${_n.type}&disposition=inline" target="_blank">${_n.name}</a>`):Dt.includes(cr)?yn.replaceSelection(`<a href="${Er}?type=office&disposition=inline" target="_blank">${_n.name}</a>`):yn.replaceSelection(`[${_n.name}](${Er})`),yn.focus();case xr:const{row:fr,col:Hr,align:ur}=Wn;let ti=`
`;for(let yi=0;yi<fr;yi++){let ni=[],fi=[];for(let jr=0;jr<Hr;jr++)yi===1&&fi.push(Jr[ur]),ni.push(" ");yi===1&&(ti+=`| ${fi.join(" | ")} |
`),ti+=`| ${ni.join(Hr===1?"":" | ")} |
`}return yn.replaceSelection(ti+`
`),yn.focus();default:throw new Error}},[yn,$i]),Ve=(0,fe.useMemo)(()=>{switch($i){case dr:return fe.createElement(Gt,{callback:Oe,onCancel:Ue});case Zn:return fe.createElement(hn.Z,{callback:Oe,onCancel:Ue});case Wr:return fe.createElement(Qe.Z,{callback:Oe,onCancel:Ue});case gt:return fe.createElement(me,{editImgId:Mi.current,callback:Oe,onCancel:Ue});case xr:return fe.createElement(Ht,{callback:Oe,onCancel:Ue});case"maths-latex":return fe.createElement(lr,{showSaveButton:!0,callback:Oe});case"inline-latex":return fe.createElement(Bt.Z,{showSaveButton:!0,callback:Oe});default:return null}},[$i]);function Ue(){ra("")}(0,fe.useEffect)(()=>{if(gi.current){let Wn=function(gr){$r=!0,mr=gr.pageY},Tn=function(){$r=!1},Jn=function(gr){if($r){let Cr=gr.pageY-mr;Cr<0&&(Cr=0),Cr>300&&(Cr=300);let Er=zt+Cr+"px";xa(Er)}},ar=gi.current,$r=!1,mr=0;return ar.addEventListener("mousedown",Wn),document.addEventListener("mousemove",Jn),document.addEventListener("mouseup",Tn),()=>{ar.removeEventListener("mousedown",Wn),document.removeEventListener("mousemove",Jn),document.removeEventListener("mouseup",Tn)}}},[yn,gi]),(0,fe.useEffect)(()=>{xa(zt)},[zt]);const qe=Hn(Ct),vt=Hn(Zi),St={width:qe,height:vt},Nt=(0,fe.useMemo)(()=>{if(Ma){let Wn=new Date(Ma),Tn=Wn.getHours(),Jn=Wn.getMinutes(),ar=Wn.getSeconds();return Tn=Tn<10?"0"+Tn:Tn,Jn=Jn<10?"0"+Jn:Jn,ar=ar<10?"0"+ar:ar,`${Tn}:${Jn}:${ar}`}return 0},[Ma]),wn=Wn=>{const Tn=[];if(Sr){let Jn=-1;Wn=Wn.replace(/(@▁▁@|@▁@)/g,function(ar,$r,mr){Tn.push({multiLine:ar!==oa})})}return Tn};function Ln(){window.sessionStorage.removeItem(vn),Ba(!1),vi(0)}function br(){Ba(!1),vi(0),yn.setValue(window.sessionStorage.getItem(vn))}(0,fe.useEffect)(()=>{yr[$i]&&$i!==sn&&$i!==gt&&setTimeout(()=>{const Wn=document.getElementsByClassName("markdown-popup-form")[0],Tn=window.innerWidth/2-Wn.offsetWidth/2,Jn=window.innerHeight/2-Wn.offsetHeight/2;$n(Tn),Or(Jn)},0)},[$i]);const Br=Wn=>{Wn.preventDefault();const Tn=Wn.clientX-mn,Jn=Wn.clientY-Qn;document.body.onmousemove=ar=>{let $r=ar.clientX-Tn,mr=ar.clientY-Jn;const gr=document.getElementsByClassName("markdown-popup-form")[0],Cr=window.innerWidth-gr.offsetWidth,Er=window.innerHeight-gr.offsetHeight;$r=Math.max(0,Math.min($r,Cr)),mr=Math.max(0,Math.min(mr,Er)),hr(ar.clientX,ar.clientY,Tn,Jn)&&($n($r),Or(mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},hr=(Wn,Tn,Jn,ar)=>{const $r=document.body.clientHeight,mr=document.body.clientWidth;return Wn<20&&Jn>Wn||Wn>mr-20&&Jn<Wn||Tn<20&&ar>Tn||Tn>$r-20&&ar<Tn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"markdown-editor-wrapper",ref:ci},fe.createElement("div",{className:`markdown-editor-container ${Ot} ${ta?"on-preview":""} ${un?"mini":""} ${Ta?"full-screen":""}`,style:St},fe.createElement(ze,{insertTemp:ln,watch:ta,fullScreen:Ta,showNullButton:Nr,showNullProgramButton:Sr,onActionCallback:Yi,hidetoolBar:vr,extraUse:rr}),fe.createElement("div",{className:"markdown-editor-body"},fe.createElement("div",{className:"codemirror-container"},fe.createElement("textarea",{ref:Gr,placeholder:Rn})),ta?fe.createElement("div",{ref:li,className:"preview-container"},Jt==="stex"&&fe.createElement(Re,{value:di}),Jt!=="stex"&&fe.createElement(ft.Z,{edit:!0,disabledFill:An,showProgramFill:Sr,value:di,openEditor:Wn=>{var Tn;Mi.current=Wn,(Tn=Vi.current)==null||Tn.setHeight("100vh"),setTimeout(()=>{ra("add-flowchart")},150)}})):null))),bn?fe.createElement("a",{ref:gi,className:"editor-resize"}):null,$i===sn&&fe.createElement(_t,{callback:Oe,onCancel:Ue}),$i===gt&&fe.createElement(me,{ref:Vi,editImgId:Mi.current,callback:Oe,onCancel:Ue}),fe.createElement(At.Z,null,yr[$i]&&$i!==sn&&$i!==gt?fe.createElement(ut.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:mn,top:Qn},title:fe.createElement("div",{style:{cursor:"move"},onMouseDown:Br},yr[$i]),open:!0,onCancel:Ue,footer:null,destroyOnClose:!0,width:$i===gt?"1200px":null,height:$i===gt?"80vh":null,className:"markdown-popup-form"},Ve):null))}},70859:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return je},I:function(){return At}});var fe=ae(22150),Fe=ae(2453),Be=ae(69677),Ye=ae(93421),ve=ae(31795),Ce=ae(78045),_e=ae(71577),we=ae(15476),ge=ae(67294),Te=ae(52262),ft=ae(67294),Re=Object.defineProperty,bt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,xt=(ct,lt,Ze)=>lt in ct?Re(ct,lt,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):ct[lt]=Ze,on=(ct,lt)=>{for(var Ze in lt||(lt={}))tt.call(lt,Ze)&&xt(ct,Ze,lt[Ze]);if(st)for(var Ze of st(lt))Le.call(lt,Ze)&&xt(ct,Ze,lt[Ze]);return ct},it=(ct,lt)=>bt(ct,ht(lt));const{useForm:yt}=fe.default,Ee={width:280,marginRight:10},de={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:ct,onCancel:lt})=>{const[Ze]=yt();let kt=(0,ge.useRef)();function pt(qt){kt.current.width=Ze.getFieldValue("width"),kt.current.align=Ze.getFieldValue("align"),ct(qt,kt.current)}function nn(qt,pn){if(qt.status===-1){Fe.ZP.error(qt.message);return}Ze.setFieldsValue({src:`/api/attachments/${qt.id}`,type:pn.type})}function rt(qt){let pn=qt.target.files[0];kt.current=pn,At(pn,nn)}return ft.createElement(fe.default,it(on({form:Ze},de),{className:"upload-image-panel",onFinish:pt,style:{width:470,overflow:"hidden"}}),ft.createElement(fe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ft.createElement("div",{className:"flex-container"},ft.createElement(fe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},ft.createElement(Be.default,{style:Ee})),ft.createElement(ze,{onFileChange:rt}))),ft.createElement(fe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ft.createElement(Be.default,{style:{width:264}})),ft.createElement(fe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ft.createElement(Ye.Z,null,ft.createElement(fe.default.Item,{name:"width",style:{margin:0}},ft.createElement(ve.Z,{style:{width:264}})),ft.createElement("span",{className:"ml8"},"%"))),ft.createElement(fe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ft.createElement(Ce.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"}]})),ft.createElement("aside",null,ft.createElement(fe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ft.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ft.createElement(_e.ZP,{type:"default",onClick:lt},"\u53D6\u6D88"))))};function ze({onFileChange:ct}){return ft.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ft.createElement("input",{type:"file",onChange:ct}))}function At(ct,lt){if(!ct)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Te.bg)())throw Fe.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Ze=new FormData;Ze.append("editormd-image-file",ct),Ze.append("file_param_name","editormd-image-file"),Ze.append("byxhr","true");var kt=new window.XMLHttpRequest;kt.withCredentials=!0,kt.addEventListener("load",function(pt){lt(JSON.parse(pt.target.responseText),ct)},!1),kt.addEventListener("error",function(pt){console.error(pt)},!1),kt.open("POST",`${we.KI}/api/attachments.json`),kt.send(Ze)}},76621:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Be}});var fe=ae(67294),Fe=ae(73935);class Be extends fe.Component{constructor(ve){super(ve);const Ce=window.document;this.node=Ce.createElement("div"),Ce.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,Fe.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});var fe=ae(67294);function Fe(Be,Ye){const ve=(0,fe.useRef)();(0,fe.useEffect)(()=>{ve.current=Be}),(0,fe.useEffect)(()=>{function Ce(){ve.current()}if(Ye!==null){let _e=setInterval(Ce,Ye);return()=>clearInterval(_e)}},[Ye])}},17836:function(kn,Vt,ae){"use strict";ae.r(Vt),ae.d(Vt,{default:function(){return qt}});var fe=ae(67294),Fe=ae(33170),Be=ae(91304),Ye=ae(28706),ve=ae(35973),Ce=ae(22150),_e=ae(85673),we=ae(2453),ge=ae(84567),Te=ae(69677),ft=ae(11713),Re=ae(78045),bt=ae(34336),ht=ae(71230),st=ae(15746),tt=ae(71577),Le=ae(52310),xt={flex_box_center:"flex_box_center___Zr62V",flex_space_between:"flex_space_between___MocyP",flex_box_vertical_center:"flex_box_vertical_center___q9TyA",flex_box_center_end:"flex_box_center_end___uv4oS",flex_box_column:"flex_box_column___Tkhbw",title:"title___vcf30",export:"export___WECx3",bg:"bg___cLnNg",tabs:"tabs___fDuTh",btn:"btn___ckSh1",sticky:"sticky___Jdoog",publishRuleContent:"publishRuleContent___t7UUq",groupSelector:"groupSelector___DpKup",addAndDelete:"addAndDelete___BPOVW",deleteIcon:"deleteIcon___oqgJJ",addIcon:"addIcon___Bb3Pt"},on=ae(65866),it=ae(52262),yt=ae(27484),Ee=ae.n(yt),de=ae(24018),je=ae(40043),ze=ae(67294),At=Object.defineProperty,ct=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,kt=(pn,cn,Xe)=>cn in pn?At(pn,cn,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):pn[cn]=Xe,pt=(pn,cn)=>{for(var Xe in cn||(cn={}))lt.call(cn,Xe)&&kt(pn,Xe,cn[Xe]);if(ct)for(var Xe of ct(cn))Ze.call(cn,Xe)&&kt(pn,Xe,cn[Xe]);return pn},nn=(pn,cn,Xe)=>new Promise((Me,mt)=>{var Gt=ut=>{try{Qe(Xe.next(ut))}catch(Yt){mt(Yt)}},hn=ut=>{try{Qe(Xe.throw(ut))}catch(Yt){mt(Yt)}},Qe=ut=>ut.done?Me(ut.value):Promise.resolve(ut.value).then(Gt,hn);Qe((Xe=Xe.apply(pn,cn)).next())});const rt=({shixunHomeworks:pn,classroomList:cn,globalSetting:Xe,boards:Me,loading:mt,user:Gt,dispatch:hn})=>{var Qe,ut,Yt,Qt,tn,_t,en;const Cn=(0,ve.useParams)(),On=(0,ve.useLocation)(),[$e]=Ce.default.useForm(),[ce,le]=(0,fe.useState)({content:""});let[me,he]=(0,fe.useState)([{}]);const{userInfo:se}=Gt,{detailLeftMenus:Ie,detailCourseGroupsList:et}=cn,{boardsCategoryList:$t}=Me;let[Ht,Xt]=(0,fe.useState)({unified_setting:!0,view_message_setting:$t.allow_view_message?"0":"1"});return(0,fe.useEffect)(()=>{hn({type:"boards/getBoardsCategoryList",payload:{board_id:Cn.categoryId}}).then(jt=>{Ht.view_message_setting=jt!=null&&jt.allow_view_message?"0":"1"}),hn({type:"classroomList/getCourseGroupsList",payload:{page:1,id:Cn.coursesId,limit:1e3,nonenavigate:!0}})},[Cn.categoryId]),(0,fe.useEffect)(()=>{$e.setFieldsValue({select_board_id:parseInt(Cn.categoryId)})},[cn.detailLeftMenus]),ze.createElement("section",{className:xt.bg},ze.createElement("div",{className:"edu-container"},ze.createElement("section",{className:"animated fadeIn"},ze.createElement("aside",{className:"mt10"},ze.createElement(_e.Z,{separator:">"},ze.createElement(_e.Z.Item,null,ze.createElement(ve.Link,{to:`/classrooms/${Cn.coursesId}/board/${Cn.categoryId||""}`},(Qe=se==null?void 0:se.course)==null?void 0:Qe.course_name)),ze.createElement(_e.Z.Item,null,ze.createElement(ve.Link,{to:`/classrooms/${Cn.coursesId}/board/${Cn.categoryId||""}`},(Qt=(Yt=(ut=$t==null?void 0:$t.boards)==null?void 0:ut.filter(jt=>jt.id==Cn.categoryId))==null?void 0:Yt[0])==null?void 0:Qt.name)),ze.createElement(_e.Z.Item,null,"\u5E16\u5B50\u65B0\u5EFA"))),ze.createElement("aside",{className:[xt.title,"mt20"].join(" ")},ze.createElement(ve.Link,{to:`/classrooms/${Cn.coursesId}/board/${Cn.categoryId||""}`},ze.createElement(Le.Z,{className:"font16 c-black"})),ze.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u5E16\u5B50"))),ze.createElement(Ce.default,{layout:"vertical",form:$e,initialValues:{name:"",sticky:!1},scrollToFirstError:!0,onValuesChange:jt=>{le(pt({},jt))},onFinish:jt=>nn(void 0,null,function*(){var rn,qn;if(jt.attachment_ids=(rn=jt.attachment_ids)==null?void 0:rn.map(Bt=>Bt.response.id),jt.view_message_setting=Ht.view_message_setting,(0,it.eB)()&&(jt.unified_setting=Ht.unified_setting,jt.view_message_setting="1",jt.group_settings=me,!Ht.unified_setting)){if(!me.length){we.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF1A\u5206\u73ED\u53D1\u5E03\u8BBE\u7F6E\u4E0D\u80FD\u4E3A\u7A7A");return}me.map(Bt=>{if(!Bt.group_id)throw we.ZP.error("\u5206\u73ED\u4E0D\u80FD\u4E3A\u7A7A"),new String("\u5206\u73ED\u4E0D\u80FD\u4E3A\u7A7A");if(!Bt.publish_time)throw we.ZP.error("\u53D1\u5E03\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"),new String("\u53D1\u5E03\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A")})}jt=pt({},jt);const lr=yield(0,Fe.ZP)(`/api/boards/${Cn.categoryId}/messages.json`,{method:"post",body:jt});lr.status===0&&((0,Ye.L9)(["\u6559\u5B66\u8BFE\u5802","\u8BA8\u8BBA","\u53D1\u5E16"]),we.ZP.success("\u53D1\u5E03\u6210\u529F"),ve.history.push(`/classrooms/${Cn.coursesId}/board/${Cn.categoryId}/Detail/${(qn=lr==null?void 0:lr.data)==null?void 0:qn.id}`))})},ze.createElement("aside",{className:"mt30 relative bg-white pl30 pr30 pt30 w100 inline-block"},(0,it.GJ)()&&ze.createElement(Ce.default.Item,{label:"",name:"sticky",valuePropName:"checked",className:xt.sticky},ze.createElement(ge.default,null,"\u7F6E\u9876")),ze.createElement(Ce.default.Item,{label:"\u6807\u9898",name:"subject",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},ze.createElement(Te.default,{suffix:`${((tn=ce.subject)==null?void 0:tn.length)||0}/60`,maxLength:60})),ze.createElement(Ce.default.Item,{label:"\u76EE\u5F55",name:"select_board_id",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u76EE\u5F55"}]},ze.createElement(ft.default,null,(_t=$t==null?void 0:$t.boards)==null?void 0:_t.map(jt=>ze.createElement(ft.default.Option,{value:jt==null?void 0:jt.id},jt==null?void 0:jt.name)))),ze.createElement(Ce.default.Item,{label:"\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},ze.createElement(Be.Z,{watch:!0,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5E16\u5B50\u8BE6\u60C5\uFF0C\u6700\u5927\u9650\u5236\u4E3A10000\u4E2A\u5B57\u7B26"})),ze.createElement(Ce.default.Item,{name:"attachment_ids"},ze.createElement(on.Z,null)),(0,it.dE)()&&ze.createElement(Re.ZP.Group,{style:{marginBottom:16},onChange:jt=>{Ht.view_message_setting=jt.target.value,Xt(Object.assign({},Ht))},value:Ht.view_message_setting},$t.allow_view_message&&ze.createElement(Re.ZP,{value:"0"},"\u5168\u8BFE\u5802\u53EF\u89C1"),ze.createElement(Re.ZP,{value:"1"},"\u540C\u73ED\u5B66\u751F\u53EF\u89C1")),(0,it.eB)()&&ze.createElement("div",null,ze.createElement(Re.ZP.Group,{onChange:()=>{Ht.unified_setting=!Ht.unified_setting,Xt(Object.assign({},Ht))},value:Ht.unified_setting},ze.createElement(Re.ZP,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),((en=et==null?void 0:et.course_groups)==null?void 0:en.length)>0&&ze.createElement(Re.ZP,{value:!1},"\u5206\u73ED\u53D1\u5E03")),(Ht==null?void 0:Ht.unified_setting)&&ze.createElement(Ce.default.Item,{style:{marginTop:16},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4"}],label:"\u53D1\u5E03\u65F6\u95F4",name:"publish_time"},ze.createElement(bt.default,{showTime:{format:"HH:mm"},disabledDate:jt=>jt&&jt<Ee()().subtract(1,"days"),style:{width:"100%"}})),!Ht.unified_setting&&ze.createElement(ht.Z,null,me&&(me==null?void 0:me.map(function(jt,rn){var qn;return ze.createElement(st.Z,{span:24,key:rn,style:{marginTop:30}},ze.createElement(ht.Z,{className:`${xt.publishRuleIndex}`,align:"middle"},"\u53D1\u5E03\u89C4\u5219 ",rn+1),ze.createElement(ht.Z,{className:`${xt.publishRuleContent} ${xt.contentInterval}`,align:"middle",wrap:!1},ze.createElement(st.Z,null,"\u73ED\u7EA7"),ze.createElement(st.Z,{className:xt.groupSelector},ze.createElement(ft.default,{showArrow:!0,allowClear:!0,style:{width:"100%"},mode:"multiple",size:"middle",value:jt.course_group_id,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",optionFilterProp:"label",onChange:lr=>{me[rn].group_id=lr,he(me.slice()),et.course_groups.map((Bt,Sn)=>{lr.map((dr,Wr)=>{Bt.id===dr&&(Bt.cilckkey=rn,Bt.isselect=!0)})})},onDeselect:lr=>{et.course_groups.map((Bt,Sn)=>{Bt.id===lr&&Bt.cilckkey===rn&&(Bt.cilckkey=rn,Bt.isselect=!1)})}},et.course_groups&&((qn=et.course_groups)==null?void 0:qn.filter(lr=>lr.edit_auth).map(function(lr,Bt){return ze.createElement(Option,{disabled:(lr==null?void 0:lr.isselect)&&lr.cilckkey!=rn,label:lr.course_group_name,value:lr.id,key:lr.id},lr.name)})))),ze.createElement(st.Z,null,"\u53D1\u5E03\u65F6\u95F4"),ze.createElement(st.Z,{flex:1},ze.createElement(bt.default,{showTime:{format:"HH:mm"},onChange:(lr,Bt)=>{me[rn].publish_time=lr,he([...me])},disabledDate:lr=>lr&&lr<Ee()().subtract(1,"days"),style:{width:"100%"}})),ze.createElement(st.Z,{className:xt.addAndDelete},ze.createElement(de.Z,{style:{visibility:(jt!=null&&jt.publish_time&&Ee()()<Ee()(jt==null?void 0:jt.publish_time)||!(jt!=null&&jt.publish_time))&&rn!=0?"visible":"hidden"},className:xt.deleteIcon,onClick:()=>{me=me.filter((lr,Bt)=>rn!==Bt),he([...me])}}),ze.createElement(je.Z,{className:xt.addIcon,onClick:()=>{he(me.concat({new:!0}))}}))))}))))),ze.createElement("div",{className:[xt.btn,"mt20"].join(" ")},ze.createElement(Ce.default.Item,null,ze.createElement(tt.ZP,{htmlType:"submit",size:"middle",type:"primary"},"\u63D0\u4EA4"),ze.createElement(tt.ZP,{size:"middle",ghost:!0,type:"primary",onClick:()=>{ve.history.push(`/classrooms/${Cn.coursesId}/board/${Cn.categoryId}`)}},"\u53D6\u6D88"))))))};var qt=(0,ve.connect)(({shixunHomeworks:pn,classroomList:cn,loading:Xe,user:Me,boards:mt,globalSetting:Gt})=>({shixunHomeworks:pn,globalSetting:Gt,classroomList:cn,user:Me,boards:mt,loading:Xe.effects}))(rt)},4440:function(kn,Vt,ae){"use strict";ae.d(Vt,{$J:function(){return Be},JZ:function(){return ve},bN:function(){return _e},jP:function(){return Ce},rO:function(){return Ye}});var fe=ae(33170),Fe=(we,ge,Te)=>new Promise((ft,Re)=>{var bt=tt=>{try{st(Te.next(tt))}catch(Le){Re(Le)}},ht=tt=>{try{st(Te.throw(tt))}catch(Le){Re(Le)}},st=tt=>tt.done?ft(tt.value):Promise.resolve(tt.value).then(bt,ht);st((Te=Te.apply(we,ge)).next())});function Be(we){return(0,fe.U2)(`libraries/${we}.json`)}function Ye(we){return(0,fe.U2)("library_tags.json",we)}function ve(we){return Fe(this,null,function*(){return(yield(0,fe.IV)(`attachments/${we}.json`)).status===0})}function Ce(we){return(0,fe.v_)("libraries.json",we)}function _e(we,ge){return(0,fe.gz)(`libraries/${we}.json`,ge)}},57838:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});var fe=ae(67294);function Fe(){const[,Be]=fe.useReducer(Ye=>Ye+1,0);return Be}},9708:function(kn,Vt,ae){"use strict";ae.d(Vt,{F:function(){return ve},Z:function(){return Ye}});var fe=ae(94184),Fe=ae.n(fe);const Be=null;function Ye(Ce,_e,we){return Fe()({[`${Ce}-status-success`]:_e==="success",[`${Ce}-status-warning`]:_e==="warning",[`${Ce}-status-error`]:_e==="error",[`${Ce}-status-validating`]:_e==="validating",[`${Ce}-has-feedback`]:we})}const ve=(Ce,_e)=>_e||Ce},85673:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return nn}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(37419),Ye=ae(1337),ve=ae(67294),Ce=ae(96159),_e=ae(53124),we=ae(42922),ge=ae(35874);const Te=rt=>{let{children:qt}=rt;const{getPrefixCls:pn}=ve.useContext(_e.E_),cn=pn("breadcrumb");return ve.createElement("li",{className:`${cn}-separator`,"aria-hidden":"true"},qt===""?qt:qt||"/")};Te.__ANT_BREADCRUMB_SEPARATOR=!0;var ft=Te,Re=function(rt,qt){var pn={};for(var cn in rt)Object.prototype.hasOwnProperty.call(rt,cn)&&qt.indexOf(cn)<0&&(pn[cn]=rt[cn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,cn=Object.getOwnPropertySymbols(rt);Xe<cn.length;Xe++)qt.indexOf(cn[Xe])<0&&Object.prototype.propertyIsEnumerable.call(rt,cn[Xe])&&(pn[cn[Xe]]=rt[cn[Xe]]);return pn};function bt(rt,qt){if(rt.title===void 0||rt.title===null)return null;const pn=Object.keys(qt).join("|");return typeof rt.title=="object"?rt.title:String(rt.title).replace(new RegExp(`:(${pn})`,"g"),(cn,Xe)=>qt[Xe]||cn)}function ht(rt,qt,pn,cn){if(pn==null)return null;const{className:Xe,onClick:Me}=qt,mt=Re(qt,["className","onClick"]),Gt=Object.assign(Object.assign({},(0,Ye.Z)(mt,{data:!0,aria:!0})),{onClick:Me});return cn!==void 0?ve.createElement("a",Object.assign({},Gt,{className:Fe()(`${rt}-link`,Xe),href:cn}),pn):ve.createElement("span",Object.assign({},Gt,{className:Fe()(`${rt}-link`,Xe)}),pn)}function st(rt,qt){return(cn,Xe,Me,mt,Gt)=>{if(qt)return qt(cn,Xe,Me,mt);const hn=bt(cn,Xe);return ht(rt,cn,hn,Gt)}}var tt=function(rt,qt){var pn={};for(var cn in rt)Object.prototype.hasOwnProperty.call(rt,cn)&&qt.indexOf(cn)<0&&(pn[cn]=rt[cn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,cn=Object.getOwnPropertySymbols(rt);Xe<cn.length;Xe++)qt.indexOf(cn[Xe])<0&&Object.prototype.propertyIsEnumerable.call(rt,cn[Xe])&&(pn[cn[Xe]]=rt[cn[Xe]]);return pn};const Le=rt=>{const{prefixCls:qt,separator:pn="/",children:cn,menu:Xe,overlay:Me,dropdownProps:mt,href:Gt}=rt,Qe=(ut=>{if(Xe||Me){const Yt=Object.assign({},mt);if(Xe){const Qt=Xe||{},{items:tn}=Qt,_t=tt(Qt,["items"]);Yt.menu=Object.assign(Object.assign({},_t),{items:tn==null?void 0:tn.map((en,Cn)=>{var{key:On,title:$e,label:ce,path:le}=en,me=tt(en,["key","title","label","path"]);let he=ce!=null?ce:$e;return le&&(he=ve.createElement("a",{href:`${Gt}${le}`},he)),Object.assign(Object.assign({},me),{key:On!=null?On:Cn,label:he})})})}else Me&&(Yt.overlay=Me);return ve.createElement(ge.Z,Object.assign({placement:"bottom"},Yt),ve.createElement("span",{className:`${qt}-overlay-link`},ut,ve.createElement(we.Z,null)))}return ut})(cn);return Qe!=null?ve.createElement(ve.Fragment,null,ve.createElement("li",null,Qe),pn&&ve.createElement(ft,null,pn)):null},xt=rt=>{const{prefixCls:qt,children:pn,href:cn}=rt,Xe=tt(rt,["prefixCls","children","href"]),{getPrefixCls:Me}=ve.useContext(_e.E_),mt=Me("breadcrumb",qt);return ve.createElement(Le,Object.assign({},Xe,{prefixCls:mt}),ht(mt,Xe,pn,cn))};xt.__ANT_BREADCRUMB_ITEM=!0;var on=xt,it=ae(14747),yt=ae(67968),Ee=ae(45503);const de=rt=>{const{componentCls:qt,iconCls:pn}=rt;return{[qt]:Object.assign(Object.assign({},(0,it.Wf)(rt)),{color:rt.itemColor,fontSize:rt.fontSize,[pn]:{fontSize:rt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:rt.linkColor,transition:`color ${rt.motionDurationMid}`,padding:`0 ${rt.paddingXXS}px`,borderRadius:rt.borderRadiusSM,height:rt.lineHeight*rt.fontSize,display:"inline-block",marginInline:-rt.marginXXS,"&:hover":{color:rt.linkHoverColor,backgroundColor:rt.colorBgTextHover}},(0,it.Qy)(rt)),"li:last-child":{color:rt.lastItemColor},[`${qt}-separator`]:{marginInline:rt.separatorMargin,color:rt.separatorColor},[`${qt}-link`]:{[`
> ${pn} + span,
> ${pn} + a
`]:{marginInlineStart:rt.marginXXS}},[`${qt}-overlay-link`]:{borderRadius:rt.borderRadiusSM,height:rt.lineHeight*rt.fontSize,display:"inline-block",padding:`0 ${rt.paddingXXS}px`,marginInline:-rt.marginXXS,[`> ${pn}`]:{marginInlineStart:rt.marginXXS,fontSize:rt.fontSizeIcon},"&:hover":{color:rt.linkHoverColor,backgroundColor:rt.colorBgTextHover,a:{color:rt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${rt.componentCls}-rtl`]:{direction:"rtl"}})}};var je=(0,yt.Z)("Breadcrumb",rt=>{const qt=(0,Ee.TS)(rt,{});return[de(qt)]},rt=>({itemColor:rt.colorTextDescription,lastItemColor:rt.colorText,iconFontSize:rt.fontSize,linkColor:rt.colorTextDescription,linkHoverColor:rt.colorText,separatorColor:rt.colorTextDescription,separatorMargin:rt.marginXS})),ze=function(rt,qt){var pn={};for(var cn in rt)Object.prototype.hasOwnProperty.call(rt,cn)&&qt.indexOf(cn)<0&&(pn[cn]=rt[cn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,cn=Object.getOwnPropertySymbols(rt);Xe<cn.length;Xe++)qt.indexOf(cn[Xe])<0&&Object.prototype.propertyIsEnumerable.call(rt,cn[Xe])&&(pn[cn[Xe]]=rt[cn[Xe]]);return pn};function At(rt){const{breadcrumbName:qt,children:pn}=rt,cn=ze(rt,["breadcrumbName","children"]),Xe=Object.assign({title:qt},cn);return pn&&(Xe.menu={items:pn.map(Me=>{var{breadcrumbName:mt}=Me,Gt=ze(Me,["breadcrumbName"]);return Object.assign(Object.assign({},Gt),{title:mt})})}),Xe}function ct(rt,qt){return(0,ve.useMemo)(()=>rt||(qt?qt.map(At):null),[rt,qt])}var lt=function(rt,qt){var pn={};for(var cn in rt)Object.prototype.hasOwnProperty.call(rt,cn)&&qt.indexOf(cn)<0&&(pn[cn]=rt[cn]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,cn=Object.getOwnPropertySymbols(rt);Xe<cn.length;Xe++)qt.indexOf(cn[Xe])<0&&Object.prototype.propertyIsEnumerable.call(rt,cn[Xe])&&(pn[cn[Xe]]=rt[cn[Xe]]);return pn};const Ze=(rt,qt)=>{if(qt===void 0)return qt;let pn=(qt||"").replace(/^\//,"");return Object.keys(rt).forEach(cn=>{pn=pn.replace(`:${cn}`,rt[cn])}),pn},kt=rt=>{const{prefixCls:qt,separator:pn="/",style:cn,className:Xe,rootClassName:Me,routes:mt,items:Gt,children:hn,itemRender:Qe,params:ut={}}=rt,Yt=lt(rt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Qt,direction:tn,breadcrumb:_t}=ve.useContext(_e.E_);let en;const Cn=Qt("breadcrumb",qt),[On,$e]=je(Cn),ce=ct(Gt,mt),le=st(Cn,Qe);if(ce&&ce.length>0){const se=[],Ie=Gt||mt;en=ce.map((et,$t)=>{const{path:Ht,key:Xt,type:jt,menu:rn,overlay:qn,onClick:lr,className:Bt,separator:Sn,dropdownProps:dr}=et,Wr=Ze(ut,Ht);Wr!==void 0&&se.push(Wr);const gt=Xt!=null?Xt:$t;if(jt==="separator")return ve.createElement(ft,{key:gt},Sn);const sn={},tr=$t===ce.length-1;rn?sn.menu=rn:qn&&(sn.overlay=qn);let{href:Zn}=et;return se.length&&Wr!==void 0&&(Zn=`#/${se.join("/")}`),ve.createElement(Le,Object.assign({key:gt},sn,(0,Ye.Z)(et,{data:!0,aria:!0}),{className:Bt,dropdownProps:dr,href:Zn,separator:tr?"":pn,onClick:lr,prefixCls:Cn}),le(et,ut,Ie,se,Zn))})}else if(hn){const se=(0,Be.Z)(hn).length;en=(0,Be.Z)(hn).map((Ie,et)=>{if(!Ie)return Ie;const $t=et===se-1;return(0,Ce.Tm)(Ie,{separator:$t?"":pn,key:et})})}const me=Fe()(Cn,_t==null?void 0:_t.className,{[`${Cn}-rtl`]:tn==="rtl"},Xe,Me,$e),he=Object.assign(Object.assign({},_t==null?void 0:_t.style),cn);return On(ve.createElement("nav",Object.assign({className:me,style:he},Yt),ve.createElement("ol",null,en)))};kt.Item=on,kt.Separator=ft;var pt=kt,nn=pt},84567:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return je}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(95860),Ye=ae(67294),ve=ae(53124),Ce=ae(98866),_e=ae(65223),ge=Ye.createContext(null),Te=ae(63185),ft=ae(45353),Re=ae(92429),bt=function(ze,At){var ct={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&At.indexOf(lt)<0&&(ct[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)At.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(ct[lt[Ze]]=ze[lt[Ze]]);return ct};const ht=(ze,At)=>{var ct;const{prefixCls:lt,className:Ze,rootClassName:kt,children:pt,indeterminate:nn=!1,style:rt,onMouseEnter:qt,onMouseLeave:pn,skipGroup:cn=!1,disabled:Xe}=ze,Me=bt(ze,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:mt,direction:Gt,checkbox:hn}=Ye.useContext(ve.E_),Qe=Ye.useContext(ge),{isFormItemInput:ut}=Ye.useContext(_e.aM),Yt=Ye.useContext(Ce.Z),Qt=(ct=(Qe==null?void 0:Qe.disabled)||Xe)!==null&&ct!==void 0?ct:Yt,tn=Ye.useRef(Me.value);Ye.useEffect(()=>{Qe==null||Qe.registerValue(Me.value)},[]),Ye.useEffect(()=>{if(!cn)return Me.value!==tn.current&&(Qe==null||Qe.cancelValue(tn.current),Qe==null||Qe.registerValue(Me.value),tn.current=Me.value),()=>Qe==null?void 0:Qe.cancelValue(Me.value)},[Me.value]);const _t=mt("checkbox",lt),[en,Cn]=(0,Te.ZP)(_t),On=Object.assign({},Me);Qe&&!cn&&(On.onChange=function(){Me.onChange&&Me.onChange.apply(Me,arguments),Qe.toggleOption&&Qe.toggleOption({label:pt,value:Me.value})},On.name=Qe.name,On.checked=Qe.value.includes(Me.value));const $e=Fe()(`${_t}-wrapper`,{[`${_t}-rtl`]:Gt==="rtl",[`${_t}-wrapper-checked`]:On.checked,[`${_t}-wrapper-disabled`]:Qt,[`${_t}-wrapper-in-form-item`]:ut},hn==null?void 0:hn.className,Ze,kt,Cn),ce=Fe()({[`${_t}-indeterminate`]:nn},Re.A,Cn),le=nn?"mixed":void 0;return en(Ye.createElement(ft.Z,{component:"Checkbox",disabled:Qt},Ye.createElement("label",{className:$e,style:Object.assign(Object.assign({},hn==null?void 0:hn.style),rt),onMouseEnter:qt,onMouseLeave:pn},Ye.createElement(Be.Z,Object.assign({"aria-checked":le},On,{prefixCls:_t,className:ce,disabled:Qt,ref:At})),pt!==void 0&&Ye.createElement("span",null,pt))))};var tt=Ye.forwardRef(ht),Le=ae(74902),xt=ae(10366),on=function(ze,At){var ct={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&At.indexOf(lt)<0&&(ct[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)At.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(ct[lt[Ze]]=ze[lt[Ze]]);return ct};const it=(ze,At)=>{const{defaultValue:ct,children:lt,options:Ze=[],prefixCls:kt,className:pt,rootClassName:nn,style:rt,onChange:qt}=ze,pn=on(ze,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:cn,direction:Xe}=Ye.useContext(ve.E_),[Me,mt]=Ye.useState(pn.value||ct||[]),[Gt,hn]=Ye.useState([]);Ye.useEffect(()=>{"value"in pn&&mt(pn.value||[])},[pn.value]);const Qe=Ye.useMemo(()=>Ze.map(me=>typeof me=="string"||typeof me=="number"?{label:me,value:me}:me),[Ze]),ut=me=>{hn(he=>he.filter(se=>se!==me))},Yt=me=>{hn(he=>[].concat((0,Le.Z)(he),[me]))},Qt=me=>{const he=Me.indexOf(me.value),se=(0,Le.Z)(Me);he===-1?se.push(me.value):se.splice(he,1),"value"in pn||mt(se),qt==null||qt(se.filter(Ie=>Gt.includes(Ie)).sort((Ie,et)=>{const $t=Qe.findIndex(Xt=>Xt.value===Ie),Ht=Qe.findIndex(Xt=>Xt.value===et);return $t-Ht}))},tn=cn("checkbox",kt),_t=`${tn}-group`,[en,Cn]=(0,Te.ZP)(tn),On=(0,xt.Z)(pn,["value","disabled"]),$e=Ze.length?Qe.map(me=>Ye.createElement(tt,{prefixCls:tn,key:me.value.toString(),disabled:"disabled"in me?me.disabled:pn.disabled,value:me.value,checked:Me.includes(me.value),onChange:me.onChange,className:`${_t}-item`,style:me.style,title:me.title},me.label)):lt,ce={toggleOption:Qt,value:Me,disabled:pn.disabled,name:pn.name,registerValue:Yt,cancelValue:ut},le=Fe()(_t,{[`${_t}-rtl`]:Xe==="rtl"},pt,nn,Cn);return en(Ye.createElement("div",Object.assign({className:le,style:rt},On,{ref:At}),Ye.createElement(ge.Provider,{value:ce},$e)))},yt=Ye.forwardRef(it);var Ee=Ye.memo(yt);const de=tt;de.Group=Ee,de.__ANT_CHECKBOX=!0;var je=de},63185:function(kn,Vt,ae){"use strict";ae.d(Vt,{C2:function(){return ve}});var fe=ae(14747),Fe=ae(45503),Be=ae(67968);const Ye=Ce=>{const{checkboxCls:_e}=Ce,we=`${_e}-wrapper`;return[{[`${_e}-group`]:Object.assign(Object.assign({},(0,fe.Wf)(Ce)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ce.marginXS,[`> ${Ce.antCls}-row`]:{flex:1}}),[we]:Object.assign(Object.assign({},(0,fe.Wf)(Ce)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${we}`]:{marginInlineStart:0},[`&${we}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[_e]:Object.assign(Object.assign({},(0,fe.Wf)(Ce)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ce.borderRadiusSM,alignSelf:"center",[`${_e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${_e}-inner`]:Object.assign({},(0,fe.oN)(Ce))},[`${_e}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ce.checkboxSize,height:Ce.checkboxSize,direction:"ltr",backgroundColor:Ce.colorBgContainer,border:`${Ce.lineWidth}px ${Ce.lineType} ${Ce.colorBorder}`,borderRadius:Ce.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ce.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ce.checkboxSize/14*5,height:Ce.checkboxSize/14*8,border:`${Ce.lineWidthBold}px solid ${Ce.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ce.motionDurationFast} ${Ce.motionEaseInBack}, opacity ${Ce.motionDurationFast}`}},"& + span":{paddingInlineStart:Ce.paddingXS,paddingInlineEnd:Ce.paddingXS}})},{[`
${we}:not(${we}-disabled),
${_e}:not(${_e}-disabled)
`]:{[`&:hover ${_e}-inner`]:{borderColor:Ce.colorPrimary}},[`${we}:not(${we}-disabled)`]:{[`&:hover ${_e}-checked:not(${_e}-disabled) ${_e}-inner`]:{backgroundColor:Ce.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${_e}-checked:not(${_e}-disabled):after`]:{borderColor:Ce.colorPrimaryHover}}},{[`${_e}-checked`]:{[`${_e}-inner`]:{backgroundColor:Ce.colorPrimary,borderColor:Ce.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ce.motionDurationMid} ${Ce.motionEaseOutBack} ${Ce.motionDurationFast}`}}},[`
${we}-checked:not(${we}-disabled),
${_e}-checked:not(${_e}-disabled)
`]:{[`&:hover ${_e}-inner`]:{backgroundColor:Ce.colorPrimaryHover,borderColor:"transparent"}}},{[_e]:{"&-indeterminate":{[`${_e}-inner`]:{backgroundColor:Ce.colorBgContainer,borderColor:Ce.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ce.fontSizeLG/2,height:Ce.fontSizeLG/2,backgroundColor:Ce.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${we}-disabled`]:{cursor:"not-allowed"},[`${_e}-disabled`]:{[`&, ${_e}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${_e}-inner`]:{background:Ce.colorBgContainerDisabled,borderColor:Ce.colorBorder,"&:after":{borderColor:Ce.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ce.colorTextDisabled},[`&${_e}-indeterminate ${_e}-inner::after`]:{background:Ce.colorTextDisabled}}}]};function ve(Ce,_e){const we=(0,Fe.TS)(_e,{checkboxCls:`.${Ce}`,checkboxSize:_e.controlInteractiveSize});return[Ye(we)]}Vt.ZP=(0,Be.Z)("Checkbox",(Ce,_e)=>{let{prefixCls:we}=_e;return[ve(we,Ce)]})},88258:function(kn,Vt,ae){"use strict";var fe=ae(67294),Fe=ae(53124),Be=ae(32983);const Ye=ve=>{const{componentName:Ce}=ve,{getPrefixCls:_e}=(0,fe.useContext)(Fe.E_),we=_e("empty");switch(Ce){case"Table":case"List":return fe.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return fe.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE,className:`${we}-small`});default:return fe.createElement(Be.Z,null)}};Vt.Z=Ye},34336:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return Ka}});var fe=ae(97909),Fe=ae.n(fe),Be=ae(68291),Ye=ae(33088),ve=ae.n(Ye),Ce=ae(26850),_e=ae.n(Ce),we=ae(23082),ge=ae.n(we),Te=ae(99873),ft=ae.n(Te),Re=ae(86625),bt=ae.n(Re),ht=ae(40618),st=ae.n(ht);Fe().extend(st()),Fe().extend(bt()),Fe().extend(ve()),Fe().extend(_e()),Fe().extend(ge()),Fe().extend(ft()),Fe().extend(function(ye,ke){var De=ke.prototype,nt=De.format;De.format=function(an){var Zt=(an||"").replace("Wo","wo");return nt.bind(this)(Zt)}});var tt={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Le=function(ke){var De=tt[ke];return De||ke.split("_")[0]},xt=function(){(0,Be.ET)(!1,"Not match any format. Please help to fire a issue about this.")},on={getNow:function(){return Fe()()},getFixedDate:function(ke){return Fe()(ke,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(ke){return ke.endOf("month")},getWeekDay:function(ke){var De=ke.locale("en");return De.weekday()+De.localeData().firstDayOfWeek()},getYear:function(ke){return ke.year()},getMonth:function(ke){return ke.month()},getDate:function(ke){return ke.date()},getHour:function(ke){return ke.hour()},getMinute:function(ke){return ke.minute()},getSecond:function(ke){return ke.second()},addYear:function(ke,De){return ke.add(De,"year")},addMonth:function(ke,De){return ke.add(De,"month")},addDate:function(ke,De){return ke.add(De,"day")},setYear:function(ke,De){return ke.year(De)},setMonth:function(ke,De){return ke.month(De)},setDate:function(ke,De){return ke.date(De)},setHour:function(ke,De){return ke.hour(De)},setMinute:function(ke,De){return ke.minute(De)},setSecond:function(ke,De){return ke.second(De)},isAfter:function(ke,De){return ke.isAfter(De)},isValidate:function(ke){return ke.isValid()},locale:{getWeekFirstDay:function(ke){return Fe()().locale(Le(ke)).localeData().firstDayOfWeek()},getWeekFirstDate:function(ke,De){return De.locale(Le(ke)).weekday(0)},getWeek:function(ke,De){return De.locale(Le(ke)).week()},getShortWeekDays:function(ke){return Fe()().locale(Le(ke)).localeData().weekdaysMin()},getShortMonths:function(ke){return Fe()().locale(Le(ke)).localeData().monthsShort()},format:function(ke,De,nt){return De.locale(Le(ke)).format(nt)},parse:function(ke,De,nt){for(var at=Le(ke),an=0;an<nt.length;an+=1){var Zt=nt[an],Pn=De;if(Zt.includes("wo")||Zt.includes("Wo")){for(var fn=Pn.split("-")[0],Ut=Pn.split("-")[1],Kn=Fe()(fn,"YYYY").startOf("year").locale(at),gn=0;gn<=52;gn+=1){var xn=Kn.add(gn,"week");if(xn.format("Wo")===Ut)return xn}return xt(),null}var ir=Fe()(Pn,Zt,!0).locale(at);if(ir.isValid())return ir}return De&&xt(),null}}},it=on,yt=ae(8745),Ee=ae(87462),de=ae(67294),je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},ze=je,At=ae(84089),ct=function(ke,De){return de.createElement(At.Z,(0,Ee.Z)({},ke,{ref:De,icon:ze}))},lt=de.forwardRef(ct),Ze={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},kt=Ze,pt=function(ke,De){return de.createElement(At.Z,(0,Ee.Z)({},ke,{ref:De,icon:kt}))},nn=de.forwardRef(pt),rt=ae(16646),qt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},pn=qt,cn=function(ke,De){return de.createElement(At.Z,(0,Ee.Z)({},ke,{ref:De,icon:pn}))},Xe=de.forwardRef(cn),Me=ae(94184),mt=ae.n(Me),Gt=ae(15671),hn=ae(43144),Qe=ae(97326),ut=ae(60136),Yt=ae(51630),Qt=ae(4942),tn=ae(1413),_t=ae(97685),en=ae(5663),Cn=ae(1337),On=ae(92739),$e=ae(7699),ce=10,le=ce*10,me=7;function he(ye,ke){if(!ye&&!ke)return!0;if(!ye||!ke)return!1}function se(ye,ke,De){var nt=he(ke,De);if(typeof nt=="boolean")return nt;var at=Math.floor(ye.getYear(ke)/10),an=Math.floor(ye.getYear(De)/10);return at===an}function Ie(ye,ke,De){var nt=he(ke,De);return typeof nt=="boolean"?nt:ye.getYear(ke)===ye.getYear(De)}function et(ye,ke){var De=Math.floor(ye.getMonth(ke)/3);return De+1}function $t(ye,ke,De){var nt=he(ke,De);return typeof nt=="boolean"?nt:Ie(ye,ke,De)&&et(ye,ke)===et(ye,De)}function Ht(ye,ke,De){var nt=he(ke,De);return typeof nt=="boolean"?nt:Ie(ye,ke,De)&&ye.getMonth(ke)===ye.getMonth(De)}function Xt(ye,ke,De){var nt=he(ke,De);return typeof nt=="boolean"?nt:ye.getYear(ke)===ye.getYear(De)&&ye.getMonth(ke)===ye.getMonth(De)&&ye.getDate(ke)===ye.getDate(De)}function jt(ye,ke,De){var nt=he(ke,De);return typeof nt=="boolean"?nt:ye.getHour(ke)===ye.getHour(De)&&ye.getMinute(ke)===ye.getMinute(De)&&ye.getSecond(ke)===ye.getSecond(De)}function rn(ye,ke,De,nt){var at=he(De,nt);return typeof at=="boolean"?at:Ie(ye,De,nt)&&ye.locale.getWeek(ke,De)===ye.locale.getWeek(ke,nt)}function qn(ye,ke,De){return Xt(ye,ke,De)&&jt(ye,ke,De)}function lr(ye,ke,De,nt){return!ke||!De||!nt?!1:!Xt(ye,ke,nt)&&!Xt(ye,De,nt)&&ye.isAfter(nt,ke)&&ye.isAfter(De,nt)}function Bt(ye,ke,De){var nt=ke.locale.getWeekFirstDay(ye),at=ke.setDate(De,1),an=ke.getWeekDay(at),Zt=ke.addDate(at,nt-an);return ke.getMonth(Zt)===ke.getMonth(De)&&ke.getDate(Zt)>1&&(Zt=ke.addDate(Zt,-7)),Zt}function Sn(ye,ke,De){var nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(ke){case"year":return De.addYear(ye,nt*10);case"quarter":case"month":return De.addYear(ye,nt);default:return De.addMonth(ye,nt)}}function dr(ye,ke){var De=ke.generateConfig,nt=ke.locale,at=ke.format;return typeof at=="function"?at(ye):De.locale.format(nt.locale,ye,at)}function Wr(ye,ke){var De=ke.generateConfig,nt=ke.locale,at=ke.formatList;return!ye||typeof at[0]=="function"?null:De.locale.parse(nt.locale,ye,at)}function gt(ye){var ke=ye.cellDate,De=ye.mode,nt=ye.disabledDate,at=ye.generateConfig;if(!nt)return!1;var an=function(sr,Mn,Xn){for(var Mr=Mn;Mr<=Xn;){var Tr=void 0;switch(sr){case"date":{if(Tr=at.setDate(ke,Mr),!nt(Tr))return!1;break}case"month":{if(Tr=at.setMonth(ke,Mr),!gt({cellDate:Tr,mode:"month",generateConfig:at,disabledDate:nt}))return!1;break}case"year":{if(Tr=at.setYear(ke,Mr),!gt({cellDate:Tr,mode:"year",generateConfig:at,disabledDate:nt}))return!1;break}}Mr+=1}return!0};switch(De){case"date":case"week":return nt(ke);case"month":{var Zt=1,Pn=at.getDate(at.getEndDate(ke));return an("date",Zt,Pn)}case"quarter":{var fn=Math.floor(at.getMonth(ke)/3)*3,Ut=fn+2;return an("month",fn,Ut)}case"year":return an("month",0,11);case"decade":{var Kn=at.getYear(ke),gn=Math.floor(Kn/ce)*ce,xn=gn+ce-1;return an("year",gn,xn)}}}function sn(ye,ke){var De=ke.formatList,nt=ke.generateConfig,at=ke.locale;return(0,On.Z)(function(){if(!ye)return[[""],""];for(var an="",Zt=[],Pn=0;Pn<De.length;Pn+=1){var fn=De[Pn],Ut=dr(ye,{generateConfig:nt,locale:at,format:fn});Zt.push(Ut),Pn===0&&(an=Ut)}return[Zt,an]},[ye,De,at],function(an,Zt){return!qn(nt,an[0],Zt[0])||!(0,$e.Z)(an[1],Zt[1],!0)||!(0,$e.Z)(an[2],Zt[2],!0)})}function tr(ye,ke){var De=ke.formatList,nt=ke.generateConfig,at=ke.locale,an=(0,de.useState)(null),Zt=(0,_t.Z)(an,2),Pn=Zt[0],fn=Zt[1],Ut=(0,de.useRef)(null);function Kn(Xn){var Mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(Ut.current),Mr){fn(Xn);return}Ut.current=requestAnimationFrame(function(){fn(Xn)})}var gn=sn(Pn,{formatList:De,generateConfig:nt,locale:at}),xn=(0,_t.Z)(gn,2),ir=xn[1];function sr(Xn){Kn(Xn)}function Mn(){var Xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Kn(null,Xn)}return(0,de.useEffect)(function(){Mn(!0)},[ye]),(0,de.useEffect)(function(){return function(){return cancelAnimationFrame(Ut.current)}},[]),[ir,sr,Mn]}var Zn=ae(92389),xr=ae(96523),Kr=ae(74902),Jr=ae(48130),Zr=new Map;function ei(ye,ke){var De;function nt(){(0,Jr.Z)(ye)?ke():De=(0,xr.Z)(function(){nt()})}return nt(),function(){xr.Z.cancel(De)}}function pi(ye,ke,De){if(Zr.get(ye)&&cancelAnimationFrame(Zr.get(ye)),De<=0){Zr.set(ye,requestAnimationFrame(function(){ye.scrollTop=ke}));return}var nt=ke-ye.scrollTop,at=nt/De*10;Zr.set(ye,requestAnimationFrame(function(){ye.scrollTop+=at,ye.scrollTop!==ke&&pi(ye,ke,De-10)}))}function kr(ye,ke){var De=ke.onLeftRight,nt=ke.onCtrlLeftRight,at=ke.onUpDown,an=ke.onPageUpDown,Zt=ke.onEnter,Pn=ye.which,fn=ye.ctrlKey,Ut=ye.metaKey;switch(Pn){case Zn.Z.LEFT:if(fn||Ut){if(nt)return nt(-1),!0}else if(De)return De(-1),!0;break;case Zn.Z.RIGHT:if(fn||Ut){if(nt)return nt(1),!0}else if(De)return De(1),!0;break;case Zn.Z.UP:if(at)return at(-1),!0;break;case Zn.Z.DOWN:if(at)return at(1),!0;break;case Zn.Z.PAGE_UP:if(an)return an(-1),!0;break;case Zn.Z.PAGE_DOWN:if(an)return an(1),!0;break;case Zn.Z.ENTER:if(Zt)return Zt(),!0;break}return!1}function Ti(ye,ke,De,nt){var at=ye;if(!at)switch(ke){case"time":at=nt?"hh:mm:ss a":"HH:mm:ss";break;case"week":at="gggg-wo";break;case"month":at="YYYY-MM";break;case"quarter":at="YYYY-[Q]Q";break;case"year":at="YYYY";break;default:at=De?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return at}function na(ye,ke,De){var nt=ye==="time"?8:10,at=typeof ke=="function"?ke(De.getNow()).length:ke.length;return Math.max(nt,at)+2}var ea=null,oa=new Set;function Li(ye){return!ea&&typeof window!="undefined"&&window.addEventListener&&(ea=function(De){(0,Kr.Z)(oa).forEach(function(nt){nt(De)})},window.addEventListener("mousedown",ea)),oa.add(ye),function(){oa.delete(ye),oa.size===0&&(window.removeEventListener("mousedown",ea),ea=null)}}function Dt(ye){var ke=ye.target;if(ye.composed&&ke.shadowRoot){var De;return((De=ye.composedPath)===null||De===void 0?void 0:De.call(ye)[0])||ke}return ke}var Hn=function(ke){return ke==="month"||ke==="date"?"year":ke},Vn=function(ke){return ke==="date"?"month":ke},Gn=function(ke){return ke==="month"||ke==="date"?"quarter":ke},Lr=function(ke){return ke==="date"?"week":ke},yr={year:Hn,month:Vn,quarter:Gn,week:Lr,time:null,date:null};function Pr(ye,ke){return ye.some(function(De){return De&&De.contains(ke)})}function nr(ye){var ke=ye.open,De=ye.value,nt=ye.isClickOutside,at=ye.triggerOpen,an=ye.forwardKeyDown,Zt=ye.onKeyDown,Pn=ye.blurToCancel,fn=ye.onSubmit,Ut=ye.onCancel,Kn=ye.onFocus,gn=ye.onBlur,xn=ye.changeOnBlur,ir=(0,de.useState)(!1),sr=(0,_t.Z)(ir,2),Mn=sr[0],Xn=sr[1],Mr=(0,de.useState)(!1),Tr=(0,_t.Z)(Mr,2),Vr=Tr[0],si=Tr[1],xi=(0,de.useRef)(!1),hi=(0,de.useRef)(!1),Xr=(0,de.useRef)(!1),da={onMouseDown:function(){Xn(!0),at(!0)},onKeyDown:function(Na){var Ua=function(){Xr.current=!0};if(Zt(Na,Ua),!Xr.current){switch(Na.which){case Zn.Z.ENTER:{ke?fn()!==!1&&Xn(!0):at(!0),Na.preventDefault();return}case Zn.Z.TAB:{Mn&&ke&&!Na.shiftKey?(Xn(!1),Na.preventDefault()):!Mn&&ke&&!an(Na)&&Na.shiftKey&&(Xn(!0),Na.preventDefault());return}case Zn.Z.ESC:{Xn(!0),Ut();return}}!ke&&![Zn.Z.SHIFT].includes(Na.which)?at(!0):Mn||an(Na)}},onFocus:function(Na){Xn(!0),si(!0),Kn&&Kn(Na)},onBlur:function(Na){if(xi.current||!nt(document.activeElement)){xi.current=!1;return}Pn?setTimeout(function(){for(var Ua=document,Sa=Ua.activeElement;Sa&&Sa.shadowRoot;)Sa=Sa.shadowRoot.activeElement;nt(Sa)&&Ut()},0):ke&&(at(!1),hi.current&&fn()),si(!1),gn==null||gn(Na)}};return(0,de.useEffect)(function(){hi.current=!1},[ke]),(0,de.useEffect)(function(){hi.current=!0},[De]),(0,de.useEffect)(function(){return Li(function(Ji){var Na=Dt(Ji),Ua=nt(Na);ke&&(Ua?!xn&&(!Vr||Ua)&&at(!1):(xi.current=!0,(0,xr.Z)(function(){xi.current=!1})))})}),[da,{focused:Vr,typing:Mn}]}function ot(ye,ke){return de.useMemo(function(){return ye||(ke?((0,Be.ZP)(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(ke).map(function(De){var nt=(0,_t.Z)(De,2),at=nt[0],an=nt[1];return{label:at,value:an}})):[])},[ye,ke])}var Ct=ae(14075);function zt(ye){var ke=ye.valueTexts,De=ye.onTextChange,nt=de.useState(""),at=(0,_t.Z)(nt,2),an=at[0],Zt=at[1],Pn=de.useRef([]);Pn.current=ke;function fn(Kn){Zt(Kn),De(Kn)}function Ut(){Zt(Pn.current[0])}return(0,Ct.Z)(function(){ke.every(function(Kn){return Kn!==an})&&Ut()},[ke.join("||")]),[an,fn,Ut]}var un=de.createContext({}),Je=un,Mt=ae(71002);function ln(ye){var ke=ye.cellRender,De=ye.monthCellRender,nt=ye.dateRender,at=de.useMemo(function(){if(ke)return ke;if(!(!De&&!nt))return function(an,Zt){var Pn=an;return nt&&Zt.type==="date"?nt(Pn,Zt.today):De&&Zt.type==="month"?De(Pn,Zt.locale):Zt.originNode}},[ke,De,nt]);return at}function Jt(ye,ke){for(var De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",nt=String(ye);nt.length<ke;)nt="".concat(De).concat(ye);return nt}var vn=function(){for(var ke=arguments.length,De=new Array(ke),nt=0;nt<ke;nt++)De[nt]=arguments[nt];return De};function bn(ye){return ye==null?[]:Array.isArray(ye)?ye:[ye]}function Fn(ye,ke){return ye?ye[ke]:null}function Nr(ye,ke,De){var nt=[Fn(ye,0),Fn(ye,1)];return nt[De]=typeof ke=="function"?ke(nt[De]):ke,!nt[0]&&!nt[1]?null:nt}function Sr(ye){return typeof ye=="function"?ye():ye}function vr(ye){var ke=ye.cellPrefixCls,De=ye.generateConfig,nt=ye.rangedValue,at=ye.hoverRangedValue,an=ye.isInView,Zt=ye.isSameCell,Pn=ye.offsetCell,fn=ye.today,Ut=ye.value;function Kn(gn){var xn,ir=Pn(gn,-1),sr=Pn(gn,1),Mn=Fn(nt,0),Xn=Fn(nt,1),Mr=Fn(at,0),Tr=Fn(at,1),Vr=lr(De,Mr,Tr,gn);function si(Na){return Zt(Mn,Na)}function xi(Na){return Zt(Xn,Na)}var hi=Zt(Mr,gn),Xr=Zt(Tr,gn),da=(Vr||Xr)&&(!an(ir)||xi(ir)),Ji=(Vr||hi)&&(!an(sr)||si(sr));return xn={},(0,Qt.Z)(xn,"".concat(ke,"-in-view"),an(gn)),(0,Qt.Z)(xn,"".concat(ke,"-in-range"),lr(De,Mn,Xn,gn)),(0,Qt.Z)(xn,"".concat(ke,"-range-start"),si(gn)),(0,Qt.Z)(xn,"".concat(ke,"-range-end"),xi(gn)),(0,Qt.Z)(xn,"".concat(ke,"-range-start-single"),si(gn)&&!Xn),(0,Qt.Z)(xn,"".concat(ke,"-range-end-single"),xi(gn)&&!Mn),(0,Qt.Z)(xn,"".concat(ke,"-range-start-near-hover"),si(gn)&&(Zt(ir,Mr)||lr(De,Mr,Tr,ir))),(0,Qt.Z)(xn,"".concat(ke,"-range-end-near-hover"),xi(gn)&&(Zt(sr,Tr)||lr(De,Mr,Tr,sr))),(0,Qt.Z)(xn,"".concat(ke,"-range-hover"),Vr),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-start"),hi),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-end"),Xr),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-edge-start"),da),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-edge-end"),Ji),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-edge-start-near-range"),da&&Zt(ir,Xn)),(0,Qt.Z)(xn,"".concat(ke,"-range-hover-edge-end-near-range"),Ji&&Zt(sr,Mn)),(0,Qt.Z)(xn,"".concat(ke,"-today"),Zt(fn,gn)),(0,Qt.Z)(xn,"".concat(ke,"-selected"),Zt(Ut,gn)),xn}return Kn}var Ir=de.createContext({}),_r=Ir;function Lt(ye,ke,De,nt,at){var an=ye.setHour(ke,De);return an=ye.setMinute(an,nt),an=ye.setSecond(an,at),an}function wt(ye,ke,De){if(!De)return ke;var nt=ke;return nt=ye.setHour(nt,ye.getHour(De)),nt=ye.setMinute(nt,ye.getMinute(De)),nt=ye.setSecond(nt,ye.getSecond(De)),nt}function Ot(ye,ke,De,nt,at,an){var Zt=Math.floor(ye/nt)*nt;if(Zt<ye)return[Zt,60-at,60-an];var Pn=Math.floor(ke/at)*at;if(Pn<ke)return[Zt,Pn,60-an];var fn=Math.floor(De/an)*an;return[Zt,Pn,fn]}function Dn(ye,ke){var De=ye.getYear(ke),nt=ye.getMonth(ke)+1,at=ye.getEndDate(ye.getFixedDate("".concat(De,"-").concat(nt,"-01"))),an=ye.getDate(at),Zt=nt<10?"0".concat(nt):"".concat(nt);return"".concat(De,"-").concat(Zt,"-").concat(an)}function er(ye){for(var ke=ye.prefixCls,De=ye.disabledDate,nt=ye.onSelect,at=ye.picker,an=ye.rowNum,Zt=ye.colNum,Pn=ye.prefixColumn,fn=ye.rowClassName,Ut=ye.baseDate,Kn=ye.getCellClassName,gn=ye.getCellText,xn=ye.getCellNode,ir=ye.getCellDate,sr=ye.generateConfig,Mn=ye.titleCell,Xn=ye.headerCells,Mr=de.useContext(Je),Tr=Mr.onDateMouseEnter,Vr=Mr.onDateMouseLeave,si=Mr.mode,xi="".concat(ke,"-cell"),hi=[],Xr=0;Xr<an;Xr+=1){for(var da=[],Ji=void 0,Na=function(){var ji,$a=Xr*Zt+Ua,Ca=ir(Ut,$a),fa=gt({cellDate:Ca,mode:si,disabledDate:De,generateConfig:sr});Ua===0&&(Ji=Ca,Pn&&da.push(Pn(Ji)));var La=Mn&&Mn(Ca),Oa=de.createElement("div",{className:"".concat(xi,"-inner")},gn(Ca));da.push(de.createElement("td",{key:Ua,title:La,className:mt()(xi,(0,tn.Z)((ji={},(0,Qt.Z)(ji,"".concat(xi,"-disabled"),fa),(0,Qt.Z)(ji,"".concat(xi,"-start"),gn(Ca)===1||at==="year"&&Number(La)%10===0),(0,Qt.Z)(ji,"".concat(xi,"-end"),La===Dn(sr,Ca)||at==="year"&&Number(La)%10===9),ji),Kn(Ca))),onClick:function(){fa||nt(Ca)},onMouseEnter:function(){!fa&&Tr&&Tr(Ca)},onMouseLeave:function(){!fa&&Vr&&Vr(Ca)}},xn?xn(Ca,Oa):Oa))},Ua=0;Ua<Zt;Ua+=1)Na();hi.push(de.createElement("tr",{key:Xr,className:fn&&fn(Ji)},da))}return de.createElement("div",{className:"".concat(ke,"-body")},de.createElement("table",{className:"".concat(ke,"-content")},Xn&&de.createElement("thead",null,de.createElement("tr",null,Xn)),de.createElement("tbody",null,hi)))}function An(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.prefixColumn,at=ye.locale,an=ye.rowCount,Zt=ye.viewDate,Pn=ye.value,fn=ye.cellRender,Ut=ye.isSameCell,Kn=de.useContext(_r),gn=Kn.rangedValue,xn=Kn.hoverRangedValue,ir=Bt(at.locale,De,Zt),sr="".concat(ke,"-cell"),Mn=De.locale.getWeekFirstDay(at.locale),Xn=De.getNow(),Mr=[],Tr=at.shortWeekDays||(De.locale.getShortWeekDays?De.locale.getShortWeekDays(at.locale):[]);nt&&Mr.push(de.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var Vr=0;Vr<me;Vr+=1)Mr.push(de.createElement("th",{key:Vr},Tr[(Vr+Mn)%me]));var si=vr({cellPrefixCls:sr,today:Xn,value:Pn,generateConfig:De,rangedValue:nt?null:gn,hoverRangedValue:nt?null:xn,isSameCell:Ut||function(hi,Xr){return Xt(De,hi,Xr)},isInView:function(Xr){return Ht(De,Xr,Zt)},offsetCell:function(Xr,da){return De.addDate(Xr,da)}}),xi=fn?function(hi,Xr){return fn(hi,{originNode:Xr,today:Xn,type:"date",locale:at})}:void 0;return de.createElement(er,(0,Ee.Z)({},ye,{rowNum:an,colNum:me,baseDate:ir,getCellNode:xi,getCellText:De.getDate,getCellClassName:si,getCellDate:De.addDate,titleCell:function(Xr){return dr(Xr,{locale:at,format:"YYYY-MM-DD",generateConfig:De})},headerCells:Mr}))}var Rn=An,Nn={visibility:"hidden"};function rr(ye){var ke=ye.prefixCls,De=ye.prevIcon,nt=De===void 0?"\u2039":De,at=ye.nextIcon,an=at===void 0?"\u203A":at,Zt=ye.superPrevIcon,Pn=Zt===void 0?"\xAB":Zt,fn=ye.superNextIcon,Ut=fn===void 0?"\xBB":fn,Kn=ye.onSuperPrev,gn=ye.onSuperNext,xn=ye.onPrev,ir=ye.onNext,sr=ye.children,Mn=de.useContext(Je),Xn=Mn.hideNextBtn,Mr=Mn.hidePrevBtn;return de.createElement("div",{className:ke},Kn&&de.createElement("button",{type:"button",onClick:Kn,tabIndex:-1,className:"".concat(ke,"-super-prev-btn"),style:Mr?Nn:{}},Pn),xn&&de.createElement("button",{type:"button",onClick:xn,tabIndex:-1,className:"".concat(ke,"-prev-btn"),style:Mr?Nn:{}},nt),de.createElement("div",{className:"".concat(ke,"-view")},sr),ir&&de.createElement("button",{type:"button",onClick:ir,tabIndex:-1,className:"".concat(ke,"-next-btn"),style:Xn?Nn:{}},an),gn&&de.createElement("button",{type:"button",onClick:gn,tabIndex:-1,className:"".concat(ke,"-super-next-btn"),style:Xn?Nn:{}},Ut))}var Dr=rr;function yn(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.locale,at=ye.viewDate,an=ye.onNextMonth,Zt=ye.onPrevMonth,Pn=ye.onNextYear,fn=ye.onPrevYear,Ut=ye.onYearClick,Kn=ye.onMonthClick,gn=de.useContext(Je),xn=gn.hideHeader;if(xn)return null;var ir="".concat(ke,"-header"),sr=nt.shortMonths||(De.locale.getShortMonths?De.locale.getShortMonths(nt.locale):[]),Mn=De.getMonth(at),Xn=de.createElement("button",{type:"button",key:"year",onClick:Ut,tabIndex:-1,className:"".concat(ke,"-year-btn")},dr(at,{locale:nt,format:nt.yearFormat,generateConfig:De})),Mr=de.createElement("button",{type:"button",key:"month",onClick:Kn,tabIndex:-1,className:"".concat(ke,"-month-btn")},nt.monthFormat?dr(at,{locale:nt,format:nt.monthFormat,generateConfig:De}):sr[Mn]),Tr=nt.monthBeforeYear?[Mr,Xn]:[Xn,Mr];return de.createElement(Dr,(0,Ee.Z)({},ye,{prefixCls:ir,onSuperPrev:fn,onPrev:Zt,onNext:an,onSuperNext:Pn}),Tr)}var Si=yn,di=6;function ha(ye){var ke=ye.prefixCls,De=ye.panelName,nt=De===void 0?"date":De,at=ye.keyboardConfig,an=ye.active,Zt=ye.operationRef,Pn=ye.generateConfig,fn=ye.value,Ut=ye.viewDate,Kn=ye.onViewDateChange,gn=ye.onPanelChange,xn=ye.onSelect,ir="".concat(ke,"-").concat(nt,"-panel");Zt.current={onKeyDown:function(Mr){return kr(Mr,(0,tn.Z)({onLeftRight:function(Vr){xn(Pn.addDate(fn||Ut,Vr),"key")},onCtrlLeftRight:function(Vr){xn(Pn.addYear(fn||Ut,Vr),"key")},onUpDown:function(Vr){xn(Pn.addDate(fn||Ut,Vr*me),"key")},onPageUpDown:function(Vr){xn(Pn.addMonth(fn||Ut,Vr),"key")}},at))}};var sr=function(Mr){var Tr=Pn.addYear(Ut,Mr);Kn(Tr),gn(null,Tr)},Mn=function(Mr){var Tr=Pn.addMonth(Ut,Mr);Kn(Tr),gn(null,Tr)};return de.createElement("div",{className:mt()(ir,(0,Qt.Z)({},"".concat(ir,"-active"),an))},de.createElement(Si,(0,Ee.Z)({},ye,{prefixCls:ke,value:fn,viewDate:Ut,onPrevYear:function(){sr(-1)},onNextYear:function(){sr(1)},onPrevMonth:function(){Mn(-1)},onNextMonth:function(){Mn(1)},onMonthClick:function(){gn("month",Ut)},onYearClick:function(){gn("year",Ut)}})),de.createElement(Rn,(0,Ee.Z)({},ye,{onSelect:function(Mr){return xn(Mr,"mouse")},prefixCls:ke,value:fn,viewDate:Ut,rowCount:di})))}var ta=ha;function Wi(ye){var ke=de.useContext(Je),De=ke.hideHeader;if(De)return null;var nt=ye.prefixCls,at=ye.generateConfig,an=ye.locale,Zt=ye.value,Pn=ye.format,fn="".concat(nt,"-header");return de.createElement(Dr,{prefixCls:fn},Zt?dr(Zt,{locale:an,format:Pn,generateConfig:at}):"\xA0")}var Ta=Wi;function Gi(ye){var ke=ye.value,De=ye.generateConfig,nt=ye.disabledMinutes,at=ye.disabledSeconds,an=ye.minutes,Zt=ye.seconds,Pn=ye.use12Hours,fn=function(Kn,gn,xn,ir){var sr=De.getNow(),Mn=ke||sr,Xn=gn<0?De.getHour(sr):gn,Mr=xn<0?De.getMinute(sr):xn,Tr=ir<0?De.getSecond(sr):ir,Vr=nt&&nt(Xn);if(Vr!=null&&Vr.includes(Mr)){var si=an.find(function(Xr){return!Vr.includes(Xr.value)});if(si)Mr=si.value;else return null}var xi=at&&at(Xn,Mr);if(xi!=null&&xi.includes(Tr)){var hi=Zt.find(function(Xr){return!xi.includes(Xr.value)});if(hi)Tr=hi.value;else return null}return Mn=Lt(De,Mn,!Pn||!Kn?Xn:Xn+12,Mr,Tr),Mn};return fn}function $i(ye){var ke=ye.prefixCls,De=ye.units,nt=ye.onSelect,at=ye.value,an=ye.active,Zt=ye.hideDisabledOptions,Pn=ye.info,fn=ye.type,Ut="".concat(ke,"-cell"),Kn=de.useContext(Je),gn=Kn.open,xn=(0,de.useRef)(null),ir=(0,de.useRef)(new Map),sr=(0,de.useRef)();return(0,de.useLayoutEffect)(function(){var Mn=ir.current.get(at);Mn&&gn!==!1&&pi(xn.current,Mn.offsetTop,120)},[at]),(0,de.useLayoutEffect)(function(){if(gn){var Mn=ir.current.get(at);Mn&&(sr.current=ei(Mn,function(){pi(xn.current,Mn.offsetTop,0)}))}return function(){var Xn;(Xn=sr.current)===null||Xn===void 0||Xn.call(sr)}},[gn]),de.createElement("ul",{className:mt()("".concat(ke,"-column"),(0,Qt.Z)({},"".concat(ke,"-column-active"),an)),ref:xn,style:{position:"relative"}},De.map(function(Mn){var Xn;return Zt&&Mn.disabled?null:de.createElement("li",{key:Mn.value,ref:function(Tr){ir.current.set(Mn.value,Tr)},className:mt()(Ut,(Xn={},(0,Qt.Z)(Xn,"".concat(Ut,"-disabled"),Mn.disabled),(0,Qt.Z)(Xn,"".concat(Ut,"-selected"),at===Mn.value),Xn)),onClick:function(){Mn.disabled||nt(Mn.value)}},Pn.cellRender?Pn.cellRender(Mn.value,{today:Pn.today,locale:Pn.locale,originNode:de.createElement("div",{className:"".concat(Ut,"-inner")},Mn.label),type:"time",subType:fn}):de.createElement("div",{className:"".concat(Ut,"-inner")},Mn.label))}))}var ra=$i;function Ma(ye,ke){if(ye.length!==ke.length)return!0;for(var De=0;De<ye.length;De+=1)if(ye[De].disabled!==ke[De].disabled)return!0;return!1}function vi(ye,ke,De,nt){for(var at=[],an=De>=1?De|0:1,Zt=ye;Zt<=ke;Zt+=an)at.push({label:Jt(Zt,2),value:Zt,disabled:(nt||[]).includes(Zt)});return at}function Zi(ye){var ke=ye.generateConfig,De=ye.prefixCls,nt=ye.operationRef,at=ye.activeColumnIndex,an=ye.value,Zt=ye.showHour,Pn=ye.showMinute,fn=ye.showSecond,Ut=ye.use12Hours,Kn=ye.hourStep,gn=Kn===void 0?1:Kn,xn=ye.minuteStep,ir=xn===void 0?1:xn,sr=ye.secondStep,Mn=sr===void 0?1:sr,Xn=ye.disabledHours,Mr=ye.disabledMinutes,Tr=ye.disabledSeconds,Vr=ye.disabledTime,si=ye.hideDisabledOptions,xi=ye.onSelect,hi=ye.cellRender,Xr=ye.locale,da=[],Ji="".concat(De,"-content"),Na="".concat(De,"-time-panel"),Ua,Sa=an?ke.getHour(an):-1,ji=Sa,$a=an?ke.getMinute(an):-1,Ca=an?ke.getSecond(an):-1,fa=ke.getNow(),La=de.useMemo(function(){if(Vr){var Di=Vr(fa);return[Di.disabledHours,Di.disabledMinutes,Di.disabledSeconds]}return[Xn,Mr,Tr]},[Xn,Mr,Tr,Vr,fa]),Oa=(0,_t.Z)(La,3),oo=Oa[0],fo=Oa[1],$o=Oa[2],cs=vi(0,23,gn,oo&&oo()),ss=(0,On.Z)(function(){return cs},cs,Ma);Ut&&(Ua=ji>=12,ji%=12);var jo=de.useMemo(function(){if(!Ut)return[!1,!1];var Di=[!0,!0];return ss.forEach(function(ja){var bo=ja.disabled,Go=ja.value;bo||(Go>=12?Di[1]=!1:Di[0]=!1)}),Di},[Ut,ss]),Lo=(0,_t.Z)(jo,2),ps=Lo[0],Oo=Lo[1],ya=de.useMemo(function(){return Ut?ss.filter(Ua?function(Di){return Di.value>=12}:function(Di){return Di.value<12}).map(function(Di){var ja=Di.value%12,bo=ja===0?"12":Jt(ja,2);return(0,tn.Z)((0,tn.Z)({},Di),{},{label:bo,value:ja})}):ss},[Ut,Ua,ss]),ma=vi(0,59,ir,fo&&fo(Sa)),Do=vi(0,59,Mn,$o&&$o(Sa,$a)),Mo=Gi({value:an,generateConfig:ke,disabledMinutes:fo,disabledSeconds:$o,minutes:ma,seconds:Do,use12Hours:Ut});nt.current={onUpDown:function(ja){var bo=da[at];if(bo)for(var Go=bo.units.findIndex(function(Sl){return Sl.value===bo.value}),Fo=bo.units.length,Ko=1;Ko<Fo;Ko+=1){var Es=bo.units[(Go+ja*Ko+Fo)%Fo];if(Es.disabled!==!0){bo.onSelect(Es.value);break}}}};function Da(Di,ja,bo,Go,Fo){Di!==!1&&da.push({node:de.cloneElement(ja,{prefixCls:Na,value:bo,active:at===da.length,onSelect:Fo,units:Go,hideDisabledOptions:si}),onSelect:Fo,value:bo,units:Go})}Da(Zt,de.createElement(ra,{key:"hour",type:"hour",info:{today:fa,locale:Xr,cellRender:hi}}),ji,ya,function(Di){xi(Mo(Ua,Di,$a,Ca),"mouse")}),Da(Pn,de.createElement(ra,{key:"minute",type:"minute",info:{today:fa,locale:Xr,cellRender:hi}}),$a,ma,function(Di){xi(Mo(Ua,ji,Di,Ca),"mouse")}),Da(fn,de.createElement(ra,{key:"second",type:"second",info:{today:fa,locale:Xr,cellRender:hi}}),Ca,Do,function(Di){xi(Mo(Ua,ji,$a,Di),"mouse")});var Qa=-1;return typeof Ua=="boolean"&&(Qa=Ua?1:0),Da(Ut===!0,de.createElement(ra,{key:"meridiem",type:"meridiem",info:{today:fa,locale:Xr,cellRender:hi}}),Qa,[{label:"AM",value:0,disabled:ps},{label:"PM",value:1,disabled:Oo}],function(Di){xi(Mo(!!Di,ji,$a,Ca),"mouse")}),de.createElement("div",{className:Ji},da.map(function(Di){var ja=Di.node;return ja}))}var xa=Zi,Ya=function(ke){return ke.filter(function(De){return De!==!1}).length};function Ba(ye){var ke=ye.generateConfig,De=ye.format,nt=De===void 0?"HH:mm:ss":De,at=ye.prefixCls,an=ye.active,Zt=ye.operationRef,Pn=ye.showHour,fn=ye.showMinute,Ut=ye.showSecond,Kn=ye.use12Hours,gn=Kn===void 0?!1:Kn,xn=ye.onSelect,ir=ye.value,sr="".concat(at,"-time-panel"),Mn=de.useRef(),Xn=de.useState(-1),Mr=(0,_t.Z)(Xn,2),Tr=Mr[0],Vr=Mr[1],si=Ya([Pn,fn,Ut,gn]);return Zt.current={onKeyDown:function(hi){return kr(hi,{onLeftRight:function(da){Vr((Tr+da+si)%si)},onUpDown:function(da){Tr===-1?Vr(0):Mn.current&&Mn.current.onUpDown(da)},onEnter:function(){xn(ir||ke.getNow(),"key"),Vr(-1)}})},onBlur:function(){Vr(-1)}},de.createElement("div",{className:mt()(sr,(0,Qt.Z)({},"".concat(sr,"-active"),an))},de.createElement(Ta,(0,Ee.Z)({},ye,{format:nt,prefixCls:at})),de.createElement(xa,(0,Ee.Z)({},ye,{prefixCls:at,activeColumnIndex:Tr,operationRef:Mn})))}var ki=Ba,Rt=vn("date","time");function Tt(ye){var ke=ye.prefixCls,De=ye.operationRef,nt=ye.generateConfig,at=ye.value,an=ye.defaultValue,Zt=ye.disabledTime,Pn=ye.showTime,fn=ye.onSelect,Ut=ye.cellRender,Kn="".concat(ke,"-datetime-panel"),gn=de.useState(null),xn=(0,_t.Z)(gn,2),ir=xn[0],sr=xn[1],Mn=de.useRef({}),Xn=de.useRef({}),Mr=(0,Mt.Z)(Pn)==="object"?(0,tn.Z)({},Pn):{};function Tr(hi){var Xr=Rt.indexOf(ir)+hi,da=Rt[Xr]||null;return da}var Vr=function(Xr){Xn.current.onBlur&&Xn.current.onBlur(Xr),sr(null)};De.current={onKeyDown:function(Xr){if(Xr.which===Zn.Z.TAB){var da=Tr(Xr.shiftKey?-1:1);return sr(da),da&&Xr.preventDefault(),!0}if(ir){var Ji=ir==="date"?Mn:Xn;return Ji.current&&Ji.current.onKeyDown&&Ji.current.onKeyDown(Xr),!0}return[Zn.Z.LEFT,Zn.Z.RIGHT,Zn.Z.UP,Zn.Z.DOWN].includes(Xr.which)?(sr("date"),!0):!1},onBlur:Vr,onClose:Vr};var si=function(Xr,da){var Ji=Xr;da==="date"&&!at&&Mr.defaultValue?(Ji=nt.setHour(Ji,nt.getHour(Mr.defaultValue)),Ji=nt.setMinute(Ji,nt.getMinute(Mr.defaultValue)),Ji=nt.setSecond(Ji,nt.getSecond(Mr.defaultValue))):da==="time"&&!at&&an&&(Ji=nt.setYear(Ji,nt.getYear(an)),Ji=nt.setMonth(Ji,nt.getMonth(an)),Ji=nt.setDate(Ji,nt.getDate(an))),fn&&fn(Ji,"mouse")},xi=Zt?Zt(at||null):{};return de.createElement("div",{className:mt()(Kn,(0,Qt.Z)({},"".concat(Kn,"-active"),ir))},de.createElement(ta,(0,Ee.Z)({},ye,{cellRender:Ut,operationRef:Mn,active:ir==="date",onSelect:function(Xr){si(wt(nt,Xr,!at&&(0,Mt.Z)(Pn)==="object"?Pn.defaultValue:null),"date")}})),de.createElement(ki,(0,Ee.Z)({},ye,{cellRender:Ut?function(hi,Xr){return Ut(hi,(0,tn.Z)((0,tn.Z)({},Xr),{},{type:"time"}))}:void 0,format:void 0},Mr,xi,{disabledTime:null,defaultValue:void 0,operationRef:Xn,active:ir==="time",onSelect:function(Xr){si(Xr,"time")}})))}var mn=Tt;function $n(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.viewDate,at=ye.onPrevDecades,an=ye.onNextDecades,Zt=de.useContext(Je),Pn=Zt.hideHeader;if(Pn)return null;var fn="".concat(ke,"-header"),Ut=De.getYear(nt),Kn=Math.floor(Ut/le)*le,gn=Kn+le-1;return de.createElement(Dr,(0,Ee.Z)({},ye,{prefixCls:fn,onSuperPrev:at,onSuperNext:an}),Kn,"-",gn)}var Qn=$n,Or=3,Gr=4;function ci(ye){var ke=ce-1,De=ye.prefixCls,nt=ye.viewDate,at=ye.generateConfig,an=ye.cellRender,Zt=ye.locale,Pn="".concat(De,"-cell"),fn=at.getYear(nt),Ut=Math.floor(fn/ce)*ce,Kn=Math.floor(fn/le)*le,gn=Kn+le-1,xn=at.setYear(nt,Kn-Math.ceil((Or*Gr*ce-le)/2)),ir=function(Xn){var Mr,Tr=at.getYear(Xn),Vr=Tr+ke;return Mr={},(0,Qt.Z)(Mr,"".concat(Pn,"-in-view"),Kn<=Tr&&Vr<=gn),(0,Qt.Z)(Mr,"".concat(Pn,"-selected"),Tr===Ut),Mr},sr=an?function(Mn,Xn){return an(Mn,{originNode:Xn,today:at.getNow(),type:"decade",locale:Zt})}:void 0;return de.createElement(er,(0,Ee.Z)({},ye,{rowNum:Gr,colNum:Or,baseDate:xn,getCellNode:sr,getCellText:function(Xn){var Mr=at.getYear(Xn);return"".concat(Mr,"-").concat(Mr+ke)},getCellClassName:ir,getCellDate:function(Xn,Mr){return at.addYear(Xn,Mr*ce)}}))}var gi=ci;function li(ye){var ke=ye.prefixCls,De=ye.onViewDateChange,nt=ye.generateConfig,at=ye.viewDate,an=ye.operationRef,Zt=ye.onSelect,Pn=ye.onPanelChange,fn="".concat(ke,"-decade-panel");an.current={onKeyDown:function(xn){return kr(xn,{onLeftRight:function(sr){Zt(nt.addYear(at,sr*ce),"key")},onCtrlLeftRight:function(sr){Zt(nt.addYear(at,sr*le),"key")},onUpDown:function(sr){Zt(nt.addYear(at,sr*ce*Or),"key")},onEnter:function(){Pn("year",at)}})}};var Ut=function(xn){var ir=nt.addYear(at,xn*le);De(ir),Pn(null,ir)},Kn=function(xn){Zt(xn,"mouse"),Pn("year",xn)};return de.createElement("div",{className:fn},de.createElement(Qn,(0,Ee.Z)({},ye,{prefixCls:ke,onPrevDecades:function(){Ut(-1)},onNextDecades:function(){Ut(1)}})),de.createElement(gi,(0,Ee.Z)({},ye,{prefixCls:ke,onSelect:Kn})))}var Mi=li;function Vi(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.locale,at=ye.viewDate,an=ye.onNextYear,Zt=ye.onPrevYear,Pn=ye.onYearClick,fn=de.useContext(Je),Ut=fn.hideHeader;if(Ut)return null;var Kn="".concat(ke,"-header");return de.createElement(Dr,(0,Ee.Z)({},ye,{prefixCls:Kn,onSuperPrev:Zt,onSuperNext:an}),de.createElement("button",{type:"button",onClick:Pn,className:"".concat(ke,"-year-btn")},dr(at,{locale:nt,format:nt.yearFormat,generateConfig:De})))}var Yr=Vi,Fi=3,sa=4;function Yi(ye){var ke=ye.prefixCls,De=ye.locale,nt=ye.value,at=ye.viewDate,an=ye.generateConfig,Zt=ye.cellRender,Pn=de.useContext(_r),fn=Pn.rangedValue,Ut=Pn.hoverRangedValue,Kn="".concat(ke,"-cell"),gn=vr({cellPrefixCls:Kn,value:nt,generateConfig:an,rangedValue:fn,hoverRangedValue:Ut,isSameCell:function(Xn,Mr){return Ht(an,Xn,Mr)},isInView:function(){return!0},offsetCell:function(Xn,Mr){return an.addMonth(Xn,Mr)}}),xn=De.shortMonths||(an.locale.getShortMonths?an.locale.getShortMonths(De.locale):[]),ir=an.setMonth(at,0),sr=Zt?function(Mn,Xn){return Zt(Mn,{originNode:Xn,locale:De,today:an.getNow(),type:"month"})}:void 0;return de.createElement(er,(0,Ee.Z)({},ye,{rowNum:sa,colNum:Fi,baseDate:ir,getCellNode:sr,getCellText:function(Xn){return De.monthFormat?dr(Xn,{locale:De,format:De.monthFormat,generateConfig:an}):xn[an.getMonth(Xn)]},getCellClassName:gn,getCellDate:an.addMonth,titleCell:function(Xn){return dr(Xn,{locale:De,format:"YYYY-MM",generateConfig:an})}}))}var Oe=Yi;function Ve(ye){var ke=ye.prefixCls,De=ye.operationRef,nt=ye.onViewDateChange,at=ye.generateConfig,an=ye.value,Zt=ye.viewDate,Pn=ye.onPanelChange,fn=ye.onSelect,Ut="".concat(ke,"-month-panel");De.current={onKeyDown:function(xn){return kr(xn,{onLeftRight:function(sr){fn(at.addMonth(an||Zt,sr),"key")},onCtrlLeftRight:function(sr){fn(at.addYear(an||Zt,sr),"key")},onUpDown:function(sr){fn(at.addMonth(an||Zt,sr*Fi),"key")},onEnter:function(){Pn("date",an||Zt)}})}};var Kn=function(xn){var ir=at.addYear(Zt,xn);nt(ir),Pn(null,ir)};return de.createElement("div",{className:Ut},de.createElement(Yr,(0,Ee.Z)({},ye,{prefixCls:ke,onPrevYear:function(){Kn(-1)},onNextYear:function(){Kn(1)},onYearClick:function(){Pn("year",Zt)}})),de.createElement(Oe,(0,Ee.Z)({},ye,{prefixCls:ke,onSelect:function(xn){fn(xn,"mouse"),Pn("date",xn)}})))}var Ue=Ve;function qe(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.locale,at=ye.viewDate,an=ye.onNextYear,Zt=ye.onPrevYear,Pn=ye.onYearClick,fn=de.useContext(Je),Ut=fn.hideHeader;if(Ut)return null;var Kn="".concat(ke,"-header");return de.createElement(Dr,(0,Ee.Z)({},ye,{prefixCls:Kn,onSuperPrev:Zt,onSuperNext:an}),de.createElement("button",{type:"button",onClick:Pn,className:"".concat(ke,"-year-btn")},dr(at,{locale:nt,format:nt.yearFormat,generateConfig:De})))}var vt=qe,St=4,Nt=1;function wn(ye){var ke=ye.prefixCls,De=ye.locale,nt=ye.value,at=ye.viewDate,an=ye.generateConfig,Zt=ye.cellRender,Pn=de.useContext(_r),fn=Pn.rangedValue,Ut=Pn.hoverRangedValue,Kn="".concat(ke,"-cell"),gn=vr({cellPrefixCls:Kn,value:nt,generateConfig:an,rangedValue:fn,hoverRangedValue:Ut,isSameCell:function(Mn,Xn){return $t(an,Mn,Xn)},isInView:function(){return!0},offsetCell:function(Mn,Xn){return an.addMonth(Mn,Xn*3)}}),xn=an.setDate(an.setMonth(at,0),1),ir=Zt?function(sr,Mn){return Zt(sr,{originNode:Mn,locale:De,today:an.getNow(),type:"quarter"})}:void 0;return de.createElement(er,(0,Ee.Z)({},ye,{rowNum:Nt,colNum:St,baseDate:xn,getCellNode:ir,getCellText:function(Mn){return dr(Mn,{locale:De,format:De.quarterFormat||"[Q]Q",generateConfig:an})},getCellClassName:gn,getCellDate:function(Mn,Xn){return an.addMonth(Mn,Xn*3)},titleCell:function(Mn){return dr(Mn,{locale:De,format:"YYYY-[Q]Q",generateConfig:an})}}))}var Ln=wn;function br(ye){var ke=ye.prefixCls,De=ye.operationRef,nt=ye.onViewDateChange,at=ye.generateConfig,an=ye.value,Zt=ye.viewDate,Pn=ye.onPanelChange,fn=ye.onSelect,Ut="".concat(ke,"-quarter-panel");De.current={onKeyDown:function(xn){return kr(xn,{onLeftRight:function(sr){fn(at.addMonth(an||Zt,sr*3),"key")},onCtrlLeftRight:function(sr){fn(at.addYear(an||Zt,sr),"key")},onUpDown:function(sr){fn(at.addYear(an||Zt,sr),"key")}})}};var Kn=function(xn){var ir=at.addYear(Zt,xn);nt(ir),Pn(null,ir)};return de.createElement("div",{className:Ut},de.createElement(vt,(0,Ee.Z)({},ye,{prefixCls:ke,onPrevYear:function(){Kn(-1)},onNextYear:function(){Kn(1)},onYearClick:function(){Pn("year",Zt)}})),de.createElement(Ln,(0,Ee.Z)({},ye,{prefixCls:ke,onSelect:function(xn){fn(xn,"mouse")}})))}var Br=br;function hr(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.locale,at=ye.value,an=ye.disabledDate,Zt=ye.onSelect,Pn=de.useContext(_r),fn=Pn.rangedValue,Ut=Pn.hoverRangedValue,Kn=de.useContext(Je),gn=Kn.onDateMouseEnter,xn=Kn.onDateMouseLeave,ir=(Ut==null?void 0:Ut[0])||(fn==null?void 0:fn[0]),sr=(Ut==null?void 0:Ut[1])||(fn==null?void 0:fn[1]),Mn="".concat(ke,"-cell"),Xn=function(si){var xi=gt({cellDate:si,mode:"week",disabledDate:an,generateConfig:De});return de.createElement("td",{key:"week",className:mt()(Mn,"".concat(Mn,"-week")),onClick:function(){xi||Zt(si,"mouse")},onMouseEnter:function(){!xi&&gn&&gn(si)},onMouseLeave:function(){!xi&&xn&&xn(si)}},de.createElement("div",{className:"".concat(Mn,"-inner")},De.locale.getWeek(nt.locale,si)))},Mr="".concat(ke,"-week-panel-row"),Tr=function(si){var xi,hi=rn(De,nt.locale,ir,si),Xr=rn(De,nt.locale,sr,si);return mt()(Mr,(xi={},(0,Qt.Z)(xi,"".concat(Mr,"-selected"),!fn&&rn(De,nt.locale,at,si)),(0,Qt.Z)(xi,"".concat(Mr,"-range-start"),hi),(0,Qt.Z)(xi,"".concat(Mr,"-range-end"),Xr),(0,Qt.Z)(xi,"".concat(Mr,"-range-hover"),!hi&&!Xr&&lr(De,ir,sr,si)),xi))};return de.createElement(ta,(0,Ee.Z)({},ye,{panelName:"week",prefixColumn:Xn,rowClassName:Tr,keyboardConfig:{onLeftRight:null},isSameCell:function(){return!1}}))}var Wn=hr,Tn=10;function Jn(ye){var ke=ye.prefixCls,De=ye.generateConfig,nt=ye.viewDate,at=ye.onPrevDecade,an=ye.onNextDecade,Zt=ye.onDecadeClick,Pn=de.useContext(Je),fn=Pn.hideHeader;if(fn)return null;var Ut="".concat(ke,"-header"),Kn=De.getYear(nt),gn=Math.floor(Kn/Tn)*Tn,xn=gn+Tn-1;return de.createElement(Dr,(0,Ee.Z)({},ye,{prefixCls:Ut,onSuperPrev:at,onSuperNext:an}),de.createElement("button",{type:"button",onClick:Zt,className:"".concat(ke,"-decade-btn")},gn,"-",xn))}var ar=Jn,$r=3,mr=4;function gr(ye){var ke=ye.prefixCls,De=ye.value,nt=ye.viewDate,at=ye.locale,an=ye.generateConfig,Zt=ye.cellRender,Pn=de.useContext(_r),fn=Pn.rangedValue,Ut=Pn.hoverRangedValue,Kn="".concat(ke,"-cell"),gn=an.getYear(nt),xn=Math.floor(gn/Tn)*Tn,ir=xn+Tn-1,sr=an.setYear(nt,xn-Math.ceil(($r*mr-Tn)/2)),Mn=an.getNow(),Xn=function(si){var xi=an.getYear(si);return xn<=xi&&xi<=ir},Mr=vr({cellPrefixCls:Kn,value:De,generateConfig:an,rangedValue:fn,hoverRangedValue:Ut,isSameCell:function(si,xi){return Ie(an,si,xi)},isInView:Xn,offsetCell:function(si,xi){return an.addYear(si,xi)}}),Tr=Zt?function(Vr,si){return Zt(Vr,{originNode:si,today:Mn,type:"year",locale:at})}:void 0;return de.createElement(er,(0,Ee.Z)({},ye,{rowNum:mr,colNum:$r,baseDate:sr,getCellNode:Tr,getCellText:an.getYear,getCellClassName:Mr,getCellDate:an.addYear,titleCell:function(si){return dr(si,{locale:at,format:"YYYY",generateConfig:an})}}))}var Cr=gr;function Er(ye){var ke=ye.prefixCls,De=ye.operationRef,nt=ye.onViewDateChange,at=ye.generateConfig,an=ye.value,Zt=ye.viewDate,Pn=ye.sourceMode,fn=ye.onSelect,Ut=ye.onPanelChange,Kn="".concat(ke,"-year-panel");De.current={onKeyDown:function(ir){return kr(ir,{onLeftRight:function(Mn){fn(at.addYear(an||Zt,Mn),"key")},onCtrlLeftRight:function(Mn){fn(at.addYear(an||Zt,Mn*Tn),"key")},onUpDown:function(Mn){fn(at.addYear(an||Zt,Mn*$r),"key")},onEnter:function(){Ut(Pn==="date"?"date":"month",an||Zt)}})}};var gn=function(ir){var sr=at.addYear(Zt,ir*10);nt(sr),Ut(null,sr)};return de.createElement("div",{className:Kn},de.createElement(ar,(0,Ee.Z)({},ye,{prefixCls:ke,onPrevDecade:function(){gn(-1)},onNextDecade:function(){gn(1)},onDecadeClick:function(){Ut("decade",Zt)}})),de.createElement(Cr,(0,Ee.Z)({},ye,{prefixCls:ke,onSelect:function(ir){Ut(Pn==="date"?"date":"month",ir),fn(ir,"mouse")}})))}var Fr=Er;function He(ye,ke,De){return De?de.createElement("div",{className:"".concat(ye,"-footer-extra")},De(ke)):null}function Ge(ye){var ke=ye.prefixCls,De=ye.components,nt=De===void 0?{}:De,at=ye.needConfirmButton,an=ye.onNow,Zt=ye.onOk,Pn=ye.okDisabled,fn=ye.showNow,Ut=ye.locale,Kn,gn;if(at){var xn=nt.button||"button";an&&fn!==!1&&(Kn=de.createElement("li",{className:"".concat(ke,"-now")},de.createElement("a",{className:"".concat(ke,"-now-btn"),onClick:an},Ut.now))),gn=at&&de.createElement("li",{className:"".concat(ke,"-ok")},de.createElement(xn,{disabled:Pn,onClick:Zt},Ut.ok))}return!Kn&&!gn?null:de.createElement("ul",{className:"".concat(ke,"-ranges")},Kn,gn)}var Ft=["date","month"];function Et(ye){var ke,De=ye,nt=De.prefixCls,at=nt===void 0?"rc-picker":nt,an=De.className,Zt=De.style,Pn=De.locale,fn=De.generateConfig,Ut=De.value,Kn=De.defaultValue,gn=De.pickerValue,xn=De.defaultPickerValue,ir=De.disabledDate,sr=De.mode,Mn=De.picker,Xn=Mn===void 0?"date":Mn,Mr=De.tabIndex,Tr=Mr===void 0?0:Mr,Vr=De.showNow,si=De.showTime,xi=De.showToday,hi=De.renderExtraFooter,Xr=De.hideHeader,da=De.onSelect,Ji=De.onChange,Na=De.onPanelChange,Ua=De.onMouseDown,Sa=De.onPickerValueChange,ji=De.onOk,$a=De.components,Ca=De.direction,fa=De.hourStep,La=fa===void 0?1:fa,Oa=De.minuteStep,oo=Oa===void 0?1:Oa,fo=De.secondStep,$o=fo===void 0?1:fo,cs=De.dateRender,ss=De.monthCellRender,jo=De.cellRender,Lo=Xn==="date"&&!!si||Xn==="time",ps=24%La===0,Oo=60%oo===0,ya=60%$o===0,ma=de.useContext(Je),Do=ma.operationRef,Mo=ma.onSelect,Da=ma.hideRanges,Qa=ma.defaultOpenValue,Di=de.useContext(_r),ja=Di.inRange,bo=Di.panelPosition,Go=Di.rangedValue,Fo=Di.hoverRangedValue,Ko=de.useRef({}),Es=de.useRef(!0),Sl=(0,en.Z)(null,{value:Ut,defaultValue:Kn,postState:function(Ii){return!Ii&&Qa&&Xn==="time"?Qa:Ii}}),al=(0,_t.Z)(Sl,2),Bs=al[0],Dl=al[1],Mc=(0,en.Z)(null,{value:gn,defaultValue:xn||Bs,postState:function(Ii){var eo=fn.getNow();if(!Ii)return eo;if(!Bs&&si){var ns=(0,Mt.Z)(si)==="object"?si.defaultValue:Kn;return wt(fn,Array.isArray(Ii)?Ii[0]:Ii,ns||eo)}return Array.isArray(Ii)?Ii[0]:Ii}}),Bl=(0,_t.Z)(Mc,2),Ls=Bl[0],dl=Bl[1],Fs=function(Ii){dl(Ii),Sa&&Sa(Ii)},Fl=function(Ii){var eo=yr[Xn];return eo?eo(Ii):Ii},Al=(0,en.Z)(function(){return Xn==="time"?"time":Fl("date")},{value:sr}),zs=(0,_t.Z)(Al,2),us=zs[0],$s=zs[1];de.useEffect(function(){$s(Xn)},[Xn]);var es=de.useState(function(){return us}),Gs=(0,_t.Z)(es,2),Ys=Gs[0],ol=Gs[1],fs=function(Ii,eo){var ns=Fl(Ii||us);ol(us),$s(ns),Na&&(us!==ns||qn(fn,Ls,Ls))&&Na(eo,ns)},Fa=function(Ii,eo){var ns=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(us===Xn||ns)&&(Dl(Ii),da&&da(Ii),Mo&&Mo(Ii,eo),Ji&&!qn(fn,Ii,Bs)&&!(ir!=null&&ir(Ii))&&Ji(Ii))},ts=function(Ii){if(Ft.includes(us)){var eo,ns,hl=us==="date";switch(Ii===Zn.Z.PAGE_UP||Ii===Zn.Z.PAGE_DOWN?ns=hl?fn.addMonth:fn.addYear:ns=hl?fn.addDate:fn.addMonth,Ii){case Zn.Z.LEFT:case Zn.Z.PAGE_UP:eo=ns(Ls,-1);break;case Zn.Z.RIGHT:case Zn.Z.PAGE_DOWN:eo=ns(Ls,1);break;case Zn.Z.UP:case Zn.Z.DOWN:eo=ns(Ls,Number("".concat(Ii===Zn.Z.UP?"-":"").concat(hl?me:Fi)));break}if(eo)return!(ir!=null&&ir(eo))}return!0},Os=function(Ii){if(Ko.current&&Ko.current.onKeyDown){var eo=!0,ns=Ii.which;if([Zn.Z.LEFT,Zn.Z.RIGHT,Zn.Z.UP,Zn.Z.DOWN,Zn.Z.PAGE_UP,Zn.Z.PAGE_DOWN,Zn.Z.ENTER].includes(ns)&&(Ii.preventDefault(),ns!==Zn.Z.ENTER&&Tr===0&&(eo=ts(ns))),eo)return Ko.current.onKeyDown(Ii)}return(0,Be.ZP)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1},Wo=function(Ii){Ko.current&&Ko.current.onBlur&&Ko.current.onBlur(Ii)};Do&&bo!=="right"&&(Do.current={onKeyDown:Os,onClose:function(){Ko.current&&Ko.current.onClose&&Ko.current.onClose()}}),de.useEffect(function(){Ut&&!Es.current&&dl(Ut)},[Ut]),de.useEffect(function(){Es.current=!1},[]);var Us,ml=ln({cellRender:jo,monthCellRender:ss,dateRender:cs}),Co=(0,tn.Z)((0,tn.Z)({},ye),{},{cellRender:ml,operationRef:Ko,prefixCls:at,viewDate:Ls,value:Bs,onViewDateChange:Fs,sourceMode:Ys,onPanelChange:fs,disabledDate:ir});switch(delete Co.onChange,delete Co.onSelect,us){case"decade":Us=de.createElement(Mi,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;case"year":Us=de.createElement(Fr,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;case"month":Us=de.createElement(Ue,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;case"quarter":Us=de.createElement(Br,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;case"week":Us=de.createElement(Wn,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;case"time":delete Co.showTime,Us=de.createElement(ki,(0,Ee.Z)({},Co,(0,Mt.Z)(si)==="object"?si:null,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}));break;default:si?Us=de.createElement(mn,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}})):Us=de.createElement(ta,(0,Ee.Z)({},Co,{onSelect:function(Ii,eo){Fs(Ii),Fa(Ii,eo)}}))}var gl,sl,Hs=function(){var Ii=fn.getNow(),eo=Ot(fn.getHour(Ii),fn.getMinute(Ii),fn.getSecond(Ii),ps?La:1,Oo?oo:1,ya?$o:1),ns=Lt(fn,Ii,eo[0],eo[1],eo[2]);Fa(ns,"submit")};Da||(gl=He(at,us,hi),si&&us!=="date"?sl=null:sl=Ge({prefixCls:at,components:$a,needConfirmButton:Lo,okDisabled:!Bs||ir&&ir(Bs),locale:Pn,showNow:Vr,onNow:Lo&&Hs,onOk:function(){Bs&&(Fa(Bs,"submit",!0),ji&&ji(Bs))}}));var jl;if(xi&&us==="date"&&Xn==="date"&&!si){var Cl=fn.getNow(),fl="".concat(at,"-today-btn"),El=ir&&ir(Cl);jl=de.createElement("a",{className:mt()(fl,El&&"".concat(fl,"-disabled")),"aria-disabled":El,onClick:function(){El||Fa(Cl,"mouse",!0)}},Pn.today)}return de.createElement(Je.Provider,{value:(0,tn.Z)((0,tn.Z)({},ma),{},{mode:us,hideHeader:"hideHeader"in ye?Xr:ma.hideHeader,hidePrevBtn:ja&&bo==="right",hideNextBtn:ja&&bo==="left"})},de.createElement("div",{tabIndex:Tr,className:mt()("".concat(at,"-panel"),an,(ke={},(0,Qt.Z)(ke,"".concat(at,"-panel-has-range"),Go&&Go[0]&&Go[1]),(0,Qt.Z)(ke,"".concat(at,"-panel-has-range-hover"),Fo&&Fo[0]&&Fo[1]),(0,Qt.Z)(ke,"".concat(at,"-panel-rtl"),Ca==="rtl"),ke)),style:Zt,onKeyDown:Os,onBlur:Wo,onMouseDown:Ua},Us,gl||sl||jl?de.createElement("div",{className:"".concat(at,"-footer")},gl,sl,jl):null))}var dn=Et,In=ae(62709),zn={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function or(ye){var ke,De=ye.prefixCls,nt=ye.popupElement,at=ye.popupStyle,an=ye.visible,Zt=ye.dropdownClassName,Pn=ye.dropdownAlign,fn=ye.transitionName,Ut=ye.getPopupContainer,Kn=ye.children,gn=ye.range,xn=ye.popupPlacement,ir=ye.direction,sr="".concat(De,"-dropdown"),Mn=function(){return xn!==void 0?xn:ir==="rtl"?"bottomRight":"bottomLeft"};return de.createElement(In.Z,{showAction:[],hideAction:[],popupPlacement:Mn(),builtinPlacements:zn,prefixCls:sr,popupTransitionName:fn,popup:nt,popupAlign:Pn,popupVisible:an,popupClassName:mt()(Zt,(ke={},(0,Qt.Z)(ke,"".concat(sr,"-range"),gn),(0,Qt.Z)(ke,"".concat(sr,"-rtl"),ir==="rtl"),ke)),popupStyle:at,getPopupContainer:Ut},Kn)}var jn=or;function _n(ye){var ke=ye.prefixCls,De=ye.presets,nt=ye.onClick,at=ye.onHover;return De.length?de.createElement("div",{className:"".concat(ke,"-presets")},de.createElement("ul",null,De.map(function(an,Zt){var Pn=an.label,fn=an.value;return de.createElement("li",{key:Zt,onClick:function(){return nt==null?void 0:nt(Sr(fn))},onMouseEnter:function(){return at==null?void 0:at(Sr(fn))},onMouseLeave:function(){return at==null?void 0:at(null)}},Pn)}))):null}function cr(ye){var ke=ye.picker,De=ye.disabledHours,nt=ye.disabledMinutes,at=ye.disabledSeconds;ke==="time"&&(De||nt||at)&&warning(!1,"'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.")}function fr(ye,ke,De){var nt=(0,Mt.Z)(ke)==="object"?ke.clearIcon:De;return nt||de.createElement("span",{className:"".concat(ye,"-clear-btn")})}function Hr(ye){var ke,De=ye,nt=De.prefixCls,at=nt===void 0?"rc-picker":nt,an=De.id,Zt=De.name,Pn=De.tabIndex,fn=De.style,Ut=De.className,Kn=De.dropdownClassName,gn=De.dropdownAlign,xn=De.popupStyle,ir=De.transitionName,sr=De.generateConfig,Mn=De.locale,Xn=De.inputReadOnly,Mr=De.allowClear,Tr=De.autoFocus,Vr=De.showTime,si=De.picker,xi=si===void 0?"date":si,hi=De.format,Xr=De.use12Hours,da=De.value,Ji=De.defaultValue,Na=De.presets,Ua=De.open,Sa=De.defaultOpen,ji=De.defaultOpenValue,$a=De.suffixIcon,Ca=De.clearIcon,fa=De.disabled,La=De.disabledDate,Oa=De.placeholder,oo=De.getPopupContainer,fo=De.pickerRef,$o=De.panelRender,cs=De.onChange,ss=De.onOpenChange,jo=De.onFocus,Lo=De.onBlur,ps=De.onMouseDown,Oo=De.onMouseUp,ya=De.onMouseEnter,ma=De.onMouseLeave,Do=De.onContextMenu,Mo=De.onClick,Da=De.onKeyDown,Qa=De.onSelect,Di=De.direction,ja=De.autoComplete,bo=ja===void 0?"off":ja,Go=De.inputRender,Fo=De.changeOnBlur,Ko=de.useRef(null),Es=xi==="date"&&!!Vr||xi==="time",Sl=ot(Na),al=bn(Ti(hi,xi,Vr,Xr)),Bs=de.useRef(null),Dl=de.useRef(null),Mc=de.useRef(null),Bl=(0,en.Z)(null,{value:da,defaultValue:Ji}),Ls=(0,_t.Z)(Bl,2),dl=Ls[0],Fs=Ls[1],Fl=de.useState(dl),Al=(0,_t.Z)(Fl,2),zs=Al[0],us=Al[1],$s=de.useRef(null),es=(0,en.Z)(!1,{value:Ua,defaultValue:Sa,postState:function(Ai){return fa?!1:Ai},onChange:function(Ai){ss&&ss(Ai),!Ai&&$s.current&&$s.current.onClose&&$s.current.onClose()}}),Gs=(0,_t.Z)(es,2),Ys=Gs[0],ol=Gs[1],fs=sn(zs,{formatList:al,generateConfig:sr,locale:Mn}),Fa=(0,_t.Z)(fs,2),ts=Fa[0],Os=Fa[1],Wo=zt({valueTexts:ts,onTextChange:function(Ai){var Ds=Wr(Ai,{locale:Mn,formatList:al,generateConfig:sr});Ds&&(!La||!La(Ds))&&us(Ds)}}),Us=(0,_t.Z)(Wo,3),ml=Us[0],Co=Us[1],gl=Us[2],sl=function(Ai){us(Ai),Fs(Ai),cs&&!qn(sr,dl,Ai)&&cs(Ai,Ai?dr(Ai,{generateConfig:sr,locale:Mn,format:al[0]}):"")},Hs=function(Ai){fa&&Ai||ol(Ai)},jl=function(Ai){return Ys&&$s.current&&$s.current.onKeyDown?$s.current.onKeyDown(Ai):((0,Be.ZP)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},Cl=function(){for(var Ai=arguments.length,Ds=new Array(Ai),Js=0;Js<Ai;Js++)Ds[Js]=arguments[Js];Mo==null||Mo.apply(void 0,Ds),Ko.current&&(Ko.current.focus(),Hs(!0))},fl=function(Ai){Fo&&sl(zs),Lo==null||Lo(Ai)},El=nr({blurToCancel:Es,open:Ys,value:ml,triggerOpen:Hs,forwardKeyDown:jl,isClickOutside:function(Ai){return!Pr([Bs.current,Dl.current,Mc.current],Ai)},onSubmit:function(){return!zs||La&&La(zs)?!1:(sl(zs),Hs(!1),gl(),!0)},onCancel:function(){Hs(!1),us(dl),gl()},onKeyDown:function(Ai,Ds){Da==null||Da(Ai,Ds)},onFocus:jo,onBlur:fl,changeOnBlur:Fo}),za=(0,_t.Z)(El,2),Ii=za[0],eo=za[1],ns=eo.focused,hl=eo.typing;de.useEffect(function(){Ys||(us(dl),!ts.length||ts[0]===""?Co(""):Os!==ml&&gl())},[Ys,ts]),de.useEffect(function(){Ys||gl()},[xi]),de.useEffect(function(){us(dl)},[dl]),fo&&(fo.current={focus:function(){var Ai;(Ai=Ko.current)===null||Ai===void 0||Ai.focus()},blur:function(){var Ai;(Ai=Ko.current)===null||Ai===void 0||Ai.blur()}});var kc=tr(ml,{formatList:al,generateConfig:sr,locale:Mn}),Gl=(0,_t.Z)(kc,3),_c=Gl[0],Yl=Gl[1],ms=Gl[2],Za=(0,tn.Z)((0,tn.Z)({},ye),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null}),fc=de.createElement("div",{className:"".concat(at,"-panel-layout")},de.createElement(_n,{prefixCls:at,presets:Sl,onClick:function(Ai){sl(Ai),Hs(!1)}}),de.createElement(dn,(0,Ee.Z)({},Za,{generateConfig:sr,className:mt()((0,Qt.Z)({},"".concat(at,"-panel-focused"),!hl)),value:zs,locale:Mn,tabIndex:-1,onSelect:function(Ai){Qa==null||Qa(Ai),us(Ai)},direction:Di,onPanelChange:function(Ai,Ds){var Js=ye.onPanelChange;ms(!0),Js==null||Js(Ai,Ds)}})));$o&&(fc=$o(fc));var vl=de.createElement("div",{className:"".concat(at,"-panel-container"),ref:Bs,onMouseDown:function(Ai){Ai.preventDefault()}},fc),Rc;$a&&(Rc=de.createElement("span",{className:"".concat(at,"-suffix"),onMouseDown:function(Ai){Ai.preventDefault()}},$a));var Xl=fr(at,Mr,Ca),Nc=de.createElement("span",{onMouseDown:function(Ai){Ai.preventDefault(),Ai.stopPropagation()},onMouseUp:function(Ai){Ai.preventDefault(),Ai.stopPropagation(),sl(null),Hs(!1)},className:"".concat(at,"-clear"),role:"button"},Xl),zl=!!Mr&&dl&&!fa,_i=(0,tn.Z)((0,tn.Z)((0,tn.Z)({id:an,tabIndex:Pn,disabled:fa,readOnly:Xn||typeof al[0]=="function"||!hl,value:_c||ml,onChange:function(Ai){Co(Ai.target.value)},autoFocus:Tr,placeholder:Oa,ref:Ko,title:ml},Ii),{},{size:na(xi,al[0],sr),name:Zt},(0,Cn.Z)(ye,{aria:!0,data:!0})),{},{autoComplete:bo}),Xs=Go?Go(_i):de.createElement("input",_i),au=function(Ai,Ds){(Ds==="submit"||Ds!=="key"&&!Es)&&(sl(Ai),Hs(!1))},ou=Di==="rtl"?"bottomRight":"bottomLeft";return de.createElement(Je.Provider,{value:{operationRef:$s,hideHeader:xi==="time",onSelect:au,open:Ys,defaultOpenValue:ji,onDateMouseEnter:Yl,onDateMouseLeave:ms}},de.createElement(jn,{visible:Ys,popupElement:vl,popupStyle:xn,prefixCls:at,dropdownClassName:Kn,dropdownAlign:gn,getPopupContainer:oo,transitionName:ir,popupPlacement:ou,direction:Di},de.createElement("div",{ref:Mc,className:mt()(at,Ut,(ke={},(0,Qt.Z)(ke,"".concat(at,"-disabled"),fa),(0,Qt.Z)(ke,"".concat(at,"-focused"),ns),(0,Qt.Z)(ke,"".concat(at,"-rtl"),Di==="rtl"),ke)),style:fn,onMouseDown:ps,onMouseUp:Oo,onMouseEnter:ya,onMouseLeave:ma,onContextMenu:Do,onClick:Cl},de.createElement("div",{className:mt()("".concat(at,"-input"),(0,Qt.Z)({},"".concat(at,"-input-placeholder"),!!_c)),ref:Dl},Xs,Rc,zl&&Nc))))}var ur=function(ye){(0,ut.Z)(De,ye);var ke=(0,Yt.Z)(De);function De(){var nt;(0,Gt.Z)(this,De);for(var at=arguments.length,an=new Array(at),Zt=0;Zt<at;Zt++)an[Zt]=arguments[Zt];return nt=ke.call.apply(ke,[this].concat(an)),(0,Qt.Z)((0,Qe.Z)(nt),"pickerRef",de.createRef()),(0,Qt.Z)((0,Qe.Z)(nt),"focus",function(){nt.pickerRef.current&&nt.pickerRef.current.focus()}),(0,Qt.Z)((0,Qe.Z)(nt),"blur",function(){nt.pickerRef.current&&nt.pickerRef.current.blur()}),nt}return(0,hn.Z)(De,[{key:"render",value:function(){return de.createElement(Hr,(0,Ee.Z)({},this.props,{pickerRef:this.pickerRef}))}}]),De}(de.Component),ti=ur;function yi(ye,ke){var De=ye.picker,nt=ye.locale,at=ye.selectedValue,an=ye.disabledDate,Zt=ye.disabled,Pn=ye.generateConfig,fn=Fn(at,0),Ut=Fn(at,1);function Kn(Mn){return Pn.locale.getWeekFirstDate(nt.locale,Mn)}function gn(Mn){var Xn=Pn.getYear(Mn),Mr=Pn.getMonth(Mn);return Xn*100+Mr}function xn(Mn){var Xn=Pn.getYear(Mn),Mr=et(Pn,Mn);return Xn*10+Mr}var ir=de.useCallback(function(Mn){if(Zt[0]||an&&an(Mn))return!0;if(Zt[1]&&Ut)return!Xt(Pn,Mn,Ut)&&Pn.isAfter(Mn,Ut);if(!ke&&Ut)switch(De){case"quarter":return xn(Mn)>xn(Ut);case"month":return gn(Mn)>gn(Ut);case"week":return Kn(Mn)>Kn(Ut);default:return!Xt(Pn,Mn,Ut)&&Pn.isAfter(Mn,Ut)}return!1},[an,Zt[1],Ut,ke]),sr=de.useCallback(function(Mn){if(Zt[1]||an&&an(Mn))return!0;if(Zt[0]&&fn)return!Xt(Pn,Mn,Ut)&&Pn.isAfter(fn,Mn);if(!ke&&fn)switch(De){case"quarter":return xn(Mn)<xn(fn);case"month":return gn(Mn)<gn(fn);case"week":return Kn(Mn)<Kn(fn);default:return!Xt(Pn,Mn,fn)&&Pn.isAfter(fn,Mn)}return!1},[an,Zt[0],fn,ke]);return[ir,sr]}var ni=ae(60276),fi=ae(77527);function jr(ye,ke,De,nt,at,an,Zt,Pn,fn,Ut){var Kn=de.useState(!1),gn=(0,_t.Z)(Kn,2),xn=gn[0],ir=gn[1],sr=(0,ni.useMergedState)(ye||!1,{value:ke}),Mn=(0,_t.Z)(sr,2),Xn=Mn[0],Mr=Mn[1],Tr=(0,ni.useMergedState)(ye||!1,{value:ke,onChange:function(La){Ut==null||Ut(La)}}),Vr=(0,_t.Z)(Tr,2),si=Vr[0],xi=Vr[1],hi=(0,ni.useMergedState)(0,{value:De}),Xr=(0,_t.Z)(hi,2),da=Xr[0],Ji=Xr[1],Na=de.useState(null),Ua=(0,_t.Z)(Na,2),Sa=Ua[0],ji=Ua[1];de.useEffect(function(){si&&ir(!0)},[si]);var $a=function(La){return La===0?1:0},Ca=(0,fi.Z)(function(fa,La,Oa){if(La===!1)xi(fa);else if(fa){Ji(La),xi(fa);var oo=$a(La);!si||![Zt,Pn][oo]?ji(oo):(ir(!1),Sa!==null&&ji(null))}else if(Oa==="confirm"||Oa==="blur"&&nt){var fo=Xn?$a(La):Sa;fo!==null&&(ir(!1),Ji(fo)),ji(null),fo!==null&&!fn[fo]?(0,xr.Z)(function(){var $o,cs=[at,an][fo];($o=cs.current)===null||$o===void 0||$o.focus()}):xi(!1)}else xi(!1),Mr(!1)});return[si,da,xn,Ca]}function oi(ye,ke,De,nt){var at=Sn(ye,De,nt,1);function an(Zt){return Zt(ye,ke)?"same":Zt(at,ke)?"closing":"far"}switch(De){case"year":return an(function(Zt,Pn){return se(nt,Zt,Pn)});case"quarter":case"month":return an(function(Zt,Pn){return Ie(nt,Zt,Pn)});default:return an(function(Zt,Pn){return Ht(nt,Zt,Pn)})}}function Ci(ye,ke,De,nt){var at=Fn(ye,0),an=Fn(ye,1);if(ke===0)return at;if(at&&an){var Zt=oi(at,an,De,nt);switch(Zt){case"same":return at;case"closing":return at;default:return Sn(an,De,nt,-1)}}return at}function Oi(ye){var ke=ye.values,De=ye.picker,nt=ye.defaultDates,at=ye.generateConfig,an=de.useState(function(){return[Fn(nt,0),Fn(nt,1)]}),Zt=(0,_t.Z)(an,2),Pn=Zt[0],fn=Zt[1],Ut=de.useState(null),Kn=(0,_t.Z)(Ut,2),gn=Kn[0],xn=Kn[1],ir=Fn(ke,0),sr=Fn(ke,1);function Mn(Mr){return Pn[Mr]?Pn[Mr]:Fn(gn,Mr)||Ci(ke,Mr,De,at)||ir||sr||at.getNow()}function Xn(Mr,Tr){if(Mr){var Vr=Nr(gn,Mr,Tr);fn(Nr(Pn,null,Tr)||[null,null]);var si=(Tr+1)%2;Fn(ke,si)||(Vr=Nr(Vr,Mr,si)),xn(Vr)}else(ir||sr)&&xn(null)}return[Mn,Xn]}function ii(ye,ke){return ye&&ye[0]&&ye[1]&&ke.isAfter(ye[0],ye[1])?[ye[1],ye[0]]:ye}function Ni(ye,ke,De,nt){return!!(ye||nt&&nt[ke]||De[(ke+1)%2])}function la(ye){var ke,De,nt,at=ye,an=at.prefixCls,Zt=an===void 0?"rc-picker":an,Pn=at.id,fn=at.style,Ut=at.className,Kn=at.popupStyle,gn=at.dropdownClassName,xn=at.transitionName,ir=at.dropdownAlign,sr=at.getPopupContainer,Mn=at.generateConfig,Xn=at.locale,Mr=at.placeholder,Tr=at.autoFocus,Vr=at.disabled,si=at.format,xi=at.picker,hi=xi===void 0?"date":xi,Xr=at.showTime,da=at.use12Hours,Ji=at.separator,Na=Ji===void 0?"~":Ji,Ua=at.value,Sa=at.defaultValue,ji=at.defaultPickerValue,$a=at.open,Ca=at.defaultOpen,fa=at.disabledDate,La=at.disabledTime,Oa=at.dateRender,oo=at.monthCellRender,fo=at.cellRender,$o=at.panelRender,cs=at.presets,ss=at.ranges,jo=at.allowEmpty,Lo=at.allowClear,ps=at.suffixIcon,Oo=at.clearIcon,ya=at.pickerRef,ma=at.inputReadOnly,Do=at.mode,Mo=at.renderExtraFooter,Da=at.onChange,Qa=at.onOpenChange,Di=at.onPanelChange,ja=at.onCalendarChange,bo=at.onFocus,Go=at.onBlur,Fo=at.onMouseDown,Ko=at.onMouseUp,Es=at.onMouseEnter,Sl=at.onMouseLeave,al=at.onClick,Bs=at.onOk,Dl=at.onKeyDown,Mc=at.components,Bl=at.order,Ls=at.direction,dl=at.activePickerIndex,Fs=at.autoComplete,Fl=Fs===void 0?"off":Fs,Al=at.changeOnBlur,zs=hi==="date"&&!!Xr||hi==="time",us=(0,de.useRef)(null),$s=(0,de.useRef)(null),es=(0,de.useRef)(null),Gs=(0,de.useRef)(null),Ys=(0,de.useRef)(null),ol=(0,de.useRef)(null),fs=(0,de.useRef)(null),Fa=(0,de.useRef)(null),ts=bn(Ti(si,hi,Xr,da)),Os=(0,de.useRef)(null),Wo=de.useMemo(function(){return Array.isArray(Vr)?Vr:[Vr||!1,Vr||!1]},[Vr]),Us=(0,en.Z)(null,{value:Ua,defaultValue:Sa,postState:function(qi){return hi==="time"&&!Bl?qi:ii(qi,Mn)}}),ml=(0,_t.Z)(Us,2),Co=ml[0],gl=ml[1],sl=Oi({values:Co,picker:hi,defaultDates:ji,generateConfig:Mn}),Hs=(0,_t.Z)(sl,2),jl=Hs[0],Cl=Hs[1],fl=(0,en.Z)(Co,{postState:function(qi){var Ia=qi;if(Wo[0]&&Wo[1])return Ia;for(var _o=0;_o<2;_o+=1)Wo[_o]&&!Ia&&!Fn(Ia,_o)&&!Fn(jo,_o)&&(Ia=Nr(Ia,Mn.getNow(),_o));return Ia}}),El=(0,_t.Z)(fl,2),za=El[0],Ii=El[1],eo=(0,en.Z)([hi,hi],{value:Do}),ns=(0,_t.Z)(eo,2),hl=ns[0],kc=ns[1];(0,de.useEffect)(function(){kc([hi,hi])},[hi]);var Gl=function(qi,Ia){kc(qi),Di&&Di(Ia,qi)},_c=jr(Ca,$a,dl,Al,ol,fs,Fn(za,0),Fn(za,1),Wo,Qa),Yl=(0,_t.Z)(_c,4),ms=Yl[0],Za=Yl[1],fc=Yl[2],vl=Yl[3],Rc=ms&&Za===0,Xl=ms&&Za===1,Nc=yi({picker:hi,selectedValue:za,locale:Xn,disabled:Wo,disabledDate:fa,generateConfig:Mn},!ms||fc),zl=(0,_t.Z)(Nc,2),_i=zl[0],Xs=zl[1],au=(0,de.useState)(0),ou=(0,_t.Z)(au,2),xo=ou[0],Ai=ou[1];(0,de.useEffect)(function(){!ms&&us.current&&Ai(us.current.offsetWidth)},[ms]);function Ds(ko){vl(!0,ko,"open"),(0,xr.Z)(function(){var qi,Ia=[ol,fs][ko];(qi=Ia.current)===null||qi===void 0||qi.focus()},0)}function Js(ko,qi){var Ia=ko,_o=Fn(Ia,0),Vo=Fn(Ia,1);_o&&Vo&&Mn.isAfter(_o,Vo)&&(hi==="week"&&!rn(Mn,Xn.locale,_o,Vo)||hi==="quarter"&&!$t(Mn,_o,Vo)||hi!=="week"&&hi!=="quarter"&&hi!=="time"&&!Xt(Mn,_o,Vo)?qi===0?(Ia=[_o,null],Vo=null):(_o=null,Ia=[null,Vo]):(hi!=="time"||Bl!==!1)&&(Ia=ii(Ia,Mn))),Ii(Ia);var bs=Ia&&Ia[0]?dr(Ia[0],{generateConfig:Mn,locale:Xn,format:ts[0]}):"",Ws=Ia&&Ia[1]?dr(Ia[1],{generateConfig:Mn,locale:Xn,format:ts[0]}):"";if(ja){var ac={range:qi===0?"start":"end"};ja(Ia,[bs,Ws],ac)}var Zl=Ni(_o,0,Wo,jo),kl=Ni(Vo,1,Wo,jo),bc=Ia===null||Zl&&kl;bc&&(gl(Ia),Da&&(!qn(Mn,Fn(Co,0),_o)||!qn(Mn,Fn(Co,1),Vo))&&Da(Ia,[bs,Ws]))}var cd=function(qi){return ms&&Os.current&&Os.current.onKeyDown?Os.current.onKeyDown(qi):((0,Be.ZP)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},hc={formatList:ts,generateConfig:Mn,locale:Xn},qs=sn(Fn(za,0),hc),su=(0,_t.Z)(qs,2),Ml=su[0],Fu=su[1],wu=sn(Fn(za,1),hc),Jl=(0,_t.Z)(wu,2),Bc=Jl[0],ql=Jl[1],lu=function(qi,Ia){var _o=Wr(qi,{locale:Xn,formatList:ts,generateConfig:Mn}),Vo=Ia===0?_i:Xs;_o&&!Vo(_o)&&(Ii(Nr(za,_o,Ia)),Cl(_o,Ia))},Lc=zt({valueTexts:Ml,onTextChange:function(qi){return lu(qi,0)}}),Su=(0,_t.Z)(Lc,3),Ql=Su[0],zu=Su[1],Hu=Su[2],cu=zt({valueTexts:Bc,onTextChange:function(qi){return lu(qi,1)}}),Dc=(0,_t.Z)(cu,3),Tl=Dc[0],Ac=Dc[1],Tc=Dc[2],ud=(0,de.useState)(null),Ku=(0,_t.Z)(ud,2),dd=Ku[0],pc=Ku[1],ec=(0,de.useState)(null),io=(0,_t.Z)(ec,2),Ro=io[0],tc=io[1],fd=tr(Ql,{formatList:ts,generateConfig:Mn,locale:Xn}),ll=(0,_t.Z)(fd,3),Wu=ll[0],ys=ll[1],uu=ll[2],Fd=tr(Tl,{formatList:ts,generateConfig:Mn,locale:Xn}),Zu=(0,_t.Z)(Fd,3),Cu=Zu[0],Fc=Zu[1],mc=Zu[2],qr=function(qi){tc(Nr(za,qi,Za)),Za===0?ys(qi):Fc(qi)},Vu=function(){tc(Nr(za,null,Za)),Za===0?uu():mc()},Eu=de.useState(ms),du=(0,_t.Z)(Eu,2),Il=du[0],fu=du[1];de.useEffect(function(){fu(ms)},[ms]);var Mu=function(qi){if(Al&&Il){var Ia=Fn(za,Za);Ia&&Js(za,Za)}return Go==null?void 0:Go(qi)},zc=function(qi,Ia){return{blurToCancel:!Al&&zs,forwardKeyDown:cd,onBlur:Mu,isClickOutside:function(Vo){return!Pr([$s.current,es.current,Gs.current,us.current],Vo)},onFocus:function(Vo){bo&&bo(Vo)},triggerOpen:function(Vo){Vo?vl(Vo,qi,"open"):vl(Vo,Fn(za,qi)?qi:!1,"blur")},onSubmit:function(){if(!za||fa&&fa(za[qi]))return!1;Js(za,qi),Ia(),vl(!1,Za,"confirm")},onCancel:function(){vl(!1,qi,"cancel"),Ii(Co),Ia()}}},Zo={onKeyDown:function(qi,Ia){Dl==null||Dl(qi,Ia)},changeOnBlur:Al},zd=nr((0,tn.Z)((0,tn.Z)({},zc(0,Hu)),{},{open:Rc,value:Ql},Zo)),ku=(0,_t.Z)(zd,2),nc=ku[0],Hc=ku[1],rc=Hc.focused,gc=Hc.typing,Qs=nr((0,tn.Z)((0,tn.Z)({},zc(1,Tc)),{},{open:Xl,value:Tl},Zo)),yl=(0,_t.Z)(Qs,2),Ks=yl[0],Pl=yl[1],vc=Pl.focused,$l=Pl.typing,Kc=function(qi){al&&al(qi),!ms&&!ol.current.contains(qi.target)&&!fs.current.contains(qi.target)&&(Wo[0]?Wo[1]||Ds(1):Ds(0))},Uu=function(qi){Fo&&Fo(qi),ms&&(rc||vc)&&!ol.current.contains(qi.target)&&!fs.current.contains(qi.target)&&qi.preventDefault()},ju=Co&&Co[0]?dr(Co[0],{locale:Xn,format:"YYYYMMDDHHmmss",generateConfig:Mn}):"",hd=Co&&Co[1]?dr(Co[1],{locale:Xn,format:"YYYYMMDDHHmmss",generateConfig:Mn}):"";(0,de.useEffect)(function(){ms||(Ii(Co),!Ml.length||Ml[0]===""?zu(""):Fu!==Ql&&Hu(),!Bc.length||Bc[0]===""?Ac(""):ql!==Tl&&Tc())},[ms,Ml,Bc]),(0,de.useEffect)(function(){Ii(Co)},[ju,hd]);var gs=ln({cellRender:fo,monthCellRender:oo,dateRender:Oa}),Hl=de.useMemo(function(){if(gs)return function(ko,qi){return gs(ko,(0,tn.Z)((0,tn.Z)({},qi),{},{range:Za?"end":"start"}))}},[Za,gs]);ya&&(ya.current={focus:function(){ol.current&&ol.current.focus()},blur:function(){ol.current&&ol.current.blur(),fs.current&&fs.current.blur()}});var Hd=ot(cs,ss);function yc(){var ko=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ia=null;ms&&Ro&&Ro[0]&&Ro[1]&&Mn.isAfter(Ro[1],Ro[0])&&(Ia=Ro);var _o=Xr;if(Xr&&(0,Mt.Z)(Xr)==="object"&&Xr.defaultValue){var Vo=Xr.defaultValue;_o=(0,tn.Z)((0,tn.Z)({},Xr),{},{defaultValue:Fn(Vo,Za)||void 0})}return de.createElement(_r.Provider,{value:{inRange:!0,panelPosition:ko,rangedValue:dd||za,hoverRangedValue:Ia}},de.createElement(dn,(0,Ee.Z)({},ye,qi,{cellRender:Hl,showTime:_o,mode:hl[Za],generateConfig:Mn,style:void 0,direction:Ls,disabledDate:Za===0?_i:Xs,disabledTime:function(Ws){return La?La(Ws,Za===0?"start":"end"):!1},className:mt()((0,Qt.Z)({},"".concat(Zt,"-panel-focused"),Za===0?!gc:!$l)),value:Fn(za,Za),locale:Xn,tabIndex:-1,onPanelChange:function(Ws,ac){Za===0&&uu(!0),Za===1&&mc(!0),Gl(Nr(hl,ac,Za),Nr(za,Ws,Za));var Zl=Ws;ko==="right"&&hl[Za]===ac&&(Zl=Sn(Zl,ac,Mn,-1)),Cl(Zl,Za)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:Za===0?Fn(za,1):Fn(za,0)})))}var Ol=0,mo=0;if(Za&&es.current&&Ys.current&&$s.current&&Fa.current){Ol=es.current.offsetWidth+Ys.current.offsetWidth;var Wc=Fa.current.offsetLeft>Ol?Fa.current.offsetLeft-Ol:Fa.current.offsetLeft,Kl=$s.current.offsetWidth,Zc=Fa.current.offsetWidth;Kl&&Zc&&Ol>Kl-Zc-(Ls==="rtl"?0:Wc)&&(mo=Ol)}var pr=Ls==="rtl"?{right:Ol}:{left:Ol};function pd(){var ko,qi=He(Zt,hl[Za],Mo),Ia=Ge({prefixCls:Zt,components:Mc,needConfirmButton:zs,okDisabled:!Fn(za,Za)||fa&&fa(za[Za]),locale:Xn,onOk:function(){var pl=Fn(za,Za);pl&&(Js(za,Za),Bs==null||Bs(za),vl(!1,Za,"confirm"))}});if(hi!=="time"&&!Xr){var _o=jl(Za),Vo=Sn(_o,hi,Mn),bs=hl[Za],Ws=bs===hi,ac=yc(Ws?"left":!1,{pickerValue:_o,onPickerValueChange:function(pl){Cl(pl,Za)}}),Zl=yc("right",{pickerValue:Vo,onPickerValueChange:function(pl){Cl(Sn(pl,hi,Mn,-1),Za)}});Ls==="rtl"?ko=de.createElement(de.Fragment,null,Zl,Ws&&ac):ko=de.createElement(de.Fragment,null,ac,Ws&&Zl)}else ko=yc();var kl=de.createElement("div",{className:"".concat(Zt,"-panel-layout")},de.createElement(_n,{prefixCls:Zt,presets:Hd,onClick:function(pl){Js(pl,null),vl(!1,Za,"preset")},onHover:function(pl){pc(pl)}}),de.createElement("div",null,de.createElement("div",{className:"".concat(Zt,"-panels")},ko),(qi||Ia)&&de.createElement("div",{className:"".concat(Zt,"-footer")},qi,Ia)));return $o&&(kl=$o(kl)),de.createElement("div",{className:"".concat(Zt,"-panel-container"),style:{marginLeft:mo},ref:$s,onMouseDown:function(pl){pl.preventDefault()}},kl)}var md=de.createElement("div",{className:mt()("".concat(Zt,"-range-wrapper"),"".concat(Zt,"-").concat(hi,"-range-wrapper")),style:{minWidth:xo}},de.createElement("div",{ref:Fa,className:"".concat(Zt,"-range-arrow"),style:pr}),pd()),_u;ps&&(_u=de.createElement("span",{className:"".concat(Zt,"-suffix"),onMouseDown:function(qi){qi.preventDefault()}},ps));var Gu=fr(Zt,Lo,Oo),ic=de.createElement("span",{onMouseDown:function(qi){qi.preventDefault(),qi.stopPropagation()},onMouseUp:function(qi){qi.preventDefault(),qi.stopPropagation();var Ia=Co;Wo[0]||(Ia=Nr(Ia,null,0)),Wo[1]||(Ia=Nr(Ia,null,1)),Js(Ia,null),vl(!1,Za,"clear")},className:"".concat(Zt,"-clear"),role:"button"},Gu),hu=Lo&&(Fn(Co,0)&&!Wo[0]||Fn(Co,1)&&!Wo[1]),gd={size:na(hi,ts[0],Mn)},As=0,Wl=0;es.current&&Gs.current&&Ys.current&&(Za===0?Wl=es.current.offsetWidth:(As=Ol,Wl=Gs.current.offsetWidth));var Lu=Ls==="rtl"?{right:As}:{left:As},Du=function(qi,Ia){var _o=Nr(za,qi,Za);if(Ia==="submit"||Ia!=="key"&&!zs){Js(_o,Za),Za===0?uu():mc();var Vo=Za===0?1:0;Wo[Vo]?vl(!1,!1,"confirm"):vl(!1,Za,"confirm")}else Ii(_o)};return de.createElement(Je.Provider,{value:{operationRef:Os,hideHeader:hi==="time",onDateMouseEnter:qr,onDateMouseLeave:Vu,hideRanges:!0,onSelect:Du,open:ms}},de.createElement(jn,{visible:ms,popupElement:md,popupStyle:Kn,prefixCls:Zt,dropdownClassName:gn,dropdownAlign:ir,getPopupContainer:sr,transitionName:xn,range:!0,direction:Ls},de.createElement("div",(0,Ee.Z)({ref:us,className:mt()(Zt,"".concat(Zt,"-range"),Ut,(ke={},(0,Qt.Z)(ke,"".concat(Zt,"-disabled"),Wo[0]&&Wo[1]),(0,Qt.Z)(ke,"".concat(Zt,"-focused"),Za===0?rc:vc),(0,Qt.Z)(ke,"".concat(Zt,"-rtl"),Ls==="rtl"),ke)),style:fn,onClick:Kc,onMouseEnter:Es,onMouseLeave:Sl,onMouseDown:Uu,onMouseUp:Ko},(0,Cn.Z)(ye,{aria:!0,data:!0})),de.createElement("div",{className:mt()("".concat(Zt,"-input"),(De={},(0,Qt.Z)(De,"".concat(Zt,"-input-active"),Za===0),(0,Qt.Z)(De,"".concat(Zt,"-input-placeholder"),!!Wu),De)),ref:es},de.createElement("input",(0,Ee.Z)({id:Pn,disabled:Wo[0],readOnly:ma||typeof ts[0]=="function"||!gc,value:Wu||Ql,onChange:function(qi){zu(qi.target.value)},autoFocus:Tr,placeholder:Fn(Mr,0)||"",ref:ol},nc,gd,{autoComplete:Fl}))),de.createElement("div",{className:"".concat(Zt,"-range-separator"),ref:Ys},Na),de.createElement("div",{className:mt()("".concat(Zt,"-input"),(nt={},(0,Qt.Z)(nt,"".concat(Zt,"-input-active"),Za===1),(0,Qt.Z)(nt,"".concat(Zt,"-input-placeholder"),!!Cu),nt)),ref:Gs},de.createElement("input",(0,Ee.Z)({disabled:Wo[1],readOnly:ma||typeof ts[0]=="function"||!$l,value:Cu||Tl,onChange:function(qi){Ac(qi.target.value)},placeholder:Fn(Mr,1)||"",ref:fs},Ks,gd,{autoComplete:Fl}))),de.createElement("div",{className:"".concat(Zt,"-active-bar"),style:(0,tn.Z)((0,tn.Z)({},Lu),{},{width:Wl,position:"absolute"})}),_u,hu&&ic)))}var Ha=function(ye){(0,ut.Z)(De,ye);var ke=(0,Yt.Z)(De);function De(){var nt;(0,Gt.Z)(this,De);for(var at=arguments.length,an=new Array(at),Zt=0;Zt<at;Zt++)an[Zt]=arguments[Zt];return nt=ke.call.apply(ke,[this].concat(an)),(0,Qt.Z)((0,Qe.Z)(nt),"pickerRef",de.createRef()),(0,Qt.Z)((0,Qe.Z)(nt),"focus",function(){nt.pickerRef.current&&nt.pickerRef.current.focus()}),(0,Qt.Z)((0,Qe.Z)(nt),"blur",function(){nt.pickerRef.current&&nt.pickerRef.current.blur()}),nt}return(0,hn.Z)(De,[{key:"render",value:function(){return de.createElement(la,(0,Ee.Z)({},this.props,{pickerRef:this.pickerRef}))}}]),De}(de.Component),Aa=Ha,pa=ti,ka=ae(9708),Pa=ae(53124),Ui=ae(98866),ca=ae(98675),bi=ae(65223),zi=ae(10110),ia=ae(4173),_a=ae(16516),So=ae(84780),ho=ae(47673),po=ae(14747),Xa=ae(79511),Ra=ae(80110),Hi=ae(67771),yo=ae(33297),Xi=ae(45503),Ei=ae(67968);const ua=(ye,ke,De,nt)=>{const{lineHeight:at}=ye,an=Math.floor(De*at)+2,Zt=Math.max((ke-an)/2,0),Pn=Math.max(ke-an-Zt,0);return{padding:`${Zt}px ${nt}px ${Pn}px`}},Ja=ye=>{const{componentCls:ke,pickerCellCls:De,pickerCellInnerCls:nt,cellHeight:at,motionDurationSlow:an,borderRadiusSM:Zt,motionDurationMid:Pn,cellHoverBg:fn,lineWidth:Ut,lineType:Kn,colorPrimary:gn,cellActiveWithRangeBg:xn,colorTextLightSolid:ir,controlHeightSM:sr,cellRangeBorderColor:Mn,pickerCellBorderGap:Xn,cellHoverWithRangeBg:Mr,cellWidth:Tr,colorTextDisabled:Vr,cellBgDisabled:si}=ye;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:at,transform:"translateY(-50%)",transition:`all ${an}`,content:'""'},[nt]:{position:"relative",zIndex:2,display:"inline-block",minWidth:at,height:at,lineHeight:`${at}px`,borderRadius:Zt,transition:`background ${Pn}, border ${Pn}`},"&-range-hover-start, &-range-hover-end":{[nt]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:hover:not(${De}-in-view),
&:hover:not(${De}-selected):not(${De}-range-start):not(${De}-range-end):not(${De}-range-hover-start):not(${De}-range-hover-end)`]:{[nt]:{background:fn}},[`&-in-view${De}-today ${nt}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${Ut}px ${Kn} ${gn}`,borderRadius:Zt,content:'""'}},[`&-in-view${De}-in-range`]:{position:"relative","&::before":{background:xn}},[`&-in-view${De}-selected ${nt},
&-in-view${De}-range-start ${nt},
&-in-view${De}-range-end ${nt}`]:{color:ir,background:gn},[`&-in-view${De}-range-start:not(${De}-range-start-single),
&-in-view${De}-range-end:not(${De}-range-end-single)`]:{"&::before":{background:xn}},[`&-in-view${De}-range-start::before`]:{insetInlineStart:"50%"},[`&-in-view${De}-range-end::before`]:{insetInlineEnd:"50%"},[`&-in-view${De}-range-hover-start:not(${De}-in-range):not(${De}-range-start):not(${De}-range-end),
&-in-view${De}-range-hover-end:not(${De}-in-range):not(${De}-range-start):not(${De}-range-end),
&-in-view${De}-range-hover-start${De}-range-start-single,
&-in-view${De}-range-hover-start${De}-range-start${De}-range-end${De}-range-end-near-hover,
&-in-view${De}-range-hover-end${De}-range-start${De}-range-end${De}-range-start-near-hover,
&-in-view${De}-range-hover-end${De}-range-end-single,
&-in-view${De}-range-hover:not(${De}-in-range)`]:{"&::after":{position:"absolute",top:"50%",zIndex:0,height:sr,borderTop:`${Ut}px dashed ${Mn}`,borderBottom:`${Ut}px dashed ${Mn}`,transform:"translateY(-50%)",transition:`all ${an}`,content:'""'}},"&-range-hover-start::after,\n &-range-hover-end::after,\n &-range-hover::after":{insetInlineEnd:0,insetInlineStart:Xn},[`&-in-view${De}-in-range${De}-range-hover::before,
&-in-view${De}-in-range${De}-range-hover-start::before,
&-in-view${De}-in-range${De}-range-hover-end::before,
&-in-view${De}-range-start${De}-range-hover::before,
&-in-view${De}-range-end${De}-range-hover::before,
&-in-view${De}-range-start:not(${De}-range-start-single)${De}-range-hover-start::before,
&-in-view${De}-range-end:not(${De}-range-end-single)${De}-range-hover-end::before,
${ke}-panel
> :not(${ke}-date-panel)
&-in-view${De}-in-range${De}-range-hover-start::before,
${ke}-panel
> :not(${ke}-date-panel)
&-in-view${De}-in-range${De}-range-hover-end::before`]:{background:Mr},[`&-in-view${De}-range-start:not(${De}-range-start-single):not(${De}-range-end) ${nt}`]:{borderStartStartRadius:Zt,borderEndStartRadius:Zt,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${De}-range-end:not(${De}-range-end-single):not(${De}-range-start) ${nt}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:Zt,borderEndEndRadius:Zt},[`&-range-hover${De}-range-end::after`]:{insetInlineStart:"50%"},[`tr > &-in-view${De}-range-hover:first-child::after,
tr > &-in-view${De}-range-hover-end:first-child::after,
&-in-view${De}-start${De}-range-hover-edge-start${De}-range-hover-edge-start-near-range::after,
&-in-view${De}-range-hover-edge-start:not(${De}-range-hover-edge-start-near-range)::after,
&-in-view${De}-range-hover-start::after`]:{insetInlineStart:(Tr-at)/2,borderInlineStart:`${Ut}px dashed ${Mn}`,borderStartStartRadius:Zt,borderEndStartRadius:Zt},[`tr > &-in-view${De}-range-hover:last-child::after,
tr > &-in-view${De}-range-hover-start:last-child::after,
&-in-view${De}-end${De}-range-hover-edge-end${De}-range-hover-edge-end-near-range::after,
&-in-view${De}-range-hover-edge-end:not(${De}-range-hover-edge-end-near-range)::after,
&-in-view${De}-range-hover-end::after`]:{insetInlineEnd:(Tr-at)/2,borderInlineEnd:`${Ut}px dashed ${Mn}`,borderStartEndRadius:Zt,borderEndEndRadius:Zt},"&-disabled":{color:Vr,pointerEvents:"none",[nt]:{background:"transparent"},"&::before":{background:si}},[`&-disabled${De}-today ${nt}::before`]:{borderColor:Vr}}},wa=ye=>{const{componentCls:ke,pickerCellCls:De,pickerCellInnerCls:nt,pickerYearMonthCellWidth:at,pickerControlIconSize:an,cellWidth:Zt,paddingSM:Pn,paddingXS:fn,paddingXXS:Ut,colorBgContainer:Kn,lineWidth:gn,lineType:xn,borderRadiusLG:ir,colorPrimary:sr,colorTextHeading:Mn,colorSplit:Xn,pickerControlIconBorderWidth:Mr,colorIcon:Tr,textHeight:Vr,motionDurationMid:si,colorIconHover:xi,fontWeightStrong:hi,cellHeight:Xr,pickerCellPaddingVertical:da,colorTextDisabled:Ji,colorText:Na,fontSize:Ua,cellHoverWithRangeBg:Sa,motionDurationSlow:ji,withoutTimeCellHeight:$a,pickerQuarterPanelContentHeight:Ca,colorLink:fa,colorLinkActive:La,colorLinkHover:Oa,cellRangeBorderColor:oo,borderRadiusSM:fo,colorTextLightSolid:$o,cellHoverBg:cs,timeColumnHeight:ss,timeColumnWidth:jo,timeCellHeight:Lo,controlItemBgActive:ps,marginXXS:Oo,pickerDatePanelPaddingHorizontal:ya}=ye,ma=Zt*7+ya*2,Do=(ma-fn*2)/3-at-Pn,Mo=(ma-fn*2)/4-at;return{[ke]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:Kn,border:`${gn}px ${xn} ${Xn}`,borderRadius:ir,outline:"none","&-focused":{borderColor:sr},"&-rtl":{direction:"rtl",[`${ke}-prev-icon,
${ke}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${ke}-next-icon,
${ke}-super-next-icon`]:{transform:"rotate(-135deg)"}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:ma},"&-header":{display:"flex",padding:`0 ${fn}px`,color:Mn,borderBottom:`${gn}px ${xn} ${Xn}`,"> *":{flex:"none"},button:{padding:0,color:Tr,lineHeight:`${Vr}px`,background:"transparent",border:0,cursor:"pointer",transition:`color ${si}`,fontSize:"inherit"},"> button":{minWidth:"1.6em",fontSize:Ua,"&:hover":{color:xi}},"&-view":{flex:"auto",fontWeight:hi,lineHeight:`${Vr}px`,button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:fn},"&:hover":{color:sr}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",display:"inline-block",width:an,height:an,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:an,height:an,border:"0 solid currentcolor",borderBlockStartWidth:Mr,borderBlockEndWidth:0,borderInlineStartWidth:Mr,borderInlineEndWidth:0,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:Math.ceil(an/2),insetInlineStart:Math.ceil(an/2),display:"inline-block",width:an,height:an,border:"0 solid currentcolor",borderBlockStartWidth:Mr,borderBlockEndWidth:0,borderInlineStartWidth:Mr,borderInlineEndWidth:0,content:'""'}},"&-prev-icon,\n &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon,\n &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:Xr,fontWeight:"normal"},th:{height:Xr+da*2,color:Na,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${da}px 0`,color:Ji,cursor:"pointer","&-in-view":{color:Na}},Ja(ye)),[`&-date-panel ${ke}-cell-in-view${ke}-cell-in-range${ke}-cell-range-hover-start ${nt},
&-date-panel ${ke}-cell-in-view${ke}-cell-in-range${ke}-cell-range-hover-end ${nt}`]:{"&::after":{position:"absolute",top:0,bottom:0,zIndex:-1,background:Sa,transition:`all ${ji}`,content:'""'}},[`&-date-panel
${ke}-cell-in-view${ke}-cell-in-range${ke}-cell-range-hover-start
${nt}::after`]:{insetInlineEnd:-(Zt-Xr)/2,insetInlineStart:0},[`&-date-panel ${ke}-cell-in-view${ke}-cell-in-range${ke}-cell-range-hover-end ${nt}::after`]:{insetInlineEnd:0,insetInlineStart:-(Zt-Xr)/2},[`&-range-hover${ke}-range-start::after`]:{insetInlineEnd:"50%"},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${ke}-content`]:{height:$a*4},[nt]:{padding:`0 ${fn}px`}},"&-quarter-panel":{[`${ke}-content`]:{height:Ca},[`${ke}-cell-range-hover-start::after`]:{insetInlineStart:Mo,borderInlineStart:`${gn}px dashed ${oo}`,[`${ke}-panel-rtl &`]:{insetInlineEnd:Mo,borderInlineEnd:`${gn}px dashed ${oo}`}},[`${ke}-cell-range-hover-end::after`]:{insetInlineEnd:Mo,borderInlineEnd:`${gn}px dashed ${oo}`,[`${ke}-panel-rtl &`]:{insetInlineStart:Mo,borderInlineStart:`${gn}px dashed ${oo}`}}},[`&-panel ${ke}-footer`]:{borderTop:`${gn}px ${xn} ${Xn}`},"&-footer":{width:"min-content",minWidth:"100%",lineHeight:`${Vr-2*gn}px`,textAlign:"center","&-extra":{padding:`0 ${Pn}px`,lineHeight:`${Vr-2*gn}px`,textAlign:"start","&:not(:last-child)":{borderBottom:`${gn}px ${xn} ${Xn}`}}},"&-now":{textAlign:"start"},"&-today-btn":{color:fa,"&:hover":{color:Oa},"&:active":{color:La},[`&${ke}-today-btn-disabled`]:{color:Ji,cursor:"not-allowed"}},"&-decade-panel":{[nt]:{padding:`0 ${fn/2}px`},[`${ke}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${ke}-body`]:{padding:`0 ${fn}px`},[nt]:{width:at},[`${ke}-cell-range-hover-start::after`]:{borderStartStartRadius:fo,borderEndStartRadius:fo,borderStartEndRadius:0,borderEndEndRadius:0,[`${ke}-panel-rtl &`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:fo,borderEndEndRadius:fo}},[`${ke}-cell-range-hover-end::after`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:fo,borderEndEndRadius:fo,[`${ke}-panel-rtl &`]:{borderStartStartRadius:fo,borderEndStartRadius:fo,borderStartEndRadius:0,borderEndEndRadius:0}}},"&-year-panel,\n &-month-panel":{[`${ke}-cell-range-hover-start::after`]:{insetInlineStart:Do,borderInlineStart:`${gn}px dashed ${oo}`,[`${ke}-panel-rtl &`]:{insetInlineEnd:Do,borderInlineEnd:`${gn}px dashed ${oo}`}},[`${ke}-cell-range-hover-end::after`]:{insetInlineEnd:Do,borderInlineEnd:`${gn}px dashed ${oo}`,[`${ke}-panel-rtl &`]:{insetInlineStart:Do,borderInlineStart:`${gn}px dashed ${oo}`}}},"&-week-panel":{[`${ke}-body`]:{padding:`${fn}px ${Pn}px`},[`${ke}-cell`]:{[`&:hover ${nt},
&-selected ${nt},
${nt}`]:{background:"transparent !important"}},"&-row":{td:{"&:before":{transition:`background ${si}`},"&:first-child:before":{borderStartStartRadius:fo,borderEndStartRadius:fo},"&:last-child:before":{borderStartEndRadius:fo,borderEndEndRadius:fo}},"&:hover td":{"&:before":{background:cs}},"&-range-start td,\n &-range-end td,\n &-selected td":{[`&${De}`]:{"&:before":{background:sr},[`&${ke}-cell-week`]:{color:new So.C($o).setAlpha(.5).toHexString()},[nt]:{color:$o}}},"&-range-hover td:before":{background:ps}}},"&-date-panel":{[`${ke}-body`]:{padding:`${fn}px ${ya}px`},[`${ke}-content`]:{width:Zt*7,th:{width:Zt,boxSizing:"border-box",padding:0}}},"&-datetime-panel":{display:"flex",[`${ke}-time-panel`]:{borderInlineStart:`${gn}px ${xn} ${Xn}`},[`${ke}-date-panel,
${ke}-time-panel`]:{transition:`opacity ${ji}`},"&-active":{[`${ke}-date-panel,
${ke}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${ke}-content`]:{display:"flex",flex:"auto",height:ss},"&-column":{flex:"1 0 auto",width:jo,margin:`${Ut}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${si}`,overflowX:"hidden","&::after":{display:"block",height:ss-Lo,content:'""'},"&:not(:first-child)":{borderInlineStart:`${gn}px ${xn} ${Xn}`},"&-active":{background:new So.C(ps).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${ke}-time-panel-cell`]:{marginInline:Oo,[`${ke}-time-panel-cell-inner`]:{display:"block",width:jo-2*Oo,height:Lo,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(jo-Lo)/2,color:Na,lineHeight:`${Lo}px`,borderRadius:fo,cursor:"pointer",transition:`background ${si}`,"&:hover":{background:cs}},"&-selected":{[`${ke}-time-panel-cell-inner`]:{background:ps}},"&-disabled":{[`${ke}-time-panel-cell-inner`]:{color:Ji,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${ke}-time-panel-column:after`]:{height:ss-Lo+Ut*2}}}},Wa=ye=>{const{componentCls:ke,colorBgContainer:De,colorError:nt,errorActiveShadow:at,colorWarning:an,warningActiveShadow:Zt}=ye;return{[`${ke}:not(${ke}-disabled)`]:{[`&${ke}-status-error`]:{"&, &:not([disabled]):hover":{backgroundColor:De,borderColor:nt},[`&${ke}-focused, &:focus`]:Object.assign({},(0,ho.M1)((0,Xi.TS)(ye,{activeBorderColor:nt,activeShadow:at}))),[`${ke}-active-bar`]:{background:nt}},[`&${ke}-status-warning`]:{"&, &:not([disabled]):hover":{backgroundColor:De,borderColor:an},[`&${ke}-focused, &:focus`]:Object.assign({},(0,ho.M1)((0,Xi.TS)(ye,{activeBorderColor:an,activeShadow:Zt}))),[`${ke}-active-bar`]:{background:an}}}}},Ki=ye=>{const{componentCls:ke,antCls:De,controlHeight:nt,fontSize:at,paddingInline:an,colorBgContainer:Zt,lineWidth:Pn,lineType:fn,colorBorder:Ut,borderRadius:Kn,motionDurationMid:gn,colorBgContainerDisabled:xn,colorTextDisabled:ir,colorTextPlaceholder:sr,controlHeightLG:Mn,fontSizeLG:Xn,controlHeightSM:Mr,paddingInlineSM:Tr,paddingXS:Vr,marginXS:si,colorTextDescription:xi,lineWidthBold:hi,lineHeight:Xr,colorPrimary:da,motionDurationSlow:Ji,zIndexPopup:Na,paddingXXS:Ua,paddingSM:Sa,textHeight:ji,cellActiveWithRangeBg:$a,colorPrimaryBorder:Ca,sizePopupArrow:fa,borderRadiusXS:La,borderRadiusOuter:Oa,colorBgElevated:oo,borderRadiusLG:fo,boxShadowSecondary:$o,borderRadiusSM:cs,colorSplit:ss,cellHoverBg:jo,presetsWidth:Lo,presetsMaxWidth:ps,boxShadowPopoverArrow:Oo,colorTextQuaternary:ya}=ye;return[{[ke]:Object.assign(Object.assign(Object.assign({},(0,po.Wf)(ye)),ua(ye,nt,at,an)),{position:"relative",display:"inline-flex",alignItems:"center",background:Zt,lineHeight:1,border:`${Pn}px ${fn} ${Ut}`,borderRadius:Kn,transition:`border ${gn}, box-shadow ${gn}`,"&:hover, &-focused":Object.assign({},(0,ho.pU)(ye)),"&-focused":Object.assign({},(0,ho.M1)(ye)),[`&${ke}-disabled`]:{background:xn,borderColor:Ut,cursor:"not-allowed",[`${ke}-suffix`]:{color:ya}},[`&${ke}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${ke}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({},(0,ho.ik)(ye)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,borderRadius:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${ke}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:sr}}},"&-large":Object.assign(Object.assign({},ua(ye,Mn,Xn,an)),{[`${ke}-input > input`]:{fontSize:Xn}}),"&-small":Object.assign({},ua(ye,Mr,at,Tr)),[`${ke}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:Vr/2,color:ir,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:si}}},[`${ke}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:ir,lineHeight:1,background:Zt,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${gn}, color ${gn}`,"> *":{verticalAlign:"top"},"&:hover":{color:xi}},[`${ke}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:Xn,color:ir,fontSize:Xn,verticalAlign:"top",cursor:"default",[`${ke}-focused &`]:{color:xi},[`${ke}-range-separator &`]:{[`${ke}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${ke}-clear`]:{insetInlineEnd:an},"&:hover":{[`${ke}-clear`]:{opacity:1}},[`${ke}-active-bar`]:{bottom:-Pn,height:hi,marginInlineStart:an,background:da,opacity:0,transition:`all ${Ji} ease-out`,pointerEvents:"none"},[`&${ke}-focused`]:{[`${ke}-active-bar`]:{opacity:1}},[`${ke}-range-separator`]:{alignItems:"center",padding:`0 ${Vr}px`,lineHeight:1},[`&${ke}-small`]:{[`${ke}-clear`]:{insetInlineEnd:Tr},[`${ke}-active-bar`]:{marginInlineStart:Tr}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},(0,po.Wf)(ye)),wa(ye)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Na,[`&${ke}-dropdown-hidden`]:{display:"none"},[`&${ke}-dropdown-placement-bottomLeft`]:{[`${ke}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${ke}-dropdown-placement-topLeft`]:{[`${ke}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${De}-slide-up-enter${De}-slide-up-enter-active${ke}-dropdown-placement-topLeft,
&${De}-slide-up-enter${De}-slide-up-enter-active${ke}-dropdown-placement-topRight,
&${De}-slide-up-appear${De}-slide-up-appear-active${ke}-dropdown-placement-topLeft,
&${De}-slide-up-appear${De}-slide-up-appear-active${ke}-dropdown-placement-topRight`]:{animationName:Hi.Qt},[`&${De}-slide-up-enter${De}-slide-up-enter-active${ke}-dropdown-placement-bottomLeft,
&${De}-slide-up-enter${De}-slide-up-enter-active${ke}-dropdown-placement-bottomRight,
&${De}-slide-up-appear${De}-slide-up-appear-active${ke}-dropdown-placement-bottomLeft,
&${De}-slide-up-appear${De}-slide-up-appear-active${ke}-dropdown-placement-bottomRight`]:{animationName:Hi.fJ},[`&${De}-slide-up-leave${De}-slide-up-leave-active${ke}-dropdown-placement-topLeft,
&${De}-slide-up-leave${De}-slide-up-leave-active${ke}-dropdown-placement-topRight`]:{animationName:Hi.ly},[`&${De}-slide-up-leave${De}-slide-up-leave-active${ke}-dropdown-placement-bottomLeft,
&${De}-slide-up-leave${De}-slide-up-leave-active${ke}-dropdown-placement-bottomRight`]:{animationName:Hi.Uw},[`${ke}-panel > ${ke}-time-panel`]:{paddingTop:Ua},[`${ke}-ranges`]:{marginBottom:0,padding:`${Ua}px ${Sa}px`,overflow:"hidden",lineHeight:`${ji-2*Pn-Vr/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${ke}-preset > ${De}-tag-blue`]:{color:da,background:$a,borderColor:Ca,cursor:"pointer"},[`${ke}-ok`]:{marginInlineStart:"auto"}},[`${ke}-range-wrapper`]:{display:"flex",position:"relative"},[`${ke}-range-arrow`]:Object.assign({position:"absolute",zIndex:1,display:"none",marginInlineStart:an*1.5,transition:`left ${Ji} ease-out`},(0,Xa.r)(fa,La,Oa,oo,Oo)),[`${ke}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:oo,borderRadius:fo,boxShadow:$o,transition:`margin ${Ji}`,[`${ke}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${ke}-presets`]:{display:"flex",flexDirection:"column",minWidth:Lo,maxWidth:ps,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:Vr,borderInlineEnd:`${Pn}px ${fn} ${ss}`,li:Object.assign(Object.assign({},po.vS),{borderRadius:cs,paddingInline:Vr,paddingBlock:(Mr-Math.round(at*Xr))/2,cursor:"pointer",transition:`all ${Ji}`,"+ li":{marginTop:si},"&:hover":{background:jo}})}},[`${ke}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${ke}-panel`]:{borderWidth:`0 0 ${Pn}px`},"&:last-child":{[`${ke}-panel`]:{borderWidth:0}}},[`${ke}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${ke}-content,
table`]:{textAlign:"center"},"&-focused":{borderColor:Ut}}}}),"&-dropdown-range":{padding:`${fa*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${ke}-separator`]:{transform:"rotate(180deg)"},[`${ke}-footer`]:{"&-extra":{direction:"rtl"}}}})},(0,Hi.oN)(ye,"slide-up"),(0,Hi.oN)(ye,"slide-down"),(0,yo.Fm)(ye,"move-up"),(0,yo.Fm)(ye,"move-down")]},ro=ye=>{const{componentCls:ke,controlHeightLG:De,paddingXXS:nt,padding:at}=ye;return{pickerCellCls:`${ke}-cell`,pickerCellInnerCls:`${ke}-cell-inner`,pickerYearMonthCellWidth:De*1.5,pickerQuarterPanelContentHeight:De*1.4,pickerCellPaddingVertical:nt+nt/2,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:at+nt/2}},so=ye=>({cellHoverBg:ye.controlItemBgHover,cellActiveWithRangeBg:ye.controlItemBgActive,cellHoverWithRangeBg:new So.C(ye.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new So.C(ye.colorPrimary).lighten(20).toHexString(),cellBgDisabled:ye.colorBgContainerDisabled,timeColumnWidth:ye.controlHeightLG*1.4,timeColumnHeight:28*8,timeCellHeight:28,cellWidth:ye.controlHeightSM*1.5,cellHeight:ye.controlHeightSM,textHeight:ye.controlHeightLG,withoutTimeCellHeight:ye.controlHeightLG*1.65});var to=(0,Ei.Z)("DatePicker",ye=>{const ke=(0,Xi.TS)((0,ho.e5)(ye),ro(ye));return[Ki(ke),Wa(ke),(0,Ra.c)(ye,{focusElCls:`${ye.componentCls}-focused`})]},ye=>Object.assign(Object.assign(Object.assign({},(0,ho.TM)(ye)),so(ye)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:ye.zIndexPopupBase+50}));function lo(ye,ke,De){return De!==void 0?De:ke==="year"&&ye.lang.yearPlaceholder?ye.lang.yearPlaceholder:ke==="quarter"&&ye.lang.quarterPlaceholder?ye.lang.quarterPlaceholder:ke==="month"&&ye.lang.monthPlaceholder?ye.lang.monthPlaceholder:ke==="week"&&ye.lang.weekPlaceholder?ye.lang.weekPlaceholder:ke==="time"&&ye.timePickerLocale.placeholder?ye.timePickerLocale.placeholder:ye.lang.placeholder}function vo(ye,ke,De){return De!==void 0?De:ke==="year"&&ye.lang.yearPlaceholder?ye.lang.rangeYearPlaceholder:ke==="quarter"&&ye.lang.quarterPlaceholder?ye.lang.rangeQuarterPlaceholder:ke==="month"&&ye.lang.monthPlaceholder?ye.lang.rangeMonthPlaceholder:ke==="week"&&ye.lang.weekPlaceholder?ye.lang.rangeWeekPlaceholder:ke==="time"&&ye.timePickerLocale.placeholder?ye.timePickerLocale.rangePlaceholder:ye.lang.rangePlaceholder}function Ao(ye,ke){const De={adjustX:1,adjustY:1};switch(ke){case"bottomLeft":return{points:["tl","bl"],offset:[0,4],overflow:De};case"bottomRight":return{points:["tr","br"],offset:[0,4],overflow:De};case"topLeft":return{points:["bl","tl"],offset:[0,-4],overflow:De};case"topRight":return{points:["br","tr"],offset:[0,-4],overflow:De};default:return{points:ye==="rtl"?["tr","br"]:["tl","bl"],offset:[0,4],overflow:De}}}function no(ye){return ye?Array.isArray(ye)?ye:[ye]:[]}function ao(ye){const{format:ke,picker:De,showHour:nt,showMinute:at,showSecond:an,use12Hours:Zt}=ye,Pn=no(ke)[0],fn=Object.assign({},ye);return ke&&Array.isArray(ke)&&(fn.format=Pn),Pn&&typeof Pn=="string"&&(!Pn.includes("s")&&an===void 0&&(fn.showSecond=!1),!Pn.includes("m")&&at===void 0&&(fn.showMinute=!1),!Pn.includes("H")&&!Pn.includes("h")&&!Pn.includes("K")&&!Pn.includes("k")&&nt===void 0&&(fn.showHour=!1),(Pn.includes("a")||Pn.includes("A"))&&Zt===void 0&&(fn.use12Hours=!0)),De==="time"?fn:(typeof Pn=="function"&&delete fn.format,{showTime:fn})}function zo(ye,ke,De){if(ye===!1)return!1;const nt={clearIcon:ke!=null?ke:De};return typeof ye=="object"?Object.assign(Object.assign({},nt),ye):nt}var Ho=ae(71577);function Jo(ye){return de.createElement(Ho.ZP,Object.assign({size:"small",type:"primary"},ye))}var co={button:Jo},aa=function(ye,ke){var De={};for(var nt in ye)Object.prototype.hasOwnProperty.call(ye,nt)&&ke.indexOf(nt)<0&&(De[nt]=ye[nt]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,nt=Object.getOwnPropertySymbols(ye);at<nt.length;at++)ke.indexOf(nt[at])<0&&Object.prototype.propertyIsEnumerable.call(ye,nt[at])&&(De[nt[at]]=ye[nt[at]]);return De};function va(ye){return(0,de.forwardRef)((De,nt)=>{const{prefixCls:at,getPopupContainer:an,className:Zt,placement:Pn,size:fn,disabled:Ut,bordered:Kn=!0,placeholder:gn,popupClassName:xn,dropdownClassName:ir,status:sr,clearIcon:Mn,allowClear:Xn,rootClassName:Mr}=De,Tr=aa(De,["prefixCls","getPopupContainer","className","placement","size","disabled","bordered","placeholder","popupClassName","dropdownClassName","status","clearIcon","allowClear","rootClassName"]),Vr=de.useRef(null),{getPrefixCls:si,direction:xi,getPopupContainer:hi}=(0,de.useContext)(Pa.E_),Xr=si("picker",at),{compactSize:da,compactItemClassnames:Ji}=(0,ia.ri)(Xr,xi),{format:Na,showTime:Ua,picker:Sa}=De,ji=si(),[$a,Ca]=to(Xr),fa=Object.assign(Object.assign({},Ua?ao(Object.assign({format:Na,picker:Sa},Ua)):{}),Sa==="time"?ao(Object.assign(Object.assign({format:Na},De),{picker:Sa})):{}),La=(0,ca.Z)(Oo=>{var ya;return(ya=fn!=null?fn:da)!==null&&ya!==void 0?ya:Oo}),Oa=de.useContext(Ui.Z),oo=Ut!=null?Ut:Oa,fo=(0,de.useContext)(bi.aM),{hasFeedback:$o,status:cs,feedbackIcon:ss}=fo,jo=de.createElement(de.Fragment,null,Sa==="time"?de.createElement(nn,null):de.createElement(lt,null),$o&&ss);(0,de.useImperativeHandle)(nt,()=>({focus:()=>{var Oo;return(Oo=Vr.current)===null||Oo===void 0?void 0:Oo.focus()},blur:()=>{var Oo;return(Oo=Vr.current)===null||Oo===void 0?void 0:Oo.blur()}}));const[Lo]=(0,zi.Z)("Calendar",_a.Z),ps=Object.assign(Object.assign({},Lo),De.locale);return $a(de.createElement(Aa,Object.assign({separator:de.createElement("span",{"aria-label":"to",className:`${Xr}-separator`},de.createElement(Xe,null)),disabled:oo,ref:Vr,dropdownAlign:Ao(xi,Pn),placeholder:vo(ps,Sa,gn),suffixIcon:jo,prevIcon:de.createElement("span",{className:`${Xr}-prev-icon`}),nextIcon:de.createElement("span",{className:`${Xr}-next-icon`}),superPrevIcon:de.createElement("span",{className:`${Xr}-super-prev-icon`}),superNextIcon:de.createElement("span",{className:`${Xr}-super-next-icon`}),transitionName:`${ji}-slide-up`},Tr,fa,{className:mt()({[`${Xr}-${La}`]:La,[`${Xr}-borderless`]:!Kn},(0,ka.Z)(Xr,(0,ka.F)(cs,sr),$o),Ca,Ji,Zt,Mr),locale:ps.lang,prefixCls:Xr,getPopupContainer:an||hi,generateConfig:ye,components:co,direction:xi,dropdownClassName:mt()(Ca,xn||ir,Mr),allowClear:zo(Xn,Mn,de.createElement(rt.Z,null))})))})}var qa=function(ye,ke){var De={};for(var nt in ye)Object.prototype.hasOwnProperty.call(ye,nt)&&ke.indexOf(nt)<0&&(De[nt]=ye[nt]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,nt=Object.getOwnPropertySymbols(ye);at<nt.length;at++)ke.indexOf(nt[at])<0&&Object.prototype.propertyIsEnumerable.call(ye,nt[at])&&(De[nt[at]]=ye[nt[at]]);return De};function uo(ye){function ke(fn,Ut){const Kn=Ut==="TimePicker"?"timePicker":"datePicker",gn=(0,de.forwardRef)((xn,ir)=>{const{prefixCls:sr,getPopupContainer:Mn,style:Xn,className:Mr,rootClassName:Tr,size:Vr,bordered:si=!0,placement:xi,placeholder:hi,popupClassName:Xr,dropdownClassName:da,disabled:Ji,status:Na,clearIcon:Ua,allowClear:Sa}=xn,ji=qa(xn,["prefixCls","getPopupContainer","style","className","rootClassName","size","bordered","placement","placeholder","popupClassName","dropdownClassName","disabled","status","clearIcon","allowClear"]),{getPrefixCls:$a,direction:Ca,getPopupContainer:fa,[Kn]:La}=(0,de.useContext)(Pa.E_),Oa=$a("picker",sr),{compactSize:oo,compactItemClassnames:fo}=(0,ia.ri)(Oa,Ca),$o=de.useRef(null),{format:cs,showTime:ss}=xn,[jo,Lo]=to(Oa);(0,de.useImperativeHandle)(ir,()=>({focus:()=>{var Es;return(Es=$o.current)===null||Es===void 0?void 0:Es.focus()},blur:()=>{var Es;return(Es=$o.current)===null||Es===void 0?void 0:Es.blur()}}));const ps={showToday:!0};let Oo={};fn&&(Oo.picker=fn);const ya=fn||xn.picker;Oo=Object.assign(Object.assign(Object.assign({},Oo),ss?ao(Object.assign({format:cs,picker:ya},ss)):{}),ya==="time"?ao(Object.assign(Object.assign({format:cs},xn),{picker:ya})):{});const ma=$a(),Do=(0,ca.Z)(Es=>{var Sl;return(Sl=Vr!=null?Vr:oo)!==null&&Sl!==void 0?Sl:Es}),Mo=de.useContext(Ui.Z),Da=Ji!=null?Ji:Mo,Qa=(0,de.useContext)(bi.aM),{hasFeedback:Di,status:ja,feedbackIcon:bo}=Qa,Go=de.createElement(de.Fragment,null,ya==="time"?de.createElement(nn,null):de.createElement(lt,null),Di&&bo),[Fo]=(0,zi.Z)("DatePicker",_a.Z),Ko=Object.assign(Object.assign({},Fo),xn.locale);return jo(de.createElement(pa,Object.assign({ref:$o,placeholder:lo(Ko,ya,hi),suffixIcon:Go,dropdownAlign:Ao(Ca,xi),prevIcon:de.createElement("span",{className:`${Oa}-prev-icon`}),nextIcon:de.createElement("span",{className:`${Oa}-next-icon`}),superPrevIcon:de.createElement("span",{className:`${Oa}-super-prev-icon`}),superNextIcon:de.createElement("span",{className:`${Oa}-super-next-icon`}),transitionName:`${ma}-slide-up`},ps,ji,Oo,{locale:Ko.lang,className:mt()({[`${Oa}-${Do}`]:Do,[`${Oa}-borderless`]:!si},(0,ka.Z)(Oa,(0,ka.F)(ja,Na),Di),Lo,fo,La==null?void 0:La.className,Mr,Tr),style:Object.assign(Object.assign({},La==null?void 0:La.style),Xn),prefixCls:Oa,getPopupContainer:Mn||fa,generateConfig:ye,components:co,direction:Ca,disabled:Da,dropdownClassName:mt()(Lo,Tr,Xr||da),allowClear:zo(Sa,Ua,de.createElement(rt.Z,null))})))});return Ut&&(gn.displayName=Ut),gn}const De=ke(),nt=ke("week","WeekPicker"),at=ke("month","MonthPicker"),an=ke("year","YearPicker"),Zt=ke("time","TimePicker"),Pn=ke("quarter","QuarterPicker");return{DatePicker:De,WeekPicker:nt,MonthPicker:at,YearPicker:an,TimePicker:Zt,QuarterPicker:Pn}}const Po=null;function Uo(ye){const{DatePicker:ke,WeekPicker:De,MonthPicker:nt,YearPicker:at,TimePicker:an,QuarterPicker:Zt}=uo(ye),Pn=va(ye),fn=ke;return fn.WeekPicker=De,fn.MonthPicker=nt,fn.YearPicker=at,fn.RangePicker=Pn,fn.TimePicker=an,fn.QuarterPicker=Zt,fn}var qo=Uo;const ls=qo(it);function Ss(ye){const ke=Ao(ye.direction,ye.placement);return ke.overflow.adjustY=!1,ke.overflow.adjustX=!1,Object.assign(Object.assign({},ye),{dropdownAlign:ke})}const Qo=(0,yt.Z)(ls,"picker",null,Ss);ls._InternalPanelDoNotUseOrYouWillBeFired=Qo;const Cs=(0,yt.Z)(ls.RangePicker,"picker",null,Ss);ls._InternalRangePanelDoNotUseOrYouWillBeFired=Cs,ls.generatePicker=qo;var Ka=ls},72565:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return ki}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(1413),Ye=ae(97685),ve=ae(67294),Ce=ae(73935);function _e(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var we={};function ge(Rt,Tt){}function Te(Rt,Tt){}function ft(){we={}}function Re(Rt,Tt,mn){!Tt&&!we[mn]&&(Rt(!1,mn),we[mn]=!0)}function bt(Rt,Tt){Re(ge,Rt,Tt)}function ht(Rt,Tt){Re(Te,Rt,Tt)}var st=null,tt=ae(71002),Le=ae(18459);function xt(Rt,Tt,mn){var $n=ve.useRef({});return(!("value"in $n.current)||mn($n.current.condition,Tt))&&($n.current.value=Rt(),$n.current.condition=Tt),$n.current.value}function on(Rt,Tt){typeof Rt=="function"?Rt(Tt):(0,tt.Z)(Rt)==="object"&&Rt&&"current"in Rt&&(Rt.current=Tt)}function it(){for(var Rt=arguments.length,Tt=new Array(Rt),mn=0;mn<Rt;mn++)Tt[mn]=arguments[mn];var $n=Tt.filter(function(Qn){return Qn});return $n.length<=1?$n[0]:function(Qn){Tt.forEach(function(Or){on(Or,Qn)})}}function yt(){for(var Rt=arguments.length,Tt=new Array(Rt),mn=0;mn<Rt;mn++)Tt[mn]=arguments[mn];return xt(function(){return it.apply(void 0,Tt)},Tt,function($n,Qn){return $n.length===Qn.length&&$n.every(function(Or,Gr){return Or===Qn[Gr]})})}function Ee(Rt){var Tt,mn,$n=(0,Le.isMemo)(Rt)?Rt.type.type:Rt.type;return!(typeof $n=="function"&&!((Tt=$n.prototype)!==null&&Tt!==void 0&&Tt.render)||typeof Rt=="function"&&!((mn=Rt.prototype)!==null&&mn!==void 0&&mn.render))}var de=ve.createContext(null),je=de,ze=ae(74902),At=_e()?ve.useLayoutEffect:ve.useEffect,ct=At,lt=function(Tt,mn){var $n=React.useRef(!0);At(function(){if(!$n.current)return Tt()},mn),At(function(){return $n.current=!1,function(){$n.current=!0}},[])},Ze=[];function kt(Rt,Tt){var mn=ve.useState(function(){if(!_e())return null;var sa=document.createElement("div");return sa}),$n=(0,Ye.Z)(mn,1),Qn=$n[0],Or=ve.useRef(!1),Gr=ve.useContext(je),ci=ve.useState(Ze),gi=(0,Ye.Z)(ci,2),li=gi[0],Mi=gi[1],Vi=Gr||(Or.current?void 0:function(sa){Mi(function(Yi){var Oe=[sa].concat((0,ze.Z)(Yi));return Oe})});function Yr(){Qn.parentElement||document.body.appendChild(Qn),Or.current=!0}function Fi(){var sa;(sa=Qn.parentElement)===null||sa===void 0||sa.removeChild(Qn),Or.current=!1}return ct(function(){return Rt?Gr?Gr(Yr):Yr():Fi(),Fi},[Rt]),ct(function(){li.length&&(li.forEach(function(sa){return sa()}),Mi(Ze))},[li]),[Qn,Vi]}function pt(Rt,Tt){if(!Rt)return!1;if(Rt.contains)return Rt.contains(Tt);for(var mn=Tt;mn;){if(mn===Rt)return!0;mn=mn.parentNode}return!1}var nn="data-rc-order",rt="rc-util-key",qt=new Map;function pn(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Tt=Rt.mark;return Tt?Tt.startsWith("data-")?Tt:"data-".concat(Tt):rt}function cn(Rt){if(Rt.attachTo)return Rt.attachTo;var Tt=document.querySelector("head");return Tt||document.body}function Xe(Rt){return Rt==="queue"?"prependQueue":Rt?"prepend":"append"}function Me(Rt){return Array.from((qt.get(Rt)||Rt).children).filter(function(Tt){return Tt.tagName==="STYLE"})}function mt(Rt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_e())return null;var mn=Tt.csp,$n=Tt.prepend,Qn=document.createElement("style");Qn.setAttribute(nn,Xe($n)),mn!=null&&mn.nonce&&(Qn.nonce=mn==null?void 0:mn.nonce),Qn.innerHTML=Rt;var Or=cn(Tt),Gr=Or.firstChild;if($n){if($n==="queue"){var ci=Me(Or).filter(function(gi){return["prepend","prependQueue"].includes(gi.getAttribute(nn))});if(ci.length)return Or.insertBefore(Qn,ci[ci.length-1].nextSibling),Qn}Or.insertBefore(Qn,Gr)}else Or.appendChild(Qn);return Qn}function Gt(Rt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mn=cn(Tt);return Me(mn).find(function($n){return $n.getAttribute(pn(Tt))===Rt})}function hn(Rt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mn=Gt(Rt,Tt);if(mn){var $n=cn(Tt);$n.removeChild(mn)}}function Qe(Rt,Tt){var mn=qt.get(Rt);if(!mn||!pt(document,mn)){var $n=mt("",Tt),Qn=$n.parentNode;qt.set(Rt,Qn),Rt.removeChild($n)}}function ut(){qt.clear()}function Yt(Rt,Tt){var mn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$n=cn(mn);Qe($n,mn);var Qn=Gt(Tt,mn);if(Qn){var Or,Gr;if((Or=mn.csp)!==null&&Or!==void 0&&Or.nonce&&Qn.nonce!==((Gr=mn.csp)===null||Gr===void 0?void 0:Gr.nonce)){var ci;Qn.nonce=(ci=mn.csp)===null||ci===void 0?void 0:ci.nonce}return Qn.innerHTML!==Rt&&(Qn.innerHTML=Rt),Qn}var gi=mt(Rt,mn);return gi.setAttribute(pn(mn),Tt),gi}var Qt;function tn(Rt){if(typeof document=="undefined")return 0;if(Rt||Qt===void 0){var Tt=document.createElement("div");Tt.style.width="100%",Tt.style.height="200px";var mn=document.createElement("div"),$n=mn.style;$n.position="absolute",$n.top="0",$n.left="0",$n.pointerEvents="none",$n.visibility="hidden",$n.width="200px",$n.height="150px",$n.overflow="hidden",mn.appendChild(Tt),document.body.appendChild(mn);var Qn=Tt.offsetWidth;mn.style.overflow="scroll";var Or=Tt.offsetWidth;Qn===Or&&(Or=mn.clientWidth),document.body.removeChild(mn),Qt=Qn-Or}return Qt}function _t(Rt){var Tt=Rt.match(/^(.*)px$/),mn=Number(Tt==null?void 0:Tt[1]);return Number.isNaN(mn)?tn():mn}function en(Rt){if(typeof document=="undefined"||!Rt||!(Rt instanceof Element))return{width:0,height:0};var Tt=getComputedStyle(Rt,"::-webkit-scrollbar"),mn=Tt.width,$n=Tt.height;return{width:_t(mn),height:_t($n)}}function Cn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var On="rc-util-locker-".concat(Date.now()),$e=0;function ce(Rt){var Tt=!!Rt,mn=ve.useState(function(){return $e+=1,"".concat(On,"_").concat($e)}),$n=(0,Ye.Z)(mn,1),Qn=$n[0];ct(function(){if(Tt){var Or=en(document.body).width,Gr=Cn();Yt(`
html body {
overflow-y: hidden;
`.concat(Gr?"width: calc(100% - ".concat(Or,"px);"):"",`
}`),Qn)}else hn(Qn);return function(){hn(Qn)}},[Tt,Qn])}var le=!1;function me(Rt){return typeof Rt=="boolean"&&(le=Rt),le}var he=function(Tt){return Tt===!1?!1:!_e()||!Tt?null:typeof Tt=="string"?document.querySelector(Tt):typeof Tt=="function"?Tt():Tt},se=ve.forwardRef(function(Rt,Tt){var mn=Rt.open,$n=Rt.autoLock,Qn=Rt.getContainer,Or=Rt.debug,Gr=Rt.autoDestroy,ci=Gr===void 0?!0:Gr,gi=Rt.children,li=ve.useState(mn),Mi=(0,Ye.Z)(li,2),Vi=Mi[0],Yr=Mi[1],Fi=Vi||mn;ve.useEffect(function(){(ci||mn)&&Yr(mn)},[mn,ci]);var sa=ve.useState(function(){return he(Qn)}),Yi=(0,Ye.Z)(sa,2),Oe=Yi[0],Ve=Yi[1];ve.useEffect(function(){var Wn=he(Qn);Ve(Wn!=null?Wn:null)});var Ue=kt(Fi&&!Oe,Or),qe=(0,Ye.Z)(Ue,2),vt=qe[0],St=qe[1],Nt=Oe!=null?Oe:vt;ce($n&&mn&&_e()&&(Nt===vt||Nt===document.body));var wn=null;if(gi&&Ee(gi)&&Tt){var Ln=gi;wn=Ln.ref}var br=yt(wn,Tt);if(!Fi||!_e()||Oe===void 0)return null;var Br=Nt===!1||me(),hr=gi;return Tt&&(hr=ve.cloneElement(gi,{ref:br})),ve.createElement(je.Provider,{value:St},Br?hr:(0,Ce.createPortal)(hr,Nt))}),Ie=se,et=Ie;function $t(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ht=$t()?ve.useLayoutEffect:ve.useEffect,Xt=function(Tt,mn){var $n=ve.useRef(!0);Ht(function(){return Tt($n.current)},mn),Ht(function(){return $n.current=!1,function(){$n.current=!0}},[])},jt=function(Tt,mn){Xt(function($n){if(!$n)return Tt()},mn)},rn=Xt,qn=ve.createContext(null),lr=ve.createContext({}),Bt=qn,Sn=ae(4942),dr=ae(87462),Wr=ae(62874),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(Tt){var mn=Tt.keyCode;if(Tt.altKey&&!Tt.ctrlKey||Tt.metaKey||mn>=gt.F1&&mn<=gt.F12)return!1;switch(mn){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(Tt){if(Tt>=gt.ZERO&&Tt<=gt.NINE||Tt>=gt.NUM_ZERO&&Tt<=gt.NUM_MULTIPLY||Tt>=gt.A&&Tt<=gt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Tt===0)return!0;switch(Tt){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}}},sn=gt,tr=`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`,Zn=`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`,xr="".concat(tr," ").concat(Zn).split(/[\s\n]+/),Kr="aria-",Jr="data-";function Zr(Rt,Tt){return Rt.indexOf(Tt)===0}function ei(Rt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn;Tt===!1?mn={aria:!0,data:!0,attr:!0}:Tt===!0?mn={aria:!0}:mn=(0,Be.Z)({},Tt);var $n={};return Object.keys(Rt).forEach(function(Qn){(mn.aria&&(Qn==="role"||Zr(Qn,Kr))||mn.data&&Zr(Qn,Jr)||mn.attr&&xr.includes(Qn))&&($n[Qn]=Rt[Qn])}),$n}function pi(Rt){var Tt=React.useRef();Tt.current=Rt;var mn=React.useCallback(function(){for(var $n,Qn=arguments.length,Or=new Array(Qn),Gr=0;Gr<Qn;Gr++)Or[Gr]=arguments[Gr];return($n=Tt.current)===null||$n===void 0?void 0:$n.call.apply($n,[Tt].concat(Or))},[]);return mn}function kr(Rt){var Tt=React.useRef(!1),mn=React.useState(Rt),$n=_slicedToArray(mn,2),Qn=$n[0],Or=$n[1];React.useEffect(function(){return Tt.current=!1,function(){Tt.current=!0}},[]);function Gr(ci,gi){gi&&Tt.current||Or(ci)}return[Qn,Gr]}function Ti(Rt){return Rt!==void 0}function na(Rt,Tt){var mn=Tt||{},$n=mn.defaultValue,Qn=mn.value,Or=mn.onChange,Gr=mn.postState,ci=useState(function(){return Ti(Qn)?Qn:Ti($n)?typeof $n=="function"?$n():$n:typeof Rt=="function"?Rt():Rt}),gi=_slicedToArray(ci,2),li=gi[0],Mi=gi[1],Vi=Qn!==void 0?Qn:li,Yr=Gr?Gr(Vi):Vi,Fi=useEvent(Or),sa=useState([Vi]),Yi=_slicedToArray(sa,2),Oe=Yi[0],Ve=Yi[1];useLayoutUpdateEffect(function(){var qe=Oe[0];li!==qe&&Fi(li,qe)},[Oe]),useLayoutUpdateEffect(function(){Ti(Qn)||Mi(Qn)},[Qn]);var Ue=useEvent(function(qe,vt){Mi(qe,vt),Ve([Vi],vt)});return[Yr,Ue]}var ea=ae(33993);function oa(Rt,Tt,mn){var $n=ve.useRef({});return(!("value"in $n.current)||mn($n.current.condition,Tt))&&($n.current.value=Rt(),$n.current.condition=Tt),$n.current.value}function Li(Rt,Tt){typeof Rt=="function"?Rt(Tt):(0,tt.Z)(Rt)==="object"&&Rt&&"current"in Rt&&(Rt.current=Tt)}function Dt(){for(var Rt=arguments.length,Tt=new Array(Rt),mn=0;mn<Rt;mn++)Tt[mn]=arguments[mn];var $n=Tt.filter(function(Qn){return Qn});return $n.length<=1?$n[0]:function(Qn){Tt.forEach(function(Or){Li(Or,Qn)})}}function Hn(){for(var Rt=arguments.length,Tt=new Array(Rt),mn=0;mn<Rt;mn++)Tt[mn]=arguments[mn];return oa(function(){return Dt.apply(void 0,Tt)},Tt,function($n,Qn){return $n.length!==Qn.length||$n.every(function(Or,Gr){return Or!==Qn[Gr]})})}function Vn(Rt){var Tt,mn,$n=isMemo(Rt)?Rt.type.type:Rt.type;return!(typeof $n=="function"&&!((Tt=$n.prototype)!==null&&Tt!==void 0&&Tt.render)||typeof Rt=="function"&&!((mn=Rt.prototype)!==null&&mn!==void 0&&mn.render))}function Gn(Rt){return!isValidElement(Rt)||isFragment(Rt)?!1:Vn(Rt)}function Lr(Rt,Tt,mn,$n){if(!Tt.length)return mn;var Qn=_toArray(Tt),Or=Qn[0],Gr=Qn.slice(1),ci;return!Rt&&typeof Or=="number"?ci=[]:Array.isArray(Rt)?ci=_toConsumableArray(Rt):ci=_objectSpread({},Rt),$n&&mn===void 0&&Gr.length===1?delete ci[Or][Gr[0]]:ci[Or]=Lr(ci[Or],Gr,mn,$n),ci}function yr(Rt,Tt,mn){var $n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Tt.length&&$n&&mn===void 0&&!get(Rt,Tt.slice(0,-1))?Rt:Lr(Rt,Tt,mn,$n)}function Pr(Rt){return _typeof(Rt)==="object"&&Rt!==null&&Object.getPrototypeOf(Rt)===Object.prototype}function nr(Rt){return Array.isArray(Rt)?[]:{}}var ot=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Ct(){for(var Rt=arguments.length,Tt=new Array(Rt),mn=0;mn<Rt;mn++)Tt[mn]=arguments[mn];var $n=nr(Tt[0]);return Tt.forEach(function(Qn){function Or(Gr,ci){var gi=new Set(ci),li=get(Qn,Gr),Mi=Array.isArray(li);if(Mi||Pr(li)){if(!gi.has(li)){gi.add(li);var Vi=get($n,Gr);Mi?$n=yr($n,Gr,[]):(!Vi||_typeof(Vi)!=="object")&&($n=yr($n,Gr,nr(li))),ot(li).forEach(function(Yr){Or([].concat(_toConsumableArray(Gr),[Yr]),gi)})}}else $n=yr($n,Gr,li)}Or([])}),$n}var zt={},un=[],Je=function(Tt){un.push(Tt)};function Mt(Rt,Tt){if(0)var mn}function ln(Rt,Tt){if(0)var mn}function Jt(){zt={}}function vn(Rt,Tt,mn){!Tt&&!zt[mn]&&(Rt(!1,mn),zt[mn]=!0)}function bn(Rt,Tt){vn(Mt,Rt,Tt)}function Fn(Rt,Tt){vn(ln,Rt,Tt)}bn.preMessage=Je,bn.resetWarned=Jt,bn.noteOnce=Fn;var Nr=bn,Sr=function(Tt){var mn=Tt.prefixCls,$n=Tt.className,Qn=Tt.style,Or=Tt.children,Gr=Tt.containerRef,ci=Tt.id,gi=Tt.onMouseEnter,li=Tt.onMouseOver,Mi=Tt.onMouseLeave,Vi=Tt.onClick,Yr=Tt.onKeyDown,Fi=Tt.onKeyUp,sa={onMouseEnter:gi,onMouseOver:li,onMouseLeave:Mi,onClick:Vi,onKeyDown:Yr,onKeyUp:Fi},Yi=ve.useContext(lr),Oe=Yi.panel,Ve=Hn(Oe,Gr);return ve.createElement(ve.Fragment,null,ve.createElement("div",(0,dr.Z)({id:ci,className:Fe()("".concat(mn,"-content"),$n),style:(0,Be.Z)({},Qn),"aria-modal":"true",role:"dialog",ref:Ve},sa),Or))},vr=Sr;function Ir(Rt){return typeof Rt=="string"&&String(Number(Rt))===Rt?(Nr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Rt)):Rt}function _r(Rt){warning(!("wrapperClassName"in Rt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Rt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Lt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function wt(Rt,Tt){var mn,$n,Qn,Or,Gr=Rt.prefixCls,ci=Rt.open,gi=Rt.placement,li=Rt.inline,Mi=Rt.push,Vi=Rt.forceRender,Yr=Rt.autoFocus,Fi=Rt.keyboard,sa=Rt.rootClassName,Yi=Rt.rootStyle,Oe=Rt.zIndex,Ve=Rt.className,Ue=Rt.id,qe=Rt.style,vt=Rt.motion,St=Rt.width,Nt=Rt.height,wn=Rt.children,Ln=Rt.contentWrapperStyle,br=Rt.mask,Br=Rt.maskClosable,hr=Rt.maskMotion,Wn=Rt.maskClassName,Tn=Rt.maskStyle,Jn=Rt.afterOpenChange,ar=Rt.onClose,$r=Rt.onMouseEnter,mr=Rt.onMouseOver,gr=Rt.onMouseLeave,Cr=Rt.onClick,Er=Rt.onKeyDown,Fr=Rt.onKeyUp,He=ve.useRef(),Ge=ve.useRef(),Ft=ve.useRef();ve.useImperativeHandle(Tt,function(){return He.current});var Et=function(oi){var Ci=oi.keyCode,Oi=oi.shiftKey;switch(Ci){case sn.TAB:{if(Ci===sn.TAB){if(!Oi&&document.activeElement===Ft.current){var ii;(ii=Ge.current)===null||ii===void 0||ii.focus({preventScroll:!0})}else if(Oi&&document.activeElement===Ge.current){var Ni;(Ni=Ft.current)===null||Ni===void 0||Ni.focus({preventScroll:!0})}}break}case sn.ESC:{ar&&Fi&&(oi.stopPropagation(),ar(oi));break}}};ve.useEffect(function(){if(ci&&Yr){var jr;(jr=He.current)===null||jr===void 0||jr.focus({preventScroll:!0})}},[ci]);var dn=ve.useState(!1),In=(0,Ye.Z)(dn,2),zn=In[0],or=In[1],jn=ve.useContext(Bt),_n;Mi===!1?_n={distance:0}:Mi===!0?_n={}:_n=Mi||{};var cr=(mn=($n=(Qn=_n)===null||Qn===void 0?void 0:Qn.distance)!==null&&$n!==void 0?$n:jn==null?void 0:jn.pushDistance)!==null&&mn!==void 0?mn:180,fr=ve.useMemo(function(){return{pushDistance:cr,push:function(){or(!0)},pull:function(){or(!1)}}},[cr]);ve.useEffect(function(){if(ci){var jr;jn==null||(jr=jn.push)===null||jr===void 0||jr.call(jn)}else{var oi;jn==null||(oi=jn.pull)===null||oi===void 0||oi.call(jn)}},[ci]),ve.useEffect(function(){return function(){var jr;jn==null||(jr=jn.pull)===null||jr===void 0||jr.call(jn)}},[]);var Hr=br&&ve.createElement(Wr.Z,(0,dr.Z)({key:"mask"},hr,{visible:ci}),function(jr,oi){var Ci=jr.className,Oi=jr.style;return ve.createElement("div",{className:Fe()("".concat(Gr,"-mask"),Ci,Wn),style:(0,Be.Z)((0,Be.Z)({},Oi),Tn),onClick:Br&&ci?ar:void 0,ref:oi})}),ur=typeof vt=="function"?vt(gi):vt,ti={};if(zn&&cr)switch(gi){case"top":ti.transform="translateY(".concat(cr,"px)");break;case"bottom":ti.transform="translateY(".concat(-cr,"px)");break;case"left":ti.transform="translateX(".concat(cr,"px)");break;default:ti.transform="translateX(".concat(-cr,"px)");break}gi==="left"||gi==="right"?ti.width=Ir(St):ti.height=Ir(Nt);var yi={onMouseEnter:$r,onMouseOver:mr,onMouseLeave:gr,onClick:Cr,onKeyDown:Er,onKeyUp:Fr},ni=ve.createElement(Wr.Z,(0,dr.Z)({key:"panel"},ur,{visible:ci,forceRender:Vi,onVisibleChanged:function(oi){Jn==null||Jn(oi)},removeOnLeave:!1,leavedClassName:"".concat(Gr,"-content-wrapper-hidden")}),function(jr,oi){var Ci=jr.className,Oi=jr.style;return ve.createElement("div",(0,dr.Z)({className:Fe()("".concat(Gr,"-content-wrapper"),Ci),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},ti),Oi),Ln)},ei(Rt,{data:!0})),ve.createElement(vr,(0,dr.Z)({id:Ue,containerRef:oi,prefixCls:Gr,className:Ve,style:qe},yi),wn))}),fi=(0,Be.Z)({},Yi);return Oe&&(fi.zIndex=Oe),ve.createElement(Bt.Provider,{value:fr},ve.createElement("div",{className:Fe()(Gr,"".concat(Gr,"-").concat(gi),sa,(Or={},(0,Sn.Z)(Or,"".concat(Gr,"-open"),ci),(0,Sn.Z)(Or,"".concat(Gr,"-inline"),li),Or)),style:fi,tabIndex:-1,ref:He,onKeyDown:Et},Hr,ve.createElement("div",{tabIndex:0,ref:Ge,style:Lt,"aria-hidden":"true","data-sentinel":"start"}),ni,ve.createElement("div",{tabIndex:0,ref:Ft,style:Lt,"aria-hidden":"true","data-sentinel":"end"})))}var Ot=ve.forwardRef(wt),Dn=Ot,er=function(Tt){var mn=Tt.open,$n=mn===void 0?!1:mn,Qn=Tt.prefixCls,Or=Qn===void 0?"rc-drawer":Qn,Gr=Tt.placement,ci=Gr===void 0?"right":Gr,gi=Tt.autoFocus,li=gi===void 0?!0:gi,Mi=Tt.keyboard,Vi=Mi===void 0?!0:Mi,Yr=Tt.width,Fi=Yr===void 0?378:Yr,sa=Tt.mask,Yi=sa===void 0?!0:sa,Oe=Tt.maskClosable,Ve=Oe===void 0?!0:Oe,Ue=Tt.getContainer,qe=Tt.forceRender,vt=Tt.afterOpenChange,St=Tt.destroyOnClose,Nt=Tt.onMouseEnter,wn=Tt.onMouseOver,Ln=Tt.onMouseLeave,br=Tt.onClick,Br=Tt.onKeyDown,hr=Tt.onKeyUp,Wn=Tt.panelRef,Tn=ve.useState(!1),Jn=(0,Ye.Z)(Tn,2),ar=Jn[0],$r=Jn[1],mr=ve.useState(!1),gr=(0,Ye.Z)(mr,2),Cr=gr[0],Er=gr[1];rn(function(){Er(!0)},[]);var Fr=Cr?$n:!1,He=ve.useRef(),Ge=ve.useRef();rn(function(){Fr&&(Ge.current=document.activeElement)},[Fr]);var Ft=function(or){var jn;if($r(or),vt==null||vt(or),!or&&Ge.current&&!((jn=He.current)!==null&&jn!==void 0&&jn.contains(Ge.current))){var _n;(_n=Ge.current)===null||_n===void 0||_n.focus({preventScroll:!0})}},Et=ve.useMemo(function(){return{panel:Wn}},[Wn]);if(!qe&&!ar&&!Fr&&St)return null;var dn={onMouseEnter:Nt,onMouseOver:wn,onMouseLeave:Ln,onClick:br,onKeyDown:Br,onKeyUp:hr},In=(0,Be.Z)((0,Be.Z)({},Tt),{},{open:Fr,prefixCls:Or,placement:ci,autoFocus:li,keyboard:Vi,width:Fi,mask:Yi,maskClosable:Ve,inline:Ue===!1,afterOpenChange:Ft,ref:He},dn);return ve.createElement(lr.Provider,{value:Et},ve.createElement(et,{open:Fr||qe||ar,autoDestroy:!1,getContainer:Ue,autoLock:Yi&&(Fr||ar)},ve.createElement(Dn,In)))},An=er,Rn=An,Nn=ae(33603),rr=ae(53124),Dr=ae(65223),yn=ae(69760),di=Rt=>{const{prefixCls:Tt,title:mn,footer:$n,extra:Qn,closeIcon:Or,closable:Gr,onClose:ci,headerStyle:gi,drawerStyle:li,bodyStyle:Mi,footerStyle:Vi,children:Yr}=Rt,Fi=ve.useCallback(Ue=>ve.createElement("button",{type:"button",onClick:ci,"aria-label":"Close",className:`${Tt}-close`},Ue),[ci]),[sa,Yi]=(0,yn.Z)(Gr,Or,Fi,void 0,!0),Oe=ve.useMemo(()=>!mn&&!sa?null:ve.createElement("div",{style:gi,className:Fe()(`${Tt}-header`,{[`${Tt}-header-close-only`]:sa&&!mn&&!Qn})},ve.createElement("div",{className:`${Tt}-header-title`},Yi,mn&&ve.createElement("div",{className:`${Tt}-title`},mn)),Qn&&ve.createElement("div",{className:`${Tt}-extra`},Qn)),[sa,Yi,Qn,gi,Tt,mn]),Ve=ve.useMemo(()=>{if(!$n)return null;const Ue=`${Tt}-footer`;return ve.createElement("div",{className:Ue,style:Vi},$n)},[$n,Vi,Tt]);return ve.createElement("div",{className:`${Tt}-wrapper-body`,style:li},Oe,ve.createElement("div",{className:`${Tt}-body`,style:Mi},Yr),Ve)},ha=ae(4173),ta=ae(67968),Wi=ae(45503),Gi=Rt=>{const{componentCls:Tt,motionDurationSlow:mn}=Rt,$n={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${mn}`}}};return{[Tt]:{[`${Tt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${mn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Tt}-panel-motion`]:{"&-left":[$n,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[$n,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[$n,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[$n,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const $i=Rt=>{const{componentCls:Tt,zIndexPopup:mn,colorBgMask:$n,colorBgElevated:Qn,motionDurationSlow:Or,motionDurationMid:Gr,padding:ci,paddingLG:gi,fontSizeLG:li,lineHeightLG:Mi,lineWidth:Vi,lineType:Yr,colorSplit:Fi,marginSM:sa,colorIcon:Yi,colorIconHover:Oe,colorText:Ve,fontWeightStrong:Ue,footerPaddingBlock:qe,footerPaddingInline:vt}=Rt,St=`${Tt}-content-wrapper`;return{[Tt]:{position:"fixed",inset:0,zIndex:mn,pointerEvents:"none","&-pure":{position:"relative",background:Qn,[`&${Tt}-left`]:{boxShadow:Rt.boxShadowDrawerLeft},[`&${Tt}-right`]:{boxShadow:Rt.boxShadowDrawerRight},[`&${Tt}-top`]:{boxShadow:Rt.boxShadowDrawerUp},[`&${Tt}-bottom`]:{boxShadow:Rt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Tt}-mask`]:{position:"absolute",inset:0,zIndex:mn,background:$n,pointerEvents:"auto"},[St]:{position:"absolute",zIndex:mn,maxWidth:"100vw",transition:`all ${Or}`,"&-hidden":{display:"none"}},[`&-left > ${St}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Rt.boxShadowDrawerLeft},[`&-right > ${St}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Rt.boxShadowDrawerRight},[`&-top > ${St}`]:{top:0,insetInline:0,boxShadow:Rt.boxShadowDrawerUp},[`&-bottom > ${St}`]:{bottom:0,insetInline:0,boxShadow:Rt.boxShadowDrawerDown},[`${Tt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Qn,pointerEvents:"auto"},[`${Tt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Tt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ci}px ${gi}px`,fontSize:li,lineHeight:Mi,borderBottom:`${Vi}px ${Yr} ${Fi}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Tt}-extra`]:{flex:"none"},[`${Tt}-close`]:{display:"inline-block",marginInlineEnd:sa,color:Yi,fontWeight:Ue,fontSize:li,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Gr}`,textRendering:"auto","&:focus, &:hover":{color:Oe,textDecoration:"none"}},[`${Tt}-title`]:{flex:1,margin:0,color:Ve,fontWeight:Rt.fontWeightStrong,fontSize:li,lineHeight:Mi},[`${Tt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:gi,overflow:"auto"},[`${Tt}-footer`]:{flexShrink:0,padding:`${qe}px ${vt}px`,borderTop:`${Vi}px ${Yr} ${Fi}`},"&-rtl":{direction:"rtl"}}}};var ra=(0,ta.Z)("Drawer",Rt=>{const Tt=(0,Wi.TS)(Rt,{});return[$i(Tt),Gi(Tt)]},Rt=>({zIndexPopup:Rt.zIndexPopupBase,footerPaddingBlock:Rt.paddingXS,footerPaddingInline:Rt.padding})),Ma=ae(16569),vi=function(Rt,Tt){var mn={};for(var $n in Rt)Object.prototype.hasOwnProperty.call(Rt,$n)&&Tt.indexOf($n)<0&&(mn[$n]=Rt[$n]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qn=0,$n=Object.getOwnPropertySymbols(Rt);Qn<$n.length;Qn++)Tt.indexOf($n[Qn])<0&&Object.prototype.propertyIsEnumerable.call(Rt,$n[Qn])&&(mn[$n[Qn]]=Rt[$n[Qn]]);return mn};const Zi=null,xa={distance:180},Ya=Rt=>{var Tt;const{rootClassName:mn,width:$n,height:Qn,size:Or="default",mask:Gr=!0,push:ci=xa,open:gi,afterOpenChange:li,onClose:Mi,prefixCls:Vi,getContainer:Yr,style:Fi,className:sa,visible:Yi,afterVisibleChange:Oe}=Rt,Ve=vi(Rt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Ue,getPrefixCls:qe,direction:vt,drawer:St}=ve.useContext(rr.E_),Nt=qe("drawer",Vi),[wn,Ln]=ra(Nt),br=Yr===void 0&&Ue?()=>Ue(document.body):Yr,Br=Fe()({"no-mask":!Gr,[`${Nt}-rtl`]:vt==="rtl"},mn,Ln),hr=ve.useMemo(()=>$n!=null?$n:Or==="large"?736:378,[$n,Or]),Wn=ve.useMemo(()=>Qn!=null?Qn:Or==="large"?736:378,[Qn,Or]),Tn={motionName:(0,Nn.m)(Nt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Jn=$r=>({motionName:(0,Nn.m)(Nt,`panel-motion-${$r}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),ar=(0,Ma.H)();return wn(ve.createElement(ha.BR,null,ve.createElement(Dr.Ux,{status:!0,override:!0},ve.createElement(Rn,Object.assign({prefixCls:Nt,onClose:Mi,maskMotion:Tn,motion:Jn},Ve,{open:gi!=null?gi:Yi,mask:Gr,push:ci,width:hr,height:Wn,style:Object.assign(Object.assign({},St==null?void 0:St.style),Fi),className:Fe()(St==null?void 0:St.className,sa),rootClassName:Br,getContainer:br,afterOpenChange:li!=null?li:Oe,panelRef:ar}),ve.createElement(di,Object.assign({prefixCls:Nt},Ve,{onClose:Mi}))))))},Ba=Rt=>{const{prefixCls:Tt,style:mn,className:$n,placement:Qn="right"}=Rt,Or=vi(Rt,["prefixCls","style","className","placement"]),{getPrefixCls:Gr}=ve.useContext(rr.E_),ci=Gr("drawer",Tt),[gi,li]=ra(ci),Mi=Fe()(ci,`${ci}-pure`,`${ci}-${Qn}`,li,$n);return gi(ve.createElement("div",{className:Mi,style:mn},ve.createElement(di,Object.assign({prefixCls:ci},Or))))};Ya._InternalPanelDoNotUseOrYouWillBeFired=Ba;var ki=Ya},35874:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return he}});var fe=ae(67294),Fe=ae(91034),Be=ae(94184),Ye=ae.n(Be),ve=ae(87462),Ce=ae(4942),_e=ae(97685),we=ae(45987),ge=ae(62709),Te=ae(71002),ft=ae(12060);function Re(se,Ie,et){var $t=React.useRef({});return(!("value"in $t.current)||et($t.current.condition,Ie))&&($t.current.value=se(),$t.current.condition=Ie),$t.current.value}function bt(se,Ie){typeof se=="function"?se(Ie):(0,Te.Z)(se)==="object"&&se&&"current"in se&&(se.current=Ie)}function ht(){for(var se=arguments.length,Ie=new Array(se),et=0;et<se;et++)Ie[et]=arguments[et];var $t=Ie.filter(function(Ht){return Ht});return $t.length<=1?$t[0]:function(Ht){Ie.forEach(function(Xt){bt(Xt,Ht)})}}function st(){for(var se=arguments.length,Ie=new Array(se),et=0;et<se;et++)Ie[et]=arguments[et];return useMemo(function(){return ht.apply(void 0,Ie)},Ie,function($t,Ht){return $t.length===Ht.length&&$t.every(function(Xt,jt){return Xt===Ht[jt]})})}function tt(se){var Ie,et,$t=(0,ft.isMemo)(se)?se.type.type:se.type;return!(typeof $t=="function"&&!((Ie=$t.prototype)!==null&&Ie!==void 0&&Ie.render)||typeof se=="function"&&!((et=se.prototype)!==null&&et!==void 0&&et.render))}var Le={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 et=Ie.keyCode;if(Ie.altKey&&!Ie.ctrlKey||Ie.metaKey||et>=Le.F1&&et<=Le.F12)return!1;switch(et){case Le.ALT:case Le.CAPS_LOCK:case Le.CONTEXT_MENU:case Le.CTRL:case Le.DOWN:case Le.END:case Le.ESC:case Le.HOME:case Le.INSERT:case Le.LEFT:case Le.MAC_FF_META:case Le.META:case Le.NUMLOCK:case Le.NUM_CENTER:case Le.PAGE_DOWN:case Le.PAGE_UP:case Le.PAUSE:case Le.PRINT_SCREEN:case Le.RIGHT:case Le.SHIFT:case Le.UP:case Le.WIN_KEY:case Le.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ie){if(Ie>=Le.ZERO&&Ie<=Le.NINE||Ie>=Le.NUM_ZERO&&Ie<=Le.NUM_MULTIPLY||Ie>=Le.A&&Ie<=Le.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ie===0)return!0;switch(Ie){case Le.SPACE:case Le.QUESTION_MARK:case Le.NUM_PLUS:case Le.NUM_MINUS:case Le.NUM_PERIOD:case Le.NUM_DIVISION:case Le.SEMICOLON:case Le.DASH:case Le.EQUALS:case Le.COMMA:case Le.PERIOD:case Le.SLASH:case Le.APOSTROPHE:case Le.SINGLE_QUOTE:case Le.OPEN_SQUARE_BRACKET:case Le.BACKSLASH:case Le.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},xt=Le,on=function(Ie){return+setTimeout(Ie,16)},it=function(Ie){return clearTimeout(Ie)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(on=function(Ie){return window.requestAnimationFrame(Ie)},it=function(Ie){return window.cancelAnimationFrame(Ie)});var yt=0,Ee=new Map;function de(se){Ee.delete(se)}var je=function(Ie){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;yt+=1;var $t=yt;function Ht(Xt){if(Xt===0)de($t),Ie();else{var jt=on(function(){Ht(Xt-1)});Ee.set($t,jt)}}return Ht(et),$t};je.cancel=function(se){var Ie=Ee.get(se);return de(Ie),it(Ie)};var ze=je,At=xt.ESC,ct=xt.TAB;function lt(se){var Ie=se.visible,et=se.triggerRef,$t=se.onVisibleChange,Ht=se.autoFocus,Xt=se.overlayRef,jt=fe.useRef(!1),rn=function(){if(Ie){var Sn,dr;(Sn=et.current)===null||Sn===void 0||(dr=Sn.focus)===null||dr===void 0||dr.call(Sn),$t==null||$t(!1)}},qn=function(){var Sn;return(Sn=Xt.current)!==null&&Sn!==void 0&&Sn.focus?(Xt.current.focus(),jt.current=!0,!0):!1},lr=function(Sn){switch(Sn.keyCode){case At:rn();break;case ct:{var dr=!1;jt.current||(dr=qn()),dr?Sn.preventDefault():rn();break}}};fe.useEffect(function(){return Ie?(window.addEventListener("keydown",lr),Ht&&ze(qn,3),function(){window.removeEventListener("keydown",lr),jt.current=!1}):function(){jt.current=!1}},[Ie])}var Ze=(0,fe.forwardRef)(function(se,Ie){var et=se.overlay,$t=se.arrow,Ht=se.prefixCls,Xt=(0,fe.useMemo)(function(){var rn;return typeof et=="function"?rn=et():rn=et,rn},[et]),jt=ht(Ie,Xt==null?void 0:Xt.ref);return fe.createElement(fe.Fragment,null,$t&&fe.createElement("div",{className:"".concat(Ht,"-arrow")}),fe.cloneElement(Xt,{ref:tt(Xt)?jt:void 0}))}),kt=Ze,pt={adjustX:1,adjustY:1},nn=[0,0],rt={topLeft:{points:["bl","tl"],overflow:pt,offset:[0,-4],targetOffset:nn},top:{points:["bc","tc"],overflow:pt,offset:[0,-4],targetOffset:nn},topRight:{points:["br","tr"],overflow:pt,offset:[0,-4],targetOffset:nn},bottomLeft:{points:["tl","bl"],overflow:pt,offset:[0,4],targetOffset:nn},bottom:{points:["tc","bc"],overflow:pt,offset:[0,4],targetOffset:nn},bottomRight:{points:["tr","br"],overflow:pt,offset:[0,4],targetOffset:nn}},qt=rt,pn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function cn(se,Ie){var et,$t=se.arrow,Ht=$t===void 0?!1:$t,Xt=se.prefixCls,jt=Xt===void 0?"rc-dropdown":Xt,rn=se.transitionName,qn=se.animation,lr=se.align,Bt=se.placement,Sn=Bt===void 0?"bottomLeft":Bt,dr=se.placements,Wr=dr===void 0?qt:dr,gt=se.getPopupContainer,sn=se.showAction,tr=se.hideAction,Zn=se.overlayClassName,xr=se.overlayStyle,Kr=se.visible,Jr=se.trigger,Zr=Jr===void 0?["hover"]:Jr,ei=se.autoFocus,pi=se.overlay,kr=se.children,Ti=se.onVisibleChange,na=(0,we.Z)(se,pn),ea=fe.useState(),oa=(0,_e.Z)(ea,2),Li=oa[0],Dt=oa[1],Hn="visible"in se?Kr:Li,Vn=fe.useRef(null),Gn=fe.useRef(null),Lr=fe.useRef(null);fe.useImperativeHandle(Ie,function(){return Vn.current});var yr=function(ln){Dt(ln),Ti==null||Ti(ln)};lt({visible:Hn,triggerRef:Lr,onVisibleChange:yr,autoFocus:ei,overlayRef:Gn});var Pr=function(ln){var Jt=se.onOverlayClick;Dt(!1),Jt&&Jt(ln)},nr=function(){return fe.createElement(kt,{ref:Gn,overlay:pi,prefixCls:jt,arrow:Ht})},ot=function(){return typeof pi=="function"?nr:nr()},Ct=function(){var ln=se.minOverlayWidthMatchTrigger,Jt=se.alignPoint;return"minOverlayWidthMatchTrigger"in se?ln:!Jt},zt=function(){var ln=se.openClassName;return ln!==void 0?ln:"".concat(jt,"-open")},un=fe.cloneElement(kr,{className:Ye()((et=kr.props)===null||et===void 0?void 0:et.className,Hn&&zt()),ref:tt(kr)?ht(Lr,kr.ref):void 0}),Je=tr;return!Je&&Zr.indexOf("contextMenu")!==-1&&(Je=["click"]),fe.createElement(ge.Z,(0,ve.Z)({builtinPlacements:Wr},na,{prefixCls:jt,ref:Vn,popupClassName:Ye()(Zn,(0,Ce.Z)({},"".concat(jt,"-show-arrow"),Ht)),popupStyle:xr,action:Zr,showAction:sn,hideAction:Je,popupPlacement:Sn,popupAlign:lr,popupTransitionName:rn,popupAnimation:qn,popupVisible:Hn,stretch:Ct()?"minWidth":"",popup:ot(),onPopupVisibleChange:yr,onPopupClick:Pr,getPopupContainer:gt}),un)}var Xe=fe.forwardRef(cn),Me=Xe,mt=ae(60276),Gt=ae(5663),hn=ae(10366),Qe=ae(80636),ut=ae(8745),Yt=ae(96159),Qt=ae(53124),tn=ae(68508),_t=ae(76529),en=ae(29691),Cn=ae(66748);const On=null,$e=se=>{const{menu:Ie,arrow:et,prefixCls:$t,children:Ht,trigger:Xt,disabled:jt,dropdownRender:rn,getPopupContainer:qn,overlayClassName:lr,rootClassName:Bt,open:Sn,onOpenChange:dr,visible:Wr,onVisibleChange:gt,mouseEnterDelay:sn=.15,mouseLeaveDelay:tr=.1,autoAdjustOverflow:Zn=!0,placement:xr="",overlay:Kr,transitionName:Jr}=se,{getPopupContainer:Zr,getPrefixCls:ei,direction:pi}=fe.useContext(Qt.E_),kr=fe.useMemo(()=>{const un=ei();return Jr!==void 0?Jr:xr.includes("top")?`${un}-slide-down`:`${un}-slide-up`},[ei,xr,Jr]),Ti=fe.useMemo(()=>xr?xr.includes("Center")?xr.slice(0,xr.indexOf("Center")):xr:pi==="rtl"?"bottomRight":"bottomLeft",[xr,pi]),na=ei("dropdown",$t),[ea,oa]=(0,Cn.Z)(na),[,Li]=(0,en.Z)(),Dt=fe.Children.only(Ht),Hn=(0,Yt.Tm)(Dt,{className:Ye()(`${na}-trigger`,{[`${na}-rtl`]:pi==="rtl"},Dt.props.className),disabled:jt}),Vn=jt?[]:Xt;let Gn;Vn&&Vn.includes("contextMenu")&&(Gn=!0);const[Lr,yr]=(0,Gt.Z)(!1,{value:Sn!=null?Sn:Wr}),Pr=(0,mt.useEvent)(un=>{dr==null||dr(un),gt==null||gt(un),yr(un)}),nr=Ye()(lr,Bt,oa,{[`${na}-rtl`]:pi==="rtl"}),ot=(0,Qe.Z)({arrowPointAtCenter:typeof et=="object"&&et.pointAtCenter,autoAdjustOverflow:Zn,offset:Li.marginXXS,arrowWidth:et?Li.sizePopupArrow:0,borderRadius:Li.borderRadius}),Ct=fe.useCallback(()=>{yr(!1)},[]),zt=()=>{let un;return Ie!=null&&Ie.items?un=fe.createElement(tn.default,Object.assign({},Ie)):typeof Kr=="function"?un=Kr():un=Kr,rn&&(un=rn(un)),un=fe.Children.only(typeof un=="string"?fe.createElement("span",null,un):un),fe.createElement(_t.J,{prefixCls:`${na}-menu`,expandIcon:fe.createElement("span",{className:`${na}-menu-submenu-arrow`},fe.createElement(Fe.Z,{className:`${na}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ct,validator:Je=>{let{mode:Mt}=Je}},un)};return ea(fe.createElement(Me,Object.assign({alignPoint:Gn},(0,hn.Z)(se,["rootClassName"]),{mouseEnterDelay:sn,mouseLeaveDelay:tr,visible:Lr,builtinPlacements:ot,arrow:!!et,overlayClassName:nr,prefixCls:na,getPopupContainer:qn||Zr,transitionName:kr,trigger:Vn,overlay:zt,placement:Ti,onVisibleChange:Pr}),Hn))};function ce(se){return Object.assign(Object.assign({},se),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,ut.Z)($e,"dropdown",se=>se,ce),me=se=>fe.createElement(le,Object.assign({},se),fe.createElement("span",null));$e._InternalPanelDoNotUseOrYouWillBeFired=me;var he=$e},66748:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return ft}});var fe=ae(14747),Fe=ae(67771),Be=ae(33297),Ye=ae(50438),ve=ae(97414),Ce=ae(67968),_e=ae(45503),ge=Re=>{const{componentCls:bt,menuCls:ht,colorError:st,colorTextLightSolid:tt}=Re,Le=`${ht}-item`;return{[`${bt}, ${bt}-menu-submenu`]:{[`${ht} ${Le}`]:{[`&${Le}-danger:not(${Le}-disabled)`]:{color:st,"&:hover":{color:tt,backgroundColor:st}}}}}};const Te=Re=>{const{componentCls:bt,menuCls:ht,zIndexPopup:st,dropdownArrowDistance:tt,sizePopupArrow:Le,antCls:xt,iconCls:on,motionDurationMid:it,dropdownPaddingVertical:yt,fontSize:Ee,dropdownEdgeChildPadding:de,colorTextDisabled:je,fontSizeIcon:ze,controlPaddingHorizontal:At,colorBgElevated:ct}=Re;return[{[bt]:Object.assign(Object.assign({},(0,fe.Wf)(Re)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:st,display:"block","&::before":{position:"absolute",insetBlock:-tt+Le/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${xt}-btn`]:{[`& > ${on}-down, & > ${xt}-btn-icon > ${on}-down`]:{fontSize:ze}},[`${bt}-wrap`]:{position:"relative",[`${xt}-btn > ${on}-down`]:{fontSize:ze},[`${on}-down::before`]:{transition:`transform ${it}`}},[`${bt}-wrap-open`]:{[`${on}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${xt}-slide-down-enter${xt}-slide-down-enter-active${bt}-placement-bottomLeft,
&${xt}-slide-down-appear${xt}-slide-down-appear-active${bt}-placement-bottomLeft,
&${xt}-slide-down-enter${xt}-slide-down-enter-active${bt}-placement-bottom,
&${xt}-slide-down-appear${xt}-slide-down-appear-active${bt}-placement-bottom,
&${xt}-slide-down-enter${xt}-slide-down-enter-active${bt}-placement-bottomRight,
&${xt}-slide-down-appear${xt}-slide-down-appear-active${bt}-placement-bottomRight`]:{animationName:Fe.fJ},[`&${xt}-slide-up-enter${xt}-slide-up-enter-active${bt}-placement-topLeft,
&${xt}-slide-up-appear${xt}-slide-up-appear-active${bt}-placement-topLeft,
&${xt}-slide-up-enter${xt}-slide-up-enter-active${bt}-placement-top,
&${xt}-slide-up-appear${xt}-slide-up-appear-active${bt}-placement-top,
&${xt}-slide-up-enter${xt}-slide-up-enter-active${bt}-placement-topRight,
&${xt}-slide-up-appear${xt}-slide-up-appear-active${bt}-placement-topRight`]:{animationName:Fe.Qt},[`&${xt}-slide-down-leave${xt}-slide-down-leave-active${bt}-placement-bottomLeft,
&${xt}-slide-down-leave${xt}-slide-down-leave-active${bt}-placement-bottom,
&${xt}-slide-down-leave${xt}-slide-down-leave-active${bt}-placement-bottomRight`]:{animationName:Fe.Uw},[`&${xt}-slide-up-leave${xt}-slide-up-leave-active${bt}-placement-topLeft,
&${xt}-slide-up-leave${xt}-slide-up-leave-active${bt}-placement-top,
&${xt}-slide-up-leave${xt}-slide-up-leave-active${bt}-placement-topRight`]:{animationName:Fe.ly}})},(0,ve.ZP)(Re,{colorBg:ct,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${bt} ${ht}`]:{position:"relative",margin:0},[`${ht}-submenu-popup`]:{position:"absolute",zIndex:st,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${bt}, ${bt}-menu-submenu`]:{[ht]:Object.assign(Object.assign({padding:de,listStyleType:"none",backgroundColor:ct,backgroundClip:"padding-box",borderRadius:Re.borderRadiusLG,outline:"none",boxShadow:Re.boxShadowSecondary},(0,fe.Qy)(Re)),{[`${ht}-item-group-title`]:{padding:`${yt}px ${At}px`,color:Re.colorTextDescription,transition:`all ${it}`},[`${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 ${it}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ht}-item, ${ht}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${yt}px ${At}px`,color:Re.colorText,fontWeight:"normal",fontSize:Ee,lineHeight:Re.lineHeight,cursor:"pointer",transition:`all ${it}`,borderRadius:Re.borderRadiusSM,"&:hover, &-active":{backgroundColor:Re.controlItemBgHover}},(0,fe.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},[`${bt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Re.paddingXS,[`${bt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Re.colorTextDescription,fontSize:ze,fontStyle:"normal"}}}),[`${ht}-item-group-list`]:{margin:`0 ${Re.marginXS}px`,padding:0,listStyle:"none"},[`${ht}-submenu-title`]:{paddingInlineEnd:At+Re.fontSizeSM},[`${ht}-submenu-vertical`]:{position:"relative"},[`${ht}-submenu${ht}-submenu-disabled ${bt}-menu-submenu-title`]:{[`&, ${bt}-menu-submenu-arrow-icon`]:{color:je,backgroundColor:ct,cursor:"not-allowed"}},[`${ht}-submenu-selected ${bt}-menu-submenu-title`]:{color:Re.colorPrimary}})}},[(0,Fe.oN)(Re,"slide-up"),(0,Fe.oN)(Re,"slide-down"),(0,Be.Fm)(Re,"move-up"),(0,Be.Fm)(Re,"move-down"),(0,Ye._y)(Re,"zoom-big")]]};var ft=(0,Ce.Z)("Dropdown",(Re,bt)=>{let{rootPrefixCls:ht}=bt;const{marginXXS:st,sizePopupArrow:tt,controlHeight:Le,fontSize:xt,lineHeight:on,paddingXXS:it,componentCls:yt,borderRadiusLG:Ee}=Re,de=(Le-xt*on)/2,{dropdownArrowOffset:je}=(0,ve.fS)({contentRadius:Ee}),ze=(0,_e.TS)(Re,{menuCls:`${yt}-menu`,rootPrefixCls:ht,dropdownArrowDistance:tt/2+st,dropdownArrowOffset:je,dropdownPaddingVertical:de,dropdownEdgeChildPadding:it});return[Te(ze),ge(ze)]},Re=>({zIndexPopup:Re.zIndexPopupBase+50}))},32983:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return it}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(67294),Ye=ae(53124),ve=ae(10110),Ce=ae(84780),_e=ae(29691),ge=()=>{const[,yt]=(0,_e.Z)(),de=new Ce.C(yt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:de,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{fill:"none",fillRule:"evenodd"},Be.createElement("g",{transform:"translate(24 31.67)"},Be.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Be.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"}),Be.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)"}),Be.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"}),Be.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"})),Be.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"}),Be.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Be.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Be.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ft=()=>{const[,yt]=(0,_e.Z)(),{colorFill:Ee,colorFillTertiary:de,colorFillQuaternary:je,colorBgContainer:ze}=yt,{borderColor:At,shadowColor:ct,contentColor:lt}=(0,Be.useMemo)(()=>({borderColor:new Ce.C(Ee).onBackground(ze).toHexShortString(),shadowColor:new Ce.C(de).onBackground(ze).toHexShortString(),contentColor:new Ce.C(je).onBackground(ze).toHexShortString()}),[Ee,de,je,ze]);return Be.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Be.createElement("ellipse",{fill:ct,cx:"32",cy:"33",rx:"32",ry:"7"}),Be.createElement("g",{fillRule:"nonzero",stroke:At},Be.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"}),Be.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:lt}))))},Re=ae(67968),bt=ae(45503);const ht=yt=>{const{componentCls:Ee,margin:de,marginXS:je,marginXL:ze,fontSize:At,lineHeight:ct}=yt;return{[Ee]:{marginInline:je,fontSize:At,lineHeight:ct,textAlign:"center",[`${Ee}-image`]:{height:yt.emptyImgHeight,marginBottom:je,opacity:yt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ee}-description`]:{color:yt.colorText},[`${Ee}-footer`]:{marginTop:de},"&-normal":{marginBlock:ze,color:yt.colorTextDisabled,[`${Ee}-description`]:{color:yt.colorTextDisabled},[`${Ee}-image`]:{height:yt.emptyImgHeightMD}},"&-small":{marginBlock:je,color:yt.colorTextDisabled,[`${Ee}-image`]:{height:yt.emptyImgHeightSM}}}}};var st=(0,Re.Z)("Empty",yt=>{const{componentCls:Ee,controlHeightLG:de}=yt,je=(0,bt.TS)(yt,{emptyImgCls:`${Ee}-img`,emptyImgHeight:de*2.5,emptyImgHeightMD:de,emptyImgHeightSM:de*.875});return[ht(je)]}),tt=function(yt,Ee){var de={};for(var je in yt)Object.prototype.hasOwnProperty.call(yt,je)&&Ee.indexOf(je)<0&&(de[je]=yt[je]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,je=Object.getOwnPropertySymbols(yt);ze<je.length;ze++)Ee.indexOf(je[ze])<0&&Object.prototype.propertyIsEnumerable.call(yt,je[ze])&&(de[je[ze]]=yt[je[ze]]);return de};const Le=Be.createElement(ge,null),xt=Be.createElement(ft,null),on=yt=>{var{className:Ee,rootClassName:de,prefixCls:je,image:ze=Le,description:At,children:ct,imageStyle:lt,style:Ze}=yt,kt=tt(yt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:pt,direction:nn,empty:rt}=Be.useContext(Ye.E_),qt=pt("empty",je),[pn,cn]=st(qt),[Xe]=(0,ve.Z)("Empty"),Me=typeof At!="undefined"?At:Xe==null?void 0:Xe.description,mt=typeof Me=="string"?Me:"empty";let Gt=null;return typeof ze=="string"?Gt=Be.createElement("img",{alt:mt,src:ze}):Gt=ze,pn(Be.createElement("div",Object.assign({className:Fe()(cn,qt,rt==null?void 0:rt.className,{[`${qt}-normal`]:ze===xt,[`${qt}-rtl`]:nn==="rtl"},Ee,de),style:Object.assign(Object.assign({},rt==null?void 0:rt.style),Ze)},kt),Be.createElement("div",{className:`${qt}-image`,style:lt},Gt),Me&&Be.createElement("div",{className:`${qt}-description`},Me),ct&&Be.createElement("div",{className:`${qt}-footer`},ct)))};on.PRESENTED_IMAGE_DEFAULT=Le,on.PRESENTED_IMAGE_SIMPLE=xt;var it=on},22150:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return un}});var fe=ae(74902),Fe=ae(94184),Be=ae.n(Fe),Ye=ae(38379),ve=ae(67294),Ce=ae(33603),_e=ae(65223);function we(Je){const[Mt,ln]=ve.useState(Je);return ve.useEffect(()=>{const Jt=setTimeout(()=>{ln(Je)},Je.length?0:10);return()=>{clearTimeout(Jt)}},[Je]),Mt}var ge=ae(14747),Te=ae(50438),ft=ae(33507),Re=ae(45503),bt=ae(67968),st=Je=>{const{componentCls:Mt}=Je,ln=`${Mt}-show-help`,Jt=`${Mt}-show-help-item`;return{[ln]:{transition:`opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Jt]:{overflow:"hidden",transition:`height ${Je.motionDurationSlow} ${Je.motionEaseInOut},
opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut},
transform ${Je.motionDurationSlow} ${Je.motionEaseInOut} !important`,[`&${Jt}-appear, &${Jt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Jt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const tt=Je=>({legend:{display:"block",width:"100%",marginBottom:Je.marginLG,padding:0,color:Je.colorTextDescription,fontSize:Je.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Je.lineWidth}px ${Je.lineType} ${Je.colorBorder}`},label:{fontSize:Je.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 ${Je.controlOutlineWidth}px ${Je.controlOutline}`},output:{display:"block",paddingTop:15,color:Je.colorText,fontSize:Je.fontSize,lineHeight:Je.lineHeight}}),Le=(Je,Mt)=>{const{formItemCls:ln}=Je;return{[ln]:{[`${ln}-label > label`]:{height:Mt},[`${ln}-control-input`]:{minHeight:Mt}}}},xt=Je=>{const{componentCls:Mt}=Je;return{[Je.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ge.Wf)(Je)),tt(Je)),{[`${Mt}-text`]:{display:"inline-block",paddingInlineEnd:Je.paddingSM},"&-small":Object.assign({},Le(Je,Je.controlHeightSM)),"&-large":Object.assign({},Le(Je,Je.controlHeightLG))})}},on=Je=>{const{formItemCls:Mt,iconCls:ln,componentCls:Jt,rootPrefixCls:vn,labelRequiredMarkColor:bn,labelColor:Fn,labelFontSize:Nr,labelHeight:Sr,labelColonMarginInlineStart:vr,labelColonMarginInlineEnd:Ir,itemMarginBottom:_r}=Je;return{[Mt]:Object.assign(Object.assign({},(0,ge.Wf)(Je)),{marginBottom:_r,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${vn}-row`]:{display:"none"},"&-has-warning":{[`${Mt}-split`]:{color:Je.colorError}},"&-has-error":{[`${Mt}-split`]:{color:Je.colorWarning}},[`${Mt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Je.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Sr,color:Fn,fontSize:Nr,[`> ${ln}`]:{fontSize:Je.fontSize,verticalAlign:"top"},[`&${Mt}-required:not(${Mt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Je.marginXXS,color:bn,fontSize:Je.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Jt}-hide-required-mark &`]:{display:"none"}},[`${Mt}-optional`]:{display:"inline-block",marginInlineStart:Je.marginXXS,color:Je.colorTextDescription,[`${Jt}-hide-required-mark &`]:{display:"none"}},[`${Mt}-tooltip`]:{color:Je.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Je.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:vr,marginInlineEnd:Ir},[`&${Mt}-no-colon::after`]:{content:'"\\a0"'}}},[`${Mt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${vn}-col-'"]):not([class*="' ${vn}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Je.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Mt]:{"&-explain, &-extra":{clear:"both",color:Je.colorTextDescription,fontSize:Je.fontSize,lineHeight:Je.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Je.controlHeightSM,transition:`color ${Je.motionDurationMid} ${Je.motionEaseOut}`},"&-explain":{"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning}}},[`&-with-help ${Mt}-explain`]:{height:"auto",opacity:1},[`${Mt}-feedback-icon`]:{fontSize:Je.fontSize,textAlign:"center",visibility:"visible",animationName:Te.kr,animationDuration:Je.motionDurationMid,animationTimingFunction:Je.motionEaseOutBack,pointerEvents:"none","&-success":{color:Je.colorSuccess},"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning},"&-validating":{color:Je.colorPrimary}}})}},it=Je=>{const{componentCls:Mt,formItemCls:ln}=Je;return{[`${Mt}-horizontal`]:{[`${ln}-label`]:{flexGrow:0},[`${ln}-control`]:{flex:"1 1 0",minWidth:0},[`${ln}-label[class$='-24'], ${ln}-label[class*='-24 ']`]:{[`& + ${ln}-control`]:{minWidth:"unset"}}}}},yt=Je=>{const{componentCls:Mt,formItemCls:ln}=Je;return{[`${Mt}-inline`]:{display:"flex",flexWrap:"wrap",[ln]:{flex:"none",marginInlineEnd:Je.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${ln}-label,
> ${ln}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ln}-label`]:{flex:"none"},[`${Mt}-text`]:{display:"inline-block"},[`${ln}-has-feedback`]:{display:"inline-block"}}}}},Ee=Je=>({padding:Je.verticalLabelPadding,margin:Je.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),de=Je=>{const{componentCls:Mt,formItemCls:ln,rootPrefixCls:Jt}=Je;return{[`${ln} ${ln}-label`]:Ee(Je),[Mt]:{[ln]:{flexWrap:"wrap",[`${ln}-label, ${ln}-control`]:{[`&:not([class*=" ${Jt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},je=Je=>{const{componentCls:Mt,formItemCls:ln,rootPrefixCls:Jt}=Je;return{[`${Mt}-vertical`]:{[ln]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Mt}-item-control`]:{width:"100%"}}},[`${Mt}-vertical ${ln}-label,
.${Jt}-col-24${ln}-label,
.${Jt}-col-xl-24${ln}-label`]:Ee(Je),[`@media (max-width: ${Je.screenXSMax}px)`]:[de(Je),{[Mt]:{[`.${Jt}-col-xs-24${ln}-label`]:Ee(Je)}}],[`@media (max-width: ${Je.screenSMMax}px)`]:{[Mt]:{[`.${Jt}-col-sm-24${ln}-label`]:Ee(Je)}},[`@media (max-width: ${Je.screenMDMax}px)`]:{[Mt]:{[`.${Jt}-col-md-24${ln}-label`]:Ee(Je)}},[`@media (max-width: ${Je.screenLGMax}px)`]:{[Mt]:{[`.${Jt}-col-lg-24${ln}-label`]:Ee(Je)}}}},ze=(Je,Mt)=>(0,Re.TS)(Je,{formItemCls:`${Je.componentCls}-item`,rootPrefixCls:Mt});var At=(0,bt.Z)("Form",(Je,Mt)=>{let{rootPrefixCls:ln}=Mt;const Jt=ze(Je,ln);return[xt(Jt),on(Jt),st(Jt),it(Jt),yt(Jt),je(Jt),(0,ft.Z)(Jt),Te.kr]},Je=>({labelRequiredMarkColor:Je.colorError,labelColor:Je.colorTextHeading,labelFontSize:Je.fontSize,labelHeight:Je.controlHeight,labelColonMarginInlineStart:Je.marginXXS/2,labelColonMarginInlineEnd:Je.marginXS,itemMarginBottom:Je.marginLG,verticalLabelPadding:`0 0 ${Je.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const ct=[];function lt(Je,Mt,ln){let Jt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Je=="string"?Je:`${Mt}-${Jt}`,error:Je,errorStatus:ln}}var kt=Je=>{let{help:Mt,helpStatus:ln,errors:Jt=ct,warnings:vn=ct,className:bn,fieldId:Fn,onVisibleChanged:Nr}=Je;const{prefixCls:Sr}=ve.useContext(_e.Rk),vr=`${Sr}-item-explain`,[,Ir]=At(Sr),_r=(0,ve.useMemo)(()=>(0,Ce.Z)(Sr),[Sr]),Lt=we(Jt),wt=we(vn),Ot=ve.useMemo(()=>Mt!=null?[lt(Mt,"help",ln)]:[].concat((0,fe.Z)(Lt.map((er,An)=>lt(er,"error","error",An))),(0,fe.Z)(wt.map((er,An)=>lt(er,"warning","warning",An)))),[Mt,ln,Lt,wt]),Dn={};return Fn&&(Dn.id=`${Fn}_help`),ve.createElement(Ye.default,{motionDeadline:_r.motionDeadline,motionName:`${Sr}-show-help`,visible:!!Ot.length,onVisibleChanged:Nr},er=>{const{className:An,style:Rn}=er;return ve.createElement("div",Object.assign({},Dn,{className:Be()(vr,An,bn,Ir),style:Rn,role:"alert"}),ve.createElement(Ye.CSSMotionList,Object.assign({keys:Ot},(0,Ce.Z)(Sr),{motionName:`${Sr}-show-help-item`,component:!1}),Nn=>{const{key:rr,error:Dr,errorStatus:yn,className:Si,style:di}=Nn;return ve.createElement("div",{key:rr,className:Be()(Si,{[`${vr}-${yn}`]:yn}),style:di},Dr)}))})},pt=ae(46660),nn=ae(53124),rt=ae(98866),qt=ae(97647),pn=ae(98675),cn=ae(17423);const Xe=["parentNode"],Me="form_item";function mt(Je){return Je===void 0||Je===!1?[]:Array.isArray(Je)?Je:[Je]}function Gt(Je,Mt){if(!Je.length)return;const ln=Je.join("_");return Mt?`${Mt}_${ln}`:Xe.includes(ln)?`${Me}_${ln}`:ln}function hn(Je,Mt,ln,Jt,vn,bn){let Fn=Jt;return bn!==void 0?Fn=bn:ln.validating?Fn="validating":Je.length?Fn="error":Mt.length?Fn="warning":(ln.touched||vn&&ln.validated)&&(Fn="success"),Fn}function Qe(Je){return mt(Je).join("_")}function ut(Je){const[Mt]=(0,pt.useForm)(),ln=ve.useRef({}),Jt=ve.useMemo(()=>Je!=null?Je:Object.assign(Object.assign({},Mt),{__INTERNAL__:{itemRef:vn=>bn=>{const Fn=Qe(vn);bn?ln.current[Fn]=bn:delete ln.current[Fn]}},scrollToField:function(vn){let bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Fn=mt(vn),Nr=Gt(Fn,Jt.__INTERNAL__.name),Sr=Nr?document.getElementById(Nr):null;Sr&&(0,cn.Z)(Sr,Object.assign({scrollMode:"if-needed",block:"nearest"},bn))},getFieldInstance:vn=>{const bn=Qe(vn);return ln.current[bn]}}),[Je,Mt]);return[Jt]}var Yt=ae(37920),Qt=function(Je,Mt){var ln={};for(var Jt in Je)Object.prototype.hasOwnProperty.call(Je,Jt)&&Mt.indexOf(Jt)<0&&(ln[Jt]=Je[Jt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Jt=Object.getOwnPropertySymbols(Je);vn<Jt.length;vn++)Mt.indexOf(Jt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Je,Jt[vn])&&(ln[Jt[vn]]=Je[Jt[vn]]);return ln};const tn=(Je,Mt)=>{const ln=ve.useContext(rt.Z),{getPrefixCls:Jt,direction:vn,form:bn}=ve.useContext(nn.E_),{prefixCls:Fn,className:Nr,rootClassName:Sr,size:vr,disabled:Ir=ln,form:_r,colon:Lt,labelAlign:wt,labelWrap:Ot,labelCol:Dn,wrapperCol:er,hideRequiredMark:An,layout:Rn="horizontal",scrollToFirstError:Nn,requiredMark:rr,onFinishFailed:Dr,name:yn,style:Si,feedbackIcons:di}=Je,ha=Qt(Je,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),ta=(0,pn.Z)(vr),Wi=ve.useContext(Yt.Z),Ta=(0,ve.useMemo)(()=>rr!==void 0?rr:bn&&bn.requiredMark!==void 0?bn.requiredMark:!An,[An,rr,bn]),Gi=Lt!=null?Lt:bn==null?void 0:bn.colon,$i=Jt("form",Fn),[ra,Ma]=At($i),vi=Be()($i,`${$i}-${Rn}`,{[`${$i}-hide-required-mark`]:Ta===!1,[`${$i}-rtl`]:vn==="rtl",[`${$i}-${ta}`]:ta},Ma,bn==null?void 0:bn.className,Nr,Sr),[Zi]=ut(_r),{__INTERNAL__:xa}=Zi;xa.name=yn;const Ya=(0,ve.useMemo)(()=>({name:yn,labelAlign:wt,labelCol:Dn,labelWrap:Ot,wrapperCol:er,vertical:Rn==="vertical",colon:Gi,requiredMark:Ta,itemRef:xa.itemRef,form:Zi,feedbackIcons:di}),[yn,wt,Dn,er,Rn,Gi,Ta,Zi,di]);ve.useImperativeHandle(Mt,()=>Zi);const Ba=(Rt,Tt)=>{if(Rt){let mn={block:"nearest"};typeof Rt=="object"&&(mn=Rt),Zi.scrollToField(Tt,mn)}},ki=Rt=>{if(Dr==null||Dr(Rt),Rt.errorFields.length){const Tt=Rt.errorFields[0].name;if(Nn!==void 0){Ba(Nn,Tt);return}bn&&bn.scrollToFirstError!==void 0&&Ba(bn.scrollToFirstError,Tt)}};return ra(ve.createElement(rt.n,{disabled:Ir},ve.createElement(qt.q,{size:ta},ve.createElement(_e.RV,Object.assign({},{validateMessages:Wi}),ve.createElement(_e.q3.Provider,{value:Ya},ve.createElement(pt.default,Object.assign({id:yn},ha,{name:yn,onFinishFailed:ki,form:Zi,style:Object.assign(Object.assign({},bn==null?void 0:bn.style),Si),className:vi})))))))};var en=ve.forwardRef(tn),Cn=ae(9475),On=ae(17799),$e=ae(96159),ce=ae(37419);function le(Je){if(typeof Je=="function")return Je;const Mt=(0,ce.Z)(Je);return Mt.length<=1?Mt[0]:Mt}const me=()=>{const{status:Je,errors:Mt=[],warnings:ln=[]}=(0,ve.useContext)(_e.aM);return{status:Je,errors:Mt,warnings:ln}};me.Context=_e.aM;var he=me,se=ae(96523);function Ie(Je){const[Mt,ln]=ve.useState(Je),Jt=(0,ve.useRef)(null),vn=(0,ve.useRef)([]),bn=(0,ve.useRef)(!1);ve.useEffect(()=>(bn.current=!1,()=>{bn.current=!0,se.Z.cancel(Jt.current),Jt.current=null}),[]);function Fn(Nr){bn.current||(Jt.current===null&&(vn.current=[],Jt.current=(0,se.Z)(()=>{Jt.current=null,ln(Sr=>{let vr=Sr;return vn.current.forEach(Ir=>{vr=Ir(vr)}),vr})})),vn.current.push(Nr))}return[Mt,Fn]}function et(){const{itemRef:Je}=ve.useContext(_e.q3),Mt=ve.useRef({});function ln(Jt,vn){const bn=vn&&typeof vn=="object"&&vn.ref,Fn=Jt.join("_");return(Mt.current.name!==Fn||Mt.current.originRef!==bn)&&(Mt.current.name=Fn,Mt.current.originRef=bn,Mt.current.ref=(0,On.sQ)(Je(Jt),bn)),Mt.current.ref}return ln}var $t=ae(48130),Ht=ae(14075),Xt=ae(10366),jt=ae(92820),rn=ae(21584);const qn=Je=>{const{formItemCls:Mt}=Je;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Mt}-control`]:{display:"flex"}}}};var lr=(0,bt.b)(["Form","item-item"],(Je,Mt)=>{let{rootPrefixCls:ln}=Mt;const Jt=ze(Je,ln);return[qn(Jt)]}),Sn=Je=>{const{prefixCls:Mt,status:ln,wrapperCol:Jt,children:vn,errors:bn,warnings:Fn,_internalItemRender:Nr,extra:Sr,help:vr,fieldId:Ir,marginBottom:_r,onErrorVisibleChanged:Lt}=Je,wt=`${Mt}-item`,Ot=ve.useContext(_e.q3),Dn=Jt||Ot.wrapperCol||{},er=Be()(`${wt}-control`,Dn.className),An=ve.useMemo(()=>Object.assign({},Ot),[Ot]);delete An.labelCol,delete An.wrapperCol;const Rn=ve.createElement("div",{className:`${wt}-control-input`},ve.createElement("div",{className:`${wt}-control-input-content`},vn)),Nn=ve.useMemo(()=>({prefixCls:Mt,status:ln}),[Mt,ln]),rr=_r!==null||bn.length||Fn.length?ve.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ve.createElement(_e.Rk.Provider,{value:Nn},ve.createElement(kt,{fieldId:Ir,errors:bn,warnings:Fn,help:vr,helpStatus:ln,className:`${wt}-explain-connected`,onVisibleChanged:Lt})),!!_r&&ve.createElement("div",{style:{width:0,height:_r}})):null,Dr={};Ir&&(Dr.id=`${Ir}_extra`);const yn=Sr?ve.createElement("div",Object.assign({},Dr,{className:`${wt}-extra`}),Sr):null,Si=Nr&&Nr.mark==="pro_table_render"&&Nr.render?Nr.render(Je,{input:Rn,errorList:rr,extra:yn}):ve.createElement(ve.Fragment,null,Rn,rr,yn);return ve.createElement(_e.q3.Provider,{value:An},ve.createElement(rn.Z,Object.assign({},Dn,{className:er}),Si),ve.createElement(lr,{prefixCls:Mt}))},dr=ae(17663),Wr=ae(24457),gt=ae(10110),sn=ae(83062),tr=function(Je,Mt){var ln={};for(var Jt in Je)Object.prototype.hasOwnProperty.call(Je,Jt)&&Mt.indexOf(Jt)<0&&(ln[Jt]=Je[Jt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Jt=Object.getOwnPropertySymbols(Je);vn<Jt.length;vn++)Mt.indexOf(Jt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Je,Jt[vn])&&(ln[Jt[vn]]=Je[Jt[vn]]);return ln};function Zn(Je){return Je?typeof Je=="object"&&!ve.isValidElement(Je)?Je:{title:Je}:null}var Kr=Je=>{let{prefixCls:Mt,label:ln,htmlFor:Jt,labelCol:vn,labelAlign:bn,colon:Fn,required:Nr,requiredMark:Sr,tooltip:vr}=Je;var Ir;const[_r]=(0,gt.Z)("Form"),{vertical:Lt,labelAlign:wt,labelCol:Ot,labelWrap:Dn,colon:er}=ve.useContext(_e.q3);if(!ln)return null;const An=vn||Ot||{},Rn=bn||wt,Nn=`${Mt}-item-label`,rr=Be()(Nn,Rn==="left"&&`${Nn}-left`,An.className,{[`${Nn}-wrap`]:!!Dn});let Dr=ln;const yn=Fn===!0||er!==!1&&Fn!==!1;yn&&!Lt&&typeof ln=="string"&&ln.trim()!==""&&(Dr=ln.replace(/[:|]\s*$/,""));const di=Zn(vr);if(di){const{icon:Ta=ve.createElement(dr.Z,null)}=di,Gi=tr(di,["icon"]),$i=ve.createElement(sn.Z,Object.assign({},Gi),ve.cloneElement(Ta,{className:`${Mt}-item-tooltip`,title:""}));Dr=ve.createElement(ve.Fragment,null,Dr,$i)}const ha=Sr==="optional",ta=typeof Sr=="function";ta?Dr=Sr(Dr,{required:!!Nr}):ha&&!Nr&&(Dr=ve.createElement(ve.Fragment,null,Dr,ve.createElement("span",{className:`${Mt}-item-optional`,title:""},(_r==null?void 0:_r.optional)||((Ir=Wr.Z.Form)===null||Ir===void 0?void 0:Ir.optional))));const Wi=Be()({[`${Mt}-item-required`]:Nr,[`${Mt}-item-required-mark-optional`]:ha||ta,[`${Mt}-item-no-colon`]:!yn});return ve.createElement(rn.Z,Object.assign({},An,{className:rr}),ve.createElement("label",{htmlFor:Jt,className:Wi,title:typeof ln=="string"?ln:""},Dr))},Jr=ae(87725),Zr=ae(16646),ei=ae(87995),pi=ae(3407);const kr={success:Jr.Z,warning:ei.Z,error:Zr.Z,validating:pi.Z};function Ti(Je){let{children:Mt,errors:ln,warnings:Jt,hasFeedback:vn,validateStatus:bn,prefixCls:Fn,meta:Nr,noStyle:Sr}=Je;const vr=`${Fn}-item`,{feedbackIcons:Ir}=ve.useContext(_e.q3),_r=hn(ln,Jt,Nr,null,!!vn,bn),{isFormItemInput:Lt,status:wt}=ve.useContext(_e.aM),Ot=ve.useMemo(()=>{var Dn;let er;if(vn){const Nn=vn!==!0&&vn.icons||Ir,rr=_r&&((Dn=Nn==null?void 0:Nn({status:_r,errors:ln,warnings:Jt}))===null||Dn===void 0?void 0:Dn[_r]),Dr=_r&&kr[_r];er=rr!==!1&&Dr?ve.createElement("span",{className:Be()(`${vr}-feedback-icon`,`${vr}-feedback-icon-${_r}`)},rr||ve.createElement(Dr,null)):null}let An=!0,Rn=_r||"";return Sr&&(An=Lt,Rn=(_r!=null?_r:wt)||""),{status:Rn,errors:ln,warnings:Jt,hasFeedback:!!vn,feedbackIcon:er,isFormItemInput:An}},[_r,vn,Sr,Lt,wt]);return ve.createElement(_e.aM.Provider,{value:Ot},Mt)}var na=function(Je,Mt){var ln={};for(var Jt in Je)Object.prototype.hasOwnProperty.call(Je,Jt)&&Mt.indexOf(Jt)<0&&(ln[Jt]=Je[Jt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Jt=Object.getOwnPropertySymbols(Je);vn<Jt.length;vn++)Mt.indexOf(Jt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Je,Jt[vn])&&(ln[Jt[vn]]=Je[Jt[vn]]);return ln};function ea(Je){const{prefixCls:Mt,className:ln,rootClassName:Jt,style:vn,help:bn,errors:Fn,warnings:Nr,validateStatus:Sr,meta:vr,hasFeedback:Ir,hidden:_r,children:Lt,fieldId:wt,required:Ot,isRequired:Dn,onSubItemMetaChange:er}=Je,An=na(Je,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Rn=`${Mt}-item`,{requiredMark:Nn}=ve.useContext(_e.q3),rr=ve.useRef(null),Dr=we(Fn),yn=we(Nr),Si=bn!=null,di=!!(Si||Fn.length||Nr.length),ha=!!rr.current&&(0,$t.Z)(rr.current),[ta,Wi]=ve.useState(null);(0,Ht.Z)(()=>{if(di&&rr.current){const Ma=getComputedStyle(rr.current);Wi(parseInt(Ma.marginBottom,10))}},[di,ha]);const Ta=Ma=>{Ma||Wi(null)},$i=function(){let Ma=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const vi=Ma?Dr:vr.errors,Zi=Ma?yn:vr.warnings;return hn(vi,Zi,vr,"",!!Ir,Sr)}(),ra=Be()(Rn,ln,Jt,{[`${Rn}-with-help`]:Si||Dr.length||yn.length,[`${Rn}-has-feedback`]:$i&&Ir,[`${Rn}-has-success`]:$i==="success",[`${Rn}-has-warning`]:$i==="warning",[`${Rn}-has-error`]:$i==="error",[`${Rn}-is-validating`]:$i==="validating",[`${Rn}-hidden`]:_r});return ve.createElement("div",{className:ra,style:vn,ref:rr},ve.createElement(jt.Z,Object.assign({className:`${Rn}-row`},(0,Xt.Z)(An,["_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(Kr,Object.assign({htmlFor:wt},Je,{requiredMark:Nn,required:Ot!=null?Ot:Dn,prefixCls:Mt})),ve.createElement(Sn,Object.assign({},Je,vr,{errors:Dr,warnings:yn,prefixCls:Mt,status:$i,help:bn,marginBottom:ta,onErrorVisibleChanged:Ta}),ve.createElement(_e.qI.Provider,{value:er},ve.createElement(Ti,{prefixCls:Mt,meta:vr,errors:vr.errors,warnings:vr.warnings,hasFeedback:Ir,validateStatus:$i},Lt)))),!!ta&&ve.createElement("div",{className:`${Rn}-margin-offset`,style:{marginBottom:-ta}}))}const oa="__SPLIT__",Li=null,Dt=ve.memo(Je=>{let{children:Mt}=Je;return Mt},(Je,Mt)=>Je.value===Mt.value&&Je.update===Mt.update&&Je.childProps.length===Mt.childProps.length&&Je.childProps.every((ln,Jt)=>ln===Mt.childProps[Jt]));function Hn(Je){return Je!=null}function Vn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Gn(Je){const{name:Mt,noStyle:ln,className:Jt,dependencies:vn,prefixCls:bn,shouldUpdate:Fn,rules:Nr,children:Sr,required:vr,label:Ir,messageVariables:_r,trigger:Lt="onChange",validateTrigger:wt,hidden:Ot,help:Dn}=Je,{getPrefixCls:er}=ve.useContext(nn.E_),{name:An}=ve.useContext(_e.q3),Rn=le(Sr),Nn=typeof Rn=="function",rr=ve.useContext(_e.qI),{validateTrigger:Dr}=ve.useContext(pt.FieldContext),yn=wt!==void 0?wt:Dr,Si=Hn(Mt),di=er("form",bn),[ha,ta]=At(di),Wi=ve.useContext(pt.ListContext),Ta=ve.useRef(),[Gi,$i]=Ie({}),[ra,Ma]=(0,Cn.Z)(()=>Vn()),vi=Tt=>{const mn=Wi==null?void 0:Wi.getKey(Tt.name);if(Ma(Tt.destroy?Vn():Tt,!0),ln&&Dn!==!1&&rr){let $n=Tt.name;if(Tt.destroy)$n=Ta.current||$n;else if(mn!==void 0){const[Qn,Or]=mn;$n=[Qn].concat((0,fe.Z)(Or)),Ta.current=$n}rr(Tt,$n)}},Zi=(Tt,mn)=>{$i($n=>{const Qn=Object.assign({},$n),Gr=[].concat((0,fe.Z)(Tt.name.slice(0,-1)),(0,fe.Z)(mn)).join(oa);return Tt.destroy?delete Qn[Gr]:Qn[Gr]=Tt,Qn})},[xa,Ya]=ve.useMemo(()=>{const Tt=(0,fe.Z)(ra.errors),mn=(0,fe.Z)(ra.warnings);return Object.values(Gi).forEach($n=>{Tt.push.apply(Tt,(0,fe.Z)($n.errors||[])),mn.push.apply(mn,(0,fe.Z)($n.warnings||[]))}),[Tt,mn]},[Gi,ra.errors,ra.warnings]),Ba=et();function ki(Tt,mn,$n){return ln&&!Ot?ve.createElement(Ti,{prefixCls:di,hasFeedback:Je.hasFeedback,validateStatus:Je.validateStatus,meta:ra,errors:xa,warnings:Ya,noStyle:!0},Tt):ve.createElement(ea,Object.assign({key:"row"},Je,{className:Be()(Jt,ta),prefixCls:di,fieldId:mn,isRequired:$n,errors:xa,warnings:Ya,meta:ra,onSubItemMetaChange:Zi}),Tt)}if(!Si&&!Nn&&!vn)return ha(ki(Rn));let Rt={};return typeof Ir=="string"?Rt.label=Ir:Mt&&(Rt.label=String(Mt)),_r&&(Rt=Object.assign(Object.assign({},Rt),_r)),ha(ve.createElement(pt.Field,Object.assign({},Je,{messageVariables:Rt,trigger:Lt,validateTrigger:yn,onMetaChange:vi}),(Tt,mn,$n)=>{const Qn=mt(Mt).length&&mn?mn.name:[],Or=Gt(Qn,An),Gr=vr!==void 0?vr:!!(Nr&&Nr.some(li=>{if(li&&typeof li=="object"&&li.required&&!li.warningOnly)return!0;if(typeof li=="function"){const Mi=li($n);return Mi&&Mi.required&&!Mi.warningOnly}return!1})),ci=Object.assign({},Tt);let gi=null;if(Array.isArray(Rn)&&Si)gi=Rn;else if(!(Nn&&(!(Fn||vn)||Si))){if(!(vn&&!Nn&&!Si))if((0,$e.l$)(Rn)){const li=Object.assign(Object.assign({},Rn.props),ci);if(li.id||(li.id=Or),Dn||xa.length>0||Ya.length>0||Je.extra){const Yr=[];(Dn||xa.length>0)&&Yr.push(`${Or}_help`),Je.extra&&Yr.push(`${Or}_extra`),li["aria-describedby"]=Yr.join(" ")}xa.length>0&&(li["aria-invalid"]="true"),Gr&&(li["aria-required"]="true"),(0,On.Yr)(Rn)&&(li.ref=Ba(Qn,Rn)),new Set([].concat((0,fe.Z)(mt(Lt)),(0,fe.Z)(mt(yn)))).forEach(Yr=>{li[Yr]=function(){for(var Fi,sa,Yi,Oe,Ve,Ue=arguments.length,qe=new Array(Ue),vt=0;vt<Ue;vt++)qe[vt]=arguments[vt];(Yi=ci[Yr])===null||Yi===void 0||(Fi=Yi).call.apply(Fi,[ci].concat(qe)),(Ve=(Oe=Rn.props)[Yr])===null||Ve===void 0||(sa=Ve).call.apply(sa,[Oe].concat(qe))}});const Vi=[li["aria-required"],li["aria-invalid"],li["aria-describedby"]];gi=ve.createElement(Dt,{value:ci[Je.valuePropName||"value"],update:Rn,childProps:Vi},(0,$e.Tm)(Rn,li))}else Nn&&(Fn||vn)&&!Si?gi=Rn($n):gi=Rn}return ki(gi,Or,Gr)}))}const Lr=Gn;Lr.useStatus=he;var yr=Lr,Pr=function(Je,Mt){var ln={};for(var Jt in Je)Object.prototype.hasOwnProperty.call(Je,Jt)&&Mt.indexOf(Jt)<0&&(ln[Jt]=Je[Jt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,Jt=Object.getOwnPropertySymbols(Je);vn<Jt.length;vn++)Mt.indexOf(Jt[vn])<0&&Object.prototype.propertyIsEnumerable.call(Je,Jt[vn])&&(ln[Jt[vn]]=Je[Jt[vn]]);return ln},ot=Je=>{var{prefixCls:Mt,children:ln}=Je,Jt=Pr(Je,["prefixCls","children"]);const{getPrefixCls:vn}=ve.useContext(nn.E_),bn=vn("form",Mt),Fn=ve.useMemo(()=>({prefixCls:bn,status:"error"}),[bn]);return ve.createElement(pt.List,Object.assign({},Jt),(Nr,Sr,vr)=>ve.createElement(_e.Rk.Provider,{value:Fn},ln(Nr.map(Ir=>Object.assign(Object.assign({},Ir),{fieldKey:Ir.key})),Sr,{errors:vr.errors,warnings:vr.warnings})))};function Ct(){const{form:Je}=(0,ve.useContext)(_e.q3);return Je}const zt=en;zt.Item=yr,zt.List=ot,zt.ErrorList=kt,zt.useForm=ut,zt.useFormInstance=Ct,zt.useWatch=pt.useWatch,zt.Provider=_e.RV,zt.create=()=>{};var un=zt},31795:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return nr}});var fe=ae(42922),Fe=ae(53978),Be=ae(94184),Ye=ae.n(Be),ve=ae(87462),Ce=ae(4942),_e=ae(71002),we=ae(97685),ge=ae(45987),Te=ae(15671),ft=ae(43144);function Re(){return typeof BigInt=="function"}function bt(ot){return!ot&&ot!==0&&!Number.isNaN(ot)||!String(ot).trim()}function ht(ot){var Ct=ot.trim(),zt=Ct.startsWith("-");zt&&(Ct=Ct.slice(1)),Ct=Ct.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Ct.startsWith(".")&&(Ct="0".concat(Ct));var un=Ct||"0",Je=un.split("."),Mt=Je[0]||"0",ln=Je[1]||"0";Mt==="0"&&ln==="0"&&(zt=!1);var Jt=zt?"-":"";return{negative:zt,negativeStr:Jt,trimStr:un,integerStr:Mt,decimalStr:ln,fullStr:"".concat(Jt).concat(un)}}function st(ot){var Ct=String(ot);return!Number.isNaN(Number(Ct))&&Ct.includes("e")}function tt(ot){var Ct=String(ot);if(st(ot)){var zt=Number(Ct.slice(Ct.indexOf("e-")+2)),un=Ct.match(/\.(\d+)/);return un!=null&&un[1]&&(zt+=un[1].length),zt}return Ct.includes(".")&&xt(Ct)?Ct.length-Ct.indexOf(".")-1:0}function Le(ot){var Ct=String(ot);if(st(ot)){if(ot>Number.MAX_SAFE_INTEGER)return String(Re()?BigInt(ot).toString():Number.MAX_SAFE_INTEGER);if(ot<Number.MIN_SAFE_INTEGER)return String(Re()?BigInt(ot).toString():Number.MIN_SAFE_INTEGER);Ct=ot.toFixed(tt(Ct))}return ht(Ct).fullStr}function xt(ot){return typeof ot=="number"?!Number.isNaN(ot):ot?/^\s*-?\d+(\.\d+)?\s*$/.test(ot)||/^\s*-?\d+\.\s*$/.test(ot)||/^\s*-?\.\d+\s*$/.test(ot):!1}var on=function(){function ot(Ct){if((0,Te.Z)(this,ot),(0,Ce.Z)(this,"origin",""),(0,Ce.Z)(this,"negative",void 0),(0,Ce.Z)(this,"integer",void 0),(0,Ce.Z)(this,"decimal",void 0),(0,Ce.Z)(this,"decimalLen",void 0),(0,Ce.Z)(this,"empty",void 0),(0,Ce.Z)(this,"nan",void 0),bt(Ct)){this.empty=!0;return}if(this.origin=String(Ct),Ct==="-"||Number.isNaN(Ct)){this.nan=!0;return}var zt=Ct;if(st(zt)&&(zt=Number(zt)),zt=typeof zt=="string"?zt:Le(zt),xt(zt)){var un=ht(zt);this.negative=un.negative;var Je=un.trimStr.split(".");this.integer=BigInt(Je[0]);var Mt=Je[1]||"0";this.decimal=BigInt(Mt),this.decimalLen=Mt.length}else this.nan=!0}return(0,ft.Z)(ot,[{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(zt){var un="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(zt,"0"));return BigInt(un)}},{key:"negate",value:function(){var zt=new ot(this.toString());return zt.negative=!zt.negative,zt}},{key:"cal",value:function(zt,un,Je){var Mt=Math.max(this.getDecimalStr().length,zt.getDecimalStr().length),ln=this.alignDecimal(Mt),Jt=zt.alignDecimal(Mt),vn=un(ln,Jt).toString(),bn=Je(Mt),Fn=ht(vn),Nr=Fn.negativeStr,Sr=Fn.trimStr,vr="".concat(Nr).concat(Sr.padStart(bn+1,"0"));return new ot("".concat(vr.slice(0,-bn),".").concat(vr.slice(-bn)))}},{key:"add",value:function(zt){if(this.isInvalidate())return new ot(zt);var un=new ot(zt);return un.isInvalidate()?this:this.cal(un,function(Je,Mt){return Je+Mt},function(Je){return Je})}},{key:"multi",value:function(zt){var un=new ot(zt);return this.isInvalidate()||un.isInvalidate()?new ot(NaN):this.cal(un,function(Je,Mt){return Je*Mt},function(Je){return Je*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(zt){return this.toString()===(zt==null?void 0:zt.toString())}},{key:"lessEquals",value:function(zt){return this.add(zt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return zt?this.isInvalidate()?"":ht("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ot}(),it=function(){function ot(Ct){if((0,Te.Z)(this,ot),(0,Ce.Z)(this,"origin",""),(0,Ce.Z)(this,"number",void 0),(0,Ce.Z)(this,"empty",void 0),bt(Ct)){this.empty=!0;return}this.origin=String(Ct),this.number=Number(Ct)}return(0,ft.Z)(ot,[{key:"negate",value:function(){return new ot(-this.toNumber())}},{key:"add",value:function(zt){if(this.isInvalidate())return new ot(zt);var un=Number(zt);if(Number.isNaN(un))return this;var Je=this.number+un;if(Je>Number.MAX_SAFE_INTEGER)return new ot(Number.MAX_SAFE_INTEGER);if(Je<Number.MIN_SAFE_INTEGER)return new ot(Number.MIN_SAFE_INTEGER);var Mt=Math.max(tt(this.number),tt(un));return new ot(Je.toFixed(Mt))}},{key:"multi",value:function(zt){var un=Number(zt);if(this.isInvalidate()||Number.isNaN(un))return new ot(NaN);var Je=this.number*un;if(Je>Number.MAX_SAFE_INTEGER)return new ot(Number.MAX_SAFE_INTEGER);if(Je<Number.MIN_SAFE_INTEGER)return new ot(Number.MIN_SAFE_INTEGER);var Mt=Math.max(tt(this.number),tt(un));return new ot(Je.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(zt){return this.toNumber()===(zt==null?void 0:zt.toNumber())}},{key:"lessEquals",value:function(zt){return this.add(zt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return zt?this.isInvalidate()?"":Le(this.number):this.origin}}]),ot}();function yt(ot){return Re()?new on(ot):new it(ot)}function Ee(ot,Ct,zt){var un=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ot==="")return"";var Je=ht(ot),Mt=Je.negativeStr,ln=Je.integerStr,Jt=Je.decimalStr,vn="".concat(Ct).concat(Jt),bn="".concat(Mt).concat(ln);if(zt>=0){var Fn=Number(Jt[zt]);if(Fn>=5&&!un){var Nr=yt(ot).add("".concat(Mt,"0.").concat("0".repeat(zt)).concat(10-Fn));return Ee(Nr.toString(),Ct,zt,un)}return zt===0?bn:"".concat(bn).concat(Ct).concat(Jt.padEnd(zt,"0").slice(0,zt))}return vn===".0"?bn:"".concat(bn).concat(vn)}var de=yt,je=ae(67656),ze=ae(67294);function At(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ct=At()?ze.useLayoutEffect:ze.useEffect,lt=function(Ct,zt){var un=ze.useRef(!0);ct(function(){return Ct(un.current)},zt),ct(function(){return un.current=!1,function(){un.current=!0}},[])},Ze=function(Ct,zt){lt(function(un){if(!un)return Ct()},zt)},kt=lt,pt=ae(27183);function nn(ot,Ct,zt){var un=React.useRef({});return(!("value"in un.current)||zt(un.current.condition,Ct))&&(un.current.value=ot(),un.current.condition=Ct),un.current.value}function rt(ot,Ct){typeof ot=="function"?ot(Ct):(0,_e.Z)(ot)==="object"&&ot&&"current"in ot&&(ot.current=Ct)}function qt(){for(var ot=arguments.length,Ct=new Array(ot),zt=0;zt<ot;zt++)Ct[zt]=arguments[zt];var un=Ct.filter(function(Je){return Je});return un.length<=1?un[0]:function(Je){Ct.forEach(function(Mt){rt(Mt,Je)})}}function pn(){for(var ot=arguments.length,Ct=new Array(ot),zt=0;zt<ot;zt++)Ct[zt]=arguments[zt];return useMemo(function(){return qt.apply(void 0,Ct)},Ct,function(un,Je){return un.length!==Je.length||un.every(function(Mt,ln){return Mt!==Je[ln]})})}function cn(ot){var Ct,zt,un=isMemo(ot)?ot.type.type:ot.type;return!(typeof un=="function"&&!((Ct=un.prototype)!==null&&Ct!==void 0&&Ct.render)||typeof ot=="function"&&!((zt=ot.prototype)!==null&&zt!==void 0&&zt.render))}function Xe(ot){return!isValidElement(ot)||isFragment(ot)?!1:cn(ot)}var Me={},mt=[],Gt=function(Ct){mt.push(Ct)};function hn(ot,Ct){if(0)var zt}function Qe(ot,Ct){if(0)var zt}function ut(){Me={}}function Yt(ot,Ct,zt){!Ct&&!Me[zt]&&(ot(!1,zt),Me[zt]=!0)}function Qt(ot,Ct){Yt(hn,ot,Ct)}function tn(ot,Ct){Yt(Qe,ot,Ct)}Qt.preMessage=Gt,Qt.resetWarned=ut,Qt.noteOnce=tn;var _t=Qt;function en(ot,Ct){var zt=(0,ze.useRef)(null);function un(){try{var Mt=ot.selectionStart,ln=ot.selectionEnd,Jt=ot.value,vn=Jt.substring(0,Mt),bn=Jt.substring(ln);zt.current={start:Mt,end:ln,value:Jt,beforeTxt:vn,afterTxt:bn}}catch(Fn){}}function Je(){if(ot&&zt.current&&Ct)try{var Mt=ot.value,ln=zt.current,Jt=ln.beforeTxt,vn=ln.afterTxt,bn=ln.start,Fn=Mt.length;if(Mt.endsWith(vn))Fn=Mt.length-zt.current.afterTxt.length;else if(Mt.startsWith(Jt))Fn=Jt.length;else{var Nr=Jt[bn-1],Sr=Mt.indexOf(Nr,bn-1);Sr!==-1&&(Fn=Sr+1)}ot.setSelectionRange(Fn,Fn)}catch(vr){_t(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(vr.message))}}return[un,Je]}var Cn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ot=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(ot)||/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(ot==null?void 0:ot.substr(0,4))},On=function(){var Ct=(0,ze.useState)(!1),zt=(0,we.Z)(Ct,2),un=zt[0],Je=zt[1];return kt(function(){Je(Cn())},[]),un},$e=On,ce=function(Ct){return+setTimeout(Ct,16)},le=function(Ct){return clearTimeout(Ct)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ce=function(Ct){return window.requestAnimationFrame(Ct)},le=function(Ct){return window.cancelAnimationFrame(Ct)});var me=0,he=new Map;function se(ot){he.delete(ot)}var Ie=function(Ct){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;me+=1;var un=me;function Je(Mt){if(Mt===0)se(un),Ct();else{var ln=ce(function(){Je(Mt-1)});he.set(un,ln)}}return Je(zt),un};Ie.cancel=function(ot){var Ct=he.get(ot);return se(Ct),le(Ct)};var et=Ie,$t=200,Ht=600;function Xt(ot){var Ct=ot.prefixCls,zt=ot.upNode,un=ot.downNode,Je=ot.upDisabled,Mt=ot.downDisabled,ln=ot.onStep,Jt=ze.useRef(),vn=ze.useRef([]),bn=ze.useRef();bn.current=ln;var Fn=function(){clearTimeout(Jt.current)},Nr=function(Dn,er){Dn.preventDefault(),Fn(),bn.current(er);function An(){bn.current(er),Jt.current=setTimeout(An,$t)}Jt.current=setTimeout(An,Ht)};ze.useEffect(function(){return function(){Fn(),vn.current.forEach(function(Ot){return et.cancel(Ot)})}},[]);var Sr=$e();if(Sr)return null;var vr="".concat(Ct,"-handler"),Ir=Ye()(vr,"".concat(vr,"-up"),(0,Ce.Z)({},"".concat(vr,"-up-disabled"),Je)),_r=Ye()(vr,"".concat(vr,"-down"),(0,Ce.Z)({},"".concat(vr,"-down-disabled"),Mt)),Lt=function(){return vn.current.push(et(Fn))},wt={unselectable:"on",role:"button",onMouseUp:Lt,onMouseLeave:Lt};return ze.createElement("div",{className:"".concat(vr,"-wrap")},ze.createElement("span",(0,ve.Z)({},wt,{onMouseDown:function(Dn){Nr(Dn,!0)},"aria-label":"Increase Value","aria-disabled":Je,className:Ir}),zt||ze.createElement("span",{unselectable:"on",className:"".concat(Ct,"-handler-up-inner")})),ze.createElement("span",(0,ve.Z)({},wt,{onMouseDown:function(Dn){Nr(Dn,!1)},"aria-label":"Decrease Value","aria-disabled":Mt,className:_r}),un||ze.createElement("span",{unselectable:"on",className:"".concat(Ct,"-handler-down-inner")})))}function jt(ot){var Ct=typeof ot=="number"?Le(ot):ht(ot).fullStr,zt=Ct.includes(".");return zt?ht(Ct.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ot+"0"}var rn=ae(87887),qn=function(){var ot=(0,ze.useRef)(0),Ct=function(){et.cancel(ot.current)};return(0,ze.useEffect)(function(){return Ct},[]),function(zt){Ct(),ot.current=et(function(){zt()})}},lr=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Bt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Sn=function(Ct,zt){return Ct||zt.isEmpty()?zt.toString():zt.toNumber()},dr=function(Ct){var zt=de(Ct);return zt.isInvalidate()?null:zt},Wr=ze.forwardRef(function(ot,Ct){var zt,un=ot.prefixCls,Je=un===void 0?"rc-input-number":un,Mt=ot.className,ln=ot.style,Jt=ot.min,vn=ot.max,bn=ot.step,Fn=bn===void 0?1:bn,Nr=ot.defaultValue,Sr=ot.value,vr=ot.disabled,Ir=ot.readOnly,_r=ot.upHandler,Lt=ot.downHandler,wt=ot.keyboard,Ot=ot.controls,Dn=Ot===void 0?!0:Ot,er=ot.classNames,An=ot.stringMode,Rn=ot.parser,Nn=ot.formatter,rr=ot.precision,Dr=ot.decimalSeparator,yn=ot.onChange,Si=ot.onInput,di=ot.onPressEnter,ha=ot.onStep,ta=(0,ge.Z)(ot,lr),Wi="".concat(Je,"-input"),Ta=ze.useRef(null),Gi=ze.useState(!1),$i=(0,we.Z)(Gi,2),ra=$i[0],Ma=$i[1],vi=ze.useRef(!1),Zi=ze.useRef(!1),xa=ze.useRef(!1),Ya=ze.useState(function(){return de(Sr!=null?Sr:Nr)}),Ba=(0,we.Z)(Ya,2),ki=Ba[0],Rt=Ba[1];function Tt(mr){Sr===void 0&&Rt(mr)}var mn=ze.useCallback(function(mr,gr){if(!gr)return rr>=0?rr:Math.max(tt(mr),tt(Fn))},[rr,Fn]),$n=ze.useCallback(function(mr){var gr=String(mr);if(Rn)return Rn(gr);var Cr=gr;return Dr&&(Cr=Cr.replace(Dr,".")),Cr.replace(/[^\w.-]+/g,"")},[Rn,Dr]),Qn=ze.useRef(""),Or=ze.useCallback(function(mr,gr){if(Nn)return Nn(mr,{userTyping:gr,input:String(Qn.current)});var Cr=typeof mr=="number"?Le(mr):mr;if(!gr){var Er=mn(Cr,gr);if(xt(Cr)&&(Dr||Er>=0)){var Fr=Dr||".";Cr=Ee(Cr,Fr,Er)}}return Cr},[Nn,mn,Dr]),Gr=ze.useState(function(){var mr=Nr!=null?Nr:Sr;return ki.isInvalidate()&&["string","number"].includes((0,_e.Z)(mr))?Number.isNaN(mr)?"":mr:Or(ki.toString(),!1)}),ci=(0,we.Z)(Gr,2),gi=ci[0],li=ci[1];Qn.current=gi;function Mi(mr,gr){li(Or(mr.isInvalidate()?mr.toString(!1):mr.toString(!gr),gr))}var Vi=ze.useMemo(function(){return dr(vn)},[vn,rr]),Yr=ze.useMemo(function(){return dr(Jt)},[Jt,rr]),Fi=ze.useMemo(function(){return!Vi||!ki||ki.isInvalidate()?!1:Vi.lessEquals(ki)},[Vi,ki]),sa=ze.useMemo(function(){return!Yr||!ki||ki.isInvalidate()?!1:ki.lessEquals(Yr)},[Yr,ki]),Yi=en(Ta.current,ra),Oe=(0,we.Z)(Yi,2),Ve=Oe[0],Ue=Oe[1],qe=function(gr){return Vi&&!gr.lessEquals(Vi)?Vi:Yr&&!Yr.lessEquals(gr)?Yr:null},vt=function(gr){return!qe(gr)},St=function(gr,Cr){var Er=gr,Fr=vt(Er)||Er.isEmpty();if(!Er.isEmpty()&&!Cr&&(Er=qe(Er)||Er,Fr=!0),!Ir&&!vr&&Fr){var He=Er.toString(),Ge=mn(He,Cr);return Ge>=0&&(Er=de(Ee(He,".",Ge)),vt(Er)||(Er=de(Ee(He,".",Ge,!0)))),Er.equals(ki)||(Tt(Er),yn==null||yn(Er.isEmpty()?null:Sn(An,Er)),Sr===void 0&&Mi(Er,Cr)),Er}return ki},Nt=qn(),wn=function mr(gr){if(Ve(),Qn.current=gr,li(gr),!Zi.current){var Cr=$n(gr),Er=de(Cr);Er.isNaN()||St(Er,!0)}Si==null||Si(gr),Nt(function(){var Fr=gr;Rn||(Fr=gr.replace(/。/g,".")),Fr!==gr&&mr(Fr)})},Ln=function(){Zi.current=!0},br=function(){Zi.current=!1,wn(Ta.current.value)},Br=function(gr){wn(gr.target.value)},hr=function(gr){var Cr;if(!(gr&&Fi||!gr&&sa)){vi.current=!1;var Er=de(xa.current?jt(Fn):Fn);gr||(Er=Er.negate());var Fr=(ki||de(0)).add(Er.toString()),He=St(Fr,!1);ha==null||ha(Sn(An,He),{offset:xa.current?jt(Fn):Fn,type:gr?"up":"down"}),(Cr=Ta.current)===null||Cr===void 0||Cr.focus()}},Wn=function(gr){var Cr=de($n(gi)),Er=Cr;Cr.isNaN()?Er=St(ki,gr):Er=St(Cr,gr),Sr!==void 0?Mi(ki,!1):Er.isNaN()||Mi(Er,!1)},Tn=function(){vi.current=!0},Jn=function(gr){var Cr=gr.key,Er=gr.shiftKey;vi.current=!0,xa.current=Er,Cr==="Enter"&&(Zi.current||(vi.current=!1),Wn(!1),di==null||di(gr)),wt!==!1&&!Zi.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Cr)&&(hr(Cr==="Up"||Cr==="ArrowUp"),gr.preventDefault())},ar=function(){vi.current=!1,xa.current=!1},$r=function(){Wn(!1),Ma(!1),vi.current=!1};return Ze(function(){ki.isInvalidate()||Mi(ki,!1)},[rr]),Ze(function(){var mr=de(Sr);Rt(mr);var gr=de($n(gi));(!mr.equals(gr)||!vi.current||Nn)&&Mi(mr,vi.current)},[Sr]),Ze(function(){Nn&&Ue()},[gi]),ze.createElement("div",{className:Ye()(Je,er==null?void 0:er.input,Mt,(zt={},(0,Ce.Z)(zt,"".concat(Je,"-focused"),ra),(0,Ce.Z)(zt,"".concat(Je,"-disabled"),vr),(0,Ce.Z)(zt,"".concat(Je,"-readonly"),Ir),(0,Ce.Z)(zt,"".concat(Je,"-not-a-number"),ki.isNaN()),(0,Ce.Z)(zt,"".concat(Je,"-out-of-range"),!ki.isInvalidate()&&!vt(ki)),zt)),style:ln,onFocus:function(){Ma(!0)},onBlur:$r,onKeyDown:Jn,onKeyUp:ar,onCompositionStart:Ln,onCompositionEnd:br,onBeforeInput:Tn},Dn&&ze.createElement(Xt,{prefixCls:Je,upNode:_r,downNode:Lt,upDisabled:Fi,downDisabled:sa,onStep:hr}),ze.createElement("div",{className:"".concat(Wi,"-wrap")},ze.createElement("input",(0,ve.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Jt,"aria-valuemax":vn,"aria-valuenow":ki.isInvalidate()?null:ki.toString(),step:Fn},ta,{ref:qt(Ta,Ct),className:Wi,value:gi,onChange:Br,disabled:vr,readOnly:Ir}))))}),gt=ze.forwardRef(function(ot,Ct){var zt=ot.disabled,un=ot.style,Je=ot.prefixCls,Mt=ot.value,ln=ot.prefix,Jt=ot.suffix,vn=ot.addonBefore,bn=ot.addonAfter,Fn=ot.classes,Nr=ot.className,Sr=ot.classNames,vr=(0,ge.Z)(ot,Bt),Ir=ze.useRef(null),_r=function(wt){Ir.current&&(0,rn.nH)(Ir.current,wt)};return ze.createElement(je.BaseInput,{inputElement:ze.createElement(Wr,(0,ve.Z)({prefixCls:Je,disabled:zt,classNames:Sr,ref:qt(Ir,Ct)},vr)),className:Nr,triggerFocus:_r,prefixCls:Je,value:Mt,disabled:zt,style:un,prefix:ln,suffix:Jt,addonAfter:bn,addonBefore:vn,classes:Fn,classNames:Sr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});gt.displayName="InputNumber";var sn=gt,tr=sn,Zn=ae(9708),xr=ae(53124),Kr=ae(46735),Jr=ae(98866),Zr=ae(98675),ei=ae(65223),pi=ae(4173),kr=ae(47673),Ti=ae(14747),na=ae(80110),ea=ae(67968),oa=ae(45503);const Li=(ot,Ct)=>{let{componentCls:zt,borderRadiusSM:un,borderRadiusLG:Je}=ot;const Mt=Ct==="lg"?Je:un;return{[`&-${Ct}`]:{[`${zt}-handler-wrap`]:{borderStartEndRadius:Mt,borderEndEndRadius:Mt},[`${zt}-handler-up`]:{borderStartEndRadius:Mt},[`${zt}-handler-down`]:{borderEndEndRadius:Mt}}}},Dt=ot=>{const{componentCls:Ct,lineWidth:zt,lineType:un,colorBorder:Je,borderRadius:Mt,fontSizeLG:ln,controlHeightLG:Jt,controlHeightSM:vn,colorError:bn,paddingInlineSM:Fn,colorTextDescription:Nr,motionDurationMid:Sr,handleHoverColor:vr,paddingInline:Ir,paddingBlock:_r,handleBg:Lt,handleActiveBg:wt,colorTextDisabled:Ot,borderRadiusSM:Dn,borderRadiusLG:er,controlWidth:An,handleVisible:Rn,handleBorderColor:Nn}=ot;return[{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ti.Wf)(ot)),(0,kr.ik)(ot)),(0,kr.bi)(ot,Ct)),{display:"inline-block",width:An,margin:0,padding:0,border:`${zt}px ${un} ${Je}`,borderRadius:Mt,"&-rtl":{direction:"rtl",[`${Ct}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:ln,borderRadius:er,[`input${Ct}-input`]:{height:Jt-2*zt}},"&-sm":{padding:0,borderRadius:Dn,[`input${Ct}-input`]:{height:vn-2*zt,padding:`0 ${Fn}px`}},"&:hover":Object.assign({},(0,kr.pU)(ot)),"&-focused":Object.assign({},(0,kr.M1)(ot)),"&-out-of-range":{[`${Ct}-input-wrap`]:{input:{color:bn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Ti.Wf)(ot)),(0,kr.s7)(ot)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Ct}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Ct}-group-addon`]:{borderRadius:er,fontSize:ot.fontSizeLG}},"&-sm":{[`${Ct}-group-addon`]:{borderRadius:Dn}},[`${Ct}-wrapper-disabled > ${Ct}-group-addon`]:Object.assign({},(0,kr.Xy)(ot))}}),[`&-disabled ${Ct}-input`]:{cursor:"not-allowed"},[Ct]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ti.Wf)(ot)),{width:"100%",padding:`${_r}px ${Ir}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Mt,outline:0,transition:`all ${Sr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,kr.nz)(ot.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Ct]:Object.assign(Object.assign(Object.assign({[`&:hover ${Ct}-handler-wrap, &-focused ${Ct}-handler-wrap`]:{opacity:1},[`${Ct}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:ot.handleWidth,height:"100%",background:Lt,borderStartStartRadius:0,borderStartEndRadius:Mt,borderEndEndRadius:Mt,borderEndStartRadius:0,opacity:Rn===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Sr} linear ${Sr}`,[`${Ct}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${Ct}-handler-up-inner,
${Ct}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:ot.handleFontSize}}},[`${Ct}-handler`]:{height:"50%",overflow:"hidden",color:Nr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${zt}px ${un} ${Nn}`,transition:`all ${Sr} linear`,"&:active":{background:wt},"&:hover":{height:"60%",[`
${Ct}-handler-up-inner,
${Ct}-handler-down-inner
`]:{color:vr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Ti.Ro)()),{color:Nr,transition:`all ${Sr} linear`,userSelect:"none"})},[`${Ct}-handler-up`]:{borderStartEndRadius:Mt},[`${Ct}-handler-down`]:{borderBlockStart:`${zt}px ${un} ${Nn}`,borderEndEndRadius:Mt}},Li(ot,"lg")),Li(ot,"sm")),{"&-disabled, &-readonly":{[`${Ct}-handler-wrap`]:{display:"none"},[`${Ct}-input`]:{color:"inherit"}},[`
${Ct}-handler-up-disabled,
${Ct}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${Ct}-handler-up-disabled:hover &-handler-up-inner,
${Ct}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Ot}})},{[`${Ct}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Ct}-handler-down`]:{borderBlockStartWidth:0}}}]},Hn=ot=>{const{componentCls:Ct,paddingBlock:zt,paddingInline:un,inputAffixPadding:Je,controlWidth:Mt,borderRadiusLG:ln,borderRadiusSM:Jt}=ot;return{[`${Ct}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,kr.ik)(ot)),(0,kr.bi)(ot,`${Ct}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Mt,padding:0,paddingInlineStart:un,"&-lg":{borderRadius:ln},"&-sm":{borderRadius:Jt},[`&:not(${Ct}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,kr.pU)(ot)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Ct}-disabled`]:{background:"transparent"},[`> div${Ct}`]:{width:"100%",border:"none",outline:"none",[`&${Ct}-focused`]:{boxShadow:"none !important"}},[`input${Ct}-input`]:{padding:`${zt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Ct}-handler-wrap`]:{zIndex:2},[Ct]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Je},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:un,marginInlineStart:Je}}})}};var Vn=(0,ea.Z)("InputNumber",ot=>{const Ct=(0,oa.TS)(ot,(0,kr.e5)(ot));return[Dt(Ct),Hn(Ct),(0,na.c)(Ct)]},ot=>Object.assign(Object.assign({},(0,kr.TM)(ot)),{controlWidth:90,handleWidth:ot.controlHeightSM-ot.lineWidth*2,handleFontSize:ot.fontSize/2,handleVisible:"auto",handleActiveBg:ot.colorFillAlter,handleBg:ot.colorBgContainer,handleHoverColor:ot.colorPrimary,handleBorderColor:ot.colorBorder})),Gn=function(ot,Ct){var zt={};for(var un in ot)Object.prototype.hasOwnProperty.call(ot,un)&&Ct.indexOf(un)<0&&(zt[un]=ot[un]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,un=Object.getOwnPropertySymbols(ot);Je<un.length;Je++)Ct.indexOf(un[Je])<0&&Object.prototype.propertyIsEnumerable.call(ot,un[Je])&&(zt[un[Je]]=ot[un[Je]]);return zt};const Lr=ze.forwardRef((ot,Ct)=>{const{getPrefixCls:zt,direction:un}=ze.useContext(xr.E_),Je=ze.useRef(null);ze.useImperativeHandle(Ct,()=>Je.current);const{className:Mt,rootClassName:ln,size:Jt,disabled:vn,prefixCls:bn,addonBefore:Fn,addonAfter:Nr,prefix:Sr,bordered:vr=!0,readOnly:Ir,status:_r,controls:Lt}=ot,wt=Gn(ot,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Ot=zt("input-number",bn),[Dn,er]=Vn(Ot),{compactSize:An,compactItemClassnames:Rn}=(0,pi.ri)(Ot,un);let Nn=ze.createElement(Fe.Z,{className:`${Ot}-handler-up-inner`}),rr=ze.createElement(fe.Z,{className:`${Ot}-handler-down-inner`});const Dr=typeof Lt=="boolean"?Lt:void 0;typeof Lt=="object"&&(Nn=typeof Lt.upIcon=="undefined"?Nn:ze.createElement("span",{className:`${Ot}-handler-up-inner`},Lt.upIcon),rr=typeof Lt.downIcon=="undefined"?rr:ze.createElement("span",{className:`${Ot}-handler-down-inner`},Lt.downIcon));const{hasFeedback:yn,status:Si,isFormItemInput:di,feedbackIcon:ha}=ze.useContext(ei.aM),ta=(0,Zn.F)(Si,_r),Wi=(0,Zr.Z)(vi=>{var Zi;return(Zi=Jt!=null?Jt:An)!==null&&Zi!==void 0?Zi:vi}),Ta=ze.useContext(Jr.Z),Gi=vn!=null?vn:Ta,$i=Ye()({[`${Ot}-lg`]:Wi==="large",[`${Ot}-sm`]:Wi==="small",[`${Ot}-rtl`]:un==="rtl",[`${Ot}-borderless`]:!vr,[`${Ot}-in-form-item`]:di},(0,Zn.Z)(Ot,ta),Rn,er),ra=`${Ot}-group`,Ma=ze.createElement(tr,Object.assign({ref:Je,disabled:Gi,className:Ye()(Mt,ln),upHandler:Nn,downHandler:rr,prefixCls:Ot,readOnly:Ir,controls:Dr,prefix:Sr,suffix:yn&&ha,addonAfter:Nr&&ze.createElement(pi.BR,null,ze.createElement(ei.Ux,{override:!0,status:!0},Nr)),addonBefore:Fn&&ze.createElement(pi.BR,null,ze.createElement(ei.Ux,{override:!0,status:!0},Fn)),classNames:{input:$i},classes:{affixWrapper:Ye()((0,Zn.Z)(`${Ot}-affix-wrapper`,ta,yn),{[`${Ot}-affix-wrapper-sm`]:Wi==="small",[`${Ot}-affix-wrapper-lg`]:Wi==="large",[`${Ot}-affix-wrapper-rtl`]:un==="rtl",[`${Ot}-affix-wrapper-borderless`]:!vr},er),wrapper:Ye()({[`${ra}-rtl`]:un==="rtl",[`${Ot}-wrapper-disabled`]:Gi},er),group:Ye()({[`${Ot}-group-wrapper-sm`]:Wi==="small",[`${Ot}-group-wrapper-lg`]:Wi==="large",[`${Ot}-group-wrapper-rtl`]:un==="rtl"},(0,Zn.Z)(`${Ot}-group-wrapper`,ta,yn),er)}},wt));return Dn(Ma)}),yr=Lr,Pr=ot=>ze.createElement(Kr.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},ze.createElement(Lr,Object.assign({},ot)));yr._InternalPanelDoNotUseOrYouWillBeFired=Pr;var nr=yr},82586:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return on},n:function(){return Le}});var fe=ae(16646),Fe=ae(94184),Be=ae.n(Fe),Ye=ae(67656),ve=ae(17799),Ce=ae(67294),_e=ae(9708),we=ae(53124),ge=ae(98866),Te=ae(98675),ft=ae(65223),Re=ae(4173),bt=ae(72922),ht=ae(47673);function st(it){return!!(it.prefix||it.suffix||it.allowClear)}var tt=function(it,yt){var Ee={};for(var de in it)Object.prototype.hasOwnProperty.call(it,de)&&yt.indexOf(de)<0&&(Ee[de]=it[de]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,de=Object.getOwnPropertySymbols(it);je<de.length;je++)yt.indexOf(de[je])<0&&Object.prototype.propertyIsEnumerable.call(it,de[je])&&(Ee[de[je]]=it[de[je]]);return Ee};function Le(it,yt){if(!it)return;it.focus(yt);const{cursor:Ee}=yt||{};if(Ee){const de=it.value.length;switch(Ee){case"start":it.setSelectionRange(0,0);break;case"end":it.setSelectionRange(de,de);break;default:it.setSelectionRange(0,de);break}}}var on=(0,Ce.forwardRef)((it,yt)=>{var Ee;const{prefixCls:de,bordered:je=!0,status:ze,size:At,disabled:ct,onBlur:lt,onFocus:Ze,suffix:kt,allowClear:pt,addonAfter:nn,addonBefore:rt,className:qt,style:pn,styles:cn,rootClassName:Xe,onChange:Me,classNames:mt}=it,Gt=tt(it,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:hn,direction:Qe,input:ut}=Ce.useContext(we.E_),Yt=hn("input",de),Qt=(0,Ce.useRef)(null),[tn,_t]=(0,ht.ZP)(Yt),{compactSize:en,compactItemClassnames:Cn}=(0,Re.ri)(Yt,Qe),On=(0,Te.Z)(lr=>{var Bt;return(Bt=At!=null?At:en)!==null&&Bt!==void 0?Bt:lr}),$e=Ce.useContext(ge.Z),ce=ct!=null?ct:$e,{status:le,hasFeedback:me,feedbackIcon:he}=(0,Ce.useContext)(ft.aM),se=(0,_e.F)(le,ze),Ie=st(it)||!!me,et=(0,Ce.useRef)(Ie);(0,Ce.useEffect)(()=>{var lr;Ie&&et.current,et.current=Ie},[Ie]);const $t=(0,bt.Z)(Qt,!0),Ht=lr=>{$t(),lt==null||lt(lr)},Xt=lr=>{$t(),Ze==null||Ze(lr)},jt=lr=>{$t(),Me==null||Me(lr)},rn=(me||kt)&&Ce.createElement(Ce.Fragment,null,kt,me&&he);let qn;return typeof pt=="object"&&(pt!=null&&pt.clearIcon)?qn=pt:pt&&(qn={clearIcon:Ce.createElement(fe.Z,null)}),tn(Ce.createElement(Ye.default,Object.assign({ref:(0,ve.sQ)(yt,Qt),prefixCls:Yt,autoComplete:ut==null?void 0:ut.autoComplete},Gt,{disabled:ce,onBlur:Ht,onFocus:Xt,style:Object.assign(Object.assign({},ut==null?void 0:ut.style),pn),styles:Object.assign(Object.assign({},ut==null?void 0:ut.styles),cn),suffix:rn,allowClear:qn,className:Be()(qt,Xe,Cn,ut==null?void 0:ut.className),onChange:jt,addonAfter:nn&&Ce.createElement(Re.BR,null,Ce.createElement(ft.Ux,{override:!0,status:!0},nn)),addonBefore:rt&&Ce.createElement(Re.BR,null,Ce.createElement(ft.Ux,{override:!0,status:!0},rt)),classNames:Object.assign(Object.assign(Object.assign({},mt),ut==null?void 0:ut.classNames),{input:Be()({[`${Yt}-sm`]:On==="small",[`${Yt}-lg`]:On==="large",[`${Yt}-rtl`]:Qe==="rtl",[`${Yt}-borderless`]:!je},!Ie&&(0,_e.Z)(Yt,se),mt==null?void 0:mt.input,(Ee=ut==null?void 0:ut.classNames)===null||Ee===void 0?void 0:Ee.input,_t)}),classes:{affixWrapper:Be()({[`${Yt}-affix-wrapper-sm`]:On==="small",[`${Yt}-affix-wrapper-lg`]:On==="large",[`${Yt}-affix-wrapper-rtl`]:Qe==="rtl",[`${Yt}-affix-wrapper-borderless`]:!je},(0,_e.Z)(`${Yt}-affix-wrapper`,se,me),_t),wrapper:Be()({[`${Yt}-group-rtl`]:Qe==="rtl"},_t),group:Be()({[`${Yt}-group-wrapper-sm`]:On==="small",[`${Yt}-group-wrapper-lg`]:On==="large",[`${Yt}-group-wrapper-rtl`]:Qe==="rtl",[`${Yt}-group-wrapper-disabled`]:ce},(0,_e.Z)(`${Yt}-group-wrapper`,se,me),_t)}})))})},96330:function(kn,Vt,ae){"use strict";var fe=ae(16646),Fe=ae(94184),Be=ae.n(Fe),Ye=ae(64701),ve=ae(67294),Ce=ae(9708),_e=ae(53124),we=ae(98866),ge=ae(98675),Te=ae(65223),ft=ae(82586),Re=ae(47673),bt=function(st,tt){var Le={};for(var xt in st)Object.prototype.hasOwnProperty.call(st,xt)&&tt.indexOf(xt)<0&&(Le[xt]=st[xt]);if(st!=null&&typeof Object.getOwnPropertySymbols=="function")for(var on=0,xt=Object.getOwnPropertySymbols(st);on<xt.length;on++)tt.indexOf(xt[on])<0&&Object.prototype.propertyIsEnumerable.call(st,xt[on])&&(Le[xt[on]]=st[xt[on]]);return Le};const ht=(0,ve.forwardRef)((st,tt)=>{const{prefixCls:Le,bordered:xt=!0,size:on,disabled:it,status:yt,allowClear:Ee,showCount:de,classNames:je,rootClassName:ze,className:At}=st,ct=bt(st,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:lt,direction:Ze}=ve.useContext(_e.E_),kt=(0,ge.Z)(on),pt=ve.useContext(we.Z),nn=it!=null?it:pt,{status:rt,hasFeedback:qt,feedbackIcon:pn}=ve.useContext(Te.aM),cn=(0,Ce.F)(rt,yt),Xe=ve.useRef(null);ve.useImperativeHandle(tt,()=>{var Qe;return{resizableTextArea:(Qe=Xe.current)===null||Qe===void 0?void 0:Qe.resizableTextArea,focus:ut=>{var Yt,Qt;(0,ft.n)((Qt=(Yt=Xe.current)===null||Yt===void 0?void 0:Yt.resizableTextArea)===null||Qt===void 0?void 0:Qt.textArea,ut)},blur:()=>{var ut;return(ut=Xe.current)===null||ut===void 0?void 0:ut.blur()}}});const Me=lt("input",Le);let mt;typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?mt=Ee:Ee&&(mt={clearIcon:ve.createElement(fe.Z,null)});const[Gt,hn]=(0,Re.ZP)(Me);return Gt(ve.createElement(Ye.default,Object.assign({},ct,{disabled:nn,allowClear:mt,className:Be()(At,ze),classes:{affixWrapper:Be()(`${Me}-textarea-affix-wrapper`,{[`${Me}-affix-wrapper-rtl`]:Ze==="rtl",[`${Me}-affix-wrapper-borderless`]:!xt,[`${Me}-affix-wrapper-sm`]:kt==="small",[`${Me}-affix-wrapper-lg`]:kt==="large",[`${Me}-textarea-show-count`]:de},(0,Ce.Z)(`${Me}-affix-wrapper`,cn),hn)},classNames:Object.assign(Object.assign({},je),{textarea:Be()({[`${Me}-borderless`]:!xt,[`${Me}-sm`]:kt==="small",[`${Me}-lg`]:kt==="large"},(0,Ce.Z)(Me,cn),hn,je==null?void 0:je.textarea)}),prefixCls:Me,suffix:qt&&ve.createElement("span",{className:`${Me}-textarea-suffix`},pn),showCount:de,ref:Xe})))});Vt.Z=ht},72922:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});var fe=ae(67294);function Fe(Be,Ye){const ve=(0,fe.useRef)([]),Ce=()=>{ve.current.push(setTimeout(()=>{var _e,we,ge,Te;!((_e=Be.current)===null||_e===void 0)&&_e.input&&((we=Be.current)===null||we===void 0?void 0:we.input.getAttribute("type"))==="password"&&(!((ge=Be.current)===null||ge===void 0)&&ge.input.hasAttribute("value"))&&((Te=Be.current)===null||Te===void 0||Te.input.removeAttribute("value"))}))};return(0,fe.useEffect)(()=>(Ye&&Ce(),()=>ve.current.forEach(_e=>{_e&&clearTimeout(_e)})),[]),Ce}},69677:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return kt}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(67294),Ye=ae(53124),ve=ae(65223),Ce=ae(47673),we=pt=>{const{getPrefixCls:nn,direction:rt}=(0,Be.useContext)(Ye.E_),{prefixCls:qt,className:pn}=pt,cn=nn("input-group",qt),Xe=nn("input"),[Me,mt]=(0,Ce.ZP)(Xe),Gt=Fe()(cn,{[`${cn}-lg`]:pt.size==="large",[`${cn}-sm`]:pt.size==="small",[`${cn}-compact`]:pt.compact,[`${cn}-rtl`]:rt==="rtl"},mt,pn),hn=(0,Be.useContext)(ve.aM),Qe=(0,Be.useMemo)(()=>Object.assign(Object.assign({},hn),{isFormItemInput:!1}),[hn]);return Me(Be.createElement("span",{className:Gt,style:pt.style,onMouseEnter:pt.onMouseEnter,onMouseLeave:pt.onMouseLeave,onFocus:pt.onFocus,onBlur:pt.onBlur},Be.createElement(ve.aM.Provider,{value:Qe},pt.children)))},ge=ae(82586),Te=ae(63237),ft=ae(99569),Re=ae(10366),bt=ae(17799),ht=ae(72922),st=function(pt,nn){var rt={};for(var qt in pt)Object.prototype.hasOwnProperty.call(pt,qt)&&nn.indexOf(qt)<0&&(rt[qt]=pt[qt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pn=0,qt=Object.getOwnPropertySymbols(pt);pn<qt.length;pn++)nn.indexOf(qt[pn])<0&&Object.prototype.propertyIsEnumerable.call(pt,qt[pn])&&(rt[qt[pn]]=pt[qt[pn]]);return rt};const tt=pt=>pt?Be.createElement(ft.Z,null):Be.createElement(Te.Z,null),Le={click:"onClick",hover:"onMouseOver"};var on=Be.forwardRef((pt,nn)=>{const{visibilityToggle:rt=!0}=pt,qt=typeof rt=="object"&&rt.visible!==void 0,[pn,cn]=(0,Be.useState)(()=>qt?rt.visible:!1),Xe=(0,Be.useRef)(null);Be.useEffect(()=>{qt&&cn(rt.visible)},[qt,rt]);const Me=(0,ht.Z)(Xe),mt=()=>{const{disabled:ce}=pt;ce||(pn&&Me(),cn(le=>{var me;const he=!le;return typeof rt=="object"&&((me=rt.onVisibleChange)===null||me===void 0||me.call(rt,he)),he}))},Gt=ce=>{const{action:le="click",iconRender:me=tt}=pt,he=Le[le]||"",se=me(pn),Ie={[he]:mt,className:`${ce}-icon`,key:"passwordIcon",onMouseDown:et=>{et.preventDefault()},onMouseUp:et=>{et.preventDefault()}};return Be.cloneElement(Be.isValidElement(se)?se:Be.createElement("span",null,se),Ie)},{className:hn,prefixCls:Qe,inputPrefixCls:ut,size:Yt}=pt,Qt=st(pt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:tn}=Be.useContext(Ye.E_),_t=tn("input",ut),en=tn("input-password",Qe),Cn=rt&&Gt(en),On=Fe()(en,hn,{[`${en}-${Yt}`]:!!Yt}),$e=Object.assign(Object.assign({},(0,Re.Z)(Qt,["suffix","iconRender","visibilityToggle"])),{type:pn?"text":"password",className:On,prefixCls:_t,suffix:Cn});return Yt&&($e.size=Yt),Be.createElement(ge.Z,Object.assign({ref:(0,bt.sQ)(nn,Xe)},$e))}),it=ae(72395),yt=ae(96159),Ee=ae(71577),de=ae(98675),je=ae(4173),ze=function(pt,nn){var rt={};for(var qt in pt)Object.prototype.hasOwnProperty.call(pt,qt)&&nn.indexOf(qt)<0&&(rt[qt]=pt[qt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pn=0,qt=Object.getOwnPropertySymbols(pt);pn<qt.length;pn++)nn.indexOf(qt[pn])<0&&Object.prototype.propertyIsEnumerable.call(pt,qt[pn])&&(rt[qt[pn]]=pt[qt[pn]]);return rt},ct=Be.forwardRef((pt,nn)=>{const{prefixCls:rt,inputPrefixCls:qt,className:pn,size:cn,suffix:Xe,enterButton:Me=!1,addonAfter:mt,loading:Gt,disabled:hn,onSearch:Qe,onChange:ut,onCompositionStart:Yt,onCompositionEnd:Qt}=pt,tn=ze(pt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:_t,direction:en}=Be.useContext(Ye.E_),Cn=Be.useRef(!1),On=_t("input-search",rt),$e=_t("input",qt),{compactSize:ce}=(0,je.ri)(On,en),le=(0,de.Z)(Sn=>{var dr;return(dr=cn!=null?cn:ce)!==null&&dr!==void 0?dr:Sn}),me=Be.useRef(null),he=Sn=>{Sn&&Sn.target&&Sn.type==="click"&&Qe&&Qe(Sn.target.value,Sn,{source:"clear"}),ut&&ut(Sn)},se=Sn=>{var dr;document.activeElement===((dr=me.current)===null||dr===void 0?void 0:dr.input)&&Sn.preventDefault()},Ie=Sn=>{var dr,Wr;Qe&&Qe((Wr=(dr=me.current)===null||dr===void 0?void 0:dr.input)===null||Wr===void 0?void 0:Wr.value,Sn,{source:"input"})},et=Sn=>{Cn.current||Gt||Ie(Sn)},$t=typeof Me=="boolean"?Be.createElement(it.Z,null):null,Ht=`${On}-button`;let Xt;const jt=Me||{},rn=jt.type&&jt.type.__ANT_BUTTON===!0;rn||jt.type==="button"?Xt=(0,yt.Tm)(jt,Object.assign({onMouseDown:se,onClick:Sn=>{var dr,Wr;(Wr=(dr=jt==null?void 0:jt.props)===null||dr===void 0?void 0:dr.onClick)===null||Wr===void 0||Wr.call(dr,Sn),Ie(Sn)},key:"enterButton"},rn?{className:Ht,size:le}:{})):Xt=Be.createElement(Ee.ZP,{className:Ht,type:Me?"primary":void 0,size:le,disabled:hn,key:"enterButton",onMouseDown:se,onClick:Ie,loading:Gt,icon:$t},Me),mt&&(Xt=[Xt,(0,yt.Tm)(mt,{key:"addonAfter"})]);const qn=Fe()(On,{[`${On}-rtl`]:en==="rtl",[`${On}-${le}`]:!!le,[`${On}-with-button`]:!!Me},pn),lr=Sn=>{Cn.current=!0,Yt==null||Yt(Sn)},Bt=Sn=>{Cn.current=!1,Qt==null||Qt(Sn)};return Be.createElement(ge.Z,Object.assign({ref:(0,bt.sQ)(me,nn),onPressEnter:et},tn,{size:le,onCompositionStart:lr,onCompositionEnd:Bt,prefixCls:$e,addonAfter:Xt,suffix:Xe,onChange:he,className:qn,disabled:hn}))}),lt=ae(96330);const Ze=ge.Z;Ze.Group=we,Ze.Search=ct,Ze.TextArea=lt.Z,Ze.Password=on;var kt=Ze},47673:function(kn,Vt,ae){"use strict";ae.d(Vt,{M1:function(){return _e},TM:function(){return yt},Xy:function(){return we},bi:function(){return ft},e5:function(){return it},ik:function(){return Re},nz:function(){return ve},pU:function(){return Ce},s7:function(){return bt},x0:function(){return Te}});var fe=ae(14747),Fe=ae(80110),Be=ae(45503),Ye=ae(67968);const ve=Ee=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ee,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ce=Ee=>({borderColor:Ee.hoverBorderColor}),_e=Ee=>({borderColor:Ee.activeBorderColor,boxShadow:Ee.activeShadow,outline:0}),we=Ee=>({color:Ee.colorTextDisabled,backgroundColor:Ee.colorBgContainerDisabled,borderColor:Ee.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},Ce((0,Be.TS)(Ee,{hoverBorderColor:Ee.colorBorder})))}),ge=Ee=>{const{paddingBlockLG:de,fontSizeLG:je,lineHeightLG:ze,borderRadiusLG:At,paddingInlineLG:ct}=Ee;return{padding:`${de}px ${ct}px`,fontSize:je,lineHeight:ze,borderRadius:At}},Te=Ee=>({padding:`${Ee.paddingBlockSM}px ${Ee.paddingInlineSM}px`,borderRadius:Ee.borderRadiusSM}),ft=(Ee,de)=>{const{componentCls:je,colorError:ze,colorWarning:At,errorActiveShadow:ct,warningActiveShadow:lt,colorErrorBorderHover:Ze,colorWarningBorderHover:kt}=Ee;return{[`&-status-error:not(${de}-disabled):not(${de}-borderless)${de}`]:{borderColor:ze,"&:hover":{borderColor:Ze},"&:focus, &-focused":Object.assign({},_e((0,Be.TS)(Ee,{activeBorderColor:ze,activeShadow:ct}))),[`${je}-prefix, ${je}-suffix`]:{color:ze}},[`&-status-warning:not(${de}-disabled):not(${de}-borderless)${de}`]:{borderColor:At,"&:hover":{borderColor:kt},"&:focus, &-focused":Object.assign({},_e((0,Be.TS)(Ee,{activeBorderColor:At,activeShadow:lt}))),[`${je}-prefix, ${je}-suffix`]:{color:At}}}},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({},Ce(Ee)),"&:focus, &-focused":Object.assign({},_e(Ee)),"&-disabled, &[disabled]":Object.assign({},we(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({},ge(Ee)),"&-sm":Object.assign({},Te(Ee)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),bt=Ee=>{const{componentCls:de,antCls:je}=Ee;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ee.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${de}, &-lg > ${de}-group-addon`]:Object.assign({},ge(Ee)),[`&-sm ${de}, &-sm > ${de}-group-addon`]:Object.assign({},Te(Ee)),[`&-lg ${je}-select-single ${je}-select-selector`]:{height:Ee.controlHeightLG},[`&-sm ${je}-select-single ${je}-select-selector`]:{height:Ee.controlHeightSM},[`> ${de}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${de}-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}},[`${de}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${de}-search-with-button &`]:{zIndex:0}}},[`> ${de}:first-child, ${de}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${je}-select ${je}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${de}-affix-wrapper`]:{[`&:not(:first-child) ${de}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${de}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${de}:last-child, ${de}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${je}-select ${je}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${de}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${de}-search &`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius}},[`&:not(:first-child), ${de}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${de}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,fe.dF)()),{[`${de}-group-addon, ${de}-group-wrap, > ${de}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ee.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${de}-affix-wrapper,
& > ${de}-number-affix-wrapper,
& > ${je}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ee.lineWidth,borderInlineEndWidth:Ee.lineWidth},[`${de}`]:{float:"none"},[`& > ${je}-select > ${je}-select-selector,
& > ${je}-select-auto-complete ${de},
& > ${je}-cascader-picker ${de},
& > ${de}-group-wrapper ${de}`]:{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 ${de},
& > ${je}-cascader-picker:first-child ${de}`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius},[`& > *:last-child,
& > ${je}-select:last-child > ${je}-select-selector,
& > ${je}-cascader-picker:last-child ${de},
& > ${je}-cascader-picker-focused:last-child ${de}`]:{borderInlineEndWidth:Ee.lineWidth,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius},[`& > ${je}-select-auto-complete ${de}`]:{verticalAlign:"top"},[`${de}-group-wrapper + ${de}-group-wrapper`]:{marginInlineStart:-Ee.lineWidth,[`${de}-affix-wrapper`]:{borderRadius:0}},[`${de}-group-wrapper:not(:last-child)`]:{[`&${de}-search > ${de}-group`]:{[`& > ${de}-group-addon > ${de}-search-button`]:{borderRadius:0},[`& > ${de}`]:{borderStartStartRadius:Ee.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ee.borderRadius}}}})}},ht=Ee=>{const{componentCls:de,controlHeightSM:je,lineWidth:ze}=Ee,ct=(je-ze*2-16)/2;return{[de]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ee)),Re(Ee)),ft(Ee,de)),{'&[type="color"]':{height:Ee.controlHeight,[`&${de}-lg`]:{height:Ee.controlHeightLG},[`&${de}-sm`]:{height:je,paddingTop:ct,paddingBottom:ct}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},st=Ee=>{const{componentCls:de}=Ee;return{[`${de}-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`}}}},tt=Ee=>{const{componentCls:de,inputAffixPadding:je,colorTextDescription:ze,motionDurationSlow:At,colorIcon:ct,colorIconHover:lt,iconCls:Ze}=Ee;return{[`${de}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Re(Ee)),{display:"inline-flex",[`&:not(${de}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Ce(Ee)),{zIndex:1,[`${de}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${de}[disabled]`]:{background:"transparent"}},[`> input${de}`]:{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"'},[`${de}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Ee.paddingXS}},"&-show-count-suffix":{color:ze},"&-show-count-has-suffix":{marginInlineEnd:Ee.paddingXXS},"&-prefix":{marginInlineEnd:je},"&-suffix":{marginInlineStart:je}}}),st(Ee)),{[`${Ze}${de}-password-icon`]:{color:ct,cursor:"pointer",transition:`all ${At}`,"&:hover":{color:lt}}}),ft(Ee,`${de}-affix-wrapper`))}},Le=Ee=>{const{componentCls:de,colorError:je,colorWarning:ze,borderRadiusLG:At,borderRadiusSM:ct}=Ee;return{[`${de}-group`]:Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ee)),bt(Ee)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${de}-group-addon`]:{borderRadius:At,fontSize:Ee.fontSizeLG}},"&-sm":{[`${de}-group-addon`]:{borderRadius:ct}},"&-status-error":{[`${de}-group-addon`]:{color:je,borderColor:je}},"&-status-warning":{[`${de}-group-addon`]:{color:ze,borderColor:ze}},"&-disabled":{[`${de}-group-addon`]:Object.assign({},we(Ee))},[`&:not(${de}-compact-first-item):not(${de}-compact-last-item)${de}-compact-item`]:{[`${de}, ${de}-group-addon`]:{borderRadius:0}},[`&:not(${de}-compact-last-item)${de}-compact-first-item`]:{[`${de}, ${de}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${de}-compact-first-item)${de}-compact-last-item`]:{[`${de}, ${de}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},xt=Ee=>{const{componentCls:de,antCls:je}=Ee,ze=`${de}-search`;return{[ze]:{[`${de}`]:{"&:hover, &:focus":{borderColor:Ee.colorPrimaryHover,[`+ ${de}-group-addon ${ze}-button:not(${je}-btn-primary)`]:{borderInlineStartColor:Ee.colorPrimaryHover}}},[`${de}-affix-wrapper`]:{borderRadius:0},[`${de}-lg`]:{lineHeight:Ee.lineHeightLG-2e-4},[`> ${de}-group`]:{[`> ${de}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ze}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${ze}-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}}}},[`${ze}-button`]:{height:Ee.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${ze}-button`]:{height:Ee.controlHeightLG},[`&-small ${ze}-button`]:{height:Ee.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${de}-compact-item`]:{[`&:not(${de}-compact-last-item)`]:{[`${de}-group-addon`]:{[`${de}-search-button`]:{marginInlineEnd:-Ee.lineWidth,borderRadius:0}}},[`&:not(${de}-compact-first-item)`]:{[`${de},${de}-affix-wrapper`]:{borderRadius:0}},[`> ${de}-group-addon ${de}-search-button,
> ${de},
${de}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${de}-affix-wrapper-focused`]:{zIndex:2}}}}},on=Ee=>{const{componentCls:de,paddingLG:je}=Ee,ze=`${de}-textarea`;return{[ze]:{position:"relative","&-show-count":{[`> ${de}`]:{height:"100%"},[`${de}-data-count`]:{position:"absolute",bottom:-Ee.fontSize*Ee.lineHeight,insetInlineEnd:0,color:Ee.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${de}`]:{paddingInlineEnd:je}},[`&-affix-wrapper${ze}-has-feedback`]:{[`${de}`]:{paddingInlineEnd:je}},[`&-affix-wrapper${de}-affix-wrapper`]:{padding:0,[`> textarea${de}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${de}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${de}-clear-icon`]:{position:"absolute",insetInlineEnd:Ee.paddingXS,insetBlockStart:Ee.paddingXS},[`${ze}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ee.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function it(Ee){return(0,Be.TS)(Ee,{inputAffixPadding:Ee.paddingXXS})}const yt=Ee=>{const{controlHeight:de,fontSize:je,lineHeight:ze,lineWidth:At,controlHeightSM:ct,controlHeightLG:lt,fontSizeLG:Ze,lineHeightLG:kt,paddingSM:pt,controlPaddingHorizontalSM:nn,controlPaddingHorizontal:rt,colorFillAlter:qt,colorPrimaryHover:pn,controlOutlineWidth:cn,controlOutline:Xe,colorErrorOutline:Me,colorWarningOutline:mt}=Ee;return{paddingBlock:Math.max(Math.round((de-je*ze)/2*10)/10-At,3),paddingBlockSM:Math.max(Math.round((ct-je*ze)/2*10)/10-At,0),paddingBlockLG:Math.ceil((lt-Ze*kt)/2*10)/10-At,paddingInline:pt-At,paddingInlineSM:nn-At,paddingInlineLG:rt-At,addonBg:qt,activeBorderColor:pn,hoverBorderColor:pn,activeShadow:`0 0 0 ${cn}px ${Xe}`,errorActiveShadow:`0 0 0 ${cn}px ${Me}`,warningActiveShadow:`0 0 0 ${cn}px ${mt}`}};Vt.ZP=(0,Ye.Z)("Input",Ee=>{const de=(0,Be.TS)(Ee,it(Ee));return[ht(de),on(de),tt(de),Le(de),xt(de),(0,Fe.c)(de)]},yt)},71322:function(kn,Vt,ae){"use strict";ae.d(Vt,{D:function(){return on},Z:function(){return Ee}});var fe=ae(87462),Fe=ae(67294),Be={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"},Ye=Be,ve=ae(84089),Ce=function(je,ze){return Fe.createElement(ve.Z,(0,fe.Z)({},je,{ref:ze,icon:Ye}))},_e=Fe.forwardRef(Ce),we=ae(22751),ge=ae(91034),Te=ae(94184),ft=ae.n(Te),Re=ae(10366),ht=de=>!isNaN(parseFloat(de))&&isFinite(de),st=ae(53124),tt=ae(84321),Le=function(de,je){var ze={};for(var At in de)Object.prototype.hasOwnProperty.call(de,At)&&je.indexOf(At)<0&&(ze[At]=de[At]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,At=Object.getOwnPropertySymbols(de);ct<At.length;ct++)je.indexOf(At[ct])<0&&Object.prototype.propertyIsEnumerable.call(de,At[ct])&&(ze[At[ct]]=de[At[ct]]);return ze};const xt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},on=Fe.createContext({}),it=(()=>{let de=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return de+=1,`${je}${de}`}})();var Ee=Fe.forwardRef((de,je)=>{const{prefixCls:ze,className:At,trigger:ct,children:lt,defaultCollapsed:Ze=!1,theme:kt="dark",style:pt={},collapsible:nn=!1,reverseArrow:rt=!1,width:qt=200,collapsedWidth:pn=80,zeroWidthTriggerStyle:cn,breakpoint:Xe,onCollapse:Me,onBreakpoint:mt}=de,Gt=Le(de,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:hn}=(0,Fe.useContext)(tt.Gs),[Qe,ut]=(0,Fe.useState)("collapsed"in de?de.collapsed:Ze),[Yt,Qt]=(0,Fe.useState)(!1);(0,Fe.useEffect)(()=>{"collapsed"in de&&ut(de.collapsed)},[de.collapsed]);const tn=(ce,le)=>{"collapsed"in de||ut(ce),Me==null||Me(ce,le)},_t=(0,Fe.useRef)();_t.current=ce=>{Qt(ce.matches),mt==null||mt(ce.matches),Qe!==ce.matches&&tn(ce.matches,"responsive")},(0,Fe.useEffect)(()=>{function ce(me){return _t.current(me)}let le;if(typeof window!="undefined"){const{matchMedia:me}=window;if(me&&Xe&&Xe in xt){le=me(`(max-width: ${xt[Xe]})`);try{le.addEventListener("change",ce)}catch(he){le.addListener(ce)}ce(le)}}return()=>{try{le==null||le.removeEventListener("change",ce)}catch(me){le==null||le.removeListener(ce)}}},[Xe]),(0,Fe.useEffect)(()=>{const ce=it("ant-sider-");return hn.addSider(ce),()=>hn.removeSider(ce)},[]);const en=()=>{tn(!Qe,"clickTrigger")},{getPrefixCls:Cn}=(0,Fe.useContext)(st.E_),On=()=>{const ce=Cn("layout-sider",ze),le=(0,Re.Z)(Gt,["collapsed"]),me=Qe?pn:qt,he=ht(me)?`${me}px`:String(me),se=parseFloat(String(pn||0))===0?Fe.createElement("span",{onClick:en,className:ft()(`${ce}-zero-width-trigger`,`${ce}-zero-width-trigger-${rt?"right":"left"}`),style:cn},ct||Fe.createElement(_e,null)):null,$t={expanded:rt?Fe.createElement(ge.Z,null):Fe.createElement(we.Z,null),collapsed:rt?Fe.createElement(we.Z,null):Fe.createElement(ge.Z,null)}[Qe?"collapsed":"expanded"],Ht=ct!==null?se||Fe.createElement("div",{className:`${ce}-trigger`,onClick:en,style:{width:he}},ct||$t):null,Xt=Object.assign(Object.assign({},pt),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),jt=ft()(ce,`${ce}-${kt}`,{[`${ce}-collapsed`]:!!Qe,[`${ce}-has-trigger`]:nn&&ct!==null&&!se,[`${ce}-below`]:!!Yt,[`${ce}-zero-width`]:parseFloat(he)===0},At);return Fe.createElement("aside",Object.assign({className:jt},le,{style:Xt,ref:je}),Fe.createElement("div",{className:`${ce}-children`},lt),nn||Yt&&se?Ht:null)},$e=Fe.useMemo(()=>({siderCollapsed:Qe}),[Qe]);return Fe.createElement(on.Provider,{value:$e},On())})},84321:function(kn,Vt,ae){"use strict";ae.d(Vt,{VY:function(){return it},$_:function(){return on},h4:function(){return xt},Gs:function(){return bt},ZP:function(){return yt}});var fe=ae(74902),Fe=ae(94184),Be=ae.n(Fe),Ye=ae(10366),ve=ae(67294),Ce=ae(53124),_e=ae(67968),ge=Ee=>{const{componentCls:de,bodyBg:je,lightSiderBg:ze,lightTriggerBg:At,lightTriggerColor:ct}=Ee;return{[`${de}-sider-light`]:{background:ze,[`${de}-sider-trigger`]:{color:ct,background:At},[`${de}-sider-zero-width-trigger`]:{color:ct,background:At,border:`1px solid ${je}`,borderInlineStart:0}}}};const Te=Ee=>{const{antCls:de,componentCls:je,colorText:ze,triggerColor:At,footerBg:ct,triggerBg:lt,headerHeight:Ze,headerPadding:kt,headerColor:pt,footerPadding:nn,triggerHeight:rt,zeroTriggerHeight:qt,zeroTriggerWidth:pn,motionDurationMid:cn,motionDurationSlow:Xe,fontSize:Me,borderRadius:mt,bodyBg:Gt,headerBg:hn,siderBg:Qe}=Ee;return{[je]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Gt,"&, *":{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:Qe,transition:`all ${cn}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${de}-menu${de}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:rt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:rt,color:At,lineHeight:`${rt}px`,textAlign:"center",background:lt,cursor:"pointer",transition:`all ${cn}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ze,insetInlineEnd:-pn,zIndex:1,width:pn,height:qt,color:At,fontSize:Ee.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Qe,borderStartStartRadius:0,borderStartEndRadius:mt,borderEndEndRadius:mt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Xe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Xe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-pn,borderStartStartRadius:mt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:mt}}}}},ge(Ee)),{"&-rtl":{direction:"rtl"}}),[`${je}-header`]:{height:Ze,padding:kt,color:pt,lineHeight:`${Ze}px`,background:hn,[`${de}-menu`]:{lineHeight:"inherit"}},[`${je}-footer`]:{padding:nn,color:ze,fontSize:Me,background:ct},[`${je}-content`]:{flex:"auto",minHeight:0}}};var ft=(0,_e.Z)("Layout",Ee=>[Te(Ee)],Ee=>{const{colorBgLayout:de,controlHeight:je,controlHeightLG:ze,colorText:At,controlHeightSM:ct,marginXXS:lt,colorTextLightSolid:Ze,colorBgContainer:kt}=Ee,pt=ze*1.25;return{colorBgHeader:"#001529",colorBgBody:de,colorBgTrigger:"#002140",bodyBg:de,headerBg:"#001529",headerHeight:je*2,headerPadding:`0 ${pt}px`,headerColor:At,footerPadding:`${ct}px ${pt}px`,footerBg:de,siderBg:"#001529",triggerHeight:ze+lt*2,triggerBg:"#002140",triggerColor:Ze,zeroTriggerWidth:ze,zeroTriggerHeight:ze,lightSiderBg:kt,lightTriggerBg:kt,lightTriggerColor:At}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Re=function(Ee,de){var je={};for(var ze in Ee)Object.prototype.hasOwnProperty.call(Ee,ze)&&de.indexOf(ze)<0&&(je[ze]=Ee[ze]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,ze=Object.getOwnPropertySymbols(Ee);At<ze.length;At++)de.indexOf(ze[At])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ze[At])&&(je[ze[At]]=Ee[ze[At]]);return je};const bt=ve.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ht(Ee){let{suffixCls:de,tagName:je,displayName:ze}=Ee;return At=>ve.forwardRef((lt,Ze)=>ve.createElement(At,Object.assign({ref:Ze,suffixCls:de,tagName:je},lt)))}const st=ve.forwardRef((Ee,de)=>{const{prefixCls:je,suffixCls:ze,className:At,tagName:ct}=Ee,lt=Re(Ee,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ze}=ve.useContext(Ce.E_),kt=Ze("layout",je),[pt,nn]=ft(kt),rt=ze?`${kt}-${ze}`:kt;return pt(ve.createElement(ct,Object.assign({className:Be()(je||rt,At,nn),ref:de},lt)))}),tt=ve.forwardRef((Ee,de)=>{const{direction:je}=ve.useContext(Ce.E_),[ze,At]=ve.useState([]),{prefixCls:ct,className:lt,rootClassName:Ze,children:kt,hasSider:pt,tagName:nn,style:rt}=Ee,qt=Re(Ee,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),pn=(0,Ye.Z)(qt,["suffixCls"]),{getPrefixCls:cn,layout:Xe}=ve.useContext(Ce.E_),Me=cn("layout",ct),[mt,Gt]=ft(Me),hn=Be()(Me,{[`${Me}-has-sider`]:typeof pt=="boolean"?pt:ze.length>0,[`${Me}-rtl`]:je==="rtl"},Xe==null?void 0:Xe.className,lt,Ze,Gt),Qe=ve.useMemo(()=>({siderHook:{addSider:ut=>{At(Yt=>[].concat((0,fe.Z)(Yt),[ut]))},removeSider:ut=>{At(Yt=>Yt.filter(Qt=>Qt!==ut))}}}),[]);return mt(ve.createElement(bt.Provider,{value:Qe},ve.createElement(nn,Object.assign({ref:de,className:hn,style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),rt)},pn),kt)))}),Le=ht({tagName:"div",displayName:"Layout"})(tt),xt=ht({suffixCls:"header",tagName:"header",displayName:"Header"})(st),on=ht({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(st),it=ht({suffixCls:"content",tagName:"main",displayName:"Content"})(st);var yt=Le},76529:function(kn,Vt,ae){"use strict";ae.d(Vt,{J:function(){return Ce}});var fe=ae(67294),Fe=ae(4173),Be=ae(60276),Ye=function(_e,we){var ge={};for(var Te in _e)Object.prototype.hasOwnProperty.call(_e,Te)&&we.indexOf(Te)<0&&(ge[Te]=_e[Te]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,Te=Object.getOwnPropertySymbols(_e);ft<Te.length;ft++)we.indexOf(Te[ft])<0&&Object.prototype.propertyIsEnumerable.call(_e,Te[ft])&&(ge[Te[ft]]=_e[Te[ft]]);return ge};const ve=fe.createContext(null),Ce=fe.forwardRef((_e,we)=>{const{children:ge}=_e,Te=Ye(_e,["children"]),ft=fe.useContext(ve),Re=fe.useMemo(()=>Object.assign(Object.assign({},ft),Te),[ft,Te.prefixCls,Te.mode,Te.selectable]);return fe.createElement(ve.Provider,{value:Re},fe.createElement(Fe.BR,null,(0,Be.supportNodeRef)(ge)?fe.cloneElement(ge,{ref:we}):ge))});Vt.Z=ve},68508:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return ce}});var fe=ae(78595),Fe=ae(67294),Be=ae(71322),Ye=ae(94184),ve=ae.n(Ye),Ce=ae(53124),_e=function(le,me){var he={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(he[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,se=Object.getOwnPropertySymbols(le);Ie<se.length;Ie++)me.indexOf(se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Ie])&&(he[se[Ie]]=le[se[Ie]]);return he},ge=le=>{const{prefixCls:me,className:he,dashed:se}=le,Ie=_e(le,["prefixCls","className","dashed"]),{getPrefixCls:et}=Fe.useContext(Ce.E_),$t=et("menu",me),Ht=ve()({[`${$t}-item-divider-dashed`]:!!se},he);return Fe.createElement(fe.iz,Object.assign({className:Ht},Ie))},Te=ae(37419),ft=ae(10366),Re=ae(83062),bt=ae(96159),st=(0,Fe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Le=le=>{var me;const{className:he,children:se,icon:Ie,title:et,danger:$t}=le,{prefixCls:Ht,firstLevel:Xt,direction:jt,disableMenuItemTitleTooltip:rn,inlineCollapsed:qn}=Fe.useContext(st),lr=sn=>{const tr=Fe.createElement("span",{className:`${Ht}-title-content`},se);return(!Ie||(0,bt.l$)(se)&&se.type==="span")&&se&&sn&&Xt&&typeof se=="string"?Fe.createElement("div",{className:`${Ht}-inline-collapsed-noicon`},se.charAt(0)):tr},{siderCollapsed:Bt}=Fe.useContext(Be.D);let Sn=et;typeof et=="undefined"?Sn=Xt?se:"":et===!1&&(Sn="");const dr={title:Sn};!Bt&&!qn&&(dr.title=null,dr.open=!1);const Wr=(0,Te.Z)(se).length;let gt=Fe.createElement(fe.ck,Object.assign({},(0,ft.Z)(le,["title","icon","danger"]),{className:ve()({[`${Ht}-item-danger`]:$t,[`${Ht}-item-only-child`]:(Ie?Wr+1:Wr)===1},he),title:typeof et=="string"?et:void 0}),(0,bt.Tm)(Ie,{className:ve()((0,bt.l$)(Ie)?(me=Ie.props)===null||me===void 0?void 0:me.className:"",`${Ht}-item-icon`)}),lr(qn));return rn||(gt=Fe.createElement(Re.Z,Object.assign({},dr,{placement:jt==="rtl"?"left":"right",overlayClassName:`${Ht}-inline-collapsed-tooltip`}),gt)),gt},on=le=>{var me;const{popupClassName:he,icon:se,title:Ie,theme:et}=le,$t=Fe.useContext(st),{prefixCls:Ht,inlineCollapsed:Xt,theme:jt}=$t,rn=(0,fe.Xl)();let qn;if(!se)qn=Xt&&!rn.length&&Ie&&typeof Ie=="string"?Fe.createElement("div",{className:`${Ht}-inline-collapsed-noicon`},Ie.charAt(0)):Fe.createElement("span",{className:`${Ht}-title-content`},Ie);else{const Bt=(0,bt.l$)(Ie)&&Ie.type==="span";qn=Fe.createElement(Fe.Fragment,null,(0,bt.Tm)(se,{className:ve()((0,bt.l$)(se)?(me=se.props)===null||me===void 0?void 0:me.className:"",`${Ht}-item-icon`)}),Bt?Ie:Fe.createElement("span",{className:`${Ht}-title-content`},Ie))}const lr=Fe.useMemo(()=>Object.assign(Object.assign({},$t),{firstLevel:!1}),[$t]);return Fe.createElement(st.Provider,{value:lr},Fe.createElement(fe.Wd,Object.assign({},(0,ft.Z)(le,["icon"]),{title:qn,popupClassName:ve()(Ht,he,`${Ht}-${et||jt}`)})))},it=ae(25877),yt=ae(60276),Ee=ae(33603),de=ae(76529),je=function(le,me){var he={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(he[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,se=Object.getOwnPropertySymbols(le);Ie<se.length;Ie++)me.indexOf(se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Ie])&&(he[se[Ie]]=le[se[Ie]]);return he};function ze(le){return(le||[]).map((me,he)=>{if(me&&typeof me=="object"){const se=me,{label:Ie,children:et,key:$t,type:Ht}=se,Xt=je(se,["label","children","key","type"]),jt=$t!=null?$t:`tmp-${he}`;return et||Ht==="group"?Ht==="group"?Fe.createElement(fe.BW,Object.assign({key:jt},Xt,{title:Ie}),ze(et)):Fe.createElement(on,Object.assign({key:jt},Xt,{title:Ie}),ze(et)):Ht==="divider"?Fe.createElement(ge,Object.assign({key:jt},Xt)):Fe.createElement(Le,Object.assign({key:jt},Xt),Ie)}return null}).filter(me=>me)}function At(le){return Fe.useMemo(()=>le&&ze(le),[le])}var ct=ae(84780),lt=ae(14747),Ze=ae(33507),kt=ae(67771),pt=ae(50438),nn=ae(67968),rt=ae(45503),pn=le=>{const{componentCls:me,motionDurationSlow:he,horizontalLineHeight:se,colorSplit:Ie,lineWidth:et,lineType:$t,itemPaddingInline:Ht}=le;return{[`${me}-horizontal`]:{lineHeight:se,border:0,borderBottom:`${et}px ${$t} ${Ie}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${me}-item, ${me}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ht},[`> ${me}-item:hover,
> ${me}-item-active,
> ${me}-submenu ${me}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${me}-item, ${me}-submenu-title`]:{transition:[`border-color ${he}`,`background ${he}`].join(",")},[`${me}-submenu-arrow`]:{display:"none"}}}},Xe=le=>{let{componentCls:me,menuArrowOffset:he}=le;return{[`${me}-rtl`]:{direction:"rtl"},[`${me}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${me}-rtl${me}-vertical,
${me}-submenu-rtl ${me}-vertical`]:{[`${me}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${he})`},"&::after":{transform:`rotate(45deg) translateY(${he})`}}}}};const Me=le=>Object.assign({},(0,lt.oN)(le));var Gt=(le,me)=>{const{componentCls:he,itemColor:se,itemSelectedColor:Ie,groupTitleColor:et,itemBg:$t,subMenuItemBg:Ht,itemSelectedBg:Xt,activeBarHeight:jt,activeBarWidth:rn,activeBarBorderWidth:qn,motionDurationSlow:lr,motionEaseInOut:Bt,motionEaseOut:Sn,itemPaddingInline:dr,motionDurationMid:Wr,itemHoverColor:gt,lineType:sn,colorSplit:tr,itemDisabledColor:Zn,dangerItemColor:xr,dangerItemHoverColor:Kr,dangerItemSelectedColor:Jr,dangerItemActiveBg:Zr,dangerItemSelectedBg:ei,itemHoverBg:pi,itemActiveBg:kr,menuSubMenuBg:Ti,horizontalItemSelectedColor:na,horizontalItemSelectedBg:ea,horizontalItemBorderRadius:oa,horizontalItemHoverBg:Li,popupBg:Dt}=le;return{[`${he}-${me}, ${he}-${me} > ${he}`]:{color:se,background:$t,[`&${he}-root:focus-visible`]:Object.assign({},Me(le)),[`${he}-item-group-title`]:{color:et},[`${he}-submenu-selected`]:{[`> ${he}-submenu-title`]:{color:Ie}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{color:`${Zn} !important`},[`${he}-item:not(${he}-item-selected):not(${he}-submenu-selected)`]:{[`&:hover, > ${he}-submenu-title:hover`]:{color:gt}},[`&:not(${he}-horizontal)`]:{[`${he}-item:not(${he}-item-selected)`]:{"&:hover":{backgroundColor:pi},"&:active":{backgroundColor:kr}},[`${he}-submenu-title`]:{"&:hover":{backgroundColor:pi},"&:active":{backgroundColor:kr}}},[`${he}-item-danger`]:{color:xr,[`&${he}-item:hover`]:{[`&:not(${he}-item-selected):not(${he}-submenu-selected)`]:{color:Kr}},[`&${he}-item:active`]:{background:Zr}},[`${he}-item a`]:{"&, &:hover":{color:"inherit"}},[`${he}-item-selected`]:{color:Ie,[`&${he}-item-danger`]:{color:Jr},"a, a:hover":{color:"inherit"}},[`& ${he}-item-selected`]:{backgroundColor:Xt,[`&${he}-item-danger`]:{backgroundColor:ei}},[`${he}-item, ${he}-submenu-title`]:{[`&:not(${he}-item-disabled):focus-visible`]:Object.assign({},Me(le))},[`&${he}-submenu > ${he}`]:{backgroundColor:Ti},[`&${he}-popup > ${he}`]:{backgroundColor:Dt},[`&${he}-horizontal`]:Object.assign(Object.assign({},me==="dark"?{borderBottom:0}:{}),{[`> ${he}-item, > ${he}-submenu`]:{top:qn,marginTop:-qn,marginBottom:0,borderRadius:oa,"&::after":{position:"absolute",insetInline:dr,bottom:0,borderBottom:`${jt}px solid transparent`,transition:`border-color ${lr} ${Bt}`,content:'""'},"&:hover, &-active, &-open":{background:Li,"&::after":{borderBottomWidth:jt,borderBottomColor:na}},"&-selected":{color:na,backgroundColor:ea,"&:hover":{backgroundColor:ea},"&::after":{borderBottomWidth:jt,borderBottomColor:na}}}}),[`&${he}-root`]:{[`&${he}-inline, &${he}-vertical`]:{borderInlineEnd:`${qn}px ${sn} ${tr}`}},[`&${he}-inline`]:{[`${he}-sub${he}-inline`]:{background:Ht},[`${he}-item, ${he}-submenu-title`]:qn&&rn?{width:`calc(100% + ${qn}px)`}:{},[`${he}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${rn}px solid ${Ie}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Wr} ${Sn}`,`opacity ${Wr} ${Sn}`].join(","),content:'""'},[`&${he}-item-danger`]:{"&::after":{borderInlineEndColor:Jr}}},[`${he}-selected, ${he}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Wr} ${Bt}`,`opacity ${Wr} ${Bt}`].join(",")}}}}}};const hn=le=>{const{componentCls:me,itemHeight:he,itemMarginInline:se,padding:Ie,menuArrowSize:et,marginXS:$t,itemMarginBlock:Ht}=le,Xt=Ie+et+$t;return{[`${me}-item`]:{position:"relative",overflow:"hidden"},[`${me}-item, ${me}-submenu-title`]:{height:he,lineHeight:`${he}px`,paddingInline:Ie,overflow:"hidden",textOverflow:"ellipsis",marginInline:se,marginBlock:Ht,width:`calc(100% - ${se*2}px)`},[`> ${me}-item,
> ${me}-submenu > ${me}-submenu-title`]:{height:he,lineHeight:`${he}px`},[`${me}-item-group-list ${me}-submenu-title,
${me}-submenu-title`]:{paddingInlineEnd:Xt}}};var ut=le=>{const{componentCls:me,iconCls:he,itemHeight:se,colorTextLightSolid:Ie,dropdownWidth:et,controlHeightLG:$t,motionDurationMid:Ht,motionEaseOut:Xt,paddingXL:jt,itemMarginInline:rn,fontSizeLG:qn,motionDurationSlow:lr,paddingXS:Bt,boxShadowSecondary:Sn,collapsedWidth:dr,collapsedIconSize:Wr}=le,gt={height:se,lineHeight:`${se}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[me]:{"&-inline, &-vertical":Object.assign({[`&${me}-root`]:{boxShadow:"none"}},hn(le))},[`${me}-submenu-popup`]:{[`${me}-vertical`]:Object.assign(Object.assign({},hn(le)),{boxShadow:Sn})}},{[`${me}-submenu-popup ${me}-vertical${me}-sub`]:{minWidth:et,maxHeight:`calc(100vh - ${$t*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${me}-inline`]:{width:"100%",[`&${me}-root`]:{[`${me}-item, ${me}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${lr}`,`background ${lr}`,`padding ${Ht} ${Xt}`].join(","),[`> ${me}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${me}-sub${me}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${me}-submenu > ${me}-submenu-title`]:gt,[`& ${me}-item-group-title`]:{paddingInlineStart:jt}},[`${me}-item`]:gt}},{[`${me}-inline-collapsed`]:{width:dr,[`&${me}-root`]:{[`${me}-item, ${me}-submenu ${me}-submenu-title`]:{[`> ${me}-inline-collapsed-noicon`]:{fontSize:qn,textAlign:"center"}}},[`> ${me}-item,
> ${me}-item-group > ${me}-item-group-list > ${me}-item,
> ${me}-item-group > ${me}-item-group-list > ${me}-submenu > ${me}-submenu-title,
> ${me}-submenu > ${me}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${qn/2}px - ${rn}px)`,textOverflow:"clip",[`
${me}-submenu-arrow,
${me}-submenu-expand-icon
`]:{opacity:0},[`${me}-item-icon, ${he}`]:{margin:0,fontSize:Wr,lineHeight:`${se}px`,"+ span":{display:"inline-block",opacity:0}}},[`${me}-item-icon, ${he}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${me}-item-icon, ${he}`]:{display:"none"},"a, a:hover":{color:Ie}},[`${me}-item-group-title`]:Object.assign(Object.assign({},lt.vS),{paddingInline:Bt})}}]};const Yt=le=>{const{componentCls:me,motionDurationSlow:he,motionDurationMid:se,motionEaseInOut:Ie,motionEaseOut:et,iconCls:$t,iconSize:Ht,iconMarginInlineEnd:Xt}=le;return{[`${me}-item, ${me}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${he}`,`background ${he}`,`padding ${he} ${Ie}`].join(","),[`${me}-item-icon, ${$t}`]:{minWidth:Ht,fontSize:Ht,transition:[`font-size ${se} ${et}`,`margin ${he} ${Ie}`,`color ${he}`].join(","),"+ span":{marginInlineStart:Xt,opacity:1,transition:[`opacity ${he} ${Ie}`,`margin ${he}`,`color ${he}`].join(",")}},[`${me}-item-icon`]:Object.assign({},(0,lt.Ro)()),[`&${me}-item-only-child`]:{[`> ${$t}, > ${me}-item-icon`]:{marginInlineEnd:0}}},[`${me}-item-disabled, ${me}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${me}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Qt=le=>{const{componentCls:me,motionDurationSlow:he,motionEaseInOut:se,borderRadius:Ie,menuArrowSize:et,menuArrowOffset:$t}=le;return{[`${me}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:et,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${he} ${se}, opacity ${he}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:et*.6,height:et*.15,backgroundColor:"currentcolor",borderRadius:Ie,transition:[`background ${he} ${se}`,`transform ${he} ${se}`,`top ${he} ${se}`,`color ${he} ${se}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${$t})`},"&::after":{transform:`rotate(-45deg) translateY(${$t})`}}}}},tn=le=>{const{antCls:me,componentCls:he,fontSize:se,motionDurationSlow:Ie,motionDurationMid:et,motionEaseInOut:$t,paddingXS:Ht,padding:Xt,colorSplit:jt,lineWidth:rn,zIndexPopup:qn,borderRadiusLG:lr,subMenuItemBorderRadius:Bt,menuArrowSize:Sn,menuArrowOffset:dr,lineType:Wr,menuPanelMaskInset:gt,groupTitleLineHeight:sn,groupTitleFontSize:tr}=le;return[{"":{[`${he}`]:Object.assign(Object.assign({},(0,lt.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,lt.Wf)(le)),(0,lt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:se,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:`${Ht}px ${Xt}px`,fontSize:tr,lineHeight:sn,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 ${et} ${$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:jt,borderStyle:Wr,borderWidth:0,borderTopWidth:rn,marginBlock:rn,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Yt(le)),{[`${he}-item-group`]:{[`${he}-item-group-list`]:{margin:0,padding:0,[`${he}-item, ${he}-submenu-title`]:{paddingInline:`${se*2}px ${Xt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:qn,borderRadius:lr,boxShadow:"none",transformOrigin:"0 0",[`&${he}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${gt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:gt},"\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:lr},Yt(le)),Qt(le)),{[`${he}-item, ${he}-submenu > ${he}-submenu-title`]:{borderRadius:Bt},[`${he}-submenu-title::after`]:{transition:`transform ${Ie} ${$t}`}})}}),Qt(le)),{[`&-inline-collapsed ${he}-submenu-arrow,
&-inline ${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${dr})`},"&::after":{transform:`rotate(45deg) translateX(-${dr})`}},[`${he}-submenu-open${he}-submenu-inline > ${he}-submenu-title > ${he}-submenu-arrow`]:{transform:`translateY(-${Sn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${dr})`},"&::before":{transform:`rotate(45deg) translateX(${dr})`}}})},{[`${me}-layout-header`]:{[he]:{lineHeight:"inherit"}}}]};var _t=(le,me)=>(0,nn.Z)("Menu",se=>{if(me===!1)return[];const{colorBgElevated:Ie,colorPrimary:et,colorTextLightSolid:$t,controlHeightLG:Ht,fontSize:Xt,darkItemColor:jt,darkDangerItemColor:rn,darkItemBg:qn,darkSubMenuItemBg:lr,darkItemSelectedColor:Bt,darkItemSelectedBg:Sn,darkDangerItemSelectedBg:dr,darkItemHoverBg:Wr,darkGroupTitleColor:gt,darkItemHoverColor:sn,darkItemDisabledColor:tr,darkDangerItemHoverColor:Zn,darkDangerItemSelectedColor:xr,darkDangerItemActiveBg:Kr}=se,Jr=Xt/7*5,Zr=(0,rt.TS)(se,{menuArrowSize:Jr,menuHorizontalHeight:Ht*1.15,menuArrowOffset:`${Jr*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Ie}),ei=(0,rt.TS)(Zr,{itemColor:jt,itemHoverColor:sn,groupTitleColor:gt,itemSelectedColor:Bt,itemBg:qn,popupBg:qn,subMenuItemBg:lr,itemActiveBg:"transparent",itemSelectedBg:Sn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Wr,itemDisabledColor:tr,dangerItemColor:rn,dangerItemHoverColor:Zn,dangerItemSelectedColor:xr,dangerItemActiveBg:Kr,dangerItemSelectedBg:dr,menuSubMenuBg:lr,horizontalItemSelectedColor:$t,horizontalItemSelectedBg:et});return[tn(Zr),pn(Zr),ut(Zr),Gt(Zr,"light"),Gt(ei,"dark"),Xe(Zr),(0,Ze.Z)(Zr),(0,kt.oN)(Zr,"slide-up"),(0,kt.oN)(Zr,"slide-down"),(0,pt._y)(Zr,"zoom-big")]},se=>{const{colorPrimary:Ie,colorError:et,colorTextDisabled:$t,colorErrorBg:Ht,colorText:Xt,colorTextDescription:jt,colorBgContainer:rn,colorFillAlter:qn,colorFillContent:lr,lineWidth:Bt,lineWidthBold:Sn,controlItemBgActive:dr,colorBgTextHover:Wr,controlHeightLG:gt,lineHeight:sn,colorBgElevated:tr,marginXXS:Zn,padding:xr,fontSize:Kr,controlHeightSM:Jr,fontSizeLG:Zr,colorTextLightSolid:ei,colorErrorHover:pi}=se,kr=new ct.C(ei).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:se.zIndexPopupBase+50,radiusItem:se.borderRadiusLG,itemBorderRadius:se.borderRadiusLG,radiusSubMenuItem:se.borderRadiusSM,subMenuItemBorderRadius:se.borderRadiusSM,colorItemText:Xt,itemColor:Xt,colorItemTextHover:Xt,itemHoverColor:Xt,colorItemTextHoverHorizontal:Ie,horizontalItemHoverColor:Ie,colorGroupTitle:jt,groupTitleColor:jt,colorItemTextSelected:Ie,itemSelectedColor:Ie,colorItemTextSelectedHorizontal:Ie,horizontalItemSelectedColor:Ie,colorItemBg:rn,itemBg:rn,colorItemBgHover:Wr,itemHoverBg:Wr,colorItemBgActive:lr,itemActiveBg:dr,colorSubItemBg:qn,subMenuItemBg:qn,colorItemBgSelected:dr,itemSelectedBg:dr,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Sn,activeBarHeight:Sn,colorActiveBarBorderSize:Bt,activeBarBorderWidth:Bt,colorItemTextDisabled:$t,itemDisabledColor:$t,colorDangerItemText:et,dangerItemColor:et,colorDangerItemTextHover:et,dangerItemHoverColor:et,colorDangerItemTextSelected:et,dangerItemSelectedColor:et,colorDangerItemBgActive:Ht,dangerItemActiveBg:Ht,colorDangerItemBgSelected:Ht,dangerItemSelectedBg:Ht,itemMarginInline:se.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:gt,groupTitleLineHeight:sn,collapsedWidth:gt*2,popupBg:tr,itemMarginBlock:Zn,itemPaddingInline:xr,horizontalLineHeight:`${gt*1.15}px`,iconSize:Kr,iconMarginInlineEnd:Jr-Kr,collapsedIconSize:Zr,groupTitleFontSize:Kr,darkItemDisabledColor:new ct.C(ei).setAlpha(.25).toRgbString(),darkItemColor:kr,darkDangerItemColor:et,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:ei,darkItemSelectedBg:Ie,darkDangerItemSelectedBg:et,darkItemHoverBg:"transparent",darkGroupTitleColor:kr,darkItemHoverColor:ei,darkDangerItemHoverColor:pi,darkDangerItemSelectedColor:ei,darkDangerItemActiveBg:et}},{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),en=function(le,me){var he={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&me.indexOf(se)<0&&(he[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,se=Object.getOwnPropertySymbols(le);Ie<se.length;Ie++)me.indexOf(se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Ie])&&(he[se[Ie]]=le[se[Ie]]);return he},On=(0,Fe.forwardRef)((le,me)=>{var he,se;const Ie=Fe.useContext(de.Z),et=Ie||{},{getPrefixCls:$t,getPopupContainer:Ht,direction:Xt,menu:jt}=Fe.useContext(Ce.E_),rn=$t(),{prefixCls:qn,className:lr,style:Bt,theme:Sn="light",expandIcon:dr,_internalDisableMenuItemTitleTooltip:Wr,inlineCollapsed:gt,siderCollapsed:sn,items:tr,children:Zn,rootClassName:xr,mode:Kr,selectable:Jr,onClick:Zr,overflowedIndicatorPopupClassName:ei}=le,pi=en(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),kr=(0,ft.Z)(pi,["collapsedWidth"]),Ti=At(tr)||Zn;(he=et.validator)===null||he===void 0||he.call(et,{mode:Kr});const na=(0,yt.useEvent)(function(){var nr;Zr==null||Zr.apply(void 0,arguments),(nr=et.onClick)===null||nr===void 0||nr.call(et)}),ea=et.mode||Kr,oa=Jr!=null?Jr:et.selectable,Li=Fe.useMemo(()=>sn!==void 0?sn:gt,[gt,sn]),Dt={horizontal:{motionName:`${rn}-slide-up`},inline:(0,Ee.Z)(rn),other:{motionName:`${rn}-zoom-big`}},Hn=$t("menu",qn||et.prefixCls),[Vn,Gn]=_t(Hn,!Ie),Lr=ve()(`${Hn}-${Sn}`,jt==null?void 0:jt.className,lr);let yr;if(typeof dr=="function")yr=dr;else if(dr===null||dr===!1)yr=null;else if(et.expandIcon===null||et.expandIcon===!1)yr=null;else{const nr=dr!=null?dr:et.expandIcon;yr=(0,bt.Tm)(nr,{className:ve()(`${Hn}-submenu-expand-icon`,(0,bt.l$)(nr)?(se=nr.props)===null||se===void 0?void 0:se.className:"")})}const Pr=Fe.useMemo(()=>({prefixCls:Hn,inlineCollapsed:Li||!1,direction:Xt,firstLevel:!0,theme:Sn,mode:ea,disableMenuItemTitleTooltip:Wr}),[Hn,Li,Xt,Wr,Sn]);return Vn(Fe.createElement(de.Z.Provider,{value:null},Fe.createElement(st.Provider,{value:Pr},Fe.createElement(fe.ZP,Object.assign({getPopupContainer:Ht,overflowedIndicator:Fe.createElement(it.Z,null),overflowedIndicatorPopupClassName:ve()(Hn,`${Hn}-${Sn}`,ei),mode:ea,selectable:oa,onClick:na},kr,{inlineCollapsed:Li,style:Object.assign(Object.assign({},jt==null?void 0:jt.style),Bt),className:Lr,prefixCls:Hn,direction:Xt,defaultMotions:Dt,expandIcon:yr,ref:me,rootClassName:ve()(xr,Gn)}),Ti))))});const $e=(0,Fe.forwardRef)((le,me)=>{const he=(0,Fe.useRef)(null),se=Fe.useContext(Be.D);return(0,Fe.useImperativeHandle)(me,()=>({menu:he.current,focus:Ie=>{var et;(et=he.current)===null||et===void 0||et.focus(Ie)}})),Fe.createElement(On,Object.assign({ref:he},le,se))});$e.Item=Le,$e.SubMenu=on,$e.Divider=ge,$e.ItemGroup=fe.BW;var ce=$e},38703:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Wr}});var fe=ae(67294),Fe=ae(87725),Be=ae(18299),Ye=ae(16646),ve=ae(73475),Ce=ae(94184),_e=ae.n(Ce),we=ae(10366),ge=ae(53124),Te=ae(87462),ft=ae(1413),Re=ae(45987),bt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ht=function(){var sn=(0,fe.useRef)([]),tr=(0,fe.useRef)(null);return(0,fe.useEffect)(function(){var Zn=Date.now(),xr=!1;sn.current.forEach(function(Kr){if(Kr){xr=!0;var Jr=Kr.style;Jr.transitionDuration=".3s, .3s, .3s, .06s",tr.current&&Zn-tr.current<100&&(Jr.transitionDuration="0s, 0s")}}),xr&&(tr.current=Date.now())}),sn.current},st=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],tt=function(sn){var tr=(0,ft.Z)((0,ft.Z)({},bt),sn),Zn=tr.className,xr=tr.percent,Kr=tr.prefixCls,Jr=tr.strokeColor,Zr=tr.strokeLinecap,ei=tr.strokeWidth,pi=tr.style,kr=tr.trailColor,Ti=tr.trailWidth,na=tr.transition,ea=(0,Re.Z)(tr,st);delete ea.gapPosition;var oa=Array.isArray(xr)?xr:[xr],Li=Array.isArray(Jr)?Jr:[Jr],Dt=ht(),Hn=ei/2,Vn=100-ei/2,Gn="M ".concat(Zr==="round"?Hn:0,",").concat(Hn,`
L `).concat(Zr==="round"?Vn:100,",").concat(Hn),Lr="0 0 100 ".concat(ei),yr=0;return fe.createElement("svg",(0,Te.Z)({className:_e()("".concat(Kr,"-line"),Zn),viewBox:Lr,preserveAspectRatio:"none",style:pi},ea),fe.createElement("path",{className:"".concat(Kr,"-line-trail"),d:Gn,strokeLinecap:Zr,stroke:kr,strokeWidth:Ti||ei,fillOpacity:"0"}),oa.map(function(Pr,nr){var ot=1;switch(Zr){case"round":ot=1-ei/100;break;case"square":ot=1-ei/2/100;break;default:ot=1;break}var Ct={strokeDasharray:"".concat(Pr*ot,"px, 100px"),strokeDashoffset:"-".concat(yr,"px"),transition:na||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},zt=Li[nr]||Li[Li.length-1];return yr+=Pr,fe.createElement("path",{key:nr,className:"".concat(Kr,"-line-path"),d:Gn,strokeLinecap:Zr,stroke:zt,strokeWidth:ei,fillOpacity:"0",ref:function(Je){Dt[nr]=Je},style:Ct})}))},Le=tt,xt=ae(71002),on=ae(97685),it=ae(98924),yt=0,Ee=(0,it.Z)();function de(){var gt;return Ee?(gt=yt,yt+=1):gt="TEST_OR_SSR",gt}var je=function(gt){var sn=fe.useState(),tr=(0,on.Z)(sn,2),Zn=tr[0],xr=tr[1];return fe.useEffect(function(){xr("rc_progress_".concat(de()))},[]),gt||Zn},ze=function(sn){var tr=sn.bg,Zn=sn.children;return fe.createElement("div",{style:{width:"100%",height:"100%",background:tr}},Zn)};function At(gt,sn){return Object.keys(gt).map(function(tr){var Zn=parseFloat(tr),xr="".concat(Math.floor(Zn*sn),"%");return"".concat(gt[tr]," ").concat(xr)})}var ct=fe.forwardRef(function(gt,sn){var tr=gt.prefixCls,Zn=gt.color,xr=gt.gradientId,Kr=gt.radius,Jr=gt.style,Zr=gt.ptg,ei=gt.strokeLinecap,pi=gt.strokeWidth,kr=gt.size,Ti=gt.gapDegree,na=Zn&&(0,xt.Z)(Zn)==="object",ea=na?"#FFF":void 0,oa=kr/2,Li=fe.createElement("circle",{className:"".concat(tr,"-circle-path"),r:Kr,cx:oa,cy:oa,stroke:ea,strokeLinecap:ei,strokeWidth:pi,opacity:Zr===0?0:1,style:Jr,ref:sn});if(!na)return Li;var Dt="".concat(xr,"-conic"),Hn=Ti?"".concat(180+Ti/2,"deg"):"0deg",Vn=At(Zn,(360-Ti)/360),Gn=At(Zn,1),Lr="conic-gradient(from ".concat(Hn,", ").concat(Vn.join(", "),")"),yr="linear-gradient(to ".concat(Ti?"bottom":"top",", ").concat(Gn.join(", "),")");return fe.createElement(fe.Fragment,null,fe.createElement("mask",{id:Dt},Li),fe.createElement("foreignObject",{x:0,y:0,width:kr,height:kr,mask:"url(#".concat(Dt,")")},fe.createElement(ze,{bg:yr},fe.createElement(ze,{bg:Lr}))))}),lt=ct,Ze=100,kt=function(sn,tr,Zn,xr,Kr,Jr,Zr,ei,pi,kr){var Ti=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,na=Zn/100*360*((360-Jr)/360),ea=Jr===0?0:{bottom:0,top:180,left:90,right:-90}[Zr],oa=(100-xr)/100*tr;pi==="round"&&xr!==100&&(oa+=kr/2,oa>=tr&&(oa=tr-.01));var Li=Ze/2;return{stroke:typeof ei=="string"?ei:void 0,strokeDasharray:"".concat(tr,"px ").concat(sn),strokeDashoffset:oa+Ti,transform:"rotate(".concat(Kr+na+ea,"deg)"),transformOrigin:"".concat(Li,"px ").concat(Li,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},pt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function nn(gt){var sn=gt!=null?gt:[];return Array.isArray(sn)?sn:[sn]}var rt=function(sn){var tr=(0,ft.Z)((0,ft.Z)({},bt),sn),Zn=tr.id,xr=tr.prefixCls,Kr=tr.steps,Jr=tr.strokeWidth,Zr=tr.trailWidth,ei=tr.gapDegree,pi=ei===void 0?0:ei,kr=tr.gapPosition,Ti=tr.trailColor,na=tr.strokeLinecap,ea=tr.style,oa=tr.className,Li=tr.strokeColor,Dt=tr.percent,Hn=(0,Re.Z)(tr,pt),Vn=Ze/2,Gn=je(Zn),Lr="".concat(Gn,"-gradient"),yr=Vn-Jr/2,Pr=Math.PI*2*yr,nr=pi>0?90+pi/2:-90,ot=Pr*((360-pi)/360),Ct=(0,xt.Z)(Kr)==="object"?Kr:{count:Kr,space:2},zt=Ct.count,un=Ct.space,Je=nn(Dt),Mt=nn(Li),ln=Mt.find(function(vr){return vr&&(0,xt.Z)(vr)==="object"}),Jt=ln&&(0,xt.Z)(ln)==="object",vn=Jt?"butt":na,bn=kt(Pr,ot,0,100,nr,pi,kr,Ti,vn,Jr),Fn=ht(),Nr=function(){var Ir=0;return Je.map(function(_r,Lt){var wt=Mt[Lt]||Mt[Mt.length-1],Ot=kt(Pr,ot,Ir,_r,nr,pi,kr,wt,vn,Jr);return Ir+=_r,fe.createElement(lt,{key:Lt,color:wt,ptg:_r,radius:yr,prefixCls:xr,gradientId:Lr,style:Ot,strokeLinecap:vn,strokeWidth:Jr,gapDegree:pi,ref:function(er){Fn[Lt]=er},size:Ze})}).reverse()},Sr=function(){var Ir=Math.round(zt*(Je[0]/100)),_r=100/zt,Lt=0;return new Array(zt).fill(null).map(function(wt,Ot){var Dn=Ot<=Ir-1?Mt[0]:Ti,er=Dn&&(0,xt.Z)(Dn)==="object"?"url(#".concat(Lr,")"):void 0,An=kt(Pr,ot,Lt,_r,nr,pi,kr,Dn,"butt",Jr,un);return Lt+=(ot-An.strokeDashoffset+un)*100/ot,fe.createElement("circle",{key:Ot,className:"".concat(xr,"-circle-path"),r:yr,cx:Vn,cy:Vn,stroke:er,strokeWidth:Jr,opacity:1,style:An,ref:function(Nn){Fn[Ot]=Nn}})})};return fe.createElement("svg",(0,Te.Z)({className:_e()("".concat(xr,"-circle"),oa),viewBox:"0 0 ".concat(Ze," ").concat(Ze),style:ea,id:Zn,role:"presentation"},Hn),!zt&&fe.createElement("circle",{className:"".concat(xr,"-circle-trail"),r:yr,cx:Vn,cy:Vn,stroke:Ti,strokeLinecap:vn,strokeWidth:Zr||Jr,style:bn}),zt?Sr():Nr())},qt=rt,pn={Line:Le,Circle:qt},cn=ae(83062),Xe=ae(16397);function Me(gt){return!gt||gt<0?0:gt>100?100:gt}function mt(gt){let{success:sn,successPercent:tr}=gt,Zn=tr;return sn&&"progress"in sn&&(Zn=sn.progress),sn&&"percent"in sn&&(Zn=sn.percent),Zn}const Gt=gt=>{let{percent:sn,success:tr,successPercent:Zn}=gt;const xr=Me(mt({success:tr,successPercent:Zn}));return[xr,Me(Me(sn)-xr)]},hn=gt=>{let{success:sn={},strokeColor:tr}=gt;const{strokeColor:Zn}=sn;return[Zn||Xe.presetPrimaryColors.green,tr||null]},Qe=(gt,sn,tr)=>{var Zn,xr,Kr,Jr;let Zr=-1,ei=-1;if(sn==="step"){const pi=tr.steps,kr=tr.strokeWidth;typeof gt=="string"||typeof gt=="undefined"?(Zr=gt==="small"?2:14,ei=kr!=null?kr:8):typeof gt=="number"?[Zr,ei]=[gt,gt]:[Zr=14,ei=8]=gt,Zr*=pi}else if(sn==="line"){const pi=tr==null?void 0:tr.strokeWidth;typeof gt=="string"||typeof gt=="undefined"?ei=pi||(gt==="small"?6:8):typeof gt=="number"?[Zr,ei]=[gt,gt]:[Zr=-1,ei=8]=gt}else(sn==="circle"||sn==="dashboard")&&(typeof gt=="string"||typeof gt=="undefined"?[Zr,ei]=gt==="small"?[60,60]:[120,120]:typeof gt=="number"?[Zr,ei]=[gt,gt]:(Zr=(xr=(Zn=gt[0])!==null&&Zn!==void 0?Zn:gt[1])!==null&&xr!==void 0?xr:120,ei=(Jr=(Kr=gt[0])!==null&&Kr!==void 0?Kr:gt[1])!==null&&Jr!==void 0?Jr:120));return[Zr,ei]},ut=3,Yt=gt=>ut/gt*100;var tn=gt=>{const{prefixCls:sn,trailColor:tr=null,strokeLinecap:Zn="round",gapPosition:xr,gapDegree:Kr,width:Jr=120,type:Zr,children:ei,success:pi,size:kr=Jr}=gt,[Ti,na]=Qe(kr,"circle");let{strokeWidth:ea}=gt;ea===void 0&&(ea=Math.max(Yt(Ti),6));const oa={width:Ti,height:na,fontSize:Ti*.15+6},Li=fe.useMemo(()=>{if(Kr||Kr===0)return Kr;if(Zr==="dashboard")return 75},[Kr,Zr]),Dt=xr||Zr==="dashboard"&&"bottom"||void 0,Hn=Object.prototype.toString.call(gt.strokeColor)==="[object Object]",Vn=hn({success:pi,strokeColor:gt.strokeColor}),Gn=_e()(`${sn}-inner`,{[`${sn}-circle-gradient`]:Hn}),Lr=fe.createElement(qt,{percent:Gt(gt),strokeWidth:ea,trailWidth:ea,strokeColor:Vn,strokeLinecap:Zn,trailColor:tr,prefixCls:sn,gapDegree:Li,gapPosition:Dt});return fe.createElement("div",{className:Gn,style:oa},Ti<=20?fe.createElement(cn.Z,{title:ei},fe.createElement("span",null,Lr)):fe.createElement(fe.Fragment,null,Lr,ei))},_t=function(gt,sn){var tr={};for(var Zn in gt)Object.prototype.hasOwnProperty.call(gt,Zn)&&sn.indexOf(Zn)<0&&(tr[Zn]=gt[Zn]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xr=0,Zn=Object.getOwnPropertySymbols(gt);xr<Zn.length;xr++)sn.indexOf(Zn[xr])<0&&Object.prototype.propertyIsEnumerable.call(gt,Zn[xr])&&(tr[Zn[xr]]=gt[Zn[xr]]);return tr};const en=gt=>{let sn=[];return Object.keys(gt).forEach(tr=>{const Zn=parseFloat(tr.replace(/%/g,""));isNaN(Zn)||sn.push({key:Zn,value:gt[tr]})}),sn=sn.sort((tr,Zn)=>tr.key-Zn.key),sn.map(tr=>{let{key:Zn,value:xr}=tr;return`${xr} ${Zn}%`}).join(", ")},Cn=(gt,sn)=>{const{from:tr=Xe.presetPrimaryColors.blue,to:Zn=Xe.presetPrimaryColors.blue,direction:xr=sn==="rtl"?"to left":"to right"}=gt,Kr=_t(gt,["from","to","direction"]);if(Object.keys(Kr).length!==0){const Jr=en(Kr);return{backgroundImage:`linear-gradient(${xr}, ${Jr})`}}return{backgroundImage:`linear-gradient(${xr}, ${tr}, ${Zn})`}};var $e=gt=>{const{prefixCls:sn,direction:tr,percent:Zn,size:xr,strokeWidth:Kr,strokeColor:Jr,strokeLinecap:Zr="round",children:ei,trailColor:pi=null,success:kr}=gt,Ti=Jr&&typeof Jr!="string"?Cn(Jr,tr):{backgroundColor:Jr},na=Zr==="square"||Zr==="butt"?0:void 0,ea={backgroundColor:pi||void 0,borderRadius:na},oa=xr!=null?xr:[-1,Kr||(xr==="small"?6:8)],[Li,Dt]=Qe(oa,"line",{strokeWidth:Kr}),Hn=Object.assign({width:`${Me(Zn)}%`,height:Dt,borderRadius:na},Ti),Vn=mt(gt),Gn={width:`${Me(Vn)}%`,height:Dt,borderRadius:na,backgroundColor:kr==null?void 0:kr.strokeColor},Lr={width:Li<0?"100%":Li,height:Dt};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:`${sn}-outer`,style:Lr},fe.createElement("div",{className:`${sn}-inner`,style:ea},fe.createElement("div",{className:`${sn}-bg`,style:Hn}),Vn!==void 0?fe.createElement("div",{className:`${sn}-success-bg`,style:Gn}):null)),ei)},le=gt=>{const{size:sn,steps:tr,percent:Zn=0,strokeWidth:xr=8,strokeColor:Kr,trailColor:Jr=null,prefixCls:Zr,children:ei}=gt,pi=Math.round(tr*(Zn/100)),kr=sn==="small"?2:14,Ti=sn!=null?sn:[kr,xr],[na,ea]=Qe(Ti,"step",{steps:tr,strokeWidth:xr}),oa=na/tr,Li=new Array(tr);for(let Dt=0;Dt<tr;Dt++){const Hn=Array.isArray(Kr)?Kr[Dt]:Kr;Li[Dt]=fe.createElement("div",{key:Dt,className:_e()(`${Zr}-steps-item`,{[`${Zr}-steps-item-active`]:Dt<=pi-1}),style:{backgroundColor:Dt<=pi-1?Hn:Jr,width:oa,height:ea}})}return fe.createElement("div",{className:`${Zr}-steps-outer`},Li,ei)},me=ae(34367),he=ae(14747),se=ae(67968),Ie=ae(45503);const et=gt=>{const sn=gt?"100%":"-100%";return new me.Keyframes(`antProgress${gt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},$t=gt=>{const{componentCls:sn,iconCls:tr}=gt;return{[sn]:Object.assign(Object.assign({},(0,he.Wf)(gt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:gt.fontSize,marginInlineEnd:gt.marginXS,marginBottom:gt.marginXS},[`${sn}-outer`]:{display:"inline-block",width:"100%"},[`&${sn}-show-info`]:{[`${sn}-outer`]:{marginInlineEnd:`calc(-2em - ${gt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${gt.paddingXS}px)`}},[`${sn}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:gt.remainingColor,borderRadius:gt.lineBorderRadius},[`${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:gt.defaultColor}},[`${sn}-success-bg, ${sn}-bg`]:{position:"relative",backgroundColor:gt.defaultColor,borderRadius:gt.lineBorderRadius,transition:`all ${gt.motionDurationSlow} ${gt.motionEaseInOutCirc}`},[`${sn}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:gt.colorSuccess},[`${sn}-text`]:{display:"inline-block",width:"2em",marginInlineStart:gt.marginXS,color:gt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[tr]:{fontSize:gt.fontSize}},[`&${sn}-status-active`]:{[`${sn}-bg::before`]:{position:"absolute",inset:0,backgroundColor:gt.colorBgContainer,borderRadius:gt.lineBorderRadius,opacity:0,animationName:et(),animationDuration:gt.progressActiveMotionDuration,animationTimingFunction:gt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${sn}-rtl${sn}-status-active`]:{[`${sn}-bg::before`]:{animationName:et(!0)}},[`&${sn}-status-exception`]:{[`${sn}-bg`]:{backgroundColor:gt.colorError},[`${sn}-text`]:{color:gt.colorError}},[`&${sn}-status-exception ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:gt.colorError}},[`&${sn}-status-success`]:{[`${sn}-bg`]:{backgroundColor:gt.colorSuccess},[`${sn}-text`]:{color:gt.colorSuccess}},[`&${sn}-status-success ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:gt.colorSuccess}}})}},Ht=gt=>{const{componentCls:sn,iconCls:tr}=gt;return{[sn]:{[`${sn}-circle-trail`]:{stroke:gt.remainingColor},[`&${sn}-circle ${sn}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${sn}-circle ${sn}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:gt.circleTextColor,fontSize:gt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[tr]:{fontSize:`${gt.fontSize/gt.fontSizeSM}em`}},[`${sn}-circle&-status-exception`]:{[`${sn}-text`]:{color:gt.colorError}},[`${sn}-circle&-status-success`]:{[`${sn}-text`]:{color:gt.colorSuccess}}},[`${sn}-inline-circle`]:{lineHeight:1,[`${sn}-inner`]:{verticalAlign:"bottom"}}}},Xt=gt=>{const{componentCls:sn}=gt;return{[sn]:{[`${sn}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:gt.progressStepMinWidth,marginInlineEnd:gt.progressStepMarginInlineEnd,backgroundColor:gt.remainingColor,transition:`all ${gt.motionDurationSlow}`,"&-active":{backgroundColor:gt.defaultColor}}}}}},jt=gt=>{const{componentCls:sn,iconCls:tr}=gt;return{[sn]:{[`${sn}-small&-line, ${sn}-small&-line ${sn}-text ${tr}`]:{fontSize:gt.fontSizeSM}}}};var rn=(0,se.Z)("Progress",gt=>{const sn=gt.marginXXS/2,tr=(0,Ie.TS)(gt,{progressStepMarginInlineEnd:sn,progressStepMinWidth:sn,progressActiveMotionDuration:"2.4s"});return[$t(tr),Ht(tr),Xt(tr),jt(tr)]},gt=>({circleTextColor:gt.colorText,defaultColor:gt.colorInfo,remainingColor:gt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),qn=function(gt,sn){var tr={};for(var Zn in gt)Object.prototype.hasOwnProperty.call(gt,Zn)&&sn.indexOf(Zn)<0&&(tr[Zn]=gt[Zn]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xr=0,Zn=Object.getOwnPropertySymbols(gt);xr<Zn.length;xr++)sn.indexOf(Zn[xr])<0&&Object.prototype.propertyIsEnumerable.call(gt,Zn[xr])&&(tr[Zn[xr]]=gt[Zn[xr]]);return tr};const lr=null,Bt=["normal","exception","active","success"];var dr=fe.forwardRef((gt,sn)=>{const{prefixCls:tr,className:Zn,rootClassName:xr,steps:Kr,strokeColor:Jr,percent:Zr=0,size:ei="default",showInfo:pi=!0,type:kr="line",status:Ti,format:na,style:ea}=gt,oa=qn(gt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Li=fe.useMemo(()=>{var Je,Mt;const ln=mt(gt);return parseInt(ln!==void 0?(Je=ln!=null?ln:0)===null||Je===void 0?void 0:Je.toString():(Mt=Zr!=null?Zr:0)===null||Mt===void 0?void 0:Mt.toString(),10)},[Zr,gt.success,gt.successPercent]),Dt=fe.useMemo(()=>!Bt.includes(Ti)&&Li>=100?"success":Ti||"normal",[Ti,Li]),{getPrefixCls:Hn,direction:Vn,progress:Gn}=fe.useContext(ge.E_),Lr=Hn("progress",tr),[yr,Pr]=rn(Lr),nr=fe.useMemo(()=>{if(!pi)return null;const Je=mt(gt);let Mt;const ln=na||(vn=>`${vn}%`),Jt=kr==="line";return na||Dt!=="exception"&&Dt!=="success"?Mt=ln(Me(Zr),Me(Je)):Dt==="exception"?Mt=Jt?fe.createElement(Ye.Z,null):fe.createElement(ve.Z,null):Dt==="success"&&(Mt=Jt?fe.createElement(Fe.Z,null):fe.createElement(Be.Z,null)),fe.createElement("span",{className:`${Lr}-text`,title:typeof Mt=="string"?Mt:void 0},Mt)},[pi,Zr,Li,Dt,kr,Lr,na]),ot=Array.isArray(Jr)?Jr[0]:Jr,Ct=typeof Jr=="string"||Array.isArray(Jr)?Jr:void 0;let zt;kr==="line"?zt=Kr?fe.createElement(le,Object.assign({},gt,{strokeColor:Ct,prefixCls:Lr,steps:Kr}),nr):fe.createElement($e,Object.assign({},gt,{strokeColor:ot,prefixCls:Lr,direction:Vn}),nr):(kr==="circle"||kr==="dashboard")&&(zt=fe.createElement(tn,Object.assign({},gt,{strokeColor:ot,prefixCls:Lr,progressStatus:Dt}),nr));const un=_e()(Lr,`${Lr}-status-${Dt}`,`${Lr}-${kr==="dashboard"&&"circle"||Kr&&"steps"||kr}`,{[`${Lr}-inline-circle`]:kr==="circle"&&Qe(ei,"circle")[0]<=20,[`${Lr}-show-info`]:pi,[`${Lr}-${ei}`]:typeof ei=="string",[`${Lr}-rtl`]:Vn==="rtl"},Gn==null?void 0:Gn.className,Zn,xr,Pr);return yr(fe.createElement("div",Object.assign({ref:sn,style:Object.assign(Object.assign({},Gn==null?void 0:Gn.style),ea),className:un,role:"progressbar","aria-valuenow":Li},(0,we.Z)(oa,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),zt))}),Wr=dr},78045:function(kn,Vt,ae){"use strict";ae.d(Vt,{ZP:function(){return Xe}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(5663),Ye=ae(1337),ve=ae(67294),Ce=ae(53124),_e=ae(98675);const we=ve.createContext(null),ge=we.Provider;var Te=we;const ft=ve.createContext(null),Re=ft.Provider;var bt=ae(95860),ht=ae(17799),st=ae(98866),tt=ae(65223),Le=ae(14747),xt=ae(67968),on=ae(45503);const it=Me=>{const{componentCls:mt,antCls:Gt}=Me,hn=`${mt}-group`;return{[hn]:Object.assign(Object.assign({},(0,Le.Wf)(Me)),{display:"inline-block",fontSize:0,[`&${hn}-rtl`]:{direction:"rtl"},[`${Gt}-badge ${Gt}-badge-count`]:{zIndex:1},[`> ${Gt}-badge:not(:first-child) > ${Gt}-button-wrapper`]:{borderInlineStart:"none"}})}},yt=Me=>{const{componentCls:mt,wrapperMarginInlineEnd:Gt,colorPrimary:hn,radioSize:Qe,motionDurationSlow:ut,motionDurationMid:Yt,motionEaseInOutCirc:Qt,colorBgContainer:tn,colorBorder:_t,lineWidth:en,dotSize:Cn,colorBgContainerDisabled:On,colorTextDisabled:$e,paddingXS:ce,dotColorDisabled:le,lineType:me,radioDotDisabledSize:he,wireframe:se,colorWhite:Ie}=Me,et=`${mt}-inner`;return{[`${mt}-wrapper`]:Object.assign(Object.assign({},(0,Le.Wf)(Me)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Gt,cursor:"pointer",[`&${mt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Me.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${mt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${en}px ${me} ${hn}`,borderRadius:"50%",visibility:"hidden",content:'""'},[mt]:Object.assign(Object.assign({},(0,Le.Wf)(Me)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${mt}-wrapper:hover &,
&:hover ${et}`]:{borderColor:hn},[`${mt}-input:focus-visible + ${et}`]:Object.assign({},(0,Le.oN)(Me)),[`${mt}:hover::after, ${mt}-wrapper:hover &::after`]:{visibility:"visible"},[`${mt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Qe,height:Qe,marginBlockStart:Qe/-2,marginInlineStart:Qe/-2,backgroundColor:se?hn:Ie,borderBlockStart:0,borderInlineStart:0,borderRadius:Qe,transform:"scale(0)",opacity:0,transition:`all ${ut} ${Qt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Qe,height:Qe,backgroundColor:tn,borderColor:_t,borderStyle:"solid",borderWidth:en,borderRadius:"50%",transition:`all ${Yt}`},[`${mt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${mt}-checked`]:{[et]:{borderColor:hn,backgroundColor:se?tn:hn,"&::after":{transform:`scale(${Cn/Qe})`,opacity:1,transition:`all ${ut} ${Qt}`}}},[`${mt}-disabled`]:{cursor:"not-allowed",[et]:{backgroundColor:On,borderColor:_t,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${mt}-input`]:{cursor:"not-allowed"},[`${mt}-disabled + span`]:{color:$e,cursor:"not-allowed"},[`&${mt}-checked`]:{[et]:{"&::after":{transform:`scale(${he/Qe})`}}}},[`span${mt} + *`]:{paddingInlineStart:ce,paddingInlineEnd:ce}})}},Ee=Me=>{const{buttonColor:mt,controlHeight:Gt,componentCls:hn,lineWidth:Qe,lineType:ut,colorBorder:Yt,motionDurationSlow:Qt,motionDurationMid:tn,buttonPaddingInline:_t,fontSize:en,buttonBg:Cn,fontSizeLG:On,controlHeightLG:$e,controlHeightSM:ce,paddingXS:le,borderRadius:me,borderRadiusSM:he,borderRadiusLG:se,buttonCheckedBg:Ie,buttonSolidCheckedColor:et,colorTextDisabled:$t,colorBgContainerDisabled:Ht,buttonCheckedBgDisabled:Xt,buttonCheckedColorDisabled:jt,colorPrimary:rn,colorPrimaryHover:qn,colorPrimaryActive:lr,buttonSolidCheckedBg:Bt,buttonSolidCheckedHoverBg:Sn,buttonSolidCheckedActiveBg:dr}=Me;return{[`${hn}-button-wrapper`]:{position:"relative",display:"inline-block",height:Gt,margin:0,paddingInline:_t,paddingBlock:0,color:mt,fontSize:en,lineHeight:`${Gt-Qe*2}px`,background:Cn,border:`${Qe}px ${ut} ${Yt}`,borderBlockStartWidth:Qe+.02,borderInlineStartWidth:0,borderInlineEndWidth:Qe,cursor:"pointer",transition:[`color ${tn}`,`background ${tn}`,`box-shadow ${tn}`].join(","),a:{color:mt},[`> ${hn}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Qe,insetInlineStart:-Qe,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Qe,paddingInline:0,backgroundColor:Yt,transition:`background-color ${Qt}`,content:'""'}},"&:first-child":{borderInlineStart:`${Qe}px ${ut} ${Yt}`,borderStartStartRadius:me,borderEndStartRadius:me},"&:last-child":{borderStartEndRadius:me,borderEndEndRadius:me},"&:first-child:last-child":{borderRadius:me},[`${hn}-group-large &`]:{height:$e,fontSize:On,lineHeight:`${$e-Qe*2}px`,"&:first-child":{borderStartStartRadius:se,borderEndStartRadius:se},"&:last-child":{borderStartEndRadius:se,borderEndEndRadius:se}},[`${hn}-group-small &`]:{height:ce,paddingInline:le-Qe,paddingBlock:0,lineHeight:`${ce-Qe*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:rn},"&:has(:focus-visible)":Object.assign({},(0,Le.oN)(Me)),[`${hn}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${hn}-button-wrapper-disabled)`]:{zIndex:1,color:rn,background:Ie,borderColor:rn,"&::before":{backgroundColor:rn},"&:first-child":{borderColor:rn},"&:hover":{color:qn,borderColor:qn,"&::before":{backgroundColor:qn}},"&:active":{color:lr,borderColor:lr,"&::before":{backgroundColor:lr}}},[`${hn}-group-solid &-checked:not(${hn}-button-wrapper-disabled)`]:{color:et,background:Bt,borderColor:Bt,"&:hover":{color:et,background:Sn,borderColor:Sn},"&:active":{color:et,background:dr,borderColor:dr}},"&-disabled":{color:$t,backgroundColor:Ht,borderColor:Yt,cursor:"not-allowed","&:first-child, &:hover":{color:$t,backgroundColor:Ht,borderColor:Yt}},[`&-disabled${hn}-button-wrapper-checked`]:{color:jt,backgroundColor:Xt,borderColor:Yt,boxShadow:"none"}}}},de=Me=>Me-4*2;var je=(0,xt.Z)("Radio",Me=>{const{controlOutline:mt,controlOutlineWidth:Gt,radioSize:hn}=Me,Qe=`0 0 0 ${Gt}px ${mt}`,ut=Qe,Yt=de(hn),Qt=(0,on.TS)(Me,{radioDotDisabledSize:Yt,radioFocusShadow:Qe,radioButtonFocusShadow:ut});return[it(Qt),yt(Qt),Ee(Qt)]},Me=>{const{wireframe:mt,padding:Gt,marginXS:hn,lineWidth:Qe,fontSizeLG:ut,colorText:Yt,colorBgContainer:Qt,colorTextDisabled:tn,controlItemBgActiveDisabled:_t,colorTextLightSolid:en,colorPrimary:Cn,colorPrimaryHover:On,colorPrimaryActive:$e}=Me,ce=4,le=ut,me=mt?de(le):le-(ce+Qe)*2;return{radioSize:le,dotSize:me,dotColorDisabled:tn,buttonSolidCheckedColor:en,buttonSolidCheckedBg:Cn,buttonSolidCheckedHoverBg:On,buttonSolidCheckedActiveBg:$e,buttonBg:Qt,buttonCheckedBg:Qt,buttonColor:Yt,buttonCheckedBgDisabled:_t,buttonCheckedColorDisabled:tn,buttonPaddingInline:Gt-Qe,wrapperMarginInlineEnd:hn}}),ze=ae(45353),At=ae(92429),ct=function(Me,mt){var Gt={};for(var hn in Me)Object.prototype.hasOwnProperty.call(Me,hn)&&mt.indexOf(hn)<0&&(Gt[hn]=Me[hn]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,hn=Object.getOwnPropertySymbols(Me);Qe<hn.length;Qe++)mt.indexOf(hn[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Me,hn[Qe])&&(Gt[hn[Qe]]=Me[hn[Qe]]);return Gt};const lt=(Me,mt)=>{var Gt,hn;const Qe=ve.useContext(Te),ut=ve.useContext(ft),{getPrefixCls:Yt,direction:Qt,radio:tn}=ve.useContext(Ce.E_),_t=ve.useRef(null),en=(0,ht.sQ)(mt,_t),{isFormItemInput:Cn}=ve.useContext(tt.aM),On=lr=>{var Bt,Sn;(Bt=Me.onChange)===null||Bt===void 0||Bt.call(Me,lr),(Sn=Qe==null?void 0:Qe.onChange)===null||Sn===void 0||Sn.call(Qe,lr)},{prefixCls:$e,className:ce,rootClassName:le,children:me,style:he}=Me,se=ct(Me,["prefixCls","className","rootClassName","children","style"]),Ie=Yt("radio",$e),et=((Qe==null?void 0:Qe.optionType)||ut)==="button",$t=et?`${Ie}-button`:Ie,[Ht,Xt]=je(Ie),jt=Object.assign({},se),rn=ve.useContext(st.Z);Qe&&(jt.name=Qe.name,jt.onChange=On,jt.checked=Me.value===Qe.value,jt.disabled=(Gt=jt.disabled)!==null&&Gt!==void 0?Gt:Qe.disabled),jt.disabled=(hn=jt.disabled)!==null&&hn!==void 0?hn:rn;const qn=Fe()(`${$t}-wrapper`,{[`${$t}-wrapper-checked`]:jt.checked,[`${$t}-wrapper-disabled`]:jt.disabled,[`${$t}-wrapper-rtl`]:Qt==="rtl",[`${$t}-wrapper-in-form-item`]:Cn},tn==null?void 0:tn.className,ce,le,Xt);return Ht(ve.createElement(ze.Z,{component:"Radio",disabled:jt.disabled},ve.createElement("label",{className:qn,style:Object.assign(Object.assign({},tn==null?void 0:tn.style),he),onMouseEnter:Me.onMouseEnter,onMouseLeave:Me.onMouseLeave},ve.createElement(bt.Z,Object.assign({},jt,{className:Fe()(jt.className,!et&&At.A),type:"radio",prefixCls:$t,ref:en})),me!==void 0?ve.createElement("span",null,me):null)))};var kt=ve.forwardRef(lt);const pt=ve.forwardRef((Me,mt)=>{const{getPrefixCls:Gt,direction:hn}=ve.useContext(Ce.E_),[Qe,ut]=(0,Be.Z)(Me.defaultValue,{value:Me.value}),Yt=Bt=>{const Sn=Qe,dr=Bt.target.value;"value"in Me||ut(dr);const{onChange:Wr}=Me;Wr&&dr!==Sn&&Wr(Bt)},{prefixCls:Qt,className:tn,rootClassName:_t,options:en,buttonStyle:Cn="outline",disabled:On,children:$e,size:ce,style:le,id:me,onMouseEnter:he,onMouseLeave:se,onFocus:Ie,onBlur:et}=Me,$t=Gt("radio",Qt),Ht=`${$t}-group`,[Xt,jt]=je($t);let rn=$e;en&&en.length>0&&(rn=en.map(Bt=>typeof Bt=="string"||typeof Bt=="number"?ve.createElement(kt,{key:Bt.toString(),prefixCls:$t,disabled:On,value:Bt,checked:Qe===Bt},Bt):ve.createElement(kt,{key:`radio-group-value-options-${Bt.value}`,prefixCls:$t,disabled:Bt.disabled||On,value:Bt.value,checked:Qe===Bt.value,title:Bt.title,style:Bt.style},Bt.label)));const qn=(0,_e.Z)(ce),lr=Fe()(Ht,`${Ht}-${Cn}`,{[`${Ht}-${qn}`]:qn,[`${Ht}-rtl`]:hn==="rtl"},tn,_t,jt);return Xt(ve.createElement("div",Object.assign({},(0,Ye.Z)(Me,{aria:!0,data:!0}),{className:lr,style:le,onMouseEnter:he,onMouseLeave:se,onFocus:Ie,onBlur:et,id:me,ref:mt}),ve.createElement(ge,{value:{onChange:Yt,value:Qe,disabled:Me.disabled,name:Me.name,optionType:Me.optionType}},rn)))});var nn=ve.memo(pt),rt=function(Me,mt){var Gt={};for(var hn in Me)Object.prototype.hasOwnProperty.call(Me,hn)&&mt.indexOf(hn)<0&&(Gt[hn]=Me[hn]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,hn=Object.getOwnPropertySymbols(Me);Qe<hn.length;Qe++)mt.indexOf(hn[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Me,hn[Qe])&&(Gt[hn[Qe]]=Me[hn[Qe]]);return Gt};const qt=(Me,mt)=>{const{getPrefixCls:Gt}=ve.useContext(Ce.E_),{prefixCls:hn}=Me,Qe=rt(Me,["prefixCls"]),ut=Gt("radio",hn);return ve.createElement(Re,{value:"button"},ve.createElement(kt,Object.assign({prefixCls:ut},Qe,{type:"radio",ref:mt})))};var pn=ve.forwardRef(qt);const cn=kt;cn.Button=pn,cn.Group=nn,cn.__ANT_RADIO=!0;var Xe=cn},11713:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return Fr}});var fe=ae(94184),Fe=ae.n(fe),Be=ae(87462),Ye=ae(74902),ve=ae(4942),Ce=ae(1413),_e=ae(97685),we=ae(45987),ge=ae(71002),Te=ae(67294);function ft(He){var Ge=Te.useRef();Ge.current=He;var Ft=Te.useCallback(function(){for(var Et,dn=arguments.length,In=new Array(dn),zn=0;zn<dn;zn++)In[zn]=arguments[zn];return(Et=Ge.current)===null||Et===void 0?void 0:Et.call.apply(Et,[Ge].concat(In))},[]);return Ft}function Re(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var bt=Re()?Te.useLayoutEffect:Te.useEffect,ht=bt,st=function(Ge,Ft){var Et=Te.useRef(!0);bt(function(){if(!Et.current)return Ge()},Ft),bt(function(){return Et.current=!1,function(){Et.current=!0}},[])};function tt(He){var Ge=Te.useRef(!1),Ft=Te.useState(He),Et=(0,_e.Z)(Ft,2),dn=Et[0],In=Et[1];Te.useEffect(function(){return Ge.current=!1,function(){Ge.current=!0}},[]);function zn(or,jn){jn&&Ge.current||In(or)}return[dn,zn]}function Le(He){return He!==void 0}function xt(He,Ge){var Ft=Ge||{},Et=Ft.defaultValue,dn=Ft.value,In=Ft.onChange,zn=Ft.postState,or=tt(function(){return Le(dn)?dn:Le(Et)?typeof Et=="function"?Et():Et:typeof He=="function"?He():He}),jn=(0,_e.Z)(or,2),_n=jn[0],cr=jn[1],fr=dn!==void 0?dn:_n,Hr=zn?zn(fr):fr,ur=ft(In),ti=tt([fr]),yi=(0,_e.Z)(ti,2),ni=yi[0],fi=yi[1];st(function(){var oi=ni[0];_n!==oi&&ur(_n,oi)},[ni]),st(function(){Le(dn)||cr(dn)},[dn]);var jr=ft(function(oi,Ci){cr(oi,Ci),fi([fr],Ci)});return[Hr,jr]}var on={};function it(He,Ge){}function yt(He,Ge){}function Ee(){on={}}function de(He,Ge,Ft){!Ge&&!on[Ft]&&(He(!1,Ft),on[Ft]=!0)}function je(He,Ge){de(it,He,Ge)}function ze(He,Ge){de(yt,He,Ge)}var At=je,ct=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var He=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(He)||/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(He==null?void 0:He.substr(0,4))},lt={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(Ge){var Ft=Ge.keyCode;if(Ge.altKey&&!Ge.ctrlKey||Ge.metaKey||Ft>=lt.F1&&Ft<=lt.F12)return!1;switch(Ft){case lt.ALT:case lt.CAPS_LOCK:case lt.CONTEXT_MENU:case lt.CTRL:case lt.DOWN:case lt.END:case lt.ESC:case lt.HOME:case lt.INSERT:case lt.LEFT:case lt.MAC_FF_META:case lt.META:case lt.NUMLOCK:case lt.NUM_CENTER:case lt.PAGE_DOWN:case lt.PAGE_UP:case lt.PAUSE:case lt.PRINT_SCREEN:case lt.RIGHT:case lt.SHIFT:case lt.UP:case lt.WIN_KEY:case lt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ge){if(Ge>=lt.ZERO&&Ge<=lt.NINE||Ge>=lt.NUM_ZERO&&Ge<=lt.NUM_MULTIPLY||Ge>=lt.A&&Ge<=lt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ge===0)return!0;switch(Ge){case lt.SPACE:case lt.QUESTION_MARK:case lt.NUM_PLUS:case lt.NUM_MINUS:case lt.NUM_PERIOD:case lt.NUM_DIVISION:case lt.SEMICOLON:case lt.DASH:case lt.EQUALS:case lt.COMMA:case lt.PERIOD:case lt.SLASH:case lt.APOSTROPHE:case lt.SINGLE_QUOTE:case lt.OPEN_SQUARE_BRACKET:case lt.BACKSLASH:case lt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ze=lt,kt=ae(47655);function pt(He,Ge,Ft){var Et=Te.useRef({});return(!("value"in Et.current)||Ft(Et.current.condition,Ge))&&(Et.current.value=He(),Et.current.condition=Ge),Et.current.value}function nn(He,Ge){typeof He=="function"?He(Ge):(0,ge.Z)(He)==="object"&&He&&"current"in He&&(He.current=Ge)}function rt(){for(var He=arguments.length,Ge=new Array(He),Ft=0;Ft<He;Ft++)Ge[Ft]=arguments[Ft];var Et=Ge.filter(function(dn){return dn});return Et.length<=1?Et[0]:function(dn){Ge.forEach(function(In){nn(In,dn)})}}function qt(){for(var He=arguments.length,Ge=new Array(He),Ft=0;Ft<He;Ft++)Ge[Ft]=arguments[Ft];return pt(function(){return rt.apply(void 0,Ge)},Ge,function(Et,dn){return Et.length===dn.length&&Et.every(function(In,zn){return In===dn[zn]})})}function pn(He){var Ge,Ft,Et=isMemo(He)?He.type.type:He.type;return!(typeof Et=="function"&&!((Ge=Et.prototype)!==null&&Ge!==void 0&&Ge.render)||typeof He=="function"&&!((Ft=He.prototype)!==null&&Ft!==void 0&&Ft.render))}var cn=function(Ge){var Ft=Ge.className,Et=Ge.customizeIcon,dn=Ge.customizeIconProps,In=Ge.onMouseDown,zn=Ge.onClick,or=Ge.children,jn;return typeof Et=="function"?jn=Et(dn):jn=Et,Te.createElement("span",{className:Ft,onMouseDown:function(cr){cr.preventDefault(),In&&In(cr)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:zn,"aria-hidden":!0},jn!==void 0?jn:Te.createElement("span",{className:Fe()(Ft.split(/\s+/).map(function(_n){return"".concat(_n,"-icon")}))},or))},Xe=cn;function Me(He,Ge,Ft,Et,dn){var In=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,zn=arguments.length>6?arguments[6]:void 0,or=arguments.length>7?arguments[7]:void 0,jn=Te.useMemo(function(){if((0,ge.Z)(Et)==="object")return Et.clearIcon;if(dn)return dn},[Et,dn]),_n=Te.useMemo(function(){return!!(!In&&Et&&(Ft.length||zn)&&!(or==="combobox"&&zn===""))},[Et,In,Ft.length,zn,or]);return{allowClear:_n,clearIcon:Te.createElement(Xe,{className:"".concat(He,"-clear"),onMouseDown:Ge,customizeIcon:jn},"\xD7")}}var mt=Te.createContext(null);function Gt(){return Te.useContext(mt)}function hn(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ge=Te.useState(!1),Ft=(0,_e.Z)(Ge,2),Et=Ft[0],dn=Ft[1],In=Te.useRef(null),zn=function(){window.clearTimeout(In.current)};Te.useEffect(function(){return zn},[]);var or=function(_n,cr){zn(),In.current=window.setTimeout(function(){dn(_n),cr&&cr()},He)};return[Et,or,zn]}function Qe(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ge=Te.useRef(null),Ft=Te.useRef(null);Te.useEffect(function(){return function(){window.clearTimeout(Ft.current)}},[]);function Et(dn){(dn||Ge.current===null)&&(Ge.current=dn),window.clearTimeout(Ft.current),Ft.current=window.setTimeout(function(){Ge.current=null},He)}return[function(){return Ge.current},Et]}function ut(He,Ge,Ft,Et){var dn=Te.useRef(null);dn.current={open:Ge,triggerOpen:Ft,customizedTrigger:Et},Te.useEffect(function(){function In(zn){var or;if(!((or=dn.current)!==null&&or!==void 0&&or.customizedTrigger)){var jn=zn.target;jn.shadowRoot&&zn.composed&&(jn=zn.composedPath()[0]||jn),dn.current.open&&He().filter(function(_n){return _n}).every(function(_n){return!_n.contains(jn)&&_n!==jn})&&dn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",In),function(){return window.removeEventListener("mousedown",In)}},[])}var Yt=`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`,Qt=`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`,tn="".concat(Yt," ").concat(Qt).split(/[\s\n]+/),_t="aria-",en="data-";function Cn(He,Ge){return He.indexOf(Ge)===0}function On(He){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ft;Ge===!1?Ft={aria:!0,data:!0,attr:!0}:Ge===!0?Ft={aria:!0}:Ft=(0,Ce.Z)({},Ge);var Et={};return Object.keys(He).forEach(function(dn){(Ft.aria&&(dn==="role"||Cn(dn,_t))||Ft.data&&Cn(dn,en)||Ft.attr&&tn.includes(dn))&&(Et[dn]=He[dn])}),Et}var $e=ae(48555),ce=ae(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],me=void 0;function he(He,Ge){var Ft=He.prefixCls,Et=He.invalidate,dn=He.item,In=He.renderItem,zn=He.responsive,or=He.responsiveDisabled,jn=He.registerSize,_n=He.itemKey,cr=He.className,fr=He.style,Hr=He.children,ur=He.display,ti=He.order,yi=He.component,ni=yi===void 0?"div":yi,fi=(0,we.Z)(He,le),jr=zn&&!ur;function oi(la){jn(_n,la)}Te.useEffect(function(){return function(){oi(null)}},[]);var Ci=In&&dn!==me?In(dn):Hr,Oi;Et||(Oi={opacity:jr?0:1,height:jr?0:me,overflowY:jr?"hidden":me,order:zn?ti:me,pointerEvents:jr?"none":me,position:jr?"absolute":me});var ii={};jr&&(ii["aria-hidden"]=!0);var Ni=Te.createElement(ni,(0,Be.Z)({className:Fe()(!Et&&Ft,cr),style:(0,Ce.Z)((0,Ce.Z)({},Oi),fr)},ii,fi,{ref:Ge}),Ci);return zn&&(Ni=Te.createElement($e.Z,{onResize:function(Ha){var Aa=Ha.offsetWidth;oi(Aa)},disabled:or},Ni)),Ni}var se=Te.forwardRef(he);se.displayName="Item";var Ie=se,et=ae(77527),$t=ae(73935),Ht=ae(96523);function Xt(He){if(typeof MessageChannel=="undefined")(0,Ht.Z)(He);else{var Ge=new MessageChannel;Ge.port1.onmessage=function(){return He()},Ge.port2.postMessage(void 0)}}function jt(){var He=Te.useRef(null),Ge=function(Et){He.current||(He.current=[],Xt(function(){(0,$t.unstable_batchedUpdates)(function(){He.current.forEach(function(dn){dn()}),He.current=null})})),He.current.push(Et)};return Ge}function rn(He,Ge){var Ft=Te.useState(Ge),Et=(0,_e.Z)(Ft,2),dn=Et[0],In=Et[1],zn=(0,et.Z)(function(or){He(function(){In(or)})});return[dn,zn]}var qn=Te.createContext(null),lr=["component"],Bt=["className"],Sn=["className"],dr=function(Ge,Ft){var Et=Te.useContext(qn);if(!Et){var dn=Ge.component,In=dn===void 0?"div":dn,zn=(0,we.Z)(Ge,lr);return Te.createElement(In,(0,Be.Z)({},zn,{ref:Ft}))}var or=Et.className,jn=(0,we.Z)(Et,Bt),_n=Ge.className,cr=(0,we.Z)(Ge,Sn);return Te.createElement(qn.Provider,{value:null},Te.createElement(Ie,(0,Be.Z)({ref:Ft,className:Fe()(or,_n)},jn,cr)))},Wr=Te.forwardRef(dr);Wr.displayName="RawItem";var gt=Wr,sn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],tr="responsive",Zn="invalidate";function xr(He){return"+ ".concat(He.length," ...")}function Kr(He,Ge){var Ft=He.prefixCls,Et=Ft===void 0?"rc-overflow":Ft,dn=He.data,In=dn===void 0?[]:dn,zn=He.renderItem,or=He.renderRawItem,jn=He.itemKey,_n=He.itemWidth,cr=_n===void 0?10:_n,fr=He.ssr,Hr=He.style,ur=He.className,ti=He.maxCount,yi=He.renderRest,ni=He.renderRawRest,fi=He.suffix,jr=He.component,oi=jr===void 0?"div":jr,Ci=He.itemComponent,Oi=He.onVisibleChange,ii=(0,we.Z)(He,sn),Ni=fr==="full",la=jt(),Ha=rn(la,null),Aa=(0,_e.Z)(Ha,2),pa=Aa[0],ka=Aa[1],Pa=pa||0,Ui=rn(la,new Map),ca=(0,_e.Z)(Ui,2),bi=ca[0],zi=ca[1],ia=rn(la,0),_a=(0,_e.Z)(ia,2),So=_a[0],ho=_a[1],po=rn(la,0),Xa=(0,_e.Z)(po,2),Ra=Xa[0],Hi=Xa[1],yo=rn(la,0),Xi=(0,_e.Z)(yo,2),Ei=Xi[0],ua=Xi[1],Ja=(0,Te.useState)(null),wa=(0,_e.Z)(Ja,2),Wa=wa[0],Ki=wa[1],ro=(0,Te.useState)(null),so=(0,_e.Z)(ro,2),to=so[0],lo=so[1],vo=Te.useMemo(function(){return to===null&&Ni?Number.MAX_SAFE_INTEGER:to||0},[to,pa]),Ao=(0,Te.useState)(!1),no=(0,_e.Z)(Ao,2),ao=no[0],zo=no[1],Ho="".concat(Et,"-item"),Jo=Math.max(So,Ra),To=ti===tr,co=In.length&&To,aa=ti===Zn,va=co||typeof ti=="number"&&In.length>ti,qa=(0,Te.useMemo)(function(){var fn=In;return co?pa===null&&Ni?fn=In:fn=In.slice(0,Math.min(In.length,Pa/cr)):typeof ti=="number"&&(fn=In.slice(0,ti)),fn},[In,cr,pa,ti,co]),uo=(0,Te.useMemo)(function(){return co?In.slice(vo+1):In.slice(qa.length)},[In,qa,co,vo]),Po=(0,Te.useCallback)(function(fn,Ut){var Kn;return typeof jn=="function"?jn(fn):(Kn=jn&&(fn==null?void 0:fn[jn]))!==null&&Kn!==void 0?Kn:Ut},[jn]),Uo=(0,Te.useCallback)(zn||function(fn){return fn},[zn]);function qo(fn,Ut,Kn){to===fn&&(Ut===void 0||Ut===Wa)||(lo(fn),Kn||(zo(fn<In.length-1),Oi==null||Oi(fn)),Ut!==void 0&&Ki(Ut))}function ls(fn,Ut){ka(Ut.clientWidth)}function Ss(fn,Ut){zi(function(Kn){var gn=new Map(Kn);return Ut===null?gn.delete(fn):gn.set(fn,Ut),gn})}function Qo(fn,Ut){Hi(Ut),ho(Ra)}function Cs(fn,Ut){ua(Ut)}function Ka(fn){return bi.get(Po(qa[fn],fn))}(0,ce.Z)(function(){if(Pa&&typeof Jo=="number"&&qa){var fn=Ei,Ut=qa.length,Kn=Ut-1;if(!Ut){qo(0,null);return}for(var gn=0;gn<Ut;gn+=1){var xn=Ka(gn);if(Ni&&(xn=xn||0),xn===void 0){qo(gn-1,void 0,!0);break}if(fn+=xn,Kn===0&&fn<=Pa||gn===Kn-1&&fn+Ka(Kn)<=Pa){qo(Kn,null);break}else if(fn+Jo>Pa){qo(gn-1,fn-xn-Ei+Ra);break}}fi&&Ka(0)+Ei>Pa&&Ki(null)}},[Pa,bi,Ra,Ei,Po,qa]);var ye=ao&&!!uo.length,ke={};Wa!==null&&co&&(ke={position:"absolute",left:Wa,top:0});var De={prefixCls:Ho,responsive:co,component:Ci,invalidate:aa},nt=or?function(fn,Ut){var Kn=Po(fn,Ut);return Te.createElement(qn.Provider,{key:Kn,value:(0,Ce.Z)((0,Ce.Z)({},De),{},{order:Ut,item:fn,itemKey:Kn,registerSize:Ss,display:Ut<=vo})},or(fn,Ut))}:function(fn,Ut){var Kn=Po(fn,Ut);return Te.createElement(Ie,(0,Be.Z)({},De,{order:Ut,key:Kn,item:fn,renderItem:Uo,itemKey:Kn,registerSize:Ss,display:Ut<=vo}))},at,an={order:ye?vo:Number.MAX_SAFE_INTEGER,className:"".concat(Ho,"-rest"),registerSize:Qo,display:ye};if(ni)ni&&(at=Te.createElement(qn.Provider,{value:(0,Ce.Z)((0,Ce.Z)({},De),an)},ni(uo)));else{var Zt=yi||xr;at=Te.createElement(Ie,(0,Be.Z)({},De,an),typeof Zt=="function"?Zt(uo):Zt)}var Pn=Te.createElement(oi,(0,Be.Z)({className:Fe()(!aa&&Et,ur),style:Hr,ref:Ge},ii),qa.map(nt),va?at:null,fi&&Te.createElement(Ie,(0,Be.Z)({},De,{responsive:To,responsiveDisabled:!co,order:vo,className:"".concat(Ho,"-suffix"),registerSize:Cs,display:!0,style:ke}),fi));return To&&(Pn=Te.createElement($e.Z,{onResize:ls,disabled:!co},Pn)),Pn}var Jr=Te.forwardRef(Kr);Jr.displayName="Overflow",Jr.Item=gt,Jr.RESPONSIVE=tr,Jr.INVALIDATE=Zn;var Zr=Jr,ei=Zr,pi=function(Ge,Ft){var Et,dn,In=Ge.prefixCls,zn=Ge.id,or=Ge.inputElement,jn=Ge.disabled,_n=Ge.tabIndex,cr=Ge.autoFocus,fr=Ge.autoComplete,Hr=Ge.editable,ur=Ge.activeDescendantId,ti=Ge.value,yi=Ge.maxLength,ni=Ge.onKeyDown,fi=Ge.onMouseDown,jr=Ge.onChange,oi=Ge.onPaste,Ci=Ge.onCompositionStart,Oi=Ge.onCompositionEnd,ii=Ge.open,Ni=Ge.attrs,la=or||Te.createElement("input",null),Ha=la,Aa=Ha.ref,pa=Ha.props,ka=pa.onKeyDown,Pa=pa.onChange,Ui=pa.onMouseDown,ca=pa.onCompositionStart,bi=pa.onCompositionEnd,zi=pa.style;return"maxLength"in la.props,la=Te.cloneElement(la,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({type:"search"},pa),{},{id:zn,ref:rt(Ft,Aa),disabled:jn,tabIndex:_n,autoComplete:fr||"off",autoFocus:cr,className:Fe()("".concat(In,"-selection-search-input"),(Et=la)===null||Et===void 0||(dn=Et.props)===null||dn===void 0?void 0:dn.className),role:"combobox","aria-label":"Search","aria-expanded":ii||!1,"aria-haspopup":"listbox","aria-owns":"".concat(zn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(zn,"_list"),"aria-activedescendant":ii?ur:void 0},Ni),{},{value:Hr?ti:"",maxLength:yi,readOnly:!Hr,unselectable:Hr?null:"on",style:(0,Ce.Z)((0,Ce.Z)({},zi),{},{opacity:Hr?null:0}),onKeyDown:function(_a){ni(_a),ka&&ka(_a)},onMouseDown:function(_a){fi(_a),Ui&&Ui(_a)},onChange:function(_a){jr(_a),Pa&&Pa(_a)},onCompositionStart:function(_a){Ci(_a),ca&&ca(_a)},onCompositionEnd:function(_a){Oi(_a),bi&&bi(_a)},onPaste:oi})),la},kr=Te.forwardRef(pi);kr.displayName="Input";var Ti=kr;function na(He){return Array.isArray(He)?He:He!==void 0?[He]:[]}var ea=typeof window!="undefined"&&window.document&&window.document.documentElement,oa=ea;function Li(He){return He!=null}function Dt(He){return!He&&He!==0}function Hn(He){return["string","number"].includes((0,ge.Z)(He))}function Vn(He){var Ge=void 0;return He&&(Hn(He.title)?Ge=He.title.toString():Hn(He.label)&&(Ge=He.label.toString())),Ge}function Gn(He,Ge){oa?Te.useLayoutEffect(He,Ge):Te.useEffect(He,Ge)}function Lr(He){var Ge;return(Ge=He.key)!==null&&Ge!==void 0?Ge:He.value}var yr=function(Ge){Ge.preventDefault(),Ge.stopPropagation()},Pr=function(Ge){var Ft=Ge.id,Et=Ge.prefixCls,dn=Ge.values,In=Ge.open,zn=Ge.searchValue,or=Ge.autoClearSearchValue,jn=Ge.inputRef,_n=Ge.placeholder,cr=Ge.disabled,fr=Ge.mode,Hr=Ge.showSearch,ur=Ge.autoFocus,ti=Ge.autoComplete,yi=Ge.activeDescendantId,ni=Ge.tabIndex,fi=Ge.removeIcon,jr=Ge.maxTagCount,oi=Ge.maxTagTextLength,Ci=Ge.maxTagPlaceholder,Oi=Ci===void 0?function(Ki){return"+ ".concat(Ki.length," ...")}:Ci,ii=Ge.tagRender,Ni=Ge.onToggleOpen,la=Ge.onRemove,Ha=Ge.onInputChange,Aa=Ge.onInputPaste,pa=Ge.onInputKeyDown,ka=Ge.onInputMouseDown,Pa=Ge.onInputCompositionStart,Ui=Ge.onInputCompositionEnd,ca=Te.useRef(null),bi=(0,Te.useState)(0),zi=(0,_e.Z)(bi,2),ia=zi[0],_a=zi[1],So=(0,Te.useState)(!1),ho=(0,_e.Z)(So,2),po=ho[0],Xa=ho[1],Ra="".concat(Et,"-selection"),Hi=In||fr==="multiple"&&or===!1||fr==="tags"?zn:"",yo=fr==="tags"||fr==="multiple"&&or===!1||Hr&&(In||po);Gn(function(){_a(ca.current.scrollWidth)},[Hi]);function Xi(Ki,ro,so,to,lo){return Te.createElement("span",{className:Fe()("".concat(Ra,"-item"),(0,ve.Z)({},"".concat(Ra,"-item-disabled"),so)),title:Vn(Ki)},Te.createElement("span",{className:"".concat(Ra,"-item-content")},ro),to&&Te.createElement(Xe,{className:"".concat(Ra,"-item-remove"),onMouseDown:yr,onClick:lo,customizeIcon:fi},"\xD7"))}function Ei(Ki,ro,so,to,lo){var vo=function(no){yr(no),Ni(!In)};return Te.createElement("span",{onMouseDown:vo},ii({label:ro,value:Ki,disabled:so,closable:to,onClose:lo}))}function ua(Ki){var ro=Ki.disabled,so=Ki.label,to=Ki.value,lo=!cr&&!ro,vo=so;if(typeof oi=="number"&&(typeof so=="string"||typeof so=="number")){var Ao=String(vo);Ao.length>oi&&(vo="".concat(Ao.slice(0,oi),"..."))}var no=function(zo){zo&&zo.stopPropagation(),la(Ki)};return typeof ii=="function"?Ei(to,vo,ro,lo,no):Xi(Ki,vo,ro,lo,no)}function Ja(Ki){var ro=typeof Oi=="function"?Oi(Ki):Oi;return Xi({title:ro},ro,!1)}var wa=Te.createElement("div",{className:"".concat(Ra,"-search"),style:{width:ia},onFocus:function(){Xa(!0)},onBlur:function(){Xa(!1)}},Te.createElement(Ti,{ref:jn,open:In,prefixCls:Et,id:Ft,inputElement:null,disabled:cr,autoFocus:ur,autoComplete:ti,editable:yo,activeDescendantId:yi,value:Hi,onKeyDown:pa,onMouseDown:ka,onChange:Ha,onPaste:Aa,onCompositionStart:Pa,onCompositionEnd:Ui,tabIndex:ni,attrs:On(Ge,!0)}),Te.createElement("span",{ref:ca,className:"".concat(Ra,"-search-mirror"),"aria-hidden":!0},Hi,"\xA0")),Wa=Te.createElement(ei,{prefixCls:"".concat(Ra,"-overflow"),data:dn,renderItem:ua,renderRest:Ja,suffix:wa,itemKey:Lr,maxCount:jr});return Te.createElement(Te.Fragment,null,Wa,!dn.length&&!Hi&&Te.createElement("span",{className:"".concat(Ra,"-placeholder")},_n))},nr=Pr,ot=function(Ge){var Ft=Ge.inputElement,Et=Ge.prefixCls,dn=Ge.id,In=Ge.inputRef,zn=Ge.disabled,or=Ge.autoFocus,jn=Ge.autoComplete,_n=Ge.activeDescendantId,cr=Ge.mode,fr=Ge.open,Hr=Ge.values,ur=Ge.placeholder,ti=Ge.tabIndex,yi=Ge.showSearch,ni=Ge.searchValue,fi=Ge.activeValue,jr=Ge.maxLength,oi=Ge.onInputKeyDown,Ci=Ge.onInputMouseDown,Oi=Ge.onInputChange,ii=Ge.onInputPaste,Ni=Ge.onInputCompositionStart,la=Ge.onInputCompositionEnd,Ha=Ge.title,Aa=Te.useState(!1),pa=(0,_e.Z)(Aa,2),ka=pa[0],Pa=pa[1],Ui=cr==="combobox",ca=Ui||yi,bi=Hr[0],zi=ni||"";Ui&&fi&&!ka&&(zi=fi),Te.useEffect(function(){Ui&&Pa(!1)},[Ui,fi]);var ia=cr!=="combobox"&&!fr&&!yi?!1:!!zi,_a=Ha===void 0?Vn(bi):Ha,So=function(){if(bi)return null;var po=ia?{visibility:"hidden"}:void 0;return Te.createElement("span",{className:"".concat(Et,"-selection-placeholder"),style:po},ur)};return Te.createElement(Te.Fragment,null,Te.createElement("span",{className:"".concat(Et,"-selection-search")},Te.createElement(Ti,{ref:In,prefixCls:Et,id:dn,open:fr,inputElement:Ft,disabled:zn,autoFocus:or,autoComplete:jn,editable:ca,activeDescendantId:_n,value:zi,onKeyDown:oi,onMouseDown:Ci,onChange:function(po){Pa(!0),Oi(po)},onPaste:ii,onCompositionStart:Ni,onCompositionEnd:la,tabIndex:ti,attrs:On(Ge,!0),maxLength:Ui?jr:void 0})),!Ui&&bi?Te.createElement("span",{className:"".concat(Et,"-selection-item"),title:_a,style:ia?{visibility:"hidden"}:void 0},bi.label):null,So())},Ct=ot;function zt(He){return![Ze.ESC,Ze.SHIFT,Ze.BACKSPACE,Ze.TAB,Ze.WIN_KEY,Ze.ALT,Ze.META,Ze.WIN_KEY_RIGHT,Ze.CTRL,Ze.SEMICOLON,Ze.EQUALS,Ze.CAPS_LOCK,Ze.CONTEXT_MENU,Ze.F1,Ze.F2,Ze.F3,Ze.F4,Ze.F5,Ze.F6,Ze.F7,Ze.F8,Ze.F9,Ze.F10,Ze.F11,Ze.F12].includes(He)}var un=function(Ge,Ft){var Et=(0,Te.useRef)(null),dn=(0,Te.useRef)(!1),In=Ge.prefixCls,zn=Ge.open,or=Ge.mode,jn=Ge.showSearch,_n=Ge.tokenWithEnter,cr=Ge.autoClearSearchValue,fr=Ge.onSearch,Hr=Ge.onSearchSubmit,ur=Ge.onToggleOpen,ti=Ge.onInputKeyDown,yi=Ge.domRef;Te.useImperativeHandle(Ft,function(){return{focus:function(){Et.current.focus()},blur:function(){Et.current.blur()}}});var ni=Qe(0),fi=(0,_e.Z)(ni,2),jr=fi[0],oi=fi[1],Ci=function(zi){var ia=zi.which;(ia===Ze.UP||ia===Ze.DOWN)&&zi.preventDefault(),ti&&ti(zi),ia===Ze.ENTER&&or==="tags"&&!dn.current&&!zn&&(Hr==null||Hr(zi.target.value)),zt(ia)&&ur(!0)},Oi=function(){oi(!0)},ii=(0,Te.useRef)(null),Ni=function(zi){fr(zi,!0,dn.current)!==!1&&ur(!0)},la=function(){dn.current=!0},Ha=function(zi){dn.current=!1,or!=="combobox"&&Ni(zi.target.value)},Aa=function(zi){var ia=zi.target.value;if(_n&&ii.current&&/[\r\n]/.test(ii.current)){var _a=ii.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ia=ia.replace(_a,ii.current)}ii.current=null,Ni(ia)},pa=function(zi){var ia=zi.clipboardData,_a=ia.getData("text");ii.current=_a},ka=function(zi){var ia=zi.target;if(ia!==Et.current){var _a=document.body.style.msTouchAction!==void 0;_a?setTimeout(function(){Et.current.focus()}):Et.current.focus()}},Pa=function(zi){var ia=jr();zi.target!==Et.current&&!ia&&or!=="combobox"&&zi.preventDefault(),(or!=="combobox"&&(!jn||!ia)||!zn)&&(zn&&cr!==!1&&fr("",!0,!1),ur())},Ui={inputRef:Et,onInputKeyDown:Ci,onInputMouseDown:Oi,onInputChange:Aa,onInputPaste:pa,onInputCompositionStart:la,onInputCompositionEnd:Ha},ca=or==="multiple"||or==="tags"?Te.createElement(nr,(0,Be.Z)({},Ge,Ui)):Te.createElement(Ct,(0,Be.Z)({},Ge,Ui));return Te.createElement("div",{ref:yi,className:"".concat(In,"-selector"),onClick:ka,onMouseDown:Pa},ca)},Je=Te.forwardRef(un);Je.displayName="Selector";var Mt=Je,ln=ae(62709),Jt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],vn=function(Ge){var Ft=Ge===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"}}},bn=function(Ge,Ft){var Et=Ge.prefixCls,dn=Ge.disabled,In=Ge.visible,zn=Ge.children,or=Ge.popupElement,jn=Ge.animation,_n=Ge.transitionName,cr=Ge.dropdownStyle,fr=Ge.dropdownClassName,Hr=Ge.direction,ur=Hr===void 0?"ltr":Hr,ti=Ge.placement,yi=Ge.builtinPlacements,ni=Ge.dropdownMatchSelectWidth,fi=Ge.dropdownRender,jr=Ge.dropdownAlign,oi=Ge.getPopupContainer,Ci=Ge.empty,Oi=Ge.getTriggerDOMNode,ii=Ge.onPopupVisibleChange,Ni=Ge.onPopupMouseEnter,la=(0,we.Z)(Ge,Jt),Ha="".concat(Et,"-dropdown"),Aa=or;fi&&(Aa=fi(or));var pa=Te.useMemo(function(){return yi||vn(ni)},[yi,ni]),ka=jn?"".concat(Ha,"-").concat(jn):_n,Pa=typeof ni=="number",Ui=Te.useMemo(function(){return Pa?null:ni===!1?"minWidth":"width"},[ni,Pa]),ca=cr;Pa&&(ca=(0,Ce.Z)((0,Ce.Z)({},ca),{},{width:ni}));var bi=Te.useRef(null);return Te.useImperativeHandle(Ft,function(){return{getPopupElement:function(){return bi.current}}}),Te.createElement(ln.Z,(0,Be.Z)({},la,{showAction:ii?["click"]:[],hideAction:ii?["click"]:[],popupPlacement:ti||(ur==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:pa,prefixCls:Ha,popupTransitionName:ka,popup:Te.createElement("div",{ref:bi,onMouseEnter:Ni},Aa),stretch:Ui,popupAlign:jr,popupVisible:In,getPopupContainer:oi,popupClassName:Fe()(fr,(0,ve.Z)({},"".concat(Ha,"-empty"),Ci)),popupStyle:ca,getTriggerDOMNode:Oi,onPopupVisibleChange:ii}),zn)},Fn=Te.forwardRef(bn);Fn.displayName="SelectTrigger";var Nr=Fn,Sr=ae(84506);function vr(He,Ge){var Ft=He.key,Et;return"value"in He&&(Et=He.value),Ft!=null?Ft:Et!==void 0?Et:"rc-index-key-".concat(Ge)}function Ir(He,Ge){var Ft=He||{},Et=Ft.label,dn=Ft.value,In=Ft.options,zn=Ft.groupLabel,or=Et||(Ge?"children":"label");return{label:or,value:dn||"value",options:In||"options",groupLabel:zn||or}}function _r(He){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ft=Ge.fieldNames,Et=Ge.childrenAsData,dn=[],In=Ir(Ft,!1),zn=In.label,or=In.value,jn=In.options,_n=In.groupLabel;function cr(fr,Hr){fr.forEach(function(ur){if(Hr||!(jn in ur)){var ti=ur[or];dn.push({key:vr(ur,dn.length),groupOption:Hr,data:ur,label:ur[zn],value:ti})}else{var yi=ur[_n];yi===void 0&&Et&&(yi=ur.label),dn.push({key:vr(ur,dn.length),group:!0,data:ur,label:yi}),cr(ur[jn],!0)}})}return cr(He,!1),dn}function Lt(He){var Ge=(0,Ce.Z)({},He);return"props"in Ge||Object.defineProperty(Ge,"props",{get:function(){return At(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ge}}),Ge}function wt(He,Ge){if(!Ge||!Ge.length)return null;var Ft=!1;function Et(In,zn){var or=(0,Sr.Z)(zn),jn=or[0],_n=or.slice(1);if(!jn)return[In];var cr=In.split(jn);return Ft=Ft||cr.length>1,cr.reduce(function(fr,Hr){return[].concat((0,Ye.Z)(fr),(0,Ye.Z)(Et(Hr,_n)))},[]).filter(function(fr){return fr})}var dn=Et(He,Ge);return Ft?dn:null}var Ot=["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"],Dn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function er(He){return He==="tags"||He==="multiple"}var An=Te.forwardRef(function(He,Ge){var Ft,Et,dn=He.id,In=He.prefixCls,zn=He.className,or=He.showSearch,jn=He.tagRender,_n=He.direction,cr=He.omitDomProps,fr=He.displayValues,Hr=He.onDisplayValuesChange,ur=He.emptyOptions,ti=He.notFoundContent,yi=ti===void 0?"Not Found":ti,ni=He.onClear,fi=He.mode,jr=He.disabled,oi=He.loading,Ci=He.getInputElement,Oi=He.getRawInputElement,ii=He.open,Ni=He.defaultOpen,la=He.onDropdownVisibleChange,Ha=He.activeValue,Aa=He.onActiveValueChange,pa=He.activeDescendantId,ka=He.searchValue,Pa=He.autoClearSearchValue,Ui=He.onSearch,ca=He.onSearchSplit,bi=He.tokenSeparators,zi=He.allowClear,ia=He.suffixIcon,_a=He.clearIcon,So=He.OptionList,ho=He.animation,po=He.transitionName,Xa=He.dropdownStyle,Ra=He.dropdownClassName,Hi=He.dropdownMatchSelectWidth,yo=He.dropdownRender,Xi=He.dropdownAlign,Ei=He.placement,ua=He.builtinPlacements,Ja=He.getPopupContainer,wa=He.showAction,Wa=wa===void 0?[]:wa,Ki=He.onFocus,ro=He.onBlur,so=He.onKeyUp,to=He.onKeyDown,lo=He.onMouseDown,vo=(0,we.Z)(He,Ot),Ao=er(fi),no=(or!==void 0?or:Ao)||fi==="combobox",ao=(0,Ce.Z)({},vo);Dn.forEach(function(ya){delete ao[ya]}),cr==null||cr.forEach(function(ya){delete ao[ya]});var zo=Te.useState(!1),Ho=(0,_e.Z)(zo,2),Jo=Ho[0],To=Ho[1];Te.useEffect(function(){To(ct())},[]);var co=Te.useRef(null),aa=Te.useRef(null),va=Te.useRef(null),qa=Te.useRef(null),uo=Te.useRef(null),Po=hn(),Uo=(0,_e.Z)(Po,3),qo=Uo[0],ls=Uo[1],Ss=Uo[2];Te.useImperativeHandle(Ge,function(){var ya,ma;return{focus:(ya=qa.current)===null||ya===void 0?void 0:ya.focus,blur:(ma=qa.current)===null||ma===void 0?void 0:ma.blur,scrollTo:function(Mo){var Da;return(Da=uo.current)===null||Da===void 0?void 0:Da.scrollTo(Mo)}}});var Qo=Te.useMemo(function(){var ya;if(fi!=="combobox")return ka;var ma=(ya=fr[0])===null||ya===void 0?void 0:ya.value;return typeof ma=="string"||typeof ma=="number"?String(ma):""},[ka,fi,fr]),Cs=fi==="combobox"&&typeof Ci=="function"&&Ci()||null,Ka=typeof Oi=="function"&&Oi(),ye=qt(aa,Ka==null||(Ft=Ka.props)===null||Ft===void 0?void 0:Ft.ref),ke=Te.useState(!1),De=(0,_e.Z)(ke,2),nt=De[0],at=De[1];ht(function(){at(!0)},[]);var an=xt(!1,{defaultValue:Ni,value:ii}),Zt=(0,_e.Z)(an,2),Pn=Zt[0],fn=Zt[1],Ut=nt?Pn:!1,Kn=!yi&&ur;(jr||Kn&&Ut&&fi==="combobox")&&(Ut=!1);var gn=Kn?!1:Ut,xn=Te.useCallback(function(ya){var ma=ya!==void 0?ya:!Ut;jr||(fn(ma),Ut!==ma&&(la==null||la(ma)))},[jr,Ut,fn,la]),ir=Te.useMemo(function(){return(bi||[]).some(function(ya){return[`
`,`\r
`].includes(ya)})},[bi]),sr=function(ma,Do,Mo){var Da=!0,Qa=ma;Aa==null||Aa(null);var Di=Mo?null:wt(ma,bi);return fi!=="combobox"&&Di&&(Qa="",ca==null||ca(Di),xn(!1),Da=!1),Ui&&Qo!==Qa&&Ui(Qa,{source:Do?"typing":"effect"}),Da},Mn=function(ma){!ma||!ma.trim()||Ui(ma,{source:"submit"})};Te.useEffect(function(){!Ut&&!Ao&&fi!=="combobox"&&sr("",!1,!1)},[Ut]),Te.useEffect(function(){Pn&&jr&&fn(!1),jr&&ls(!1)},[jr]);var Xn=Qe(),Mr=(0,_e.Z)(Xn,2),Tr=Mr[0],Vr=Mr[1],si=function(ma){var Do=Tr(),Mo=ma.which;if(Mo===Ze.ENTER&&(fi!=="combobox"&&ma.preventDefault(),Ut||xn(!0)),Vr(!!Qo),Mo===Ze.BACKSPACE&&!Do&&Ao&&!Qo&&fr.length){for(var Da=(0,Ye.Z)(fr),Qa=null,Di=Da.length-1;Di>=0;Di-=1){var ja=Da[Di];if(!ja.disabled){Da.splice(Di,1),Qa=ja;break}}Qa&&Hr(Da,{type:"remove",values:[Qa]})}for(var bo=arguments.length,Go=new Array(bo>1?bo-1:0),Fo=1;Fo<bo;Fo++)Go[Fo-1]=arguments[Fo];if(Ut&&uo.current){var Ko;(Ko=uo.current).onKeyDown.apply(Ko,[ma].concat(Go))}to==null||to.apply(void 0,[ma].concat(Go))},xi=function(ma){for(var Do=arguments.length,Mo=new Array(Do>1?Do-1:0),Da=1;Da<Do;Da++)Mo[Da-1]=arguments[Da];if(Ut&&uo.current){var Qa;(Qa=uo.current).onKeyUp.apply(Qa,[ma].concat(Mo))}so==null||so.apply(void 0,[ma].concat(Mo))},hi=function(ma){var Do=fr.filter(function(Mo){return Mo!==ma});Hr(Do,{type:"remove",values:[ma]})},Xr=Te.useRef(!1),da=function(){ls(!0),jr||(Ki&&!Xr.current&&Ki.apply(void 0,arguments),Wa.includes("focus")&&xn(!0)),Xr.current=!0},Ji=function(){ls(!1,function(){Xr.current=!1,xn(!1)}),!jr&&(Qo&&(fi==="tags"?Ui(Qo,{source:"submit"}):fi==="multiple"&&Ui("",{source:"blur"})),ro&&ro.apply(void 0,arguments))},Na=[];Te.useEffect(function(){return function(){Na.forEach(function(ya){return clearTimeout(ya)}),Na.splice(0,Na.length)}},[]);var Ua=function(ma){var Do,Mo=ma.target,Da=(Do=va.current)===null||Do===void 0?void 0:Do.getPopupElement();if(Da&&Da.contains(Mo)){var Qa=setTimeout(function(){var Go=Na.indexOf(Qa);if(Go!==-1&&Na.splice(Go,1),Ss(),!Jo&&!Da.contains(document.activeElement)){var Fo;(Fo=qa.current)===null||Fo===void 0||Fo.focus()}});Na.push(Qa)}for(var Di=arguments.length,ja=new Array(Di>1?Di-1:0),bo=1;bo<Di;bo++)ja[bo-1]=arguments[bo];lo==null||lo.apply(void 0,[ma].concat(ja))},Sa=Te.useState({}),ji=(0,_e.Z)(Sa,2),$a=ji[1];function Ca(){$a({})}var fa;Ka&&(fa=function(ma){xn(ma)}),ut(function(){var ya;return[co.current,(ya=va.current)===null||ya===void 0?void 0:ya.getPopupElement()]},gn,xn,!!Ka);var La=Te.useMemo(function(){return(0,Ce.Z)((0,Ce.Z)({},He),{},{notFoundContent:yi,open:Ut,triggerOpen:gn,id:dn,showSearch:no,multiple:Ao,toggleOpen:xn})},[He,yi,gn,Ut,dn,no,Ao,xn]),Oa=!!ia||oi,oo;Oa&&(oo=Te.createElement(Xe,{className:Fe()("".concat(In,"-arrow"),(0,ve.Z)({},"".concat(In,"-arrow-loading"),oi)),customizeIcon:ia,customizeIconProps:{loading:oi,searchValue:Qo,open:Ut,focused:qo,showSearch:no}}));var fo=function(){var ma;ni==null||ni(),(ma=qa.current)===null||ma===void 0||ma.focus(),Hr([],{type:"clear",values:fr}),sr("",!1,!1)},$o=Me(In,fo,fr,zi,_a,jr,Qo,fi),cs=$o.allowClear,ss=$o.clearIcon,jo=Te.createElement(So,{ref:uo}),Lo=Fe()(In,zn,(Et={},(0,ve.Z)(Et,"".concat(In,"-focused"),qo),(0,ve.Z)(Et,"".concat(In,"-multiple"),Ao),(0,ve.Z)(Et,"".concat(In,"-single"),!Ao),(0,ve.Z)(Et,"".concat(In,"-allow-clear"),zi),(0,ve.Z)(Et,"".concat(In,"-show-arrow"),Oa),(0,ve.Z)(Et,"".concat(In,"-disabled"),jr),(0,ve.Z)(Et,"".concat(In,"-loading"),oi),(0,ve.Z)(Et,"".concat(In,"-open"),Ut),(0,ve.Z)(Et,"".concat(In,"-customize-input"),Cs),(0,ve.Z)(Et,"".concat(In,"-show-search"),no),Et)),ps=Te.createElement(Nr,{ref:va,disabled:jr,prefixCls:In,visible:gn,popupElement:jo,animation:ho,transitionName:po,dropdownStyle:Xa,dropdownClassName:Ra,direction:_n,dropdownMatchSelectWidth:Hi,dropdownRender:yo,dropdownAlign:Xi,placement:Ei,builtinPlacements:ua,getPopupContainer:Ja,empty:ur,getTriggerDOMNode:function(){return aa.current},onPopupVisibleChange:fa,onPopupMouseEnter:Ca},Ka?Te.cloneElement(Ka,{ref:ye}):Te.createElement(Mt,(0,Be.Z)({},He,{domRef:aa,prefixCls:In,inputElement:Cs,ref:qa,id:dn,showSearch:no,autoClearSearchValue:Pa,mode:fi,activeDescendantId:pa,tagRender:jn,values:fr,open:Ut,onToggleOpen:xn,activeValue:Ha,searchValue:Qo,onSearch:sr,onSearchSubmit:Mn,onRemove:hi,tokenWithEnter:ir}))),Oo;return Ka?Oo=ps:Oo=Te.createElement("div",(0,Be.Z)({className:Lo},ao,{ref:co,onMouseDown:Ua,onKeyDown:si,onKeyUp:xi,onFocus:da,onBlur:Ji}),qo&&!Ut&&Te.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(fr.map(function(ya){var ma=ya.label,Do=ya.value;return["number","string"].includes((0,ge.Z)(ma))?ma:Do}).join(", "))),ps,oo,cs&&ss),Te.createElement(mt.Provider,{value:La},Oo)}),Rn=An,Nn=function(He,Ge){var Ft=Te.useRef({values:new Map,options:new Map}),Et=Te.useMemo(function(){var In=Ft.current,zn=In.values,or=In.options,jn=He.map(function(fr){if(fr.label===void 0){var Hr;return(0,Ce.Z)((0,Ce.Z)({},fr),{},{label:(Hr=zn.get(fr.value))===null||Hr===void 0?void 0:Hr.label})}return fr}),_n=new Map,cr=new Map;return jn.forEach(function(fr){_n.set(fr.value,fr),cr.set(fr.value,Ge.get(fr.value)||or.get(fr.value))}),Ft.current.values=_n,Ft.current.options=cr,jn},[He,Ge]),dn=Te.useCallback(function(In){return Ge.get(In)||Ft.current.options.get(In)},[Ge]);return[Et,dn]};function rr(He,Ge){return na(He).join("").toUpperCase().includes(Ge)}var Dr=function(He,Ge,Ft,Et,dn){return Te.useMemo(function(){if(!Ft||Et===!1)return He;var In=Ge.options,zn=Ge.label,or=Ge.value,jn=[],_n=typeof Et=="function",cr=Ft.toUpperCase(),fr=_n?Et:function(ur,ti){return dn?rr(ti[dn],cr):ti[In]?rr(ti[zn!=="children"?zn:"label"],cr):rr(ti[or],cr)},Hr=_n?function(ur){return Lt(ur)}:function(ur){return ur};return He.forEach(function(ur){if(ur[In]){var ti=fr(Ft,Hr(ur));if(ti)jn.push(ur);else{var yi=ur[In].filter(function(ni){return fr(Ft,Hr(ni))});yi.length&&jn.push((0,Ce.Z)((0,Ce.Z)({},ur),{},(0,ve.Z)({},In,yi)))}return}fr(Ft,Hr(ur))&&jn.push(ur)}),jn},[He,Et,dn,Ft,Ge])},yn=0,Si=Re();function di(){var He;return Si?(He=yn,yn+=1):He="TEST_OR_SSR",He}function ha(He){var Ge=Te.useState(),Ft=(0,_e.Z)(Ge,2),Et=Ft[0],dn=Ft[1];return Te.useEffect(function(){dn("rc_select_".concat(di()))},[]),He||Et}function ta(He){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ft=[];return Te.Children.forEach(He,function(Et){Et==null&&!Ge.keepEmpty||(Array.isArray(Et)?Ft=Ft.concat(ta(Et)):(0,kt.isFragment)(Et)&&Et.props?Ft=Ft.concat(ta(Et.props.children,Ge)):Ft.push(Et))}),Ft}var Wi=["children","value"],Ta=["children"];function Gi(He){var Ge=He,Ft=Ge.key,Et=Ge.props,dn=Et.children,In=Et.value,zn=(0,we.Z)(Et,Wi);return(0,Ce.Z)({key:Ft,value:In!==void 0?In:Ft,children:dn},zn)}function $i(He){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ta(He).map(function(Ft,Et){if(!Te.isValidElement(Ft)||!Ft.type)return null;var dn=Ft,In=dn.type.isSelectOptGroup,zn=dn.key,or=dn.props,jn=or.children,_n=(0,we.Z)(or,Ta);return Ge||!In?Gi(Ft):(0,Ce.Z)((0,Ce.Z)({key:"__RC_SELECT_GRP__".concat(zn===null?Et:zn,"__"),label:zn},_n),{},{options:$i(jn)})}).filter(function(Ft){return Ft})}function ra(He,Ge,Ft,Et,dn){return Te.useMemo(function(){var In=He,zn=!He;zn&&(In=$i(Ge));var or=new Map,jn=new Map,_n=function(Hr,ur,ti){ti&&typeof ti=="string"&&Hr.set(ur[ti],ur)};function cr(fr){for(var Hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ur=0;ur<fr.length;ur+=1){var ti=fr[ur];!ti[Ft.options]||Hr?(or.set(ti[Ft.value],ti),_n(jn,ti,Ft.label),_n(jn,ti,Et),_n(jn,ti,dn)):cr(ti[Ft.options],!0)}}return cr(In),{options:In,valueOptions:or,labelOptions:jn}},[He,Ge,Ft,Et,dn])}function Ma(He){var Ge=Te.useRef();Ge.current=He;var Ft=Te.useCallback(function(){return Ge.current.apply(Ge,arguments)},[]);return Ft}var vi=function(){return null};vi.isSelectOptGroup=!0;var Zi=vi,xa=function(){return null};xa.isSelectOption=!0;var Ya=xa;function Ba(He,Ge){var Ft=(0,Ce.Z)({},He);return Array.isArray(Ge)&&Ge.forEach(function(Et){delete Ft[Et]}),Ft}var ki=ae(73299),Rt=Te.createContext(null),Tt=Rt;function mn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var $n=["disabled","title","children","style","className"];function Qn(He){return typeof He=="string"||typeof He=="number"}var Or=function(Ge,Ft){var Et=Gt(),dn=Et.prefixCls,In=Et.id,zn=Et.open,or=Et.multiple,jn=Et.mode,_n=Et.searchValue,cr=Et.toggleOpen,fr=Et.notFoundContent,Hr=Et.onPopupScroll,ur=Te.useContext(Tt),ti=ur.flattenOptions,yi=ur.onActiveValue,ni=ur.defaultActiveFirstOption,fi=ur.onSelect,jr=ur.menuItemSelectedIcon,oi=ur.rawValues,Ci=ur.fieldNames,Oi=ur.virtual,ii=ur.direction,Ni=ur.listHeight,la=ur.listItemHeight,Ha="".concat(dn,"-item"),Aa=pt(function(){return ti},[zn,ti],function(Xi,Ei){return Ei[0]&&Xi[1]!==Ei[1]}),pa=Te.useRef(null),ka=function(Ei){Ei.preventDefault()},Pa=function(Ei){pa.current&&pa.current.scrollTo(typeof Ei=="number"?{index:Ei}:Ei)},Ui=function(Ei){for(var ua=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ja=Aa.length,wa=0;wa<Ja;wa+=1){var Wa=(Ei+wa*ua+Ja)%Ja,Ki=Aa[Wa],ro=Ki.group,so=Ki.data;if(!ro&&!so.disabled)return Wa}return-1},ca=Te.useState(function(){return Ui(0)}),bi=(0,_e.Z)(ca,2),zi=bi[0],ia=bi[1],_a=function(Ei){var ua=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ia(Ei);var Ja={source:ua?"keyboard":"mouse"},wa=Aa[Ei];if(!wa){yi(null,-1,Ja);return}yi(wa.value,Ei,Ja)};(0,Te.useEffect)(function(){_a(ni!==!1?Ui(0):-1)},[Aa.length,_n]);var So=Te.useCallback(function(Xi){return oi.has(Xi)&&jn!=="combobox"},[jn,(0,Ye.Z)(oi).toString(),oi.size]);(0,Te.useEffect)(function(){var Xi=setTimeout(function(){if(!or&&zn&&oi.size===1){var ua=Array.from(oi)[0],Ja=Aa.findIndex(function(wa){var Wa=wa.data;return Wa.value===ua});Ja!==-1&&(_a(Ja),Pa(Ja))}});if(zn){var Ei;(Ei=pa.current)===null||Ei===void 0||Ei.scrollTo(void 0)}return function(){return clearTimeout(Xi)}},[zn,_n,ti.length]);var ho=function(Ei){Ei!==void 0&&fi(Ei,{selected:!oi.has(Ei)}),or||cr(!1)};if(Te.useImperativeHandle(Ft,function(){return{onKeyDown:function(Ei){var ua=Ei.which,Ja=Ei.ctrlKey;switch(ua){case Ze.N:case Ze.P:case Ze.UP:case Ze.DOWN:{var wa=0;if(ua===Ze.UP?wa=-1:ua===Ze.DOWN?wa=1:mn()&&Ja&&(ua===Ze.N?wa=1:ua===Ze.P&&(wa=-1)),wa!==0){var Wa=Ui(zi+wa,wa);Pa(Wa),_a(Wa,!0)}break}case Ze.ENTER:{var Ki=Aa[zi];Ki&&!Ki.data.disabled?ho(Ki.value):ho(void 0),zn&&Ei.preventDefault();break}case Ze.ESC:cr(!1),zn&&Ei.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ei){Pa(Ei)}}}),Aa.length===0)return Te.createElement("div",{role:"listbox",id:"".concat(In,"_list"),className:"".concat(Ha,"-empty"),onMouseDown:ka},fr);var po=Object.keys(Ci).map(function(Xi){return Ci[Xi]}),Xa=function(Ei){return Ei.label};function Ra(Xi,Ei){var ua=Xi.group;return{role:ua?"presentation":"option",id:"".concat(In,"_list_").concat(Ei)}}var Hi=function(Ei){var ua=Aa[Ei];if(!ua)return null;var Ja=ua.data||{},wa=Ja.value,Wa=ua.group,Ki=On(Ja,!0),ro=Xa(ua);return ua?Te.createElement("div",(0,Be.Z)({"aria-label":typeof ro=="string"&&!Wa?ro:null},Ki,{key:Ei},Ra(ua,Ei),{"aria-selected":So(wa)}),wa):null},yo={role:"listbox",id:"".concat(In,"_list")};return Te.createElement(Te.Fragment,null,Oi&&Te.createElement("div",(0,Be.Z)({},yo,{style:{height:0,width:0,overflow:"hidden"}}),Hi(zi-1),Hi(zi),Hi(zi+1)),Te.createElement(ki.Z,{itemKey:"key",ref:pa,data:Aa,height:Ni,itemHeight:la,fullHeight:!1,onMouseDown:ka,onScroll:Hr,virtual:Oi,direction:ii,innerProps:Oi?null:yo},function(Xi,Ei){var ua,Ja=Xi.group,wa=Xi.groupOption,Wa=Xi.data,Ki=Xi.label,ro=Xi.value,so=Wa.key;if(Ja){var to,lo=(to=Wa.title)!==null&&to!==void 0?to:Qn(Ki)?Ki.toString():void 0;return Te.createElement("div",{className:Fe()(Ha,"".concat(Ha,"-group")),title:lo},Ki!==void 0?Ki:so)}var vo=Wa.disabled,Ao=Wa.title,no=Wa.children,ao=Wa.style,zo=Wa.className,Ho=(0,we.Z)(Wa,$n),Jo=Ba(Ho,po),To=So(ro),co="".concat(Ha,"-option"),aa=Fe()(Ha,co,zo,(ua={},(0,ve.Z)(ua,"".concat(co,"-grouped"),wa),(0,ve.Z)(ua,"".concat(co,"-active"),zi===Ei&&!vo),(0,ve.Z)(ua,"".concat(co,"-disabled"),vo),(0,ve.Z)(ua,"".concat(co,"-selected"),To),ua)),va=Xa(Xi),qa=!jr||typeof jr=="function"||To,uo=typeof va=="number"?va:va||ro,Po=Qn(uo)?uo.toString():void 0;return Ao!==void 0&&(Po=Ao),Te.createElement("div",(0,Be.Z)({},On(Jo),Oi?{}:Ra(Xi,Ei),{"aria-selected":To,className:aa,title:Po,onMouseMove:function(){zi===Ei||vo||_a(Ei)},onClick:function(){vo||ho(ro)},style:ao}),Te.createElement("div",{className:"".concat(co,"-content")},uo),Te.isValidElement(jr)||To,qa&&Te.createElement(Xe,{className:"".concat(Ha,"-option-state"),customizeIcon:jr,customizeIconProps:{isSelected:To}},To?"\u2713":null))}))},Gr=Te.forwardRef(Or);Gr.displayName="OptionList";var ci=Gr;function gi(He){var Ge=He.mode,Ft=He.options,Et=He.children,dn=He.backfill,In=He.allowClear,zn=He.placeholder,or=He.getInputElement,jn=He.showSearch,_n=He.onSearch,cr=He.defaultOpen,fr=He.autoFocus,Hr=He.labelInValue,ur=He.value,ti=He.inputValue,yi=He.optionLabelProp,ni=isMultiple(Ge),fi=jn!==void 0?jn:ni||Ge==="combobox",jr=Ft||convertChildrenToData(Et);if(warning(Ge!=="tags"||jr.every(function(ii){return!ii.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ge==="tags"||Ge==="combobox"){var oi=jr.some(function(ii){return ii.options?ii.options.some(function(Ni){return typeof("value"in Ni?Ni.value:Ni.key)=="number"}):typeof("value"in ii?ii.value:ii.key)=="number"});warning(!oi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ge!=="combobox"||!yi,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ge==="combobox"||!dn,"`backfill` only works with `combobox` mode."),warning(Ge==="combobox"||!or,"`getInputElement` only work with `combobox` mode."),noteOnce(Ge!=="combobox"||!or||!In||!zn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_n&&!fi&&Ge!=="combobox"&&Ge!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!cr||fr,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ur!=null){var Ci=toArray(ur);warning(!Hr||Ci.every(function(ii){return _typeof(ii)==="object"&&("key"in ii||"value"in ii)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ni||Array.isArray(ur),"`value` should be array when `mode` is `multiple` or `tags`")}if(Et){var Oi=null;toNodeArray(Et).some(function(ii){if(!React.isValidElement(ii)||!ii.type)return!1;var Ni=ii,la=Ni.type;if(la.isSelectOption)return!1;if(la.isSelectOptGroup){var Ha=toNodeArray(ii.props.children).every(function(Aa){return!React.isValidElement(Aa)||!ii.type||Aa.type.isSelectOption?!0:(Oi=Aa.type,!1)});return!Ha}return Oi=la,!0}),Oi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Oi.displayName||Oi.name||Oi,"`.")),warning(ti===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function li(He,Ge){if(He){var Ft=function Et(dn){for(var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zn=0;zn<dn.length;zn++){var or=dn[zn];if(or[Ge==null?void 0:Ge.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!In&&Array.isArray(or[Ge==null?void 0:Ge.options])&&Et(or[Ge==null?void 0:Ge.options],!0))break}};Ft(He)}}var Mi=null,Vi=["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"],Yr=["inputValue"];function Fi(He){return!He||(0,ge.Z)(He)!=="object"}var sa=Te.forwardRef(function(He,Ge){var Ft=He.id,Et=He.mode,dn=He.prefixCls,In=dn===void 0?"rc-select":dn,zn=He.backfill,or=He.fieldNames,jn=He.inputValue,_n=He.searchValue,cr=He.onSearch,fr=He.autoClearSearchValue,Hr=fr===void 0?!0:fr,ur=He.onSelect,ti=He.onDeselect,yi=He.dropdownMatchSelectWidth,ni=yi===void 0?!0:yi,fi=He.filterOption,jr=He.filterSort,oi=He.optionFilterProp,Ci=He.optionLabelProp,Oi=He.options,ii=He.children,Ni=He.defaultActiveFirstOption,la=He.menuItemSelectedIcon,Ha=He.virtual,Aa=He.direction,pa=He.listHeight,ka=pa===void 0?200:pa,Pa=He.listItemHeight,Ui=Pa===void 0?20:Pa,ca=He.value,bi=He.defaultValue,zi=He.labelInValue,ia=He.onChange,_a=(0,we.Z)(He,Vi),So=ha(Ft),ho=er(Et),po=!!(!Oi&&ii),Xa=Te.useMemo(function(){return fi===void 0&&Et==="combobox"?!1:fi},[fi,Et]),Ra=Te.useMemo(function(){return Ir(or,po)},[JSON.stringify(or),po]),Hi=xt("",{value:_n!==void 0?_n:jn,postState:function(Kn){return Kn||""}}),yo=(0,_e.Z)(Hi,2),Xi=yo[0],Ei=yo[1],ua=ra(Oi,ii,Ra,oi,Ci),Ja=ua.valueOptions,wa=ua.labelOptions,Wa=ua.options,Ki=Te.useCallback(function(Ut){var Kn=na(Ut);return Kn.map(function(gn){var xn,ir,sr,Mn,Xn;if(Fi(gn))xn=gn;else{var Mr;sr=gn.key,ir=gn.label,xn=(Mr=gn.value)!==null&&Mr!==void 0?Mr:sr}var Tr=Ja.get(xn);if(Tr){var Vr;if(ir===void 0&&(ir=Tr==null?void 0:Tr[Ci||Ra.label]),sr===void 0&&(sr=(Vr=Tr==null?void 0:Tr.key)!==null&&Vr!==void 0?Vr:xn),Mn=Tr==null?void 0:Tr.disabled,Xn=Tr==null?void 0:Tr.title,0)var si}return{label:ir,value:xn,key:sr,disabled:Mn,title:Xn}})},[Ra,Ci,Ja]),ro=xt(bi,{value:ca}),so=(0,_e.Z)(ro,2),to=so[0],lo=so[1],vo=Te.useMemo(function(){var Ut,Kn=Ki(to);return Et==="combobox"&&Dt((Ut=Kn[0])===null||Ut===void 0?void 0:Ut.value)?[]:Kn},[to,Ki,Et]),Ao=Nn(vo,Ja),no=(0,_e.Z)(Ao,2),ao=no[0],zo=no[1],Ho=Te.useMemo(function(){if(!Et&&ao.length===1){var Ut=ao[0];if(Ut.value===null&&(Ut.label===null||Ut.label===void 0))return[]}return ao.map(function(Kn){var gn;return(0,Ce.Z)((0,Ce.Z)({},Kn),{},{label:(gn=Kn.label)!==null&&gn!==void 0?gn:Kn.value})})},[Et,ao]),Jo=Te.useMemo(function(){return new Set(ao.map(function(Ut){return Ut.value}))},[ao]);Te.useEffect(function(){if(Et==="combobox"){var Ut,Kn=(Ut=ao[0])===null||Ut===void 0?void 0:Ut.value;Ei(Li(Kn)?String(Kn):"")}},[ao]);var To=Ma(function(Ut,Kn){var gn,xn=Kn!=null?Kn:Ut;return gn={},(0,ve.Z)(gn,Ra.value,Ut),(0,ve.Z)(gn,Ra.label,xn),gn}),co=Te.useMemo(function(){if(Et!=="tags")return Wa;var Ut=(0,Ye.Z)(Wa),Kn=function(xn){return Ja.has(xn)};return(0,Ye.Z)(ao).sort(function(gn,xn){return gn.value<xn.value?-1:1}).forEach(function(gn){var xn=gn.value;Kn(xn)||Ut.push(To(xn,gn.label))}),Ut},[To,Wa,Ja,ao,Et]),aa=Dr(co,Ra,Xi,Xa,oi),va=Te.useMemo(function(){return Et!=="tags"||!Xi||aa.some(function(Ut){return Ut[oi||"value"]===Xi})||aa.some(function(Ut){return Ut[Ra.value]===Xi})?aa:[To(Xi)].concat((0,Ye.Z)(aa))},[To,oi,Et,aa,Xi,Ra]),qa=Te.useMemo(function(){return jr?(0,Ye.Z)(va).sort(function(Ut,Kn){return jr(Ut,Kn)}):va},[va,jr]),uo=Te.useMemo(function(){return _r(qa,{fieldNames:Ra,childrenAsData:po})},[qa,Ra,po]),Po=function(Kn){var gn=Ki(Kn);if(lo(gn),ia&&(gn.length!==ao.length||gn.some(function(sr,Mn){var Xn;return((Xn=ao[Mn])===null||Xn===void 0?void 0:Xn.value)!==(sr==null?void 0:sr.value)}))){var xn=zi?gn:gn.map(function(sr){return sr.value}),ir=gn.map(function(sr){return Lt(zo(sr.value))});ia(ho?xn:xn[0],ho?ir:ir[0])}},Uo=Te.useState(null),qo=(0,_e.Z)(Uo,2),ls=qo[0],Ss=qo[1],Qo=Te.useState(0),Cs=(0,_e.Z)(Qo,2),Ka=Cs[0],ye=Cs[1],ke=Ni!==void 0?Ni:Et!=="combobox",De=Te.useCallback(function(Ut,Kn){var gn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},xn=gn.source,ir=xn===void 0?"keyboard":xn;ye(Kn),zn&&Et==="combobox"&&Ut!==null&&ir==="keyboard"&&Ss(String(Ut))},[zn,Et]),nt=function(Kn,gn,xn){var ir=function(){var Xr,da=zo(Kn);return[zi?{label:da==null?void 0:da[Ra.label],value:Kn,key:(Xr=da==null?void 0:da.key)!==null&&Xr!==void 0?Xr:Kn}:Kn,Lt(da)]};if(gn&&ur){var sr=ir(),Mn=(0,_e.Z)(sr,2),Xn=Mn[0],Mr=Mn[1];ur(Xn,Mr)}else if(!gn&&ti&&xn!=="clear"){var Tr=ir(),Vr=(0,_e.Z)(Tr,2),si=Vr[0],xi=Vr[1];ti(si,xi)}},at=Ma(function(Ut,Kn){var gn,xn=ho?Kn.selected:!0;xn?gn=ho?[].concat((0,Ye.Z)(ao),[Ut]):[Ut]:gn=ao.filter(function(ir){return ir.value!==Ut}),Po(gn),nt(Ut,xn),Et==="combobox"?Ss(""):(!er||Hr)&&(Ei(""),Ss(""))}),an=function(Kn,gn){Po(Kn);var xn=gn.type,ir=gn.values;(xn==="remove"||xn==="clear")&&ir.forEach(function(sr){nt(sr.value,!1,xn)})},Zt=function(Kn,gn){if(Ei(Kn),Ss(null),gn.source==="submit"){var xn=(Kn||"").trim();if(xn){var ir=Array.from(new Set([].concat((0,Ye.Z)(Jo),[xn])));Po(ir),nt(xn,!0),Ei("")}return}gn.source!=="blur"&&(Et==="combobox"&&Po(Kn),cr==null||cr(Kn))},Pn=function(Kn){var gn=Kn;Et!=="tags"&&(gn=Kn.map(function(ir){var sr=wa.get(ir);return sr==null?void 0:sr.value}).filter(function(ir){return ir!==void 0}));var xn=Array.from(new Set([].concat((0,Ye.Z)(Jo),(0,Ye.Z)(gn))));Po(xn),xn.forEach(function(ir){nt(ir,!0)})},fn=Te.useMemo(function(){var Ut=Ha!==!1&&ni!==!1;return(0,Ce.Z)((0,Ce.Z)({},ua),{},{flattenOptions:uo,onActiveValue:De,defaultActiveFirstOption:ke,onSelect:at,menuItemSelectedIcon:la,rawValues:Jo,fieldNames:Ra,virtual:Ut,direction:Aa,listHeight:ka,listItemHeight:Ui,childrenAsData:po})},[ua,uo,De,ke,at,la,Jo,Ra,Ha,ni,ka,Ui,po]);return Te.createElement(Tt.Provider,{value:fn},Te.createElement(Rn,(0,Be.Z)({},_a,{id:So,prefixCls:In,ref:Ge,omitDomProps:Yr,mode:Et,displayValues:Ho,onDisplayValuesChange:an,direction:Aa,searchValue:Xi,onSearch:Zt,autoClearSearchValue:Hr,onSearchSplit:Pn,dropdownMatchSelectWidth:ni,OptionList:ci,emptyOptions:!uo.length,activeValue:ls,activeDescendantId:"".concat(So,"_list_").concat(Ka)})))}),Yi=sa;Yi.Option=Ya,Yi.OptGroup=Zi;var Oe=Yi,Ve=Oe,Ue=ae(10366),qe=ae(8745),vt=ae(33603),St=ae(9708),Nt=ae(53124),wn=ae(98866),Ln=ae(88258),br=ae(98675),Br=ae(65223),hr=ae(4173),Wn=ae(87244),Tn=ae(13458),Jn=ae(78642),ar=ae(46163),$r=function(He,Ge){var Ft={};for(var Et in He)Object.prototype.hasOwnProperty.call(He,Et)&&Ge.indexOf(Et)<0&&(Ft[Et]=He[Et]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dn=0,Et=Object.getOwnPropertySymbols(He);dn<Et.length;dn++)Ge.indexOf(Et[dn])<0&&Object.prototype.propertyIsEnumerable.call(He,Et[dn])&&(Ft[Et[dn]]=He[Et[dn]]);return Ft};const mr="SECRET_COMBOBOX_MODE_DO_NOT_USE",gr=(He,Ge)=>{var Ft,{prefixCls:Et,bordered:dn=!0,className:In,rootClassName:zn,getPopupContainer:or,popupClassName:jn,dropdownClassName:_n,listHeight:cr=256,placement:fr,listItemHeight:Hr=24,size:ur,disabled:ti,notFoundContent:yi,status:ni,builtinPlacements:fi,dropdownMatchSelectWidth:jr,popupMatchSelectWidth:oi,direction:Ci,style:Oi,allowClear:ii}=He,Ni=$r(He,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:la,getPrefixCls:Ha,renderEmpty:Aa,direction:pa,virtual:ka,popupMatchSelectWidth:Pa,popupOverflow:Ui,select:ca}=Te.useContext(Nt.E_),bi=Ha("select",Et),zi=Ha(),ia=Ci!=null?Ci:pa,{compactSize:_a,compactItemClassnames:So}=(0,hr.ri)(bi,ia),[ho,po]=(0,Wn.Z)(bi),Xa=Te.useMemo(()=>{const{mode:co}=Ni;if(co!=="combobox")return co===mr?"combobox":co},[Ni.mode]),Ra=Xa==="multiple"||Xa==="tags",Hi=(0,Jn.Z)(Ni.suffixIcon,Ni.showArrow),yo=(Ft=oi!=null?oi:jr)!==null&&Ft!==void 0?Ft:Pa,{status:Xi,hasFeedback:Ei,isFormItemInput:ua,feedbackIcon:Ja}=Te.useContext(Br.aM),wa=(0,St.F)(Xi,ni);let Wa;yi!==void 0?Wa=yi:Xa==="combobox"?Wa=null:Wa=(Aa==null?void 0:Aa("Select"))||Te.createElement(Ln.Z,{componentName:"Select"});const{suffixIcon:Ki,itemIcon:ro,removeIcon:so,clearIcon:to}=(0,ar.Z)(Object.assign(Object.assign({},Ni),{multiple:Ra,hasFeedback:Ei,feedbackIcon:Ja,showSuffixIcon:Hi,prefixCls:bi,showArrow:Ni.showArrow,componentName:"Select"})),lo=ii===!0?{clearIcon:to}:ii,vo=(0,Ue.Z)(Ni,["suffixIcon","itemIcon"]),Ao=Fe()(jn||_n,{[`${bi}-dropdown-${ia}`]:ia==="rtl"},zn,po),no=(0,br.Z)(co=>{var aa;return(aa=ur!=null?ur:_a)!==null&&aa!==void 0?aa:co}),ao=Te.useContext(wn.Z),zo=ti!=null?ti:ao,Ho=Fe()({[`${bi}-lg`]:no==="large",[`${bi}-sm`]:no==="small",[`${bi}-rtl`]:ia==="rtl",[`${bi}-borderless`]:!dn,[`${bi}-in-form-item`]:ua},(0,St.Z)(bi,wa,Ei),So,ca==null?void 0:ca.className,In,zn,po),Jo=Te.useMemo(()=>fr!==void 0?fr:ia==="rtl"?"bottomRight":"bottomLeft",[fr,ia]),To=(0,Tn.Z)(fi,Ui);return ho(Te.createElement(Ve,Object.assign({ref:Ge,virtual:ka,showSearch:ca==null?void 0:ca.showSearch},vo,{style:Object.assign(Object.assign({},ca==null?void 0:ca.style),Oi),dropdownMatchSelectWidth:yo,builtinPlacements:To,transitionName:(0,vt.m)(zi,"slide-up",Ni.transitionName),listHeight:cr,listItemHeight:Hr,mode:Xa,prefixCls:bi,placement:Jo,direction:ia,suffixIcon:Ki,menuItemSelectedIcon:ro,removeIcon:so,allowClear:lo,notFoundContent:Wa,className:Ho,getPopupContainer:or||la,dropdownClassName:Ao,disabled:zo})))},Cr=Te.forwardRef(gr),Er=(0,qe.Z)(Cr);Cr.SECRET_COMBOBOX_MODE_DO_NOT_USE=mr,Cr.Option=Ya,Cr.OptGroup=Zi,Cr._InternalPanelDoNotUseOrYouWillBeFired=Er;var Fr=Cr},87244:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Ee}});var fe=ae(14747),Fe=ae(80110),Be=ae(45503),Ye=ae(67968),ve=ae(67771),Ce=ae(33297);const _e=de=>{const{optionHeight:je,optionFontSize:ze,optionLineHeight:At,optionPadding:ct}=de;return{position:"relative",display:"block",minHeight:je,padding:ct,color:de.colorText,fontWeight:"normal",fontSize:ze,lineHeight:At,boxSizing:"border-box"}};var ge=de=>{const{antCls:je,componentCls:ze}=de,At=`${ze}-item`,ct=`&${je}-slide-up-enter${je}-slide-up-enter-active`,lt=`&${je}-slide-up-appear${je}-slide-up-appear-active`,Ze=`&${je}-slide-up-leave${je}-slide-up-leave-active`,kt=`${ze}-dropdown-placement-`;return[{[`${ze}-dropdown`]:Object.assign(Object.assign({},(0,fe.Wf)(de)),{position:"absolute",top:-9999,zIndex:de.zIndexPopup,boxSizing:"border-box",padding:de.paddingXXS,overflow:"hidden",fontSize:de.fontSize,fontVariant:"initial",backgroundColor:de.colorBgElevated,borderRadius:de.borderRadiusLG,outline:"none",boxShadow:de.boxShadowSecondary,[`
${ct}${kt}bottomLeft,
${lt}${kt}bottomLeft
`]:{animationName:ve.fJ},[`
${ct}${kt}topLeft,
${lt}${kt}topLeft,
${ct}${kt}topRight,
${lt}${kt}topRight
`]:{animationName:ve.Qt},[`${Ze}${kt}bottomLeft`]:{animationName:ve.Uw},[`
${Ze}${kt}topLeft,
${Ze}${kt}topRight
`]:{animationName:ve.ly},"&-hidden":{display:"none"},[`${At}`]:Object.assign(Object.assign({},_e(de)),{cursor:"pointer",transition:`background ${de.motionDurationSlow} ease`,borderRadius:de.borderRadiusSM,"&-group":{color:de.colorTextDescription,fontSize:de.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},fe.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${At}-option-disabled)`]:{backgroundColor:de.optionActiveBg},[`&-selected:not(${At}-option-disabled)`]:{color:de.optionSelectedColor,fontWeight:de.optionSelectedFontWeight,backgroundColor:de.optionSelectedBg,[`${At}-option-state`]:{color:de.colorPrimary}},"&-disabled":{[`&${At}-option-selected`]:{backgroundColor:de.colorBgContainerDisabled},color:de.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:de.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ve.oN)(de,"slide-up"),(0,ve.oN)(de,"slide-down"),(0,Ce.Fm)(de,"move-up"),(0,Ce.Fm)(de,"move-down")]};const Te=2,ft=de=>{let{controlHeightSM:je,controlHeight:ze,lineWidth:At}=de;const ct=(ze-je)/2-At,lt=Math.ceil(ct/2);return[ct,lt]};function Re(de,je){const{componentCls:ze,iconCls:At}=de,ct=`${ze}-selection-overflow`,lt=de.multipleSelectItemHeight,[Ze]=ft(de),kt=je?`${ze}-${je}`:"";return{[`${ze}-multiple${kt}`]:{fontSize:de.fontSize,[ct]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ze-Te}px ${Te*2}px`,borderRadius:de.borderRadius,[`${ze}-show-search&`]:{cursor:"text"},[`${ze}-disabled&`]:{background:de.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Te}px 0`,lineHeight:`${lt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${ze}-show-arrow ${ze}-selector,
&${ze}-allow-clear ${ze}-selector
`]:{paddingInlineEnd:de.fontSizeIcon+de.controlPaddingHorizontal},[`${ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:lt,marginTop:Te,marginBottom:Te,lineHeight:`${lt-de.lineWidth*2}px`,background:de.multipleItemBg,border:`${de.lineWidth}px ${de.lineType} ${de.multipleItemBorderColor}`,borderRadius:de.borderRadiusSM,cursor:"default",transition:`font-size ${de.motionDurationSlow}, line-height ${de.motionDurationSlow}, height ${de.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Te*2,paddingInlineStart:de.paddingXS,paddingInlineEnd:de.paddingXS/2,[`${ze}-disabled&`]:{color:de.multipleItemColorDisabled,borderColor:de.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:de.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,fe.Ro)()),{display:"inline-flex",alignItems:"center",color:de.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${At}`]:{verticalAlign:"-0.2em"},"&:hover":{color:de.colorIconHover}})},[`${ct}-item + ${ct}-item`]:{[`${ze}-selection-search`]:{marginInlineStart:0}},[`${ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:de.inputPaddingHorizontalBase-Ze,"\n &-input,\n &-mirror\n ":{height:lt,fontFamily:de.fontFamily,lineHeight:`${lt}px`,transition:`all ${de.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:de.inputPaddingHorizontalBase,insetInlineEnd:de.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${de.motionDurationSlow}`}}}}var ht=de=>{const{componentCls:je}=de,ze=(0,Be.TS)(de,{controlHeight:de.controlHeightSM,multipleSelectItemHeight:de.controlHeightXS,borderRadius:de.borderRadiusSM,borderRadiusSM:de.borderRadiusXS}),At=(0,Be.TS)(de,{fontSize:de.fontSizeLG,controlHeight:de.controlHeightLG,multipleSelectItemHeight:de.multipleItemHeightLG,borderRadius:de.borderRadiusLG,borderRadiusSM:de.borderRadius}),[,ct]=ft(de);return[Re(de),Re(ze,"sm"),{[`${je}-multiple${je}-sm`]:{[`${je}-selection-placeholder`]:{insetInline:de.controlPaddingHorizontalSM-de.lineWidth},[`${je}-selection-search`]:{marginInlineStart:ct}}},Re(At,"lg")]};function st(de,je){const{componentCls:ze,inputPaddingHorizontalBase:At,borderRadius:ct}=de,lt=de.controlHeight-de.lineWidth*2,Ze=Math.ceil(de.fontSize*1.25),kt=je?`${ze}-${je}`:"";return{[`${ze}-single${kt}`]:{fontSize:de.fontSize,[`${ze}-selector`]:Object.assign(Object.assign({},(0,fe.Wf)(de)),{display:"flex",borderRadius:ct,[`${ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:At,insetInlineEnd:At,bottom:0,"&-input":{width:"100%"}},[`
${ze}-selection-item,
${ze}-selection-placeholder
`]:{padding:0,lineHeight:`${lt}px`,transition:`all ${de.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${lt}px`}},[`${ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ze}-selection-item:after`,`${ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${ze}-show-arrow ${ze}-selection-item,
&${ze}-show-arrow ${ze}-selection-placeholder
`]:{paddingInlineEnd:Ze},[`&${ze}-open ${ze}-selection-item`]:{color:de.colorTextPlaceholder},[`&:not(${ze}-customize-input)`]:{[`${ze}-selector`]:{width:"100%",height:de.controlHeight,padding:`0 ${At}px`,[`${ze}-selection-search-input`]:{height:lt},"&:after":{lineHeight:`${lt}px`}}},[`&${ze}-customize-input`]:{[`${ze}-selector`]:{"&:after":{display:"none"},[`${ze}-selection-search`]:{position:"static",width:"100%"},[`${ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${At}px`,"&:after":{display:"none"}}}}}}}function tt(de){const{componentCls:je}=de,ze=de.controlPaddingHorizontalSM-de.lineWidth;return[st(de),st((0,Be.TS)(de,{controlHeight:de.controlHeightSM,borderRadius:de.borderRadiusSM}),"sm"),{[`${je}-single${je}-sm`]:{[`&:not(${je}-customize-input)`]:{[`${je}-selection-search`]:{insetInlineStart:ze,insetInlineEnd:ze},[`${je}-selector`]:{padding:`0 ${ze}px`},[`&${je}-show-arrow ${je}-selection-search`]:{insetInlineEnd:ze+de.fontSize*1.5},[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:de.fontSize*1.5}}}},st((0,Be.TS)(de,{controlHeight:de.singleItemHeightLG,fontSize:de.fontSizeLG,borderRadius:de.borderRadiusLG}),"lg")]}const Le=de=>{const{componentCls:je,selectorBg:ze}=de;return{position:"relative",backgroundColor:ze,border:`${de.lineWidth}px ${de.lineType} ${de.colorBorder}`,transition:`all ${de.motionDurationMid} ${de.motionEaseInOut}`,input:{cursor:"pointer"},[`${je}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${je}-disabled&`]:{color:de.colorTextDisabled,background:de.colorBgContainerDisabled,cursor:"not-allowed",[`${je}-multiple&`]:{background:de.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},xt=function(de,je){let ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:At,borderHoverColor:ct,outlineColor:lt,antCls:Ze}=je,kt=ze?{[`${At}-selector`]:{borderColor:ct}}:{};return{[de]:{[`&:not(${At}-disabled):not(${At}-customize-input):not(${Ze}-pagination-size-changer)`]:Object.assign(Object.assign({},kt),{[`${At}-focused& ${At}-selector`]:{borderColor:ct,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${lt}`,outline:0},[`&:hover ${At}-selector`]:{borderColor:ct}})}}},on=de=>{const{componentCls:je}=de;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"}}}},it=de=>{const{componentCls:je,inputPaddingHorizontalBase:ze,iconCls:At}=de;return{[je]:Object.assign(Object.assign({},(0,fe.Wf)(de)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${je}-customize-input) ${je}-selector`]:Object.assign(Object.assign({},Le(de)),on(de)),[`${je}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},fe.vS),[`${je}-selection-placeholder`]:Object.assign(Object.assign({},fe.vS),{flex:1,color:de.colorTextPlaceholder,pointerEvents:"none"}),[`${je}-arrow`]:Object.assign(Object.assign({},(0,fe.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,height:de.fontSizeIcon,marginTop:-de.fontSizeIcon/2,color:de.colorTextQuaternary,fontSize:de.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[At]:{verticalAlign:"top",transition:`transform ${de.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:ze,zIndex:1,display:"inline-block",width:de.fontSizeIcon,height:de.fontSizeIcon,marginTop:-de.fontSizeIcon/2,color:de.colorTextQuaternary,fontSize:de.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:de.clearBg,cursor:"pointer",opacity:0,transition:`color ${de.motionDurationMid} ease, opacity ${de.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:de.colorTextTertiary}},"&:hover":{[`${je}-clear`]:{opacity:1}}}),[`${je}-has-feedback`]:{[`${je}-clear`]:{insetInlineEnd:ze+de.fontSize+de.paddingXS}}}},yt=de=>{const{componentCls:je}=de;return[{[je]:{[`&-borderless ${je}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${je}-in-form-item`]:{width:"100%"}}},it(de),tt(de),ht(de),ge(de),{[`${je}-rtl`]:{direction:"rtl"}},xt(je,(0,Be.TS)(de,{borderHoverColor:de.colorPrimaryHover,outlineColor:de.controlOutline})),xt(`${je}-status-error`,(0,Be.TS)(de,{borderHoverColor:de.colorErrorHover,outlineColor:de.colorErrorOutline}),!0),xt(`${je}-status-warning`,(0,Be.TS)(de,{borderHoverColor:de.colorWarningHover,outlineColor:de.colorWarningOutline}),!0),(0,Fe.c)(de,{borderElCls:`${je}-selector`,focusElCls:`${je}-focused`})]};var Ee=(0,Ye.Z)("Select",(de,je)=>{let{rootPrefixCls:ze}=je;const At=(0,Be.TS)(de,{rootPrefixCls:ze,inputPaddingHorizontalBase:de.paddingSM-1,multipleSelectItemHeight:de.multipleItemHeight});return[yt(At)]},de=>{const{fontSize:je,lineHeight:ze,controlHeight:At,controlPaddingHorizontal:ct,zIndexPopupBase:lt,colorText:Ze,fontWeightStrong:kt,controlItemBgActive:pt,controlItemBgHover:nn,colorBgContainer:rt,colorFillSecondary:qt,controlHeightLG:pn,controlHeightSM:cn,colorBgContainerDisabled:Xe,colorTextDisabled:Me}=de;return{zIndexPopup:lt+50,optionSelectedColor:Ze,optionSelectedFontWeight:kt,optionSelectedBg:pt,optionActiveBg:nn,optionPadding:`${(At-je*ze)/2}px ${ct}px`,optionFontSize:je,optionLineHeight:ze,optionHeight:At,selectorBg:rt,clearBg:rt,singleItemHeightLG:pn,multipleItemBg:qt,multipleItemBorderColor:"transparent",multipleItemHeight:cn,multipleItemHeightLG:At,multipleSelectorBgDisabled:Xe,multipleItemColorDisabled:Me,multipleItemBorderColorDisabled:"transparent"}})},13458:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});const fe=Be=>{const ve={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="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 Fe(Be,Ye){return Be||fe(Ye)}},78642:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return fe}});function fe(Fe,Be){return Be!==void 0?Be:Fe!==null}},46163:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return we}});var fe=ae(18299),Fe=ae(16646),Be=ae(73475),Ye=ae(42922),ve=ae(3407),Ce=ae(72395),_e=ae(67294);function we(ge){let{suffixIcon:Te,clearIcon:ft,menuItemSelectedIcon:Re,removeIcon:bt,loading:ht,multiple:st,hasFeedback:tt,prefixCls:Le,showSuffixIcon:xt,feedbackIcon:on,showArrow:it,componentName:yt}=ge;const Ee=ft!=null?ft:_e.createElement(Fe.Z,null),de=ct=>Te===null&&!tt&&!it?null:_e.createElement(_e.Fragment,null,xt!==!1&&ct,tt&&on);let je=null;if(Te!==void 0)je=de(Te);else if(ht)je=de(_e.createElement(ve.Z,{spin:!0}));else{const ct=`${Le}-suffix`;je=lt=>{let{open:Ze,showSearch:kt}=lt;return de(Ze&&kt?_e.createElement(Ce.Z,{className:ct}):_e.createElement(Ye.Z,{className:ct}))}}let ze=null;Re!==void 0?ze=Re:st?ze=_e.createElement(fe.Z,null):ze=null;let At=null;return bt!==void 0?At=bt:At=_e.createElement(Be.Z,null),{clearIcon:Ee,suffixIcon:je,itemIcon:ze,removeIcon:At}}},33507:function(kn,Vt){"use strict";const ae=fe=>({[fe.componentCls]:{[`${fe.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${fe.motionDurationMid} ${fe.motionEaseInOut},
opacity ${fe.motionDurationMid} ${fe.motionEaseInOut} !important`}},[`${fe.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${fe.motionDurationMid} ${fe.motionEaseInOut},
opacity ${fe.motionDurationMid} ${fe.motionEaseInOut} !important`}}});Vt.Z=ae},33297:function(kn,Vt,ae){"use strict";ae.d(Vt,{Fm:function(){return Re}});var fe=ae(34367),Fe=ae(93590);const Be=new fe.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ye=new fe.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 fe.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ce=new fe.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_e=new fe.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),we=new fe.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ge=new fe.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Te=new fe.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ft={"move-up":{inKeyframes:ge,outKeyframes:Te},"move-down":{inKeyframes:Be,outKeyframes:Ye},"move-left":{inKeyframes:ve,outKeyframes:Ce},"move-right":{inKeyframes:_e,outKeyframes:we}},Re=(bt,ht)=>{const{antCls:st}=bt,tt=`${st}-${ht}`,{inKeyframes:Le,outKeyframes:xt}=ft[ht];return[(0,Fe.R)(tt,Le,xt,bt.motionDurationMid),{[`
${tt}-enter,
${tt}-appear
`]:{opacity:0,animationTimingFunction:bt.motionEaseOutCirc},[`${tt}-leave`]:{animationTimingFunction:bt.motionEaseInOutCirc}}]}},67771:function(kn,Vt,ae){"use strict";ae.d(Vt,{Qt:function(){return ve},Uw:function(){return Ye},fJ:function(){return Be},ly:function(){return Ce},oN:function(){return Re}});var fe=ae(34367),Fe=ae(93590);const Be=new fe.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ye=new fe.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ve=new fe.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Ce=new fe.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),_e=new fe.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),we=new fe.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ge=new fe.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Te=new fe.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ft={"slide-up":{inKeyframes:Be,outKeyframes:Ye},"slide-down":{inKeyframes:ve,outKeyframes:Ce},"slide-left":{inKeyframes:_e,outKeyframes:we},"slide-right":{inKeyframes:ge,outKeyframes:Te}},Re=(bt,ht)=>{const{antCls:st}=bt,tt=`${st}-${ht}`,{inKeyframes:Le,outKeyframes:xt}=ft[ht];return[(0,Fe.R)(tt,Le,xt,bt.motionDurationMid),{[`
${tt}-enter,
${tt}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:bt.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${tt}-leave`]:{animationTimingFunction:bt.motionEaseInQuint}}]}},47897:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return me}});var fe=ae(3407),Fe=ae(94184),Be=ae.n(Fe);function Ye(){return Ye=Object.assign?Object.assign.bind():function(he){for(var se=1;se<arguments.length;se++){var Ie=arguments[se];for(var et in Ie)Object.prototype.hasOwnProperty.call(Ie,et)&&(he[et]=Ie[et])}return he},Ye.apply(this,arguments)}function ve(he){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(se){return typeof se}:function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},ve(he)}function Ce(he,se){if(ve(he)!=="object"||he===null)return he;var Ie=he[Symbol.toPrimitive];if(Ie!==void 0){var et=Ie.call(he,se||"default");if(ve(et)!=="object")return et;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(he)}function _e(he){var se=Ce(he,"string");return ve(se)==="symbol"?se:String(se)}function we(he,se,Ie){return se=_e(se),se in he?Object.defineProperty(he,se,{value:Ie,enumerable:!0,configurable:!0,writable:!0}):he[se]=Ie,he}function ge(he){if(Array.isArray(he))return he}function Te(he,se){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var et,$t,Ht,Xt,jt=[],rn=!0,qn=!1;try{if(Ht=(Ie=Ie.call(he)).next,se===0){if(Object(Ie)!==Ie)return;rn=!1}else for(;!(rn=(et=Ht.call(Ie)).done)&&(jt.push(et.value),jt.length!==se);rn=!0);}catch(lr){qn=!0,$t=lr}finally{try{if(!rn&&Ie.return!=null&&(Xt=Ie.return(),Object(Xt)!==Xt))return}finally{if(qn)throw $t}}return jt}}function ft(he,se){(se==null||se>he.length)&&(se=he.length);for(var Ie=0,et=new Array(se);Ie<se;Ie++)et[Ie]=he[Ie];return et}function Re(he,se){if(he){if(typeof he=="string")return ft(he,se);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 ft(he,se)}}function bt(){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,se){return ge(he)||Te(he,se)||Re(he,se)||bt()}function st(he,se){if(he==null)return{};var Ie={},et=Object.keys(he),$t,Ht;for(Ht=0;Ht<et.length;Ht++)$t=et[Ht],!(se.indexOf($t)>=0)&&(Ie[$t]=he[$t]);return Ie}function tt(he,se){if(he==null)return{};var Ie=st(he,se),et,$t;if(Object.getOwnPropertySymbols){var Ht=Object.getOwnPropertySymbols(he);for($t=0;$t<Ht.length;$t++)et=Ht[$t],!(se.indexOf(et)>=0)&&Object.prototype.propertyIsEnumerable.call(he,et)&&(Ie[et]=he[et])}return Ie}var Le=ae(67294);function xt(he){if(Array.isArray(he))return he}function on(he,se){var Ie=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Ie!=null){var et,$t,Ht,Xt,jt=[],rn=!0,qn=!1;try{if(Ht=(Ie=Ie.call(he)).next,se===0){if(Object(Ie)!==Ie)return;rn=!1}else for(;!(rn=(et=Ht.call(Ie)).done)&&(jt.push(et.value),jt.length!==se);rn=!0);}catch(lr){qn=!0,$t=lr}finally{try{if(!rn&&Ie.return!=null&&(Xt=Ie.return(),Object(Xt)!==Xt))return}finally{if(qn)throw $t}}return jt}}function it(he,se){(se==null||se>he.length)&&(se=he.length);for(var Ie=0,et=new Array(se);Ie<se;Ie++)et[Ie]=he[Ie];return et}function yt(he,se){if(he){if(typeof he=="string")return it(he,se);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 it(he,se)}}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 de(he,se){return xt(he)||on(he,se)||yt(he,se)||Ee()}function je(he){var se=Le.useRef();se.current=he;var Ie=Le.useCallback(function(){for(var et,$t=arguments.length,Ht=new Array($t),Xt=0;Xt<$t;Xt++)Ht[Xt]=arguments[Xt];return(et=se.current)===null||et===void 0?void 0:et.call.apply(et,[se].concat(Ht))},[]);return Ie}function ze(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var At=ze()?Le.useLayoutEffect:Le.useEffect,ct=function(se,Ie){var et=Le.useRef(!0);At(function(){return se(et.current)},Ie),At(function(){return et.current=!1,function(){et.current=!0}},[])},lt=function(se,Ie){ct(function(et){if(!et)return se()},Ie)},Ze=null;function kt(he){var se=Le.useRef(!1),Ie=Le.useState(he),et=de(Ie,2),$t=et[0],Ht=et[1];Le.useEffect(function(){return se.current=!1,function(){se.current=!0}},[]);function Xt(jt,rn){rn&&se.current||Ht(jt)}return[$t,Xt]}function pt(he){return he!==void 0}function nn(he,se){var Ie=se||{},et=Ie.defaultValue,$t=Ie.value,Ht=Ie.onChange,Xt=Ie.postState,jt=kt(function(){return pt($t)?$t:pt(et)?typeof et=="function"?et():et:typeof he=="function"?he():he}),rn=de(jt,2),qn=rn[0],lr=rn[1],Bt=$t!==void 0?$t:qn,Sn=Xt?Xt(Bt):Bt,dr=je(Ht),Wr=kt([Bt]),gt=de(Wr,2),sn=gt[0],tr=gt[1];lt(function(){var xr=sn[0];qn!==xr&&dr(qn,xr)},[sn]),lt(function(){pt($t)||lr($t)},[$t]);var Zn=je(function(xr,Kr){lr(xr,Kr),tr([Bt],Kr)});return[Sn,Zn]}var rt={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(se){var Ie=se.keyCode;if(se.altKey&&!se.ctrlKey||se.metaKey||Ie>=rt.F1&&Ie<=rt.F12)return!1;switch(Ie){case rt.ALT:case rt.CAPS_LOCK:case rt.CONTEXT_MENU:case rt.CTRL:case rt.DOWN:case rt.END:case rt.ESC:case rt.HOME:case rt.INSERT:case rt.LEFT:case rt.MAC_FF_META:case rt.META:case rt.NUMLOCK:case rt.NUM_CENTER:case rt.PAGE_DOWN:case rt.PAGE_UP:case rt.PAUSE:case rt.PRINT_SCREEN:case rt.RIGHT:case rt.SHIFT:case rt.UP:case rt.WIN_KEY:case rt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(se){if(se>=rt.ZERO&&se<=rt.NINE||se>=rt.NUM_ZERO&&se<=rt.NUM_MULTIPLY||se>=rt.A&&se<=rt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&se===0)return!0;switch(se){case rt.SPACE:case rt.QUESTION_MARK:case rt.NUM_PLUS:case rt.NUM_MINUS:case rt.NUM_PERIOD:case rt.NUM_DIVISION:case rt.SEMICOLON:case rt.DASH:case rt.EQUALS:case rt.COMMA:case rt.PERIOD:case rt.SLASH:case rt.APOSTROPHE:case rt.SINGLE_QUOTE:case rt.OPEN_SQUARE_BRACKET:case rt.BACKSLASH:case rt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},qt=rt,pn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],cn=Le.forwardRef(function(he,se){var Ie,et=he.prefixCls,$t=et===void 0?"rc-switch":et,Ht=he.className,Xt=he.checked,jt=he.defaultChecked,rn=he.disabled,qn=he.loadingIcon,lr=he.checkedChildren,Bt=he.unCheckedChildren,Sn=he.onClick,dr=he.onChange,Wr=he.onKeyDown,gt=tt(he,pn),sn=nn(!1,{value:Xt,defaultValue:jt}),tr=ht(sn,2),Zn=tr[0],xr=tr[1];function Kr(pi,kr){var Ti=Zn;return rn||(Ti=pi,xr(Ti),dr==null||dr(Ti,kr)),Ti}function Jr(pi){pi.which===qt.LEFT?Kr(!1,pi):pi.which===qt.RIGHT&&Kr(!0,pi),Wr==null||Wr(pi)}function Zr(pi){var kr=Kr(!Zn,pi);Sn==null||Sn(kr,pi)}var ei=Be()($t,Ht,(Ie={},we(Ie,"".concat($t,"-checked"),Zn),we(Ie,"".concat($t,"-disabled"),rn),Ie));return Le.createElement("button",Ye({},gt,{type:"button",role:"switch","aria-checked":Zn,disabled:rn,className:ei,ref:se,onKeyDown:Jr,onClick:Zr}),qn,Le.createElement("span",{className:"".concat($t,"-inner")},Le.createElement("span",{className:"".concat($t,"-inner-checked")},lr),Le.createElement("span",{className:"".concat($t,"-inner-unchecked")},Bt)))});cn.displayName="Switch";var Xe=cn,Me=ae(45353),mt=ae(53124),Gt=ae(98866),hn=ae(98675),Qe=ae(84780),ut=ae(14747),Yt=ae(67968),Qt=ae(45503);const tn=he=>{const{componentCls:se,trackHeightSM:Ie,trackPadding:et,trackMinWidthSM:$t,innerMinMarginSM:Ht,innerMaxMarginSM:Xt,handleSizeSM:jt}=he,rn=`${se}-inner`;return{[se]:{[`&${se}-small`]:{minWidth:$t,height:Ie,lineHeight:`${Ie}px`,[`${se}-inner`]:{paddingInlineStart:Xt,paddingInlineEnd:Ht,[`${rn}-checked`]:{marginInlineStart:`calc(-100% + ${jt+et*2}px - ${Xt*2}px)`,marginInlineEnd:`calc(100% - ${jt+et*2}px + ${Xt*2}px)`},[`${rn}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`${se}-handle`]:{width:jt,height:jt},[`${se}-loading-icon`]:{top:(jt-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${se}-checked`]:{[`${se}-inner`]:{paddingInlineStart:Ht,paddingInlineEnd:Xt,[`${rn}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${rn}-unchecked`]:{marginInlineStart:`calc(100% - ${jt+et*2}px + ${Xt*2}px)`,marginInlineEnd:`calc(-100% + ${jt+et*2}px - ${Xt*2}px)`}},[`${se}-handle`]:{insetInlineStart:`calc(100% - ${jt+et}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${rn}`]:{[`${rn}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${se}-checked ${rn}`]:{[`${rn}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},_t=he=>{const{componentCls:se,handleSize:Ie}=he;return{[se]:{[`${se}-loading-icon${he.iconCls}`]:{position:"relative",top:(Ie-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${se}-checked ${se}-loading-icon`]:{color:he.switchColor}}}},en=he=>{const{componentCls:se,motion:Ie,trackPadding:et,handleBg:$t,handleShadow:Ht,handleSize:Xt}=he,jt=`${se}-handle`;return{[se]:{[jt]:{position:"absolute",top:et,insetInlineStart:et,width:Xt,height:Xt,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:$t,borderRadius:Xt/2,boxShadow:Ht,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${se}-checked ${jt}`]:{insetInlineStart:`calc(100% - ${Xt+et}px)`},[`&:not(${se}-disabled):active`]:Ie?{[`${jt}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${se}-checked ${jt}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},Cn=he=>{const{componentCls:se,trackHeight:Ie,trackPadding:et,innerMinMargin:$t,innerMaxMargin:Ht,handleSize:Xt}=he,jt=`${se}-inner`;return{[se]:{[jt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ht,paddingInlineEnd:$t,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${jt}-checked, ${jt}-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"},[`${jt}-checked`]:{marginInlineStart:`calc(-100% + ${Xt+et*2}px - ${Ht*2}px)`,marginInlineEnd:`calc(100% - ${Xt+et*2}px + ${Ht*2}px)`},[`${jt}-unchecked`]:{marginTop:-Ie,marginInlineStart:0,marginInlineEnd:0}},[`&${se}-checked ${jt}`]:{paddingInlineStart:$t,paddingInlineEnd:Ht,[`${jt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${jt}-unchecked`]:{marginInlineStart:`calc(100% - ${Xt+et*2}px + ${Ht*2}px)`,marginInlineEnd:`calc(-100% + ${Xt+et*2}px - ${Ht*2}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${jt}`]:{[`${jt}-unchecked`]:{marginInlineStart:et*2,marginInlineEnd:-et*2}},[`&${se}-checked ${jt}`]:{[`${jt}-checked`]:{marginInlineStart:-et*2,marginInlineEnd:et*2}}}}}},On=he=>{const{componentCls:se,trackHeight:Ie,trackMinWidth:et}=he;return{[se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ut.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:et,height:Ie,lineHeight:`${Ie}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${se}-disabled)`]:{background:he.colorTextTertiary}}),(0,ut.Qy)(he)),{[`&${se}-checked`]:{background:he.switchColor,[`&:hover:not(${se}-disabled)`]:{background:he.colorPrimaryHover}},[`&${se}-loading, &${se}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${se}-rtl`]:{direction:"rtl"}})}};var $e=(0,Yt.Z)("Switch",he=>{const se=(0,Qt.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[On(se),Cn(se),en(se),_t(se),tn(se)]},he=>{const{fontSize:se,lineHeight:Ie,controlHeight:et,colorWhite:$t}=he,Ht=se*Ie,Xt=et/2,jt=2,rn=Ht-jt*2,qn=Xt-jt*2;return{trackHeight:Ht,trackHeightSM:Xt,trackMinWidth:rn*2+jt*4,trackMinWidthSM:qn*2+jt*2,trackPadding:jt,handleBg:$t,handleSize:rn,handleSizeSM:qn,handleShadow:`0 2px 4px 0 ${new Qe.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:rn/2,innerMaxMargin:rn+jt+jt*2,innerMinMarginSM:qn/2,innerMaxMarginSM:qn+jt+jt*2}}),ce=function(he,se){var Ie={};for(var et in he)Object.prototype.hasOwnProperty.call(he,et)&&se.indexOf(et)<0&&(Ie[et]=he[et]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,et=Object.getOwnPropertySymbols(he);$t<et.length;$t++)se.indexOf(et[$t])<0&&Object.prototype.propertyIsEnumerable.call(he,et[$t])&&(Ie[et[$t]]=he[et[$t]]);return Ie};const le=Le.forwardRef((he,se)=>{const{prefixCls:Ie,size:et,disabled:$t,loading:Ht,className:Xt,rootClassName:jt,style:rn}=he,qn=ce(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:lr,direction:Bt,switch:Sn}=Le.useContext(mt.E_),dr=Le.useContext(Gt.Z),Wr=($t!=null?$t:dr)||Ht,gt=lr("switch",Ie),sn=Le.createElement("div",{className:`${gt}-handle`},Ht&&Le.createElement(fe.Z,{className:`${gt}-loading-icon`})),[tr,Zn]=$e(gt),xr=(0,hn.Z)(et),Kr=Be()(Sn==null?void 0:Sn.className,{[`${gt}-small`]:xr==="small",[`${gt}-loading`]:Ht,[`${gt}-rtl`]:Bt==="rtl"},Xt,jt,Zn),Jr=Object.assign(Object.assign({},Sn==null?void 0:Sn.style),rn);return tr(Le.createElement(Me.Z,{component:"Switch"},Le.createElement(Xe,Object.assign({},qn,{prefixCls:gt,className:Kr,style:Jr,disabled:Wr,ref:se,loadingIcon:sn}))))});le.__ANT_SWITCH=!0;var me=le},66368:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return Yi}});var fe=ae(73475),Fe=ae(25877),Be=ae(38308),Ye=ae(94184),ve=ae.n(Ye),Ce=ae(87462),_e=ae(4942),we=ae(1413),ge=ae(97685),Te=ae(71002),ft=ae(45987),Re=ae(67294),bt=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 Ve=Re.useRef();Ve.current=Oe;var Ue=Re.useCallback(function(){for(var qe,vt=arguments.length,St=new Array(vt),Nt=0;Nt<vt;Nt++)St[Nt]=arguments[Nt];return(qe=Ve.current)===null||qe===void 0?void 0:qe.call.apply(qe,[Ve].concat(St))},[]);return Ue}function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var tt=st()?Re.useLayoutEffect:Re.useEffect,Le=function(Ve,Ue){var qe=Re.useRef(!0);tt(function(){return Ve(qe.current)},Ue),tt(function(){return qe.current=!1,function(){qe.current=!0}},[])},xt=function(Ve,Ue){Le(function(qe){if(!qe)return Ve()},Ue)},on=null;function it(Oe){var Ve=Re.useRef(!1),Ue=Re.useState(Oe),qe=(0,ge.Z)(Ue,2),vt=qe[0],St=qe[1];Re.useEffect(function(){return Ve.current=!1,function(){Ve.current=!0}},[]);function Nt(wn,Ln){Ln&&Ve.current||St(wn)}return[vt,Nt]}function yt(Oe){return Oe!==void 0}function Ee(Oe,Ve){var Ue=Ve||{},qe=Ue.defaultValue,vt=Ue.value,St=Ue.onChange,Nt=Ue.postState,wn=it(function(){return yt(vt)?vt:yt(qe)?typeof qe=="function"?qe():qe:typeof Oe=="function"?Oe():Oe}),Ln=(0,ge.Z)(wn,2),br=Ln[0],Br=Ln[1],hr=vt!==void 0?vt:br,Wn=Nt?Nt(hr):hr,Tn=ht(St),Jn=it([hr]),ar=(0,ge.Z)(Jn,2),$r=ar[0],mr=ar[1];xt(function(){var Cr=$r[0];br!==Cr&&Tn(br,Cr)},[$r]),xt(function(){yt(vt)||Br(vt)},[vt]);var gr=ht(function(Cr,Er){Br(Cr,Er),mr([hr],Er)});return[Wn,gr]}var de=ae(62874),je=(0,Re.createContext)(null),ze=Re.forwardRef(function(Oe,Ve){var Ue=Oe.prefixCls,qe=Oe.className,vt=Oe.style,St=Oe.id,Nt=Oe.active,wn=Oe.tabKey,Ln=Oe.children;return Re.createElement("div",{id:St&&"".concat(St,"-panel-").concat(wn),role:"tabpanel",tabIndex:Nt?0:-1,"aria-labelledby":St&&"".concat(St,"-tab-").concat(wn),"aria-hidden":!Nt,style:vt,className:ve()(Ue,Nt&&"".concat(Ue,"-active"),qe),ref:Ve},Ln)}),At=ze,ct=["key","forceRender","style","className"];function lt(Oe){var Ve=Oe.id,Ue=Oe.activeKey,qe=Oe.animated,vt=Oe.tabPosition,St=Oe.destroyInactiveTabPane,Nt=Re.useContext(je),wn=Nt.prefixCls,Ln=Nt.tabs,br=qe.tabPane,Br="".concat(wn,"-tabpane");return Re.createElement("div",{className:ve()("".concat(wn,"-content-holder"))},Re.createElement("div",{className:ve()("".concat(wn,"-content"),"".concat(wn,"-content-").concat(vt),(0,_e.Z)({},"".concat(wn,"-content-animated"),br))},Ln.map(function(hr){var Wn=hr.key,Tn=hr.forceRender,Jn=hr.style,ar=hr.className,$r=(0,ft.Z)(hr,ct),mr=Wn===Ue;return Re.createElement(de.Z,(0,Ce.Z)({key:Wn,visible:mr,forceRender:Tn,removeOnLeave:!!St,leavedClassName:"".concat(Br,"-hidden")},qe.tabPaneMotion),function(gr,Cr){var Er=gr.style,Fr=gr.className;return Re.createElement(At,(0,Ce.Z)({},$r,{prefixCls:Br,id:Ve,tabKey:Wn,animated:br,active:mr,style:(0,we.Z)((0,we.Z)({},Jn),Er),className:ve()(ar,Fr),ref:Cr}))})})))}var Ze=ae(74902),kt=ae(48555),pt=ae(59864);function nn(Oe,Ve,Ue){var qe=Re.useRef({});return(!("value"in qe.current)||Ue(qe.current.condition,Ve))&&(qe.current.value=Oe(),qe.current.condition=Ve),qe.current.value}function rt(Oe,Ve){typeof Oe=="function"?Oe(Ve):(0,Te.Z)(Oe)==="object"&&Oe&&"current"in Oe&&(Oe.current=Ve)}function qt(){for(var Oe=arguments.length,Ve=new Array(Oe),Ue=0;Ue<Oe;Ue++)Ve[Ue]=arguments[Ue];var qe=Ve.filter(function(vt){return vt});return qe.length<=1?qe[0]:function(vt){Ve.forEach(function(St){rt(St,vt)})}}function pn(){for(var Oe=arguments.length,Ve=new Array(Oe),Ue=0;Ue<Oe;Ue++)Ve[Ue]=arguments[Ue];return nn(function(){return qt.apply(void 0,Ve)},Ve,function(qe,vt){return qe.length===vt.length&&qe.every(function(St,Nt){return St===vt[Nt]})})}function cn(Oe){var Ve,Ue,qe=isMemo(Oe)?Oe.type.type:Oe.type;return!(typeof qe=="function"&&!((Ve=qe.prototype)!==null&&Ve!==void 0&&Ve.render)||typeof Oe=="function"&&!((Ue=Oe.prototype)!==null&&Ue!==void 0&&Ue.render))}var Xe={width:0,height:0,left:0,top:0};function Me(Oe,Ve,Ue){return(0,Re.useMemo)(function(){for(var qe,vt=new Map,St=Ve.get((qe=Oe[0])===null||qe===void 0?void 0:qe.key)||Xe,Nt=St.left+St.width,wn=0;wn<Oe.length;wn+=1){var Ln=Oe[wn].key,br=Ve.get(Ln);if(!br){var Br;br=Ve.get((Br=Oe[wn-1])===null||Br===void 0?void 0:Br.key)||Xe}var hr=vt.get(Ln)||(0,we.Z)({},br);hr.right=Nt-hr.left-hr.width,vt.set(Ln,hr)}return vt},[Oe.map(function(qe){return qe.key}).join("_"),Ve,Ue])}function mt(Oe,Ve){var Ue=Re.useRef(Oe),qe=Re.useState({}),vt=(0,ge.Z)(qe,2),St=vt[1];function Nt(wn){var Ln=typeof wn=="function"?wn(Ue.current):wn;Ln!==Ue.current&&Ve(Ln,Ue.current),Ue.current=Ln,St({})}return[Ue.current,Nt]}var Gt=.1,hn=.01,Qe=20,ut=Math.pow(.995,Qe);function Yt(Oe,Ve){var Ue=(0,Re.useState)(),qe=(0,ge.Z)(Ue,2),vt=qe[0],St=qe[1],Nt=(0,Re.useState)(0),wn=(0,ge.Z)(Nt,2),Ln=wn[0],br=wn[1],Br=(0,Re.useState)(0),hr=(0,ge.Z)(Br,2),Wn=hr[0],Tn=hr[1],Jn=(0,Re.useState)(),ar=(0,ge.Z)(Jn,2),$r=ar[0],mr=ar[1],gr=(0,Re.useRef)();function Cr(Et){var dn=Et.touches[0],In=dn.screenX,zn=dn.screenY;St({x:In,y:zn}),window.clearInterval(gr.current)}function Er(Et){if(vt){Et.preventDefault();var dn=Et.touches[0],In=dn.screenX,zn=dn.screenY;St({x:In,y:zn});var or=In-vt.x,jn=zn-vt.y;Ve(or,jn);var _n=Date.now();br(_n),Tn(_n-Ln),mr({x:or,y:jn})}}function Fr(){if(vt&&(St(null),mr(null),$r)){var Et=$r.x/Wn,dn=$r.y/Wn,In=Math.abs(Et),zn=Math.abs(dn);if(Math.max(In,zn)<Gt)return;var or=Et,jn=dn;gr.current=window.setInterval(function(){if(Math.abs(or)<hn&&Math.abs(jn)<hn){window.clearInterval(gr.current);return}or*=ut,jn*=ut,Ve(or*Qe,jn*Qe)},Qe)}}var He=(0,Re.useRef)();function Ge(Et){var dn=Et.deltaX,In=Et.deltaY,zn=0,or=Math.abs(dn),jn=Math.abs(In);or===jn?zn=He.current==="x"?dn:In:or>jn?(zn=dn,He.current="x"):(zn=In,He.current="y"),Ve(-zn,-zn)&&Et.preventDefault()}var Ft=(0,Re.useRef)(null);Ft.current={onTouchStart:Cr,onTouchMove:Er,onTouchEnd:Fr,onWheel:Ge},Re.useEffect(function(){function Et(or){Ft.current.onTouchStart(or)}function dn(or){Ft.current.onTouchMove(or)}function In(or){Ft.current.onTouchEnd(or)}function zn(or){Ft.current.onWheel(or)}return document.addEventListener("touchmove",dn,{passive:!1}),document.addEventListener("touchend",In,{passive:!1}),Oe.current.addEventListener("touchstart",Et,{passive:!1}),Oe.current.addEventListener("wheel",zn),function(){document.removeEventListener("touchmove",dn),document.removeEventListener("touchend",In)}},[])}function Qt(Oe){var Ve=(0,Re.useState)(0),Ue=(0,ge.Z)(Ve,2),qe=Ue[0],vt=Ue[1],St=(0,Re.useRef)(0),Nt=(0,Re.useRef)();return Nt.current=Oe,xt(function(){var wn;(wn=Nt.current)===null||wn===void 0||wn.call(Nt)},[qe]),function(){St.current===qe&&(St.current+=1,vt(St.current))}}function tn(Oe){var Ve=(0,Re.useRef)([]),Ue=(0,Re.useState)({}),qe=(0,ge.Z)(Ue,2),vt=qe[1],St=(0,Re.useRef)(typeof Oe=="function"?Oe():Oe),Nt=Qt(function(){var Ln=St.current;Ve.current.forEach(function(br){Ln=br(Ln)}),Ve.current=[],St.current=Ln,vt({})});function wn(Ln){Ve.current.push(Ln),Nt()}return[St.current,wn]}var _t={width:0,height:0,left:0,top:0,right:0};function en(Oe,Ve,Ue,qe,vt,St,Nt){var wn=Nt.tabs,Ln=Nt.tabPosition,br=Nt.rtl,Br,hr,Wn;return["top","bottom"].includes(Ln)?(Br="width",hr=br?"right":"left",Wn=Math.abs(Ue)):(Br="height",hr="top",Wn=-Ue),(0,Re.useMemo)(function(){if(!wn.length)return[0,0];for(var Tn=wn.length,Jn=Tn,ar=0;ar<Tn;ar+=1){var $r=Oe.get(wn[ar].key)||_t;if($r[hr]+$r[Br]>Wn+Ve){Jn=ar-1;break}}for(var mr=0,gr=Tn-1;gr>=0;gr-=1){var Cr=Oe.get(wn[gr].key)||_t;if(Cr[hr]<Wn){mr=gr+1;break}}return mr>=Jn?[0,0]:[mr,Jn]},[Oe,Ve,qe,vt,St,Wn,Ln,wn.map(function(Tn){return Tn.key}).join("_"),br])}function Cn(Oe){var Ve;return Oe instanceof Map?(Ve={},Oe.forEach(function(Ue,qe){Ve[qe]=Ue})):Ve=Oe,JSON.stringify(Ve)}var On="TABS_DQ";function $e(Oe){return String(Oe).replace(/"/g,On)}function ce(Oe,Ve,Ue,qe){return!(!Ue||qe||Oe===!1||Oe===void 0&&(Ve===!1||Ve===null))}function le(Oe,Ve){var Ue=Oe.prefixCls,qe=Oe.editable,vt=Oe.locale,St=Oe.style;return!qe||qe.showAdd===!1?null:Re.createElement("button",{ref:Ve,type:"button",className:"".concat(Ue,"-nav-add"),style:St,"aria-label":(vt==null?void 0:vt.addAriaLabel)||"Add tab",onClick:function(wn){qe.onEdit("add",{event:wn})}},qe.addIcon||"+")}var me=Re.forwardRef(le),he=Re.forwardRef(function(Oe,Ve){var Ue=Oe.position,qe=Oe.prefixCls,vt=Oe.extra;if(!vt)return null;var St,Nt={};return(0,Te.Z)(vt)==="object"&&!Re.isValidElement(vt)?Nt=vt:Nt.right=vt,Ue==="right"&&(St=Nt.right),Ue==="left"&&(St=Nt.left),St?Re.createElement("div",{className:"".concat(qe,"-extra-content"),ref:Ve},St):null}),se=he,Ie=ae(62709);function et(Oe,Ve,Ue){var qe=React.useRef({});return(!("value"in qe.current)||Ue(qe.current.condition,Ve))&&(qe.current.value=Oe(),qe.current.condition=Ve),qe.current.value}function $t(Oe,Ve){typeof Oe=="function"?Oe(Ve):(0,Te.Z)(Oe)==="object"&&Oe&&"current"in Oe&&(Oe.current=Ve)}function Ht(){for(var Oe=arguments.length,Ve=new Array(Oe),Ue=0;Ue<Oe;Ue++)Ve[Ue]=arguments[Ue];var qe=Ve.filter(function(vt){return vt});return qe.length<=1?qe[0]:function(vt){Ve.forEach(function(St){$t(St,vt)})}}function Xt(){for(var Oe=arguments.length,Ve=new Array(Oe),Ue=0;Ue<Oe;Ue++)Ve[Ue]=arguments[Ue];return useMemo(function(){return Ht.apply(void 0,Ve)},Ve,function(qe,vt){return qe.length===vt.length&&qe.every(function(St,Nt){return St===vt[Nt]})})}function jt(Oe){var Ve,Ue,qe=(0,pt.isMemo)(Oe)?Oe.type.type:Oe.type;return!(typeof qe=="function"&&!((Ve=qe.prototype)!==null&&Ve!==void 0&&Ve.render)||typeof Oe=="function"&&!((Ue=Oe.prototype)!==null&&Ue!==void 0&&Ue.render))}var rn={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(Ve){var Ue=Ve.keyCode;if(Ve.altKey&&!Ve.ctrlKey||Ve.metaKey||Ue>=rn.F1&&Ue<=rn.F12)return!1;switch(Ue){case rn.ALT:case rn.CAPS_LOCK:case rn.CONTEXT_MENU:case rn.CTRL:case rn.DOWN:case rn.END:case rn.ESC:case rn.HOME:case rn.INSERT:case rn.LEFT:case rn.MAC_FF_META:case rn.META:case rn.NUMLOCK:case rn.NUM_CENTER:case rn.PAGE_DOWN:case rn.PAGE_UP:case rn.PAUSE:case rn.PRINT_SCREEN:case rn.RIGHT:case rn.SHIFT:case rn.UP:case rn.WIN_KEY:case rn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ve){if(Ve>=rn.ZERO&&Ve<=rn.NINE||Ve>=rn.NUM_ZERO&&Ve<=rn.NUM_MULTIPLY||Ve>=rn.A&&Ve<=rn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ve===0)return!0;switch(Ve){case rn.SPACE:case rn.QUESTION_MARK:case rn.NUM_PLUS:case rn.NUM_MINUS:case rn.NUM_PERIOD:case rn.NUM_DIVISION:case rn.SEMICOLON:case rn.DASH:case rn.EQUALS:case rn.COMMA:case rn.PERIOD:case rn.SLASH:case rn.APOSTROPHE:case rn.SINGLE_QUOTE:case rn.OPEN_SQUARE_BRACKET:case rn.BACKSLASH:case rn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},qn=rn,lr=function(Ve){return+setTimeout(Ve,16)},Bt=function(Ve){return clearTimeout(Ve)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(lr=function(Ve){return window.requestAnimationFrame(Ve)},Bt=function(Ve){return window.cancelAnimationFrame(Ve)});var Sn=0,dr=new Map;function Wr(Oe){dr.delete(Oe)}var gt=function(Ve){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Sn+=1;var qe=Sn;function vt(St){if(St===0)Wr(qe),Ve();else{var Nt=lr(function(){vt(St-1)});dr.set(qe,Nt)}}return vt(Ue),qe};gt.cancel=function(Oe){var Ve=dr.get(Oe);return Wr(Ve),Bt(Ve)};var sn=gt,tr=qn.ESC,Zn=qn.TAB;function xr(Oe){var Ve=Oe.visible,Ue=Oe.triggerRef,qe=Oe.onVisibleChange,vt=Oe.autoFocus,St=Oe.overlayRef,Nt=Re.useRef(!1),wn=function(){if(Ve){var hr,Wn;(hr=Ue.current)===null||hr===void 0||(Wn=hr.focus)===null||Wn===void 0||Wn.call(hr),qe==null||qe(!1)}},Ln=function(){var hr;return(hr=St.current)!==null&&hr!==void 0&&hr.focus?(St.current.focus(),Nt.current=!0,!0):!1},br=function(hr){switch(hr.keyCode){case tr:wn();break;case Zn:{var Wn=!1;Nt.current||(Wn=Ln()),Wn?hr.preventDefault():wn();break}}};Re.useEffect(function(){return Ve?(window.addEventListener("keydown",br),vt&&sn(Ln,3),function(){window.removeEventListener("keydown",br),Nt.current=!1}):function(){Nt.current=!1}},[Ve])}var Kr=(0,Re.forwardRef)(function(Oe,Ve){var Ue=Oe.overlay,qe=Oe.arrow,vt=Oe.prefixCls,St=(0,Re.useMemo)(function(){var wn;return typeof Ue=="function"?wn=Ue():wn=Ue,wn},[Ue]),Nt=Ht(Ve,St==null?void 0:St.ref);return Re.createElement(Re.Fragment,null,qe&&Re.createElement("div",{className:"".concat(vt,"-arrow")}),Re.cloneElement(St,{ref:jt(St)?Nt:void 0}))}),Jr=Kr,Zr={adjustX:1,adjustY:1},ei=[0,0],pi={topLeft:{points:["bl","tl"],overflow:Zr,offset:[0,-4],targetOffset:ei},top:{points:["bc","tc"],overflow:Zr,offset:[0,-4],targetOffset:ei},topRight:{points:["br","tr"],overflow:Zr,offset:[0,-4],targetOffset:ei},bottomLeft:{points:["tl","bl"],overflow:Zr,offset:[0,4],targetOffset:ei},bottom:{points:["tc","bc"],overflow:Zr,offset:[0,4],targetOffset:ei},bottomRight:{points:["tr","br"],overflow:Zr,offset:[0,4],targetOffset:ei}},kr=pi,Ti=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function na(Oe,Ve){var Ue,qe=Oe.arrow,vt=qe===void 0?!1:qe,St=Oe.prefixCls,Nt=St===void 0?"rc-dropdown":St,wn=Oe.transitionName,Ln=Oe.animation,br=Oe.align,Br=Oe.placement,hr=Br===void 0?"bottomLeft":Br,Wn=Oe.placements,Tn=Wn===void 0?kr:Wn,Jn=Oe.getPopupContainer,ar=Oe.showAction,$r=Oe.hideAction,mr=Oe.overlayClassName,gr=Oe.overlayStyle,Cr=Oe.visible,Er=Oe.trigger,Fr=Er===void 0?["hover"]:Er,He=Oe.autoFocus,Ge=Oe.overlay,Ft=Oe.children,Et=Oe.onVisibleChange,dn=(0,ft.Z)(Oe,Ti),In=Re.useState(),zn=(0,ge.Z)(In,2),or=zn[0],jn=zn[1],_n="visible"in Oe?Cr:or,cr=Re.useRef(null),fr=Re.useRef(null),Hr=Re.useRef(null);Re.useImperativeHandle(Ve,function(){return cr.current});var ur=function(ii){jn(ii),Et==null||Et(ii)};xr({visible:_n,triggerRef:Hr,onVisibleChange:ur,autoFocus:He,overlayRef:fr});var ti=function(ii){var Ni=Oe.onOverlayClick;jn(!1),Ni&&Ni(ii)},yi=function(){return Re.createElement(Jr,{ref:fr,overlay:Ge,prefixCls:Nt,arrow:vt})},ni=function(){return typeof Ge=="function"?yi:yi()},fi=function(){var ii=Oe.minOverlayWidthMatchTrigger,Ni=Oe.alignPoint;return"minOverlayWidthMatchTrigger"in Oe?ii:!Ni},jr=function(){var ii=Oe.openClassName;return ii!==void 0?ii:"".concat(Nt,"-open")},oi=Re.cloneElement(Ft,{className:ve()((Ue=Ft.props)===null||Ue===void 0?void 0:Ue.className,_n&&jr()),ref:jt(Ft)?Ht(Hr,Ft.ref):void 0}),Ci=$r;return!Ci&&Fr.indexOf("contextMenu")!==-1&&(Ci=["click"]),Re.createElement(Ie.Z,(0,Ce.Z)({builtinPlacements:Tn},dn,{prefixCls:Nt,ref:cr,popupClassName:ve()(mr,(0,_e.Z)({},"".concat(Nt,"-show-arrow"),vt)),popupStyle:gr,action:Fr,showAction:ar,hideAction:Ci,popupPlacement:hr,popupAlign:br,popupTransitionName:wn,popupAnimation:Ln,popupVisible:_n,stretch:fi()?"minWidth":"",popup:ni(),onPopupVisibleChange:ur,onPopupClick:ti,getPopupContainer:Jn}),oi)}var ea=Re.forwardRef(na),oa=ea,Li=ae(78595),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(Ve){var Ue=Ve.keyCode;if(Ve.altKey&&!Ve.ctrlKey||Ve.metaKey||Ue>=Dt.F1&&Ue<=Dt.F12)return!1;switch(Ue){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(Ve){if(Ve>=Dt.ZERO&&Ve<=Dt.NINE||Ve>=Dt.NUM_ZERO&&Ve<=Dt.NUM_MULTIPLY||Ve>=Dt.A&&Ve<=Dt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ve===0)return!0;switch(Ve){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}}},Hn=Dt;function Vn(Oe,Ve){var Ue=Oe.prefixCls,qe=Oe.id,vt=Oe.tabs,St=Oe.locale,Nt=Oe.mobile,wn=Oe.moreIcon,Ln=wn===void 0?"More":wn,br=Oe.moreTransitionName,Br=Oe.style,hr=Oe.className,Wn=Oe.editable,Tn=Oe.tabBarGutter,Jn=Oe.rtl,ar=Oe.removeAriaLabel,$r=Oe.onTabClick,mr=Oe.getPopupContainer,gr=Oe.popupClassName,Cr=(0,Re.useState)(!1),Er=(0,ge.Z)(Cr,2),Fr=Er[0],He=Er[1],Ge=(0,Re.useState)(null),Ft=(0,ge.Z)(Ge,2),Et=Ft[0],dn=Ft[1],In="".concat(qe,"-more-popup"),zn="".concat(Ue,"-dropdown"),or=Et!==null?"".concat(In,"-").concat(Et):null,jn=St==null?void 0:St.dropdownAriaLabel;function _n(ni,fi){ni.preventDefault(),ni.stopPropagation(),Wn.onEdit("remove",{key:fi,event:ni})}var cr=Re.createElement(Li.ZP,{onClick:function(fi){var jr=fi.key,oi=fi.domEvent;$r(jr,oi),He(!1)},prefixCls:"".concat(zn,"-menu"),id:In,tabIndex:-1,role:"listbox","aria-activedescendant":or,selectedKeys:[Et],"aria-label":jn!==void 0?jn:"expanded dropdown"},vt.map(function(ni){var fi=ni.closable,jr=ni.disabled,oi=ni.closeIcon,Ci=ni.key,Oi=ni.label,ii=ce(fi,oi,Wn,jr);return Re.createElement(Li.sN,{key:Ci,id:"".concat(In,"-").concat(Ci),role:"option","aria-controls":qe&&"".concat(qe,"-panel-").concat(Ci),disabled:jr},Re.createElement("span",null,Oi),ii&&Re.createElement("button",{type:"button","aria-label":ar||"remove",tabIndex:0,className:"".concat(zn,"-menu-item-remove"),onClick:function(la){la.stopPropagation(),_n(la,Ci)}},oi||Wn.removeIcon||"\xD7"))}));function fr(ni){for(var fi=vt.filter(function(ii){return!ii.disabled}),jr=fi.findIndex(function(ii){return ii.key===Et})||0,oi=fi.length,Ci=0;Ci<oi;Ci+=1){jr=(jr+ni+oi)%oi;var Oi=fi[jr];if(!Oi.disabled){dn(Oi.key);return}}}function Hr(ni){var fi=ni.which;if(!Fr){[Hn.DOWN,Hn.SPACE,Hn.ENTER].includes(fi)&&(He(!0),ni.preventDefault());return}switch(fi){case Hn.UP:fr(-1),ni.preventDefault();break;case Hn.DOWN:fr(1),ni.preventDefault();break;case Hn.ESC:He(!1);break;case Hn.SPACE:case Hn.ENTER:Et!==null&&$r(Et,ni);break}}(0,Re.useEffect)(function(){var ni=document.getElementById(or);ni&&ni.scrollIntoView&&ni.scrollIntoView(!1)},[Et]),(0,Re.useEffect)(function(){Fr||dn(null)},[Fr]);var ur=(0,_e.Z)({},Jn?"marginRight":"marginLeft",Tn);vt.length||(ur.visibility="hidden",ur.order=1);var ti=ve()((0,_e.Z)({},"".concat(zn,"-rtl"),Jn)),yi=Nt?null:Re.createElement(oa,{prefixCls:zn,overlay:cr,trigger:["hover"],visible:vt.length?Fr:!1,transitionName:br,onVisibleChange:He,overlayClassName:ve()(ti,gr),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:mr},Re.createElement("button",{type:"button",className:"".concat(Ue,"-nav-more"),style:ur,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":In,id:"".concat(qe,"-more"),"aria-expanded":Fr,onKeyDown:Hr},Ln));return Re.createElement("div",{className:ve()("".concat(Ue,"-nav-operations"),hr),style:Br,ref:Ve},yi,Re.createElement(me,{prefixCls:Ue,locale:St,editable:Wn}))}var Gn=Re.memo(Re.forwardRef(Vn),function(Oe,Ve){return Ve.tabMoving});function Lr(Oe){var Ve,Ue=Oe.prefixCls,qe=Oe.id,vt=Oe.active,St=Oe.tab,Nt=St.key,wn=St.label,Ln=St.disabled,br=St.closeIcon,Br=Oe.closable,hr=Oe.renderWrapper,Wn=Oe.removeAriaLabel,Tn=Oe.editable,Jn=Oe.onClick,ar=Oe.onFocus,$r=Oe.style,mr="".concat(Ue,"-tab"),gr=ce(Br,br,Tn,Ln);function Cr(He){Ln||Jn(He)}function Er(He){He.preventDefault(),He.stopPropagation(),Tn.onEdit("remove",{key:Nt,event:He})}var Fr=Re.createElement("div",{key:Nt,"data-node-key":$e(Nt),className:ve()(mr,(Ve={},(0,_e.Z)(Ve,"".concat(mr,"-with-remove"),gr),(0,_e.Z)(Ve,"".concat(mr,"-active"),vt),(0,_e.Z)(Ve,"".concat(mr,"-disabled"),Ln),Ve)),style:$r,onClick:Cr},Re.createElement("div",{role:"tab","aria-selected":vt,id:qe&&"".concat(qe,"-tab-").concat(Nt),className:"".concat(mr,"-btn"),"aria-controls":qe&&"".concat(qe,"-panel-").concat(Nt),"aria-disabled":Ln,tabIndex:Ln?null:0,onClick:function(Ge){Ge.stopPropagation(),Cr(Ge)},onKeyDown:function(Ge){[Hn.SPACE,Hn.ENTER].includes(Ge.which)&&(Ge.preventDefault(),Cr(Ge))},onFocus:ar},wn),gr&&Re.createElement("button",{type:"button","aria-label":Wn||"remove",tabIndex:0,className:"".concat(mr,"-remove"),onClick:function(Ge){Ge.stopPropagation(),Er(Ge)}},br||Tn.removeIcon||"\xD7"));return hr?hr(Fr):Fr}var yr=Lr,Pr=function(Ve){return+setTimeout(Ve,16)},nr=function(Ve){return clearTimeout(Ve)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Pr=function(Ve){return window.requestAnimationFrame(Ve)},nr=function(Ve){return window.cancelAnimationFrame(Ve)});var ot=0,Ct=new Map;function zt(Oe){Ct.delete(Oe)}var un=function(Ve){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ot+=1;var qe=ot;function vt(St){if(St===0)zt(qe),Ve();else{var Nt=Pr(function(){vt(St-1)});Ct.set(qe,Nt)}}return vt(Ue),qe};un.cancel=function(Oe){var Ve=Ct.get(Oe);return zt(Ve),nr(Ve)};var Je=un,Mt=function(Ve){var Ue=Ve.activeTabOffset,qe=Ve.horizontal,vt=Ve.rtl,St=Ve.indicatorSize,Nt=(0,Re.useState)(),wn=(0,ge.Z)(Nt,2),Ln=wn[0],br=wn[1],Br=(0,Re.useRef)(),hr=function(Jn){return typeof St=="function"?St(Jn):typeof St=="number"?St:Jn};function Wn(){Je.cancel(Br.current)}return(0,Re.useEffect)(function(){var Tn={};return Ue&&(qe?(vt?(Tn.right=Ue.right+Ue.width/2,Tn.transform="translateX(50%)"):(Tn.left=Ue.left+Ue.width/2,Tn.transform="translateX(-50%)"),Tn.width=hr(Ue.width)):(Tn.top=Ue.top+Ue.height/2,Tn.transform="translateY(-50%)",Tn.height=hr(Ue.height))),Wn(),Br.current=Je(function(){br(Tn)}),Wn},[Ue,qe,vt,St]),{style:Ln}},ln=Mt,Jt=function(Ve){var Ue=Ve.current||{},qe=Ue.offsetWidth,vt=qe===void 0?0:qe,St=Ue.offsetHeight,Nt=St===void 0?0:St;return[vt,Nt]},vn=function(Ve,Ue){return Ve[Ue?0:1]};function bn(Oe,Ve){var Ue,qe=Re.useContext(je),vt=qe.prefixCls,St=qe.tabs,Nt=Oe.className,wn=Oe.style,Ln=Oe.id,br=Oe.animated,Br=Oe.activeKey,hr=Oe.rtl,Wn=Oe.extra,Tn=Oe.editable,Jn=Oe.locale,ar=Oe.tabPosition,$r=Oe.tabBarGutter,mr=Oe.children,gr=Oe.onTabClick,Cr=Oe.onTabScroll,Er=Oe.indicatorSize,Fr=(0,Re.useRef)(),He=(0,Re.useRef)(),Ge=(0,Re.useRef)(),Ft=(0,Re.useRef)(),Et=(0,Re.useRef)(),dn=(0,Re.useRef)(),In=(0,Re.useRef)(),zn=ar==="top"||ar==="bottom",or=mt(0,function(Ka,ye){zn&&Cr&&Cr({direction:Ka>ye?"left":"right"})}),jn=(0,ge.Z)(or,2),_n=jn[0],cr=jn[1],fr=mt(0,function(Ka,ye){!zn&&Cr&&Cr({direction:Ka>ye?"top":"bottom"})}),Hr=(0,ge.Z)(fr,2),ur=Hr[0],ti=Hr[1],yi=(0,Re.useState)([0,0]),ni=(0,ge.Z)(yi,2),fi=ni[0],jr=ni[1],oi=(0,Re.useState)([0,0]),Ci=(0,ge.Z)(oi,2),Oi=Ci[0],ii=Ci[1],Ni=(0,Re.useState)([0,0]),la=(0,ge.Z)(Ni,2),Ha=la[0],Aa=la[1],pa=(0,Re.useState)([0,0]),ka=(0,ge.Z)(pa,2),Pa=ka[0],Ui=ka[1],ca=tn(new Map),bi=(0,ge.Z)(ca,2),zi=bi[0],ia=bi[1],_a=Me(St,zi,Oi[0]),So=vn(fi,zn),ho=vn(Oi,zn),po=vn(Ha,zn),Xa=vn(Pa,zn),Ra=So<ho+po,Hi=Ra?So-Xa:So-po,yo="".concat(vt,"-nav-operations-hidden"),Xi=0,Ei=0;zn&&hr?(Xi=0,Ei=Math.max(0,ho-Hi)):(Xi=Math.min(0,Hi-ho),Ei=0);function ua(Ka){return Ka<Xi?Xi:Ka>Ei?Ei:Ka}var Ja=(0,Re.useRef)(),wa=(0,Re.useState)(),Wa=(0,ge.Z)(wa,2),Ki=Wa[0],ro=Wa[1];function so(){ro(Date.now())}function to(){window.clearTimeout(Ja.current)}Yt(Ft,function(Ka,ye){function ke(De,nt){De(function(at){var an=ua(at+nt);return an})}return Ra?(zn?ke(cr,Ka):ke(ti,ye),to(),so(),!0):!1}),(0,Re.useEffect)(function(){return to(),Ki&&(Ja.current=window.setTimeout(function(){ro(0)},100)),to},[Ki]);var lo=en(_a,Hi,zn?_n:ur,ho,po,Xa,(0,we.Z)((0,we.Z)({},Oe),{},{tabs:St})),vo=(0,ge.Z)(lo,2),Ao=vo[0],no=vo[1],ao=ht(function(){var Ka=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Br,ye=_a.get(Ka)||{width:0,height:0,left:0,right:0,top:0};if(zn){var ke=_n;hr?ye.right<_n?ke=ye.right:ye.right+ye.width>_n+Hi&&(ke=ye.right+ye.width-Hi):ye.left<-_n?ke=-ye.left:ye.left+ye.width>-_n+Hi&&(ke=-(ye.left+ye.width-Hi)),ti(0),cr(ua(ke))}else{var De=ur;ye.top<-ur?De=-ye.top:ye.top+ye.height>-ur+Hi&&(De=-(ye.top+ye.height-Hi)),cr(0),ti(ua(De))}}),zo={};ar==="top"||ar==="bottom"?zo[hr?"marginRight":"marginLeft"]=$r:zo.marginTop=$r;var Ho=St.map(function(Ka,ye){var ke=Ka.key;return Re.createElement(yr,{id:Ln,prefixCls:vt,key:ke,tab:Ka,style:ye===0?void 0:zo,closable:Ka.closable,editable:Tn,active:ke===Br,renderWrapper:mr,removeAriaLabel:Jn==null?void 0:Jn.removeAriaLabel,onClick:function(nt){gr(ke,nt)},onFocus:function(){ao(ke),so(),Ft.current&&(hr||(Ft.current.scrollLeft=0),Ft.current.scrollTop=0)}})}),Jo=function(){return ia(function(){var ye=new Map;return St.forEach(function(ke){var De,nt=ke.key,at=(De=Et.current)===null||De===void 0?void 0:De.querySelector('[data-node-key="'.concat($e(nt),'"]'));at&&ye.set(nt,{width:at.offsetWidth,height:at.offsetHeight,left:at.offsetLeft,top:at.offsetTop})}),ye})};(0,Re.useEffect)(function(){Jo()},[St.map(function(Ka){return Ka.key}).join("_")]);var To=Qt(function(){var Ka=Jt(Fr),ye=Jt(He),ke=Jt(Ge);jr([Ka[0]-ye[0]-ke[0],Ka[1]-ye[1]-ke[1]]);var De=Jt(In);Aa(De);var nt=Jt(dn);Ui(nt);var at=Jt(Et);ii([at[0]-De[0],at[1]-De[1]]),Jo()}),co=St.slice(0,Ao),aa=St.slice(no+1),va=[].concat((0,Ze.Z)(co),(0,Ze.Z)(aa)),qa=_a.get(Br),uo=ln({activeTabOffset:qa,horizontal:zn,rtl:hr,indicatorSize:Er}),Po=uo.style;(0,Re.useEffect)(function(){ao()},[Br,Xi,Ei,Cn(qa),Cn(_a),zn]),(0,Re.useEffect)(function(){To()},[hr]);var Uo=!!va.length,qo="".concat(vt,"-nav-wrap"),ls,Ss,Qo,Cs;return zn?hr?(Ss=_n>0,ls=_n!==Ei):(ls=_n<0,Ss=_n!==Xi):(Qo=ur<0,Cs=ur!==Xi),Re.createElement(kt.Z,{onResize:To},Re.createElement("div",{ref:pn(Ve,Fr),role:"tablist",className:ve()("".concat(vt,"-nav"),Nt),style:wn,onKeyDown:function(){so()}},Re.createElement(se,{ref:He,position:"left",extra:Wn,prefixCls:vt}),Re.createElement(kt.Z,{onResize:To},Re.createElement("div",{className:ve()(qo,(Ue={},(0,_e.Z)(Ue,"".concat(qo,"-ping-left"),ls),(0,_e.Z)(Ue,"".concat(qo,"-ping-right"),Ss),(0,_e.Z)(Ue,"".concat(qo,"-ping-top"),Qo),(0,_e.Z)(Ue,"".concat(qo,"-ping-bottom"),Cs),Ue)),ref:Ft},Re.createElement(kt.Z,{onResize:To},Re.createElement("div",{ref:Et,className:"".concat(vt,"-nav-list"),style:{transform:"translate(".concat(_n,"px, ").concat(ur,"px)"),transition:Ki?"none":void 0}},Ho,Re.createElement(me,{ref:In,prefixCls:vt,locale:Jn,editable:Tn,style:(0,we.Z)((0,we.Z)({},Ho.length===0?void 0:zo),{},{visibility:Uo?"hidden":null})}),Re.createElement("div",{className:ve()("".concat(vt,"-ink-bar"),(0,_e.Z)({},"".concat(vt,"-ink-bar-animated"),br.inkBar)),style:Po}))))),Re.createElement(Gn,(0,Ce.Z)({},Oe,{removeAriaLabel:Jn==null?void 0:Jn.removeAriaLabel,ref:dn,prefixCls:vt,tabs:va,className:!Uo&&yo,tabMoving:!!Ki})),Re.createElement(se,{ref:Ge,position:"right",extra:Wn,prefixCls:vt})))}var Fn=Re.forwardRef(bn),Nr=["renderTabBar"],Sr=["label","key"];function vr(Oe){var Ve=Oe.renderTabBar,Ue=(0,ft.Z)(Oe,Nr),qe=Re.useContext(je),vt=qe.tabs;if(Ve){var St=(0,we.Z)((0,we.Z)({},Ue),{},{panes:vt.map(function(Nt){var wn=Nt.label,Ln=Nt.key,br=(0,ft.Z)(Nt,Sr);return Re.createElement(At,(0,Ce.Z)({tab:wn,key:Ln,tabKey:Ln},br))})});return Ve(St,Fn)}return Re.createElement(Fn,Ue)}var Ir={},_r=[],Lt=function(Ve){_r.push(Ve)};function wt(Oe,Ve){if(0)var Ue}function Ot(Oe,Ve){if(0)var Ue}function Dn(){Ir={}}function er(Oe,Ve,Ue){!Ve&&!Ir[Ue]&&(Oe(!1,Ue),Ir[Ue]=!0)}function An(Oe,Ve){er(wt,Oe,Ve)}function Rn(Oe,Ve){er(Ot,Oe,Ve)}An.preMessage=Lt,An.resetWarned=Dn,An.noteOnce=Rn;var Nn=null;function rr(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Ve;return Oe===!1?Ve={inkBar:!1,tabPane:!1}:Oe===!0?Ve={inkBar:!0,tabPane:!1}:Ve=(0,we.Z)({inkBar:!0},(0,Te.Z)(Oe)==="object"?Oe:{}),Ve.tabPaneMotion&&Ve.tabPane===void 0&&(Ve.tabPane=!0),!Ve.tabPaneMotion&&Ve.tabPane&&(Ve.tabPane=!1),Ve}var Dr=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],yn=0;function Si(Oe,Ve){var Ue,qe=Oe.id,vt=Oe.prefixCls,St=vt===void 0?"rc-tabs":vt,Nt=Oe.className,wn=Oe.items,Ln=Oe.direction,br=Oe.activeKey,Br=Oe.defaultActiveKey,hr=Oe.editable,Wn=Oe.animated,Tn=Oe.tabPosition,Jn=Tn===void 0?"top":Tn,ar=Oe.tabBarGutter,$r=Oe.tabBarStyle,mr=Oe.tabBarExtraContent,gr=Oe.locale,Cr=Oe.moreIcon,Er=Oe.moreTransitionName,Fr=Oe.destroyInactiveTabPane,He=Oe.renderTabBar,Ge=Oe.onChange,Ft=Oe.onTabClick,Et=Oe.onTabScroll,dn=Oe.getPopupContainer,In=Oe.popupClassName,zn=Oe.indicatorSize,or=(0,ft.Z)(Oe,Dr),jn=Re.useMemo(function(){return(wn||[]).filter(function(Ui){return Ui&&(0,Te.Z)(Ui)==="object"&&"key"in Ui})},[wn]),_n=Ln==="rtl",cr=rr(Wn),fr=(0,Re.useState)(!1),Hr=(0,ge.Z)(fr,2),ur=Hr[0],ti=Hr[1];(0,Re.useEffect)(function(){ti(bt())},[]);var yi=Ee(function(){var Ui;return(Ui=jn[0])===null||Ui===void 0?void 0:Ui.key},{value:br,defaultValue:Br}),ni=(0,ge.Z)(yi,2),fi=ni[0],jr=ni[1],oi=(0,Re.useState)(function(){return jn.findIndex(function(Ui){return Ui.key===fi})}),Ci=(0,ge.Z)(oi,2),Oi=Ci[0],ii=Ci[1];(0,Re.useEffect)(function(){var Ui=jn.findIndex(function(bi){return bi.key===fi});if(Ui===-1){var ca;Ui=Math.max(0,Math.min(Oi,jn.length-1)),jr((ca=jn[Ui])===null||ca===void 0?void 0:ca.key)}ii(Ui)},[jn.map(function(Ui){return Ui.key}).join("_"),fi,Oi]);var Ni=Ee(null,{value:qe}),la=(0,ge.Z)(Ni,2),Ha=la[0],Aa=la[1];(0,Re.useEffect)(function(){qe||(Aa("rc-tabs-".concat(yn)),yn+=1)},[]);function pa(Ui,ca){Ft==null||Ft(Ui,ca);var bi=Ui!==fi;jr(Ui),bi&&(Ge==null||Ge(Ui))}var ka={id:Ha,activeKey:fi,animated:cr,tabPosition:Jn,rtl:_n,mobile:ur},Pa=(0,we.Z)((0,we.Z)({},ka),{},{editable:hr,locale:gr,moreIcon:Cr,moreTransitionName:Er,tabBarGutter:ar,onTabClick:pa,onTabScroll:Et,extra:mr,style:$r,panes:null,getPopupContainer:dn,popupClassName:In,indicatorSize:zn});return Re.createElement(je.Provider,{value:{tabs:jn,prefixCls:St}},Re.createElement("div",(0,Ce.Z)({ref:Ve,id:qe,className:ve()(St,"".concat(St,"-").concat(Jn),(Ue={},(0,_e.Z)(Ue,"".concat(St,"-mobile"),ur),(0,_e.Z)(Ue,"".concat(St,"-editable"),hr),(0,_e.Z)(Ue,"".concat(St,"-rtl"),_n),Ue),Nt)},or),Re.createElement(vr,(0,Ce.Z)({},Pa,{renderTabBar:He})),Re.createElement(lt,(0,Ce.Z)({destroyInactiveTabPane:Fr},ka,{animated:cr}))))}var di=Re.forwardRef(Si),ha=di,ta=ha,Wi=ae(53124),Ta=ae(98675),$i=()=>null,ra=ae(33603);const Ma={motionAppear:!1,motionEnter:!0,motionLeave:!0};function vi(Oe){let Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Ue;return Ve===!1?Ue={inkBar:!1,tabPane:!1}:Ve===!0?Ue={inkBar:!0,tabPane:!0}:Ue=Object.assign({inkBar:!0},typeof Ve=="object"?Ve:{}),Ue.tabPane&&(Ue.tabPaneMotion=Object.assign(Object.assign({},Ma),{motionName:(0,ra.m)(Oe,"switch")})),Ue}var Zi=ae(37419),xa=function(Oe,Ve){var Ue={};for(var qe in Oe)Object.prototype.hasOwnProperty.call(Oe,qe)&&Ve.indexOf(qe)<0&&(Ue[qe]=Oe[qe]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,qe=Object.getOwnPropertySymbols(Oe);vt<qe.length;vt++)Ve.indexOf(qe[vt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,qe[vt])&&(Ue[qe[vt]]=Oe[qe[vt]]);return Ue};function Ya(Oe){return Oe.filter(Ve=>Ve)}function Ba(Oe,Ve){if(Oe)return Oe;const Ue=(0,Zi.Z)(Ve).map(qe=>{if(Re.isValidElement(qe)){const{key:vt,props:St}=qe,Nt=St||{},{tab:wn}=Nt,Ln=xa(Nt,["tab"]);return Object.assign(Object.assign({key:String(vt)},Ln),{label:wn})}return null});return Ya(Ue)}var ki=ae(14747),Rt=ae(67968),Tt=ae(45503),mn=ae(67771),Qn=Oe=>{const{componentCls:Ve,motionDurationSlow:Ue}=Oe;return[{[Ve]:{[`${Ve}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Ue}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Ue}`}}}}},[(0,mn.oN)(Oe,"slide-up"),(0,mn.oN)(Oe,"slide-down")]]};const Or=Oe=>{const{componentCls:Ve,tabsCardPadding:Ue,cardBg:qe,cardGutter:vt,colorBorderSecondary:St,itemSelectedColor:Nt}=Oe;return{[`${Ve}-card`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{margin:0,padding:Ue,background:qe,border:`${Oe.lineWidth}px ${Oe.lineType} ${St}`,transition:`all ${Oe.motionDurationSlow} ${Oe.motionEaseInOut}`},[`${Ve}-tab-active`]:{color:Nt,background:Oe.colorBgContainer},[`${Ve}-ink-bar`]:{visibility:"hidden"}},[`&${Ve}-top, &${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginLeft:{_skip_check_:!0,value:`${vt}px`}}}},[`&${Ve}-top`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:`${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0 0`},[`${Ve}-tab-active`]:{borderBottomColor:Oe.colorBgContainer}}},[`&${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:`0 0 ${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px`},[`${Ve}-tab-active`]:{borderTopColor:Oe.colorBgContainer}}},[`&${Ve}-left, &${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginTop:`${vt}px`}}},[`&${Ve}-left`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Oe.borderRadiusLG}px 0 0 ${Oe.borderRadiusLG}px`}},[`${Ve}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:Oe.colorBgContainer}}}},[`&${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0`}},[`${Ve}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:Oe.colorBgContainer}}}}}}},Gr=Oe=>{const{componentCls:Ve,itemHoverColor:Ue,dropdownEdgeChildVerticalPadding:qe}=Oe;return{[`${Ve}-dropdown`]:Object.assign(Object.assign({},(0,ki.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Oe.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Ve}-dropdown-menu`]:{maxHeight:Oe.tabsDropdownHeight,margin:0,padding:`${qe}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({},ki.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:Ue}},"&:hover":{background:Oe.controlItemBgHover},"&-disabled":{"&, &:hover":{color:Oe.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},ci=Oe=>{const{componentCls:Ve,margin:Ue,colorBorderSecondary:qe,horizontalMargin:vt,verticalItemPadding:St,verticalItemMargin:Nt}=Oe;return{[`${Ve}-top, ${Ve}-bottom`]:{flexDirection:"column",[`> ${Ve}-nav, > div > ${Ve}-nav`]:{margin:vt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Oe.lineWidth}px ${Oe.lineType} ${qe}`,content:"''"},[`${Ve}-ink-bar`]:{height:Oe.lineWidthBold,"&-animated":{transition:`width ${Oe.motionDurationSlow}, left ${Oe.motionDurationSlow},
right ${Oe.motionDurationSlow}`}},[`${Ve}-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},[`&${Ve}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Ve}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Ve}-top`]:{[`> ${Ve}-nav,
> div > ${Ve}-nav`]:{"&::before":{bottom:0},[`${Ve}-ink-bar`]:{bottom:0}}},[`${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{order:1,marginTop:`${Ue}px`,marginBottom:0,"&::before":{top:0},[`${Ve}-ink-bar`]:{top:0}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{order:0}},[`${Ve}-left, ${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{flexDirection:"column",minWidth:Oe.controlHeight*1.25,[`${Ve}-tab`]:{padding:St,textAlign:"center"},[`${Ve}-tab + ${Ve}-tab`]:{margin:Nt},[`${Ve}-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},[`&${Ve}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Ve}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Ve}-ink-bar`]:{width:Oe.lineWidthBold,"&-animated":{transition:`height ${Oe.motionDurationSlow}, top ${Oe.motionDurationSlow}`}},[`${Ve}-nav-list, ${Ve}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Ve}-left`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${Oe.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${Oe.lineWidth}px ${Oe.lineType} ${Oe.colorBorder}`},[`> ${Ve}-content > ${Ve}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:Oe.paddingLG}}}},[`${Ve}-right`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{order:1,[`${Ve}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Ve}-content-holder, > div > ${Ve}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-Oe.lineWidth},borderRight:{_skip_check_:!0,value:`${Oe.lineWidth}px ${Oe.lineType} ${Oe.colorBorder}`},[`> ${Ve}-content > ${Ve}-tabpane`]:{paddingRight:{_skip_check_:!0,value:Oe.paddingLG}}}}}},gi=Oe=>{const{componentCls:Ve,cardPaddingSM:Ue,cardPaddingLG:qe,horizontalItemPaddingSM:vt,horizontalItemPaddingLG:St}=Oe;return{[Ve]:{"&-small":{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:vt,fontSize:Oe.titleFontSizeSM}}},"&-large":{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:St,fontSize:Oe.titleFontSizeLG}}}},[`${Ve}-card`]:{[`&${Ve}-small`]:{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:Ue}},[`&${Ve}-bottom`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:`0 0 ${Oe.borderRadius}px ${Oe.borderRadius}px`}},[`&${Ve}-top`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:`${Oe.borderRadius}px ${Oe.borderRadius}px 0 0`}},[`&${Ve}-right`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Oe.borderRadius}px ${Oe.borderRadius}px 0`}}},[`&${Ve}-left`]:{[`> ${Ve}-nav ${Ve}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Oe.borderRadius}px 0 0 ${Oe.borderRadius}px`}}}},[`&${Ve}-large`]:{[`> ${Ve}-nav`]:{[`${Ve}-tab`]:{padding:qe}}}}}},li=Oe=>{const{componentCls:Ve,itemActiveColor:Ue,itemHoverColor:qe,iconCls:vt,tabsHorizontalItemMargin:St,horizontalItemPadding:Nt,itemSelectedColor:wn,itemColor:Ln}=Oe,br=`${Ve}-tab`;return{[br]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:Nt,fontSize:Oe.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Ln,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Ue}},(0,ki.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:qe},[`&${br}-active ${br}-btn`]:{color:wn,textShadow:Oe.tabsActiveTextShadow},[`&${br}-disabled`]:{color:Oe.colorTextDisabled,cursor:"not-allowed"},[`&${br}-disabled ${br}-btn, &${br}-disabled ${Ve}-remove`]:{"&:focus, &:active":{color:Oe.colorTextDisabled}},[`& ${br}-remove ${vt}`]:{margin:0},[vt]:{marginRight:{_skip_check_:!0,value:Oe.marginSM}}},[`${br} + ${br}`]:{margin:{_skip_check_:!0,value:St}}}},Mi=Oe=>{const{componentCls:Ve,tabsHorizontalItemMarginRTL:Ue,iconCls:qe,cardGutter:vt}=Oe;return{[`${Ve}-rtl`]:{direction:"rtl",[`${Ve}-nav`]:{[`${Ve}-tab`]:{margin:{_skip_check_:!0,value:Ue},[`${Ve}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[qe]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${Oe.marginSM}px`}},[`${Ve}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${Oe.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${Oe.marginXXS}px`},[qe]:{margin:0}}}},[`&${Ve}-left`]:{[`> ${Ve}-nav`]:{order:1},[`> ${Ve}-content-holder`]:{order:0}},[`&${Ve}-right`]:{[`> ${Ve}-nav`]:{order:0},[`> ${Ve}-content-holder`]:{order:1}},[`&${Ve}-card${Ve}-top, &${Ve}-card${Ve}-bottom`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-tab + ${Ve}-tab`]:{marginRight:{_skip_check_:!0,value:vt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Ve}-dropdown-rtl`]:{direction:"rtl"},[`${Ve}-menu-item`]:{[`${Ve}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Vi=Oe=>{const{componentCls:Ve,tabsCardPadding:Ue,cardHeight:qe,cardGutter:vt,itemHoverColor:St,itemActiveColor:Nt,colorBorderSecondary:wn}=Oe;return{[Ve]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ki.Wf)(Oe)),{display:"flex",[`> ${Ve}-nav, > div > ${Ve}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Ve}-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"}},[`${Ve}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${Oe.motionDurationSlow}`},[`${Ve}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Ve}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Ve}-nav-more`]:{position:"relative",padding:Ue,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:"''"}},[`${Ve}-nav-add`]:Object.assign({minWidth:qe,marginLeft:{_skip_check_:!0,value:vt},padding:`0 ${Oe.paddingXS}px`,background:"transparent",border:`${Oe.lineWidth}px ${Oe.lineType} ${wn}`,borderRadius:`${Oe.borderRadiusLG}px ${Oe.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:Oe.colorText,transition:`all ${Oe.motionDurationSlow} ${Oe.motionEaseInOut}`,"&:hover":{color:St},"&:active, &:focus:not(:focus-visible)":{color:Nt}},(0,ki.Qy)(Oe))},[`${Ve}-extra-content`]:{flex:"none"},[`${Ve}-ink-bar`]:{position:"absolute",background:Oe.inkBarColor,pointerEvents:"none"}}),li(Oe)),{[`${Ve}-content`]:{position:"relative",width:"100%"},[`${Ve}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Ve}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Ve}-centered`]:{[`> ${Ve}-nav, > div > ${Ve}-nav`]:{[`${Ve}-nav-wrap`]:{[`&:not([class*='${Ve}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Yr=(0,Rt.Z)("Tabs",Oe=>{const Ve=(0,Tt.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[gi(Ve),Mi(Ve),ci(Ve),Gr(Ve),Or(Ve),Vi(Ve),Qn(Ve)]},Oe=>{const Ve=Oe.controlHeightLG;return{zIndexPopup:Oe.zIndexPopupBase+50,cardBg:Oe.colorFillAlter,cardHeight:Ve,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}}),Fi=function(Oe,Ve){var Ue={};for(var qe in Oe)Object.prototype.hasOwnProperty.call(Oe,qe)&&Ve.indexOf(qe)<0&&(Ue[qe]=Oe[qe]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,qe=Object.getOwnPropertySymbols(Oe);vt<qe.length;vt++)Ve.indexOf(qe[vt])<0&&Object.prototype.propertyIsEnumerable.call(Oe,qe[vt])&&(Ue[qe[vt]]=Oe[qe[vt]]);return Ue};const sa=Oe=>{const{type:Ve,className:Ue,rootClassName:qe,size:vt,onEdit:St,hideAdd:Nt,centered:wn,addIcon:Ln,popupClassName:br,children:Br,items:hr,animated:Wn,style:Tn,indicatorSize:Jn}=Oe,ar=Fi(Oe,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:$r,moreIcon:mr=Re.createElement(Fe.Z,null)}=ar,{direction:gr,tabs:Cr,getPrefixCls:Er,getPopupContainer:Fr}=Re.useContext(Wi.E_),He=Er("tabs",$r),[Ge,Ft]=Yr(He);let Et;Ve==="editable-card"&&(Et={onEdit:(_n,cr)=>{let{key:fr,event:Hr}=cr;St==null||St(_n==="add"?Hr:fr,_n)},removeIcon:Re.createElement(fe.Z,null),addIcon:Ln||Re.createElement(Be.Z,null),showAdd:Nt!==!0});const dn=Er(),In=Ba(hr,Br),zn=vi(He,Wn),or=(0,Ta.Z)(vt),jn=Object.assign(Object.assign({},Cr==null?void 0:Cr.style),Tn);return Ge(Re.createElement(ta,Object.assign({direction:gr,getPopupContainer:Fr,moreTransitionName:`${dn}-slide-up`},ar,{items:In,className:ve()({[`${He}-${or}`]:or,[`${He}-card`]:["card","editable-card"].includes(Ve),[`${He}-editable-card`]:Ve==="editable-card",[`${He}-centered`]:wn},Cr==null?void 0:Cr.className,Ue,qe,Ft),popupClassName:ve()(br,Ft),style:jn,editable:Et,moreIcon:mr,prefixCls:He,animated:zn,indicatorSize:Jn!=null?Jn:Cr==null?void 0:Cr.indicatorSize})))};sa.TabPane=$i;var Yi=sa},59810:function(kn,Vt,ae){"use strict";ae.d(Vt,{default:function(){return _r}});var fe=ae(67294),Fe=ae(74902),Be=ae(94184),Ye=ae.n(Be),ve=ae(87462),Ce=ae(15671),_e=ae(43144),we=ae(60136),ge=ae(51630),Te=ae(4942),ft=ae(45987),Re=ae(74165),bt=ae(71002),ht=ae(15861),st=ae(64217);function tt(Lt,wt){var Ot="cannot ".concat(Lt.method," ").concat(Lt.action," ").concat(wt.status,"'"),Dn=new Error(Ot);return Dn.status=wt.status,Dn.method=Lt.method,Dn.url=Lt.action,Dn}function Le(Lt){var wt=Lt.responseText||Lt.response;if(!wt)return wt;try{return JSON.parse(wt)}catch(Ot){return wt}}function xt(Lt){var wt=new XMLHttpRequest;Lt.onProgress&&wt.upload&&(wt.upload.onprogress=function(An){An.total>0&&(An.percent=An.loaded/An.total*100),Lt.onProgress(An)});var Ot=new FormData;Lt.data&&Object.keys(Lt.data).forEach(function(er){var An=Lt.data[er];if(Array.isArray(An)){An.forEach(function(Rn){Ot.append("".concat(er,"[]"),Rn)});return}Ot.append(er,An)}),Lt.file instanceof Blob?Ot.append(Lt.filename,Lt.file,Lt.file.name):Ot.append(Lt.filename,Lt.file),wt.onerror=function(An){Lt.onError(An)},wt.onload=function(){return wt.status<200||wt.status>=300?Lt.onError(tt(Lt,wt),Le(wt)):Lt.onSuccess(Le(wt),wt)},wt.open(Lt.method,Lt.action,!0),Lt.withCredentials&&"withCredentials"in wt&&(wt.withCredentials=!0);var Dn=Lt.headers||{};return Dn["X-Requested-With"]!==null&&wt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Dn).forEach(function(er){Dn[er]!==null&&wt.setRequestHeader(er,Dn[er])}),wt.send(Ot),{abort:function(){wt.abort()}}}var on=+new Date,it=0;function yt(){return"rc-upload-".concat(on,"-").concat(++it)}var Ee=ae(80334),de=function(Lt,wt){if(Lt&&wt){var Ot=Array.isArray(wt)?wt:wt.split(","),Dn=Lt.name||"",er=Lt.type||"",An=er.replace(/\/.*$/,"");return Ot.some(function(Rn){var Nn=Rn.trim();if(/^\*(\/\*)?$/.test(Rn))return!0;if(Nn.charAt(0)==="."){var rr=Dn.toLowerCase(),Dr=Nn.toLowerCase(),yn=[Dr];return(Dr===".jpg"||Dr===".jpeg")&&(yn=[".jpg",".jpeg"]),yn.some(function(Si){return rr.endsWith(Si)})}return/\/\*$/.test(Nn)?An===Nn.replace(/\/.*$/,""):er===Nn?!0:/^\w+$/.test(Nn)?((0,Ee.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Nn,"'.Skip for check.")),!0):!1})}return!0};function je(Lt,wt){var Ot=Lt.createReader(),Dn=[];function er(){Ot.readEntries(function(An){var Rn=Array.prototype.slice.apply(An);Dn=Dn.concat(Rn);var Nn=!Rn.length;Nn?wt(Dn):er()})}er()}var ze=function(wt,Ot,Dn){var er=function An(Rn,Nn){Rn&&(Rn.path=Nn||"",Rn.isFile?Rn.file(function(rr){Dn(rr)&&(Rn.fullPath&&!rr.webkitRelativePath&&(Object.defineProperties(rr,{webkitRelativePath:{writable:!0}}),rr.webkitRelativePath=Rn.fullPath.replace(/^\//,""),Object.defineProperties(rr,{webkitRelativePath:{writable:!1}})),Ot([rr]))}):Rn.isDirectory&&je(Rn,function(rr){rr.forEach(function(Dr){An(Dr,"".concat(Nn).concat(Rn.name,"/"))})}))};wt.forEach(function(An){er(An.webkitGetAsEntry())})},At=ze,ct=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],lt=function(Lt){(0,we.Z)(Ot,Lt);var wt=(0,ge.Z)(Ot);function Ot(){var Dn;(0,Ce.Z)(this,Ot);for(var er=arguments.length,An=new Array(er),Rn=0;Rn<er;Rn++)An[Rn]=arguments[Rn];return Dn=wt.call.apply(wt,[this].concat(An)),Dn.state={uid:yt()},Dn.reqs={},Dn.fileInput=void 0,Dn._isMounted=void 0,Dn.onChange=function(Nn){var rr=Dn.props,Dr=rr.accept,yn=rr.directory,Si=Nn.target.files,di=(0,Fe.Z)(Si).filter(function(ha){return!yn||de(ha,Dr)});Dn.uploadFiles(di),Dn.reset()},Dn.onClick=function(Nn){var rr=Dn.fileInput;if(rr){var Dr=Dn.props,yn=Dr.children,Si=Dr.onClick;if(yn&&yn.type==="button"){var di=rr.parentNode;di.focus(),di.querySelector("button").blur()}rr.click(),Si&&Si(Nn)}},Dn.onKeyDown=function(Nn){Nn.key==="Enter"&&Dn.onClick(Nn)},Dn.onFileDrop=function(Nn){var rr=Dn.props.multiple;if(Nn.preventDefault(),Nn.type!=="dragover")if(Dn.props.directory)At(Array.prototype.slice.call(Nn.dataTransfer.items),Dn.uploadFiles,function(yn){return de(yn,Dn.props.accept)});else{var Dr=(0,Fe.Z)(Nn.dataTransfer.files).filter(function(yn){return de(yn,Dn.props.accept)});rr===!1&&(Dr=Dr.slice(0,1)),Dn.uploadFiles(Dr)}},Dn.uploadFiles=function(Nn){var rr=(0,Fe.Z)(Nn),Dr=rr.map(function(yn){return yn.uid=yt(),Dn.processFile(yn,rr)});Promise.all(Dr).then(function(yn){var Si=Dn.props.onBatchStart;Si==null||Si(yn.map(function(di){var ha=di.origin,ta=di.parsedFile;return{file:ha,parsedFile:ta}})),yn.filter(function(di){return di.parsedFile!==null}).forEach(function(di){Dn.post(di)})})},Dn.processFile=function(){var Nn=(0,ht.Z)((0,Re.Z)().mark(function rr(Dr,yn){var Si,di,ha,ta,Wi,Ta,Gi,$i,ra;return(0,Re.Z)().wrap(function(vi){for(;;)switch(vi.prev=vi.next){case 0:if(Si=Dn.props.beforeUpload,di=Dr,!Si){vi.next=14;break}return vi.prev=3,vi.next=6,Si(Dr,yn);case 6:di=vi.sent,vi.next=12;break;case 9:vi.prev=9,vi.t0=vi.catch(3),di=!1;case 12:if(di!==!1){vi.next=14;break}return vi.abrupt("return",{origin:Dr,parsedFile:null,action:null,data:null});case 14:if(ha=Dn.props.action,typeof ha!="function"){vi.next=21;break}return vi.next=18,ha(Dr);case 18:ta=vi.sent,vi.next=22;break;case 21:ta=ha;case 22:if(Wi=Dn.props.data,typeof Wi!="function"){vi.next=29;break}return vi.next=26,Wi(Dr);case 26:Ta=vi.sent,vi.next=30;break;case 29:Ta=Wi;case 30:return Gi=((0,bt.Z)(di)==="object"||typeof di=="string")&&di?di:Dr,Gi instanceof File?$i=Gi:$i=new File([Gi],Dr.name,{type:Dr.type}),ra=$i,ra.uid=Dr.uid,vi.abrupt("return",{origin:Dr,data:Ta,parsedFile:ra,action:ta});case 35:case"end":return vi.stop()}},rr,null,[[3,9]])}));return function(rr,Dr){return Nn.apply(this,arguments)}}(),Dn.saveFileInput=function(Nn){Dn.fileInput=Nn},Dn}return(0,_e.Z)(Ot,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(er){var An=this,Rn=er.data,Nn=er.origin,rr=er.action,Dr=er.parsedFile;if(this._isMounted){var yn=this.props,Si=yn.onStart,di=yn.customRequest,ha=yn.name,ta=yn.headers,Wi=yn.withCredentials,Ta=yn.method,Gi=Nn.uid,$i=di||xt,ra={action:rr,filename:ha,data:Rn,file:Dr,headers:ta,withCredentials:Wi,method:Ta||"post",onProgress:function(vi){var Zi=An.props.onProgress;Zi==null||Zi(vi,Dr)},onSuccess:function(vi,Zi){var xa=An.props.onSuccess;xa==null||xa(vi,Dr,Zi),delete An.reqs[Gi]},onError:function(vi,Zi){var xa=An.props.onError;xa==null||xa(vi,Zi,Dr),delete An.reqs[Gi]}};Si(Nn),this.reqs[Gi]=$i(ra)}}},{key:"reset",value:function(){this.setState({uid:yt()})}},{key:"abort",value:function(er){var An=this.reqs;if(er){var Rn=er.uid?er.uid:er;An[Rn]&&An[Rn].abort&&An[Rn].abort(),delete An[Rn]}else Object.keys(An).forEach(function(Nn){An[Nn]&&An[Nn].abort&&An[Nn].abort(),delete An[Nn]})}},{key:"render",value:function(){var er,An=this.props,Rn=An.component,Nn=An.prefixCls,rr=An.className,Dr=An.disabled,yn=An.id,Si=An.style,di=An.multiple,ha=An.accept,ta=An.capture,Wi=An.children,Ta=An.directory,Gi=An.openFileDialogOnClick,$i=An.onMouseEnter,ra=An.onMouseLeave,Ma=(0,ft.Z)(An,ct),vi=Ye()((er={},(0,Te.Z)(er,Nn,!0),(0,Te.Z)(er,"".concat(Nn,"-disabled"),Dr),(0,Te.Z)(er,rr,rr),er)),Zi=Ta?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},xa=Dr?{}:{onClick:Gi?this.onClick:function(){},onKeyDown:Gi?this.onKeyDown:function(){},onMouseEnter:$i,onMouseLeave:ra,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return fe.createElement(Rn,(0,ve.Z)({},xa,{className:vi,role:"button",style:Si}),fe.createElement("input",(0,ve.Z)({},(0,st.Z)(Ma,{aria:!0,data:!0}),{id:yn,disabled:Dr,type:"file",ref:this.saveFileInput,onClick:function(Ba){return Ba.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ha},Zi,{multiple:di,onChange:this.onChange},ta!=null?{capture:ta}:{})),Wi)}}]),Ot}(fe.Component),Ze=lt;function kt(){}var pt=function(Lt){(0,we.Z)(Ot,Lt);var wt=(0,ge.Z)(Ot);function Ot(){var Dn;(0,Ce.Z)(this,Ot);for(var er=arguments.length,An=new Array(er),Rn=0;Rn<er;Rn++)An[Rn]=arguments[Rn];return Dn=wt.call.apply(wt,[this].concat(An)),Dn.uploader=void 0,Dn.saveUploader=function(Nn){Dn.uploader=Nn},Dn}return(0,_e.Z)(Ot,[{key:"abort",value:function(er){this.uploader.abort(er)}},{key:"render",value:function(){return fe.createElement(Ze,(0,ve.Z)({},this.props,{ref:this.saveUploader}))}}]),Ot}(fe.Component);pt.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:kt,onError:kt,onSuccess:kt,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var nn=pt,rt=nn,qt=ae(5663),pn=ae(73935),cn=ae(53124),Xe=ae(98866),Me=ae(10110),mt=ae(24457),Gt={icon:function(wt,Ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:Ot}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:wt}}]}},name:"file",theme:"twotone"},hn=Gt,Qe=ae(84089),ut=function(wt,Ot){return fe.createElement(Qe.Z,(0,ve.Z)({},wt,{ref:Ot,icon:hn}))},Yt=fe.forwardRef(ut),Qt=ae(3407),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},_t=tn,en=function(wt,Ot){return fe.createElement(Qe.Z,(0,ve.Z)({},wt,{ref:Ot,icon:_t}))},Cn=fe.forwardRef(en),On={icon:function(wt,Ot){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:wt}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:Ot}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:Ot}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:Ot}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:wt}}]}},name:"picture",theme:"twotone"},$e=On,ce=function(wt,Ot){return fe.createElement(Qe.Z,(0,ve.Z)({},wt,{ref:Ot,icon:$e}))},le=fe.forwardRef(ce),me=ae(38379),he=ae(57838),se=ae(33603),Ie=ae(96159),et=ae(71577);function $t(Lt){return Object.assign(Object.assign({},Lt),{lastModified:Lt.lastModified,lastModifiedDate:Lt.lastModifiedDate,name:Lt.name,size:Lt.size,type:Lt.type,uid:Lt.uid,percent:0,originFileObj:Lt})}function Ht(Lt,wt){const Ot=(0,Fe.Z)(wt),Dn=Ot.findIndex(er=>{let{uid:An}=er;return An===Lt.uid});return Dn===-1?Ot.push(Lt):Ot[Dn]=Lt,Ot}function Xt(Lt,wt){const Ot=Lt.uid!==void 0?"uid":"name";return wt.filter(Dn=>Dn[Ot]===Lt[Ot])[0]}function jt(Lt,wt){const Ot=Lt.uid!==void 0?"uid":"name",Dn=wt.filter(er=>er[Ot]!==Lt[Ot]);return Dn.length===wt.length?null:Dn}const rn=function(){const wt=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Dn=wt[wt.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Dn)||[""])[0]},qn=Lt=>Lt.indexOf("image/")===0,lr=Lt=>{if(Lt.type&&!Lt.thumbUrl)return qn(Lt.type);const wt=Lt.thumbUrl||Lt.url||"",Ot=rn(wt);return/^data:image\//.test(wt)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(Ot)?!0:!(/^data:/.test(wt)||Ot)},Bt=200;function Sn(Lt){return new Promise(wt=>{if(!Lt.type||!qn(Lt.type)){wt("");return}const Ot=document.createElement("canvas");Ot.width=Bt,Ot.height=Bt,Ot.style.cssText=`position: fixed; left: 0; top: 0; width: ${Bt}px; height: ${Bt}px; z-index: 9999; display: none;`,document.body.appendChild(Ot);const Dn=Ot.getContext("2d"),er=new Image;if(er.onload=()=>{const{width:An,height:Rn}=er;let Nn=Bt,rr=Bt,Dr=0,yn=0;An>Rn?(rr=Rn*(Bt/An),yn=-(rr-Nn)/2):(Nn=An*(Bt/Rn),Dr=-(Nn-rr)/2),Dn.drawImage(er,Dr,yn,Nn,rr);const Si=Ot.toDataURL();document.body.removeChild(Ot),window.URL.revokeObjectURL(er.src),wt(Si)},er.crossOrigin="anonymous",Lt.type.startsWith("image/svg+xml")){const An=new FileReader;An.onload=()=>{An.result&&(er.src=An.result)},An.readAsDataURL(Lt)}else if(Lt.type.startsWith("image/gif")){const An=new FileReader;An.onload=()=>{An.result&&wt(An.result)},An.readAsDataURL(Lt)}else er.src=window.URL.createObjectURL(Lt)})}var dr=ae(84249),Wr=ae(90674),gt=ae(99569),sn=ae(38703),tr=ae(83062),xr=fe.forwardRef((Lt,wt)=>{let{prefixCls:Ot,className:Dn,style:er,locale:An,listType:Rn,file:Nn,items:rr,progress:Dr,iconRender:yn,actionIconRender:Si,itemRender:di,isImgUrl:ha,showPreviewIcon:ta,showRemoveIcon:Wi,showDownloadIcon:Ta,previewIcon:Gi,removeIcon:$i,downloadIcon:ra,onPreview:Ma,onDownload:vi,onClose:Zi}=Lt;var xa,Ya;const{status:Ba}=Nn,[ki,Rt]=fe.useState(Ba);fe.useEffect(()=>{Ba!=="removed"&&Rt(Ba)},[Ba]);const[Tt,mn]=fe.useState(!1);fe.useEffect(()=>{const vt=setTimeout(()=>{mn(!0)},300);return()=>{clearTimeout(vt)}},[]);const $n=yn(Nn);let Qn=fe.createElement("div",{className:`${Ot}-icon`},$n);if(Rn==="picture"||Rn==="picture-card"||Rn==="picture-circle")if(ki==="uploading"||!Nn.thumbUrl&&!Nn.url){const vt=Ye()(`${Ot}-list-item-thumbnail`,{[`${Ot}-list-item-file`]:ki!=="uploading"});Qn=fe.createElement("div",{className:vt},$n)}else{const vt=ha!=null&&ha(Nn)?fe.createElement("img",{src:Nn.thumbUrl||Nn.url,alt:Nn.name,className:`${Ot}-list-item-image`,crossOrigin:Nn.crossOrigin}):$n,St=Ye()(`${Ot}-list-item-thumbnail`,{[`${Ot}-list-item-file`]:ha&&!ha(Nn)});Qn=fe.createElement("a",{className:St,onClick:Nt=>Ma(Nn,Nt),href:Nn.url||Nn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},vt)}const Or=Ye()(`${Ot}-list-item`,`${Ot}-list-item-${ki}`),Gr=typeof Nn.linkProps=="string"?JSON.parse(Nn.linkProps):Nn.linkProps,ci=Wi?Si((typeof $i=="function"?$i(Nn):$i)||fe.createElement(dr.Z,null),()=>Zi(Nn),Ot,An.removeFile):null,gi=Ta&&ki==="done"?Si((typeof ra=="function"?ra(Nn):ra)||fe.createElement(Wr.Z,null),()=>vi(Nn),Ot,An.downloadFile):null,li=Rn!=="picture-card"&&Rn!=="picture-circle"&&fe.createElement("span",{key:"download-delete",className:Ye()(`${Ot}-list-item-actions`,{picture:Rn==="picture"})},gi,ci),Mi=Ye()(`${Ot}-list-item-name`),Vi=Nn.url?[fe.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Mi,title:Nn.name},Gr,{href:Nn.url,onClick:vt=>Ma(Nn,vt)}),Nn.name),li]:[fe.createElement("span",{key:"view",className:Mi,onClick:vt=>Ma(Nn,vt),title:Nn.name},Nn.name),li],Yr={pointerEvents:"none",opacity:.5},Fi=ta?fe.createElement("a",{href:Nn.url||Nn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:Nn.url||Nn.thumbUrl?void 0:Yr,onClick:vt=>Ma(Nn,vt),title:An.previewFile},typeof Gi=="function"?Gi(Nn):Gi||fe.createElement(gt.Z,null)):null,sa=(Rn==="picture-card"||Rn==="picture-circle")&&ki!=="uploading"&&fe.createElement("span",{className:`${Ot}-list-item-actions`},Fi,ki==="done"&&gi,ci),{getPrefixCls:Yi}=fe.useContext(cn.E_),Oe=Yi(),Ve=fe.createElement("div",{className:Or},Qn,Vi,sa,Tt&&fe.createElement(me.default,{motionName:`${Oe}-fade`,visible:ki==="uploading",motionDeadline:2e3},vt=>{let{className:St}=vt;const Nt="percent"in Nn?fe.createElement(sn.Z,Object.assign({},Dr,{type:"line",percent:Nn.percent,"aria-label":Nn["aria-label"],"aria-labelledby":Nn["aria-labelledby"]})):null;return fe.createElement("div",{className:Ye()(`${Ot}-list-item-progress`,St)},Nt)})),Ue=Nn.response&&typeof Nn.response=="string"?Nn.response:((xa=Nn.error)===null||xa===void 0?void 0:xa.statusText)||((Ya=Nn.error)===null||Ya===void 0?void 0:Ya.message)||An.uploadError,qe=ki==="error"?fe.createElement(tr.Z,{title:Ue,getPopupContainer:vt=>vt.parentNode},Ve):Ve;return fe.createElement("div",{className:Ye()(`${Ot}-list-item-container`,Dn),style:er,ref:wt},di?di(qe,Nn,rr,{download:vi.bind(null,Nn),preview:Ma.bind(null,Nn),remove:Zi.bind(null,Nn)}):qe)});const Kr=(Lt,wt)=>{const{listType:Ot="text",previewFile:Dn=Sn,onPreview:er,onDownload:An,onRemove:Rn,locale:Nn,iconRender:rr,isImageUrl:Dr=lr,prefixCls:yn,items:Si=[],showPreviewIcon:di=!0,showRemoveIcon:ha=!0,showDownloadIcon:ta=!1,removeIcon:Wi,previewIcon:Ta,downloadIcon:Gi,progress:$i={size:[-1,2],showInfo:!1},appendAction:ra,appendActionVisible:Ma=!0,itemRender:vi,disabled:Zi}=Lt,xa=(0,he.Z)(),[Ya,Ba]=fe.useState(!1);fe.useEffect(()=>{Ot!=="picture"&&Ot!=="picture-card"&&Ot!=="picture-circle"||(Si||[]).forEach(Yr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Yr.originFileObj instanceof File||Yr.originFileObj instanceof Blob)||Yr.thumbUrl!==void 0||(Yr.thumbUrl="",Dn&&Dn(Yr.originFileObj).then(Fi=>{Yr.thumbUrl=Fi||"",xa()}))})},[Ot,Si,Dn]),fe.useEffect(()=>{Ba(!0)},[]);const ki=(Yr,Fi)=>{if(er)return Fi==null||Fi.preventDefault(),er(Yr)},Rt=Yr=>{typeof An=="function"?An(Yr):Yr.url&&window.open(Yr.url)},Tt=Yr=>{Rn==null||Rn(Yr)},mn=Yr=>{if(rr)return rr(Yr,Ot);const Fi=Yr.status==="uploading",sa=Dr&&Dr(Yr)?fe.createElement(le,null):fe.createElement(Yt,null);let Yi=Fi?fe.createElement(Qt.Z,null):fe.createElement(Cn,null);return Ot==="picture"?Yi=Fi?fe.createElement(Qt.Z,null):sa:(Ot==="picture-card"||Ot==="picture-circle")&&(Yi=Fi?Nn.uploading:sa),Yi},$n=(Yr,Fi,sa,Yi)=>{const Oe={type:"text",size:"small",title:Yi,onClick:Ve=>{Fi(),(0,Ie.l$)(Yr)&&Yr.props.onClick&&Yr.props.onClick(Ve)},className:`${sa}-list-item-action`,disabled:Zi};if((0,Ie.l$)(Yr)){const Ve=(0,Ie.Tm)(Yr,Object.assign(Object.assign({},Yr.props),{onClick:()=>{}}));return fe.createElement(et.ZP,Object.assign({},Oe,{icon:Ve}))}return fe.createElement(et.ZP,Object.assign({},Oe),fe.createElement("span",null,Yr))};fe.useImperativeHandle(wt,()=>({handlePreview:ki,handleDownload:Rt}));const{getPrefixCls:Qn}=fe.useContext(cn.E_),Or=Qn("upload",yn),Gr=Qn(),ci=Ye()(`${Or}-list`,`${Or}-list-${Ot}`),gi=(0,Fe.Z)(Si.map(Yr=>({key:Yr.uid,file:Yr})));let Mi={motionDeadline:2e3,motionName:`${Or}-${Ot==="picture-card"||Ot==="picture-circle"?"animate-inline":"animate"}`,keys:gi,motionAppear:Ya};const Vi=fe.useMemo(()=>{const Yr=Object.assign({},(0,se.Z)(Gr));return delete Yr.onAppearEnd,delete Yr.onEnterEnd,delete Yr.onLeaveEnd,Yr},[Gr]);return Ot!=="picture-card"&&Ot!=="picture-circle"&&(Mi=Object.assign(Object.assign({},Vi),Mi)),fe.createElement("div",{className:ci},fe.createElement(me.CSSMotionList,Object.assign({},Mi,{component:!1}),Yr=>{let{key:Fi,file:sa,className:Yi,style:Oe}=Yr;return fe.createElement(xr,{key:Fi,locale:Nn,prefixCls:Or,className:Yi,style:Oe,file:sa,items:Si,progress:$i,listType:Ot,isImgUrl:Dr,showPreviewIcon:di,showRemoveIcon:ha,showDownloadIcon:ta,removeIcon:Wi,previewIcon:Ta,downloadIcon:Gi,iconRender:mn,actionIconRender:$n,itemRender:vi,onPreview:ki,onDownload:Rt,onClose:Tt})}),ra&&fe.createElement(me.default,Object.assign({},Mi,{visible:Ma,forceRender:!0}),Yr=>{let{className:Fi,style:sa}=Yr;return(0,Ie.Tm)(ra,Yi=>({className:Ye()(Yi.className,Fi),style:Object.assign(Object.assign(Object.assign({},sa),{pointerEvents:Fi?"none":void 0}),Yi.style)}))}))};var Zr=fe.forwardRef(Kr),ei=ae(14747),pi=ae(33507),kr=ae(67968),Ti=ae(45503),ea=Lt=>{const{componentCls:wt,iconCls:Ot}=Lt;return{[`${wt}-wrapper`]:{[`${wt}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:Lt.colorFillAlter,border:`${Lt.lineWidth}px dashed ${Lt.colorBorder}`,borderRadius:Lt.borderRadiusLG,cursor:"pointer",transition:`border-color ${Lt.motionDurationSlow}`,[wt]:{padding:`${Lt.padding}px 0`},[`${wt}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${wt}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${wt}-disabled):hover`]:{borderColor:Lt.colorPrimaryHover},[`p${wt}-drag-icon`]:{marginBottom:Lt.margin,[Ot]:{color:Lt.colorPrimary,fontSize:Lt.uploadThumbnailSize}},[`p${wt}-text`]:{margin:`0 0 ${Lt.marginXXS}px`,color:Lt.colorTextHeading,fontSize:Lt.fontSizeLG},[`p${wt}-hint`]:{color:Lt.colorTextDescription,fontSize:Lt.fontSize},[`&${wt}-disabled`]:{cursor:"not-allowed",[`p${wt}-drag-icon ${Ot},
p${wt}-text,
p${wt}-hint
`]:{color:Lt.colorTextDisabled}}}}}},Li=Lt=>{const{componentCls:wt,antCls:Ot,iconCls:Dn,fontSize:er,lineHeight:An}=Lt,Rn=`${wt}-list-item`,Nn=`${Rn}-actions`,rr=`${Rn}-action`,Dr=Math.round(er*An);return{[`${wt}-wrapper`]:{[`${wt}-list`]:Object.assign(Object.assign({},(0,ei.dF)()),{lineHeight:Lt.lineHeight,[Rn]:{position:"relative",height:Lt.lineHeight*er,marginTop:Lt.marginXS,fontSize:er,display:"flex",alignItems:"center",transition:`background-color ${Lt.motionDurationSlow}`,"&:hover":{backgroundColor:Lt.controlItemBgHover},[`${Rn}-name`]:Object.assign(Object.assign({},ei.vS),{padding:`0 ${Lt.paddingXS}px`,lineHeight:An,flex:"auto",transition:`all ${Lt.motionDurationSlow}`}),[Nn]:{[rr]:{opacity:0},[`${rr}${Ot}-btn-sm`]:{height:Dr,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
${rr}:focus-visible,
&.picture ${rr}
`]:{opacity:1},[Dn]:{color:Lt.actionsColor,transition:`all ${Lt.motionDurationSlow}`},[`&:hover ${Dn}`]:{color:Lt.colorText}},[`${wt}-icon ${Dn}`]:{color:Lt.colorTextDescription,fontSize:er},[`${Rn}-progress`]:{position:"absolute",bottom:-Lt.uploadProgressOffset,width:"100%",paddingInlineStart:er+Lt.paddingXS,fontSize:er,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Rn}:hover ${rr}`]:{opacity:1,color:Lt.colorText},[`${Rn}-error`]:{color:Lt.colorError,[`${Rn}-name, ${wt}-icon ${Dn}`]:{color:Lt.colorError},[Nn]:{[`${Dn}, ${Dn}:hover`]:{color:Lt.colorError},[rr]:{opacity:1}}},[`${wt}-list-item-container`]:{transition:`opacity ${Lt.motionDurationSlow}, height ${Lt.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Dt=ae(34367),Hn=ae(16932);const Vn=new Dt.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Gn=new Dt.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var yr=Lt=>{const{componentCls:wt}=Lt,Ot=`${wt}-animate-inline`;return[{[`${wt}-wrapper`]:{[`${Ot}-appear, ${Ot}-enter, ${Ot}-leave`]:{animationDuration:Lt.motionDurationSlow,animationTimingFunction:Lt.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Ot}-appear, ${Ot}-enter`]:{animationName:Vn},[`${Ot}-leave`]:{animationName:Gn}}},{[`${wt}-wrapper`]:(0,Hn.J$)(Lt)},Vn,Gn]},Pr=ae(16397),nr=ae(84780);const ot=Lt=>{const{componentCls:wt,iconCls:Ot,uploadThumbnailSize:Dn,uploadProgressOffset:er}=Lt,An=`${wt}-list`,Rn=`${An}-item`;return{[`${wt}-wrapper`]:{[`
${An}${An}-picture,
${An}${An}-picture-card,
${An}${An}-picture-circle
`]:{[Rn]:{position:"relative",height:Dn+Lt.lineWidth*2+Lt.paddingXS*2,padding:Lt.paddingXS,border:`${Lt.lineWidth}px ${Lt.lineType} ${Lt.colorBorder}`,borderRadius:Lt.borderRadiusLG,"&:hover":{background:"transparent"},[`${Rn}-thumbnail`]:Object.assign(Object.assign({},ei.vS),{width:Dn,height:Dn,lineHeight:`${Dn+Lt.paddingSM}px`,textAlign:"center",flex:"none",[Ot]:{fontSize:Lt.fontSizeHeading2,color:Lt.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Rn}-progress`]:{bottom:er,width:`calc(100% - ${Lt.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Dn+Lt.paddingXS}},[`${Rn}-error`]:{borderColor:Lt.colorError,[`${Rn}-thumbnail ${Ot}`]:{[`svg path[fill='${Pr.blue[0]}']`]:{fill:Lt.colorErrorBg},[`svg path[fill='${Pr.blue.primary}']`]:{fill:Lt.colorError}}},[`${Rn}-uploading`]:{borderStyle:"dashed",[`${Rn}-name`]:{marginBottom:er}}},[`${An}${An}-picture-circle ${Rn}`]:{[`&, &::before, ${Rn}-thumbnail`]:{borderRadius:"50%"}}}}},Ct=Lt=>{const{componentCls:wt,iconCls:Ot,fontSizeLG:Dn,colorTextLightSolid:er}=Lt,An=`${wt}-list`,Rn=`${An}-item`,Nn=Lt.uploadPicCardSize;return{[`
${wt}-wrapper${wt}-picture-card-wrapper,
${wt}-wrapper${wt}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,ei.dF)()),{display:"inline-block",width:"100%",[`${wt}${wt}-select`]:{width:Nn,height:Nn,marginInlineEnd:Lt.marginXS,marginBottom:Lt.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:Lt.colorFillAlter,border:`${Lt.lineWidth}px dashed ${Lt.colorBorder}`,borderRadius:Lt.borderRadiusLG,cursor:"pointer",transition:`border-color ${Lt.motionDurationSlow}`,[`> ${wt}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${wt}-disabled):hover`]:{borderColor:Lt.colorPrimary}},[`${An}${An}-picture-card, ${An}${An}-picture-circle`]:{[`${An}-item-container`]:{display:"inline-block",width:Nn,height:Nn,marginBlock:`0 ${Lt.marginXS}px`,marginInline:`0 ${Lt.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Rn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${Lt.paddingXS*2}px)`,height:`calc(100% - ${Lt.paddingXS*2}px)`,backgroundColor:Lt.colorBgMask,opacity:0,transition:`all ${Lt.motionDurationSlow}`,content:'" "'}},[`${Rn}:hover`]:{[`&::before, ${Rn}-actions`]:{opacity:1}},[`${Rn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${Lt.motionDurationSlow}`,[`${Ot}-eye, ${Ot}-download, ${Ot}-delete`]:{zIndex:10,width:Dn,margin:`0 ${Lt.marginXXS}px`,fontSize:Dn,cursor:"pointer",transition:`all ${Lt.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${Rn}-actions, ${Rn}-actions:hover`]:{[`${Ot}-eye, ${Ot}-download, ${Ot}-delete`]:{color:new nr.C(er).setAlpha(.65).toRgbString(),"&:hover":{color:er}}},[`${Rn}-thumbnail, ${Rn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Rn}-name`]:{display:"none",textAlign:"center"},[`${Rn}-file + ${Rn}-name`]:{position:"absolute",bottom:Lt.margin,display:"block",width:`calc(100% - ${Lt.paddingXS*2}px)`},[`${Rn}-uploading`]:{[`&${Rn}`]:{backgroundColor:Lt.colorFillAlter},[`&::before, ${Ot}-eye, ${Ot}-download, ${Ot}-delete`]:{display:"none"}},[`${Rn}-progress`]:{bottom:Lt.marginXL,width:`calc(100% - ${Lt.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${wt}-wrapper${wt}-picture-circle-wrapper`]:{[`${wt}${wt}-select`]:{borderRadius:"50%"}}}};var un=Lt=>{const{componentCls:wt}=Lt;return{[`${wt}-rtl`]:{direction:"rtl"}}};const Je=Lt=>{const{componentCls:wt,colorTextDisabled:Ot}=Lt;return{[`${wt}-wrapper`]:Object.assign(Object.assign({},(0,ei.Wf)(Lt)),{[wt]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${wt}-select`]:{display:"inline-block"},[`${wt}-disabled`]:{color:Ot,cursor:"not-allowed"}})}};var Mt=(0,kr.Z)("Upload",Lt=>{const{fontSizeHeading3:wt,fontSize:Ot,lineHeight:Dn,lineWidth:er,controlHeightLG:An}=Lt,Rn=Math.round(Ot*Dn),Nn=(0,Ti.TS)(Lt,{uploadThumbnailSize:wt*2,uploadProgressOffset:Rn/2+er,uploadPicCardSize:An*2.55});return[Je(Nn),ea(Nn),ot(Nn),Ct(Nn),Li(Nn),yr(Nn),un(Nn),(0,pi.Z)(Nn)]},Lt=>({actionsColor:Lt.colorTextDescription})),ln=function(Lt,wt,Ot,Dn){function er(An){return An instanceof Ot?An:new Ot(function(Rn){Rn(An)})}return new(Ot||(Ot=Promise))(function(An,Rn){function Nn(yn){try{Dr(Dn.next(yn))}catch(Si){Rn(Si)}}function rr(yn){try{Dr(Dn.throw(yn))}catch(Si){Rn(Si)}}function Dr(yn){yn.done?An(yn.value):er(yn.value).then(Nn,rr)}Dr((Dn=Dn.apply(Lt,wt||[])).next())})};const Jt=`__LIST_IGNORE_${Date.now()}__`,vn=(Lt,wt)=>{const{fileList:Ot,defaultFileList:Dn,onRemove:er,showUploadList:An=!0,listType:Rn="text",onPreview:Nn,onDownload:rr,onChange:Dr,onDrop:yn,previewFile:Si,disabled:di,locale:ha,iconRender:ta,isImageUrl:Wi,progress:Ta,prefixCls:Gi,className:$i,type:ra="select",children:Ma,style:vi,itemRender:Zi,maxCount:xa,data:Ya={},multiple:Ba=!1,action:ki="",accept:Rt="",supportServerRender:Tt=!0,rootClassName:mn}=Lt,$n=fe.useContext(Xe.Z),Qn=di!=null?di:$n,[Or,Gr]=(0,qt.Z)(Dn||[],{value:Ot,postState:He=>He!=null?He:[]}),[ci,gi]=fe.useState("drop"),li=fe.useRef(null);fe.useMemo(()=>{const He=Date.now();(Ot||[]).forEach((Ge,Ft)=>{!Ge.uid&&!Object.isFrozen(Ge)&&(Ge.uid=`__AUTO__${He}_${Ft}__`)})},[Ot]);const Mi=(He,Ge,Ft)=>{let Et=(0,Fe.Z)(Ge),dn=!1;xa===1?Et=Et.slice(-1):xa&&(dn=Et.length>xa,Et=Et.slice(0,xa)),(0,pn.flushSync)(()=>{Gr(Et)});const In={file:He,fileList:Et};Ft&&(In.event=Ft),(!dn||Et.some(zn=>zn.uid===He.uid))&&(0,pn.flushSync)(()=>{Dr==null||Dr(In)})},Vi=(He,Ge)=>ln(void 0,void 0,void 0,function*(){const{beforeUpload:Ft,transformFile:Et}=Lt;let dn=He;if(Ft){const In=yield Ft(He,Ge);if(In===!1)return!1;if(delete He[Jt],In===Jt)return Object.defineProperty(He,Jt,{value:!0,configurable:!0}),!1;typeof In=="object"&&In&&(dn=In)}return Et&&(dn=yield Et(dn)),dn}),Yr=He=>{const Ge=He.filter(dn=>!dn.file[Jt]);if(!Ge.length)return;const Ft=Ge.map(dn=>$t(dn.file));let Et=(0,Fe.Z)(Or);Ft.forEach(dn=>{Et=Ht(dn,Et)}),Ft.forEach((dn,In)=>{let zn=dn;if(Ge[In].parsedFile)dn.status="uploading";else{const{originFileObj:or}=dn;let jn;try{jn=new File([or],or.name,{type:or.type})}catch(_n){jn=new Blob([or],{type:or.type}),jn.name=or.name,jn.lastModifiedDate=new Date,jn.lastModified=new Date().getTime()}jn.uid=dn.uid,zn=jn}Mi(zn,Et)})},Fi=(He,Ge,Ft)=>{try{typeof He=="string"&&(He=JSON.parse(He))}catch(In){}if(!Xt(Ge,Or))return;const Et=$t(Ge);Et.status="done",Et.percent=100,Et.response=He,Et.xhr=Ft;const dn=Ht(Et,Or);Mi(Et,dn)},sa=(He,Ge)=>{if(!Xt(Ge,Or))return;const Ft=$t(Ge);Ft.status="uploading",Ft.percent=He.percent;const Et=Ht(Ft,Or);Mi(Ft,Et,He)},Yi=(He,Ge,Ft)=>{if(!Xt(Ft,Or))return;const Et=$t(Ft);Et.error=He,Et.response=Ge,Et.status="error";const dn=Ht(Et,Or);Mi(Et,dn)},Oe=He=>{let Ge;Promise.resolve(typeof er=="function"?er(He):er).then(Ft=>{var Et;if(Ft===!1)return;const dn=jt(He,Or);dn&&(Ge=Object.assign(Object.assign({},He),{status:"removed"}),Or==null||Or.forEach(In=>{const zn=Ge.uid!==void 0?"uid":"name";In[zn]===Ge[zn]&&!Object.isFrozen(In)&&(In.status="removed")}),(Et=li.current)===null||Et===void 0||Et.abort(Ge),Mi(Ge,dn))})},Ve=He=>{gi(He.type),He.type==="drop"&&(yn==null||yn(He))};fe.useImperativeHandle(wt,()=>({onBatchStart:Yr,onSuccess:Fi,onProgress:sa,onError:Yi,fileList:Or,upload:li.current}));const{getPrefixCls:Ue,direction:qe,upload:vt}=fe.useContext(cn.E_),St=Ue("upload",Gi),Nt=Object.assign(Object.assign({onBatchStart:Yr,onError:Yi,onProgress:sa,onSuccess:Fi},Lt),{data:Ya,multiple:Ba,action:ki,accept:Rt,supportServerRender:Tt,prefixCls:St,disabled:Qn,beforeUpload:Vi,onChange:void 0});delete Nt.className,delete Nt.style,(!Ma||Qn)&&delete Nt.id;const[wn,Ln]=Mt(St),[br]=(0,Me.Z)("Upload",mt.Z.Upload),{showRemoveIcon:Br,showPreviewIcon:hr,showDownloadIcon:Wn,removeIcon:Tn,previewIcon:Jn,downloadIcon:ar}=typeof An=="boolean"?{}:An,$r=(He,Ge)=>An?fe.createElement(Zr,{prefixCls:St,listType:Rn,items:Or,previewFile:Si,onPreview:Nn,onDownload:rr,onRemove:Oe,showRemoveIcon:!Qn&&Br,showPreviewIcon:hr,showDownloadIcon:Wn,removeIcon:Tn,previewIcon:Jn,downloadIcon:ar,iconRender:ta,locale:Object.assign(Object.assign({},br),ha),isImageUrl:Wi,progress:Ta,appendAction:He,appendActionVisible:Ge,itemRender:Zi,disabled:Qn}):He,mr=Ye()(`${St}-wrapper`,$i,mn,Ln,vt==null?void 0:vt.className,{[`${St}-rtl`]:qe==="rtl",[`${St}-picture-card-wrapper`]:Rn==="picture-card",[`${St}-picture-circle-wrapper`]:Rn==="picture-circle"}),gr=Object.assign(Object.assign({},vt==null?void 0:vt.style),vi);if(ra==="drag"){const He=Ye()(Ln,St,`${St}-drag`,{[`${St}-drag-uploading`]:Or.some(Ge=>Ge.status==="uploading"),[`${St}-drag-hover`]:ci==="dragover",[`${St}-disabled`]:Qn,[`${St}-rtl`]:qe==="rtl"});return wn(fe.createElement("span",{className:mr},fe.createElement("div",{className:He,style:gr,onDrop:Ve,onDragOver:Ve,onDragLeave:Ve},fe.createElement(rt,Object.assign({},Nt,{ref:li,className:`${St}-btn`}),fe.createElement("div",{className:`${St}-drag-container`},Ma))),$r()))}const Cr=Ye()(St,`${St}-select`,{[`${St}-disabled`]:Qn}),Fr=(He=>fe.createElement("div",{className:Cr,style:He},fe.createElement(rt,Object.assign({},Nt,{ref:li}))))(Ma?void 0:{display:"none"});return wn(Rn==="picture-card"||Rn==="picture-circle"?fe.createElement("span",{className:mr},$r(Fr,!!Ma)):fe.createElement("span",{className:mr},Fr,$r()))};var Fn=fe.forwardRef(vn),Nr=function(Lt,wt){var Ot={};for(var Dn in Lt)Object.prototype.hasOwnProperty.call(Lt,Dn)&&wt.indexOf(Dn)<0&&(Ot[Dn]=Lt[Dn]);if(Lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var er=0,Dn=Object.getOwnPropertySymbols(Lt);er<Dn.length;er++)wt.indexOf(Dn[er])<0&&Object.prototype.propertyIsEnumerable.call(Lt,Dn[er])&&(Ot[Dn[er]]=Lt[Dn[er]]);return Ot},vr=fe.forwardRef((Lt,wt)=>{var{style:Ot,height:Dn}=Lt,er=Nr(Lt,["style","height"]);return fe.createElement(Fn,Object.assign({ref:wt},er,{type:"drag",style:Object.assign(Object.assign({},Ot),{height:Dn})}))});const Ir=Fn;Ir.Dragger=vr,Ir.LIST_IGNORE=Jt;var _r=Ir},97909:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";var Vt=1e3,ae=6e4,fe=36e5,Fe="millisecond",Be="second",Ye="minute",ve="hour",Ce="day",_e="week",we="month",ge="quarter",Te="year",ft="date",Re="Invalid Date",bt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ht=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,st={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ct){var lt=["th","st","nd","rd"],Ze=ct%100;return"["+ct+(lt[(Ze-20)%10]||lt[Ze]||lt[0])+"]"}},tt=function(ct,lt,Ze){var kt=String(ct);return!kt||kt.length>=lt?ct:""+Array(lt+1-kt.length).join(Ze)+ct},Le={s:tt,z:function(ct){var lt=-ct.utcOffset(),Ze=Math.abs(lt),kt=Math.floor(Ze/60),pt=Ze%60;return(lt<=0?"+":"-")+tt(kt,2,"0")+":"+tt(pt,2,"0")},m:function ct(lt,Ze){if(lt.date()<Ze.date())return-ct(Ze,lt);var kt=12*(Ze.year()-lt.year())+(Ze.month()-lt.month()),pt=lt.clone().add(kt,we),nn=Ze-pt<0,rt=lt.clone().add(kt+(nn?-1:1),we);return+(-(kt+(Ze-pt)/(nn?pt-rt:rt-pt))||0)},a:function(ct){return ct<0?Math.ceil(ct)||0:Math.floor(ct)},p:function(ct){return{M:we,y:Te,w:_e,d:Ce,D:ft,h:ve,m:Ye,s:Be,ms:Fe,Q:ge}[ct]||String(ct||"").toLowerCase().replace(/s$/,"")},u:function(ct){return ct===void 0}},xt="en",on={};on[xt]=st;var it="$isDayjsObject",yt=function(ct){return ct instanceof ze||!(!ct||!ct[it])},Ee=function ct(lt,Ze,kt){var pt;if(!lt)return xt;if(typeof lt=="string"){var nn=lt.toLowerCase();on[nn]&&(pt=nn),Ze&&(on[nn]=Ze,pt=nn);var rt=lt.split("-");if(!pt&&rt.length>1)return ct(rt[0])}else{var qt=lt.name;on[qt]=lt,pt=qt}return!kt&&pt&&(xt=pt),pt||!kt&&xt},de=function(ct,lt){if(yt(ct))return ct.clone();var Ze=typeof lt=="object"?lt:{};return Ze.date=ct,Ze.args=arguments,new ze(Ze)},je=Le;je.l=Ee,je.i=yt,je.w=function(ct,lt){return de(ct,{locale:lt.$L,utc:lt.$u,x:lt.$x,$offset:lt.$offset})};var ze=function(){function ct(Ze){this.$L=Ee(Ze.locale,null,!0),this.parse(Ze),this.$x=this.$x||Ze.x||{},this[it]=!0}var lt=ct.prototype;return lt.parse=function(Ze){this.$d=function(kt){var pt=kt.date,nn=kt.utc;if(pt===null)return new Date(NaN);if(je.u(pt))return new Date;if(pt instanceof Date)return new Date(pt);if(typeof pt=="string"&&!/Z$/i.test(pt)){var rt=pt.match(bt);if(rt){var qt=rt[2]-1||0,pn=(rt[7]||"0").substring(0,3);return nn?new Date(Date.UTC(rt[1],qt,rt[3]||1,rt[4]||0,rt[5]||0,rt[6]||0,pn)):new Date(rt[1],qt,rt[3]||1,rt[4]||0,rt[5]||0,rt[6]||0,pn)}}return new Date(pt)}(Ze),this.init()},lt.init=function(){var Ze=this.$d;this.$y=Ze.getFullYear(),this.$M=Ze.getMonth(),this.$D=Ze.getDate(),this.$W=Ze.getDay(),this.$H=Ze.getHours(),this.$m=Ze.getMinutes(),this.$s=Ze.getSeconds(),this.$ms=Ze.getMilliseconds()},lt.$utils=function(){return je},lt.isValid=function(){return this.$d.toString()!==Re},lt.isSame=function(Ze,kt){var pt=de(Ze);return this.startOf(kt)<=pt&&pt<=this.endOf(kt)},lt.isAfter=function(Ze,kt){return de(Ze)<this.startOf(kt)},lt.isBefore=function(Ze,kt){return this.endOf(kt)<de(Ze)},lt.$g=function(Ze,kt,pt){return je.u(Ze)?this[kt]:this.set(pt,Ze)},lt.unix=function(){return Math.floor(this.valueOf()/1e3)},lt.valueOf=function(){return this.$d.getTime()},lt.startOf=function(Ze,kt){var pt=this,nn=!!je.u(kt)||kt,rt=je.p(Ze),qt=function(Qe,ut){var Yt=je.w(pt.$u?Date.UTC(pt.$y,ut,Qe):new Date(pt.$y,ut,Qe),pt);return nn?Yt:Yt.endOf(Ce)},pn=function(Qe,ut){return je.w(pt.toDate()[Qe].apply(pt.toDate("s"),(nn?[0,0,0,0]:[23,59,59,999]).slice(ut)),pt)},cn=this.$W,Xe=this.$M,Me=this.$D,mt="set"+(this.$u?"UTC":"");switch(rt){case Te:return nn?qt(1,0):qt(31,11);case we:return nn?qt(1,Xe):qt(0,Xe+1);case _e:var Gt=this.$locale().weekStart||0,hn=(cn<Gt?cn+7:cn)-Gt;return qt(nn?Me-hn:Me+(6-hn),Xe);case Ce:case ft:return pn(mt+"Hours",0);case ve:return pn(mt+"Minutes",1);case Ye:return pn(mt+"Seconds",2);case Be:return pn(mt+"Milliseconds",3);default:return this.clone()}},lt.endOf=function(Ze){return this.startOf(Ze,!1)},lt.$set=function(Ze,kt){var pt,nn=je.p(Ze),rt="set"+(this.$u?"UTC":""),qt=(pt={},pt[Ce]=rt+"Date",pt[ft]=rt+"Date",pt[we]=rt+"Month",pt[Te]=rt+"FullYear",pt[ve]=rt+"Hours",pt[Ye]=rt+"Minutes",pt[Be]=rt+"Seconds",pt[Fe]=rt+"Milliseconds",pt)[nn],pn=nn===Ce?this.$D+(kt-this.$W):kt;if(nn===we||nn===Te){var cn=this.clone().set(ft,1);cn.$d[qt](pn),cn.init(),this.$d=cn.set(ft,Math.min(this.$D,cn.daysInMonth())).$d}else qt&&this.$d[qt](pn);return this.init(),this},lt.set=function(Ze,kt){return this.clone().$set(Ze,kt)},lt.get=function(Ze){return this[je.p(Ze)]()},lt.add=function(Ze,kt){var pt,nn=this;Ze=Number(Ze);var rt=je.p(kt),qt=function(Xe){var Me=de(nn);return je.w(Me.date(Me.date()+Math.round(Xe*Ze)),nn)};if(rt===we)return this.set(we,this.$M+Ze);if(rt===Te)return this.set(Te,this.$y+Ze);if(rt===Ce)return qt(1);if(rt===_e)return qt(7);var pn=(pt={},pt[Ye]=ae,pt[ve]=fe,pt[Be]=Vt,pt)[rt]||1,cn=this.$d.getTime()+Ze*pn;return je.w(cn,this)},lt.subtract=function(Ze,kt){return this.add(-1*Ze,kt)},lt.format=function(Ze){var kt=this,pt=this.$locale();if(!this.isValid())return pt.invalidDate||Re;var nn=Ze||"YYYY-MM-DDTHH:mm:ssZ",rt=je.z(this),qt=this.$H,pn=this.$m,cn=this.$M,Xe=pt.weekdays,Me=pt.months,mt=pt.meridiem,Gt=function(ut,Yt,Qt,tn){return ut&&(ut[Yt]||ut(kt,nn))||Qt[Yt].slice(0,tn)},hn=function(ut){return je.s(qt%12||12,ut,"0")},Qe=mt||function(ut,Yt,Qt){var tn=ut<12?"AM":"PM";return Qt?tn.toLowerCase():tn};return nn.replace(ht,function(ut,Yt){return Yt||function(Qt){switch(Qt){case"YY":return String(kt.$y).slice(-2);case"YYYY":return je.s(kt.$y,4,"0");case"M":return cn+1;case"MM":return je.s(cn+1,2,"0");case"MMM":return Gt(pt.monthsShort,cn,Me,3);case"MMMM":return Gt(Me,cn);case"D":return kt.$D;case"DD":return je.s(kt.$D,2,"0");case"d":return String(kt.$W);case"dd":return Gt(pt.weekdaysMin,kt.$W,Xe,2);case"ddd":return Gt(pt.weekdaysShort,kt.$W,Xe,3);case"dddd":return Xe[kt.$W];case"H":return String(qt);case"HH":return je.s(qt,2,"0");case"h":return hn(1);case"hh":return hn(2);case"a":return Qe(qt,pn,!0);case"A":return Qe(qt,pn,!1);case"m":return String(pn);case"mm":return je.s(pn,2,"0");case"s":return String(kt.$s);case"ss":return je.s(kt.$s,2,"0");case"SSS":return je.s(kt.$ms,3,"0");case"Z":return rt}return null}(ut)||rt.replace(":","")})},lt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},lt.diff=function(Ze,kt,pt){var nn,rt=this,qt=je.p(kt),pn=de(Ze),cn=(pn.utcOffset()-this.utcOffset())*ae,Xe=this-pn,Me=function(){return je.m(rt,pn)};switch(qt){case Te:nn=Me()/12;break;case we:nn=Me();break;case ge:nn=Me()/3;break;case _e:nn=(Xe-cn)/6048e5;break;case Ce:nn=(Xe-cn)/864e5;break;case ve:nn=Xe/fe;break;case Ye:nn=Xe/ae;break;case Be:nn=Xe/Vt;break;default:nn=Xe}return pt?nn:je.a(nn)},lt.daysInMonth=function(){return this.endOf(we).$D},lt.$locale=function(){return on[this.$L]},lt.locale=function(Ze,kt){if(!Ze)return this.$L;var pt=this.clone(),nn=Ee(Ze,kt,!0);return nn&&(pt.$L=nn),pt},lt.clone=function(){return je.w(this.$d,this)},lt.toDate=function(){return new Date(this.valueOf())},lt.toJSON=function(){return this.isValid()?this.toISOString():null},lt.toISOString=function(){return this.$d.toISOString()},lt.toString=function(){return this.$d.toUTCString()},ct}(),At=ze.prototype;return de.prototype=At,[["$ms",Fe],["$s",Be],["$m",Ye],["$H",ve],["$W",Ce],["$M",we],["$y",Te],["$D",ft]].forEach(function(ct){At[ct[1]]=function(lt){return this.$g(lt,ct[0],ct[1])}}),de.extend=function(ct,lt){return ct.$i||(ct(lt,ze,de),ct.$i=!0),de},de.locale=Ee,de.isDayjs=yt,de.unix=function(ct){return de(1e3*ct)},de.en=on[xt],de.Ls=on,de.p={},de})},86625:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";return function(Vt,ae){var fe=ae.prototype,Fe=fe.format;fe.format=function(Be){var Ye=this,ve=this.$locale();if(!this.isValid())return Fe.bind(this)(Be);var Ce=this.$utils(),_e=(Be||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(we){switch(we){case"Q":return Math.ceil((Ye.$M+1)/3);case"Do":return ve.ordinal(Ye.$D);case"gggg":return Ye.weekYear();case"GGGG":return Ye.isoWeekYear();case"wo":return ve.ordinal(Ye.week(),"W");case"w":case"ww":return Ce.s(Ye.week(),we==="w"?1:2,"0");case"W":case"WW":return Ce.s(Ye.isoWeek(),we==="W"?1:2,"0");case"k":case"kk":return Ce.s(String(Ye.$H===0?24:Ye.$H),we==="k"?1:2,"0");case"X":return Math.floor(Ye.$d.getTime()/1e3);case"x":return Ye.$d.getTime();case"z":return"["+Ye.offsetName()+"]";case"zzz":return"["+Ye.offsetName("long")+"]";default:return we}});return Fe.bind(this)(_e)}}})},40618:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";var Vt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},ae=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,fe=/\d\d/,Fe=/\d\d?/,Be=/\d*[^-_:/,()\s\d]+/,Ye={},ve=function(Re){return(Re=+Re)+(Re>68?1900:2e3)},Ce=function(Re){return function(bt){this[Re]=+bt}},_e=[/[+-]\d\d:?(\d\d)?|Z/,function(Re){(this.zone||(this.zone={})).offset=function(bt){if(!bt||bt==="Z")return 0;var ht=bt.match(/([+-]|\d\d)/g),st=60*ht[1]+(+ht[2]||0);return st===0?0:ht[0]==="+"?-st:st}(Re)}],we=function(Re){var bt=Ye[Re];return bt&&(bt.indexOf?bt:bt.s.concat(bt.f))},ge=function(Re,bt){var ht,st=Ye.meridiem;if(st){for(var tt=1;tt<=24;tt+=1)if(Re.indexOf(st(tt,0,bt))>-1){ht=tt>12;break}}else ht=Re===(bt?"pm":"PM");return ht},Te={A:[Be,function(Re){this.afternoon=ge(Re,!1)}],a:[Be,function(Re){this.afternoon=ge(Re,!0)}],S:[/\d/,function(Re){this.milliseconds=100*+Re}],SS:[fe,function(Re){this.milliseconds=10*+Re}],SSS:[/\d{3}/,function(Re){this.milliseconds=+Re}],s:[Fe,Ce("seconds")],ss:[Fe,Ce("seconds")],m:[Fe,Ce("minutes")],mm:[Fe,Ce("minutes")],H:[Fe,Ce("hours")],h:[Fe,Ce("hours")],HH:[Fe,Ce("hours")],hh:[Fe,Ce("hours")],D:[Fe,Ce("day")],DD:[fe,Ce("day")],Do:[Be,function(Re){var bt=Ye.ordinal,ht=Re.match(/\d+/);if(this.day=ht[0],bt)for(var st=1;st<=31;st+=1)bt(st).replace(/\[|\]/g,"")===Re&&(this.day=st)}],M:[Fe,Ce("month")],MM:[fe,Ce("month")],MMM:[Be,function(Re){var bt=we("months"),ht=(we("monthsShort")||bt.map(function(st){return st.slice(0,3)})).indexOf(Re)+1;if(ht<1)throw new Error;this.month=ht%12||ht}],MMMM:[Be,function(Re){var bt=we("months").indexOf(Re)+1;if(bt<1)throw new Error;this.month=bt%12||bt}],Y:[/[+-]?\d+/,Ce("year")],YY:[fe,function(Re){this.year=ve(Re)}],YYYY:[/\d{4}/,Ce("year")],Z:_e,ZZ:_e};function ft(Re){var bt,ht;bt=Re,ht=Ye&&Ye.formats;for(var st=(Re=bt.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Ee,de,je){var ze=je&&je.toUpperCase();return de||ht[je]||Vt[je]||ht[ze].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(At,ct,lt){return ct||lt.slice(1)})})).match(ae),tt=st.length,Le=0;Le<tt;Le+=1){var xt=st[Le],on=Te[xt],it=on&&on[0],yt=on&&on[1];st[Le]=yt?{regex:it,parser:yt}:xt.replace(/^\[|\]$/g,"")}return function(Ee){for(var de={},je=0,ze=0;je<tt;je+=1){var At=st[je];if(typeof At=="string")ze+=At.length;else{var ct=At.regex,lt=At.parser,Ze=Ee.slice(ze),kt=ct.exec(Ze)[0];lt.call(de,kt),Ee=Ee.replace(kt,"")}}return function(pt){var nn=pt.afternoon;if(nn!==void 0){var rt=pt.hours;nn?rt<12&&(pt.hours+=12):rt===12&&(pt.hours=0),delete pt.afternoon}}(de),de}}return function(Re,bt,ht){ht.p.customParseFormat=!0,Re&&Re.parseTwoDigitYear&&(ve=Re.parseTwoDigitYear);var st=bt.prototype,tt=st.parse;st.parse=function(Le){var xt=Le.date,on=Le.utc,it=Le.args;this.$u=on;var yt=it[1];if(typeof yt=="string"){var Ee=it[2]===!0,de=it[3]===!0,je=Ee||de,ze=it[2];de&&(ze=it[2]),Ye=this.$locale(),!Ee&&ze&&(Ye=ht.Ls[ze]),this.$d=function(Ze,kt,pt){try{if(["x","X"].indexOf(kt)>-1)return new Date((kt==="X"?1e3:1)*Ze);var nn=ft(kt)(Ze),rt=nn.year,qt=nn.month,pn=nn.day,cn=nn.hours,Xe=nn.minutes,Me=nn.seconds,mt=nn.milliseconds,Gt=nn.zone,hn=new Date,Qe=pn||(rt||qt?1:hn.getDate()),ut=rt||hn.getFullYear(),Yt=0;rt&&!qt||(Yt=qt>0?qt-1:hn.getMonth());var Qt=cn||0,tn=Xe||0,_t=Me||0,en=mt||0;return Gt?new Date(Date.UTC(ut,Yt,Qe,Qt,tn,_t,en+60*Gt.offset*1e3)):pt?new Date(Date.UTC(ut,Yt,Qe,Qt,tn,_t,en)):new Date(ut,Yt,Qe,Qt,tn,_t,en)}catch(Cn){return new Date("")}}(xt,yt,on),this.init(),ze&&ze!==!0&&(this.$L=this.locale(ze).$L),je&&xt!=this.format(yt)&&(this.$d=new Date("")),Ye={}}else if(yt instanceof Array)for(var At=yt.length,ct=1;ct<=At;ct+=1){it[1]=yt[ct-1];var lt=ht.apply(this,it);if(lt.isValid()){this.$d=lt.$d,this.$L=lt.$L,this.init();break}ct===At&&(this.$d=new Date(""))}else tt.call(this,Le)}}})},26850:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";return function(Vt,ae,fe){var Fe=ae.prototype,Be=function(we){return we&&(we.indexOf?we:we.s)},Ye=function(we,ge,Te,ft,Re){var bt=we.name?we:we.$locale(),ht=Be(bt[ge]),st=Be(bt[Te]),tt=ht||st.map(function(xt){return xt.slice(0,ft)});if(!Re)return tt;var Le=bt.weekStart;return tt.map(function(xt,on){return tt[(on+(Le||0))%7]})},ve=function(){return fe.Ls[fe.locale()]},Ce=function(we,ge){return we.formats[ge]||function(Te){return Te.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ft,Re,bt){return Re||bt.slice(1)})}(we.formats[ge.toUpperCase()])},_e=function(){var we=this;return{months:function(ge){return ge?ge.format("MMMM"):Ye(we,"months")},monthsShort:function(ge){return ge?ge.format("MMM"):Ye(we,"monthsShort","months",3)},firstDayOfWeek:function(){return we.$locale().weekStart||0},weekdays:function(ge){return ge?ge.format("dddd"):Ye(we,"weekdays")},weekdaysMin:function(ge){return ge?ge.format("dd"):Ye(we,"weekdaysMin","weekdays",2)},weekdaysShort:function(ge){return ge?ge.format("ddd"):Ye(we,"weekdaysShort","weekdays",3)},longDateFormat:function(ge){return Ce(we.$locale(),ge)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};Fe.localeData=function(){return _e.bind(this)()},fe.localeData=function(){var we=ve();return{firstDayOfWeek:function(){return we.weekStart||0},weekdays:function(){return fe.weekdays()},weekdaysShort:function(){return fe.weekdaysShort()},weekdaysMin:function(){return fe.weekdaysMin()},months:function(){return fe.months()},monthsShort:function(){return fe.monthsShort()},longDateFormat:function(ge){return Ce(we,ge)},meridiem:we.meridiem,ordinal:we.ordinal}},fe.months=function(){return Ye(ve(),"months")},fe.monthsShort=function(){return Ye(ve(),"monthsShort","months",3)},fe.weekdays=function(we){return Ye(ve(),"weekdays",null,null,we)},fe.weekdaysShort=function(we){return Ye(ve(),"weekdaysShort","weekdays",3,we)},fe.weekdaysMin=function(we){return Ye(ve(),"weekdaysMin","weekdays",2,we)}}})},23082:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";var Vt="week",ae="year";return function(fe,Fe,Be){var Ye=Fe.prototype;Ye.week=function(ve){if(ve===void 0&&(ve=null),ve!==null)return this.add(7*(ve-this.week()),"day");var Ce=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var _e=Be(this).startOf(ae).add(1,ae).date(Ce),we=Be(this).endOf(Vt);if(_e.isBefore(we))return 1}var ge=Be(this).startOf(ae).date(Ce).startOf(Vt).subtract(1,"millisecond"),Te=this.diff(ge,Vt,!0);return Te<0?Be(this).startOf("week").week():Math.ceil(Te)},Ye.weeks=function(ve){return ve===void 0&&(ve=null),this.week(ve)}}})},99873:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";return function(Vt,ae){ae.prototype.weekYear=function(){var fe=this.month(),Fe=this.week(),Be=this.year();return Fe===1&&fe===11?Be+1:fe===0&&Fe>=52?Be-1:Be}}})},33088:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";return function(Vt,ae){ae.prototype.weekday=function(fe){var Fe=this.$locale().weekStart||0,Be=this.$W,Ye=(Be<Fe?Be+7:Be)-Fe;return this.$utils().u(fe)?Ye:this.subtract(Ye,"day").add(fe,"day")}}})},72665:function(kn,Vt){"use strict";var ae;var fe=typeof Symbol=="function"&&Symbol.for,Fe=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Ye=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Ce=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Te=fe?Symbol.for("react.concurrent_mode"):60111,ft=fe?Symbol.for("react.forward_ref"):60112,Re=fe?Symbol.for("react.suspense"):60113,bt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,st=fe?Symbol.for("react.lazy"):60116,tt=fe?Symbol.for("react.block"):60121,Le=fe?Symbol.for("react.fundamental"):60117,xt=fe?Symbol.for("react.responder"):60118,on=fe?Symbol.for("react.scope"):60119;function it(Ee){if(typeof Ee=="object"&&Ee!==null){var de=Ee.$$typeof;switch(de){case Fe:switch(Ee=Ee.type,Ee){case ge:case Te:case Ye:case Ce:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case ft:case st:case ht:case _e:return Ee;default:return de}}case Be:return de}}}function yt(Ee){return it(Ee)===Te}ae=ge,ae=Te,ae=we,ae=_e,ae=Fe,ae=ft,ae=Ye,ae=st,ae=ht,ae=Be,ae=Ce,ae=ve,ae=Re,ae=function(Ee){return yt(Ee)||it(Ee)===ge},ae=yt,ae=function(Ee){return it(Ee)===we},ae=function(Ee){return it(Ee)===_e},ae=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Fe},ae=function(Ee){return it(Ee)===ft},ae=function(Ee){return it(Ee)===Ye},ae=function(Ee){return it(Ee)===st},Vt.isMemo=function(Ee){return it(Ee)===ht},ae=function(Ee){return it(Ee)===Be},ae=function(Ee){return it(Ee)===Ce},ae=function(Ee){return it(Ee)===ve},ae=function(Ee){return it(Ee)===Re},ae=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ye||Ee===Te||Ee===Ce||Ee===ve||Ee===Re||Ee===bt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===st||Ee.$$typeof===ht||Ee.$$typeof===_e||Ee.$$typeof===we||Ee.$$typeof===ft||Ee.$$typeof===Le||Ee.$$typeof===xt||Ee.$$typeof===on||Ee.$$typeof===tt)},ae=it},12060:function(kn,Vt,ae){"use strict";kn.exports=ae(72665)},41771:function(kn,Vt){"use strict";var ae;var fe=typeof Symbol=="function"&&Symbol.for,Fe=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Ye=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Ce=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Te=fe?Symbol.for("react.concurrent_mode"):60111,ft=fe?Symbol.for("react.forward_ref"):60112,Re=fe?Symbol.for("react.suspense"):60113,bt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,st=fe?Symbol.for("react.lazy"):60116,tt=fe?Symbol.for("react.block"):60121,Le=fe?Symbol.for("react.fundamental"):60117,xt=fe?Symbol.for("react.responder"):60118,on=fe?Symbol.for("react.scope"):60119;function it(Ee){if(typeof Ee=="object"&&Ee!==null){var de=Ee.$$typeof;switch(de){case Fe:switch(Ee=Ee.type,Ee){case ge:case Te:case Ye:case Ce:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case ft:case st:case ht:case _e:return Ee;default:return de}}case Be:return de}}}function yt(Ee){return it(Ee)===Te}ae=ge,ae=Te,ae=we,ae=_e,ae=Fe,ae=ft,ae=Ye,ae=st,ae=ht,ae=Be,ae=Ce,ae=ve,ae=Re,ae=function(Ee){return yt(Ee)||it(Ee)===ge},ae=yt,ae=function(Ee){return it(Ee)===we},ae=function(Ee){return it(Ee)===_e},ae=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Fe},ae=function(Ee){return it(Ee)===ft},Vt.isFragment=function(Ee){return it(Ee)===Ye},ae=function(Ee){return it(Ee)===st},ae=function(Ee){return it(Ee)===ht},ae=function(Ee){return it(Ee)===Be},ae=function(Ee){return it(Ee)===Ce},ae=function(Ee){return it(Ee)===ve},ae=function(Ee){return it(Ee)===Re},ae=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ye||Ee===Te||Ee===Ce||Ee===ve||Ee===Re||Ee===bt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===st||Ee.$$typeof===ht||Ee.$$typeof===_e||Ee.$$typeof===we||Ee.$$typeof===ft||Ee.$$typeof===Le||Ee.$$typeof===xt||Ee.$$typeof===on||Ee.$$typeof===tt)},ae=it},47655:function(kn,Vt,ae){"use strict";kn.exports=ae(41771)},64701:function(kn,Vt,ae){"use strict";ae.r(Vt),ae.d(Vt,{ResizableTextArea:function(){return Gt},default:function(){return tn}});var fe=ae(87462),Fe=ae(1413),Be=ae(4942),Ye=ae(71002),ve=ae(97685),Ce=ae(45987),_e=ae(74902),we=ae(94184),ge=ae.n(we),Te=ae(67656),ft=ae(87887),Re=ae(67294);function bt(_t){var en=Re.useRef();en.current=_t;var Cn=Re.useCallback(function(){for(var On,$e=arguments.length,ce=new Array($e),le=0;le<$e;le++)ce[le]=arguments[le];return(On=en.current)===null||On===void 0?void 0:On.call.apply(On,[en].concat(ce))},[]);return Cn}function ht(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var st=ht()?Re.useLayoutEffect:Re.useEffect,tt=st,Le=function(en,Cn){var On=Re.useRef(!0);st(function(){if(!On.current)return en()},Cn),st(function(){return On.current=!1,function(){On.current=!0}},[])};function xt(_t){var en=Re.useRef(!1),Cn=Re.useState(_t),On=(0,ve.Z)(Cn,2),$e=On[0],ce=On[1];Re.useEffect(function(){return en.current=!1,function(){en.current=!0}},[]);function le(me,he){he&&en.current||ce(me)}return[$e,le]}function on(_t){return _t!==void 0}function it(_t,en){var Cn=en||{},On=Cn.defaultValue,$e=Cn.value,ce=Cn.onChange,le=Cn.postState,me=xt(function(){return on($e)?$e:on(On)?typeof On=="function"?On():On:typeof _t=="function"?_t():_t}),he=(0,ve.Z)(me,2),se=he[0],Ie=he[1],et=$e!==void 0?$e:se,$t=le?le(et):et,Ht=bt(ce),Xt=xt([et]),jt=(0,ve.Z)(Xt,2),rn=jt[0],qn=jt[1];Le(function(){var Bt=rn[0];se!==Bt&&Ht(se,Bt)},[rn]),Le(function(){on($e)||Ie($e)},[$e]);var lr=bt(function(Bt,Sn){Ie(Bt,Sn),qn([et],Sn)});return[$t,lr]}var yt=ae(48555),Ee=function(en){return+setTimeout(en,16)},de=function(en){return clearTimeout(en)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ee=function(en){return window.requestAnimationFrame(en)},de=function(en){return window.cancelAnimationFrame(en)});var je=0,ze=new Map;function At(_t){ze.delete(_t)}var ct=function(en){var Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;je+=1;var On=je;function $e(ce){if(ce===0)At(On),en();else{var le=Ee(function(){$e(ce-1)});ze.set(On,le)}}return $e(Cn),On};ct.cancel=function(_t){var en=ze.get(_t);return At(en),de(en)};var lt=ct,Ze=`
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;
`,kt=["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"],pt={},nn;function rt(_t){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Cn=_t.getAttribute("id")||_t.getAttribute("data-reactid")||_t.getAttribute("name");if(en&&pt[Cn])return pt[Cn];var On=window.getComputedStyle(_t),$e=On.getPropertyValue("box-sizing")||On.getPropertyValue("-moz-box-sizing")||On.getPropertyValue("-webkit-box-sizing"),ce=parseFloat(On.getPropertyValue("padding-bottom"))+parseFloat(On.getPropertyValue("padding-top")),le=parseFloat(On.getPropertyValue("border-bottom-width"))+parseFloat(On.getPropertyValue("border-top-width")),me=kt.map(function(se){return"".concat(se,":").concat(On.getPropertyValue(se))}).join(";"),he={sizingStyle:me,paddingSize:ce,borderSize:le,boxSizing:$e};return en&&Cn&&(pt[Cn]=he),he}function qt(_t){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Cn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,On=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;nn||(nn=document.createElement("textarea"),nn.setAttribute("tab-index","-1"),nn.setAttribute("aria-hidden","true"),document.body.appendChild(nn)),_t.getAttribute("wrap")?nn.setAttribute("wrap",_t.getAttribute("wrap")):nn.removeAttribute("wrap");var $e=rt(_t,en),ce=$e.paddingSize,le=$e.borderSize,me=$e.boxSizing,he=$e.sizingStyle;nn.setAttribute("style","".concat(he,";").concat(Ze)),nn.value=_t.value||_t.placeholder||"";var se=void 0,Ie=void 0,et,$t=nn.scrollHeight;if(me==="border-box"?$t+=le:me==="content-box"&&($t-=ce),Cn!==null||On!==null){nn.value=" ";var Ht=nn.scrollHeight-ce;Cn!==null&&(se=Ht*Cn,me==="border-box"&&(se=se+ce+le),$t=Math.max(se,$t)),On!==null&&(Ie=Ht*On,me==="border-box"&&(Ie=Ie+ce+le),et=$t>Ie?"":"hidden",$t=Math.min(Ie,$t))}var Xt={height:$t,overflowY:et,resize:"none"};return se&&(Xt.minHeight=se),Ie&&(Xt.maxHeight=Ie),Xt}var pn=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],cn=0,Xe=1,Me=2,mt=Re.forwardRef(function(_t,en){var Cn=_t,On=Cn.prefixCls,$e=Cn.onPressEnter,ce=Cn.defaultValue,le=Cn.value,me=Cn.autoSize,he=Cn.onResize,se=Cn.className,Ie=Cn.style,et=Cn.disabled,$t=Cn.onChange,Ht=Cn.onInternalAutoSize,Xt=(0,Ce.Z)(Cn,pn),jt=it(ce,{value:le,postState:function(Gn){return Gn!=null?Gn:""}}),rn=(0,ve.Z)(jt,2),qn=rn[0],lr=rn[1],Bt=function(Gn){lr(Gn.target.value),$t==null||$t(Gn)},Sn=Re.useRef();Re.useImperativeHandle(en,function(){return{textArea:Sn.current}});var dr=Re.useMemo(function(){return me&&(0,Ye.Z)(me)==="object"?[me.minRows,me.maxRows]:[]},[me]),Wr=(0,ve.Z)(dr,2),gt=Wr[0],sn=Wr[1],tr=!!me,Zn=function(){try{if(document.activeElement===Sn.current){var Gn=Sn.current,Lr=Gn.selectionStart,yr=Gn.selectionEnd,Pr=Gn.scrollTop;Sn.current.setSelectionRange(Lr,yr),Sn.current.scrollTop=Pr}}catch(nr){}},xr=Re.useState(Me),Kr=(0,ve.Z)(xr,2),Jr=Kr[0],Zr=Kr[1],ei=Re.useState(),pi=(0,ve.Z)(ei,2),kr=pi[0],Ti=pi[1],na=function(){Zr(cn)};tt(function(){tr&&na()},[le,gt,sn,tr]),tt(function(){if(Jr===cn)Zr(Xe);else if(Jr===Xe){var Vn=qt(Sn.current,!1,gt,sn);Zr(Me),Ti(Vn)}else Zn()},[Jr]);var ea=Re.useRef(),oa=function(){lt.cancel(ea.current)},Li=function(Gn){Jr===Me&&(he==null||he(Gn),me&&(oa(),ea.current=lt(function(){na()})))};Re.useEffect(function(){return oa},[]);var Dt=tr?kr:null,Hn=(0,Fe.Z)((0,Fe.Z)({},Ie),Dt);return(Jr===cn||Jr===Xe)&&(Hn.overflowY="hidden",Hn.overflowX="hidden"),Re.createElement(yt.Z,{onResize:Li,disabled:!(me||he)},Re.createElement("textarea",(0,fe.Z)({},Xt,{ref:Sn,style:Hn,className:ge()(On,se,(0,Be.Z)({},"".concat(On,"-disabled"),et)),disabled:et,value:qn,onChange:Bt})))}),Gt=mt,hn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Qe(_t,en){return(0,_e.Z)(_t||"").slice(0,en).join("")}function ut(_t,en,Cn,On){var $e=Cn;return _t?$e=Qe(Cn,On):(0,_e.Z)(en||"").length<Cn.length&&(0,_e.Z)(Cn||"").length>On&&($e=en),$e}var Yt=Re.forwardRef(function(_t,en){var Cn,On=_t.defaultValue,$e=_t.value,ce=_t.onFocus,le=_t.onBlur,me=_t.onChange,he=_t.allowClear,se=_t.maxLength,Ie=_t.onCompositionStart,et=_t.onCompositionEnd,$t=_t.suffix,Ht=_t.prefixCls,Xt=Ht===void 0?"rc-textarea":Ht,jt=_t.classes,rn=_t.showCount,qn=_t.className,lr=_t.style,Bt=_t.disabled,Sn=_t.hidden,dr=_t.classNames,Wr=_t.styles,gt=_t.onResize,sn=(0,Ce.Z)(_t,hn),tr=it(On,{value:$e,defaultValue:On}),Zn=(0,ve.Z)(tr,2),xr=Zn[0],Kr=Zn[1],Jr=(0,Re.useRef)(null),Zr=Re.useState(!1),ei=(0,ve.Z)(Zr,2),pi=ei[0],kr=ei[1],Ti=Re.useState(!1),na=(0,ve.Z)(Ti,2),ea=na[0],oa=na[1],Li=Re.useRef(),Dt=Re.useRef(0),Hn=Re.useState(null),Vn=(0,ve.Z)(Hn,2),Gn=Vn[0],Lr=Vn[1],yr=function(){var Ir;(Ir=Jr.current)===null||Ir===void 0||Ir.textArea.focus()};(0,Re.useImperativeHandle)(en,function(){return{resizableTextArea:Jr.current,focus:yr,blur:function(){var Ir;(Ir=Jr.current)===null||Ir===void 0||Ir.textArea.blur()}}}),(0,Re.useEffect)(function(){kr(function(vr){return!Bt&&vr})},[Bt]);var Pr=Number(se)>0,nr=function(Ir){oa(!0),Li.current=xr,Dt.current=Ir.currentTarget.selectionStart,Ie==null||Ie(Ir)},ot=function(Ir){oa(!1);var _r=Ir.currentTarget.value;if(Pr){var Lt,wt=Dt.current>=se+1||Dt.current===((Lt=Li.current)===null||Lt===void 0?void 0:Lt.length);_r=ut(wt,Li.current,_r,se)}_r!==xr&&(Kr(_r),(0,ft.rJ)(Ir.currentTarget,Ir,me,_r)),et==null||et(Ir)},Ct=function(Ir){var _r=Ir.target.value;if(!ea&&Pr){var Lt=Ir.target.selectionStart>=se+1||Ir.target.selectionStart===_r.length||!Ir.target.selectionStart;_r=ut(Lt,xr,_r,se)}Kr(_r),(0,ft.rJ)(Ir.currentTarget,Ir,me,_r)},zt=function(Ir){var _r=sn.onPressEnter,Lt=sn.onKeyDown;Ir.key==="Enter"&&_r&&_r(Ir),Lt==null||Lt(Ir)},un=function(Ir){kr(!0),ce==null||ce(Ir)},Je=function(Ir){kr(!1),le==null||le(Ir)},Mt=function(Ir){var _r;Kr(""),yr(),(0,ft.rJ)((_r=Jr.current)===null||_r===void 0?void 0:_r.textArea,Ir,me)},ln=(0,ft.D7)(xr);!ea&&Pr&&$e==null&&(ln=Qe(ln,se));var Jt=$t,vn;if(rn){var bn=(0,_e.Z)(ln).length;(0,Ye.Z)(rn)==="object"?vn=rn.formatter({value:ln,count:bn,maxLength:se}):vn="".concat(bn).concat(Pr?" / ".concat(se):""),Jt=Re.createElement(Re.Fragment,null,Jt,Re.createElement("span",{className:ge()("".concat(Xt,"-data-count"),dr==null?void 0:dr.count),style:Wr==null?void 0:Wr.count},vn))}var Fn=function(Ir){var _r;gt==null||gt(Ir),(_r=Jr.current)!==null&&_r!==void 0&&_r.textArea.style.height&&Lr(!0)},Nr=!sn.autoSize&&!rn&&!he,Sr=Re.createElement(Te.BaseInput,{value:ln,allowClear:he,handleReset:Mt,suffix:Jt,prefixCls:Xt,classes:{affixWrapper:ge()(jt==null?void 0:jt.affixWrapper,(Cn={},(0,Be.Z)(Cn,"".concat(Xt,"-show-count"),rn),(0,Be.Z)(Cn,"".concat(Xt,"-textarea-allow-clear"),he),Cn))},disabled:Bt,focused:pi,className:qn,style:(0,Fe.Z)((0,Fe.Z)({},lr),Gn&&!Nr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof vn=="string"?vn:void 0}},hidden:Sn,inputElement:Re.createElement(Gt,(0,fe.Z)({},sn,{onKeyDown:zt,onChange:Ct,onFocus:un,onBlur:Je,onCompositionStart:nr,onCompositionEnd:ot,className:dr==null?void 0:dr.textarea,style:(0,Fe.Z)((0,Fe.Z)({},Wr==null?void 0:Wr.textarea),{},{resize:lr==null?void 0:lr.resize}),disabled:Bt,prefixCls:Xt,onResize:Fn,ref:Jr}))});return Sr}),Qt=Yt,tn=Qt},92389:function(kn,Vt){"use strict";var ae={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(Fe){var Be=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||Be>=ae.F1&&Be<=ae.F12)return!1;switch(Be){case ae.ALT:case ae.CAPS_LOCK:case ae.CONTEXT_MENU:case ae.CTRL:case ae.DOWN:case ae.END:case ae.ESC:case ae.HOME:case ae.INSERT:case ae.LEFT:case ae.MAC_FF_META:case ae.META:case ae.NUMLOCK:case ae.NUM_CENTER:case ae.PAGE_DOWN:case ae.PAGE_UP:case ae.PAUSE:case ae.PRINT_SCREEN:case ae.RIGHT:case ae.SHIFT:case ae.UP:case ae.WIN_KEY:case ae.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=ae.ZERO&&Fe<=ae.NINE||Fe>=ae.NUM_ZERO&&Fe<=ae.NUM_MULTIPLY||Fe>=ae.A&&Fe<=ae.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case ae.SPACE:case ae.QUESTION_MARK:case ae.NUM_PLUS:case ae.NUM_MINUS:case ae.NUM_PERIOD:case ae.NUM_DIVISION:case ae.SEMICOLON:case ae.DASH:case ae.EQUALS:case ae.COMMA:case ae.PERIOD:case ae.SLASH:case ae.APOSTROPHE:case ae.SINGLE_QUOTE:case ae.OPEN_SQUARE_BRACKET:case ae.BACKSLASH:case ae.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};Vt.Z=ae},1337:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return we}});var fe=ae(1413),Fe=`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`,Be=`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`,Ye="".concat(Fe," ").concat(Be).split(/[\s\n]+/),ve="aria-",Ce="data-";function _e(ge,Te){return ge.indexOf(Te)===0}function we(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft;Te===!1?ft={aria:!0,data:!0,attr:!0}:Te===!0?ft={aria:!0}:ft=(0,fe.Z)({},Te);var Re={};return Object.keys(ge).forEach(function(bt){(ft.aria&&(bt==="role"||_e(bt,ve))||ft.data&&_e(bt,Ce)||ft.attr&&Ye.includes(bt))&&(Re[bt]=ge[bt])}),Re}},88386:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){fe.defineOption("placeholder","",function(we,ge,Te){var ft=Te&&Te!=fe.Init;if(ge&&!ft)we.on("blur",ve),we.on("change",Ce),we.on("swapDoc",Ce),fe.on(we.getInputField(),"compositionupdate",we.state.placeholderCompose=function(){Ye(we)}),Ce(we);else if(!ge&&ft){we.off("blur",ve),we.off("change",Ce),we.off("swapDoc",Ce),fe.off(we.getInputField(),"compositionupdate",we.state.placeholderCompose),Fe(we);var Re=we.getWrapperElement();Re.className=Re.className.replace(" CodeMirror-empty","")}ge&&!we.hasFocus()&&ve(we)});function Fe(we){we.state.placeholder&&(we.state.placeholder.parentNode.removeChild(we.state.placeholder),we.state.placeholder=null)}function Be(we){Fe(we);var ge=we.state.placeholder=document.createElement("pre");ge.style.cssText="height: 0; overflow: visible",ge.style.direction=we.getOption("direction"),ge.className="CodeMirror-placeholder CodeMirror-line-like";var Te=we.getOption("placeholder");typeof Te=="string"&&(Te=document.createTextNode(Te)),ge.appendChild(Te),we.display.lineSpace.insertBefore(ge,we.display.lineSpace.firstChild)}function Ye(we){setTimeout(function(){var ge=!1,Te=we.getInputField();Te.nodeName=="TEXTAREA"?ge=!Te.value:we.lineCount()==1&&(ge=!/[^\u200b]/.test(Te.querySelector(".CodeMirror-line").textContent)),ge?Be(we):Fe(we)},20)}function ve(we){_e(we)&&Be(we)}function Ce(we){var ge=we.getWrapperElement(),Te=_e(we);ge.className=ge.className.replace(" CodeMirror-empty","")+(Te?" CodeMirror-empty":""),Te?Be(we):Fe(we)}function _e(we){return we.lineCount()===1&&we.getLine(0)===""}})},82801:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){var Fe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(st,tt,Le){Le&&Le!=fe.Init&&(st.removeKeyMap(ve),st.state.closeBrackets=null),tt&&(Ce(Ye(tt,"pairs")),st.state.closeBrackets=tt,st.addKeyMap(ve))});function Ye(st,tt){return tt=="pairs"&&typeof st=="string"?st:typeof st=="object"&&st[tt]!=null?st[tt]:Fe[tt]}var ve={Backspace:ge,Enter:Te};function Ce(st){for(var tt=0;tt<st.length;tt++){var Le=st.charAt(tt),xt="'"+Le+"'";ve[xt]||(ve[xt]=_e(Le))}}Ce(Fe.pairs+"`");function _e(st){return function(tt){return Re(tt,st)}}function we(st){var tt=st.state.closeBrackets;if(!tt||tt.override)return tt;var Le=st.getModeAt(st.getCursor());return Le.closeBrackets||tt}function ge(st){var tt=we(st);if(!tt||st.getOption("disableInput"))return fe.Pass;for(var Le=Ye(tt,"pairs"),xt=st.listSelections(),on=0;on<xt.length;on++){if(!xt[on].empty())return fe.Pass;var it=bt(st,xt[on].head);if(!it||Le.indexOf(it)%2!=0)return fe.Pass}for(var on=xt.length-1;on>=0;on--){var yt=xt[on].head;st.replaceRange("",Be(yt.line,yt.ch-1),Be(yt.line,yt.ch+1),"+delete")}}function Te(st){var tt=we(st),Le=tt&&Ye(tt,"explode");if(!Le||st.getOption("disableInput"))return fe.Pass;for(var xt=st.listSelections(),on=0;on<xt.length;on++){if(!xt[on].empty())return fe.Pass;var it=bt(st,xt[on].head);if(!it||Le.indexOf(it)%2!=0)return fe.Pass}st.operation(function(){var yt=st.lineSeparator()||`
`;st.replaceSelection(yt+yt,null),st.execCommand("goCharLeft"),xt=st.listSelections();for(var Ee=0;Ee<xt.length;Ee++){var de=xt[Ee].head.line;st.indentLine(de,null,!0),st.indentLine(de+1,null,!0)}})}function ft(st){var tt=fe.cmpPos(st.anchor,st.head)>0;return{anchor:new Be(st.anchor.line,st.anchor.ch+(tt?-1:1)),head:new Be(st.head.line,st.head.ch+(tt?1:-1))}}function Re(st,tt){var Le=we(st);if(!Le||st.getOption("disableInput"))return fe.Pass;var xt=Ye(Le,"pairs"),on=xt.indexOf(tt);if(on==-1)return fe.Pass;for(var it=Ye(Le,"closeBefore"),yt=Ye(Le,"triples"),Ee=xt.charAt(on+1)==tt,de=st.listSelections(),je=on%2==0,ze,At=0;At<de.length;At++){var ct=de[At],lt=ct.head,Ze,kt=st.getRange(lt,Be(lt.line,lt.ch+1));if(je&&!ct.empty())Ze="surround";else if((Ee||!je)&&kt==tt)Ee&&ht(st,lt)?Ze="both":yt.indexOf(tt)>=0&&st.getRange(lt,Be(lt.line,lt.ch+3))==tt+tt+tt?Ze="skipThree":Ze="skip";else if(Ee&&lt.ch>1&&yt.indexOf(tt)>=0&&st.getRange(Be(lt.line,lt.ch-2),lt)==tt+tt){if(lt.ch>2&&/\bstring/.test(st.getTokenTypeAt(Be(lt.line,lt.ch-2))))return fe.Pass;Ze="addFour"}else if(Ee){var pt=lt.ch==0?" ":st.getRange(Be(lt.line,lt.ch-1),lt);if(!fe.isWordChar(kt)&&pt!=tt&&!fe.isWordChar(pt))Ze="both";else return fe.Pass}else if(je&&(kt.length===0||/\s/.test(kt)||it.indexOf(kt)>-1))Ze="both";else return fe.Pass;if(!ze)ze=Ze;else if(ze!=Ze)return fe.Pass}var nn=on%2?xt.charAt(on-1):tt,rt=on%2?tt:xt.charAt(on+1);st.operation(function(){if(ze=="skip")st.execCommand("goCharRight");else if(ze=="skipThree")for(var qt=0;qt<3;qt++)st.execCommand("goCharRight");else if(ze=="surround"){for(var pn=st.getSelections(),qt=0;qt<pn.length;qt++)pn[qt]=nn+pn[qt]+rt;st.replaceSelections(pn,"around"),pn=st.listSelections().slice();for(var qt=0;qt<pn.length;qt++)pn[qt]=ft(pn[qt]);st.setSelections(pn)}else ze=="both"?(st.replaceSelection(nn+rt,null),st.triggerElectric(nn+rt),st.execCommand("goCharLeft")):ze=="addFour"&&(st.replaceSelection(nn+nn+nn+nn,"before"),st.execCommand("goCharRight"))})}function bt(st,tt){var Le=st.getRange(Be(tt.line,tt.ch-1),Be(tt.line,tt.ch+1));return Le.length==2?Le:null}function ht(st,tt){var Le=st.getTokenAt(Be(tt.line,tt.ch+1));return/\bstring/.test(Le.type)&&Le.start==tt.ch&&(tt.ch==0||!/\bstring/.test(st.getTokenTypeAt(tt)))}})},57341:function(kn,Vt,ae){(function(fe){fe(ae(4631),ae(4786))})(function(fe){fe.defineOption("autoCloseTags",!1,function(ge,Te,ft){if(ft!=fe.Init&&ft&&ge.removeKeyMap("autoCloseTags"),!!Te){var Re={name:"autoCloseTags"};(typeof Te!="object"||Te.whenClosing!==!1)&&(Re["'/'"]=function(bt){return Ce(bt)}),(typeof Te!="object"||Te.whenOpening!==!1)&&(Re["'>'"]=function(bt){return Ye(bt)}),ge.addKeyMap(Re)}});var Fe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["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 Ye(ge){if(ge.getOption("disableInput"))return fe.Pass;for(var Te=ge.listSelections(),ft=[],Re=ge.getOption("autoCloseTags"),bt=0;bt<Te.length;bt++){if(!Te[bt].empty())return fe.Pass;var ht=Te[bt].head,st=ge.getTokenAt(ht),tt=fe.innerMode(ge.getMode(),st.state),Le=tt.state,xt=tt.mode.xmlCurrentTag&&tt.mode.xmlCurrentTag(Le),on=xt&&xt.name;if(!on)return fe.Pass;var it=tt.mode.configuration=="html",yt=typeof Re=="object"&&Re.dontCloseTags||it&&Fe,Ee=typeof Re=="object"&&Re.indentTags||it&&Be;st.end>ht.ch&&(on=on.slice(0,on.length-st.end+ht.ch));var de=on.toLowerCase();if(!on||st.type=="string"&&(st.end!=ht.ch||!/[\"\']/.test(st.string.charAt(st.string.length-1))||st.string.length==1)||st.type=="tag"&&xt.close||st.string.indexOf("/")==ht.ch-st.start-1||yt&&_e(yt,de)>-1||we(ge,tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(Le)||[],on,ht,!0))return fe.Pass;var je=typeof Re=="object"&&Re.emptyTags;if(je&&_e(je,on)>-1){ft[bt]={text:"/>",newPos:fe.Pos(ht.line,ht.ch+2)};continue}var ze=Ee&&_e(Ee,de)>-1;ft[bt]={indent:ze,text:">"+(ze?`
`:"")+"</"+on+">",newPos:ze?fe.Pos(ht.line+1,0):fe.Pos(ht.line,ht.ch+1)}}for(var At=typeof Re=="object"&&Re.dontIndentOnAutoClose,bt=Te.length-1;bt>=0;bt--){var ct=ft[bt];ge.replaceRange(ct.text,Te[bt].head,Te[bt].anchor,"+insert");var lt=ge.listSelections().slice(0);lt[bt]={head:ct.newPos,anchor:ct.newPos},ge.setSelections(lt),!At&&ct.indent&&(ge.indentLine(ct.newPos.line,null,!0),ge.indentLine(ct.newPos.line+1,null,!0))}}function ve(ge,Te){for(var ft=ge.listSelections(),Re=[],bt=Te?"/":"</",ht=ge.getOption("autoCloseTags"),st=typeof ht=="object"&&ht.dontIndentOnSlash,tt=0;tt<ft.length;tt++){if(!ft[tt].empty())return fe.Pass;var Le=ft[tt].head,xt=ge.getTokenAt(Le),on=fe.innerMode(ge.getMode(),xt.state),it=on.state;if(Te&&(xt.type=="string"||xt.string.charAt(0)!="<"||xt.start!=Le.ch-1))return fe.Pass;var yt,Ee=on.mode.name!="xml"&&ge.getMode().name=="htmlmixed";if(Ee&&on.mode.name=="javascript")yt=bt+"script";else if(Ee&&on.mode.name=="css")yt=bt+"style";else{var de=on.mode.xmlCurrentContext&&on.mode.xmlCurrentContext(it);if(!de||de.length&&we(ge,de,de[de.length-1],Le))return fe.Pass;yt=bt+de[de.length-1]}ge.getLine(Le.line).charAt(xt.end)!=">"&&(yt+=">"),Re[tt]=yt}if(ge.replaceSelections(Re),ft=ge.listSelections(),!st)for(var tt=0;tt<ft.length;tt++)(tt==ft.length-1||ft[tt].head.line<ft[tt+1].head.line)&&ge.indentLine(ft[tt].head.line)}function Ce(ge){return ge.getOption("disableInput")?fe.Pass:ve(ge,!0)}fe.commands.closeTag=function(ge){return ve(ge)};function _e(ge,Te){if(ge.indexOf)return ge.indexOf(Te);for(var ft=0,Re=ge.length;ft<Re;++ft)if(ge[ft]==Te)return ft;return-1}function we(ge,Te,ft,Re,bt){if(!fe.scanForClosingTag)return!1;var ht=Math.min(ge.lastLine()+1,Re.line+500),st=fe.scanForClosingTag(ge,Re,null,ht);if(!st||st.tag!=ft)return!1;for(var tt=bt?1:0,Le=Te.length-1;Le>=0&&Te[Le]==ft;Le--)++tt;Re=st.to;for(var Le=1;Le<tt;Le++){var xt=fe.scanForClosingTag(ge,Re,null,ht);if(!xt||xt.tag!=ft)return!1;Re=xt.to}return!0}})},4786:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){"use strict";var Fe=fe.Pos;function Be(Le,xt){return Le.line-xt.line||Le.ch-xt.ch}var Ye="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=Ye+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ce=new RegExp("<(/?)(["+Ye+"]["+ve+"]*)","g");function _e(Le,xt,on,it){this.line=xt,this.ch=on,this.cm=Le,this.text=Le.getLine(xt),this.min=it?Math.max(it.from,Le.firstLine()):Le.firstLine(),this.max=it?Math.min(it.to-1,Le.lastLine()):Le.lastLine()}function we(Le,xt){var on=Le.cm.getTokenTypeAt(Fe(Le.line,xt));return on&&/\btag\b/.test(on)}function ge(Le){if(!(Le.line>=Le.max))return Le.ch=0,Le.text=Le.cm.getLine(++Le.line),!0}function Te(Le){if(!(Le.line<=Le.min))return Le.text=Le.cm.getLine(--Le.line),Le.ch=Le.text.length,!0}function ft(Le){for(;;){var xt=Le.text.indexOf(">",Le.ch);if(xt==-1){if(ge(Le))continue;return}if(!we(Le,xt+1)){Le.ch=xt+1;continue}var on=Le.text.lastIndexOf("/",xt),it=on>-1&&!/\S/.test(Le.text.slice(on+1,xt));return Le.ch=xt+1,it?"selfClose":"regular"}}function Re(Le){for(;;){var xt=Le.ch?Le.text.lastIndexOf("<",Le.ch-1):-1;if(xt==-1){if(Te(Le))continue;return}if(!we(Le,xt+1)){Le.ch=xt;continue}Ce.lastIndex=xt,Le.ch=xt;var on=Ce.exec(Le.text);if(on&&on.index==xt)return on}}function bt(Le){for(;;){Ce.lastIndex=Le.ch;var xt=Ce.exec(Le.text);if(!xt){if(ge(Le))continue;return}if(!we(Le,xt.index+1)){Le.ch=xt.index+1;continue}return Le.ch=xt.index+xt[0].length,xt}}function ht(Le){for(;;){var xt=Le.ch?Le.text.lastIndexOf(">",Le.ch-1):-1;if(xt==-1){if(Te(Le))continue;return}if(!we(Le,xt+1)){Le.ch=xt;continue}var on=Le.text.lastIndexOf("/",xt),it=on>-1&&!/\S/.test(Le.text.slice(on+1,xt));return Le.ch=xt+1,it?"selfClose":"regular"}}function st(Le,xt){for(var on=[];;){var it=bt(Le),yt,Ee=Le.line,de=Le.ch-(it?it[0].length:0);if(!it||!(yt=ft(Le)))return;if(yt!="selfClose")if(it[1]){for(var je=on.length-1;je>=0;--je)if(on[je]==it[2]){on.length=je;break}if(je<0&&(!xt||xt==it[2]))return{tag:it[2],from:Fe(Ee,de),to:Fe(Le.line,Le.ch)}}else on.push(it[2])}}function tt(Le,xt){for(var on=[];;){var it=ht(Le);if(!it)return;if(it=="selfClose"){Re(Le);continue}var yt=Le.line,Ee=Le.ch,de=Re(Le);if(!de)return;if(de[1])on.push(de[2]);else{for(var je=on.length-1;je>=0;--je)if(on[je]==de[2]){on.length=je;break}if(je<0&&(!xt||xt==de[2]))return{tag:de[2],from:Fe(Le.line,Le.ch),to:Fe(yt,Ee)}}}}fe.registerHelper("fold","xml",function(Le,xt){for(var on=new _e(Le,xt.line,0);;){var it=bt(on);if(!it||on.line!=xt.line)return;var yt=ft(on);if(!yt)return;if(!it[1]&&yt!="selfClose"){var Ee=Fe(on.line,on.ch),de=st(on,it[2]);return de&&Be(de.from,Ee)>0?{from:Ee,to:de.from}:null}}}),fe.findMatchingTag=function(Le,xt,on){var it=new _e(Le,xt.line,xt.ch,on);if(!(it.text.indexOf(">")==-1&&it.text.indexOf("<")==-1)){var yt=ft(it),Ee=yt&&Fe(it.line,it.ch),de=yt&&Re(it);if(!(!yt||!de||Be(it,xt)>0)){var je={from:Fe(it.line,it.ch),to:Ee,tag:de[2]};return yt=="selfClose"?{open:je,close:null,at:"open"}:de[1]?{open:tt(it,de[2]),close:je,at:"close"}:(it=new _e(Le,Ee.line,Ee.ch,on),{open:je,close:st(it,de[2]),at:"open"})}}},fe.findEnclosingTag=function(Le,xt,on,it){for(var yt=new _e(Le,xt.line,xt.ch,on);;){var Ee=tt(yt,it);if(!Ee)break;var de=new _e(Le,xt.line,xt.ch,on),je=st(de,Ee.tag);if(je)return{open:Ee,close:je}}},fe.scanForClosingTag=function(Le,xt,on,it){var yt=new _e(Le,xt.line,xt.ch,it?{from:0,to:it}:null);return st(yt,on)}})},4631:function(kn){(function(Vt,ae){kn.exports=ae()})(this,function(){"use strict";var Vt=navigator.userAgent,ae=navigator.platform,fe=/gecko\/\d/i.test(Vt),Fe=/MSIE \d/.test(Vt),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vt),Ye=/Edge\/(\d+)/.exec(Vt),ve=Fe||Be||Ye,Ce=ve&&(Fe?document.documentMode||6:+(Ye||Be)[1]),_e=!Ye&&/WebKit\//.test(Vt),we=_e&&/Qt\/\d+\.\d+/.test(Vt),ge=!Ye&&/Chrome\//.test(Vt),Te=/Opera\//.test(Vt),ft=/Apple Computer/.test(navigator.vendor),Re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Vt),bt=/PhantomJS/.test(Vt),ht=!Ye&&/AppleWebKit/.test(Vt)&&/Mobile\/\w+/.test(Vt),st=/Android/.test(Vt),tt=ht||st||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Vt),Le=ht||/Mac/.test(ae),xt=/\bCrOS\b/.test(Vt),on=/win/i.test(ae),it=Te&&Vt.match(/Version\/(\d*\.\d*)/);it&&(it=Number(it[1])),it&&it>=15&&(Te=!1,_e=!0);var yt=Le&&(we||Te&&(it==null||it<12.11)),Ee=fe||ve&&Ce>=9;function de(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var je=function(x,z){var ne=x.className,te=de(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 ze(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function At(x,z){return ze(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 lt(x,z,ne,te){var ie=ct(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var Ze;document.createRange?Ze=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:Ze=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 kt(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 pt(){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 nn(x,z){var ne=x.className;de(z).test(ne)||(x.className+=(ne?" ":"")+z)}function rt(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!de(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var qt=function(x){x.select()};ht?qt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ve&&(qt=function(x){try{x.select()}catch(z){}});function pn(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function cn(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 Xe(x,z,ne,te,ie){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var ue=te||0,xe=ie||0;;){var Pe=x.indexOf(" ",ue);if(Pe<0||Pe>=z)return xe+(z-ue);xe+=Pe-ue,xe+=ne-xe%ne,ue=Pe+1}}var Me=function(){this.id=null,this.f=null,this.time=0,this.handler=pn(this.onTimeout,this)};Me.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Me.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 mt(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var Gt=50,hn={toString:function(){return"CodeMirror.Pass"}},Qe={scroll:!1},ut={origin:"*mouse"},Yt={origin:"+move"};function Qt(x,z,ne){for(var te=0,ie=0;;){var ue=x.indexOf(" ",te);ue==-1&&(ue=x.length);var xe=ue-te;if(ue==x.length||ie+xe>=z)return te+Math.min(xe,z-ie);if(ie+=ue-te,ie+=ne-ie%ne,te=ue+1,ie>=z)return te}}var tn=[""];function _t(x){for(;tn.length<=x;)tn.push(en(tn)+" ");return tn[x]}function en(x){return x[x.length-1]}function Cn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function On(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function $e(){}function ce(x,z){var ne;return Object.create?ne=Object.create(x):($e.prototype=x,ne=new $e),z&&cn(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(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&&me(x)?!0:z.test(x):me(x)}function se(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 et(x){return x.charCodeAt(0)>=768&&Ie.test(x)}function $t(x,z,ne){for(;(ne<0?z>0:z<x.length)&&et(x.charAt(z));)z+=ne;return z}function Ht(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 Xt(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ie=!1,ue=0;ue<x.length;++ue){var xe=x[ue];(xe.from<ne&&xe.to>z||z==ne&&xe.to==z)&&(te(Math.max(xe.from,z),Math.min(xe.to,ne),xe.level==1?"rtl":"ltr",ue),ie=!0)}ie||te(z,ne,"ltr")}var jt=null;function rn(x,z,ne){var te;jt=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:jt=ie),ue.from==z&&(ue.from!=ue.to&&ne!="before"?te=ie:jt=ie)}return te!=null?te:jt}var qn=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Ke){return Ke<=247?x.charAt(Ke):1424<=Ke&&Ke<=1524?"R":1536<=Ke&&Ke<=1785?z.charAt(Ke-1536):1774<=Ke&&Ke<=2220?"r":8192<=Ke&&Ke<=8203?"w":Ke==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ie=/[stwN]/,ue=/[LRr]/,xe=/[Lb1n]/,Pe=/[1n]/;function Ne(Ke,It,Wt){this.level=Ke,this.from=It,this.to=Wt}return function(Ke,It){var Wt=It=="ltr"?"L":"R";if(Ke.length==0||It=="ltr"&&!te.test(Ke))return!1;for(var Bn=Ke.length,En=[],wr=0;wr<Bn;++wr)En.push(ne(Ke.charCodeAt(wr)));for(var zr=0,ai=Wt;zr<Bn;++zr){var wi=En[zr];wi=="m"?En[zr]=ai:ai=wi}for(var Pi=0,mi=Wt;Pi<Bn;++Pi){var Ri=En[Pi];Ri=="1"&&mi=="r"?En[Pi]="n":ue.test(Ri)&&(mi=Ri,Ri=="r"&&(En[Pi]="R"))}for(var ba=1,Ea=En[0];ba<Bn-1;++ba){var go=En[ba];go=="+"&&Ea=="1"&&En[ba+1]=="1"?En[ba]="1":go==","&&Ea==En[ba+1]&&(Ea=="1"||Ea=="n")&&(En[ba]=Ea),Ea=go}for(var is=0;is<Bn;++is){var js=En[is];if(js==",")En[is]="N";else if(js=="%"){var xs=void 0;for(xs=is+1;xs<Bn&&En[xs]=="%";++xs);for(var bl=is&&En[is-1]=="!"||xs<Bn&&En[xs]=="1"?"1":"N",xl=is;xl<xs;++xl)En[xl]=bl;is=xs-1}}for(var Rs=0,wl=Wt;Rs<Bn;++Rs){var Ga=En[Rs];wl=="L"&&Ga=="1"?En[Rs]="L":ue.test(Ga)&&(wl=Ga)}for(var Ms=0;Ms<Bn;++Ms)if(ie.test(En[Ms])){var ws=void 0;for(ws=Ms+1;ws<Bn&&ie.test(En[ws]);++ws);for(var ks=(Ms?En[Ms-1]:Wt)=="L",Ts=(ws<Bn?En[ws]:Wt)=="L",mu=ks==Ts?ks?"L":"R":Wt,_l=Ms;_l<ws;++_l)En[_l]=mu;Ms=ws-1}for(var el=[],No,Zs=0;Zs<Bn;)if(xe.test(En[Zs])){var bd=Zs;for(++Zs;Zs<Bn&&xe.test(En[Zs]);++Zs);el.push(new Ne(0,bd,Zs))}else{var Pc=Zs,Uc=el.length,xc=It=="rtl"?1:0;for(++Zs;Zs<Bn&&En[Zs]!="L";++Zs);for(var Ns=Pc;Ns<Zs;)if(Pe.test(En[Ns])){Pc<Ns&&(el.splice(Uc,0,new Ne(1,Pc,Ns)),Uc+=xc);var gu=Ns;for(++Ns;Ns<Zs&&Pe.test(En[Ns]);++Ns);el.splice(Uc,0,new Ne(2,gu,Ns)),Uc+=xc,Pc=Ns}else++Ns;Pc<Zs&&el.splice(Uc,0,new Ne(1,Pc,Zs))}return It=="ltr"&&(el[0].level==1&&(No=Ke.match(/^\s+/))&&(el[0].from=No[0].length,el.unshift(new Ne(0,0,No[0].length))),en(el).level==1&&(No=Ke.match(/\s+$/))&&(en(el).to-=No[0].length,el.push(new Ne(0,Bn-No[0].length,Bn)))),It=="rtl"?el.reverse():el}}();function lr(x,z){var ne=x.order;return ne==null&&(ne=x.order=qn(x.text,z)),ne}var Bt=[],Sn=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]||Bt).concat(ne)}};function dr(x,z){return x._handlers&&x._handlers[z]||Bt}function Wr(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=mt(ie,ne);ue>-1&&(te[z]=ie.slice(0,ue).concat(ie.slice(ue+1)))}}}function gt(x,z){var ne=dr(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 sn(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),gt(x,ne||z.type,x,z),Zr(z)||z.codemirrorIgnore}function tr(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)mt(ne,z[te])==-1&&ne.push(z[te])}function Zn(x,z){return dr(x,z).length>0}function xr(x){x.prototype.on=function(z,ne){Sn(this,z,ne)},x.prototype.off=function(z,ne){Wr(this,z,ne)}}function Kr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Jr(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Zr(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function ei(x){Kr(x),Jr(x)}function pi(x){return x.target||x.srcElement}function kr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Le&&x.ctrlKey&&z==1&&(z=3),z}var Ti=function(){if(ve&&Ce<9)return!1;var x=ct("div");return"draggable"in x||"dragDrop"in x}(),na;function ea(x){if(na==null){var z=ct("span","\u200B");At(x,ct("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(na=z.offsetWidth<=1&&z.offsetHeight>2&&!(ve&&Ce<8))}var ne=na?ct("span","\u200B"):ct("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var oa;function Li(x){if(oa!=null)return oa;var z=At(x,document.createTextNode("A\u062EA")),ne=Ze(z,0,1).getBoundingClientRect(),te=Ze(z,1,2).getBoundingClientRect();return ze(x),!ne||ne.left==ne.right?!1:oa=te.right-ne.right<3}var Dt=`
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),xe=ue.indexOf("\r");xe!=-1?(ne.push(ue.slice(0,xe)),z+=xe+1):(ne.push(ue),z=ie+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},Hn=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},Vn=function(){var x=ct("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),Gn=null;function Lr(x){if(Gn!=null)return Gn;var z=At(x,ct("span","x")),ne=z.getBoundingClientRect(),te=Ze(z,0,1).getBoundingClientRect();return Gn=Math.abs(ne.left-te.left)>1}var yr={},Pr={};function nr(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),yr[x]=z}function ot(x,z){Pr[x]=z}function Ct(x){if(typeof x=="string"&&Pr.hasOwnProperty(x))x=Pr[x];else if(x&&typeof x.name=="string"&&Pr.hasOwnProperty(x.name)){var z=Pr[x.name];typeof z=="string"&&(z={name:z}),x=ce(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return Ct("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return Ct("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function zt(x,z){z=Ct(z);var ne=yr[z.name];if(!ne)return zt(x,"text/plain");var te=ne(x,z);if(un.hasOwnProperty(z.name)){var ie=un[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 xe in z.modeProps)te[xe]=z.modeProps[xe];return te}var un={};function Je(x,z){var ne=un.hasOwnProperty(x)?un[x]:un[x]={};cn(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 ln(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 Jt(x,z,ne){return x.startState?x.startState(z,ne):!0}var vn=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};vn.prototype.eol=function(){return this.pos>=this.string.length},vn.prototype.sol=function(){return this.pos==this.lineStart},vn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},vn.prototype.eat=function(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},vn.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},vn.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},vn.prototype.skipToEnd=function(){this.pos=this.string.length},vn.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},vn.prototype.backUp=function(x){this.pos-=x},vn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},vn.prototype.indentation=function(){return Xe(this.string,null,this.tabSize)-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},vn.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(xe){return ne?xe.toLowerCase():xe},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)}},vn.prototype.current=function(){return this.string.slice(this.start,this.pos)},vn.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},vn.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},vn.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function bn(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 Fn(x,z,ne){var te=[],ie=z.line;return x.iter(z.line,ne.line+1,function(ue){var xe=ue.text;ie==ne.line&&(xe=xe.slice(0,ne.ch)),ie==z.line&&(xe=xe.slice(z.ch)),te.push(xe),++ie}),te}function Nr(x,z,ne){var te=[];return x.iter(z,ne,function(ie){te.push(ie.text)}),te}function Sr(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function vr(x){if(x.parent==null)return null;for(var z=x.parent,ne=mt(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 Ir(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 xe=0;xe<x.lines.length;++xe){var Pe=x.lines[xe],Ne=Pe.height;if(z<Ne)break;z-=Ne}return ne+xe}function _r(x,z){return z>=x.first&&z<x.first+x.size}function Lt(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function wt(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof wt))return new wt(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Ot(x,z){return x.line-z.line||x.ch-z.ch}function Dn(x,z){return x.sticky==z.sticky&&Ot(x,z)==0}function er(x){return wt(x.line,x.ch)}function An(x,z){return Ot(x,z)<0?z:x}function Rn(x,z){return Ot(x,z)<0?x:z}function Nn(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function rr(x,z){if(z.line<x.first)return wt(x.first,0);var ne=x.first+x.size-1;return z.line>ne?wt(ne,bn(x,ne).text.length):Dr(z,bn(x,z.line).text.length)}function Dr(x,z){var ne=x.ch;return ne==null||ne>z?wt(x.line,z):ne<0?wt(x.line,0):x}function yn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=rr(x,z[te]);return ne}var Si=function(x,z){this.state=x,this.lookAhead=z},di=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};di.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},di.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}},di.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},di.fromSaved=function(x,z,ne){return z instanceof Si?new di(x,Mt(x.mode,z.state),ne,z.lookAhead):new di(x,Mt(x.mode,z),ne)},di.prototype.save=function(x){var z=x!==!1?Mt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Si(z,this.maxLookAhead):z};function ha(x,z,ne,te){var ie=[x.state.modeGen],ue={};Zi(x,z.text,x.doc.mode,ne,function(Ke,It){return ie.push(Ke,It)},ue,te);for(var xe=ne.state,Pe=function(Ke){ne.baseTokens=ie;var It=x.state.overlays[Ke],Wt=1,Bn=0;ne.state=!0,Zi(x,z.text,It.mode,ne,function(En,wr){for(var zr=Wt;Bn<En;){var ai=ie[Wt];ai>En&&ie.splice(Wt,1,En,ie[Wt+1],ai),Wt+=2,Bn=Math.min(En,ai)}if(wr)if(It.opaque)ie.splice(zr,Wt-zr,En,"overlay "+wr),Wt=zr+2;else for(;zr<Wt;zr+=2){var wi=ie[zr+1];ie[zr+1]=(wi?wi+" ":"")+"overlay "+wr}},ue),ne.state=xe,ne.baseTokens=null,ne.baseTokenPos=1},Ne=0;Ne<x.state.overlays.length;++Ne)Pe(Ne);return{styles:ie,classes:ue.bgClass||ue.textClass?ue:null}}function ta(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=Wi(x,vr(z)),ie=z.text.length>x.options.maxHighlightLength&&Mt(x.doc.mode,te.state),ue=ha(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 Wi(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new di(te,!0,z);var ue=xa(x,z,ne),xe=ue>te.first&&bn(te,ue-1).stateAfter,Pe=xe?di.fromSaved(te,xe,ue):new di(te,Jt(te.mode),ue);return te.iter(ue,z,function(Ne){Ta(x,Ne.text,Pe);var Ke=Pe.line;Ne.stateAfter=Ke==z-1||Ke%5==0||Ke>=ie.viewFrom&&Ke<ie.viewTo?Pe.save():null,Pe.nextLine()}),ne&&(te.modeFrontier=Pe.line),Pe}function Ta(x,z,ne,te){var ie=x.doc.mode,ue=new vn(z,x.options.tabSize,ne);for(ue.start=ue.pos=te||0,z==""&&Gi(ie,ne.state);!ue.eol();)$i(ie,ue,ne.state),ue.start=ue.pos}function Gi(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=ln(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function $i(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=ln(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 ra=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Ma(x,z,ne,te){var ie=x.doc,ue=ie.mode,xe;z=rr(ie,z);var Pe=bn(ie,z.line),Ne=Wi(x,z.line,ne),Ke=new vn(Pe.text,x.options.tabSize,Ne),It;for(te&&(It=[]);(te||Ke.pos<z.ch)&&!Ke.eol();)Ke.start=Ke.pos,xe=$i(ue,Ke,Ne.state),te&&It.push(new ra(Ke,xe,Mt(ie.mode,Ne.state)));return te?It:new ra(Ke,xe,Ne.state)}function vi(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 Zi(x,z,ne,te,ie,ue,xe){var Pe=ne.flattenSpans;Pe==null&&(Pe=x.options.flattenSpans);var Ne=0,Ke=null,It=new vn(z,x.options.tabSize,te),Wt,Bn=x.options.addModeClass&&[null];for(z==""&&vi(Gi(ne,te.state),ue);!It.eol();){if(It.pos>x.options.maxHighlightLength?(Pe=!1,xe&&Ta(x,z,te,It.pos),It.pos=z.length,Wt=null):Wt=vi($i(ne,It,te.state,Bn),ue),Bn){var En=Bn[0].name;En&&(Wt="m-"+(Wt?En+" "+Wt:En))}if(!Pe||Ke!=Wt){for(;Ne<It.start;)Ne=Math.min(It.start,Ne+5e3),ie(Ne,Ke);Ke=Wt}It.start=It.pos}for(;Ne<It.pos;){var wr=Math.min(It.pos,Ne+5e3);ie(wr,Ke),Ne=wr}}function xa(x,z,ne){for(var te,ie,ue=x.doc,xe=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Pe=z;Pe>xe;--Pe){if(Pe<=ue.first)return ue.first;var Ne=bn(ue,Pe-1),Ke=Ne.stateAfter;if(Ke&&(!ne||Pe+(Ke instanceof Si?Ke.lookAhead:0)<=ue.modeFrontier))return Pe;var It=Xe(Ne.text,null,x.options.tabSize);(ie==null||te>It)&&(ie=Pe-1,te=It)}return ie}function Ya(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=bn(x,te).stateAfter;if(ie&&(!(ie instanceof Si)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var Ba=!1,ki=!1;function Rt(){Ba=!0}function Tt(){ki=!0}function mn(x,z,ne){this.marker=x,this.from=z,this.to=ne}function $n(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function Qn(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Or(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Gr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],xe=ue.marker,Pe=ue.from==null||(xe.inclusiveLeft?ue.from<=z:ue.from<z);if(Pe||ue.from==z&&xe.type=="bookmark"&&(!ne||!ue.marker.insertLeft)){var Ne=ue.to==null||(xe.inclusiveRight?ue.to>=z:ue.to>z);(te||(te=[])).push(new mn(xe,ue.from,Ne?null:ue.to))}}return te}function ci(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ue=x[ie],xe=ue.marker,Pe=ue.to==null||(xe.inclusiveRight?ue.to>=z:ue.to>z);if(Pe||ue.from==z&&xe.type=="bookmark"&&(!ne||ue.marker.insertLeft)){var Ne=ue.from==null||(xe.inclusiveLeft?ue.from<=z:ue.from<z);(te||(te=[])).push(new mn(xe,Ne?null:ue.from-z,ue.to==null?null:ue.to-z))}}return te}function gi(x,z){if(z.full)return null;var ne=_r(x,z.from.line)&&bn(x,z.from.line).markedSpans,te=_r(x,z.to.line)&&bn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ue=z.to.ch,xe=Ot(z.from,z.to)==0,Pe=Gr(ne,ie,xe),Ne=ci(te,ue,xe),Ke=z.text.length==1,It=en(z.text).length+(Ke?ie:0);if(Pe)for(var Wt=0;Wt<Pe.length;++Wt){var Bn=Pe[Wt];if(Bn.to==null){var En=$n(Ne,Bn.marker);En?Ke&&(Bn.to=En.to==null?null:En.to+It):Bn.to=ie}}if(Ne)for(var wr=0;wr<Ne.length;++wr){var zr=Ne[wr];if(zr.to!=null&&(zr.to+=It),zr.from==null){var ai=$n(Pe,zr.marker);ai||(zr.from=It,Ke&&(Pe||(Pe=[])).push(zr))}else zr.from+=It,Ke&&(Pe||(Pe=[])).push(zr)}Pe&&(Pe=li(Pe)),Ne&&Ne!=Pe&&(Ne=li(Ne));var wi=[Pe];if(!Ke){var Pi=z.text.length-2,mi;if(Pi>0&&Pe)for(var Ri=0;Ri<Pe.length;++Ri)Pe[Ri].to==null&&(mi||(mi=[])).push(new mn(Pe[Ri].marker,null,null));for(var ba=0;ba<Pi;++ba)wi.push(mi);wi.push(Ne)}return wi}function li(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 Mi(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(En){if(En.markedSpans)for(var wr=0;wr<En.markedSpans.length;++wr){var zr=En.markedSpans[wr].marker;zr.readOnly&&(!te||mt(te,zr)==-1)&&(te||(te=[])).push(zr)}}),!te)return null;for(var ie=[{from:z,to:ne}],ue=0;ue<te.length;++ue)for(var xe=te[ue],Pe=xe.find(0),Ne=0;Ne<ie.length;++Ne){var Ke=ie[Ne];if(!(Ot(Ke.to,Pe.from)<0||Ot(Ke.from,Pe.to)>0)){var It=[Ne,1],Wt=Ot(Ke.from,Pe.from),Bn=Ot(Ke.to,Pe.to);(Wt<0||!xe.inclusiveLeft&&!Wt)&&It.push({from:Ke.from,to:Pe.from}),(Bn>0||!xe.inclusiveRight&&!Bn)&&It.push({from:Pe.to,to:Ke.to}),ie.splice.apply(ie,It),Ne+=It.length-3}}return ie}function Vi(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Yr(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function Fi(x){return x.inclusiveLeft?-1:0}function sa(x){return x.inclusiveRight?1:0}function Yi(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ue=Ot(te.from,ie.from)||Fi(x)-Fi(z);if(ue)return-ue;var xe=Ot(te.to,ie.to)||sa(x)-sa(z);return xe||z.id-x.id}function Oe(x,z){var ne=ki&&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||Yi(te,ie.marker)<0)&&(te=ie.marker);return te}function Ve(x){return Oe(x,!0)}function Ue(x){return Oe(x,!1)}function qe(x,z){var ne=ki&&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||Yi(te,ue.marker)<0)&&(te=ue.marker)}return te}function vt(x,z,ne,te,ie){var ue=bn(x,z),xe=ki&&ue.markedSpans;if(xe)for(var Pe=0;Pe<xe.length;++Pe){var Ne=xe[Pe];if(Ne.marker.collapsed){var Ke=Ne.marker.find(0),It=Ot(Ke.from,ne)||Fi(Ne.marker)-Fi(ie),Wt=Ot(Ke.to,te)||sa(Ne.marker)-sa(ie);if(!(It>=0&&Wt<=0||It<=0&&Wt>=0)&&(It<=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?Ot(Ke.to,ne)>=0:Ot(Ke.to,ne)>0)||It>=0&&(Ne.marker.inclusiveRight&&ie.inclusiveLeft?Ot(Ke.from,te)<=0:Ot(Ke.from,te)<0)))return!0}}}function St(x){for(var z;z=Ve(x);)x=z.find(-1,!0).line;return x}function Nt(x){for(var z;z=Ue(x);)x=z.find(1,!0).line;return x}function wn(x){for(var z,ne;z=Ue(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function Ln(x,z){var ne=bn(x,z),te=St(ne);return ne==te?z:vr(te)}function br(x,z){if(z>x.lastLine())return z;var ne=bn(x,z),te;if(!Br(x,ne))return z;for(;te=Ue(ne);)ne=te.find(1,!0).line;return vr(ne)+1}function Br(x,z){var ne=ki&&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&&hr(x,z,te))return!0}}}function hr(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return hr(x,te.line,$n(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)&&hr(x,z,ie))return!0}function Wn(x){x=St(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 xe=0;xe<ue.children.length;++xe){var Pe=ue.children[xe];if(Pe==ne)break;z+=Pe.height}return z}function Tn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Ve(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=Ue(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 Jn(x){var z=x.display,ne=x.doc;z.maxLine=bn(ne,ne.first),z.maxLineLength=Tn(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ie=Tn(te);ie>z.maxLineLength&&(z.maxLineLength=ie,z.maxLine=te)})}var ar=function(x,z,ne){this.text=x,Yr(this,z),this.height=ne?ne(this):1};ar.prototype.lineNo=function(){return vr(this)},xr(ar);function $r(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),Vi(x),Yr(x,ne);var ie=te?te(x):1;ie!=x.height&&Sr(x,ie)}function mr(x){x.parent=null,Vi(x)}var gr={},Cr={};function Er(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?Cr:gr;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function Fr(x,z){var ne=lt("span",null,null,_e?"padding-right: .1px":null),te={pre:lt("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,xe=void 0;te.pos=0,te.addToken=Ge,Li(x.display.measure)&&(xe=lr(ue,x.doc.direction))&&(te.addToken=Et(te.addToken,xe)),te.map=[];var Pe=z!=x.display.externalMeasured&&vr(ue);In(ue,te,ta(x,ue,Pe)),ue.styleClasses&&(ue.styleClasses.bgClass&&(te.bgClass=rt(ue.styleClasses.bgClass,te.bgClass||"")),ue.styleClasses.textClass&&(te.textClass=rt(ue.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(ea(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(_e){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 gt(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=rt(te.pre.className,te.textClass||"")),te}function He(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 Ge(x,z,ne,te,ie,ue,xe){if(z){var Pe=x.splitSpaces?Ft(z,x.trailingSpace):z,Ne=x.cm.state.specialChars,Ke=!1,It;if(!Ne.test(z))x.col+=z.length,It=document.createTextNode(Pe),x.map.push(x.pos,x.pos+z.length,It),ve&&Ce<9&&(Ke=!0),x.pos+=z.length;else{It=document.createDocumentFragment();for(var Wt=0;;){Ne.lastIndex=Wt;var Bn=Ne.exec(z),En=Bn?Bn.index-Wt:z.length-Wt;if(En){var wr=document.createTextNode(Pe.slice(Wt,Wt+En));ve&&Ce<9?It.appendChild(ct("span",[wr])):It.appendChild(wr),x.map.push(x.pos,x.pos+En,wr),x.col+=En,x.pos+=En}if(!Bn)break;Wt+=En+1;var zr=void 0;if(Bn[0]==" "){var ai=x.cm.options.tabSize,wi=ai-x.col%ai;zr=It.appendChild(ct("span",_t(wi),"cm-tab")),zr.setAttribute("role","presentation"),zr.setAttribute("cm-text"," "),x.col+=wi}else Bn[0]=="\r"||Bn[0]==`
`?(zr=It.appendChild(ct("span",Bn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),zr.setAttribute("cm-text",Bn[0]),x.col+=1):(zr=x.cm.options.specialCharPlaceholder(Bn[0]),zr.setAttribute("cm-text",Bn[0]),ve&&Ce<9?It.appendChild(ct("span",[zr])):It.appendChild(zr),x.col+=1);x.map.push(x.pos,x.pos+1,zr),x.pos++}}if(x.trailingSpace=Pe.charCodeAt(z.length-1)==32,ne||te||ie||Ke||ue||xe){var Pi=ne||"";te&&(Pi+=te),ie&&(Pi+=ie);var mi=ct("span",[It],Pi,ue);if(xe)for(var Ri in xe)xe.hasOwnProperty(Ri)&&Ri!="style"&&Ri!="class"&&mi.setAttribute(Ri,xe[Ri]);return x.content.appendChild(mi)}x.content.appendChild(It)}}function Ft(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 Et(x,z){return function(ne,te,ie,ue,xe,Pe,Ne){ie=ie?ie+" cm-force-border":"cm-force-border";for(var Ke=ne.pos,It=Ke+te.length;;){for(var Wt=void 0,Bn=0;Bn<z.length&&(Wt=z[Bn],!(Wt.to>Ke&&Wt.from<=Ke));Bn++);if(Wt.to>=It)return x(ne,te,ie,ue,xe,Pe,Ne);x(ne,te.slice(0,Wt.to-Ke),ie,ue,null,Pe,Ne),ue=null,te=te.slice(Wt.to-Ke),Ke=Wt.to}}}function dn(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 In(x,z,ne){var te=x.markedSpans,ie=x.text,ue=0;if(!te){for(var xe=1;xe<ne.length;xe+=2)z.addToken(z,ie.slice(ue,ue=ne[xe]),Er(ne[xe+1],z.cm.options));return}for(var Pe=ie.length,Ne=0,Ke=1,It="",Wt,Bn,En=0,wr,zr,ai,wi,Pi;;){if(En==Ne){wr=zr=ai=Bn="",Pi=null,wi=null,En=1/0;for(var mi=[],Ri=void 0,ba=0;ba<te.length;++ba){var Ea=te[ba],go=Ea.marker;if(go.type=="bookmark"&&Ea.from==Ne&&go.widgetNode)mi.push(go);else if(Ea.from<=Ne&&(Ea.to==null||Ea.to>Ne||go.collapsed&&Ea.to==Ne&&Ea.from==Ne)){if(Ea.to!=null&&Ea.to!=Ne&&En>Ea.to&&(En=Ea.to,zr=""),go.className&&(wr+=" "+go.className),go.css&&(Bn=(Bn?Bn+";":"")+go.css),go.startStyle&&Ea.from==Ne&&(ai+=" "+go.startStyle),go.endStyle&&Ea.to==En&&(Ri||(Ri=[])).push(go.endStyle,Ea.to),go.title&&((Pi||(Pi={})).title=go.title),go.attributes)for(var is in go.attributes)(Pi||(Pi={}))[is]=go.attributes[is];go.collapsed&&(!wi||Yi(wi.marker,go)<0)&&(wi=Ea)}else Ea.from>Ne&&En>Ea.from&&(En=Ea.from)}if(Ri)for(var js=0;js<Ri.length;js+=2)Ri[js+1]==En&&(zr+=" "+Ri[js]);if(!wi||wi.from==Ne)for(var xs=0;xs<mi.length;++xs)dn(z,0,mi[xs]);if(wi&&(wi.from||0)==Ne){if(dn(z,(wi.to==null?Pe+1:wi.to)-Ne,wi.marker,wi.from==null),wi.to==null)return;wi.to==Ne&&(wi=!1)}}if(Ne>=Pe)break;for(var bl=Math.min(Pe,En);;){if(It){var xl=Ne+It.length;if(!wi){var Rs=xl>bl?It.slice(0,bl-Ne):It;z.addToken(z,Rs,Wt?Wt+wr:wr,ai,Ne+Rs.length==En?zr:"",Bn,Pi)}if(xl>=bl){It=It.slice(bl-Ne),Ne=bl;break}Ne=xl,ai=""}It=ie.slice(ue,ue=ne[Ke++]),Wt=Er(ne[Ke++],z.cm.options)}}}function zn(x,z,ne){this.line=z,this.rest=wn(z),this.size=this.rest?vr(en(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=Br(x,z)}function or(x,z,ne){for(var te=[],ie,ue=z;ue<ne;ue=ie){var xe=new zn(x.doc,bn(x.doc,ue),ue);ie=ue+xe.size,te.push(xe)}return te}var jn=null;function _n(x){jn?jn.ops.push(x):x.ownsGroup=jn={ops:[x],delayedCallbacks:[]}}function cr(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 fr(x,z){var ne=x.ownsGroup;if(ne)try{cr(ne)}finally{jn=null,z(ne)}}var Hr=null;function ur(x,z){var ne=dr(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;jn?ie=jn.delayedCallbacks:Hr?ie=Hr:(ie=Hr=[],setTimeout(ti,0));for(var ue=function(Pe){ie.push(function(){return ne[Pe].apply(null,te)})},xe=0;xe<ne.length;++xe)ue(xe)}}function ti(){var x=Hr;Hr=null;for(var z=0;z<x.length;++z)x[z]()}function yi(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ue=z.changes[ie];ue=="text"?oi(x,z):ue=="gutter"?Oi(x,z,ne,te):ue=="class"?Ci(x,z):ue=="widget"&&ii(x,z,te)}z.changes=null}function ni(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&&Ce<8&&(x.node.style.zIndex=2)),x.node}function fi(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=ni(z);z.background=te.insertBefore(ct("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function jr(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):Fr(x,z)}function oi(x,z){var ne=z.text.className,te=jr(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,Ci(x,z)):ne&&(z.text.className=ne)}function Ci(x,z){fi(x,z),z.line.wrapClass?ni(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 Oi(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=ni(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 xe=ni(z),Pe=z.gutter=ct("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Pe),xe.insertBefore(Pe,z.text),z.line.gutterClass&&(Pe.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ue||!ue["CodeMirror-linenumbers"])&&(z.lineNumber=Pe.appendChild(ct("div",Lt(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 Ke=x.display.gutterSpecs[Ne].className,It=ue.hasOwnProperty(Ke)&&ue[Ke];It&&Pe.appendChild(ct("div",[It],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Ke]+"px; width: "+te.gutterWidth[Ke]+"px"))}}}function ii(x,z,ne){z.alignable&&(z.alignable=null);for(var te=de("CodeMirror-linewidget"),ie=z.node.firstChild,ue=void 0;ie;ie=ue)ue=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);la(x,z,ne)}function Ni(x,z,ne,te){var ie=jr(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),Ci(x,z),Oi(x,z,ne,te),la(x,z,te),z.node}function la(x,z,ne){if(Ha(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)Ha(x,z.rest[te],z,ne,!1)}function Ha(x,z,ne,te,ie){if(z.widgets)for(var ue=ni(ne),xe=0,Pe=z.widgets;xe<Pe.length;++xe){var Ne=Pe[xe],Ke=ct("div",[Ne.node],"CodeMirror-linewidget"+(Ne.className?" "+Ne.className:""));Ne.handleMouseEvents||Ke.setAttribute("cm-ignore-events","true"),Aa(Ne,Ke,ne,te),x.display.input.setUneditable(Ke),ie&&Ne.above?ue.insertBefore(Ke,ne.gutter||ne.text):ue.appendChild(Ke),ur(Ne,"redraw")}}function Aa(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 pa(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!kt(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;"),At(z.display.measure,ct("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function ka(x,z){for(var ne=pi(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 Pa(x){return x.lineSpace.offsetTop}function Ui(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function ca(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=At(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 bi(x){return Gt-x.display.nativeBarWidth}function zi(x){return x.display.scroller.clientWidth-bi(x)-x.display.barWidth}function ia(x){return x.display.scroller.clientHeight-bi(x)-x.display.barHeight}function _a(x,z,ne){var te=x.options.lineWrapping,ie=te&&zi(x);if(!z.measure.heights||te&&z.measure.width!=ie){var ue=z.measure.heights=[];if(te){z.measure.width=ie;for(var xe=z.text.firstChild.getClientRects(),Pe=0;Pe<xe.length-1;Pe++){var Ne=xe[Pe],Ke=xe[Pe+1];Math.abs(Ne.bottom-Ke.bottom)>2&&ue.push((Ne.bottom+Ke.top)/2-ne.top)}}ue.push(ne.bottom-ne.top)}}function So(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(vr(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function ho(x,z){z=St(z);var ne=vr(z),te=x.display.externalMeasured=new zn(x.doc,z,ne);te.lineN=ne;var ie=te.built=Fr(x,te);return te.text=ie.pre,At(x.display.lineMeasure,ie.pre),te}function po(x,z,ne,te){return Hi(x,Ra(x,z),ne,te)}function Xa(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[Ka(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Ra(x,z){var ne=vr(z),te=Xa(x,ne);te&&!te.text?te=null:te&&te.changes&&(yi(x,te,ne,qo(x)),x.curOp.forceUpdate=!0),te||(te=ho(x,z));var ie=So(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Hi(x,z,ne,te,ie){z.before&&(ne=-1);var ue=ne+(te||""),xe;return z.cache.hasOwnProperty(ue)?xe=z.cache[ue]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(_a(x,z.view,z.rect),z.hasHeights=!0),xe=ua(x,z,ne,te),xe.bogus||(z.cache[ue]=xe)),{left:xe.left,right:xe.right,top:ie?xe.rtop:xe.top,bottom:ie?xe.rbottom:xe.bottom}}var yo={left:0,right:0,top:0,bottom:0};function Xi(x,z,ne){for(var te,ie,ue,xe,Pe,Ne,Ke=0;Ke<x.length;Ke+=3)if(Pe=x[Ke],Ne=x[Ke+1],z<Pe?(ie=0,ue=1,xe="left"):z<Ne?(ie=z-Pe,ue=ie+1):(Ke==x.length-3||z==Ne&&x[Ke+3]>z)&&(ue=Ne-Pe,ie=ue-1,z>=Ne&&(xe="right")),ie!=null){if(te=x[Ke+2],Pe==Ne&&ne==(te.insertLeft?"left":"right")&&(xe=ne),ne=="left"&&ie==0)for(;Ke&&x[Ke-2]==x[Ke-3]&&x[Ke-1].insertLeft;)te=x[(Ke-=3)+2],xe="left";if(ne=="right"&&ie==Ne-Pe)for(;Ke<x.length-3&&x[Ke+3]==x[Ke+4]&&!x[Ke+5].insertLeft;)te=x[(Ke+=3)+2],xe="right";break}return{node:te,start:ie,end:ue,collapse:xe,coverStart:Pe,coverEnd:Ne}}function Ei(x,z){var ne=yo;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 ua(x,z,ne,te){var ie=Xi(z.map,ne,te),ue=ie.node,xe=ie.start,Pe=ie.end,Ne=ie.collapse,Ke;if(ue.nodeType==3){for(var It=0;It<4;It++){for(;xe&&et(z.line.text.charAt(ie.coverStart+xe));)--xe;for(;ie.coverStart+Pe<ie.coverEnd&&et(z.line.text.charAt(ie.coverStart+Pe));)++Pe;if(ve&&Ce<9&&xe==0&&Pe==ie.coverEnd-ie.coverStart?Ke=ue.parentNode.getBoundingClientRect():Ke=Ei(Ze(ue,xe,Pe).getClientRects(),te),Ke.left||Ke.right||xe==0)break;Pe=xe,xe=xe-1,Ne="right"}ve&&Ce<11&&(Ke=Ja(x.display.measure,Ke))}else{xe>0&&(Ne=te="right");var Wt;x.options.lineWrapping&&(Wt=ue.getClientRects()).length>1?Ke=Wt[te=="right"?Wt.length-1:0]:Ke=ue.getBoundingClientRect()}if(ve&&Ce<9&&!xe&&(!Ke||!Ke.left&&!Ke.right)){var Bn=ue.parentNode.getClientRects()[0];Bn?Ke={left:Bn.left,right:Bn.left+Uo(x.display),top:Bn.top,bottom:Bn.bottom}:Ke=yo}for(var En=Ke.top-z.rect.top,wr=Ke.bottom-z.rect.top,zr=(En+wr)/2,ai=z.view.measure.heights,wi=0;wi<ai.length-1&&!(zr<ai[wi]);wi++);var Pi=wi?ai[wi-1]:0,mi=ai[wi],Ri={left:(Ne=="right"?Ke.right:Ke.left)-z.rect.left,right:(Ne=="left"?Ke.left:Ke.right)-z.rect.left,top:Pi,bottom:mi};return!Ke.left&&!Ke.right&&(Ri.bogus=!0),x.options.singleCursorHeightPerLine||(Ri.rtop=En,Ri.rbottom=wr),Ri}function Ja(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Lr(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 wa(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 Wa(x){x.display.externalMeasure=null,ze(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)wa(x.display.view[z])}function Ki(x){Wa(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function ro(){return ge&&st?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function so(){return ge&&st?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function to(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=pa(x.widgets[ne]));return z}function lo(x,z,ne,te,ie){if(!ie){var ue=to(z);ne.top+=ue,ne.bottom+=ue}if(te=="line")return ne;te||(te="local");var xe=Wn(z);if(te=="local"?xe+=Pa(x.display):xe-=x.display.viewOffset,te=="page"||te=="window"){var Pe=x.display.lineSpace.getBoundingClientRect();xe+=Pe.top+(te=="window"?0:so());var Ne=Pe.left+(te=="window"?0:ro());ne.left+=Ne,ne.right+=Ne}return ne.top+=xe,ne.bottom+=xe,ne}function vo(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=ro(),ie-=so();else if(ne=="local"||!ne){var ue=x.display.sizer.getBoundingClientRect();te+=ue.left,ie+=ue.top}var xe=x.display.lineSpace.getBoundingClientRect();return{left:te-xe.left,top:ie-xe.top}}function Ao(x,z,ne,te,ie){return te||(te=bn(x.doc,z.line)),lo(x,te,po(x,te,z.ch,ie),ne)}function no(x,z,ne,te,ie,ue){te=te||bn(x.doc,z.line),ie||(ie=Ra(x,te));function xe(wr,zr){var ai=Hi(x,ie,wr,zr?"right":"left",ue);return zr?ai.left=ai.right:ai.right=ai.left,lo(x,te,ai,ne)}var Pe=lr(te,x.doc.direction),Ne=z.ch,Ke=z.sticky;if(Ne>=te.text.length?(Ne=te.text.length,Ke="before"):Ne<=0&&(Ne=0,Ke="after"),!Pe)return xe(Ke=="before"?Ne-1:Ne,Ke=="before");function It(wr,zr,ai){var wi=Pe[zr],Pi=wi.level==1;return xe(ai?wr-1:wr,Pi!=ai)}var Wt=rn(Pe,Ne,Ke),Bn=jt,En=It(Ne,Wt,Ke=="before");return Bn!=null&&(En.other=It(Ne,Bn,Ke!="before")),En}function ao(x,z){var ne=0;z=rr(x.doc,z),x.options.lineWrapping||(ne=Uo(x.display)*z.ch);var te=bn(x.doc,z.line),ie=Wn(te)+Pa(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function zo(x,z,ne,te,ie){var ue=wt(x,z,ne);return ue.xRel=ie,te&&(ue.outside=te),ue}function Ho(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return zo(te.first,0,null,-1,-1);var ie=Ir(te,ne),ue=te.first+te.size-1;if(ie>ue)return zo(te.first+te.size-1,bn(te,ue).text.length,null,1,1);z<0&&(z=0);for(var xe=bn(te,ie);;){var Pe=aa(x,xe,ie,z,ne),Ne=qe(xe,Pe.ch+(Pe.xRel>0||Pe.outside>0?1:0));if(!Ne)return Pe;var Ke=Ne.find(1);if(Ke.line==ie)return Ke;xe=bn(te,ie=Ke.line)}}function Jo(x,z,ne,te){te-=to(z);var ie=z.text.length,ue=Ht(function(xe){return Hi(x,ne,xe-1).bottom<=te},ie,0);return ie=Ht(function(xe){return Hi(x,ne,xe).top>te},ue,ie),{begin:ue,end:ie}}function To(x,z,ne,te){ne||(ne=Ra(x,z));var ie=lo(x,z,Hi(x,ne,te),"line").top;return Jo(x,z,ne,ie)}function co(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function aa(x,z,ne,te,ie){ie-=Wn(z);var ue=Ra(x,z),xe=to(z),Pe=0,Ne=z.text.length,Ke=!0,It=lr(z,x.doc.direction);if(It){var Wt=(x.options.lineWrapping?qa:va)(x,z,ne,ue,It,te,ie);Ke=Wt.level!=1,Pe=Ke?Wt.from:Wt.to-1,Ne=Ke?Wt.to:Wt.from-1}var Bn=null,En=null,wr=Ht(function(ba){var Ea=Hi(x,ue,ba);return Ea.top+=xe,Ea.bottom+=xe,co(Ea,te,ie,!1)?(Ea.top<=ie&&Ea.left<=te&&(Bn=ba,En=Ea),!0):!1},Pe,Ne),zr,ai,wi=!1;if(En){var Pi=te-En.left<En.right-te,mi=Pi==Ke;wr=Bn+(mi?0:1),ai=mi?"after":"before",zr=Pi?En.left:En.right}else{!Ke&&(wr==Ne||wr==Pe)&&wr++,ai=wr==0?"after":wr==z.text.length?"before":Hi(x,ue,wr-(Ke?1:0)).bottom+xe<=ie==Ke?"after":"before";var Ri=no(x,wt(ne,wr,ai),"line",z,ue);zr=Ri.left,wi=ie<Ri.top?-1:ie>=Ri.bottom?1:0}return wr=$t(z.text,wr,1),zo(ne,wr,ai,wi,te-zr)}function va(x,z,ne,te,ie,ue,xe){var Pe=Ht(function(Wt){var Bn=ie[Wt],En=Bn.level!=1;return co(no(x,wt(ne,En?Bn.to:Bn.from,En?"before":"after"),"line",z,te),ue,xe,!0)},0,ie.length-1),Ne=ie[Pe];if(Pe>0){var Ke=Ne.level!=1,It=no(x,wt(ne,Ke?Ne.from:Ne.to,Ke?"after":"before"),"line",z,te);co(It,ue,xe,!0)&&It.top>xe&&(Ne=ie[Pe-1])}return Ne}function qa(x,z,ne,te,ie,ue,xe){var Pe=Jo(x,z,te,xe),Ne=Pe.begin,Ke=Pe.end;/\s/.test(z.text.charAt(Ke-1))&&Ke--;for(var It=null,Wt=null,Bn=0;Bn<ie.length;Bn++){var En=ie[Bn];if(!(En.from>=Ke||En.to<=Ne)){var wr=En.level!=1,zr=Hi(x,te,wr?Math.min(Ke,En.to)-1:Math.max(Ne,En.from)).right,ai=zr<ue?ue-zr+1e9:zr-ue;(!It||Wt>ai)&&(It=En,Wt=ai)}}return It||(It=ie[ie.length-1]),It.from<Ne&&(It={from:Ne,to:It.to,level:It.level}),It.to>Ke&&(It={from:It.from,to:Ke,level:It.level}),It}var uo;function Po(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(uo==null){uo=ct("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)uo.appendChild(document.createTextNode("x")),uo.appendChild(ct("br"));uo.appendChild(document.createTextNode("x"))}At(x.measure,uo);var ne=uo.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),ze(x.measure),ne||1}function Uo(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=ct("span","xxxxxxxxxx"),ne=ct("pre",[z],"CodeMirror-line-like");At(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function qo(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ue=z.gutters.firstChild,xe=0;ue;ue=ue.nextSibling,++xe){var Pe=x.display.gutterSpecs[xe].className;ne[Pe]=ue.offsetLeft+ue.clientLeft+ie,te[Pe]=ue.clientWidth}return{fixedPos:ls(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function ls(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ss(x){var z=Po(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/Uo(x.display)-3);return function(ie){if(Br(x.doc,ie))return 0;var ue=0;if(ie.widgets)for(var xe=0;xe<ie.widgets.length;xe++)ie.widgets[xe].height&&(ue+=ie.widgets[xe].height);return ne?ue+(Math.ceil(ie.text.length/te)||1)*z:ue+z}}function Qo(x){var z=x.doc,ne=Ss(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&Sr(te,ie)})}function Cs(x,z,ne,te){var ie=x.display;if(!ne&&pi(z).getAttribute("cm-not-content")=="true")return null;var ue,xe,Pe=ie.lineSpace.getBoundingClientRect();try{ue=z.clientX-Pe.left,xe=z.clientY-Pe.top}catch(Wt){return null}var Ne=Ho(x,ue,xe),Ke;if(te&&Ne.xRel>0&&(Ke=bn(x.doc,Ne.line).text).length==Ne.ch){var It=Xe(Ke,Ke.length,x.options.tabSize)-Ke.length;Ne=wt(Ne.line,Math.max(0,Math.round((ue-ca(x.display).left)/Uo(x.display))-It))}return Ne}function Ka(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 ye(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)ki&&Ln(x.doc,z)<ie.viewTo&&De(x);else if(ne<=ie.viewFrom)ki&&br(x.doc,ne+te)>ie.viewFrom?De(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)De(x);else if(z<=ie.viewFrom){var ue=nt(x,ne,ne+te,1);ue?(ie.view=ie.view.slice(ue.index),ie.viewFrom=ue.lineN,ie.viewTo+=te):De(x)}else if(ne>=ie.viewTo){var xe=nt(x,z,z,-1);xe?(ie.view=ie.view.slice(0,xe.index),ie.viewTo=xe.lineN):De(x)}else{var Pe=nt(x,z,z,-1),Ne=nt(x,ne,ne+te,1);Pe&&Ne?(ie.view=ie.view.slice(0,Pe.index).concat(or(x,Pe.lineN,Ne.lineN)).concat(ie.view.slice(Ne.index)),ie.viewTo+=te):De(x)}var Ke=ie.externalMeasured;Ke&&(ne<Ke.lineN?Ke.lineN+=te:z<Ke.lineN+Ke.size&&(ie.externalMeasured=null))}function ke(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[Ka(x,z)];if(ue.node!=null){var xe=ue.changes||(ue.changes=[]);mt(xe,ne)==-1&&xe.push(ne)}}}function De(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function nt(x,z,ne,te){var ie=Ka(x,z),ue,xe=x.display.view;if(!ki||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var Pe=x.display.viewFrom,Ne=0;Ne<ie;Ne++)Pe+=xe[Ne].size;if(Pe!=z){if(te>0){if(ie==xe.length-1)return null;ue=Pe+xe[ie].size-z,ie++}else ue=Pe-z;z+=ue,ne+=ue}for(;Ln(x.doc,ne)!=ne;){if(ie==(te<0?0:xe.length-1))return null;ne+=te*xe[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function at(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=or(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=or(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(Ka(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(or(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,Ka(x,ne)))),te.viewTo=ne}function an(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 Zt(x){x.display.input.showSelection(x.display.input.prepareSelection())}function Pn(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ue=te.selection=document.createDocumentFragment(),xe=0;xe<ne.sel.ranges.length;xe++)if(!(!z&&xe==ne.sel.primIndex)){var Pe=ne.sel.ranges[xe];if(!(Pe.from().line>=x.display.viewTo||Pe.to().line<x.display.viewFrom)){var Ne=Pe.empty();(Ne||x.options.showCursorWhenSelecting)&&fn(x,Pe.head,ie),Ne||Kn(x,Pe,ue)}}return te}function fn(x,z,ne){var te=no(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 Ut(x,z){return x.top-z.top||x.left-z.left}function Kn(x,z,ne){var te=x.display,ie=x.doc,ue=document.createDocumentFragment(),xe=ca(x.display),Pe=xe.left,Ne=Math.max(te.sizerWidth,zi(x)-te.sizer.offsetLeft)-xe.right,Ke=ie.direction=="ltr";function It(mi,Ri,ba,Ea){Ri<0&&(Ri=0),Ri=Math.round(Ri),Ea=Math.round(Ea),ue.appendChild(ct("div",null,"CodeMirror-selected","position: absolute; left: "+mi+`px;
top: `+Ri+"px; width: "+(ba==null?Ne-mi:ba)+`px;
height: `+(Ea-Ri)+"px"))}function Wt(mi,Ri,ba){var Ea=bn(ie,mi),go=Ea.text.length,is,js;function xs(Rs,wl){return Ao(x,wt(mi,Rs),"div",Ea,wl)}function bl(Rs,wl,Ga){var Ms=To(x,Ea,null,Rs),ws=wl=="ltr"==(Ga=="after")?"left":"right",ks=Ga=="after"?Ms.begin:Ms.end-(/\s/.test(Ea.text.charAt(Ms.end-1))?2:1);return xs(ks,ws)[ws]}var xl=lr(Ea,ie.direction);return Xt(xl,Ri||0,ba==null?go:ba,function(Rs,wl,Ga,Ms){var ws=Ga=="ltr",ks=xs(Rs,ws?"left":"right"),Ts=xs(wl-1,ws?"right":"left"),mu=Ri==null&&Rs==0,_l=ba==null&&wl==go,el=Ms==0,No=!xl||Ms==xl.length-1;if(Ts.top-ks.top<=3){var Zs=(Ke?mu:_l)&&el,bd=(Ke?_l:mu)&&No,Pc=Zs?Pe:(ws?ks:Ts).left,Uc=bd?Ne:(ws?Ts:ks).right;It(Pc,ks.top,Uc-Pc,ks.bottom)}else{var xc,Ns,gu,tl;ws?(xc=Ke&&mu&&el?Pe:ks.left,Ns=Ke?Ne:bl(Rs,Ga,"before"),gu=Ke?Pe:bl(wl,Ga,"after"),tl=Ke&&_l&&No?Ne:Ts.right):(xc=Ke?bl(Rs,Ga,"before"):Pe,Ns=!Ke&&mu&&el?Ne:ks.right,gu=!Ke&&_l&&No?Pe:Ts.left,tl=Ke?bl(wl,Ga,"after"):Ne),It(xc,ks.top,Ns-xc,ks.bottom),ks.bottom<Ts.top&&It(Pe,ks.bottom,null,Ts.top),It(gu,Ts.top,tl-gu,Ts.bottom)}(!is||Ut(ks,is)<0)&&(is=ks),Ut(Ts,is)<0&&(is=Ts),(!js||Ut(ks,js)<0)&&(js=ks),Ut(Ts,js)<0&&(js=Ts)}),{start:is,end:js}}var Bn=z.from(),En=z.to();if(Bn.line==En.line)Wt(Bn.line,Bn.ch,En.ch);else{var wr=bn(ie,Bn.line),zr=bn(ie,En.line),ai=St(wr)==St(zr),wi=Wt(Bn.line,Bn.ch,ai?wr.text.length+1:null).end,Pi=Wt(En.line,ai?0:null,En.ch).start;ai&&(wi.top<Pi.top-2?(It(wi.right,wi.top,null,wi.bottom),It(Pe,Pi.top,Pi.left,Pi.bottom)):It(wi.right,wi.top,Pi.left-wi.right,wi.bottom)),wi.bottom<Pi.top&&It(Pe,wi.bottom,null,Pi.top)}ne.appendChild(ue)}function gn(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()||Mn(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function xn(x){x.state.focused||(x.display.input.focus(),sr(x))}function ir(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Mn(x))},100)}function sr(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(gt(x,"focus",x,z),x.state.focused=!0,nn(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),_e&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),gn(x))}function Mn(x,z){x.state.delayingBlurEvent||(x.state.focused&&(gt(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 Xn(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,xe=void 0,Pe=0;if(!ie.hidden){if(ve&&Ce<8){var Ne=ie.node.offsetTop+ie.node.offsetHeight;xe=Ne-ne,ne=Ne}else{var Ke=ie.node.getBoundingClientRect();xe=Ke.bottom-Ke.top,!ue&&ie.text.firstChild&&(Pe=ie.text.firstChild.getBoundingClientRect().right-Ke.left-1)}var It=ie.line.height-xe;if((It>.005||It<-.005)&&(Sr(ie.line,xe),Mr(ie.line),ie.rest))for(var Wt=0;Wt<ie.rest.length;Wt++)Mr(ie.rest[Wt]);if(Pe>x.display.sizerWidth){var Bn=Math.ceil(Pe/Uo(x.display));Bn>x.display.maxLineLength&&(x.display.maxLineLength=Bn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function Mr(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 Tr(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Pa(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ue=Ir(z,te),xe=Ir(z,ie);if(ne&&ne.ensure){var Pe=ne.ensure.from.line,Ne=ne.ensure.to.line;Pe<ue?(ue=Pe,xe=Ir(z,Wn(bn(z,Pe))+x.wrapper.clientHeight)):Math.min(Ne,z.lastLine())>=xe&&(ue=Ir(z,Wn(bn(z,Ne))-x.wrapper.clientHeight),xe=Ne)}return{from:ue,to:Math.max(xe,ue+1)}}function Vr(x,z){if(!sn(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&&!bt){var ue=ct("div","\u200B",null,`position: absolute;
top: `+(z.top-ne.viewOffset-Pa(x.display))+`px;
height: `+(z.bottom-z.top+bi(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 si(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?wt(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?wt(z.line,z.ch+1,"before"):z);for(var ue=0;ue<5;ue++){var xe=!1,Pe=no(x,z),Ne=!ne||ne==z?Pe:no(x,ne);ie={left:Math.min(Pe.left,Ne.left),top:Math.min(Pe.top,Ne.top)-te,right:Math.max(Pe.left,Ne.left),bottom:Math.max(Pe.bottom,Ne.bottom)+te};var Ke=hi(x,ie),It=x.doc.scrollTop,Wt=x.doc.scrollLeft;if(Ke.scrollTop!=null&&(ji(x,Ke.scrollTop),Math.abs(x.doc.scrollTop-It)>1&&(xe=!0)),Ke.scrollLeft!=null&&(Ca(x,Ke.scrollLeft),Math.abs(x.doc.scrollLeft-Wt)>1&&(xe=!0)),!xe)break}return ie}function xi(x,z){var ne=hi(x,z);ne.scrollTop!=null&&ji(x,ne.scrollTop),ne.scrollLeft!=null&&Ca(x,ne.scrollLeft)}function hi(x,z){var ne=x.display,te=Po(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ue=ia(x),xe={};z.bottom-z.top>ue&&(z.bottom=z.top+ue);var Pe=x.doc.height+Ui(ne),Ne=z.top<te,Ke=z.bottom>Pe-te;if(z.top<ie)xe.scrollTop=Ne?0:z.top;else if(z.bottom>ie+ue){var It=Math.min(z.top,(Ke?Pe:z.bottom)-ue);It!=ie&&(xe.scrollTop=It)}var Wt=x.options.fixedGutter?0:ne.gutters.offsetWidth,Bn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Wt,En=zi(x)-ne.gutters.offsetWidth,wr=z.right-z.left>En;return wr&&(z.right=z.left+En),z.left<10?xe.scrollLeft=0:z.left<Bn?xe.scrollLeft=Math.max(0,z.left+Wt-(wr?0:10)):z.right>En+Bn-3&&(xe.scrollLeft=z.right+(wr?0:10)-En),xe}function Xr(x,z){z!=null&&(Ua(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function da(x){Ua(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ji(x,z,ne){(z!=null||ne!=null)&&Ua(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Na(x,z){Ua(x),x.curOp.scrollToPos=z}function Ua(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=ao(x,z.from),te=ao(x,z.to);Sa(x,ne,te,z.margin)}}function Sa(x,z,ne,te){var ie=hi(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});Ji(x,ie.scrollLeft,ie.scrollTop)}function ji(x,z){Math.abs(x.doc.scrollTop-z)<2||(fe||Dl(x,{top:z}),$a(x,z,!0),fe&&Dl(x),bo(x,100))}function $a(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 Ca(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,dl(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function fa(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+Ui(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+bi(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var La=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),Sn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),Sn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&Ce<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};La.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}},La.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},La.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},La.prototype.zeroWidthHack=function(){var x=Le&&!Re?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Me,this.disableVert=new Me},La.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)},La.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var Oa=function(){};Oa.prototype.update=function(){return{bottom:0,right:0}},Oa.prototype.setScrollLeft=function(){},Oa.prototype.setScrollTop=function(){},Oa.prototype.clear=function(){};function oo(x,z){z||(z=fa(x));var ne=x.display.barWidth,te=x.display.barHeight;fo(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&Xn(x),fo(x,fa(x)),ne=x.display.barWidth,te=x.display.barHeight}function fo(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 $o={native:La,null:Oa};function cs(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&je(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new $o[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),Sn(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"?Ca(x,z):ji(x,z)},x),x.display.scrollbars.addClass&&nn(x.display.wrapper,x.display.scrollbars.addClass)}var ss=0;function jo(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:++ss},_n(x.curOp)}function Lo(x){var z=x.curOp;z&&fr(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;ps(ne)})}function ps(x){for(var z=x.ops,ne=0;ne<z.length;ne++)Oo(z[ne]);for(var te=0;te<z.length;te++)ya(z[te]);for(var ie=0;ie<z.length;ie++)ma(z[ie]);for(var ue=0;ue<z.length;ue++)Do(z[ue]);for(var xe=0;xe<z.length;xe++)Mo(z[xe])}function Oo(x){var z=x.cm,ne=z.display;Ko(z),x.updateMaxLine&&Jn(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 Fo(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function ya(x){x.updatedDisplay=x.mustUpdate&&al(x.cm,x.update)}function ma(x){var z=x.cm,ne=z.display;x.updatedDisplay&&Xn(z),x.barMeasure=fa(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=po(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+bi(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-zi(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Do(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&Ca(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==pt();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&oo(z,x.barMeasure),x.updatedDisplay&&Ls(z,x.barMeasure),x.selectionChanged&&gn(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&xn(x.cm)}function Mo(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Bs(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&$a(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&Ca(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=si(z,rr(te,x.scrollToPos.from),rr(te,x.scrollToPos.to),x.scrollToPos.margin);Vr(z,ie)}var ue=x.maybeHiddenMarkers,xe=x.maybeUnhiddenMarkers;if(ue)for(var Pe=0;Pe<ue.length;++Pe)ue[Pe].lines.length||gt(ue[Pe],"hide");if(xe)for(var Ne=0;Ne<xe.length;++Ne)xe[Ne].lines.length&&gt(xe[Ne],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&gt(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function Da(x,z){if(x.curOp)return z();jo(x);try{return z()}finally{Lo(x)}}function Qa(x,z){return function(){if(x.curOp)return z.apply(x,arguments);jo(x);try{return z.apply(x,arguments)}finally{Lo(x)}}}function Di(x){return function(){if(this.curOp)return x.apply(this,arguments);jo(this);try{return x.apply(this,arguments)}finally{Lo(this)}}}function ja(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);jo(z);try{return x.apply(this,arguments)}finally{Lo(z)}}}function bo(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,pn(Go,x))}function Go(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=Wi(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 xe=ue.styles,Pe=ue.text.length>x.options.maxHighlightLength?Mt(z.mode,te.state):null,Ne=ha(x,ue,te,!0);Pe&&(te.state=Pe),ue.styles=Ne.styles;var Ke=ue.styleClasses,It=Ne.classes;It?ue.styleClasses=It:Ke&&(ue.styleClasses=null);for(var Wt=!xe||xe.length!=ue.styles.length||Ke!=It&&(!Ke||!It||Ke.bgClass!=It.bgClass||Ke.textClass!=It.textClass),Bn=0;!Wt&&Bn<xe.length;++Bn)Wt=xe[Bn]!=ue.styles[Bn];Wt&&ie.push(te.line),ue.stateAfter=te.save(),te.nextLine()}else ue.text.length<=x.options.maxHighlightLength&&Ta(x,ue.text,te),ue.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return bo(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&Da(x,function(){for(var ue=0;ue<ie.length;ue++)ke(x,ie[ue],"text")})}}var Fo=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=Tr(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=zi(x),this.force=ne,this.dims=qo(x),this.events=[]};Fo.prototype.signal=function(x,z){Zn(x,z)&&this.events.push(arguments)},Fo.prototype.finish=function(){for(var x=0;x<this.events.length;x++)gt.apply(null,this.events[x])};function Ko(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=bi(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=bi(x)+"px",z.scrollbarsClipped=!0)}function Es(x){if(x.hasFocus())return null;var z=pt();if(!z||!kt(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&kt(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Sl(x){if(!(!x||!x.activeElt||x.activeElt==pt())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&kt(document.body,x.anchorNode)&&kt(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 al(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return De(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&&an(x)==0)return!1;Fs(x)&&(De(x),z.dims=qo(x));var ie=te.first+te.size,ue=Math.max(z.visible.from-x.options.viewportMargin,te.first),xe=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>xe&&ne.viewTo-xe<20&&(xe=Math.min(ie,ne.viewTo)),ki&&(ue=Ln(x.doc,ue),xe=br(x.doc,xe));var Pe=ue!=ne.viewFrom||xe!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;at(x,ue,xe),ne.viewOffset=Wn(bn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Ne=an(x);if(!Pe&&Ne==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Ke=Es(x);return Ne>4&&(ne.lineDiv.style.display="none"),Mc(x,ne.updateLineNumbers,z.dims),Ne>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Sl(Ke),ze(ne.cursorDiv),ze(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Pe&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,bo(x,400)),ne.updateLineNumbers=null,!0}function Bs(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==zi(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+Ui(x.display)-ia(x),ne.top)}),z.visible=Tr(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=Tr(x.display,x.doc,ne));if(!al(x,z))break;Xn(x);var ie=fa(x);Zt(x),oo(x,ie),Ls(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 Dl(x,z){var ne=new Fo(x,z);if(al(x,ne)){Xn(x),Bs(x,ne);var te=fa(x);Zt(x),oo(x,te),Ls(x,te),ne.finish()}}function Mc(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ue=te.lineDiv,xe=ue.firstChild;function Pe(wr){var zr=wr.nextSibling;return _e&&Le&&x.display.currentWheelTarget==wr?wr.style.display="none":wr.parentNode.removeChild(wr),zr}for(var Ne=te.view,Ke=te.viewFrom,It=0;It<Ne.length;It++){var Wt=Ne[It];if(!Wt.hidden)if(!Wt.node||Wt.node.parentNode!=ue){var Bn=Ni(x,Wt,Ke,ne);ue.insertBefore(Bn,xe)}else{for(;xe!=Wt.node;)xe=Pe(xe);var En=ie&&z!=null&&z<=Ke&&Wt.lineNumber;Wt.changes&&(mt(Wt.changes,"gutter")>-1&&(En=!1),yi(x,Wt,Ke,ne)),En&&(ze(Wt.lineNumber),Wt.lineNumber.appendChild(document.createTextNode(Lt(x.options,Ke)))),xe=Wt.node.nextSibling}Ke+=Wt.size}for(;xe;)xe=Pe(xe)}function Bl(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Ls(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+bi(x)+"px"}function dl(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=ls(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,ue=te+"px",xe=0;xe<ne.length;xe++)if(!ne[xe].hidden){x.options.fixedGutter&&(ne[xe].gutter&&(ne[xe].gutter.style.left=ue),ne[xe].gutterBackground&&(ne[xe].gutterBackground.style.left=ue));var Pe=ne[xe].alignable;if(Pe)for(var Ne=0;Ne<Pe.length;Ne++)Pe[Ne].style.left=ue}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function Fs(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=Lt(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,xe=ie.offsetWidth-ue;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(ue,te.lineGutter.offsetWidth-xe)+1,te.lineNumWidth=te.lineNumInnerWidth+xe,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",Bl(x.display),!0}return!1}function Fl(x,z){for(var ne=[],te=!1,ie=0;ie<x.length;ie++){var ue=x[ie],xe=null;if(typeof ue!="string"&&(xe=ue.style,ue=ue.className),ue=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:ue,style:xe})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function Al(x){var z=x.gutters,ne=x.gutterSpecs;ze(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ue=ie.className,xe=ie.style,Pe=z.appendChild(ct("div",null,"CodeMirror-gutter "+ue));xe&&(Pe.style.cssText=xe),ue=="CodeMirror-linenumbers"&&(x.lineGutter=Pe,Pe.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Bl(x)}function zs(x){Al(x.display),ye(x),dl(x)}function us(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=lt("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=lt("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ue=lt("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: "+Gt+"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&&Ce<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!_e&&!(fe&&tt)&&(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=Fl(te.gutters,te.lineNumbers),Al(ie),ne.init(ie)}var $s=0,es=null;ve?es=-.53:fe?es=15:ge?es=-.7:ft&&(es=-1/3);function Gs(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 Ys(x){var z=Gs(x);return z.x*=es,z.y*=es,z}function ol(x,z){var ne=Gs(z),te=ne.x,ie=ne.y,ue=x.display,xe=ue.scroller,Pe=xe.scrollWidth>xe.clientWidth,Ne=xe.scrollHeight>xe.clientHeight;if(te&&Pe||ie&&Ne){if(ie&&Le&&_e){e:for(var Ke=z.target,It=ue.view;Ke!=xe;Ke=Ke.parentNode)for(var Wt=0;Wt<It.length;Wt++)if(It[Wt].node==Ke){x.display.currentWheelTarget=Ke;break e}}if(te&&!fe&&!Te&&es!=null){ie&&Ne&&ji(x,Math.max(0,xe.scrollTop+ie*es)),Ca(x,Math.max(0,xe.scrollLeft+te*es)),(!ie||ie&&Ne)&&Kr(z),ue.wheelStartX=null;return}if(ie&&es!=null){var Bn=ie*es,En=x.doc.scrollTop,wr=En+ue.wrapper.clientHeight;Bn<0?En=Math.max(0,En+Bn-50):wr=Math.min(x.doc.height,wr+Bn+50),Dl(x,{top:En,bottom:wr})}$s<20&&(ue.wheelStartX==null?(ue.wheelStartX=xe.scrollLeft,ue.wheelStartY=xe.scrollTop,ue.wheelDX=te,ue.wheelDY=ie,setTimeout(function(){if(ue.wheelStartX!=null){var zr=xe.scrollLeft-ue.wheelStartX,ai=xe.scrollTop-ue.wheelStartY,wi=ai&&ue.wheelDY&&ai/ue.wheelDY||zr&&ue.wheelDX&&zr/ue.wheelDX;ue.wheelStartX=ue.wheelStartY=null,wi&&(es=(es*$s+wi)/($s+1),++$s)}},200)):(ue.wheelDX+=te,ue.wheelDY+=ie))}}var fs=function(x,z){this.ranges=x,this.primIndex=z};fs.prototype.primary=function(){return this.ranges[this.primIndex]},fs.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(!Dn(ne.anchor,te.anchor)||!Dn(ne.head,te.head))return!1}return!0},fs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new Fa(er(this.ranges[z].anchor),er(this.ranges[z].head));return new fs(x,this.primIndex)},fs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},fs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Ot(z,te.from())>=0&&Ot(x,te.to())<=0)return ne}return-1};var Fa=function(x,z){this.anchor=x,this.head=z};Fa.prototype.from=function(){return Rn(this.anchor,this.head)},Fa.prototype.to=function(){return An(this.anchor,this.head)},Fa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ts(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(Bn,En){return Ot(Bn.from(),En.from())}),ne=mt(z,ie);for(var ue=1;ue<z.length;ue++){var xe=z[ue],Pe=z[ue-1],Ne=Ot(Pe.to(),xe.from());if(te&&!xe.empty()?Ne>0:Ne>=0){var Ke=Rn(Pe.from(),xe.from()),It=An(Pe.to(),xe.to()),Wt=Pe.empty()?xe.from()==xe.head:Pe.from()==Pe.head;ue<=ne&&--ne,z.splice(--ue,2,new Fa(Wt?It:Ke,Wt?Ke:It))}}return new fs(z,ne)}function Os(x,z){return new fs([new Fa(x,z||x)],0)}function Wo(x){return x.text?wt(x.from.line+x.text.length-1,en(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function Us(x,z){if(Ot(x,z.from)<0)return x;if(Ot(x,z.to)<=0)return Wo(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+=Wo(z).ch-z.to.ch),wt(ne,te)}function ml(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new Fa(Us(ie.anchor,z),Us(ie.head,z)))}return ts(x.cm,ne,x.sel.primIndex)}function Co(x,z,ne){return x.line==z.line?wt(ne.line,x.ch-z.ch+ne.ch):wt(ne.line+(x.line-z.line),x.ch)}function gl(x,z,ne){for(var te=[],ie=wt(x.first,0),ue=ie,xe=0;xe<z.length;xe++){var Pe=z[xe],Ne=Co(Pe.from,ie,ue),Ke=Co(Wo(Pe),ie,ue);if(ie=Pe.to,ue=Ke,ne=="around"){var It=x.sel.ranges[xe],Wt=Ot(It.head,It.anchor)<0;te[xe]=new Fa(Wt?Ke:Ne,Wt?Ne:Ke)}else te[xe]=new Fa(Ne,Ne)}return new fs(te,x.sel.primIndex)}function sl(x){x.doc.mode=zt(x.options,x.doc.modeOption),Hs(x)}function Hs(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,bo(x,100),x.state.modeGen++,x.curOp&&ye(x)}function jl(x,z){return z.from.ch==0&&z.to.ch==0&&en(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Cl(x,z,ne,te){function ie(Pi){return ne?ne[Pi]:null}function ue(Pi,mi,Ri){$r(Pi,mi,Ri,te),ur(Pi,"change",Pi,z)}function xe(Pi,mi){for(var Ri=[],ba=Pi;ba<mi;++ba)Ri.push(new ar(Ke[ba],ie(ba),te));return Ri}var Pe=z.from,Ne=z.to,Ke=z.text,It=bn(x,Pe.line),Wt=bn(x,Ne.line),Bn=en(Ke),En=ie(Ke.length-1),wr=Ne.line-Pe.line;if(z.full)x.insert(0,xe(0,Ke.length)),x.remove(Ke.length,x.size-Ke.length);else if(jl(x,z)){var zr=xe(0,Ke.length-1);ue(Wt,Wt.text,En),wr&&x.remove(Pe.line,wr),zr.length&&x.insert(Pe.line,zr)}else if(It==Wt)if(Ke.length==1)ue(It,It.text.slice(0,Pe.ch)+Bn+It.text.slice(Ne.ch),En);else{var ai=xe(1,Ke.length-1);ai.push(new ar(Bn+It.text.slice(Ne.ch),En,te)),ue(It,It.text.slice(0,Pe.ch)+Ke[0],ie(0)),x.insert(Pe.line+1,ai)}else if(Ke.length==1)ue(It,It.text.slice(0,Pe.ch)+Ke[0]+Wt.text.slice(Ne.ch),ie(0)),x.remove(Pe.line+1,wr);else{ue(It,It.text.slice(0,Pe.ch)+Ke[0],ie(0)),ue(Wt,Bn+Wt.text.slice(Ne.ch),En);var wi=xe(1,Ke.length-1);wr>1&&x.remove(Pe.line+1,wr-1),x.insert(Pe.line+1,wi)}ur(x,"change",x,z)}function fl(x,z,ne){function te(ie,ue,xe){if(ie.linked)for(var Pe=0;Pe<ie.linked.length;++Pe){var Ne=ie.linked[Pe];if(Ne.doc!=ue){var Ke=xe&&Ne.sharedHist;ne&&!Ke||(z(Ne.doc,Ke),te(Ne.doc,ie,Ke))}}}te(x,null,!0)}function El(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,Qo(x),sl(x),za(x),x.options.lineWrapping||Jn(x),x.options.mode=z.modeOption,ye(x)}function za(x){(x.doc.direction=="rtl"?nn:je)(x.display.lineDiv,"CodeMirror-rtl")}function Ii(x){Da(x,function(){za(x),ye(x)})}function eo(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 ns(x,z){var ne={from:er(z.from),to:Wo(z),text:Fn(x,z.from,z.to)};return Za(x,ne,z.from.line,z.to.line+1),fl(x,function(te){return Za(te,ne,z.from.line,z.to.line+1)},!0),ne}function hl(x){for(;x.length;){var z=en(x);if(z.ranges)x.pop();else break}}function kc(x,z){if(z)return hl(x.done),en(x.done);if(x.done.length&&!en(x.done).ranges)return en(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),en(x.done)}function Gl(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ue=+new Date,xe,Pe;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)=="*"))&&(xe=kc(ie,ie.lastOp==te)))Pe=en(xe.changes),Ot(z.from,z.to)==0&&Ot(z.from,Pe.to)==0?Pe.to=Wo(z):xe.changes.push(ns(x,z));else{var Ne=en(ie.done);for((!Ne||!Ne.ranges)&&ms(x.sel,ie.done),xe={changes:[ns(x,z)],generation:ie.generation},ie.done.push(xe);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,Pe||gt(x,"historyAdded")}function _c(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 Yl(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||_c(x,ue,en(ie.done),z))?ie.done[ie.done.length-1]=z:ms(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ue,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&hl(ie.undone)}function ms(x,z){var ne=en(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function Za(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(xe){xe.markedSpans&&((ie||(ie=z["spans_"+x.id]={}))[ue]=xe.markedSpans),++ue})}function fc(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 vl(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(fc(ne[ie]));return te}function Rc(x,z){var ne=vl(x,z),te=gi(x,z);if(!ne)return te;if(!te)return ne;for(var ie=0;ie<ne.length;++ie){var ue=ne[ie],xe=te[ie];if(ue&&xe)e:for(var Pe=0;Pe<xe.length;++Pe){for(var Ne=xe[Pe],Ke=0;Ke<ue.length;++Ke)if(ue[Ke].marker==Ne.marker)continue e;ue.push(Ne)}else xe&&(ne[ie]=xe)}return ne}function Xl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ue=x[ie];if(ue.ranges){te.push(ne?fs.prototype.deepCopy.call(ue):ue);continue}var xe=ue.changes,Pe=[];te.push({changes:Pe});for(var Ne=0;Ne<xe.length;++Ne){var Ke=xe[Ne],It=void 0;if(Pe.push({from:Ke.from,to:Ke.to,text:Ke.text}),z)for(var Wt in Ke)(It=Wt.match(/^spans_(\d+)$/))&&mt(z,Number(It[1]))>-1&&(en(Pe)[Wt]=Ke[Wt],delete Ke[Wt])}}return te}function Nc(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ue=Ot(z,ie)<0;ue!=Ot(ne,ie)<0?(ie=z,z=ne):ue!=Ot(z,ne)<0&&(z=ne)}return new Fa(ie,z)}else return new Fa(ne||z,z)}function zl(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),Ai(x,new fs([Nc(x.sel.primary(),z,ne,ie)],0),te)}function _i(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]=Nc(x.sel.ranges[ue],z[ue],null,ie);var xe=ts(x.cm,te,x.sel.primIndex);Ai(x,xe,ne)}function Xs(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,Ai(x,ts(x.cm,ie,x.sel.primIndex),te)}function au(x,z,ne,te){Ai(x,Os(z,ne),te)}function ou(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 Fa(rr(x,ie[ue].anchor),rr(x,ie[ue].head))},origin:ne&&ne.origin};return gt(x,"beforeSelectionChange",x,te),x.cm&&gt(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?ts(x.cm,te.ranges,te.ranges.length-1):z}function xo(x,z,ne){var te=x.history.done,ie=en(te);ie&&ie.ranges?(te[te.length-1]=z,Ds(x,z,ne)):Ai(x,z,ne)}function Ai(x,z,ne){Ds(x,z,ne),Yl(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function Ds(x,z,ne){(Zn(x,"beforeSelectionChange")||x.cm&&Zn(x.cm,"beforeSelectionChange"))&&(z=ou(x,z,ne));var te=ne&&ne.bias||(Ot(z.primary().head,x.sel.primary().head)<0?-1:1);Js(x,hc(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&da(x.cm)}function Js(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,tr(x.cm)),ur(x,"cursorActivity",x))}function cd(x){Js(x,hc(x,x.sel,null,!1))}function hc(x,z,ne,te){for(var ie,ue=0;ue<z.ranges.length;ue++){var xe=z.ranges[ue],Pe=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ue],Ne=su(x,xe.anchor,Pe&&Pe.anchor,ne,te),Ke=su(x,xe.head,Pe&&Pe.head,ne,te);(ie||Ne!=xe.anchor||Ke!=xe.head)&&(ie||(ie=z.ranges.slice(0,ue)),ie[ue]=new Fa(Ne,Ke))}return ie?ts(x.cm,ie,z.primIndex):z}function qs(x,z,ne,te,ie){var ue=bn(x,z.line);if(ue.markedSpans)for(var xe=0;xe<ue.markedSpans.length;++xe){var Pe=ue.markedSpans[xe],Ne=Pe.marker,Ke="selectLeft"in Ne?!Ne.selectLeft:Ne.inclusiveLeft,It="selectRight"in Ne?!Ne.selectRight:Ne.inclusiveRight;if((Pe.from==null||(Ke?Pe.from<=z.ch:Pe.from<z.ch))&&(Pe.to==null||(It?Pe.to>=z.ch:Pe.to>z.ch))){if(ie&&(gt(Ne,"beforeCursorEnter"),Ne.explicitlyCleared))if(ue.markedSpans){--xe;continue}else break;if(!Ne.atomic)continue;if(ne){var Wt=Ne.find(te<0?1:-1),Bn=void 0;if((te<0?It:Ke)&&(Wt=Ml(x,Wt,-te,Wt&&Wt.line==z.line?ue:null)),Wt&&Wt.line==z.line&&(Bn=Ot(Wt,ne))&&(te<0?Bn<0:Bn>0))return qs(x,Wt,z,te,ie)}var En=Ne.find(te<0?-1:1);return(te<0?Ke:It)&&(En=Ml(x,En,te,En.line==z.line?ue:null)),En?qs(x,En,z,te,ie):null}}return z}function su(x,z,ne,te,ie){var ue=te||1,xe=qs(x,z,ne,ue,ie)||!ie&&qs(x,z,ne,ue,!0)||qs(x,z,ne,-ue,ie)||!ie&&qs(x,z,ne,-ue,!0);return xe||(x.cantEdit=!0,wt(x.first,0))}function Ml(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?rr(x,wt(z.line-1)):null:ne>0&&z.ch==(te||bn(x,z.line)).text.length?z.line<x.first+x.size-1?wt(z.line+1,0):null:new wt(z.line,z.ch+ne)}function Fu(x){x.setSelection(wt(x.firstLine(),0),wt(x.lastLine()),Qe)}function wu(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,xe,Pe){ie&&(te.from=rr(x,ie)),ue&&(te.to=rr(x,ue)),xe&&(te.text=xe),Pe!==void 0&&(te.origin=Pe)}),gt(x,"beforeChange",x,te),x.cm&&gt(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 Jl(x,z,ne){if(x.cm){if(!x.cm.curOp)return Qa(x.cm,Jl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((Zn(x,"beforeChange")||x.cm&&Zn(x.cm,"beforeChange"))&&(z=wu(x,z,!0),!z))){var te=Ba&&!ne&&Mi(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)Bc(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else Bc(x,z)}}function Bc(x,z){if(!(z.text.length==1&&z.text[0]==""&&Ot(z.from,z.to)==0)){var ne=ml(x,z);Gl(x,z,ne,x.cm?x.cm.curOp.id:NaN),Lc(x,z,ne,gi(x,z));var te=[];fl(x,function(ie,ue){!ue&&mt(te,ie.history)==-1&&(cu(ie.history,z),te.push(ie.history)),Lc(ie,z,null,gi(ie,z))})}}function ql(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ue,xe=x.sel,Pe=z=="undo"?ie.done:ie.undone,Ne=z=="undo"?ie.undone:ie.done,Ke=0;Ke<Pe.length&&(ue=Pe[Ke],!(ne?ue.ranges&&!ue.equals(x.sel):!ue.ranges));Ke++);if(Ke!=Pe.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ue=Pe.pop(),ue.ranges){if(ms(ue,Ne),ne&&!ue.equals(x.sel)){Ai(x,ue,{clearRedo:!1});return}xe=ue}else if(te){Pe.push(ue);return}else break;var It=[];ms(xe,Ne),Ne.push({changes:It,generation:ie.generation}),ie.generation=ue.generation||++ie.maxGeneration;for(var Wt=Zn(x,"beforeChange")||x.cm&&Zn(x.cm,"beforeChange"),Bn=function(zr){var ai=ue.changes[zr];if(ai.origin=z,Wt&&!wu(x,ai,!1))return Pe.length=0,{};It.push(ns(x,ai));var wi=zr?ml(x,ai):en(Pe);Lc(x,ai,wi,Rc(x,ai)),!zr&&x.cm&&x.cm.scrollIntoView({from:ai.from,to:Wo(ai)});var Pi=[];fl(x,function(mi,Ri){!Ri&&mt(Pi,mi.history)==-1&&(cu(mi.history,ai),Pi.push(mi.history)),Lc(mi,ai,null,Rc(mi,ai))})},En=ue.changes.length-1;En>=0;--En){var wr=Bn(En);if(wr)return wr.v}}}}function lu(x,z){if(z!=0&&(x.first+=z,x.sel=new fs(Cn(x.sel.ranges,function(ie){return new Fa(wt(ie.anchor.line+z,ie.anchor.ch),wt(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){ye(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)ke(x.cm,te,"gutter")}}function Lc(x,z,ne,te){if(x.cm&&!x.cm.curOp)return Qa(x.cm,Lc)(x,z,ne,te);if(z.to.line<x.first){lu(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);lu(x,ie),z={from:wt(x.first,0),to:wt(z.to.line+ie,z.to.ch),text:[en(z.text)],origin:z.origin}}var ue=x.lastLine();z.to.line>ue&&(z={from:z.from,to:wt(ue,bn(x,ue).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Fn(x,z.from,z.to),ne||(ne=ml(x,z)),x.cm?Su(x.cm,z,te):Cl(x,z,te),Ds(x,ne,Qe),x.cantEdit&&su(x,wt(x.firstLine(),0))&&(x.cantEdit=!1)}}function Su(x,z,ne){var te=x.doc,ie=x.display,ue=z.from,xe=z.to,Pe=!1,Ne=ue.line;x.options.lineWrapping||(Ne=vr(St(bn(te,ue.line))),te.iter(Ne,xe.line+1,function(En){if(En==ie.maxLine)return Pe=!0,!0})),te.sel.contains(z.from,z.to)>-1&&tr(x),Cl(te,z,ne,Ss(x)),x.options.lineWrapping||(te.iter(Ne,ue.line+z.text.length,function(En){var wr=Tn(En);wr>ie.maxLineLength&&(ie.maxLine=En,ie.maxLineLength=wr,ie.maxLineChanged=!0,Pe=!1)}),Pe&&(x.curOp.updateMaxLine=!0)),Ya(te,ue.line),bo(x,400);var Ke=z.text.length-(xe.line-ue.line)-1;z.full?ye(x):ue.line==xe.line&&z.text.length==1&&!jl(x.doc,z)?ke(x,ue.line,"text"):ye(x,ue.line,xe.line+1,Ke);var It=Zn(x,"changes"),Wt=Zn(x,"change");if(Wt||It){var Bn={from:ue,to:xe,text:z.text,removed:z.removed,origin:z.origin};Wt&&ur(x,"change",x,Bn),It&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(Bn)}x.display.selForContextMenu=null}function Ql(x,z,ne,te,ie){var ue;te||(te=ne),Ot(te,ne)<0&&(ue=[te,ne],ne=ue[0],te=ue[1]),typeof z=="string"&&(z=x.splitLines(z)),Jl(x,{from:ne,to:te,text:z,origin:ie})}function zu(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function Hu(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ue=x[ie],xe=!0;if(ue.ranges){ue.copied||(ue=x[ie]=ue.deepCopy(),ue.copied=!0);for(var Pe=0;Pe<ue.ranges.length;Pe++)zu(ue.ranges[Pe].anchor,z,ne,te),zu(ue.ranges[Pe].head,z,ne,te);continue}for(var Ne=0;Ne<ue.changes.length;++Ne){var Ke=ue.changes[Ne];if(ne<Ke.from.line)Ke.from=wt(Ke.from.line+te,Ke.from.ch),Ke.to=wt(Ke.to.line+te,Ke.to.ch);else if(z<=Ke.to.line){xe=!1;break}}xe||(x.splice(0,ie+1),ie=0)}}function cu(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;Hu(x.done,ne,te,ie),Hu(x.undone,ne,te,ie)}function Dc(x,z,ne,te){var ie=z,ue=z;return typeof z=="number"?ue=bn(x,Nn(x,z)):ie=vr(z),ie==null?null:(te(ue,ie)&&x.cm&&ke(x.cm,ie,ne),ue)}function Tl(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}Tl.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,mr(ie),ur(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 Ac(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}Ac.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),xe=te.height;if(te.removeInner(x,ue),this.height-=xe-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 Tl))){var Pe=[];this.collapse(Pe),this.children=[new Tl(Pe)],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 xe=ie.lines.length%25+25,Pe=xe;Pe<ie.lines.length;){var Ne=new Tl(ie.lines.slice(Pe,Pe+=25));ie.height-=Ne.height,this.children.splice(++te,0,Ne),Ne.parent=this}ie.lines=ie.lines.slice(0,xe),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 Ac(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=mt(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new Ac(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 xe=Math.min(z,ue-x);if(ie.iterN(x,xe,ne))return!0;if((z-=xe)==0)break;x=0}else x-=ue}}};var Tc=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};Tc.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=vr(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=pa(this);Sr(ne,Math.max(0,ne.height-ue)),x&&(Da(x,function(){ud(x,ne,-ue),ke(x,te,"widget")}),ur(x,"lineWidgetCleared",x,this,te))}},Tc.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=pa(this)-z;ie&&(Br(this.doc,te)||Sr(te,te.height+ie),ne&&Da(ne,function(){ne.curOp.forceUpdate=!0,ud(ne,te,ie),ur(ne,"lineWidgetChanged",ne,x,vr(te))}))},xr(Tc);function ud(x,z,ne){Wn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Xr(x,ne)}function Ku(x,z,ne,te){var ie=new Tc(x,ne,te),ue=x.cm;return ue&&ie.noHScroll&&(ue.display.alignWidgets=!0),Dc(x,z,"widget",function(xe){var Pe=xe.widgets||(xe.widgets=[]);if(ie.insertAt==null?Pe.push(ie):Pe.splice(Math.min(Pe.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=xe,ue&&!Br(x,xe)){var Ne=Wn(xe)<x.scrollTop;Sr(xe,xe.height+pa(ie)),Ne&&Xr(ue,ie.height),ue.curOp.forceUpdate=!0}return!0}),ue&&ur(ue,"lineWidgetAdded",ue,ie,typeof z=="number"?z:vr(z)),ie}var dd=0,pc=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++dd};pc.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&jo(x),Zn(this,"clear")){var ne=this.find();ne&&ur(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ue=0;ue<this.lines.length;++ue){var xe=this.lines[ue],Pe=$n(xe.markedSpans,this);x&&!this.collapsed?ke(x,vr(xe),"text"):x&&(Pe.to!=null&&(ie=vr(xe)),Pe.from!=null&&(te=vr(xe))),xe.markedSpans=Qn(xe.markedSpans,Pe),Pe.from==null&&this.collapsed&&!Br(this.doc,xe)&&x&&Sr(xe,Po(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Ne=0;Ne<this.lines.length;++Ne){var Ke=St(this.lines[Ne]),It=Tn(Ke);It>x.display.maxLineLength&&(x.display.maxLine=Ke,x.display.maxLineLength=It,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&ye(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&cd(x.doc)),x&&ur(x,"markerCleared",x,this,te,ie),z&&Lo(x),this.parent&&this.parent.clear()}},pc.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],xe=$n(ue.markedSpans,this);if(xe.from!=null&&(ne=wt(z?ue:vr(ue),xe.from),x==-1))return ne;if(xe.to!=null&&(te=wt(z?ue:vr(ue),xe.to),x==1))return te}return ne&&{from:ne,to:te}},pc.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||Da(te,function(){var ie=z.line,ue=vr(z.line),xe=Xa(te,ue);if(xe&&(wa(xe),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!Br(ne.doc,ie)&&ne.height!=null){var Pe=ne.height;ne.height=null;var Ne=pa(ne)-Pe;Ne&&Sr(ie,ie.height+Ne)}ur(te,"markerChanged",te,x)})},pc.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||mt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},pc.prototype.detachLine=function(x){if(this.lines.splice(mt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},xr(pc);function ec(x,z,ne,te,ie){if(te&&te.shared)return Ro(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return Qa(x.cm,ec)(x,z,ne,te,ie);var ue=new pc(x,ie),xe=Ot(z,ne);if(te&&cn(te,ue,!1),xe>0||xe==0&&ue.clearWhenEmpty!==!1)return ue;if(ue.replacedWith&&(ue.collapsed=!0,ue.widgetNode=lt("span",[ue.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ue.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ue.widgetNode.insertLeft=!0)),ue.collapsed){if(vt(x,z.line,z,ne,ue)||z.line!=ne.line&&vt(x,ne.line,z,ne,ue))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt()}ue.addToHistory&&Gl(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Pe=z.line,Ne=x.cm,Ke;if(x.iter(Pe,ne.line+1,function(Wt){Ne&&ue.collapsed&&!Ne.options.lineWrapping&&St(Wt)==Ne.display.maxLine&&(Ke=!0),ue.collapsed&&Pe!=z.line&&Sr(Wt,0),Or(Wt,new mn(ue,Pe==z.line?z.ch:null,Pe==ne.line?ne.ch:null)),++Pe}),ue.collapsed&&x.iter(z.line,ne.line+1,function(Wt){Br(x,Wt)&&Sr(Wt,0)}),ue.clearOnEnter&&Sn(ue,"beforeCursorEnter",function(){return ue.clear()}),ue.readOnly&&(Rt(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ue.collapsed&&(ue.id=++dd,ue.atomic=!0),Ne){if(Ke&&(Ne.curOp.updateMaxLine=!0),ue.collapsed)ye(Ne,z.line,ne.line+1);else if(ue.className||ue.startStyle||ue.endStyle||ue.css||ue.attributes||ue.title)for(var It=z.line;It<=ne.line;It++)ke(Ne,It,"text");ue.atomic&&cd(Ne.doc),ur(Ne,"markerAdded",Ne,ue)}return ue}var io=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};io.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();ur(this,"clear")}},io.prototype.find=function(x,z){return this.primary.find(x,z)},xr(io);function Ro(x,z,ne,te,ie){te=cn(te),te.shared=!1;var ue=[ec(x,z,ne,te,ie)],xe=ue[0],Pe=te.widgetNode;return fl(x,function(Ne){Pe&&(te.widgetNode=Pe.cloneNode(!0)),ue.push(ec(Ne,rr(Ne,z),rr(Ne,ne),te,ie));for(var Ke=0;Ke<Ne.linked.length;++Ke)if(Ne.linked[Ke].isParent)return;xe=en(ue)}),new io(ue,xe)}function tc(x){return x.findMarks(wt(x.first,0),x.clipPos(wt(x.lastLine())),function(z){return z.parent})}function fd(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ie=te.find(),ue=x.clipPos(ie.from),xe=x.clipPos(ie.to);if(Ot(ue,xe)){var Pe=ec(x,ue,xe,te.primary,te.primary.type);te.markers.push(Pe),Pe.parent=te}}}function ll(x){for(var z=function(te){var ie=x[te],ue=[ie.primary.doc];fl(ie.primary.doc,function(Ne){return ue.push(Ne)});for(var xe=0;xe<ie.markers.length;xe++){var Pe=ie.markers[xe];mt(ue,Pe.doc)==-1&&(Pe.parent=null,ie.markers.splice(xe--,1))}},ne=0;ne<x.length;ne++)z(ne)}var Wu=0,ys=function(x,z,ne,te,ie){if(!(this instanceof ys))return new ys(x,z,ne,te,ie);ne==null&&(ne=0),Ac.call(this,[new Tl([new ar("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ue=wt(ne,0);this.sel=Os(ue),this.history=new eo(null),this.id=++Wu,this.modeOption=z,this.lineSep=te,this.direction=ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Cl(this,{from:ue,to:ue,text:x}),Ai(this,Os(ue),Qe)};ys.prototype=ce(Ac.prototype,{constructor:ys,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=Nr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:ja(function(x){var z=wt(this.first,0),ne=this.first+this.size-1;Jl(this,{from:z,to:wt(ne,bn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ji(this.cm,0,0),Ai(this,Os(z),Qe)}),replaceRange:function(x,z,ne,te){z=rr(this,z),ne=ne?rr(this,ne):z,Ql(this,x,z,ne,te)},getRange:function(x,z,ne){var te=Fn(this,rr(this,x),rr(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(_r(this,x))return bn(this,x)},getLineNumber:function(x){return vr(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=bn(this,x)),St(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return rr(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:ja(function(x,z,ne){au(this,rr(this,typeof x=="number"?wt(x,z||0):x),null,ne)}),setSelection:ja(function(x,z,ne){au(this,rr(this,x),rr(this,z||x),ne)}),extendSelection:ja(function(x,z,ne){zl(this,rr(this,x),z&&rr(this,z),ne)}),extendSelections:ja(function(x,z){_i(this,yn(this,x),z)}),extendSelectionsBy:ja(function(x,z){var ne=Cn(this.sel.ranges,x);_i(this,yn(this,ne),z)}),setSelections:ja(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new Fa(rr(this,x[ie].anchor),rr(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Ai(this,ts(this.cm,te,z),ne)}}),addSelection:ja(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new Fa(rr(this,x),rr(this,z||x))),Ai(this,ts(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=Fn(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=Fn(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:ja(function(x,z,ne){for(var te=[],ie=this.sel,ue=0;ue<ie.ranges.length;ue++){var xe=ie.ranges[ue];te[ue]={from:xe.from(),to:xe.to(),text:this.splitLines(x[ue]),origin:ne}}for(var Pe=z&&z!="end"&&gl(this,te,z),Ne=te.length-1;Ne>=0;Ne--)Jl(this,te[Ne]);Pe?xo(this,Pe):this.cm&&da(this.cm)}),undo:ja(function(){ql(this,"undo")}),redo:ja(function(){ql(this,"redo")}),undoSelection:ja(function(){ql(this,"undo",!0)}),redoSelection:ja(function(){ql(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 eo(this.history.maxGeneration),fl(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:Xl(this.history.done),undone:Xl(this.history.undone)}},setHistory:function(x){var z=this.history=new eo(this.history.maxGeneration);z.done=Xl(x.done.slice(0),null,!0),z.undone=Xl(x.undone.slice(0),null,!0)},setGutterMarker:ja(function(x,z,ne){return Dc(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&se(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:ja(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Dc(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,se(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!_r(this,x)||(z=x,x=bn(this,x),!x))return null}else if(z=vr(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:ja(function(x,z,ne){return Dc(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(de(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:ja(function(x,z,ne){return Dc(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 xe=ue.match(de(ne));if(!xe)return!1;var Pe=xe.index+xe[0].length;te[ie]=ue.slice(0,xe.index)+(!xe.index||Pe==ue.length?"":" ")+ue.slice(Pe)||null}else return!1;return!0})}),addLineWidget:ja(function(x,z,ne){return Ku(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return ec(this,rr(this,x),rr(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=rr(this,x),ec(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=rr(this,x);var z=[],ne=bn(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=rr(this,x),z=rr(this,z);var te=[],ie=x.line;return this.iter(x.line,z.line+1,function(ue){var xe=ue.markedSpans;if(xe)for(var Pe=0;Pe<xe.length;Pe++){var Ne=xe[Pe];!(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}),rr(this,wt(ne,z))},indexFromPos:function(x){x=rr(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 ys(Nr(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 ys(Nr(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}],fd(te,tc(this)),te},unlinkDoc:function(x){if(x instanceof Va&&(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),ll(tc(this));break}}if(x.history==this.history){var te=[x.id];fl(x,function(ie){return te.push(ie.id)},!0),x.history=new eo(null),x.history.done=Xl(this.history.done,te),x.history.undone=Xl(this.history.undone,te)}},iterLinkedDocs:function(x){fl(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Dt(x)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ja(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Ii(this.cm))})}),ys.prototype.eachLine=ys.prototype.iter;var uu=0;function Fd(x){var z=this;if(Fc(z),!(sn(z,x)||ka(z.display,x))){Kr(x),ve&&(uu=+new Date);var ne=Cs(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),xe=0,Pe=function(){++xe==ie&&Qa(z,function(){ne=rr(z.doc,ne);var En={from:ne,to:ne,text:z.doc.splitLines(ue.filter(function(wr){return wr!=null}).join(z.doc.lineSeparator())),origin:"paste"};Jl(z.doc,En),xo(z.doc,Os(rr(z.doc,ne),rr(z.doc,Wo(En))))})()},Ne=function(En,wr){if(z.options.allowDropFileTypes&&mt(z.options.allowDropFileTypes,En.type)==-1){Pe();return}var zr=new FileReader;zr.onerror=function(){return Pe()},zr.onload=function(){var ai=zr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ai)){Pe();return}ue[wr]=ai,Pe()},zr.readAsText(En)},Ke=0;Ke<te.length;Ke++)Ne(te[Ke],Ke);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 It=x.dataTransfer.getData("Text");if(It){var Wt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Wt=z.listSelections()),Ds(z.doc,Os(ne,ne)),Wt)for(var Bn=0;Bn<Wt.length;++Bn)Ql(z.doc,"",Wt[Bn].anchor,Wt[Bn].head,"drag");z.replaceSelection(It,"around","paste"),z.display.input.focus()}}catch(En){}}}}function Zu(x,z){if(ve&&(!x.state.draggingText||+new Date-uu<100)){ei(z);return}if(!(sn(x,z)||ka(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!ft)){var ne=ct("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Te&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Te&&ne.parentNode.removeChild(ne)}}function Cu(x,z){var ne=Cs(x,z);if(ne){var te=document.createDocumentFragment();fn(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)),At(x.display.dragCursor,te)}}function Fc(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function mc(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 qr=!1;function Vu(){qr||(Eu(),qr=!0)}function Eu(){var x;Sn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,mc(du)},100))}),Sn(window,"blur",function(){return mc(Mn)})}function du(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Il={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"},fu=0;fu<10;fu++)Il[fu+48]=Il[fu+96]=String(fu);for(var Mu=65;Mu<=90;Mu++)Il[Mu]=String.fromCharCode(Mu);for(var zc=1;zc<=12;zc++)Il[zc+111]=Il[zc+63235]="F"+zc;var Zo={};Zo.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"},Zo.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"},Zo.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"},Zo.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"]},Zo.default=Le?Zo.macDefault:Zo.pcDefault;function zd(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ie,ue,xe=0;xe<z.length-1;xe++){var Pe=z[xe];if(/^(cmd|meta|m)$/i.test(Pe))ue=!0;else if(/^a(lt)?$/i.test(Pe))ne=!0;else if(/^(c|ctrl|control)$/i.test(Pe))te=!0;else if(/^s(hift)?$/i.test(Pe))ie=!0;else throw new Error("Unrecognized modifier name: "+Pe)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ue&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function ku(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=Cn(ne.split(" "),zd),ue=0;ue<ie.length;ue++){var xe=void 0,Pe=void 0;ue==ie.length-1?(Pe=ie.join(" "),xe=te):(Pe=ie.slice(0,ue+1).join(" "),xe="...");var Ne=z[Pe];if(!Ne)z[Pe]=xe;else if(Ne!=xe)throw new Error("Inconsistent bindings for "+Pe)}delete x[ne]}for(var Ke in z)x[Ke]=z[Ke];return x}function nc(x,z,ne,te){z=Qs(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 nc(x,z.fallthrough,ne,te);for(var ue=0;ue<z.fallthrough.length;ue++){var xe=nc(x,z.fallthrough[ue],ne,te);if(xe)return xe}}}function Hc(x){var z=typeof x=="string"?x:Il[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function rc(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(yt?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(yt?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function gc(x,z){if(Te&&x.keyCode==34&&x.char)return!1;var ne=Il[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),rc(ne,x,z))}function Qs(x){return typeof x=="string"?Zo[x]:x}function yl(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ue=z(ne[ie]);te.length&&Ot(ue.from,en(te).to)<=0;){var xe=te.pop();if(Ot(xe.from,ue.from)<0){ue.from=xe.from;break}}te.push(ue)}Da(x,function(){for(var Pe=te.length-1;Pe>=0;Pe--)Ql(x.doc,"",te[Pe].from,te[Pe].to,"+delete");da(x)})}function Ks(x,z,ne){var te=$t(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Pl(x,z,ne){var te=Ks(x,z.ch,ne);return te==null?null:new wt(z.line,te,ne<0?"after":"before")}function vc(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ue=lr(ne,z.doc.direction);if(ue){var xe=ie<0?en(ue):ue[0],Pe=ie<0==(xe.level==1),Ne=Pe?"after":"before",Ke;if(xe.level>0||z.doc.direction=="rtl"){var It=Ra(z,ne);Ke=ie<0?ne.text.length-1:0;var Wt=Hi(z,It,Ke).top;Ke=Ht(function(Bn){return Hi(z,It,Bn).top==Wt},ie<0==(xe.level==1)?xe.from:xe.to-1,Ke),Ne=="before"&&(Ke=Ks(ne,Ke,1))}else Ke=ie<0?xe.to:xe.from;return new wt(te,Ke,Ne)}}return new wt(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function $l(x,z,ne,te){var ie=lr(z,x.doc.direction);if(!ie)return Pl(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=rn(ie,ne.ch,ne.sticky),xe=ie[ue];if(x.doc.direction=="ltr"&&xe.level%2==0&&(te>0?xe.to>ne.ch:xe.from<ne.ch))return Pl(z,ne,te);var Pe=function(wi,Pi){return Ks(z,wi instanceof wt?wi.ch:wi,Pi)},Ne,Ke=function(wi){return x.options.lineWrapping?(Ne=Ne||Ra(x,z),To(x,z,Ne,wi)):{begin:0,end:z.text.length}},It=Ke(ne.sticky=="before"?Pe(ne,-1):ne.ch);if(x.doc.direction=="rtl"||xe.level==1){var Wt=xe.level==1==te<0,Bn=Pe(ne,Wt?1:-1);if(Bn!=null&&(Wt?Bn<=xe.to&&Bn<=It.end:Bn>=xe.from&&Bn>=It.begin)){var En=Wt?"before":"after";return new wt(ne.line,Bn,En)}}var wr=function(wi,Pi,mi){for(var Ri=function(is,js){return js?new wt(ne.line,Pe(is,1),"before"):new wt(ne.line,is,"after")};wi>=0&&wi<ie.length;wi+=Pi){var ba=ie[wi],Ea=Pi>0==(ba.level!=1),go=Ea?mi.begin:Pe(mi.end,-1);if(ba.from<=go&&go<ba.to||(go=Ea?ba.from:Pe(ba.to,-1),mi.begin<=go&&go<mi.end))return Ri(go,Ea)}},zr=wr(ue+te,te,It);if(zr)return zr;var ai=te>0?It.end:Pe(It.begin,-1);return ai!=null&&!(te>0&&ai==z.text.length)&&(zr=wr(te>0?0:ie.length-1,te,Ke(ai)),zr)?zr:null}var Kc={selectAll:Fu,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),Qe)},killLine:function(x){return yl(x,function(z){if(z.empty()){var ne=bn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:wt(z.head.line+1,0)}:{from:z.head,to:wt(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return yl(x,function(z){return{from:wt(z.from().line,0),to:rr(x.doc,wt(z.to().line+1,0))}})},delLineLeft:function(x){return yl(x,function(z){return{from:wt(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return yl(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 yl(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(wt(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(wt(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return Uu(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return hd(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ju(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")},Yt)},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")},Yt)},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/)?hd(x,z.head):te},Yt)},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(),xe=Xe(x.getLine(ue.line),ue.ch,te);z.push(_t(te-xe%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return Da(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ue=bn(x.doc,ie.line).text;if(ue){if(ie.ch==ue.length&&(ie=new wt(ie.line,ie.ch-1)),ie.ch>0)ie=new wt(ie.line,ie.ch+1),x.replaceRange(ue.charAt(ie.ch-1)+ue.charAt(ie.ch-2),wt(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var xe=bn(x.doc,ie.line-1).text;xe&&(ie=new wt(ie.line,1),x.replaceRange(ue.charAt(0)+x.doc.lineSeparator()+xe.charAt(xe.length-1),wt(ie.line-1,xe.length-1),ie,"+transpose"))}}ne.push(new Fa(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return Da(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);da(x)})},openLine:function(x){return x.replaceSelection(`
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function Uu(x,z){var ne=bn(x.doc,z),te=St(ne);return te!=ne&&(z=vr(te)),vc(!0,x,te,z,1)}function ju(x,z){var ne=bn(x.doc,z),te=Nt(ne);return te!=ne&&(z=vr(te)),vc(!0,x,ne,z,-1)}function hd(x,z){var ne=Uu(x,z.line),te=bn(x.doc,ne.line),ie=lr(te,x.doc.direction);if(!ie||ie[0].level==0){var ue=Math.max(ne.ch,te.text.search(/\S/)),xe=z.line==ne.line&&z.ch<=ue&&z.ch;return wt(ne.line,xe?0:ue,ne.sticky)}return ne}function gs(x,z,ne){if(typeof z=="string"&&(z=Kc[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)!=hn}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function Hl(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=nc(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&nc(z,x.options.extraKeys,ne,x)||nc(z,x.options.keyMap,ne,x)}var Hd=new Me;function yc(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Hc(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:Hd.set(50,function(){x.state.keySeq==ie&&(x.state.keySeq=null,x.display.input.reset())}),Ol(x,ie+" "+z,ne,te))return!0}return Ol(x,z,ne,te)}function Ol(x,z,ne,te){var ie=Hl(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&ur(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Kr(ne),gn(x)),!!ie}function mo(x,z){var ne=gc(z,!0);return ne?z.shiftKey&&!x.state.keySeq?yc(x,"Shift-"+ne,z,function(te){return gs(x,te,!0)})||yc(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return gs(x,te)}):yc(x,ne,z,function(te){return gs(x,te)}):!1}function Wc(x,z,ne){return yc(x,"'"+ne+"'",z,function(te){return gs(x,te,!0)})}var Kl=null;function Zc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=pt(),!sn(z,x))){ve&&Ce<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=mo(z,x);Te&&(Kl=te?ne:null,!te&&ne==88&&!Vn&&(Le?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),fe&&!Le&&!te&&ne==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),ne==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&pr(z)}}function pr(x){var z=x.display.lineDiv;nn(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(je(z,"CodeMirror-crosshair"),Wr(document,"keyup",ne),Wr(document,"mouseover",ne))}Sn(document,"keyup",ne),Sn(document,"mouseover",ne)}function pd(x){x.keyCode==16&&(this.doc.sel.shift=!1),sn(this,x)}function md(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(ka(z.display,x)||sn(z,x)||x.ctrlKey&&!x.altKey||Le&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Te&&ne==Kl){Kl=null,Kr(x);return}if(!(Te&&(!x.which||x.which<10)&&mo(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(Wc(z,x,ie)||z.display.input.onKeyPress(x))}}}var _u=400,Gu=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};Gu.prototype.compare=function(x,z,ne){return this.time+_u>x&&Ot(z,this.pos)==0&&ne==this.button};var ic,hu;function gd(x,z){var ne=+new Date;return hu&&hu.compare(ne,x,z)?(ic=hu=null,"triple"):ic&&ic.compare(ne,x,z)?(hu=new Gu(ne,x,z),ic=null,"double"):(ic=new Gu(ne,x,z),hu=null,"single")}function As(x){var z=this,ne=z.display;if(!(sn(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,ka(ne,x)){_e||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!bs(z,x)){var te=Cs(z,x),ie=kr(x),ue=te?gd(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&Wl(z,ie,te,ue,x))&&(ie==1?te?Du(z,te,ue,x):pi(x)==ne.scroller&&Kr(x):ie==2?(te&&zl(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(Ee?z.display.input.onContextMenu(x):ir(z)))}}}function Wl(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,yc(x,rc(ue,ie),ie,function(xe){if(typeof xe=="string"&&(xe=Kc[xe]),!xe)return!1;var Pe=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Pe=xe(x,ne)!=hn}finally{x.state.suppressEdits=!1}return Pe})}function Lu(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ue=xt?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=Le?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(Le?ne.altKey:ne.ctrlKey)),ie}function Du(x,z,ne,te){ve?setTimeout(pn(xn,x),0):x.curOp.focus=pt();var ie=Lu(x,ne,te),ue=x.doc.sel,xe;x.options.dragDrop&&Ti&&!x.isReadOnly()&&ne=="single"&&(xe=ue.contains(z))>-1&&(Ot((xe=ue.ranges[xe]).from(),z)<0||z.xRel>0)&&(Ot(xe.to(),z)>0||z.xRel<0)?ko(x,te,z,ie):Ia(x,te,z,ie)}function ko(x,z,ne,te){var ie=x.display,ue=!1,xe=Qa(x,function(Ke){_e&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Wr(ie.wrapper.ownerDocument,"mouseup",xe),Wr(ie.wrapper.ownerDocument,"mousemove",Pe),Wr(ie.scroller,"dragstart",Ne),Wr(ie.scroller,"drop",xe),ue||(Kr(Ke),te.addNew||zl(x.doc,ne,null,null,te.extend),_e&&!ft||ve&&Ce==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),Pe=function(Ke){ue=ue||Math.abs(z.clientX-Ke.clientX)+Math.abs(z.clientY-Ke.clientY)>=10},Ne=function(){return ue=!0};_e&&(ie.scroller.draggable=!0),x.state.draggingText=xe,xe.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),Sn(ie.wrapper.ownerDocument,"mouseup",xe),Sn(ie.wrapper.ownerDocument,"mousemove",Pe),Sn(ie.scroller,"dragstart",Ne),Sn(ie.scroller,"drop",xe),ir(x),setTimeout(function(){return ie.input.focus()},20)}function qi(x,z,ne){if(ne=="char")return new Fa(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new Fa(wt(z.line,0),rr(x.doc,wt(z.line+1,0)));var te=ne(x,z);return new Fa(te.from,te.to)}function Ia(x,z,ne,te){var ie=x.display,ue=x.doc;Kr(z);var xe,Pe,Ne=ue.sel,Ke=Ne.ranges;if(te.addNew&&!te.extend?(Pe=ue.sel.contains(ne),Pe>-1?xe=Ke[Pe]:xe=new Fa(ne,ne)):(xe=ue.sel.primary(),Pe=ue.sel.primIndex),te.unit=="rectangle")te.addNew||(xe=new Fa(ne,ne)),ne=Cs(x,z,!0,!0),Pe=-1;else{var It=qi(x,ne,te.unit);te.extend?xe=Nc(xe,It.anchor,It.head,te.extend):xe=It}te.addNew?Pe==-1?(Pe=Ke.length,Ai(ue,ts(x,Ke.concat([xe]),Pe),{scroll:!1,origin:"*mouse"})):Ke.length>1&&Ke[Pe].empty()&&te.unit=="char"&&!te.extend?(Ai(ue,ts(x,Ke.slice(0,Pe).concat(Ke.slice(Pe+1)),0),{scroll:!1,origin:"*mouse"}),Ne=ue.sel):Xs(ue,Pe,xe,ut):(Pe=0,Ai(ue,new fs([xe],0),ut),Ne=ue.sel);var Wt=ne;function Bn(mi){if(Ot(Wt,mi)!=0)if(Wt=mi,te.unit=="rectangle"){for(var Ri=[],ba=x.options.tabSize,Ea=Xe(bn(ue,ne.line).text,ne.ch,ba),go=Xe(bn(ue,mi.line).text,mi.ch,ba),is=Math.min(Ea,go),js=Math.max(Ea,go),xs=Math.min(ne.line,mi.line),bl=Math.min(x.lastLine(),Math.max(ne.line,mi.line));xs<=bl;xs++){var xl=bn(ue,xs).text,Rs=Qt(xl,is,ba);is==js?Ri.push(new Fa(wt(xs,Rs),wt(xs,Rs))):xl.length>Rs&&Ri.push(new Fa(wt(xs,Rs),wt(xs,Qt(xl,js,ba))))}Ri.length||Ri.push(new Fa(ne,ne)),Ai(ue,ts(x,Ne.ranges.slice(0,Pe).concat(Ri),Pe),{origin:"*mouse",scroll:!1}),x.scrollIntoView(mi)}else{var wl=xe,Ga=qi(x,mi,te.unit),Ms=wl.anchor,ws;Ot(Ga.anchor,Ms)>0?(ws=Ga.head,Ms=Rn(wl.from(),Ga.anchor)):(ws=Ga.anchor,Ms=An(wl.to(),Ga.head));var ks=Ne.ranges.slice(0);ks[Pe]=_o(x,new Fa(rr(ue,Ms),ws)),Ai(ue,ts(x,ks,Pe),ut)}}var En=ie.wrapper.getBoundingClientRect(),wr=0;function zr(mi){var Ri=++wr,ba=Cs(x,mi,!0,te.unit=="rectangle");if(ba)if(Ot(ba,Wt)!=0){x.curOp.focus=pt(),Bn(ba);var Ea=Tr(ie,ue);(ba.line>=Ea.to||ba.line<Ea.from)&&setTimeout(Qa(x,function(){wr==Ri&&zr(mi)}),150)}else{var go=mi.clientY<En.top?-20:mi.clientY>En.bottom?20:0;go&&setTimeout(Qa(x,function(){wr==Ri&&(ie.scroller.scrollTop+=go,zr(mi))}),50)}}function ai(mi){x.state.selectingText=!1,wr=1/0,mi&&(Kr(mi),ie.input.focus()),Wr(ie.wrapper.ownerDocument,"mousemove",wi),Wr(ie.wrapper.ownerDocument,"mouseup",Pi),ue.history.lastSelOrigin=null}var wi=Qa(x,function(mi){mi.buttons===0||!kr(mi)?ai(mi):zr(mi)}),Pi=Qa(x,ai);x.state.selectingText=Pi,Sn(ie.wrapper.ownerDocument,"mousemove",wi),Sn(ie.wrapper.ownerDocument,"mouseup",Pi)}function _o(x,z){var ne=z.anchor,te=z.head,ie=bn(x.doc,ne.line);if(Ot(ne,te)==0&&ne.sticky==te.sticky)return z;var ue=lr(ie);if(!ue)return z;var xe=rn(ue,ne.ch,ne.sticky),Pe=ue[xe];if(Pe.from!=ne.ch&&Pe.to!=ne.ch)return z;var Ne=xe+(Pe.from==ne.ch==(Pe.level!=1)?0:1);if(Ne==0||Ne==ue.length)return z;var Ke;if(te.line!=ne.line)Ke=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var It=rn(ue,te.ch,te.sticky),Wt=It-xe||(te.ch-ne.ch)*(Pe.level==1?-1:1);It==Ne-1||It==Ne?Ke=Wt<0:Ke=Wt>0}var Bn=ue[Ne+(Ke?-1:0)],En=Ke==(Bn.level==1),wr=En?Bn.from:Bn.to,zr=En?"after":"before";return ne.ch==wr&&ne.sticky==zr?z:new Fa(new wt(ne.line,wr,zr),te)}function Vo(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(Bn){return!1}if(ie>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Kr(z);var xe=x.display,Pe=xe.lineDiv.getBoundingClientRect();if(ue>Pe.bottom||!Zn(x,ne))return Zr(z);ue-=Pe.top-xe.viewOffset;for(var Ne=0;Ne<x.display.gutterSpecs.length;++Ne){var Ke=xe.gutters.childNodes[Ne];if(Ke&&Ke.getBoundingClientRect().right>=ie){var It=Ir(x.doc,ue),Wt=x.display.gutterSpecs[Ne];return gt(x,ne,x,It,Wt.className,z),Zr(z)}}}function bs(x,z){return Vo(x,z,"gutterClick",!0)}function Ws(x,z){ka(x.display,z)||ac(x,z)||sn(x,z,"contextmenu")||Ee||x.display.input.onContextMenu(z)}function ac(x,z){return Zn(x,"gutterContextMenu")?Vo(x,z,"gutterContextMenu",!1):!1}function Zl(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ki(x)}var kl={toString:function(){return"CodeMirror.Init"}},bc={},pl={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ue,xe){x.defaults[te]=ie,ue&&(z[te]=xe?function(Pe,Ne,Ke){Ke!=kl&&ue(Pe,Ne,Ke)}:ue)}x.defineOption=ne,x.Init=kl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,sl(te)},!0),ne("indentUnit",2,sl,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Hs(te),Ki(te),ye(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ue=[],xe=te.doc.first;te.doc.iter(function(Ne){for(var Ke=0;;){var It=Ne.text.indexOf(ie,Ke);if(It==-1)break;Ke=It+ie.length,ue.push(wt(xe,It))}xe++});for(var Pe=ue.length-1;Pe>=0;Pe--)Ql(te.doc,ie,ue[Pe],wt(ue[Pe].line,ue[Pe].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!=kl&&te.refresh()}),ne("specialCharPlaceholder",He,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",tt?"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",!on),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){Zl(te),zs(te)},!0),ne("keyMap","default",function(te,ie,ue){var xe=Qs(ie),Pe=ue!=kl&&Qs(ue);Pe&&Pe.detach&&Pe.detach(te,xe),xe.attach&&xe.attach(te,Pe||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,wf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=Fl(ie,te.options.lineNumbers),zs(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?ls(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return oo(te)},!0),ne("scrollbarStyle","native",function(te){cs(te),oo(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=Fl(te.options.gutters,ie),zs(te)},!0),ne("firstLineNumber",1,zs,!0),ne("lineNumberFormatter",function(te){return te},zs,!0),ne("showCursorWhenSelecting",!1,Zt,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Mn(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,Zt,!0),ne("singleCursorHeightPerLine",!0,Zt,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Hs,!0),ne("addModeClass",!1,Hs,!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,Hs,!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!=kl;if(!z!=!te){var ie=x.display.dragFunctions,ue=z?Sn:Wr;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 wf(x){x.options.lineWrapping?(nn(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(je(x.display.wrapper,"CodeMirror-wrap"),Jn(x)),Qo(x),ye(x),Ki(x),setTimeout(function(){return oo(x)},100)}function Va(x,z){var ne=this;if(!(this instanceof Va))return new Va(x,z);this.options=z=z?cn(z):{},cn(bc,z,!1);var te=z.value;typeof te=="string"?te=new ys(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new Va.inputStyles[z.inputStyle](this),ue=this.display=new us(x,te,ie,z);ue.wrapper.CodeMirror=this,Zl(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),cs(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 Me,keySeq:null,specialChars:null},z.autofocus&&!tt&&ue.input.focus(),ve&&Ce<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),Vu(),jo(this),this.curOp.forceUpdate=!0,El(this,te),z.autofocus&&!tt||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&sr(ne)},20):Mn(this);for(var xe in pl)pl.hasOwnProperty(xe)&&pl[xe](this,z[xe],kl);Fs(this),z.finishInit&&z.finishInit(this);for(var Pe=0;Pe<Kd.length;++Pe)Kd[Pe](this);Lo(this),_e&&z.lineWrapping&&getComputedStyle(ue.lineDiv).textRendering=="optimizelegibility"&&(ue.lineDiv.style.textRendering="auto")}Va.defaults=bc,Va.optionHandlers=pl;function lh(x){var z=x.display;Sn(z.scroller,"mousedown",Qa(x,As)),ve&&Ce<11?Sn(z.scroller,"dblclick",Qa(x,function(Ne){if(!sn(x,Ne)){var Ke=Cs(x,Ne);if(!(!Ke||bs(x,Ne)||ka(x.display,Ne))){Kr(Ne);var It=x.findWordAt(Ke);zl(x.doc,It.anchor,It.head)}}})):Sn(z.scroller,"dblclick",function(Ne){return sn(x,Ne)||Kr(Ne)}),Sn(z.scroller,"contextmenu",function(Ne){return Ws(x,Ne)}),Sn(z.input.getField(),"contextmenu",function(Ne){z.scroller.contains(Ne.target)||Ws(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 Ke=Ne.touches[0];return Ke.radiusX<=1&&Ke.radiusY<=1}function xe(Ne,Ke){if(Ke.left==null)return!0;var It=Ke.left-Ne.left,Wt=Ke.top-Ne.top;return It*It+Wt*Wt>20*20}Sn(z.scroller,"touchstart",function(Ne){if(!sn(x,Ne)&&!ue(Ne)&&!bs(x,Ne)){z.input.ensurePolled(),clearTimeout(ne);var Ke=+new Date;z.activeTouch={start:Ke,moved:!1,prev:Ke-te.end<=300?te:null},Ne.touches.length==1&&(z.activeTouch.left=Ne.touches[0].pageX,z.activeTouch.top=Ne.touches[0].pageY)}}),Sn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),Sn(z.scroller,"touchend",function(Ne){var Ke=z.activeTouch;if(Ke&&!ka(z,Ne)&&Ke.left!=null&&!Ke.moved&&new Date-Ke.start<300){var It=x.coordsChar(z.activeTouch,"page"),Wt;!Ke.prev||xe(Ke,Ke.prev)?Wt=new Fa(It,It):!Ke.prev.prev||xe(Ke,Ke.prev.prev)?Wt=x.findWordAt(It):Wt=new Fa(wt(It.line,0),rr(x.doc,wt(It.line+1,0))),x.setSelection(Wt.anchor,Wt.head),x.focus(),Kr(Ne)}ie()}),Sn(z.scroller,"touchcancel",ie),Sn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(ji(x,z.scroller.scrollTop),Ca(x,z.scroller.scrollLeft,!0),gt(x,"scroll",x))}),Sn(z.scroller,"mousewheel",function(Ne){return ol(x,Ne)}),Sn(z.scroller,"DOMMouseScroll",function(Ne){return ol(x,Ne)}),Sn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Ne){sn(x,Ne)||ei(Ne)},over:function(Ne){sn(x,Ne)||(Cu(x,Ne),ei(Ne))},start:function(Ne){return Zu(x,Ne)},drop:Qa(x,Fd),leave:function(Ne){sn(x,Ne)||Fc(x)}};var Pe=z.input.getField();Sn(Pe,"keyup",function(Ne){return pd.call(x,Ne)}),Sn(Pe,"keydown",Qa(x,Zc)),Sn(Pe,"keypress",Qa(x,md)),Sn(Pe,"focus",function(Ne){return sr(x,Ne)}),Sn(Pe,"blur",function(Ne){return Mn(x,Ne)})}var Kd=[];Va.defineInitHook=function(x){return Kd.push(x)};function oc(x,z,ne,te){var ie=x.doc,ue;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ue=Wi(x,z).state:ne="prev");var xe=x.options.tabSize,Pe=bn(ie,z),Ne=Xe(Pe.text,null,xe);Pe.stateAfter&&(Pe.stateAfter=null);var Ke=Pe.text.match(/^\s*/)[0],It;if(!te&&!/\S/.test(Pe.text))It=0,ne="not";else if(ne=="smart"&&(It=ie.mode.indent(ue,Pe.text.slice(Ke.length),Pe.text),It==hn||It>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?It=Xe(bn(ie,z-1).text,null,xe):It=0:ne=="add"?It=Ne+x.options.indentUnit:ne=="subtract"?It=Ne-x.options.indentUnit:typeof ne=="number"&&(It=Ne+ne),It=Math.max(0,It);var Wt="",Bn=0;if(x.options.indentWithTabs)for(var En=Math.floor(It/xe);En;--En)Bn+=xe,Wt+=" ";if(Bn<It&&(Wt+=_t(It-Bn)),Wt!=Ke)return Ql(ie,Wt,wt(z,0),wt(z,Ke.length),"+input"),Pe.stateAfter=null,!0;for(var wr=0;wr<ie.sel.ranges.length;wr++){var zr=ie.sel.ranges[wr];if(zr.head.line==z&&zr.head.ch<Ke.length){var ai=wt(z,Ke.length);Xs(ie,wr,new Fa(ai,ai));break}}}var sc=null;function Vc(x){sc=x}function Wd(x,z,ne,te,ie){var ue=x.doc;x.display.shift=!1,te||(te=ue.sel);var xe=+new Date-200,Pe=ie=="paste"||x.state.pasteIncoming>xe,Ne=Dt(z),Ke=null;if(Pe&&te.ranges.length>1)if(sc&&sc.text.join(`
`)==z){if(te.ranges.length%sc.text.length==0){Ke=[];for(var It=0;It<sc.text.length;It++)Ke.push(ue.splitLines(sc.text[It]))}}else Ne.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Ke=Cn(Ne,function(wi){return[wi]}));for(var Wt=x.curOp.updateInput,Bn=te.ranges.length-1;Bn>=0;Bn--){var En=te.ranges[Bn],wr=En.from(),zr=En.to();En.empty()&&(ne&&ne>0?wr=wt(wr.line,wr.ch-ne):x.state.overwrite&&!Pe?zr=wt(zr.line,Math.min(bn(ue,zr.line).text.length,zr.ch+en(Ne).length)):Pe&&sc&&sc.lineWise&&sc.text.join(`
`)==Ne.join(`
`)&&(wr=zr=wt(wr.line,0)));var ai={from:wr,to:zr,text:Ke?Ke[Bn%Ke.length]:Ne,origin:ie||(Pe?"paste":x.state.cutIncoming>xe?"cut":"+input")};Jl(x.doc,ai),ur(x,"inputRead",x,ai)}z&&!Pe&&Vd(x,z),da(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Wt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function Zd(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&Da(z,function(){return Wd(z,ne,0,null,"paste")}),!0}function Vd(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),xe=!1;if(ue.electricChars){for(var Pe=0;Pe<ue.electricChars.length;Pe++)if(z.indexOf(ue.electricChars.charAt(Pe))>-1){xe=oc(x,ie.head.line,"smart");break}}else ue.electricInput&&ue.electricInput.test(bn(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(xe=oc(x,ie.head.line,"smart"));xe&&ur(x,"electricInput",x,ie.head.line)}}}function Au(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:wt(ie,0),head:wt(ie+1,0)};ne.push(ue),z.push(x.getRange(ue.anchor,ue.head))}return{text:z,ranges:ne}}function Sf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function Ud(){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 _e?x.style.width="1000px":x.setAttribute("wrap","off"),ht&&(x.style.border="1px solid black"),Sf(x),z}function jd(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,xe=ue[te];ue[te]==ie&&te!="mode"||(ue[te]=ie,z.hasOwnProperty(te)&&Qa(this,z[te])(this,ie,xe),gt(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"](Qs(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:Di(function(te,ie){var ue=te.token?te:x.getMode(this.options,te);if(ue.startState)throw new Error("Overlays may not be stateful.");On(this.state.overlays,{mode:ue,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(xe){return xe.priority}),this.state.modeGen++,ye(this)}),removeOverlay:Di(function(te){for(var ie=this.state.overlays,ue=0;ue<ie.length;++ue){var xe=ie[ue].modeSpec;if(xe==te||typeof te=="string"&&xe.name==te){ie.splice(ue,1),this.state.modeGen++,ye(this);return}}}),indentLine:Di(function(te,ie,ue){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),_r(this.doc,te)&&oc(this,te,ie,ue)}),indentSelection:Di(function(te){for(var ie=this.doc.sel.ranges,ue=-1,xe=0;xe<ie.length;xe++){var Pe=ie[xe];if(Pe.empty())Pe.head.line>ue&&(oc(this,Pe.head.line,te,!0),ue=Pe.head.line,xe==this.doc.sel.primIndex&&da(this));else{var Ne=Pe.from(),Ke=Pe.to(),It=Math.max(ue,Ne.line);ue=Math.min(this.lastLine(),Ke.line-(Ke.ch?0:1))+1;for(var Wt=It;Wt<ue;++Wt)oc(this,Wt,te);var Bn=this.doc.sel.ranges;Ne.ch==0&&ie.length==Bn.length&&Bn[xe].from().ch>0&&Xs(this.doc,xe,new Fa(Ne,Bn[xe].to()),Qe)}}}),getTokenAt:function(te,ie){return Ma(this,te,ie)},getLineTokens:function(te,ie){return Ma(this,wt(te),ie,!0)},getTokenTypeAt:function(te){te=rr(this.doc,te);var ie=ta(this,bn(this.doc,te.line)),ue=0,xe=(ie.length-1)/2,Pe=te.ch,Ne;if(Pe==0)Ne=ie[2];else for(;;){var Ke=ue+xe>>1;if((Ke?ie[Ke*2-1]:0)>=Pe)xe=Ke;else if(ie[Ke*2+1]<Pe)ue=Ke+1;else{Ne=ie[Ke*2+2];break}}var It=Ne?Ne.indexOf("overlay "):-1;return It<0?Ne:It==0?null:Ne.slice(0,It-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 xe=ne[ie],Pe=this.getModeAt(te);if(typeof Pe[ie]=="string")xe[Pe[ie]]&&ue.push(xe[Pe[ie]]);else if(Pe[ie])for(var Ne=0;Ne<Pe[ie].length;Ne++){var Ke=xe[Pe[ie][Ne]];Ke&&ue.push(Ke)}else Pe.helperType&&xe[Pe.helperType]?ue.push(xe[Pe.helperType]):xe[Pe.name]&&ue.push(xe[Pe.name]);for(var It=0;It<xe._global.length;It++){var Wt=xe._global[It];Wt.pred(Pe,this)&&mt(ue,Wt.val)==-1&&ue.push(Wt.val)}return ue},getStateAfter:function(te,ie){var ue=this.doc;return te=Nn(ue,te==null?ue.first+ue.size-1:te),Wi(this,te+1,ie).state},cursorCoords:function(te,ie){var ue,xe=this.doc.sel.primary();return te==null?ue=xe.head:typeof te=="object"?ue=rr(this.doc,te):ue=te?xe.from():xe.to(),no(this,ue,ie||"page")},charCoords:function(te,ie){return Ao(this,rr(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=vo(this,te,ie||"page"),Ho(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=vo(this,{top:te,left:0},ie||"page").top,Ir(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ue){var xe=!1,Pe;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,xe=!0),Pe=bn(this.doc,te)}else Pe=te;return lo(this,Pe,{top:0,left:0},ie||"page",ue||xe).top+(xe?this.doc.height-Wn(Pe):0)},defaultTextHeight:function(){return Po(this.display)},defaultCharWidth:function(){return Uo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ue,xe,Pe){var Ne=this.display;te=no(this,rr(this.doc,te));var Ke=te.bottom,It=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Ne.sizer.appendChild(ie),xe=="over")Ke=te.top;else if(xe=="above"||xe=="near"){var Wt=Math.max(Ne.wrapper.clientHeight,this.doc.height),Bn=Math.max(Ne.sizer.clientWidth,Ne.lineSpace.clientWidth);(xe=="above"||te.bottom+ie.offsetHeight>Wt)&&te.top>ie.offsetHeight?Ke=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Wt&&(Ke=te.bottom),It+ie.offsetWidth>Bn&&(It=Bn-ie.offsetWidth)}ie.style.top=Ke+"px",ie.style.left=ie.style.right="",Pe=="right"?(It=Ne.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(Pe=="left"?It=0:Pe=="middle"&&(It=(Ne.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=It+"px"),ue&&xi(this,{left:It,top:Ke,right:It+ie.offsetWidth,bottom:Ke+ie.offsetHeight})},triggerOnKeyDown:Di(Zc),triggerOnKeyPress:Di(md),triggerOnKeyUp:pd,triggerOnMouseDown:Di(As),execCommand:function(te){if(Kc.hasOwnProperty(te))return Kc[te].call(null,this)},triggerElectric:Di(function(te){Vd(this,te)}),findPosH:function(te,ie,ue,xe){var Pe=1;ie<0&&(Pe=-1,ie=-ie);for(var Ne=rr(this.doc,te),Ke=0;Ke<ie&&(Ne=vd(this.doc,Ne,Pe,ue,xe),!Ne.hitSide);++Ke);return Ne},moveH:Di(function(te,ie){var ue=this;this.extendSelectionsBy(function(xe){return ue.display.shift||ue.doc.extend||xe.empty()?vd(ue.doc,xe.head,te,ie,ue.options.rtlMoveVisually):te<0?xe.from():xe.to()},Yt)}),deleteH:Di(function(te,ie){var ue=this.doc.sel,xe=this.doc;ue.somethingSelected()?xe.replaceSelection("",null,"+delete"):yl(this,function(Pe){var Ne=vd(xe,Pe.head,te,ie,!1);return te<0?{from:Ne,to:Pe.head}:{from:Pe.head,to:Ne}})}),findPosV:function(te,ie,ue,xe){var Pe=1,Ne=xe;ie<0&&(Pe=-1,ie=-ie);for(var Ke=rr(this.doc,te),It=0;It<ie;++It){var Wt=no(this,Ke,"div");if(Ne==null?Ne=Wt.left:Wt.left=Ne,Ke=Cf(this,Wt,Pe,ue),Ke.hitSide)break}return Ke},moveV:Di(function(te,ie){var ue=this,xe=this.doc,Pe=[],Ne=!this.display.shift&&!xe.extend&&xe.sel.somethingSelected();if(xe.extendSelectionsBy(function(It){if(Ne)return te<0?It.from():It.to();var Wt=no(ue,It.head,"div");It.goalColumn!=null&&(Wt.left=It.goalColumn),Pe.push(Wt.left);var Bn=Cf(ue,Wt,te,ie);return ie=="page"&&It==xe.sel.primary()&&Xr(ue,Ao(ue,Bn,"div").top-Wt.top),Bn},Yt),Pe.length)for(var Ke=0;Ke<xe.sel.ranges.length;Ke++)xe.sel.ranges[Ke].goalColumn=Pe[Ke]}),findWordAt:function(te){var ie=this.doc,ue=bn(ie,te.line).text,xe=te.ch,Pe=te.ch;if(ue){var Ne=this.getHelper(te,"wordChars");(te.sticky=="before"||Pe==ue.length)&&xe?--xe:++Pe;for(var Ke=ue.charAt(xe),It=he(Ke,Ne)?function(Wt){return he(Wt,Ne)}:/\s/.test(Ke)?function(Wt){return/\s/.test(Wt)}:function(Wt){return!/\s/.test(Wt)&&!he(Wt)};xe>0&&It(ue.charAt(xe-1));)--xe;for(;Pe<ue.length&&It(ue.charAt(Pe));)++Pe}return new Fa(wt(te.line,xe),wt(te.line,Pe))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?nn(this.display.cursorDiv,"CodeMirror-overwrite"):je(this.display.cursorDiv,"CodeMirror-overwrite"),gt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==pt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Di(function(te,ie){Ji(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-bi(this)-this.display.barHeight,width:te.scrollWidth-bi(this)-this.display.barWidth,clientHeight:ia(this),clientWidth:zi(this)}},scrollIntoView:Di(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:wt(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?Na(this,te):Sa(this,te.from,te.to,te.margin)}),setSize:Di(function(te,ie){var ue=this,xe=function(Ne){return typeof Ne=="number"||/^\d+$/.test(String(Ne))?Ne+"px":Ne};te!=null&&(this.display.wrapper.style.width=xe(te)),ie!=null&&(this.display.wrapper.style.height=xe(ie)),this.options.lineWrapping&&Wa(this);var Pe=this.display.viewFrom;this.doc.iter(Pe,this.display.viewTo,function(Ne){if(Ne.widgets){for(var Ke=0;Ke<Ne.widgets.length;Ke++)if(Ne.widgets[Ke].noHScroll){ke(ue,Pe,"widget");break}}++Pe}),this.curOp.forceUpdate=!0,gt(this,"refresh",this)}),operation:function(te){return Da(this,te)},startOperation:function(){return jo(this)},endOperation:function(){return Lo(this)},refresh:Di(function(){var te=this.display.cachedTextHeight;ye(this),this.curOp.forceUpdate=!0,Ki(this),Ji(this,this.doc.scrollLeft,this.doc.scrollTop),Bl(this.display),(te==null||Math.abs(te-Po(this.display))>.5||this.options.lineWrapping)&&Qo(this),gt(this,"refresh",this)}),swapDoc:Di(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),El(this,te),Ki(this),this.display.input.reset(),Ji(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,ur(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}},xr(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,xe){x.registerHelper(te,ie,xe),ne[te]._global.push({pred:ue,val:xe})}}function vd(x,z,ne,te,ie){var ue=z,xe=ne,Pe=bn(x,z.line),Ne=ie&&x.direction=="rtl"?-ne:ne;function Ke(){var Pi=z.line+Ne;return Pi<x.first||Pi>=x.first+x.size?!1:(z=new wt(Pi,z.ch,z.sticky),Pe=bn(x,Pi))}function It(Pi){var mi;if(te=="codepoint"){var Ri=Pe.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(Ri)?mi=null:mi=new wt(z.line,Math.max(0,Math.min(Pe.text.length,z.ch+ne*(Ri>=55296&&Ri<56320?2:1))),-ne)}else ie?mi=$l(x.cm,Pe,z,ne):mi=Pl(Pe,z,ne);if(mi==null)if(!Pi&&Ke())z=vc(ie,x.cm,Pe,z.line,Ne);else return!1;else z=mi;return!0}if(te=="char"||te=="codepoint")It();else if(te=="column")It(!0);else if(te=="word"||te=="group")for(var Wt=null,Bn=te=="group",En=x.cm&&x.cm.getHelper(z,"wordChars"),wr=!0;!(ne<0&&!It(!wr));wr=!1){var zr=Pe.text.charAt(z.ch)||`
`,ai=he(zr,En)?"w":Bn&&zr==`
`?"n":!Bn||/\s/.test(zr)?null:"p";if(Bn&&!wr&&!ai&&(ai="s"),Wt&&Wt!=ai){ne<0&&(ne=1,It(),z.sticky="after");break}if(ai&&(Wt=ai),ne>0&&!It(!wr))break}var wi=su(x,z,ue,xe,!0);return Dn(ue,wi)&&(wi.hitSide=!0),wi}function Cf(x,z,ne,te){var ie=x.doc,ue=z.left,xe;if(te=="page"){var Pe=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ne=Math.max(Pe-.5*Po(x.display),3);xe=(ne>0?z.bottom:z.top)+ne*Ne}else te=="line"&&(xe=ne>0?z.bottom+3:z.top-3);for(var Ke;Ke=Ho(x,ue,xe),!!Ke.outside;){if(ne<0?xe<=0:xe>=ie.height){Ke.hitSide=!0;break}xe+=ne*5}return Ke}var Yo=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Me,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Yo.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;Sf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ue(Pe){for(var Ne=Pe.target;Ne;Ne=Ne.parentNode){if(Ne==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ne.className))break}return!1}Sn(ie,"paste",function(Pe){!ue(Pe)||sn(te,Pe)||Zd(Pe,te)||Ce<=11&&setTimeout(Qa(te,function(){return z.updateFromDOM()}),20)}),Sn(ie,"compositionstart",function(Pe){z.composing={data:Pe.data,done:!1}}),Sn(ie,"compositionupdate",function(Pe){z.composing||(z.composing={data:Pe.data,done:!1})}),Sn(ie,"compositionend",function(Pe){z.composing&&(Pe.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),Sn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),Sn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function xe(Pe){if(!(!ue(Pe)||sn(te,Pe))){if(te.somethingSelected())Vc({lineWise:!1,text:te.getSelections()}),Pe.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Ne=Au(te);Vc({lineWise:!0,text:Ne.text}),Pe.type=="cut"&&te.operation(function(){te.setSelections(Ne.ranges,0,Qe),te.replaceSelection("",null,"cut")})}else return;if(Pe.clipboardData){Pe.clipboardData.clearData();var Ke=sc.text.join(`
`);if(Pe.clipboardData.setData("Text",Ke),Pe.clipboardData.getData("Text")==Ke){Pe.preventDefault();return}}var It=Ud(),Wt=It.firstChild;te.display.lineSpace.insertBefore(It,te.display.lineSpace.firstChild),Wt.value=sc.text.join(`
`);var Bn=document.activeElement;qt(Wt),setTimeout(function(){te.display.lineSpace.removeChild(It),Bn.focus(),Bn==ie&&ne.showPrimarySelection()},50)}}Sn(ie,"copy",xe),Sn(ie,"cut",xe)},Yo.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Yo.prototype.prepareSelection=function(){var x=Pn(this.cm,!1);return x.focus=document.activeElement==this.div,x},Yo.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Yo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Yo.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=yd(z,x.anchorNode,x.anchorOffset),xe=yd(z,x.focusNode,x.focusOffset);if(!(ue&&!ue.bad&&xe&&!xe.bad&&Ot(Rn(ue,xe),te)==0&&Ot(An(ue,xe),ie)==0)){var Pe=z.display.view,Ne=te.line>=z.display.viewFrom&&Ef(z,te)||{node:Pe[0].measure.map[2],offset:0},Ke=ie.line<z.display.viewTo&&Ef(z,ie);if(!Ke){var It=Pe[Pe.length-1].measure,Wt=It.maps?It.maps[It.maps.length-1]:It.map;Ke={node:Wt[Wt.length-1],offset:Wt[Wt.length-2]-Wt[Wt.length-3]}}if(!Ne||!Ke){x.removeAllRanges();return}var Bn=x.rangeCount&&x.getRangeAt(0),En;try{En=Ze(Ne.node,Ne.offset,Ke.offset,Ke.node)}catch(wr){}En&&(!fe&&z.state.focused?(x.collapse(Ne.node,Ne.offset),En.collapsed||(x.removeAllRanges(),x.addRange(En))):(x.removeAllRanges(),x.addRange(En)),Bn&&x.anchorNode==null?x.addRange(Bn):fe&&this.startGracePeriod()),this.rememberSelection()}},Yo.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)},Yo.prototype.showMultipleSelections=function(x){At(this.cm.display.cursorDiv,x.cursors),At(this.cm.display.selectionDiv,x.selection)},Yo.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Yo.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return kt(this.div,z)},Yo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Yo.prototype.blur=function(){this.div.blur()},Yo.prototype.getField=function(){return this.div},Yo.prototype.supportsTouch=function(){return!0},Yo.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():Da(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)},Yo.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Yo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(st&&ge&&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=yd(z,x.anchorNode,x.anchorOffset),te=yd(z,x.focusNode,x.focusOffset);ne&&te&&Da(z,function(){Ai(z.doc,Os(ne,te),Qe),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},Yo.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=wt(te.line-1,bn(x.doc,te.line-1).length)),ie.ch==bn(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=wt(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ue,xe,Pe;te.line==z.viewFrom||(ue=Ka(x,te.line))==0?(xe=vr(z.view[0].line),Pe=z.view[0].node):(xe=vr(z.view[ue].line),Pe=z.view[ue-1].node.nextSibling);var Ne=Ka(x,ie.line),Ke,It;if(Ne==z.view.length-1?(Ke=z.viewTo-1,It=z.lineDiv.lastChild):(Ke=vr(z.view[Ne+1].line)-1,It=z.view[Ne+1].node.previousSibling),!Pe)return!1;for(var Wt=x.doc.splitLines(uh(x,Pe,It,xe,Ke)),Bn=Fn(x.doc,wt(xe,0),wt(Ke,bn(x.doc,Ke).text.length));Wt.length>1&&Bn.length>1;)if(en(Wt)==en(Bn))Wt.pop(),Bn.pop(),Ke--;else if(Wt[0]==Bn[0])Wt.shift(),Bn.shift(),xe++;else break;for(var En=0,wr=0,zr=Wt[0],ai=Bn[0],wi=Math.min(zr.length,ai.length);En<wi&&zr.charCodeAt(En)==ai.charCodeAt(En);)++En;for(var Pi=en(Wt),mi=en(Bn),Ri=Math.min(Pi.length-(Wt.length==1?En:0),mi.length-(Bn.length==1?En:0));wr<Ri&&Pi.charCodeAt(Pi.length-wr-1)==mi.charCodeAt(mi.length-wr-1);)++wr;if(Wt.length==1&&Bn.length==1&&xe==te.line)for(;En&&En>te.ch&&Pi.charCodeAt(Pi.length-wr-1)==mi.charCodeAt(mi.length-wr-1);)En--,wr++;Wt[Wt.length-1]=Pi.slice(0,Pi.length-wr).replace(/^\u200b+/,""),Wt[0]=Wt[0].slice(En).replace(/\u200b+$/,"");var ba=wt(xe,En),Ea=wt(Ke,Bn.length?en(Bn).length-wr:0);if(Wt.length>1||Wt[0]||Ot(ba,Ea))return Ql(x.doc,Wt,ba,Ea,"+input"),!0},Yo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Yo.prototype.reset=function(){this.forceCompositionEnd()},Yo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Yo.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))},Yo.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&Da(this.cm,function(){return ye(x.cm)})},Yo.prototype.setUneditable=function(x){x.contentEditable="false"},Yo.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||Qa(this.cm,Wd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Yo.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Yo.prototype.onContextMenu=function(){},Yo.prototype.resetPosition=function(){},Yo.prototype.needsContentAttribute=!0;function Ef(x,z){var ne=Xa(x,z.line);if(!ne||ne.hidden)return null;var te=bn(x.doc,z.line),ie=So(ne,te,z.line),ue=lr(te,x.doc.direction),xe="left";if(ue){var Pe=rn(ue,z.ch);xe=Pe%2?"right":"left"}var Ne=Xi(ie.map,z.ch,xe);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 Tu(x,z){return z&&(x.bad=!0),x}function uh(x,z,ne,te,ie){var ue="",xe=!1,Pe=x.doc.lineSeparator(),Ne=!1;function Ke(En){return function(wr){return wr.id==En}}function It(){xe&&(ue+=Pe,Ne&&(ue+=Pe),xe=Ne=!1)}function Wt(En){En&&(It(),ue+=En)}function Bn(En){if(En.nodeType==1){var wr=En.getAttribute("cm-text");if(wr){Wt(wr);return}var zr=En.getAttribute("cm-marker"),ai;if(zr){var wi=x.findMarks(wt(te,0),wt(ie+1,0),Ke(+zr));wi.length&&(ai=wi[0].find(0))&&Wt(Fn(x.doc,ai.from,ai.to).join(Pe));return}if(En.getAttribute("contenteditable")=="false")return;var Pi=/^(pre|div|p|li|table|br)$/i.test(En.nodeName);if(!/^br$/i.test(En.nodeName)&&En.textContent.length==0)return;Pi&&It();for(var mi=0;mi<En.childNodes.length;mi++)Bn(En.childNodes[mi]);/^(pre|p)$/i.test(En.nodeName)&&(Ne=!0),Pi&&(xe=!0)}else En.nodeType==3&&Wt(En.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Bn(z),z!=ne;)z=z.nextSibling,Ne=!1;return ue}function yd(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return Tu(x.clipPos(wt(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||!kt(te,z))return Tu(wt(vr(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ue=x.rest?en(x.rest):x.line;return Tu(wt(vr(ue),ue.text.length),ie)}var xe=z.nodeType==3?z:null,Pe=z;for(!xe&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(xe=z.firstChild,ne&&(ne=xe.nodeValue.length));Pe.parentNode!=te;)Pe=Pe.parentNode;var Ne=x.measure,Ke=Ne.maps;function It(ai,wi,Pi){for(var mi=-1;mi<(Ke?Ke.length:0);mi++)for(var Ri=mi<0?Ne.map:Ke[mi],ba=0;ba<Ri.length;ba+=3){var Ea=Ri[ba+2];if(Ea==ai||Ea==wi){var go=vr(mi<0?x.line:x.rest[mi]),is=Ri[ba]+Pi;return(Pi<0||Ea!=ai)&&(is=Ri[ba+(Pi?1:0)]),wt(go,is)}}}var Wt=It(xe,Pe,ne);if(Wt)return Tu(Wt,ie);for(var Bn=Pe.nextSibling,En=xe?xe.nodeValue.length-ne:0;Bn;Bn=Bn.nextSibling){if(Wt=It(Bn,Bn.firstChild,0),Wt)return Tu(wt(Wt.line,Wt.ch-En),ie);En+=Bn.textContent.length}for(var wr=Pe.previousSibling,zr=ne;wr;wr=wr.previousSibling){if(Wt=It(wr,wr.firstChild,-1),Wt)return Tu(wt(Wt.line,Wt.ch+zr),ie);zr+=wr.textContent.length}}var rs=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Me,this.hasSelection=!1,this.composing=null};rs.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"),Sn(ie,"input",function(){ve&&Ce>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),Sn(ie,"paste",function(xe){sn(te,xe)||Zd(xe,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ue(xe){if(!sn(te,xe)){if(te.somethingSelected())Vc({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Pe=Au(te);Vc({lineWise:!0,text:Pe.text}),xe.type=="cut"?te.setSelections(Pe.ranges,null,Qe):(ne.prevInput="",ie.value=Pe.text.join(`
`),qt(ie))}else return;xe.type=="cut"&&(te.state.cutIncoming=+new Date)}}Sn(ie,"cut",ue),Sn(ie,"copy",ue),Sn(x.scroller,"paste",function(xe){if(!(ka(x,xe)||sn(te,xe))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Pe=new Event("paste");Pe.clipboardData=xe.clipboardData,ie.dispatchEvent(Pe)}}),Sn(x.lineSpace,"selectstart",function(xe){ka(x,xe)||Kr(xe)}),Sn(ie,"compositionstart",function(){var xe=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:xe,range:te.markText(xe,te.getCursor("to"),{className:"CodeMirror-composing"})}}),Sn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},rs.prototype.createField=function(x){this.wrapper=Ud(),this.textarea=this.wrapper.firstChild},rs.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},rs.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=Pn(x);if(x.options.moveInputWithCursor){var ie=no(x,ne.sel.primary().head,"div"),ue=z.wrapper.getBoundingClientRect(),xe=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ie.top+xe.top-ue.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ie.left+xe.left-ue.left))}return te},rs.prototype.showSelection=function(x){var z=this.cm,ne=z.display;At(ne.cursorDiv,x.cursors),At(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},rs.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&&qt(this.textarea),ve&&Ce>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ve&&Ce>=9&&(this.hasSelection=null))}},rs.prototype.getField=function(){return this.textarea},rs.prototype.supportsTouch=function(){return!1},rs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!tt||pt()!=this.textarea))try{this.textarea.focus()}catch(x){}},rs.prototype.blur=function(){this.textarea.blur()},rs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},rs.prototype.receivedFocus=function(){this.slowPoll()},rs.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},rs.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)},rs.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||Hn(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&&Ce>=9&&this.hasSelection===ie||Le&&/[\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 xe=0,Pe=Math.min(te.length,ie.length);xe<Pe&&te.charCodeAt(xe)==ie.charCodeAt(xe);)++xe;return Da(z,function(){Wd(z,ie.slice(xe),te.length-xe,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},rs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},rs.prototype.onKeyPress=function(){ve&&Ce>=9&&(this.hasSelection=null),this.fastPoll()},rs.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ue=Cs(ne,x),xe=te.scroller.scrollTop;if(!ue||Te)return;var Pe=ne.options.resetSelectionOnContextMenu;Pe&&ne.doc.sel.contains(ue)==-1&&Qa(ne,Ai)(ne.doc,Os(ue),Qe);var Ne=ie.style.cssText,Ke=z.wrapper.style.cssText,It=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(x.clientY-It.top-5)+"px; left: "+(x.clientX-It.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 Wt;_e&&(Wt=window.scrollY),te.input.focus(),_e&&window.scrollTo(null,Wt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=En,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function Bn(){if(ie.selectionStart!=null){var zr=ne.somethingSelected(),ai="\u200B"+(zr?ie.value:"");ie.value="\u21DA",ie.value=ai,z.prevInput=zr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=ai.length,te.selForContextMenu=ne.doc.sel}}function En(){if(z.contextMenuPending==En&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Ke,ie.style.cssText=Ne,ve&&Ce<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=xe),ie.selectionStart!=null)){(!ve||ve&&Ce<9)&&Bn();var zr=0,ai=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?Qa(ne,Fu)(ne):zr++<10?te.detectingSelectAll=setTimeout(ai,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(ai,200)}}if(ve&&Ce>=9&&Bn(),Ee){ei(x);var wr=function(){Wr(window,"mouseup",wr),setTimeout(En,20)};Sn(window,"mouseup",wr)}else setTimeout(En,50)},rs.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},rs.prototype.setUneditable=function(){},rs.prototype.needsContentAttribute=!1;function pu(x,z){if(z=z?cn(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=pt();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Pe.getValue()}var ie;if(x.form&&(Sn(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var ue=x.form;ie=ue.submit;try{var xe=ue.submit=function(){te(),ue.submit=ie,ue.submit(),ue.submit=xe}}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&&(Wr(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var Pe=Va(function(Ne){return x.parentNode.insertBefore(Ne,x.nextSibling)},z);return Pe}function Iu(x){x.off=Wr,x.on=Sn,x.wheelEventPixels=Ys,x.Doc=ys,x.splitLines=Dt,x.countColumn=Xe,x.findColumn=Qt,x.isWordChar=me,x.Pass=hn,x.signal=gt,x.Line=ar,x.changeEnd=Wo,x.scrollbarModel=$o,x.Pos=wt,x.cmpPos=Ot,x.modes=yr,x.mimeModes=Pr,x.resolveMode=Ct,x.getMode=zt,x.modeExtensions=un,x.extendMode=Je,x.copyState=Mt,x.startState=Jt,x.innerMode=ln,x.commands=Kc,x.keyMap=Zo,x.keyName=gc,x.isModifierKey=Hc,x.lookupKey=nc,x.normalizeKeyMap=ku,x.StringStream=vn,x.SharedTextMarker=io,x.TextMarker=pc,x.LineWidget=Tc,x.e_preventDefault=Kr,x.e_stopPropagation=Jr,x.e_stop=ei,x.addClass=nn,x.contains=kt,x.rmClass=je,x.keyNames=Il}oh(Va),jd(Va);var Ic="iter insert remove copy getEditor constructor".split(" ");for(var Vl in ys.prototype)ys.prototype.hasOwnProperty(Vl)&&mt(Ic,Vl)<0&&(Va.prototype[Vl]=function(x){return function(){return x.apply(this.doc,arguments)}}(ys.prototype[Vl]));return xr(ys),Va.inputStyles={textarea:rs,contenteditable:Yo},Va.defineMode=function(x){!Va.defaults.mode&&x!="null"&&(Va.defaults.mode=x),nr.apply(this,arguments)},Va.defineMIME=ot,Va.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),Va.defineMIME("text/plain","null"),Va.defineExtension=function(x,z){Va.prototype[x]=z},Va.defineDocExtension=function(x,z){ys.prototype[x]=z},Va.fromTextArea=pu,Iu(Va),Va.version="5.58.2",Va})},49047:function(kn,Vt,ae){(function(fe){fe(ae(4631),ae(29589),ae(52539))})(function(fe){"use strict";fe.defineMode("markdown",function(Fe,Be){var Ye=fe.getMode(Fe,"text/html"),ve=Ye.name=="null";function Ce(Xe){if(fe.findModeByName){var Me=fe.findModeByName(Xe);Me&&(Xe=Me.mime||Me.mimes[0])}var mt=fe.getMode(Fe,Xe);return mt.name=="null"?null:mt}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.tokenTypeOverrides={});var _e={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 we in _e)_e.hasOwnProperty(we)&&Be.tokenTypeOverrides[we]&&(_e[we]=Be.tokenTypeOverrides[we]);var ge=/^([*\-_])(?:\s*\1){2,}\s*$/,Te=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ft=/^\[(x| )\](?=\s)/i,Re=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,bt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ht=/^[^#!\[\]*_\\<>` "'(~:]+/,st=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,tt=/^\s*\[[^\]]+?\]:.*$/,Le=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,xt=" ";function on(Xe,Me,mt){return Me.f=Me.inline=mt,mt(Xe,Me)}function it(Xe,Me,mt){return Me.f=Me.block=mt,mt(Xe,Me)}function yt(Xe){return!Xe||!/\S/.test(Xe.string)}function Ee(Xe){if(Xe.linkTitle=!1,Xe.linkHref=!1,Xe.linkText=!1,Xe.em=!1,Xe.strong=!1,Xe.strikethrough=!1,Xe.quote=0,Xe.indentedCode=!1,Xe.f==je){var Me=ve;if(!Me){var mt=fe.innerMode(Ye,Xe.htmlState);Me=mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText}Me&&(Xe.f=lt,Xe.block=de,Xe.htmlState=null)}return Xe.trailingSpace=0,Xe.trailingSpaceNewLine=!1,Xe.prevLine=Xe.thisLine,Xe.thisLine={stream:null},null}function de(Xe,Me){var mt=Xe.column()===Me.indentation,Gt=yt(Me.prevLine.stream),hn=Me.indentedCode,Qe=Me.prevLine.hr,ut=Me.list!==!1,Yt=(Me.listStack[Me.listStack.length-1]||0)+3;Me.indentedCode=!1;var Qt=Me.indentation;if(Me.indentationDiff===null&&(Me.indentationDiff=Me.indentation,ut)){for(Me.list=null;Qt<Me.listStack[Me.listStack.length-1];)Me.listStack.pop(),Me.listStack.length?Me.indentation=Me.listStack[Me.listStack.length-1]:Me.list=!1;Me.list!==!1&&(Me.indentationDiff=Qt-Me.listStack[Me.listStack.length-1])}var tn=!Gt&&!Qe&&!Me.prevLine.header&&(!ut||!hn)&&!Me.prevLine.fencedCodeEnd,_t=(Me.list===!1||Qe||Gt)&&Me.indentation<=Yt&&Xe.match(ge),en=null;if(Me.indentationDiff>=4&&(hn||Me.prevLine.fencedCodeEnd||Me.prevLine.header||Gt))return Xe.skipToEnd(),Me.indentedCode=!0,_e.code;if(Xe.eatSpace())return null;if(mt&&Me.indentation<=Yt&&(en=Xe.match(Re))&&en[1].length<=6)return Me.quote=0,Me.header=en[1].length,Me.thisLine.header=!0,Be.highlightFormatting&&(Me.formatting="header"),Me.f=Me.inline,At(Me);if(Me.indentation<=Yt&&Xe.eat(">"))return Me.quote=mt?1:Me.quote+1,Be.highlightFormatting&&(Me.formatting="quote"),Xe.eatSpace(),At(Me);if(!_t&&!Me.setext&&mt&&Me.indentation<=Yt&&(en=Xe.match(Te))){var Cn=en[1]?"ol":"ul";return Me.indentation=Qt+Xe.current().length,Me.list=!0,Me.quote=0,Me.listStack.push(Me.indentation),Me.em=!1,Me.strong=!1,Me.code=!1,Me.strikethrough=!1,Be.taskLists&&Xe.match(ft,!1)&&(Me.taskList=!0),Me.f=Me.inline,Be.highlightFormatting&&(Me.formatting=["list","list-"+Cn]),At(Me)}else{if(mt&&Me.indentation<=Yt&&(en=Xe.match(st,!0)))return Me.quote=0,Me.fencedEndRE=new RegExp(en[1]+"+ *$"),Me.localMode=Be.fencedCodeBlockHighlighting&&Ce(en[2]||Be.fencedCodeBlockDefaultMode),Me.localMode&&(Me.localState=fe.startState(Me.localMode)),Me.f=Me.block=ze,Be.highlightFormatting&&(Me.formatting="code-block"),Me.code=-1,At(Me);if(Me.setext||(!tn||!ut)&&!Me.quote&&Me.list===!1&&!Me.code&&!_t&&!tt.test(Xe.string)&&(en=Xe.lookAhead(1))&&(en=en.match(bt)))return Me.setext?(Me.header=Me.setext,Me.setext=0,Xe.skipToEnd(),Be.highlightFormatting&&(Me.formatting="header")):(Me.header=en[0].charAt(0)=="="?1:2,Me.setext=Me.header),Me.thisLine.header=!0,Me.f=Me.inline,At(Me);if(_t)return Xe.skipToEnd(),Me.hr=!0,Me.thisLine.hr=!0,_e.hr;if(Xe.peek()==="[")return on(Xe,Me,rt)}return on(Xe,Me,Me.inline)}function je(Xe,Me){var mt=Ye.token(Xe,Me.htmlState);if(!ve){var Gt=fe.innerMode(Ye,Me.htmlState);(Gt.mode.name=="xml"&&Gt.state.tagStart===null&&!Gt.state.context&&Gt.state.tokenize.isInText||Me.md_inside&&Xe.current().indexOf(">")>-1)&&(Me.f=lt,Me.block=de,Me.htmlState=null)}return mt}function ze(Xe,Me){var mt=Me.listStack[Me.listStack.length-1]||0,Gt=Me.indentation<mt,hn=mt+3;if(Me.fencedEndRE&&Me.indentation<=hn&&(Gt||Xe.match(Me.fencedEndRE))){Be.highlightFormatting&&(Me.formatting="code-block");var Qe;return Gt||(Qe=At(Me)),Me.localMode=Me.localState=null,Me.block=de,Me.f=lt,Me.fencedEndRE=null,Me.code=0,Me.thisLine.fencedCodeEnd=!0,Gt?it(Xe,Me,Me.block):Qe}else return Me.localMode?Me.localMode.token(Xe,Me.localState):(Xe.skipToEnd(),_e.code)}function At(Xe){var Me=[];if(Xe.formatting){Me.push(_e.formatting),typeof Xe.formatting=="string"&&(Xe.formatting=[Xe.formatting]);for(var mt=0;mt<Xe.formatting.length;mt++)Me.push(_e.formatting+"-"+Xe.formatting[mt]),Xe.formatting[mt]==="header"&&Me.push(_e.formatting+"-"+Xe.formatting[mt]+"-"+Xe.header),Xe.formatting[mt]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Xe.quote?Me.push(_e.formatting+"-"+Xe.formatting[mt]+"-"+Xe.quote):Me.push("error"))}if(Xe.taskOpen)return Me.push("meta"),Me.length?Me.join(" "):null;if(Xe.taskClosed)return Me.push("property"),Me.length?Me.join(" "):null;if(Xe.linkHref?Me.push(_e.linkHref,"url"):(Xe.strong&&Me.push(_e.strong),Xe.em&&Me.push(_e.em),Xe.strikethrough&&Me.push(_e.strikethrough),Xe.emoji&&Me.push(_e.emoji),Xe.linkText&&Me.push(_e.linkText),Xe.code&&Me.push(_e.code),Xe.image&&Me.push(_e.image),Xe.imageAltText&&Me.push(_e.imageAltText,"link"),Xe.imageMarker&&Me.push(_e.imageMarker)),Xe.header&&Me.push(_e.header,_e.header+"-"+Xe.header),Xe.quote&&(Me.push(_e.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Xe.quote?Me.push(_e.quote+"-"+Xe.quote):Me.push(_e.quote+"-"+Be.maxBlockquoteDepth)),Xe.list!==!1){var Gt=(Xe.listStack.length-1)%3;Gt?Gt===1?Me.push(_e.list2):Me.push(_e.list3):Me.push(_e.list1)}return Xe.trailingSpaceNewLine?Me.push("trailing-space-new-line"):Xe.trailingSpace&&Me.push("trailing-space-"+(Xe.trailingSpace%2?"a":"b")),Me.length?Me.join(" "):null}function ct(Xe,Me){if(Xe.match(ht,!0))return At(Me)}function lt(Xe,Me){var mt=Me.text(Xe,Me);if(typeof mt!="undefined")return mt;if(Me.list)return Me.list=null,At(Me);if(Me.taskList){var Gt=Xe.match(ft,!0)[1]===" ";return Gt?Me.taskOpen=!0:Me.taskClosed=!0,Be.highlightFormatting&&(Me.formatting="task"),Me.taskList=!1,At(Me)}if(Me.taskOpen=!1,Me.taskClosed=!1,Me.header&&Xe.match(/^#+$/,!0))return Be.highlightFormatting&&(Me.formatting="header"),At(Me);var hn=Xe.next();if(Me.linkTitle){Me.linkTitle=!1;var Qe=hn;hn==="("&&(Qe=")"),Qe=(Qe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ut="^\\s*(?:[^"+Qe+"\\\\]+|\\\\\\\\|\\\\.)"+Qe;if(Xe.match(new RegExp(ut),!0))return _e.linkHref}if(hn==="`"){var Yt=Me.formatting;Be.highlightFormatting&&(Me.formatting="code"),Xe.eatWhile("`");var Qt=Xe.current().length;if(Me.code==0&&(!Me.quote||Qt==1))return Me.code=Qt,At(Me);if(Qt==Me.code){var tn=At(Me);return Me.code=0,tn}else return Me.formatting=Yt,At(Me)}else if(Me.code)return At(Me);if(hn==="\\"&&(Xe.next(),Be.highlightFormatting)){var _t=At(Me),en=_e.formatting+"-escape";return _t?_t+" "+en:en}if(hn==="!"&&Xe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Me.imageMarker=!0,Me.image=!0,Be.highlightFormatting&&(Me.formatting="image"),At(Me);if(hn==="["&&Me.imageMarker&&Xe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Me.imageMarker=!1,Me.imageAltText=!0,Be.highlightFormatting&&(Me.formatting="image"),At(Me);if(hn==="]"&&Me.imageAltText){Be.highlightFormatting&&(Me.formatting="image");var _t=At(Me);return Me.imageAltText=!1,Me.image=!1,Me.inline=Me.f=kt,_t}if(hn==="["&&!Me.image)return Me.linkText&&Xe.match(/^.*?\]/)||(Me.linkText=!0,Be.highlightFormatting&&(Me.formatting="link")),At(Me);if(hn==="]"&&Me.linkText){Be.highlightFormatting&&(Me.formatting="link");var _t=At(Me);return Me.linkText=!1,Me.inline=Me.f=Xe.match(/\(.*?\)| ?\[.*?\]/,!1)?kt:lt,_t}if(hn==="<"&&Xe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Me.f=Me.inline=Ze,Be.highlightFormatting&&(Me.formatting="link");var _t=At(Me);return _t?_t+=" ":_t="",_t+_e.linkInline}if(hn==="<"&&Xe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Me.f=Me.inline=Ze,Be.highlightFormatting&&(Me.formatting="link");var _t=At(Me);return _t?_t+=" ":_t="",_t+_e.linkEmail}if(Be.xml&&hn==="<"&&Xe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Cn=Xe.string.indexOf(">",Xe.pos);if(Cn!=-1){var On=Xe.string.substring(Xe.start,Cn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(On)&&(Me.md_inside=!0)}return Xe.backUp(1),Me.htmlState=fe.startState(Ye),it(Xe,Me,je)}if(Be.xml&&hn==="<"&&Xe.match(/^\/\w*?>/))return Me.md_inside=!1,"tag";if(hn==="*"||hn==="_"){for(var $e=1,ce=Xe.pos==1?" ":Xe.string.charAt(Xe.pos-2);$e<3&&Xe.eat(hn);)$e++;var le=Xe.peek()||" ",me=!/\s/.test(le)&&(!Le.test(le)||/\s/.test(ce)||Le.test(ce)),he=!/\s/.test(ce)&&(!Le.test(ce)||/\s/.test(le)||Le.test(le)),se=null,Ie=null;if($e%2&&(!Me.em&&me&&(hn==="*"||!he||Le.test(ce))?se=!0:Me.em==hn&&he&&(hn==="*"||!me||Le.test(le))&&(se=!1)),$e>1&&(!Me.strong&&me&&(hn==="*"||!he||Le.test(ce))?Ie=!0:Me.strong==hn&&he&&(hn==="*"||!me||Le.test(le))&&(Ie=!1)),Ie!=null||se!=null){Be.highlightFormatting&&(Me.formatting=se==null?"strong":Ie==null?"em":"strong em"),se===!0&&(Me.em=hn),Ie===!0&&(Me.strong=hn);var tn=At(Me);return se===!1&&(Me.em=!1),Ie===!1&&(Me.strong=!1),tn}}else if(hn===" "&&(Xe.eat("*")||Xe.eat("_"))){if(Xe.peek()===" ")return At(Me);Xe.backUp(1)}if(Be.strikethrough){if(hn==="~"&&Xe.eatWhile(hn)){if(Me.strikethrough){Be.highlightFormatting&&(Me.formatting="strikethrough");var tn=At(Me);return Me.strikethrough=!1,tn}else if(Xe.match(/^[^\s]/,!1))return Me.strikethrough=!0,Be.highlightFormatting&&(Me.formatting="strikethrough"),At(Me)}else if(hn===" "&&Xe.match(/^~~/,!0)){if(Xe.peek()===" ")return At(Me);Xe.backUp(2)}}if(Be.emoji&&hn===":"&&Xe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Me.emoji=!0,Be.highlightFormatting&&(Me.formatting="emoji");var et=At(Me);return Me.emoji=!1,et}return hn===" "&&(Xe.match(/^ +$/,!1)?Me.trailingSpace++:Me.trailingSpace&&(Me.trailingSpaceNewLine=!0)),At(Me)}function Ze(Xe,Me){var mt=Xe.next();if(mt===">"){Me.f=Me.inline=lt,Be.highlightFormatting&&(Me.formatting="link");var Gt=At(Me);return Gt?Gt+=" ":Gt="",Gt+_e.linkInline}return Xe.match(/^[^>]+/,!0),_e.linkInline}function kt(Xe,Me){if(Xe.eatSpace())return null;var mt=Xe.next();return mt==="("||mt==="["?(Me.f=Me.inline=nn(mt==="("?")":"]"),Be.highlightFormatting&&(Me.formatting="link-string"),Me.linkHref=!0,At(Me)):"error"}var pt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function nn(Xe){return function(Me,mt){var Gt=Me.next();if(Gt===Xe){mt.f=mt.inline=lt,Be.highlightFormatting&&(mt.formatting="link-string");var hn=At(mt);return mt.linkHref=!1,hn}return Me.match(pt[Xe]),mt.linkHref=!0,At(mt)}}function rt(Xe,Me){return Xe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Me.f=qt,Xe.next(),Be.highlightFormatting&&(Me.formatting="link"),Me.linkText=!0,At(Me)):on(Xe,Me,lt)}function qt(Xe,Me){if(Xe.match(/^\]:/,!0)){Me.f=Me.inline=pn,Be.highlightFormatting&&(Me.formatting="link");var mt=At(Me);return Me.linkText=!1,mt}return Xe.match(/^([^\]\\]|\\.)+/,!0),_e.linkText}function pn(Xe,Me){return Xe.eatSpace()?null:(Xe.match(/^[^\s]+/,!0),Xe.peek()===void 0?Me.linkTitle=!0:Xe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Me.f=Me.inline=lt,_e.linkHref+" url")}var cn={startState:function(){return{f:de,prevLine:{stream:null},thisLine:{stream:null},block:de,htmlState:null,indentation:0,inline:lt,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(Xe){return{f:Xe.f,prevLine:Xe.prevLine,thisLine:Xe.thisLine,block:Xe.block,htmlState:Xe.htmlState&&fe.copyState(Ye,Xe.htmlState),indentation:Xe.indentation,localMode:Xe.localMode,localState:Xe.localMode?fe.copyState(Xe.localMode,Xe.localState):null,inline:Xe.inline,text:Xe.text,formatting:!1,linkText:Xe.linkText,linkTitle:Xe.linkTitle,linkHref:Xe.linkHref,code:Xe.code,em:Xe.em,strong:Xe.strong,strikethrough:Xe.strikethrough,emoji:Xe.emoji,header:Xe.header,setext:Xe.setext,hr:Xe.hr,taskList:Xe.taskList,list:Xe.list,listStack:Xe.listStack.slice(0),quote:Xe.quote,indentedCode:Xe.indentedCode,trailingSpace:Xe.trailingSpace,trailingSpaceNewLine:Xe.trailingSpaceNewLine,md_inside:Xe.md_inside,fencedEndRE:Xe.fencedEndRE}},token:function(Xe,Me){if(Me.formatting=!1,Xe!=Me.thisLine.stream){if(Me.header=0,Me.hr=!1,Xe.match(/^\s*$/,!0))return Ee(Me),null;if(Me.prevLine=Me.thisLine,Me.thisLine={stream:Xe},Me.taskList=!1,Me.trailingSpace=0,Me.trailingSpaceNewLine=!1,!Me.localState&&(Me.f=Me.block,Me.f!=je)){var mt=Xe.match(/^\s*/,!0)[0].replace(/\t/g,xt).length;if(Me.indentation=mt,Me.indentationDiff=null,mt>0)return null}}return Me.f(Xe,Me)},innerMode:function(Xe){return Xe.block==je?{state:Xe.htmlState,mode:Ye}:Xe.localState?{state:Xe.localState,mode:Xe.localMode}:{state:Xe,mode:cn}},indent:function(Xe,Me,mt){return Xe.block==je&&Ye.indent?Ye.indent(Xe.htmlState,Me,mt):Xe.localState&&Xe.localMode.indent?Xe.localMode.indent(Xe.localState,Me,mt):fe.Pass},blankLine:Ee,getType:At,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return cn},"xml"),fe.defineMIME("text/markdown","markdown"),fe.defineMIME("text/x-markdown","markdown")})},52539:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){"use strict";fe.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 Fe=0;Fe<fe.modeInfo.length;Fe++){var Be=fe.modeInfo[Fe];Be.mimes&&(Be.mime=Be.mimes[0])}fe.findModeByMIME=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Ce=fe.modeInfo[ve];if(Ce.mime==Ye)return Ce;if(Ce.mimes){for(var _e=0;_e<Ce.mimes.length;_e++)if(Ce.mimes[_e]==Ye)return Ce}}if(/\+xml$/.test(Ye))return fe.findModeByMIME("application/xml");if(/\+json$/.test(Ye))return fe.findModeByMIME("application/json")},fe.findModeByExtension=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Ce=fe.modeInfo[ve];if(Ce.ext){for(var _e=0;_e<Ce.ext.length;_e++)if(Ce.ext[_e]==Ye)return Ce}}},fe.findModeByFileName=function(Ye){for(var ve=0;ve<fe.modeInfo.length;ve++){var Ce=fe.modeInfo[ve];if(Ce.file&&Ce.file.test(Ye))return Ce}var _e=Ye.lastIndexOf("."),we=_e>-1&&Ye.substring(_e+1,Ye.length);if(we)return fe.findModeByExtension(we)},fe.findModeByName=function(Ye){Ye=Ye.toLowerCase();for(var ve=0;ve<fe.modeInfo.length;ve++){var Ce=fe.modeInfo[ve];if(Ce.name.toLowerCase()==Ye)return Ce;if(Ce.alias){for(var _e=0;_e<Ce.alias.length;_e++)if(Ce.alias[_e].toLowerCase()==Ye)return Ce}}}})},80785:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){"use strict";fe.defineMode("stex",function(Fe,Be){"use strict";function Ye(ht,st){ht.cmdState.push(st)}function ve(ht){return ht.cmdState.length>0?ht.cmdState[ht.cmdState.length-1]:null}function Ce(ht){var st=ht.cmdState.pop();st&&st.closeBracket()}function _e(ht){for(var st=ht.cmdState,tt=st.length-1;tt>=0;tt--){var Le=st[tt];if(Le.name!="DEFAULT")return Le}return{styleIdentifier:function(){return null}}}function we(ht,st,tt){return function(){this.name=ht,this.bracketNo=0,this.style=st,this.styles=tt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ge={};ge.importmodule=we("importmodule","tag",["string","builtin"]),ge.documentclass=we("documentclass","tag",["","atom"]),ge.usepackage=we("usepackage","tag",["atom"]),ge.begin=we("begin","tag",["atom"]),ge.end=we("end","tag",["atom"]),ge.label=we("label","tag",["atom"]),ge.ref=we("ref","tag",["atom"]),ge.eqref=we("eqref","tag",["atom"]),ge.cite=we("cite","tag",["atom"]),ge.bibitem=we("bibitem","tag",["atom"]),ge.Bibitem=we("Bibitem","tag",["atom"]),ge.RBibitem=we("RBibitem","tag",["atom"]),ge.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Te(ht,st){ht.f=st}function ft(ht,st){var tt;if(ht.match(/^\\[a-zA-Z@]+/)){var Le=ht.current().slice(1);return tt=ge.hasOwnProperty(Le)?ge[Le]:ge.DEFAULT,tt=new tt,Ye(st,tt),Te(st,bt),tt.style}if(ht.match(/^\\[$&%#{}_]/)||ht.match(/^\\[,;!\/\\]/))return"tag";if(ht.match("\\["))return Te(st,function(on,it){return Re(on,it,"\\]")}),"keyword";if(ht.match("\\("))return Te(st,function(on,it){return Re(on,it,"\\)")}),"keyword";if(ht.match("$$"))return Te(st,function(on,it){return Re(on,it,"$$")}),"keyword";if(ht.match("$"))return Te(st,function(on,it){return Re(on,it,"$")}),"keyword";var xt=ht.next();if(xt=="%")return ht.skipToEnd(),"comment";if(xt=="}"||xt=="]"){if(tt=ve(st),tt)tt.closeBracket(xt),Te(st,bt);else return"error";return"bracket"}else return xt=="{"||xt=="["?(tt=ge.DEFAULT,tt=new tt,Ye(st,tt),"bracket"):/\d/.test(xt)?(ht.eatWhile(/[\w.%]/),"atom"):(ht.eatWhile(/[\w\-_]/),tt=_e(st),tt.name=="begin"&&(tt.argument=ht.current()),tt.styleIdentifier())}function Re(ht,st,tt){if(ht.eatSpace())return null;if(tt&&ht.match(tt))return Te(st,ft),"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 Le=ht.next();return Le=="{"||Le=="}"||Le=="["||Le=="]"||Le=="("||Le==")"?"bracket":Le=="%"?(ht.skipToEnd(),"comment"):"error"}function bt(ht,st){var tt=ht.peek(),Le;return tt=="{"||tt=="["?(Le=ve(st),Le.openBracket(tt),ht.eat(tt),Te(st,ft),"bracket"):/[ \t\r]/.test(tt)?(ht.eat(tt),null):(Te(st,ft),Ce(st),ft(ht,st))}return{startState:function(){var ht=Be.inMathMode?function(st,tt){return Re(st,tt)}:ft;return{cmdState:[],f:ht}},copyState:function(ht){return{cmdState:ht.cmdState.slice(),f:ht.f}},token:function(ht,st){return st.f(ht,st)},blankLine:function(ht){ht.f=ft,ht.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},29589:function(kn,Vt,ae){(function(fe){fe(ae(4631))})(function(fe){"use strict";var Fe={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},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(Ye,ve){var Ce=Ye.indentUnit,_e={},we=ve.htmlMode?Fe:Be;for(var ge in we)_e[ge]=we[ge];for(var ge in ve)_e[ge]=ve[ge];var Te,ft;function Re(Ze,kt){function pt(qt){return kt.tokenize=qt,qt(Ze,kt)}var nn=Ze.next();if(nn=="<")return Ze.eat("!")?Ze.eat("[")?Ze.match("CDATA[")?pt(st("atom","]]>")):null:Ze.match("--")?pt(st("comment","-->")):Ze.match("DOCTYPE",!0,!0)?(Ze.eatWhile(/[\w\._\-]/),pt(tt(1))):null:Ze.eat("?")?(Ze.eatWhile(/[\w\._\-]/),kt.tokenize=st("meta","?>"),"meta"):(Te=Ze.eat("/")?"closeTag":"openTag",kt.tokenize=bt,"tag bracket");if(nn=="&"){var rt;return Ze.eat("#")?Ze.eat("x")?rt=Ze.eatWhile(/[a-fA-F\d]/)&&Ze.eat(";"):rt=Ze.eatWhile(/[\d]/)&&Ze.eat(";"):rt=Ze.eatWhile(/[\w\.\-:]/)&&Ze.eat(";"),rt?"atom":"error"}else return Ze.eatWhile(/[^&<]/),null}Re.isInText=!0;function bt(Ze,kt){var pt=Ze.next();if(pt==">"||pt=="/"&&Ze.eat(">"))return kt.tokenize=Re,Te=pt==">"?"endTag":"selfcloseTag","tag bracket";if(pt=="=")return Te="equals",null;if(pt=="<"){kt.tokenize=Re,kt.state=it,kt.tagName=kt.tagStart=null;var nn=kt.tokenize(Ze,kt);return nn?nn+" tag error":"tag error"}else return/[\'\"]/.test(pt)?(kt.tokenize=ht(pt),kt.stringStartCol=Ze.column(),kt.tokenize(Ze,kt)):(Ze.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ht(Ze){var kt=function(pt,nn){for(;!pt.eol();)if(pt.next()==Ze){nn.tokenize=bt;break}return"string"};return kt.isInAttribute=!0,kt}function st(Ze,kt){return function(pt,nn){for(;!pt.eol();){if(pt.match(kt)){nn.tokenize=Re;break}pt.next()}return Ze}}function tt(Ze){return function(kt,pt){for(var nn;(nn=kt.next())!=null;){if(nn=="<")return pt.tokenize=tt(Ze+1),pt.tokenize(kt,pt);if(nn==">")if(Ze==1){pt.tokenize=Re;break}else return pt.tokenize=tt(Ze-1),pt.tokenize(kt,pt)}return"meta"}}function Le(Ze,kt,pt){this.prev=Ze.context,this.tagName=kt,this.indent=Ze.indented,this.startOfLine=pt,(_e.doNotIndent.hasOwnProperty(kt)||Ze.context&&Ze.context.noIndent)&&(this.noIndent=!0)}function xt(Ze){Ze.context&&(Ze.context=Ze.context.prev)}function on(Ze,kt){for(var pt;;){if(!Ze.context||(pt=Ze.context.tagName,!_e.contextGrabbers.hasOwnProperty(pt)||!_e.contextGrabbers[pt].hasOwnProperty(kt)))return;xt(Ze)}}function it(Ze,kt,pt){return Ze=="openTag"?(pt.tagStart=kt.column(),yt):Ze=="closeTag"?Ee:it}function yt(Ze,kt,pt){return Ze=="word"?(pt.tagName=kt.current(),ft="tag",ze):_e.allowMissingTagName&&Ze=="endTag"?(ft="tag bracket",ze(Ze,kt,pt)):(ft="error",yt)}function Ee(Ze,kt,pt){if(Ze=="word"){var nn=kt.current();return pt.context&&pt.context.tagName!=nn&&_e.implicitlyClosed.hasOwnProperty(pt.context.tagName)&&xt(pt),pt.context&&pt.context.tagName==nn||_e.matchClosing===!1?(ft="tag",de):(ft="tag error",je)}else return _e.allowMissingTagName&&Ze=="endTag"?(ft="tag bracket",de(Ze,kt,pt)):(ft="error",je)}function de(Ze,kt,pt){return Ze!="endTag"?(ft="error",de):(xt(pt),it)}function je(Ze,kt,pt){return ft="error",de(Ze,kt,pt)}function ze(Ze,kt,pt){if(Ze=="word")return ft="attribute",At;if(Ze=="endTag"||Ze=="selfcloseTag"){var nn=pt.tagName,rt=pt.tagStart;return pt.tagName=pt.tagStart=null,Ze=="selfcloseTag"||_e.autoSelfClosers.hasOwnProperty(nn)?on(pt,nn):(on(pt,nn),pt.context=new Le(pt,nn,rt==pt.indented)),it}return ft="error",ze}function At(Ze,kt,pt){return Ze=="equals"?ct:(_e.allowMissing||(ft="error"),ze(Ze,kt,pt))}function ct(Ze,kt,pt){return Ze=="string"?lt:Ze=="word"&&_e.allowUnquoted?(ft="string",ze):(ft="error",ze(Ze,kt,pt))}function lt(Ze,kt,pt){return Ze=="string"?lt:ze(Ze,kt,pt)}return{startState:function(Ze){var kt={tokenize:Re,state:it,indented:Ze||0,tagName:null,tagStart:null,context:null};return Ze!=null&&(kt.baseIndent=Ze),kt},token:function(Ze,kt){if(!kt.tagName&&Ze.sol()&&(kt.indented=Ze.indentation()),Ze.eatSpace())return null;Te=null;var pt=kt.tokenize(Ze,kt);return(pt||Te)&&pt!="comment"&&(ft=null,kt.state=kt.state(Te||pt,Ze,kt),ft&&(pt=ft=="error"?pt+" error":ft)),pt},indent:function(Ze,kt,pt){var nn=Ze.context;if(Ze.tokenize.isInAttribute)return Ze.tagStart==Ze.indented?Ze.stringStartCol+1:Ze.indented+Ce;if(nn&&nn.noIndent)return fe.Pass;if(Ze.tokenize!=bt&&Ze.tokenize!=Re)return pt?pt.match(/^(\s*)/)[0].length:0;if(Ze.tagName)return _e.multilineTagIndentPastTag!==!1?Ze.tagStart+Ze.tagName.length+2:Ze.tagStart+Ce*(_e.multilineTagIndentFactor||1);if(_e.alignCDATA&&/<!\[CDATA\[/.test(kt))return 0;var rt=kt&&/^<(\/)?([\w_:\.-]*)/.exec(kt);if(rt&&rt[1])for(;nn;)if(nn.tagName==rt[2]){nn=nn.prev;break}else if(_e.implicitlyClosed.hasOwnProperty(nn.tagName))nn=nn.prev;else break;else if(rt)for(;nn;){var qt=_e.contextGrabbers[nn.tagName];if(qt&&qt.hasOwnProperty(rt[2]))nn=nn.prev;else break}for(;nn&&nn.prev&&!nn.startOfLine;)nn=nn.prev;return nn?nn.indent+Ce:Ze.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_e.htmlMode?"html":"xml",helperType:_e.htmlMode?"html":"xml",skipAttribute:function(Ze){Ze.state==ct&&(Ze.state=ze)},xmlCurrentTag:function(Ze){return Ze.tagName?{name:Ze.tagName,close:Ze.type=="closeTag"}:null},xmlCurrentContext:function(Ze){for(var kt=[],pt=Ze.context;pt;pt=pt.prev)pt.tagName&&kt.push(pt.tagName);return kt.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(kn,Vt,ae){"use strict";ae.d(Vt,{hP:function(){return On}});var fe=function($e,ce){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var he in me)Object.prototype.hasOwnProperty.call(me,he)&&(le[he]=me[he])})($e,ce)};function Fe($e,ce){function le(){this.constructor=$e}fe($e,ce),$e.prototype=ce===null?Object.create(ce):(le.prototype=ce.prototype,new le)}function Be($e,ce,le,me){return new(le||(le=Promise))(function(he,se){function Ie(Ht){try{$t(me.next(Ht))}catch(Xt){se(Xt)}}function et(Ht){try{$t(me.throw(Ht))}catch(Xt){se(Xt)}}function $t(Ht){var Xt;Ht.done?he(Ht.value):(Xt=Ht.value,Xt instanceof le?Xt:new le(function(jt){jt(Xt)})).then(Ie,et)}$t((me=me.apply($e,ce||[])).next())})}function Ye($e,ce){var le,me,he,se,Ie={label:0,sent:function(){if(1&he[0])throw he[1];return he[1]},trys:[],ops:[]};return se={next:et(0),throw:et(1),return:et(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function et($t){return function(Ht){return function(Xt){if(le)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(le=1,me&&(he=2&Xt[0]?me.return:Xt[0]?me.throw||((he=me.return)&&he.call(me),0):me.next)&&!(he=he.call(me,Xt[1])).done)return he;switch(me=0,he&&(Xt=[2&Xt[0],he.value]),Xt[0]){case 0:case 1:he=Xt;break;case 4:return Ie.label++,{value:Xt[1],done:!1};case 5:Ie.label++,me=Xt[1],Xt=[0];continue;case 7:Xt=Ie.ops.pop(),Ie.trys.pop();continue;default:if(he=Ie.trys,!((he=he.length>0&&he[he.length-1])||Xt[0]!==6&&Xt[0]!==2)){Ie=0;continue}if(Xt[0]===3&&(!he||Xt[1]>he[0]&&Xt[1]<he[3])){Ie.label=Xt[1];break}if(Xt[0]===6&&Ie.label<he[1]){Ie.label=he[1],he=Xt;break}if(he&&Ie.label<he[2]){Ie.label=he[2],Ie.ops.push(Xt);break}he[2]&&Ie.ops.pop(),Ie.trys.pop();continue}Xt=ce.call($e,Ie)}catch(jt){Xt=[6,jt],me=0}finally{le=he=0}if(5&Xt[0])throw Xt[1];return{value:Xt[0]?Xt[1]:void 0,done:!0}}([$t,Ht])}}}function ve(){for(var $e=0,ce=0,le=arguments.length;ce<le;ce++)$e+=arguments[ce].length;var me=Array($e),he=0;for(ce=0;ce<le;ce++)for(var se=arguments[ce],Ie=0,et=se.length;Ie<et;Ie++,he++)me[he]=se[Ie];return me}var Ce=function(){function $e(){}return $e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},$e.setAttributes=function(ce,le){for(var me=0,he=le;me<he.length;me++){var se=he[me],Ie=se[0],et=se[1];ce.setAttribute(Ie,et)}},$e.createRect=function(ce,le,me){var he=document.createElementNS("http://www.w3.org/2000/svg","rect");return he.setAttribute("width",ce.toString()),he.setAttribute("height",le.toString()),me&&$e.setAttributes(he,me),he},$e.createLine=function(ce,le,me,he,se){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",ce.toString()),Ie.setAttribute("y1",le.toString()),Ie.setAttribute("x2",me.toString()),Ie.setAttribute("y2",he.toString()),se&&$e.setAttributes(Ie,se),Ie},$e.createPolygon=function(ce,le){var me=document.createElementNS("http://www.w3.org/2000/svg","polygon");return me.setAttribute("points",ce),le&&$e.setAttributes(me,le),me},$e.createCircle=function(ce,le){var me=document.createElementNS("http://www.w3.org/2000/svg","circle");return me.setAttribute("cx",(ce/2).toString()),me.setAttribute("cy",(ce/2).toString()),me.setAttribute("r",ce.toString()),le&&$e.setAttributes(me,le),me},$e.createEllipse=function(ce,le,me){var he=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return he.setAttribute("cx",(ce/2).toString()),he.setAttribute("cy",(le/2).toString()),he.setAttribute("rx",(ce/2).toString()),he.setAttribute("ry",(le/2).toString()),me&&$e.setAttributes(he,me),he},$e.createGroup=function(ce){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return ce&&$e.setAttributes(le,ce),le},$e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},$e.createMarker=function(ce,le,me,he,se,Ie,et){var $t=document.createElementNS("http://www.w3.org/2000/svg","marker");return $e.setAttributes($t,[["id",ce],["orient",le],["markerWidth",me.toString()],["markerHeight",he.toString()],["refX",se.toString()],["refY",Ie.toString()]]),$t.appendChild(et),$t},$e.createText=function(ce){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),ce&&$e.setAttributes(le,ce),le},$e.createTSpan=function(ce,le){var me=document.createElementNS("http://www.w3.org/2000/svg","tspan");return me.textContent=ce,le&&$e.setAttributes(me,le),me},$e.createImage=function(ce){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return ce&&$e.setAttributes(le,ce),le},$e.createPoint=function(ce,le){var me=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return me.x=ce,me.y=le,me},$e.createPath=function(ce,le){var me=document.createElementNS("http://www.w3.org/2000/svg","path");return me.setAttribute("d",ce),le&&$e.setAttributes(me,le),me},$e}(),_e=function(){function $e(){}return $e.addKey=function(ce){$e.key=ce},Object.defineProperty($e,"isLicensed",{get:function(){return!!$e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test($e.key)},enumerable:!1,configurable:!0}),$e}(),we=function(){function $e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return $e.prototype.rasterize=function(ce,le,me){var he=this;return new Promise(function(se){var Ie=me!==void 0?me:document.createElement("canvas");ce===null&&(he.markersOnly=!0,he.naturalSize=!1);var et=document.createElementNS("http://www.w3.org/2000/svg","svg");et.setAttribute("xmlns","http://www.w3.org/2000/svg"),et.setAttribute("width",le.width.baseVal.valueAsString),et.setAttribute("height",le.height.baseVal.valueAsString),et.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),et.innerHTML=le.innerHTML,he.naturalSize===!0?(et.width.baseVal.value=ce.naturalWidth,et.height.baseVal.value=ce.naturalHeight):he.width!==void 0&&he.height!==void 0&&(et.width.baseVal.value=he.width,et.height.baseVal.value=he.height),Ie.width=et.width.baseVal.value,Ie.height=et.height.baseVal.value;var $t=et.outerHTML,Ht=Ie.getContext("2d");he.markersOnly!==!0&&Ht.drawImage(ce,0,0,Ie.width,Ie.height);var Xt=window.URL,jt=new Image(Ie.width,Ie.height);jt.setAttribute("crossOrigin","anonymous");var rn=new Blob([$t],{type:"image/svg+xml"}),qn=Xt.createObjectURL(rn);jt.onload=function(){Ht.drawImage(jt,0,0),Xt.revokeObjectURL(qn);var lr=Ie.toDataURL(he.imageType,he.imageQuality);se(lr)},jt.src=qn})},$e}(),ge=function(){},Te=function(){function $e(ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ce+"_"}return Object.defineProperty($e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty($e.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($e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),$e.prototype.addClass=function(ce){return this.styleSheet===void 0&&this.addStyleSheet(),ce.name=""+this.classNamePrefix+ce.localName,this.classes.push(ce),this.styleSheet.sheet.insertRule("."+ce.name+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length),ce},$e.prototype.addRule=function(ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ce),this.styleSheet.sheet.insertRule(ce.selector+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length)},$e.prototype.addStyleSheet=function(){var ce;this.styleSheet=document.createElement("style"),((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).appendChild(this.styleSheet),this.addRule(new ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new ft("@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;
`))},$e.prototype.removeStyleSheet=function(){var ce;this.styleSheet&&(((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},$e}(),ft=function($e,ce){this.selector=$e,this.style=ce},Re=function($e,ce){this.localName=$e,this.style=ce},bt=function(){function $e(ce,le,me,he,se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ce,this.displayMode=le,this.markerItems=me,this.uiStyleSettings=he,this.styles=se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return $e.prototype.show=function(ce){var le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var me=document.createElement("div");me.className=this.toolbarBlockStyleClass.name,me.style.whiteSpace="nowrap",this.uiContainer.appendChild(me),this.addActionButton(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(me,'<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(se){var Ie=document.createElement("div");Ie.className=""+le.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",se.typeName),Ie.innerHTML=se.icon,Ie.addEventListener("click",function(){le.markerToolbarButtonClicked(Ie,se)}),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()},$e.prototype.addButtonClickListener=function(ce){this.buttonClickListeners.push(ce)},$e.prototype.removeButtonClickListener=function(ce){this.buttonClickListeners.indexOf(ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ce),1)},$e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},$e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ce=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<ce||le===ce&&this.markerButtons.length-1===ce?this.markerButtonBlock.appendChild(this.markerButtons[le]):(le===ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[le]))}},$e.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")},$e.prototype.resetButtonStyles=function(){var ce=this;this.buttons.forEach(function(le){le.className=le.className.replace(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name,"").trim(),le.className=le.className.replace(ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),le.className+=" "+(ce.uiStyleSettings.toolbarButtonStyleColorsClassName?ce.uiStyleSettings.toolbarButtonStyleColorsClassName:ce.toolbarButtonStyleColorsClass.name)})},$e.prototype.addActionButton=function(ce,le,me){var he=this,se=document.createElement("div");switch(se.className=""+this.toolbarButtonStyleClass.name,se.innerHTML=le,se.setAttribute("data-action",me),se.addEventListener("click",function(){he.actionToolbarButtonClicked(se,me)}),me){case"select":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":se.style.fill=this.uiStyleSettings.closeButtonColor}ce.appendChild(se),this.buttons.push(se)},$e.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 ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Re("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ce)+`px;
padding: `+ce+`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 ft("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},$e.prototype.markerToolbarButtonClicked=function(ce,le){this.setActiveButton(ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(me){return me("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},$e.prototype.actionToolbarButtonClicked=function(ce,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(me){return me("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},$e.prototype.setActiveButton=function(ce){this.resetButtonStyles(),ce.className=ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},$e.prototype.setActiveMarkerButton=function(ce){var le=this.markerButtons.find(function(me){return me.getAttribute("data-type-name")===ce});le&&this.setActiveButton(le)},$e.prototype.setCurrentMarker=function(ce){var le=this;this.currentMarker=ce,this.buttons.filter(function(me){return/delete|notes/.test(me.getAttribute("data-action"))}).forEach(function(me){le.currentMarker===void 0?(me.style.fillOpacity="0.4",me.style.pointerEvents="none"):(me.style.fillOpacity="1",me.style.pointerEvents="all")})},$e}(),ht=function(){function $e(ce,le,me,he){this.panels=[],this.panelButtons=[],this.markerjsContainer=ce,this.displayMode=le,this.uiStyleSettings=me,this.styles=he,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return $e.prototype.addStyles=function(){var ce;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: `+((ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ce!==void 0?ce: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 ft("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ft("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},$e.prototype.show=function(ce){var le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},$e.prototype.setPanelButtons=function(ce){var le,me,he=this;this.panels=ce,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+" "+((me=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&me!==void 0?me:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Ie;se.uiStyleSettings=he.uiStyleSettings;var et=document.createElement("div");et.className=he.toolboxButtonStyleClass.name+" "+((Ie=he.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:he.toolboxButtonStyleColorsClass.name),et.innerHTML=se.icon,et.title=se.title,et.addEventListener("click",function(){he.panelButtonClick(se)}),he.panelButtons.push(et),he.buttonRow.appendChild(et)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},$e.prototype.panelButtonClick=function(ce){var le=this,me=-1;if(ce!==this.activePanel){me=this.panels.indexOf(ce),this.panelRow.innerHTML="";var he=ce.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=ce}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(se,Ie){var et,$t;se.className=le.toolboxButtonStyleClass.name+" "+(Ie===me?""+((et=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&et!==void 0?et:le.toolboxActiveButtonStyleColorsClass.name):""+(($t=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$t!==void 0?$t:le.toolboxButtonStyleColorsClass.name))})},$e}(),st=function($e,ce){this.title=$e,this.icon=ce},tt=function($e){function ce(le,me,he,se){var Ie=$e.call(this,le,se||'<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=me,Ie.currentColor=he,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.overflow="hidden",me.style.whiteSpace="nowrap",this.colors.forEach(function(he){var se=le.getColorBox(he);me.appendChild(se),le.colorBoxes.push(se)}),me},ce.prototype.getColorBox=function(le){var me=this,he=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-he,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=se-2+"px",Ie.style.height=se-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=(se+2)/2+"px",Ie.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){me.setCurrentColor(le,Ie)});var et=document.createElement("div");return et.style.display="inline-block",et.style.width=se-2+"px",et.style.height=se-2+"px",et.style.backgroundColor=le,et.style.borderRadius=se/2+"px",le==="transparent"&&(et.style.fill=this.uiStyleSettings.toolboxAccentColor,et.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(et),Ie},ce.prototype.setCurrentColor=function(le,me){var he=this;this.currentColor=le,this.colorBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},ce}(st),Le=function(){function $e(ce,le,me){this._state="new",this._isSelected=!1,this._container=ce,this._overlayContainer=le,this.globalSettings=me,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty($e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),$e.prototype.ownsTarget=function(ce){return!1},Object.defineProperty($e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),$e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},$e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},$e.prototype.pointerDown=function(ce,le){},$e.prototype.dblClick=function(ce,le){},$e.prototype.manipulate=function(ce){},$e.prototype.pointerUp=function(ce){this.stateChanged()},$e.prototype.dispose=function(){},$e.prototype.addMarkerVisualToContainer=function(ce){this.container.childNodes.length>0?this.container.insertBefore(ce,this.container.childNodes[0]):this.container.appendChild(ce)},$e.prototype.getState=function(){return{typeName:$e.typeName,state:this.state,notes:this.notes}},$e.prototype.restoreState=function(ce){this._state=ce.state,this.notes=ce.notes},$e.prototype.scale=function(ce,le){},$e.prototype.colorChanged=function(ce){this.onColorChanged&&this.onColorChanged(ce),this.stateChanged()},$e.prototype.fillColorChanged=function(ce){this.onFillColorChanged&&this.onFillColorChanged(ce),this.stateChanged()},$e.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ce)&&this.onStateChanged(this)}},$e.typeName="MarkerBase",$e}(),xt=function(){function $e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return $e.prototype.findGripByVisual=function(ce){return this.topLeft.ownsTarget(ce)?this.topLeft:this.topCenter.ownsTarget(ce)?this.topCenter:this.topRight.ownsTarget(ce)?this.topRight:this.centerLeft.ownsTarget(ce)?this.centerLeft:this.centerRight.ownsTarget(ce)?this.centerRight:this.bottomLeft.ownsTarget(ce)?this.bottomLeft:this.bottomCenter.ownsTarget(ce)?this.bottomCenter:this.bottomRight.ownsTarget(ce)?this.bottomRight:void 0},$e}(),on=function(){function $e(){this.GRIP_SIZE=10,this.visual=Ce.createGroup(),this.visual.appendChild(Ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $e.prototype.ownsTarget=function(ce){return ce===this.visual||ce===this.visual.childNodes[0]||ce===this.visual.childNodes[1]},$e}(),it=function(){function $e(){}return $e.toITransformMatrix=function(ce){return{a:ce.a,b:ce.b,c:ce.c,d:ce.d,e:ce.e,f:ce.f}},$e.toSVGMatrix=function(ce,le){return ce.a=le.a,ce.b=le.b,ce.c=le.c,ce.d=le.d,ce.e=le.e,ce.f=le.f,ce},$e}(),yt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(Ce.createTransform()),se.setupControlBox(),se}return Fe(ce,$e),Object.defineProperty(ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"visual",{get:function(){return this._visual},set:function(le){this._visual=le;var me=Ce.createTransform();this._visual.transform.baseVal.appendItem(me)},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(le){return!!$e.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),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(me),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(me)){this.activeGrip=this.rotatorGrip;var se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.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"},ce.prototype.pointerUp=function(le){var me=this.state;$e.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",me==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ce.prototype.moveVisual=function(le){this.visual.style.transform="translate("+le.x+"px, "+le.y+"px)"},ce.prototype.manipulate=function(le){var me=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(me.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(me.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(me):this.state==="rotate"&&this.rotate(le)},ce.prototype.resize=function(le){var me=this.manipulationStartLeft,he=this.manipulationStartWidth,se=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:me=this.manipulationStartLeft+le.x-this.manipulationStartX,he=this.manipulationStartWidth+this.manipulationStartLeft-me;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:se=this.manipulationStartTop+le.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-se;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=me,this.width=he):(this.left=me+he,this.width=-he),Ie>=0?(this.top=se,this.height=Ie):(this.top=se+Ie,this.height=-Ie),this.setSize()},ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ce.prototype.rotate=function(le){if(Math.abs(le.x-this.centerX)>.1){var me=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*me,this.applyRotation()}},ce.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)},ce.prototype.rotatePoint=function(le){if(this.rotationAngle===0)return le;var me=this.container.getCTM(),he=Ce.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(me)).x,y:he.y}},ce.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var me=this.container.getCTM();me=me.inverse();var he=Ce.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(me)).x,y:he.y}},ce.prototype.select=function(){$e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){$e.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Ce.createGroup();var le=Ce.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=Ce.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=Ce.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 xt,this.addControlGrips(),this.controlBox.style.display="none"},ce.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()},ce.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()},ce.prototype.createGrip=function(){var le=new on;return le.visual.transform.baseVal.appendItem(Ce.createTransform()),this.controlBox.appendChild(le.visual),le},ce.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,me=-le/2,he=me,se=(this.width+this.CB_DISTANCE)/2-le/2,Ie=(this.height+this.CB_DISTANCE)/2-le/2,et=this.height+this.CB_DISTANCE-le/2,$t=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,me,he),this.positionGrip(this.controlGrips.topCenter.visual,se,he),this.positionGrip(this.controlGrips.topRight.visual,$t,he),this.positionGrip(this.controlGrips.centerLeft.visual,me,Ie),this.positionGrip(this.controlGrips.centerRight.visual,$t,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,me,et),this.positionGrip(this.controlGrips.bottomCenter.visual,se,et),this.positionGrip(this.controlGrips.bottomRight.visual,$t,et),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,he-3*this.CB_DISTANCE)},ce.prototype.positionGrip=function(le,me,he){var se=le.transform.baseVal.getItem(0);se.setTranslate(me,he),le.transform.baseVal.replaceItem(se,0)},ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ce.prototype.showControlBox=function(){this.controlBox.style.display=""},ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},$e.prototype.getState.call(this))},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le);var me=le;this.left=me.left,this.top=me.top,this.width=me.width,this.height=me.height,this.rotationAngle=me.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,me.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,me.containerTransformMatrix))},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me);var he=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:he.x*le,y:he.y*me});this.left=se.x,this.top=se.y,this.width=this.width*le,this.height=this.height*me,this.adjustControlBox()},ce}(Le),Ee=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ce.prototype.createVisual=function(){this.visual=Ce.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)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ce.prototype.manipulate=function(le){$e.prototype.manipulate.call(this,le)},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),this.setSize()},ce.prototype.setSize=function(){$e.prototype.setSize.call(this),Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(le){$e.prototype.pointerUp.call(this,le),this.setSize()},ce.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ce.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ce.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$e.prototype.getState.call(this))},ce.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.opacity=me.opacity,this.createVisual(),$e.prototype.restoreState.call(this,le),this.setSize()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.setSize()},ce.title="Rectangle marker",ce}(yt),de=function($e){function ce(le,me,he,se){var Ie=$e.call(this,le,se||'<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=me,Ie.currentWidth=he,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",this.widths.forEach(function(he){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=he===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentWidth(he,se)}),me.appendChild(se);var Ie=document.createElement("div");Ie.innerText=he.toString(),Ie.style.marginRight="5px",se.appendChild(Ie);var et=document.createElement("div");et.style.minHeight="20px",et.style.flexGrow="2",et.style.display="flex",et.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",et.appendChild($t),se.appendChild(et),le.widthBoxes.push(se)}),me},ce.prototype.setCurrentWidth=function(le,me){var he=this;this.currentWidth=le,this.widthBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ce}(st),je=function($e){function ce(le,me,he,se){var Ie=$e.call(this,le,se||'<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=me,Ie.currentStyle=he,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",this.styles.forEach(function(he){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/le.styles.length-5+"%",se.style.borderColor=he===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentStyle(he,se)}),me.appendChild(se);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var et=`<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=et,se.appendChild(Ie),le.styleBoxes.push(se)}),me},ce.prototype.setCurrentStyle=function(le,me){var he=this;this.currentStyle=le,this.styleBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ce}(st),ze=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.strokeColor=he.defaultColor,se.strokeWidth=he.defaultStrokeWidth,se.strokeDasharray=he.defaultStrokeDasharray,se.strokePanel=new tt("Line color",he.defaultColorSet,he.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Fe(ce,$e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=$e.prototype.getState.call(this);return le.typeName=ce.typeName,le},ce.typeName="FrameMarker",ce.title="Frame marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ce}(Ee),At=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($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!!$e.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),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(me)?this.activeGrip=this.grip1:this.grip2.ownsTarget(me)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ce.prototype.pointerUp=function(le){var me=this.state;$e.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",me==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ce.prototype.adjustVisual=function(){},ce.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)},ce.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()},ce.prototype.select=function(){$e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ce.prototype.deselect=function(){$e.prototype.deselect.call(this),this.controlBox.style.display="none"},ce.prototype.setupControlBox=function(){this.controlBox=Ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ce.prototype.adjustControlBox=function(){this.positionGrips()},ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ce.prototype.createGrip=function(){var le=new on;return le.visual.transform.baseVal.appendItem(Ce.createTransform()),this.controlBox.appendChild(le.visual),le},ce.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)},ce.prototype.positionGrip=function(le,me,he){var se=le.transform.baseVal.getItem(0);se.setTranslate(me,he),le.transform.baseVal.replaceItem(se,0)},ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},$e.prototype.getState.call(this))},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le);var me=le;this.x1=me.x1,this.y1=me.y1,this.x2=me.x2,this.y2=me.y2},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.x1=this.x1*le,this.y1=this.y1*me,this.x2=this.x2*le,this.y2=this.y2*me,this.adjustVisual(),this.adjustControlBox()},ce}(Le),lt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=he.defaultColor,se.strokeWidth=he.defaultStrokeWidth,se.strokeDasharray=he.defaultStrokeDasharray,se.strokePanel=new tt("Line color",he.defaultColorSet,he.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},ce.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.selectorLine=Ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ce.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)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ce.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()),Ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ce.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le);var me=le;this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.createVisual(),this.adjustVisual()},ce.typeName="LineMarker",ce.title="Line marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ce}(ct),Ze=function($e){function ce(le,me,he,se){var Ie=$e.call(this,le,se||'<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=me,Ie.currentFont=he,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.overflow="hidden",me.style.flexGrow="2",this.fonts.forEach(function(he){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/le.fonts.length-5+"%",se.style.borderColor=he===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentFont(he,se)}),me.appendChild(se);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 et=document.createElement("div");et.style.whiteSpace="nowrap",et.style.overflow="hidden",et.style.textOverflow="ellipsis",et.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(et),se.appendChild(Ie),le.fontBoxes.push(se)}),me},ce.prototype.setCurrentFont=function(le,me){var he=this;this.currentFont=le,this.fontBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ce}(st),kt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=he.defaultColor,se.fontFamily=he.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new tt("Color",he.defaultColorSet,he.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new Ze("Font",he.defaultFontFamilies,he.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){if($e.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var me=!1;return this.textElement.childNodes.forEach(function(he){he===le&&(me=!0)}),me},ce.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.bgRectangle=Ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ce.createTransform()),this.textElement.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ce.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(me){le.textElement.appendChild(Ce.createTSpan(me.trim()===""?" ":me.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ce.prototype.getTextScale=function(){var le=this.textElement.getBBox(),me=1;if(le.width>0&&le.height>0){var he=(1*this.width-this.width*this.padding*2/100)/le.width,se=(1*this.height-this.height*this.padding*2/100)/le.height;me=Math.min(he,se)}return me},ce.prototype.getTextPosition=function(le){var me=this.textElement.getBBox(),he=0,se=0;return me.width>0&&me.height>0&&(he=(this.width-me.width*le)/2,se=this.height/2-me.height*le/2),{x:he,y:se}},ce.prototype.sizeText=function(){var le=this.textElement.getBBox(),me=this.getTextScale(),he=this.getTextPosition(me);he.y-=le.y*me,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+he.x+"px, "+he.y+"px) scale("+me+", "+me+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(he.x,he.y),this.textElement.transform.baseVal.getItem(1).setScale(me,me))},ce.prototype.manipulate=function(le){$e.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)},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},ce.prototype.setSize=function(){$e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ce.prototype.pointerUp=function(le){var me=this.state;me==="creating"&&(this._suppressMarkerCreateEvent=!0),$e.prototype.pointerUp.call(this,le),this.setSize(),(me==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.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(me){me.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var me=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&me>.9;)me-=.1,le.textEditor.style.fontSize=Math.max(me,.9)+"em"}),this.textEditor.addEventListener("keyup",function(me){me.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(me){if(me.clipboardData){var he=me.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(he)),me.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")},ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var le=this.getTextScale(),me=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),he=this.textElement.getBBox(),se={x:he.width*le,y:he.height*le};me.x-=se.x/2,me.y-=se.y/2,this.textEditor.style.top=me.y+"px",this.textEditor.style.left=me.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-me.x+"px",this.textEditor.style.fontSize=Math.max(16*le,12)+"px",this.textElement.style.display="none"}},ce.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()},ce.prototype.select=function(){$e.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),$e.prototype.deselect.call(this)},ce.prototype.dblClick=function(le,me){$e.prototype.dblClick.call(this,le,me),this.showTextEditor()},ce.prototype.setColor=function(le){this.textElement&&Ce.setAttributes(this.textElement,[["fill",le]]),this.color=le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(le)},ce.prototype.setFont=function(le){this.textElement&&Ce.setAttributes(this.textElement,[["font-family",le]]),this.fontFamily=le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){var me=le;this.color=me.color,this.fontFamily=me.fontFamily,this.padding=me.padding,this.text=me.text,this.createVisual(),$e.prototype.restoreState.call(this,le),this.setSize()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.setSize(),this.sizeText(),this.positionTextEditor()},ce.typeName="TextMarker",ce.title="Text marker",ce.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>',ce}(yt),pt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=he.defaultColor,se.lineWidth=he.defaultStrokeWidth,se.pixelRatio=he.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new tt("Color",he.defaultColorSet,he.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},ce.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.drawingImage=Ce.createImage(),this.visual.appendChild(this.drawingImage);var le=Ce.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},ce.prototype.pointerDown=function(le,me){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):$e.prototype.pointerDown.call(this,le,me)},ce.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):$e.prototype.manipulate.call(this,le)},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),Ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ce.prototype.pointerUp=function(le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):$e.prototype.pointerUp.call(this,le)},ce.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)},ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),$e.prototype.select.call(this)},ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),$e.prototype.deselect.call(this)},ce.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),me=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],he=me[0],se=me[1],Ie=me[2],et=me[3],$t=!1,Ht=0;Ht<this.canvasElement.height;Ht++)for(var Xt=0;Xt<this.canvasElement.width;Xt++)le.data[Ht*this.canvasElement.width*4+4*Xt+3]>0&&($t=!0,Ht<se&&(se=Ht),Xt<he&&(he=Xt),Ht>et&&(et=Ht),Xt>Ie&&(Ie=Xt));if($t){this.left=he/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Ie-he)/this.pixelRatio,this.height=(et-se)/this.pixelRatio;var jt=document.createElement("canvas");jt.width=Ie-he,jt.height=et-se,jt.getContext("2d").putImageData(this.canvasContext.getImageData(he,se,Ie-he,et-se),0,0),this.drawingImgUrl=jt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ce.prototype.setDrawingImage=function(){Ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ce.prototype.setColor=function(le){this.color=le,this.colorChanged(le)},ce.prototype.setLineWidth=function(le){this.lineWidth=le},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({drawingImgUrl:this.drawingImgUrl},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){this.createVisual(),$e.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.setDrawingImage()},ce.typeName="FreehandMarker",ce.title="Freehand marker",ce.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>',ce}(yt),nn=function($e){function ce(le,me,he){var se=$e.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 se.typeBoxes=[],se.currentType=me,se.setCurrentType=se.setCurrentType.bind(se),se}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2";for(var he=function(et){var $t="both";switch(et){case 0:$t="both";break;case 1:$t="start";break;case 2:$t="end";break;case 3:$t="none"}var Ht=document.createElement("div");if(Ht.style.display="flex",Ht.style.flexGrow="2",Ht.style.alignItems="center",Ht.style.justifyContent="space-between",Ht.style.padding="5px",Ht.style.borderWidth="2px",Ht.style.borderStyle="solid",Ht.style.borderColor=$t===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Ht.addEventListener("click",function(){le.setCurrentType($t,Ht)}),me.appendChild(Ht),$t==="both"||$t==="start"){var Xt=document.createElement("div");Xt.style.display="flex",Xt.style.alignItems="center",Xt.style.minHeight="20px",Xt.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="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Xt.style.marginLeft="5px",Ht.appendChild(Xt)}var jt=document.createElement("div");jt.style.display="flex",jt.style.alignItems="center",jt.style.minHeight="20px",jt.style.flexGrow="2";var rn=document.createElement("hr");if(rn.style.minWidth="20px",rn.style.border="0px",rn.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),rn.style.flexGrow="2",jt.appendChild(rn),Ht.appendChild(jt),$t==="both"||$t==="end"){var qn=document.createElement("div");qn.style.display="flex",qn.style.alignItems="center",qn.style.minHeight="20px",qn.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="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,qn.style.marginRight="5px",Ht.appendChild(qn)}se.typeBoxes.push(Ht)},se=this,Ie=0;Ie<4;Ie++)he(Ie);return me},ce.prototype.setCurrentType=function(le,me){var he=this;this.currentType=le,this.typeBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings!==void 0?he.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ce}(st),rt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new nn("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},ce.prototype.getArrowPoints=function(le,me){var he=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return le-he/2+","+(me+se/2)+" "+le+","+(me-se/2)+" "+(le+he/2)+","+(me+se/2)},ce.prototype.createTips=function(){this.arrow1=Ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ce.createTransform()),this.visual.appendChild(this.arrow2)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if($e.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",Ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ce.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 me=this.arrow1.transform.baseVal.getItem(0);me.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(me,0);var he=this.arrow2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(he,0)}},ce.prototype.setArrowType=function(le){this.arrowType=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({arrowType:this.arrowType},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le);var me=le;this.arrowType=me.arrowType,this.createTips(),this.adjustVisual()},ce.typeName="ArrowMarker",ce.title="Arrow marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ce}(lt),qt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.fillColor=he.defaultFillColor,se.strokeWidth=0,se.fillPanel=new tt("Color",he.defaultColorSet,he.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return Fe(ce,$e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=$e.prototype.getState.call(this);return le.typeName=ce.typeName,le},ce.typeName="CoverMarker",ce.title="Cover marker",ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ce}(Ee),pn=function($e){function ce(le,me,he,se){var Ie=$e.call(this,le,se||'<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=me,Ie.currentOpacity=he,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return Fe(ce,$e),ce.prototype.getUi=function(){var le=this,me=document.createElement("div");return me.style.display="flex",me.style.overflow="hidden",me.style.flexGrow="2",me.style.justifyContent="space-between",this.opacities.forEach(function(he){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=he===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentOpacity(he,se)}),me.appendChild(se);var Ie=document.createElement("div");Ie.innerText=100*he+"%",se.appendChild(Ie),le.opacityBoxes.push(se)}),me},ce.prototype.setCurrentOpacity=function(le,me){var he=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===me?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ce}(st),cn=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=he.defaultHighlightColor,se.strokeWidth=0,se.opacity=he.defaultHighlightOpacity,se.fillPanel=new tt("Color",he.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new pn("Opacity",he.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return Fe(ce,$e),ce.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=$e.prototype.getState.call(this);return le.typeName=ce.typeName,le},ce.typeName="HighlightMarker",ce.title="Highlight marker",ce.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>',ce}(qt),Xe='<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>',Me='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',mt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=he.defaultStrokeColor,se.bgColor=he.defaultFillColor,se.fontFamily=he.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new tt("Text color",he.defaultColorSet,se.color,Xe),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new tt("Fill color",he.defaultColorSet,se.bgColor,Me),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new Ze("Font",he.defaultFontFamilies,he.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new on,se.tipGrip.visual.transform.baseVal.appendItem(Ce.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return $e.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},ce.prototype.createTip=function(){Ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ce.prototype.pointerDown=function(le,me){this.state==="new"&&$e.prototype.pointerDown.call(this,le,me),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(me)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):$e.prototype.pointerDown.call(this,le,me)},ce.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,$e.prototype.pointerUp.call(this,le);else{var me=this.state==="creating";$e.prototype.pointerUp.call(this,le),this.setTipPoints(me),this.positionTip()}},ce.prototype.manipulate=function(le){if(this.tipMoving){var me=this.unrotatePoint(le);this.tipPosition={x:me.x-this.manipulationStartLeft,y:me.y-this.manipulationStartTop},this.positionTip()}else $e.prototype.manipulate.call(this,le)},ce.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(Ce.setAttributes(this.bgRectangle,[["fill",le]]),Ce.setAttributes(this.tip,[["fill",le]])),this.bgColor=le,this.fillColorChanged(le)},ce.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},ce.prototype.setTipPoints=function(le){le===void 0&&(le=!1);var me=Math.min(this.height/2,15),he=this.height/5;le&&(this.tipPosition={x:me+he/2,y:this.height+20});var se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(he=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:me,y:0},this.tipBase2Position={x:me+he,y:0}):(this.tipBase1Position={x:0,y:me},this.tipBase2Position={x:0,y:me+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(he=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-me-he,y:0},this.tipBase2Position={x:this.width-me,y:0}):(this.tipBase1Position={x:this.width,y:me},this.tipBase2Position={x:this.width,y:me+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(he=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-me-he,y:this.height},this.tipBase2Position={x:this.width-me,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-me-he},this.tipBase2Position={x:this.width,y:this.height-me}):se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(he=this.width/5,me=Math.min(this.width/2,15),this.tipBase1Position={x:me,y:this.height},this.tipBase2Position={x:me+he,y:this.height}):(this.tipBase1Position={x:0,y:this.height-me},this.tipBase2Position={x:0,y:this.height-me-he})},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),this.positionTip()},ce.prototype.positionTip=function(){Ce.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(ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.positionTip(),$e.prototype.select.call(this)},ce.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){var me=le;this.bgColor=me.bgColor,this.tipPosition=me.tipPosition,$e.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*me},this.positionTip()},ce.typeName="CalloutMarker",ce.title="Callout marker",ce.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>',ce}(kt),Gt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=he.defaultColor,se.strokeWidth=he.defaultStrokeWidth,se.strokeDasharray=he.defaultStrokeDasharray,se.fillColor=he.defaultFillColor,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.setOpacity=se.setOpacity.bind(se),se.createVisual=se.createVisual.bind(se),se.strokePanel=new tt("Line color",ve(he.defaultColorSet,["transparent"]),he.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new tt("Fill color",ve(he.defaultColorSet,["transparent"]),se.fillColor,Me),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new pn("Opacity",he.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ce.prototype.createVisual=function(){this.visual=Ce.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)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ce.prototype.manipulate=function(le){$e.prototype.manipulate.call(this,le)},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),this.setSize()},ce.prototype.setSize=function(){$e.prototype.setSize.call(this),Ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ce.prototype.pointerUp=function(le){$e.prototype.pointerUp.call(this,le),this.setSize()},ce.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&Ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ce.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&Ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ce.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&Ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&Ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ce.prototype.setOpacity=function(le){this.opacity=le,this.visual&&Ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.opacity=me.opacity,this.createVisual(),$e.prototype.restoreState.call(this,le),this.setSize()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.setSize()},ce.typeName="EllipseMarker",ce.title="Ellipse marker",ce.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>',ce}(yt),hn=function($e){function ce(le,me,he){return $e.call(this,le,me,he)||this}return Fe(ce,$e),Object.defineProperty(ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},ce.prototype.createTips=function(){this.tip1=Ce.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(Ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ce.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(Ce.createTransform()),this.visual.appendChild(this.tip2)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.state==="creating"&&this.createTips()},ce.prototype.adjustVisual=function(){if($e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ce.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()]]),Ce.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),me=this.tip1.transform.baseVal.getItem(0);me.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(me,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(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=$e.prototype.getState.call(this);return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le),this.createTips(),this.adjustVisual()},ce.typeName="MeasurementMarker",ce.title="Measurement marker",ce.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>',ce}(lt),Qe=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.strokePanel.colors=he.defaultColorSet,se.fillColor="transparent",se}return Fe(ce,$e),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=$e.prototype.getState.call(this);return le.typeName=ce.typeName,le},ce.typeName="EllipseFrameMarker",ce.title="Ellipse frame marker",ce.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>',ce}(Gt),ut=function(){function $e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty($e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),$e.prototype.addUndoStep=function(ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ce)||(this.undoStack.push(ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ce)&&this.redoStack.splice(0,this.redoStack.length))},$e.prototype.replaceLastUndoStep=function(ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ce)},$e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},$e.prototype.undo=function(){if(this.undoStack.length>1){var ce=this.undoStack.pop();return ce!==void 0&&this.redoStack.push(ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},$e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},$e}(),Yt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=he.defaultColor,se.strokeWidth=he.defaultStrokeWidth,se.strokeDasharray=he.defaultStrokeDasharray,se.strokePanel=new tt("Line color",he.defaultColorSet,he.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorCurve&&le!==this.visibleCurve&&!this.curveGrip.ownsTarget(le))},ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ce.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.selectorCurve=Ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ce.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)},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),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(me)&&(this.activeGrip=this.curveGrip,this._state="resize")},ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ce.prototype.setupControlBox=function(){$e.prototype.setupControlBox.call(this),this.curveControlLine1=Ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ce.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)},ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,$e.prototype.addControlGrips.call(this)},ce.prototype.positionGrips=function(){$e.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()))},ce.prototype.manipulate=function(le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+le.y-this.manipulationStartY),$e.prototype.manipulate.call(this,le)},ce.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),$e.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)},ce.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ce.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ce.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual()},ce.prototype.scale=function(le,me){this.curveX=this.curveX*le,this.curveY=this.curveY*me,$e.prototype.scale.call(this,le,me)},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ce.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},$e.prototype.getState.call(this));return le.typeName=ce.typeName,le},ce.prototype.restoreState=function(le){$e.prototype.restoreState.call(this,le);var me=le;this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.curveX=me.curveX,this.curveY=me.curveY,this.createVisual(),this.adjustVisual()},ce.typeName="CurveMarker",ce.title="Curve marker",ce.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>',ce}(ct),Qt=function($e){function ce(le,me,he){var se=$e.call(this,le,me,he)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.textColor="transparent",se.fontSize="1rem",se.isMoved=!1,se.captionText="Caption",se.PADDING=5,se.captionBoxWidth=0,se.captionBoxHeight=0,se.strokeColor=he.defaultColor,se.strokeWidth=he.defaultStrokeWidth,se.strokeDasharray=he.defaultStrokeDasharray,se.fillColor=he.defaultFillColor,se.textColor=he.defaultStrokeColor,se.fontFamily=he.defaultFontFamily,se.fontSize=he.defaultCaptionFontSize,se.captionText=he.defaultCaptionText,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se.sizeCaption=se.sizeCaption.bind(se),se.setCaptionText=se.setCaptionText.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.finishTextEditing=se.finishTextEditing.bind(se),se.setFont=se.setFont.bind(se),se.setTextColor=se.setTextColor.bind(se),se.strokePanel=new tt("Line color",ve(he.defaultColorSet,["transparent"]),se.strokeColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new tt("Fill color",ve(he.defaultColorSet,["transparent"]),se.fillColor,Me),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new de("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new je("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.fontFamilyPanel=new Ze("Font",he.defaultFontFamilies,he.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.textColorPanel=new tt("Text color",he.defaultColorSet,se.textColor,Xe),se.textColorPanel.onColorChanged=se.setTextColor,se}return Fe(ce,$e),ce.prototype.ownsTarget=function(le){return!(!$e.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},ce.prototype.createVisual=function(){this.visual=Ce.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ce.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ce.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=Ce.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()},ce.prototype.setCaptionText=function(le){this.captionText=le,this.captionElement.textContent=this.captionText,this.sizeCaption()},ce.prototype.pointerDown=function(le,me){$e.prototype.pointerDown.call(this,le,me),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ce.prototype.manipulate=function(le){$e.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)},ce.prototype.resize=function(le){$e.prototype.resize.call(this,le),this.setSize()},ce.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),Ce.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')"]]),Ce.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')"]])},ce.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(me){me.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(me){me.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(me){me.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()},ce.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"))},ce.prototype.finishTextEditing=function(le){this.setCaptionText(le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ce.prototype.setFont=function(le){this.captionElement&&Ce.setAttributes(this.captionElement,[["font-family",le]]),this.fontFamily=le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ce.prototype.setTextColor=function(le){this.captionElement&&Ce.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ce.prototype.setSize=function(){$e.prototype.setSize.call(this),Ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ce.prototype.pointerUp=function(le){$e.prototype.pointerUp.call(this,le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ce.prototype.dblClick=function(le,me){$e.prototype.dblClick.call(this,le,me),this.showTextEditor()},ce.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&Ce.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ce.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&Ce.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ce.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&Ce.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ce.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&Ce.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ce.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},$e.prototype.getState.call(this));return le.typeName=this.typeName,le},ce.prototype.restoreState=function(le){var me=le;this.fillColor=me.fillColor,this.strokeColor=me.strokeColor,this.strokeWidth=me.strokeWidth,this.strokeDasharray=me.strokeDasharray,this.textColor=me.textColor,this.fontFamily=me.fontFamily,this.captionText=me.captionText,this.fontSize=me.fontSize,this.createVisual(),$e.prototype.restoreState.call(this,le),this.setSize()},ce.prototype.scale=function(le,me){$e.prototype.scale.call(this,le,me),this.setSize()},ce.typeName="CaptionFrameMarker",ce.title="Caption frame marker",ce.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>',ce}(yt),tn=function(){function $e(ce,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ce,this.cancelable=le}return Object.defineProperty($e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),$e.prototype.preventDefault=function(){this._defaultPrevented=!0},$e}(),_t=function($e){function ce(le,me,he){var se=$e.call(this,le,!1)||this;return se.dataUrl=me,se.state=he,se}return Fe(ce,$e),ce}(tn),en=function($e){function ce(le,me,he){he===void 0&&(he=!1);var se=$e.call(this,le,he)||this;return se.marker=me,se}return Fe(ce,$e),ce}(tn),Cn=function(){function $e(){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 $e.prototype.addEventListener=function(ce,le){this[ce].push(le)},$e.prototype.removeEventListener=function(ce,le){var me=this[ce].indexOf(le);me>-1&&this[ce].splice(me,1)},$e}(),On=function(){function $e(ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new At,this._isOpen=!1,this.undoRedoManager=new ut,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 Cn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=$e.instanceCounter++,this.styles=new Te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ce,this.targetRoot=document.body,this.width=ce.clientWidth,this.height=ce.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($e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ze,pt,rt,kt,Qe,Gt,cn,mt,hn,qt,lt,Yt,Qt]},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ze,pt,rt,kt,Gt,cn,mt]},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ze,pt,rt,kt,cn]},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ce){var le=this;this._availableMarkerTypes.splice(0),ce.forEach(function(me){if(typeof me=="string"){var he=le.ALL_MARKER_TYPES.find(function(se){return se.typeName===me});he!==void 0&&le._availableMarkerTypes.push(he)}else le._availableMarkerTypes.push(me)})},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ce){this._zoomLevel=ce,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($e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),$e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),_e.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},$e.prototype.show=function(){var ce=this;this.styles.styleSheetRoot===void 0&&ge.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ge.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(le){return le(new tn(ce))})},$e.prototype.render=function(){return Be(this,void 0,void 0,function(){var ce;return Ye(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(ce=new we).naturalSize=this.renderAtNaturalSize,ce.imageType=this.renderImageType,ce.imageQuality=this.renderImageQuality,ce.markersOnly=this.renderMarkersOnly,ce.width=this.renderWidth,ce.height=this.renderHeight,[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return le.sent(),[4,ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,le.sent()]}})})},$e.prototype.close=function(ce){var le=this;if(ce===void 0&&(ce=!1),this.isOpen){var me=!1;ce||this.eventListeners.beforeclose.forEach(function(he){var se=new tn(le,!0);he(se),se.defaultPrevented&&(me=!0)}),me||(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 tn(le))}),this.detachEvents(),this._isOpen=!1)}},$e.prototype.addMarkersToToolbar=function(){for(var ce,le=[],me=0;me<arguments.length;me++)le[me]=arguments[me];(ce=this._availableMarkerTypes).push.apply(ce,le)},$e.prototype.addRenderEventListener=function(ce){this.addEventListener("render",function(le){ce(le.dataUrl,le.state)})},$e.prototype.removeRenderEventListener=function(ce){},$e.prototype.addCloseEventListener=function(ce){this.addEventListener("close",function(){ce()})},$e.prototype.removeCloseEventListener=function(ce){},$e.prototype.setupResizeObserver=function(){var ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ce.resize(ce.target.clientWidth,ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},$e.prototype.onPopupTargetResize=function(){var ce=1*this.target.clientWidth/this.target.clientHeight,le=this.editorCanvas.clientWidth/ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ce:this.editorCanvas.clientWidth,me=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ce;this.resize(le,me)},$e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},$e.prototype.resize=function(ce,le){this._isResizing=!0;var me=ce/this.imageWidth,he=le/this.imageHeight;this.imageWidth=Math.round(ce),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(me,he),this._isResizing=!1},$e.prototype.scaleMarkers=function(ce,le){var me,he=this;this._currentMarker&&this._currentMarker instanceof kt?this._currentMarker.scale(ce,le):(me=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(se){se!==he._currentMarker&&se.scale(ce,le)}),me!==void 0&&this.setCurrentMarker(me)},$e.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"},$e.prototype.setTopLeft=function(){var ce=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=ce.left-le.left,this.top=ce.top-le.top},$e.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)},$e.prototype.addDefs=function(){for(var ce,le=[],me=0;me<arguments.length;me++)le[me]=arguments[me];this.defs=Ce.createDefs(),this.addDefsToImage(),(ce=this.defs).append.apply(ce,le)},$e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},$e.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)},$e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},$e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},$e.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)},$e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},$e.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)},$e.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 ce=document.createElement("a");ce.href="https://markerjs.com/",ce.target="_blank",ce.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>',ce.title="Powered by marker.js",ce.style.display="grid",ce.style.alignItems="center",ce.style.justifyItems="center",ce.style.padding="3px",ce.style.width="20px",ce.style.height="20px",this.logoUI.appendChild(ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},$e.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")},$e.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"},$e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$e.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 ce=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=ce+"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 bt(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")},$e.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$e.prototype.removeMarker=function(ce){this.markerImage.removeChild(ce.container),this.markers.indexOf(ce)>-1&&this.markers.splice(this.markers.indexOf(ce),1),ce.dispose()},$e.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())},$e.prototype.toolbarButtonClicked=function(ce,le){if(ce==="marker"&&le!==void 0)this.createNewMarker(le);else if(ce==="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()}},$e.prototype.deleteSelectedMarker=function(){var ce=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(he){var se=new en(ce,ce._currentMarker,!0);he(se),se.defaultPrevented&&(le=!0)}),!le){var me=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 en(ce,me))})}}},$e.prototype.clear=function(){var ce=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var et=new en(ce,void 0,!0);Ie(et),et.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var me=function(Ie){var et=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 en(ce,et))})},he=this,se=this.markers.length-1;se>=0;se--)me(se);this.addUndoStep()}},Object.defineProperty($e.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),$e.prototype.showNotesEditor=function(){var ce;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=(ce=this._currentMarker.notes)!==null&&ce!==void 0?ce:"",this.overlayContainer.appendChild(this.notesArea))},$e.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)},$e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},$e.prototype.addUndoStep=function(){var ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),me=this.undoRedoManager.getLastUndoStep();if(!me||me.width===le.width&&me.height===le.height){var he=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),he<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(se){return se(new tn(ce))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(se){return se(new tn(ce))})}},$e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},$e.prototype.undoStep=function(){var ce=this,le=this.undoRedoManager.undo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(me){return me(new tn(ce))}))},$e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},$e.prototype.redoStep=function(){var ce=this,le=this.undoRedoManager.redo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(me){return me(new tn(ce))}))},$e.prototype.stepZoom=function(){var ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ce<this.zoomSteps.length-1?this.zoomSteps[ce+1]:this.zoomSteps[0]},$e.prototype.panTo=function(ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ce.x,top:this.prevPanPoint.y-ce.y}),this.prevPanPoint=ce},$e.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var ce,le,me=this;return Ye(this,function(he){switch(he.label){case 0:return[4,this.render()];case 1:return ce=he.sent(),le=this.getState(),this.eventListeners.render.forEach(function(se){return se(new _t(me,ce,le))}),this.close(!0),[2]}})})},$e.prototype.getState=function(ce){ce===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(me){return le.markers.push(me.getState())}),le},$e.prototype.restoreState=function(ce){var le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ce.markers.forEach(function(me){var he=le._availableMarkerTypes.find(function(Ie){return Ie.typeName===me.typeName});if(he!==void 0){var se=le.addNewMarker(he);se.restoreState(me),le.markers.push(se)}}),ce.width&&ce.height&&(ce.width!==this.imageWidth||ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ce.width,this.imageHeight/ce.height),this.eventListeners.restorestate.forEach(function(me){return me(new tn(le))})},$e.prototype.addNewMarker=function(ce){var le=Ce.createGroup();return this.markerImage.appendChild(le),new ce(le,this.overlayContainer,this.settings)},$e.prototype.createNewMarker=function(ce){var le,me=this;(le=typeof ce=="string"?this._availableMarkerTypes.find(function(he){return he.typeName===ce}):ce)&&(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 en(me,me._currentMarker))}))},$e.prototype.markerCreated=function(ce){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ce),this.setCurrentMarker(ce),ce instanceof pt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(pt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(me){return me(new en(le,le._currentMarker))})},$e.prototype.colorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ce,this.settings.defaultStrokeColor=ce)},$e.prototype.fillColorChanged=function(ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ce)},$e.prototype.markerStateChanged=function(ce){var le=this;this.eventListeners.markerchange.forEach(function(me){return me(new en(le,ce))})},$e.prototype.setCurrentMarker=function(ce){var le=this;this._currentMarker!==ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(me){return me(new en(le,le._currentMarker))})),this._currentMarker=ce,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(me){return me(new en(le,le._currentMarker))}))},$e.prototype.onPointerDown=function(ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ce.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(me){return me.ownsTarget(ce.target)});le!==void 0?(this.setCurrentMarker(le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ce.clientX,y:ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ce.clientX,ce.clientY))},$e.prototype.onDblClick=function(ce){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(me){return me.ownsTarget(ce.target)});le!==void 0&&le!==this._currentMarker&&this.setCurrentMarker(le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ce.clientX,ce.clientY),ce.target):this.setCurrentMarker()}},$e.prototype.onPointerMove=function(ce){this.touchPoints!==1&&ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ce.clientX,ce.clientY)):this.zoomLevel>1&&this.panTo({x:ce.clientX,y:ce.clientY}))},$e.prototype.onPointerUp=function(ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ce.clientX,ce.clientY)),this.isDragging=!1,this.addUndoStep()},$e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},$e.prototype.onKeyUp=function(ce){this._currentMarker===void 0||this.notesArea!==void 0||ce.key!=="Delete"&&ce.key!=="Backspace"||this.deleteSelectedMarker()},$e.prototype.clientToLocalCoordinates=function(ce,le){var me=this.markerImage.getBoundingClientRect();return{x:(ce-me.left)/this.zoomLevel,y:(le-me.top)/this.zoomLevel}},$e.prototype.onWindowResize=function(){this.positionUI()},$e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ce+"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()},$e.prototype.addLicenseKey=function(ce){_e.addKey(ce)},$e.prototype.addEventListener=function(ce,le){this.eventListeners.addEventListener(ce,le)},$e.prototype.removeEventListener=function(ce,le){this.eventListeners.removeEventListener(ce,le)},$e.prototype.renderState=function(ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty($e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),$e.prototype.focus=function(){var ce=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 tn(ce))}))},$e.prototype.blur=function(){var ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(le){return le(new tn(ce))}))},$e.instanceCounter=0,$e}()},95860:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return it}});var fe=ae(87462),Fe=ae(1413),Be=ae(4942),Ye=ae(97685),ve=ae(45987),Ce=ae(94184),_e=ae.n(Ce),we=ae(67294);function ge(yt){var Ee=we.useRef();Ee.current=yt;var de=we.useCallback(function(){for(var je,ze=arguments.length,At=new Array(ze),ct=0;ct<ze;ct++)At[ct]=arguments[ct];return(je=Ee.current)===null||je===void 0?void 0:je.call.apply(je,[Ee].concat(At))},[]);return de}function Te(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ft=Te()?we.useLayoutEffect:we.useEffect,Re=function(Ee,de){var je=we.useRef(!0);ft(function(){return Ee(je.current)},de),ft(function(){return je.current=!1,function(){je.current=!0}},[])},bt=function(Ee,de){Re(function(je){if(!je)return Ee()},de)},ht=null;function st(yt){var Ee=we.useRef(!1),de=we.useState(yt),je=(0,Ye.Z)(de,2),ze=je[0],At=je[1];we.useEffect(function(){return Ee.current=!1,function(){Ee.current=!0}},[]);function ct(lt,Ze){Ze&&Ee.current||At(lt)}return[ze,ct]}function tt(yt){return yt!==void 0}function Le(yt,Ee){var de=Ee||{},je=de.defaultValue,ze=de.value,At=de.onChange,ct=de.postState,lt=st(function(){return tt(ze)?ze:tt(je)?typeof je=="function"?je():je:typeof yt=="function"?yt():yt}),Ze=(0,Ye.Z)(lt,2),kt=Ze[0],pt=Ze[1],nn=ze!==void 0?ze:kt,rt=ct?ct(nn):nn,qt=ge(At),pn=st([nn]),cn=(0,Ye.Z)(pn,2),Xe=cn[0],Me=cn[1];bt(function(){var Gt=Xe[0];kt!==Gt&&qt(kt,Gt)},[Xe]),bt(function(){tt(ze)||pt(ze)},[ze]);var mt=ge(function(Gt,hn){pt(Gt,hn),Me([nn],hn)});return[rt,mt]}var xt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],on=(0,we.forwardRef)(function(yt,Ee){var de,je=yt.prefixCls,ze=je===void 0?"rc-checkbox":je,At=yt.className,ct=yt.style,lt=yt.checked,Ze=yt.disabled,kt=yt.defaultChecked,pt=kt===void 0?!1:kt,nn=yt.type,rt=nn===void 0?"checkbox":nn,qt=yt.title,pn=yt.onChange,cn=(0,ve.Z)(yt,xt),Xe=(0,we.useRef)(null),Me=Le(pt,{value:lt}),mt=(0,Ye.Z)(Me,2),Gt=mt[0],hn=mt[1];(0,we.useImperativeHandle)(Ee,function(){return{focus:function(){var Qt;(Qt=Xe.current)===null||Qt===void 0||Qt.focus()},blur:function(){var Qt;(Qt=Xe.current)===null||Qt===void 0||Qt.blur()},input:Xe.current}});var Qe=_e()(ze,At,(de={},(0,Be.Z)(de,"".concat(ze,"-checked"),Gt),(0,Be.Z)(de,"".concat(ze,"-disabled"),Ze),de)),ut=function(Qt){Ze||("checked"in yt||hn(Qt.target.checked),pn==null||pn({target:(0,Fe.Z)((0,Fe.Z)({},yt),{},{type:rt,checked:Qt.target.checked}),stopPropagation:function(){Qt.stopPropagation()},preventDefault:function(){Qt.preventDefault()},nativeEvent:Qt.nativeEvent}))};return we.createElement("span",{className:Qe,title:qt,style:ct},we.createElement("input",(0,fe.Z)({},cn,{className:"".concat(ze,"-input"),ref:Xe,onChange:ut,disabled:Ze,checked:!!Gt,type:rt})),we.createElement("span",{className:"".concat(ze,"-inner")}))}),it=on},26819:function(kn,Vt){"use strict";var ae;var fe=typeof Symbol=="function"&&Symbol.for,Fe=fe?Symbol.for("react.element"):60103,Be=fe?Symbol.for("react.portal"):60106,Ye=fe?Symbol.for("react.fragment"):60107,ve=fe?Symbol.for("react.strict_mode"):60108,Ce=fe?Symbol.for("react.profiler"):60114,_e=fe?Symbol.for("react.provider"):60109,we=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Te=fe?Symbol.for("react.concurrent_mode"):60111,ft=fe?Symbol.for("react.forward_ref"):60112,Re=fe?Symbol.for("react.suspense"):60113,bt=fe?Symbol.for("react.suspense_list"):60120,ht=fe?Symbol.for("react.memo"):60115,st=fe?Symbol.for("react.lazy"):60116,tt=fe?Symbol.for("react.block"):60121,Le=fe?Symbol.for("react.fundamental"):60117,xt=fe?Symbol.for("react.responder"):60118,on=fe?Symbol.for("react.scope"):60119;function it(Ee){if(typeof Ee=="object"&&Ee!==null){var de=Ee.$$typeof;switch(de){case Fe:switch(Ee=Ee.type,Ee){case ge:case Te:case Ye:case Ce:case ve:case Re:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case we:case ft:case st:case ht:case _e:return Ee;default:return de}}case Be:return de}}}function yt(Ee){return it(Ee)===Te}ae=ge,ae=Te,ae=we,ae=_e,ae=Fe,ae=ft,ae=Ye,ae=st,ae=ht,ae=Be,ae=Ce,ae=ve,ae=Re,ae=function(Ee){return yt(Ee)||it(Ee)===ge},ae=yt,ae=function(Ee){return it(Ee)===we},ae=function(Ee){return it(Ee)===_e},ae=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Fe},ae=function(Ee){return it(Ee)===ft},ae=function(Ee){return it(Ee)===Ye},ae=function(Ee){return it(Ee)===st},Vt.isMemo=function(Ee){return it(Ee)===ht},ae=function(Ee){return it(Ee)===Be},ae=function(Ee){return it(Ee)===Ce},ae=function(Ee){return it(Ee)===ve},ae=function(Ee){return it(Ee)===Re},ae=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ye||Ee===Te||Ee===Ce||Ee===ve||Ee===Re||Ee===bt||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===st||Ee.$$typeof===ht||Ee.$$typeof===_e||Ee.$$typeof===we||Ee.$$typeof===ft||Ee.$$typeof===Le||Ee.$$typeof===xt||Ee.$$typeof===on||Ee.$$typeof===tt)},ae=it},18459:function(kn,Vt,ae){"use strict";kn.exports=ae(26819)},16651:function(kn,Vt){"use strict";var ae;var fe=Symbol.for("react.element"),Fe=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Ce=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),bt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),st;st=Symbol.for("react.module.reference");function tt(Le){if(typeof Le=="object"&&Le!==null){var xt=Le.$$typeof;switch(xt){case fe:switch(Le=Le.type,Le){case Be:case ve:case Ye:case Te:case ft:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case we:case _e:case ge:case bt:case Re:case Ce:return Le;default:return xt}}case Fe:return xt}}}ae=_e,ae=Ce,ae=fe,ae=ge,ae=Be,ae=bt,ae=Re,ae=Fe,ae=ve,ae=Ye,ae=Te,ae=ft,ae=function(){return!1},ae=function(){return!1},ae=function(Le){return tt(Le)===_e},ae=function(Le){return tt(Le)===Ce},ae=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===fe},ae=function(Le){return tt(Le)===ge},ae=function(Le){return tt(Le)===Be},ae=function(Le){return tt(Le)===bt},ae=function(Le){return tt(Le)===Re},ae=function(Le){return tt(Le)===Fe},ae=function(Le){return tt(Le)===ve},ae=function(Le){return tt(Le)===Ye},ae=function(Le){return tt(Le)===Te},ae=function(Le){return tt(Le)===ft},ae=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ye||Le===Te||Le===ft||Le===ht||typeof Le=="object"&&Le!==null&&(Le.$$typeof===bt||Le.$$typeof===Re||Le.$$typeof===Ce||Le.$$typeof===_e||Le.$$typeof===ge||Le.$$typeof===st||Le.getModuleId!==void 0)},ae=tt},33993:function(kn,Vt,ae){"use strict";ae(16651)},82523:function(kn,Vt){"use strict";var ae;var fe=Symbol.for("react.element"),Fe=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Ce=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),bt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),st;st=Symbol.for("react.module.reference");function tt(Le){if(typeof Le=="object"&&Le!==null){var xt=Le.$$typeof;switch(xt){case fe:switch(Le=Le.type,Le){case Be:case ve:case Ye:case Te:case ft:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case we:case _e:case ge:case bt:case Re:case Ce:return Le;default:return xt}}case Fe:return xt}}}ae=_e,ae=Ce,ae=fe,ae=ge,ae=Be,ae=bt,ae=Re,ae=Fe,ae=ve,ae=Ye,ae=Te,ae=ft,ae=function(){return!1},ae=function(){return!1},ae=function(Le){return tt(Le)===_e},ae=function(Le){return tt(Le)===Ce},ae=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===fe},ae=function(Le){return tt(Le)===ge},ae=function(Le){return tt(Le)===Be},ae=function(Le){return tt(Le)===bt},ae=function(Le){return tt(Le)===Re},ae=function(Le){return tt(Le)===Fe},ae=function(Le){return tt(Le)===ve},ae=function(Le){return tt(Le)===Ye},ae=function(Le){return tt(Le)===Te},ae=function(Le){return tt(Le)===ft},ae=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ye||Le===Te||Le===ft||Le===ht||typeof Le=="object"&&Le!==null&&(Le.$$typeof===bt||Le.$$typeof===Re||Le.$$typeof===Ce||Le.$$typeof===_e||Le.$$typeof===ge||Le.$$typeof===st||Le.getModuleId!==void 0)},ae=tt},27183:function(kn,Vt,ae){"use strict";ae(82523)},67656:function(kn,Vt,ae){"use strict";ae.r(Vt),ae.d(Vt,{BaseInput:function(){return Te},default:function(){return on}});var fe=ae(87462),Fe=ae(1413),Be=ae(4942),Ye=ae(71002),ve=ae(94184),Ce=ae.n(ve),_e=ae(67294),we=ae(87887),ge=function(yt){var Ee,de,je=yt.inputElement,ze=yt.prefixCls,At=yt.prefix,ct=yt.suffix,lt=yt.addonBefore,Ze=yt.addonAfter,kt=yt.className,pt=yt.style,nn=yt.disabled,rt=yt.readOnly,qt=yt.focused,pn=yt.triggerFocus,cn=yt.allowClear,Xe=yt.value,Me=yt.handleReset,mt=yt.hidden,Gt=yt.classes,hn=yt.classNames,Qe=yt.dataAttrs,ut=yt.styles,Yt=yt.components,Qt=(Yt==null?void 0:Yt.affixWrapper)||"span",tn=(Yt==null?void 0:Yt.groupWrapper)||"span",_t=(Yt==null?void 0:Yt.wrapper)||"span",en=(Yt==null?void 0:Yt.groupAddon)||"span",Cn=(0,_e.useRef)(null),On=function(jt){var rn;(rn=Cn.current)!==null&&rn!==void 0&&rn.contains(jt.target)&&(pn==null||pn())},$e=function(){var jt;if(!cn)return null;var rn=!nn&&!rt&&Xe,qn="".concat(ze,"-clear-icon"),lr=(0,Ye.Z)(cn)==="object"&&cn!==null&&cn!==void 0&&cn.clearIcon?cn.clearIcon:"\u2716";return _e.createElement("span",{onClick:Me,onMouseDown:function(Sn){return Sn.preventDefault()},className:Ce()(qn,(jt={},(0,Be.Z)(jt,"".concat(qn,"-hidden"),!rn),(0,Be.Z)(jt,"".concat(qn,"-has-suffix"),!!ct),jt)),role:"button",tabIndex:-1},lr)},ce=(0,_e.cloneElement)(je,{value:Xe,hidden:mt,className:Ce()((Ee=je.props)===null||Ee===void 0?void 0:Ee.className,!(0,we.X3)(yt)&&!(0,we.He)(yt)&&kt)||null,style:(0,Fe.Z)((0,Fe.Z)({},(de=je.props)===null||de===void 0?void 0:de.style),!(0,we.X3)(yt)&&!(0,we.He)(yt)?pt:{})});if((0,we.X3)(yt)){var le,me="".concat(ze,"-affix-wrapper"),he=Ce()(me,(le={},(0,Be.Z)(le,"".concat(me,"-disabled"),nn),(0,Be.Z)(le,"".concat(me,"-focused"),qt),(0,Be.Z)(le,"".concat(me,"-readonly"),rt),(0,Be.Z)(le,"".concat(me,"-input-with-clear-btn"),ct&&cn&&Xe),le),!(0,we.He)(yt)&&kt,Gt==null?void 0:Gt.affixWrapper,hn==null?void 0:hn.affixWrapper),se=(ct||cn)&&_e.createElement("span",{className:Ce()("".concat(ze,"-suffix"),hn==null?void 0:hn.suffix),style:ut==null?void 0:ut.suffix},$e(),ct);ce=_e.createElement(Qt,(0,fe.Z)({className:he,style:(0,Fe.Z)((0,Fe.Z)({},(0,we.He)(yt)?void 0:pt),ut==null?void 0:ut.affixWrapper),hidden:!(0,we.He)(yt)&&mt,onClick:On},Qe==null?void 0:Qe.affixWrapper,{ref:Cn}),At&&_e.createElement("span",{className:Ce()("".concat(ze,"-prefix"),hn==null?void 0:hn.prefix),style:ut==null?void 0:ut.prefix},At),(0,_e.cloneElement)(je,{value:Xe,hidden:null}),se)}if((0,we.He)(yt)){var Ie="".concat(ze,"-group"),et="".concat(Ie,"-addon"),$t=Ce()("".concat(ze,"-wrapper"),Ie,Gt==null?void 0:Gt.wrapper),Ht=Ce()("".concat(ze,"-group-wrapper"),kt,Gt==null?void 0:Gt.group);return _e.createElement(tn,{className:Ht,style:pt,hidden:mt},_e.createElement(_t,{className:$t},lt&&_e.createElement(en,{className:et},lt),(0,_e.cloneElement)(ce,{hidden:null}),Ze&&_e.createElement(en,{className:et},Ze)))}return ce},Te=ge,ft=ae(74902),Re=ae(97685),bt=ae(45987),ht=ae(21770),st=ae(98423),tt=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Le=(0,_e.forwardRef)(function(it,yt){var Ee=it.autoComplete,de=it.onChange,je=it.onFocus,ze=it.onBlur,At=it.onPressEnter,ct=it.onKeyDown,lt=it.prefixCls,Ze=lt===void 0?"rc-input":lt,kt=it.disabled,pt=it.htmlSize,nn=it.className,rt=it.maxLength,qt=it.suffix,pn=it.showCount,cn=it.type,Xe=cn===void 0?"text":cn,Me=it.classes,mt=it.classNames,Gt=it.styles,hn=(0,bt.Z)(it,tt),Qe=(0,ht.Z)(it.defaultValue,{value:it.value}),ut=(0,Re.Z)(Qe,2),Yt=ut[0],Qt=ut[1],tn=(0,_e.useState)(!1),_t=(0,Re.Z)(tn,2),en=_t[0],Cn=_t[1],On=(0,_e.useRef)(null),$e=function(Ht){On.current&&(0,we.nH)(On.current,Ht)};(0,_e.useImperativeHandle)(yt,function(){return{focus:$e,blur:function(){var Ht;(Ht=On.current)===null||Ht===void 0||Ht.blur()},setSelectionRange:function(Ht,Xt,jt){var rn;(rn=On.current)===null||rn===void 0||rn.setSelectionRange(Ht,Xt,jt)},select:function(){var Ht;(Ht=On.current)===null||Ht===void 0||Ht.select()},input:On.current}}),(0,_e.useEffect)(function(){Cn(function($t){return $t&&kt?!1:$t})},[kt]);var ce=function(Ht){it.value===void 0&&Qt(Ht.target.value),On.current&&(0,we.rJ)(On.current,Ht,de)},le=function(Ht){At&&Ht.key==="Enter"&&At(Ht),ct==null||ct(Ht)},me=function(Ht){Cn(!0),je==null||je(Ht)},he=function(Ht){Cn(!1),ze==null||ze(Ht)},se=function(Ht){Qt(""),$e(),On.current&&(0,we.rJ)(On.current,Ht,de)},Ie=function(){var Ht=(0,st.Z)(it,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return _e.createElement("input",(0,fe.Z)({autoComplete:Ee},Ht,{onChange:ce,onFocus:me,onBlur:he,onKeyDown:le,className:Ce()(Ze,(0,Be.Z)({},"".concat(Ze,"-disabled"),kt),mt==null?void 0:mt.input),style:Gt==null?void 0:Gt.input,ref:On,size:pt,type:Xe}))},et=function(){var Ht=Number(rt)>0;if(qt||pn){var Xt=(0,we.D7)(Yt),jt=(0,ft.Z)(Xt).length,rn=(0,Ye.Z)(pn)==="object"?pn.formatter({value:Xt,count:jt,maxLength:rt}):"".concat(jt).concat(Ht?" / ".concat(rt):"");return _e.createElement(_e.Fragment,null,!!pn&&_e.createElement("span",{className:Ce()("".concat(Ze,"-show-count-suffix"),(0,Be.Z)({},"".concat(Ze,"-show-count-has-suffix"),!!qt),mt==null?void 0:mt.count),style:(0,Fe.Z)({},Gt==null?void 0:Gt.count)},rn),qt)}return null};return _e.createElement(Te,(0,fe.Z)({},hn,{prefixCls:Ze,className:nn,inputElement:Ie(),handleReset:se,value:(0,we.D7)(Yt),focused:en,triggerFocus:$e,suffix:et(),disabled:kt,classes:Me,classNames:mt,styles:Gt}))}),xt=Le,on=xt},87887:function(kn,Vt,ae){"use strict";ae.d(Vt,{D7:function(){return ve},He:function(){return fe},X3:function(){return Fe},nH:function(){return Ye},rJ:function(){return Be}});function fe(Ce){return!!(Ce.addonBefore||Ce.addonAfter)}function Fe(Ce){return!!(Ce.prefix||Ce.suffix||Ce.allowClear)}function Be(Ce,_e,we,ge){if(we){var Te=_e;if(_e.type==="click"){var ft=Ce.cloneNode(!0);Te=Object.create(_e,{target:{value:ft},currentTarget:{value:ft}}),ft.value="",we(Te);return}if(ge!==void 0){Te=Object.create(_e,{target:{value:Ce},currentTarget:{value:Ce}}),Ce.value=ge,we(Te);return}we(Te)}}function Ye(Ce,_e){if(Ce){Ce.focus(_e);var we=_e||{},ge=we.cursor;if(ge){var Te=Ce.value.length;switch(ge){case"start":Ce.setSelectionRange(0,0);break;case"end":Ce.setSelectionRange(Te,Te);break;default:Ce.setSelectionRange(0,Te)}}}}function ve(Ce){return typeof Ce=="undefined"||Ce===null?"":String(Ce)}},78595:function(kn,Vt,ae){"use strict";ae.d(Vt,{iz:function(){return gi},ck:function(){return Dr},BW:function(){return ci},sN:function(){return Dr},Wd:function(){return mn},ZP:function(){return Ve},Xl:function(){return rn}});var fe=ae(87462),Fe=ae(4942),Be=ae(1413),Ye=ae(74902),ve=ae(97685),Ce=ae(45987),_e=ae(94184),we=ae.n(_e),ge=ae(67294),Te=ae(48555);function ft(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Re=ft()?ge.useLayoutEffect:ge.useEffect,bt=function(qe,vt){var St=ge.useRef(!0);Re(function(){return qe(St.current)},vt),Re(function(){return St.current=!1,function(){St.current=!0}},[])},ht=function(qe,vt){bt(function(St){if(!St)return qe()},vt)},st=bt,tt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Le=void 0;function xt(Ue,qe){var vt=Ue.prefixCls,St=Ue.invalidate,Nt=Ue.item,wn=Ue.renderItem,Ln=Ue.responsive,br=Ue.responsiveDisabled,Br=Ue.registerSize,hr=Ue.itemKey,Wn=Ue.className,Tn=Ue.style,Jn=Ue.children,ar=Ue.display,$r=Ue.order,mr=Ue.component,gr=mr===void 0?"div":mr,Cr=(0,Ce.Z)(Ue,tt),Er=Ln&&!ar;function Fr(dn){Br(hr,dn)}ge.useEffect(function(){return function(){Fr(null)}},[]);var He=wn&&Nt!==Le?wn(Nt):Jn,Ge;St||(Ge={opacity:Er?0:1,height:Er?0:Le,overflowY:Er?"hidden":Le,order:Ln?$r:Le,pointerEvents:Er?"none":Le,position:Er?"absolute":Le});var Ft={};Er&&(Ft["aria-hidden"]=!0);var Et=ge.createElement(gr,(0,fe.Z)({className:we()(!St&&vt,Wn),style:(0,Be.Z)((0,Be.Z)({},Ge),Tn)},Ft,Cr,{ref:qe}),He);return Ln&&(Et=ge.createElement(Te.Z,{onResize:function(In){var zn=In.offsetWidth;Fr(zn)},disabled:br},Et)),Et}var on=ge.forwardRef(xt);on.displayName="Item";var it=on;function yt(Ue){var qe=ge.useRef();qe.current=Ue;var vt=ge.useCallback(function(){for(var St,Nt=arguments.length,wn=new Array(Nt),Ln=0;Ln<Nt;Ln++)wn[Ln]=arguments[Ln];return(St=qe.current)===null||St===void 0?void 0:St.call.apply(St,[qe].concat(wn))},[]);return vt}var Ee=ae(73935),de=function(qe){return+setTimeout(qe,16)},je=function(qe){return clearTimeout(qe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(de=function(qe){return window.requestAnimationFrame(qe)},je=function(qe){return window.cancelAnimationFrame(qe)});var ze=0,At=new Map;function ct(Ue){At.delete(Ue)}var lt=function(qe){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ze+=1;var St=ze;function Nt(wn){if(wn===0)ct(St),qe();else{var Ln=de(function(){Nt(wn-1)});At.set(St,Ln)}}return Nt(vt),St};lt.cancel=function(Ue){var qe=At.get(Ue);return ct(qe),je(qe)};var Ze=lt;function kt(Ue){if(typeof MessageChannel=="undefined")Ze(Ue);else{var qe=new MessageChannel;qe.port1.onmessage=function(){return Ue()},qe.port2.postMessage(void 0)}}function pt(){var Ue=ge.useRef(null),qe=function(St){Ue.current||(Ue.current=[],kt(function(){(0,Ee.unstable_batchedUpdates)(function(){Ue.current.forEach(function(Nt){Nt()}),Ue.current=null})})),Ue.current.push(St)};return qe}function nn(Ue,qe){var vt=ge.useState(qe),St=(0,ve.Z)(vt,2),Nt=St[0],wn=St[1],Ln=yt(function(br){Ue(function(){wn(br)})});return[Nt,Ln]}var rt=ge.createContext(null),qt=["component"],pn=["className"],cn=["className"],Xe=function(qe,vt){var St=ge.useContext(rt);if(!St){var Nt=qe.component,wn=Nt===void 0?"div":Nt,Ln=(0,Ce.Z)(qe,qt);return ge.createElement(wn,(0,fe.Z)({},Ln,{ref:vt}))}var br=St.className,Br=(0,Ce.Z)(St,pn),hr=qe.className,Wn=(0,Ce.Z)(qe,cn);return ge.createElement(rt.Provider,{value:null},ge.createElement(it,(0,fe.Z)({ref:vt,className:we()(br,hr)},Br,Wn)))},Me=ge.forwardRef(Xe);Me.displayName="RawItem";var mt=Me,Gt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],hn="responsive",Qe="invalidate";function ut(Ue){return"+ ".concat(Ue.length," ...")}function Yt(Ue,qe){var vt=Ue.prefixCls,St=vt===void 0?"rc-overflow":vt,Nt=Ue.data,wn=Nt===void 0?[]:Nt,Ln=Ue.renderItem,br=Ue.renderRawItem,Br=Ue.itemKey,hr=Ue.itemWidth,Wn=hr===void 0?10:hr,Tn=Ue.ssr,Jn=Ue.style,ar=Ue.className,$r=Ue.maxCount,mr=Ue.renderRest,gr=Ue.renderRawRest,Cr=Ue.suffix,Er=Ue.component,Fr=Er===void 0?"div":Er,He=Ue.itemComponent,Ge=Ue.onVisibleChange,Ft=(0,Ce.Z)(Ue,Gt),Et=Tn==="full",dn=pt(),In=nn(dn,null),zn=(0,ve.Z)(In,2),or=zn[0],jn=zn[1],_n=or||0,cr=nn(dn,new Map),fr=(0,ve.Z)(cr,2),Hr=fr[0],ur=fr[1],ti=nn(dn,0),yi=(0,ve.Z)(ti,2),ni=yi[0],fi=yi[1],jr=nn(dn,0),oi=(0,ve.Z)(jr,2),Ci=oi[0],Oi=oi[1],ii=nn(dn,0),Ni=(0,ve.Z)(ii,2),la=Ni[0],Ha=Ni[1],Aa=(0,ge.useState)(null),pa=(0,ve.Z)(Aa,2),ka=pa[0],Pa=pa[1],Ui=(0,ge.useState)(null),ca=(0,ve.Z)(Ui,2),bi=ca[0],zi=ca[1],ia=ge.useMemo(function(){return bi===null&&Et?Number.MAX_SAFE_INTEGER:bi||0},[bi,or]),_a=(0,ge.useState)(!1),So=(0,ve.Z)(_a,2),ho=So[0],po=So[1],Xa="".concat(St,"-item"),Ra=Math.max(ni,Ci),Hi=$r===hn,yo=wn.length&&Hi,Xi=$r===Qe,Ei=yo||typeof $r=="number"&&wn.length>$r,ua=(0,ge.useMemo)(function(){var aa=wn;return yo?or===null&&Et?aa=wn:aa=wn.slice(0,Math.min(wn.length,_n/Wn)):typeof $r=="number"&&(aa=wn.slice(0,$r)),aa},[wn,Wn,or,$r,yo]),Ja=(0,ge.useMemo)(function(){return yo?wn.slice(ia+1):wn.slice(ua.length)},[wn,ua,yo,ia]),wa=(0,ge.useCallback)(function(aa,va){var qa;return typeof Br=="function"?Br(aa):(qa=Br&&(aa==null?void 0:aa[Br]))!==null&&qa!==void 0?qa:va},[Br]),Wa=(0,ge.useCallback)(Ln||function(aa){return aa},[Ln]);function Ki(aa,va,qa){bi===aa&&(va===void 0||va===ka)||(zi(aa),qa||(po(aa<wn.length-1),Ge==null||Ge(aa)),va!==void 0&&Pa(va))}function ro(aa,va){jn(va.clientWidth)}function so(aa,va){ur(function(qa){var uo=new Map(qa);return va===null?uo.delete(aa):uo.set(aa,va),uo})}function to(aa,va){Oi(va),fi(Ci)}function lo(aa,va){Ha(va)}function vo(aa){return Hr.get(wa(ua[aa],aa))}st(function(){if(_n&&typeof Ra=="number"&&ua){var aa=la,va=ua.length,qa=va-1;if(!va){Ki(0,null);return}for(var uo=0;uo<va;uo+=1){var Po=vo(uo);if(Et&&(Po=Po||0),Po===void 0){Ki(uo-1,void 0,!0);break}if(aa+=Po,qa===0&&aa<=_n||uo===qa-1&&aa+vo(qa)<=_n){Ki(qa,null);break}else if(aa+Ra>_n){Ki(uo-1,aa-Po-la+Ci);break}}Cr&&vo(0)+la>_n&&Pa(null)}},[_n,Hr,Ci,la,wa,ua]);var Ao=ho&&!!Ja.length,no={};ka!==null&&yo&&(no={position:"absolute",left:ka,top:0});var ao={prefixCls:Xa,responsive:yo,component:He,invalidate:Xi},zo=br?function(aa,va){var qa=wa(aa,va);return ge.createElement(rt.Provider,{key:qa,value:(0,Be.Z)((0,Be.Z)({},ao),{},{order:va,item:aa,itemKey:qa,registerSize:so,display:va<=ia})},br(aa,va))}:function(aa,va){var qa=wa(aa,va);return ge.createElement(it,(0,fe.Z)({},ao,{order:va,key:qa,item:aa,renderItem:Wa,itemKey:qa,registerSize:so,display:va<=ia}))},Ho,Jo={order:Ao?ia:Number.MAX_SAFE_INTEGER,className:"".concat(Xa,"-rest"),registerSize:to,display:Ao};if(gr)gr&&(Ho=ge.createElement(rt.Provider,{value:(0,Be.Z)((0,Be.Z)({},ao),Jo)},gr(Ja)));else{var To=mr||ut;Ho=ge.createElement(it,(0,fe.Z)({},ao,Jo),typeof To=="function"?To(Ja):To)}var co=ge.createElement(Fr,(0,fe.Z)({className:we()(!Xi&&St,ar),style:Jn,ref:qe},Ft),ua.map(zo),Ei?Ho:null,Cr&&ge.createElement(it,(0,fe.Z)({},ao,{responsive:Hi,responsiveDisabled:!yo,order:ia,className:"".concat(Xa,"-suffix"),registerSize:lo,display:!0,style:no}),Cr));return Hi&&(co=ge.createElement(Te.Z,{onResize:ro,disabled:!yo},co)),co}var Qt=ge.forwardRef(Yt);Qt.displayName="Overflow",Qt.Item=mt,Qt.RESPONSIVE=hn,Qt.INVALIDATE=Qe;var tn=Qt,_t=tn,en=ae(21770),Cn=ae(80334),On=ae(91881),$e=ge.createContext(null);function ce(Ue,qe){return Ue===void 0?null:"".concat(Ue,"-").concat(qe)}function le(Ue){var qe=ge.useContext($e);return ce(qe,Ue)}var me=ae(56982),he=["children","locked"],se=ge.createContext(null);function Ie(Ue,qe){var vt=(0,Be.Z)({},Ue);return Object.keys(qe).forEach(function(St){var Nt=qe[St];Nt!==void 0&&(vt[St]=Nt)}),vt}function et(Ue){var qe=Ue.children,vt=Ue.locked,St=(0,Ce.Z)(Ue,he),Nt=ge.useContext(se),wn=(0,me.Z)(function(){return Ie(Nt,St)},[Nt,St],function(Ln,br){return!vt&&(Ln[0]!==br[0]||!(0,On.Z)(Ln[1],br[1],!0))});return ge.createElement(se.Provider,{value:wn},qe)}var $t=[],Ht=ge.createContext(null);function Xt(){return ge.useContext(Ht)}var jt=ge.createContext($t);function rn(Ue){var qe=ge.useContext(jt);return ge.useMemo(function(){return Ue!==void 0?[].concat((0,Ye.Z)(qe),[Ue]):qe},[qe,Ue])}var qn=ge.createContext(null),lr=ge.createContext({}),Bt=lr,Sn=ae(15105),dr=ae(75164),Wr=function(Ue){if(!Ue)return!1;if(Ue instanceof Element){if(Ue.offsetParent)return!0;if(Ue.getBBox){var qe=Ue.getBBox(),vt=qe.width,St=qe.height;if(vt||St)return!0}if(Ue.getBoundingClientRect){var Nt=Ue.getBoundingClientRect(),wn=Nt.width,Ln=Nt.height;if(wn||Ln)return!0}}return!1};function gt(Ue){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Wr(Ue)){var vt=Ue.nodeName.toLowerCase(),St=["input","select","textarea","button"].includes(vt)||Ue.isContentEditable||vt==="a"&&!!Ue.getAttribute("href"),Nt=Ue.getAttribute("tabindex"),wn=Number(Nt),Ln=null;return Nt&&!Number.isNaN(wn)?Ln=wn:St&&Ln===null&&(Ln=0),St&&Ue.disabled&&(Ln=null),Ln!==null&&(Ln>=0||qe&&Ln<0)}return!1}function sn(Ue){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=(0,Ye.Z)(Ue.querySelectorAll("*")).filter(function(St){return gt(St,qe)});return gt(Ue,qe)&&vt.unshift(Ue),vt}var tr=null;function Zn(){tr=document.activeElement}function xr(){tr=null}function Kr(){if(tr)try{tr.focus()}catch(Ue){}}function Jr(Ue,qe){if(qe.keyCode===9){var vt=sn(Ue),St=vt[qe.shiftKey?0:vt.length-1],Nt=St===document.activeElement||Ue===document.activeElement;if(Nt){var wn=vt[qe.shiftKey?vt.length-1:0];wn.focus(),qe.preventDefault()}}}var Zr=Sn.Z.LEFT,ei=Sn.Z.RIGHT,pi=Sn.Z.UP,kr=Sn.Z.DOWN,Ti=Sn.Z.ENTER,na=Sn.Z.ESC,ea=Sn.Z.HOME,oa=Sn.Z.END,Li=[pi,kr,Zr,ei];function Dt(Ue,qe,vt,St){var Nt,wn,Ln,br,Br="prev",hr="next",Wn="children",Tn="parent";if(Ue==="inline"&&St===Ti)return{inlineTrigger:!0};var Jn=(Nt={},(0,Fe.Z)(Nt,pi,Br),(0,Fe.Z)(Nt,kr,hr),Nt),ar=(wn={},(0,Fe.Z)(wn,Zr,vt?hr:Br),(0,Fe.Z)(wn,ei,vt?Br:hr),(0,Fe.Z)(wn,kr,Wn),(0,Fe.Z)(wn,Ti,Wn),wn),$r=(Ln={},(0,Fe.Z)(Ln,pi,Br),(0,Fe.Z)(Ln,kr,hr),(0,Fe.Z)(Ln,Ti,Wn),(0,Fe.Z)(Ln,na,Tn),(0,Fe.Z)(Ln,Zr,vt?Wn:Tn),(0,Fe.Z)(Ln,ei,vt?Tn:Wn),Ln),mr={inline:Jn,horizontal:ar,vertical:$r,inlineSub:Jn,horizontalSub:$r,verticalSub:$r},gr=(br=mr["".concat(Ue).concat(qe?"":"Sub")])===null||br===void 0?void 0:br[St];switch(gr){case Br:return{offset:-1,sibling:!0};case hr:return{offset:1,sibling:!0};case Tn:return{offset:-1,sibling:!1};case Wn:return{offset:1,sibling:!1};default:return null}}function Hn(Ue){for(var qe=Ue;qe;){if(qe.getAttribute("data-menu-list"))return qe;qe=qe.parentElement}return null}function Vn(Ue,qe){for(var vt=Ue||document.activeElement;vt;){if(qe.has(vt))return vt;vt=vt.parentElement}return null}function Gn(Ue,qe){var vt=sn(Ue,!0);return vt.filter(function(St){return qe.has(St)})}function Lr(Ue,qe,vt){var St=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ue)return null;var Nt=Gn(Ue,qe),wn=Nt.length,Ln=Nt.findIndex(function(br){return vt===br});return St<0?Ln===-1?Ln=wn-1:Ln-=1:St>0&&(Ln+=1),Ln=(Ln+wn)%wn,Nt[Ln]}function yr(Ue,qe,vt,St,Nt,wn,Ln,br,Br,hr){var Wn=ge.useRef(),Tn=ge.useRef();Tn.current=qe;var Jn=function(){dr.Z.cancel(Wn.current)};return ge.useEffect(function(){return function(){Jn()}},[]),function(ar){var $r=ar.which;if([].concat(Li,[Ti,na,ea,oa]).includes($r)){var mr,gr,Cr,Er=function(){mr=new Set,gr=new Map,Cr=new Map;var fr=wn();return fr.forEach(function(Hr){var ur=document.querySelector("[data-menu-id='".concat(ce(St,Hr),"']"));ur&&(mr.add(ur),Cr.set(ur,Hr),gr.set(Hr,ur))}),mr};Er();var Fr=gr.get(qe),He=Vn(Fr,mr),Ge=Cr.get(He),Ft=Dt(Ue,Ln(Ge,!0).length===1,vt,$r);if(!Ft&&$r!==ea&&$r!==oa)return;(Li.includes($r)||[ea,oa].includes($r))&&ar.preventDefault();var Et=function(fr){if(fr){var Hr=fr,ur=fr.querySelector("a");ur!=null&&ur.getAttribute("href")&&(Hr=ur);var ti=Cr.get(fr);br(ti),Jn(),Wn.current=(0,dr.Z)(function(){Tn.current===ti&&Hr.focus()})}};if([ea,oa].includes($r)||Ft.sibling||!He){var dn;!He||Ue==="inline"?dn=Nt.current:dn=Hn(He);var In,zn=Gn(dn,mr);$r===ea?In=zn[0]:$r===oa?In=zn[zn.length-1]:In=Lr(dn,mr,He,Ft.offset),Et(In)}else if(Ft.inlineTrigger)Br(Ge);else if(Ft.offset>0)Br(Ge,!0),Jn(),Wn.current=(0,dr.Z)(function(){Er();var cr=He.getAttribute("aria-controls"),fr=document.getElementById(cr),Hr=Lr(fr,mr);Et(Hr)},5);else if(Ft.offset<0){var or=Ln(Ge,!0),jn=or[or.length-2],_n=gr.get(jn);Br(jn,!1),Et(_n)}}hr==null||hr(ar)}}function Pr(Ue){Promise.resolve().then(Ue)}var nr="__RC_UTIL_PATH_SPLIT__",ot=function(qe){return qe.join(nr)},Ct=function(qe){return qe.split(nr)},zt="rc-menu-more";function un(){var Ue=ge.useState({}),qe=(0,ve.Z)(Ue,2),vt=qe[1],St=(0,ge.useRef)(new Map),Nt=(0,ge.useRef)(new Map),wn=ge.useState([]),Ln=(0,ve.Z)(wn,2),br=Ln[0],Br=Ln[1],hr=(0,ge.useRef)(0),Wn=(0,ge.useRef)(!1),Tn=function(){Wn.current||vt({})},Jn=(0,ge.useCallback)(function(Fr,He){var Ge=ot(He);Nt.current.set(Ge,Fr),St.current.set(Fr,Ge),hr.current+=1;var Ft=hr.current;Pr(function(){Ft===hr.current&&Tn()})},[]),ar=(0,ge.useCallback)(function(Fr,He){var Ge=ot(He);Nt.current.delete(Ge),St.current.delete(Fr)},[]),$r=(0,ge.useCallback)(function(Fr){Br(Fr)},[]),mr=(0,ge.useCallback)(function(Fr,He){var Ge=St.current.get(Fr)||"",Ft=Ct(Ge);return He&&br.includes(Ft[0])&&Ft.unshift(zt),Ft},[br]),gr=(0,ge.useCallback)(function(Fr,He){return Fr.some(function(Ge){var Ft=mr(Ge,!0);return Ft.includes(He)})},[mr]),Cr=function(){var He=(0,Ye.Z)(St.current.keys());return br.length&&He.push(zt),He},Er=(0,ge.useCallback)(function(Fr){var He="".concat(St.current.get(Fr)).concat(nr),Ge=new Set;return(0,Ye.Z)(Nt.current.keys()).forEach(function(Ft){Ft.startsWith(He)&&Ge.add(Nt.current.get(Ft))}),Ge},[]);return ge.useEffect(function(){return function(){Wn.current=!0}},[]),{registerPath:Jn,unregisterPath:ar,refreshOverflowKeys:$r,isSubPathKey:gr,getKeyPath:mr,getKeys:Cr,getSubPathKeys:Er}}function Je(Ue){var qe=ge.useRef(Ue);qe.current=Ue;var vt=ge.useCallback(function(){for(var St,Nt=arguments.length,wn=new Array(Nt),Ln=0;Ln<Nt;Ln++)wn[Ln]=arguments[Ln];return(St=qe.current)===null||St===void 0?void 0:St.call.apply(St,[qe].concat(wn))},[]);return Ue?vt:void 0}var Mt=Math.random().toFixed(5).toString().slice(2),ln=0;function Jt(Ue){var qe=(0,en.Z)(Ue,{value:Ue}),vt=(0,ve.Z)(qe,2),St=vt[0],Nt=vt[1];return ge.useEffect(function(){ln+=1;var wn="".concat(Mt,"-").concat(ln);Nt("rc-menu-uuid-".concat(wn))},[]),St}var vn=ae(15671),bn=ae(43144),Fn=ae(60136),Nr=ae(51630),Sr=ae(98423),vr=ae(42550);function Ir(Ue,qe,vt,St){var Nt=ge.useContext(se),wn=Nt.activeKey,Ln=Nt.onActive,br=Nt.onInactive,Br={active:wn===Ue};return qe||(Br.onMouseEnter=function(hr){vt==null||vt({key:Ue,domEvent:hr}),Ln(Ue)},Br.onMouseLeave=function(hr){St==null||St({key:Ue,domEvent:hr}),br(Ue)}),Br}function _r(Ue){var qe=ge.useContext(se),vt=qe.mode,St=qe.rtl,Nt=qe.inlineIndent;if(vt!=="inline")return null;var wn=Ue;return St?{paddingRight:wn*Nt}:{paddingLeft:wn*Nt}}function Lt(Ue){var qe=Ue.icon,vt=Ue.props,St=Ue.children,Nt;return qe===null||qe===!1?null:(typeof qe=="function"?Nt=ge.createElement(qe,(0,Be.Z)({},vt)):typeof qe!="boolean"&&(Nt=qe),Nt||St||null)}var wt=["item"];function Ot(Ue){var qe=Ue.item,vt=(0,Ce.Z)(Ue,wt);return Object.defineProperty(vt,"item",{get:function(){return(0,Cn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),qe}}),vt}var Dn=["title","attribute","elementRef"],er=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],An=["active"],Rn=function(Ue){(0,Fn.Z)(vt,Ue);var qe=(0,Nr.Z)(vt);function vt(){return(0,vn.Z)(this,vt),qe.apply(this,arguments)}return(0,bn.Z)(vt,[{key:"render",value:function(){var Nt=this.props,wn=Nt.title,Ln=Nt.attribute,br=Nt.elementRef,Br=(0,Ce.Z)(Nt,Dn),hr=(0,Sr.Z)(Br,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Cn.ZP)(!Ln,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),ge.createElement(_t.Item,(0,fe.Z)({},Ln,{title:typeof wn=="string"?wn:void 0},hr,{ref:br}))}}]),vt}(ge.Component),Nn=ge.forwardRef(function(Ue,qe){var vt,St=Ue.style,Nt=Ue.className,wn=Ue.eventKey,Ln=Ue.warnKey,br=Ue.disabled,Br=Ue.itemIcon,hr=Ue.children,Wn=Ue.role,Tn=Ue.onMouseEnter,Jn=Ue.onMouseLeave,ar=Ue.onClick,$r=Ue.onKeyDown,mr=Ue.onFocus,gr=(0,Ce.Z)(Ue,er),Cr=le(wn),Er=ge.useContext(se),Fr=Er.prefixCls,He=Er.onItemClick,Ge=Er.disabled,Ft=Er.overflowDisabled,Et=Er.itemIcon,dn=Er.selectedKeys,In=Er.onActive,zn=ge.useContext(Bt),or=zn._internalRenderMenuItem,jn="".concat(Fr,"-item"),_n=ge.useRef(),cr=ge.useRef(),fr=Ge||br,Hr=(0,vr.x1)(qe,cr),ur=rn(wn),ti=function(pa){return{key:wn,keyPath:(0,Ye.Z)(ur).reverse(),item:_n.current,domEvent:pa}},yi=Br||Et,ni=Ir(wn,fr,Tn,Jn),fi=ni.active,jr=(0,Ce.Z)(ni,An),oi=dn.includes(wn),Ci=_r(ur.length),Oi=function(pa){if(!fr){var ka=ti(pa);ar==null||ar(Ot(ka)),He(ka)}},ii=function(pa){if($r==null||$r(pa),pa.which===Sn.Z.ENTER){var ka=ti(pa);ar==null||ar(Ot(ka)),He(ka)}},Ni=function(pa){In(wn),mr==null||mr(pa)},la={};Ue.role==="option"&&(la["aria-selected"]=oi);var Ha=ge.createElement(Rn,(0,fe.Z)({ref:_n,elementRef:Hr,role:Wn===null?"none":Wn||"menuitem",tabIndex:br?null:-1,"data-menu-id":Ft&&Cr?null:Cr},gr,jr,la,{component:"li","aria-disabled":br,style:(0,Be.Z)((0,Be.Z)({},Ci),St),className:we()(jn,(vt={},(0,Fe.Z)(vt,"".concat(jn,"-active"),fi),(0,Fe.Z)(vt,"".concat(jn,"-selected"),oi),(0,Fe.Z)(vt,"".concat(jn,"-disabled"),fr),vt),Nt),onClick:Oi,onKeyDown:ii,onFocus:Ni}),hr,ge.createElement(Lt,{props:(0,Be.Z)((0,Be.Z)({},Ue),{},{isSelected:oi}),icon:yi}));return or&&(Ha=or(Ha,Ue,{selected:oi})),Ha});function rr(Ue,qe){var vt=Ue.eventKey,St=Xt(),Nt=rn(vt);return ge.useEffect(function(){if(St)return St.registerPath(vt,Nt),function(){St.unregisterPath(vt,Nt)}},[Nt]),St?null:ge.createElement(Nn,(0,fe.Z)({},Ue,{ref:qe}))}var Dr=ge.forwardRef(rr),yn=["className","children"],Si=function(qe,vt){var St=qe.className,Nt=qe.children,wn=(0,Ce.Z)(qe,yn),Ln=ge.useContext(se),br=Ln.prefixCls,Br=Ln.mode,hr=Ln.rtl;return ge.createElement("ul",(0,fe.Z)({className:we()(br,hr&&"".concat(br,"-rtl"),"".concat(br,"-sub"),"".concat(br,"-").concat(Br==="inline"?"inline":"vertical"),St),role:"menu"},wn,{"data-menu-list":!0,ref:vt}),Nt)},di=ge.forwardRef(Si);di.displayName="SubMenuList";var ha=di,ta=ae(50344);function Wi(Ue,qe){return(0,ta.Z)(Ue).map(function(vt,St){if(ge.isValidElement(vt)){var Nt,wn,Ln=vt.key,br=(Nt=(wn=vt.props)===null||wn===void 0?void 0:wn.eventKey)!==null&&Nt!==void 0?Nt:Ln,Br=br==null;Br&&(br="tmp_key-".concat([].concat((0,Ye.Z)(qe),[St]).join("-")));var hr={key:br,eventKey:br};return ge.cloneElement(vt,hr)}return vt})}var Ta=ae(62709),Gi={adjustX:1,adjustY:1},$i={topLeft:{points:["bl","tl"],overflow:Gi},topRight:{points:["br","tr"],overflow:Gi},bottomLeft:{points:["tl","bl"],overflow:Gi},bottomRight:{points:["tr","br"],overflow:Gi},leftTop:{points:["tr","tl"],overflow:Gi},leftBottom:{points:["br","bl"],overflow:Gi},rightTop:{points:["tl","tr"],overflow:Gi},rightBottom:{points:["bl","br"],overflow:Gi}},ra={topLeft:{points:["bl","tl"],overflow:Gi},topRight:{points:["br","tr"],overflow:Gi},bottomLeft:{points:["tl","bl"],overflow:Gi},bottomRight:{points:["tr","br"],overflow:Gi},rightTop:{points:["tr","tl"],overflow:Gi},rightBottom:{points:["br","bl"],overflow:Gi},leftTop:{points:["tl","tr"],overflow:Gi},leftBottom:{points:["bl","br"],overflow:Gi}},Ma=null;function vi(Ue,qe,vt){if(qe)return qe;if(vt)return vt[Ue]||vt.other}var Zi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function xa(Ue){var qe=Ue.prefixCls,vt=Ue.visible,St=Ue.children,Nt=Ue.popup,wn=Ue.popupStyle,Ln=Ue.popupClassName,br=Ue.popupOffset,Br=Ue.disabled,hr=Ue.mode,Wn=Ue.onVisibleChange,Tn=ge.useContext(se),Jn=Tn.getPopupContainer,ar=Tn.rtl,$r=Tn.subMenuOpenDelay,mr=Tn.subMenuCloseDelay,gr=Tn.builtinPlacements,Cr=Tn.triggerSubMenuAction,Er=Tn.forceSubMenuRender,Fr=Tn.rootClassName,He=Tn.motion,Ge=Tn.defaultMotions,Ft=ge.useState(!1),Et=(0,ve.Z)(Ft,2),dn=Et[0],In=Et[1],zn=ar?(0,Be.Z)((0,Be.Z)({},ra),gr):(0,Be.Z)((0,Be.Z)({},$i),gr),or=Zi[hr],jn=vi(hr,He,Ge),_n=ge.useRef(jn);hr!=="inline"&&(_n.current=jn);var cr=(0,Be.Z)((0,Be.Z)({},_n.current),{},{leavedClassName:"".concat(qe,"-hidden"),removeOnLeave:!1,motionAppear:!0}),fr=ge.useRef();return ge.useEffect(function(){return fr.current=(0,dr.Z)(function(){In(vt)}),function(){dr.Z.cancel(fr.current)}},[vt]),ge.createElement(Ta.Z,{prefixCls:qe,popupClassName:we()("".concat(qe,"-popup"),(0,Fe.Z)({},"".concat(qe,"-rtl"),ar),Ln,Fr),stretch:hr==="horizontal"?"minWidth":null,getPopupContainer:Jn,builtinPlacements:zn,popupPlacement:or,popupVisible:dn,popup:Nt,popupStyle:wn,popupAlign:br&&{offset:br},action:Br?[]:[Cr],mouseEnterDelay:$r,mouseLeaveDelay:mr,onPopupVisibleChange:Wn,forceRender:Er,popupMotion:cr,fresh:!0},St)}var Ya=ae(62874);function Ba(Ue){var qe=Ue.id,vt=Ue.open,St=Ue.keyPath,Nt=Ue.children,wn="inline",Ln=ge.useContext(se),br=Ln.prefixCls,Br=Ln.forceSubMenuRender,hr=Ln.motion,Wn=Ln.defaultMotions,Tn=Ln.mode,Jn=ge.useRef(!1);Jn.current=Tn===wn;var ar=ge.useState(!Jn.current),$r=(0,ve.Z)(ar,2),mr=$r[0],gr=$r[1],Cr=Jn.current?vt:!1;ge.useEffect(function(){Jn.current&&gr(!1)},[Tn]);var Er=(0,Be.Z)({},vi(wn,hr,Wn));St.length>1&&(Er.motionAppear=!1);var Fr=Er.onVisibleChanged;return Er.onVisibleChanged=function(He){return!Jn.current&&!He&&gr(!0),Fr==null?void 0:Fr(He)},mr?null:ge.createElement(et,{mode:wn,locked:!Jn.current},ge.createElement(Ya.Z,(0,fe.Z)({visible:Cr},Er,{forceRender:Br,removeOnLeave:!1,leavedClassName:"".concat(br,"-hidden")}),function(He){var Ge=He.className,Ft=He.style;return ge.createElement(ha,{id:qe,className:Ge,style:Ft},Nt)}))}var ki=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Rt=["active"],Tt=function(qe){var vt,St=qe.style,Nt=qe.className,wn=qe.title,Ln=qe.eventKey,br=qe.warnKey,Br=qe.disabled,hr=qe.internalPopupClose,Wn=qe.children,Tn=qe.itemIcon,Jn=qe.expandIcon,ar=qe.popupClassName,$r=qe.popupOffset,mr=qe.popupStyle,gr=qe.onClick,Cr=qe.onMouseEnter,Er=qe.onMouseLeave,Fr=qe.onTitleClick,He=qe.onTitleMouseEnter,Ge=qe.onTitleMouseLeave,Ft=(0,Ce.Z)(qe,ki),Et=le(Ln),dn=ge.useContext(se),In=dn.prefixCls,zn=dn.mode,or=dn.openKeys,jn=dn.disabled,_n=dn.overflowDisabled,cr=dn.activeKey,fr=dn.selectedKeys,Hr=dn.itemIcon,ur=dn.expandIcon,ti=dn.onItemClick,yi=dn.onOpenChange,ni=dn.onActive,fi=ge.useContext(Bt),jr=fi._internalRenderSubMenuItem,oi=ge.useContext(qn),Ci=oi.isSubPathKey,Oi=rn(),ii="".concat(In,"-submenu"),Ni=jn||Br,la=ge.useRef(),Ha=ge.useRef(),Aa=Tn!=null?Tn:Hr,pa=Jn!=null?Jn:ur,ka=or.includes(Ln),Pa=!_n&&ka,Ui=Ci(fr,Ln),ca=Ir(Ln,Ni,He,Ge),bi=ca.active,zi=(0,Ce.Z)(ca,Rt),ia=ge.useState(!1),_a=(0,ve.Z)(ia,2),So=_a[0],ho=_a[1],po=function(lo){Ni||ho(lo)},Xa=function(lo){po(!0),Cr==null||Cr({key:Ln,domEvent:lo})},Ra=function(lo){po(!1),Er==null||Er({key:Ln,domEvent:lo})},Hi=ge.useMemo(function(){return bi||(zn!=="inline"?So||Ci([cr],Ln):!1)},[zn,bi,cr,So,Ln,Ci]),yo=_r(Oi.length),Xi=function(lo){Ni||(Fr==null||Fr({key:Ln,domEvent:lo}),zn==="inline"&&yi(Ln,!ka))},Ei=Je(function(to){gr==null||gr(Ot(to)),ti(to)}),ua=function(lo){zn!=="inline"&&yi(Ln,lo)},Ja=function(){ni(Ln)},wa=Et&&"".concat(Et,"-popup"),Wa=ge.createElement("div",(0,fe.Z)({role:"menuitem",style:yo,className:"".concat(ii,"-title"),tabIndex:Ni?null:-1,ref:la,title:typeof wn=="string"?wn:null,"data-menu-id":_n&&Et?null:Et,"aria-expanded":Pa,"aria-haspopup":!0,"aria-controls":wa,"aria-disabled":Ni,onClick:Xi,onFocus:Ja},zi),wn,ge.createElement(Lt,{icon:zn!=="horizontal"?pa:void 0,props:(0,Be.Z)((0,Be.Z)({},qe),{},{isOpen:Pa,isSubMenu:!0})},ge.createElement("i",{className:"".concat(ii,"-arrow")}))),Ki=ge.useRef(zn);if(zn!=="inline"&&Oi.length>1?Ki.current="vertical":Ki.current=zn,!_n){var ro=Ki.current;Wa=ge.createElement(xa,{mode:ro,prefixCls:ii,visible:!hr&&Pa&&zn!=="inline",popupClassName:ar,popupOffset:$r,popupStyle:mr,popup:ge.createElement(et,{mode:ro==="horizontal"?"vertical":ro},ge.createElement(ha,{id:wa,ref:Ha},Wn)),disabled:Ni,onVisibleChange:ua},Wa)}var so=ge.createElement(_t.Item,(0,fe.Z)({role:"none"},Ft,{component:"li",style:St,className:we()(ii,"".concat(ii,"-").concat(zn),Nt,(vt={},(0,Fe.Z)(vt,"".concat(ii,"-open"),Pa),(0,Fe.Z)(vt,"".concat(ii,"-active"),Hi),(0,Fe.Z)(vt,"".concat(ii,"-selected"),Ui),(0,Fe.Z)(vt,"".concat(ii,"-disabled"),Ni),vt)),onMouseEnter:Xa,onMouseLeave:Ra}),Wa,!_n&&ge.createElement(Ba,{id:wa,open:Pa,keyPath:Oi},Wn));return jr&&(so=jr(so,qe,{selected:Ui,active:Hi,open:Pa,disabled:Ni})),ge.createElement(et,{onItemClick:Ei,mode:zn==="horizontal"?"vertical":zn,itemIcon:Aa,expandIcon:pa},so)};function mn(Ue){var qe=Ue.eventKey,vt=Ue.children,St=rn(qe),Nt=Wi(vt,St),wn=Xt();ge.useEffect(function(){if(wn)return wn.registerPath(qe,St),function(){wn.unregisterPath(qe,St)}},[St]);var Ln;return wn?Ln=Nt:Ln=ge.createElement(Tt,Ue,Nt),ge.createElement(jt.Provider,{value:St},Ln)}var $n=ae(71002),Qn=["className","title","eventKey","children"],Or=["children"],Gr=function(qe){var vt=qe.className,St=qe.title,Nt=qe.eventKey,wn=qe.children,Ln=(0,Ce.Z)(qe,Qn),br=ge.useContext(se),Br=br.prefixCls,hr="".concat(Br,"-item-group");return ge.createElement("li",(0,fe.Z)({role:"presentation"},Ln,{onClick:function(Tn){return Tn.stopPropagation()},className:we()(hr,vt)}),ge.createElement("div",{role:"presentation",className:"".concat(hr,"-title"),title:typeof St=="string"?St:void 0},St),ge.createElement("ul",{role:"group",className:"".concat(hr,"-list")},wn))};function ci(Ue){var qe=Ue.children,vt=(0,Ce.Z)(Ue,Or),St=rn(vt.eventKey),Nt=Wi(qe,St),wn=Xt();return wn?Nt:ge.createElement(Gr,(0,Sr.Z)(vt,["warnKey"]),Nt)}function gi(Ue){var qe=Ue.className,vt=Ue.style,St=ge.useContext(se),Nt=St.prefixCls,wn=Xt();return wn?null:ge.createElement("li",{role:"separator",className:we()("".concat(Nt,"-item-divider"),qe),style:vt})}var li=["label","children","key","type"];function Mi(Ue){return(Ue||[]).map(function(qe,vt){if(qe&&(0,$n.Z)(qe)==="object"){var St=qe,Nt=St.label,wn=St.children,Ln=St.key,br=St.type,Br=(0,Ce.Z)(St,li),hr=Ln!=null?Ln:"tmp-".concat(vt);return wn||br==="group"?br==="group"?ge.createElement(ci,(0,fe.Z)({key:hr},Br,{title:Nt}),Mi(wn)):ge.createElement(mn,(0,fe.Z)({key:hr},Br,{title:Nt}),Mi(wn)):br==="divider"?ge.createElement(gi,(0,fe.Z)({key:hr},Br)):ge.createElement(Dr,(0,fe.Z)({key:hr},Br),Nt)}return null}).filter(function(qe){return qe})}function Vi(Ue,qe,vt){var St=Ue;return qe&&(St=Mi(qe)),Wi(St,vt)}var Yr=["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"],Fi=[],sa=ge.forwardRef(function(Ue,qe){var vt,St,Nt=Ue,wn=Nt.prefixCls,Ln=wn===void 0?"rc-menu":wn,br=Nt.rootClassName,Br=Nt.style,hr=Nt.className,Wn=Nt.tabIndex,Tn=Wn===void 0?0:Wn,Jn=Nt.items,ar=Nt.children,$r=Nt.direction,mr=Nt.id,gr=Nt.mode,Cr=gr===void 0?"vertical":gr,Er=Nt.inlineCollapsed,Fr=Nt.disabled,He=Nt.disabledOverflow,Ge=Nt.subMenuOpenDelay,Ft=Ge===void 0?.1:Ge,Et=Nt.subMenuCloseDelay,dn=Et===void 0?.1:Et,In=Nt.forceSubMenuRender,zn=Nt.defaultOpenKeys,or=Nt.openKeys,jn=Nt.activeKey,_n=Nt.defaultActiveFirst,cr=Nt.selectable,fr=cr===void 0?!0:cr,Hr=Nt.multiple,ur=Hr===void 0?!1:Hr,ti=Nt.defaultSelectedKeys,yi=Nt.selectedKeys,ni=Nt.onSelect,fi=Nt.onDeselect,jr=Nt.inlineIndent,oi=jr===void 0?24:jr,Ci=Nt.motion,Oi=Nt.defaultMotions,ii=Nt.triggerSubMenuAction,Ni=ii===void 0?"hover":ii,la=Nt.builtinPlacements,Ha=Nt.itemIcon,Aa=Nt.expandIcon,pa=Nt.overflowedIndicator,ka=pa===void 0?"...":pa,Pa=Nt.overflowedIndicatorPopupClassName,Ui=Nt.getPopupContainer,ca=Nt.onClick,bi=Nt.onOpenChange,zi=Nt.onKeyDown,ia=Nt.openAnimation,_a=Nt.openTransitionName,So=Nt._internalRenderMenuItem,ho=Nt._internalRenderSubMenuItem,po=(0,Ce.Z)(Nt,Yr),Xa=ge.useMemo(function(){return Vi(ar,Jn,Fi)},[ar,Jn]),Ra=ge.useState(!1),Hi=(0,ve.Z)(Ra,2),yo=Hi[0],Xi=Hi[1],Ei=ge.useRef(),ua=Jt(mr),Ja=$r==="rtl",wa=(0,en.Z)(zn,{value:or,postState:function(ji){return ji||Fi}}),Wa=(0,ve.Z)(wa,2),Ki=Wa[0],ro=Wa[1],so=function(ji){var $a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ca(){ro(ji),bi==null||bi(ji)}$a?(0,Ee.flushSync)(Ca):Ca()},to=ge.useState(Ki),lo=(0,ve.Z)(to,2),vo=lo[0],Ao=lo[1],no=ge.useRef(!1),ao=ge.useMemo(function(){return(Cr==="inline"||Cr==="vertical")&&Er?["vertical",Er]:[Cr,!1]},[Cr,Er]),zo=(0,ve.Z)(ao,2),Ho=zo[0],Jo=zo[1],To=Ho==="inline",co=ge.useState(Ho),aa=(0,ve.Z)(co,2),va=aa[0],qa=aa[1],uo=ge.useState(Jo),Po=(0,ve.Z)(uo,2),Uo=Po[0],qo=Po[1];ge.useEffect(function(){qa(Ho),qo(Jo),no.current&&(To?ro(vo):so(Fi))},[Ho,Jo]);var ls=ge.useState(0),Ss=(0,ve.Z)(ls,2),Qo=Ss[0],Cs=Ss[1],Ka=Qo>=Xa.length-1||va!=="horizontal"||He;ge.useEffect(function(){To&&Ao(Ki)},[Ki]),ge.useEffect(function(){return no.current=!0,function(){no.current=!1}},[]);var ye=un(),ke=ye.registerPath,De=ye.unregisterPath,nt=ye.refreshOverflowKeys,at=ye.isSubPathKey,an=ye.getKeyPath,Zt=ye.getKeys,Pn=ye.getSubPathKeys,fn=ge.useMemo(function(){return{registerPath:ke,unregisterPath:De}},[ke,De]),Ut=ge.useMemo(function(){return{isSubPathKey:at}},[at]);ge.useEffect(function(){nt(Ka?Fi:Xa.slice(Qo+1).map(function(Sa){return Sa.key}))},[Qo,Ka]);var Kn=(0,en.Z)(jn||_n&&((vt=Xa[0])===null||vt===void 0?void 0:vt.key),{value:jn}),gn=(0,ve.Z)(Kn,2),xn=gn[0],ir=gn[1],sr=Je(function(Sa){ir(Sa)}),Mn=Je(function(){ir(void 0)});(0,ge.useImperativeHandle)(qe,function(){return{list:Ei.current,focus:function(ji){var $a,Ca=xn!=null?xn:($a=Xa.find(function(oo){return!oo.props.disabled}))===null||$a===void 0?void 0:$a.key;if(Ca){var fa,La,Oa;(fa=Ei.current)===null||fa===void 0||(La=fa.querySelector("li[data-menu-id='".concat(ce(ua,Ca),"']")))===null||La===void 0||(Oa=La.focus)===null||Oa===void 0||Oa.call(La,ji)}}}});var Xn=(0,en.Z)(ti||[],{value:yi,postState:function(ji){return Array.isArray(ji)?ji:ji==null?Fi:[ji]}}),Mr=(0,ve.Z)(Xn,2),Tr=Mr[0],Vr=Mr[1],si=function(ji){if(fr){var $a=ji.key,Ca=Tr.includes($a),fa;ur?Ca?fa=Tr.filter(function(Oa){return Oa!==$a}):fa=[].concat((0,Ye.Z)(Tr),[$a]):fa=[$a],Vr(fa);var La=(0,Be.Z)((0,Be.Z)({},ji),{},{selectedKeys:fa});Ca?fi==null||fi(La):ni==null||ni(La)}!ur&&Ki.length&&va!=="inline"&&so(Fi)},xi=Je(function(Sa){ca==null||ca(Ot(Sa)),si(Sa)}),hi=Je(function(Sa,ji){var $a=Ki.filter(function(fa){return fa!==Sa});if(ji)$a.push(Sa);else if(va!=="inline"){var Ca=Pn(Sa);$a=$a.filter(function(fa){return!Ca.has(fa)})}(0,On.Z)(Ki,$a,!0)||so($a,!0)}),Xr=function(ji,$a){var Ca=$a!=null?$a:!Ki.includes(ji);hi(ji,Ca)},da=yr(va,xn,Ja,ua,Ei,Zt,an,ir,Xr,zi);ge.useEffect(function(){Xi(!0)},[]);var Ji=ge.useMemo(function(){return{_internalRenderMenuItem:So,_internalRenderSubMenuItem:ho}},[So,ho]),Na=va!=="horizontal"||He?Xa:Xa.map(function(Sa,ji){return ge.createElement(et,{key:Sa.key,overflowDisabled:ji>Qo},Sa)}),Ua=ge.createElement(_t,(0,fe.Z)({id:mr,ref:Ei,prefixCls:"".concat(Ln,"-overflow"),component:"ul",itemComponent:Dr,className:we()(Ln,"".concat(Ln,"-root"),"".concat(Ln,"-").concat(va),hr,(St={},(0,Fe.Z)(St,"".concat(Ln,"-inline-collapsed"),Uo),(0,Fe.Z)(St,"".concat(Ln,"-rtl"),Ja),St),br),dir:$r,style:Br,role:"menu",tabIndex:Tn,data:Na,renderRawItem:function(ji){return ji},renderRawRest:function(ji){var $a=ji.length,Ca=$a?Xa.slice(-$a):null;return ge.createElement(mn,{eventKey:zt,title:ka,disabled:Ka,internalPopupClose:$a===0,popupClassName:Pa},Ca)},maxCount:va!=="horizontal"||He?_t.INVALIDATE:_t.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ji){Cs(ji)},onKeyDown:da},po));return ge.createElement(Bt.Provider,{value:Ji},ge.createElement($e.Provider,{value:ua},ge.createElement(et,{prefixCls:Ln,rootClassName:br,mode:va,openKeys:Ki,rtl:Ja,disabled:Fr,motion:yo?Ci:null,defaultMotions:yo?Oi:null,activeKey:xn,onActive:sr,onInactive:Mn,selectedKeys:Tr,inlineIndent:oi,subMenuOpenDelay:Ft,subMenuCloseDelay:dn,forceSubMenuRender:In,builtinPlacements:la,triggerSubMenuAction:Ni,getPopupContainer:Ui,itemIcon:Ha,expandIcon:Aa,onItemClick:xi,onOpenChange:hi},ge.createElement(qn.Provider,{value:Ut},Ua),ge.createElement("div",{style:{display:"none"},"aria-hidden":!0},ge.createElement(Ht.Provider,{value:fn},Xa)))))}),Yi=sa,Oe=Yi;Oe.Item=Dr,Oe.SubMenu=mn,Oe.ItemGroup=ci,Oe.Divider=gi;var Ve=Oe},66680:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});var fe=ae(67294);function Fe(Be){var Ye=fe.useRef();Ye.current=Be;var ve=fe.useCallback(function(){for(var Ce,_e=arguments.length,we=new Array(_e),ge=0;ge<_e;ge++)we[ge]=arguments[ge];return(Ce=Ye.current)===null||Ce===void 0?void 0:Ce.call.apply(Ce,[Ye].concat(we))},[]);return ve}},21770:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Ce}});var fe=ae(97685),Fe=ae(66680),Be=ae(8410),Ye=ae(63896);function ve(_e){return _e!==void 0}function Ce(_e,we){var ge=we||{},Te=ge.defaultValue,ft=ge.value,Re=ge.onChange,bt=ge.postState,ht=(0,Ye.Z)(function(){return ve(ft)?ft:ve(Te)?typeof Te=="function"?Te():Te:typeof _e=="function"?_e():_e}),st=(0,fe.Z)(ht,2),tt=st[0],Le=st[1],xt=ft!==void 0?ft:tt,on=bt?bt(xt):xt,it=(0,Fe.Z)(Re),yt=(0,Ye.Z)([xt]),Ee=(0,fe.Z)(yt,2),de=Ee[0],je=Ee[1];(0,Be.o)(function(){var At=de[0];tt!==At&&it(tt,At)},[de]),(0,Be.o)(function(){ve(ft)||Le(ft)},[ft]);var ze=(0,Fe.Z)(function(At,ct){Le(At,ct),je([xt],ct)});return[on,ze]}},91881:function(kn,Vt,ae){"use strict";var fe=ae(71002),Fe=ae(80334);function Be(Ye,ve){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_e=new Set;function we(ge,Te){var ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Re=_e.has(ge);if((0,Fe.ZP)(!Re,"Warning: There may be circular references"),Re)return!1;if(ge===Te)return!0;if(Ce&&ft>1)return!1;_e.add(ge);var bt=ft+1;if(Array.isArray(ge)){if(!Array.isArray(Te)||ge.length!==Te.length)return!1;for(var ht=0;ht<ge.length;ht++)if(!we(ge[ht],Te[ht],bt))return!1;return!0}if(ge&&Te&&(0,fe.Z)(ge)==="object"&&(0,fe.Z)(Te)==="object"){var st=Object.keys(ge);return st.length!==Object.keys(Te).length?!1:st.every(function(tt){return we(ge[tt],Te[tt],bt)})}return!1}return we(Ye,ve)}Vt.Z=Be},98423:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Fe}});var fe=ae(1413);function Fe(Be,Ye){var ve=(0,fe.Z)({},Be);return Array.isArray(Ye)&&Ye.forEach(function(Ce){delete ve[Ce]}),ve}},64217:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return we}});var fe=ae(1413),Fe=`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`,Be=`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`,Ye="".concat(Fe," ").concat(Be).split(/[\s\n]+/),ve="aria-",Ce="data-";function _e(ge,Te){return ge.indexOf(Te)===0}function we(ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft;Te===!1?ft={aria:!0,data:!0,attr:!0}:Te===!0?ft={aria:!0}:ft=(0,fe.Z)({},Te);var Re={};return Object.keys(ge).forEach(function(bt){(ft.aria&&(bt==="role"||_e(bt,ve))||ft.data&&_e(bt,Ce)||ft.attr&&Ye.includes(bt))&&(Re[bt]=ge[bt])}),Re}},73299:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return Li}});var fe=ae(87462),Fe=ae(1413),Be=ae(71002),Ye=ae(97685),ve=ae(4942),Ce=ae(45987),_e=ae(67294),we=ae(73935),ge=ae(94184),Te=ae.n(ge),ft=ae(48555),Re=_e.forwardRef(function(Dt,Hn){var Vn=Dt.height,Gn=Dt.offsetY,Lr=Dt.offsetX,yr=Dt.children,Pr=Dt.prefixCls,nr=Dt.onInnerResize,ot=Dt.innerProps,Ct=Dt.rtl,zt=Dt.extra,un={},Je={display:"flex",flexDirection:"column"};if(Gn!==void 0){var Mt;un={height:Vn,position:"relative",overflow:"hidden"},Je=(0,Fe.Z)((0,Fe.Z)({},Je),{},(Mt={transform:"translateY(".concat(Gn,"px)")},(0,ve.Z)(Mt,Ct?"marginRight":"marginLeft",-Lr),(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 _e.createElement("div",{style:un},_e.createElement(ft.Z,{onResize:function(Jt){var vn=Jt.offsetHeight;vn&&nr&&nr()}},_e.createElement("div",(0,fe.Z)({style:Je,className:Te()((0,ve.Z)({},"".concat(Pr,"-holder-inner"),Pr)),ref:Hn},ot),yr,zt)))});Re.displayName="Filler";var bt=Re,ht=function(Hn){return+setTimeout(Hn,16)},st=function(Hn){return clearTimeout(Hn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ht=function(Hn){return window.requestAnimationFrame(Hn)},st=function(Hn){return window.cancelAnimationFrame(Hn)});var tt=0,Le=new Map;function xt(Dt){Le.delete(Dt)}var on=function(Hn){var Vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;tt+=1;var Gn=tt;function Lr(yr){if(yr===0)xt(Gn),Hn();else{var Pr=ht(function(){Lr(yr-1)});Le.set(Gn,Pr)}}return Lr(Vn),Gn};on.cancel=function(Dt){var Hn=Le.get(Dt);return xt(Hn),st(Hn)};var it=on;function yt(Dt,Hn){var Vn="touches"in Dt?Dt.touches[0]:Dt;return Vn[Hn?"pageX":"pageY"]}var Ee=_e.forwardRef(function(Dt,Hn){var Vn,Gn=Dt.prefixCls,Lr=Dt.rtl,yr=Dt.scrollOffset,Pr=Dt.scrollRange,nr=Dt.onStartMove,ot=Dt.onStopMove,Ct=Dt.onScroll,zt=Dt.horizontal,un=Dt.spinSize,Je=Dt.containerSize,Mt=Dt.style,ln=Dt.thumbStyle,Jt=_e.useState(!1),vn=(0,Ye.Z)(Jt,2),bn=vn[0],Fn=vn[1],Nr=_e.useState(null),Sr=(0,Ye.Z)(Nr,2),vr=Sr[0],Ir=Sr[1],_r=_e.useState(null),Lt=(0,Ye.Z)(_r,2),wt=Lt[0],Ot=Lt[1],Dn=!Lr,er=_e.useRef(),An=_e.useRef(),Rn=_e.useState(!1),Nn=(0,Ye.Z)(Rn,2),rr=Nn[0],Dr=Nn[1],yn=_e.useRef(),Si=function(){clearTimeout(yn.current),Dr(!0),yn.current=setTimeout(function(){Dr(!1)},3e3)},di=Pr-Je||0,ha=Je-un||0,ta=di>0,Wi=_e.useMemo(function(){if(yr===0||di===0)return 0;var Ya=yr/di;return Ya*ha},[yr,di,ha]),Ta=function(Ba){Ba.stopPropagation(),Ba.preventDefault()},Gi=_e.useRef({top:Wi,dragging:bn,pageY:vr,startTop:wt});Gi.current={top:Wi,dragging:bn,pageY:vr,startTop:wt};var $i=function(Ba){Fn(!0),Ir(yt(Ba,zt)),Ot(Gi.current.top),nr(),Ba.stopPropagation(),Ba.preventDefault()};_e.useEffect(function(){var Ya=function(Tt){Tt.preventDefault()},Ba=er.current,ki=An.current;return Ba.addEventListener("touchstart",Ya),ki.addEventListener("touchstart",$i),function(){Ba.removeEventListener("touchstart",Ya),ki.removeEventListener("touchstart",$i)}},[]);var ra=_e.useRef();ra.current=di;var Ma=_e.useRef();Ma.current=ha,_e.useEffect(function(){if(bn){var Ya,Ba=function(Tt){var mn=Gi.current,$n=mn.dragging,Qn=mn.pageY,Or=mn.startTop;if(it.cancel(Ya),$n){var Gr=yt(Tt,zt)-Qn,ci=Or;!Dn&&zt?ci-=Gr:ci+=Gr;var gi=ra.current,li=Ma.current,Mi=li?ci/li:0,Vi=Math.ceil(Mi*gi);Vi=Math.max(Vi,0),Vi=Math.min(Vi,gi),Ya=it(function(){Ct(Vi,zt)})}},ki=function(){Fn(!1),ot()};return window.addEventListener("mousemove",Ba),window.addEventListener("touchmove",Ba),window.addEventListener("mouseup",ki),window.addEventListener("touchend",ki),function(){window.removeEventListener("mousemove",Ba),window.removeEventListener("touchmove",Ba),window.removeEventListener("mouseup",ki),window.removeEventListener("touchend",ki),it.cancel(Ya)}}},[bn]),_e.useEffect(function(){Si()},[yr]),_e.useImperativeHandle(Hn,function(){return{delayHidden:Si}});var vi="".concat(Gn,"-scrollbar"),Zi={position:"absolute",visibility:rr&&ta?null:"hidden"},xa={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return zt?(Zi.height=8,Zi.left=0,Zi.right=0,Zi.bottom=0,xa.height="100%",xa.width=un,Dn?xa.left=Wi:xa.right=Wi):(Zi.width=8,Zi.top=0,Zi.bottom=0,Dn?Zi.right=0:Zi.left=0,xa.width="100%",xa.height=un,xa.top=Wi),_e.createElement("div",{ref:er,className:Te()(vi,(Vn={},(0,ve.Z)(Vn,"".concat(vi,"-horizontal"),zt),(0,ve.Z)(Vn,"".concat(vi,"-vertical"),!zt),(0,ve.Z)(Vn,"".concat(vi,"-visible"),rr),Vn)),style:(0,Fe.Z)((0,Fe.Z)({},Zi),Mt),onMouseDown:Ta,onMouseMove:Si},_e.createElement("div",{ref:An,className:Te()("".concat(vi,"-thumb"),(0,ve.Z)({},"".concat(vi,"-thumb-moving"),bn)),style:(0,Fe.Z)((0,Fe.Z)({},xa),ln),onMouseDown:$i}))}),de=Ee;function je(Dt){var Hn=Dt.children,Vn=Dt.setRef,Gn=_e.useCallback(function(Lr){Vn(Lr)},[]);return _e.cloneElement(Hn,{ref:Gn})}function ze(Dt,Hn,Vn,Gn,Lr,yr,Pr){var nr=Pr.getKey;return Dt.slice(Hn,Vn+1).map(function(ot,Ct){var zt=Hn+Ct,un=yr(ot,zt,{style:{width:Gn}}),Je=nr(ot);return _e.createElement(je,{key:Je,setRef:function(ln){return Lr(ot,ln)}},un)})}function At(Dt){return Dt instanceof HTMLElement||Dt instanceof SVGElement}function ct(Dt){return At(Dt)?Dt:Dt instanceof _e.Component?we.findDOMNode(Dt):null}var lt=ae(15671),Ze=ae(43144),kt=function(){function Dt(){(0,lt.Z)(this,Dt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Ze.Z)(Dt,[{key:"set",value:function(Vn,Gn){this.maps[Vn]=Gn,this.id+=1}},{key:"get",value:function(Vn){return this.maps[Vn]}}]),Dt}(),pt=kt;function nn(Dt,Hn,Vn){var Gn=_e.useState(0),Lr=(0,Ye.Z)(Gn,2),yr=Lr[0],Pr=Lr[1],nr=(0,_e.useRef)(new Map),ot=(0,_e.useRef)(new pt),Ct=(0,_e.useRef)();function zt(){it.cancel(Ct.current)}function un(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;zt();var ln=function(){nr.current.forEach(function(vn,bn){if(vn&&vn.offsetParent){var Fn=ct(vn),Nr=Fn.offsetHeight;ot.current.get(bn)!==Nr&&ot.current.set(bn,Fn.offsetHeight)}}),Pr(function(vn){return vn+1})};Mt?ln():Ct.current=it(ln)}function Je(Mt,ln){var Jt=Dt(Mt),vn=nr.current.get(Jt);ln?(nr.current.set(Jt,ln),un()):nr.current.delete(Jt),!vn!=!ln&&(ln?Hn==null||Hn(Mt):Vn==null||Vn(Mt))}return(0,_e.useEffect)(function(){return zt},[]),[Je,un,ot.current,yr]}function rt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var qt=rt()?_e.useLayoutEffect:_e.useEffect,pn=function(Hn,Vn){var Gn=_e.useRef(!0);qt(function(){return Hn(Gn.current)},Vn),qt(function(){return Gn.current=!1,function(){Gn.current=!0}},[])},cn=function(Hn,Vn){pn(function(Gn){if(!Gn)return Hn()},Vn)},Xe=pn;function Me(Dt){var Hn=_e.useRef();Hn.current=Dt;var Vn=_e.useCallback(function(){for(var Gn,Lr=arguments.length,yr=new Array(Lr),Pr=0;Pr<Lr;Pr++)yr[Pr]=arguments[Pr];return(Gn=Hn.current)===null||Gn===void 0?void 0:Gn.call.apply(Gn,[Hn].concat(yr))},[]);return Vn}function mt(Dt){var Hn=React.useRef(!1),Vn=React.useState(Dt),Gn=_slicedToArray(Vn,2),Lr=Gn[0],yr=Gn[1];React.useEffect(function(){return Hn.current=!1,function(){Hn.current=!0}},[]);function Pr(nr,ot){ot&&Hn.current||yr(nr)}return[Lr,Pr]}function Gt(Dt){return Dt!==void 0}function hn(Dt,Hn){var Vn=Hn||{},Gn=Vn.defaultValue,Lr=Vn.value,yr=Vn.onChange,Pr=Vn.postState,nr=useState(function(){return Gt(Lr)?Lr:Gt(Gn)?typeof Gn=="function"?Gn():Gn:typeof Dt=="function"?Dt():Dt}),ot=_slicedToArray(nr,2),Ct=ot[0],zt=ot[1],un=Lr!==void 0?Lr:Ct,Je=Pr?Pr(un):un,Mt=useEvent(yr),ln=useState([un]),Jt=_slicedToArray(ln,2),vn=Jt[0],bn=Jt[1];useLayoutUpdateEffect(function(){var Nr=vn[0];Ct!==Nr&&Mt(Ct,Nr)},[vn]),useLayoutUpdateEffect(function(){Gt(Lr)||zt(Lr)},[Lr]);var Fn=useEvent(function(Nr,Sr){zt(Nr,Sr),bn([un],Sr)});return[Je,Fn]}var Qe=ae(31461);function ut(Dt,Hn,Vn){var Gn=React.useRef({});return(!("value"in Gn.current)||Vn(Gn.current.condition,Hn))&&(Gn.current.value=Dt(),Gn.current.condition=Hn),Gn.current.value}function Yt(Dt,Hn){typeof Dt=="function"?Dt(Hn):_typeof(Dt)==="object"&&Dt&&"current"in Dt&&(Dt.current=Hn)}function Qt(){for(var Dt=arguments.length,Hn=new Array(Dt),Vn=0;Vn<Dt;Vn++)Hn[Vn]=arguments[Vn];var Gn=Hn.filter(function(Lr){return Lr});return Gn.length<=1?Gn[0]:function(Lr){Hn.forEach(function(yr){Yt(yr,Lr)})}}function tn(){for(var Dt=arguments.length,Hn=new Array(Dt),Vn=0;Vn<Dt;Vn++)Hn[Vn]=arguments[Vn];return useMemo(function(){return Qt.apply(void 0,Hn)},Hn,function(Gn,Lr){return Gn.length!==Lr.length||Gn.every(function(yr,Pr){return yr!==Lr[Pr]})})}function _t(Dt){var Hn,Vn,Gn=isMemo(Dt)?Dt.type.type:Dt.type;return!(typeof Gn=="function"&&!((Hn=Gn.prototype)!==null&&Hn!==void 0&&Hn.render)||typeof Dt=="function"&&!((Vn=Dt.prototype)!==null&&Vn!==void 0&&Vn.render))}function en(Dt){return!isValidElement(Dt)||isFragment(Dt)?!1:_t(Dt)}function Cn(Dt,Hn,Vn,Gn){if(!Hn.length)return Vn;var Lr=_toArray(Hn),yr=Lr[0],Pr=Lr.slice(1),nr;return!Dt&&typeof yr=="number"?nr=[]:Array.isArray(Dt)?nr=_toConsumableArray(Dt):nr=_objectSpread({},Dt),Gn&&Vn===void 0&&Pr.length===1?delete nr[yr][Pr[0]]:nr[yr]=Cn(nr[yr],Pr,Vn,Gn),nr}function On(Dt,Hn,Vn){var Gn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Hn.length&&Gn&&Vn===void 0&&!get(Dt,Hn.slice(0,-1))?Dt:Cn(Dt,Hn,Vn,Gn)}function $e(Dt){return _typeof(Dt)==="object"&&Dt!==null&&Object.getPrototypeOf(Dt)===Object.prototype}function ce(Dt){return Array.isArray(Dt)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function me(){for(var Dt=arguments.length,Hn=new Array(Dt),Vn=0;Vn<Dt;Vn++)Hn[Vn]=arguments[Vn];var Gn=ce(Hn[0]);return Hn.forEach(function(Lr){function yr(Pr,nr){var ot=new Set(nr),Ct=get(Lr,Pr),zt=Array.isArray(Ct);if(zt||$e(Ct)){if(!ot.has(Ct)){ot.add(Ct);var un=get(Gn,Pr);zt?Gn=On(Gn,Pr,[]):(!un||_typeof(un)!=="object")&&(Gn=On(Gn,Pr,ce(Ct))),le(Ct).forEach(function(Je){yr([].concat(_toConsumableArray(Pr),[Je]),ot)})}}else Gn=On(Gn,Pr,Ct)}yr([])}),Gn}var he={},se=[],Ie=function(Hn){se.push(Hn)};function et(Dt,Hn){if(0)var Vn}function $t(Dt,Hn){if(0)var Vn}function Ht(){he={}}function Xt(Dt,Hn,Vn){!Hn&&!he[Vn]&&(Dt(!1,Vn),he[Vn]=!0)}function jt(Dt,Hn){Xt(et,Dt,Hn)}function rn(Dt,Hn){Xt($t,Dt,Hn)}jt.preMessage=Ie,jt.resetWarned=Ht,jt.noteOnce=rn;var qn=null,lr=10;function Bt(Dt,Hn,Vn,Gn,Lr,yr,Pr,nr){var ot=_e.useRef(),Ct=_e.useState(null),zt=(0,Ye.Z)(Ct,2),un=zt[0],Je=zt[1];return Xe(function(){if(un&&un.times<lr){if(!Dt.current){Je(function(Si){return(0,Fe.Z)({},Si)});return}yr();var Mt=un.targetAlign,ln=un.originAlign,Jt=un.index,vn=un.offset,bn=Dt.current.clientHeight,Fn=!1,Nr=Mt,Sr=null;if(bn){for(var vr=Mt||ln,Ir=0,_r=0,Lt=0,wt=Math.min(Hn.length-1,Jt),Ot=0;Ot<=wt;Ot+=1){var Dn=Lr(Hn[Ot]);_r=Ir;var er=Vn.get(Dn);Lt=_r+(er===void 0?Gn:er),Ir=Lt}for(var An=vr==="top"?vn:bn-vn,Rn=wt;Rn>=0;Rn-=1){var Nn=Lr(Hn[Rn]),rr=Vn.get(Nn);if(rr===void 0){Fn=!0;break}if(An-=rr,An<=0)break}switch(vr){case"top":Sr=_r-vn;break;case"bottom":Sr=Lt-bn+vn;break;default:{var Dr=Dt.current.scrollTop,yn=Dr+bn;_r<Dr?Nr="top":Lt>yn&&(Nr="bottom")}}Sr!==null&&Pr(Sr),Sr!==un.lastTop&&(Fn=!0)}Fn&&Je(function(Si){return(0,Fe.Z)((0,Fe.Z)({},Si),{},{times:Si.times+1,targetAlign:Nr,lastTop:Sr})})}},[un,Dt.current]),function(Mt){if(Mt==null){nr();return}if(it.cancel(ot.current),typeof Mt=="number")Pr(Mt);else if(Mt&&(0,Be.Z)(Mt)==="object"){var ln,Jt=Mt.align;"index"in Mt?ln=Mt.index:ln=Hn.findIndex(function(Fn){return Lr(Fn)===Mt.key});var vn=Mt.offset,bn=vn===void 0?0:vn;Je({times:0,index:ln,offset:bn,originAlign:Jt})}}}function Sn(Dt,Hn,Vn,Gn){var Lr=Vn-Dt,yr=Hn-Vn,Pr=Math.min(Lr,yr)*2;if(Gn<=Pr){var nr=Math.floor(Gn/2);return Gn%2?Vn+nr+1:Vn-nr}return Lr>yr?Vn-(Gn-yr):Vn+(Gn-Lr)}function dr(Dt,Hn,Vn){var Gn=Dt.length,Lr=Hn.length,yr,Pr;if(Gn===0&&Lr===0)return null;Gn<Lr?(yr=Dt,Pr=Hn):(yr=Hn,Pr=Dt);var nr={__EMPTY_ITEM__:!0};function ot(ln){return ln!==void 0?Vn(ln):nr}for(var Ct=null,zt=Math.abs(Gn-Lr)!==1,un=0;un<Pr.length;un+=1){var Je=ot(yr[un]),Mt=ot(Pr[un]);if(Je!==Mt){Ct=un,zt=zt||Je!==ot(Pr[un+1]);break}}return Ct===null?null:{index:Ct,multiple:zt}}function Wr(Dt,Hn,Vn){var Gn=_e.useState(Dt),Lr=(0,Ye.Z)(Gn,2),yr=Lr[0],Pr=Lr[1],nr=_e.useState(null),ot=(0,Ye.Z)(nr,2),Ct=ot[0],zt=ot[1];return _e.useEffect(function(){var un=dr(yr||[],Dt||[],Hn);(un==null?void 0:un.index)!==void 0&&(Vn==null||Vn(un.index),zt(Dt[un.index])),Pr(Dt)},[Dt]),[Ct]}var gt=(typeof navigator=="undefined"?"undefined":(0,Be.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),sn=gt,tr=function(Dt,Hn){var Vn=(0,_e.useRef)(!1),Gn=(0,_e.useRef)(null);function Lr(){clearTimeout(Gn.current),Vn.current=!0,Gn.current=setTimeout(function(){Vn.current=!1},50)}var yr=(0,_e.useRef)({top:Dt,bottom:Hn});return yr.current.top=Dt,yr.current.bottom=Hn,function(Pr){var nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=Pr<0&&yr.current.top||Pr>0&&yr.current.bottom;return nr&&ot?(clearTimeout(Gn.current),Vn.current=!1):(!ot||Vn.current)&&Lr(),!Vn.current&&ot}};function Zn(Dt,Hn,Vn,Gn,Lr){var yr=(0,_e.useRef)(0),Pr=(0,_e.useRef)(null),nr=(0,_e.useRef)(null),ot=(0,_e.useRef)(!1),Ct=tr(Hn,Vn);function zt(vn,bn){it.cancel(Pr.current),yr.current+=bn,nr.current=bn,!Ct(bn)&&(sn||vn.preventDefault(),Pr.current=it(function(){var Fn=ot.current?10:1;Lr(yr.current*Fn),yr.current=0}))}function un(vn,bn){Lr(bn,!0),sn||vn.preventDefault()}var Je=(0,_e.useRef)(null),Mt=(0,_e.useRef)(null);function ln(vn){if(Dt){it.cancel(Mt.current),Mt.current=it(function(){Je.current=null},2);var bn=vn.deltaX,Fn=vn.deltaY,Nr=vn.shiftKey,Sr=bn,vr=Fn;(Je.current==="sx"||!Je.current&&Nr&&Fn&&!bn)&&(Sr=Fn,vr=0,Je.current="sx");var Ir=Math.abs(Sr),_r=Math.abs(vr);Je.current===null&&(Je.current=Gn&&Ir>_r?"x":"y"),Je.current==="y"?zt(vn,vr):un(vn,Sr)}}function Jt(vn){Dt&&(ot.current=vn.detail===nr.current)}return[ln,Jt]}var xr=14/15;function Kr(Dt,Hn,Vn){var Gn=(0,_e.useRef)(!1),Lr=(0,_e.useRef)(0),yr=(0,_e.useRef)(null),Pr=(0,_e.useRef)(null),nr,ot=function(Je){if(Gn.current){var Mt=Math.ceil(Je.touches[0].pageY),ln=Lr.current-Mt;Lr.current=Mt,Vn(ln)&&Je.preventDefault(),clearInterval(Pr.current),Pr.current=setInterval(function(){ln*=xr,(!Vn(ln,!0)||Math.abs(ln)<=.1)&&clearInterval(Pr.current)},16)}},Ct=function(){Gn.current=!1,nr()},zt=function(Je){nr(),Je.touches.length===1&&!Gn.current&&(Gn.current=!0,Lr.current=Math.ceil(Je.touches[0].pageY),yr.current=Je.target,yr.current.addEventListener("touchmove",ot),yr.current.addEventListener("touchend",Ct))};nr=function(){yr.current&&(yr.current.removeEventListener("touchmove",ot),yr.current.removeEventListener("touchend",Ct))},Xe(function(){return Dt&&Hn.current.addEventListener("touchstart",zt),function(){var un;(un=Hn.current)===null||un===void 0||un.removeEventListener("touchstart",zt),nr(),clearInterval(Pr.current)}},[Dt])}var Jr=20;function Zr(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Vn=Dt/Hn*100;return isNaN(Vn)&&(Vn=0),Vn=Math.max(Vn,Jr),Vn=Math.min(Vn,Dt/2),Math.floor(Vn)}function ei(Dt,Hn,Vn,Gn){var Lr=_e.useMemo(function(){return[new Map,[]]},[Dt,Vn.id,Gn]),yr=(0,Ye.Z)(Lr,2),Pr=yr[0],nr=yr[1],ot=function(zt){var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zt,Je=Pr.get(zt),Mt=Pr.get(un);if(Je===void 0||Mt===void 0)for(var ln=Dt.length,Jt=nr.length;Jt<ln;Jt+=1){var vn,bn=Dt[Jt],Fn=Hn(bn);Pr.set(Fn,Jt);var Nr=(vn=Vn.get(Fn))!==null&&vn!==void 0?vn:Gn;if(nr[Jt]=(nr[Jt-1]||0)+Nr,Fn===zt&&(Je=Jt),Fn===un&&(Mt=Jt),Je!==void 0&&Mt!==void 0)break}return{top:nr[Je-1]||0,bottom:nr[Mt]}};return ot}var pi=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],kr=[],Ti={overflowY:"auto",overflowAnchor:"none"};function na(Dt,Hn){var Vn=Dt.prefixCls,Gn=Vn===void 0?"rc-virtual-list":Vn,Lr=Dt.className,yr=Dt.height,Pr=Dt.itemHeight,nr=Dt.fullHeight,ot=nr===void 0?!0:nr,Ct=Dt.style,zt=Dt.data,un=Dt.children,Je=Dt.itemKey,Mt=Dt.virtual,ln=Dt.direction,Jt=Dt.scrollWidth,vn=Dt.component,bn=vn===void 0?"div":vn,Fn=Dt.onScroll,Nr=Dt.onVirtualScroll,Sr=Dt.onVisibleChange,vr=Dt.innerProps,Ir=Dt.extraRender,_r=Dt.styles,Lt=(0,Ce.Z)(Dt,pi),wt=!!(Mt!==!1&&yr&&Pr),Ot=wt&&zt&&(Pr*zt.length>yr||!!Jt),Dn=ln==="rtl",er=Te()(Gn,(0,ve.Z)({},"".concat(Gn,"-rtl"),Dn),Lr),An=zt||kr,Rn=(0,_e.useRef)(),Nn=(0,_e.useRef)(),rr=(0,_e.useState)(0),Dr=(0,Ye.Z)(rr,2),yn=Dr[0],Si=Dr[1],di=(0,_e.useState)(0),ha=(0,Ye.Z)(di,2),ta=ha[0],Wi=ha[1],Ta=(0,_e.useState)(!1),Gi=(0,Ye.Z)(Ta,2),$i=Gi[0],ra=Gi[1],Ma=function(){ra(!0)},vi=function(){ra(!1)},Zi=_e.useCallback(function(_n){return typeof Je=="function"?Je(_n):_n==null?void 0:_n[Je]},[Je]),xa={getKey:Zi};function Ya(_n){Si(function(cr){var fr;typeof _n=="function"?fr=_n(cr):fr=_n;var Hr=br(fr);return Rn.current.scrollTop=Hr,Hr})}var Ba=(0,_e.useRef)({start:0,end:An.length}),ki=(0,_e.useRef)(),Rt=Wr(An,Zi),Tt=(0,Ye.Z)(Rt,1),mn=Tt[0];ki.current=mn;var $n=nn(Zi,null,null),Qn=(0,Ye.Z)($n,4),Or=Qn[0],Gr=Qn[1],ci=Qn[2],gi=Qn[3],li=_e.useMemo(function(){if(!wt)return{scrollHeight:void 0,start:0,end:An.length-1,offset:void 0};if(!Ot){var _n;return{scrollHeight:((_n=Nn.current)===null||_n===void 0?void 0:_n.offsetHeight)||0,start:0,end:An.length-1,offset:void 0}}for(var cr=0,fr,Hr,ur,ti=An.length,yi=0;yi<ti;yi+=1){var ni=An[yi],fi=Zi(ni),jr=ci.get(fi),oi=cr+(jr===void 0?Pr:jr);oi>=yn&&fr===void 0&&(fr=yi,Hr=cr),oi>yn+yr&&ur===void 0&&(ur=yi),cr=oi}return fr===void 0&&(fr=0,Hr=0,ur=Math.ceil(yr/Pr)),ur===void 0&&(ur=An.length-1),ur=Math.min(ur+1,An.length-1),{scrollHeight:cr,start:fr,end:ur,offset:Hr}},[Ot,wt,yn,An,gi,yr]),Mi=li.scrollHeight,Vi=li.start,Yr=li.end,Fi=li.offset;Ba.current.start=Vi,Ba.current.end=Yr;var sa=_e.useState({width:0,height:yr}),Yi=(0,Ye.Z)(sa,2),Oe=Yi[0],Ve=Yi[1],Ue=function(cr){Ve({width:cr.width||cr.offsetWidth,height:cr.height||cr.offsetHeight})},qe=(0,_e.useRef)(),vt=(0,_e.useRef)(),St=_e.useMemo(function(){return Zr(Oe.width,Jt)},[Oe.width,Jt]),Nt=_e.useMemo(function(){return Zr(Oe.height,Mi)},[Oe.height,Mi]),wn=Mi-yr,Ln=(0,_e.useRef)(wn);Ln.current=wn;function br(_n){var cr=_n;return Number.isNaN(Ln.current)||(cr=Math.min(cr,Ln.current)),cr=Math.max(cr,0),cr}var Br=yn<=0,hr=yn>=wn,Wn=tr(Br,hr),Tn=function(){return{x:Dn?-ta:ta,y:yn}},Jn=(0,_e.useRef)(Tn()),ar=Me(function(){if(Nr){var _n=Tn();(Jn.current.x!==_n.x||Jn.current.y!==_n.y)&&(Nr(_n),Jn.current=_n)}});function $r(_n,cr){var fr=_n;cr?((0,we.flushSync)(function(){Wi(fr)}),ar()):Ya(fr)}function mr(_n){var cr=_n.currentTarget.scrollTop;cr!==yn&&Ya(cr),Fn==null||Fn(_n),ar()}var gr=function(cr){var fr=cr,Hr=Jt-Oe.width;return fr=Math.max(fr,0),fr=Math.min(fr,Hr),fr},Cr=Me(function(_n,cr){cr?((0,we.flushSync)(function(){Wi(function(fr){var Hr=fr+(Dn?-_n:_n);return gr(Hr)})}),ar()):Ya(function(fr){var Hr=fr+_n;return Hr})}),Er=Zn(wt,Br,hr,!!Jt,Cr),Fr=(0,Ye.Z)(Er,2),He=Fr[0],Ge=Fr[1];Kr(wt,Rn,function(_n,cr){return Wn(_n,cr)?!1:(He({preventDefault:function(){},deltaY:_n}),!0)}),Xe(function(){function _n(fr){wt&&fr.preventDefault()}var cr=Rn.current;return cr.addEventListener("wheel",He),cr.addEventListener("DOMMouseScroll",Ge),cr.addEventListener("MozMousePixelScroll",_n),function(){cr.removeEventListener("wheel",He),cr.removeEventListener("DOMMouseScroll",Ge),cr.removeEventListener("MozMousePixelScroll",_n)}},[wt]),Xe(function(){Jt&&Wi(function(_n){return gr(_n)})},[Oe.width,Jt]);var Ft=function(){var cr,fr;(cr=qe.current)===null||cr===void 0||cr.delayHidden(),(fr=vt.current)===null||fr===void 0||fr.delayHidden()},Et=Bt(Rn,An,ci,Pr,Zi,function(){return Gr(!0)},Ya,Ft);_e.useImperativeHandle(Hn,function(){return{getScrollInfo:Tn,scrollTo:function(cr){function fr(Hr){return Hr&&(0,Be.Z)(Hr)==="object"&&("left"in Hr||"top"in Hr)}fr(cr)?(cr.left!==void 0&&Wi(gr(cr.left)),Et(cr.top)):Et(cr)}}}),Xe(function(){if(Sr){var _n=An.slice(Vi,Yr+1);Sr(_n,An)}},[Vi,Yr,An]);var dn=ei(An,Zi,ci,Pr),In=Ir==null?void 0:Ir({start:Vi,end:Yr,virtual:Ot,offsetX:ta,offsetY:Fi,rtl:Dn,getSize:dn}),zn=ze(An,Vi,Yr,Jt,Or,un,xa),or=null;yr&&(or=(0,Fe.Z)((0,ve.Z)({},ot?"height":"maxHeight",yr),Ti),wt&&(or.overflowY="hidden",Jt&&(or.overflowX="hidden"),$i&&(or.pointerEvents="none")));var jn={};return Dn&&(jn.dir="rtl"),_e.createElement("div",(0,fe.Z)({style:(0,Fe.Z)((0,Fe.Z)({},Ct),{},{position:"relative"}),className:er},jn,Lt),_e.createElement(ft.Z,{onResize:Ue},_e.createElement(bn,{className:"".concat(Gn,"-holder"),style:or,ref:Rn,onScroll:mr,onMouseEnter:Ft},_e.createElement(bt,{prefixCls:Gn,height:Mi,offsetX:ta,offsetY:Fi,scrollWidth:Jt,onInnerResize:Gr,ref:Nn,innerProps:vr,rtl:Dn,extra:In},zn))),Ot&&Mi>yr&&_e.createElement(de,{ref:qe,prefixCls:Gn,scrollOffset:yn,scrollRange:Mi,rtl:Dn,onScroll:$r,onStartMove:Ma,onStopMove:vi,spinSize:Nt,containerSize:Oe.height,style:_r==null?void 0:_r.verticalScrollBar,thumbStyle:_r==null?void 0:_r.verticalScrollBarThumb}),Ot&&Jt&&_e.createElement(de,{ref:vt,prefixCls:Gn,scrollOffset:ta,scrollRange:Jt,rtl:Dn,onScroll:$r,onStartMove:Ma,onStopMove:vi,spinSize:St,containerSize:Oe.width,horizontal:!0,style:_r==null?void 0:_r.horizontalScrollBar,thumbStyle:_r==null?void 0:_r.horizontalScrollBarThumb}))}var ea=_e.forwardRef(na);ea.displayName="List";var oa=ea,Li=oa},66392:function(kn,Vt){"use strict";var ae;var fe=Symbol.for("react.element"),Fe=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Ce=Symbol.for("react.provider"),_e=Symbol.for("react.context"),we=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),bt=Symbol.for("react.lazy"),ht=Symbol.for("react.offscreen"),st;st=Symbol.for("react.module.reference");function tt(Le){if(typeof Le=="object"&&Le!==null){var xt=Le.$$typeof;switch(xt){case fe:switch(Le=Le.type,Le){case Be:case ve:case Ye:case Te:case ft:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case we:case _e:case ge:case bt:case Re:case Ce:return Le;default:return xt}}case Fe:return xt}}}ae=_e,ae=Ce,ae=fe,ae=ge,ae=Be,ae=bt,ae=Re,ae=Fe,ae=ve,ae=Ye,ae=Te,ae=ft,ae=function(){return!1},ae=function(){return!1},ae=function(Le){return tt(Le)===_e},ae=function(Le){return tt(Le)===Ce},ae=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===fe},ae=function(Le){return tt(Le)===ge},ae=function(Le){return tt(Le)===Be},ae=function(Le){return tt(Le)===bt},ae=function(Le){return tt(Le)===Re},ae=function(Le){return tt(Le)===Fe},ae=function(Le){return tt(Le)===ve},ae=function(Le){return tt(Le)===Ye},ae=function(Le){return tt(Le)===Te},ae=function(Le){return tt(Le)===ft},ae=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ye||Le===Te||Le===ft||Le===ht||typeof Le=="object"&&Le!==null&&(Le.$$typeof===bt||Le.$$typeof===Re||Le.$$typeof===Ce||Le.$$typeof===_e||Le.$$typeof===ge||Le.$$typeof===st||Le.getModuleId!==void 0)},ae=tt},31461:function(kn,Vt,ae){"use strict";ae(66392)},84279:function(kn,Vt,ae){"use strict";var fe=Object.defineProperty,Fe=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,_e=(a,y,b)=>y in a?fe(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,we=(a,y)=>{for(var b in y||(y={}))ve.call(y,b)&&_e(a,b,y[b]);if(Ye)for(var b of Ye(y))Ce.call(y,b)&&_e(a,b,y[b]);return a},ge=(a,y)=>Fe(a,Be(y)),Te=a=>typeof a=="symbol"?a:a+"",ft=(a,y)=>{var b={};for(var E in a)ve.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ye)for(var E of Ye(a))y.indexOf(E)<0&&Ce.call(a,E)&&(b[E]=a[E]);return b};function Re(a){return Array.isArray(a)}var bt={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 st(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function tt(){return typeof navigator.vibrate=="function"}function Le(){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 xt(){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 on(){return HTMLElement.prototype.hasOwnProperty("popover")}var it={strings:bt,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return it._locale||(it._locale=ht()?navigator.language.slice(0,5):"en-US"),it._locale},set locale(a){it._locale=a,it._numberFormatter=void 0,it.dirty=!0},get numberFormatter(){return it._numberFormatter||(it._numberFormatter=new Intl.NumberFormat(it.locale)),it._numberFormatter},merge(a,y){if(typeof a=="string"&&y)it.strings[a]=we(we({},it.strings[a]),y),it.dirty=!0;else for(const b of Object.keys(a))it.merge(b,a[b])},get dirty(){return it._dirty},set dirty(a){it._dirty||it._dirty===a||(it._dirty=!0,setTimeout(()=>{it._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return it._subscribers.push(a),it._subscribers.length-1},unsubscribe(a){a<0||a>=it._subscribers.length||(it._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=yt(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=yt(E);ee&&b.setAttribute("aria-label",ee)}}}};function yt(a,...y){if(a===void 0)return;let b="";const E=it.locale;it.strings[E]&&(b=it.strings[E][a]);const ee=E.slice(0,2);if(!b&&it.strings[ee]&&(b=it.strings[ee][a]),b||(b=it.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let oe=re.exec(b),pe=0;for(;oe;){if(y[pe++]){const Se=oe[2]?parseInt(oe[2],10)-1:pe-1;let Ae=y[Se];typeof Ae=="number"&&(Ae=it.numberFormatter.format(Ae)),b=b.replace(oe[1],Ae)}oe=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"},de={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"},ze={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"},At={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 lt(a){var y,b,E,ee,re,oe;const pe=a.split("!");let be,Se,Ae,We=255,dt=255,Pt=255,Kt=-1;const Yn=pe.length>0&&pe[0].startsWith("-");Yn&&(pe[0]=pe[0].slice(1));for(let Qr=0;Qr<pe.length;Qr++){be=We,Se=dt,Ae=Pt;const Un=(y=pe[Qr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],Ar=Un==null?void 0:Un.toLowerCase(),ri=Un&&(oe=(re=(ee=(E=(b=ze[Ar])!=null?b:ze[At[Un]])!=null?E:de[Un])!=null?ee:ct[Un])!=null?re:Ee[Un])!=null?oe:pe[Qr].trim();let Rr=ri.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Rr!=null&&Rr[1]&&Rr[2]&&Rr[3])We=Math.max(0,Math.min(255,Number.parseInt(Rr[1],16))),dt=Math.max(0,Math.min(255,Number.parseInt(Rr[2],16))),Pt=Math.max(0,Math.min(255,Number.parseInt(Rr[3],16)));else if(Rr=ri.match(/^#([\da-f]{3})$/i),Rr!=null&&Rr[1]){const Bi=Number.parseInt(Rr[1][0],16),ga=Number.parseInt(Rr[1][1],16),Qi=Number.parseInt(Rr[1][2],16);We=Math.max(0,Math.min(255,Bi*16+Bi)),dt=Math.max(0,Math.min(255,ga*16+ga)),Pt=Math.max(0,Math.min(255,Qi*16+Qi))}else if(Rr=ri.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Rr!=null&&Rr[1]&&Rr[2]&&Rr[3])We=Math.max(0,Math.min(255,Number.parseInt(Rr[1]))),dt=Math.max(0,Math.min(255,Number.parseInt(Rr[2]))),Pt=Math.max(0,Math.min(255,Number.parseInt(Rr[3])));else return;Kt>=0&&(We=(1-Kt)*We+Kt*be,dt=(1-Kt)*dt+Kt*Se,Pt=(1-Kt)*Pt+Kt*Ae,Kt=-1),Qr+1<pe.length&&(Kt=Math.max(0,Math.min(100,Number.parseInt(pe[++Qr])))/100)}return Kt>=0&&(We=Kt*We+(1-Kt)*be,dt=Kt*dt+(1-Kt)*Se,Pt=Kt*Pt+(1-Kt)*Ae),Yn&&(We=255-We,dt=255-dt,Pt=255-Pt),"#"+("00"+Math.round(We).toString(16)).slice(-2)+("00"+Math.round(dt).toString(16)).slice(-2)+("00"+Math.round(Pt).toString(16)).slice(-2)}function Ze(a){var y,b;return a=a.trim(),(b=(y=je[a.toLowerCase()])!=null?y:je[At[a]])!=null?b:lt(a)}function kt(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 pt(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 nn(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*pt(re,ee,y+2)),g:Math.round(255*pt(re,ee,y)),b:Math.round(255*pt(re,ee,y-2))}}function rt(a){return a<0?0:a>255?255:Math.round(a)}function qt(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(rt(y)<<16)+(rt(b)<<8)+rt(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 pn(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),oe=re-ee;let pe,be;re===ee?pe=0:y===re?pe=(b-E)/oe:b===re?pe=2+(E-y)/oe:E===re&&(pe=4+(y-b)/oe),pe=Math.min(pe*60,360),pe<0&&(pe+=360);const Se=(ee+re)/2;return re===ee?be=0:Se<=.5?be=oe/(re+ee):be=oe/(2-re-ee),{h:pe,s:be,l:Se}}function cn(a){let y=kt(a);if(!y)return a;let{h:b,s:E,l:ee}=pn(y);return E+=.1,ee-=.1,qt(nn({h:b,s:E,l:ee}))}var Xe={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"},Me={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},mt=[{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 Gt(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 mt)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(Me[re]||re)}return a}function hn(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Me)if(Me[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of mt)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 Qe(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=Xe[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:oe,variant:pe,style:be}=hn(ee);switch(re=oe,pe){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(be){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function ut(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Yt={},Qt=we({},Xe),tn={},_t={},en={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}"},Cn={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}},On={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}},$e={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:On},"amsmath.sty":{package:Cn,primitive:!0},"texvc.sty":{package:en,primitive:!1}},ce={" ":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!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,me,he;xt()?(me=new RegExp("\\p{Letter}","u"),he=new RegExp("[0-9\\p{Letter}]","u")):(me=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,he=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function se(a,y,b="mord",E){y!==void 0&&(Yt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},Qt[y]||(Qt[y]=a))}function Ie(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);se(ee,ee.codePointAt(0))}return}for(const[E,ee,re,oe]of a)se(E,ee,re!=null?re:y,oe!=null?oe:b)}function et(a,y){for(let b=a;b<=y;b++)se(String.fromCodePoint(b),b)}function $t(a){var y;return(y=_t[a])!=null?y:null}function Ht(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const oe in tn)oe.startsWith(y)&&!tn[oe].infix&&ee.push({match:oe,frequency:(b=tn[oe].frequency)!=null?b:0});for(const oe in Yt)oe.startsWith(y)&&ee.push({match:oe,frequency:(E=Yt[oe].frequency)!=null?E:0});const re=y.substring(1);for(const oe of Object.keys(a.options.macros))oe.startsWith(re)&&ee.push({match:"\\"+oe,frequency:0});return ee.sort((oe,pe)=>{var be,Se;return oe.frequency===pe.frequency?oe.match.length===pe.match.length?oe.match<pe.match?-1:1:oe.match.length-pe.match.length:((be=pe.frequency)!=null?be:0)-((Se=oe.frequency)!=null?Se:0)}),ee.map(oe=>oe.match)}function Xt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function jt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...jt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Xt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...jt(b[E]))}return y}function rn(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 qn(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)_t[E]=b}function lr(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:jt(y),createAtom:b};for(const re of a)_t[re]=ee}function Bt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:jt(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")tn["\\"+a]=re;else for(const oe of a)tn["\\"+oe]=re}var Sn;function dr(a){return Sn||(Sn=gt($e)),a?gt(we(we({},Sn),a)):Sn}function Wr(a,y){var b,E,ee,re;if(typeof a=="string"){let oe=0;const pe=a;return/(^|[^\\])#1/.test(pe)&&(oe=1),/(^|[^\\])#2/.test(pe)&&(oe=2),/(^|[^\\])#3/.test(pe)&&(oe=3),/(^|[^\\])#4/.test(pe)&&(oe=4),/(^|[^\\])#5/.test(pe)&&(oe=5),/(^|[^\\])#6/.test(pe)&&(oe=6),/(^|[^\\])#7/.test(pe)&&(oe=7),/(^|[^\\])#8/.test(pe)&&(oe=8),/(^|[^\\])#9/.test(pe)&&(oe=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:oe,def:pe}}return we({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 gt(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]=Wr(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Wr(E)}return y}function sn(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=tn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Yt[a]:ce[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ce[a]})}else if(y==="math"){if(b=Yt[a],!b&&a.length===1){const E=Zn("math",a.codePointAt(0));return E.startsWith("\\")?ge(we({},sn(E,"math")),{command:E}):null}}else ce[a]?b={definitionType:"symbol",type:"mord",codepoint:ce[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function tr(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function Zn(a,y){if(y===void 0)return"";if(a==="math"&&Qt[y])return Qt[y];if(a==="text"){const b=Object.keys(ce).find(E=>ce[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var xr=[0,.68889,0,0,.72222],Kr=[0,.68889,0,0,.66667],Jr=[0,.68889,0,0,.77778],Zr=[0,.68889,0,0,.61111],ei=[.16667,.68889,0,0,.77778],pi=[0,.68889,0,0,.55556],kr=[0,0,0,0,.25],Ti=[0,.825,0,0,2.33334],na=[0,.9,0,0,2.33334],ea=[0,.68889,0,0,.54028],oa=[-.03598,.46402,0,0,.5],Li=[-.13313,.36687,0,0,1],Dt=[.01354,.52239,0,0,1],Hn=[.01354,.52239,0,0,1.11111],Vn=[0,.54986,0,0,1],Gn=[0,.69224,0,0,.5],Lr=[0,.43056,0,0,1],yr=[.08198,.58198,0,0,.77778],Pr=[.19444,.69224,0,0,.41667],nr=[.1808,.675,0,0,1],ot=[.19444,.69224,0,0,.83334],Ct=[.13667,.63667,0,0,1],zt=[-.064,.437,0,0,1.334],un=[.08167,.58167,0,0,.77778],Je=[0,.69224,0,0,.72222],Mt=[0,.69224,0,0,.66667],ln=[-.13313,.36687,0,0,.77778],Jt=[.06062,.54986,0,0,.77778],vn=[0,.69224,0,0,.77778],bn=[.25583,.75583,0,0,.77778],Fn=[.25142,.75726,0,0,.77778],Nr=[.20576,.70576,0,0,.77778],Sr=[.30274,.79383,0,0,.77778],vr=[.22958,.72958,0,0,.77778],Ir=[.1808,.675,0,0,.77778],_r=[.13667,.63667,0,0,.77778],Lt=[.13597,.63597,0,0,.77778],wt=[.03517,.54986,0,0,.77778],Ot=[0,.675,0,0,.77778],Dn=[.19444,.69224,0,0,.61111],er=[0,.54986,0,0,.76042],An=[0,.54986,0,0,.66667],Rn=[.0391,.5391,0,0,.77778],Nn=[.03517,.54986,0,0,1.33334],rr=[.38569,.88569,0,0,.77778],Dr=[.23222,.74111,0,0,.77778],yn=[.19444,.69224,0,0,.77778],Si=[0,.37788,0,0,.5],di=[0,.54986,0,0,.72222],ha=[0,.69224,0,0,.83334],ta=[.11111,.69224,0,0,.66667],Wi=[.26167,.75726,0,0,.77778],Ta=[.48256,.98256,0,0,.77778],Gi=[.28481,.79383,0,0,.77778],$i=[.08167,.58167,0,0,.22222],ra=[.08167,.58167,0,0,.38889],Ma=[0,.43056,.04028,0,.66667],vi=[.41951,.91951,0,0,.77778],Zi=[.24982,.74947,0,0,.38865],xa=[.08319,.58283,0,0,.75623],Ya=[0,.10803,0,0,.27764],Ba=[0,.47534,0,0,.50181],ki=[.18906,.47534,0,0,.50181],Rt=[0,.69141,0,0,.50181],Tt=[.24982,.74947,0,0,.27764],mn=[0,.69141,0,0,.21471],$n=[.25,.75,0,0,.44722],Qn=[0,.64444,0,0,.575],Or=[.08556,.58556,0,0,.89444],Gr=[0,.69444,0,0,.89444],ci=[0,.68611,0,0,.9],gi=[0,.68611,0,0,.86944],li=[.25,.75,0,0,.575],Mi=[.25,.75,0,0,.31944],Vi=[0,.69444,0,0,.63889],Yr=[0,.69444,0,0,.31944],Fi=[0,.44444,0,0,.63889],sa=[0,.44444,0,0,.51111],Yi=[0,.69444,0,0,.575],Oe=[.13333,.63333,0,0,.89444],Ve=[0,.44444,0,0,.31944],Ue=[0,.69444,0,0,.86944],qe=[0,.68611,0,0,.69166],vt=[0,.68611,0,0,.83055],St=[0,.68611,0,0,.89444],Nt=[0,.69444,0,0,.60278],wn=[.19444,.69444,0,0,.51111],Ln=[0,.69444,0,0,.83055],br=[-.10889,.39111,0,0,1.14999],Br=[.19444,.69444,0,0,.575],hr=[.19444,.69444,0,0,1.14999],Wn=[.19444,.69444,0,0,.70277],Tn=[.05556,.75,0,0,.575],Jn=[0,.68611,0,0,.95833],ar=[.08556,.58556,0,0,.76666],$r=[-.02639,.47361,0,0,.575],mr=[0,.44444,0,0,.89444],gr=[0,.55556,0,0,.76666],Cr=[-.10889,.39111,0,0,.89444],Er=[.00222,.50222,0,0,.89444],Fr=[.19667,.69667,0,0,.89444],He=[.08556,.58556,0,0,1.14999],Ge=[0,.69444,0,0,.70277],Ft=[-.02778,.47222,0,0,.575],Et=[.25,.75,0,0,.51111],dn=[-.13889,.36111,0,0,1.14999],In=[.19444,.69444,0,0,1.02222],zn=[.12963,.69444,0,0,.89444],or=[.19444,.69444,0,0,.44722],jn=[0,.64444,.13167,0,.59111],_n=[.19444,.64444,.13167,0,.59111],cr=[0,.68611,.17208,0,.8961],fr=[.19444,.44444,.105,0,.53222],Hr=[0,.44444,.085,0,.82666],ur=[0,.69444,.06709,0,.59111],ti=[0,.69444,.12945,0,.35555],yi=[0,.69444,0,0,.94888],ni=[0,.69444,.11472,0,.59111],fi=[0,.68611,.10778,0,.88555],jr=[0,.69444,.07939,0,.62055],oi=[0,.69444,.12417,0,.30667],Ci=[0,.64444,.13556,0,.51111],Oi=[.19444,.64444,.13556,0,.51111],ii=[0,.68333,.16389,0,.74333],Ni=[.19444,.43056,.08847,0,.46],la=[0,.43056,.07514,0,.71555],Ha=[0,.69444,.06646,0,.51111],Aa=[0,.69444,0,0,.83129],pa=[0,.69444,.1225,0,.51111],ka=[0,.68333,.09403,0,.76666],Pa=[0,.68333,.11111,0,.76666],Ui=[0,.69444,.06961,0,.51444],ca=[0,.69444,0,0,.27778],bi=[.25,.75,0,0,.38889],zi=[0,.64444,0,0,.5],ia=[0,.69444,0,0,.77778],_a=[0,.68333,0,0,.75],So=[0,.68333,0,0,.77778],ho=[0,.68333,0,0,.68056],po=[0,.68333,0,0,.72222],Xa=[.25,.75,0,0,.5],Ra=[.25,.75,0,0,.27778],Hi=[0,.69444,0,0,.5],yo=[0,.69444,0,0,.55556],Xi=[0,.43056,0,0,.44445],Ei=[0,.43056,0,0,.5],ua=[.19444,.43056,0,0,.55556],Ja=[0,.43056,0,0,.55556],wa=[.08333,.58333,0,0,.77778],Wa=[0,.43056,0,0,.27778],Ki=[0,.66786,0,0,.27778],ro=[0,.69444,0,0,.75],so=[0,.66786,0,0,.5],to=[0,.68333,0,0,.625],lo=[.19444,.69444,0,0,.44445],vo=[0,.69444,0,0,.72222],Ao=[.19444,.69444,0,0,.5],no=[.19444,.69444,0,0,1],ao=[.011,.511,0,0,1.126],zo=[.19444,.69444,0,0,.61111],Ho=[.05556,.75,0,0,.5],Jo=[0,.68333,0,0,.83334],To=[.0391,.5391,0,0,.66667],co=[-.05555,.44445,0,0,.5],aa=[0,.43056,0,0,.77778],va=[0,.55556,0,0,.66667],qa=[-.03625,.46375,0,0,.77778],uo=[-.01688,.48312,0,0,.77778],Po=[.0391,.5391,0,0,1],Uo=[0,.69444,0,0,.61111],qo=[-.03472,.46528,0,0,.5],ls=[.25,.75,0,0,.44445],Ss=[-.14236,.35764,0,0,1],Qo=[.244,.744,0,0,.412],Cs=[.19444,.69444,0,0,.88889],Ka=[.12963,.69444,0,0,.77778],ye=[.19444,.69444,0,0,.38889],ke=[.011,.511,0,0,1.638],De=[.19444,.69444,0,0,0],nt=[0,.44444,0,0,.575],at=[.19444,.44444,0,0,.575],an=[0,.68611,0,0,.75555],Zt=[0,.69444,0,0,.66759],Pn=[0,.68611,0,0,.80555],fn=[0,.68611,.08229,0,.98229],Ut=[0,.68611,0,0,.76666],Kn=[0,.44444,0,0,.58472],gn=[.19444,.44444,0,0,.6118],xn=[.19444,.43056,0,0,.5],ir=[0,.68333,.02778,.08334,.76278],sr=[0,.68333,.08125,.05556,.83125],Mn=[0,.43056,0,.05556,.48472],Xn=[.19444,.43056,0,.08334,.51702],Mr=[.25,.75,0,0,.42778],Tr=[0,.69444,0,0,.55],Vr=[0,.69444,0,0,.73334],si=[0,.69444,0,0,.79445],xi=[0,.69444,0,0,.51945],hi=[0,.69444,0,0,.70278],Xr=[0,.69444,0,0,.76389],da=[.25,.75,0,0,.34306],Ji=[0,.69444,0,0,.56111],Na=[0,.69444,0,0,.25556],Ua=[.19444,.45833,0,0,.56111],Sa=[0,.45833,0,0,.56111],ji=[0,.69444,0,0,.30556],$a=[0,.69444,0,0,.58056],Ca=[0,.69444,0,0,.67223],fa=[0,.69444,0,0,.85556],La=[0,.69444,0,0,.55834],Oa=[0,.65556,.11156,0,.5],oo=[0,.69444,.08094,0,.70834],fo=[.17014,0,0,0,.44445],$o=[0,.69444,.0799,0,.5],cs=[0,.69444,0,0,.73752],ss=[0,.69444,.09205,0,.5],jo=[0,.69444,.09031,0,.77778],Lo=[0,.69444,.07816,0,.27778],ps=[0,.69444,.00316,0,.5],Oo=[.19444,.69444,0,0,.83334],ya=[.05556,.75,0,0,.83334],ma=[0,.75,0,0,.5],Do=[.125,.08333,0,0,.27778],Mo=[0,.08333,0,0,.27778],Da=[0,.65556,0,0,.5],Qa=[0,.69444,0,0,.47222],Di=[0,.69444,0,0,.66667],ja=[0,.69444,0,0,.59722],bo=[0,.69444,0,0,.54167],Go=[0,.69444,0,0,.70834],Fo=[.25,.75,0,0,.28889],Ko=[0,.69444,0,0,.51667],Es=[0,.44444,0,0,.44445],Sl=[.19444,.44444,0,0,.51667],al=[0,.44444,0,0,.38333],Bs=[0,.44444,0,0,.51667],Dl=[0,.69444,0,0,.83334],Mc=[.35001,.85,0,0,.45834],Bl=[.35001,.85,0,0,.57778],Ls=[.35001,.85,0,0,.41667],dl=[.35001,.85,0,0,.58334],Fs=[0,.72222,0,0,.55556],Fl=[1e-5,.6,0,0,.66667],Al=[1e-5,.6,0,0,.77778],zs=[.25001,.75,0,0,.94445],us=[.306,.805,.19445,0,.47222],$s=[.30612,.805,.19445,0,.47222],es=[.25001,.75,0,0,.83334],Gs=[.35001,.85,0,0,.47222],Ys=[.25001,.75,0,0,1.11111],ol=[.65002,1.15,0,0,.59722],fs=[.65002,1.15,0,0,.81111],Fa=[.65002,1.15,0,0,.47222],ts=[.65002,1.15,0,0,.66667],Os=[0,.75,0,0,1],Wo=[.55001,1.05,0,0,1.27778],Us=[.862,1.36,.44445,0,.55556],ml=[.86225,1.36,.44445,0,.55556],Co=[.55001,1.05,0,0,1.11111],gl=[.65002,1.15,0,0,.52778],sl=[.65002,1.15,0,0,.61111],Hs=[.55001,1.05,0,0,1.51112],jl=[.95003,1.45,0,0,.73611],Cl=[.95003,1.45,0,0,1.04445],fl=[.95003,1.45,0,0,.52778],El=[.95003,1.45,0,0,.75],za=[0,.75,0,0,1.44445],Ii=[.95003,1.45,0,0,.58334],eo=[1.25003,1.75,0,0,.79167],ns=[1.25003,1.75,0,0,1.27778],hl=[1.25003,1.75,0,0,.58334],kc=[1.25003,1.75,0,0,.80556],Gl=[0,.825,0,0,1.8889],_c=[1.25003,1.75,0,0,.63889],Yl=[.64502,1.155,0,0,.875],ms=[1e-5,.6,0,0,.875],Za=[-99e-5,.601,0,0,.66667],fc=[.64502,1.155,0,0,.66667],vl=[1e-5,.9,0,0,.88889],Rc=[.65002,1.15,0,0,.88889],Xl=[.90001,0,0,0,.88889],Nc=[-.00499,.605,0,0,1.05556],zl=[0,.12,0,0,.45],_i=[0,.61111,0,0,.525],Xs=[.08333,.69444,0,0,.525],au=[-.08056,.53055,0,0,.525],ou=[-.05556,.55556,0,0,.525],xo=[0,.43056,0,0,.525],Ai=[.22222,.43056,0,0,.525],Ds=[0,0,0,0,.525],Js={"AMS-Regular":{32:kr,65:xr,66:Kr,67:xr,68:xr,69:Kr,70:Zr,71:Jr,72:Jr,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Jr,76:Kr,77:[0,.68889,0,0,.94445],78:xr,79:ei,80:Zr,81:ei,82:xr,83:pi,84:Kr,85:xr,86:xr,87:[0,.68889,0,0,1],88:xr,89:xr,90:Kr,107:pi,160:kr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:pi,295:ea,710:Ti,732:na,770:Ti,771:na,989:un,1008:Ma,8245:[0,.54986,0,0,.275],8463:ea,8487:xr,8498:pi,8502:Kr,8503:[0,.68889,0,0,.44445],8504:Kr,8513:[0,.68889,0,0,.63889],8592:oa,8594:oa,8602:Li,8603:Li,8606:Dt,8608:Dt,8610:Hn,8611:Hn,8619:Vn,8620:Vn,8621:[-.13313,.37788,0,0,1.38889],8622:Li,8624:Gn,8625:Gn,8630:Lr,8631:Lr,8634:yr,8635:yr,8638:Pr,8639:Pr,8642:Pr,8643:Pr,8644:nr,8646:nr,8647:nr,8648:ot,8649:nr,8650:ot,8651:Dt,8652:Dt,8653:Li,8654:Li,8655:Li,8666:Ct,8667:Ct,8669:[-.13313,.37788,0,0,1],8672:zt,8674:zt,8705:[0,.825,0,0,.5],8708:pi,8709:un,8717:[0,.43056,0,0,.42917],8722:oa,8724:[.08198,.69224,0,0,.77778],8726:un,8733:vn,8736:Je,8737:Je,8738:[.03517,.52239,0,0,.72222],8739:$i,8740:[.25142,.74111,0,0,.27778],8741:ra,8742:[.25142,.74111,0,0,.5],8756:Mt,8757:Mt,8764:ln,8765:[-.13313,.37788,0,0,.77778],8769:ln,8770:qa,8774:Sr,8776:uo,8778:un,8782:Jt,8783:Jt,8785:yr,8786:yr,8787:yr,8790:vn,8791:vr,8796:[.08198,.91667,0,0,.77778],8806:bn,8807:bn,8808:Fn,8809:Fn,8812:[.25583,.75583,0,0,.5],8814:Nr,8815:Nr,8816:Sr,8817:Sr,8818:vr,8819:vr,8822:Ir,8823:Ir,8828:_r,8829:_r,8830:vr,8831:vr,8832:Nr,8833:Nr,8840:Sr,8841:Sr,8842:Lt,8843:Lt,8847:wt,8848:wt,8858:yr,8859:yr,8861:yr,8862:Ot,8863:Ot,8864:Ot,8865:Ot,8872:[0,.69224,0,0,.61111],8873:Je,8874:[0,.69224,0,0,.88889],8876:Zr,8877:Zr,8878:xr,8879:xr,8882:wt,8883:wt,8884:_r,8885:_r,8888:[0,.54986,0,0,1.11111],8890:ua,8891:Dn,8892:Dn,8901:[0,.54986,0,0,.27778],8903:un,8905:un,8906:un,8907:vn,8908:vn,8909:[-.03598,.46402,0,0,.77778],8910:er,8911:er,8912:wt,8913:wt,8914:An,8915:An,8916:Mt,8918:Rn,8919:Rn,8920:Nn,8921:Nn,8922:rr,8923:rr,8926:_r,8927:_r,8928:Sr,8929:Sr,8934:Dr,8935:Dr,8936:Dr,8937:Dr,8938:Nr,8939:Nr,8940:Sr,8941:Sr,8994:yn,8995:yn,9416:[.15559,.69224,0,0,.90222],9484:Gn,9488:Gn,9492:Si,9496:Si,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Ot,9633:Ot,9650:di,9651:di,9654:wt,9660:di,9661:di,9664:wt,9674:ta,9733:[.19444,.69224,0,0,.94445],10003:ha,10016:ha,10731:ta,10846:[.19444,.75583,0,0,.61111],10877:_r,10878:_r,10885:bn,10886:bn,10887:Lt,10888:Lt,10889:Wi,10890:Wi,10891:Ta,10892:Ta,10901:_r,10902:_r,10933:Fn,10934:Fn,10935:Wi,10936:Wi,10937:Wi,10938:Wi,10949:bn,10950:bn,10955:Gi,10956:Gi,57350:$i,57351:ra,57352:un,57353:Ma,57356:Fn,57357:Fn,57358:vi,57359:Sr,57360:Sr,57361:vi,57366:Fn,57367:Fn,57368:Fn,57369:Fn,57370:Lt,57371:Lt},"Caligraphic-Regular":{32:kr,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:kr},"Fraktur-Regular":{32:kr,33:[0,.69141,0,0,.29574],34:mn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Zi,41:Zi,42:[0,.62119,0,0,.27764],43:xa,44:Ya,45:xa,46:Ya,47:[.24982,.74947,0,0,.50181],48:Ba,49:Ba,50:Ba,51:ki,52:ki,53:ki,54:Rt,55:ki,56:Rt,57:ki,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:Tt,93:Tt,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:kr,8216:mn,8217:mn,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:kr,33:[0,.69444,0,0,.35],34:Nt,35:[.19444,.69444,0,0,.95833],36:Tn,37:[.05556,.75,0,0,.95833],38:Gr,39:Yr,40:$n,41:$n,42:[0,.75,0,0,.575],43:Oe,44:[.19444,.15556,0,0,.31944],45:al,46:[0,.15556,0,0,.31944],47:li,48:Qn,49:Qn,50:Qn,51:Qn,52:Qn,53:Qn,54:Qn,55:Qn,56:Qn,57:Qn,58:Ve,59:[.19444,.44444,0,0,.31944],60:Or,61:Cr,62:Or,63:[0,.69444,0,0,.54305],64:Gr,65:gi,66:[0,.68611,0,0,.81805],67:vt,68:[0,.68611,0,0,.88194],69:an,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:ci,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:qe,77:[0,.68611,0,0,1.09166],78:ci,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:gi,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Mi,92:li,93:Mi,94:Yi,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Vi,99:sa,100:Vi,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Vi,105:Yr,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Yr,109:[0,.44444,0,0,.95833],110:Fi,111:nt,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:Fi,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:sa,123:li,124:Mi,125:li,126:[.35,.34444,0,0,.575],160:kr,163:[0,.69444,0,0,.86853],168:Yi,172:[0,.44444,0,0,.76666],176:Ue,177:Oe,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Oe,216:[.04861,.73472,0,0,.89444],223:ja,230:[0,.44444,0,0,.83055],247:Oe,248:[.09722,.54167,0,0,.575],305:Ve,338:[0,.68611,0,0,1.16944],339:mr,567:[.19444,.44444,0,0,.35139],710:Yi,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Yi,715:Yi,728:Yi,729:Yr,730:Ue,732:Yi,733:Yi,915:qe,916:Jn,920:St,923:Pn,926:Ut,928:ci,931:vt,933:St,934:vt,936:St,937:vt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Yr,8217:Yr,8220:Nt,8221:Nt,8224:wn,8225:wn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Zt,8465:Ln,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Ln,8501:Ge,8592:br,8593:Br,8594:br,8595:Br,8596:br,8597:li,8598:hr,8599:hr,8600:hr,8601:hr,8636:br,8637:br,8640:br,8641:br,8656:br,8657:Wn,8658:br,8659:Wn,8660:br,8661:[.25,.75,0,0,.70277],8704:Vi,8706:[0,.69444,.06389,0,.62847],8707:Vi,8709:Tn,8711:Jn,8712:ar,8715:ar,8722:Oe,8723:Oe,8725:li,8726:li,8727:Ft,8728:$r,8729:$r,8730:[.18,.82,0,0,.95833],8733:mr,8734:[0,.44444,0,0,1.14999],8736:Je,8739:Mi,8741:li,8743:gr,8744:gr,8745:gr,8746:gr,8747:[.19444,.69444,.12778,0,.56875],8764:Cr,8768:[.19444,.69444,0,0,.31944],8771:Er,8776:[.02444,.52444,0,0,.89444],8781:Er,8801:Er,8804:Fr,8805:Fr,8810:He,8811:He,8826:Or,8827:Or,8834:Or,8835:Or,8838:Fr,8839:Fr,8846:gr,8849:Fr,8850:Fr,8851:gr,8852:gr,8853:Oe,8854:Oe,8855:Oe,8856:Oe,8857:Oe,8866:Ge,8867:Ge,8868:Gr,8869:Gr,8900:$r,8901:[-.02639,.47361,0,0,.31944],8902:Ft,8968:Et,8969:Et,8970:Et,8971:Et,8994:dn,8995:dn,9651:In,9657:Ft,9661:In,9667:Ft,9711:hr,9824:zn,9825:zn,9826:zn,9827:zn,9837:[0,.75,0,0,.44722],9838:or,9839:or,10216:$n,10217:$n,10815:ci,10927:Fr,10928:Fr,57376:De},"Main-BoldItalic":{32:kr,33:[0,.69444,.11417,0,.38611],34:jr,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:ti,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:jn,49:jn,50:jn,51:jn,52:_n,53:jn,54:jn,55:_n,56:jn,57:jn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:ni,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:cr,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:cr,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:ur,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:fr,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:fr,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:kr,168:[0,.69444,.11473,0,.59111],176:yi,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:Hr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Hr,567:[.19444,.44444,.04611,0,.385],710:ur,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:ti,730:yi,732:ni,733:ni,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:cr,931:[0,.68611,.11431,0,.82666],933:fi,934:[0,.68611,.05632,0,.82666],936:fi,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:ti,8217:ti,8220:[0,.69444,.16772,0,.62055],8221:jr},"Main-Italic":{32:kr,33:oi,34:Ui,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:oi,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:Ci,49:Ci,50:Ci,51:Ci,52:Oi,53:Ci,54:Ci,55:Oi,56:Ci,57:Ci,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:pa,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:ii,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:ii,79:ka,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:ii,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:Ha,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:Ni,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:Ni,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:kr,168:[0,.66786,.10474,0,.51111],176:Aa,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:la,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:la,710:Ha,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:Aa,732:[0,.66786,.11585,0,.51111],733:pa,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:ka,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:ii,931:[0,.68333,.12028,0,.71555],933:Pa,934:[0,.68333,.05986,0,.71555],936:Pa,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:oi,8217:oi,8220:[0,.69444,.1685,0,.51444],8221:Ui,8463:ea},"Main-Regular":{32:kr,33:ca,34:Hi,35:Oo,36:Ho,37:ya,38:ia,39:ca,40:bi,41:bi,42:ma,43:wa,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Xa,48:zi,49:zi,50:zi,51:zi,52:zi,53:zi,54:zi,55:zi,56:zi,57:zi,58:Wa,59:[.19444,.43056,0,0,.27778],60:Rn,61:ln,62:Rn,63:Qa,64:ia,65:_a,66:[0,.68333,0,0,.70834],67:po,68:[0,.68333,0,0,.76389],69:ho,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:_a,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:So,76:to,77:[0,.68333,0,0,.91667],78:_a,79:So,80:ho,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:po,85:_a,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:_a,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Ra,92:Xa,93:Ra,94:Hi,95:[.31,.12056,.02778,0,.5],97:Ei,98:yo,99:Xi,100:yo,101:Xi,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:yo,105:Ki,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:ca,109:[0,.43056,0,0,.83334],110:Ja,111:Ei,112:ua,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:Ja,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:Xi,123:Xa,124:Ra,125:Xa,126:[.35,.31786,0,0,.5],160:kr,163:[0,.69444,0,0,.76909],167:lo,168:so,172:[0,.43056,0,0,.66667],176:ro,177:wa,182:zo,184:fo,198:[0,.68333,0,0,.90278],215:wa,216:[.04861,.73194,0,0,.77778],223:Hi,230:[0,.43056,0,0,.72222],247:wa,248:[.09722,.52778,0,0,.5],305:Wa,338:[0,.68333,0,0,1.01389],339:aa,567:[.19444,.43056,0,0,.30556],710:Hi,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Hi,715:Hi,728:Hi,729:Ki,730:ro,732:so,733:Hi,915:to,916:Jo,920:So,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:_a,931:po,933:So,934:po,936:So,937:po,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:ca,8217:ca,8220:Hi,8221:Hi,8224:lo,8225:lo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:ea,8465:vo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:vo,8501:Uo,8592:Li,8593:Ao,8594:Li,8595:Ao,8596:Li,8597:Xa,8598:no,8599:no,8600:no,8601:no,8614:[.011,.511,0,0,1],8617:ao,8618:ao,8636:Li,8637:Li,8640:Li,8641:Li,8652:[.011,.671,0,0,1],8656:Li,8657:zo,8658:Li,8659:zo,8660:Li,8661:[.25,.75,0,0,.61111],8704:yo,8706:[0,.69444,.05556,.08334,.5309],8707:yo,8709:Ho,8711:Jo,8712:To,8715:To,8722:wa,8723:wa,8725:Xa,8726:Xa,8727:qo,8728:co,8729:co,8730:[.2,.8,0,0,.83334],8733:aa,8734:Lr,8736:Je,8739:Ra,8741:Xa,8743:va,8744:va,8745:va,8746:va,8747:[.19444,.69444,.11111,0,.41667],8764:ln,8768:[.19444,.69444,0,0,.27778],8771:qa,8773:[-.022,.589,0,0,1],8776:uo,8781:qa,8784:[-.133,.67,0,0,.778],8801:qa,8804:Lt,8805:Lt,8810:Po,8811:Po,8826:Rn,8827:Rn,8834:Rn,8835:Rn,8838:Lt,8839:Lt,8846:va,8849:Lt,8850:Lt,8851:va,8852:va,8853:wa,8854:wa,8855:wa,8856:wa,8857:wa,8866:Uo,8867:Uo,8868:ia,8869:ia,8872:[.249,.75,0,0,.867],8900:co,8901:[-.05555,.44445,0,0,.27778],8902:qo,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:ls,8969:ls,8970:ls,8971:ls,8994:Ss,8995:Ss,9136:Qo,9137:Qo,9651:Cs,9657:qo,9661:Cs,9667:qo,9711:no,9824:Ka,9825:Ka,9826:Ka,9827:Ka,9837:[0,.75,0,0,.38889],9838:ye,9839:ye,10216:bi,10217:bi,10222:Qo,10223:Qo,10229:[.011,.511,0,0,1.609],10230:ke,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:ke,10815:_a,10927:Lt,10928:Lt,57376:De},"Math-BoldItalic":{32:kr,48:nt,49:nt,50:nt,51:at,52:at,53:at,54:Qn,55:at,56:Qn,57:at,65:gi,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:fn,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:an,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:Zt,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:Kn,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:kr,915:[0,.68611,.15972,0,.65694],916:Jn,920:[0,.68611,.03194,0,.86722],923:Pn,926:[0,.68611,.07458,0,.84125],928:fn,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Ut,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:Kn,960:[0,.44444,.03704,0,.68241],961:gn,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:gn,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:kr,48:Ei,49:Ei,50:Ei,51:xn,52:xn,53:xn,54:zi,55:xn,56:zi,57:xn,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:sr,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:ir,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:Mn,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:kr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:ir,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:sr,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:Mn,960:[0,.43056,.03588,0,.57003],961:Xn,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:Xn,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:kr,33:[0,.69444,0,0,.36667],34:La,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:ji,40:Mr,41:Mr,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:Tr,49:Tr,50:Tr,51:Tr,52:Tr,53:Tr,54:Tr,55:Tr,56:Tr,57:Tr,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:xi,64:Vr,65:Vr,66:Vr,67:hi,68:si,69:[0,.69444,0,0,.64167],70:Uo,71:Vr,72:si,73:[0,.69444,0,0,.33056],74:xi,75:Xr,76:$a,77:[0,.69444,0,0,.97778],78:si,79:si,80:hi,81:[.10556,.69444,0,0,.79445],82:hi,83:Uo,84:Vr,85:Xr,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Vr,89:[0,.69444,.0275,0,.73334],90:Ca,91:da,93:da,94:Tr,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ji,99:[0,.45833,0,0,.48889],100:Ji,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ji,105:Na,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Na,109:[0,.45833,0,0,.86667],110:Sa,111:[0,.45833,0,0,.55],112:Ua,113:Ua,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Sa,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:kr,168:Tr,176:Vr,180:Tr,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Tr,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Tr,729:ji,730:Vr,732:Tr,733:Tr,915:$a,916:[0,.69444,0,0,.91667],920:fa,923:Ca,926:Vr,928:si,931:si,933:fa,934:si,936:fa,937:si,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:ji,8217:ji,8220:La,8221:La},"SansSerif-Italic":{32:kr,33:[0,.69444,.05733,0,.31945],34:ps,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:Lo,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:Do,45:[0,.44444,.01946,0,.33333],46:Mo,47:[.25,.75,.13164,0,.5],48:Oa,49:Oa,50:Oa,51:Oa,52:Oa,53:Oa,54:Oa,55:Oa,56:Oa,57:Oa,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:Di,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:oo,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:bo,77:[0,.69444,.08094,0,.875],78:oo,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:$o,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:kr,168:[0,.67937,.06385,0,.5],176:cs,184:fo,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:$o,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:ss,715:Hi,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:cs,732:[0,.67659,.08826,0,.5],733:ss,915:[0,.69444,.13372,0,.54167],916:Dl,920:[0,.69444,.07555,0,.77778],923:Uo,926:[0,.69444,.12816,0,.66667],928:oo,931:[0,.69444,.11983,0,.72222],933:jo,934:[0,.69444,.04603,0,.72222],936:jo,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Lo,8217:Lo,8220:[0,.69444,.14205,0,.5],8221:ps},"SansSerif-Regular":{32:kr,33:[0,.69444,0,0,.31945],34:Hi,35:Oo,36:Ho,37:ya,38:[0,.69444,0,0,.75834],39:ca,40:bi,41:bi,42:ma,43:wa,44:Do,45:[0,.44444,0,0,.33333],46:Mo,47:Xa,48:Da,49:Da,50:Da,51:Da,52:Da,53:Da,54:Da,55:Da,56:Da,57:Da,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Qa,64:Di,65:Di,66:Di,67:Vi,68:[0,.69444,0,0,.72223],69:ja,70:[0,.69444,0,0,.56945],71:Di,72:Go,73:ca,74:Qa,75:[0,.69444,0,0,.69445],76:bo,77:[0,.69444,0,0,.875],78:Go,79:[0,.69444,0,0,.73611],80:Vi,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:yo,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:Di,89:[0,.69444,.025,0,.66667],90:Uo,91:Fo,93:Fo,94:Hi,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Ko,99:Es,100:Ko,101:Es,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Ko,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:Bs,111:[0,.44444,0,0,.5],112:Sl,113:Sl,114:[0,.44444,.01389,0,.34167],115:al,116:[0,.57143,0,0,.36111],117:Bs,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:kr,168:[0,.67937,0,0,.5],176:Di,184:fo,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Hi,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Hi,715:Hi,728:Hi,729:[0,.67937,0,0,.27778],730:Di,732:[0,.67659,0,0,.5],733:Hi,915:bo,916:Dl,920:ia,923:Uo,926:Di,928:Go,931:vo,933:ia,934:vo,936:ia,937:vo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:ca,8217:ca,8220:Hi,8221:Hi},"Script-Regular":{32:kr,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:kr},"Size1-Regular":{32:kr,40:Mc,41:Mc,47:Bl,91:Ls,92:Bl,93:Ls,123:dl,125:dl,160:kr,710:Fs,732:Fs,770:Fs,771:Fs,8214:[-99e-5,.601,0,0,.77778],8593:Fl,8595:Fl,8657:Al,8659:Al,8719:zs,8720:zs,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:$s,8748:us,8749:us,8750:$s,8896:es,8897:es,8898:es,8899:es,8968:Gs,8969:Gs,8970:Gs,8971:Gs,9168:Za,10216:Gs,10217:Gs,10752:Ys,10753:Ys,10754:Ys,10756:es,10758:es},"Size2-Regular":{32:kr,40:ol,41:ol,47:fs,91:Fa,92:fs,93:Fa,123:ts,125:ts,160:kr,710:Os,732:Os,770:Os,771:Os,8719:Wo,8720:Wo,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:ml,8748:Us,8749:Us,8750:ml,8896:Co,8897:Co,8898:Co,8899:Co,8968:gl,8969:gl,8970:gl,8971:gl,10216:sl,10217:sl,10752:Hs,10753:Hs,10754:Hs,10756:Co,10758:Co},"Size3-Regular":{32:kr,40:jl,41:jl,47:Cl,91:fl,92:Cl,93:fl,123:El,125:El,160:kr,710:za,732:za,770:za,771:za,8730:[.95003,1.45,0,0,1],8968:Ii,8969:Ii,8970:Ii,8971:Ii,10216:El,10217:El},"Size4-Regular":{32:kr,40:eo,41:eo,47:ns,91:hl,92:ns,93:hl,123:kc,125:kc,160:kr,710:Gl,732:Gl,770:Gl,771:Gl,8730:[1.25003,1.75,0,0,1],8968:_c,8969:_c,8970:_c,8971:_c,9115:Yl,9116:ms,9117:Yl,9118:Yl,9119:ms,9120:Yl,9121:fc,9122:Za,9123:fc,9124:fc,9125:Za,9126:fc,9127:vl,9128:Rc,9129:Xl,9130:[0,.3,0,0,.88889],9131:vl,9132:Rc,9133:Xl,9143:[.88502,.915,0,0,1.05556],10216:kc,10217:kc,57344:Nc,57345:Nc,57680:zl,57681:zl,57682:zl,57683:zl},"Typewriter-Regular":{32:Ds,33:_i,34:_i,35:_i,36:Xs,37:Xs,38:_i,39:_i,40:Xs,41:Xs,42:[0,.52083,0,0,.525],43:au,44:[.13889,.125,0,0,.525],45:au,46:[0,.125,0,0,.525],47:Xs,48:_i,49:_i,50:_i,51:_i,52:_i,53:_i,54:_i,55:_i,56:_i,57:_i,58:xo,59:[.13889,.43056,0,0,.525],60:ou,61:[-.19549,.41562,0,0,.525],62:ou,63:_i,64:_i,65:_i,66:_i,67:_i,68:_i,69:_i,70:_i,71:_i,72:_i,73:_i,74:_i,75:_i,76:_i,77:_i,78:_i,79:_i,80:_i,81:[.13889,.61111,0,0,.525],82:_i,83:_i,84:_i,85:_i,86:_i,87:_i,88:_i,89:_i,90:_i,91:Xs,92:Xs,93:Xs,94:_i,95:[.09514,0,0,0,.525],96:_i,97:xo,98:_i,99:xo,100:_i,101:xo,102:_i,103:Ai,104:_i,105:_i,106:[.22222,.61111,0,0,.525],107:_i,108:_i,109:xo,110:xo,111:xo,112:Ai,113:Ai,114:xo,115:xo,116:[0,.55358,0,0,.525],117:xo,118:xo,119:xo,120:xo,121:Ai,122:xo,123:Xs,124:Xs,125:Xs,126:_i,127:_i,160:Ds,176:_i,184:[.19445,0,0,0,.525],305:xo,567:Ai,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:_i,715:_i,728:_i,730:_i,770:_i,771:_i,776:_i,915:_i,916:_i,920:_i,923:_i,926:_i,928:_i,931:_i,933:_i,934:_i,936:_i,937:_i,8216:_i,8217:_i,8242:_i,9251:[.11111,.21944,0,0,.525]}},cd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,hc=10,qs=.25,su=1.2,Ml=.431,Fu={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Ml,Ml,Ml],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:[qs,qs,qs],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]},wu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jl=5,Bc={"\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 ql(a,y){a===void 0&&(a=77);const b=Js[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 Bc)a=Bc[E].codePointAt(0);else if(cd.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 lu={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]},Lc={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]},Su={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 Ql(a){if(Lc[a]){const[Se,Ae,We]=Lc[a],dt=`<span class="stretchy" style="height:${We}em"><svg width="100%" height="${We}em" viewBox="0 0 ${Se} ${Ae}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Su[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*We/2)/100}em;min-width:0">${dt}</span>`}const[y,b,E,ee]=lu[a];let re,oe;const pe=E/1e3;y.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],oe=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(re=["slice-1-of-2","slice-2-of-2"],oe=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],oe=[ee]);const be=y.map((Se,Ae)=>`<span class="${re[Ae]}" style=height:${pe}em><svg width=400em height=${pe}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${oe[Ae]} slice"><path fill="currentcolor" d="${Su[Se]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${pe}em;min-width:${b}em;">${be}</span>`}function zu(a){return lu[a]?lu[a][2]/1e3:Lc[a][2]}function Hu(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,oe=ee-56320;E=iu(2,16)+re*iu(2,10)+oe,b++}}y.push(E)}return y}var cu=8205,Dc=[[cu,1],[65038,2],[127995,5],[129456,4],[917536,96]],Tl,Ac=[127462,127487];function Tc(a){var y;if(Tl===void 0){Tl={};for(const b of Dc)for(let E=b[0];E<=b[0]+b[1]-1;E++)Tl[E]=!0}return(y=Tl[a])!=null?y:!1}function ud(a){return a>=Ac[0]&&a<=Ac[1]}function Ku(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=Hu(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===cu){const oe=E-1;for(E+=2;b[E]===cu;)E+=2;y.push(String.fromCodePoint(...b.slice(oe,E-oe+1)))}else if(Tc(re)){const oe=E-1;for(;Tc(b[E]);)E+=b[E]===cu?2:1;y.push(String.fromCodePoint(...b.slice(oe,2*E-oe-1)))}else ud(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var dd=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=Ku(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 pc(a,y){var b,E,ee,re;const oe=[];let pe=a.next();if(pe&&pe!=="\\relax"){if(pe==="\\noexpand")pe=a.next(),pe&&oe.push(pe);else if(pe==="\\obeyspaces")a.obeyspaces=!0;else if(pe==="\\bgroup")oe.push("<{>");else if(pe==="\\egroup")oe.push("<}>");else if(pe==="\\string"){if(pe=a.next(),pe)if(pe.startsWith("\\"))for(const be of pe)oe.push(be==="\\"?"\\backslash":be);else pe==="<{>"?oe.push("\\{"):pe==="<space>"?oe.push("~"):pe==="<}>"&&oe.push("\\}")}else if(pe==="\\csname"){for(;a.peek()==="<space>";)a.next();let be="",Se=!1,Ae=[];do{if(Ae.length===0)if(/^#[\d?@]$/.test(a.peek())){const We=a.get().slice(1);Ae=ec((E=(b=y==null?void 0:y(We))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),pe=Ae[0]}else pe=a.next(),Ae=pe?[pe]:[];Se=Ae.length===0,!Se&&pe==="\\endcsname"&&(Se=!0,Ae.shift()),Se||(Se=pe==="<$>"||pe==="<$$>"||pe==="<{>"||pe==="<}>"||typeof pe=="string"&&pe.length>1&&pe.startsWith("\\")),Se||(be+=Ae.shift())}while(!Se);be&&oe.push("\\"+be),oe.push(...Ae)}else if(pe!=="\\endcsname")if(pe.length>1&&pe.startsWith("#")){const be=pe.slice(1);oe.push(...ec((re=(ee=y==null?void 0:y(be))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else oe.push(pe)}return oe}function ec(a,y=null){const b=[];let E="";for(const oe of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const pe=oe.match(/((?:\\%)|[^%])*/);pe!==null&&b.push(pe[0])}const ee=new dd(Qe(b.join(""))),re=[];do re.push(...pc(ee,y));while(!ee.end());return re}function io(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 Ro(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:io([a,...y.map(b=>`{${b}}`)])}function tc(a){return io(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var fd=class xf{constructor(y){xf._registry[y]=this}static createAtom(y,b,E){return xf._registry[y].createAtom(b,sn(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 Wu(y)){const oe=xf._registry[re[0].mode];ee.push(...oe.serialize(re,b))}return io(ee)}return io(Zu(y,b))}static getFont(y,b,E){return xf._registry[y].getFont(b,E)}};fd._registry={};var ll=fd;function Wu(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 ys(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let oe;y==="variant"?(oe=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(oe+="-"+re.style.variantStyle)):oe=re.style[y],oe===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=oe)}return E.length>0&&b.push(E),b}function uu(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const oe of Wu(a)){const pe=y.defaultMode;for(const be of ys(oe,"color")){const Se=be[0].computedStyle,Ae=ll._registry[be[0].mode].serialize(be,ge(we({},y),{defaultMode:pe==="text"?"text":"math"}));!y.skipStyles&&Se.color&&Se.color!=="none"&&(!E||ee!==Se.color)?re.push(Ro("\\textcolor",(b=Se.verbatimColor)!=null?b:Se.color,io(Ae))):re.push(io(Ae))}}return re}function Fd(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return ys(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const oe=ee[0].computedStyle;if(oe.backgroundColor&&oe.backgroundColor!=="none"&&(!b||E!==oe.backgroundColor))return Ro("\\colorbox",(re=oe.verbatimBackgroundColor)!=null?re:oe.backgroundColor,io(uu(ee,ge(we({},y),{defaultMode:"text"}))))}return io(uu(ee,y))})}function Zu(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 ys(a,"fontSize")){const oe=re[0].computedStyle.fontSize,pe=Fd(re,y);pe&&(oe&&oe!=="auto"&&(!b||E!==oe)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][oe],...pe):ee.push(...pe))}return ee}function Cu(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 Fc(a){if(a.length===0)return"ord";const y=Cu(a[0].type),b=Cu(a[a.length-1].type);return y&&y===b?y:"ord"}function mc(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 qr=class Ep{constructor(y,b){var E,ee,re,oe,pe;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Re(y)?this.children=y.filter(Se=>Se!==null):y&&y instanceof Ep&&(this.children=[y]),this.children)for(const Se of this.children)Se.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 be=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(be=(pe=ll.getFont((oe=b.mode)!=null?oe:"math",this,ge(we({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?pe:void 0),be||(be="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),fu(this,be)}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=mc(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=mc(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"]=mc(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"]=mc(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"]=mc(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=cn(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 Pt of this.children)re+=Pt.toMarkup();let oe="";if(this.svgBody)oe=Ql(this.svgBody);else if(this.svgOverlay){oe='<span style="',oe+="display: inline-block;",oe+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,oe+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,oe+='">',oe+=re,oe+="</span>",oe+='<svg style="position:absolute;overflow:visible;',oe+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const Pt=(b=this.cssProperties)==null?void 0:b.padding;Pt?(oe+=`top:${Pt};`,oe+=`left:${Pt};`,oe+=`width:calc(100% - 2 * ${Pt} );`):oe+="top:0;left:0;width:100%;",oe+="z-index:2;",oe+='"',this.svgStyle&&(oe+=this.svgStyle),oe+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,oe+=`>${this.svgOverlay}</svg>`}let pe="";const be=this.classes.split(" ");be.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&be.push("ML__latex-caret"),this.isSelected&&be.push("ML__selected");const Se=be.length===1?be[0]:be.filter((Pt,Kt,Yn)=>Pt.length>0&&Yn.indexOf(Pt)===Kt).join(" ");if(Se.length>0&&(pe+=` class="${Se}"`),this.id&&(pe+=` data-atom-id=${this.id}`),this.cssId&&(pe+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(pe+=" "+Object.keys(this.attributes).map(Pt=>`${Pt}="${this.attributes[Pt]}"`).join(" ")),this.htmlData){const Pt=this.htmlData.split(",");for(const Kt of Pt){const Yn=Kt.match(/([^=]+)=(.+$)/);if(Yn){const Qr=Yn[1].trim().replace(/ /g,"-");Qr&&(pe+=` data-${Qr}="${Yn[2]}" `)}else{const Qr=Kt.trim().replace(/ /g,"-");Qr&&(pe+=` data-${Qr} `)}}}const Ae=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&Ae.width===void 0&&(Ae.width=`${Math.ceil(this._width*100)/100}em`);const We=Object.keys(Ae).map(Pt=>`${Pt}:${Ae[Pt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||oe.length>0)&&We.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const Pt=this.htmlStyle.split(";");let Kt="";for(const Yn of Pt){const Qr=Yn.match(/([^=]+):(.+$)/);if(Qr){const Un=Qr[1].trim().replace(/ /g,"-");Un&&(Kt+=`${Un}:${Qr[2]};`)}}Kt&&(pe+=` style="${Kt}"`)}We.length>0&&(pe+=` style="${We.join(";")}"`);let dt="";return pe.length>0||oe.length>0?dt=`<span${pe}>${re}${oe}</span>`:dt=re,this.caret==="text"?dt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(dt+='<span class="ML__caret"></span>'),dt}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 be of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&be in y.cssProperties||this.cssProperties&&be 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 be of Object.keys(this.cssProperties))if(this.cssProperties[be]!==y.cssProperties[be])return!1}const oe=this.classes.trim().replace(/\s+/g," ").split(" "),pe=y.classes.trim().replace(/\s+/g," ").split(" ");if(oe.length!==pe.length)return!1;oe.sort(),pe.sort();for(const[be,Se]of oe.entries())if(Se==="vertical-separator"||Se!==pe[be])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 Vu(a){if(!a||a.length===0)return[];a[0].children=Vu(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=Vu(a[b].children),y.push(a[b]));return y}function Eu(a){return a.children&&(a.children=Vu(a.children)),a}function du(a,y){if(!a)return new qr(null,y);const b=new qr(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 qr(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 qr(E,ge(we({},y),{type:"lift"}))}function Il(a){const y=zu(a)/2,b=new qr(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function fu(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=ql(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 oe of a.children)oe.height>E&&(E=oe.height),oe.depth>ee&&(ee=oe.depth),re=Math.max(re,(b=oe.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((oe,pe)=>oe+pe.width,0),a.maxFontSize=re}}function Mu(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 oe=1;oe<y.length;oe++){const pe=y[oe],be=-pe.shift-re-pe.box.depth,Se=be-(b.box.height+b.box.depth);re=re+be,E.push(Se),E.push(pe),b=pe}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 zc(a){var y;const[b,E]=Mu(a);if(!b)return[[],0,0];const ee=new qr(null,{classes:"pstrut"});let re=0;for(const Kt of b)if(typeof Kt!="number"){const Yn=Kt.box;re=Math.max(re,Yn.maxFontSize,Yn.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const oe=[];let pe=E,be=E,Se=E,Ae=0;for(const Kt of b){if(typeof Kt=="number")Se+=Kt;else{const Yn=Kt.box,Qr=(y=Kt.classes)!=null?y:[],Un=new qr([ee,Yn],{classes:Qr.join(" "),style:Kt.style});Yn.setStyle("height",Yn.height+Yn.depth,"em"),Yn.setStyle("display","inline-block"),Un.setStyle("top",-re-Se-Yn.depth,"em"),Kt.marginLeft&&Un.setStyle("margin-left",Kt.marginLeft,"em"),Kt.marginRight&&Un.setStyle("margin-right",Kt.marginRight,"em"),oe.push(Un),Se+=Yn.height+Yn.depth,Ae=Math.max(Ae,Un.width)}pe=Math.min(pe,Se),be=Math.max(be,Se)}oe.forEach(Kt=>{Kt.softWidth=Ae});const We=new qr(oe,{classes:"vlist"});if(We.softWidth=Ae,We.height=be,We.setStyle("height",be,"em"),pe>=0)return[[new qr(We,{classes:"vlist-r"})],be,-pe];const dt=new qr(new qr(null),{classes:"vlist"});dt.height=-pe,dt.setStyle("height",-pe,"em");const Pt=new qr(8203,{classes:"vlist-s",maxFontSize:0});return Pt.softWidth=0,Pt.height=0,Pt.depth=0,[[new qr([We,Pt],{classes:"vlist-r"}),new qr(dt,{classes:"vlist-r"})],be,-pe]}var Zo=class extends qr{constructor(a,y){var b;const[E,ee,re]=zc(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((oe,pe)=>Math.max(oe,pe.width),0)}};function zd(a,y){var b,E,ee,re,oe;const pe=a.metrics,be=new qr(y.base),Se=(b=y.baseShift)!=null?b:0,Ae=(E=y.slant)!=null?E:0;let We=0,dt=0;y.above&&(We=(ee=y.aboveShift)!=null?ee:Math.max(pe.bigOpSpacing1,pe.bigOpSpacing3-y.above.depth)),y.below&&(dt=(re=y.belowShift)!=null?re:Math.max(pe.bigOpSpacing2,pe.bigOpSpacing4-y.below.height));let Pt=null;if(y.below&&y.above){const Kt=pe.bigOpSpacing5+y.below.height+y.below.depth+dt+be.depth+Se;Pt=new Zo({bottom:Kt,children:[pe.bigOpSpacing5,{box:y.below,marginLeft:-Ae,classes:["ML__center"]},dt,{box:be,classes:["ML__center"]},We,{box:y.above,marginLeft:Ae,classes:["ML__center"]},pe.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)Pt=new Zo({top:be.height-Se,children:[pe.bigOpSpacing5,{box:y.below,marginLeft:-Ae,classes:["ML__center"]},dt,{box:be,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const Kt=be.depth+Se;Pt=new Zo({bottom:Kt,children:[{box:be,classes:["ML__center"]},We,{box:y.above,marginLeft:Ae,classes:["ML__center"]},pe.bigOpSpacing5]}).wrap(a)}else{const Kt=be.depth+Se;Pt=new Zo({bottom:Kt,children:[{box:be},pe.bigOpSpacing5]}).wrap(a)}return new qr(Pt,{type:(oe=y.type)!=null?oe:"op"})}var ku=7,nc=6,Hc=5,rc=4,gc=3,Qs=2,yl=1,Ks=0,Pl=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(Fu).reduce((ee,re)=>ge(we({},ee),{[re]:Fu[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return $l[[Ks,yl,Ks,yl,Qs,gc,Qs,gc][this.id]]}get sub(){return $l[[Ks,Ks,Ks,Ks,Qs,Qs,Qs,Qs][this.id]]}get fracNum(){return $l[[Ks,yl,Ks,yl,Qs,gc,rc,Hc][this.id]]}get fracDen(){return $l[[Ks,Ks,Ks,Ks,Qs,Qs,rc,rc][this.id]]}get cramp(){return $l[[Ks,Ks,Qs,Qs,rc,rc,nc,nc][this.id]]}get isTight(){return this.sizeDelta<0}},vc={7:new Pl(ku,0,!1),6:new Pl(nc,0,!0),5:new Pl(Hc,0,!1),4:new Pl(rc,0,!0),3:new Pl(gc,-3,!1),2:new Pl(Qs,-3,!0),1:new Pl(yl,-4,!1),0:new Pl(Ks,-4,!0)},$l=ge(we({},vc),{displaystyle:vc[ku],textstyle:vc[Hc],scriptstyle:vc[gc],scriptscriptstyle:vc[yl]});function Kc(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:hc,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=iu(10,y);return Math.round(a.dimension/hc*E*ee)/ee}return a.dimension*E}function Uu(a,y){if(a===null)return 0;const b=Kc(a)/hc;if(Number.isFinite(y)){const E=iu(10,y);return Math.round(b*E)/E}return b}function ju(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function hd(a){let y=ju(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ju(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ju(a.shrink)}`),y}function gs(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=hd(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 Hl(a,y){return a==null?null:"number"in a?ge(we({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?ge(we({},a),{factor:a.factor*y}):ge(we({},a),{factor:y}):"dimension"in a?ge(we({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:Hl(a.glue,y),shrink:Hl(a.shrink,y),grow:Hl(a.grow,y)}:a.shrink?{glue:Hl(a.glue,y),shrink:Hl(a.shrink,y)}:a.grow?{glue:Hl(a.glue,y),grow:Hl(a.grow,y)}:{glue:Hl(a.glue,y)}:null}var Hd={"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 yc(){return we({},Hd)}function Ol(){return{registers:yc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:it.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:lt,backgroundColorMap:Ze,getMacro:a=>tr(a,dr())}}var mo=class Mp{constructor(y,b){var E,ee,re,oe,pe,be,Se,Ae,We,dt,Pt,Kt,Yn,Qr,Un;let Ar;y!=null&&y.parent?(this.parent=y.parent,Ar=y.parent,this.registers={}):(Ar=we(we({},Ol()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=Ar.registers),Ar.atomIdsSettings&&(this.atomIdsSettings=we({},Ar.atomIdsSettings)),this.renderPlaceholder=Ar.renderPlaceholder,this.isPhantom=(oe=(re=y==null?void 0:y.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?oe:!1,this.letterShapeStyle=Ar.letterShapeStyle,this.minFontScale=Ar.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(be=(pe=this.parent)==null?void 0:pe.color)!=null?be:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(Ae=(Se=this.parent)==null?void 0:Se.backgroundColor)!=null?Ae:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((We=this.parent)==null?void 0:We.size)?this.size=b.fontSize:this.size=(Pt=(dt=this.parent)==null?void 0:dt.size)!=null?Pt:Jl;let ri=(Yn=(Kt=this.parent)==null?void 0:Kt.mathstyle)!=null?Yn:$l.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(Ar instanceof Mp)switch(y.mathstyle){case"cramp":ri=ri.cramp;break;case"superscript":ri=ri.sup;break;case"subscript":ri=ri.sub;break;case"numerator":ri=ri.fracNum;break;case"denominator":ri=ri.fracDen;break}switch(y.mathstyle){case"textstyle":ri=$l.textstyle;break;case"displaystyle":ri=$l.displaystyle;break;case"scriptstyle":ri=$l.scriptstyle;break;case"scriptscriptstyle":ri=$l.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=ri,this.smartFence=Ar.smartFence,this.placeholderSymbol=Ar.placeholderSymbol,this.colorMap=(Qr=Ar.colorMap)!=null?Qr:Rr=>Rr,this.backgroundColorMap=(Un=Ar.backgroundColorMap)!=null?Un:Rr=>Rr,this.getMacro=Ar.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===ku||this.mathstyle.id===nc}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(wu[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 Uu(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?ge(we({},re),{dimension:E*re.dimension}):"glue"in re?ge(we({},re),{glue:ge(we({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?ge(we({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?ge(we({},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:Kc(E,b)/hc}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}},Wc=["body","above","below","superscript","subscript"];function Kl(a){return typeof a=="string"&&Wc.includes(a)}function Zc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var pr=class bu{constructor(y){var b,E,ee,re,oe,pe;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=we({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(oe=y.captureSelection)!=null?oe:!1,this.skipBoundary=(pe=y.skipBoundary)!=null?pe:!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=pd(b),oe=[];for(const be of re){const Se=be[0].style,Ae=md(y,be,{style:{color:Se.color,backgroundColor:Se.backgroundColor,fontSize:Se.fontSize}});Ae&&oe.push(Ae)}if(oe.length===0)return null;const pe=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return oe.length===1&&!pe&&!(E!=null&&E.type)?oe[0].wrap(y):new qr(oe,{classes:pe,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return ll.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 bu({type:"mord",value:y,mode:"math"}):new bu(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=we({},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=Gu(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=sn(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?io([Ro(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?io([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return ll.serialize(this.body,ge(we({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return ll.serialize(this.above,y)}belowToLatex(y){return ll.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=ge(we({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=ll.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=ll.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(Kl(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of Wc)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(Kl(y)),Kl(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 Zc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Zc(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=we(we({},(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=we(we({},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(Kl(b)),!Kl(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 bu({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(Kl(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 Wc)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=sn(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new mo({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,oe=this.subscript;if(!re&&!oe)return ee;let pe=null,be=null;const Se=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let Ae=0;if(re){const Yn=new mo({parent:y,mathstyle:"superscript"});pe=bu.createBox(Yn,re),Se||(Ae=ee.height-y.metrics.supDrop*Yn.scalingFactor)}let We=0;if(oe){const Yn=new mo({parent:y,mathstyle:"subscript"});be=bu.createBox(Yn,oe),Se||(We=ee.depth+y.metrics.subDrop*Yn.scalingFactor)}let dt;y.isDisplayStyle?dt=y.metrics.sup1:y.isCramped?dt=y.metrics.sup3:dt=y.metrics.sup2;const Pt=.5/hc/y.scalingFactor;let Kt=null;if(be&&pe){Ae=Math.max(Ae,dt,pe.depth+.25*y.metrics.xHeight),We=Math.max(We,y.metrics.sub2);const Yn=y.metrics.defaultRuleThickness;if(Ae-pe.depth-(be.height-We)<4*Yn){We=4*Yn-(Ae-pe.depth)+be.height;const Un=.8*y.metrics.xHeight-(Ae-pe.depth);Un>0&&(Ae+=Un,We-=Un)}const Qr=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;Kt=new Zo({individualShift:[{box:be,shift:We,marginLeft:Qr},{box:pe,shift:-Ae}]}).wrap(y)}else be&&!pe?(We=Math.max(We,y.metrics.sub1,be.height-.8*Ml),Kt=new Zo({shift:We,children:[{box:be,marginRight:Pt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!be&&pe&&(Ae=Math.max(Ae,dt,pe.depth+.25*Ml),Kt=new Zo({shift:-Ae,children:[{box:pe,marginRight:Pt}]}));return new qr([ee,new qr(Kt,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?bu.createBox(new mo({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?bu.createBox(new mo({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):zd(y,ge(we({},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,oe;const pe=(E=this.value)!=null?E:this.body,be=(ee=b==null?void 0:b.boxType)!=null?ee:Cu(this.type);let Se=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(Se+=" ML__text");const Ae=typeof pe=="string"||pe===void 0?new qr(pe!=null?pe:null,{type:be,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:ge(we({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:Se}):(oe=bu.createBox(y,pe,{type:be,classes:Se}))!=null?oe:new qr(null);return y.isTight&&(Ae.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(Ae.italic=0),Ae.right=Ae.italic,this.bind(y,Ae),this.caret&&!this.superscript&&!this.subscript&&(Ae.caret=this.caret),Ae}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 pd(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 md(a,y,b){var E,ee,re,oe,pe;if(!y||y.length===0)return null;const be=new mo({parent:a},b.style),Se=!((E=be.atomIdsSettings)!=null&&E.groupNumbers);let Ae=[];if(y.length===1){const dt=y[0],Pt=dt.render(be);Pt&&(Se&&dt.isSelected&&Pt.selected(!0),Ae=[Pt])}else{let dt="",Pt=!0;for(const Kt of y){(ee=be.atomIdsSettings)!=null&&ee.groupNumbers&&dt&&(Pt&&Kt.isDigit()||!Pt&&_u(Kt))&&(be.atomIdsSettings.overrideID=dt);const Yn=Kt.render(be);be.atomIdsSettings&&(be.atomIdsSettings.overrideID=void 0),Yn&&((re=be.atomIdsSettings)!=null&&re.groupNumbers&&((Kt.isDigit()||_u(Kt))&&(!dt||Pt!==Kt.isDigit())&&(Pt=Kt.isDigit(),dt=(oe=Kt.id)!=null?oe:""),dt&&(!(Kt.isDigit()||_u(Kt))||!Kt.hasEmptyBranch("superscript")||!Kt.hasEmptyBranch("subscript"))&&(dt="")),Se&&Kt.isSelected&&Yn.selected(!0),Ae.push(Yn))}}if(Ae.length===0)return null;const We=new qr(Ae,ge(we({isTight:be.isTight},b),{type:(pe=b.type)!=null?pe:"lift"}));return We.isSelected=Ae.every(dt=>dt.isSelected),We.wrap(be)}function _u(a){return a.mode==="text"}function Gu(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof pr?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var ic=class kp extends pr{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 kp(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:Zn("text",this.value.codePointAt(0))}};function hu(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&gd(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function gd(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function As(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 Wl(a){return typeof a=="number"&&!Number.isNaN(a)}function Lu(a){return Array.isArray(a)&&a.length===2}function Du(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ko(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 qi(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,oe=!1,pe=!1,be=!1,Se=!1,Ae=!1,We=!1,dt=!1,Pt=!1,Kt=!1,Yn=!1,Qr=!1,Un=a[0],Ar=0;for(;Un!=null&&Un.type&&/^(subsup|placeholder)$/.test(Un.type);)Ar+=1,Un=a[Ar];return b=!Un||Un.type==="first",Un&&(Yn=Un.mode==="text",E=!Yn&&Un.type==="mord"&&me.test(Un.value),ee=!Yn&&Un.type==="mord"&&/\d+$/.test(Un.value),re=!Yn&&Un.isFunction,oe=Un.type==="genfrac",pe=Un.type==="surd",be=Un.type==="mbin",Se=Un.type==="mrel",Ae=Un.type==="mop"||Un.type==="operator"||Un.type==="extensible-symbol",We=Un.type==="mpunct"||Un.type==="minner",dt=Un.type==="array",Pt=Un.type==="mopen",Kt=Un.type==="mclose"||Un.type==="leftright",Qr=Un.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")&&oe||y.after.includes("surd")&&pe||y.after.includes("binop")&&be||y.after.includes("relop")&&Se||y.after.includes("operator")&&Ae||y.after.includes("punct")&&We||y.after.includes("array")&&dt||y.after.includes("openfence")&&Pt||y.after.includes("closefence")&&Kt||y.after.includes("text")&&Yn||y.after.includes("space")&&Qr?y.value:""}function Ia(a,y,b){return b?qi(a,b[y]):""}var _o={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 Vo(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=bc(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",bs(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function bs(a,y){var b,E,ee;if(!a)return"";let re=!1,oe;const pe=(b=y.inlineShortcuts)!=null?b:_o;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(oe=Ws(a.slice(1),{inlineShortcuts:pe,noWrap:!0}),a=a[0]+"{"+oe.match+"}",a+=bs(oe.rest,y),re=!0),re||(oe=a.match(/^(sqrt|\u221A)(.*)/),oe&&(oe=Ws(oe[2],{inlineShortcuts:pe,noWrap:!0}),a="\\sqrt{"+((E=oe.match)!=null?E:"\\placeholder{}")+"}",a+=bs(oe.rest,y),re=!0)),re||(oe=a.match(/^(\\cbrt|\u221B)(.*)/),oe&&(oe=Ws(oe[2],{inlineShortcuts:pe,noWrap:!0}),a="\\sqrt[3]{"+((ee=oe.match)!=null?ee:"\\placeholder{}")+"}",a+=bs(oe.rest,y),re=!0)),re||(oe=a.match(/^abs(.*)/),oe&&(oe=Ws(oe[1],{inlineShortcuts:pe,noWrap:!0}),a="\\left|"+oe.match+"\\right|",a+=bs(oe.rest,y),re=!0)),re||(oe=a.match(/^["”“](.*?)["”“](.*)/),oe&&(a="\\text{"+oe[1]+"}",a+=bs(oe[2],y),re=!0)),re||(oe=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),oe&&(a=ac(oe[1],pe),a+=bs(oe[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(oe=Ws(a.slice(1),{inlineShortcuts:pe,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+oe.match+"\\right)":a[0]+oe.match,a+=bs(oe.rest,y),re=!0),re||(oe=a.match(/^([a-zA-Z]+)(.*)/),oe&&(a=ac(oe[1],pe),a+=bs(oe[2],y),re=!0)),!re)if(oe=Ws(a,{inlineShortcuts:pe,noWrap:!0}),oe.match&&oe.rest[0]==="/"){const be=Ws(oe.rest.slice(1),{inlineShortcuts:pe,noWrap:!0});be.match&&(a="\\frac{"+oe.match+"}{"+be.match+"}"+bs(be.rest,y)),re=!0}else oe.match&&(a=a.startsWith("(")?"\\left("+oe.match+"\\right)"+bs(oe.rest,y):oe.match+bs(oe.rest,y),re=!0);return re||(oe=a.match(/^(\s+)(.*)$/),oe&&(a=" "+bs(oe[2],y),re=!0)),a}function Ws(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let oe=1,pe=1;for(;pe<a.length&&oe>0;)a[pe]===ee&&oe++,a[pe]===re&&oe--,pe++;oe===0?(y.noWrap&&ee==="("?b=bs(a.substring(1,pe-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+bs(a.substring(1,pe-1),y)+"\\right"+re),E=a.slice(Math.max(0,pe))):(b=a.substring(1,pe),E="")}else{let oe=a.match(/^([a-zA-Z]+)/);if(oe){let pe=Ia(null,a,y.inlineShortcuts);if(pe)return pe=pe.replace("_{#?}",""),pe=pe.replace("^{#?}",""),{match:pe,rest:a.slice(pe.length)}}if(oe=a.match(/^([a-zA-Z])/),oe)return{match:oe[1],rest:a.slice(1)};if(oe=a.match(/^(-)?\d+(\.\d*)?/),oe)return{match:oe[0],rest:a.slice(oe[0].length)};/^\\(left|right)/.test(a)||(oe=a.match(/^(\\[a-zA-Z]+)/),oe&&(E=a.slice(oe[1].length),b=oe[1]))}return{match:b,rest:E}}function ac(a,y){let b=Ia(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var Zl=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function kl(a){const y=a.trim();for(const b of Zl)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 bc(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=kl(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 pl="$$",oh="$$",sh=(a,y,b)=>(Zl.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${pl} ${y} ${oh}`),y),wf=class ah{constructor(y){ah._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 oe=new DataTransfer;oe.setData("text/plain",E),E=oe}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=b.host)!=null&&ee.dispatchEvent(re)?ah._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]:As(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]:As(ee.selection);let oe=ee.getAtoms(re);if(oe.every(pe=>pe.mode==="text"||!pe.mode))b.clipboardData.setData("text/plain",oe.filter(pe=>pe instanceof ic).map(pe=>pe.value).join(""));else if(oe.every(pe=>pe.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(pe=>{var be;return(be=pe.value)!=null?be:""}).join(""));else{let pe;oe.length===1&&oe[0].verbatimLatex!==void 0?pe=oe[0].verbatimLatex:pe=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",pe);try{b.clipboardData.setData("text/plain",y.options.onExport(y,pe,re))}catch(be){}if(oe.length===1){const be=oe[0];(be.type==="root"||be.type==="group")&&(oe=be.body.filter(Se=>Se.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(oe.map(be=>be.toJson())))}catch(be){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const be=window.MathfieldElement.computeEngine;if(be)try{const Se=be.jsonSerializationOptions;be.jsonSerializationOptions={metadata:["latex"]};const Ae=be.parse(ee.getValue(re,"latex-unstyled"));be.jsonSerializationOptions=Se;const We=JSON.stringify(Ae.json);We&&b.clipboardData.setData("application/json",We)}catch(Se){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return ah._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};wf._modes={};var Va=wf,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","^"]}],Kd={"\\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 oc(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function sc(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 Vc(a){const y=sc(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function Wd(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 Zd(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,oe=Math.ceil(y.left-E.left+a.field.scrollLeft*b),pe=Math.ceil(y.top-E.top);return{left:oe,right:oe+ee,top:pe,bottom:pe+re}}function Vd(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=Vd(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 Au(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?Vd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function Sf(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,oe=re.offsetWidth;let be=Math.floor(re.getBoundingClientRect().width)/oe;be=isNaN(be)?1:be;const Se=Zd(a,Au(a,ee),be);if(Se){const Ae=Wd(ee);if(E.has(Ae)){const We=E.get(Ae);E.set(Ae,{left:Math.min(We.left,Se.left),right:Math.max(We.right,Se.right),top:Math.min(We.top,Se.top),bottom:Math.max(We.bottom,Se.bottom)})}else E.set(Ae,Se)}}return[...E.values()]}function Ud(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...Sf(a,E,y)),[])}function jd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function vd(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 Cf=`@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;
}
`,Yo=`.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);
}
`,Ef=`#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;
}
`,Tu=`/* 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));
}
`,yd=`: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;
}
`,rs;function pu(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=Yo;break;case"mathfield":y=Cf;break;case"environment-popover":y=Ef;break;case"suggestion-popover":y=ch;break;case"keystroke-caption":y=Tu;break;case"virtual-keyboard":y=uh;break;case"ui":y=yd;break;case"menu":y=dh;break;default:debugger}return y}function Iu(a){return rs||(rs={}),rs[a]||(rs[a]=new CSSStyleSheet,rs[a].replaceSync(pu(a))),rs[a]}var Ic;function Vl(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(pu(a))),window.document.head.appendChild(b);return}if(Ic||(Ic={}),((y=Ic[a])!=null?y:0)!==0)Ic[a]+=1;else{const b=Iu(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],Ic[a]=1}}function x(a){if("adoptedStyleSheets"in document&&Ic!=null&&Ic[a]&&(Ic[a]-=1,Ic[a]<=0)){const y=rs[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class _p extends pr{constructor(y){var b;super(ge(we({},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 _p(y)}toJson(){return ge(we({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new mo({parent:y,mathstyle:"cramp"},this.style),ee=(b=pr.createBox(E,this.body))!=null?b:new qr("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let oe=Math.min(ee.height,Ml),pe;if(this.svgAccent)pe=Il(this.svgAccent),oe=E.metrics.bigOpSpacing1-oe;else if(this.accent){const Se=new qr(this.accent,{fontFamily:"Main-Regular"});Se.italic=0;const Ae=this.accent===8407?" ML__accent-vec":"";pe=new qr(new qr(Se),{classes:"ML__accent-body"+Ae})}pe=new Zo({shift:0,children:[{box:new qr(ee)},-oe,{box:pe,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const be=new qr(pe,{type:"lift"});return this.caret&&(be.caret=this.caret),this.bind(E,be.wrap(E)),this.attachSupsub(E,{base:be})}},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 oe=new qr(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&oe.setTop((1-y.scalingFactor)*qs),oe}function xe(a,y,b,E,ee){var re,oe;const pe=new mo({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),be=new qr(ie(a),{fontFamily:`Size${y}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${y}`,type:(oe=ee.type)!=null?oe:"ignore"}).wrap(pe);return b&&be.setTop((1-pe.scalingFactor)*qs),be}function Pe(a,y,b,E,ee){var re;let oe,pe,be,Se;oe=be=Se=ie(a),pe=null;let Ae="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?be=oe=Se=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?be=oe=Se=8741:a==="\\uparrow"?be=Se=9168:a==="\\Uparrow"?be=Se=8214:a==="\\downarrow"?oe=be=9168:a==="\\Downarrow"?oe=be=8214:a==="\\updownarrow"?(oe=8593,be=9168,Se=8595):a==="\\Updownarrow"?(oe=8657,be=8214,Se=8659):a==="["||a==="\\lbrack"?(oe=9121,be=9122,Se=9123,Ae="Size4-Regular"):a==="]"||a==="\\rbrack"?(oe=9124,be=9125,Se=9126,Ae="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(be=oe=9122,Se=9123,Ae="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(oe=9121,be=Se=9122,Ae="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(be=oe=9125,Se=9126,Ae="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(oe=9124,be=Se=9125,Ae="Size4-Regular"):a==="("||a==="\\lparen"?(oe=9115,be=9116,Se=9117,Ae="Size4-Regular"):a===")"||a==="\\rparen"?(oe=9118,be=9119,Se=9120,Ae="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(oe=9127,pe=9128,Se=9129,be=9130,Ae="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(oe=9131,pe=9132,Se=9133,be=9130,Ae="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(oe=9127,Se=9129,be=9130,Ae="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(oe=9131,Se=9133,be=9130,Ae="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(oe=9127,Se=9133,be=9130,Ae="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(oe=9131,Se=9129,be=9130,Ae="Size4-Regular"):a==="\\surd"?(oe=57345,Se=9143,be=57344,Ae="Size4-Regular"):a==="\\ulcorner"?(oe=9484,be=Se=32):a==="\\urcorner"?(oe=9488,be=Se=32):a==="\\llcorner"?(Se=9492,be=oe=32):a==="\\lrcorner"&&(oe=9496,be=oe=32);const We=ql(oe,Ae),dt=We.height+We.depth,Pt=ql(be,Ae),Kt=Pt.height+Pt.depth,Yn=ql(Se,Ae),Qr=Yn.height+Yn.depth;let Un=0,Ar=1;if(pe!==null){const rl=ql(pe,Ae);Un=rl.height+rl.depth,Ar=2}const ri=dt+Qr+Un,Rr=Math.max(0,Math.ceil((y-ri)/(Ar*Kt))),Bi=ri+Rr*Ar*Kt;let ga=qs;b&&(ga=ga*E.scalingFactor);const Qi=Bi/2-ga,Eo=.008,Xo=[];Xo.push({box:new qr(Se,{fontFamily:Ae})}),Xo.push(-Eo);const ui=new qr(be,{fontFamily:Ae});if(pe===null)for(let rl=0;rl<Rr;rl++)Xo.push({box:ui});else{for(let rl=0;rl<Rr;rl++)Xo.push({box:ui});Xo.push(-Eo),Xo.push({box:new qr(pe,{fontFamily:Ae})}),Xo.push(-Eo);for(let rl=0;rl<Rr;rl++)Xo.push({box:ui})}Xo.push(-Eo),Xo.push({box:new qr(oe,{fontFamily:Ae})});let uc="";Ae==="Size1-Regular"?uc=" delim-size1":Ae==="Size4-Regular"&&(uc=" delim-size4");const Qc=new Zo({bottom:Qi,children:Xo},{classes:uc});return new qr(Qc,ge(we({},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"]),Ke=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),It=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Wt=[0,1.2,1.8,2.4,3];function Bn(a,y,b,E){return a===void 0||a==="."?Ri(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Ne.has(a)||It.has(a)?xe(a,y,!1,b,E):Ke.has(a)?Pe(a,Wt[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var En=[{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}],wr=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],zr=[{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 ai(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function wi(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 oe=ql(a,ai(b[re]));if(oe.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let pe=oe.height+oe.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?pe*=Math.max(wu[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(pe*=Math.max(wu[Math.max(1,E.size-1)],E.minFontScale))),pe>y)return b[re]}return b[b.length-1]}function Pi(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return Ri(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let oe;It.has(y)?oe=En:Ne.has(y)?oe=zr:oe=wr;const pe=wi(ie(y),b,oe,ee),be=new mo({parent:ee,mathstyle:pe.mathstyle},re==null?void 0:re.style);return pe.type==="small"?ue(y,be,E,ge(we({},re),{type:a})):pe.type==="large"?xe(y,pe.size,E,be,ge(we({},re),{type:a})):(console.assert(pe.type==="stack"),Pe(y,b,E,be,ge(we({},re),{type:a})))}function mi(a,y,b,E,ee,re){if(y===".")return Ri(ee,re==null?void 0:re.classes);const oe=qs*ee.scalingFactor,pe=901,be=5/hc,Se=Math.max(b-oe,E+oe),Ae=Math.max(Se/500*pe,2*Se-be);return Pi(a,y,Ae,!0,ee,re)}function Ri(a,y){const b=new qr(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new mo({parent:a,mathstyle:"textstyle"}))}var ba=class Lp extends pr{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{}"}},Ea=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],go=["cases","dcases","rcases"],is=["align","align*","aligned","gather","gathered","split"],js=["array","subequations","eqnarray"];function xs(a){return js.concat(is).concat(go).concat(Ea).includes(a)}function bl(a){return Ea.includes(a)}function xl(a){return go.includes(a)}function Rs(a){return is.includes(a)}function wl(a,y,b){let E=0;for(const Se of b)"align"in Se&&(E+=1);let ee=0;const re=[];for(const Se of y){let Ae=0;for(ee=Math.max(ee,Math.min(Se.length,E));Ae<Se.length;){const We=[],dt=Math.min(Se.length,Ae+E);for(;Ae<dt;){const Pt=Se[Ae];Pt.length===0?We.push([new pr({type:"first",mode:a.mode})]):Pt[0].type!=="first"?We.push([new pr({type:"first",mode:a.mode}),...Pt]):(console.assert(!Pt.slice(1).some(Kt=>Kt.type==="first")),We.push(Pt)),Ae+=1}re.push(We)}}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 oe=[];for(const Se of re){if(Se.length!==ee)for(let Ae=Se.length;Ae<ee;Ae++)Se.push([new pr({type:"first",mode:a.mode}),new ba]);oe.push(Se)}let pe=0,be=0;for(const Se of oe){be=0;for(const Ae of Se){for(const We of Ae)We.parent=a,We.parentBranch=[pe,be];be+=1}pe+=1}return a.isDirty=!0,oe}var Ga=class Dp extends pr{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=wl(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 Dp(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=ge(we({},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(Zc(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Zc(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(Kl(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,oe,pe;const be=new mo({parent:y,mathstyle:this.mathstyleName},this.style),Se=be.getRegisterAsEm("arrayrulewidth"),Ae=be.getRegisterAsEm("arraycolsep"),We=be.getRegisterAsEm("doublerulesep"),dt=(E=(b=this.arraystretch)!=null?b:be.getRegisterAsNumber("arraystretch"))!=null?E:1;let Pt=typeof this.arraycolsep=="number"?this.arraycolsep:Ae;this.colSeparationType==="small"&&(Pt=.2778*(new mo({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const Kt=dt*su,Yn=.7*Kt,Qr=.3*Kt;let Un=0;const Ar=[];let ri=0;const Rr=this.array.length;for(let os=0;os<Rr;++os){const Ps=this.array[os];ri=Math.max(ri,Ps.length);const il=new mo({parent:be,mathstyle:this.mathstyleName},this.style);let eu=Yn/il.scalingFactor,tu=Qr/il.scalingFactor;const nu={cells:[],height:0,depth:0,pos:0};for(const Oc of Ps){const e0=(ee=pr.createBox(il,Oc,{type:"ignore"}))!=null?ee:new qr(null,{type:"ignore"});tu=Math.max(tu,e0.depth),eu=Math.max(eu,e0.height),nu.cells.push(e0)}let ru=(re=Uu(this.rowGaps[os]))!=null?re:0;ru>0&&(ru+=Qr,tu=Math.max(tu,ru),ru=0),os<Rr-1&&!bl(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(tu+=be.getRegisterAsEm("jot")),nu.height=eu,nu.depth=tu,Un+=eu,nu.pos=Un,Un+=tu+ru,Ar.push(nu)}const Bi=Un/2+qs,ga=[];for(let os=0;os<ri;os++){const Ps=[];for(const il of Ar){const eu=il.cells[os];eu.depth=il.depth,eu.height=il.height,Ps.push({box:eu,shift:il.pos-Bi})}Ps.length>0&&ga.push(new Zo({individualShift:Ps}))}const Qi=[];let Eo=!1,Xo=!1,ui=0,uc=!this.leftDelim;const{colFormat:Qc}=this;for(const os of Qc){if("align"in os&&ui>=ga.length)break;if("align"in os)Eo?Qi.push(ws(2*Pt)):(Xo||uc)&&Qi.push(ws(Pt)),Qi.push(new qr(ga[ui],{classes:"col-align-"+os.align})),ui++,Eo=!0,Xo=!1,uc=!1;else if("gap"in os){if(typeof os.gap=="number")Qi.push(ws(os.gap));else{const Ps=ks(y,Ar,Bi,os.gap);Ps&&Qi.push(Ps)}Eo=!1,Xo=!1,uc=!1}else if("separator"in os){const Ps=new qr(null,{classes:"vertical-separator"});Ps.height=Un,Ps.setStyle("height",Un,"em"),Ps.setStyle("border-right",`${Se}em ${os.separator} currentColor`),Ps.setStyle("vertical-align",-(Un-Bi),"em");let il=0;Xo?il=We-Se:Eo&&(il=Pt-Se),Ps.left=il,Qi.push(Ps),Eo=!1,Xo=!0,uc=!1}}Eo&&!this.rightDelim&&Qi.push(ws(Pt));const Cc=new qr(Qi,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Cc.caret=this.caret),this.bind(y,Cc);const rl=Cc.height,dc=Cc.depth,Nl=this.bind(y,new qr([this.bind(y,mi("open",(oe=this.leftDelim)!=null?oe:".",rl,dc,be,{isSelected:this.isSelected})),Cc,this.bind(y,mi("close",(pe=this.rightDelim)!=null?pe:".",rl,dc,be,{isSelected:this.isSelected}))],{type:"ord"}));return Nl?(Nl.setStyle("display","inline-block"),this.caret&&(Nl.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Nl}))):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(pr.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}}`),io(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 pr({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(Ms(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 oe of re)oe.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(Ms(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 oe of re)oe.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 oe of re)oe.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,Ms(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,Ms(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 Ms(a){const y=new pr({type:"first",mode:a.mode});y.parent=a;const b=new ba;return b.parent=a,[y,b]}function ws(a){const y=new qr(null,{classes:"arraycolsep"});return y.width=a,y}function ks(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const oe=pr.createBox(a,E,{type:"ignore"});oe&&(oe.depth=re.depth,oe.height=re.height,ee.push({box:oe,shift:re.pos-b}))}return new Zo({individualShift:ee}).wrap(a)}var Ts=class Ap extends pr{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 Ap(y)}toJson(){return ge(we({},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 oe=pr.createBox(y,this.body,{type:"lift"});if(!oe)return null;const pe=y.toEm((b=this.offset)!=null?b:{dimension:0});oe.depth+=pe,oe.setStyle("display","inline-block"),oe.setStyle("position","relative"),oe.setStyle("height",Math.floor(100*oe.height+oe.depth)/100,"em"),oe.setStyle("vertical-align",-Math.floor(100*oe.height)/100,"em");const be=new mo({parent:y},this.style),Se=be.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),Ae=new qr(null,{classes:"ML__box"});Ae.height=oe.height+Se,Ae.depth=oe.depth+Se,Ae.setStyle("box-sizing","border-box"),Ae.setStyle("position","absolute"),Ae.setStyle("top",-Se+.3,"em"),Ae.setStyle("left",0),Ae.setStyle("height",Ae.height+Ae.depth,"em"),Ae.setStyle("width","100%"),this.backgroundcolor&&Ae.setStyle("background-color",(ee=be.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&Ae.setStyle("border",`${be.getRegisterAsEm("fboxrule",2)}em solid ${(re=be.toColor(this.framecolor))!=null?re:"black"}`),this.border&&Ae.setStyle("border",this.border);const We=new qr([Ae,oe],{type:"lift"});return We.setStyle("display","inline-block"),We.setStyle("position","relative"),We.setStyle("line-height",0),We.height=oe.height+Se+(pe>0?pe:0),We.depth=oe.depth+Se+(pe<0?-pe:0),We.setStyle("padding-left",Se,"em"),We.setStyle("padding-right",Se,"em"),We.setStyle("height",Math.floor(100*(oe.height+oe.depth+2*Se+Math.abs(pe)))/100,"em"),We.setStyle("margin-top",-Se,"em"),We.setStyle("top",Math.floor(100*(oe.depth-oe.height+2*Se-pe))/100,"em"),We.setStyle("vertical-align",Math.floor(100*(oe.depth+2*Se))/100,"em"),this.caret&&(We.caret=this.caret),this.attachSupsub(y,{base:We})}_serialize(y){return y.skipStyles?io([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},mu=class Tp extends pr{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 Tp(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new qr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},_l=class Ip extends pr{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Ip(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},el=class Pp extends pr{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=pr.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=sn(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},No=class $p extends pr{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 $p((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"?io(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?io(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):io([!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 mo({parent:y},this.style);console.assert(this.body!==void 0);const re=new mo({parent:y,mathstyle:"textstyle"},this.style),oe=(b=pr.createBox(ee,this.body,{type:"inner"}))!=null?b:new qr(null,{type:"inner"}),pe=oe.height/re.scalingFactor,be=oe.depth/re.scalingFactor,Se=[];if(this.leftDelim&&Se.push(this.bind(re,mi("open",this.leftDelim,pe,be,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),oe&&(Zs(oe.children,this,ee,pe,be),Se.push(oe)),this.rightDelim){let Pt=this.containsCaret?" ML__contains-caret":"",Kt=this.rightDelim;Kt==="?"&&(ee.smartFence?(Kt=this.matchingRightDelim(),Pt+=" ML__smart-fence__close"):Kt="."),Se.push(this.bind(re,mi("close",Kt,pe,be,re,{isSelected:this.isSelected,classes:Pt+" ML__close",mode:this.mode,style:this.style})))}let Ae=this.variant==="mleft...mright";const We=this.leftSibling;We&&(!Ae&&We.isFunction&&(Ae=!0),!Ae&&We.type==="subsup"&&((E=We.leftSibling)!=null&&E.isFunction)&&(Ae=!0));const dt=new qr(Se,{type:Ae?"close":"inner",classes:"left-right"});return dt.setStyle("margin-top",`${-oe.depth}em`),dt.setStyle("height",`${oe.height+oe.depth}em`),this.caret&&(dt.caret=this.caret),this.bind(ee,dt.wrap(ee))}};function Zs(a,y,b,E,ee){if(a)for(let re=0;re<a.length;re++){const oe=a[re];oe.type==="middle"?(a[re]=y.bind(b,mi("inner",oe.value,E,ee,b,{isSelected:y.isSelected})),a[re].caret=oe.caret,a[re].isSelected=oe.isSelected,a[re].cssId=oe.cssId,a[re].htmlData=oe.htmlData,a[re].htmlStyle=oe.htmlStyle,a[re].attributes=oe.attributes,a[re].cssProperties=oe.cssProperties):oe.children&&Zs(oe.children,y,b,E,ee)}}var bd=class Op extends pr{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 Op(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=pr.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},Pc=class Rp extends pr{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Rp}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},Uc=class Np extends pr{constructor(y,b,E=!1,ee,re){var oe;super({type:"prompt",mode:(oe=re==null?void 0:re.mode)!=null?oe:"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 Np(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 mo({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,oe=pr.createBox(y,this.body);if(!oe)return null;oe.height||(oe.height=b.metrics.xHeight),oe.setStyle("vertical-align",-oe.height,"em"),this.correctness==="correct"?oe.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&oe.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const pe=new qr(oe,{type:"ord"});pe.setStyle("display","inline-block"),pe.setStyle("height",oe.height+oe.depth,"em"),pe.setStyle("vertical-align",-re,"em");let be="ML__prompt ";this.locked?be+=" ML__lockedPromptBox ":be+=" ML__editablePromptBox ",this.correctness==="correct"?be+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(be+=" ML__incorrectPromptBox "),this.containsCaret&&(be+=" ML__focusedPromptBox ");const Se=new qr(null,{classes:be,attributes:{part:"prompt"}});Se.height=pe.height+re,Se.depth=pe.depth+re,Se.width=pe.width+2*ee,Se.setStyle("box-sizing","border-box"),Se.setStyle("position","absolute"),Se.setStyle("height",pe.height+pe.depth+2*re,"em"),ee===0&&Se.setStyle("width","100%"),ee!==0&&(Se.setStyle("width",`calc(100% + ${2*ee}em)`),Se.setStyle("top",E,"em"),Se.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(Se.width=3*ee,Se.setStyle("width",`calc(100% + ${3*ee}em)`),Se.setStyle("left",-1.5*ee,"em"));let Ae="";this.correctness==="incorrect"&&(Ae+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),Ae&&(Se.svgOverlay=Ae);const We=new qr([Se,pe],{classes:"ML__prompt-atom"});return We.setStyle("position","relative"),We.setStyle("display","inline-block"),We.setStyle("line-height",0),We.height=pe.height+re+.2,We.depth=pe.depth+re,We.left=ee,We.right=ee,We.setStyle("height",pe.height+re,"em"),We.setStyle("top",pe.depth-pe.height,"em"),We.setStyle("vertical-align",pe.depth+re,"em"),We.setStyle("margin-left",.5,"em"),We.setStyle("margin-right",.5,"em"),this.caret&&(We.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:We}))}_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]"),Ro(ee,E)}},xc=class Bp extends pr{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new Bp(y);for(const E of Wc)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new mo({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new qr(null),oe=new qr(null);return oe.height=re.height,oe.depth=re.depth,this.attachSupsub(y,{base:oe,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Ns(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var gu=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,oe;b!=null||(b={}),this.tokens=a,this.context=y instanceof mo&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new mo({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:(oe=b.mathstyle)!=null?oe:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:we({},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(we({before:tc(this.tokens.slice(this.index,this.index+10)),after:tc(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 we({},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 xc({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=sn(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?tl(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new ba({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();Ns(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(Ns(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,oe=/\d/;if(this.match("'"))re=8,oe=/[0-7]/,a=!0;else if(this.match('"'))re=16,oe=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,oe=/[\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 pe="";for(;this.hasPattern(oe);)pe+=this.get();if(!a&&(this.match(".")||this.match(",")))for(pe+=".";this.hasPattern(oe);)pe+=this.get();const be=a?Number.parseInt(pe,re):Number.parseFloat(pe);return Number.isNaN(be)?null:{number:E?-be:be,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()||!Ns(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 pe of y.params)if(pe.isOptional)b.push(this.scanOptionalArgument(pe.type));else{const be=this.scanArgument(pe.type);be||this.onError({code:"missing-argument",arg:a}),b.push(be)}this.beginContext({tabular:y.tabular});const E=[],ee=[];let re=[],oe=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),oe=!0),!oe&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),oe=!0),!oe)if(this.matchColumnSeparator())re.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){re.push(this.mathlist),this.mathlist=[];let pe=null;this.skipWhitespace(),this.match("[")&&(pe=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(pe!=null?pe:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(pe=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(pe)));while(!oe);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=oe=>oe==="<}>");let y="",b=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=sn(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 el(y,this.parseMode,this.style);return b.verbatimLatex=tc(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 No("",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(!Ns(a)&&!a.startsWith("\\"))return null;this.next();const y=sn(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 _l("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new _l("\\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 _l(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 No(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 pr({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new pr({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(ut(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(Ns(a)){const b=ll.createAtom(this.parseMode,a,we({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=sn(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new _l(a)];if(b.definitionType==="symbol"){const E=we({},this.style);b.variant&&(E.variant=b.variant),y=new pr({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 _l(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 oe=ee.match(/^\s*border\s*:\s*(.*)/);oe?b.border=oe[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 pe=this.scanOptionalArgument("string"),be=this.scanOptionalArgument("math"),Se=pr.serialize(be,{defaultMode:"math"});let Ae=[],We;!We&&Se==="correct"?We="correct":!We&&Se==="incorrect"?We="incorrect":Se!==""&&(Ae=be);const dt=this.scanOptionalArgument("string")==="locked",Pt=this.scanArgument("auto");let Kt;return Pt&&Array.isArray(Pt)&&Pt.length>0?Kt=Pt:Pt&&typeof Pt=="object"&&"group"in Pt?Kt=Pt.group:Kt=Ae,pe?[new Uc(pe,We,dt,Kt!=null?Kt:Ae,{mode:this.parseMode,style:this.style})]:[new ba({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const pe=this.index,be=this.scanLiteralGroup()||this.next();if(!be)return null;if(this.context.registers[be.substring(1)]){const Se=this.scanArgument("string");Se!==null&&(this.context.registers[be.substring(1)]=Se);const Ae=io([a,tc(this.tokens.slice(pe,this.index))]);return[new pr({type:"text",value:"",verbatimLatex:Ae})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=sn(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(pe=>new pr({type:"text",value:pe,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new _l(a)]);const oe=this.index;if(re.definitionType==="symbol"){const pe=we({},this.style);re.variant&&(pe.variant=re.variant),ee=new pr({type:re.type,command:a,style:pe,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const pe=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let be,Se=[];if(re.parse?Se=re.parse(this):[be,Se]=this.scanArguments(re),this.parseMode=pe,re.applyMode&&!re.applyStyle&&!re.createAtom)return ut(Se[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:Se,style:this.style,mode:this.parseMode}),be&&(ee.body=ut(this.scanArgument(be)));else if(typeof re.applyStyle=="function"){const Ae=we(we({},this.style),re.applyStyle(a,Se,this.context)),We=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),be){const dt=this.style;this.style=Ae;const Pt=this.scanArgument(be);return this.style=dt,this.parseMode=We,ut(Pt)}this.style=Ae}else ee=new pr({type:"mord",command:(b=re.command)!=null?b:a,style:we({},this.style),value:a,mode:(E=re.applyMode)!=null?E:this.parseMode})}if(!ee)return null;if(ee instanceof pr&&ee.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const pe=io([a,tc(this.tokens.slice(oe,this.index))]);pe&&(ee.verbatimLatex=pe)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const pe=this.scanSmartFence();if(pe)return[ee,pe]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Ns(a)){const y=ll.createAtom(this.parseMode,a,we({},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 ic(" "," ",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 oe=1;oe<=ee;oe++){let pe=this.scanLiteralGroup();if(!pe){const be=this.index;this.scanExpression(),pe=tc(this.tokens.slice(be,this.index))}re[oe]=pe}return new bd(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:tc(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:tl(b.def,{context:this.context,parseMode:this.parseMode,args:oe=>re[oe],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 tl(a,y){var b,E,ee,re;const oe=(b=y==null?void 0:y.args)!=null?b:void 0,pe=new gu(ec(a,oe),y==null?void 0:y.context,{args:oe,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:{}}),be=[];for(;!pe.end();)be.push(...pe.scan(()=>!1));return be}function t0(a,y){var b;const E=new gu(ec(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 pr{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=vs.go(Ur.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=tl(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 ge(we({},super.toJson()),{arg:this.arg})}render(y){const b=pr.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}};Bt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var Ur={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,oe=[];;){ee!==a?(re=10,ee=a):re--;var pe=Ur.stateMachines[y],be=pe.transitions[b]||pe.transitions["*"];e:for(var Se=0;Se<be.length;Se++){var Ae=Ur.patterns.match_(be[Se].pattern,a);if(Ae){for(var We=be[Se].task,dt=0;dt<We.action_.length;dt++){var Pt;if(pe.actions[We.action_[dt].type_])Pt=pe.actions[We.action_[dt].type_](E,Ae.match_,We.action_[dt].option);else if(Ur.actions[We.action_[dt].type_])Pt=Ur.actions[We.action_[dt].type_](E,Ae.match_,We.action_[dt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+We.action_[dt].type_+")"];Ur.concatArray(oe,Pt)}if(b=We.nextState||b,a.length>0){if(We.revisit||(a=Ae.remainder),!We.toContinue)break e}else return oe}}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=Ur.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 Ur.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Ur.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Ur.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Ur.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Ur.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Ur.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Ur.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Ur.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Ur.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Ur.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Ur.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Ur.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Ur.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 Ur.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Ur.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Ur.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Ur.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 Ur.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Ur.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Ur.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Ur.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Ur.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Ur.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Ur.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Ur.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=Ur.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,oe,pe,be,Se){var Ae=function(Un,Ar){if(typeof Ar=="string")return Un.indexOf(Ar)!==0?null:Ar;var ri=Un.match(Ar);return ri?ri[0]:null},We=function(Un,Ar,ri){for(var Rr=0;Ar<Un.length;){var Bi=Un.charAt(Ar),ga=Ae(Un.substr(Ar),ri);if(ga!==null&&Rr===0)return{endMatchBegin:Ar,endMatchEnd:Ar+ga.length};if(Bi==="{")Rr++;else if(Bi==="}"){if(Rr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Rr--}Ar++}return Rr>0,null},dt=Ae(a,y);if(dt===null||(a=a.substr(dt.length),dt=Ae(a,b),dt===null))return null;var Pt=We(a,dt.length,E||ee);if(Pt===null)return null;var Kt=a.substring(0,E?Pt.endMatchEnd:Pt.endMatchBegin);if(re||oe){var Yn=this.findObserveGroups(a.substr(Pt.endMatchEnd),re,oe,pe,be);if(Yn===null)return null;var Qr=[Kt,Yn.match_];return{match_:Se?Qr.join(""):Qr,remainder:Yn.remainder}}else return{match_:Kt,remainder:a.substr(Pt.endMatchEnd)}},match_:function(a,y){var b=Ur.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return Ur.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 Ur.go(y,"text")},"{text}":function(a,y){var b=["{"];return Ur.concatArray(b,Ur.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return Ur.go(y,"tex-math")},"tex-math tight":function(a,y){return Ur.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 Ur.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 Ur.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 oe=a[y][b];if(oe.action_){oe.action_=[].concat(oe.action_);for(var pe=0;pe<oe.action_.length;pe++)typeof oe.action_[pe]=="string"&&(oe.action_[pe]={type_:oe.action_[pe]})}else oe.action_=[];for(var be=y.split("|"),Se=0;Se<be.length;Se++)if(E[ee]==="*")for(var Ae in re)re[Ae].push({pattern:be[Se],task:oe});else re[E[ee]].push({pattern:be[Se],task:oe})}return re},stateMachines:{}};Ur.stateMachines={ce:{transitions:Ur.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 Ur.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 Ur.concatArray(b,this.output(a)),Ur.concatArray(b,Ur.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=Ur.patterns.match_("orbital",a.o||""),ee=Ur.patterns.match_("one lowercase greek letter $",a.o||""),re=Ur.patterns.match_("one lowercase latin letter $",a.o||""),oe=Ur.patterns.match_("$one lowercase latin letter$ $",a.o||""),pe=y==="-"&&(E&&E.remainder===""||ee||re||oe);pe&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var be=[];return pe?(Ur.concatArray(be,this.output(a)),be.push({type_:"hyphen"})):(E=Ur.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(Ur.concatArray(be,Ur.actions["d="](a,y)),Ur.concatArray(be,this.output(a))):(Ur.concatArray(be,this.output(a)),Ur.concatArray(be,Ur.actions.bond(a,y,"-")))),be},"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:Ur.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"&&Ur.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:Ur.go(a.a,"a"),b:Ur.go(a.b,"bd"),p:Ur.go(a.p,"pq"),o:Ur.go(a.o,"o"),q:Ur.go(a.q,"pq"),d:Ur.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Ur.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Ur.go(a.rd);var re;a.rqt==="M"?re=Ur.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Ur.go(a.rq),E={type_:"arrow",r:a.r,rd:ee,rq:re}}for(var oe in a)oe!=="parenthesisLevel"&&oe!=="beginsWithBond"&&delete a[oe];return E},"oxidation-output":function(a,y){var b=["{"];return Ur.concatArray(b,Ur.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:Ur.go(y[0]),p2:Ur.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:Ur.go(y[0]),p2:Ur.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:Ur.go(y[0]),p2:Ur.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:Ur.go(y[0]),p2:Ur.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Ur.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:Ur.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:Ur.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:Ur.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:Ur.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:Ur.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Ur.go(y[1],"pq")}}}},bd:{transitions:Ur.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:Ur.go(y[1],"bd")}}}},oxidation:{transitions:Ur.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:Ur.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:Ur.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:Ur.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Ur.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]&&(Ur.concatArray(b,Ur.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?Ur.concatArray(b,Ur.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]),Ur.concatArray(b,Ur.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=Ur.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=Ur.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:Ur.go(a.d,"pu"),q:Ur.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_:"/"}),Ur.concatArray(y,ee.q))}else y=Ur.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:Ur.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=Ur.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=Ur.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:Ur.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 vs={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+=vs._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&vs.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:vs._goInner(a.a),b:vs._goInner(a.b),p:vs._goInner(a.p),o:vs._goInner(a.o),q:vs._goInner(a.q),d:vs._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 "+vs._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+vs._goInner(a.p1);break;case"bond":if(y=vs._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{"+vs._goInner(a.p1)+"}{"+vs._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+vs._goInner(a.p1)+"}{"+vs._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+vs._goInner(a.p1)+"}{"+vs._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+vs._goInner(a.p1)+"}{"+vs._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+vs._goInner(a.p1)+"}_{"+vs._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+vs._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:vs._goInner(a.rd),rq:vs._goInner(a.rq)},oe=vs._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(oe="\\long"+oe,re.rd&&(oe="\\overset{"+re.rd+"}{"+oe+"}"),re.rq&&(a.r==="<-->"?oe="\\underset{\\lower2mu{"+re.rq+"}}{"+oe+"}":oe="\\underset{\\lower6mu{"+re.rq+"}}{"+oe+"}"),oe=" {}\\mathrel{"+oe+"}{} "):(re.rq&&(oe+="[{"+re.rq+"}]"),oe+="{"+re.rd+"}",oe=" {}\\mathrel{\\x"+oe+"}{} "):oe=" {}\\mathrel{\\long"+oe+"}{} ",y=oe;break;case"operator":y=vs._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 k1(a){}var r0=class zp extends pr{constructor(y){super(ge(we({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return ge(we({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new qr(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=sn(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):Ro(this.command,this.value)}},i0=class Hp extends pr{constructor(y){super(ge(we({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Hp(y)}toJson(){return ge(we({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=Bn(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=sn(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):Ro(this.command,this.value)}},Gd=class Kp extends pr{constructor(y,b,E,ee){var re,oe;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=(oe=ee.strokeWidth)!=null?oe:"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 Kp(y.command,y.body,y.notation,y)}toJson(){return ge(we({},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=sn(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="",oe="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=oe+'mathbackground="'+this.backgroundcolor+'"',oe=","),this.shadow&&this.shadow!=="auto"&&(re+=oe+'shadow="'+this.shadow+'"',oe=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=oe+this.borderStyle,oe=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=oe+'mathcolor="'+this.strokeColor+'"',oe=","),re&&(ee+=`[${re}]`)}return Ro(ee,this.bodyToLatex(y))}render(y){const b=new mo({parent:y},this.style),E=pr.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 oe=new qr(null,{classes:"ML__notation"});let pe=E.height+E.depth+2*re;const be=E.width+2*re;let Se="";if(this.notation.horizontalstrike&&(Se+=this.line(3,50,97,50)),this.notation.verticalstrike&&(Se+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(Se+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(Se+=this.line(3,3,97,97)),this.notation.updiagonalarrow){Se+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const Kt=.03*Math.sqrt(be*be+pe*pe)*1,Yn=E.width*Kt,Qr=(E.depth+E.height)*Kt,Un=re+E.width;let Ar=re;Ar+Qr-.4*Yn<0&&(Ar=.4*Yn-Qr),Se+='<polygon points="',Se+=`${Un},${Ar} ${Un-Yn-.4*Qr},${Ar+Qr-.4*Yn} `,Se+=`${Un-.7*Yn},${Ar+.7*Qr} ${Un-Yn+.4*Qr},${Ar+Qr+.4*Yn} `,Se+=`${Un},${Ar}`,Se+=`" stroke='none' fill="${this.strokeColor}"`,Se+="/>"}let Ae=0;if(this.notation.phasorangle){const dt=a0(b),Pt=(E.height+E.depth+2*dt+re).toString(),Kt=(E.height+E.depth)/2;Se+=this.line(re.toString(),Pt,(re+Kt+E.width).toString(),Pt),Se+=this.line(re.toString(),Pt,(re+Kt).toString(),(re-dt).toString()),pe+=dt,Ae=Kt,E.left+=pe/2-re}if(this.notation.longdiv){const dt=a0(b);pe+=dt,Se+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const Pt=.3;Ae=Pt+dt,E.left+=Pt+dt,E.setTop(re+dt),Se+='<path d="',Se+=`M ${re} ${re} a${Pt} ${(E.depth+E.height+2*dt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*dt} "`,Se+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,Se+="/>"}if(oe.width=E.width+2*re+Ae,oe.height=E.height+re,oe.depth=E.depth+re,oe.setStyle("box-sizing","border-box"),oe.setStyle("left",`calc(-${ee} / 2 )`),oe.setStyle("height",`${Math.floor(100*pe)/100}em`),oe.setStyle("top",`calc(${ee} / 2 )`),this.backgroundcolor&&oe.setStyle("background-color",this.backgroundcolor),this.notation.box&&oe.setStyle("border","1px solid red"),this.notation.actuarial&&(oe.setStyle("border-top",this.borderStyle),oe.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(oe.setStyle("border-bottom",this.borderStyle),oe.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(oe.setStyle("border-radius","8px"),oe.setStyle("border",this.borderStyle)),this.notation.circle&&(oe.setStyle("border-radius","50%"),oe.setStyle("border",this.borderStyle)),this.notation.top&&oe.setStyle("border-top",this.borderStyle),this.notation.left&&oe.setStyle("border-left",this.borderStyle),this.notation.right&&oe.setStyle("border-right",this.borderStyle),this.notation.bottom&&oe.setStyle("border-bottom",this.borderStyle),Se){let dt="";this.shadow==="auto"&&(dt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(dt+=`filter: drop-shadow(${this.shadow})`),dt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,dt+=' stroke-linecap="round"',this.svgStrokeStyle&&(dt+=` stroke-dasharray="${this.svgStrokeStyle}"`),oe.svgStyle=dt,oe.svgOverlay=Se}const We=new qr([oe,E]);return We.setStyle("position","relative"),We.setStyle("vertical-align",re,"em"),We.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),We.setStyle("display","inline-block"),We.height=oe.height,We.depth=oe.depth,We.width=oe.width-2*re,We.left=re,We.right=re,this.caret&&(We.caret=this.caret),We.wrap(b)}line(y,b,E,ee){return`<line x1="${Mf(y)}" y1="${Mf(b)}" x2="${Mf(E)}" y2="${Mf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function Mf(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?Ml:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var xd=class Wp extends pr{constructor(y,b,E){var ee,re;super(ge(we({},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),we(we({},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 mo({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,oe=new mo({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),pe=this.numerPrefix?new qr([new qr(this.numerPrefix),pr.createBox(oe,this.above)],{isTight:oe.isTight,type:"ignore"}):(b=pr.createBox(oe,this.above,{type:"ignore"}))!=null?b:new qr(null,{type:"ignore"}),be=new mo({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),Se=this.denomPrefix?new qr([new qr(this.denomPrefix),pr.createBox(be,this.below,{type:"ignore"})]):(E=pr.createBox(be,this.below,{type:"ignore"}))!=null?E:new qr(null,{type:"ignore"}),Ae=this.hasBarLine?re.defaultRuleThickness:0;let We,dt=0,Pt;ee.isDisplayStyle?(We=oe.metrics.num1,dt=Ae>0?3*Ae:7*Ae,Pt=be.metrics.denom1):(Ae>0?(We=oe.metrics.num2,dt=Ae):(We=oe.metrics.num3,dt=3*re.defaultRuleThickness),Pt=be.metrics.denom2);const Kt=[];this.isSelected&&Kt.push("ML__selected");const Yn=pe.depth,Qr=Se.height;let Un;if(Ae<=0){const Qi=We-Yn-(Qr-Pt);Qi<dt&&(We+=(dt-Qi)/2,Pt+=(dt-Qi)/2),Un=new Zo({individualShift:[{box:pe,shift:-We,classes:[...Kt,"ML__center"]},{box:Se,shift:Pt,classes:[...Kt,"ML__center"]}]}).wrap(ee)}else{const Qi=new qr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Qi.softWidth=Math.max(pe.width,Se.width),Qi.height=Ae/2,Qi.depth=Ae/2;const Eo=qs+Ae/2;We<dt+Yn+Eo&&(We=dt+Yn+Eo);const Xo=qs-Ae/2;Pt<dt+Qr-Xo&&(Pt=dt+Qr-Xo),Un=new Zo({individualShift:[{box:Se,shift:Pt,classes:[...Kt,"ML__center"]},{box:Qi,shift:-Xo,classes:Kt},{box:pe,shift:-We,classes:[...Kt,"ML__center"]}]}).wrap(ee)}const Ar=ee.isDisplayStyle?re.delim1:re.delim2,ri=this.leftDelim?this.bind(y,Pi("open",this.leftDelim,Ar,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Ri(ee,"open");let Rr=null;this.continuousFraction?Rr=new qr(null,{type:"close"}):this.rightDelim?Rr=this.bind(y,Pi("close",this.rightDelim,Ar,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Rr=Ri(ee,"close");const Bi=new qr([ri,Un,Rr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),ga=this.bind(y,Bi);return this.caret&&(ga.caret=this.caret),this.attachSupsub(y,{base:ga})}},cl=class Zp extends pr{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),we({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new qr(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}},Yd=class Vp extends pr{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new cl(b)),this.skipBoundary=!1}static fromJson(y){return new Vp("")}toJson(){return super.toJson()}render(y){const b=pr.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 Up extends pr{constructor(y,b){super(ge(we({},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 Up(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 qr(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-qs*y.scalingFactor,oe=ee.italic;ee.setTop(re);let pe=ee;if(this.superscript||this.subscript){const be=(b=this.subsupPlacement)!=null?b:"auto";pe=be==="over-under"||be==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:oe}):this.attachSupsub(y,{base:ee})}return new qr(this.bind(y,pe),{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=sn(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)),io(E)}},Yu=class jp extends pr{constructor(y){const b=y.body;super(ge(we({},y),{type:"overlap",body:typeof b=="string"?[new pr({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 jp(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),we(we({},super.toJson()),y)}render(y){const b=pr.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new qr([b,new qr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},wc=class Gp extends pr{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?Il(this.svgBody):pr.createBox(y,this.body,{type:"ignore"});const E=new mo({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Il(this.svgAbove):this.above&&(ee=pr.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Il(this.svgBelow):this.below&&(re=pr.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new qr([Ri(y,"open"),b,Ri(y,"close")],{type:"ignore"}));let oe=om(y,{base:b,above:ee,below:re,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return oe?(this.subsupPlacement==="over-under"?oe=this.attachLimits(y,{base:oe,type:oe.type}):oe=this.attachSupsub(y,{base:oe}),this.caret&&(oe.caret=this.caret),this.bind(y,oe)):null}};function om(a,y){if(!y.base)return null;if(!y.above&&!y.below){const pe=new qr(y.base,{type:y.type});return pe.setStyle("position","relative"),pe}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ee=y.base,re=0,oe=["ML__center"];if(y.paddedAboveBelow&&oe.push("ML__label_padding"),y.below&&y.above){const pe=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Zo({bottom:pe,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:oe},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:oe},a.metrics.bigOpSpacing5]})}else y.below?E=new Zo({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:oe},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Zo({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:oe},a.metrics.bigOpSpacing5]}));return new qr(E,{type:y.type})}var Xd=class Yp extends pr{constructor(y){var b,E,ee,re;super(ge(we({},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 Yp(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),we(we({},super.toJson()),y)}render(y){const b=new mo({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),pr.createBox(b,this.body,{classes:"inner"});const E=pr.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new qr(null,{classes:"fix"});return new qr([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 Zo({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Jd=class Xp extends pr{constructor(y){var b;super(we({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 Xp(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 qr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new qr(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 qr(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=sn(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}{${gs(this.width)}}`:`${ee}${gs(this.width)}`}},o0=class Jp extends pr{constructor(y){var b;super(ge(we({},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 Jp(ge(we({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=sn(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")?Ro(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:Ro(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 mo({parent:y,mathstyle:"cramp"},this.style),ee=(b=pr.createBox(E,this.body,{type:"inner"}))!=null?b:new qr(null),re=E.scalingFactor,oe=E.metrics.defaultRuleThickness/re,pe=y.isDisplayStyle?Ml:oe,be=new qr(null,{classes:"ML__sqrt-line",style:this.style});be.height=oe,be.softWidth=ee.width;let Se=re*(oe+pe/4);const We=Math.max(re*2*pe,ee.height+ee.depth)+Se+oe,dt=new mo({parent:y},this.style),Pt=this.bind(dt,new qr(Pi("inner","\\surd",We,!1,dt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!Pt)return null;const Kt=Pt.height+Pt.depth-oe;Kt>ee.height+ee.depth+Se&&(Se=(Se+Kt-(ee.height+ee.depth))/2),Pt.setTop(Pt.height-ee.height-Se);const Yn=this.bind(y,new Zo({firstBaseline:[{box:new qr(ee)},Se-2*oe,{box:be},oe]})),Qr=pr.createBox(new mo({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Qr){const ri=new qr([Pt,Yn],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return ri.setStyle("display","inline-block"),ri.setStyle("height",ri.height+ri.depth,"em"),this.caret&&(ri.caret=this.caret),this.bind(y,ri)}const Un=new Zo({shift:-.6*(Math.max(Pt.height,Yn.height)-Math.max(Pt.depth,Yn.depth)),children:[{box:Qr}]}),Ar=new qr([new qr(Un,{classes:"ML__sqrt-index",type:"ignore"}),Pt,Yn],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return Ar.height=Pt.height,Ar.depth=Pt.depth,this.caret&&(Ar.caret=this.caret),this.bind(y,Ar)}},sm=class extends qr{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 kf(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"){kf(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){Qd(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 qd(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 Qd(b,(oe,pe)=>{var be,Se,Ae;if(!oe)return;const We=oe.type,dt=pe.isTight?(be=cm[We])!=null?be:null:(Se=lm[We])!=null?Se:null,Pt=(Ae=dt==null?void 0:dt[pe.type])!=null?Ae:null;Pt===3&&kf(pe,E),Pt===4&&kf(pe,ee),Pt===5&&kf(pe,re)}),a}function Qd(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Qd(E.children,y,b):E.type==="ignore"?Qd(E.children,y):(y(b,E),Qd(E.children,y),b=E);return b}var hh=class qp extends pr{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new pr({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new qp(ge(we({},y),{tooltip:Pu(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 ge(we({},super.toJson()),{tooltip:b})}render(y){const b=pr.createBox(new mo,this.body);if(!b)return null;const E=new mo({parent:y,mathstyle:"displaystyle"},{fontSize:Jl}),ee=Eu(qd(new qr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new qr([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Xu=class Qp extends pr{constructor(y,b){super(ge(we({},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 qr(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 qr(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=sn(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)),io(E)}};function Pu(a){if(Re(a))return a.map(E=>Pu(E));if(typeof a=="string")return pr.fromJson(a);a=we({},a);for(const E of Wc)a[E]&&(a[E]=Pu(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=Pu(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=Ga.fromJson(a)),y==="box"&&(b=Ts.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=mu.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=Gd.fromJson(a)),y==="error"&&(b=_l.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=xd.fromJson(a)),y==="group"&&(b=el.fromJson(a)),y==="latex"&&(b=cl.fromJson(a)),y==="latexgroup"&&(b=Yd.fromJson(a)),y==="leftright"&&(b=No.fromJson(a)),y==="macro"&&(b=bd.fromJson(a)),y==="macro-argument"&&(b=Pc.fromJson(a)),y==="operator"&&(b=Xu.fromJson(a)),y==="overlap"&&(b=Yu.fromJson(a)),y==="overunder"&&(b=wc.fromJson(a)),y==="placeholder"&&(b=ba.fromJson(a)),y==="prompt"&&(b=Uc.fromJson(a)),y==="phantom"&&(b=Xd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=Jd.fromJson(a)),y==="subsup"&&(b=xc.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=ic.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=pr.fromJson(a));for(const E of Wc)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=>Pu(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>Pu(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 ll{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,oe;if(y===null)return new pr({type:"mord",mode:"math",command:a,value:a,style:b});const pe=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const Se=new pr({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return pe&&(Se.isFunction=!0),a.startsWith("\\")&&(Se.verbatimLatex=a),Se}const be=new pr({type:"mord",mode:"math",command:(oe=y.command)!=null?oe:a,value:a,style:b});return pe&&(be.isFunction=!0),a.startsWith("\\")&&(be.verbatimLatex=a),be}serialize(a,y){const b=gm(a,ge(we({},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((pe,be)=>{var Se;pe.test(a.value)&&pm[(Se=y.letterShapeStyle)!=null?Se:"tex"][be]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,oe]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=Gt(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),oe&&(a.classes+=" "+oe),re)}};function gm(a,y){const{parent:b}=a[0],E=c0(b);return ys(a,"variant").map(ee=>{const re=c0(ee[0]);let oe="";re&&re!==E&&(oe={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(oe!==void 0));const pe=io(ee.map(be=>be._serialize(y)));return oe?Ro(oe,pe):pe})}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 ys(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?`{${Ro("\\fontshape",ee)}${io(E)}}`:re?Ro(re,io(E)):io(E)})}function bm(a,y){return ys(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?`{${Ro("\\fontseries",ee)}${io(E)}}`:re?Ro(re,io(E)):io(E)})}function xm(a,y){return ys(a,"fontSize").map(b=>{var E,ee;const re=bm(b,y),oe=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ee:"";return oe?`${oe} ${io(re)}`:io(re)})}function wm(a,y,b){return ys(a,"fontFamily").map(E=>{var ee,re;const oe=xm(E,y),pe=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return pe?`\\${pe}{${io(oe)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${io(oe)}}`:b?`\\text{${io(oe)}}`:io(oe)})}var u0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends ll{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new ic(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,ge(we({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,oe;const{fontFamily:pe}=y;if(u0[pe]?a.classes+=" "+u0[pe]:pe&&a.setStyle("font-family",pe),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 be=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);be&&(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=be[1])!=null?E:""])!=null?ee:"",a.classes+=" ",a.classes+=(oe={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=be[2])!=null?re:""])!=null?oe:"")}return"Main-Regular"}};new Sm;var Cm=class extends ll{constructor(){super("latex")}createAtom(a){return new cl(a)}serialize(a,y){return a.filter(b=>b instanceof cl&&!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:["=","=","=","="]}},km={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:["<",">","",""]}},_m={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:["=","=","=","="]}},Dm={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:["<",">","|",""]}},Am={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:[".",".",".","."]}},Tm={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"]}},Im={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 wd(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 $m={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]"},ef=[],tf;function gh(){switch(Le()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function lc(a){(!a.platform||a.platform===gh())&&ef.push(a)}function Om(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=$m[a])!=null?b:"",E}function Rm(a){if(a.code)return a;const y=Object.entries(nf().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[oe,pe]of y)if(pe[re]===a.key){ee=oe,re===3?(b=!0,E=!0):re===2?b=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,ge(we({},a),{altKey:b,shiftKey:E,code:ee}))}function Nm(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 ef)((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);ef.sort((ee,re)=>re.score-ee.score)}function Bm(a){tf=ef.find(y=>a.startsWith(y.locale))}function nf(){return tf!=null?tf:ef[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":lc(mh),lc(Mm),lc(Tm),lc(Lm);break;case"windows":lc(d0),lc(km),lc(Im),lc(Dm);break;case"linux":lc(f0),lc(_m),lc(Pm),lc(Am);break}lc(Em);function vh(a){var y;const b=/macos|ios/.test(Le()),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 _f(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 Ju(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 Hm=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 Lf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Hm.has(a.code)}function Df(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var jc=class xu{static get scrim(){return xu._scrim||(xu._scrim=new xu),xu._scrim}static open(y){xu.scrim.open(y)}static close(){xu.scrim.close()}static get state(){return xu.scrim.state}static get element(){return xu.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=Df();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:"",Df()!==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 Km(a,y,b){let E=null,ee=null,re=!1,oe=!1,pe=!1;const be=new AbortController,Se=be.signal;return a.addEventListener("keydown",Ae=>{if(re||Ae.key==="Process"||Ae.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(Ae.code)){E=null;return}E=Ae,ee=null,b.onKeystroke(Ae)?a.textContent="":E=null},{capture:!0,signal:Se}),a.addEventListener("keypress",Ae=>{re||(E&&ee&&b.onKeystroke(E),ee=Ae)},{capture:!0,signal:Se}),a.addEventListener("compositionstart",Ae=>{a.textContent="",re=!0,b.onCompositionStart(Ae.data)},{capture:!0,signal:Se}),a.addEventListener("compositionupdate",Ae=>{re&&b.onCompositionUpdate(Ae.data)},{capture:!0,signal:Se}),a.addEventListener("compositionend",Ae=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(Ae.data))},{capture:!0,signal:Se}),a.addEventListener("beforeinput",Ae=>Ae.stopImmediatePropagation(),{signal:Se}),a.addEventListener("input",Ae=>{var We;if(!re&&(a.textContent="",Ae.inputType!=="insertCompositionText")){if(Ae.inputType==="insertFromPaste"){Ae.preventDefault(),Ae.stopPropagation();return}b.onInput((We=Ae.data)!=null?We:""),Ae.preventDefault(),Ae.stopPropagation()}},{signal:Se}),a.addEventListener("paste",Ae=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(Ae)||Ae.preventDefault(),Ae.stopImmediatePropagation()},{signal:Se}),a.addEventListener("cut",Ae=>b.onCut(Ae),{capture:!0,signal:Se}),a.addEventListener("copy",Ae=>b.onCopy(Ae),{capture:!0,signal:Se}),a.addEventListener("blur",Ae=>{var We,dt;if(((dt=(We=Ae.relatedTarget)==null?void 0:We._mathfield)==null?void 0:dt.element)===y){a.focus({preventScroll:!0}),Ae.preventDefault(),Ae.stopPropagation();return}const Pt=jc.state;if(Pt==="open"||Pt==="opening"){Ae.preventDefault(),Ae.stopPropagation();return}if(Ae.relatedTarget===Ae.target.getRootNode().host){Ae.preventDefault(),Ae.stopPropagation();return}pe||oe||(pe=!0,E=null,ee=null,b.onBlur(),pe=!1)},{capture:!0,signal:Se}),a.addEventListener("focus",Ae=>{pe||oe||(oe=!0,b.onFocus(),oe=!1)},{capture:!0,signal:Se}),{dispose:()=>be.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!oe&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Df()===a,setAriaLabel:Ae=>a.setAttribute("aria-label",Ae),setValue:Ae=>{var We;a.textContent=Ae,a.style.left="-1000px",(We=window.getSelection())==null||We.selectAllChildren(a)},moveTo:(Ae,We)=>{a.style.top=`${We}px`,a.style.left=`${Ae}px`}}}function Sd(a){var y;if(!a||!Lf(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=Le(),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=wd(h0(p0(b))),ee=wd({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Le()),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 Vm(a,y){let b=[];if(typeof y=="string"){const re=Kd[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 Um(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=Le()==="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 ge(we({},a),{key:wd(b)});const ee=Om(b.key,y);if(!ee)return ge(we({},a),{key:wd(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 ${wd(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,ge(we({},a),{key:wd(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 jm(a,y){const b=[],E=[];for(const ee of a)try{const re=Um(ee,y);if(!re)continue;const oe=E.find(pe=>pe.key===re.key&&pe.ifMode===re.ifMode);if(oe)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${oe.key} (${yh(oe.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 Va{constructor(){super("latex")}createAtom(a){return new cl(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"}),_s(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(As(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 be of y)le.test(be)&&re.push(new cl(be));let oe=a.at(a.position);if(oe instanceof Yd&&(oe=oe.lastChild),!(oe.parent instanceof Yd)){const be=new Yd("");oe.parent.addChildAfter(be,oe),oe=be.firstChild}const pe=oe.parent.addChildrenAfter(re,oe);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(pe)):pe&&(a.position=a.offsetOf(pe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Ym(a){return a.atoms.find(y=>y.type==="latexgroup")}function rf(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 be=a.at(E);ee=be instanceof cl&&be.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let oe=E,pe=!1;for(;oe<=re&&!pe;){const be=a.at(oe);pe=!(be instanceof cl&&be.isSuggestion),pe||oe++}return[E-1,oe-1]}new Gm;function Af(a){const y=rf(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 af(a,y){var b;const{model:E}=a;Af(a);for(const Ae of rf(E))Ae.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Ed(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof cl&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof cl&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof cl&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const oe=ee.map(Ae=>Ae.value).join(""),pe=Ht(a,oe);if(pe.length===0){if(/^\\[a-zA-Z\*]+$/.test(oe))for(const Ae of ee)Ae.isError=!0;Ed(a);return}const be=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=be<0?pe.length-1:be%pe.length;const Se=pe[a.suggestionIndex];if(Se!==oe){const Ae=ee[ee.length-1];Ae.parent.addChildrenAfter([...Se.slice(oe.length-Se.length)].map(We=>new cl(We,{isSuggestion:!0})),Ae),qu(a,{interactive:!0})}Jm(a,pe)}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 Cd(a,y="accept",b){var E,ee;Ed(a);const re=Ym(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const Se=rf(a.model).filter(Ae=>Ae.isSuggestion);if(Se.length!==0){for(const Ae of Se)Ae.isSuggestion=!1;a.model.position=a.model.offsetOf(Se[Se.length-1])}if(y==="accept-suggestion")return Se.length!==0}const pe=rf(a.model).filter(Se=>!Se.isSuggestion).map(Se=>Se.value).join(""),be=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(be),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(Va.insert(a.model,pe,{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 Tf(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 Xm(a,y){const b=new mo({from:a.context}),E=new pr({mode:"math",type:"root",body:tl(y,{context:b})}),ee=Eu(qd(new qr(E.render(b),{classes:"ML__base"}),b));return du(ee,{classes:"ML__latex"}).toMarkup()}function Jm(a,y){var b;if(y.length===0){Ed(a);return}let E="";for(const[re,oe]of y.entries()){const pe=oe,be=Xm(a,oe),Se=Vm(a.keybindings,pe).join("<br>");E+=`<li role="button" data-command="${pe}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${pe}</span><span class="ML__popover__command">${be}</span>`,Se&&(E+=`<span class="ML__popover__keybinding">${Se}</span>`),E+="</li>"}const ee=qm(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"),If(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 If(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"){Ed(a);return}if(y!=null&&y.deferred){setTimeout(()=>If(a),32);return}const E=Vc(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,oe=window.innerWidth-document.documentElement.clientWidth,pe=window.innerHeight-document.documentElement.clientHeight,be=window.mathVirtualKeyboard.boundingRect.height,Se=document.getElementById("mathlive-suggestion-popover");E.x+Se.offsetWidth/2>re-oe?Se.style.left=`${re-Se.offsetWidth-oe}px`:E.x-Se.offsetWidth/2<0?Se.style.left="0":Se.style.left=`${E.x-Se.offsetWidth/2}px`;const Ae=E.y-E.height;ee-pe-be-E.y<Ae?(Se.classList.add("ML__popover--reverse-direction"),Se.classList.remove("top-tip"),Se.classList.add("bottom-tip"),Se.style.top=`${E.y-E.height-Se.offsetHeight-15}px`):(Se.classList.remove("ML__popover--reverse-direction"),Se.classList.add("top-tip"),Se.classList.remove("bottom-tip"),Se.style.top=`${E.y+15}px`)}function Ed(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function qm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Tf("mathlive-suggestion-popover"),Vl("suggestion-popover"),Vl("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Cd(a,"reject"),Va.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 Pf=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 Bu(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(Pf===null)try{const y=yield fetch(wh,{method:"HEAD"});y.status===200&&(Pf=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wh}")`)}return new URL(a,Pf!=null?Pf:wh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var cc="not-loaded";function ng(){return Bu(this,null,function*(){return cc="not-loaded",$f()})}function $f(){return Bu(this,null,function*(){var a;if(cc!=="not-loaded")return;if(cc="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){cc="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(oe=>oe.family);if(b.every(oe=>E.includes(oe))){cc="ready";return}if(!window.MathfieldElement.fontsDirectory){cc="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),cc="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(oe=>tg(oe[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${oe[0]}`,oe[1]));try{(yield Promise.all(re.map(pe=>{try{return pe.load()}catch(be){}}))).forEach(pe=>document.fonts.add(pe)),cc="ready";return}catch(oe){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ee}"`,{cause:oe}),document.body.classList.add("ML__fonts-did-not-load")}cc="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 _s(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{oc(a)&&a.dirty&&(a.atomBoundsCache=new Map,qu(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new mo({from:ge(we({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(pr.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 du(qd(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 qu(a,y){if(!oc(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 oe=w0(a,y);const pe=a.element.querySelector("[part=menu-toggle]");if(pe&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?pe.style.display="none":pe.style.display=""),a.model.atoms.length<=1){const be=a.options.contentPlaceholder;be&&(oe+=`<span part=placeholder class="ML__content-placeholder">${nl(be)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(oe),Of(a,y.interactive),a.dirty=!1}function Of(a,y){const b=a.field;if(!b)return;for(const pe of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))pe.remove();!(y!=null&&y)&&cc!=="error"&&cc!=="ready"&&setTimeout(()=>{cc==="ready"?Of(a):setTimeout(()=>Of(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let oe=Math.floor(re)/ee;if(oe=isNaN(oe)?1:oe,E.selectionIsCollapsed){If(a,{deferred:!0});let pe=E.at(E.position);for(;pe&&pe.type!=="prompt"&&!(pe.containsCaret&&pe.displayContainsHighlight);)pe=pe.parent;if(pe!=null&&pe.containsCaret&&pe.displayContainsHighlight){const be=Zd(a,Au(a,pe),oe);if(be){be.left/=oe,be.right/=oe,be.top/=oe,be.bottom/=oe;const Se=document.createElement("div");Se.classList.add("ML__contains-highlight"),Se.style.position="absolute",Se.style.left=`${be.left+1}px`,Se.style.top=`${Math.ceil(be.top)}px`,Se.style.width=`${Math.ceil(be.right-be.left)}px`,Se.style.height=`${Math.ceil(be.bottom-be.top)}px`,b.insertBefore(Se,b.childNodes[0])}}return}for(const pe of ag(Ud(a,{excludeAtomsWithBackground:!0}))){pe.left/=oe,pe.right/=oe,pe.top/=oe,pe.bottom/=oe;const be=document.createElement("div");be.classList.add("ML__selection"),be.style.position="absolute",be.style.left=`${pe.left}px`,be.style.top=`${pe.top}px`,be.style.width=`${Math.ceil(pe.right-pe.left)}px`,be.style.height=`${Math.ceil(pe.bottom-pe.top-1)}px`,b.insertBefore(be,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,Gc;function Ul(a,y){y=we({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Gc||(Gc={});for(const b of Object.keys(a))console.assert(!Gc[b],"Selector already defined: ",b),Gc[b]=ge(we({},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()),Gc[y]}function Md(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,oe=!1;Re(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,Se=>Se[1].toUpperCase());const pe=Gc[E],be=pe==null?void 0:pe.target;if(be==="model"){if(!a.isSelectionEditable&&(pe!=null&&pe.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Af(a),Gc[E].fn(a.model,...ee),af(a),oe=!0,re=!0}else if(be==="virtual-keyboard")oe=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Gc[E]){if(!a.isSelectionEditable&&(pe!=null&&pe.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),oe=Gc[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return be!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||pe!=null&&pe.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),pe!=null&&pe.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),oe&&_s(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&tt()&&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}Ul({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return af(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return af(a,{atIndex:a.suggestionIndex-1}),!1}Ul({complete:Cd},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ul({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Rf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Rf}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(!jd(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;Md(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(we({type:Rf,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]"]]}},Nf={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"}]},of;function E0(a,y){var b,E,ee;const re=$u.singleton;if(!re)return;const oe=kd(a),pe=(E=(b=re.getKeycap(oe==null?void 0:oe.id))==null?void 0:b.variants)!=null?E:"";if(typeof pe=="string"&&!M0(pe)||Array.isArray(pe)&&pe.length===0){y==null||y();return}const be={};let Se="";for(const Yn of fg(pe)){const Qr=_0(Yn),Un=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);be[Un]=Qr;const[Ar,ri]=Bf(Qr);Se+=`<div id=${Un} class="item ${ri}">${Ar}</div>`}const Ae=document.createElement("div");Ae.setAttribute("aria-hidden","true"),Ae.className="MLK__variant-panel",Ae.style.height="auto";const We=Object.keys(be).length;let dt=5;We===1?dt=1:We===2||We===4?dt=2:We===3||We===5||We===6?dt=3:We>=7&&We<14&&(dt=4),Ae.style.width=`calc(var(--variant-keycap-length) * ${dt} + 12px)`,Ae.innerHTML=vp.createHTML(Se),jc.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:Ae}),of=new AbortController;const{signal:Pt}=of,Kt=a==null?void 0:a.getBoundingClientRect();if(Kt){Kt.top-Ae.clientHeight<0&&(Ae.style.width="auto",We<=6?Ae.style.height="56px":We<=12?Ae.style.height="108px":We<=18?Ae.style.height="205px":Ae.classList.add("compact"));const Yn=Math.max(0,Math.min(window.innerWidth-Ae.offsetWidth,(Kt.left+Kt.right-Ae.offsetWidth)/2)),Qr=Kt.top-Ae.clientHeight+5;Ae.style.transform=`translate(${Yn}px, ${Qr}px)`,Ae.classList.add("is-visible"),requestAnimationFrame(()=>{Ae.addEventListener("pointerup",Un=>{const Ar=kd(Un.target);!(Ar!=null&&Ar.id)||!be[Ar.id]||(Eh(be[Ar.id]),sf(),y==null||y(),Un.preventDefault())},{capture:!0,passive:!1,signal:Pt}),Ae.addEventListener("pointerenter",Un=>{const Ar=kd(Un.target);!(Ar!=null&&Ar.id)||!be[Ar.id]||Ar.classList.add("is-active")},{capture:!0,signal:Pt}),Ae.addEventListener("pointerleave",Un=>{const Ar=kd(Un.target);!(Ar!=null&&Ar.id)||!be[Ar.id]||Ar.classList.remove("is-active")},{capture:!0,signal:Pt}),window.addEventListener("pointercancel",()=>{sf(),y==null||y()},{signal:Pt}),window.addEventListener("pointerup",()=>{sf(),y==null||y()},{signal:Pt})})}}function sf(){of==null||of.abort(),of=null,jc.state==="open"&&jc.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(ze))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+ze[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 Nf[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(Nf[a]||(Nf[a]=(y=dg(a))!=null?y:[]),Nf[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 lf(a){if(!a)return"";const y=new mo,b=new pr({mode:"math",type:"root",body:tl(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=Eu(qd(new qr(b.render(y),{classes:"ML__base"}),y));return du(E,{classes:"ML__latex"}).toMarkup()}function cf(a){var y;if(Array.isArray(a))return a.map(E=>cf(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=>_0(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 pe=nf();pe&&(E=pe.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[it.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,oe=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 pe of re){const be=[];for(const Se of pe)/[a-z]/.test(Se)?be.push({label:Se,class:"hide-shift",shift:{label:Se.toUpperCase()},variants:M0(Se)?Se:void 0}):Se==="~"?E!=="dvorak"?be.push("[backspace]"):be.push({label:"[backspace]",width:1}):Se==="^"?be.push("[shift]"):Se===" "&&be.push("[separator-5]");oe.push(be)}return oe.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:cf({rows:oe})}}function k0(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}"`),k0(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,oe=ft(ee,["rows"]);y=ge(we({},oe),{layers:cf({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,oe=ft(ee,["markup"]);y=ge(we({},oe),{layers:cf(a.markup)})}else y=we({},a),"layers"in a?y.layers=cf(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()){_d(re)&&(b=!0);const oe=re.command;typeof oe=="string"&&["undo","redo","cut","copy","paste"].includes(oe)&&(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,oe]of a.normalizedLayouts.entries()){const pe=oe,be=[re===y?"selected":"layer-switch"];pe.tooltip&&be.push("MLK__tooltip"),pe.labelClass&&be.push(...pe.labelClass.split(" ")),ee+=`<div class="${be.join(" ")}"`,pe.tooltip&&(ee+=" data-tooltip='"+((b=yt(pe.tooltip))!=null?b:pe.tooltip)+"' "),re!==y&&(ee+=`data-layer="${pe.layers[0].id}"`),ee+=`>${(E=pe.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='${yt("tooltip.undo")}'>
<svg><use xlink:href='#svg-undo' /></svg>
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
data-command='"redo"'
data-tooltip='${yt("tooltip.redo")}'>
<svg><use xlink:href='#svg-redo' /></svg>
</div>`,cutToClipboard:`
<div class='action'
data-command='"cutToClipboard"'
data-tooltip='${yt("tooltip.cut to clipboard")}'>
<svg><use xlink:href='#svg-cut' /></svg>
</div>
`,copyToClipboard:`
<div class='action'
data-command='"copyToClipboard"'
data-tooltip='${yt("tooltip.copy to clipboard")}'>
<svg><use xlink:href='#svg-copy' /></svg>
</div>
`,pasteFromClipboard:`
<div class='action'
data-command='"pasteFromClipboard"'
data-tooltip='${yt("tooltip.paste from clipboard")}'>
<svg><use xlink:href='#svg-paste' /></svg>
</div>
`};return b+=ee.map(oe=>re[oe]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=$u.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]=Bf(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){Vl("virtual-keyboard"),Vl("core"),$f()}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((oe,pe)=>Eg(a,oe,pe)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",kg,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const oe of ee)oe.addEventListener("click",pe=>{var be,Se;let Ae=pe.target,We="";for(;Ae&&!We;)We=(be=Ae==null?void 0:Ae.getAttribute("data-command"))!=null?be:"",Ae=(Se=Ae==null?void 0:Ae.parentElement)!=null?Se:null;We&&a.executeCommand(JSON.parse(We))});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 oe of re)oe.addEventListener("pointerdown",pe=>pe.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),[oe,pe]=Bf(ee);/(^|\s)separator/.test(pe)?b+=`<div class="${pe}"`:b+=`<div tabindex="-1" id="${re}" class="${pe}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${oe}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Bf(a,y={shifted:!1}){var b,E,ee,re,oe,pe,be;let Se="",Ae=(b=a.class)!=null?b:"";if(y.shifted&&_d(a)&&(Ae+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?Se=lf(a.shift):typeof a.shift=="object"&&(Se=a.shift.label?a.shift.label:(E=lf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(Ae=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(Se=a.label?a.label:(oe=lf(a.latex||a.insert||"")||a.key)!=null?oe:"",a.shift){let We;typeof a.shift=="string"?We=lf(a.shift):a.shift.label?We=a.shift.label:We=(pe=lf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?pe:"",Se+=`<span class="MLK__shift">${We}</span>`}a.aside&&(Se+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(Ae)&&(Ae+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(Ae)||(Ae+=" MLK__keycap"),!/\bw[0-9]+\b/.test(Ae)&&a.width&&(Ae+=(be={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?be:""),[Se,Ae||"MLK__keycap"]}var Qu={"[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 _0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Qu[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Qu[a.label]&&(b=ge(we(we({},Qu[a.label]),a),{label:Qu[a.label].label})),"key"in a&&a.key&&Qu[a.key]&&(b=ge(we(we({},Qu[a.key]),a),{key:Qu[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=we(we({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=we(we({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=we(we({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=we(we({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var uf;function kg(a){var y;if(a.button!==0)return;const b=$u.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=kd(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const oe=new AbortController,pe=oe.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Ff(oe),{capture:!0,signal:pe}),ee.addEventListener("pointerleave",Ff(oe),{capture:!0,signal:pe}),ee.addEventListener("pointercancel",Ff(oe),{signal:pe}),ee.addEventListener("pointerup",Ff(oe),{signal:pe}),_d(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(uf&&clearTimeout(uf),uf=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,()=>{oe.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Ff(a){return y=>{const b=kd(y.target);if(!(b!=null&&b.id))return;const E=$u.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"),_d(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"),_d(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){uf&&clearTimeout(uf),_d(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=$u.singleton)==null||y.executeCommand(b)}function _g(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 kd(a){if(!a)return;let y=a;for(;y&&!_g(y);)y=y.parentElement;return y!=null?y:void 0}function _d(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var $u=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 oe=L0();oe&&!oe.readOnly&&oe.mathVirtualKeyboardPolicy==="auto"&&st()&&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=>k0(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,oe]=Bf(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=oe}}}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 oe=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${oe}px)`:`${oe}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}),sf(),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(!jd(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=Md(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:we({type:Rf,action:y},b)}));return}if(E)E.postMessage(we({type:Rf,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=Md(y);return Re(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Md(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Gc[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=Df(),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=$u.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function zf(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,oe]=E.split(",").map(pe=>parseInt(pe.trim()));y.scriptDepth=[re,oe]}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=$u.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?it.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=gt(a.macros);break;default:Re(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=we({},a[b]):y[b]=a[b]}return y}function ed(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]=we({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Hf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:lt,backgroundColorMap:Ze,letterShapeStyle:it.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:_o,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function D0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function Ou(a,y){!a||!y||(Re(a)?a.forEach(b=>Ou(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),Ou(a.body,y),Ou(a.above,y),Ou(a.below,y),Ou(a.subscript,y),Ou(a.superscript,y)))}function Mh(a,y,b,E){function ee(oe,pe){for(const be of re)if(be.style[oe]!==pe)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=Jl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const oe of re)oe.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 mu(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Dg(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}qn(["math","displaymath"],Sc),qn("center",Sc),Bt("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 Ga("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),lr("array","{columns:colspec}",(a,y,b,E)=>new Ga(a,kh(y),b,{columns:E[0],mathstyleName:"textstyle"})),lr(["equation","equation*","subequations"],"",(a,y,b)=>new Ga(a,kh(y),b,{columns:[{align:"c"}]})),lr(["multline","multline*"],"",Sc),lr(["align","align*","aligned","eqnarray"],"",Sc),lr("split","",Sc),lr(["gather","gathered"],"",Sc),lr(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Sc),lr(["smallmatrix","smallmatrix*"],"[columns:colspec]",Sc),lr(["cases","dcases","rcases"],"",Sc);function Ag(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function kh(a,y=1){return Ag(a)?Array(y).fill([[new pr({type:"first"}),new ba]]):a.map(b=>b.length===0?[[new pr({type:"first"})]]:b.map(E=>E.length===0?[new pr({type:"first"})]:(E[0].type!=="first"&&E.unshift(new pr({type:"first"})),E)))}function Sc(a,y=[[[]]],b=[],E=[]){switch(y=kh(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new Ga(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new Ga(a,y,b,{mathstyleName:"textstyle"});case"center":return new Ga(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new Ga(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Ga(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Ga(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:td(E[0])});case"bmatrix":case"bmatrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:td(E[0])});case"Bmatrix":case"Bmatrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:td(E[0])});case"vmatrix":case"vmatrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:td(E[0])});case"Vmatrix":case"Vmatrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:td(E[0])});case"matrix":case"matrix*":return new Ga(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:td(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new Ga(a,y,b,{mathstyleName:"scriptstyle",columns:td(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Ga(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 Ga(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Ga(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const pe of y)ee=Math.max(ee,pe.length);const re=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let oe=2;for(;oe<ee;)re.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),oe+=2;return re.push({gap:0}),new Ga(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new Ga(a,y,b,{mathstyleName:"textstyle"})}function td(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 Tg(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof Ga);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof Ga)){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=Zf()),ee.length===0&&(ee=Zf());let oe;return y.endsWith("column")?(oe=Sc("split",[[re,ee]]),a.root=oe,nd(oe,0,0)?rd(a,oe,0,0):nd(oe,0,1)?rd(a,oe,0,1):a.position=a.offsetOf(E)):(oe=Sc("lines",[[re],[ee]]),a.root=oe,nd(oe,0,0)?rd(a,oe,0,0):nd(oe,1,0)?rd(a,oe,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof No){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),oe=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);oe.length===0&&(oe=Zf()),re.length===0&&(re=Zf());let pe="pmatrix";const be=ee.leftDelim,Se=ee.rightDelim;be==="("&&(Se===")"||Se==="?")?pe="pmatrix":(be==="["||be==="\\lbrack")&&(Se==="]"||Se==="\\rbrack"||Se==="?")?pe="bmatrix":be==="\\vert"&&Se==="\\vert"?pe="vmatrix":be==="\\Vert"&&Se==="\\Vert"?pe="Vmatrix":(be==="{"||be==="\\lbrace")&&(Se==="."||Se==="?")&&(pe="cases");const Ae=Sc(pe,y.endsWith("column")?[[oe,re]]:[[oe],[re]]);return ee.parent.addChildBefore(Ae,ee),ee.parent.removeChild(ee),nd(Ae,0,0)?rd(a,Ae,0,0):y.endsWith("column")?nd(Ae,0,1)?rd(a,Ae,0,1):a.position=a.offsetOf(b):nd(Ae,1,0)?rd(a,Ae,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof Ga?[b.parent,b.parentBranch]:[void 0,[0,0]]}function nd(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Ig(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function rd(a,y,b,E){const ee=Ig(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Kf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Wf(a,y){const[b,[E,ee]]=Tg(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Kf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Kf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Kf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Kf(a,b,E,ee,"start");break}}function A0(a){return a.contentWillChange({inputType:"insertText"})?(Wf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Wf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function T0(a){return a.contentWillChange({inputType:"insertText"})?(Wf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function $g(a){return a.contentWillChange({inputType:"insertText"})?(Wf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(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 Ga);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof Ga){const E=b.parent,ee=b.parentBranch;let re;switch(y){case"row":if(E.rowCount>1){E.removeRow(ee[0]);const oe=E.getCell(Math.max(0,ee[0]-1),ee[1]);re=a.offsetOf(oe[oe.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ee[1]);const oe=E.getCell(ee[0],Math.max(0,ee[1]-1));re=a.offsetOf(oe[oe.length-1])}break}re&&a.setPositionHandlingPlaceholder(re)}}function Og(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}Ul({addRowAfter:A0,addColumnAfter:T0,addRowBefore:Pg,addColumnBefore:$g,removeRow:Og,removeColumn:Rg,setEnvironment:I0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Zf(){return[new ba]}var $0=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}};$0.maximumDepth=1e3;var Ng=$0;function _h(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,oe;do oe=a.at(re).mode==="text"&&he.test(a.at(re).value),re+=E;while(a.at(re)&&oe);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 oe=!0;do oe=a.at(re).mode==="text"&&!/\s/.test(a.at(re).value),re+=E;while(a.at(re)&&oe);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 oe=!0;for(;a.at(re)&&oe;)oe=a.at(re).mode==="text"&&/\s/.test(a.at(re).value),oe&&(ee=re),re+=E;ee=a.at(re)?re-2*E:re-E}return ee-(E>0?0:1)}function Ld(a,y,b){var E,ee,re,oe,pe,be,Se;const Ae=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let We=a.at(a.position);if(y==="forward"&&(We.type==="subsup"?(We=We.rightSibling,We||(We=a.at(a.position+1))):We=a.at(a.position+1)),!We)return a.announce("plonk"),!1;let dt=a.offsetOf(We);if(We instanceof ic)dt=_h(a,dt,y);else if(We instanceof cl)if(We.isSuggestion)for(console.assert(y==="forward");We&&We instanceof cl;)We.isSuggestion=!1,dt=a.offsetOf(We),We=We.rightSibling;else if(y==="forward"){if(We=We.rightSibling,!We||!(We instanceof cl))return a.announce("plonk"),!1;for(;We&&We instanceof cl&&/[a-zA-Z\*]/.test(We.value);)dt=a.offsetOf(We),We=We.rightSibling}else{if(We=We.leftSibling,!We||!(We instanceof cl))return a.announce("plonk"),!1;for(;We&&We instanceof cl&&/[a-zA-Z\*]/.test(We.value);)dt=a.offsetOf(We),We=We.leftSibling}else if(y==="forward"&&We.type==="mopen"){let Pt=0;do We.type==="mopen"?Pt+=1:We.type==="mclose"&&(Pt-=1),We=We.rightSibling;while(!We.isLastSibling&&Pt!==0);dt=a.offsetOf(We.leftSibling)}else if(y==="backward"&&We.type==="mclose"){let Pt=0;do We.type==="mopen"?Pt+=1:We.type==="mclose"&&(Pt-=1),We=We.leftSibling;while(!We.isFirstSibling&&Pt!==0);dt=a.offsetOf(We)}else if(y==="backward")if(We.type==="first")for(;dt>0&&We.type==="first";)dt-=1,We=a.at(dt);else{const Pt=We.type;We.type==="subsup"&&(dt=a.offsetOf(a.at(dt).leftSibling)),dt-=1;let Kt=(ee=a.at(dt))==null?void 0:ee.type;for(;dt>=0&&Kt===Pt;)((re=a.at(dt))==null?void 0:re.type)==="subsup"?dt=a.offsetOf(a.at(dt).leftSibling):dt-=1,Kt=a.at(dt).type}else{const{type:Pt}=We;let Kt=(oe=a.at(dt))==null?void 0:oe.type;const{lastOffset:Yn}=a;for(;dt<=Yn&&(Kt===Pt||Kt==="subsup");){for(;((pe=a.at(dt).rightSibling)==null?void 0:pe.type)==="subsup";)dt=a.offsetOf(a.at(dt).rightSibling);dt+=1,Kt=(be=a.at(dt))==null?void 0:be.type}dt-=1}if((Se=b==null?void 0:b.extend)!=null&&Se){if(!a.setSelection(a.anchor,dt))return a.announce("plonk"),!1}else{if(dt===a.position)return a.announce("plonk"),!1;a.position=dt}return a.announce("move",Ae),a.mathfield.stopCoalescingUndo(),!0}function Yc(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[pe,be]=g0(a);pe!==void 0&&be!==void 0&&a.deleteAtoms([pe,be])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let pe=Vf(a,a.position,y);pe<0&&(pe=0),pe>a.lastOffset&&(pe=a.lastOffset);const be=a.setSelection(a.anchor,pe);return a.mathfield.stopCoalescingUndo(),be}if(a.selectionIsPlaceholder){a.collapseSelection(y);const pe=Yc(a,y);return a.mathfield.stopCoalescingUndo(),pe}let re=a.position;const oe=re;if(a.collapseSelection(y)?(re=a.position,O0(a,re)||(re=Vf(a,re,y))):re=Vf(a,re,y),re<0||re>a.lastOffset){let pe=!0;return a.silenceNotifications||(pe=(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),pe&&a.announce("plonk"),pe}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",oe),!0}function Vf(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||O0(a,y)?y:Vf(a,y,b)}function O0(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 Bg(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=vd(a.getHTMLElement(y[ee])).right,oe=Math.abs(b-re);if(oe<=E)E=oe;else break}return y[ee-1]}function Uf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,oe=re?b.filter(Se=>Se.type==="prompt"&&!Se.captureSelection):b,pe=vd(a.mathfield.getHTMLElement(y)).right,be=a.offsetOf(Bg(a.mathfield,oe,pe))-(re?1:0);if(E){const[Se,Ae]=a.selection.ranges[0];let We;be<(ee==="up"?Se:Ae)?We={ranges:[[be,Ae]],direction:"backward"}:We={ranges:[[Se,be]],direction:"forward"},a.setSelection(We)}else a.setPositionHandlingPlaceholder(be);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 be,Se;let Ae=!0;return a.silenceNotifications||(Ae=(Se=(be=a.mathfield.host)==null?void 0:be.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Se:!0),a.announce(Ae?"plonk":"line"),Ae},oe=a.at(a.position);let pe=oe;for(;pe&&pe.parentBranch!=="below"&&!(Array.isArray(pe.parentBranch)&&pe.parent instanceof Ga);)pe=pe.parent;if(Array.isArray(pe==null?void 0:pe.parentBranch)&&pe.parent instanceof Ga){const be=pe.parent;if(pe.parentBranch[0]<1)return re();const Se=pe.parentBranch[0]-1,Ae=be.array[Se][pe.parentBranch[1]];if(!Ae.some(dt=>dt.type==="prompt"&&!dt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Uf(a,oe,Ae,ee,"up")}else if(pe){const be=(E=pe.parent.branch("above"))!=null?E:pe.parent.createBranch("above");if(!be.some(Ae=>Ae.type==="prompt"&&Ae.placeholderId)&&a.mathfield.hasEditablePrompts)return re();Uf(a,oe,be,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 be,Se;let Ae=!0;return a.silenceNotifications||(Ae=(Se=(be=a.mathfield.host)==null?void 0:be.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Se:!0),a.announce(Ae?"plonk":"line"),Ae},oe=a.at(a.position);let pe=oe;for(;pe&&pe.parentBranch!=="above"&&!(Array.isArray(pe.parentBranch)&&pe.parent instanceof Ga);)pe=pe.parent;if(Array.isArray(pe==null?void 0:pe.parentBranch)&&pe.parent instanceof Ga){const be=pe.parent;if(pe.parentBranch[0]+1>be.array.length-1)return re();const Se=pe.parentBranch[0]+1,Ae=be.array[Se][pe.parentBranch[1]];if(!Ae.some(dt=>dt.type==="prompt"&&!dt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Uf(a,oe,Ae,ee,"down")}else if(pe){const be=(E=pe.parent.branch("below"))!=null?E:pe.parent.createBranch("below");if(!be.some(Ae=>Ae.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();Uf(a,oe,be,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 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=!1):E=!0,b=b.parent;return E?y:0}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=!0):E=!1,b=b.parent;return E?y:0}function N0(a){var y;if(a.collapseSelection(),Hg(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 xc({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function B0(a){var y;if(a.collapseSelection(),Kg(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 xc({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(be){const Se=[],Ae=[];return[...be.querySelectorAll(`input, select, textarea, a[href], button,
[tabindex], audio[controls], video[controls],
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((dt,Pt)=>{const Kt=E(dt);Kt===0?Se.push(dt):Ae.push({documentOrder:Pt,tabIndex:Kt,node:dt})}),Ae.sort((dt,Pt)=>dt.tabIndex===Pt.tabIndex?dt.documentOrder-Pt.documentOrder:dt.tabIndex-Pt.tabIndex).map(dt=>dt.node).concat(Se)}function y(be){return!(!b(be)||ee(be)||E(be)<0)}function b(be){return!(be.disabled||be.type==="hidden"&&be.tagName.toUpperCase()==="INPUT"||pe(be))}function E(be){var Se;const Ae=Number.parseInt((Se=be.getAttribute("tabindex"))!=null?Se:"NaN",10);return Number.isNaN(Ae)?be.contentEditable==="true"||(be.nodeName==="AUDIO"||be.nodeName==="VIDEO")&&be.getAttribute("tabindex")===null?0:be.tabIndex:Ae}function ee(be){return be.tagName.toUpperCase()==="INPUT"&&be.type==="radio"&&!oe(be)}function re(be,Se){for(const Ae of be)if(Ae.checked&&Ae.form===Se)return Ae;return null}function oe(be){var Se;if(!be.name)return!0;const We=((Se=be.form)!=null?Se:be.ownerDocument).querySelectorAll('input[type="radio"][name="'+be.name+'"]'),dt=re(We,be.form);return!dt||dt===be}function pe(be){if(!ht()||be===document.activeElement||be.contains(document.activeElement))return!1;if(getComputedStyle(be).visibility==="hidden")return!0;const Se=be.getBoundingClientRect();if(Se.width===0||Se.height===0)return!0;for(;be;){if(getComputedStyle(be).display==="none")return!0;be=be.parentElement}return!1}return ht()?a(document.body):[]}function Ll(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"?Ll(a,[y.leftSibling,y]):Ll(a,[y,y.leftSibling])}function $c(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 jf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Yc(a,y);let oe;const pe=a.at(a.anchor).parentPrompt;pe?y==="forward"?oe=a.offsetOf(pe)+1:oe=a.offsetOf(pe.leftSibling):oe=Math.max(a.position+re,0);const be=Lh(a,oe,y);if(!be||y==="forward"&&a.offsetOf(be)<oe||y==="backward"&&a.offsetOf(be)>oe){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 Ae=Wg();if(!document.activeElement||Ae.length<=1)return a.announce("plonk"),!1;let We=Ae.indexOf(document.activeElement)+re;return We<0&&(We=Ae.length-1),We>=Ae.length&&(We=0),Ae[We].focus(),a.mathfield.stopCoalescingUndo(),!0}return $c(a,be),!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)}Ul({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 pe=b.subsupPlacement?B0(a):N0(a);return a.mathfield.stopCoalescingUndo(),pe}E.branch(re)||E.createBranch(re);const oe=a.setSelection(a.getBranchRange(a.offsetOf(E),re));return a.mathfield.stopCoalescingUndo(),oe},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=>Yc(a,"forward"),moveToPreviousChar:a=>Yc(a,"backward"),moveUp:a=>Yc(a,"upward"),moveDown:a=>Yc(a,"downward"),moveToNextWord:a=>Ld(a,"forward"),moveToPreviousWord:a=>Ld(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 jf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let dt=re;for(;dt&&dt.mode==="text";)dt=dt.leftSibling;let Pt=re;for(;((y=Pt.rightSibling)==null?void 0:y.mode)==="text";)Pt=Pt.rightSibling;if(dt&&Pt)return Ll(a,[dt,Pt])}if(re.rightSibling.mode==="text"){let dt=re;for(;dt&&dt.mode==="text";)dt=dt.rightSibling;return dt?($c(a,(b=dt.leftSibling)!=null?b:dt),a.mathfield.switchMode("math"),!0):$c(a,a.lastOffset)}}const pe=a.at(a.anchor).parentPrompt,be=pe?a.offsetOf(pe)+1:Math.max(a.position+1,0),Se=Lh(a,be,"forward");if(Se)return $c(a,Se);const Ae=F0(a,re,dt=>dt.type==="leftright"||dt.type==="text","forward");if(Ae){if(Ae.mode==="text"){let dt=Ae;for(;dt&&dt.mode==="text";)dt=dt.rightSibling;return Ll(a,[(E=Ae.leftSibling)!=null?E:Ae,(ee=dt.leftSibling)!=null?ee:dt])}return Ll(a,Ae)}const We=re.parent;if(We){if(We.type==="leftright"||We.type==="surd")return Ll(a,We);if(re.parentBranch==="superscript"&&We.subscript)return Ll(a,We.subscript);if(re.parentBranch==="above"&&We.below)return Ll(a,We.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return $c(a,We);if(re.parentBranch==="above"||re.parentBranch==="below")return Ll(a,We)}return $c(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return jf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let pe=b;for(;pe&&pe.mode==="text";)pe=pe.leftSibling;let be=b;for(;((y=be.rightSibling)==null?void 0:y.mode)==="text";)be=be.rightSibling;if(pe&&be)return Ll(a,[pe,be])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?$c(a,b):$c(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),oe=Lh(a,re,"backward");if(oe)return $c(a,oe);if(E==="math"){const pe=F0(a,b,Se=>Se.type==="leftright"||Se.type==="text","backward");if(pe){if(pe.mode==="text"){let Se=pe;for(;Se&&Se.mode==="text";)Se=Se.leftSibling;return Ll(a,[pe,Se])}return Ll(a,pe)}const be=b.parent;if(be){if(be.type==="leftright"||be.type==="surd")return Ll(a,be);if(b.parentBranch==="subscript"&&be.superscript)return Ll(a,be.superscript);if(b.parentBranch==="below"&&be.above)return Ll(a,be.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return $c(a,be);if(b.parentBranch==="above"||b.parentBranch==="below")return Ll(a,be)}return $c(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:N0,moveToSubscript:B0},{target:"model",changeSelection:!0}),Ul({moveToNextPlaceholder:a=>jf(a,"forward"),moveToPreviousPlaceholder:a=>jf(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 Gf(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 oe=a.at(E);ee=y===0||oe===void 0||oe.type==="first"||oe.mode!=="math"||!(oe.type&&/mord|mpunct|operator/.test(oe.type)||oe.type==="mop"&&/[a-zA-Z ]+/.test(oe.value))||!oe.hasEmptyBranch("superscript")||!oe.hasEmptyBranch("subscript")||typeof b=="function"&&!b(oe),ee||(oe.mode="text",oe.command=oe.value,oe.verbatimLatex=void 0,re+=oe.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function id(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 oe=a.at(E);ee=y===0||!oe||oe.type==="first"||oe.isFirstSibling||oe.mode!=="text"||oe.value===" "||typeof b=="function"&&!b(oe),ee||(re.push(pr.serialize([oe],{defaultMode:"math"})),oe.mode="math"),E-=1,y-=1}Dh(a),a.contentDidChange({data:io(re),inputType:"insertText"})}function Dh(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 Vg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Lf(b))return!1;const ee=Sd(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)&&id(E,1),!0;const oe={")":"(","}":"{","]":"["}[ee],{parent:pe}=E.at(E.position);if(oe&&pe instanceof No&&pe.leftDelim===oe)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 id(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){id(E,1);const be=E.at(E.position);return be.value="\u22C5",be.style.variant="normal",be.command="\\cdot",be.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 id(E,1),!0;if(/\([a-z][,;]$/.test(re))return id(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Dh(E),!0}else{if(y==="[Space]")return Gf(E,void 0,oe=>/[a-z][:,;.]$/.test(oe.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Gf(E,void 0,oe=>/[a-zA-Z]/.test(oe.value)),!0;if(/(^|\W)(if)$/i.test(re))return Gf(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 Gf(E,void 0,oe=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(oe.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function Ug(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 jg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Tf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Vl("keystroke-caption"),Vl("core"),Tf("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function H0(a,y){var b,E,ee;const{model:re}=a,oe=p0(y);if(y.isTrusted){Nm(y);const Pt=nf();a.keyboardLayout!==Pt.id&&(a.keyboardLayout=Pt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Ug(a,oe),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let pe,be="",Se;const Ae=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(oe==="[Backspace]")Ae.pop();else if(!Lf(y))a.flushInlineShortcutBuffer();else{const Pt=Sd(y),Kt=[...(E=(b=Ae[Ae.length-1])==null?void 0:b.keystrokes)!=null?E:[],Pt];Ae.push({state:re.getState(),keystrokes:Kt,leftSiblings:Yg(a)});let Yn=0,Qr="";for(;!pe&&Yn<Kt.length;)Se=Ae.length-(Kt.length-Yn),Qr=Kt.slice(Yn).join(""),pe=Ia(Ae[Se].leftSiblings,Qr,a.options.inlineShortcuts),!pe&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Qr)&&(pe=a.options.onInlineShortcut(a,Qr)),Yn+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(pe?a.switchMode("math"):Vg(a,oe,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),be=""))}if(!pe){if(be||(be=Zm(a.keybindings,re.mode,y)),!be&&(oe==="[Enter]"||oe==="[Return]")){let Pt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(Pt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),Pt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),Pt}if((!be||oe==="[Space]")&&re.mode==="math"){if(oe==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return Va.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),be="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const Pt=re.at(re.position+1),Kt=re.at(re.position-1);if((Pt==null?void 0:Pt.mode)==="text"||(Kt==null?void 0:Kt.mode)==="text")return Va.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===","&&Sd(y)===","&&(be="insertDecimalSeparator")}}if(!pe&&!be){if(re.mathfield.smartFence){if(Th(re,Sd(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:Pt}=re.at(re.position);if(Pt instanceof No&&Pt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(oe))return a.snapshot(),Pt.isDirty=!0,Pt.rightDelim=oe,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Sd(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const Kt=Sd(y);if(Kt==="("||Kt==="{"||Kt==="["){const Yn={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Kt],Qr={"(":")","{":"\\rbrace","[":"\\rbrack"}[Kt],[Un,Ar]=As(re.selection);return a.snapshot(),re.position=Ar,Va.insert(re,Qr,{format:"latex"}),re.position=Un,Va.insert(re,Yn,{format:"latex"}),re.setSelection(Un+1,Ar+1),re.contentDidChange({data:Kt,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const We=re.at(Math.max(re.position,re.anchor)),{parent:dt}=We;if(be==="moveAfterParent"&&(dt==null?void 0:dt.type)==="leftright"&&We.isLastSibling&&a.options.smartFence&&Th(re,".",a.defaultStyle)&&(be="",_s(a)),a.keyboardDelegate.cancelComposition(),be)a.executeCommand(be);else if(pe){const Pt=a.effectiveStyle;re.setState(Ae[Se].state);const Kt=Ae[Ae.length-1].keystrokes;for(const Yn of Kt)Va.insert(re,Yn,{silenceNotifications:!0,style:Pt});a.snapshot("insert-shortcut"),re.setState(Ae[Se].state),re.deferNotifications({content:!0,selection:!0,data:pe,type:"insertText"},()=>(Va.insert(re,pe,{format:"latex",style:Pt}),Dh(a.model),pe.endsWith(" ")&&(a.switchMode("text"),Va.insert(re," ",{style:Pt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Ah(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=Ku(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(be=>be.toUpperCase())),b.simulateKeystroke){let be=!0;for(const Se of ee)H0(a,new KeyboardEvent("keypress",{key:Se}))&&(be=!1);if(be)return}const oe=E.at(E.position),pe=we(we({},oe.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(As(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Af(a);for(const be of ee)Va.insert(E,be);a.snapshot("insert-latex"),af(a)});else if(E.mode==="text"){for(const be of ee)Va.insert(E,be,{style:pe});a.snapshot("insert-text")}else if(E.mode==="math")for(const be of ee)Xg(a,be,pe,oe);a.dirty=!0,a.scrollIntoView()}function Yg(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 Xg(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){Jg(ee),Va.insert(ee,y,{style:b}),a.snapshot(),R0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const oe=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(oe==null?void 0:oe.type)==="mord"&&/[a-zA-Z0-9]/.test(oe.value)&&(b=we({},b),oe.style.variant&&(b.variant=oe.style.variant),oe.style.variantStyle&&(b.variantStyle=oe.style.variantStyle))}Va.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Jg(a){a.selectionIsCollapsed||(a.deleteAtoms(As(a.selection)),a.mathfield.snapshot("delete"))}function Th(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 oe=te[re],pe=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[be,Se]=As(a.selection),Ae=a.extractAtoms([be,Se]),We=ee.addChildrenAfter([new No("left...right",Ae,{leftDelim:re,rightDelim:pe})],a.at(be));return a.setSelection(a.offsetOf(We.firstChild),a.offsetOf(We.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const be=ee instanceof No?ee.leftDelim+ee.rightDelim:"";if(be==="\\lbrace\\rbrace"||be==="\\{\\}"||be==="\\lbrace?")return a.mathfield.snapshot(),Va.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(pe){if(ee instanceof No&&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 No)){let We=E;for(;We&&!(We.type==="mclose"&&We.value===pe);)We=We.rightSibling;if(We){a.mathfield.snapshot();const dt=a.extractAtoms([a.offsetOf(E),a.offsetOf(We)]);return dt.pop(),ee.addChildrenAfter([new No("left...right",dt,{leftDelim:re,rightDelim:pe})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const be=a.offsetOf(E.lastSibling);let Se;for(Se=a.position;Se<=be;Se++){const We=a.at(Se);if(We instanceof No&&(We.leftDelim==="?"||We.leftDelim===".")&&K0(re,We.rightDelim))break}const Ae=a.at(Se);if(Se<=be&&Ae instanceof No){Ae.leftDelim=re,a.mathfield.snapshot();let We=a.extractAtoms([a.position,Se-1]);return We=We.filter(dt=>dt.type!=="first"),Ae.addChildren(We,Ae.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof No&&(ee.leftDelim==="?"||ee.leftDelim===".")&&K0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const We=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const dt of We)ee.parent.addChildBefore(dt,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof No&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),Va.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const We=a.offsetOf(E.lastSibling),dt=a.extractAtoms([a.position,We]);a.at(a.position).body=dt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(oe){let be=E;for(;be;){if(be.type==="mopen"&&be.value===oe){a.mathfield.snapshot();const Pt=be.leftSibling,Kt=a.extractAtoms([a.offsetOf(be.leftSibling),a.offsetOf(E)]);Kt.shift();const Yn=new No("left...right",Kt,{leftDelim:oe,rightDelim:re});return ee.addChildrenAfter([Yn],Pt),a.position=a.offsetOf(Yn),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}be=be.leftSibling}if(ee instanceof No&&E.isLastSibling&&Ih(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 Se=a.offsetOf(E.firstSibling);let Ae;for(Ae=a.position;Ae>=Se;Ae--){const Pt=a.at(Ae);if(Pt instanceof No&&(Pt.rightDelim==="?"||Pt.rightDelim===".")&&Ih(Pt.leftDelim,re))break}const We=a.at(Ae);if(Ae>=Se&&We instanceof No)return a.mathfield.snapshot(),We.rightDelim=re,We.addChildren(a.extractAtoms([Ae,a.position]),We.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof No&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Ih(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 dt=ee.parent;return dt instanceof No&&(dt.rightDelim==="?"||dt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(dt),Th(a,re,b)):!1}return!1}function Ih(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function K0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ul({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:jg,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)=>(Ah(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}}),Ul({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"}),Ul({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})&&(af(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),_s(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function qg(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=we(we({},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}Ul({applyStyle:qg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,oe,pe,be,Se,Ae,We;const dt={};if(typeof y.color=="string"){const Kt=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";Kt!==y.color&&(dt.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),dt.color=Kt}if(typeof y.backgroundColor=="string"){const Kt=(oe=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?oe:"none";Kt!==y.backgroundColor&&(dt.verbatimBackgroundColor=(pe=y.verbatimBackgroundColor)!=null?pe:y.backgroundColor),dt.backgroundColor=Kt}typeof y.fontFamily=="string"&&(dt.fontFamily=y.fontFamily),typeof y.series=="string"&&(dt.fontSeries=y.series),typeof y.fontSeries=="string"&&(dt.fontSeries=y.fontSeries.toLowerCase()),dt.fontSeries&&(dt.fontSeries=(be={bold:"b",medium:"m",normal:"m"}[dt.fontSeries])!=null?be:dt.fontSeries),typeof y.shape=="string"&&(dt.fontShape=y.shape),typeof y.fontShape=="string"&&(dt.fontShape=y.fontShape.toLowerCase()),dt.fontShape&&(dt.fontShape=(Se={italic:"it",up:"n",upright:"n",normal:"n"}[dt.fontShape])!=null?Se:dt.fontShape),y.variant&&(dt.variant=y.variant.toLowerCase()),y.variantStyle&&(dt.variantStyle=y.variantStyle.toLowerCase());const Pt=(Ae=y.size)!=null?Ae:y.fontSize;return typeof Pt=="number"?dt.fontSize=Math.max(1,Math.min(10,Pt)):typeof Pt=="string"&&(dt.fontSize=(We={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[Pt.toLowerCase()])!=null?We:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[Pt]),dt}function $h(a){let[y,b]=As(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 oe=a.at(y);if(!oe)return y;const pe=b==="forward"?1:-1;if(oe.mode==="text"){for(;oe&&!(oe.mode!=="text"||!he.test(oe.value));)y+=pe,oe=a.at(y);return b==="backward"?y-1:y}if(oe.mode==="latex"){if(/[a-zA-Z\*]/.test(oe.value))if(b==="backward")for(;oe&&oe.mode==="latex"&&oe.value!=="\\"&&/[a-zA-Z]/.test(oe.value);)y+=pe,oe=a.at(y);else for(;oe&&oe.mode==="latex"&&/[a-zA-Z\*]/.test(oe.value);)y+=pe,oe=a.at(y);else if(oe.value==="{"){if(b==="forward"){for(;oe&&oe.mode==="latex"&&oe.value!=="}";)y+=pe,oe=a.at(y);return y}return y-1}else if(oe.value==="}"){if(b==="backward"){for(;oe&&oe.mode==="latex"&&oe.value!=="{";)y+=pe,oe=a.at(y);return y-1}return y}return y-1}if(oe.mode==="math"){if(oe.isDigit()){for(;(E=a.at(y+pe))!=null&&E.isDigit();)y+=pe;return b==="backward"?y-1:y}if(oe.style.variant||oe.style.variantStyle){let be=(ee=a.at(y))==null?void 0:ee.style;for(;be&&be.variant===oe.style.variant&&be.variantStyle===oe.style.variantStyle;)be=(re=a.at(y+pe))==null?void 0:re.style,y+=pe;return b==="backward"?y-1:y}return y}return y}Ul({selectGroup:a=>{const y=$h(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Yc(a,"forward",{extend:!0}),extendSelectionBackward:a=>Yc(a,"backward",{extend:!0}),extendToNextWord:a=>Ld(a,"forward",{extend:!0}),extendToPreviousWord:a=>Ld(a,"backward",{extend:!0}),extendSelectionUpward:a=>Yc(a,"upward",{extend:!0}),extendSelectionDownward:a=>Yc(a,"downward",{extend:!0}),extendToNextBoundary:a=>Ld(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Ld(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 ad=null,df=0,Yf=class Ec{static start(y,b,E,ee){var re;Ec.element=y,(re=Ec.controller)==null||re.abort(),Ec.controller=new AbortController;const oe={signal:Ec.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,oe),y.addEventListener("pointerup",ee,oe),y.addEventListener("pointercancel",ee,oe),Oh(b)&&(Ec.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,oe),window.addEventListener("blur",ee,oe),window.addEventListener("mouseup",ee,oe))}static stop(){var y;(y=Ec.controller)==null||y.abort(),Ec.controller=void 0,typeof Ec.pointerId=="number"&&(Ec.element.releasePointerCapture(Ec.pointerId),Ec.pointerId=void 0)}};function Oh(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,oe=!1,pe="none",be=!1,Se=!1;const Ae=y.clientX,We=y.clientY,dt=Date.now(),Pt=E.field,Kt=setInterval(()=>{be?Pt.scroll({top:0,left:Pt.scrollLeft-16}):Se&&Pt.scroll({top:0,left:Pt.scrollLeft+16})},32);function Yn(){Yf.stop(),re=!1,clearInterval(Kt),a.element.classList.remove("tracking"),y&&y.preventDefault()}function Qr(Ar){if(!E.hasFocus()){Yn();return}const ri=Ar.clientX,Rr=Ar.clientY,Bi=Oh(Ar)&&Ar.pointerType==="touch"?20:5;if(Date.now()<dt+500&&Math.abs(Ae-ri)<Bi&&Math.abs(We-Rr)<Bi){Ar.preventDefault(),Ar.stopPropagation();return}const ga=Pt.getBoundingClientRect();Se=ri>ga.right,be=ri<ga.left;let Qi=ee;Oh(Ar)&&(Ar.isPrimary||(Qi=ff(E,Ar.clientX,Ar.clientY,{bias:0})));const Eo=ff(E,ri,Rr,{bias:ri<=Ae?ri===Ae?0:-1:1});Qi>=0&&Eo>=0&&(E.model.extendSelectionTo(Qi,Eo),_s(a)),oe&&$h(E.model)}ad&&Math.abs(ad.x-Ae)<5&&Math.abs(ad.y-We)<5&&Date.now()<ad.time+500?(df+=1,ad.time=dt):(ad={x:Ae,y:We,time:dt},df=1);const Un=Pt.getBoundingClientRect();if(Ae>=Un.left&&Ae<=Un.right&&We>=Un.top&&We<=Un.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=ff(a,Ae,We,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const Ar=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||Ar?pe="all":pe="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),pe="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),pe="selection"):(a.model.position=ee,v0(a.model)?pe="all":pe="selection");a.defaultStyle={},y.detail===3||df>2?(Yn(),(y.detail===3||df===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},pe="all")):re||(re=!0,Yf.start(Pt,y,Qr,Yn),(y.detail===2||df===2)&&(oe=!0,$h(a.model),pe="all"))}a.hasFocus()||(pe="none",a.focus({preventScroll:!0}))}else ad=null;a.stopCoalescingUndo(),pe!=="none"&&(a.model.selectionIsCollapsed&&(pe="all"),_s(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 V0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=Au(a,b);if(!re)return[1/0,null];let oe=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const pe of b.children){const be=V0(a,y,pe,E,ee);be[0]<=oe[0]&&(oe=be)}return oe[1]||(oe=[Qg(E,ee,re),b]),y.set(b.id,oe),oe}function ev(a,y,b){const[,E]=V0(a,new Map,a.model.root,y,b);return E}function ff(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 oe=ev(a,y,b);const pe=[];let be=oe;for(;be;)pe.unshift(be),be=be.parent;for(const Ae of pe)if(Ae.captureSelection){oe=Ae;break}let Se=a.model.offsetOf(oe);if(Se<0)return-1;if(oe.leftSibling)if(E.bias===0&&oe.type!=="placeholder"){const Ae=Au(a,oe);Ae&&y<(Ae.left+Ae.right)/2&&(Se=a.model.offsetOf(oe.leftSibling))}else E.bias<0&&(Se=a.model.offsetOf(oe.leftSibling));return Se}var tv=class extends Va{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 oe=Pu(re),{model:pe}=a;pe.selectionIsCollapsed||pe.deleteAtoms(As(pe.selection));const be=pe.at(pe.position);if(be.parent instanceof Ga){console.assert(be.parentBranch!==void 0);const Se=[];let Ae=[];oe[0].type==="first"&&oe.shift(),oe[oe.length-1].type==="first"&&oe.pop();for(const Kt of oe)Kt.type==="first"&&Ae.length>0?(Se.push(Ae),Ae=[Kt]):Ae.push(Kt);Ae.length>0&&Se.push(Ae);let We=Number(be.parentBranch[0]),dt=Number(be.parentBranch[1]);const Pt=be.parent.maxColumns;for(;be.parent.colCount-dt<Se.length&&be.parent.colCount<Pt;)be.parent.addColumn();be.parent.addChildrenAfter(Se[0],be);for(let Kt=1;Kt<Se.length;Kt++)dt++,dt>=Pt&&(dt=0,be.parent.addRowAfter(We),We++),be.parent.setCell(We,dt,Se[Kt])}else be.parent.addChildrenAfter(oe.filter(Se=>Se.type!=="first"),be);return pe.position=pe.offsetOf(oe[oe.length-1]),pe.contentDidChange({inputType:"insertFromPaste"}),_s(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 oe=window.MathfieldElement.computeEngine.box(re);oe&&!oe.has("Error")&&(b=oe.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]=kl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),_s(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:oe}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const pe=a.silenceNotifications;a.silenceNotifications=!0;const be={"?":"\\placeholder{}","@":"\\placeholder{}"};be[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(As(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 Se=-1;be[0]?be["@"]=be[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(Se=rv(a),Se>=0&&(be["@"]=a.getValue(Se,a.position,"latex"))),be[0]||(be[0]=be["?"]);let Ae=!1;const We=ri=>(Ae=!0,be[ri]);let[dt,Pt]=U0(a,y,We,b);if(!Pt)return!1;const Kt=Pt.length===1&&Pt[0].type==="genfrac";Kt&&Se>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(be["@"]=be["?"],Ae=!1,[dt,Pt]=U0(a,y,We,b)):Se>=0&&a.deleteAtoms([Se,a.position]);const{parent:Yn}=a.at(a.position),Qr=Yn.hasEmptyBranch("body");if(Kt&&dt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Yn instanceof No&&Yn.leftDelim==="("&&Qr){const ri=Yn.parent,Rr=Yn.parentBranch;ri.removeChild(Yn),ri.setChildren(Pt,Rr)}const Un=a.at(a.position);Un.parent.addChildrenAfter(Pt,Un),dt==="latex"&&typeof y=="string"&&(Yn==null?void 0:Yn.type)==="root"&&Qr&&!Ae&&(Yn.verbatimLatex=y),a.silenceNotifications=pe;const Ar=Pt[Pt.length-1];if(b.selectionMode==="placeholder"){const ri=Pt.flatMap(Rr=>[Rr,...Rr.children]).find(Rr=>Rr.type==="placeholder");if(ri){const Rr=a.offsetOf(ri);a.setSelection(Rr-1,Rr),a.announce("move")}else Ar&&(a.position=a.offsetOf(Ar))}else b.selectionMode==="before"||(b.selectionMode==="after"?Ar&&(a.position=a.offsetOf(Ar)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(Ar)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=oe,!0}};function U0(a,y,b,E){var ee;let re,oe=[];if(typeof y!="string"||E.format==="math-json"){const pe=window.MathfieldElement.computeEngine;if(!pe)return["math-json",[]];[re,y]=["latex",pe.box(y).latex],oe=tl(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Vo(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),oe=tl(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Xf(oe)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Vo(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=kl(y)),oe=tl(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Xf(oe));return Ou(oe,E.style),[re!=null?re:"latex",oe]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof No&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Xf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof No&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let oe=0;b.body[oe];oe++)b.body[oe].type==="genfrac"&&(E++,ee=oe),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)){Xf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof Ga)for(const b of y.cells)Xf(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||j0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(j0(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 j0(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 Va{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"),_s(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(As(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(Ou(re,b.style),!re)return!1;const oe=a.at(a.position),pe=oe.parent.addChildrenAfter(re,oe);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(pe)):pe&&(a.position=a.offsetOf(pe))),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 "),tl(a,{context:y,parseMode:"text"})}new iv;function Xc(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var ds=4,Rl=20,Vs=2*(Rl+ds),Jf=(a,y)=>`
<line x1="${a+Rl}" y1="${y+Rl}"
x2="${a>y?a+Rl:7*Rl+10*ds}"
y2="${a<y?y+Rl:7*Rl+10*ds}"/>
<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+Rl}" y1="${y+Rl}"
x2="${a>y?a+Rl:7*Rl+10*ds}"
y2="${a<y?y+Rl:7*Rl+10*ds}"/>
<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>`,qf=(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*Rl+10*ds+5} ${8*Rl+10*ds+5}">
<rect
class="MLEP__array-insert-background rows"
x="0"
y="${Vs+ds}"
height="${3*Vs}"
width="${Vs}"
rx="${Vs/2}"/>
<rect
class="MLEP__array-insert-background columns"
x="${Vs+ds}"
y="0"
height="${Vs}"
width="${3*Vs}"
rx="${Vs/2}"/>
<g data-command='"moveDown"'>
${qf(2*(ds+Vs),2*ds+3*Vs,0)}
</g>
<g data-command='"moveUp"'>
${qf(2*(ds+Vs),2*ds+Vs,180)}
</g>
<g data-command='"moveToNextWord"'>
${qf(2*ds+3*Vs,2*(ds+Vs),-90)}
</g>
<g data-command='"moveToPreviousWord"'>
${qf(2*ds+Vs,2*(ds+Vs),90)}
</g>
<g>
<g data-command='"addColumnBefore"'>
${Jf(2*ds+Vs,ds)}
</g>
<g data-command='"removeColumn"'>
${G0(2*ds+2*Vs,ds)}
</g>
<g data-command='"addColumnAfter"'>
${Jf(2*ds+3*Vs,ds)}
</g>
<g data-command='"addRowBefore"'>
${Jf(ds,2*ds+Vs)}
</g>
<g data-command='"removeRow"'>
${G0(ds,2*ds+2*Vs)}
</g>
<g data-command='"addRowAfter"'>
${Jf(ds,2*ds+3*Vs)}
</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>`,Y0=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:Y0,vmatrix:uv,Vmatrix:dv},Nh={cases:fv,rcases:hv,Bmatrix:Y0};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(Kt=>{(!ee||Kt.length>ee)&&(ee=Kt.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Tf("mathlive-environment-popover"),Vl("environment-popover"),Vl("core"),re.setAttribute("aria-hidden","true"));let oe;const pe=re.querySelector(".MLEP__environment-controls");pe?oe=pe:(oe=document.createElement("div"),re.innerHTML="",re.appendChild(oe)),oe.className="MLEP__environment-controls",oe.style.display="flex",oe.style.width="100%",oe.style.height="100%",oe.style.boxSizing="border-box",oe.innerHTML=ov;let be=[],Se="";const Ae=a.model.parentEnvironment.environmentName;if(bl(Ae)){const Kt=gv(Ae);Se=Rh[Kt]("active");const Yn=Rh,{[Kt]:Qr}=Yn,Un=ft(Yn,[Te(Kt)]);be=Object.values(Un).map(Ar=>Ar("inactive"))}else if(xl(Ae)){const Kt=vv(Ae);Se=Nh[Kt]("active");const Yn=Nh,{[Kt]:Qr}=Yn,Un=ft(Yn,[Te(Kt)]);be=Object.values(Un).map(Ar=>Ar("inactive"))}else Rs(Ae)&&(Se=Rh.matrix("active"),be=Object.values(Nh).map(Kt=>Kt("inactive")));const We=document.createElement("div");We.className="MLEP__environment-delimiter-controls",We.style.display="flex",We.style.flexDirection="column",We.innerHTML=`
<div class='MLEP__array-delimiter-options'>
${Se}
${be.join("")}
</div>`,Se&&oe.appendChild(We),oe.querySelectorAll("[data-command]").forEach(Kt=>{const Yn=Kt.dataset.command;let Qr=Yn;try{Qr=JSON.parse(Yn)}catch(Un){}Kt.addEventListener("mousedown",Un=>Un.preventDefault()),Qr&&Kt.addEventListener("click",()=>a.executeCommand(Qr))});const Pt=(b=a.field)==null?void 0:b.getBoundingClientRect();Pt&&(re.style.top=`${window.scrollY+(Pt.top-re.clientHeight-15)}px`,re.style.left=`${Pt.left+20}px`,re.classList.add("is-visible"))}function Bh(){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 Qf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&xs(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):Bh()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function X0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function J0(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=X0(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 oe=a.getBoundingClientRect(),pe=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let be=Math.min(pe,(E=y.height)!=null?E:oe.height),Se=Fh(y.location.y,be,y.verticalPos,re);Se+be>window.innerHeight-8&&(y.alternateLocation?(Se=Fh(y.alternateLocation.y,be,y.verticalPos,re),Se+be>window.innerHeight-8&&(Se=void 0)):Se=void 0),Number.isFinite(Se)||(Se=Math.max(8,window.innerHeight-8-be),8+be>window.innerHeight-8&&(a.style.bottom="8px")),be=Math.min(Se+be,window.innerHeight-8)-Se;const Ae=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let We=Math.min(Ae,(ee=y.width)!=null?ee:oe.width),dt=Fh(y.location.x,We,y.horizontalPos,re);dt+We>window.innerWidth-8&&(y.alternateLocation?(dt=yv(y.alternateLocation.x,We,y.verticalPos,re),dt+We>window.innerWidth-8&&(dt=void 0)):dt=void 0),Number.isFinite(dt)||(dt=Math.max(8,window.innerWidth-8-We),8+We>window.innerWidth-8&&(a.style.right="8px")),We=Math.min(dt+We,window.innerWidth-8)-dt,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-dt-We).toString()}px`:a.style.left=`${Math.ceil(dt).toString()}px`,a.style.top=`${Math.ceil(Se).toString()}px`,be!==oe.height&&(a.style.height=`${Math.ceil(be).toString()}px`),We!==oe.width&&(a.style.width=`${Math.ceil(We).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Dd(a){return"submenu"in a}function Jc(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 Hh(a){return"type"in a&&a.type==="heading"}var q0={};function Kh(a){let y=q0[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,q0[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,Dd(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=Jc(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}Hh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Jc(ee)&&(this.checked=Jc(ee)&&((y=Ad(ee.checked,a))!=null?y:!1)),(Jc(ee)||Dd(ee))&&(this.enabled=(b=Ad(ee.enabled,a))!=null?b:!0,this.visible=(E=Ad(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Jc(ee)||Hh(ee)||Dd(ee))&&(this.label=Ad(ee.label,a),this.tooltip=Ad(ee.tooltip,a),this.ariaLabel=Ad(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(Kh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Kh("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),Jc(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Kh("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,(Jc(this._declaration)||Hh(this._declaration)||Dd(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(!Jc(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=X0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:J0(b,"trailing",E),y:b.top-4},alternateLocation:{x:J0(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 oe=this.submenu.element.getBoundingClientRect(),pe=this.element.getBoundingClientRect();oe.left<pe.left+pe.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function Ad(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 Bd{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(Se=>Se.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(Se=>Se.visible&&Se.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(Se=>Se.updateState(y));let oe,pe=0;for(const Se of this._menuItems)Se.type==="heading"?(oe&&pe===0&&(oe.visible=!1),oe=Se,pe=0):Se.type==="divider"&&oe?(oe.visible=pe>0,oe=void 0,pe=0):oe&&Se.visible&&(pe+=1);oe&&(oe.visible=pe>0);let be=!0;for(const Se of this._menuItems)Se.type==="divider"?(Se.visible=!be,be=!0):Se.visible&&(be=!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 oe=this.activeMenuItem;oe.active=!1,(b=oe.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 oe=this._menuItems[ee];if(!oe)break;if(oe.visible&&oe.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 Bd._collator||(Bd._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Bd._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(pe=>pe.type!=="divider"&&pe.visible&&pe.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(pe=>pe.label.length))-y.length;if(ee<0)return null;let re=null,oe=0;for(;oe<ee&&!re;)re=(b=E.find(pe=>Bd.collator.compare(y,pe.label.substring(oe,y.length))===0))!=null?b:null,oe++;return re}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),on()&&(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),on()&&((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 oe=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",oe.toString())),(re=(ee=this.activeMenuItem)==null?void 0:ee.element)==null||re.classList.toggle("is-submenu-open",oe),this.isSubmenuOpen=oe}},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=Ju(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Ju(y));let re=!0;const oe=this.activeSubmenu,pe=oe.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":pe==null||pe.select(Ju(y));break;case"ArrowRight":if((pe==null?void 0:pe.type)==="submenu")pe.select(Ju(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!pe)oe.activeMenuItem=oe.firstMenuItem;else{const be=(b=oe.getMenuItemColumn(pe))!=null?b:-1;if(be>=0&&be<((E=oe.columnCount)!=null?E:1)-1){const Se=oe.nextMenuItem(1);Se&&(oe.activeMenuItem=Se)}}break;case"ArrowLeft":if(oe===this.rootMenu)pe||(oe.activeMenuItem=oe.firstMenuItem);else if((pe&&(ee=oe.getMenuItemColumn(pe))!=null?ee:-1)<=0||!pe){oe.hide();const Se=oe.parentMenu.activeMenuItem;if(Se){const{element:Ae}=Se;Ae==null||Ae.focus(),Ae==null||Ae.classList.remove("is-submenu-open")}}else{const Se=oe.nextMenuItem(-1);Se&&(oe.activeMenuItem=Se)}break;case"ArrowDown":oe.activeMenuItem=oe.nextMenuItem(oe.columnCount);break;case"ArrowUp":oe.activeMenuItem=oe.nextMenuItem(-oe.columnCount);break;case"Home":case"PageUp":oe.activeMenuItem=oe.firstMenuItem;break;case"End":case"PageDown":oe.activeMenuItem=oe.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const be=oe.findMenuItem(this.typingBuffer);be&&(oe.activeMenuItem=be),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Lf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const be=oe.findMenuItem(this.typingBuffer);be&&(oe.activeMenuItem=be),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 jc.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),jc.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),jc.state==="open"&&jc.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(ge(we({},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,jc.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"||(Jc(a)||Dd(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Jc(a)&&typeof a.checked=="function"?!0:Dd(a)?a.submenu.some(rp):!1}var eh=class{};eh.DELAY=300,eh.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=_f(a);E||y(!1);let ee=E;const re=setTimeout(()=>{oe.abort(),y(xv(ee,E)<eh.MAX_DISTANCE)},eh.DELAY),oe=new AbortController,pe=oe.signal;for(const be of["pointermove","pointerup","pointercancel"])window.addEventListener(be,Se=>{if(Se.type==="pointerup"||Se.type==="pointercancel")clearTimeout(re),oe.abort(),y(!1);else if(Se.type==="pointermove"){const Ae=_f(Se);Ae&&(ee=Ae)}},{passive:!0,signal:pe})})}function ip(a,y,b){return Bu(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:_f(E),modifiers:Ju(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:Ju(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=_f(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};Bt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(ge(we({},a),{body:ut(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Bt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=rn(ut(a.args[0]));return new z(ge(we({},a),{body:ut(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Bt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(ge(we({},a),{body:ut(a.args[0]),svgAccent:"overarc"}))}),Bt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new wc(ge(we({},a),{body:ut(a.args[0]),svgBelow:"underarc"}))}),Bt("utilde","{body:auto}",{createAtom:a=>{const y=ut(a.args[0]),b=rn(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new wc(ge(we({},a),{body:y,svgBelow:E,boxType:Fc(y)}))}}),Bt("^","{:string}",{createAtom:a=>{var y;return new pr(ge(we({},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:"^"}))}}),Bt("`","{:string}",{createAtom:a=>{var y;return new pr(ge(we({},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:"`"}))}}),Bt("'","{:string}",{createAtom:a=>{var y;return new pr(ge(we({},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:"'"}))}}),Bt('"',"{:string}",{createAtom:a=>{var y,b;return new pr(ge(we({},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]:'"'}))}}),Bt(".","{:string}",{createAtom:a=>{var y,b;return new pr(ge(we({},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]:"."}))}}),Bt("=","{:string}",{createAtom:a=>{var y,b;return new pr(ge(we({},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]:"="}))}}),Bt("~","{:string}",{createAtom:a=>{var y;return new pr(ge(we({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"}))}}),Bt("c","{:string}",{createAtom:a=>{var y;return new pr(ge(we({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Bt("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 oe=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const pe of oe){const be=pe.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(be)ee.strokeWidth=be[1],ee.strokeStyle=be[2],ee.strokeColor=be[3];else{const Se=pe.match(/\s*([a-z]*)\s*=\s*"(.*)"/);Se&&(Se[1]==="mathbackground"?ee.backgroundcolor=Se[2]:Se[1]==="mathcolor"?ee.strokeColor=Se[2]:Se[1]==="padding"?ee.padding=Se[2]:Se[1]==="shadow"&&(ee.shadow=Se[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(oe=>oe.length>0).forEach(oe=>{re[oe.toLowerCase()]=!0}),new Gd(a.command,ut(E[2]),re,ee)}}),Bt("cancel","{body:auto}",{createAtom:a=>{var y;return new Gd(a.command,ut(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:{}})}}),Bt("bcancel","{body:auto}",{createAtom:a=>{var y;return new Gd(a.command,ut(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:{}})}}),Bt("xcancel","{body:auto}",{createAtom:a=>{var y;return new Gd(a.command,ut(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:{}})}}),Bt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new wc(ge(we({},a),{body:ut((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Bt("overbrace","{:auto}",{createAtom:a=>new wc(ge(we({},a),{body:ut(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Bt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new wc(ge(we({},a),{body:ut(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Bt(["underbrace"],"{:auto}",{createAtom:a=>new wc(ge(we({},a),{body:ut(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Bt(["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 wc(ge(we({},a),{svgBody:a.command.slice(1),above:((b=ut((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:ut((E=a.args)==null?void 0:E[1]),below:(re=ut((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)}`}),Bt(["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 Xu(a.command.slice(1),ge(we({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Bt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Xu({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],ge(we({},a),{limits:"over-under",variant:"main"}))}),Bt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Xu(a.command.slice(1),ge(we({},a),{limits:"over-under",variant:"main"}))}),Bt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Xu(a.command.slice(1),ge(we({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Bt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new pr(ge(we({},a),{body:ut(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 qr("\xB0",{style:ge(we({},a.style),{variant:"normal",variantStyle:"up"})});return new qr([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Bt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(ge(we({},a),{body:ut(a.args[1]),index:a.args[0]?ut(a.args[0]):void 0}))}),Bt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=we({},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 xd(E[0]?ut(E[0]):[new ba],E[1]?ut(E[1]):[new ba],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}`:Ro(a.command,b,E)}}),Bt(["brace","brack"],"",{infix:!0,createAtom:a=>new xd(ut(a.args[0]),ut(a.args[1]),ge(we({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>io([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Bt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new xd(ut(E[0]),ut(E[1]),ge(we({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>io([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Bt(["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 xd(ut(E[0]),ut(E[1]),ge(we({},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)}`}),Bt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new xd(ut(a.args[0]),ut(a.args[1]),ge(we({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Bt(["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)],ge(we({},a),{limits:"auto",variant:"main"}))}),Bt("smallint","",{ifMode:"math",createAtom:a=>new Xu("\u222B",ge(we({},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"};Bt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,ge(we({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Bt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Xu({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],ge(we({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Bt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(ge(we({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Bt("the","{:value}",{createAtom:a=>new pr(ge(we({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new mo({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new qr(((b=gs(re))!=null?b:"").split("").map(oe=>new qr(oe,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:we({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=gs(a.args[0]))!=null?y:"\\relax"}`}}),Bt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(ge(we({},a),{body:ut(a.args[0]),tooltip:ut(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${pr.serialize([a.tooltip],ge(we({},y),{defaultMode:"math"}))}}`}),Bt("texttip","{:auto}{:text}",{createAtom:a=>new hh(ge(we({},a),{body:ut(a.args[0]),tooltip:ut(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${pr.serialize([a.tooltip],ge(we({},y),{defaultMode:"text"}))}}`}),Bt("error","{:math}",{createAtom:a=>new pr(ge(we({},a),{body:ut(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Bt("ensuremath","{:math}",{createAtom:a=>new pr(ge(we({},a),{body:ut(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(ge(we({},y),{defaultMode:"math"}))}}`}),Bt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=gs(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Bt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=gs(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Bt("boxed","{content:math}",{createAtom:a=>new Ts(ge(we({},a),{body:ut(a.args[0]),framecolor:{string:"black"}}))}),Bt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=gs(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Bt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new Ts(ge(we({},a),{body:ut(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(ge(we({},y),{defaultMode:"text"})):Ro(a.command,(b=gs(a.framecolor))!=null?b:"",(E=gs(a.backgroundcolor))!=null?E:"",a.bodyToLatex(ge(we({},y),{defaultMode:"text"})))}}),Bt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=ut(a.args[1]);return b?new Ts(ge(we({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new Ts(ge(we({},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=gs(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=gs(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return Ro(ee,a.bodyToLatex(y))}}),Bt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new pr(ge(we({},a),{body:ut(a.args[0])})),render:(a,y)=>{const b=new mo({parent:y,mathstyle:a.command.slice(1)},a.style),E=pr.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):`{${io([a.command,a.bodyToLatex(y)])}}`}),Bt(["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]})}),Bt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Bt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Bt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Bt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Bt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Bt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new pr(ge(we({},a),{body:ut(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Bt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Bt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Bt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Bt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Bt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Bt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Bt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Bt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Bt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Bt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Bt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Bt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Bt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Bt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Bt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Bt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Bt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Bt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Bt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Bt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Bt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Bt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Bt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Bt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Bt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Bt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Bt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Bt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Bt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Bt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Bt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Bt("mbox","{:text}",{ifMode:"math",createAtom:a=>new pr(ge(we({},a),{type:"mord",body:ut(a.args[0]),mode:"math"})),serialize:(a,y)=>Ro("\\mbox",a.bodyToLatex(ge(we({},y),{defaultMode:"text"})))}),Bt("text","{:text}",{ifMode:"math",applyMode:"text"}),Bt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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:""})}}),Bt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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}}),Bt("htmlData","{data:string}{content:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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}}),Bt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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}}),Bt("em","{:rest}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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"})}),Bt("emph","{:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(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}};Bt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new i0(ge(we({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Bt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Jd(ge(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Bt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Jd(ge(we({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Bt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new pr(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Hc||E===rc)&&(b=1),(E===gc||E===Qs)&&(b=2),(E===yl||E===Ks)&&(b=3);const ee=ut(a.args[b]);return pr.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${pr.serialize(a.args[0],y)}}{${pr.serialize(a.args[1],y)}}{${pr.serialize(a.args[2],y)}}{${pr.serialize(a.args[3],y)}}`}),Bt("mathop","{:auto}",{createAtom:a=>new pr(ge(we({},a),{type:"mop",body:ut(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=pr.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 qr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[Ro(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)),io(b)}}),Bt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new pr(ge(we({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:ut(a.args[0])}))}),Bt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=ut(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 pr(ge(we({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=pr.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 qr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[Ro(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)),io(b)}}),Bt(["char","unicode"],"{charcode:value}",{createAtom:a=>new pr(ge(we({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${gs((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)}}),Bt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new pr(a),render:(a,y)=>{var b,E,ee;const re=new mo({parent:y,mathstyle:"textstyle"},a.style),oe=re.toEm((b=a.args[0])!=null?b:{dimension:0}),pe=re.toEm((E=a.args[1])!=null?E:{dimension:10}),be=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),Se=new qr(null,{classes:"rule",type:"ord"});return Se.width=pe,Se.height=be+oe,Se.depth=-oe,Se.setStyle("border-right-width",pe,"em"),Se.setStyle("border-top-width",be,"em"),Se.setStyle("border-color",a.style.color),Se.setStyle("vertical-align",oe,"em"),a.isSelected&&Se.setStyle("opacity","50%"),a.bind(re,Se),a.caret&&(Se.caret=a.caret),Se.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${gs(a.args[0])}]`:""}{${gs(a.args[1])}}{${gs(a.args[2])}}`}),Bt(["overline","underline"],"{:auto}",{createAtom:a=>new pr(ge(we({},a),{body:ut(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new mo({parent:y,mathstyle:"cramp"},a.style),ee=pr.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,oe=new qr(null,{classes:b+"-line"});oe.height=re,oe.maxFontSize=re*1.125*E.scalingFactor;let pe;return b==="overline"?pe=new Zo({shift:0,children:[{box:ee},3*re,{box:oe},re]}):pe=new Zo({top:ee.height,children:[re,{box:oe},3*re,{box:ee}]}),a.caret&&(pe.caret=a.caret),new qr(pe,{classes:b,type:"ignore"})}}),Bt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=ut(a.args[1]);return new wc(ge(we({},a),{above:ut(a.args[0]),body:y,skipBoundary:!1,boxType:Fc(y)}))},serialize:(a,y)=>Ro(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Bt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=ut(a.args[1]);return new wc(ge(we({},a),{below:ut(a.args[0]),body:y,skipBoundary:!1,boxType:Fc(y)}))},serialize:(a,y)=>Ro(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Bt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=ut(a.args[2]);return new wc(ge(we({},a),{above:ut(a.args[0]),below:ut(a.args[1]),body:y,skipBoundary:!1,boxType:Fc(y)}))},serialize:(a,y)=>Ro(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Bt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new wc(ge(we({},a),{body:ut(a.args[2]),above:ut(a.args[1]),below:ut(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>Ro(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Bt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new Xd(ge(we({},a),{body:ut(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}))}}),Bt(["vphantom"],"{:auto}",{createAtom:a=>new Xd(ge(we({},a),{body:ut(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Bt(["hphantom"],"{:auto}",{createAtom:a=>new Xd(ge(we({},a),{body:ut(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Bt(["phantom"],"{:auto}",{createAtom:a=>new Xd(ge(we({},a),{body:ut(a.args[0]),isInvisible:!0}))}),Bt("not","{:math}",{createAtom:a=>{const y=ut(a.args[0]);return y.length===0?new pr(ge(we({},a),{type:"mrel",value:"\uE020"})):new pr(ge(we({},a),{body:[new Yu(ge(we({},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{${pr.serialize(b.group,y)}}`:`\\not${pr.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":Fc(ut(a.args[0])),ee=pr.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Bt(["ne","neq"],"",{createAtom:a=>new pr(ge(we({},a),{type:"mrel",body:[new Yu(ge(we({},a),{body:"\uE020",align:"right",boxType:"rel"})),new pr(ge(we({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Bt("rlap","{:auto}",{createAtom:a=>new Yu(ge(we({},a),{body:ut(a.args[0]),align:"right"}))}),Bt("llap","{:auto}",{createAtom:a=>new Yu(ge(we({},a),{body:ut(a.args[0]),align:"left"}))}),Bt("mathrlap","{:math}",{createAtom:a=>new Yu(ge(we({},a),{body:ut(a.args[0]),align:"left"}))}),Bt("mathllap","{:math}",{createAtom:a=>new Yu(ge(we({},a),{body:ut(a.args[0]),align:"left"}))}),Bt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new Ts(ge(we({},a),{body:ut(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return Ro("\\raisebox",(b=gs(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Bt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new Ts(ge(we({},a),{body:ut(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return Ro("\\raise",(b=gs(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Bt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new Ts(ge(we({},a),{body:ut(a.args[1]),padding:{dimension:0},offset:(y=Hl(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return Ro("\\lower",(E=gs(Hl((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Ie("0123456789/@.?!"),et(65,90),et(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"),Bt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Jd(a)}),Bt("space","",{createAtom:a=>new Jd(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>",th="<mo>&#8290;</mo>";function nh(a){return a.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function as(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Ev(a,y,b){var E,ee,re,oe,pe,be,Se,Ae,We,dt,Pt;let Kt=!1;y=y!=null?y:a.atoms.length;let Yn="",Qr="",Un=a.atoms[a.index];const Ar=(ee=(E=Un.style)==null?void 0:E.variant)!=null?ee:"",ri=(oe=(re=Un.style)==null?void 0:re.variantStyle)!=null?oe:"";let Rr="";if(Ar||ri){const ga=Gt(Un.value,(pe=Un.style)==null?void 0:pe.variant,(be=Un.style)==null?void 0:be.variantStyle);if(ga!==Un.value)return a.index+=1,Yn=`<mi${as(Un.id,b)}>${ga}</mi>`,vu(Yn,a,b)||(a.mathML+=Yn,a.lastType="mi"),!0;Rr=(Se={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"}[ri+Ar])!=null?Se:"",Rr=` mathvariant="${Rr}"`}const Bi={"\\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(Un.command==="!")return a.index+=1,Yn="<mo>!</mo>",vu(Yn,a,b)||(a.mathML+=Yn,a.lastType="mo"),!0;if(Bi[Un.command]){a.index+=1;let ga=`<mi${as(Un.id,b)}${Rr}>${Bi[Un.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(ga=th+ga),vu(ga,a,b)||(a.mathML+=ga,a.lastType="mi"),!0}if(Un.command==="\\operatorname")Qr=Td(Un.body),a.index+=1;else if(Ar||ri)for(;a.index<y&&(Un.type==="mord"||Un.type==="macro")&&!Un.isDigit()&&Ar===((We=(Ae=Un.style)==null?void 0:Ae.variant)!=null?We:"")&&ri===((Pt=(dt=Un.style)==null?void 0:dt.variantStyle)!=null?Pt:"");)Qr+=Td([Un]),a.index+=1,Un=a.atoms[a.index];else(Un.type==="mord"||Un.type==="macro")&&!Un.isDigit()&&(Qr+=Td([Un]),a.index+=1);if(Qr.length>0){Kt=!0,Yn=`<mi${Rr}>${Qr}</mi>`;const ga=a.lastType;Yn.endsWith(">f</mi>")||Yn.endsWith(">g</mi>")?(Yn+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(Yn)?"mo":"mi",vu(Yn,a,b)||((ga==="mi"||ga==="mn"||ga==="mtext"||ga==="fence")&&(Yn=th+Yn),a.mathML+=Yn)}return Kt}function Mv(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function kv(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 vu(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 oe=Bo(ee.superscript,b);y.lastType="";const pe=Bo(ee.subscript,b);if(y.lastType=re,!oe&&!pe)return!1;let be="";return oe&&pe?be=`<msubsup>${a}${pe}${oe}</msubsup>`:oe?be=`<msup>${a}${oe}</msup>`:pe&&(be=`<msub>${a}${pe}</msub>`),y.mathML+=be,y.lastType="",!0}function _v(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 ${as(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=kv(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"+as(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Mv(a)&&(re=a.index,a.index+=1),vu(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Dv(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 oe=!1,pe=0;const be=a.index;let Se=-1,Ae=be+1;for(;Ae<y&&!oe;)a.atoms[Ae].type==="mopen"?pe+=1:a.atoms[Ae].type==="mclose"&&(pe-=1),pe===-1&&(oe=!0,Se=Ae),Ae+=1;oe&&(ee="<mrow>",ee+=od(a.atoms[be],b),ee+=Bo(a.atoms,b,be+1,Se),ee+=od(a.atoms[Se],b),ee+="</mrow>",a.index=Se+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=th),vu(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const oe=a.atoms[a.index];if(!oe)return!1;const pe={"\\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(pe[oe.command]){a.index+=1;const be=`<mo${as(oe.id,b)}>${pe[oe.command]}</mo>`;return vu(be,a,b)||(a.mathML+=be,a.lastType="mo"),!0}if(a.index<y&&(oe.type==="mbin"||oe.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(oe.type==="mop"||oe.type==="operator"||oe.type==="extensible-symbol")){if(oe.subsupPlacement==="over-under"&&(oe.superscript||oe.subscript)){const be=od(oe,b);return oe.superscript&&oe.subscript?(ee+="<munderover>"+be,ee+=Bo(oe.subscript,b),ee+=Bo(oe.superscript,b),ee+="</munderover>"):oe.superscript?(ee+="<mover>"+be,ee+=Bo(oe.superscript,b),ee+="</mover>"):oe.subscript&&(ee+="<munder>"+be,ee+=Bo(oe.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const be=a.atoms[a.index],Se=be.value==="\\operatorname",Ae=Se?'<mi class="MathML-Unit"'+as(be.id,b)+">"+Td(be.value)+"</mi>":od(be,b);ee+=Ae,!Se&&!/^<mo>(.*)<\/mo>$/.test(Ae)?(ee+=lp,re="applyfunction"):re=Se?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=th+ee),a.index+=1}return ee.length>0&&(E=!0,vu(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Bo(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 pr)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(_v(ee,E,y)||Lv(ee,E,y)||Ev(ee,E,y)||Av(ee,E,y)||Dv(ee,E,y))re+=1;else if(ee.index<E){let oe=Wh(ee.atoms[ee.index],y);ee.lastType==="mn"&&oe.length>0&&ee.atoms[ee.index].type==="genfrac"&&(oe="<mo>&#x2064;</mo>"+oe),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,vu(oe,ee,y)?re+=1:oe.length>0&&(ee.mathML+=oe,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function od(a,y){let b="";const E=Td(a.value);return E&&(b="<mo"+as(a.id,y)+">"+E+"</mo>"),b}function Td(a){if(!a)return"";if(typeof a=="string")return nh(a);if(!Array.isArray(a)&&typeof a.body=="string")return nh(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return nh(y)}function Wh(a,y){var b,E,ee,re,oe,pe,be,Se,Ae,We,dt,Pt,Kt,Yn,Qr,Un,Ar,ri,Rr,Bi,ga,Qi;if(a.mode==="text")return`<mi${as(a.id,y)}>${a.value}</mi>`;const Eo={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"},Xo={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let ui="",uc="",Qc,Cc,rl,dc,Nl,os;const{command:Ps}=a;if(a.command==="\\error")return`<merror${as(a.id,y)}>${Bo(a.body,y)}</merror>`;const il={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},eu={"\\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":ui=Bo(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(ui+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(ui+="<mo>"+(il[a.leftDelim]||a.leftDelim)+"</mo>")),ui+="<mtable",a.colFormat){for(ui+=' columnalign="',rl=0;rl<a.colFormat.length;rl++)a.colFormat[rl].align&&(ui+={l:"left",c:"center",r:"right"}[a.colFormat[rl].align]+" ");ui+='"'}for(ui+=">",Cc=0;Cc<a.array.length;Cc++){for(ui+="<mtr>",Qc=0;Qc<a.array[Cc].length;Qc++)ui+="<mtd>"+Bo(a.array[Cc][Qc],y)+"</mtd>";ui+="</mtr>"}ui+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(ui+="<mo>"+(il[a.leftDelim]||a.rightDelim)+"</mo>"),ui+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(ui+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(ui+="<mo"+as(a.id,y)+">"+(il[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(ui+="<mfrac>",ui+=Bo(a.above,y)||"<mi>&nbsp;</mi>",ui+=Bo(a.below,y)||"<mi>&nbsp;</mi>",ui+="</mfrac>"):(ui+="<mtable"+as(a.id,y)+">",ui+="<mtr>"+Bo(a.above,y)+"</mtr>",ui+="<mtr>"+Bo(a.below,y)+"</mtr>",ui+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(ui+="<mo"+as(a.id,y)+">"+(il[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(ui+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(ui+="<msqrt"+as(a.id,y)+">",ui+=Bo(a.body,y),ui+="</msqrt>"):(ui+="<mroot"+as(a.id,y)+">",ui+=Bo(a.body,y),ui+=Bo(a.above,y),ui+="</mroot>");break;case"leftright":const tu=a,nu=tu.leftDelim;ui="<mrow>",nu&&nu!=="."&&(ui+=`<mo${as(a.id,y)}>${(b=il[nu])!=null?b:nu}</mo>`),a.body&&(ui+=Bo(a.body,y));const ru=tu.matchingRightDelim();ru&&ru!=="."&&(ui+=`<mo${as(a.id,y)}>${(E=il[ru])!=null?E:ru}</mo>`),ui+="</mrow>";break;case"sizeddelim":case"delim":ui+=`<mo${as(a.id,y)}>${il[a.value]||a.value}</mo>`;break;case"accent":ui+='<mover accent="true"'+as(a.id,y)+">",ui+=Bo(a.body,y),ui+="<mo>"+(eu[Ps]||a.accent)+"</mo>",ui+="</mover>";break;case"line":case"overlap":break;case"overunder":Nl=a.above,dc=a.below,(a.svgAbove||Nl)&&(a.svgBelow||dc)?os=a.body:Nl&&Nl.length>0?(os=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(dc=a.body[0].below,os=a.body[0].body):((pe=(oe=a.body)==null?void 0:oe[0])==null?void 0:pe.type)==="first"&&((Se=(be=a.body)==null?void 0:be[1])!=null&&Se.below)&&(dc=a.body[1].below,os=a.body[1].body)):dc&&dc.length>0&&(os=a.body,(We=(Ae=a.body)==null?void 0:Ae[0])!=null&&We.above?(Nl=a.body[0].above,os=a.body[0].body):((Pt=(dt=a.body)==null?void 0:dt[0])==null?void 0:Pt.type)==="first"&&((Yn=(Kt=a.body)==null?void 0:Kt[1])!=null&&Yn.above)&&(Nl=a.body[1].overscript,os=a.body[1].body)),(a.svgAbove||Nl)&&(a.svgBelow||dc)?(ui+=`<munderover ${as(a.id,y)}>`,ui+=(Qr=Eo[a.svgBody])!=null?Qr:Bo(os,y),ui+=(Un=Eo[a.svgBelow])!=null?Un:Bo(dc,y),ui+=(Ar=Eo[a.svgAbove])!=null?Ar:Bo(Nl,y),ui+="</munderover>"):a.svgAbove||Nl?(ui+=`<mover ${as(a.id,y)}>`+((ri=Eo[a.svgBody])!=null?ri:Bo(os,y)),ui+=(Rr=Eo[a.svgAbove])!=null?Rr:Bo(Nl,y),ui+="</mover>"):(a.svgBelow||dc)&&(ui+=`<munder ${as(a.id,y)}>`+((Bi=Eo[a.svgBody])!=null?Bi:Bo(os,y)),ui+=(ga=Eo[a.svgBelow])!=null?ga:Bo(dc,y),ui+="</munder>");break;case"placeholder":ui+="?";break;case"mord":{ui=typeof a.value=="string"?a.value:Ps,Ps==="\\char"?ui="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":ui.length>0&&ui.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?ui="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?ui=a.value.charAt(0):(console.error("Did not expect this"),ui=""));const Oc=/\d/.test(ui)?"mn":"mi";ui=`<${Oc}${as(a.id,y)}>${nh(ui)}</${Oc}>`;break}case"mbin":case"mrel":case"minner":ui=od(a,y);break;case"mpunct":ui='<mo separator="true"'+as(a.id,y)+">"+Ps+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(ui="<mo"+as(a.id,y)+">",ui+=Ps==="\\operatorname"?a.body:Ps||a.body,ui+="</mo>");break;case"box":ui='<menclose notation="box"',a.backgroundcolor&&(ui+=' mathbackground="'+a.backgroundcolor+'"'),ui+=as(a.id,y)+">"+Bo(a.body,y)+"</menclose>";break;case"spacing":ui+='<mspace width="'+((Qi=Xo[Ps])!=null?Qi:0)+'em"/>';break;case"enclose":ui='<menclose notation="';for(const Oc in a.notation)Object.prototype.hasOwnProperty.call(a.notation,Oc)&&a.notation[Oc]&&(ui+=uc+Oc,uc=" ");ui+=as(a.id,y)+'">'+Bo(a.body,y)+"</menclose>";break;case"prompt":ui='<menclose notation="roundexbox""">'+Bo(a.body,y)+"</menclose>";break;case"space":ui+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":ui+=od(a,y);break;case"mclose":ui+=od(a,y);break;case"macro":{const Oc=a.command+Td(a.macroArgs);Oc&&(ui+=`<mo ${as(a.id,y)}>${Oc}</mo>`)}break;case"latexgroup":ui+=Bo(a.body,y);break;case"latex":ui+="<mtext"+as(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":ui+=Bo(a.body,y);break;case"text":ui+=`<mtext ${as(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${as(a.id,y)} displaystyle="true">${Bo(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${as(a.id,y)} displaystyle="false">${Bo(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return ui}var Id={"\\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 Tv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function hf(a){let y=0;if(Re(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Iv(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 wo(a,y){var b,E,ee,re,oe;function pe(Ae){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(Ae)?` <say-as interpret-as="character">${Ae}</say-as>`:/[A-Z]/.test(Ae)?`capital <say-as interpret-as="character">${Ae.toLowerCase()}</say-as>`:Ae:/[a-z]/.test(Ae)?" '"+Ae.toUpperCase()+"'":/[A-Z]/.test(Ae)?" 'capital "+Ae.toUpperCase()+"'":Ae}function be(Ae){return"<emphasis>"+Ae+"</emphasis>"}if(!y)return"";let Se="";if(Re(y)){let Ae=!1,We=!1;for(let dt=0;dt<y.length;dt++)y[dt].type!=="first"&&(y[dt].mode!=="text"&&(We=!1),dt<y.length-2&&y[dt].type==="mopen"&&y[dt+2].type==="mclose"&&y[dt+1].type==="mord"?(Se+=" of ",Se+=be(wo(a,y[dt+1])),dt+=2):y[dt].mode==="text"?We?Se+=(b=y[dt].value)!=null?b:" ":(We=!0,Se+=wo("text",y[dt])):y[dt].isDigit()?Ae?Se+=y[dt].asDigit():(Ae=!0,Se+=wo(a,y[dt])):(Ae=!1,Se+=wo(a,y[dt])))}else if(y.mode==="text")y.id&&a==="math"&&(Se+='<mark name="'+y.id.toString()+'"/>'),Se+=y.value;else{y.id&&a==="math"&&(Se+='<mark name="'+y.id.toString()+'"/>');let Ae="",We="",dt="",Pt=!1;const{command:Kt}=y;switch(Kt){case"\\vec":return"vector "+wo(a,y.body);case"\\acute":return wo(a,y.body)+" acute";case"\\grave":return wo(a,y.body)+" grave";case"\\dot":return"dot over"+wo(a,y.body);case"\\ddot":return"double dot over"+wo(a,y.body);case"\\mathring":return"ring over"+wo(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+wo(a,y.body);case"\\bar":return wo(a,y.body)+" bar";case"\\breve":return wo(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+wo(a,y.body);case"\\hat":case"\\widehat":return"hat over"+wo(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+wo(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+wo(a,y.body)}switch(y.type){case"prompt":const Yn=y.body.length>1?'start input . <break time="500ms"/> '+wo(a,y.body)+'. <break time="500ms"/> end input':"blank";Se+=' <break time="300ms"/> '+Yn+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const Qr=y.array,Un=y.environmentName;if(Object.keys(Zh).includes(Un)){Se+=` begin ${Zh[Un]} `;for(let Rr=0;Rr<Qr.length;Rr++){Rr>0&&(Se+=","),Se+=` row ${Rr+1} `;for(let Bi=0;Bi<Qr[Rr].length;Bi++)Bi>0&&(Se+=","),Se+=` column ${Bi+1}: `,Se+=wo("math",Qr[Rr][Bi])}Se+=` end ${Zh[Un]} `}break;case"group":Kt==="\\ne"?Se+=" not equal ":(Kt==="\\not"&&(Se+=" not "),Se+=wo("math",y.body));break;case"root":Se+=wo("math",y.body);break;case"genfrac":if(Ae=wo("math",y.above),We=wo("math",y.below),hf(y.above)&&hf(y.below)){const Bi={"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)];Bi?Se=Bi:Se+=Ae+" over "+We}else Se+=' the fraction <break time="150ms"/>'+Ae+' over <break time="150ms"/>'+We+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(dt=wo("math",y.body),y.hasEmptyBranch("above"))Se+=hf(y.body)?" the square root of "+dt+" , ":' the square root of <break time="200ms"/>'+dt+'. <break time="200ms"/> End square root';else{let Rr=wo("math",y.above);Rr=Rr.trim();const Bi=Rr.replace(/<mark([^/]*)\/>/g,"");Bi==="3"?Se+=' the cube root of <break time="200ms"/>'+dt+'. <break time="200ms"/> End cube root':Bi==="n"?Se+=' the nth root of <break time="200ms"/>'+dt+'. <break time="200ms"/> End root':Se+=' the root with index: <break time="200ms"/>'+Rr+', of <break time="200ms"/>'+dt+'. <break time="200ms"/> End root'}break;case"leftright":{const Rr=y;Se+=(ee=Rr.leftDelim?Id[Rr.leftDelim]:void 0)!=null?ee:Rr.leftDelim,Se+=wo("math",y.body),Se+=(re=Rr.rightDelim?Id[Rr.rightDelim]:void 0)!=null?re:Rr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const Ar=Kt.replace(/^\\/g,""),ri=dr()[Ar];ri&&(ri!=null&&ri.expand?Se+=wo("math",y.body):Se+=`${Ar} `);break;case"placeholder":Se+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Kt==="\\mathbin"||Kt==="\\mathrel"||Kt==="\\mathopen"||Kt==="\\mathclose"||Kt==="\\mathpunct"||Kt==="\\mathord"||Kt==="\\mathinner"){Se=wo(a,y.body);break}let Rr=y.isDigit()?y.asDigit():y.value,Bi=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(Bi=y.value,Rr=Bi),a==="text")Se+=Rr;else{if(y.type==="mbin"&&(Se+='<break time="150ms"/>'),Rr){const ga=Id[Rr]||(Bi?Id[Bi.trim()]:"");if(ga)Se+=" "+ga;else{const Qi=Bi?Tv(Bi.trim()):"";Se+=Qi||pe(Rr)}}else Se+=wo("math",y.body);y.type==="mbin"&&(Se+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const Rr=y.command;if(Rr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Bi=wo("math",y.superscript);Bi=Bi.trim();let ga=wo("math",y.subscript);ga=ga.trim(),Se+=' the summation from <break time="200ms"/>'+ga+'<break time="200ms"/> to <break time="200ms"/>'+Bi+'<break time="200ms"/> of <break time="150ms"/>',Pt=!0}else if(y.hasEmptyBranch("subscript"))Se+=" the summation of";else{let Bi=wo("math",y.subscript);Bi=Bi.trim(),Se+=' the summation from <break time="200ms"/>'+Bi+'<break time="200ms"/> of <break time="150ms"/>',Pt=!0}else if(Rr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Bi=wo("math",y.superscript);Bi=Bi.trim();let ga=wo("math",y.subscript);ga=ga.trim(),Se+=' the product from <break time="200ms"/>'+ga+'<break time="200ms"/> to <break time="200ms"/>'+Bi+'<break time="200ms"/> of <break time="150ms"/>',Pt=!0}else if(y.hasEmptyBranch("subscript"))Se+=" the product of ";else{let Bi=wo("math",y.subscript);Bi=Bi.trim(),Se+=' the product from <break time="200ms"/>'+Bi+'<break time="200ms"/> of <break time="150ms"/>',Pt=!0}else if(Rr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Bi=wo("math",y.superscript);Bi=Bi.trim();let ga=wo("math",y.subscript);ga=ga.trim(),Se+=' the integral from <break time="200ms"/>'+be(ga)+'<break time="200ms"/> to <break time="200ms"/>'+be(Bi)+' <break time="200ms"/> of ',Pt=!0}else Se+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const Bi=(oe=Id[y.value])!=null?oe:y.command?Id[y.command]:void 0;Se+=Bi||" "+y.value}else y.command&&(y.command==="\\mathop"?Se+=wo("math",y.body):y.command==="\\operatorname"?Se+=Pv(y.body):Se+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":dt=wo("math",y.body),Se+=" crossed out "+dt+". End crossed out.";break;case"space":case"spacing":break}if(!Pt&&!y.hasEmptyBranch("superscript")){let Yn=wo(a,y.superscript);Yn=Yn.trim();const Qr=Yn.replace(/<[^>]*>/g,"");if(hf(y.superscript)){if(a==="math"){const Un=Iv(y.superscript);Un&&(Se+='<mark name="'+Un+'"/>')}Qr==="\u2032"?Se+=" prime ":Qr==="2"?Se+=" squared ":Qr==="3"?Se+=" cubed ":Number.isNaN(Number.parseInt(Qr))?Se+=" to the "+Yn+"; ":Se+=' to the <say-as interpret-as="ordinal">'+Qr+"</say-as> power; "}else Number.isNaN(Number.parseInt(Qr))?Se+=" raised to the "+Yn+"; ":Se+=' raised to the <say-as interpret-as="ordinal">'+Qr+"</say-as> power; "}if(!Pt&&!y.hasEmptyBranch("subscript")){let Yn=wo("math",y.subscript);Yn=Yn.trim(),Se+=hf(y.subscript)?" sub "+Yn:" subscript "+Yn+". End subscript. "}}return Se}function Pd(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Bo(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=ge(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=ge(we({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=ge(we({},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 oe="";try{oe=re.toSpeech(ee)}catch(pe){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",pe)}return oe}return""}let E=wo("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"&&Le()==="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 pf={"\\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"},mf={"\\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 $v(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 Is(a){var y,b,E,ee,re,oe,pe,be,Se,Ae,We,dt,Pt;if(!a)return"";if(Re(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(Is).join("");if(a[0].mode==="text"){let ri=0,Rr="";for(;((y=a[ri])==null?void 0:y.mode)==="text";)Rr+=a[ri].body?Is(a[ri].body):a[ri].value,ri++;return`"${Rr}" ${Is(a.slice(ri))}`}let Un=0;const Ar=[];for(;a[Un]&&a[Un].mode==="math";){let ri="";for(;a[Un]&&a[Un].type==="mord"&&/\d/.test(a[Un].value);)ri+=a[Un++].value;ri?Ar.push(ri):Ar.push(Is(a[Un++]))}return Ar.push(Is(a.slice(Un))),$v(Ar)}if(a.mode==="text")return`"${a.value}"`;let Kt="";const{command:Yn}=a;let Qr;if(Yn==="\\placeholder")return`(${Is(a.body)})`;switch(a.type){case"accent":const Un={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Yn];Kt=`${Un!=null?Un:""} ${Is(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(Qi=>Qi.value).join("");case"group":case"root":Kt=(b=pf[Yn])!=null?b:Is(a.body);break;case"genfrac":{const Qi=a;(Qi.leftDelim||Qi.rightDelim)&&(Kt=Qi.leftDelim==="."||!Qi.leftDelim?"{:":Qi.leftDelim),Qi.hasBarLine?(Kt+="(",Kt+=Is(Qi.above),Kt+=")/(",Kt+=Is(Qi.below),Kt+=")"):(Kt+="("+Is(Qi.above)+"),",Kt+="("+Is(Qi.below)+")"),(Qi.leftDelim||Qi.rightDelim)&&(Kt+=Qi.rightDelim==="."||!Qi.rightDelim?"{:":Qi.rightDelim)}break;case"surd":Kt+=a.hasEmptyBranch("above")?"sqrt("+Is(a.body)+")":"root("+Is(a.above)+")("+Is(a.body)+")";break;case"latex":Kt=a.value;break;case"leftright":{const Qi=a,Eo=Qi.leftDelim;Kt+=Eo==="."||!Eo?"{:":Eo,Kt+=Is(Qi.body);const Xo=Qi.matchingRightDelim();Kt+=Xo==="."||!Xo?":}":Xo}break;case"sizeddelim":case"delim":Kt=a.value;break;case"overlap":break;case"overunder":break;case"mord":Kt=(ee=(E=pf[Yn])!=null?E:Yn)!=null?ee:typeof a.value=="string"?a.value:"",Kt.startsWith("\\")&&(Kt+=" "),Qr=Yn?Yn.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Qr?Kt=String.fromCodePoint(Number.parseInt("0x"+Qr[1])):Kt.length>0&&Kt.startsWith("\\")&&(Kt=typeof a.value=="string"?a.value.charAt(0):a.command),Kt=Ov(Kt,a.style);break;case"mbin":case"mrel":case"minner":Kt=(oe=(re=pf[Yn])!=null?re:mf[Yn])!=null?oe:a.value;break;case"mopen":case"mclose":Kt=a.value;break;case"mpunct":Kt=(pe=mf[Yn])!=null?pe:Yn;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(mf[Yn]?Kt=mf[Yn]:Kt=Yn==="\\operatorname"?Is(a.body):(be=a.value)!=null?be:Yn,Kt+=" ");break;case"array":const Ar=a.array,ri=a.environmentName,Rr=(Se={bmatrix:["[","]"],"bmatrix*":["[","]"]}[ri])!=null?Se:["(",")"],Bi=[];for(const Qi of Ar){const Eo=[];for(const Xo of Qi)Eo.push(Rr[0]+Is(Xo)+Rr[1]);Bi.push(Eo.join(","))}const ga=(Ae={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[ri])!=null?Ae:["(",")"];Kt=ga[0]+Bi.join(",")+ga[1];break;case"box":break;case"spacing":Kt=(We=pf[Yn])!=null?We:" ";break;case"enclose":Kt="("+Is(a.body)+")";break;case"space":Kt=" ";break;case"subsup":Kt="";break;case"macro":Kt=(Pt=(dt=pf[Yn])!=null?dt:mf[Yn])!=null?Pt:Is(a.body);break}if(!a.hasEmptyBranch("subscript")){Kt+="_";const Un=Is(a.subscript);Kt+=Un.length!==1?`(${Un})`:Un}if(!a.hasEmptyBranch("superscript")){Kt+="^";const Un=Is(a.superscript);Kt+=Un.length!==1?`(${Un})`:Un}return Kt}function Ov(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 nl(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new mo({from:ge(we({},Ol()),{renderPlaceholder:()=>new qr(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),oe=new pr({mode:"math",type:"root",body:tl(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return oe?(Eu(qd(oe,ee)),du(oe,{classes:"ML__latex"}).toMarkup()):""}function _1(a){return t0(a,{context:Ol()})}function Rv(a,y={}){return Bo(tl(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Nv(a){const y=tl(a,{parseMode:"math",mathstyle:"displaystyle"});return Pd(y)}var rh;function Bv(a){var y,b;if(!rh){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?rh=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=rh==null?void 0:rh.box(a).latex)!=null?b:""}function L1(a,y="math"){return Is(new pr({type:"root",body:tl(a,{parseMode:y})}))}function D1(a){return Vo(a,{format:"ascii-math"})[1]}function Vh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Hv(a):"a"in a?up(a):a}function $d(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 Uh(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),oe=Math.atan2(E,b)*180/Math.PI,pe={L:y,C:ee,H:oe};return a.alpha!==void 0&&(pe.alpha=a.alpha),pe}function jh(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),oe=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),pe=4.076741661347994*ee-3.307711590408193*re+.230969928729428*oe,be=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*oe,Se=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*oe,Ae=We=>{const dt=Math.abs(We);return dt<=.0031308?We*12.92:(Math.sign(We)||1)*(1.055*Math.pow(dt,1/2.4)-.055)};return[Ae(pe),Ae(be),Ae(Se)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Yh(a,y){let[b,E,ee]=a;return b=$d(b*255),E=$d(E*255),ee=$d(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]=jh(a);if(Gh([y,b,E]))return Yh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=jh(Uh(ee)),!Gh([y,b,E]))return Yh([y,b,E],a.alpha);let re=0,oe=a.L,pe=(re+oe)/2;ee.C=pe;const be=.36/Math.pow(2,12);for(;oe-re>be;)pe=(re+oe)/2,ee.C=pe,[y,b,E]=jh(Uh(ee)),Gh([y,b,E])?re=pe:oe=pe;return Yh([y,b,E],a.alpha)}function Hv(a){return up(Uh(a))}function dp(a,y){const b=Vh(a),E=Vh(y),ee=.56,re=.57,oe=.62,pe=.65,be=.022,Se=1.414,Ae=.1,We=5e-4,dt=1.14,Pt=.027,Kt=1.14,Yn=.027;function Qr(Qi){return Qi>=be?Qi:Qi+iu(be-Qi,Se)}function Un(Qi){return(Qi<0?-1:1)*Math.pow(Math.abs(Qi),2.4)}const Ar=Qr(Un(E.r/255)*.2126729+Un(E.g/255)*.7151522+Un(E.b/255)*.072175),ri=Qr(Un(b.r/255)*.2126729+Un(b.g/255)*.7151522+Un(b.b/255)*.072175);let Rr,Bi,ga;return Math.abs(ri-Ar)<We?Bi=0:ri>Ar?(Rr=iu(ri,ee)-iu(Ar,re),Bi=Rr*dt):(Rr=iu(ri,pe)-iu(Ar,oe),Bi=Rr*Kt),Math.abs(Bi)<Ae?ga=0:Bi>0?ga=Bi-Yn:ga=Bi+Pt,ga*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 Kv(a){const y=Vh(a);let b=((1<<24)+($d(y.r)<<16)+($d(y.g)<<8)+$d(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 hs(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 hs(a).length>0}function Vv(a){return[Xh(a,"double-struck","mathbb","tooltip.blackboard"),Xh(a,"fraktur","mathfrak","tooltip.fraktur"),Xh(a,"calligraphic","mathcal","tooltip.caligraphic"),Jh(a,"up","mathrm","tooltip.roman-upright"),Jh(a,"bold","mathbf","tooltip.bold"),Jh(a,"italic","mathit","tooltip.italic")]}function Uv(a){return[{label:()=>nl(`\\vec{${hs(a)}}`),visible:()=>hs(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>nl(`\\overrightarrow{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>nl(`\\overleftarrow{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>nl(`\\dot{${hs(a)}}`),visible:()=>hs(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>nl(`\\ddot{${hs(a)}}`),visible:()=>hs(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>nl(`\\bar{${hs(a)}}`),visible:()=>hs(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>nl(`\\overline{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>nl(`\\overgroup{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>nl(`\\overbrace{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>nl(`\\underline{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>nl(`\\undergroup{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>nl(`\\underbrace{${hs(a)}}`),visible:()=>hs(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function jv(a){return[{label:()=>nl(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>nl(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>nl(`\\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:(Kv(fp(je[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${je[b]} "></span>`,ariaLabel:()=>{var E;return(E=yt(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 Yv(a){const y=[];for(const b of Object.keys(ze))y.push({class:(fp(ze[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${ze[b]} "></span>`,ariaLabel:()=>{var E;return(E=yt(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 Xv=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 Jv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new Xv(ee,re,b,E),label:"\u2610",tooltip:()=>yt("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 qv(a){return[{label:()=>yt("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>sd(a)},{label:()=>yt("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>sd(a)},{label:()=>yt("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>sd(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>yt("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>sd(a)},{type:"divider"},{label:()=>yt("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>sd(a)},{label:()=>yt("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>sd(a)},{type:"divider"},{label:()=>yt("menu.borders"),visible:()=>(Qv(a)||sd(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>gf(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>gf(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>gf(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>gf(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>gf(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>yt("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Jv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>yt("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>yt("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Cd(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>yt("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Cd(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>yt("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>yt("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Vv(a),submenuClass:"variant-submenu"},{label:()=>yt("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Yv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>yt("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>yt("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Uv(a),submenuClass:"variant-submenu"},{label:()=>yt("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&hs(a).length>0,submenu:jv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>yt("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:()=>yt("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?yt("menu.solve-for",nl(b)):yt("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 oe;return(oe=re.simplify().latex)!=null?oe:""});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:()=>yt("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>yt("menu.copy"),id:"copy",submenu:[{label:()=>yt("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Va.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>yt("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Va.copyToClipboard(a,"ascii-math")},{label:()=>yt("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Va.copyToClipboard(a,"math-ml")}]},{label:()=>yt("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>yt("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function sd(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 gf(a,y){Af(a),a.flushInlineShortcutBuffer(),I0(a.model,y),_s(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 Xh(a,y,b,E){return{label:()=>nl(`\\${b}{${hs(a)}}`),tooltip:()=>{var ee;return(ee=yt(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 Jh(a,y,b,E){return{label:()=>nl(`\\${b}{${hs(a)}}`),tooltip:()=>{var ee;return(ee=yt(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 Od(a,y){return a+Pd(y)}Ul({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 oe(Ae){let We=null;switch(Ae){case"all":We=re.root;break;case"selection":We=re.getAtoms(re.selection);break;case"left":{We=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{We=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":We=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:dt}=re.at(re.position);dt!=null&&dt.parent?We=dt:We=re.root;break}default:We=re.root}return We}function pe(Ae){let We="";switch(Ae){case"all":console.log("Internal failure: speak all failed");break;case"selection":We="no selection";break;case"left":We="at start";break;case"right":We="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":We="no parent";break;default:console.log('unknown speak_ param value: "'+Ae+'"');break}return We}const be=oe(y);if(be===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,pe(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const Se=Pd(be);return ht()&&b.withHighlighting?(Nu().readAloudMathfield=a,qu(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,Se)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(Se),!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,oe)=>{if(re)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);else if(oe!=null&&oe.AudioStream){const pe=new Uint8Array(oe.AudioStream),be=new Blob([pe.buffer],{type:"audio/mpeg"}),Se=URL.createObjectURL(be);new Audio(Se).play().catch(We=>console.log(We))}else console.log("polly.synthesizeSpeech():",oe)})}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=Od("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=Od("",a.model.at(a.model.position));else if(y==="line"){const re=Od("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Od(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 Od("",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+=Od("",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=Pu(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 Ae=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(Ae))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(Ae-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(Ae-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(Ae+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(Ae+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=Ae,this._position=Ae,this._selection=re;return}const oe=As(re);re.direction==="backward"?[this._position,this._anchor]=oe:[this._anchor,this._position]=oe;const pe=this.at(oe[0]+1),be=this.at(oe[1]),Se=pr.commonAncestor(pe,be);(Se==null?void 0:Se.type)==="array"&&pe.parent===Se&&be.parent===Se?this._selection={ranges:[oe],direction:re.direction}:this._selection={ranges:[oe],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 cl&&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(Du(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((Se,Ae)=>[...Se,...this.getAtoms(Ae,E)],[]);a=a.ranges[0]}let ee,re;if(Wl(a)){if(ee=a,!Wl(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 oe=Math.min(ee,re)+1,pe=Math.max(ee,re);if(!E.includeChildren&&oe===1&&pe===this.lastOffset)return[this.root];let be=[];for(let Se=oe;Se<=pe;Se++){const Ae=this.atoms[Se];mp(this,Ae,oe,pe)&&be.push(Ae)}return E.includeChildren||(be=be.filter(Se=>{let Ae=!1,{parent:We}=Se;for(;We&&!Ae;)Ae=mp(this,We,oe,pe),We=We.parent;return!Ae})),be}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 pr({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 pr.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 Bo(a);if(b==="spoken")return Pd(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Pd(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=Pd(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?Is(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(Wl(a)&&Wl(y)?(E=[this.normalizeRange([a,y])],ee=b):Lu(a)?(E=[this.normalizeRange(a)],ee=y):Du(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 oe=window.MathfieldElement.computeEngine.parse(re);return JSON.stringify(oe.json)}catch(oe){return JSON.stringify(["Error",`'${oe.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 io(E.map(oe=>pr.serialize(this.getAtoms(oe),re)))}return E.map(re=>this.getAtoms(re).map(oe=>this.atomToString(oe,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&&qh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&qh(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&&qh(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 oe=this.root.changeCounter;y();const pe=this.root.changeCounter!==oe,be=E!==this._anchor||ee!==this._position||hu(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&pe&&this.contentDidChange({inputType:a.type}),a.selection&&be&&this.selectionDidChange(),pe||be}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(Wl(a)){const ee=this.normalizeOffset(a);if(Wl(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(Lu(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 Du(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(Xc(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",ge(we({},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(Xc(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 oe=a.offsetOf(y.lastChild);if(oe>=b&&oe<=E)return!0}return!1}function qh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),oe=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&oe>=re&&oe<=ee}function vf(a,y,b,E){var ee,re,oe,pe,be,Se;const Ae=b.parent;if(Ae&&b instanceof No){const We=!E&&y==="forward"||E==="body"&&y==="backward";let dt=We?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return We?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(Ae.addChildrenAfter(b.removeBranch("body"),b),Ae.removeChild(b),dt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(Ae.addChildrenAfter(b.removeBranch("body"),b),Ae.removeChild(b),dt--),a.position=dt,!0}if(Ae&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const We=b.leftSibling;b.hasChildren&&Ae.addChildrenAfter(b.removeBranch("body"),b),Ae.removeChild(b),a.position=a.offsetOf(We)}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),Ae.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(Ae&&(b.type==="box"||b.type==="enclose")){const We=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return Ae.addChildrenAfter(b.removeBranch("body"),b),Ae.removeChild(b),a.position=a.offsetOf(We),!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 We=yf.fractionNavigationOrder==="numerator-denominator"?"above":"below",dt=We==="above"?"below":"above";if(Ae&&(y==="forward"&&E===We||y==="backward"&&E===dt)){const Pt=b.removeBranch(We),Kt=b.removeBranch(dt);return Ae.addChildrenAfter([...Pt,...Kt],b),Ae.removeChild(b),a.position=a.offsetOf(Pt.length>0?Pt[Pt.length-1]:Kt[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 We=y==="forward"?(oe=(ee=b.superscript)==null?void 0:ee[0])!=null?oe:(re=b.subscript)==null?void 0:re[0]:(Se=(pe=b.subscript)==null?void 0:pe[0].lastSibling)!=null?Se:(be=b.superscript)==null?void 0:be[0].lastSibling;return We&&(a.position=a.offsetOf(We)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const We=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=We,!0}if(E==="superscript")if(y==="backward"){const We=a.offsetOf(b.firstChild)-1;console.assert(We>=0),a.position=We}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 We=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=We}return!0}if((Ae==null?void 0:Ae.type)==="genfrac"&&!E&&b.type!=="first"){let We=a.offsetOf(b.leftSibling);return Ae.removeChild(b),Ae.hasEmptyBranch("above")&&Ae.hasEmptyBranch("below")?(We=a.offsetOf(Ae.leftSibling),Ae.parent.removeChild(Ae),a.announce("delete",void 0,[Ae]),a.position=We,!0):(a.announce("delete",void 0,[b]),a.position=We,!0)}if(y==="backward"&&((Ae==null?void 0:Ae.command)==="\\ln"||(Ae==null?void 0:Ae.command)==="\\log")&&b.parentBranch!=="body"){const We=a.offsetOf(Ae.leftSibling);return Ae.parent.removeChild(Ae),a.announce("delete",void 0,[Ae]),a.position=We,!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&&vf(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(vf(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])}}):qc(a,As(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&&vf(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&vf(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&vf(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])}):qc(a,As(a.selection),"deleteContentForward")}function qc(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 oe=E[0];oe.type==="first"&&(oe=oe.rightSibling);const pe=E[E.length-1];if(oe===ee&&pe===re){const be=E[0].parent;be.parent&&be.type!=="prompt"&&(y=[a.offsetOf(be.leftSibling),a.offsetOf(be)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const be=E[0].parent,Se=E[0].parentBranch==="below"?"above":"below",Ae=a.offsetOf(be.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var We,dt;const Pt=be.removeBranch(Se);if(Pt.length===1&&Pt[0].type==="placeholder")(dt=be.parent)==null||dt.removeChild(be),a.position=Math.max(0,Ae);else{const Kt=be.parent.addChildrenAfter(Pt,be);(We=be.parent)==null||We.removeChild(be),a.position=a.offsetOf(Kt)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ul({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&qc(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&qc(a,[a.anchor,_h(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&qc(a,[a.anchor,_h(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&qc(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&qc(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&qc(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&qc(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="${yt("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="${yt("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=we(ge(we({},Hf()),{macros:dr(),registers:yc()}),zf(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 oe=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";oe=oe.trim();const pe=D0(this.options),be=new pr({type:"root",mode:pe,body:tl(oe,{context:this.context})});this.model=new s1(this,pe,be),this.undoManager=new Ng(this.model);const Se=[];if(Se.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>"),Se.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),Se.push("<span part=content class=ML__content>"),Se.push(w0(this)),Se.push("</span>"),window.mathVirtualKeyboard&&(Se.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">`),Se.push(u1),Se.push("</div>")),Se.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),Se.push(d1),Se.push("</div>"),Se.push("</span>"),Se.push("<span class=ML__sr-only>"),Se.push("<span role=status aria-live=assertive aria-atomic=true></span>"),Se.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(Se.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=it.subscribe(()=>it.update(this.element)),it.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",We=>We.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(Xc(this)))},{signal:re}),this._menu=new Sv(qv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const Ae=this.element.querySelector("[part=menu-toggle]");Ae==null||Ae.addEventListener("pointerdown",We=>{if(We.currentTarget!==Ae||this._menu.state!=="closed")return;this.element.classList.add("tracking");const dt=Ae.getBoundingClientRect();this._menu.modifiers=Ju(We),this._menu.show({target:Ae,location:{x:dt.left,y:dt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),We.preventDefault(),We.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(Ae.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Km(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(()=>_s(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),tf&&!it.locale.startsWith(tf.locale)&&Bm(it.locale),cc!=="ready"&&document.fonts.ready.then(()=>Of(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(Xc(this)),Qf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Bh())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:Vc(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:lt(a)}}get backgroundColorMap(){return a=>{var y,b,E,ee,re,oe;return(oe=(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?oe:Ze(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=pr.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=we({},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 be of Object.keys(y)){const Se=this.queryStyle({[be]:y[be]});if(Se==="none")return"none";if(Se==="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 oe=re.length;if(oe===0)return"none";let pe=0;for(const be of re){if(be.type==="first"){oe-=1;continue}be.style[E]===ee&&(pe+=1)}return pe===0?"none":pe===oe?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=jm(this.options.keybindings,(a=nf())!=null?a:Fm());return((y=nf())==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=we(we({},this.options),zf(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=pr.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&Va.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)&&_s(this)}getOptions(a){return ed(this.options,a)}getOption(a){return ed(this.options,a)}handleEvent(a){return Bu(this,null,function*(){var y;if(oc(this)){if(Ch(a)){if(!jd(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(Md(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))&&Yf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Yf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Qf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>oc(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>oc(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!oc(this))return;it.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 Md(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Xc(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=ko(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();Va.insert(this.model,a,y)&&(_s(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&&qu(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=Vc(this.field);else{const E=Ud(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const oe of E)oe.right>ee&&(ee=oe.right),oe.top<re&&(re=oe.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&&tt()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?A0(this.model):a==="&"?T0(this.model):this.model.selectionIsCollapsed?Va.insert(this.model,a,we({style:this.model.at(this.model.position).computedStyle},y)):Va.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),_s(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:oe}=this;oe.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let pe=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const be=tl(y,{context:this.context,parseMode:a});oe.collapseSelection("forward");const Se=oe.at(oe.position);oe.position=oe.offsetOf(Se.parent.addChildrenAfter(be,Se)),pe=!0}if(this.model.mode=a,a==="latex"){let be=oe.selectionIsCollapsed;Cd(this,"accept");let Se,Ae=oe.at(oe.position);if(be)Se="\\";else{const dt=As(oe.selection);Se=this.model.getValue(dt,"latex");const Pt=this.model.extractAtoms(dt);Pt.length===1&&Pt[0].type==="placeholder"&&(Se=y,be=!0),Ae=oe.at(dt[0])}const We=new Yd(Se);Ae.parent.addChildAfter(We,Ae),be?oe.position=oe.offsetOf(We.lastChild):oe.setSelection(oe.offsetOf(We.firstChild),oe.offsetOf(We.lastChild))}else rf(oe).forEach(be=>{be.isError=!1});if(b){const be=tl(b,{context:this.context,parseMode:re});oe.collapseSelection("forward");const Se=oe.at(oe.position);oe.position=oe.offsetOf(Se.parent.addChildrenAfter(be,Se)),pe=!0}return _s(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),pe}),this.model.mode=a,window.mathVirtualKeyboard.update(Xc(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};Lu(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),oe=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(oe==="set"){this.defaultStyle=we(we({},this.defaultStyle),re);return}const pe=we({},this.defaultStyle);for(const be of Object.keys(re))pe[be]===re[be]?(be==="color"&&delete pe.verbatimColor,be==="backgroundColor"&&delete pe.verbatimBackgroundColor,delete pe[be]):pe[be]=re[be];this.defaultStyle=pe;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const pe of this.model.selection.ranges)Mh(this.model,pe,re,{operation:oe});else Mh(this.model,ee.range,re,{operation:oe})}),_s(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=Vc(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=ff(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),_s(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,ge(we({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),_s(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),_s(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(Xc(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(Xc(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(Xc(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:D0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Cd(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(Xc(this)),Qf(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",ge(we({},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(),qu(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="",Ed(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})),_s(this),this.focusBlurInProgress=!1,Bh();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{oc(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Ah(this,a)}onKeystroke(a){return H0(this,a)}onCompositionStart(a){this.model.deleteAtoms(As(this.model.selection));const y=Vc(this.field);y&&requestAnimationFrame(()=>{qu(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),_s(this)}onCompositionEnd(a){Dg(this.model),Ah(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Va.onCopy(this,a),qc(this.model,As(this.model.selection),"deleteByCut"),this.snapshot("cut"),_s(this))}onCopy(a){Va.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=Va.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(),If(this),Qf(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=>tr(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"]};Nu().readAloudElement=a,E.synthesizeSpeech(ee,(re,oe)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(oe!=null&&oe.AudioStream)){console.log("polly.synthesizeSpeech():",oe);return}const pe=new TextDecoder("utf-8").decode(new Uint8Array(oe.AudioStream));Nu().readAloudMarks=pe.split(`
`).map(be=>be?JSON.parse(be):{}),Nu().readAloudTokens=[];for(const be of Nu().readAloudMarks)be.value&&Nu().readAloudTokens.push(be.value);Nu().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(be,Se)=>{if(be){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${be}`);return}if(!(Se!=null&&Se.AudioStream))return;const Ae=new Uint8Array(Se.AudioStream),We=new Blob([Ae.buffer],{type:"audio/mpeg"}),dt=URL.createObjectURL(We),Pt=Nu();Pt.readAloudAudio?Pt.readAloudAudio.pause():(Pt.readAloudAudio=new Audio,Pt.readAloudAudio.addEventListener("ended",()=>{const Kt=Pt.readAloudMathfield;Pt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Kt?(qu(Kt),Pt.readAloudElement=null,Pt.readAloudMathfield=null,Pt.readAloudTokens=[],Pt.readAloudMarks=[],Pt.readAloudCurrentMark=""):gp(Pt.readAloudElement)}),Pt.readAloudAudio.addEventListener("timeupdate",()=>{let Kt="";const Yn=Pt.readAloudAudio.currentTime*1e3+100;for(const Qr of Pt.readAloudMarks)Qr.time<Yn&&(Kt=Qr.value);Pt.readAloudCurrentMark!==Kt&&(Pt.readAloudCurrentToken=Kt,Kt&&Kt===Pt.readAloudFinalToken?Pt.readAloudAudio.pause():(Pt.readAloudCurrentMark=Kt,Qh(Pt.readAloudElement,Pt.readAloudCurrentMark)))})),Pt.readAloudAudio.src=dt,Pt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Pt.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 Io=new WeakMap,p1=.5,Ru={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 = ..."},ul=class ld extends HTMLElement{static get formAssociated(){return Rd()}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 it.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),it.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 it.strings}static set strings(y){it.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 Bu(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(),oe=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=oe}catch(ee){}})}static playSound(y){return Bu(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(Ru[E])if(Ru[E].startsWith("mf."))if(Ru[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Ru[E]}`);else{const ee=Ru[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 ${Ru[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(Rd()&&(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=[Iu("core"),Iu("mathfield"),Iu("mathfield-element"),Iu("ui"),Iu("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>"+pu("core")+pu("mathfield")+pu("mathfield-element")+pu("ui")+pu("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=ld.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?ed(this._mathfield.options,y):Io.has(this)?we({},ed(we(we({},Hf()),zf(Io.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?ed(this._mathfield.options,y):Io.has(this)?ed(we(we({},Hf()),zf(Io.get(this).options)),y):null}reflectAttributes(){const y=Hf(),b=this._getOptions();Object.keys(ld.optionsAttributes).forEach(E=>{const ee=yu(E);ld.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(ld.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(Io.has(this)){const b=we(we({},Io.get(this).options),y);Io.set(this,ge(we({},Io.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Io.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))Ru[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${Ru[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(Io.has(this)){let oe,pe,be;if(Du(y)?([oe,pe]=y.ranges[0],be=b):Lu(y)?([oe,pe]=y,be=b):Wl(y)&&Wl(b)?(oe=y,pe=b,be=E):(oe=0,pe=-1,be=y),(be===void 0||be==="latex")&&oe===0&&pe===-1)return(re=(ee=Io.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(Io.has(this)){const ee=Io.get(this).options;Io.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=bf(this);Io.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?ff(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=Au(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;jc.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),oe=this.shadowRoot,pe=re.userSelect!=="none";if(pe)oe.host.addEventListener("pointerdown",this,!0);else{const Ae=oe.querySelector("span");Ae.style.pointerEvents="none"}oe.host.addEventListener("focus",this,!0),oe.host.addEventListener("blur",this,!0),Rd()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),pe&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const be=oe.querySelector("slot:not([name])");if(be)try{this._style=be.assignedElements().filter(Ae=>Ae.tagName.toLowerCase()==="style").map(Ae=>Ae.textContent).join("")}catch(Ae){console.error(Ae)}if(this._style){const Ae=document.createElement("style");Ae.textContent=this._style,oe.appendChild(Ae)}let Se="";if(this.hasAttribute("value")?Se=this.getAttribute("value"):Se=(y=be==null?void 0:be.assignedNodes().map(Ae=>Ae.nodeType===3?Ae.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(oe.querySelector(":host > span"),ge(we({},(E=(b=Io.get(this))==null?void 0:b.options)!=null?E:bf(this)),{eventSink:this,value:Se})),!Io.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const Ae of Object.keys(ld.optionsAttributes))this.upgradeProperty(yu(Ae))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Io.has(this)){const Ae=this._mathfield,We=Io.get(this),dt=We.menuItems;Ae.model.deferNotifications({content:!1,selection:!1},()=>{const Pt=We.value;Pt!==void 0&&Ae.setValue(Pt),Ae.model.selection=We.selection,Io.delete(this)}),dt&&(this.menuItems=dt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),$f()}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=ed(this._mathfield.options,Object.keys(ld.optionsAttributes).map(ee=>yu(ee)));Io.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":_s(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",""),Rd()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Rd()?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"),Rd()?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:ge(we({},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=Io.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}Io.has(this)?Io.set(this,ge(we({},Io.get(this)),{menuItems:y})):Io.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:bf(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:Io.has(this)?Io.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,_s(this._mathfield);return}if(Io.has(this)){Io.set(this,ge(we({},Io.get(this)),{selection:y}));return}Io.set(this,{value:void 0,selection:y,options:bf(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:Io.has(this)?Io.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,_s(this._mathfield)),Io.has(this)){Io.set(this,ge(we({},Io.get(this)),{selection:{ranges:[[y,y]]}}));return}Io.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:bf(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}};ul.version="0.98.5",ul._fontsDirectory="./fonts",ul._soundsDirectory="./sounds",ul.keypressVibration=!0,ul._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},ul._plonkSound="plonk.wav",ul.audioBuffers={},ul.createHTML=a=>a,ul._speechEngineRate="100%",ul._speechEngineVoice="Joanna",ul._textToSpeechMarkup="",ul._textToSpeechRules="mathlive",ul._textToSpeechRulesOptions={},ul.speakHook=r1,ul.readAloudHook=h1,ul._decimalSeparator=".",ul.fractionNavigationOrder="numerator-denominator",ul._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 yf=ul;function yu(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function bf(a){const y={readOnly:!1},b=yf.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[yu(E)]=!0:b[E]==="on/off"?ee==="on"?y[yu(E)]=!0:ee==="off"?y[yu(E)]=!1:y[yu(E)]=void 0:b[E]==="number"?y[yu(E)]=Number.parseFloat(ee!=null?ee:"0"):y[yu(E)]=ee}}),y}function Rd(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=yf,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=yf,(wp=window.customElements)==null||wp.define("math-field",yf)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const oe=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;oe==="\\"?E++:oe==="{"?ee++:oe==="}"&&ee--,E++}return-1}function ih(a,y,b,E,ee="latex"){const re=[];for(const oe of a)if(oe.type==="text"){const pe=oe.data;let be=!0,Se=0,Ae;Ae=pe.indexOf(y),Ae!==-1&&(Se=Ae,Se>0&&re.push({type:"text",data:pe.slice(0,Se)}),be=!1);let We=!1;for(;!We;){if(be){if(Ae=pe.indexOf(y,Se),Ae===-1){We=!0;break}Se!==Ae&&re.push({type:"text",data:pe.slice(Se,Ae)}),Se=Ae}else{if(Ae=m1(b,pe,Se+y.length),Ae===-1){We=!0;break}let dt=pe.slice(Se+y.length,Ae);ee==="ascii-math"&&([,dt]=Vo(dt,{format:"ascii-math"})),re.push({type:"math",data:dt,rawData:pe.slice(Se,Ae+b.length),mathstyle:E}),Se=Ae+b.length}be=!be}Se<pe.length&&re.push({type:"text",data:pe.slice(Se)})}else re.push(oe);return re}function Sp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=ih(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=ih(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=ih(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=ih(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 Nd(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),oe=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(oe)){const pe=document.createElement("span");if(/\bmathml\b/i.test(oe)&&b.renderToMathML&&pe.append(g1(a,b)),/\bspeakable-text\b/i.test(oe)&&b.renderToSpeakableText){const be=document.createElement("span");be.setAttribute("translate","no");const Se=b.renderToSpeakableText(a);be.innerHTML=window.MathfieldElement.createHTML(Se),be.className="ML__sr-only",pe.append(be)}return pe.append(re),pe}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 oe=Nd(a,"",y,!0);oe&&re.appendChild(oe)}else{if(!a.trim())return null;const oe=Sp(a,(E=y.TeX)==null?void 0:E.delimiters,(ee=y.asciiMath)==null?void 0:ee.delimiters);if(oe.length===1&&oe[0].type==="text")return null;re=document.createDocumentFragment();for(const pe of oe)if(pe.type==="text")re.appendChild(document.createTextNode(pe.data));else{const be=Nd(pe.data,pe.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);be&&re.appendChild(be)}}return re}function Cp(a,y){var b,E,ee,re,oe,pe,be,Se,Ae,We,dt,Pt,Kt,Yn,Qr,Un;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Ar=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(Ar)){a.textContent="";const Rr=Nd(Ar,"",y,!0);Rr&&a.append(Rr);return}const ri=Sp(Ar,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(ri.length===1&&ri[0].type==="math"){a.textContent="";const Rr=Nd(ri[0].data,ri[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Rr&&a.append(Rr);return}if(ri.length===1&&ri[0].type==="text")return}for(let Ar=a.childNodes.length-1;Ar>=0;Ar--){const ri=a.childNodes[Ar];if(ri.nodeType===3){const Rr=y1((oe=ri.textContent)!=null?oe:"",y);Rr&&(Ar+=Rr.childNodes.length-1,ri.replaceWith(Rr))}else if(ri.nodeType===1){const Rr=ri,Bi=ri.nodeName.toLowerCase();if(Bi==="script"){const ga=ri;let Qi;if((pe=y.processScriptTypePattern)!=null&&pe.test(ga.type))Qi=(be=ga.textContent)!=null?be:"";else if((Se=y.processMathJSONScriptTypePattern)!=null&&Se.test(ga.type))try{Qi=(We=y.serializeToLatex)==null?void 0:We.call(y,JSON.parse((Ae=ga.textContent)!=null?Ae:""))}catch(Eo){console.error(Eo)}if(Qi){let Eo="textstyle";for(const ui of ga.type.split(";")){const[uc,Qc]=ui.toLowerCase().split("=");uc.trim()==="mode"&&(Eo=Qc.trim()==="display"?"displaystyle":"textstyle")}const Xo=Nd(Qi,Eo,y,!0);Xo&&ga.parentNode.replaceChild(Xo,ga)}}else if(((Pt=(dt=y.processClassPattern)==null?void 0:dt.test(Rr.className))!=null?Pt:!1)||!((Yn=(Kt=y.skipTags)==null?void 0:Kt.includes(Bi))!=null&&Yn||(Un=(Qr=y.ignoreClassPattern)==null?void 0:Qr.test(Rr.className))!=null&&Un))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Qi=a.textContent;a.textContent="";const Eo=Nd(Qi!=null?Qi:"","displaystyle",y,!0);Eo&&a.append(Eo)}else Cp(Rr,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 oe=we(we({},b1),y);oe.ignoreClassPattern=new RegExp((b=oe.ignoreClass)!=null?b:""),oe.processClassPattern=new RegExp((E=oe.processClass)!=null?E:""),oe.processScriptTypePattern=new RegExp((ee=oe.processScriptType)!=null?ee:""),oe.processMathJSONScriptTypePattern=new RegExp((re=oe.processMathJSONScriptType)!=null?re:""),$f(),Vl("core"),Cp(a,oe)}catch(oe){oe instanceof Error?console.error("renderMathInElement(): "+oe.message):console.error("renderMathInElement(): Could not render math for element",a)}}function w1(a,y){const b=$u.singleton;return b?(b.show(),sf(),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}Ul({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function Nu(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function A1(){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 T1(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 oe=C1(a);if(!oe)return;const pe=y!=null?y:{};(b=pe.renderToMarkup)!=null||(pe.renderToMarkup=nl),(E=pe.renderToMathML)!=null||(pe.renderToMathML=Rv),(ee=pe.renderToSpeakableText)!=null||(pe.renderToSpeakableText=Nv),(re=pe.serializeToLatex)!=null||(pe.serializeToLatex=Bv),x1(oe,pe)}var I1={mathlive:"0.98.5"}},17423:function(kn,Vt,ae){"use strict";ae.d(Vt,{Z:function(){return we}});const fe=ge=>typeof ge=="object"&&ge!=null&&ge.nodeType===1,Fe=(ge,Te)=>(!Te||ge!=="hidden")&&ge!=="visible"&&ge!=="clip",Be=(ge,Te)=>{if(ge.clientHeight<ge.scrollHeight||ge.clientWidth<ge.scrollWidth){const ft=getComputedStyle(ge,null);return Fe(ft.overflowY,Te)||Fe(ft.overflowX,Te)||(Re=>{const bt=(ht=>{if(!ht.ownerDocument||!ht.ownerDocument.defaultView)return null;try{return ht.ownerDocument.defaultView.frameElement}catch(st){return null}})(Re);return!!bt&&(bt.clientHeight<Re.scrollHeight||bt.clientWidth<Re.scrollWidth)})(ge)}return!1},Ye=(ge,Te,ft,Re,bt,ht,st,tt)=>ht<ge&&st>Te||ht>ge&&st<Te?0:ht<=ge&&tt<=ft||st>=Te&&tt>=ft?ht-ge-Re:st>Te&&tt<ft||ht<ge&&tt>ft?st-Te+bt:0,ve=ge=>{const Te=ge.parentElement;return Te==null?ge.getRootNode().host||null:Te},Ce=(ge,Te)=>{var ft,Re,bt,ht;if(typeof document=="undefined")return[];const{scrollMode:st,block:tt,inline:Le,boundary:xt,skipOverflowHiddenElements:on}=Te,it=typeof xt=="function"?xt:hn=>hn!==xt;if(!fe(ge))throw new TypeError("Invalid target");const yt=document.scrollingElement||document.documentElement,Ee=[];let de=ge;for(;fe(de)&&it(de);){if(de=ve(de),de===yt){Ee.push(de);break}de!=null&&de===document.body&&Be(de)&&!Be(document.documentElement)||de!=null&&Be(de,on)&&Ee.push(de)}const je=(Re=(ft=window.visualViewport)==null?void 0:ft.width)!=null?Re:innerWidth,ze=(ht=(bt=window.visualViewport)==null?void 0:bt.height)!=null?ht:innerHeight,{scrollX:At,scrollY:ct}=window,{height:lt,width:Ze,top:kt,right:pt,bottom:nn,left:rt}=ge.getBoundingClientRect(),{top:qt,right:pn,bottom:cn,left:Xe}=(hn=>{const Qe=window.getComputedStyle(hn);return{top:parseFloat(Qe.scrollMarginTop)||0,right:parseFloat(Qe.scrollMarginRight)||0,bottom:parseFloat(Qe.scrollMarginBottom)||0,left:parseFloat(Qe.scrollMarginLeft)||0}})(ge);let Me=tt==="start"||tt==="nearest"?kt-qt:tt==="end"?nn+cn:kt+lt/2-qt+cn,mt=Le==="center"?rt+Ze/2-Xe+pn:Le==="end"?pt+pn:rt-Xe;const Gt=[];for(let hn=0;hn<Ee.length;hn++){const Qe=Ee[hn],{height:ut,width:Yt,top:Qt,right:tn,bottom:_t,left:en}=Qe.getBoundingClientRect();if(st==="if-needed"&&kt>=0&&rt>=0&&nn<=ze&&pt<=je&&kt>=Qt&&nn<=_t&&rt>=en&&pt<=tn)return Gt;const Cn=getComputedStyle(Qe),On=parseInt(Cn.borderLeftWidth,10),$e=parseInt(Cn.borderTopWidth,10),ce=parseInt(Cn.borderRightWidth,10),le=parseInt(Cn.borderBottomWidth,10);let me=0,he=0;const se="offsetWidth"in Qe?Qe.offsetWidth-Qe.clientWidth-On-ce:0,Ie="offsetHeight"in Qe?Qe.offsetHeight-Qe.clientHeight-$e-le:0,et="offsetWidth"in Qe?Qe.offsetWidth===0?0:Yt/Qe.offsetWidth:0,$t="offsetHeight"in Qe?Qe.offsetHeight===0?0:ut/Qe.offsetHeight:0;if(yt===Qe)me=tt==="start"?Me:tt==="end"?Me-ze:tt==="nearest"?Ye(ct,ct+ze,ze,$e,le,ct+Me,ct+Me+lt,lt):Me-ze/2,he=Le==="start"?mt:Le==="center"?mt-je/2:Le==="end"?mt-je:Ye(At,At+je,je,On,ce,At+mt,At+mt+Ze,Ze),me=Math.max(0,me+ct),he=Math.max(0,he+At);else{me=tt==="start"?Me-Qt-$e:tt==="end"?Me-_t+le+Ie:tt==="nearest"?Ye(Qt,_t,ut,$e,le+Ie,Me,Me+lt,lt):Me-(Qt+ut/2)+Ie/2,he=Le==="start"?mt-en-On:Le==="center"?mt-(en+Yt/2)+se/2:Le==="end"?mt-tn+ce+se:Ye(en,tn,Yt,On,ce+se,mt,mt+Ze,Ze);const{scrollLeft:Ht,scrollTop:Xt}=Qe;me=$t===0?0:Math.max(0,Math.min(Xt+me/$t,Qe.scrollHeight-ut/$t+Ie)),he=et===0?0:Math.max(0,Math.min(Ht+he/et,Qe.scrollWidth-Yt/et+se)),Me+=Xt-me,mt+=Ht-he}Gt.push({el:Qe,top:me,left:he})}return Gt},_e=ge=>ge===!1?{block:"end",inline:"nearest"}:(Te=>Te===Object(Te)&&Object.keys(Te).length!==0)(ge)?ge:{block:"start",inline:"nearest"};function we(ge,Te){if(!ge.isConnected||!(bt=>{let ht=bt;for(;ht&&ht.parentNode;){if(ht.parentNode===document)return!0;ht=ht.parentNode instanceof ShadowRoot?ht.parentNode.host:ht.parentNode}return!1})(ge))return;const ft=(bt=>{const ht=window.getComputedStyle(bt);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(ge);if((bt=>typeof bt=="object"&&typeof bt.behavior=="function")(Te))return Te.behavior(Ce(ge,Te));const Re=typeof Te=="boolean"||Te==null?void 0:Te.behavior;for(const{el:bt,top:ht,left:st}of Ce(ge,_e(Te))){const tt=ht-ft.top+ft.bottom,Le=st-ft.left+ft.right;bt.scroll({top:tt,left:Le,behavior:Re})}}}}]);
}());