|
|
!(function(){var su=Math.pow;var Uu=(Ln,Kt,ie)=>new Promise((fe,Te)=>{var Re=_e=>{try{ye(ie.next(_e))}catch(ce){Te(ce)}},Ge=_e=>{try{ye(ie.throw(_e))}catch(ce){Te(ce)}},ye=_e=>_e.done?fe(_e.value):Promise.resolve(_e.value).then(Re,Ge);ye((ie=ie.apply(Ln,Kt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[21578],{52310:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},33463:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},28575:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},18299:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},84249:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},81893:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},42922:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},25877:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},63237:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},99569:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},73148:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},56747:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},50881:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},22751:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},79852:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},34182:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},38308:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},74664:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 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-8H544V328c0-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 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},17663:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},91034:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},72395:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},53978:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(ge,Ae){return Te.createElement(ye.Z,(0,fe.Z)({},ge,{ref:Ae,icon:Ge}))},ce=Te.forwardRef(_e)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Ln,Kt){"use strict";Kt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Ln={},Kt="5.0",ie={},fe=null,Te=!1,Re=!1,Ge=null,ye=!1,_e=null,ce=null,ke=0;ke<arguments.length;ke++){var ge=arguments[ke];if(ge!==null)switch(typeof ge){case"number":Kt=ge.toFixed(1);break;case"string":ge.match(new RegExp("^[0-9]\\.[0-9]+$"))?Kt=ge:Ge=ge;break;case"object":typeof ge.is3D!="undefined"?fe=ge:ie=ge;break;case"boolean":Te=ge,Re=!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},ie.material_id!==void 0&&!Re&&(Te=!0)),Ge!==null&&ie.id===void 0&&(ie.id=Ge);var Ae="",lt="",ze=!1,st=null,dt=null,ct=null,qe=!1,be=null,vt=null,Dt=null,it=null,ot=null;ie.height!==void 0&&(ie.height=Math.round(ie.height)),ie.width!==void 0&&(ie.width=Math.round(ie.width));var Ce=function(pt){return parseFloat(pt)>4?parseFloat(pt):5};Ln.setHTML5Codebase=function(pt,wt){ce=pt,Ot(pt,wt)},Ln.setJavaCodebase=Ln.setJavaCodebaseVersion=Ln.isCompiledInstalled=Ln.setPreCompiledScriptPath=Ln.setPreCompiledResourcePath=function(){},Ln.setHTML5CodebaseVersion=function(pt,wt){var Qt=parseFloat(pt);if(Qt!==NaN&&Qt<5){console.log("The GeoGebra HTML5 codebase version "+Qt+" is deprecated. Using version latest instead.");return}_e=pt,Ie(pt,wt)},Ln.getHTML5CodebaseVersion=function(){return dt},Ln.getParameters=function(){return ie},Ln.setFontsCSSURL=function(pt){it=pt},Ln.setGiacJSURL=function(pt){},Ln.setJNLPFile=function(pt){Ae=pt},Ln.setJNLPBaseDir=function(pt){},Ln.inject=function(){function pt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var wt="auto",Qt=ie.id,Zn,Cn=!1,rn=0;rn<arguments.length;rn++){var ln=arguments[rn];typeof ln=="string"?(ln=ln.toLowerCase(),ln.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?wt=ln:Qt=arguments[rn]):typeof ln=="boolean"?Cn=ln:ln instanceof HTMLElement&&(Zn=ln)}zn();function zn(){if(!ye){setTimeout(zn,200);return}wt=Yt(wt);var _n=Zn||document.getElementById(Qt);if(!_n){console.log("possibly bug on ajax loading? ");return}if(Ln.removeExistingApplet(_n,!1),ie.width===void 0&&_n.clientWidth&&(ie.width=_n.clientWidth),ie.height===void 0&&_n.clientHeight&&(ie.height=_n.clientHeight),!(ie.width&&ie.height)&&wt==="html5"&&(delete ie.width,delete ie.height),st=wt,wt==="screenshot")yt(_n,ie);else{var Oe=!1;ie.hasOwnProperty("playButton")&&ie.playButton||ie.hasOwnProperty("clickToLoad")&&ie.clickToLoad?Oe=!0:ie.hasOwnProperty("playButtonAutoDecide")&&ie.playButtonAutoDecide&&(Oe=(!Se()||pt())&&He()),Oe?(st="screenshot",rt(_n,ie,Cn,wt)):Ft(_n,ie,Cn)}}};function Se(){try{return window.self!==window.top}catch(pt){return!0}}function He(){return ie.hasOwnProperty("screenshotGenerator")&&ie.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Ln.getViews=function(){return fe},Ln.isJavaInstalled=function(){return!1};var Ue=function(pt){var wt=function(rn){var ln=JSON.parse(rn),zn=function(ue){return ue.type=="G"||ue.type=="E"},_n=ln.elements?ln.elements.filter(zn)[0]:ln;if(!_n||!_n.url){Qt();return}ie.fileName=_n.url,xt(_n.settings||{}),fe.is3D=!0;var Oe="https://www.geogebra.org/images/";Ln.setPreviewImage(be||_n.previewUrl,Oe+"GeoGebra_loading.png",Oe+"applet_play.png"),pt()},Qt=function(){ie.onError&&ie.onError(),In("Error: Fetching material (id "+ie.material_id+") failed.",ie)},Zn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Cn="/materials/"+ie.material_id+"?scope=basic";mt("https://"+Zn+"/api/proxy.php?path="+encodeURIComponent(Cn),wt,Qt)};function xt(pt){var wt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Qt){pt[Qt]=!!pt[Qt]}),wt.forEach(function(Qt){ie[Qt]===void 0&&pt[Qt]!==void 0&&(ie[Qt]=pt[Qt])}),ie.showToolBarHelp===void 0&&(ie.showToolBarHelp=ie.showToolBar)}function mt(pt,wt,Qt){var Zn=new XMLHttpRequest;Zn.open("GET",pt),Zn.onload=function(){wt(Zn.responseText)},Zn.onerror=Qt,Zn.send()}Ln.isHTML5Installed=function(){return!0},Ln.getLoadedAppletType=function(){return st},Ln.setPreviewImage=function(pt,wt,Qt){be=pt,vt=wt,Dt=Qt},Ln.removeExistingApplet=function(pt,wt){var Qt;typeof pt=="string"&&(pt=document.getElementById(pt)),st=null;var Zn=null;for(Qt=0;Qt<pt.childNodes.length;Qt++){var Cn=pt.childNodes[Qt],rn=Cn.className;rn==="applet_screenshot"?wt?(Cn.style.display="block",st="screenshot"):Cn.style.display="none":rn!=="applet_scaler prerender"&&(pt.removeChild(Cn),Zn=rn&&rn.indexOf("appletParameters")!=-1?Cn.id:null,Qt--)}var ln=ie.id!==void 0?ie.id:Zn,zn=window[ln];zn&&typeof zn.getBase64=="function"&&(zn.remove(),window[ln]=null)},Ln.refreshHitPoints=function(){if(Ce(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var pt=Ln.getAppletObject();return pt&&typeof pt.recalculateEnvironments=="function"?(pt.recalculateEnvironments(),!0):!1},Ln.startAnimation=function(){var pt=Ln.getAppletObject();return pt&&typeof pt.startAnimation=="function"?(pt.startAnimation(),!0):!1},Ln.stopAnimation=function(){var pt=Ln.getAppletObject();return pt&&typeof pt.stopAnimation=="function"?(pt.stopAnimation(),!0):!1},Ln.getAppletObject=function(){var pt=ie.id!==void 0?ie.id:"ggbApplet";return window[pt]},Ln.resize=function(){};var ut=function(pt,wt,Qt){var Zn=document.createElement("param");Zn.setAttribute("name",wt),Zn.setAttribute("value",Qt),pt.appendChild(Zn)},$e=function(pt){return pt&&pt!=="false"},Ft=function(pt,wt,Qt){Ce(dt)<=4.2&&(Qt=!0);var Zn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==dt||ggbHTML5LoadedCodebaseIsWebSimple&&!qe)&&(Zn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Cn=document.createElement("div");Cn.classList.add("appletParameters","notranslate");var rn=wt.width,ln=wt.height;if(wt.disableAutoScale=wt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():wt.disableAutoScale,wt.width!==void 0)if(Ce(dt)<=4.4)$e(wt.showToolBar)&&(wt.height-=7),$e(wt.showAlgebraInput)&&(wt.height-=37),wt.width<605&&$e(wt.showToolBar)&&(wt.width=605,rn=605);else{var zn=100;($e(wt.showToolBar)||$e(wt.showMenuBar))&&(wt.hasOwnProperty("customToolBar")&&(wt.customToolbar=wt.customToolBar),zn=$e(wt.showMenuBar)?245:155),rn<zn&&(wt.width=zn,rn=zn)}Cn.style.border="none",Cn.style.display="inline-block";for(var _n in wt)wt.hasOwnProperty(_n)&&_n!=="appletOnLoad"&&Cn.setAttribute("data-param-"+_n,wt[_n]);it&&Cn.setAttribute("data-param-fontscssurl",it),Ln.resize=function(){GGBAppletUtils.responsiveResize(pt,wt)},window.addEventListener("resize",function(dn){Ln.resize()});var Oe=typeof wt.appletOnLoad=="function"?wt.appletOnLoad:function(){};if(!Qt&&wt.width!==void 0){wt.hasOwnProperty("showSplash")||Cn.setAttribute("data-param-showSplash","false");var ue=pt.querySelector(".applet_scaler.prerender"),le=ue!==null;if(le)var ve=ue.querySelector(".ggb_preview");else{var ve=en(rn,ln,wt.borderColor,!1);ue=document.createElement("div"),ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.style.width=rn+"px",ue.style.height=ln+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ue,"66%"),Ce(dt)>=5?(wt.appletOnLoad=function(dn){var gt=pt.querySelector(".ggb_preview");gt&>.parentNode.removeChild(gt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ue),window.GGBT_wsf_view&&$(window).trigger("resize"),Oe(dn)},le||ue.appendChild(ve)):Cn.appendChild(ve),ue.appendChild(Cn),le||pt.appendChild(ue),setTimeout(function(){Ln.resize()},1)}else{var pe=document.createElement("div");pe.className="applet_scaler",pe.style.position="relative",pe.style.display="block",pe.appendChild(Cn),pt.appendChild(pe),wt.appletOnLoad=function(dn){Ln.resize(),Oe(dn)}}function se(dn,gt){gt&&typeof gt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(dn,gt.appletOnLoad):renderGGBElement(dn),In("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",gt)}function Be(dn,gt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:dn,params:gt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(It){se(It.article,It.params)}),html5AppletsToProcess=null)},Ce(dt)<5&&(dn.className+=" geogebraweb")):se(dn,gt)}if(Zn){scriptLoadStarted=!0;for(var ft=0;ft<Cn.childNodes.length;ft++){var Bt=Cn.childNodes[ft].tagName;Bt==="TABLE"&&(Cn.removeChild(Cn.childNodes[ft]),ft--)}if(ggbHTML5LoadedScript!==null){var qt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');qt!=null&&qt.parentNode.removeChild(qt)}var an=document.createElement("script"),vn=function(){Be(Cn,wt)};an.src=lt+ct,ggbHTML5LoadedCodebaseIsWebSimple=qe,ggbHTML5LoadedCodebaseVersion=dt,ggbHTML5LoadedScript=an.src,In("GeoGebra HTML5 codebase loaded: '"+lt+"'.",wt),!ce&&(!_e||_e=="5.0")?(qe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),vn()):lt.requirejs?__webpack_require__.e(12).then(function(){var dn=[__webpack_require__(12)];vn.apply(null,dn)}.bind(this)).catch(__webpack_require__.oe):(an.onload=vn,pt.appendChild(an))}else Be(Cn,wt);wt.height=ln,wt.width=rn},yt=function(pt,wt,Qt){var Zn=en(wt.width,wt.height,wt.borderColor,Qt),Cn=document.createElement("div");Cn.style.position="relative",Cn.style.display="block",Cn.style.width=wt.width+"px",Cn.style.height=wt.height+"px",Cn.className="applet_screenshot applet_scaler"+(Qt?" applet_screenshot_play":""),Cn.appendChild(Zn);var rn=GGBAppletUtils.getScale(wt,pt,Qt);Qt?(pt.appendChild(Mt()),window.GGBT_wsf_view||(pt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Cn,"66%"),pt.appendChild(Cn),rn!==1&&!isNaN(rn)&&(GGBAppletUtils.scaleElement(Cn,rn),Cn.style.width=wt.width+"px",Cn.style.height=wt.height+"px",Cn.parentNode.style.width=wt.width*rn+"px",Cn.parentNode.style.height=wt.height*rn+"px"),Ln.resize=function(){gn(pt,Zn,Cn,Qt)},window.addEventListener("resize",function(ln){Ln.resize()}),Ln.resize()};function gn(pt,wt,Qt,Zn){if(pt.contains(wt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(pt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(pt)}var Cn=GGBAppletUtils.getScale(ie,pt,Zn);Qt.parentNode!==null&&(!isNaN(Cn)&&Cn!==1?(GGBAppletUtils.scaleElement(Qt,Cn),Qt.parentNode.style.width=ie.width*Cn+"px",Qt.parentNode.style.height=ie.height*Cn+"px"):(GGBAppletUtils.scaleElement(Qt,1),Qt.parentNode.style.width=ie.width+"px",Qt.parentNode.style.height=ie.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(pt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Ln.onExitFullscreen=function(pt,wt){wt.appendChild(pt)};var rt=function(pt,wt,Qt,Zn){yt(pt,wt,!0);for(var Cn=function(){var zn=[];for(ln=0;ln<pt.childNodes.length;ln++)zn.push(pt.childNodes[ln]);if(window.GGBT_wsf_view){var _n=window.GGBT_wsf_view.renderFullScreen(pt,wt.id),Oe=document.getElementById("fullscreencontainer"),ue=jQuery(pt).find(".fullscreencontent");ue.length>0?(_n.remove(),ue.attr("id","fullscreencontent").show(),jQuery(Oe).append(ue),window.dispatchEvent(new Event("resize"))):Ft(_n,wt,!1),window.GGBT_wsf_view.launchFullScreen(Oe)}else st=Zn,Ft(pt,wt,!1);if(!window.GGBT_wsf_view)for(ln=0;ln<zn.length;ln++)pt.removeChild(zn[ln])},rn=pt.getElementsByClassName("ggb_preview_play"),ln=0;ln<rn.length;ln++)rn[ln].addEventListener("click",Cn,!1),rn[ln].addEventListener("ontouchstart",Cn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(pt),He()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Mt=function(){var pt=document.createElement("div");if(pt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var wt='.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");}',Qt=document.createElement("style");Qt.styleSheet?Qt.styleSheet.cssText=wt:Qt.appendChild(document.createTextNode(wt)),document.getElementsByTagName("head")[0].appendChild(Qt)}return pt},en=function(pt,wt,Qt,Zn){var Cn=document.createElement("div");Cn.className="ggb_preview",Cn.style.position="absolute",Cn.style.zIndex="90",Cn.style.width=pt-2+"px",Cn.style.height=wt-2+"px",Cn.style.top="0px",Cn.style.left="0px",Cn.style.overflow="hidden",Cn.style.backgroundColor="white";var rn="lightgrey";Qt!==void 0&&(Qt==="none"?rn="transparent":rn=Qt),Cn.style.border="1px solid "+rn;var ln=document.createElement("img");if(ln.style.position="relative",ln.style.zIndex="1000",ln.style.top="-1px",ln.style.left="-1px",be!==null&&ln.setAttribute("src",be),ln.style.opacity=.7,vt!==null){var zn,_n,Oe;if(!Zn){zn=document.createElement("img"),zn.style.position="absolute",zn.style.zIndex="1001",zn.style.opacity=1,ln.style.opacity=.3,_n=360,_n>pt/4*3&&(_n=pt/4*3),Oe=_n/5.8,zn.setAttribute("src",vt),zn.setAttribute("width",_n),zn.setAttribute("height",Oe);var ue=(pt-_n)/2,le=(wt-Oe)/2;zn.style.left=ue+"px",zn.style.top=le+"px",Cn.appendChild(zn)}}return Cn.appendChild(ln),Cn},Yt=function(pt){return pt=pt.toLowerCase(),pt==="html5"||pt==="screenshot"?pt:"html5"},Qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ie=function(pt,wt){if(dt=pt,wt){Ot(dt,!0);return}var Qt=!Te;if(Qt){var Zn=Ce(dt);!isNaN(Zn)&&Zn<4.4&&(Qt=!1)}var Cn,rn;window.location.protocol.substr(0,4)==="http"?Cn=window.location.protocol:Cn="http:";var ln=dt.indexOf("//");ln>0?rn=dt:ln===0?rn=Cn+dt:rn="https://www.geogebra.org/apps/5.2.814.0/";for(var zn in Qe)if(dt.slice(Qe[zn].length*-1)===Qe[zn]||dt.slice((Qe[zn].length+1)*-1)===Qe[zn]+"/"){Ot(rn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Qt&&!fe.is3D&&!fe.AV&&!fe.SV&&!fe.CV&&!fe.EV2&&!fe.CP&&!fe.PC&&!fe.DA&&!fe.FI&&!fe.PV&&!$e(ie.showToolBar)&&!$e(ie.showMenuBar)&&!$e(ie.showAlgebraInput)&&!$e(ie.enableRightClick)&&(!ie.appName||ie.appName=="classic")?rn+="webSimple/":rn+="web3d/",Ot(rn,!1)},Ot=function(pt,wt){if(pt.requirejs){lt=pt;return}pt.slice(-1)!=="/"&&(pt+="/"),lt=pt,wt===null&&(wt=pt.indexOf("http")===-1),ze=wt,ct="web.nocache.js",qe=!1;var Qt=lt.split("/");Qt.length>1&&(!wt&&Qt[Qt.length-2]==="webSimple"?(ct="webSimple.nocache.js",qe=!0):Qe.indexOf(Qt[Qt.length-2])>=0&&(ct=Qt[Qt.length-2]+".nocache.js")),Qt=pt.split("/"),dt=Qt[Qt.length-3],dt.substr(0,4)==="test"?dt=dt.substr(4,1)+"."+dt.substr(5,1):(dt.substr(0,3)==="war"||dt.substr(0,4)==="beta")&&(dt="5.0");var Zn=parseFloat(dt);Zn!==NaN&&Zn<5&&pt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Zn+" is deprecated. Using version latest instead."),Ie("5.0",wt))},In=function(pt,wt){window.console&&window.console.log&&(!wt||typeof wt.showLogging=="undefined"||wt.showLogging&&wt.showLogging!=="false")&&console.log(pt)};ie.material_id!==void 0?Ue(mn):mn();function mn(){var pt=Kt;_e!==null?pt=_e:parseFloat(pt)<5&&(pt="5.0"),Ie(pt,!1),ce!==null&&Ot(ce,ze),ye=!0}return Ln},GGBAppletUtils=function(){"use strict";function Ln(){return window.GGBT_wsf_edit!==void 0}function Kt(ye,_e){_e!=1?(ye.style.transformOrigin="0% 0% 0px",ye.style.webkitTransformOrigin="0% 0% 0px",ye.style.transform="scale("+_e+","+_e+")",ye.style.webkitTransform="scale("+_e+","+_e+")",ye.style.maxWidth="initial",ye.querySelector(".ggb_preview")!==null&&(ye.querySelector(".ggb_preview").style.maxWidth="initial"),ye.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ye.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ye.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ye.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ye.style.transform="none",ye.style.webkitTransform="none")}function ie(ye,_e,ce,ke,ge,Ae){var lt=null;if(Ae!=null&&Ae!="")for(var ze=ye.parentNode;ze!=null;)if((" "+ze.className+" ").indexOf(" "+Ae+" ")>-1){lt=ze;break}else ze=ze.parentNode;var st=0,dt=0,ct=0,qe=0,be=0,vt=0,Dt=0;if(lt)st=lt.offsetWidth,dt=Math.max(ke?lt.offsetWidth:0,lt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(st=Math.min(window.innerWidth,document.documentElement.clientWidth),dt=Math.min(window.innerHeight,document.documentElement.clientHeight),ct=st):(st=window.innerWidth,dt=window.innerHeight,ct=window.innerWidth),ye){var it=ye.getBoundingClientRect();it.left>0&&it.left<=st&&(ge===void 0||!ge)&&(document.dir==="rtl"?(be=st-it.width-it.left,vt=ct<=480?10:30):(vt=it.left,be=ct<=480?10:30),qe=vt+be)}if(ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ot=ye.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(qe=40,Dt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(qe=0,Dt=40)}}return ye&&((ce===void 0||!ce)&&_e>0&&_e+qe<st?st=_e:st-=qe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ce===void 0||!ce)&&(dt-=Dt)),{width:st,height:dt}}function fe(ye,_e,ce,ke,ge){if(ye.isScreenshoGenerator)return 1;var Ae=ke!==void 0&&ke,lt=ye.noScaleMargin!=null&&ye.noScaleMargin,ze=function(ot){return ot&&ot!=="false"},st=ze(ye.autoHeight),dt=ie(_e,ye.width,ce,st,Ae&&window.GGBT_wsf_view||lt,ge),ct=parseInt(dt.width),qe=ye.width,be=ye.height;if(qe===void 0){var vt=_e.querySelector(".appletParameters");vt&&(qe=vt.offsetWidth,be=vt.offsetHeight)}var Dt=ct/qe,it=Ae?1:dt.height/be;return ce!==void 0&&!ce&&(Dt=Math.min(1,Dt),it=Math.min(1,it)),Math.min(Dt,it)}function Te(ye,_e,ce){var ke=1,ge,Ae=!1;if(ye.hasOwnProperty("allowUpscale")&&(Ae=ye.allowUpscale),ye.hasOwnProperty("scale")&&(ke=parseFloat(ye.scale),(isNaN(ke)||ke===null||ke===0)&&(ke=1),ke>1&&(Ae=!0)),_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ae=!0),!(ye.hasOwnProperty("disableAutoScale")&&ye.disableAutoScale))ge=fe(ye,_e,Ae,ce,ye.scaleContainerClass);else return ke;return Ae&&(!ye.hasOwnProperty("scale")||ke===1)?ge:Math.min(ke,ge)}function Re(ye){var _e=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),ke=ye.getBoundingClientRect(),ge=(_e-ke.width)/2,Ae=(ce-ke.height)/2;Ae<0&&(Ae=0),ye.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ge<40?ye.style.left="40px":ye.style.left=ge+"px",ye.style.top=Ae+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ae<40?ye.style.top="40px":ye.style.top=Ae+"px",ye.style.left=ge+"px")}function Ge(ye,_e){var ce=ye.querySelector(".appletParameters");if(ce){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!==ce.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ye)}if(ce.parentElement&&/fullscreen/.test(ce.parentElement.className))return;var ke=Te(_e,ye);Ln()&&ce.setAttribute("data-param-scale",ke);for(var ge=null,Ae=0;Ae<ye.childNodes.length;Ae++)if(ye.childNodes[Ae].className!==void 0&&ye.childNodes[Ae].className.match(/^applet_scaler/)){ge=ye.childNodes[Ae];break}if(ge!==null&&ge.querySelector(".noscale")!==null)return;var lt=_e.id!==void 0?_e.id:"ggbApplet",ze=window[lt];(ze==null||!ze.recalculateEnvironments)&&ge!==null&&!ge.className.match(/fullscreen/)&&(ge.parentNode.style.transform="",!isNaN(ke)&&ke!==1?(ge.parentNode.style.width=_e.width*ke+"px",ge.parentNode.style.height=_e.height*ke+"px",Kt(ge,ke)):(Kt(ge,1),ge.parentNode.style.width=_e.width+"px",ge.parentNode.style.height=_e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Re(ye),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ce).parents(".content-added-content"))}}return{responsiveResize:Ge,isFlexibleWorksheetEditor:Ln,positionCenter:Re,getScale:Te,scaleElement:Kt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Ln=n.location.search;return Ln.indexOf(J)!=-1||Ln.indexOf(K)!=-1}function q(Ln,Kt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Ln){var Kt=s[L].bindings;s[L].bindings=function(){for(var ie=Kt?Kt():{},fe=Ln[webModule.__softPermutationId],Te=O;Te<fe.length;Te++){var Re=fe[Te];ie[Re[O]]=Re[P]}return ie}};var t;function u(){return v(),t}function v(){if(!t){var Ln=o.createElement(Q);if(Ln.id=L,Ln.style.cssText=R+S,Ln.tabIndex=-1,o.body.appendChild(Ln),t=Ln.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Kt=document.compatMode==U?V:W;t.write(Kt+X),t.close()}}}function w(Ln){function Kt(fe){function Te(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Re=Te();if(Re){fe();return}function Ge(){if(!Re){if(!Te())return;Re=!0,fe(),o.removeEventListener&&o.removeEventListener(Z,Ge,!1),ye&&clearInterval(ye)}}o.addEventListener&&o.addEventListener(Z,Ge,!1);var ye=setInterval(function(){Ge()},$)}function ie(fe){var Te=u(),Re=Te.body,Ge=Te.createElement(_);Ge.language=ab,Ge.crossOrigin=W,Ge.src=fe,webModule.__errFn&&(Ge.onerror=function(){webModule.__errFn(L,new Error(bb+fe))}),Re.appendChild(Ge)}Kt(function(){ie(Ln)})}webModule.__startLoadingFragment=function(Ln){return C(Ln)},webModule.__installRunAsyncCode=function(Ln){var Kt=u(),ie=Kt.body,fe=Kt.createElement(_);fe.language=ab,fe.text=Ln,ie.appendChild(fe),ie.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(Ln){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ln){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ln){var Kt=c[Ln];return Kt==null?null:Kt},r=d,webModule.__errFn=e}function B(){function Ln(ye){var _e=ye.lastIndexOf(rb);_e==-1&&(_e=ye.length);var ce=ye.indexOf(sb);ce==-1&&(ce=ye.length);var ke=ye.lastIndexOf(tb,Math.min(ce,_e));return ke>=O?ye.substring(O,ke+P):W}function Kt(ye){if(!ye.match(/^\w+:\/\//)){var _e=o.createElement(ub);_e.src=ye+vb,ye=Ln(_e.src)}return ye}function ie(){var ye=__gwt_getMetaProperty(wb);return ye!=null?ye:W}function fe(){for(var ye=o.getElementsByTagName(_),_e=O;_e<ye.length;++_e)if(ye[_e].src.indexOf(xb)!=-1)return Ln(ye[_e].src);return W}function Te(){var ye=o.getElementsByTagName(yb);return ye.length>O?ye[ye.length-P].href:W}function Re(){var ye=o.location;return ye.href==ye.protocol+zb+ye.host+ye.pathname+ye.search+ye.hash}var Ge=ie();return Ge==W&&(Ge=fe()),Ge==W&&(Ge=Te()),Ge==W&&Re()&&(Ge=Ln(o.location.href)),Ge=Kt(Ge),Ge}function C(Ln){return Ln.match(/^\//)||Ln.match(/^[a-zA-Z]+:\/\//)?Ln:webModule.__moduleBase+Ln}function D(){var Ln=[],Kt=O,ie=[],fe=[];function Te(ye){var _e=fe[ye](),ce=ie[ye];if(_e in ce)return _e;var ke=[];for(var ge in ce)ke[ce[ge]]=ge;throw r&&r(ye,ke,_e),null}if(__gwt_isKnownPropertyValue=function(ye,_e){return _e in ie[ye]},webModule.__getPropMap=function(){var ye={};for(var _e in ie)ie.hasOwnProperty(_e)&&(ye[_e]=Te(_e));return ye},webModule.__computePropValue=Te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Re;try{Re=Cb;var Ge=Re.indexOf(Db);Ge!=-1&&(Kt=parseInt(Re.substring(Ge+P),$),Re=Re.substring(O,Ge))}catch(ye){}return webModule.__softPermutationId=Kt,C(Re+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase=window.ENV==="build"?"/react/build/js/mathematicalGraphics/"+name+"/":"/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Ax:function(){return Ge},Ds:function(){return ye},KI:function(){return ce},SI:function(){return Re},f1:function(){return Te}});var fe=ie(11320);function Te(ke){let ge=!0;if(ke.length>0){for(let Ae=0;Ae<ke.length;Ae++)if(ke[Ae].compile_success==0||!ke[Ae].compile_success){ge=!1;break}}else ge=!1;return ge}function Re(ke,ge=""){let Ae=[];for(let lt=0;lt<ke.length;lt++){let ze=ke[lt],st=ge?`${ge}/${ze.name}`:`${ze.name}`;Ae.push({title:ze.name,type:ze.type,isLeaf:ze.type!=="tree",key:st})}return Ae}function Ge(ke,ge,Ae){for(let lt=0;lt<ke.length;lt++){let ze=ke[lt];if(ze.key===ge){ze.children=Ae;break}ze.children&&Ge(ze.children,ge,Ae)}return ke}function ye(ke,ge,Ae){let lt;return function(){let ze=this,st=arguments,dt=function(){lt=null,Ae||ke.apply(ze,st)},ct=Ae&&!lt;clearTimeout(lt),lt=setTimeout(dt,ge),ct&&ke.apply(ze,st)}}const _e=!0,ce=fe.Z.API_SERVER},63205:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return lt}});var fe=ie(67294),Te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Re=ie(94184),Ge=ie.n(Re),ye=ie(57953),_e=ie(15979),ce=ie(33170),ke=ie(28706),ge=(ze,st,dt)=>new Promise((ct,qe)=>{var be=it=>{try{Dt(dt.next(it))}catch(ot){qe(ot)}},vt=it=>{try{Dt(dt.throw(it))}catch(ot){qe(ot)}},Dt=it=>it.done?ct(it.value):Promise.resolve(it.value).then(be,vt);Dt((dt=dt.apply(ze,st)).next())}),lt=({data:ze,className:st,fullWidth:dt,style:ct={},onClose:qe,onOk:be,showFullTools:vt,noAssociationId:Dt})=>{const it=(0,fe.useRef)(null),ot=(0,fe.useRef)(null),Ce=(0,fe.useRef)(null),Se=(0,fe.useRef)(null),[He,Ue]=(0,fe.useState)(!1),[xt,mt]=(0,fe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,fe.useEffect)(()=>{Ce.current||(Ce.current=document.createElement("style"),document.head.appendChild(Ce.current)),ze!=null&&ze.visible?(document.body.setAttribute("data-custom","y-hidden"),Ce.current.innerHTML=" html { overflow-y: hidden; }",ze!=null&&ze.src&&ut()):(document.body.removeAttribute("data-custom"),Ce.current&&(document.head.removeChild(Ce.current),Ce.current=null))},[ze==null?void 0:ze.visible]);const ut=()=>ge(void 0,null,function*(){Ue(!0),mt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const rt=yield(0,ke.ZJ)(ze==null?void 0:ze.src);it.current.src="",it.current.src=rt,it.current.onload=function(){gn()},Ue(!1),mt("")}),$e=()=>{document.body.removeAttribute("data-custom"),Ce.current.innerHTML=" ",qe()},Ft=rt=>ge(void 0,null,function*(){Ue(!0),mt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Mt=yield(0,ce.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ze.title,file:rt.dataUrl}});Mt!=null&&Mt.id&&!Dt?(yield(0,ce.ZP)(`/api/attachments/${ze.id}/add_subitem.json`,{method:"post",body:{subitem_id:Mt==null?void 0:Mt.id,settings:JSON.stringify(rt.state)}})).status===0&&be():Mt!=null&&Mt.id&&be(Mt),document.body.removeAttribute("data-custom"),Ce.current.innerHTML=" ",Ue(!1),mt("")}),yt=()=>{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(en=>{const Yt=document.querySelector(en.name);Yt&&Yt.setAttribute("title",en.title)})},gn=()=>{ot.current=new _e.hP(it.current),ot.current.targetRoot=Se.current,ot.current.addEventListener("render",Ft),ot.current.addEventListener("beforeclose",$e),vt&&(ot.current.availableMarkerTypes=ot.current.ALL_MARKER_TYPES,ot.current.uiStyleSettings.redoButtonVisible=!0,ot.current.uiStyleSettings.notesButtonVisible=!0,ot.current.uiStyleSettings.zoomButtonVisible=!0,ot.current.uiStyleSettings.zoomOutButtonVisible=!0,ot.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ot.current.uiStyleSettings,ot.current.show(),ze!=null&&ze.snapshotData&&ot.current.restoreState(ze.snapshotData),setTimeout(()=>{window.scrollTo(0,0),yt()},300)};return fe.createElement(fe.Fragment,null,(ze==null?void 0:ze.visible)&&fe.createElement(ye.Z,{spinning:He,tip:xt,style:{position:"absolute"}},fe.createElement("div",{ref:Se,className:Ge()(Te.imageDimensions,st,dt?Te.fullWidth:""),style:ct},fe.createElement("img",{className:Te.img,ref:it}))))}},36527:function(Ln,Kt,ie){"use strict";var fe=ie(67294),Te=ie(71230),Re=ie(15746),Ge=ie(66368),ye=ie(71577),_e=ie(35598),ce=ie(71736),ke=ie(84279),ge=ie(67294);const Ae=(0,fe.forwardRef)(({callback:lt,showSaveButton:ze,value:st=""},dt)=>{const ct=(0,fe.useRef)(),qe=[{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 "}]}]}],be=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],vt=ot=>{ct.current.setValue(ct.current.getValue()+" "+ot.value+" ")},Dt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ge.createElement(Te.Z,{className:ce.Z.lists,gutter:[10,10]},qe.map((ot,Ce)=>ge.createElement(Re.Z,{flex:"110px",className:ce.Z.item},ge.createElement("div",null,ge.createElement(_e.Z,{value:`$$${ot.value}$$`}),ot.name),ge.createElement("div",{className:ce.Z.children},ot.children.map((Se,He)=>ge.createElement("div",{key:He},ge.createElement("h1",null,Se.name),ge.createElement(Te.Z,{gutter:[10,10]},Se.data.map((Ue,xt)=>ge.createElement(Re.Z,{key:xt,onClick:()=>vt(Ue),className:ce.Z.diamond},ge.createElement(_e.Z,{value:"`$$"+Ue.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ge.createElement(Te.Z,{className:ce.Z.lists,gutter:[10,10]},be.map((ot,Ce)=>ge.createElement(Re.Z,{flex:"110px",className:ce.Z.item},ge.createElement("div",null,ge.createElement(_e.Z,{value:"`$$"+ot.value+"$$`"}),ot.name),ge.createElement("div",{className:ce.Z.children},ot.children.map((Se,He)=>ge.createElement("div",{key:He},Se.name&&ge.createElement("h1",null,Se.name),ge.createElement(Te.Z,{gutter:[10,10]},Se.data.map((Ue,xt)=>ge.createElement(Re.Z,{key:xt,onClick:()=>vt(Ue),className:ce.Z.diamond},ge.createElement(_e.Z,{value:"`$$"+Ue.value+"$$`"}))))))))))}],it=()=>{var ot=document.createElement("div");ot.innerHTML=ct.current.getValue();var Ce=ot.innerText;return lt&<(Ce),Ce};return(0,fe.useImperativeHandle)(dt,()=>({getData:it})),ge.createElement("div",{className:ce.Z.mathWrap},ge.createElement(Ge.default,{defaultActiveKey:"1",items:Dt}),ge.createElement("math-field",{locale:"zh_cn",className:ce.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ct,style:{width:800,marginTop:30,fontSize:18}},st||""),ze&&ge.createElement("div",{className:ce.Z.button},ge.createElement(ye.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Kt.Z=Ae},57444:function(Ln,Kt,ie){"use strict";ie.d(Kt,{h:function(){return ot}});var fe=ie(67294),Te=ie(11713),Re=ie(22150),Ge=ie(71577),ye=ie(4631),_e=ie.n(ye),ce=ie(71749),ke=ie(30483),ge=Object.defineProperty,Ae=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,ze=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ct=(Ce,Se,He)=>Se in Ce?ge(Ce,Se,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ce[Se]=He,qe=(Ce,Se)=>{for(var He in Se||(Se={}))st.call(Se,He)&&ct(Ce,He,Se[He]);if(ze)for(var He of ze(Se))dt.call(Se,He)&&ct(Ce,He,Se[He]);return Ce},be=(Ce,Se)=>Ae(Ce,lt(Se));const vt=Te.default.Option,Dt={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"]};Kt.Z=({callback:Ce,onCancel:Se})=>{const[He,Ue]=(0,fe.useState)("python");function xt(ut){Ue(it[ut][1])}function mt(ut){Ce(ut)}return fe.createElement(Re.default,be(qe({},Dt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:mt,style:{width:500}}),fe.createElement(Re.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},fe.createElement(Te.default,{getPopupContainer:ut=>ut.parentNode,onChange:xt},Object.keys(it).map(ut=>fe.createElement(vt,{key:ut,value:ut},it[ut][0])))),fe.createElement(Re.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},fe.createElement(ot,{mode:He})),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ge.ZP,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function ot({value:Ce,onChange:Se,mode:He,options:Ue={}}){const xt=(0,fe.useRef)(),[mt,ut]=(0,fe.useState)();return(0,fe.useEffect)(()=>{if(mt){let $e=function(Ft){const yt=Ft.getValue();Se&&Se(yt)};return mt.on("change",$e),()=>{mt.off("change",$e)}}},[mt,Se]),(0,fe.useEffect)(()=>{mt&&mt.setOption("mode",He)},[mt,He]),(0,fe.useEffect)(()=>{mt&&(Ce!==mt.getValue()||Ce==="")&&setTimeout(()=>{mt.setValue(Ce||"")},300)},[mt,Ce]),(0,fe.useEffect)(()=>{if(xt.current&&!mt){const $e=_e().fromTextArea(xt.current,qe({mode:He,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ue));ut($e)}},[xt.current,mt]),fe.createElement("div",{className:"my-codemirror-container"},fe.createElement("textarea",{ref:xt}))}},91304:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return mr}});var fe=ie(67294),Te=ie(4631),Re=ie.n(Te),Ge=ie(91033),ye=ie(71749),_e=ie(57341),ce=ie(82801),ke=ie(88386),ge=ie(49047),Ae=ie(80785),lt=ie(35598),ze=({value:Qn="",className:ht,showTextOnly:Et,showLines:zt,style:fn={}})=>{const at=(0,fe.useMemo)(()=>"",[Qn]);return fe.createElement(fe.Fragment,null,fe.createElement("div",{dangerouslySetInnerHTML:{__html:at}}))},st=ie(67294),dt=Object.defineProperty,ct=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,it=(Qn,ht,Et)=>ht in Qn?dt(Qn,ht,{enumerable:!0,configurable:!0,writable:!0,value:Et}):Qn[ht]=Et,ot=(Qn,ht)=>{for(var Et in ht||(ht={}))vt.call(ht,Et)&&it(Qn,Et,ht[Et]);if(be)for(var Et of be(ht))Dt.call(ht,Et)&&it(Qn,Et,ht[Et]);return Qn},Ce=(Qn,ht)=>ct(Qn,qe(ht));let Se=[{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 He({onActionCallback:Qn,title:ht,icon:Et,actionName:zt,className:fn="",children:at}){function Rt(){Qn(zt)}return st.createElement("a",{title:ht,className:fn,onClick:Rt},st.createElement("i",{className:`${Et}`}),at)}var Ue=({watch:Qn,showNullButton:ht,showNullProgramButton:Et,onActionCallback:zt,fullScreen:fn,insertTemp:at,hidetoolBar:Rt,extraUse:on})=>{const tn=[...Se,{title:`${Qn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Qn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return st.createElement("ul",{className:"markdown-toolbar-container"},!Rt&&tn.map((Mn,wn)=>st.createElement("li",{key:wn},Mn.actionName?st.createElement(He,Ce(ot({},Mn),{onActionCallback:zt})):st.createElement("span",{className:"v-line"}))),ht?st.createElement("li",null,st.createElement(He,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:zt},st.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Et?st.createElement(st.Fragment,null,st.createElement("li",null,st.createElement(He,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:zt},st.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),st.createElement("li",null,st.createElement(He,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:zt},st.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,at&&st.createElement("li",null,st.createElement(He,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${at}`,onActionCallback:zt},st.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),on&&st.createElement("li",null,on),st.createElement("li",{className:"btn-full-screen"},st.createElement(He,{icon:`${fn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:zt})))},xt=ie(76621),mt=ie(22150),ut=ie(69677),$e=ie(71577),Ft=Object.defineProperty,yt=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Yt=(Qn,ht,Et)=>ht in Qn?Ft(Qn,ht,{enumerable:!0,configurable:!0,writable:!0,value:Et}):Qn[ht]=Et,Qe=(Qn,ht)=>{for(var Et in ht||(ht={}))Mt.call(ht,Et)&&Yt(Qn,Et,ht[Et]);if(rt)for(var Et of rt(ht))en.call(ht,Et)&&Yt(Qn,Et,ht[Et]);return Qn},Ie=(Qn,ht)=>yt(Qn,gn(ht));const Ot={labelCol:{span:4},wrapperCol:{span:20}};var In=({callback:Qn,onCancel:ht})=>{function Et(zt){Qn(zt)}return fe.createElement(mt.default,Ie(Qe({},Ot),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Et,style:{width:500}}),fe.createElement(mt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},fe.createElement(ut.default,null)),fe.createElement(mt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},fe.createElement(ut.default,null)),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement($e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement($e.ZP,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},mn=ie(57444),pt=ie(70859),wt=ie(14446),Qt=ie(71230),Zn=ie(63205),Cn=ie(67294),rn=({callback:Qn,onCancel:ht})=>{const Et=document.createElement("canvas"),zt=Et.getContext("2d");Et.width=1e3,Et.height=800,zt.fillStyle="#ffffff",zt.fillRect(0,0,Et.width,Et.height);const fn=Et.toDataURL("image/png");return Cn.createElement(wt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Cn.createElement(Qt.Z,{style:{height:"100vh"}},Cn.createElement(Zn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fn,visible:!0,title:String(Date.now())},onOk:at=>{Qn({src:at.url})},onClose:ht})))},ln=ie(72565),zn=ie(15746),_n=ie(2453),Oe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ue=ie(67294),ve=(0,fe.forwardRef)(({onCancel:Qn,editImgId:ht,callback:Et},zt)=>{let fn=(0,fe.useRef)(),at=(0,fe.useRef)(),Rt=(0,fe.useRef)(),on=(0,fe.useRef)(!1);const tn=(0,fe.useRef)(!1);console.log("ref:",zt);const[Mn,wn]=(0,fe.useState)(0),[rr,zr]=(0,fe.useState)("100vh");return(0,fe.useEffect)(()=>{wn(1);try{indexedDB.databases().then(vr=>{vr.forEach(yr=>indexedDB.deleteDatabase(yr.name))})}catch(vr){}},[]),(0,fe.useImperativeHandle)(zt,()=>({setHeight:zr})),ue.createElement("div",{ref:tn,className:"body-overflow-initial"},ue.createElement(ln.Z,{width:"100vw",height:rr,footer:null,closable:!0,placement:"bottom",open:!!Mn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Oe.drawerWrap}`,onClose:()=>{window.saveDrawData(vr=>{Et({src:`/api/attachments/${vr}`,id:vr})})},title:ue.createElement(Qt.Z,{align:"middle"},ue.createElement(zn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ue.createElement(zn.Z,{onClick:()=>{zr(rr==="60px"?"100vh":"60px")}},ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ue.createElement(zn.Z,{onClick:()=>{window.saveDrawData(vr=>{if(vr===null){_n.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}_n.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Et({src:`/api/attachments/${vr}`,id:vr,disabledClose:!0})})}},ue.createElement($e.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ue.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${ht||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:at})))}),pe=ie(11320),se=ie(78045),Be=ie(31795);const ft=se.ZP.Group,Bt={margin:"0 8px"};var qt=({callback:Qn,onCancel:ht})=>{function Et(zt){Qn(zt)}return fe.createElement(mt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Et},fe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},fe.createElement("span",{style:Bt},"\u5355\u5143\u683C\u6570\uFF1A"),fe.createElement("span",{style:Bt},"\u884C\u6570"),fe.createElement(mt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},fe.createElement(Be.Z,null)),fe.createElement("span",{style:Bt},"\u5217\u6570"),fe.createElement(mt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},fe.createElement(Be.Z,null))),fe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},fe.createElement("span",{style:Bt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),fe.createElement(mt.default.Item,{name:"align"},fe.createElement(ft,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($e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement($e.ZP,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},an=ie(47897),vn=ie(61016),dn=ie.n(vn),It=(0,fe.forwardRef)(({use3d:Qn,width:ht,height:Et,callback:zt,showSaveButton:fn},at)=>{const Rt=(0,fe.useRef)(),on=(0,fe.useRef)(),[tn,Mn]=(0,fe.useState)(!1),wn=(0,fe.useRef)({id:Rt,appName:"graphing",width:ht||1e3,height:Et||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)(()=>{on.current=new(dn())(wn.current,!0),window.onload=function(){on.current.inject("applet_container")}},[]);const rr=()=>{var zr=window.ggbApplet.getPNGBase64(1,!0,72);return zt&&zt(zr),zr};return(0,fe.useEffect)(()=>{wn.current.appName=tn?"3D":"graphing",on.current.inject("applet_container")},[tn]),(0,fe.useEffect)(()=>{Mn(Qn)},[Qn]),(0,fe.useImperativeHandle)(at,()=>({getImgData:rr})),fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Rt}),fe.createElement(Qt.Z,{align:"middle"},fe.createElement(zn.Z,{flex:1},fe.createElement(an.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:tn,onChange:zr=>Mn(zr)})),fe.createElement(zn.Z,null,fe.createElement($e.ZP,{size:"large",onClick:rr,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ht=ie(36527),Xt=ie(25934);const Tt="link",Yn="upload-image",Rn="add-flowchart",cr="draw-image",Xr="add-flowchart",wr="code-block",kr="add-table",Ar="------------",gi={default:Ar,left:`:${Ar}`,center:`:${Ar}:`,right:`${Ar}:`};var oi=ie(99914),fi=(Qn,ht,Et)=>new Promise((zt,fn)=>{var at=tn=>{try{on(Et.next(tn))}catch(Mn){fn(Mn)}},Rt=tn=>{try{on(Et.throw(tn))}catch(Mn){fn(Mn)}},on=tn=>tn.done?zt(tn.value):Promise.resolve(tn.value).then(at,Rt);on((Et=Et.apply(Qn,ht)).next())});function Pi(){}let Or=0;const Jn=1e4,qn="\u2581",nr="@\u2581\u2581@",Ur="@\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`,Lt=["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 Kn(Qn){return/^\d+$/.test(Qn)?`${Qn}px`:Qn}const yn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",xr={[yn+"-B"]:"bold",[yn+"-I"]:"italic"},Sr={[Tt]:"\u6DFB\u52A0\u94FE\u63A5",[wr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Yn]:"\u6DFB\u52A0\u56FE\u7247",[cr]:"\u6DFB\u52A0\u753B\u56FE",[Rn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[kr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var mr=({defaultValue:Qn="",onChange:ht,width:Et="100%",height:zt=400,miniToolbar:fn=!1,isFocus:at=!1,watch:Rt,insertTemp:on,mode:tn="markdown",id:Mn="markdown-editor-id",showResizeBar:wn=!1,noStorage:rr=!1,showNullButton:zr=!1,showNullProgramButton:vr=!1,hidetoolBar:yr=!1,fullScreen:Lr=!1,onBlur:Dr,onCMBeforeChange:hi,onFullScreen:Vn,className:br="",disablePaste:Ui=!1,disabled:na=!1,disabledFill:Wr=!1,placeholder:vi="",values:ra="",extraUse:Kr,onAddBlank:Vi})=>{const[lr,Na]=(0,fe.useState)(null),[Ca,ho]=(0,fe.useState)(Qn),[Ha,_a]=(0,fe.useState)(Rt),[Ji,Fa]=(0,fe.useState)(Lr),[ya,Wa]=(0,fe.useState)(""),[po,ja]=(0,fe.useState)(0),[Pa,mo]=(0,fe.useState)(zt),[Eo,no]=(0,fe.useState)(!1),ia=(0,fe.useRef)((0,Xt.Z)()),Zt=(0,fe.useRef)(!1),At=(0,fe.useRef)(),[xn,jn]=(0,fe.useState)(0),[hr,Qr]=(0,fe.useState)(0),ni=(0,fe.useRef)(),mi=(0,fe.useRef)(),ki=(0,fe.useRef)(),Si=(0,fe.useRef)(),Qi=(0,fe.useRef)(),aa=(0,fe.useRef)(),ba=()=>fi(void 0,null,function*(){var cn;const un=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ia.current}});(cn=un==null?void 0:un.attachments)!=null&&cn.length&&(console.log("cm:",lr,ni),un.attachments.map(Gt=>{Gt.content_type.indexOf("image")>-1?lr.replaceSelection(``):Gt.content_type.indexOf("video")>-1?lr.replaceSelection(`<video width="100%" controls src="${pe.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Gt.content_type.indexOf("pdf")>-1?lr.replaceSelection(`<a href="${pe.Z.API_SERVER}/api/attachments/${Gt.id}?type=${Gt.content_type}&disposition=inline" target="_blank">${Gt.name}</a>`):lr.replaceSelection(`[${Gt.name}](${pe.Z.API_SERVER}/api/attachments/${Gt.id}?type=${Gt.content_type})`)}))});(0,fe.useEffect)(()=>{const cn=window.scrollY||window.pageYOffset;ho(ra),lr==null||lr.setValue(ra),window.scrollTo(0,cn)},[ra]),(0,fe.useEffect)(()=>{Vn==null||Vn(Ji)},[Ji]),(0,fe.useEffect)(()=>{if(ni.current){let cn=function(Gt,kn){var ir;if(Ui){kn.preventDefault();return}const $n=kn.clipboardData;if($n){const Hn=$n.types.toString(),Gn=$n.items;if(Hn==="Files"||$n.types.indexOf("Files")>-1){if(kn.preventDefault(),tn=="stex")return;try{let ar=Gn[1];((ir=Gn[0])==null?void 0:ir.kind)==="file"&&(ar=Gn[0]);const ur=ar.getAsFile(),Ve=ur.name.split(".").pop();(0,pt.I)(ur,Je=>{var Pt,_t,hn;Je.id?((Pt=ur==null?void 0:ur.type)==null?void 0:Pt.indexOf("image"))>-1?un.replaceSelection(`<img width="100%" src="/api/attachments/${Je.id}?type=${Je.content_type})" alt="" />`):((_t=ur==null?void 0:ur.type)==null?void 0:_t.indexOf("video"))>-1?un.replaceSelection(`<video width="100%" controls src="/api/attachments/${Je.id}"></video>`):((hn=ur==null?void 0:ur.type)==null?void 0:hn.indexOf("pdf"))>-1?un.replaceSelection(`<a href="/api/attachments/${Je.id}?type=${ur.type}&disposition=inline" target="_blank">${ur.name}</a>`):Lt.includes(Ve)?un.replaceSelection(`<a href="/api/attachments/${Je.id}?type=office&disposition=inline" target="_blank">${ur.name}</a>`):un.replaceSelection(`[${ur.name}](/api/attachments/${Je.id}?type=${Je.content_type})`):(Je==null?void 0:Je.status)===401&&(_n.ZP.warning((Je==null?void 0:Je.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(ar){_n.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const un=Re().fromTextArea(ni.current,{mode:tn,lineNumbers:!fn,lineWrapping:!0,value:Qn,autoCloseTags:!vr,autoCloseBrackets:!0});return un.on("keyup",function(Gt,kn){kn.keyCode===8&&(Gt.getValue()==""?un.setOption("placeholder",vi):un.setOption("placeholder",null))}),un.on("keydown",function(Gt,kn){if(kn.keyCode===8){var ir=bn(Gt);ir&&kn.preventDefault()}}),at&&un.focus(),un.on("paste",cn),un.on("dragleave",function(Gt,kn){mi.current.classList.remove("mouse-hover-md")}),na&&un.on("beforeChange",function(Gt,kn){(kn.origin==="paste"||kn.origin==="+input")&&kn.cancel()}),Na(un),()=>{un.off("paste",cn)}}},[]);const sn=(0,fe.useCallback)(()=>{if(mi.current)try{}catch(cn){console.log(cn,"---- to set md editor body height")}},[Pa,mi,Ji]);(0,fe.useEffect)(()=>{function cn(){let un=new Ge.Z(Gt=>{for(let kn of Gt)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&(sn(),lr.setSize("100%","100%"),lr.refresh())});return un.observe(ni.current.parentElement),un}if(lr){const un=cn();return()=>{var Gt,kn;(Gt=ni.current)!=null&&Gt.parentElement&&un.unobserve((kn=ni.current)==null?void 0:kn.parentElement)}}},[lr,sn]),(0,fe.useEffect)(()=>{if(lr){let cn=[];for(const[un,Gt]of Object.entries(xr)){let kn={[un]:()=>{Fn(Gt)}};cn.push(kn),lr.addKeyMap(kn)}return At.current=setInterval(()=>{Zt.current&&ba()},4e3),()=>{clearInterval(At.current);for(let un of cn)lr.removeKeyMap(un)}}},[lr]),(0,fe.useEffect)(()=>{Lr!==Ji&&Fa(Lr)},[Lr]),(0,oi.Z)(()=>{if(!rr&&po>0){let cn=new Date().getTime(),un=window.sessionStorage.getItem(Mn);cn>=po+Jn&&(!un||un!==Ca)&&(window.sessionStorage.setItem(Mn,Ca),no(!0))}},Jn),(0,fe.useEffect)(()=>{_a(Rt)},[lr,Rt]),(0,fe.useEffect)(()=>{lr&&at&&lr.focus()},[lr,at]),(0,fe.useEffect)(()=>{if(Ha&&lr){let cn=function(Gt){let kn=Gt.target;if(Si.current){let ir=kn.scrollTop/kn.scrollHeight;Si.current.scrollTop=Si.current.scrollHeight*ir}};const un=lr.getScrollerElement();return un.addEventListener("scroll",cn),()=>{un.removeEventListener("scroll",cn)}}},[lr,Ha]),(0,fe.useEffect)(()=>{if(lr&&hi){let cn=function(un,Gt){hi(un,Gt)};return lr.on("beforeChange",cn),()=>{lr.off("beforeChange",cn)}}},[lr,hi]),(0,fe.useEffect)(()=>{if(lr&&Dr){let cn=function(){Dr(lr.getValue())};return lr.on("blur",cn),()=>{lr.off("blur",cn)}}},[lr,Dr]);function bn(cn,un){var Gt=cn.getDoc(),kn=Gt.getCursor(),ir=Gt.getLine(kn.line),$n=ir.charAt(kn.ch-1),Hn=ir.lastIndexOf("@\u2581@",kn.ch),Gn=ir.lastIndexOf("@\u2581\u2581@",kn.ch),ar=Hn>Gn?Hn:Gn,ur=Hn>Gn?3:4;if(nr.indexOf($n)===-1)return null;if(console.log("change1:",un,cn,ir,kn,ar,Hn,Gn,$n),ar>=0&&kn.ch-ar<5){var Ve=ar+ur;return Gt.replaceRange("",{line:kn.line,ch:ar},{line:kn.line,ch:Ve}),{line:kn.line,ch:Ve}}return null}(0,fe.useEffect)(()=>{if(lr){let cn=function(un,Gt){const kn=un.getValue();ho(kn),ja(new Date().getTime()),un.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ht&&(vr?ht(kn,kt(kn)):ht(kn))};return lr.on("change",cn),()=>{lr.off("change",cn)}}},[lr,ht]),(0,fe.useEffect)(()=>{if(lr)if(Qn==null)lr.setValue(""),ho("");else{const cn=window.scrollY||window.pageYOffset;Qn!==lr.getValue()&&(lr.setValue(Qn),ho(Qn),lr.setCursor(na?1:lr.lineCount(),0),window.scrollTo(0,cn))}},[lr,Qn]);const Fn=(0,fe.useCallback)(cn=>{const un=lr.getCursor(),Gt=lr.getSelection();let kn=Gt.split(`
|
|
|
`);switch(cn){case"bold":return lr.replaceSelection("**"+Gt+"**"),Gt===""&&lr.setCursor(un.line,un.ch+2),lr.focus();case"italic":return lr.replaceSelection("*"+Gt+"*"),Gt===""&&lr.setCursor(un.line,un.ch+1),lr.focus();case"code":return lr.replaceSelection("`"+Gt+"`"),Gt===""&&lr.setCursor(un.line,un.ch+1),lr.focus();case"inline-latex":return Wa("inline-latex"),lr.focus();case"latex":return lr.replaceSelection("```latex\n"+Gt+"\n```"),lr.setCursor(un.line+1,Gt.length+1),lr.focus();case"line-break":return lr.replaceSelection(`<br/>
|
|
|
`),lr.focus();case"list-ul":return Gt===""?lr.replaceSelection("- "+Gt):lr.replaceSelection(kn.map(ir=>ir===""?"":`- ${ir}`).join(`
|
|
|
`)),lr.focus();case"list-ol":return Gt===""?lr.replaceSelection("1. "+Gt):lr.replaceSelection(kn.map((ir,$n)=>ir===""?"":`${$n+1}. ${ir}`).join(`
|
|
|
`)),lr.focus();case"add-null-ch":Vi==null||Vi();return;case"add-signal":return Gt===""&&lr.setCursor(un.line,un.ch),lr.replaceSelection(Ur),lr.focus();case"add-multiple":return Gt===""&&lr.setCursor(un.line,un.ch),lr.replaceSelection(nr),lr.focus();case"inster-template-1":return Gt===""&&lr.setCursor(un.line,un.ch),lr.replaceSelection(li),lr.focus();case"eraser":return lr.setValue(""),lr.focus();case"trigger-watch":return _a(!Ha),lr.focus();case"trigger-full-screen":return Fa(!Ji),lr.focus();case Tt:Wa(Tt);return;case wr:Wa(wr);return;case Yn:Wa(Yn);return;case cr:Wa(cr);return;case"maths-latex":Wa("maths-latex");return;case Rn:Qi.current="",sessionStorage.removeItem("file_id"),Wa(Rn);return;case kr:Wa(kr);return;default:throw new Error}},[lr,Ha,Ji]),he=(0,fe.useCallback)((cn,un)=>{var Gt,kn,ir,$n,Hn,Gn;Wa("");const{src:ar,alt:ur,id:Ve}=cn||{};switch(ya){case Tt:const{title:Dn,link:An}=cn;return lr.replaceSelection(`[${Dn}](${An})`),lr.focus();case wr:const{language:or,content:Un}=cn;return lr.replaceSelection(["```"+or,Un,"```"].join(`
|
|
|
`)),lr.focus();case"maths-latex":for(var Je=atob(cn),Pt=new Uint8Array(Je.length),_t=0;_t<Je.length;_t++)Pt[_t]=Je.charCodeAt(_t);var hn=new Blob([Pt],{type:"image/png"});(0,pt.I)(hn,ri=>{ri.id?lr.replaceSelection(``):(ri==null?void 0:ri.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":lr.replaceSelection("`$$"+cn+"$$`");break;case Xr:if(!Ve)return;lr.focus(),lr.getValue().indexOf(ar)===-1?lr.replaceSelection(`<center><img id="${Ve}" width="80%" src="${ar}" class="draw-flowchart" alt="${ur||""}" /></center>`):document.getElementById(Ve).src=pe.Z.API_SERVER+ar+"?t="+Date.now();try{setTimeout(()=>{Dr(lr.getValue())},100)}catch(ri){}break;case Yn:case cr:const Tn=un,tr=(ir=(kn=(Gt=Tn==null?void 0:Tn.name)==null?void 0:Gt.split("."))==null?void 0:kn.pop)==null?void 0:ir.call(kn);return(($n=Tn==null?void 0:Tn.type)==null?void 0:$n.indexOf("image"))>-1||!(Tn!=null&&Tn.type)?Tn!=null&&Tn.align||Tn!=null&&Tn.width?lr.replaceSelection(`<p style="text-align:${Tn.align||"initial"}"><img width="${Tn.width?Tn.width+"%":"initial"}" src="${ar}" alt="${ur||""}" /></p>`):lr.replaceSelection(`<img width="100%" src="${ar}" alt="${ur||""}" />`):((Hn=Tn==null?void 0:Tn.type)==null?void 0:Hn.indexOf("video"))>-1?lr.replaceSelection(`<video width="100%" controls src="${ar}"></video>`):((Gn=Tn==null?void 0:Tn.type)==null?void 0:Gn.indexOf("pdf"))>-1?lr.replaceSelection(`<a href="${ar}?type=${Tn.type}&disposition=inline" target="_blank">${Tn.name}</a>`):Lt.includes(tr)?lr.replaceSelection(`<a href="${ar}?type=office&disposition=inline" target="_blank">${Tn.name}</a>`):lr.replaceSelection(`[${Tn.name}](${ar})`),lr.focus();case kr:const{row:dr,col:Pr,align:fr}=cn;let Fr=`
|
|
|
`;for(let ri=0;ri<dr;ri++){let Vr=[],ii=[];for(let Br=0;Br<Pr;Br++)ri===1&&ii.push(gi[fr]),Vr.push(" ");ri===1&&(Fr+=`| ${ii.join(" | ")} |
|
|
|
`),Fr+=`| ${Vr.join(Pr===1?"":" | ")} |
|
|
|
`}return lr.replaceSelection(Fr+`
|
|
|
`),lr.focus();default:throw new Error}},[lr,ya]),Pe=(0,fe.useMemo)(()=>{switch(ya){case Tt:return fe.createElement(In,{callback:he,onCancel:Fe});case wr:return fe.createElement(mn.Z,{callback:he,onCancel:Fe});case Yn:return fe.createElement(pt.Z,{callback:he,onCancel:Fe});case Rn:return fe.createElement(ve,{editImgId:Qi.current,callback:he,onCancel:Fe});case kr:return fe.createElement(qt,{callback:he,onCancel:Fe});case"maths-latex":return fe.createElement(It,{showSaveButton:!0,callback:he});case"inline-latex":return fe.createElement(Ht.Z,{showSaveButton:!0,callback:he});default:return null}},[ya]);function Fe(){Wa("")}(0,fe.useEffect)(()=>{if(ki.current){let cn=function(Hn){ir=!0,$n=Hn.pageY},un=function(){ir=!1},Gt=function(Hn){if(ir){let Gn=Hn.pageY-$n;Gn<0&&(Gn=0),Gn>300&&(Gn=300);let ar=zt+Gn+"px";mo(ar)}},kn=ki.current,ir=!1,$n=0;return kn.addEventListener("mousedown",cn),document.addEventListener("mousemove",Gt),document.addEventListener("mouseup",un),()=>{kn.removeEventListener("mousedown",cn),document.removeEventListener("mousemove",Gt),document.removeEventListener("mouseup",un)}}},[lr,ki]),(0,fe.useEffect)(()=>{mo(zt)},[zt]);const We=Kn(Et),je=Kn(Pa),et={width:We,height:je},tt=(0,fe.useMemo)(()=>{if(po){let cn=new Date(po),un=cn.getHours(),Gt=cn.getMinutes(),kn=cn.getSeconds();return un=un<10?"0"+un:un,Gt=Gt<10?"0"+Gt:Gt,kn=kn<10?"0"+kn:kn,`${un}:${Gt}:${kn}`}return 0},[po]),kt=cn=>{const un=[];if(vr){let Gt=-1;cn=cn.replace(/(@▁▁@|@▁@)/g,function(kn,ir,$n){un.push({multiLine:kn!==Ur})})}return un};function Wt(){window.sessionStorage.removeItem(Mn),no(!1),ja(0)}function Sn(){no(!1),ja(0),lr.setValue(window.sessionStorage.getItem(Mn))}(0,fe.useEffect)(()=>{Sr[ya]&&ya!==cr&&ya!==Rn&&setTimeout(()=>{const cn=document.getElementsByClassName("markdown-popup-form")[0],un=window.innerWidth/2-cn.offsetWidth/2,Gt=window.innerHeight/2-cn.offsetHeight/2;jn(un),Qr(Gt)},0)},[ya]);const Nn=cn=>{cn.preventDefault();const un=cn.clientX-xn,Gt=cn.clientY-hr;document.body.onmousemove=kn=>{let ir=kn.clientX-un,$n=kn.clientY-Gt;const Hn=document.getElementsByClassName("markdown-popup-form")[0],Gn=window.innerWidth-Hn.offsetWidth,ar=window.innerHeight-Hn.offsetHeight;ir=Math.max(0,Math.min(ir,Gn)),$n=Math.max(0,Math.min($n,ar)),En(kn.clientX,kn.clientY,un,Gt)&&(jn(ir),Qr($n))},document.body.onmouseup=function(){document.body.onmousemove=null}},En=(cn,un,Gt,kn)=>{const ir=document.body.clientHeight,$n=document.body.clientWidth;return cn<20&&Gt>cn||cn>$n-20&&Gt<cn||un<20&&kn>un||un>ir-20&&kn<un?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"markdown-editor-wrapper",ref:mi},fe.createElement("div",{className:`markdown-editor-container ${br} ${Ha?"on-preview":""} ${fn?"mini":""} ${Ji?"full-screen":""}`,style:et},fe.createElement(Ue,{insertTemp:on,watch:Ha,fullScreen:Ji,showNullButton:zr,showNullProgramButton:vr,onActionCallback:Fn,hidetoolBar:yr,extraUse:Kr}),fe.createElement("div",{className:"markdown-editor-body"},fe.createElement("div",{className:"codemirror-container"},fe.createElement("textarea",{ref:ni,placeholder:vi})),Ha?fe.createElement("div",{ref:Si,className:"preview-container"},tn==="stex"&&fe.createElement(ze,{value:Ca}),tn!=="stex"&&fe.createElement(lt.Z,{edit:!0,disabledFill:Wr,showProgramFill:vr,value:Ca,openEditor:cn=>{var un;Qi.current=cn,(un=aa.current)==null||un.setHeight("100vh"),setTimeout(()=>{Wa("add-flowchart")},150)}})):null))),wn?fe.createElement("a",{ref:ki,className:"editor-resize"}):null,ya===cr&&fe.createElement(rn,{callback:he,onCancel:Fe}),ya===Rn&&fe.createElement(ve,{ref:aa,editImgId:Qi.current,callback:he,onCancel:Fe}),fe.createElement(xt.Z,null,Sr[ya]&&ya!==cr&&ya!==Rn?fe.createElement(wt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:xn,top:hr},title:fe.createElement("div",{style:{cursor:"move"},onMouseDown:Nn},Sr[ya]),open:!0,onCancel:Fe,footer:null,destroyOnClose:!0,width:ya===Rn?"1200px":null,height:ya===Rn?"80vh":null,className:"markdown-popup-form"},Pe):null))}},70859:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return He},I:function(){return xt}});var fe=ie(22150),Te=ie(2453),Re=ie(69677),Ge=ie(93421),ye=ie(31795),_e=ie(78045),ce=ie(71577),ke=ie(15476),ge=ie(67294),Ae=ie(52262),lt=ie(67294),ze=Object.defineProperty,st=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,vt=(mt,ut,$e)=>ut in mt?ze(mt,ut,{enumerable:!0,configurable:!0,writable:!0,value:$e}):mt[ut]=$e,Dt=(mt,ut)=>{for(var $e in ut||(ut={}))qe.call(ut,$e)&&vt(mt,$e,ut[$e]);if(ct)for(var $e of ct(ut))be.call(ut,$e)&&vt(mt,$e,ut[$e]);return mt},it=(mt,ut)=>st(mt,dt(ut));const{useForm:ot}=fe.default,Ce={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}};var He=({callback:mt,onCancel:ut})=>{const[$e]=ot();let Ft=(0,ge.useRef)();function yt(Mt){Ft.current.width=$e.getFieldValue("width"),Ft.current.align=$e.getFieldValue("align"),mt(Mt,Ft.current)}function gn(Mt,en){if(Mt.status===-1){Te.ZP.error(Mt.message);return}$e.setFieldsValue({src:`/api/attachments/${Mt.id}`,type:en.type})}function rt(Mt){let en=Mt.target.files[0];Ft.current=en,xt(en,gn)}return lt.createElement(fe.default,it(Dt({form:$e},Se),{className:"upload-image-panel",onFinish:yt,style:{width:470,overflow:"hidden"}}),lt.createElement(fe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},lt.createElement("div",{className:"flex-container"},lt.createElement(fe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},lt.createElement(Re.default,{style:Ce})),lt.createElement(Ue,{onFileChange:rt}))),lt.createElement(fe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},lt.createElement(Re.default,{style:{width:264}})),lt.createElement(fe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},lt.createElement(Ge.Z,null,lt.createElement(fe.default.Item,{name:"width",style:{margin:0}},lt.createElement(ye.Z,{style:{width:264}})),lt.createElement("span",{className:"ml8"},"%"))),lt.createElement(fe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},lt.createElement(_e.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"}]})),lt.createElement("aside",null,lt.createElement(fe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},lt.createElement(ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),lt.createElement(ce.ZP,{type:"default",onClick:ut},"\u53D6\u6D88"))))};function Ue({onFileChange:mt}){return lt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",lt.createElement("input",{type:"file",onChange:mt}))}function xt(mt,ut){if(!mt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Ae.bg)())throw Te.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let $e=new FormData;$e.append("editormd-image-file",mt),$e.append("file_param_name","editormd-image-file"),$e.append("byxhr","true");var Ft=new window.XMLHttpRequest;Ft.withCredentials=!0,Ft.addEventListener("load",function(yt){ut(JSON.parse(yt.target.responseText),mt)},!1),Ft.addEventListener("error",function(yt){console.error(yt)},!1),Ft.open("POST",`${ke.KI}/api/attachments.json`),Ft.send($e)}},76621:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Re}});var fe=ie(67294),Te=ie(73935);class Re extends fe.Component{constructor(ye){super(ye);const _e=window.document;this.node=_e.createElement("div"),_e.body.appendChild(this.node)}render(){const{children:ye}=this.props;return(0,Te.createPortal)(ye,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});var fe=ie(67294);function Te(Re,Ge){const ye=(0,fe.useRef)();(0,fe.useEffect)(()=>{ye.current=Re}),(0,fe.useEffect)(()=>{function _e(){ye.current()}if(Ge!==null){let ce=setInterval(_e,Ge);return()=>clearInterval(ce)}},[Ge])}},15028:function(Ln,Kt,ie){"use strict";ie.r(Kt),ie.d(Kt,{default:function(){return Or}});var fe=ie(67294),Te=ie(35973),Re=ie(85673),Ge=ie(66368),ye=ie(52310),_e=ie(28706),ce=ie(91304),ke=ie(11320),ge=ie(35598),Ae=ie(14446),lt=ie(2453),ze=Object.defineProperty,st=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,qe=(Jn,qn,nr)=>qn in Jn?ze(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,be=(Jn,qn)=>{for(var nr in qn||(qn={}))dt.call(qn,nr)&&qe(Jn,nr,qn[nr]);if(st)for(var nr of st(qn))ct.call(qn,nr)&&qe(Jn,nr,qn[nr]);return Jn},vt=(Jn,qn,nr)=>new Promise((Ur,li)=>{var Lt=yn=>{try{Bn(nr.next(yn))}catch(xr){li(xr)}},Kn=yn=>{try{Bn(nr.throw(yn))}catch(xr){li(xr)}},Bn=yn=>yn.done?Ur(yn.value):Promise.resolve(yn.value).then(Lt,Kn);Bn((nr=nr.apply(Jn,qn)).next())});const Dt=({shixunHomeworks:Jn,dispatch:qn})=>{const nr=(0,Te.useParams)();return fe.createElement(Ae.default,{centered:!0,title:"\u63D0\u793A",open:Jn.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>vt(void 0,null,function*(){(yield qn({type:"shixunHomeworks/deleteReply",payload:{object_id:Jn.actionTabs.selectArr.id,object_type:"journals_for_message"}})).status===0&&(lt.ZP.success("\u5220\u9664\u6210\u529F"),qn({type:"shixunHomeworks/setActionTabs",payload:{}}),qn({type:"shixunHomeworks/getReplyList",payload:be({},Jn.actionTabs.params)}))}),onCancel:()=>{qn({type:"shixunHomeworks/setActionTabs",payload:{}})}},fe.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))};var it=(0,Te.connect)(({shixunHomeworks:Jn})=>({shixunHomeworks:Jn}))(Dt),ot=ie(27484),Ce=ie.n(ot),Se=ie(71230),He=ie(15746),Ue=ie(69677),xt=ie(71577),mt=ie(83062),ut=ie(28452),$e=ie(84249),Ft=ie(79852),yt={flex_box_center:"flex_box_center___rwkot",flex_space_between:"flex_space_between___CV5Yi",flex_box_vertical_center:"flex_box_vertical_center___meeO5",flex_box_center_end:"flex_box_center_end___RXqc0",flex_box_column:"flex_box_column___HwZxi",listItem:"listItem___Cb1Ly",description:"description___UqYVS",liked:"liked___xlDpa",likedActive:"likedActive___GqNt1",reply:"reply___R3gEt",replyList:"replyList___AA3m5",comment:"comment___JuJKy"},gn=Object.defineProperty,rt=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Yt=(Jn,qn,nr)=>qn in Jn?gn(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,Qe=(Jn,qn)=>{for(var nr in qn||(qn={}))Mt.call(qn,nr)&&Yt(Jn,nr,qn[nr]);if(rt)for(var nr of rt(qn))en.call(qn,nr)&&Yt(Jn,nr,qn[nr]);return Jn},Ie=(Jn,qn,nr)=>new Promise((Ur,li)=>{var Lt=yn=>{try{Bn(nr.next(yn))}catch(xr){li(xr)}},Kn=yn=>{try{Bn(nr.throw(yn))}catch(xr){li(xr)}},Bn=yn=>yn.done?Ur(yn.value):Promise.resolve(yn.value).then(Lt,Kn);Bn((nr=nr.apply(Jn,qn)).next())});Ce().locale("ZH-cn");const Ot=({graduation:Jn,classroomList:qn,globalSetting:nr,loading:Ur,dispatch:li})=>{const[Lt,Kn]=(0,fe.useState)(Qe({},(0,Te.useParams)())),[Bn,yn]=(0,fe.useState)(!1),[xr,Sr]=(0,fe.useState)(-1),[mr,Qn]=(0,fe.useState)(""),{detail:ht}=Jn,{detailLeftMenus:Et}=qn,{graduationDetail:zt,replyList:fn,workDetail:at}=Jn,Rt={1:"\u8BBE\u8BA1",2:"\u8BBA\u6587",3:"\u521B\u4F5C"},on={1:"\u751F\u4EA7/\u793E\u4F1A\u5B9E\u9645",2:"\u7ED3\u5408\u79D1\u7814",3:"\u5176\u5B83"},tn={1:"\u771F\u9898",2:"\u6A21\u62DF\u9898"},Mn={1:"\u7EB5\u5411\u8BFE\u9898",2:"\u6A2A\u5411\u8BFE\u9898",3:"\u81EA\u9009"},wn={1:"\u65B0\u9898",2:"\u5F80\u5C4A\u9898\uFF0C\u6709\u65B0\u8981\u6C42",3:"\u5F80\u5C4A\u9898\uFF0C\u65E0\u65B0\u8981\u6C42"};return Lt.page_size=10,(0,fe.useEffect)(()=>{li({type:"graduation/getReplyList",payload:Qe({},Lt)}),li({type:"graduation/getTopisDetail",payload:Qe({},Lt)})},[Lt.categoryId]),fe.createElement("section",{className:yt.bg},fe.createElement("section",{className:" edu-container"},fe.createElement("aside",{className:[yt.desc,"c-black","font14","bg-white"].join(" ")},fe.createElement("h1",{className:yt.description},ht.description),fe.createElement("div",{className:"mt30"},fe.createElement("ul",{className:yt.listItem},fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u7C7B\u578B\uFF1A"),fe.createElement("span",null,Rt[ht==null?void 0:ht.topic_type]||"--")),fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\uFF1A"),fe.createElement("span",null,on[ht==null?void 0:ht.topic_source]||"--")),fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D281\uFF1A"),fe.createElement("span",null,tn[ht==null?void 0:ht.topic_property_first]||"--")),fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D282\uFF1A"),fe.createElement("span",null,Mn[ht==null?void 0:ht.topic_property_second]||"--")),fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"),fe.createElement("span",null,wn[ht==null?void 0:ht.topic_repeat]||"--")),fe.createElement("li",null,fe.createElement("span",{className:"c-light-black"},"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"),fe.createElement("span",null,ht.city||"--")),fe.createElement("li",{className:"fl with50"},fe.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"),fe.createElement("span",null,ht.source_unit||"--"))))),fe.createElement("aside",{className:[yt.reply,"bg-white","mt20"].join(" ")},Bn&&fe.createElement(ce.Z,{onChange:rr=>{Qn(rr)},height:200,isFocus:!0,watch:!0}),fe.createElement(Se.Z,{onClick:()=>{yn(!0)}},fe.createElement(He.Z,{flex:"1"},!Bn&&fe.createElement(Ue.default,{size:"middle",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),fe.createElement(He.Z,null,fe.createElement(xt.ZP,{type:"primary",size:"middle",onClick:()=>Ie(void 0,null,function*(){mr===""?lt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield li({type:"graduation/createReply",payload:{journals_for_message:{jour_id:Lt.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:mr}}})).status===0&&(lt.ZP.success("\u53D1\u5E03\u6210\u529F"),li({type:"graduation/getReplyList",payload:Qe({},Lt)}),yn(!1))})},"\u53D1\u8868")))),(fn==null?void 0:fn.comments)&&fn.comments!=""&&fe.createElement("aside",{className:[yt.replyList,"bg-white"].join(" ")},fn==null?void 0:fn.comments.map(function(rr,zr){var vr,yr;return fe.createElement(Se.Z,{gutter:[12,12],key:zr},fe.createElement(He.Z,{flex:"40px"},fe.createElement("img",{width:"40",src:`${ke.Z.IMG_SERVER}/images/${(vr=rr==null?void 0:rr.author)==null?void 0:vr.image_url}`})),fe.createElement(He.Z,{flex:"1"},fe.createElement(Se.Z,{align:"middle"},fe.createElement(He.Z,{span:24},fe.createElement("span",{className:"c-light-black"},(yr=rr==null?void 0:rr.author)==null?void 0:yr.name),fe.createElement("span",{className:"c-light-black ml10"},Ce()(rr==null?void 0:rr.created_on).fromNow()," \u53D1\u5E03")),fe.createElement(He.Z,{span:24},fe.createElement(ge.Z,{value:rr.content})),rr.children&&fe.createElement("aside",{className:yt.comment},rr.children.map(function(Lr,Dr){return fe.createElement(Se.Z,{key:Dr},fe.createElement(He.Z,{span:24},fe.createElement(Se.Z,null,fe.createElement(He.Z,{flex:"1"},Lr.author.name,fe.createElement("span",{className:"c-light-black ml10"},Ce()(Lr==null?void 0:Lr.created_on).fromNow())),fe.createElement(He.Z,null,fe.createElement(mt.Z,{title:"\u5220\u9664"},fe.createElement($e.Z,{className:"current",onClick:()=>{li({type:"graduation/setActionTabs",payload:{key:"\u5220\u9664",params:Lt,selectArr:rr}})}}))))),fe.createElement(He.Z,null,fe.createElement("strong",null,fe.createElement(ge.Z,{value:Lr.content}))))})),fe.createElement(He.Z,{span:24,className:"mt5 c-light-black"},xr===zr&&fe.createElement("aside",null,fe.createElement(ce.Z,{onChange:Lr=>{Qn(Lr)},height:150,isFocus:!0}),fe.createElement(Se.Z,null,fe.createElement(He.Z,{span:24,className:"tr"},fe.createElement(xt.ZP,{type:"primary",size:"middle",onClick:()=>Ie(this,null,function*(){mr===""?lt.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield li({type:"graduation/createReply",payload:{journals_for_message:{jour_id:Lt.categoryId,jour_type:"HomeworkCommon",m_parent_id:rr.id,reply_id:1,notes:mr}}}),li({type:"graduation/getReplyList",payload:Qe({},Lt)}),lt.ZP.success("\u53D1\u5E03\u6210\u529F"),Sr(-1))})},"\u53D1\u8868")))),xr!==zr&&fe.createElement("div",{className:"tr"},fe.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:()=>Sr(zr)}),rr.liked&&fe.createElement("span",{className:"c-orange"},fe.createElement(Ft.Z,{className:"mr5 ml30",onClick:()=>Ie(this,null,function*(){yield li({type:"graduation/replyUnLike",payload:{object_id:rr.id,object_type:"message"}}),li({type:"graduation/getReplyList",payload:Qe({},Lt)})})}),rr.praises_count),!rr.liked&&fe.createElement("span",null,fe.createElement(Ft.Z,{className:"mr5 ml30",onClick:()=>Ie(this,null,function*(){yield li({type:"graduation/replyLike",payload:{object_id:rr.id,object_type:"message"}}),li({type:"graduation/getReplyList",payload:Qe({},Lt)})})}),rr.praises_count))))))}))),fe.createElement("aside",{className:"tc mt30 pb30"},fe.createElement(ut.Z,{defaultCurrent:1,total:fn==null?void 0:fn.total_count,hideOnSinglePage:!0,current:Lt.page||1,onChange:rr=>{Lt.page=rr,li({type:"graduation/getReplyList",payload:Qe({},Lt)})}})),fe.createElement(it,null))};var In=(0,Te.connect)(({graduation:Jn,classroomList:qn,loading:nr,globalSetting:Ur})=>({graduation:Jn,globalSetting:Ur,classroomList:qn,loading:nr.effects}))(Ot),mn=ie(22150),pt=ie(9430),wt=Object.defineProperty,Qt=Object.getOwnPropertySymbols,Zn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,rn=(Jn,qn,nr)=>qn in Jn?wt(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,ln=(Jn,qn)=>{for(var nr in qn||(qn={}))Zn.call(qn,nr)&&rn(Jn,nr,qn[nr]);if(Qt)for(var nr of Qt(qn))Cn.call(qn,nr)&&rn(Jn,nr,qn[nr]);return Jn},zn=(Jn,qn)=>{var nr={};for(var Ur in Jn)Zn.call(Jn,Ur)&&qn.indexOf(Ur)<0&&(nr[Ur]=Jn[Ur]);if(Jn!=null&&Qt)for(var Ur of Qt(Jn))qn.indexOf(Ur)<0&&Cn.call(Jn,Ur)&&(nr[Ur]=Jn[Ur]);return nr},_n=(Jn,qn,nr)=>new Promise((Ur,li)=>{var Lt=yn=>{try{Bn(nr.next(yn))}catch(xr){li(xr)}},Kn=yn=>{try{Bn(nr.throw(yn))}catch(xr){li(xr)}},Bn=yn=>yn.done?Ur(yn.value):Promise.resolve(yn.value).then(Lt,Kn);Bn((nr=nr.apply(Jn,qn)).next())});const Oe=Jn=>{var qn=Jn,{graduation:nr,dispatch:Ur}=qn,li=zn(qn,["graduation","dispatch"]);const Lt=(0,Te.useParams)();return fe.createElement(Ae.default,{centered:!0,title:"\u63D0\u793A",open:nr.actionTabs.key==="\u62D2\u7EDD",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>_n(void 0,null,function*(){(yield Ur({type:"graduation/refuseTopic",payload:ln({student_graduation_topic:nr.actionTabs.selectArrs.id},Lt)})).status===0&&(lt.ZP.success("\u62D2\u7EDD\u6210\u529F"),Ur({type:"graduation/setActionTabs",payload:{}}),Ur({type:"graduation/getTopisDetailList",payload:ln({},nr.actionTabs.params)}))}),onCancel:()=>{Ur({type:"graduation/setActionTabs",payload:{}})}},fe.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u5B66\u751F\u9009\u9898?"))};var ue=(0,Te.connect)(({graduation:Jn})=>({graduation:Jn}))(Oe),le=ie(11713),ve=Object.defineProperty,pe=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,ft=(Jn,qn,nr)=>qn in Jn?ve(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,Bt=(Jn,qn)=>{for(var nr in qn||(qn={}))se.call(qn,nr)&&ft(Jn,nr,qn[nr]);if(pe)for(var nr of pe(qn))Be.call(qn,nr)&&ft(Jn,nr,qn[nr]);return Jn},qt=(Jn,qn)=>{var nr={};for(var Ur in Jn)se.call(Jn,Ur)&&qn.indexOf(Ur)<0&&(nr[Ur]=Jn[Ur]);if(Jn!=null&&pe)for(var Ur of pe(Jn))qn.indexOf(Ur)<0&&Be.call(Jn,Ur)&&(nr[Ur]=Jn[Ur]);return nr},an=(Jn,qn,nr)=>new Promise((Ur,li)=>{var Lt=yn=>{try{Bn(nr.next(yn))}catch(xr){li(xr)}},Kn=yn=>{try{Bn(nr.throw(yn))}catch(xr){li(xr)}},Bn=yn=>yn.done?Ur(yn.value):Promise.resolve(yn.value).then(Lt,Kn);Bn((nr=nr.apply(Jn,qn)).next())});const vn=Jn=>{var qn=Jn,{graduation:nr,dispatch:Ur}=qn,li=qt(qn,["graduation","dispatch"]),Lt;const Kn=(0,Te.useParams)(),{detailList:Bn}=nr,[yn]=mn.default.useForm();return fe.createElement(Ae.default,{centered:!0,title:"\u540C\u610F\u9009\u9898",open:nr.actionTabs.key==="\u540C\u610F",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>an(void 0,null,function*(){var xr;yield yn.validateFields();const Sr=yn.getFieldsValue();(yield Ur({type:"graduation/agreeTopic",payload:Bt({group_id:Sr.group_id,course_group_name:(xr=Bn==null?void 0:Bn.group_list)==null?void 0:xr.filter(Qn=>Qn.group_id==Sr.group_id)[0].group_name,student_graduation_topic:nr.actionTabs.selectArrs.id},Kn)})).status===0&&(lt.ZP.success("\u540C\u610F\u6210\u529F"),Ur({type:"graduation/setActionTabs",payload:{}}),Ur({type:"graduation/getTopisDetailList",payload:Bt({},nr.actionTabs.params)}))}),onCancel:()=>{Ur({type:"graduation/setActionTabs",payload:{}})}},fe.createElement("p",null,"\u786E\u8BA4\u540C\u610F\u5B66\u751F\u7684\u9009\u9898\uFF0C\u5C06\u5B66\u751F\u52A0\u5165\u6211\u7684\u5206\u73ED"),fe.createElement(mn.default,{form:yn},fe.createElement(mn.default.Item,{name:"group_id",label:"\u9009\u62E9\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5206\u73ED"}]},fe.createElement(le.default,{placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED",size:"middle"},(Lt=Bn==null?void 0:Bn.group_list)==null?void 0:Lt.map(function(xr,Sr){return fe.createElement(le.default.Option,{value:xr.group_id},xr.group_name)})))))};var dn=(0,Te.connect)(({graduation:Jn})=>({graduation:Jn}))(vn),gt=Object.defineProperty,It=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Tt=(Jn,qn,nr)=>qn in Jn?gt(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,Yn=(Jn,qn)=>{for(var nr in qn||(qn={}))Ht.call(qn,nr)&&Tt(Jn,nr,qn[nr]);if(It)for(var nr of It(qn))Xt.call(qn,nr)&&Tt(Jn,nr,qn[nr]);return Jn};const Rn=({graduation:Jn,loading:qn,dispatch:nr})=>{const[Ur,li]=(0,fe.useState)(Yn({},(0,Te.useParams)())),Lt=(0,Te.useLocation)(),{detailList:Kn}=Jn,[Bn,yn]=(0,fe.useState)({}),[xr]=mn.default.useForm(),Sr=(Qn,ht)=>{Ur.page=Qn,Ur.limit=20,nr({type:"graduation/getTopisDetailList",payload:Yn({},Ur)})},mr=[{title:"\u5E8F\u53F7",dataIndex:"name",width:200,align:"center",render:(Qn,ht,Et)=>Et+1},{title:"\u59D3\u540D",dataIndex:"student_name"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u5206\u73ED",dataIndex:"class_group_name"},{title:"\u9009\u9898\u65F6\u95F4",dataIndex:"selected_time"},{title:"\u786E\u8BA4\u7ED3\u679C",dataIndex:"result",render:Qn=>Qn==="\u5DF2\u62D2\u7EDD"?fe.createElement("span",{className:"c-orange"},"\u5DF2\u62D2\u7EDD"):Qn},{title:"\u64CD\u4F5C",dataInex:"action",render:(Qn,ht)=>fe.createElement("div",null,(ht.result==="\u5F85\u786E\u8BA4"||ht.result==="\u5DF2\u540C\u610F")&&fe.createElement("span",{className:"current",onClick:()=>{nr({type:"graduation/setActionTabs",payload:{key:"\u62D2\u7EDD",selectArrs:ht,params:Ur}})}},"\u62D2\u7EDD"),ht.result==="\u5F85\u786E\u8BA4"&&fe.createElement("span",{className:"current ml20 c-blue",onClick:()=>{nr({type:"graduation/setActionTabs",payload:{key:"\u540C\u610F",selectArrs:ht,params:Ur}})}},"\u540C\u610F"))}];return fe.createElement(fe.Fragment,null,fe.createElement("section",{className:"minH500 bg-white "},fe.createElement(pt.default,{loading:qn["graduation/getTopisDetailList"],pagination:!1,dataSource:Kn.users_list,columns:mr}),fe.createElement(ue,null),fe.createElement(dn,null)),fe.createElement("aside",{className:"tc mb50 mt30"},fe.createElement(ut.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:Sr,defaultCurrent:Ur.page||1,current:Ur.page||1,defaultPageSize:15,total:Jn.users_count})))};var cr=(0,Te.connect)(({graduation:Jn,loading:qn})=>({graduation:Jn,loading:qn.effects}))(Rn),Xr={flex_box_center:"flex_box_center___D_8YV",flex_space_between:"flex_space_between___DI3Lx",flex_box_vertical_center:"flex_box_vertical_center___HQIdb",flex_box_center_end:"flex_box_center_end___jBPdg",flex_box_column:"flex_box_column___oBJ_R",title:"title___vQC28",menuTabs:"menuTabs___ZWqcp",rightMenu:"rightMenu___JdFEE",shixunDetail:"shixunDetail___rsPHS"},wr=Object.defineProperty,kr=Object.getOwnPropertySymbols,Ar=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,oi=(Jn,qn,nr)=>qn in Jn?wr(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Jn[qn]=nr,fi=(Jn,qn)=>{for(var nr in qn||(qn={}))Ar.call(qn,nr)&&oi(Jn,nr,qn[nr]);if(kr)for(var nr of kr(qn))gi.call(qn,nr)&&oi(Jn,nr,qn[nr]);return Jn};const Pi=({graduation:Jn,globalSetting:qn,loading:nr,dispatch:Ur})=>{const li=(0,Te.useParams)(),Lt=(0,Te.useLocation)(),[Kn]=(0,Te.useSearchParams)(),[Bn,yn]=(0,fe.useState)([]),[xr,Sr]=(0,fe.useState)(Kn.get("tabs")||0),{detailList:mr}=Jn;let Qn;li.category=Kn.get("category_id"),(0,fe.useEffect)(()=>{Ur({type:"graduation/getTopisDetailList",payload:fi({},li)})},[li.coursesId]);const ht=[{name:"\u9009\u9898\u5217\u8868",id:0,compontent:fe.createElement(cr,null)},{name:"\u9009\u9898\u63CF\u8FF0",id:1,compontent:fe.createElement(In,null)}];return fe.createElement("section",null,fe.createElement("div",{className:"edu-container"},mr.course_name&&fe.createElement("section",{className:"animated fadeIn"},fe.createElement("aside",{className:"mt10"},fe.createElement(Re.Z,{separator:">"},fe.createElement(Re.Z.Item,null,fe.createElement(Te.Link,{to:`/classrooms/${mr.course_id}/shixun_homework`},mr.course_name)),fe.createElement(Re.Z.Item,null,fe.createElement(Te.Link,{to:`/classrooms/${mr.course_id}/graduation_topics/${mr.graduation_id}`},"\u6BD5\u8BBE\u9009\u9898")),fe.createElement(Re.Z.Item,null,"\u9009\u9898\u8BE6\u60C5"))),fe.createElement("aside",{className:[Xr.title,"mt20"].join(" ")},fe.createElement(Te.Link,{to:`/classrooms/${mr.course_id}/graduation_topics/${mr.graduation_id}`},fe.createElement(ye.Z,{className:"font16 c-black"})),fe.createElement("strong",{className:"font20 ml5"},mr.graduation_topic_name),fe.createElement(_e.VV,{status:[mr.status_name]}))),fe.createElement("aside",{className:"mt30 relative"},fe.createElement("aside",{className:Xr.rightMenu},fe.createElement(Te.Link,{className:Xr.shixunDetail,to:`/classrooms/${li.coursesId}/graduation_topics/${li.categoryId}/edit`},fe.createElement("span",{className:"iconfont icon-shixunxiangqing"}),"\u7F16\u8F91\u9009\u9898")),fe.createElement(Ge.default,{defaultActiveKey:xr,className:Xr.menuTabs},ht.map((Et,zt)=>fe.createElement(Ge.default.TabPane,{tab:Et.name,key:Et.id},Et.compontent))))))};var Or=(0,Te.connect)(({graduation:Jn,loading:qn,globalSetting:nr})=>({graduation:Jn,globalSetting:nr,loading:qn.effects}))(Pi)},38780:function(Ln,Kt){"use strict";function ie(){const fe=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Te=1;Te<arguments.length;Te++){const Re=Te<0||arguments.length<=Te?void 0:arguments[Te];Re&&Object.keys(Re).forEach(Ge=>{const ye=Re[Ge];ye!==void 0&&(fe[Ge]=ye)})}return fe}Kt.Z=ie},66367:function(Ln,Kt,ie){"use strict";ie.d(Kt,{F:function(){return fe},Z:function(){return Te}});function fe(Re){return Re!=null&&Re===Re.window}function Te(Re,Ge){var ye,_e;if(typeof window=="undefined")return 0;const ce=Ge?"scrollTop":"scrollLeft";let ke=0;return fe(Re)?ke=Re[Ge?"pageYOffset":"pageXOffset"]:Re instanceof Document?ke=Re.documentElement[ce]:(Re instanceof HTMLElement||Re)&&(ke=Re[ce]),Re&&!fe(Re)&&typeof ke!="number"&&(ke=(_e=((ye=Re.ownerDocument)!==null&&ye!==void 0?ye:Re).documentElement)===null||_e===void 0?void 0:_e[ce]),ke}},57838:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});var fe=ie(67294);function Te(){const[,Re]=fe.useReducer(Ge=>Ge+1,0);return Re}},58375:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Ge}});var fe=ie(96523);function Te(ye,_e,ce,ke){const ge=ce-_e;return ye/=ke/2,ye<1?ge/2*ye*ye*ye+_e:ge/2*((ye-=2)*ye*ye+2)+_e}var Re=ie(66367);function Ge(ye){let _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ce=()=>window,callback:ke,duration:ge=450}=_e,Ae=ce(),lt=(0,Re.Z)(Ae,!0),ze=Date.now(),st=()=>{const ct=Date.now()-ze,qe=Te(ct>ge?ge:ct,lt,ye,ge);(0,Re.F)(Ae)?Ae.scrollTo(window.pageXOffset,qe):Ae instanceof Document||Ae.constructor.name==="HTMLDocument"?Ae.documentElement.scrollTop=qe:Ae.scrollTop=qe,ct<ge?(0,fe.Z)(st):typeof ke=="function"&&ke()};(0,fe.Z)(st)}},9708:function(Ln,Kt,ie){"use strict";ie.d(Kt,{F:function(){return ye},Z:function(){return Ge}});var fe=ie(94184),Te=ie.n(fe);const Re=null;function Ge(_e,ce,ke){return Te()({[`${_e}-status-success`]:ce==="success",[`${_e}-status-warning`]:ce==="warning",[`${_e}-status-error`]:ce==="error",[`${_e}-status-validating`]:ce==="validating",[`${_e}-has-feedback`]:ke})}const ye=(_e,ce)=>ce||_e},85673:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return gn}});var fe=ie(94184),Te=ie.n(fe),Re=ie(37419),Ge=ie(1337),ye=ie(67294),_e=ie(96159),ce=ie(53124),ke=ie(42922),ge=ie(35874);const Ae=rt=>{let{children:Mt}=rt;const{getPrefixCls:en}=ye.useContext(ce.E_),Yt=en("breadcrumb");return ye.createElement("li",{className:`${Yt}-separator`,"aria-hidden":"true"},Mt===""?Mt:Mt||"/")};Ae.__ANT_BREADCRUMB_SEPARATOR=!0;var lt=Ae,ze=function(rt,Mt){var en={};for(var Yt in rt)Object.prototype.hasOwnProperty.call(rt,Yt)&&Mt.indexOf(Yt)<0&&(en[Yt]=rt[Yt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Yt=Object.getOwnPropertySymbols(rt);Qe<Yt.length;Qe++)Mt.indexOf(Yt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(rt,Yt[Qe])&&(en[Yt[Qe]]=rt[Yt[Qe]]);return en};function st(rt,Mt){if(rt.title===void 0||rt.title===null)return null;const en=Object.keys(Mt).join("|");return typeof rt.title=="object"?rt.title:String(rt.title).replace(new RegExp(`:(${en})`,"g"),(Yt,Qe)=>Mt[Qe]||Yt)}function dt(rt,Mt,en,Yt){if(en==null)return null;const{className:Qe,onClick:Ie}=Mt,Ot=ze(Mt,["className","onClick"]),In=Object.assign(Object.assign({},(0,Ge.Z)(Ot,{data:!0,aria:!0})),{onClick:Ie});return Yt!==void 0?ye.createElement("a",Object.assign({},In,{className:Te()(`${rt}-link`,Qe),href:Yt}),en):ye.createElement("span",Object.assign({},In,{className:Te()(`${rt}-link`,Qe)}),en)}function ct(rt,Mt){return(Yt,Qe,Ie,Ot,In)=>{if(Mt)return Mt(Yt,Qe,Ie,Ot);const mn=st(Yt,Qe);return dt(rt,Yt,mn,In)}}var qe=function(rt,Mt){var en={};for(var Yt in rt)Object.prototype.hasOwnProperty.call(rt,Yt)&&Mt.indexOf(Yt)<0&&(en[Yt]=rt[Yt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Yt=Object.getOwnPropertySymbols(rt);Qe<Yt.length;Qe++)Mt.indexOf(Yt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(rt,Yt[Qe])&&(en[Yt[Qe]]=rt[Yt[Qe]]);return en};const be=rt=>{const{prefixCls:Mt,separator:en="/",children:Yt,menu:Qe,overlay:Ie,dropdownProps:Ot,href:In}=rt,pt=(wt=>{if(Qe||Ie){const Qt=Object.assign({},Ot);if(Qe){const Zn=Qe||{},{items:Cn}=Zn,rn=qe(Zn,["items"]);Qt.menu=Object.assign(Object.assign({},rn),{items:Cn==null?void 0:Cn.map((ln,zn)=>{var{key:_n,title:Oe,label:ue,path:le}=ln,ve=qe(ln,["key","title","label","path"]);let pe=ue!=null?ue:Oe;return le&&(pe=ye.createElement("a",{href:`${In}${le}`},pe)),Object.assign(Object.assign({},ve),{key:_n!=null?_n:zn,label:pe})})})}else Ie&&(Qt.overlay=Ie);return ye.createElement(ge.Z,Object.assign({placement:"bottom"},Qt),ye.createElement("span",{className:`${Mt}-overlay-link`},wt,ye.createElement(ke.Z,null)))}return wt})(Yt);return pt!=null?ye.createElement(ye.Fragment,null,ye.createElement("li",null,pt),en&&ye.createElement(lt,null,en)):null},vt=rt=>{const{prefixCls:Mt,children:en,href:Yt}=rt,Qe=qe(rt,["prefixCls","children","href"]),{getPrefixCls:Ie}=ye.useContext(ce.E_),Ot=Ie("breadcrumb",Mt);return ye.createElement(be,Object.assign({},Qe,{prefixCls:Ot}),dt(Ot,Qe,en,Yt))};vt.__ANT_BREADCRUMB_ITEM=!0;var Dt=vt,it=ie(14747),ot=ie(67968),Ce=ie(45503);const Se=rt=>{const{componentCls:Mt,iconCls:en}=rt;return{[Mt]:Object.assign(Object.assign({},(0,it.Wf)(rt)),{color:rt.itemColor,fontSize:rt.fontSize,[en]:{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},[`${Mt}-separator`]:{marginInline:rt.separatorMargin,color:rt.separatorColor},[`${Mt}-link`]:{[`
|
|
|
> ${en} + span,
|
|
|
> ${en} + a
|
|
|
`]:{marginInlineStart:rt.marginXXS}},[`${Mt}-overlay-link`]:{borderRadius:rt.borderRadiusSM,height:rt.lineHeight*rt.fontSize,display:"inline-block",padding:`0 ${rt.paddingXXS}px`,marginInline:-rt.marginXXS,[`> ${en}`]:{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 He=(0,ot.Z)("Breadcrumb",rt=>{const Mt=(0,Ce.TS)(rt,{});return[Se(Mt)]},rt=>({itemColor:rt.colorTextDescription,lastItemColor:rt.colorText,iconFontSize:rt.fontSize,linkColor:rt.colorTextDescription,linkHoverColor:rt.colorText,separatorColor:rt.colorTextDescription,separatorMargin:rt.marginXS})),Ue=function(rt,Mt){var en={};for(var Yt in rt)Object.prototype.hasOwnProperty.call(rt,Yt)&&Mt.indexOf(Yt)<0&&(en[Yt]=rt[Yt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Yt=Object.getOwnPropertySymbols(rt);Qe<Yt.length;Qe++)Mt.indexOf(Yt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(rt,Yt[Qe])&&(en[Yt[Qe]]=rt[Yt[Qe]]);return en};function xt(rt){const{breadcrumbName:Mt,children:en}=rt,Yt=Ue(rt,["breadcrumbName","children"]),Qe=Object.assign({title:Mt},Yt);return en&&(Qe.menu={items:en.map(Ie=>{var{breadcrumbName:Ot}=Ie,In=Ue(Ie,["breadcrumbName"]);return Object.assign(Object.assign({},In),{title:Ot})})}),Qe}function mt(rt,Mt){return(0,ye.useMemo)(()=>rt||(Mt?Mt.map(xt):null),[rt,Mt])}var ut=function(rt,Mt){var en={};for(var Yt in rt)Object.prototype.hasOwnProperty.call(rt,Yt)&&Mt.indexOf(Yt)<0&&(en[Yt]=rt[Yt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,Yt=Object.getOwnPropertySymbols(rt);Qe<Yt.length;Qe++)Mt.indexOf(Yt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(rt,Yt[Qe])&&(en[Yt[Qe]]=rt[Yt[Qe]]);return en};const $e=(rt,Mt)=>{if(Mt===void 0)return Mt;let en=(Mt||"").replace(/^\//,"");return Object.keys(rt).forEach(Yt=>{en=en.replace(`:${Yt}`,rt[Yt])}),en},Ft=rt=>{const{prefixCls:Mt,separator:en="/",style:Yt,className:Qe,rootClassName:Ie,routes:Ot,items:In,children:mn,itemRender:pt,params:wt={}}=rt,Qt=ut(rt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Zn,direction:Cn,breadcrumb:rn}=ye.useContext(ce.E_);let ln;const zn=Zn("breadcrumb",Mt),[_n,Oe]=He(zn),ue=mt(In,Ot),le=ct(zn,pt);if(ue&&ue.length>0){const se=[],Be=In||Ot;ln=ue.map((ft,Bt)=>{const{path:qt,key:an,type:vn,menu:dn,overlay:gt,onClick:It,className:Ht,separator:Xt,dropdownProps:Tt}=ft,Yn=$e(wt,qt);Yn!==void 0&&se.push(Yn);const Rn=an!=null?an:Bt;if(vn==="separator")return ye.createElement(lt,{key:Rn},Xt);const cr={},Xr=Bt===ue.length-1;dn?cr.menu=dn:gt&&(cr.overlay=gt);let{href:wr}=ft;return se.length&&Yn!==void 0&&(wr=`#/${se.join("/")}`),ye.createElement(be,Object.assign({key:Rn},cr,(0,Ge.Z)(ft,{data:!0,aria:!0}),{className:Ht,dropdownProps:Tt,href:wr,separator:Xr?"":en,onClick:It,prefixCls:zn}),le(ft,wt,Be,se,wr))})}else if(mn){const se=(0,Re.Z)(mn).length;ln=(0,Re.Z)(mn).map((Be,ft)=>{if(!Be)return Be;const Bt=ft===se-1;return(0,_e.Tm)(Be,{separator:Bt?"":en,key:ft})})}const ve=Te()(zn,rn==null?void 0:rn.className,{[`${zn}-rtl`]:Cn==="rtl"},Qe,Ie,Oe),pe=Object.assign(Object.assign({},rn==null?void 0:rn.style),Yt);return _n(ye.createElement("nav",Object.assign({className:ve,style:pe},Qt),ye.createElement("ol",null,ln)))};Ft.Item=Dt,Ft.Separator=lt;var yt=Ft,gn=yt},84567:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return He}});var fe=ie(94184),Te=ie.n(fe),Re=ie(95860),Ge=ie(67294),ye=ie(53124),_e=ie(98866),ce=ie(65223),ge=Ge.createContext(null),Ae=ie(63185),lt=ie(45353),ze=ie(92429),st=function(Ue,xt){var mt={};for(var ut in Ue)Object.prototype.hasOwnProperty.call(Ue,ut)&&xt.indexOf(ut)<0&&(mt[ut]=Ue[ut]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,ut=Object.getOwnPropertySymbols(Ue);$e<ut.length;$e++)xt.indexOf(ut[$e])<0&&Object.prototype.propertyIsEnumerable.call(Ue,ut[$e])&&(mt[ut[$e]]=Ue[ut[$e]]);return mt};const dt=(Ue,xt)=>{var mt;const{prefixCls:ut,className:$e,rootClassName:Ft,children:yt,indeterminate:gn=!1,style:rt,onMouseEnter:Mt,onMouseLeave:en,skipGroup:Yt=!1,disabled:Qe}=Ue,Ie=st(Ue,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Ot,direction:In,checkbox:mn}=Ge.useContext(ye.E_),pt=Ge.useContext(ge),{isFormItemInput:wt}=Ge.useContext(ce.aM),Qt=Ge.useContext(_e.Z),Zn=(mt=(pt==null?void 0:pt.disabled)||Qe)!==null&&mt!==void 0?mt:Qt,Cn=Ge.useRef(Ie.value);Ge.useEffect(()=>{pt==null||pt.registerValue(Ie.value)},[]),Ge.useEffect(()=>{if(!Yt)return Ie.value!==Cn.current&&(pt==null||pt.cancelValue(Cn.current),pt==null||pt.registerValue(Ie.value),Cn.current=Ie.value),()=>pt==null?void 0:pt.cancelValue(Ie.value)},[Ie.value]);const rn=Ot("checkbox",ut),[ln,zn]=(0,Ae.ZP)(rn),_n=Object.assign({},Ie);pt&&!Yt&&(_n.onChange=function(){Ie.onChange&&Ie.onChange.apply(Ie,arguments),pt.toggleOption&&pt.toggleOption({label:yt,value:Ie.value})},_n.name=pt.name,_n.checked=pt.value.includes(Ie.value));const Oe=Te()(`${rn}-wrapper`,{[`${rn}-rtl`]:In==="rtl",[`${rn}-wrapper-checked`]:_n.checked,[`${rn}-wrapper-disabled`]:Zn,[`${rn}-wrapper-in-form-item`]:wt},mn==null?void 0:mn.className,$e,Ft,zn),ue=Te()({[`${rn}-indeterminate`]:gn},ze.A,zn),le=gn?"mixed":void 0;return ln(Ge.createElement(lt.Z,{component:"Checkbox",disabled:Zn},Ge.createElement("label",{className:Oe,style:Object.assign(Object.assign({},mn==null?void 0:mn.style),rt),onMouseEnter:Mt,onMouseLeave:en},Ge.createElement(Re.Z,Object.assign({"aria-checked":le},_n,{prefixCls:rn,className:ue,disabled:Zn,ref:xt})),yt!==void 0&&Ge.createElement("span",null,yt))))};var qe=Ge.forwardRef(dt),be=ie(74902),vt=ie(10366),Dt=function(Ue,xt){var mt={};for(var ut in Ue)Object.prototype.hasOwnProperty.call(Ue,ut)&&xt.indexOf(ut)<0&&(mt[ut]=Ue[ut]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,ut=Object.getOwnPropertySymbols(Ue);$e<ut.length;$e++)xt.indexOf(ut[$e])<0&&Object.prototype.propertyIsEnumerable.call(Ue,ut[$e])&&(mt[ut[$e]]=Ue[ut[$e]]);return mt};const it=(Ue,xt)=>{const{defaultValue:mt,children:ut,options:$e=[],prefixCls:Ft,className:yt,rootClassName:gn,style:rt,onChange:Mt}=Ue,en=Dt(Ue,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Yt,direction:Qe}=Ge.useContext(ye.E_),[Ie,Ot]=Ge.useState(en.value||mt||[]),[In,mn]=Ge.useState([]);Ge.useEffect(()=>{"value"in en&&Ot(en.value||[])},[en.value]);const pt=Ge.useMemo(()=>$e.map(ve=>typeof ve=="string"||typeof ve=="number"?{label:ve,value:ve}:ve),[$e]),wt=ve=>{mn(pe=>pe.filter(se=>se!==ve))},Qt=ve=>{mn(pe=>[].concat((0,be.Z)(pe),[ve]))},Zn=ve=>{const pe=Ie.indexOf(ve.value),se=(0,be.Z)(Ie);pe===-1?se.push(ve.value):se.splice(pe,1),"value"in en||Ot(se),Mt==null||Mt(se.filter(Be=>In.includes(Be)).sort((Be,ft)=>{const Bt=pt.findIndex(an=>an.value===Be),qt=pt.findIndex(an=>an.value===ft);return Bt-qt}))},Cn=Yt("checkbox",Ft),rn=`${Cn}-group`,[ln,zn]=(0,Ae.ZP)(Cn),_n=(0,vt.Z)(en,["value","disabled"]),Oe=$e.length?pt.map(ve=>Ge.createElement(qe,{prefixCls:Cn,key:ve.value.toString(),disabled:"disabled"in ve?ve.disabled:en.disabled,value:ve.value,checked:Ie.includes(ve.value),onChange:ve.onChange,className:`${rn}-item`,style:ve.style,title:ve.title},ve.label)):ut,ue={toggleOption:Zn,value:Ie,disabled:en.disabled,name:en.name,registerValue:Qt,cancelValue:wt},le=Te()(rn,{[`${rn}-rtl`]:Qe==="rtl"},yt,gn,zn);return ln(Ge.createElement("div",Object.assign({className:le,style:rt},_n,{ref:xt}),Ge.createElement(ge.Provider,{value:ue},Oe)))},ot=Ge.forwardRef(it);var Ce=Ge.memo(ot);const Se=qe;Se.Group=Ce,Se.__ANT_CHECKBOX=!0;var He=Se},63185:function(Ln,Kt,ie){"use strict";ie.d(Kt,{C2:function(){return ye}});var fe=ie(14747),Te=ie(45503),Re=ie(67968);const Ge=_e=>{const{checkboxCls:ce}=_e,ke=`${ce}-wrapper`;return[{[`${ce}-group`]:Object.assign(Object.assign({},(0,fe.Wf)(_e)),{display:"inline-flex",flexWrap:"wrap",columnGap:_e.marginXS,[`> ${_e.antCls}-row`]:{flex:1}}),[ke]:Object.assign(Object.assign({},(0,fe.Wf)(_e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${ke}`]:{marginInlineStart:0},[`&${ke}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[ce]:Object.assign(Object.assign({},(0,fe.Wf)(_e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:_e.borderRadiusSM,alignSelf:"center",[`${ce}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${ce}-inner`]:Object.assign({},(0,fe.oN)(_e))},[`${ce}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:_e.checkboxSize,height:_e.checkboxSize,direction:"ltr",backgroundColor:_e.colorBgContainer,border:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`,borderRadius:_e.borderRadiusSM,borderCollapse:"separate",transition:`all ${_e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:_e.checkboxSize/14*5,height:_e.checkboxSize/14*8,border:`${_e.lineWidthBold}px solid ${_e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${_e.motionDurationFast} ${_e.motionEaseInBack}, opacity ${_e.motionDurationFast}`}},"& + span":{paddingInlineStart:_e.paddingXS,paddingInlineEnd:_e.paddingXS}})},{[`
|
|
|
${ke}:not(${ke}-disabled),
|
|
|
${ce}:not(${ce}-disabled)
|
|
|
`]:{[`&:hover ${ce}-inner`]:{borderColor:_e.colorPrimary}},[`${ke}:not(${ke}-disabled)`]:{[`&:hover ${ce}-checked:not(${ce}-disabled) ${ce}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${ce}-checked:not(${ce}-disabled):after`]:{borderColor:_e.colorPrimaryHover}}},{[`${ce}-checked`]:{[`${ce}-inner`]:{backgroundColor:_e.colorPrimary,borderColor:_e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${_e.motionDurationMid} ${_e.motionEaseOutBack} ${_e.motionDurationFast}`}}},[`
|
|
|
${ke}-checked:not(${ke}-disabled),
|
|
|
${ce}-checked:not(${ce}-disabled)
|
|
|
`]:{[`&:hover ${ce}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"}}},{[ce]:{"&-indeterminate":{[`${ce}-inner`]:{backgroundColor:_e.colorBgContainer,borderColor:_e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:_e.fontSizeLG/2,height:_e.fontSizeLG/2,backgroundColor:_e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${ke}-disabled`]:{cursor:"not-allowed"},[`${ce}-disabled`]:{[`&, ${ce}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${ce}-inner`]:{background:_e.colorBgContainerDisabled,borderColor:_e.colorBorder,"&:after":{borderColor:_e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:_e.colorTextDisabled},[`&${ce}-indeterminate ${ce}-inner::after`]:{background:_e.colorTextDisabled}}}]};function ye(_e,ce){const ke=(0,Te.TS)(ce,{checkboxCls:`.${_e}`,checkboxSize:ce.controlInteractiveSize});return[Ge(ke)]}Kt.ZP=(0,Re.Z)("Checkbox",(_e,ce)=>{let{prefixCls:ke}=ce;return[ye(ke,_e)]})},88258:function(Ln,Kt,ie){"use strict";var fe=ie(67294),Te=ie(53124),Re=ie(32983);const Ge=ye=>{const{componentName:_e}=ye,{getPrefixCls:ce}=(0,fe.useContext)(Te.E_),ke=ce("empty");switch(_e){case"Table":case"List":return fe.createElement(Re.Z,{image:Re.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return fe.createElement(Re.Z,{image:Re.Z.PRESENTED_IMAGE_SIMPLE,className:`${ke}-small`});default:return fe.createElement(Re.Z,null)}};Kt.Z=Ge},72565:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ia}});var fe=ie(94184),Te=ie.n(fe),Re=ie(1413),Ge=ie(97685),ye=ie(67294),_e=ie(73935);function ce(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ke={};function ge(Zt,At){}function Ae(Zt,At){}function lt(){ke={}}function ze(Zt,At,xn){!At&&!ke[xn]&&(Zt(!1,xn),ke[xn]=!0)}function st(Zt,At){ze(ge,Zt,At)}function dt(Zt,At){ze(Ae,Zt,At)}var ct=null,qe=ie(71002),be=ie(18459);function vt(Zt,At,xn){var jn=ye.useRef({});return(!("value"in jn.current)||xn(jn.current.condition,At))&&(jn.current.value=Zt(),jn.current.condition=At),jn.current.value}function Dt(Zt,At){typeof Zt=="function"?Zt(At):(0,qe.Z)(Zt)==="object"&&Zt&&"current"in Zt&&(Zt.current=At)}function it(){for(var Zt=arguments.length,At=new Array(Zt),xn=0;xn<Zt;xn++)At[xn]=arguments[xn];var jn=At.filter(function(hr){return hr});return jn.length<=1?jn[0]:function(hr){At.forEach(function(Qr){Dt(Qr,hr)})}}function ot(){for(var Zt=arguments.length,At=new Array(Zt),xn=0;xn<Zt;xn++)At[xn]=arguments[xn];return vt(function(){return it.apply(void 0,At)},At,function(jn,hr){return jn.length===hr.length&&jn.every(function(Qr,ni){return Qr===hr[ni]})})}function Ce(Zt){var At,xn,jn=(0,be.isMemo)(Zt)?Zt.type.type:Zt.type;return!(typeof jn=="function"&&!((At=jn.prototype)!==null&&At!==void 0&&At.render)||typeof Zt=="function"&&!((xn=Zt.prototype)!==null&&xn!==void 0&&xn.render))}var Se=ye.createContext(null),He=Se,Ue=ie(74902),xt=ce()?ye.useLayoutEffect:ye.useEffect,mt=xt,ut=function(At,xn){var jn=React.useRef(!0);xt(function(){if(!jn.current)return At()},xn),xt(function(){return jn.current=!1,function(){jn.current=!0}},[])},$e=[];function Ft(Zt,At){var xn=ye.useState(function(){if(!ce())return null;var bn=document.createElement("div");return bn}),jn=(0,Ge.Z)(xn,1),hr=jn[0],Qr=ye.useRef(!1),ni=ye.useContext(He),mi=ye.useState($e),ki=(0,Ge.Z)(mi,2),Si=ki[0],Qi=ki[1],aa=ni||(Qr.current?void 0:function(bn){Qi(function(Fn){var he=[bn].concat((0,Ue.Z)(Fn));return he})});function ba(){hr.parentElement||document.body.appendChild(hr),Qr.current=!0}function sn(){var bn;(bn=hr.parentElement)===null||bn===void 0||bn.removeChild(hr),Qr.current=!1}return mt(function(){return Zt?ni?ni(ba):ba():sn(),sn},[Zt]),mt(function(){Si.length&&(Si.forEach(function(bn){return bn()}),Qi($e))},[Si]),[hr,aa]}function yt(Zt,At){if(!Zt)return!1;if(Zt.contains)return Zt.contains(At);for(var xn=At;xn;){if(xn===Zt)return!0;xn=xn.parentNode}return!1}var gn="data-rc-order",rt="rc-util-key",Mt=new Map;function en(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},At=Zt.mark;return At?At.startsWith("data-")?At:"data-".concat(At):rt}function Yt(Zt){if(Zt.attachTo)return Zt.attachTo;var At=document.querySelector("head");return At||document.body}function Qe(Zt){return Zt==="queue"?"prependQueue":Zt?"prepend":"append"}function Ie(Zt){return Array.from((Mt.get(Zt)||Zt).children).filter(function(At){return At.tagName==="STYLE"})}function Ot(Zt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ce())return null;var xn=At.csp,jn=At.prepend,hr=document.createElement("style");hr.setAttribute(gn,Qe(jn)),xn!=null&&xn.nonce&&(hr.nonce=xn==null?void 0:xn.nonce),hr.innerHTML=Zt;var Qr=Yt(At),ni=Qr.firstChild;if(jn){if(jn==="queue"){var mi=Ie(Qr).filter(function(ki){return["prepend","prependQueue"].includes(ki.getAttribute(gn))});if(mi.length)return Qr.insertBefore(hr,mi[mi.length-1].nextSibling),hr}Qr.insertBefore(hr,ni)}else Qr.appendChild(hr);return hr}function In(Zt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xn=Yt(At);return Ie(xn).find(function(jn){return jn.getAttribute(en(At))===Zt})}function mn(Zt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xn=In(Zt,At);if(xn){var jn=Yt(At);jn.removeChild(xn)}}function pt(Zt,At){var xn=Mt.get(Zt);if(!xn||!yt(document,xn)){var jn=Ot("",At),hr=jn.parentNode;Mt.set(Zt,hr),Zt.removeChild(jn)}}function wt(){Mt.clear()}function Qt(Zt,At){var xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},jn=Yt(xn);pt(jn,xn);var hr=In(At,xn);if(hr){var Qr,ni;if((Qr=xn.csp)!==null&&Qr!==void 0&&Qr.nonce&&hr.nonce!==((ni=xn.csp)===null||ni===void 0?void 0:ni.nonce)){var mi;hr.nonce=(mi=xn.csp)===null||mi===void 0?void 0:mi.nonce}return hr.innerHTML!==Zt&&(hr.innerHTML=Zt),hr}var ki=Ot(Zt,xn);return ki.setAttribute(en(xn),At),ki}var Zn;function Cn(Zt){if(typeof document=="undefined")return 0;if(Zt||Zn===void 0){var At=document.createElement("div");At.style.width="100%",At.style.height="200px";var xn=document.createElement("div"),jn=xn.style;jn.position="absolute",jn.top="0",jn.left="0",jn.pointerEvents="none",jn.visibility="hidden",jn.width="200px",jn.height="150px",jn.overflow="hidden",xn.appendChild(At),document.body.appendChild(xn);var hr=At.offsetWidth;xn.style.overflow="scroll";var Qr=At.offsetWidth;hr===Qr&&(Qr=xn.clientWidth),document.body.removeChild(xn),Zn=hr-Qr}return Zn}function rn(Zt){var At=Zt.match(/^(.*)px$/),xn=Number(At==null?void 0:At[1]);return Number.isNaN(xn)?Cn():xn}function ln(Zt){if(typeof document=="undefined"||!Zt||!(Zt instanceof Element))return{width:0,height:0};var At=getComputedStyle(Zt,"::-webkit-scrollbar"),xn=At.width,jn=At.height;return{width:rn(xn),height:rn(jn)}}function zn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var _n="rc-util-locker-".concat(Date.now()),Oe=0;function ue(Zt){var At=!!Zt,xn=ye.useState(function(){return Oe+=1,"".concat(_n,"_").concat(Oe)}),jn=(0,Ge.Z)(xn,1),hr=jn[0];mt(function(){if(At){var Qr=ln(document.body).width,ni=zn();Qt(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(ni?"width: calc(100% - ".concat(Qr,"px);"):"",`
|
|
|
}`),hr)}else mn(hr);return function(){mn(hr)}},[At,hr])}var le=!1;function ve(Zt){return typeof Zt=="boolean"&&(le=Zt),le}var pe=function(At){return At===!1?!1:!ce()||!At?null:typeof At=="string"?document.querySelector(At):typeof At=="function"?At():At},se=ye.forwardRef(function(Zt,At){var xn=Zt.open,jn=Zt.autoLock,hr=Zt.getContainer,Qr=Zt.debug,ni=Zt.autoDestroy,mi=ni===void 0?!0:ni,ki=Zt.children,Si=ye.useState(xn),Qi=(0,Ge.Z)(Si,2),aa=Qi[0],ba=Qi[1],sn=aa||xn;ye.useEffect(function(){(mi||xn)&&ba(xn)},[xn,mi]);var bn=ye.useState(function(){return pe(hr)}),Fn=(0,Ge.Z)(bn,2),he=Fn[0],Pe=Fn[1];ye.useEffect(function(){var cn=pe(hr);Pe(cn!=null?cn:null)});var Fe=Ft(sn&&!he,Qr),We=(0,Ge.Z)(Fe,2),je=We[0],et=We[1],tt=he!=null?he:je;ue(jn&&xn&&ce()&&(tt===je||tt===document.body));var kt=null;if(ki&&Ce(ki)&&At){var Wt=ki;kt=Wt.ref}var Sn=ot(kt,At);if(!sn||!ce()||he===void 0)return null;var Nn=tt===!1||ve(),En=ki;return At&&(En=ye.cloneElement(ki,{ref:Sn})),ye.createElement(He.Provider,{value:et},Nn?En:(0,_e.createPortal)(En,tt))}),Be=se,ft=Be;function Bt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var qt=Bt()?ye.useLayoutEffect:ye.useEffect,an=function(At,xn){var jn=ye.useRef(!0);qt(function(){return At(jn.current)},xn),qt(function(){return jn.current=!1,function(){jn.current=!0}},[])},vn=function(At,xn){an(function(jn){if(!jn)return At()},xn)},dn=an,gt=ye.createContext(null),It=ye.createContext({}),Ht=gt,Xt=ie(4942),Tt=ie(87462),Yn=ie(62874),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(At){var xn=At.keyCode;if(At.altKey&&!At.ctrlKey||At.metaKey||xn>=Rn.F1&&xn<=Rn.F12)return!1;switch(xn){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(At){if(At>=Rn.ZERO&&At<=Rn.NINE||At>=Rn.NUM_ZERO&&At<=Rn.NUM_MULTIPLY||At>=Rn.A&&At<=Rn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&At===0)return!0;switch(At){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}}},cr=Rn,Xr=`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`,wr=`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`,kr="".concat(Xr," ").concat(wr).split(/[\s\n]+/),Ar="aria-",gi="data-";function oi(Zt,At){return Zt.indexOf(At)===0}function fi(Zt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xn;At===!1?xn={aria:!0,data:!0,attr:!0}:At===!0?xn={aria:!0}:xn=(0,Re.Z)({},At);var jn={};return Object.keys(Zt).forEach(function(hr){(xn.aria&&(hr==="role"||oi(hr,Ar))||xn.data&&oi(hr,gi)||xn.attr&&kr.includes(hr))&&(jn[hr]=Zt[hr])}),jn}function Pi(Zt){var At=React.useRef();At.current=Zt;var xn=React.useCallback(function(){for(var jn,hr=arguments.length,Qr=new Array(hr),ni=0;ni<hr;ni++)Qr[ni]=arguments[ni];return(jn=At.current)===null||jn===void 0?void 0:jn.call.apply(jn,[At].concat(Qr))},[]);return xn}function Or(Zt){var At=React.useRef(!1),xn=React.useState(Zt),jn=_slicedToArray(xn,2),hr=jn[0],Qr=jn[1];React.useEffect(function(){return At.current=!1,function(){At.current=!0}},[]);function ni(mi,ki){ki&&At.current||Qr(mi)}return[hr,ni]}function Jn(Zt){return Zt!==void 0}function qn(Zt,At){var xn=At||{},jn=xn.defaultValue,hr=xn.value,Qr=xn.onChange,ni=xn.postState,mi=useState(function(){return Jn(hr)?hr:Jn(jn)?typeof jn=="function"?jn():jn:typeof Zt=="function"?Zt():Zt}),ki=_slicedToArray(mi,2),Si=ki[0],Qi=ki[1],aa=hr!==void 0?hr:Si,ba=ni?ni(aa):aa,sn=useEvent(Qr),bn=useState([aa]),Fn=_slicedToArray(bn,2),he=Fn[0],Pe=Fn[1];useLayoutUpdateEffect(function(){var We=he[0];Si!==We&&sn(Si,We)},[he]),useLayoutUpdateEffect(function(){Jn(hr)||Qi(hr)},[hr]);var Fe=useEvent(function(We,je){Qi(We,je),Pe([aa],je)});return[ba,Fe]}var nr=ie(33993);function Ur(Zt,At,xn){var jn=ye.useRef({});return(!("value"in jn.current)||xn(jn.current.condition,At))&&(jn.current.value=Zt(),jn.current.condition=At),jn.current.value}function li(Zt,At){typeof Zt=="function"?Zt(At):(0,qe.Z)(Zt)==="object"&&Zt&&"current"in Zt&&(Zt.current=At)}function Lt(){for(var Zt=arguments.length,At=new Array(Zt),xn=0;xn<Zt;xn++)At[xn]=arguments[xn];var jn=At.filter(function(hr){return hr});return jn.length<=1?jn[0]:function(hr){At.forEach(function(Qr){li(Qr,hr)})}}function Kn(){for(var Zt=arguments.length,At=new Array(Zt),xn=0;xn<Zt;xn++)At[xn]=arguments[xn];return Ur(function(){return Lt.apply(void 0,At)},At,function(jn,hr){return jn.length!==hr.length||jn.every(function(Qr,ni){return Qr!==hr[ni]})})}function Bn(Zt){var At,xn,jn=isMemo(Zt)?Zt.type.type:Zt.type;return!(typeof jn=="function"&&!((At=jn.prototype)!==null&&At!==void 0&&At.render)||typeof Zt=="function"&&!((xn=Zt.prototype)!==null&&xn!==void 0&&xn.render))}function yn(Zt){return!isValidElement(Zt)||isFragment(Zt)?!1:Bn(Zt)}function xr(Zt,At,xn,jn){if(!At.length)return xn;var hr=_toArray(At),Qr=hr[0],ni=hr.slice(1),mi;return!Zt&&typeof Qr=="number"?mi=[]:Array.isArray(Zt)?mi=_toConsumableArray(Zt):mi=_objectSpread({},Zt),jn&&xn===void 0&&ni.length===1?delete mi[Qr][ni[0]]:mi[Qr]=xr(mi[Qr],ni,xn,jn),mi}function Sr(Zt,At,xn){var jn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return At.length&&jn&&xn===void 0&&!get(Zt,At.slice(0,-1))?Zt:xr(Zt,At,xn,jn)}function mr(Zt){return _typeof(Zt)==="object"&&Zt!==null&&Object.getPrototypeOf(Zt)===Object.prototype}function Qn(Zt){return Array.isArray(Zt)?[]:{}}var ht=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Et(){for(var Zt=arguments.length,At=new Array(Zt),xn=0;xn<Zt;xn++)At[xn]=arguments[xn];var jn=Qn(At[0]);return At.forEach(function(hr){function Qr(ni,mi){var ki=new Set(mi),Si=get(hr,ni),Qi=Array.isArray(Si);if(Qi||mr(Si)){if(!ki.has(Si)){ki.add(Si);var aa=get(jn,ni);Qi?jn=Sr(jn,ni,[]):(!aa||_typeof(aa)!=="object")&&(jn=Sr(jn,ni,Qn(Si))),ht(Si).forEach(function(ba){Qr([].concat(_toConsumableArray(ni),[ba]),ki)})}}else jn=Sr(jn,ni,Si)}Qr([])}),jn}var zt={},fn=[],at=function(At){fn.push(At)};function Rt(Zt,At){if(0)var xn}function on(Zt,At){if(0)var xn}function tn(){zt={}}function Mn(Zt,At,xn){!At&&!zt[xn]&&(Zt(!1,xn),zt[xn]=!0)}function wn(Zt,At){Mn(Rt,Zt,At)}function rr(Zt,At){Mn(on,Zt,At)}wn.preMessage=at,wn.resetWarned=tn,wn.noteOnce=rr;var zr=wn,vr=function(At){var xn=At.prefixCls,jn=At.className,hr=At.style,Qr=At.children,ni=At.containerRef,mi=At.id,ki=At.onMouseEnter,Si=At.onMouseOver,Qi=At.onMouseLeave,aa=At.onClick,ba=At.onKeyDown,sn=At.onKeyUp,bn={onMouseEnter:ki,onMouseOver:Si,onMouseLeave:Qi,onClick:aa,onKeyDown:ba,onKeyUp:sn},Fn=ye.useContext(It),he=Fn.panel,Pe=Kn(he,ni);return ye.createElement(ye.Fragment,null,ye.createElement("div",(0,Tt.Z)({id:mi,className:Te()("".concat(xn,"-content"),jn),style:(0,Re.Z)({},hr),"aria-modal":"true",role:"dialog",ref:Pe},bn),Qr))},yr=vr;function Lr(Zt){return typeof Zt=="string"&&String(Number(Zt))===Zt?(zr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Zt)):Zt}function Dr(Zt){warning(!("wrapperClassName"in Zt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Zt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var hi={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Vn(Zt,At){var xn,jn,hr,Qr,ni=Zt.prefixCls,mi=Zt.open,ki=Zt.placement,Si=Zt.inline,Qi=Zt.push,aa=Zt.forceRender,ba=Zt.autoFocus,sn=Zt.keyboard,bn=Zt.rootClassName,Fn=Zt.rootStyle,he=Zt.zIndex,Pe=Zt.className,Fe=Zt.id,We=Zt.style,je=Zt.motion,et=Zt.width,tt=Zt.height,kt=Zt.children,Wt=Zt.contentWrapperStyle,Sn=Zt.mask,Nn=Zt.maskClosable,En=Zt.maskMotion,cn=Zt.maskClassName,un=Zt.maskStyle,Gt=Zt.afterOpenChange,kn=Zt.onClose,ir=Zt.onMouseEnter,$n=Zt.onMouseOver,Hn=Zt.onMouseLeave,Gn=Zt.onClick,ar=Zt.onKeyDown,ur=Zt.onKeyUp,Ve=ye.useRef(),Je=ye.useRef(),Pt=ye.useRef();ye.useImperativeHandle(At,function(){return Ve.current});var _t=function(Jr){var si=Jr.keyCode,_i=Jr.shiftKey;switch(si){case cr.TAB:{if(si===cr.TAB){if(!_i&&document.activeElement===Pt.current){var Hr;(Hr=Je.current)===null||Hr===void 0||Hr.focus({preventScroll:!0})}else if(_i&&document.activeElement===Je.current){var Bi;(Bi=Pt.current)===null||Bi===void 0||Bi.focus({preventScroll:!0})}}break}case cr.ESC:{kn&&sn&&(Jr.stopPropagation(),kn(Jr));break}}};ye.useEffect(function(){if(mi&&ba){var Br;(Br=Ve.current)===null||Br===void 0||Br.focus({preventScroll:!0})}},[mi]);var hn=ye.useState(!1),Dn=(0,Ge.Z)(hn,2),An=Dn[0],or=Dn[1],Un=ye.useContext(Ht),Tn;Qi===!1?Tn={distance:0}:Qi===!0?Tn={}:Tn=Qi||{};var tr=(xn=(jn=(hr=Tn)===null||hr===void 0?void 0:hr.distance)!==null&&jn!==void 0?jn:Un==null?void 0:Un.pushDistance)!==null&&xn!==void 0?xn:180,dr=ye.useMemo(function(){return{pushDistance:tr,push:function(){or(!0)},pull:function(){or(!1)}}},[tr]);ye.useEffect(function(){if(mi){var Br;Un==null||(Br=Un.push)===null||Br===void 0||Br.call(Un)}else{var Jr;Un==null||(Jr=Un.pull)===null||Jr===void 0||Jr.call(Un)}},[mi]),ye.useEffect(function(){return function(){var Br;Un==null||(Br=Un.pull)===null||Br===void 0||Br.call(Un)}},[]);var Pr=Sn&&ye.createElement(Yn.Z,(0,Tt.Z)({key:"mask"},En,{visible:mi}),function(Br,Jr){var si=Br.className,_i=Br.style;return ye.createElement("div",{className:Te()("".concat(ni,"-mask"),si,cn),style:(0,Re.Z)((0,Re.Z)({},_i),un),onClick:Nn&&mi?kn:void 0,ref:Jr})}),fr=typeof je=="function"?je(ki):je,Fr={};if(An&&tr)switch(ki){case"top":Fr.transform="translateY(".concat(tr,"px)");break;case"bottom":Fr.transform="translateY(".concat(-tr,"px)");break;case"left":Fr.transform="translateX(".concat(tr,"px)");break;default:Fr.transform="translateX(".concat(-tr,"px)");break}ki==="left"||ki==="right"?Fr.width=Lr(et):Fr.height=Lr(tt);var ri={onMouseEnter:ir,onMouseOver:$n,onMouseLeave:Hn,onClick:Gn,onKeyDown:ar,onKeyUp:ur},Vr=ye.createElement(Yn.Z,(0,Tt.Z)({key:"panel"},fr,{visible:mi,forceRender:aa,onVisibleChanged:function(Jr){Gt==null||Gt(Jr)},removeOnLeave:!1,leavedClassName:"".concat(ni,"-content-wrapper-hidden")}),function(Br,Jr){var si=Br.className,_i=Br.style;return ye.createElement("div",(0,Tt.Z)({className:Te()("".concat(ni,"-content-wrapper"),si),style:(0,Re.Z)((0,Re.Z)((0,Re.Z)({},Fr),_i),Wt)},fi(Zt,{data:!0})),ye.createElement(yr,(0,Tt.Z)({id:Fe,containerRef:Jr,prefixCls:ni,className:Pe,style:We},ri),kt))}),ii=(0,Re.Z)({},Fn);return he&&(ii.zIndex=he),ye.createElement(Ht.Provider,{value:dr},ye.createElement("div",{className:Te()(ni,"".concat(ni,"-").concat(ki),bn,(Qr={},(0,Xt.Z)(Qr,"".concat(ni,"-open"),mi),(0,Xt.Z)(Qr,"".concat(ni,"-inline"),Si),Qr)),style:ii,tabIndex:-1,ref:Ve,onKeyDown:_t},Pr,ye.createElement("div",{tabIndex:0,ref:Je,style:hi,"aria-hidden":"true","data-sentinel":"start"}),Vr,ye.createElement("div",{tabIndex:0,ref:Pt,style:hi,"aria-hidden":"true","data-sentinel":"end"})))}var br=ye.forwardRef(Vn),Ui=br,na=function(At){var xn=At.open,jn=xn===void 0?!1:xn,hr=At.prefixCls,Qr=hr===void 0?"rc-drawer":hr,ni=At.placement,mi=ni===void 0?"right":ni,ki=At.autoFocus,Si=ki===void 0?!0:ki,Qi=At.keyboard,aa=Qi===void 0?!0:Qi,ba=At.width,sn=ba===void 0?378:ba,bn=At.mask,Fn=bn===void 0?!0:bn,he=At.maskClosable,Pe=he===void 0?!0:he,Fe=At.getContainer,We=At.forceRender,je=At.afterOpenChange,et=At.destroyOnClose,tt=At.onMouseEnter,kt=At.onMouseOver,Wt=At.onMouseLeave,Sn=At.onClick,Nn=At.onKeyDown,En=At.onKeyUp,cn=At.panelRef,un=ye.useState(!1),Gt=(0,Ge.Z)(un,2),kn=Gt[0],ir=Gt[1],$n=ye.useState(!1),Hn=(0,Ge.Z)($n,2),Gn=Hn[0],ar=Hn[1];dn(function(){ar(!0)},[]);var ur=Gn?jn:!1,Ve=ye.useRef(),Je=ye.useRef();dn(function(){ur&&(Je.current=document.activeElement)},[ur]);var Pt=function(or){var Un;if(ir(or),je==null||je(or),!or&&Je.current&&!((Un=Ve.current)!==null&&Un!==void 0&&Un.contains(Je.current))){var Tn;(Tn=Je.current)===null||Tn===void 0||Tn.focus({preventScroll:!0})}},_t=ye.useMemo(function(){return{panel:cn}},[cn]);if(!We&&!kn&&!ur&&et)return null;var hn={onMouseEnter:tt,onMouseOver:kt,onMouseLeave:Wt,onClick:Sn,onKeyDown:Nn,onKeyUp:En},Dn=(0,Re.Z)((0,Re.Z)({},At),{},{open:ur,prefixCls:Qr,placement:mi,autoFocus:Si,keyboard:aa,width:sn,mask:Fn,maskClosable:Pe,inline:Fe===!1,afterOpenChange:Pt,ref:Ve},hn);return ye.createElement(It.Provider,{value:_t},ye.createElement(ft,{open:ur||We||kn,autoDestroy:!1,getContainer:Fe,autoLock:Fn&&(ur||kn)},ye.createElement(Ui,Dn)))},Wr=na,vi=Wr,ra=ie(33603),Kr=ie(53124),Vi=ie(65223),lr=ie(69760),Ca=Zt=>{const{prefixCls:At,title:xn,footer:jn,extra:hr,closeIcon:Qr,closable:ni,onClose:mi,headerStyle:ki,drawerStyle:Si,bodyStyle:Qi,footerStyle:aa,children:ba}=Zt,sn=ye.useCallback(Fe=>ye.createElement("button",{type:"button",onClick:mi,"aria-label":"Close",className:`${At}-close`},Fe),[mi]),[bn,Fn]=(0,lr.Z)(ni,Qr,sn,void 0,!0),he=ye.useMemo(()=>!xn&&!bn?null:ye.createElement("div",{style:ki,className:Te()(`${At}-header`,{[`${At}-header-close-only`]:bn&&!xn&&!hr})},ye.createElement("div",{className:`${At}-header-title`},Fn,xn&&ye.createElement("div",{className:`${At}-title`},xn)),hr&&ye.createElement("div",{className:`${At}-extra`},hr)),[bn,Fn,hr,ki,At,xn]),Pe=ye.useMemo(()=>{if(!jn)return null;const Fe=`${At}-footer`;return ye.createElement("div",{className:Fe,style:aa},jn)},[jn,aa,At]);return ye.createElement("div",{className:`${At}-wrapper-body`,style:Si},he,ye.createElement("div",{className:`${At}-body`,style:Qi},ba),Pe)},ho=ie(4173),Ha=ie(67968),_a=ie(45503),Fa=Zt=>{const{componentCls:At,motionDurationSlow:xn}=Zt,jn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${xn}`}}};return{[At]:{[`${At}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${xn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${At}-panel-motion`]:{"&-left":[jn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[jn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[jn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[jn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const ya=Zt=>{const{componentCls:At,zIndexPopup:xn,colorBgMask:jn,colorBgElevated:hr,motionDurationSlow:Qr,motionDurationMid:ni,padding:mi,paddingLG:ki,fontSizeLG:Si,lineHeightLG:Qi,lineWidth:aa,lineType:ba,colorSplit:sn,marginSM:bn,colorIcon:Fn,colorIconHover:he,colorText:Pe,fontWeightStrong:Fe,footerPaddingBlock:We,footerPaddingInline:je}=Zt,et=`${At}-content-wrapper`;return{[At]:{position:"fixed",inset:0,zIndex:xn,pointerEvents:"none","&-pure":{position:"relative",background:hr,[`&${At}-left`]:{boxShadow:Zt.boxShadowDrawerLeft},[`&${At}-right`]:{boxShadow:Zt.boxShadowDrawerRight},[`&${At}-top`]:{boxShadow:Zt.boxShadowDrawerUp},[`&${At}-bottom`]:{boxShadow:Zt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${At}-mask`]:{position:"absolute",inset:0,zIndex:xn,background:jn,pointerEvents:"auto"},[et]:{position:"absolute",zIndex:xn,maxWidth:"100vw",transition:`all ${Qr}`,"&-hidden":{display:"none"}},[`&-left > ${et}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Zt.boxShadowDrawerLeft},[`&-right > ${et}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Zt.boxShadowDrawerRight},[`&-top > ${et}`]:{top:0,insetInline:0,boxShadow:Zt.boxShadowDrawerUp},[`&-bottom > ${et}`]:{bottom:0,insetInline:0,boxShadow:Zt.boxShadowDrawerDown},[`${At}-content`]:{width:"100%",height:"100%",overflow:"auto",background:hr,pointerEvents:"auto"},[`${At}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${At}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${mi}px ${ki}px`,fontSize:Si,lineHeight:Qi,borderBottom:`${aa}px ${ba} ${sn}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${At}-extra`]:{flex:"none"},[`${At}-close`]:{display:"inline-block",marginInlineEnd:bn,color:Fn,fontWeight:Fe,fontSize:Si,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${ni}`,textRendering:"auto","&:focus, &:hover":{color:he,textDecoration:"none"}},[`${At}-title`]:{flex:1,margin:0,color:Pe,fontWeight:Zt.fontWeightStrong,fontSize:Si,lineHeight:Qi},[`${At}-body`]:{flex:1,minWidth:0,minHeight:0,padding:ki,overflow:"auto"},[`${At}-footer`]:{flexShrink:0,padding:`${We}px ${je}px`,borderTop:`${aa}px ${ba} ${sn}`},"&-rtl":{direction:"rtl"}}}};var Wa=(0,Ha.Z)("Drawer",Zt=>{const At=(0,_a.TS)(Zt,{});return[ya(At),Fa(At)]},Zt=>({zIndexPopup:Zt.zIndexPopupBase,footerPaddingBlock:Zt.paddingXS,footerPaddingInline:Zt.padding})),po=ie(16569),ja=function(Zt,At){var xn={};for(var jn in Zt)Object.prototype.hasOwnProperty.call(Zt,jn)&&At.indexOf(jn)<0&&(xn[jn]=Zt[jn]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var hr=0,jn=Object.getOwnPropertySymbols(Zt);hr<jn.length;hr++)At.indexOf(jn[hr])<0&&Object.prototype.propertyIsEnumerable.call(Zt,jn[hr])&&(xn[jn[hr]]=Zt[jn[hr]]);return xn};const Pa=null,mo={distance:180},Eo=Zt=>{var At;const{rootClassName:xn,width:jn,height:hr,size:Qr="default",mask:ni=!0,push:mi=mo,open:ki,afterOpenChange:Si,onClose:Qi,prefixCls:aa,getContainer:ba,style:sn,className:bn,visible:Fn,afterVisibleChange:he}=Zt,Pe=ja(Zt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Fe,getPrefixCls:We,direction:je,drawer:et}=ye.useContext(Kr.E_),tt=We("drawer",aa),[kt,Wt]=Wa(tt),Sn=ba===void 0&&Fe?()=>Fe(document.body):ba,Nn=Te()({"no-mask":!ni,[`${tt}-rtl`]:je==="rtl"},xn,Wt),En=ye.useMemo(()=>jn!=null?jn:Qr==="large"?736:378,[jn,Qr]),cn=ye.useMemo(()=>hr!=null?hr:Qr==="large"?736:378,[hr,Qr]),un={motionName:(0,ra.m)(tt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Gt=ir=>({motionName:(0,ra.m)(tt,`panel-motion-${ir}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),kn=(0,po.H)();return kt(ye.createElement(ho.BR,null,ye.createElement(Vi.Ux,{status:!0,override:!0},ye.createElement(vi,Object.assign({prefixCls:tt,onClose:Qi,maskMotion:un,motion:Gt},Pe,{open:ki!=null?ki:Fn,mask:ni,push:mi,width:En,height:cn,style:Object.assign(Object.assign({},et==null?void 0:et.style),sn),className:Te()(et==null?void 0:et.className,bn),rootClassName:Nn,getContainer:Sn,afterOpenChange:Si!=null?Si:he,panelRef:kn}),ye.createElement(Ca,Object.assign({prefixCls:tt},Pe,{onClose:Qi}))))))},no=Zt=>{const{prefixCls:At,style:xn,className:jn,placement:hr="right"}=Zt,Qr=ja(Zt,["prefixCls","style","className","placement"]),{getPrefixCls:ni}=ye.useContext(Kr.E_),mi=ni("drawer",At),[ki,Si]=Wa(mi),Qi=Te()(mi,`${mi}-pure`,`${mi}-${hr}`,Si,jn);return ki(ye.createElement("div",{className:Qi,style:xn},ye.createElement(Ca,Object.assign({prefixCls:mi},Qr))))};Eo._InternalPanelDoNotUseOrYouWillBeFired=no;var ia=Eo},35874:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return pe}});var fe=ie(67294),Te=ie(91034),Re=ie(94184),Ge=ie.n(Re),ye=ie(87462),_e=ie(4942),ce=ie(97685),ke=ie(45987),ge=ie(62709),Ae=ie(71002),lt=ie(12060);function ze(se,Be,ft){var Bt=React.useRef({});return(!("value"in Bt.current)||ft(Bt.current.condition,Be))&&(Bt.current.value=se(),Bt.current.condition=Be),Bt.current.value}function st(se,Be){typeof se=="function"?se(Be):(0,Ae.Z)(se)==="object"&&se&&"current"in se&&(se.current=Be)}function dt(){for(var se=arguments.length,Be=new Array(se),ft=0;ft<se;ft++)Be[ft]=arguments[ft];var Bt=Be.filter(function(qt){return qt});return Bt.length<=1?Bt[0]:function(qt){Be.forEach(function(an){st(an,qt)})}}function ct(){for(var se=arguments.length,Be=new Array(se),ft=0;ft<se;ft++)Be[ft]=arguments[ft];return useMemo(function(){return dt.apply(void 0,Be)},Be,function(Bt,qt){return Bt.length===qt.length&&Bt.every(function(an,vn){return an===qt[vn]})})}function qe(se){var Be,ft,Bt=(0,lt.isMemo)(se)?se.type.type:se.type;return!(typeof Bt=="function"&&!((Be=Bt.prototype)!==null&&Be!==void 0&&Be.render)||typeof se=="function"&&!((ft=se.prototype)!==null&&ft!==void 0&&ft.render))}var be={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(Be){var ft=Be.keyCode;if(Be.altKey&&!Be.ctrlKey||Be.metaKey||ft>=be.F1&&ft<=be.F12)return!1;switch(ft){case be.ALT:case be.CAPS_LOCK:case be.CONTEXT_MENU:case be.CTRL:case be.DOWN:case be.END:case be.ESC:case be.HOME:case be.INSERT:case be.LEFT:case be.MAC_FF_META:case be.META:case be.NUMLOCK:case be.NUM_CENTER:case be.PAGE_DOWN:case be.PAGE_UP:case be.PAUSE:case be.PRINT_SCREEN:case be.RIGHT:case be.SHIFT:case be.UP:case be.WIN_KEY:case be.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Be){if(Be>=be.ZERO&&Be<=be.NINE||Be>=be.NUM_ZERO&&Be<=be.NUM_MULTIPLY||Be>=be.A&&Be<=be.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Be===0)return!0;switch(Be){case be.SPACE:case be.QUESTION_MARK:case be.NUM_PLUS:case be.NUM_MINUS:case be.NUM_PERIOD:case be.NUM_DIVISION:case be.SEMICOLON:case be.DASH:case be.EQUALS:case be.COMMA:case be.PERIOD:case be.SLASH:case be.APOSTROPHE:case be.SINGLE_QUOTE:case be.OPEN_SQUARE_BRACKET:case be.BACKSLASH:case be.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},vt=be,Dt=function(Be){return+setTimeout(Be,16)},it=function(Be){return clearTimeout(Be)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Dt=function(Be){return window.requestAnimationFrame(Be)},it=function(Be){return window.cancelAnimationFrame(Be)});var ot=0,Ce=new Map;function Se(se){Ce.delete(se)}var He=function(Be){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ot+=1;var Bt=ot;function qt(an){if(an===0)Se(Bt),Be();else{var vn=Dt(function(){qt(an-1)});Ce.set(Bt,vn)}}return qt(ft),Bt};He.cancel=function(se){var Be=Ce.get(se);return Se(Be),it(Be)};var Ue=He,xt=vt.ESC,mt=vt.TAB;function ut(se){var Be=se.visible,ft=se.triggerRef,Bt=se.onVisibleChange,qt=se.autoFocus,an=se.overlayRef,vn=fe.useRef(!1),dn=function(){if(Be){var Xt,Tt;(Xt=ft.current)===null||Xt===void 0||(Tt=Xt.focus)===null||Tt===void 0||Tt.call(Xt),Bt==null||Bt(!1)}},gt=function(){var Xt;return(Xt=an.current)!==null&&Xt!==void 0&&Xt.focus?(an.current.focus(),vn.current=!0,!0):!1},It=function(Xt){switch(Xt.keyCode){case xt:dn();break;case mt:{var Tt=!1;vn.current||(Tt=gt()),Tt?Xt.preventDefault():dn();break}}};fe.useEffect(function(){return Be?(window.addEventListener("keydown",It),qt&&Ue(gt,3),function(){window.removeEventListener("keydown",It),vn.current=!1}):function(){vn.current=!1}},[Be])}var $e=(0,fe.forwardRef)(function(se,Be){var ft=se.overlay,Bt=se.arrow,qt=se.prefixCls,an=(0,fe.useMemo)(function(){var dn;return typeof ft=="function"?dn=ft():dn=ft,dn},[ft]),vn=dt(Be,an==null?void 0:an.ref);return fe.createElement(fe.Fragment,null,Bt&&fe.createElement("div",{className:"".concat(qt,"-arrow")}),fe.cloneElement(an,{ref:qe(an)?vn:void 0}))}),Ft=$e,yt={adjustX:1,adjustY:1},gn=[0,0],rt={topLeft:{points:["bl","tl"],overflow:yt,offset:[0,-4],targetOffset:gn},top:{points:["bc","tc"],overflow:yt,offset:[0,-4],targetOffset:gn},topRight:{points:["br","tr"],overflow:yt,offset:[0,-4],targetOffset:gn},bottomLeft:{points:["tl","bl"],overflow:yt,offset:[0,4],targetOffset:gn},bottom:{points:["tc","bc"],overflow:yt,offset:[0,4],targetOffset:gn},bottomRight:{points:["tr","br"],overflow:yt,offset:[0,4],targetOffset:gn}},Mt=rt,en=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Yt(se,Be){var ft,Bt=se.arrow,qt=Bt===void 0?!1:Bt,an=se.prefixCls,vn=an===void 0?"rc-dropdown":an,dn=se.transitionName,gt=se.animation,It=se.align,Ht=se.placement,Xt=Ht===void 0?"bottomLeft":Ht,Tt=se.placements,Yn=Tt===void 0?Mt:Tt,Rn=se.getPopupContainer,cr=se.showAction,Xr=se.hideAction,wr=se.overlayClassName,kr=se.overlayStyle,Ar=se.visible,gi=se.trigger,oi=gi===void 0?["hover"]:gi,fi=se.autoFocus,Pi=se.overlay,Or=se.children,Jn=se.onVisibleChange,qn=(0,ke.Z)(se,en),nr=fe.useState(),Ur=(0,ce.Z)(nr,2),li=Ur[0],Lt=Ur[1],Kn="visible"in se?Ar:li,Bn=fe.useRef(null),yn=fe.useRef(null),xr=fe.useRef(null);fe.useImperativeHandle(Be,function(){return Bn.current});var Sr=function(on){Lt(on),Jn==null||Jn(on)};ut({visible:Kn,triggerRef:xr,onVisibleChange:Sr,autoFocus:fi,overlayRef:yn});var mr=function(on){var tn=se.onOverlayClick;Lt(!1),tn&&tn(on)},Qn=function(){return fe.createElement(Ft,{ref:yn,overlay:Pi,prefixCls:vn,arrow:qt})},ht=function(){return typeof Pi=="function"?Qn:Qn()},Et=function(){var on=se.minOverlayWidthMatchTrigger,tn=se.alignPoint;return"minOverlayWidthMatchTrigger"in se?on:!tn},zt=function(){var on=se.openClassName;return on!==void 0?on:"".concat(vn,"-open")},fn=fe.cloneElement(Or,{className:Ge()((ft=Or.props)===null||ft===void 0?void 0:ft.className,Kn&&zt()),ref:qe(Or)?dt(xr,Or.ref):void 0}),at=Xr;return!at&&oi.indexOf("contextMenu")!==-1&&(at=["click"]),fe.createElement(ge.Z,(0,ye.Z)({builtinPlacements:Yn},qn,{prefixCls:vn,ref:Bn,popupClassName:Ge()(wr,(0,_e.Z)({},"".concat(vn,"-show-arrow"),qt)),popupStyle:kr,action:oi,showAction:cr,hideAction:at,popupPlacement:Xt,popupAlign:It,popupTransitionName:dn,popupAnimation:gt,popupVisible:Kn,stretch:Et()?"minWidth":"",popup:ht(),onPopupVisibleChange:Sr,onPopupClick:mr,getPopupContainer:Rn}),fn)}var Qe=fe.forwardRef(Yt),Ie=Qe,Ot=ie(60276),In=ie(5663),mn=ie(10366),pt=ie(80636),wt=ie(8745),Qt=ie(96159),Zn=ie(53124),Cn=ie(68508),rn=ie(76529),ln=ie(29691),zn=ie(66748);const _n=null,Oe=se=>{const{menu:Be,arrow:ft,prefixCls:Bt,children:qt,trigger:an,disabled:vn,dropdownRender:dn,getPopupContainer:gt,overlayClassName:It,rootClassName:Ht,open:Xt,onOpenChange:Tt,visible:Yn,onVisibleChange:Rn,mouseEnterDelay:cr=.15,mouseLeaveDelay:Xr=.1,autoAdjustOverflow:wr=!0,placement:kr="",overlay:Ar,transitionName:gi}=se,{getPopupContainer:oi,getPrefixCls:fi,direction:Pi}=fe.useContext(Zn.E_),Or=fe.useMemo(()=>{const fn=fi();return gi!==void 0?gi:kr.includes("top")?`${fn}-slide-down`:`${fn}-slide-up`},[fi,kr,gi]),Jn=fe.useMemo(()=>kr?kr.includes("Center")?kr.slice(0,kr.indexOf("Center")):kr:Pi==="rtl"?"bottomRight":"bottomLeft",[kr,Pi]),qn=fi("dropdown",Bt),[nr,Ur]=(0,zn.Z)(qn),[,li]=(0,ln.Z)(),Lt=fe.Children.only(qt),Kn=(0,Qt.Tm)(Lt,{className:Ge()(`${qn}-trigger`,{[`${qn}-rtl`]:Pi==="rtl"},Lt.props.className),disabled:vn}),Bn=vn?[]:an;let yn;Bn&&Bn.includes("contextMenu")&&(yn=!0);const[xr,Sr]=(0,In.Z)(!1,{value:Xt!=null?Xt:Yn}),mr=(0,Ot.useEvent)(fn=>{Tt==null||Tt(fn),Rn==null||Rn(fn),Sr(fn)}),Qn=Ge()(It,Ht,Ur,{[`${qn}-rtl`]:Pi==="rtl"}),ht=(0,pt.Z)({arrowPointAtCenter:typeof ft=="object"&&ft.pointAtCenter,autoAdjustOverflow:wr,offset:li.marginXXS,arrowWidth:ft?li.sizePopupArrow:0,borderRadius:li.borderRadius}),Et=fe.useCallback(()=>{Sr(!1)},[]),zt=()=>{let fn;return Be!=null&&Be.items?fn=fe.createElement(Cn.default,Object.assign({},Be)):typeof Ar=="function"?fn=Ar():fn=Ar,dn&&(fn=dn(fn)),fn=fe.Children.only(typeof fn=="string"?fe.createElement("span",null,fn):fn),fe.createElement(rn.J,{prefixCls:`${qn}-menu`,expandIcon:fe.createElement("span",{className:`${qn}-menu-submenu-arrow`},fe.createElement(Te.Z,{className:`${qn}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Et,validator:at=>{let{mode:Rt}=at}},fn)};return nr(fe.createElement(Ie,Object.assign({alignPoint:yn},(0,mn.Z)(se,["rootClassName"]),{mouseEnterDelay:cr,mouseLeaveDelay:Xr,visible:xr,builtinPlacements:ht,arrow:!!ft,overlayClassName:Qn,prefixCls:qn,getPopupContainer:gt||oi,transitionName:Or,trigger:Bn,overlay:zt,placement:Jn,onVisibleChange:mr}),Kn))};function ue(se){return Object.assign(Object.assign({},se),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,wt.Z)(Oe,"dropdown",se=>se,ue),ve=se=>fe.createElement(le,Object.assign({},se),fe.createElement("span",null));Oe._InternalPanelDoNotUseOrYouWillBeFired=ve;var pe=Oe},85418:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ct}});var fe=ie(35874),Te=ie(94184),Re=ie.n(Te),Ge=ie(67294),ye=ie(25877),_e=ie(71577),ce=ie(53124),ke=ie(93421),ge=ie(4173),Ae=ie(66748),lt=function(qe,be){var vt={};for(var Dt in qe)Object.prototype.hasOwnProperty.call(qe,Dt)&&be.indexOf(Dt)<0&&(vt[Dt]=qe[Dt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Dt=Object.getOwnPropertySymbols(qe);it<Dt.length;it++)be.indexOf(Dt[it])<0&&Object.prototype.propertyIsEnumerable.call(qe,Dt[it])&&(vt[Dt[it]]=qe[Dt[it]]);return vt};const ze=qe=>{const{getPopupContainer:be,getPrefixCls:vt,direction:Dt}=Ge.useContext(ce.E_),{prefixCls:it,type:ot="default",danger:Ce,disabled:Se,loading:He,onClick:Ue,htmlType:xt,children:mt,className:ut,menu:$e,arrow:Ft,autoFocus:yt,overlay:gn,trigger:rt,align:Mt,open:en,onOpenChange:Yt,placement:Qe,getPopupContainer:Ie,href:Ot,icon:In=Ge.createElement(ye.Z,null),title:mn,buttonsRender:pt=vn=>vn,mouseEnterDelay:wt,mouseLeaveDelay:Qt,overlayClassName:Zn,overlayStyle:Cn,destroyPopupOnHide:rn,dropdownRender:ln}=qe,zn=lt(qe,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),_n=vt("dropdown",it),Oe=`${_n}-button`,[ue,le]=(0,Ae.Z)(_n),ve={menu:$e,arrow:Ft,autoFocus:yt,align:Mt,disabled:Se,trigger:Se?[]:rt,onOpenChange:Yt,getPopupContainer:Ie||be,mouseEnterDelay:wt,mouseLeaveDelay:Qt,overlayClassName:Zn,overlayStyle:Cn,destroyPopupOnHide:rn,dropdownRender:ln},{compactSize:pe,compactItemClassnames:se}=(0,ge.ri)(_n,Dt),Be=Re()(Oe,se,ut,le);"overlay"in qe&&(ve.overlay=gn),"open"in qe&&(ve.open=en),"placement"in qe?ve.placement=Qe:ve.placement=Dt==="rtl"?"bottomLeft":"bottomRight";const ft=Ge.createElement(_e.ZP,{type:ot,danger:Ce,disabled:Se,loading:He,onClick:Ue,htmlType:xt,href:Ot,title:mn},mt),Bt=Ge.createElement(_e.ZP,{type:ot,danger:Ce,icon:In}),[qt,an]=pt([ft,Bt]);return ue(Ge.createElement(ke.Z.Compact,Object.assign({className:Be,size:pe,block:!0},zn),qt,Ge.createElement(fe.Z,Object.assign({},ve),an)))};ze.__ANT_BUTTON=!0;var st=ze;const dt=fe.Z;dt.Button=st;var ct=dt},66748:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return lt}});var fe=ie(14747),Te=ie(67771),Re=ie(33297),Ge=ie(50438),ye=ie(97414),_e=ie(67968),ce=ie(45503),ge=ze=>{const{componentCls:st,menuCls:dt,colorError:ct,colorTextLightSolid:qe}=ze,be=`${dt}-item`;return{[`${st}, ${st}-menu-submenu`]:{[`${dt} ${be}`]:{[`&${be}-danger:not(${be}-disabled)`]:{color:ct,"&:hover":{color:qe,backgroundColor:ct}}}}}};const Ae=ze=>{const{componentCls:st,menuCls:dt,zIndexPopup:ct,dropdownArrowDistance:qe,sizePopupArrow:be,antCls:vt,iconCls:Dt,motionDurationMid:it,dropdownPaddingVertical:ot,fontSize:Ce,dropdownEdgeChildPadding:Se,colorTextDisabled:He,fontSizeIcon:Ue,controlPaddingHorizontal:xt,colorBgElevated:mt}=ze;return[{[st]:Object.assign(Object.assign({},(0,fe.Wf)(ze)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ct,display:"block","&::before":{position:"absolute",insetBlock:-qe+be/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${vt}-btn`]:{[`& > ${Dt}-down, & > ${vt}-btn-icon > ${Dt}-down`]:{fontSize:Ue}},[`${st}-wrap`]:{position:"relative",[`${vt}-btn > ${Dt}-down`]:{fontSize:Ue},[`${Dt}-down::before`]:{transition:`transform ${it}`}},[`${st}-wrap-open`]:{[`${Dt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${vt}-slide-down-enter${vt}-slide-down-enter-active${st}-placement-bottomLeft,
|
|
|
&${vt}-slide-down-appear${vt}-slide-down-appear-active${st}-placement-bottomLeft,
|
|
|
&${vt}-slide-down-enter${vt}-slide-down-enter-active${st}-placement-bottom,
|
|
|
&${vt}-slide-down-appear${vt}-slide-down-appear-active${st}-placement-bottom,
|
|
|
&${vt}-slide-down-enter${vt}-slide-down-enter-active${st}-placement-bottomRight,
|
|
|
&${vt}-slide-down-appear${vt}-slide-down-appear-active${st}-placement-bottomRight`]:{animationName:Te.fJ},[`&${vt}-slide-up-enter${vt}-slide-up-enter-active${st}-placement-topLeft,
|
|
|
&${vt}-slide-up-appear${vt}-slide-up-appear-active${st}-placement-topLeft,
|
|
|
&${vt}-slide-up-enter${vt}-slide-up-enter-active${st}-placement-top,
|
|
|
&${vt}-slide-up-appear${vt}-slide-up-appear-active${st}-placement-top,
|
|
|
&${vt}-slide-up-enter${vt}-slide-up-enter-active${st}-placement-topRight,
|
|
|
&${vt}-slide-up-appear${vt}-slide-up-appear-active${st}-placement-topRight`]:{animationName:Te.Qt},[`&${vt}-slide-down-leave${vt}-slide-down-leave-active${st}-placement-bottomLeft,
|
|
|
&${vt}-slide-down-leave${vt}-slide-down-leave-active${st}-placement-bottom,
|
|
|
&${vt}-slide-down-leave${vt}-slide-down-leave-active${st}-placement-bottomRight`]:{animationName:Te.Uw},[`&${vt}-slide-up-leave${vt}-slide-up-leave-active${st}-placement-topLeft,
|
|
|
&${vt}-slide-up-leave${vt}-slide-up-leave-active${st}-placement-top,
|
|
|
&${vt}-slide-up-leave${vt}-slide-up-leave-active${st}-placement-topRight`]:{animationName:Te.ly}})},(0,ye.ZP)(ze,{colorBg:mt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${st} ${dt}`]:{position:"relative",margin:0},[`${dt}-submenu-popup`]:{position:"absolute",zIndex:ct,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${st}, ${st}-menu-submenu`]:{[dt]:Object.assign(Object.assign({padding:Se,listStyleType:"none",backgroundColor:mt,backgroundClip:"padding-box",borderRadius:ze.borderRadiusLG,outline:"none",boxShadow:ze.boxShadowSecondary},(0,fe.Qy)(ze)),{[`${dt}-item-group-title`]:{padding:`${ot}px ${xt}px`,color:ze.colorTextDescription,transition:`all ${it}`},[`${dt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${dt}-item-icon`]:{minWidth:Ce,marginInlineEnd:ze.marginXS,fontSize:ze.fontSizeSM},[`${dt}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${it}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${dt}-item, ${dt}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ot}px ${xt}px`,color:ze.colorText,fontWeight:"normal",fontSize:Ce,lineHeight:ze.lineHeight,cursor:"pointer",transition:`all ${it}`,borderRadius:ze.borderRadiusSM,"&:hover, &-active":{backgroundColor:ze.controlItemBgHover}},(0,fe.Qy)(ze)),{"&-selected":{color:ze.colorPrimary,backgroundColor:ze.controlItemBgActive,"&:hover, &-active":{backgroundColor:ze.controlItemBgActiveHover}},"&-disabled":{color:He,cursor:"not-allowed","&:hover":{color:He,backgroundColor:mt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ze.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ze.colorSplit},[`${st}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ze.paddingXS,[`${st}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ze.colorTextDescription,fontSize:Ue,fontStyle:"normal"}}}),[`${dt}-item-group-list`]:{margin:`0 ${ze.marginXS}px`,padding:0,listStyle:"none"},[`${dt}-submenu-title`]:{paddingInlineEnd:xt+ze.fontSizeSM},[`${dt}-submenu-vertical`]:{position:"relative"},[`${dt}-submenu${dt}-submenu-disabled ${st}-menu-submenu-title`]:{[`&, ${st}-menu-submenu-arrow-icon`]:{color:He,backgroundColor:mt,cursor:"not-allowed"}},[`${dt}-submenu-selected ${st}-menu-submenu-title`]:{color:ze.colorPrimary}})}},[(0,Te.oN)(ze,"slide-up"),(0,Te.oN)(ze,"slide-down"),(0,Re.Fm)(ze,"move-up"),(0,Re.Fm)(ze,"move-down"),(0,Ge._y)(ze,"zoom-big")]]};var lt=(0,_e.Z)("Dropdown",(ze,st)=>{let{rootPrefixCls:dt}=st;const{marginXXS:ct,sizePopupArrow:qe,controlHeight:be,fontSize:vt,lineHeight:Dt,paddingXXS:it,componentCls:ot,borderRadiusLG:Ce}=ze,Se=(be-vt*Dt)/2,{dropdownArrowOffset:He}=(0,ye.fS)({contentRadius:Ce}),Ue=(0,ce.TS)(ze,{menuCls:`${ot}-menu`,rootPrefixCls:dt,dropdownArrowDistance:qe/2+ct,dropdownArrowOffset:He,dropdownPaddingVertical:Se,dropdownEdgeChildPadding:it});return[Ae(Ue),ge(Ue)]},ze=>({zIndexPopup:ze.zIndexPopupBase+50}))},32983:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return it}});var fe=ie(94184),Te=ie.n(fe),Re=ie(67294),Ge=ie(53124),ye=ie(10110),_e=ie(84780),ce=ie(29691),ge=()=>{const[,ot]=(0,ce.Z)(),Se=new _e.C(ot.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Re.createElement("svg",{style:Se,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Re.createElement("g",{fill:"none",fillRule:"evenodd"},Re.createElement("g",{transform:"translate(24 31.67)"},Re.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Re.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"}),Re.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)"}),Re.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"}),Re.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"})),Re.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"}),Re.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Re.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Re.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},lt=()=>{const[,ot]=(0,ce.Z)(),{colorFill:Ce,colorFillTertiary:Se,colorFillQuaternary:He,colorBgContainer:Ue}=ot,{borderColor:xt,shadowColor:mt,contentColor:ut}=(0,Re.useMemo)(()=>({borderColor:new _e.C(Ce).onBackground(Ue).toHexShortString(),shadowColor:new _e.C(Se).onBackground(Ue).toHexShortString(),contentColor:new _e.C(He).onBackground(Ue).toHexShortString()}),[Ce,Se,He,Ue]);return Re.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Re.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Re.createElement("ellipse",{fill:mt,cx:"32",cy:"33",rx:"32",ry:"7"}),Re.createElement("g",{fillRule:"nonzero",stroke:xt},Re.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"}),Re.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:ut}))))},ze=ie(67968),st=ie(45503);const dt=ot=>{const{componentCls:Ce,margin:Se,marginXS:He,marginXL:Ue,fontSize:xt,lineHeight:mt}=ot;return{[Ce]:{marginInline:He,fontSize:xt,lineHeight:mt,textAlign:"center",[`${Ce}-image`]:{height:ot.emptyImgHeight,marginBottom:He,opacity:ot.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ce}-description`]:{color:ot.colorText},[`${Ce}-footer`]:{marginTop:Se},"&-normal":{marginBlock:Ue,color:ot.colorTextDisabled,[`${Ce}-description`]:{color:ot.colorTextDisabled},[`${Ce}-image`]:{height:ot.emptyImgHeightMD}},"&-small":{marginBlock:He,color:ot.colorTextDisabled,[`${Ce}-image`]:{height:ot.emptyImgHeightSM}}}}};var ct=(0,ze.Z)("Empty",ot=>{const{componentCls:Ce,controlHeightLG:Se}=ot,He=(0,st.TS)(ot,{emptyImgCls:`${Ce}-img`,emptyImgHeight:Se*2.5,emptyImgHeightMD:Se,emptyImgHeightSM:Se*.875});return[dt(He)]}),qe=function(ot,Ce){var Se={};for(var He in ot)Object.prototype.hasOwnProperty.call(ot,He)&&Ce.indexOf(He)<0&&(Se[He]=ot[He]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,He=Object.getOwnPropertySymbols(ot);Ue<He.length;Ue++)Ce.indexOf(He[Ue])<0&&Object.prototype.propertyIsEnumerable.call(ot,He[Ue])&&(Se[He[Ue]]=ot[He[Ue]]);return Se};const be=Re.createElement(ge,null),vt=Re.createElement(lt,null),Dt=ot=>{var{className:Ce,rootClassName:Se,prefixCls:He,image:Ue=be,description:xt,children:mt,imageStyle:ut,style:$e}=ot,Ft=qe(ot,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:yt,direction:gn,empty:rt}=Re.useContext(Ge.E_),Mt=yt("empty",He),[en,Yt]=ct(Mt),[Qe]=(0,ye.Z)("Empty"),Ie=typeof xt!="undefined"?xt:Qe==null?void 0:Qe.description,Ot=typeof Ie=="string"?Ie:"empty";let In=null;return typeof Ue=="string"?In=Re.createElement("img",{alt:Ot,src:Ue}):In=Ue,en(Re.createElement("div",Object.assign({className:Te()(Yt,Mt,rt==null?void 0:rt.className,{[`${Mt}-normal`]:Ue===vt,[`${Mt}-rtl`]:gn==="rtl"},Ce,Se),style:Object.assign(Object.assign({},rt==null?void 0:rt.style),$e)},Ft),Re.createElement("div",{className:`${Mt}-image`,style:ut},In),Ie&&Re.createElement("div",{className:`${Mt}-description`},Ie),mt&&Re.createElement("div",{className:`${Mt}-footer`},mt)))};Dt.PRESENTED_IMAGE_DEFAULT=be,Dt.PRESENTED_IMAGE_SIMPLE=vt;var it=Dt},22150:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return fn}});var fe=ie(74902),Te=ie(94184),Re=ie.n(Te),Ge=ie(38379),ye=ie(67294),_e=ie(33603),ce=ie(65223);function ke(at){const[Rt,on]=ye.useState(at);return ye.useEffect(()=>{const tn=setTimeout(()=>{on(at)},at.length?0:10);return()=>{clearTimeout(tn)}},[at]),Rt}var ge=ie(14747),Ae=ie(50438),lt=ie(33507),ze=ie(45503),st=ie(67968),ct=at=>{const{componentCls:Rt}=at,on=`${Rt}-show-help`,tn=`${Rt}-show-help-item`;return{[on]:{transition:`opacity ${at.motionDurationSlow} ${at.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[tn]:{overflow:"hidden",transition:`height ${at.motionDurationSlow} ${at.motionEaseInOut},
|
|
|
opacity ${at.motionDurationSlow} ${at.motionEaseInOut},
|
|
|
transform ${at.motionDurationSlow} ${at.motionEaseInOut} !important`,[`&${tn}-appear, &${tn}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${tn}-leave-active`]:{transform:"translateY(-5px)"}}}}};const qe=at=>({legend:{display:"block",width:"100%",marginBottom:at.marginLG,padding:0,color:at.colorTextDescription,fontSize:at.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${at.lineWidth}px ${at.lineType} ${at.colorBorder}`},label:{fontSize:at.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 ${at.controlOutlineWidth}px ${at.controlOutline}`},output:{display:"block",paddingTop:15,color:at.colorText,fontSize:at.fontSize,lineHeight:at.lineHeight}}),be=(at,Rt)=>{const{formItemCls:on}=at;return{[on]:{[`${on}-label > label`]:{height:Rt},[`${on}-control-input`]:{minHeight:Rt}}}},vt=at=>{const{componentCls:Rt}=at;return{[at.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ge.Wf)(at)),qe(at)),{[`${Rt}-text`]:{display:"inline-block",paddingInlineEnd:at.paddingSM},"&-small":Object.assign({},be(at,at.controlHeightSM)),"&-large":Object.assign({},be(at,at.controlHeightLG))})}},Dt=at=>{const{formItemCls:Rt,iconCls:on,componentCls:tn,rootPrefixCls:Mn,labelRequiredMarkColor:wn,labelColor:rr,labelFontSize:zr,labelHeight:vr,labelColonMarginInlineStart:yr,labelColonMarginInlineEnd:Lr,itemMarginBottom:Dr}=at;return{[Rt]:Object.assign(Object.assign({},(0,ge.Wf)(at)),{marginBottom:Dr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Mn}-row`]:{display:"none"},"&-has-warning":{[`${Rt}-split`]:{color:at.colorError}},"&-has-error":{[`${Rt}-split`]:{color:at.colorWarning}},[`${Rt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${at.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:vr,color:rr,fontSize:zr,[`> ${on}`]:{fontSize:at.fontSize,verticalAlign:"top"},[`&${Rt}-required:not(${Rt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:at.marginXXS,color:wn,fontSize:at.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${tn}-hide-required-mark &`]:{display:"none"}},[`${Rt}-optional`]:{display:"inline-block",marginInlineStart:at.marginXXS,color:at.colorTextDescription,[`${tn}-hide-required-mark &`]:{display:"none"}},[`${Rt}-tooltip`]:{color:at.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:at.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:yr,marginInlineEnd:Lr},[`&${Rt}-no-colon::after`]:{content:'"\\a0"'}}},[`${Rt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Mn}-col-'"]):not([class*="' ${Mn}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:at.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Rt]:{"&-explain, &-extra":{clear:"both",color:at.colorTextDescription,fontSize:at.fontSize,lineHeight:at.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:at.controlHeightSM,transition:`color ${at.motionDurationMid} ${at.motionEaseOut}`},"&-explain":{"&-error":{color:at.colorError},"&-warning":{color:at.colorWarning}}},[`&-with-help ${Rt}-explain`]:{height:"auto",opacity:1},[`${Rt}-feedback-icon`]:{fontSize:at.fontSize,textAlign:"center",visibility:"visible",animationName:Ae.kr,animationDuration:at.motionDurationMid,animationTimingFunction:at.motionEaseOutBack,pointerEvents:"none","&-success":{color:at.colorSuccess},"&-error":{color:at.colorError},"&-warning":{color:at.colorWarning},"&-validating":{color:at.colorPrimary}}})}},it=at=>{const{componentCls:Rt,formItemCls:on}=at;return{[`${Rt}-horizontal`]:{[`${on}-label`]:{flexGrow:0},[`${on}-control`]:{flex:"1 1 0",minWidth:0},[`${on}-label[class$='-24'], ${on}-label[class*='-24 ']`]:{[`& + ${on}-control`]:{minWidth:"unset"}}}}},ot=at=>{const{componentCls:Rt,formItemCls:on}=at;return{[`${Rt}-inline`]:{display:"flex",flexWrap:"wrap",[on]:{flex:"none",marginInlineEnd:at.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${on}-label,
|
|
|
> ${on}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${on}-label`]:{flex:"none"},[`${Rt}-text`]:{display:"inline-block"},[`${on}-has-feedback`]:{display:"inline-block"}}}}},Ce=at=>({padding:at.verticalLabelPadding,margin:at.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Se=at=>{const{componentCls:Rt,formItemCls:on,rootPrefixCls:tn}=at;return{[`${on} ${on}-label`]:Ce(at),[Rt]:{[on]:{flexWrap:"wrap",[`${on}-label, ${on}-control`]:{[`&:not([class*=" ${tn}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},He=at=>{const{componentCls:Rt,formItemCls:on,rootPrefixCls:tn}=at;return{[`${Rt}-vertical`]:{[on]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Rt}-item-control`]:{width:"100%"}}},[`${Rt}-vertical ${on}-label,
|
|
|
.${tn}-col-24${on}-label,
|
|
|
.${tn}-col-xl-24${on}-label`]:Ce(at),[`@media (max-width: ${at.screenXSMax}px)`]:[Se(at),{[Rt]:{[`.${tn}-col-xs-24${on}-label`]:Ce(at)}}],[`@media (max-width: ${at.screenSMMax}px)`]:{[Rt]:{[`.${tn}-col-sm-24${on}-label`]:Ce(at)}},[`@media (max-width: ${at.screenMDMax}px)`]:{[Rt]:{[`.${tn}-col-md-24${on}-label`]:Ce(at)}},[`@media (max-width: ${at.screenLGMax}px)`]:{[Rt]:{[`.${tn}-col-lg-24${on}-label`]:Ce(at)}}}},Ue=(at,Rt)=>(0,ze.TS)(at,{formItemCls:`${at.componentCls}-item`,rootPrefixCls:Rt});var xt=(0,st.Z)("Form",(at,Rt)=>{let{rootPrefixCls:on}=Rt;const tn=Ue(at,on);return[vt(tn),Dt(tn),ct(tn),it(tn),ot(tn),He(tn),(0,lt.Z)(tn),Ae.kr]},at=>({labelRequiredMarkColor:at.colorError,labelColor:at.colorTextHeading,labelFontSize:at.fontSize,labelHeight:at.controlHeight,labelColonMarginInlineStart:at.marginXXS/2,labelColonMarginInlineEnd:at.marginXS,itemMarginBottom:at.marginLG,verticalLabelPadding:`0 0 ${at.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const mt=[];function ut(at,Rt,on){let tn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof at=="string"?at:`${Rt}-${tn}`,error:at,errorStatus:on}}var Ft=at=>{let{help:Rt,helpStatus:on,errors:tn=mt,warnings:Mn=mt,className:wn,fieldId:rr,onVisibleChanged:zr}=at;const{prefixCls:vr}=ye.useContext(ce.Rk),yr=`${vr}-item-explain`,[,Lr]=xt(vr),Dr=(0,ye.useMemo)(()=>(0,_e.Z)(vr),[vr]),hi=ke(tn),Vn=ke(Mn),br=ye.useMemo(()=>Rt!=null?[ut(Rt,"help",on)]:[].concat((0,fe.Z)(hi.map((na,Wr)=>ut(na,"error","error",Wr))),(0,fe.Z)(Vn.map((na,Wr)=>ut(na,"warning","warning",Wr)))),[Rt,on,hi,Vn]),Ui={};return rr&&(Ui.id=`${rr}_help`),ye.createElement(Ge.default,{motionDeadline:Dr.motionDeadline,motionName:`${vr}-show-help`,visible:!!br.length,onVisibleChanged:zr},na=>{const{className:Wr,style:vi}=na;return ye.createElement("div",Object.assign({},Ui,{className:Re()(yr,Wr,wn,Lr),style:vi,role:"alert"}),ye.createElement(Ge.CSSMotionList,Object.assign({keys:br},(0,_e.Z)(vr),{motionName:`${vr}-show-help-item`,component:!1}),ra=>{const{key:Kr,error:Vi,errorStatus:lr,className:Na,style:Ca}=ra;return ye.createElement("div",{key:Kr,className:Re()(Na,{[`${yr}-${lr}`]:lr}),style:Ca},Vi)}))})},yt=ie(46660),gn=ie(53124),rt=ie(98866),Mt=ie(97647),en=ie(98675),Yt=ie(17423);const Qe=["parentNode"],Ie="form_item";function Ot(at){return at===void 0||at===!1?[]:Array.isArray(at)?at:[at]}function In(at,Rt){if(!at.length)return;const on=at.join("_");return Rt?`${Rt}_${on}`:Qe.includes(on)?`${Ie}_${on}`:on}function mn(at,Rt,on,tn,Mn,wn){let rr=tn;return wn!==void 0?rr=wn:on.validating?rr="validating":at.length?rr="error":Rt.length?rr="warning":(on.touched||Mn&&on.validated)&&(rr="success"),rr}function pt(at){return Ot(at).join("_")}function wt(at){const[Rt]=(0,yt.useForm)(),on=ye.useRef({}),tn=ye.useMemo(()=>at!=null?at:Object.assign(Object.assign({},Rt),{__INTERNAL__:{itemRef:Mn=>wn=>{const rr=pt(Mn);wn?on.current[rr]=wn:delete on.current[rr]}},scrollToField:function(Mn){let wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const rr=Ot(Mn),zr=In(rr,tn.__INTERNAL__.name),vr=zr?document.getElementById(zr):null;vr&&(0,Yt.Z)(vr,Object.assign({scrollMode:"if-needed",block:"nearest"},wn))},getFieldInstance:Mn=>{const wn=pt(Mn);return on.current[wn]}}),[at,Rt]);return[tn]}var Qt=ie(37920),Zn=function(at,Rt){var on={};for(var tn in at)Object.prototype.hasOwnProperty.call(at,tn)&&Rt.indexOf(tn)<0&&(on[tn]=at[tn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,tn=Object.getOwnPropertySymbols(at);Mn<tn.length;Mn++)Rt.indexOf(tn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(at,tn[Mn])&&(on[tn[Mn]]=at[tn[Mn]]);return on};const Cn=(at,Rt)=>{const on=ye.useContext(rt.Z),{getPrefixCls:tn,direction:Mn,form:wn}=ye.useContext(gn.E_),{prefixCls:rr,className:zr,rootClassName:vr,size:yr,disabled:Lr=on,form:Dr,colon:hi,labelAlign:Vn,labelWrap:br,labelCol:Ui,wrapperCol:na,hideRequiredMark:Wr,layout:vi="horizontal",scrollToFirstError:ra,requiredMark:Kr,onFinishFailed:Vi,name:lr,style:Na,feedbackIcons:Ca}=at,ho=Zn(at,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ha=(0,en.Z)(yr),_a=ye.useContext(Qt.Z),Ji=(0,ye.useMemo)(()=>Kr!==void 0?Kr:wn&&wn.requiredMark!==void 0?wn.requiredMark:!Wr,[Wr,Kr,wn]),Fa=hi!=null?hi:wn==null?void 0:wn.colon,ya=tn("form",rr),[Wa,po]=xt(ya),ja=Re()(ya,`${ya}-${vi}`,{[`${ya}-hide-required-mark`]:Ji===!1,[`${ya}-rtl`]:Mn==="rtl",[`${ya}-${Ha}`]:Ha},po,wn==null?void 0:wn.className,zr,vr),[Pa]=wt(Dr),{__INTERNAL__:mo}=Pa;mo.name=lr;const Eo=(0,ye.useMemo)(()=>({name:lr,labelAlign:Vn,labelCol:Ui,labelWrap:br,wrapperCol:na,vertical:vi==="vertical",colon:Fa,requiredMark:Ji,itemRef:mo.itemRef,form:Pa,feedbackIcons:Ca}),[lr,Vn,Ui,na,vi,Fa,Ji,Pa,Ca]);ye.useImperativeHandle(Rt,()=>Pa);const no=(Zt,At)=>{if(Zt){let xn={block:"nearest"};typeof Zt=="object"&&(xn=Zt),Pa.scrollToField(At,xn)}},ia=Zt=>{if(Vi==null||Vi(Zt),Zt.errorFields.length){const At=Zt.errorFields[0].name;if(ra!==void 0){no(ra,At);return}wn&&wn.scrollToFirstError!==void 0&&no(wn.scrollToFirstError,At)}};return Wa(ye.createElement(rt.n,{disabled:Lr},ye.createElement(Mt.q,{size:Ha},ye.createElement(ce.RV,Object.assign({},{validateMessages:_a}),ye.createElement(ce.q3.Provider,{value:Eo},ye.createElement(yt.default,Object.assign({id:lr},ho,{name:lr,onFinishFailed:ia,form:Pa,style:Object.assign(Object.assign({},wn==null?void 0:wn.style),Na),className:ja})))))))};var ln=ye.forwardRef(Cn),zn=ie(9475),_n=ie(17799),Oe=ie(96159),ue=ie(37419);function le(at){if(typeof at=="function")return at;const Rt=(0,ue.Z)(at);return Rt.length<=1?Rt[0]:Rt}const ve=()=>{const{status:at,errors:Rt=[],warnings:on=[]}=(0,ye.useContext)(ce.aM);return{status:at,errors:Rt,warnings:on}};ve.Context=ce.aM;var pe=ve,se=ie(96523);function Be(at){const[Rt,on]=ye.useState(at),tn=(0,ye.useRef)(null),Mn=(0,ye.useRef)([]),wn=(0,ye.useRef)(!1);ye.useEffect(()=>(wn.current=!1,()=>{wn.current=!0,se.Z.cancel(tn.current),tn.current=null}),[]);function rr(zr){wn.current||(tn.current===null&&(Mn.current=[],tn.current=(0,se.Z)(()=>{tn.current=null,on(vr=>{let yr=vr;return Mn.current.forEach(Lr=>{yr=Lr(yr)}),yr})})),Mn.current.push(zr))}return[Rt,rr]}function ft(){const{itemRef:at}=ye.useContext(ce.q3),Rt=ye.useRef({});function on(tn,Mn){const wn=Mn&&typeof Mn=="object"&&Mn.ref,rr=tn.join("_");return(Rt.current.name!==rr||Rt.current.originRef!==wn)&&(Rt.current.name=rr,Rt.current.originRef=wn,Rt.current.ref=(0,_n.sQ)(at(tn),wn)),Rt.current.ref}return on}var Bt=ie(48130),qt=ie(14075),an=ie(10366),vn=ie(92820),dn=ie(21584);const gt=at=>{const{formItemCls:Rt}=at;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Rt}-control`]:{display:"flex"}}}};var It=(0,st.b)(["Form","item-item"],(at,Rt)=>{let{rootPrefixCls:on}=Rt;const tn=Ue(at,on);return[gt(tn)]}),Xt=at=>{const{prefixCls:Rt,status:on,wrapperCol:tn,children:Mn,errors:wn,warnings:rr,_internalItemRender:zr,extra:vr,help:yr,fieldId:Lr,marginBottom:Dr,onErrorVisibleChanged:hi}=at,Vn=`${Rt}-item`,br=ye.useContext(ce.q3),Ui=tn||br.wrapperCol||{},na=Re()(`${Vn}-control`,Ui.className),Wr=ye.useMemo(()=>Object.assign({},br),[br]);delete Wr.labelCol,delete Wr.wrapperCol;const vi=ye.createElement("div",{className:`${Vn}-control-input`},ye.createElement("div",{className:`${Vn}-control-input-content`},Mn)),ra=ye.useMemo(()=>({prefixCls:Rt,status:on}),[Rt,on]),Kr=Dr!==null||wn.length||rr.length?ye.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ye.createElement(ce.Rk.Provider,{value:ra},ye.createElement(Ft,{fieldId:Lr,errors:wn,warnings:rr,help:yr,helpStatus:on,className:`${Vn}-explain-connected`,onVisibleChanged:hi})),!!Dr&&ye.createElement("div",{style:{width:0,height:Dr}})):null,Vi={};Lr&&(Vi.id=`${Lr}_extra`);const lr=vr?ye.createElement("div",Object.assign({},Vi,{className:`${Vn}-extra`}),vr):null,Na=zr&&zr.mark==="pro_table_render"&&zr.render?zr.render(at,{input:vi,errorList:Kr,extra:lr}):ye.createElement(ye.Fragment,null,vi,Kr,lr);return ye.createElement(ce.q3.Provider,{value:Wr},ye.createElement(dn.Z,Object.assign({},Ui,{className:na}),Na),ye.createElement(It,{prefixCls:Rt}))},Tt=ie(17663),Yn=ie(24457),Rn=ie(10110),cr=ie(83062),Xr=function(at,Rt){var on={};for(var tn in at)Object.prototype.hasOwnProperty.call(at,tn)&&Rt.indexOf(tn)<0&&(on[tn]=at[tn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,tn=Object.getOwnPropertySymbols(at);Mn<tn.length;Mn++)Rt.indexOf(tn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(at,tn[Mn])&&(on[tn[Mn]]=at[tn[Mn]]);return on};function wr(at){return at?typeof at=="object"&&!ye.isValidElement(at)?at:{title:at}:null}var Ar=at=>{let{prefixCls:Rt,label:on,htmlFor:tn,labelCol:Mn,labelAlign:wn,colon:rr,required:zr,requiredMark:vr,tooltip:yr}=at;var Lr;const[Dr]=(0,Rn.Z)("Form"),{vertical:hi,labelAlign:Vn,labelCol:br,labelWrap:Ui,colon:na}=ye.useContext(ce.q3);if(!on)return null;const Wr=Mn||br||{},vi=wn||Vn,ra=`${Rt}-item-label`,Kr=Re()(ra,vi==="left"&&`${ra}-left`,Wr.className,{[`${ra}-wrap`]:!!Ui});let Vi=on;const lr=rr===!0||na!==!1&&rr!==!1;lr&&!hi&&typeof on=="string"&&on.trim()!==""&&(Vi=on.replace(/[:|:]\s*$/,""));const Ca=wr(yr);if(Ca){const{icon:Ji=ye.createElement(Tt.Z,null)}=Ca,Fa=Xr(Ca,["icon"]),ya=ye.createElement(cr.Z,Object.assign({},Fa),ye.cloneElement(Ji,{className:`${Rt}-item-tooltip`,title:""}));Vi=ye.createElement(ye.Fragment,null,Vi,ya)}const ho=vr==="optional",Ha=typeof vr=="function";Ha?Vi=vr(Vi,{required:!!zr}):ho&&!zr&&(Vi=ye.createElement(ye.Fragment,null,Vi,ye.createElement("span",{className:`${Rt}-item-optional`,title:""},(Dr==null?void 0:Dr.optional)||((Lr=Yn.Z.Form)===null||Lr===void 0?void 0:Lr.optional))));const _a=Re()({[`${Rt}-item-required`]:zr,[`${Rt}-item-required-mark-optional`]:ho||Ha,[`${Rt}-item-no-colon`]:!lr});return ye.createElement(dn.Z,Object.assign({},Wr,{className:Kr}),ye.createElement("label",{htmlFor:tn,className:_a,title:typeof on=="string"?on:""},Vi))},gi=ie(87725),oi=ie(16646),fi=ie(87995),Pi=ie(3407);const Or={success:gi.Z,warning:fi.Z,error:oi.Z,validating:Pi.Z};function Jn(at){let{children:Rt,errors:on,warnings:tn,hasFeedback:Mn,validateStatus:wn,prefixCls:rr,meta:zr,noStyle:vr}=at;const yr=`${rr}-item`,{feedbackIcons:Lr}=ye.useContext(ce.q3),Dr=mn(on,tn,zr,null,!!Mn,wn),{isFormItemInput:hi,status:Vn}=ye.useContext(ce.aM),br=ye.useMemo(()=>{var Ui;let na;if(Mn){const ra=Mn!==!0&&Mn.icons||Lr,Kr=Dr&&((Ui=ra==null?void 0:ra({status:Dr,errors:on,warnings:tn}))===null||Ui===void 0?void 0:Ui[Dr]),Vi=Dr&&Or[Dr];na=Kr!==!1&&Vi?ye.createElement("span",{className:Re()(`${yr}-feedback-icon`,`${yr}-feedback-icon-${Dr}`)},Kr||ye.createElement(Vi,null)):null}let Wr=!0,vi=Dr||"";return vr&&(Wr=hi,vi=(Dr!=null?Dr:Vn)||""),{status:vi,errors:on,warnings:tn,hasFeedback:!!Mn,feedbackIcon:na,isFormItemInput:Wr}},[Dr,Mn,vr,hi,Vn]);return ye.createElement(ce.aM.Provider,{value:br},Rt)}var qn=function(at,Rt){var on={};for(var tn in at)Object.prototype.hasOwnProperty.call(at,tn)&&Rt.indexOf(tn)<0&&(on[tn]=at[tn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,tn=Object.getOwnPropertySymbols(at);Mn<tn.length;Mn++)Rt.indexOf(tn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(at,tn[Mn])&&(on[tn[Mn]]=at[tn[Mn]]);return on};function nr(at){const{prefixCls:Rt,className:on,rootClassName:tn,style:Mn,help:wn,errors:rr,warnings:zr,validateStatus:vr,meta:yr,hasFeedback:Lr,hidden:Dr,children:hi,fieldId:Vn,required:br,isRequired:Ui,onSubItemMetaChange:na}=at,Wr=qn(at,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),vi=`${Rt}-item`,{requiredMark:ra}=ye.useContext(ce.q3),Kr=ye.useRef(null),Vi=ke(rr),lr=ke(zr),Na=wn!=null,Ca=!!(Na||rr.length||zr.length),ho=!!Kr.current&&(0,Bt.Z)(Kr.current),[Ha,_a]=ye.useState(null);(0,qt.Z)(()=>{if(Ca&&Kr.current){const po=getComputedStyle(Kr.current);_a(parseInt(po.marginBottom,10))}},[Ca,ho]);const Ji=po=>{po||_a(null)},ya=function(){let po=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const ja=po?Vi:yr.errors,Pa=po?lr:yr.warnings;return mn(ja,Pa,yr,"",!!Lr,vr)}(),Wa=Re()(vi,on,tn,{[`${vi}-with-help`]:Na||Vi.length||lr.length,[`${vi}-has-feedback`]:ya&&Lr,[`${vi}-has-success`]:ya==="success",[`${vi}-has-warning`]:ya==="warning",[`${vi}-has-error`]:ya==="error",[`${vi}-is-validating`]:ya==="validating",[`${vi}-hidden`]:Dr});return ye.createElement("div",{className:Wa,style:Mn,ref:Kr},ye.createElement(vn.Z,Object.assign({className:`${vi}-row`},(0,an.Z)(Wr,["_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"])),ye.createElement(Ar,Object.assign({htmlFor:Vn},at,{requiredMark:ra,required:br!=null?br:Ui,prefixCls:Rt})),ye.createElement(Xt,Object.assign({},at,yr,{errors:Vi,warnings:lr,prefixCls:Rt,status:ya,help:wn,marginBottom:Ha,onErrorVisibleChanged:Ji}),ye.createElement(ce.qI.Provider,{value:na},ye.createElement(Jn,{prefixCls:Rt,meta:yr,errors:yr.errors,warnings:yr.warnings,hasFeedback:Lr,validateStatus:ya},hi)))),!!Ha&&ye.createElement("div",{className:`${vi}-margin-offset`,style:{marginBottom:-Ha}}))}const Ur="__SPLIT__",li=null,Lt=ye.memo(at=>{let{children:Rt}=at;return Rt},(at,Rt)=>at.value===Rt.value&&at.update===Rt.update&&at.childProps.length===Rt.childProps.length&&at.childProps.every((on,tn)=>on===Rt.childProps[tn]));function Kn(at){return at!=null}function Bn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function yn(at){const{name:Rt,noStyle:on,className:tn,dependencies:Mn,prefixCls:wn,shouldUpdate:rr,rules:zr,children:vr,required:yr,label:Lr,messageVariables:Dr,trigger:hi="onChange",validateTrigger:Vn,hidden:br,help:Ui}=at,{getPrefixCls:na}=ye.useContext(gn.E_),{name:Wr}=ye.useContext(ce.q3),vi=le(vr),ra=typeof vi=="function",Kr=ye.useContext(ce.qI),{validateTrigger:Vi}=ye.useContext(yt.FieldContext),lr=Vn!==void 0?Vn:Vi,Na=Kn(Rt),Ca=na("form",wn),[ho,Ha]=xt(Ca),_a=ye.useContext(yt.ListContext),Ji=ye.useRef(),[Fa,ya]=Be({}),[Wa,po]=(0,zn.Z)(()=>Bn()),ja=At=>{const xn=_a==null?void 0:_a.getKey(At.name);if(po(At.destroy?Bn():At,!0),on&&Ui!==!1&&Kr){let jn=At.name;if(At.destroy)jn=Ji.current||jn;else if(xn!==void 0){const[hr,Qr]=xn;jn=[hr].concat((0,fe.Z)(Qr)),Ji.current=jn}Kr(At,jn)}},Pa=(At,xn)=>{ya(jn=>{const hr=Object.assign({},jn),ni=[].concat((0,fe.Z)(At.name.slice(0,-1)),(0,fe.Z)(xn)).join(Ur);return At.destroy?delete hr[ni]:hr[ni]=At,hr})},[mo,Eo]=ye.useMemo(()=>{const At=(0,fe.Z)(Wa.errors),xn=(0,fe.Z)(Wa.warnings);return Object.values(Fa).forEach(jn=>{At.push.apply(At,(0,fe.Z)(jn.errors||[])),xn.push.apply(xn,(0,fe.Z)(jn.warnings||[]))}),[At,xn]},[Fa,Wa.errors,Wa.warnings]),no=ft();function ia(At,xn,jn){return on&&!br?ye.createElement(Jn,{prefixCls:Ca,hasFeedback:at.hasFeedback,validateStatus:at.validateStatus,meta:Wa,errors:mo,warnings:Eo,noStyle:!0},At):ye.createElement(nr,Object.assign({key:"row"},at,{className:Re()(tn,Ha),prefixCls:Ca,fieldId:xn,isRequired:jn,errors:mo,warnings:Eo,meta:Wa,onSubItemMetaChange:Pa}),At)}if(!Na&&!ra&&!Mn)return ho(ia(vi));let Zt={};return typeof Lr=="string"?Zt.label=Lr:Rt&&(Zt.label=String(Rt)),Dr&&(Zt=Object.assign(Object.assign({},Zt),Dr)),ho(ye.createElement(yt.Field,Object.assign({},at,{messageVariables:Zt,trigger:hi,validateTrigger:lr,onMetaChange:ja}),(At,xn,jn)=>{const hr=Ot(Rt).length&&xn?xn.name:[],Qr=In(hr,Wr),ni=yr!==void 0?yr:!!(zr&&zr.some(Si=>{if(Si&&typeof Si=="object"&&Si.required&&!Si.warningOnly)return!0;if(typeof Si=="function"){const Qi=Si(jn);return Qi&&Qi.required&&!Qi.warningOnly}return!1})),mi=Object.assign({},At);let ki=null;if(Array.isArray(vi)&&Na)ki=vi;else if(!(ra&&(!(rr||Mn)||Na))){if(!(Mn&&!ra&&!Na))if((0,Oe.l$)(vi)){const Si=Object.assign(Object.assign({},vi.props),mi);if(Si.id||(Si.id=Qr),Ui||mo.length>0||Eo.length>0||at.extra){const ba=[];(Ui||mo.length>0)&&ba.push(`${Qr}_help`),at.extra&&ba.push(`${Qr}_extra`),Si["aria-describedby"]=ba.join(" ")}mo.length>0&&(Si["aria-invalid"]="true"),ni&&(Si["aria-required"]="true"),(0,_n.Yr)(vi)&&(Si.ref=no(hr,vi)),new Set([].concat((0,fe.Z)(Ot(hi)),(0,fe.Z)(Ot(lr)))).forEach(ba=>{Si[ba]=function(){for(var sn,bn,Fn,he,Pe,Fe=arguments.length,We=new Array(Fe),je=0;je<Fe;je++)We[je]=arguments[je];(Fn=mi[ba])===null||Fn===void 0||(sn=Fn).call.apply(sn,[mi].concat(We)),(Pe=(he=vi.props)[ba])===null||Pe===void 0||(bn=Pe).call.apply(bn,[he].concat(We))}});const aa=[Si["aria-required"],Si["aria-invalid"],Si["aria-describedby"]];ki=ye.createElement(Lt,{value:mi[at.valuePropName||"value"],update:vi,childProps:aa},(0,Oe.Tm)(vi,Si))}else ra&&(rr||Mn)&&!Na?ki=vi(jn):ki=vi}return ia(ki,Qr,ni)}))}const xr=yn;xr.useStatus=pe;var Sr=xr,mr=function(at,Rt){var on={};for(var tn in at)Object.prototype.hasOwnProperty.call(at,tn)&&Rt.indexOf(tn)<0&&(on[tn]=at[tn]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mn=0,tn=Object.getOwnPropertySymbols(at);Mn<tn.length;Mn++)Rt.indexOf(tn[Mn])<0&&Object.prototype.propertyIsEnumerable.call(at,tn[Mn])&&(on[tn[Mn]]=at[tn[Mn]]);return on},ht=at=>{var{prefixCls:Rt,children:on}=at,tn=mr(at,["prefixCls","children"]);const{getPrefixCls:Mn}=ye.useContext(gn.E_),wn=Mn("form",Rt),rr=ye.useMemo(()=>({prefixCls:wn,status:"error"}),[wn]);return ye.createElement(yt.List,Object.assign({},tn),(zr,vr,yr)=>ye.createElement(ce.Rk.Provider,{value:rr},on(zr.map(Lr=>Object.assign(Object.assign({},Lr),{fieldKey:Lr.key})),vr,{errors:yr.errors,warnings:yr.warnings})))};function Et(){const{form:at}=(0,ye.useContext)(ce.q3);return at}const zt=ln;zt.Item=Sr,zt.List=ht,zt.ErrorList=Ft,zt.useForm=wt,zt.useFormInstance=Et,zt.useWatch=yt.useWatch,zt.Provider=ce.RV,zt.create=()=>{};var fn=zt},25378:function(Ln,Kt,ie){"use strict";var fe=ie(67294),Te=ie(14075),Re=ie(57838),Ge=ie(74443);function ye(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ce=(0,fe.useRef)({}),ke=(0,Re.Z)(),ge=(0,Ge.ZP)();return(0,Te.Z)(()=>{const Ae=ge.subscribe(lt=>{ce.current=lt,_e&&ke()});return()=>ge.unsubscribe(Ae)},[]),ce.current}Kt.Z=ye},31795:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Qn}});var fe=ie(42922),Te=ie(53978),Re=ie(94184),Ge=ie.n(Re),ye=ie(87462),_e=ie(4942),ce=ie(71002),ke=ie(97685),ge=ie(45987),Ae=ie(15671),lt=ie(43144);function ze(){return typeof BigInt=="function"}function st(ht){return!ht&&ht!==0&&!Number.isNaN(ht)||!String(ht).trim()}function dt(ht){var Et=ht.trim(),zt=Et.startsWith("-");zt&&(Et=Et.slice(1)),Et=Et.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Et.startsWith(".")&&(Et="0".concat(Et));var fn=Et||"0",at=fn.split("."),Rt=at[0]||"0",on=at[1]||"0";Rt==="0"&&on==="0"&&(zt=!1);var tn=zt?"-":"";return{negative:zt,negativeStr:tn,trimStr:fn,integerStr:Rt,decimalStr:on,fullStr:"".concat(tn).concat(fn)}}function ct(ht){var Et=String(ht);return!Number.isNaN(Number(Et))&&Et.includes("e")}function qe(ht){var Et=String(ht);if(ct(ht)){var zt=Number(Et.slice(Et.indexOf("e-")+2)),fn=Et.match(/\.(\d+)/);return fn!=null&&fn[1]&&(zt+=fn[1].length),zt}return Et.includes(".")&&vt(Et)?Et.length-Et.indexOf(".")-1:0}function be(ht){var Et=String(ht);if(ct(ht)){if(ht>Number.MAX_SAFE_INTEGER)return String(ze()?BigInt(ht).toString():Number.MAX_SAFE_INTEGER);if(ht<Number.MIN_SAFE_INTEGER)return String(ze()?BigInt(ht).toString():Number.MIN_SAFE_INTEGER);Et=ht.toFixed(qe(Et))}return dt(Et).fullStr}function vt(ht){return typeof ht=="number"?!Number.isNaN(ht):ht?/^\s*-?\d+(\.\d+)?\s*$/.test(ht)||/^\s*-?\d+\.\s*$/.test(ht)||/^\s*-?\.\d+\s*$/.test(ht):!1}var Dt=function(){function ht(Et){if((0,Ae.Z)(this,ht),(0,_e.Z)(this,"origin",""),(0,_e.Z)(this,"negative",void 0),(0,_e.Z)(this,"integer",void 0),(0,_e.Z)(this,"decimal",void 0),(0,_e.Z)(this,"decimalLen",void 0),(0,_e.Z)(this,"empty",void 0),(0,_e.Z)(this,"nan",void 0),st(Et)){this.empty=!0;return}if(this.origin=String(Et),Et==="-"||Number.isNaN(Et)){this.nan=!0;return}var zt=Et;if(ct(zt)&&(zt=Number(zt)),zt=typeof zt=="string"?zt:be(zt),vt(zt)){var fn=dt(zt);this.negative=fn.negative;var at=fn.trimStr.split(".");this.integer=BigInt(at[0]);var Rt=at[1]||"0";this.decimal=BigInt(Rt),this.decimalLen=Rt.length}else this.nan=!0}return(0,lt.Z)(ht,[{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 fn="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(zt,"0"));return BigInt(fn)}},{key:"negate",value:function(){var zt=new ht(this.toString());return zt.negative=!zt.negative,zt}},{key:"cal",value:function(zt,fn,at){var Rt=Math.max(this.getDecimalStr().length,zt.getDecimalStr().length),on=this.alignDecimal(Rt),tn=zt.alignDecimal(Rt),Mn=fn(on,tn).toString(),wn=at(Rt),rr=dt(Mn),zr=rr.negativeStr,vr=rr.trimStr,yr="".concat(zr).concat(vr.padStart(wn+1,"0"));return new ht("".concat(yr.slice(0,-wn),".").concat(yr.slice(-wn)))}},{key:"add",value:function(zt){if(this.isInvalidate())return new ht(zt);var fn=new ht(zt);return fn.isInvalidate()?this:this.cal(fn,function(at,Rt){return at+Rt},function(at){return at})}},{key:"multi",value:function(zt){var fn=new ht(zt);return this.isInvalidate()||fn.isInvalidate()?new ht(NaN):this.cal(fn,function(at,Rt){return at*Rt},function(at){return at*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()?"":dt("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ht}(),it=function(){function ht(Et){if((0,Ae.Z)(this,ht),(0,_e.Z)(this,"origin",""),(0,_e.Z)(this,"number",void 0),(0,_e.Z)(this,"empty",void 0),st(Et)){this.empty=!0;return}this.origin=String(Et),this.number=Number(Et)}return(0,lt.Z)(ht,[{key:"negate",value:function(){return new ht(-this.toNumber())}},{key:"add",value:function(zt){if(this.isInvalidate())return new ht(zt);var fn=Number(zt);if(Number.isNaN(fn))return this;var at=this.number+fn;if(at>Number.MAX_SAFE_INTEGER)return new ht(Number.MAX_SAFE_INTEGER);if(at<Number.MIN_SAFE_INTEGER)return new ht(Number.MIN_SAFE_INTEGER);var Rt=Math.max(qe(this.number),qe(fn));return new ht(at.toFixed(Rt))}},{key:"multi",value:function(zt){var fn=Number(zt);if(this.isInvalidate()||Number.isNaN(fn))return new ht(NaN);var at=this.number*fn;if(at>Number.MAX_SAFE_INTEGER)return new ht(Number.MAX_SAFE_INTEGER);if(at<Number.MIN_SAFE_INTEGER)return new ht(Number.MIN_SAFE_INTEGER);var Rt=Math.max(qe(this.number),qe(fn));return new ht(at.toFixed(Rt))}},{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()?"":be(this.number):this.origin}}]),ht}();function ot(ht){return ze()?new Dt(ht):new it(ht)}function Ce(ht,Et,zt){var fn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ht==="")return"";var at=dt(ht),Rt=at.negativeStr,on=at.integerStr,tn=at.decimalStr,Mn="".concat(Et).concat(tn),wn="".concat(Rt).concat(on);if(zt>=0){var rr=Number(tn[zt]);if(rr>=5&&!fn){var zr=ot(ht).add("".concat(Rt,"0.").concat("0".repeat(zt)).concat(10-rr));return Ce(zr.toString(),Et,zt,fn)}return zt===0?wn:"".concat(wn).concat(Et).concat(tn.padEnd(zt,"0").slice(0,zt))}return Mn===".0"?wn:"".concat(wn).concat(Mn)}var Se=ot,He=ie(67656),Ue=ie(67294);function xt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mt=xt()?Ue.useLayoutEffect:Ue.useEffect,ut=function(Et,zt){var fn=Ue.useRef(!0);mt(function(){return Et(fn.current)},zt),mt(function(){return fn.current=!1,function(){fn.current=!0}},[])},$e=function(Et,zt){ut(function(fn){if(!fn)return Et()},zt)},Ft=ut,yt=ie(27183);function gn(ht,Et,zt){var fn=React.useRef({});return(!("value"in fn.current)||zt(fn.current.condition,Et))&&(fn.current.value=ht(),fn.current.condition=Et),fn.current.value}function rt(ht,Et){typeof ht=="function"?ht(Et):(0,ce.Z)(ht)==="object"&&ht&&"current"in ht&&(ht.current=Et)}function Mt(){for(var ht=arguments.length,Et=new Array(ht),zt=0;zt<ht;zt++)Et[zt]=arguments[zt];var fn=Et.filter(function(at){return at});return fn.length<=1?fn[0]:function(at){Et.forEach(function(Rt){rt(Rt,at)})}}function en(){for(var ht=arguments.length,Et=new Array(ht),zt=0;zt<ht;zt++)Et[zt]=arguments[zt];return useMemo(function(){return Mt.apply(void 0,Et)},Et,function(fn,at){return fn.length!==at.length||fn.every(function(Rt,on){return Rt!==at[on]})})}function Yt(ht){var Et,zt,fn=isMemo(ht)?ht.type.type:ht.type;return!(typeof fn=="function"&&!((Et=fn.prototype)!==null&&Et!==void 0&&Et.render)||typeof ht=="function"&&!((zt=ht.prototype)!==null&&zt!==void 0&&zt.render))}function Qe(ht){return!isValidElement(ht)||isFragment(ht)?!1:Yt(ht)}var Ie={},Ot=[],In=function(Et){Ot.push(Et)};function mn(ht,Et){if(0)var zt}function pt(ht,Et){if(0)var zt}function wt(){Ie={}}function Qt(ht,Et,zt){!Et&&!Ie[zt]&&(ht(!1,zt),Ie[zt]=!0)}function Zn(ht,Et){Qt(mn,ht,Et)}function Cn(ht,Et){Qt(pt,ht,Et)}Zn.preMessage=In,Zn.resetWarned=wt,Zn.noteOnce=Cn;var rn=Zn;function ln(ht,Et){var zt=(0,Ue.useRef)(null);function fn(){try{var Rt=ht.selectionStart,on=ht.selectionEnd,tn=ht.value,Mn=tn.substring(0,Rt),wn=tn.substring(on);zt.current={start:Rt,end:on,value:tn,beforeTxt:Mn,afterTxt:wn}}catch(rr){}}function at(){if(ht&&zt.current&&Et)try{var Rt=ht.value,on=zt.current,tn=on.beforeTxt,Mn=on.afterTxt,wn=on.start,rr=Rt.length;if(Rt.endsWith(Mn))rr=Rt.length-zt.current.afterTxt.length;else if(Rt.startsWith(tn))rr=tn.length;else{var zr=tn[wn-1],vr=Rt.indexOf(zr,wn-1);vr!==-1&&(rr=vr+1)}ht.setSelectionRange(rr,rr)}catch(yr){rn(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(yr.message))}}return[fn,at]}var zn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ht=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(ht)||/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(ht==null?void 0:ht.substr(0,4))},_n=function(){var Et=(0,Ue.useState)(!1),zt=(0,ke.Z)(Et,2),fn=zt[0],at=zt[1];return Ft(function(){at(zn())},[]),fn},Oe=_n,ue=function(Et){return+setTimeout(Et,16)},le=function(Et){return clearTimeout(Et)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(Et){return window.requestAnimationFrame(Et)},le=function(Et){return window.cancelAnimationFrame(Et)});var ve=0,pe=new Map;function se(ht){pe.delete(ht)}var Be=function(Et){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ve+=1;var fn=ve;function at(Rt){if(Rt===0)se(fn),Et();else{var on=ue(function(){at(Rt-1)});pe.set(fn,on)}}return at(zt),fn};Be.cancel=function(ht){var Et=pe.get(ht);return se(Et),le(Et)};var ft=Be,Bt=200,qt=600;function an(ht){var Et=ht.prefixCls,zt=ht.upNode,fn=ht.downNode,at=ht.upDisabled,Rt=ht.downDisabled,on=ht.onStep,tn=Ue.useRef(),Mn=Ue.useRef([]),wn=Ue.useRef();wn.current=on;var rr=function(){clearTimeout(tn.current)},zr=function(Ui,na){Ui.preventDefault(),rr(),wn.current(na);function Wr(){wn.current(na),tn.current=setTimeout(Wr,Bt)}tn.current=setTimeout(Wr,qt)};Ue.useEffect(function(){return function(){rr(),Mn.current.forEach(function(br){return ft.cancel(br)})}},[]);var vr=Oe();if(vr)return null;var yr="".concat(Et,"-handler"),Lr=Ge()(yr,"".concat(yr,"-up"),(0,_e.Z)({},"".concat(yr,"-up-disabled"),at)),Dr=Ge()(yr,"".concat(yr,"-down"),(0,_e.Z)({},"".concat(yr,"-down-disabled"),Rt)),hi=function(){return Mn.current.push(ft(rr))},Vn={unselectable:"on",role:"button",onMouseUp:hi,onMouseLeave:hi};return Ue.createElement("div",{className:"".concat(yr,"-wrap")},Ue.createElement("span",(0,ye.Z)({},Vn,{onMouseDown:function(Ui){zr(Ui,!0)},"aria-label":"Increase Value","aria-disabled":at,className:Lr}),zt||Ue.createElement("span",{unselectable:"on",className:"".concat(Et,"-handler-up-inner")})),Ue.createElement("span",(0,ye.Z)({},Vn,{onMouseDown:function(Ui){zr(Ui,!1)},"aria-label":"Decrease Value","aria-disabled":Rt,className:Dr}),fn||Ue.createElement("span",{unselectable:"on",className:"".concat(Et,"-handler-down-inner")})))}function vn(ht){var Et=typeof ht=="number"?be(ht):dt(ht).fullStr,zt=Et.includes(".");return zt?dt(Et.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ht+"0"}var dn=ie(87887),gt=function(){var ht=(0,Ue.useRef)(0),Et=function(){ft.cancel(ht.current)};return(0,Ue.useEffect)(function(){return Et},[]),function(zt){Et(),ht.current=ft(function(){zt()})}},It=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Ht=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Xt=function(Et,zt){return Et||zt.isEmpty()?zt.toString():zt.toNumber()},Tt=function(Et){var zt=Se(Et);return zt.isInvalidate()?null:zt},Yn=Ue.forwardRef(function(ht,Et){var zt,fn=ht.prefixCls,at=fn===void 0?"rc-input-number":fn,Rt=ht.className,on=ht.style,tn=ht.min,Mn=ht.max,wn=ht.step,rr=wn===void 0?1:wn,zr=ht.defaultValue,vr=ht.value,yr=ht.disabled,Lr=ht.readOnly,Dr=ht.upHandler,hi=ht.downHandler,Vn=ht.keyboard,br=ht.controls,Ui=br===void 0?!0:br,na=ht.classNames,Wr=ht.stringMode,vi=ht.parser,ra=ht.formatter,Kr=ht.precision,Vi=ht.decimalSeparator,lr=ht.onChange,Na=ht.onInput,Ca=ht.onPressEnter,ho=ht.onStep,Ha=(0,ge.Z)(ht,It),_a="".concat(at,"-input"),Ji=Ue.useRef(null),Fa=Ue.useState(!1),ya=(0,ke.Z)(Fa,2),Wa=ya[0],po=ya[1],ja=Ue.useRef(!1),Pa=Ue.useRef(!1),mo=Ue.useRef(!1),Eo=Ue.useState(function(){return Se(vr!=null?vr:zr)}),no=(0,ke.Z)(Eo,2),ia=no[0],Zt=no[1];function At($n){vr===void 0&&Zt($n)}var xn=Ue.useCallback(function($n,Hn){if(!Hn)return Kr>=0?Kr:Math.max(qe($n),qe(rr))},[Kr,rr]),jn=Ue.useCallback(function($n){var Hn=String($n);if(vi)return vi(Hn);var Gn=Hn;return Vi&&(Gn=Gn.replace(Vi,".")),Gn.replace(/[^\w.-]+/g,"")},[vi,Vi]),hr=Ue.useRef(""),Qr=Ue.useCallback(function($n,Hn){if(ra)return ra($n,{userTyping:Hn,input:String(hr.current)});var Gn=typeof $n=="number"?be($n):$n;if(!Hn){var ar=xn(Gn,Hn);if(vt(Gn)&&(Vi||ar>=0)){var ur=Vi||".";Gn=Ce(Gn,ur,ar)}}return Gn},[ra,xn,Vi]),ni=Ue.useState(function(){var $n=zr!=null?zr:vr;return ia.isInvalidate()&&["string","number"].includes((0,ce.Z)($n))?Number.isNaN($n)?"":$n:Qr(ia.toString(),!1)}),mi=(0,ke.Z)(ni,2),ki=mi[0],Si=mi[1];hr.current=ki;function Qi($n,Hn){Si(Qr($n.isInvalidate()?$n.toString(!1):$n.toString(!Hn),Hn))}var aa=Ue.useMemo(function(){return Tt(Mn)},[Mn,Kr]),ba=Ue.useMemo(function(){return Tt(tn)},[tn,Kr]),sn=Ue.useMemo(function(){return!aa||!ia||ia.isInvalidate()?!1:aa.lessEquals(ia)},[aa,ia]),bn=Ue.useMemo(function(){return!ba||!ia||ia.isInvalidate()?!1:ia.lessEquals(ba)},[ba,ia]),Fn=ln(Ji.current,Wa),he=(0,ke.Z)(Fn,2),Pe=he[0],Fe=he[1],We=function(Hn){return aa&&!Hn.lessEquals(aa)?aa:ba&&!ba.lessEquals(Hn)?ba:null},je=function(Hn){return!We(Hn)},et=function(Hn,Gn){var ar=Hn,ur=je(ar)||ar.isEmpty();if(!ar.isEmpty()&&!Gn&&(ar=We(ar)||ar,ur=!0),!Lr&&!yr&&ur){var Ve=ar.toString(),Je=xn(Ve,Gn);return Je>=0&&(ar=Se(Ce(Ve,".",Je)),je(ar)||(ar=Se(Ce(Ve,".",Je,!0)))),ar.equals(ia)||(At(ar),lr==null||lr(ar.isEmpty()?null:Xt(Wr,ar)),vr===void 0&&Qi(ar,Gn)),ar}return ia},tt=gt(),kt=function $n(Hn){if(Pe(),hr.current=Hn,Si(Hn),!Pa.current){var Gn=jn(Hn),ar=Se(Gn);ar.isNaN()||et(ar,!0)}Na==null||Na(Hn),tt(function(){var ur=Hn;vi||(ur=Hn.replace(/。/g,".")),ur!==Hn&&$n(ur)})},Wt=function(){Pa.current=!0},Sn=function(){Pa.current=!1,kt(Ji.current.value)},Nn=function(Hn){kt(Hn.target.value)},En=function(Hn){var Gn;if(!(Hn&&sn||!Hn&&bn)){ja.current=!1;var ar=Se(mo.current?vn(rr):rr);Hn||(ar=ar.negate());var ur=(ia||Se(0)).add(ar.toString()),Ve=et(ur,!1);ho==null||ho(Xt(Wr,Ve),{offset:mo.current?vn(rr):rr,type:Hn?"up":"down"}),(Gn=Ji.current)===null||Gn===void 0||Gn.focus()}},cn=function(Hn){var Gn=Se(jn(ki)),ar=Gn;Gn.isNaN()?ar=et(ia,Hn):ar=et(Gn,Hn),vr!==void 0?Qi(ia,!1):ar.isNaN()||Qi(ar,!1)},un=function(){ja.current=!0},Gt=function(Hn){var Gn=Hn.key,ar=Hn.shiftKey;ja.current=!0,mo.current=ar,Gn==="Enter"&&(Pa.current||(ja.current=!1),cn(!1),Ca==null||Ca(Hn)),Vn!==!1&&!Pa.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Gn)&&(En(Gn==="Up"||Gn==="ArrowUp"),Hn.preventDefault())},kn=function(){ja.current=!1,mo.current=!1},ir=function(){cn(!1),po(!1),ja.current=!1};return $e(function(){ia.isInvalidate()||Qi(ia,!1)},[Kr]),$e(function(){var $n=Se(vr);Zt($n);var Hn=Se(jn(ki));(!$n.equals(Hn)||!ja.current||ra)&&Qi($n,ja.current)},[vr]),$e(function(){ra&&Fe()},[ki]),Ue.createElement("div",{className:Ge()(at,na==null?void 0:na.input,Rt,(zt={},(0,_e.Z)(zt,"".concat(at,"-focused"),Wa),(0,_e.Z)(zt,"".concat(at,"-disabled"),yr),(0,_e.Z)(zt,"".concat(at,"-readonly"),Lr),(0,_e.Z)(zt,"".concat(at,"-not-a-number"),ia.isNaN()),(0,_e.Z)(zt,"".concat(at,"-out-of-range"),!ia.isInvalidate()&&!je(ia)),zt)),style:on,onFocus:function(){po(!0)},onBlur:ir,onKeyDown:Gt,onKeyUp:kn,onCompositionStart:Wt,onCompositionEnd:Sn,onBeforeInput:un},Ui&&Ue.createElement(an,{prefixCls:at,upNode:Dr,downNode:hi,upDisabled:sn,downDisabled:bn,onStep:En}),Ue.createElement("div",{className:"".concat(_a,"-wrap")},Ue.createElement("input",(0,ye.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":tn,"aria-valuemax":Mn,"aria-valuenow":ia.isInvalidate()?null:ia.toString(),step:rr},Ha,{ref:Mt(Ji,Et),className:_a,value:ki,onChange:Nn,disabled:yr,readOnly:Lr}))))}),Rn=Ue.forwardRef(function(ht,Et){var zt=ht.disabled,fn=ht.style,at=ht.prefixCls,Rt=ht.value,on=ht.prefix,tn=ht.suffix,Mn=ht.addonBefore,wn=ht.addonAfter,rr=ht.classes,zr=ht.className,vr=ht.classNames,yr=(0,ge.Z)(ht,Ht),Lr=Ue.useRef(null),Dr=function(Vn){Lr.current&&(0,dn.nH)(Lr.current,Vn)};return Ue.createElement(He.BaseInput,{inputElement:Ue.createElement(Yn,(0,ye.Z)({prefixCls:at,disabled:zt,classNames:vr,ref:Mt(Lr,Et)},yr)),className:zr,triggerFocus:Dr,prefixCls:at,value:Rt,disabled:zt,style:fn,prefix:on,suffix:tn,addonAfter:wn,addonBefore:Mn,classes:rr,classNames:vr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});Rn.displayName="InputNumber";var cr=Rn,Xr=cr,wr=ie(9708),kr=ie(53124),Ar=ie(46735),gi=ie(98866),oi=ie(98675),fi=ie(65223),Pi=ie(4173),Or=ie(47673),Jn=ie(14747),qn=ie(80110),nr=ie(67968),Ur=ie(45503);const li=(ht,Et)=>{let{componentCls:zt,borderRadiusSM:fn,borderRadiusLG:at}=ht;const Rt=Et==="lg"?at:fn;return{[`&-${Et}`]:{[`${zt}-handler-wrap`]:{borderStartEndRadius:Rt,borderEndEndRadius:Rt},[`${zt}-handler-up`]:{borderStartEndRadius:Rt},[`${zt}-handler-down`]:{borderEndEndRadius:Rt}}}},Lt=ht=>{const{componentCls:Et,lineWidth:zt,lineType:fn,colorBorder:at,borderRadius:Rt,fontSizeLG:on,controlHeightLG:tn,controlHeightSM:Mn,colorError:wn,paddingInlineSM:rr,colorTextDescription:zr,motionDurationMid:vr,handleHoverColor:yr,paddingInline:Lr,paddingBlock:Dr,handleBg:hi,handleActiveBg:Vn,colorTextDisabled:br,borderRadiusSM:Ui,borderRadiusLG:na,controlWidth:Wr,handleVisible:vi,handleBorderColor:ra}=ht;return[{[Et]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Jn.Wf)(ht)),(0,Or.ik)(ht)),(0,Or.bi)(ht,Et)),{display:"inline-block",width:Wr,margin:0,padding:0,border:`${zt}px ${fn} ${at}`,borderRadius:Rt,"&-rtl":{direction:"rtl",[`${Et}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:on,borderRadius:na,[`input${Et}-input`]:{height:tn-2*zt}},"&-sm":{padding:0,borderRadius:Ui,[`input${Et}-input`]:{height:Mn-2*zt,padding:`0 ${rr}px`}},"&:hover":Object.assign({},(0,Or.pU)(ht)),"&-focused":Object.assign({},(0,Or.M1)(ht)),"&-out-of-range":{[`${Et}-input-wrap`]:{input:{color:wn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Jn.Wf)(ht)),(0,Or.s7)(ht)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Et}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Et}-group-addon`]:{borderRadius:na,fontSize:ht.fontSizeLG}},"&-sm":{[`${Et}-group-addon`]:{borderRadius:Ui}},[`${Et}-wrapper-disabled > ${Et}-group-addon`]:Object.assign({},(0,Or.Xy)(ht))}}),[`&-disabled ${Et}-input`]:{cursor:"not-allowed"},[Et]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Jn.Wf)(ht)),{width:"100%",padding:`${Dr}px ${Lr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Rt,outline:0,transition:`all ${vr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Or.nz)(ht.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Et]:Object.assign(Object.assign(Object.assign({[`&:hover ${Et}-handler-wrap, &-focused ${Et}-handler-wrap`]:{opacity:1},[`${Et}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:ht.handleWidth,height:"100%",background:hi,borderStartStartRadius:0,borderStartEndRadius:Rt,borderEndEndRadius:Rt,borderEndStartRadius:0,opacity:vi===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${vr} linear ${vr}`,[`${Et}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${Et}-handler-up-inner,
|
|
|
${Et}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:ht.handleFontSize}}},[`${Et}-handler`]:{height:"50%",overflow:"hidden",color:zr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${zt}px ${fn} ${ra}`,transition:`all ${vr} linear`,"&:active":{background:Vn},"&:hover":{height:"60%",[`
|
|
|
${Et}-handler-up-inner,
|
|
|
${Et}-handler-down-inner
|
|
|
`]:{color:yr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Jn.Ro)()),{color:zr,transition:`all ${vr} linear`,userSelect:"none"})},[`${Et}-handler-up`]:{borderStartEndRadius:Rt},[`${Et}-handler-down`]:{borderBlockStart:`${zt}px ${fn} ${ra}`,borderEndEndRadius:Rt}},li(ht,"lg")),li(ht,"sm")),{"&-disabled, &-readonly":{[`${Et}-handler-wrap`]:{display:"none"},[`${Et}-input`]:{color:"inherit"}},[`
|
|
|
${Et}-handler-up-disabled,
|
|
|
${Et}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${Et}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${Et}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:br}})},{[`${Et}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Et}-handler-down`]:{borderBlockStartWidth:0}}}]},Kn=ht=>{const{componentCls:Et,paddingBlock:zt,paddingInline:fn,inputAffixPadding:at,controlWidth:Rt,borderRadiusLG:on,borderRadiusSM:tn}=ht;return{[`${Et}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,Or.ik)(ht)),(0,Or.bi)(ht,`${Et}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Rt,padding:0,paddingInlineStart:fn,"&-lg":{borderRadius:on},"&-sm":{borderRadius:tn},[`&:not(${Et}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,Or.pU)(ht)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Et}-disabled`]:{background:"transparent"},[`> div${Et}`]:{width:"100%",border:"none",outline:"none",[`&${Et}-focused`]:{boxShadow:"none !important"}},[`input${Et}-input`]:{padding:`${zt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Et}-handler-wrap`]:{zIndex:2},[Et]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:at},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:fn,marginInlineStart:at}}})}};var Bn=(0,nr.Z)("InputNumber",ht=>{const Et=(0,Ur.TS)(ht,(0,Or.e5)(ht));return[Lt(Et),Kn(Et),(0,qn.c)(Et)]},ht=>Object.assign(Object.assign({},(0,Or.TM)(ht)),{controlWidth:90,handleWidth:ht.controlHeightSM-ht.lineWidth*2,handleFontSize:ht.fontSize/2,handleVisible:"auto",handleActiveBg:ht.colorFillAlter,handleBg:ht.colorBgContainer,handleHoverColor:ht.colorPrimary,handleBorderColor:ht.colorBorder})),yn=function(ht,Et){var zt={};for(var fn in ht)Object.prototype.hasOwnProperty.call(ht,fn)&&Et.indexOf(fn)<0&&(zt[fn]=ht[fn]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,fn=Object.getOwnPropertySymbols(ht);at<fn.length;at++)Et.indexOf(fn[at])<0&&Object.prototype.propertyIsEnumerable.call(ht,fn[at])&&(zt[fn[at]]=ht[fn[at]]);return zt};const xr=Ue.forwardRef((ht,Et)=>{const{getPrefixCls:zt,direction:fn}=Ue.useContext(kr.E_),at=Ue.useRef(null);Ue.useImperativeHandle(Et,()=>at.current);const{className:Rt,rootClassName:on,size:tn,disabled:Mn,prefixCls:wn,addonBefore:rr,addonAfter:zr,prefix:vr,bordered:yr=!0,readOnly:Lr,status:Dr,controls:hi}=ht,Vn=yn(ht,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),br=zt("input-number",wn),[Ui,na]=Bn(br),{compactSize:Wr,compactItemClassnames:vi}=(0,Pi.ri)(br,fn);let ra=Ue.createElement(Te.Z,{className:`${br}-handler-up-inner`}),Kr=Ue.createElement(fe.Z,{className:`${br}-handler-down-inner`});const Vi=typeof hi=="boolean"?hi:void 0;typeof hi=="object"&&(ra=typeof hi.upIcon=="undefined"?ra:Ue.createElement("span",{className:`${br}-handler-up-inner`},hi.upIcon),Kr=typeof hi.downIcon=="undefined"?Kr:Ue.createElement("span",{className:`${br}-handler-down-inner`},hi.downIcon));const{hasFeedback:lr,status:Na,isFormItemInput:Ca,feedbackIcon:ho}=Ue.useContext(fi.aM),Ha=(0,wr.F)(Na,Dr),_a=(0,oi.Z)(ja=>{var Pa;return(Pa=tn!=null?tn:Wr)!==null&&Pa!==void 0?Pa:ja}),Ji=Ue.useContext(gi.Z),Fa=Mn!=null?Mn:Ji,ya=Ge()({[`${br}-lg`]:_a==="large",[`${br}-sm`]:_a==="small",[`${br}-rtl`]:fn==="rtl",[`${br}-borderless`]:!yr,[`${br}-in-form-item`]:Ca},(0,wr.Z)(br,Ha),vi,na),Wa=`${br}-group`,po=Ue.createElement(Xr,Object.assign({ref:at,disabled:Fa,className:Ge()(Rt,on),upHandler:ra,downHandler:Kr,prefixCls:br,readOnly:Lr,controls:Vi,prefix:vr,suffix:lr&&ho,addonAfter:zr&&Ue.createElement(Pi.BR,null,Ue.createElement(fi.Ux,{override:!0,status:!0},zr)),addonBefore:rr&&Ue.createElement(Pi.BR,null,Ue.createElement(fi.Ux,{override:!0,status:!0},rr)),classNames:{input:ya},classes:{affixWrapper:Ge()((0,wr.Z)(`${br}-affix-wrapper`,Ha,lr),{[`${br}-affix-wrapper-sm`]:_a==="small",[`${br}-affix-wrapper-lg`]:_a==="large",[`${br}-affix-wrapper-rtl`]:fn==="rtl",[`${br}-affix-wrapper-borderless`]:!yr},na),wrapper:Ge()({[`${Wa}-rtl`]:fn==="rtl",[`${br}-wrapper-disabled`]:Fa},na),group:Ge()({[`${br}-group-wrapper-sm`]:_a==="small",[`${br}-group-wrapper-lg`]:_a==="large",[`${br}-group-wrapper-rtl`]:fn==="rtl"},(0,wr.Z)(`${br}-group-wrapper`,Ha,lr),na)}},Vn));return Ui(po)}),Sr=xr,mr=ht=>Ue.createElement(Ar.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},Ue.createElement(xr,Object.assign({},ht)));Sr._InternalPanelDoNotUseOrYouWillBeFired=mr;var Qn=Sr},82586:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Dt},n:function(){return be}});var fe=ie(16646),Te=ie(94184),Re=ie.n(Te),Ge=ie(67656),ye=ie(17799),_e=ie(67294),ce=ie(9708),ke=ie(53124),ge=ie(98866),Ae=ie(98675),lt=ie(65223),ze=ie(4173),st=ie(72922),dt=ie(47673);function ct(it){return!!(it.prefix||it.suffix||it.allowClear)}var qe=function(it,ot){var Ce={};for(var Se in it)Object.prototype.hasOwnProperty.call(it,Se)&&ot.indexOf(Se)<0&&(Ce[Se]=it[Se]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Se=Object.getOwnPropertySymbols(it);He<Se.length;He++)ot.indexOf(Se[He])<0&&Object.prototype.propertyIsEnumerable.call(it,Se[He])&&(Ce[Se[He]]=it[Se[He]]);return Ce};function be(it,ot){if(!it)return;it.focus(ot);const{cursor:Ce}=ot||{};if(Ce){const Se=it.value.length;switch(Ce){case"start":it.setSelectionRange(0,0);break;case"end":it.setSelectionRange(Se,Se);break;default:it.setSelectionRange(0,Se);break}}}var Dt=(0,_e.forwardRef)((it,ot)=>{var Ce;const{prefixCls:Se,bordered:He=!0,status:Ue,size:xt,disabled:mt,onBlur:ut,onFocus:$e,suffix:Ft,allowClear:yt,addonAfter:gn,addonBefore:rt,className:Mt,style:en,styles:Yt,rootClassName:Qe,onChange:Ie,classNames:Ot}=it,In=qe(it,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:mn,direction:pt,input:wt}=_e.useContext(ke.E_),Qt=mn("input",Se),Zn=(0,_e.useRef)(null),[Cn,rn]=(0,dt.ZP)(Qt),{compactSize:ln,compactItemClassnames:zn}=(0,ze.ri)(Qt,pt),_n=(0,Ae.Z)(It=>{var Ht;return(Ht=xt!=null?xt:ln)!==null&&Ht!==void 0?Ht:It}),Oe=_e.useContext(ge.Z),ue=mt!=null?mt:Oe,{status:le,hasFeedback:ve,feedbackIcon:pe}=(0,_e.useContext)(lt.aM),se=(0,ce.F)(le,Ue),Be=ct(it)||!!ve,ft=(0,_e.useRef)(Be);(0,_e.useEffect)(()=>{var It;Be&&ft.current,ft.current=Be},[Be]);const Bt=(0,st.Z)(Zn,!0),qt=It=>{Bt(),ut==null||ut(It)},an=It=>{Bt(),$e==null||$e(It)},vn=It=>{Bt(),Ie==null||Ie(It)},dn=(ve||Ft)&&_e.createElement(_e.Fragment,null,Ft,ve&&pe);let gt;return typeof yt=="object"&&(yt!=null&&yt.clearIcon)?gt=yt:yt&&(gt={clearIcon:_e.createElement(fe.Z,null)}),Cn(_e.createElement(Ge.default,Object.assign({ref:(0,ye.sQ)(ot,Zn),prefixCls:Qt,autoComplete:wt==null?void 0:wt.autoComplete},In,{disabled:ue,onBlur:qt,onFocus:an,style:Object.assign(Object.assign({},wt==null?void 0:wt.style),en),styles:Object.assign(Object.assign({},wt==null?void 0:wt.styles),Yt),suffix:dn,allowClear:gt,className:Re()(Mt,Qe,zn,wt==null?void 0:wt.className),onChange:vn,addonAfter:gn&&_e.createElement(ze.BR,null,_e.createElement(lt.Ux,{override:!0,status:!0},gn)),addonBefore:rt&&_e.createElement(ze.BR,null,_e.createElement(lt.Ux,{override:!0,status:!0},rt)),classNames:Object.assign(Object.assign(Object.assign({},Ot),wt==null?void 0:wt.classNames),{input:Re()({[`${Qt}-sm`]:_n==="small",[`${Qt}-lg`]:_n==="large",[`${Qt}-rtl`]:pt==="rtl",[`${Qt}-borderless`]:!He},!Be&&(0,ce.Z)(Qt,se),Ot==null?void 0:Ot.input,(Ce=wt==null?void 0:wt.classNames)===null||Ce===void 0?void 0:Ce.input,rn)}),classes:{affixWrapper:Re()({[`${Qt}-affix-wrapper-sm`]:_n==="small",[`${Qt}-affix-wrapper-lg`]:_n==="large",[`${Qt}-affix-wrapper-rtl`]:pt==="rtl",[`${Qt}-affix-wrapper-borderless`]:!He},(0,ce.Z)(`${Qt}-affix-wrapper`,se,ve),rn),wrapper:Re()({[`${Qt}-group-rtl`]:pt==="rtl"},rn),group:Re()({[`${Qt}-group-wrapper-sm`]:_n==="small",[`${Qt}-group-wrapper-lg`]:_n==="large",[`${Qt}-group-wrapper-rtl`]:pt==="rtl",[`${Qt}-group-wrapper-disabled`]:ue},(0,ce.Z)(`${Qt}-group-wrapper`,se,ve),rn)}})))})},96330:function(Ln,Kt,ie){"use strict";var fe=ie(16646),Te=ie(94184),Re=ie.n(Te),Ge=ie(64701),ye=ie(67294),_e=ie(9708),ce=ie(53124),ke=ie(98866),ge=ie(98675),Ae=ie(65223),lt=ie(82586),ze=ie(47673),st=function(ct,qe){var be={};for(var vt in ct)Object.prototype.hasOwnProperty.call(ct,vt)&&qe.indexOf(vt)<0&&(be[vt]=ct[vt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,vt=Object.getOwnPropertySymbols(ct);Dt<vt.length;Dt++)qe.indexOf(vt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(ct,vt[Dt])&&(be[vt[Dt]]=ct[vt[Dt]]);return be};const dt=(0,ye.forwardRef)((ct,qe)=>{const{prefixCls:be,bordered:vt=!0,size:Dt,disabled:it,status:ot,allowClear:Ce,showCount:Se,classNames:He,rootClassName:Ue,className:xt}=ct,mt=st(ct,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ut,direction:$e}=ye.useContext(ce.E_),Ft=(0,ge.Z)(Dt),yt=ye.useContext(ke.Z),gn=it!=null?it:yt,{status:rt,hasFeedback:Mt,feedbackIcon:en}=ye.useContext(Ae.aM),Yt=(0,_e.F)(rt,ot),Qe=ye.useRef(null);ye.useImperativeHandle(qe,()=>{var pt;return{resizableTextArea:(pt=Qe.current)===null||pt===void 0?void 0:pt.resizableTextArea,focus:wt=>{var Qt,Zn;(0,lt.n)((Zn=(Qt=Qe.current)===null||Qt===void 0?void 0:Qt.resizableTextArea)===null||Zn===void 0?void 0:Zn.textArea,wt)},blur:()=>{var wt;return(wt=Qe.current)===null||wt===void 0?void 0:wt.blur()}}});const Ie=ut("input",be);let Ot;typeof Ce=="object"&&(Ce!=null&&Ce.clearIcon)?Ot=Ce:Ce&&(Ot={clearIcon:ye.createElement(fe.Z,null)});const[In,mn]=(0,ze.ZP)(Ie);return In(ye.createElement(Ge.default,Object.assign({},mt,{disabled:gn,allowClear:Ot,className:Re()(xt,Ue),classes:{affixWrapper:Re()(`${Ie}-textarea-affix-wrapper`,{[`${Ie}-affix-wrapper-rtl`]:$e==="rtl",[`${Ie}-affix-wrapper-borderless`]:!vt,[`${Ie}-affix-wrapper-sm`]:Ft==="small",[`${Ie}-affix-wrapper-lg`]:Ft==="large",[`${Ie}-textarea-show-count`]:Se},(0,_e.Z)(`${Ie}-affix-wrapper`,Yt),mn)},classNames:Object.assign(Object.assign({},He),{textarea:Re()({[`${Ie}-borderless`]:!vt,[`${Ie}-sm`]:Ft==="small",[`${Ie}-lg`]:Ft==="large"},(0,_e.Z)(Ie,Yt),mn,He==null?void 0:He.textarea)}),prefixCls:Ie,suffix:Mt&&ye.createElement("span",{className:`${Ie}-textarea-suffix`},en),showCount:Se,ref:Qe})))});Kt.Z=dt},72922:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});var fe=ie(67294);function Te(Re,Ge){const ye=(0,fe.useRef)([]),_e=()=>{ye.current.push(setTimeout(()=>{var ce,ke,ge,Ae;!((ce=Re.current)===null||ce===void 0)&&ce.input&&((ke=Re.current)===null||ke===void 0?void 0:ke.input.getAttribute("type"))==="password"&&(!((ge=Re.current)===null||ge===void 0)&&ge.input.hasAttribute("value"))&&((Ae=Re.current)===null||Ae===void 0||Ae.input.removeAttribute("value"))}))};return(0,fe.useEffect)(()=>(Ge&&_e(),()=>ye.current.forEach(ce=>{ce&&clearTimeout(ce)})),[]),_e}},69677:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return Ft}});var fe=ie(94184),Te=ie.n(fe),Re=ie(67294),Ge=ie(53124),ye=ie(65223),_e=ie(47673),ke=yt=>{const{getPrefixCls:gn,direction:rt}=(0,Re.useContext)(Ge.E_),{prefixCls:Mt,className:en}=yt,Yt=gn("input-group",Mt),Qe=gn("input"),[Ie,Ot]=(0,_e.ZP)(Qe),In=Te()(Yt,{[`${Yt}-lg`]:yt.size==="large",[`${Yt}-sm`]:yt.size==="small",[`${Yt}-compact`]:yt.compact,[`${Yt}-rtl`]:rt==="rtl"},Ot,en),mn=(0,Re.useContext)(ye.aM),pt=(0,Re.useMemo)(()=>Object.assign(Object.assign({},mn),{isFormItemInput:!1}),[mn]);return Ie(Re.createElement("span",{className:In,style:yt.style,onMouseEnter:yt.onMouseEnter,onMouseLeave:yt.onMouseLeave,onFocus:yt.onFocus,onBlur:yt.onBlur},Re.createElement(ye.aM.Provider,{value:pt},yt.children)))},ge=ie(82586),Ae=ie(63237),lt=ie(99569),ze=ie(10366),st=ie(17799),dt=ie(72922),ct=function(yt,gn){var rt={};for(var Mt in yt)Object.prototype.hasOwnProperty.call(yt,Mt)&&gn.indexOf(Mt)<0&&(rt[Mt]=yt[Mt]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Mt=Object.getOwnPropertySymbols(yt);en<Mt.length;en++)gn.indexOf(Mt[en])<0&&Object.prototype.propertyIsEnumerable.call(yt,Mt[en])&&(rt[Mt[en]]=yt[Mt[en]]);return rt};const qe=yt=>yt?Re.createElement(lt.Z,null):Re.createElement(Ae.Z,null),be={click:"onClick",hover:"onMouseOver"};var Dt=Re.forwardRef((yt,gn)=>{const{visibilityToggle:rt=!0}=yt,Mt=typeof rt=="object"&&rt.visible!==void 0,[en,Yt]=(0,Re.useState)(()=>Mt?rt.visible:!1),Qe=(0,Re.useRef)(null);Re.useEffect(()=>{Mt&&Yt(rt.visible)},[Mt,rt]);const Ie=(0,dt.Z)(Qe),Ot=()=>{const{disabled:ue}=yt;ue||(en&&Ie(),Yt(le=>{var ve;const pe=!le;return typeof rt=="object"&&((ve=rt.onVisibleChange)===null||ve===void 0||ve.call(rt,pe)),pe}))},In=ue=>{const{action:le="click",iconRender:ve=qe}=yt,pe=be[le]||"",se=ve(en),Be={[pe]:Ot,className:`${ue}-icon`,key:"passwordIcon",onMouseDown:ft=>{ft.preventDefault()},onMouseUp:ft=>{ft.preventDefault()}};return Re.cloneElement(Re.isValidElement(se)?se:Re.createElement("span",null,se),Be)},{className:mn,prefixCls:pt,inputPrefixCls:wt,size:Qt}=yt,Zn=ct(yt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Cn}=Re.useContext(Ge.E_),rn=Cn("input",wt),ln=Cn("input-password",pt),zn=rt&&In(ln),_n=Te()(ln,mn,{[`${ln}-${Qt}`]:!!Qt}),Oe=Object.assign(Object.assign({},(0,ze.Z)(Zn,["suffix","iconRender","visibilityToggle"])),{type:en?"text":"password",className:_n,prefixCls:rn,suffix:zn});return Qt&&(Oe.size=Qt),Re.createElement(ge.Z,Object.assign({ref:(0,st.sQ)(gn,Qe)},Oe))}),it=ie(72395),ot=ie(96159),Ce=ie(71577),Se=ie(98675),He=ie(4173),Ue=function(yt,gn){var rt={};for(var Mt in yt)Object.prototype.hasOwnProperty.call(yt,Mt)&&gn.indexOf(Mt)<0&&(rt[Mt]=yt[Mt]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Mt=Object.getOwnPropertySymbols(yt);en<Mt.length;en++)gn.indexOf(Mt[en])<0&&Object.prototype.propertyIsEnumerable.call(yt,Mt[en])&&(rt[Mt[en]]=yt[Mt[en]]);return rt},mt=Re.forwardRef((yt,gn)=>{const{prefixCls:rt,inputPrefixCls:Mt,className:en,size:Yt,suffix:Qe,enterButton:Ie=!1,addonAfter:Ot,loading:In,disabled:mn,onSearch:pt,onChange:wt,onCompositionStart:Qt,onCompositionEnd:Zn}=yt,Cn=Ue(yt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:rn,direction:ln}=Re.useContext(Ge.E_),zn=Re.useRef(!1),_n=rn("input-search",rt),Oe=rn("input",Mt),{compactSize:ue}=(0,He.ri)(_n,ln),le=(0,Se.Z)(Xt=>{var Tt;return(Tt=Yt!=null?Yt:ue)!==null&&Tt!==void 0?Tt:Xt}),ve=Re.useRef(null),pe=Xt=>{Xt&&Xt.target&&Xt.type==="click"&&pt&&pt(Xt.target.value,Xt,{source:"clear"}),wt&&wt(Xt)},se=Xt=>{var Tt;document.activeElement===((Tt=ve.current)===null||Tt===void 0?void 0:Tt.input)&&Xt.preventDefault()},Be=Xt=>{var Tt,Yn;pt&&pt((Yn=(Tt=ve.current)===null||Tt===void 0?void 0:Tt.input)===null||Yn===void 0?void 0:Yn.value,Xt,{source:"input"})},ft=Xt=>{zn.current||In||Be(Xt)},Bt=typeof Ie=="boolean"?Re.createElement(it.Z,null):null,qt=`${_n}-button`;let an;const vn=Ie||{},dn=vn.type&&vn.type.__ANT_BUTTON===!0;dn||vn.type==="button"?an=(0,ot.Tm)(vn,Object.assign({onMouseDown:se,onClick:Xt=>{var Tt,Yn;(Yn=(Tt=vn==null?void 0:vn.props)===null||Tt===void 0?void 0:Tt.onClick)===null||Yn===void 0||Yn.call(Tt,Xt),Be(Xt)},key:"enterButton"},dn?{className:qt,size:le}:{})):an=Re.createElement(Ce.ZP,{className:qt,type:Ie?"primary":void 0,size:le,disabled:mn,key:"enterButton",onMouseDown:se,onClick:Be,loading:In,icon:Bt},Ie),Ot&&(an=[an,(0,ot.Tm)(Ot,{key:"addonAfter"})]);const gt=Te()(_n,{[`${_n}-rtl`]:ln==="rtl",[`${_n}-${le}`]:!!le,[`${_n}-with-button`]:!!Ie},en),It=Xt=>{zn.current=!0,Qt==null||Qt(Xt)},Ht=Xt=>{zn.current=!1,Zn==null||Zn(Xt)};return Re.createElement(ge.Z,Object.assign({ref:(0,st.sQ)(ve,gn),onPressEnter:ft},Cn,{size:le,onCompositionStart:It,onCompositionEnd:Ht,prefixCls:Oe,addonAfter:an,suffix:Qe,onChange:pe,className:gt,disabled:mn}))}),ut=ie(96330);const $e=ge.Z;$e.Group=ke,$e.Search=mt,$e.TextArea=ut.Z,$e.Password=Dt;var Ft=$e},47673:function(Ln,Kt,ie){"use strict";ie.d(Kt,{M1:function(){return ce},TM:function(){return ot},Xy:function(){return ke},bi:function(){return lt},e5:function(){return it},ik:function(){return ze},nz:function(){return ye},pU:function(){return _e},s7:function(){return st},x0:function(){return Ae}});var fe=ie(14747),Te=ie(80110),Re=ie(45503),Ge=ie(67968);const ye=Ce=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ce,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),_e=Ce=>({borderColor:Ce.hoverBorderColor}),ce=Ce=>({borderColor:Ce.activeBorderColor,boxShadow:Ce.activeShadow,outline:0}),ke=Ce=>({color:Ce.colorTextDisabled,backgroundColor:Ce.colorBgContainerDisabled,borderColor:Ce.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},_e((0,Re.TS)(Ce,{hoverBorderColor:Ce.colorBorder})))}),ge=Ce=>{const{paddingBlockLG:Se,fontSizeLG:He,lineHeightLG:Ue,borderRadiusLG:xt,paddingInlineLG:mt}=Ce;return{padding:`${Se}px ${mt}px`,fontSize:He,lineHeight:Ue,borderRadius:xt}},Ae=Ce=>({padding:`${Ce.paddingBlockSM}px ${Ce.paddingInlineSM}px`,borderRadius:Ce.borderRadiusSM}),lt=(Ce,Se)=>{const{componentCls:He,colorError:Ue,colorWarning:xt,errorActiveShadow:mt,warningActiveShadow:ut,colorErrorBorderHover:$e,colorWarningBorderHover:Ft}=Ce;return{[`&-status-error:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:Ue,"&:hover":{borderColor:$e},"&:focus, &-focused":Object.assign({},ce((0,Re.TS)(Ce,{activeBorderColor:Ue,activeShadow:mt}))),[`${He}-prefix, ${He}-suffix`]:{color:Ue}},[`&-status-warning:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:xt,"&:hover":{borderColor:Ft},"&:focus, &-focused":Object.assign({},ce((0,Re.TS)(Ce,{activeBorderColor:xt,activeShadow:ut}))),[`${He}-prefix, ${He}-suffix`]:{color:xt}}}},ze=Ce=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Ce.paddingBlock}px ${Ce.paddingInline}px`,color:Ce.colorText,fontSize:Ce.fontSize,lineHeight:Ce.lineHeight,backgroundColor:Ce.colorBgContainer,backgroundImage:"none",borderWidth:Ce.lineWidth,borderStyle:Ce.lineType,borderColor:Ce.colorBorder,borderRadius:Ce.borderRadius,transition:`all ${Ce.motionDurationMid}`},ye(Ce.colorTextPlaceholder)),{"&:hover":Object.assign({},_e(Ce)),"&:focus, &-focused":Object.assign({},ce(Ce)),"&-disabled, &[disabled]":Object.assign({},ke(Ce)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Ce.controlHeight,lineHeight:Ce.lineHeight,verticalAlign:"bottom",transition:`all ${Ce.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},ge(Ce)),"&-sm":Object.assign({},Ae(Ce)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),st=Ce=>{const{componentCls:Se,antCls:He}=Ce;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ce.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Se}, &-lg > ${Se}-group-addon`]:Object.assign({},ge(Ce)),[`&-sm ${Se}, &-sm > ${Se}-group-addon`]:Object.assign({},Ae(Ce)),[`&-lg ${He}-select-single ${He}-select-selector`]:{height:Ce.controlHeightLG},[`&-sm ${He}-select-single ${He}-select-selector`]:{height:Ce.controlHeightSM},[`> ${Se}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Se}-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 ${Ce.paddingInline}px`,color:Ce.colorText,fontWeight:"normal",fontSize:Ce.fontSize,textAlign:"center",backgroundColor:Ce.colorFillAlter,border:`${Ce.lineWidth}px ${Ce.lineType} ${Ce.colorBorder}`,borderRadius:Ce.borderRadius,transition:`all ${Ce.motionDurationSlow}`,lineHeight:1,[`${He}-select`]:{margin:`-${Ce.paddingBlock+1}px -${Ce.paddingInline}px`,[`&${He}-select-single:not(${He}-select-customize-input)`]:{[`${He}-select-selector`]:{backgroundColor:"inherit",border:`${Ce.lineWidth}px ${Ce.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${He}-select-selector`]:{color:Ce.colorPrimary}}},[`${He}-cascader-picker`]:{margin:`-9px -${Ce.paddingInline}px`,backgroundColor:"transparent",[`${He}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Se}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Se}-search-with-button &`]:{zIndex:0}}},[`> ${Se}:first-child, ${Se}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${He}-select ${He}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}-affix-wrapper`]:{[`&:not(:first-child) ${Se}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Se}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}:last-child, ${Se}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${He}-select ${He}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Se}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Se}-search &`]:{borderStartStartRadius:Ce.borderRadius,borderEndStartRadius:Ce.borderRadius}},[`&:not(:first-child), ${Se}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Se}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,fe.dF)()),{[`${Se}-group-addon, ${Se}-group-wrap, > ${Se}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ce.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${Se}-affix-wrapper,
|
|
|
& > ${Se}-number-affix-wrapper,
|
|
|
& > ${He}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ce.lineWidth,borderInlineEndWidth:Ce.lineWidth},[`${Se}`]:{float:"none"},[`& > ${He}-select > ${He}-select-selector,
|
|
|
& > ${He}-select-auto-complete ${Se},
|
|
|
& > ${He}-cascader-picker ${Se},
|
|
|
& > ${Se}-group-wrapper ${Se}`]:{borderInlineEndWidth:Ce.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${He}-select-focused`]:{zIndex:1},[`& > ${He}-select > ${He}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${He}-select:first-child > ${He}-select-selector,
|
|
|
& > ${He}-select-auto-complete:first-child ${Se},
|
|
|
& > ${He}-cascader-picker:first-child ${Se}`]:{borderStartStartRadius:Ce.borderRadius,borderEndStartRadius:Ce.borderRadius},[`& > *:last-child,
|
|
|
& > ${He}-select:last-child > ${He}-select-selector,
|
|
|
& > ${He}-cascader-picker:last-child ${Se},
|
|
|
& > ${He}-cascader-picker-focused:last-child ${Se}`]:{borderInlineEndWidth:Ce.lineWidth,borderStartEndRadius:Ce.borderRadius,borderEndEndRadius:Ce.borderRadius},[`& > ${He}-select-auto-complete ${Se}`]:{verticalAlign:"top"},[`${Se}-group-wrapper + ${Se}-group-wrapper`]:{marginInlineStart:-Ce.lineWidth,[`${Se}-affix-wrapper`]:{borderRadius:0}},[`${Se}-group-wrapper:not(:last-child)`]:{[`&${Se}-search > ${Se}-group`]:{[`& > ${Se}-group-addon > ${Se}-search-button`]:{borderRadius:0},[`& > ${Se}`]:{borderStartStartRadius:Ce.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ce.borderRadius}}}})}},dt=Ce=>{const{componentCls:Se,controlHeightSM:He,lineWidth:Ue}=Ce,mt=(He-Ue*2-16)/2;return{[Se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ce)),ze(Ce)),lt(Ce,Se)),{'&[type="color"]':{height:Ce.controlHeight,[`&${Se}-lg`]:{height:Ce.controlHeightLG},[`&${Se}-sm`]:{height:He,paddingTop:mt,paddingBottom:mt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},ct=Ce=>{const{componentCls:Se}=Ce;return{[`${Se}-clear-icon`]:{margin:0,color:Ce.colorTextQuaternary,fontSize:Ce.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Ce.motionDurationSlow}`,"&:hover":{color:Ce.colorTextTertiary},"&:active":{color:Ce.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Ce.inputAffixPadding}px`}}}},qe=Ce=>{const{componentCls:Se,inputAffixPadding:He,colorTextDescription:Ue,motionDurationSlow:xt,colorIcon:mt,colorIconHover:ut,iconCls:$e}=Ce;return{[`${Se}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ze(Ce)),{display:"inline-flex",[`&:not(${Se}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},_e(Ce)),{zIndex:1,[`${Se}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Se}[disabled]`]:{background:"transparent"}},[`> input${Se}`]:{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"'},[`${Se}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Ce.paddingXS}},"&-show-count-suffix":{color:Ue},"&-show-count-has-suffix":{marginInlineEnd:Ce.paddingXXS},"&-prefix":{marginInlineEnd:He},"&-suffix":{marginInlineStart:He}}}),ct(Ce)),{[`${$e}${Se}-password-icon`]:{color:mt,cursor:"pointer",transition:`all ${xt}`,"&:hover":{color:ut}}}),lt(Ce,`${Se}-affix-wrapper`))}},be=Ce=>{const{componentCls:Se,colorError:He,colorWarning:Ue,borderRadiusLG:xt,borderRadiusSM:mt}=Ce;return{[`${Se}-group`]:Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(Ce)),st(Ce)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Se}-group-addon`]:{borderRadius:xt,fontSize:Ce.fontSizeLG}},"&-sm":{[`${Se}-group-addon`]:{borderRadius:mt}},"&-status-error":{[`${Se}-group-addon`]:{color:He,borderColor:He}},"&-status-warning":{[`${Se}-group-addon`]:{color:Ue,borderColor:Ue}},"&-disabled":{[`${Se}-group-addon`]:Object.assign({},ke(Ce))},[`&:not(${Se}-compact-first-item):not(${Se}-compact-last-item)${Se}-compact-item`]:{[`${Se}, ${Se}-group-addon`]:{borderRadius:0}},[`&:not(${Se}-compact-last-item)${Se}-compact-first-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Se}-compact-first-item)${Se}-compact-last-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},vt=Ce=>{const{componentCls:Se,antCls:He}=Ce,Ue=`${Se}-search`;return{[Ue]:{[`${Se}`]:{"&:hover, &:focus":{borderColor:Ce.colorPrimaryHover,[`+ ${Se}-group-addon ${Ue}-button:not(${He}-btn-primary)`]:{borderInlineStartColor:Ce.colorPrimaryHover}}},[`${Se}-affix-wrapper`]:{borderRadius:0},[`${Se}-lg`]:{lineHeight:Ce.lineHeightLG-2e-4},[`> ${Se}-group`]:{[`> ${Se}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ue}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ce.borderRadius,borderEndEndRadius:Ce.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ue}-button:not(${He}-btn-primary)`]:{color:Ce.colorTextDescription,"&:hover":{color:Ce.colorPrimaryHover},"&:active":{color:Ce.colorPrimaryActive},[`&${He}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ue}-button`]:{height:Ce.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ue}-button`]:{height:Ce.controlHeightLG},[`&-small ${Ue}-button`]:{height:Ce.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Se}-compact-item`]:{[`&:not(${Se}-compact-last-item)`]:{[`${Se}-group-addon`]:{[`${Se}-search-button`]:{marginInlineEnd:-Ce.lineWidth,borderRadius:0}}},[`&:not(${Se}-compact-first-item)`]:{[`${Se},${Se}-affix-wrapper`]:{borderRadius:0}},[`> ${Se}-group-addon ${Se}-search-button,
|
|
|
> ${Se},
|
|
|
${Se}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Se}-affix-wrapper-focused`]:{zIndex:2}}}}},Dt=Ce=>{const{componentCls:Se,paddingLG:He}=Ce,Ue=`${Se}-textarea`;return{[Ue]:{position:"relative","&-show-count":{[`> ${Se}`]:{height:"100%"},[`${Se}-data-count`]:{position:"absolute",bottom:-Ce.fontSize*Ce.lineHeight,insetInlineEnd:0,color:Ce.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Se}`]:{paddingInlineEnd:He}},[`&-affix-wrapper${Ue}-has-feedback`]:{[`${Se}`]:{paddingInlineEnd:He}},[`&-affix-wrapper${Se}-affix-wrapper`]:{padding:0,[`> textarea${Se}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Se}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Se}-clear-icon`]:{position:"absolute",insetInlineEnd:Ce.paddingXS,insetBlockStart:Ce.paddingXS},[`${Ue}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ce.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function it(Ce){return(0,Re.TS)(Ce,{inputAffixPadding:Ce.paddingXXS})}const ot=Ce=>{const{controlHeight:Se,fontSize:He,lineHeight:Ue,lineWidth:xt,controlHeightSM:mt,controlHeightLG:ut,fontSizeLG:$e,lineHeightLG:Ft,paddingSM:yt,controlPaddingHorizontalSM:gn,controlPaddingHorizontal:rt,colorFillAlter:Mt,colorPrimaryHover:en,controlOutlineWidth:Yt,controlOutline:Qe,colorErrorOutline:Ie,colorWarningOutline:Ot}=Ce;return{paddingBlock:Math.max(Math.round((Se-He*Ue)/2*10)/10-xt,3),paddingBlockSM:Math.max(Math.round((mt-He*Ue)/2*10)/10-xt,0),paddingBlockLG:Math.ceil((ut-$e*Ft)/2*10)/10-xt,paddingInline:yt-xt,paddingInlineSM:gn-xt,paddingInlineLG:rt-xt,addonBg:Mt,activeBorderColor:en,hoverBorderColor:en,activeShadow:`0 0 0 ${Yt}px ${Qe}`,errorActiveShadow:`0 0 0 ${Yt}px ${Ie}`,warningActiveShadow:`0 0 0 ${Yt}px ${Ot}`}};Kt.ZP=(0,Ge.Z)("Input",Ce=>{const Se=(0,Re.TS)(Ce,it(Ce));return[dt(Se),Dt(Se),qe(Se),be(Se),vt(Se),(0,Te.c)(Se)]},ot)},71322:function(Ln,Kt,ie){"use strict";ie.d(Kt,{D:function(){return Dt},Z:function(){return Ce}});var fe=ie(87462),Te=ie(67294),Re={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"},Ge=Re,ye=ie(84089),_e=function(He,Ue){return Te.createElement(ye.Z,(0,fe.Z)({},He,{ref:Ue,icon:Ge}))},ce=Te.forwardRef(_e),ke=ie(22751),ge=ie(91034),Ae=ie(94184),lt=ie.n(Ae),ze=ie(10366),dt=Se=>!isNaN(parseFloat(Se))&&isFinite(Se),ct=ie(53124),qe=ie(84321),be=function(Se,He){var Ue={};for(var xt in Se)Object.prototype.hasOwnProperty.call(Se,xt)&&He.indexOf(xt)<0&&(Ue[xt]=Se[xt]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,xt=Object.getOwnPropertySymbols(Se);mt<xt.length;mt++)He.indexOf(xt[mt])<0&&Object.prototype.propertyIsEnumerable.call(Se,xt[mt])&&(Ue[xt[mt]]=Se[xt[mt]]);return Ue};const vt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Dt=Te.createContext({}),it=(()=>{let Se=0;return function(){let He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Se+=1,`${He}${Se}`}})();var Ce=Te.forwardRef((Se,He)=>{const{prefixCls:Ue,className:xt,trigger:mt,children:ut,defaultCollapsed:$e=!1,theme:Ft="dark",style:yt={},collapsible:gn=!1,reverseArrow:rt=!1,width:Mt=200,collapsedWidth:en=80,zeroWidthTriggerStyle:Yt,breakpoint:Qe,onCollapse:Ie,onBreakpoint:Ot}=Se,In=be(Se,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:mn}=(0,Te.useContext)(qe.Gs),[pt,wt]=(0,Te.useState)("collapsed"in Se?Se.collapsed:$e),[Qt,Zn]=(0,Te.useState)(!1);(0,Te.useEffect)(()=>{"collapsed"in Se&&wt(Se.collapsed)},[Se.collapsed]);const Cn=(ue,le)=>{"collapsed"in Se||wt(ue),Ie==null||Ie(ue,le)},rn=(0,Te.useRef)();rn.current=ue=>{Zn(ue.matches),Ot==null||Ot(ue.matches),pt!==ue.matches&&Cn(ue.matches,"responsive")},(0,Te.useEffect)(()=>{function ue(ve){return rn.current(ve)}let le;if(typeof window!="undefined"){const{matchMedia:ve}=window;if(ve&&Qe&&Qe in vt){le=ve(`(max-width: ${vt[Qe]})`);try{le.addEventListener("change",ue)}catch(pe){le.addListener(ue)}ue(le)}}return()=>{try{le==null||le.removeEventListener("change",ue)}catch(ve){le==null||le.removeListener(ue)}}},[Qe]),(0,Te.useEffect)(()=>{const ue=it("ant-sider-");return mn.addSider(ue),()=>mn.removeSider(ue)},[]);const ln=()=>{Cn(!pt,"clickTrigger")},{getPrefixCls:zn}=(0,Te.useContext)(ct.E_),_n=()=>{const ue=zn("layout-sider",Ue),le=(0,ze.Z)(In,["collapsed"]),ve=pt?en:Mt,pe=dt(ve)?`${ve}px`:String(ve),se=parseFloat(String(en||0))===0?Te.createElement("span",{onClick:ln,className:lt()(`${ue}-zero-width-trigger`,`${ue}-zero-width-trigger-${rt?"right":"left"}`),style:Yt},mt||Te.createElement(ce,null)):null,Bt={expanded:rt?Te.createElement(ge.Z,null):Te.createElement(ke.Z,null),collapsed:rt?Te.createElement(ke.Z,null):Te.createElement(ge.Z,null)}[pt?"collapsed":"expanded"],qt=mt!==null?se||Te.createElement("div",{className:`${ue}-trigger`,onClick:ln,style:{width:pe}},mt||Bt):null,an=Object.assign(Object.assign({},yt),{flex:`0 0 ${pe}`,maxWidth:pe,minWidth:pe,width:pe}),vn=lt()(ue,`${ue}-${Ft}`,{[`${ue}-collapsed`]:!!pt,[`${ue}-has-trigger`]:gn&&mt!==null&&!se,[`${ue}-below`]:!!Qt,[`${ue}-zero-width`]:parseFloat(pe)===0},xt);return Te.createElement("aside",Object.assign({className:vn},le,{style:an,ref:He}),Te.createElement("div",{className:`${ue}-children`},ut),gn||Qt&&se?qt:null)},Oe=Te.useMemo(()=>({siderCollapsed:pt}),[pt]);return Te.createElement(Dt.Provider,{value:Oe},_n())})},84321:function(Ln,Kt,ie){"use strict";ie.d(Kt,{VY:function(){return it},$_:function(){return Dt},h4:function(){return vt},Gs:function(){return st},ZP:function(){return ot}});var fe=ie(74902),Te=ie(94184),Re=ie.n(Te),Ge=ie(10366),ye=ie(67294),_e=ie(53124),ce=ie(67968),ge=Ce=>{const{componentCls:Se,bodyBg:He,lightSiderBg:Ue,lightTriggerBg:xt,lightTriggerColor:mt}=Ce;return{[`${Se}-sider-light`]:{background:Ue,[`${Se}-sider-trigger`]:{color:mt,background:xt},[`${Se}-sider-zero-width-trigger`]:{color:mt,background:xt,border:`1px solid ${He}`,borderInlineStart:0}}}};const Ae=Ce=>{const{antCls:Se,componentCls:He,colorText:Ue,triggerColor:xt,footerBg:mt,triggerBg:ut,headerHeight:$e,headerPadding:Ft,headerColor:yt,footerPadding:gn,triggerHeight:rt,zeroTriggerHeight:Mt,zeroTriggerWidth:en,motionDurationMid:Yt,motionDurationSlow:Qe,fontSize:Ie,borderRadius:Ot,bodyBg:In,headerBg:mn,siderBg:pt}=Ce;return{[He]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:In,"&, *":{boxSizing:"border-box"},[`&${He}-has-sider`]:{flexDirection:"row",[`> ${He}, > ${He}-content`]:{width:0}},[`${He}-header, &${He}-footer`]:{flex:"0 0 auto"},[`${He}-sider`]:{position:"relative",minWidth:0,background:pt,transition:`all ${Yt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Se}-menu${Se}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:rt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:rt,color:xt,lineHeight:`${rt}px`,textAlign:"center",background:ut,cursor:"pointer",transition:`all ${Yt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:$e,insetInlineEnd:-en,zIndex:1,width:en,height:Mt,color:xt,fontSize:Ce.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:pt,borderStartStartRadius:0,borderStartEndRadius:Ot,borderEndEndRadius:Ot,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-en,borderStartStartRadius:Ot,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ot}}}}},ge(Ce)),{"&-rtl":{direction:"rtl"}}),[`${He}-header`]:{height:$e,padding:Ft,color:yt,lineHeight:`${$e}px`,background:mn,[`${Se}-menu`]:{lineHeight:"inherit"}},[`${He}-footer`]:{padding:gn,color:Ue,fontSize:Ie,background:mt},[`${He}-content`]:{flex:"auto",minHeight:0}}};var lt=(0,ce.Z)("Layout",Ce=>[Ae(Ce)],Ce=>{const{colorBgLayout:Se,controlHeight:He,controlHeightLG:Ue,colorText:xt,controlHeightSM:mt,marginXXS:ut,colorTextLightSolid:$e,colorBgContainer:Ft}=Ce,yt=Ue*1.25;return{colorBgHeader:"#001529",colorBgBody:Se,colorBgTrigger:"#002140",bodyBg:Se,headerBg:"#001529",headerHeight:He*2,headerPadding:`0 ${yt}px`,headerColor:xt,footerPadding:`${mt}px ${yt}px`,footerBg:Se,siderBg:"#001529",triggerHeight:Ue+ut*2,triggerBg:"#002140",triggerColor:$e,zeroTriggerWidth:Ue,zeroTriggerHeight:Ue,lightSiderBg:Ft,lightTriggerBg:Ft,lightTriggerColor:xt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ze=function(Ce,Se){var He={};for(var Ue in Ce)Object.prototype.hasOwnProperty.call(Ce,Ue)&&Se.indexOf(Ue)<0&&(He[Ue]=Ce[Ue]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,Ue=Object.getOwnPropertySymbols(Ce);xt<Ue.length;xt++)Se.indexOf(Ue[xt])<0&&Object.prototype.propertyIsEnumerable.call(Ce,Ue[xt])&&(He[Ue[xt]]=Ce[Ue[xt]]);return He};const st=ye.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function dt(Ce){let{suffixCls:Se,tagName:He,displayName:Ue}=Ce;return xt=>ye.forwardRef((ut,$e)=>ye.createElement(xt,Object.assign({ref:$e,suffixCls:Se,tagName:He},ut)))}const ct=ye.forwardRef((Ce,Se)=>{const{prefixCls:He,suffixCls:Ue,className:xt,tagName:mt}=Ce,ut=ze(Ce,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:$e}=ye.useContext(_e.E_),Ft=$e("layout",He),[yt,gn]=lt(Ft),rt=Ue?`${Ft}-${Ue}`:Ft;return yt(ye.createElement(mt,Object.assign({className:Re()(He||rt,xt,gn),ref:Se},ut)))}),qe=ye.forwardRef((Ce,Se)=>{const{direction:He}=ye.useContext(_e.E_),[Ue,xt]=ye.useState([]),{prefixCls:mt,className:ut,rootClassName:$e,children:Ft,hasSider:yt,tagName:gn,style:rt}=Ce,Mt=ze(Ce,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),en=(0,Ge.Z)(Mt,["suffixCls"]),{getPrefixCls:Yt,layout:Qe}=ye.useContext(_e.E_),Ie=Yt("layout",mt),[Ot,In]=lt(Ie),mn=Re()(Ie,{[`${Ie}-has-sider`]:typeof yt=="boolean"?yt:Ue.length>0,[`${Ie}-rtl`]:He==="rtl"},Qe==null?void 0:Qe.className,ut,$e,In),pt=ye.useMemo(()=>({siderHook:{addSider:wt=>{xt(Qt=>[].concat((0,fe.Z)(Qt),[wt]))},removeSider:wt=>{xt(Qt=>Qt.filter(Zn=>Zn!==wt))}}}),[]);return Ot(ye.createElement(st.Provider,{value:pt},ye.createElement(gn,Object.assign({ref:Se,className:mn,style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),rt)},en),Ft)))}),be=dt({tagName:"div",displayName:"Layout"})(qe),vt=dt({suffixCls:"header",tagName:"header",displayName:"Header"})(ct),Dt=dt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ct),it=dt({suffixCls:"content",tagName:"main",displayName:"Content"})(ct);var ot=be},76529:function(Ln,Kt,ie){"use strict";ie.d(Kt,{J:function(){return _e}});var fe=ie(67294),Te=ie(4173),Re=ie(60276),Ge=function(ce,ke){var ge={};for(var Ae in ce)Object.prototype.hasOwnProperty.call(ce,Ae)&&ke.indexOf(Ae)<0&&(ge[Ae]=ce[Ae]);if(ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ae=Object.getOwnPropertySymbols(ce);lt<Ae.length;lt++)ke.indexOf(Ae[lt])<0&&Object.prototype.propertyIsEnumerable.call(ce,Ae[lt])&&(ge[Ae[lt]]=ce[Ae[lt]]);return ge};const ye=fe.createContext(null),_e=fe.forwardRef((ce,ke)=>{const{children:ge}=ce,Ae=Ge(ce,["children"]),lt=fe.useContext(ye),ze=fe.useMemo(()=>Object.assign(Object.assign({},lt),Ae),[lt,Ae.prefixCls,Ae.mode,Ae.selectable]);return fe.createElement(ye.Provider,{value:ze},fe.createElement(Te.BR,null,(0,Re.supportNodeRef)(ge)?fe.cloneElement(ge,{ref:ke}):ge))});Kt.Z=ye},68508:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return ue}});var fe=ie(78595),Te=ie(67294),Re=ie(71322),Ge=ie(94184),ye=ie.n(Ge),_e=ie(53124),ce=function(le,ve){var pe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&ve.indexOf(se)<0&&(pe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,se=Object.getOwnPropertySymbols(le);Be<se.length;Be++)ve.indexOf(se[Be])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Be])&&(pe[se[Be]]=le[se[Be]]);return pe},ge=le=>{const{prefixCls:ve,className:pe,dashed:se}=le,Be=ce(le,["prefixCls","className","dashed"]),{getPrefixCls:ft}=Te.useContext(_e.E_),Bt=ft("menu",ve),qt=ye()({[`${Bt}-item-divider-dashed`]:!!se},pe);return Te.createElement(fe.iz,Object.assign({className:qt},Be))},Ae=ie(37419),lt=ie(10366),ze=ie(83062),st=ie(96159),ct=(0,Te.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),be=le=>{var ve;const{className:pe,children:se,icon:Be,title:ft,danger:Bt}=le,{prefixCls:qt,firstLevel:an,direction:vn,disableMenuItemTitleTooltip:dn,inlineCollapsed:gt}=Te.useContext(ct),It=cr=>{const Xr=Te.createElement("span",{className:`${qt}-title-content`},se);return(!Be||(0,st.l$)(se)&&se.type==="span")&&se&&cr&&an&&typeof se=="string"?Te.createElement("div",{className:`${qt}-inline-collapsed-noicon`},se.charAt(0)):Xr},{siderCollapsed:Ht}=Te.useContext(Re.D);let Xt=ft;typeof ft=="undefined"?Xt=an?se:"":ft===!1&&(Xt="");const Tt={title:Xt};!Ht&&!gt&&(Tt.title=null,Tt.open=!1);const Yn=(0,Ae.Z)(se).length;let Rn=Te.createElement(fe.ck,Object.assign({},(0,lt.Z)(le,["title","icon","danger"]),{className:ye()({[`${qt}-item-danger`]:Bt,[`${qt}-item-only-child`]:(Be?Yn+1:Yn)===1},pe),title:typeof ft=="string"?ft:void 0}),(0,st.Tm)(Be,{className:ye()((0,st.l$)(Be)?(ve=Be.props)===null||ve===void 0?void 0:ve.className:"",`${qt}-item-icon`)}),It(gt));return dn||(Rn=Te.createElement(ze.Z,Object.assign({},Tt,{placement:vn==="rtl"?"left":"right",overlayClassName:`${qt}-inline-collapsed-tooltip`}),Rn)),Rn},Dt=le=>{var ve;const{popupClassName:pe,icon:se,title:Be,theme:ft}=le,Bt=Te.useContext(ct),{prefixCls:qt,inlineCollapsed:an,theme:vn}=Bt,dn=(0,fe.Xl)();let gt;if(!se)gt=an&&!dn.length&&Be&&typeof Be=="string"?Te.createElement("div",{className:`${qt}-inline-collapsed-noicon`},Be.charAt(0)):Te.createElement("span",{className:`${qt}-title-content`},Be);else{const Ht=(0,st.l$)(Be)&&Be.type==="span";gt=Te.createElement(Te.Fragment,null,(0,st.Tm)(se,{className:ye()((0,st.l$)(se)?(ve=se.props)===null||ve===void 0?void 0:ve.className:"",`${qt}-item-icon`)}),Ht?Be:Te.createElement("span",{className:`${qt}-title-content`},Be))}const It=Te.useMemo(()=>Object.assign(Object.assign({},Bt),{firstLevel:!1}),[Bt]);return Te.createElement(ct.Provider,{value:It},Te.createElement(fe.Wd,Object.assign({},(0,lt.Z)(le,["icon"]),{title:gt,popupClassName:ye()(qt,pe,`${qt}-${ft||vn}`)})))},it=ie(25877),ot=ie(60276),Ce=ie(33603),Se=ie(76529),He=function(le,ve){var pe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&ve.indexOf(se)<0&&(pe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,se=Object.getOwnPropertySymbols(le);Be<se.length;Be++)ve.indexOf(se[Be])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Be])&&(pe[se[Be]]=le[se[Be]]);return pe};function Ue(le){return(le||[]).map((ve,pe)=>{if(ve&&typeof ve=="object"){const se=ve,{label:Be,children:ft,key:Bt,type:qt}=se,an=He(se,["label","children","key","type"]),vn=Bt!=null?Bt:`tmp-${pe}`;return ft||qt==="group"?qt==="group"?Te.createElement(fe.BW,Object.assign({key:vn},an,{title:Be}),Ue(ft)):Te.createElement(Dt,Object.assign({key:vn},an,{title:Be}),Ue(ft)):qt==="divider"?Te.createElement(ge,Object.assign({key:vn},an)):Te.createElement(be,Object.assign({key:vn},an),Be)}return null}).filter(ve=>ve)}function xt(le){return Te.useMemo(()=>le&&Ue(le),[le])}var mt=ie(84780),ut=ie(14747),$e=ie(33507),Ft=ie(67771),yt=ie(50438),gn=ie(67968),rt=ie(45503),en=le=>{const{componentCls:ve,motionDurationSlow:pe,horizontalLineHeight:se,colorSplit:Be,lineWidth:ft,lineType:Bt,itemPaddingInline:qt}=le;return{[`${ve}-horizontal`]:{lineHeight:se,border:0,borderBottom:`${ft}px ${Bt} ${Be}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${ve}-item, ${ve}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:qt},[`> ${ve}-item:hover,
|
|
|
> ${ve}-item-active,
|
|
|
> ${ve}-submenu ${ve}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${ve}-item, ${ve}-submenu-title`]:{transition:[`border-color ${pe}`,`background ${pe}`].join(",")},[`${ve}-submenu-arrow`]:{display:"none"}}}},Qe=le=>{let{componentCls:ve,menuArrowOffset:pe}=le;return{[`${ve}-rtl`]:{direction:"rtl"},[`${ve}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${ve}-rtl${ve}-vertical,
|
|
|
${ve}-submenu-rtl ${ve}-vertical`]:{[`${ve}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${pe})`},"&::after":{transform:`rotate(45deg) translateY(${pe})`}}}}};const Ie=le=>Object.assign({},(0,ut.oN)(le));var In=(le,ve)=>{const{componentCls:pe,itemColor:se,itemSelectedColor:Be,groupTitleColor:ft,itemBg:Bt,subMenuItemBg:qt,itemSelectedBg:an,activeBarHeight:vn,activeBarWidth:dn,activeBarBorderWidth:gt,motionDurationSlow:It,motionEaseInOut:Ht,motionEaseOut:Xt,itemPaddingInline:Tt,motionDurationMid:Yn,itemHoverColor:Rn,lineType:cr,colorSplit:Xr,itemDisabledColor:wr,dangerItemColor:kr,dangerItemHoverColor:Ar,dangerItemSelectedColor:gi,dangerItemActiveBg:oi,dangerItemSelectedBg:fi,itemHoverBg:Pi,itemActiveBg:Or,menuSubMenuBg:Jn,horizontalItemSelectedColor:qn,horizontalItemSelectedBg:nr,horizontalItemBorderRadius:Ur,horizontalItemHoverBg:li,popupBg:Lt}=le;return{[`${pe}-${ve}, ${pe}-${ve} > ${pe}`]:{color:se,background:Bt,[`&${pe}-root:focus-visible`]:Object.assign({},Ie(le)),[`${pe}-item-group-title`]:{color:ft},[`${pe}-submenu-selected`]:{[`> ${pe}-submenu-title`]:{color:Be}},[`${pe}-item-disabled, ${pe}-submenu-disabled`]:{color:`${wr} !important`},[`${pe}-item:not(${pe}-item-selected):not(${pe}-submenu-selected)`]:{[`&:hover, > ${pe}-submenu-title:hover`]:{color:Rn}},[`&:not(${pe}-horizontal)`]:{[`${pe}-item:not(${pe}-item-selected)`]:{"&:hover":{backgroundColor:Pi},"&:active":{backgroundColor:Or}},[`${pe}-submenu-title`]:{"&:hover":{backgroundColor:Pi},"&:active":{backgroundColor:Or}}},[`${pe}-item-danger`]:{color:kr,[`&${pe}-item:hover`]:{[`&:not(${pe}-item-selected):not(${pe}-submenu-selected)`]:{color:Ar}},[`&${pe}-item:active`]:{background:oi}},[`${pe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${pe}-item-selected`]:{color:Be,[`&${pe}-item-danger`]:{color:gi},"a, a:hover":{color:"inherit"}},[`& ${pe}-item-selected`]:{backgroundColor:an,[`&${pe}-item-danger`]:{backgroundColor:fi}},[`${pe}-item, ${pe}-submenu-title`]:{[`&:not(${pe}-item-disabled):focus-visible`]:Object.assign({},Ie(le))},[`&${pe}-submenu > ${pe}`]:{backgroundColor:Jn},[`&${pe}-popup > ${pe}`]:{backgroundColor:Lt},[`&${pe}-horizontal`]:Object.assign(Object.assign({},ve==="dark"?{borderBottom:0}:{}),{[`> ${pe}-item, > ${pe}-submenu`]:{top:gt,marginTop:-gt,marginBottom:0,borderRadius:Ur,"&::after":{position:"absolute",insetInline:Tt,bottom:0,borderBottom:`${vn}px solid transparent`,transition:`border-color ${It} ${Ht}`,content:'""'},"&:hover, &-active, &-open":{background:li,"&::after":{borderBottomWidth:vn,borderBottomColor:qn}},"&-selected":{color:qn,backgroundColor:nr,"&:hover":{backgroundColor:nr},"&::after":{borderBottomWidth:vn,borderBottomColor:qn}}}}),[`&${pe}-root`]:{[`&${pe}-inline, &${pe}-vertical`]:{borderInlineEnd:`${gt}px ${cr} ${Xr}`}},[`&${pe}-inline`]:{[`${pe}-sub${pe}-inline`]:{background:qt},[`${pe}-item, ${pe}-submenu-title`]:gt&&dn?{width:`calc(100% + ${gt}px)`}:{},[`${pe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${dn}px solid ${Be}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Yn} ${Xt}`,`opacity ${Yn} ${Xt}`].join(","),content:'""'},[`&${pe}-item-danger`]:{"&::after":{borderInlineEndColor:gi}}},[`${pe}-selected, ${pe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Yn} ${Ht}`,`opacity ${Yn} ${Ht}`].join(",")}}}}}};const mn=le=>{const{componentCls:ve,itemHeight:pe,itemMarginInline:se,padding:Be,menuArrowSize:ft,marginXS:Bt,itemMarginBlock:qt}=le,an=Be+ft+Bt;return{[`${ve}-item`]:{position:"relative",overflow:"hidden"},[`${ve}-item, ${ve}-submenu-title`]:{height:pe,lineHeight:`${pe}px`,paddingInline:Be,overflow:"hidden",textOverflow:"ellipsis",marginInline:se,marginBlock:qt,width:`calc(100% - ${se*2}px)`},[`> ${ve}-item,
|
|
|
> ${ve}-submenu > ${ve}-submenu-title`]:{height:pe,lineHeight:`${pe}px`},[`${ve}-item-group-list ${ve}-submenu-title,
|
|
|
${ve}-submenu-title`]:{paddingInlineEnd:an}}};var wt=le=>{const{componentCls:ve,iconCls:pe,itemHeight:se,colorTextLightSolid:Be,dropdownWidth:ft,controlHeightLG:Bt,motionDurationMid:qt,motionEaseOut:an,paddingXL:vn,itemMarginInline:dn,fontSizeLG:gt,motionDurationSlow:It,paddingXS:Ht,boxShadowSecondary:Xt,collapsedWidth:Tt,collapsedIconSize:Yn}=le,Rn={height:se,lineHeight:`${se}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[ve]:{"&-inline, &-vertical":Object.assign({[`&${ve}-root`]:{boxShadow:"none"}},mn(le))},[`${ve}-submenu-popup`]:{[`${ve}-vertical`]:Object.assign(Object.assign({},mn(le)),{boxShadow:Xt})}},{[`${ve}-submenu-popup ${ve}-vertical${ve}-sub`]:{minWidth:ft,maxHeight:`calc(100vh - ${Bt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${ve}-inline`]:{width:"100%",[`&${ve}-root`]:{[`${ve}-item, ${ve}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${It}`,`background ${It}`,`padding ${qt} ${an}`].join(","),[`> ${ve}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${ve}-sub${ve}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${ve}-submenu > ${ve}-submenu-title`]:Rn,[`& ${ve}-item-group-title`]:{paddingInlineStart:vn}},[`${ve}-item`]:Rn}},{[`${ve}-inline-collapsed`]:{width:Tt,[`&${ve}-root`]:{[`${ve}-item, ${ve}-submenu ${ve}-submenu-title`]:{[`> ${ve}-inline-collapsed-noicon`]:{fontSize:gt,textAlign:"center"}}},[`> ${ve}-item,
|
|
|
> ${ve}-item-group > ${ve}-item-group-list > ${ve}-item,
|
|
|
> ${ve}-item-group > ${ve}-item-group-list > ${ve}-submenu > ${ve}-submenu-title,
|
|
|
> ${ve}-submenu > ${ve}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${gt/2}px - ${dn}px)`,textOverflow:"clip",[`
|
|
|
${ve}-submenu-arrow,
|
|
|
${ve}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${ve}-item-icon, ${pe}`]:{margin:0,fontSize:Yn,lineHeight:`${se}px`,"+ span":{display:"inline-block",opacity:0}}},[`${ve}-item-icon, ${pe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${ve}-item-icon, ${pe}`]:{display:"none"},"a, a:hover":{color:Be}},[`${ve}-item-group-title`]:Object.assign(Object.assign({},ut.vS),{paddingInline:Ht})}}]};const Qt=le=>{const{componentCls:ve,motionDurationSlow:pe,motionDurationMid:se,motionEaseInOut:Be,motionEaseOut:ft,iconCls:Bt,iconSize:qt,iconMarginInlineEnd:an}=le;return{[`${ve}-item, ${ve}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${pe}`,`background ${pe}`,`padding ${pe} ${Be}`].join(","),[`${ve}-item-icon, ${Bt}`]:{minWidth:qt,fontSize:qt,transition:[`font-size ${se} ${ft}`,`margin ${pe} ${Be}`,`color ${pe}`].join(","),"+ span":{marginInlineStart:an,opacity:1,transition:[`opacity ${pe} ${Be}`,`margin ${pe}`,`color ${pe}`].join(",")}},[`${ve}-item-icon`]:Object.assign({},(0,ut.Ro)()),[`&${ve}-item-only-child`]:{[`> ${Bt}, > ${ve}-item-icon`]:{marginInlineEnd:0}}},[`${ve}-item-disabled, ${ve}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${ve}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Zn=le=>{const{componentCls:ve,motionDurationSlow:pe,motionEaseInOut:se,borderRadius:Be,menuArrowSize:ft,menuArrowOffset:Bt}=le;return{[`${ve}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:ft,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${pe} ${se}, opacity ${pe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:ft*.6,height:ft*.15,backgroundColor:"currentcolor",borderRadius:Be,transition:[`background ${pe} ${se}`,`transform ${pe} ${se}`,`top ${pe} ${se}`,`color ${pe} ${se}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Bt})`},"&::after":{transform:`rotate(-45deg) translateY(${Bt})`}}}}},Cn=le=>{const{antCls:ve,componentCls:pe,fontSize:se,motionDurationSlow:Be,motionDurationMid:ft,motionEaseInOut:Bt,paddingXS:qt,padding:an,colorSplit:vn,lineWidth:dn,zIndexPopup:gt,borderRadiusLG:It,subMenuItemBorderRadius:Ht,menuArrowSize:Xt,menuArrowOffset:Tt,lineType:Yn,menuPanelMaskInset:Rn,groupTitleLineHeight:cr,groupTitleFontSize:Xr}=le;return[{"":{[`${pe}`]:Object.assign(Object.assign({},(0,ut.dF)()),{"&-hidden":{display:"none"}})},[`${pe}-submenu-hidden`]:{display:"none"}},{[pe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ut.Wf)(le)),(0,ut.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:se,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Be} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${pe}-item`]:{flex:"none"}},[`${pe}-item, ${pe}-submenu, ${pe}-submenu-title`]:{borderRadius:le.itemBorderRadius},[`${pe}-item-group-title`]:{padding:`${qt}px ${an}px`,fontSize:Xr,lineHeight:cr,transition:`all ${Be}`},[`&-horizontal ${pe}-submenu`]:{transition:[`border-color ${Be} ${Bt}`,`background ${Be} ${Bt}`].join(",")},[`${pe}-submenu, ${pe}-submenu-inline`]:{transition:[`border-color ${Be} ${Bt}`,`background ${Be} ${Bt}`,`padding ${ft} ${Bt}`].join(",")},[`${pe}-submenu ${pe}-sub`]:{cursor:"initial",transition:[`background ${Be} ${Bt}`,`padding ${Be} ${Bt}`].join(",")},[`${pe}-title-content`]:{transition:`color ${Be}`},[`${pe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${pe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:vn,borderStyle:Yn,borderWidth:0,borderTopWidth:dn,marginBlock:dn,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Qt(le)),{[`${pe}-item-group`]:{[`${pe}-item-group-list`]:{margin:0,padding:0,[`${pe}-item, ${pe}-submenu-title`]:{paddingInline:`${se*2}px ${an}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:gt,borderRadius:It,boxShadow:"none",transformOrigin:"0 0",[`&${pe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Rn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Rn},"\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},[`> ${pe}`]:Object.assign(Object.assign(Object.assign({borderRadius:It},Qt(le)),Zn(le)),{[`${pe}-item, ${pe}-submenu > ${pe}-submenu-title`]:{borderRadius:Ht},[`${pe}-submenu-title::after`]:{transition:`transform ${Be} ${Bt}`}})}}),Zn(le)),{[`&-inline-collapsed ${pe}-submenu-arrow,
|
|
|
&-inline ${pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Tt})`},"&::after":{transform:`rotate(45deg) translateX(-${Tt})`}},[`${pe}-submenu-open${pe}-submenu-inline > ${pe}-submenu-title > ${pe}-submenu-arrow`]:{transform:`translateY(-${Xt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Tt})`},"&::before":{transform:`rotate(45deg) translateX(${Tt})`}}})},{[`${ve}-layout-header`]:{[pe]:{lineHeight:"inherit"}}}]};var rn=(le,ve)=>(0,gn.Z)("Menu",se=>{if(ve===!1)return[];const{colorBgElevated:Be,colorPrimary:ft,colorTextLightSolid:Bt,controlHeightLG:qt,fontSize:an,darkItemColor:vn,darkDangerItemColor:dn,darkItemBg:gt,darkSubMenuItemBg:It,darkItemSelectedColor:Ht,darkItemSelectedBg:Xt,darkDangerItemSelectedBg:Tt,darkItemHoverBg:Yn,darkGroupTitleColor:Rn,darkItemHoverColor:cr,darkItemDisabledColor:Xr,darkDangerItemHoverColor:wr,darkDangerItemSelectedColor:kr,darkDangerItemActiveBg:Ar}=se,gi=an/7*5,oi=(0,rt.TS)(se,{menuArrowSize:gi,menuHorizontalHeight:qt*1.15,menuArrowOffset:`${gi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Be}),fi=(0,rt.TS)(oi,{itemColor:vn,itemHoverColor:cr,groupTitleColor:Rn,itemSelectedColor:Ht,itemBg:gt,popupBg:gt,subMenuItemBg:It,itemActiveBg:"transparent",itemSelectedBg:Xt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Yn,itemDisabledColor:Xr,dangerItemColor:dn,dangerItemHoverColor:wr,dangerItemSelectedColor:kr,dangerItemActiveBg:Ar,dangerItemSelectedBg:Tt,menuSubMenuBg:It,horizontalItemSelectedColor:Bt,horizontalItemSelectedBg:ft});return[Cn(oi),en(oi),wt(oi),In(oi,"light"),In(fi,"dark"),Qe(oi),(0,$e.Z)(oi),(0,Ft.oN)(oi,"slide-up"),(0,Ft.oN)(oi,"slide-down"),(0,yt._y)(oi,"zoom-big")]},se=>{const{colorPrimary:Be,colorError:ft,colorTextDisabled:Bt,colorErrorBg:qt,colorText:an,colorTextDescription:vn,colorBgContainer:dn,colorFillAlter:gt,colorFillContent:It,lineWidth:Ht,lineWidthBold:Xt,controlItemBgActive:Tt,colorBgTextHover:Yn,controlHeightLG:Rn,lineHeight:cr,colorBgElevated:Xr,marginXXS:wr,padding:kr,fontSize:Ar,controlHeightSM:gi,fontSizeLG:oi,colorTextLightSolid:fi,colorErrorHover:Pi}=se,Or=new mt.C(fi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:se.zIndexPopupBase+50,radiusItem:se.borderRadiusLG,itemBorderRadius:se.borderRadiusLG,radiusSubMenuItem:se.borderRadiusSM,subMenuItemBorderRadius:se.borderRadiusSM,colorItemText:an,itemColor:an,colorItemTextHover:an,itemHoverColor:an,colorItemTextHoverHorizontal:Be,horizontalItemHoverColor:Be,colorGroupTitle:vn,groupTitleColor:vn,colorItemTextSelected:Be,itemSelectedColor:Be,colorItemTextSelectedHorizontal:Be,horizontalItemSelectedColor:Be,colorItemBg:dn,itemBg:dn,colorItemBgHover:Yn,itemHoverBg:Yn,colorItemBgActive:It,itemActiveBg:Tt,colorSubItemBg:gt,subMenuItemBg:gt,colorItemBgSelected:Tt,itemSelectedBg:Tt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Xt,activeBarHeight:Xt,colorActiveBarBorderSize:Ht,activeBarBorderWidth:Ht,colorItemTextDisabled:Bt,itemDisabledColor:Bt,colorDangerItemText:ft,dangerItemColor:ft,colorDangerItemTextHover:ft,dangerItemHoverColor:ft,colorDangerItemTextSelected:ft,dangerItemSelectedColor:ft,colorDangerItemBgActive:qt,dangerItemActiveBg:qt,colorDangerItemBgSelected:qt,dangerItemSelectedBg:qt,itemMarginInline:se.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Rn,groupTitleLineHeight:cr,collapsedWidth:Rn*2,popupBg:Xr,itemMarginBlock:wr,itemPaddingInline:kr,horizontalLineHeight:`${Rn*1.15}px`,iconSize:Ar,iconMarginInlineEnd:gi-Ar,collapsedIconSize:oi,groupTitleFontSize:Ar,darkItemDisabledColor:new mt.C(fi).setAlpha(.25).toRgbString(),darkItemColor:Or,darkDangerItemColor:ft,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:fi,darkItemSelectedBg:Be,darkDangerItemSelectedBg:ft,darkItemHoverBg:"transparent",darkGroupTitleColor:Or,darkItemHoverColor:fi,darkDangerItemHoverColor:Pi,darkDangerItemSelectedColor:fi,darkDangerItemActiveBg:ft}},{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),ln=function(le,ve){var pe={};for(var se in le)Object.prototype.hasOwnProperty.call(le,se)&&ve.indexOf(se)<0&&(pe[se]=le[se]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,se=Object.getOwnPropertySymbols(le);Be<se.length;Be++)ve.indexOf(se[Be])<0&&Object.prototype.propertyIsEnumerable.call(le,se[Be])&&(pe[se[Be]]=le[se[Be]]);return pe},_n=(0,Te.forwardRef)((le,ve)=>{var pe,se;const Be=Te.useContext(Se.Z),ft=Be||{},{getPrefixCls:Bt,getPopupContainer:qt,direction:an,menu:vn}=Te.useContext(_e.E_),dn=Bt(),{prefixCls:gt,className:It,style:Ht,theme:Xt="light",expandIcon:Tt,_internalDisableMenuItemTitleTooltip:Yn,inlineCollapsed:Rn,siderCollapsed:cr,items:Xr,children:wr,rootClassName:kr,mode:Ar,selectable:gi,onClick:oi,overflowedIndicatorPopupClassName:fi}=le,Pi=ln(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Or=(0,lt.Z)(Pi,["collapsedWidth"]),Jn=xt(Xr)||wr;(pe=ft.validator)===null||pe===void 0||pe.call(ft,{mode:Ar});const qn=(0,ot.useEvent)(function(){var Qn;oi==null||oi.apply(void 0,arguments),(Qn=ft.onClick)===null||Qn===void 0||Qn.call(ft)}),nr=ft.mode||Ar,Ur=gi!=null?gi:ft.selectable,li=Te.useMemo(()=>cr!==void 0?cr:Rn,[Rn,cr]),Lt={horizontal:{motionName:`${dn}-slide-up`},inline:(0,Ce.Z)(dn),other:{motionName:`${dn}-zoom-big`}},Kn=Bt("menu",gt||ft.prefixCls),[Bn,yn]=rn(Kn,!Be),xr=ye()(`${Kn}-${Xt}`,vn==null?void 0:vn.className,It);let Sr;if(typeof Tt=="function")Sr=Tt;else if(Tt===null||Tt===!1)Sr=null;else if(ft.expandIcon===null||ft.expandIcon===!1)Sr=null;else{const Qn=Tt!=null?Tt:ft.expandIcon;Sr=(0,st.Tm)(Qn,{className:ye()(`${Kn}-submenu-expand-icon`,(0,st.l$)(Qn)?(se=Qn.props)===null||se===void 0?void 0:se.className:"")})}const mr=Te.useMemo(()=>({prefixCls:Kn,inlineCollapsed:li||!1,direction:an,firstLevel:!0,theme:Xt,mode:nr,disableMenuItemTitleTooltip:Yn}),[Kn,li,an,Yn,Xt]);return Bn(Te.createElement(Se.Z.Provider,{value:null},Te.createElement(ct.Provider,{value:mr},Te.createElement(fe.ZP,Object.assign({getPopupContainer:qt,overflowedIndicator:Te.createElement(it.Z,null),overflowedIndicatorPopupClassName:ye()(Kn,`${Kn}-${Xt}`,fi),mode:nr,selectable:Ur,onClick:qn},Or,{inlineCollapsed:li,style:Object.assign(Object.assign({},vn==null?void 0:vn.style),Ht),className:xr,prefixCls:Kn,direction:an,defaultMotions:Lt,expandIcon:Sr,ref:ve,rootClassName:ye()(kr,yn)}),Jn))))});const Oe=(0,Te.forwardRef)((le,ve)=>{const pe=(0,Te.useRef)(null),se=Te.useContext(Re.D);return(0,Te.useImperativeHandle)(ve,()=>({menu:pe.current,focus:Be=>{var ft;(ft=pe.current)===null||ft===void 0||ft.focus(Be)}})),Te.createElement(_n,Object.assign({ref:pe},le,se))});Oe.Item=be,Oe.SubMenu=Dt,Oe.Divider=ge,Oe.ItemGroup=fe.BW;var ue=Oe},28452:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return dn}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Ge=Re,ye=ie(84089),_e=function(It,Ht){return Te.createElement(ye.Z,(0,fe.Z)({},It,{ref:Ht,icon:Ge}))},ce=Te.forwardRef(_e),ke=ie(81893),ge=ie(22751),Ae=ie(91034),lt=ie(94184),ze=ie.n(lt),st=ie(4942),dt=ie(1413),ct=ie(15671),qe=ie(43144),be=ie(60136),vt=ie(51630),Dt=`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`,it=`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`,ot="".concat(Dt," ").concat(it).split(/[\s\n]+/),Ce="aria-",Se="data-";function He(gt,It){return gt.indexOf(It)===0}function Ue(gt){var It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht;It===!1?Ht={aria:!0,data:!0,attr:!0}:It===!0?Ht={aria:!0}:Ht=(0,dt.Z)({},It);var Xt={};return Object.keys(gt).forEach(function(Tt){(Ht.aria&&(Tt==="role"||He(Tt,Ce))||Ht.data&&He(Tt,Se)||Ht.attr&&ot.includes(Tt))&&(Xt[Tt]=gt[Tt])}),Xt}var xt={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},mt=xt,ut=ie(81626),$e=function(gt){(0,be.Z)(Ht,gt);var It=(0,vt.Z)(Ht);function Ht(){var Xt;(0,ct.Z)(this,Ht);for(var Tt=arguments.length,Yn=new Array(Tt),Rn=0;Rn<Tt;Rn++)Yn[Rn]=arguments[Rn];return Xt=It.call.apply(It,[this].concat(Yn)),Xt.state={goInputText:""},Xt.getValidValue=function(){var cr=Xt.state.goInputText;return!cr||Number.isNaN(cr)?void 0:Number(cr)},Xt.buildOptionText=function(cr){return"".concat(cr," ").concat(Xt.props.locale.items_per_page)},Xt.changeSize=function(cr){Xt.props.changeSize(Number(cr))},Xt.handleChange=function(cr){Xt.setState({goInputText:cr.target.value})},Xt.handleBlur=function(cr){var Xr=Xt.props,wr=Xr.goButton,kr=Xr.quickGo,Ar=Xr.rootPrefixCls,gi=Xt.state.goInputText;wr||gi===""||(Xt.setState({goInputText:""}),!(cr.relatedTarget&&(cr.relatedTarget.className.indexOf("".concat(Ar,"-item-link"))>=0||cr.relatedTarget.className.indexOf("".concat(Ar,"-item"))>=0))&&kr(Xt.getValidValue()))},Xt.go=function(cr){var Xr=Xt.state.goInputText;Xr!==""&&(cr.keyCode===mt.ENTER||cr.type==="click")&&(Xt.setState({goInputText:""}),Xt.props.quickGo(Xt.getValidValue()))},Xt}return(0,qe.Z)(Ht,[{key:"getPageSizeOptions",value:function(){var Tt=this.props,Yn=Tt.pageSize,Rn=Tt.pageSizeOptions;return Rn.some(function(cr){return cr.toString()===Yn.toString()})?Rn:Rn.concat([Yn.toString()]).sort(function(cr,Xr){var wr=Number.isNaN(Number(cr))?0:Number(cr),kr=Number.isNaN(Number(Xr))?0:Number(Xr);return wr-kr})}},{key:"render",value:function(){var Tt=this,Yn=this.props,Rn=Yn.pageSize,cr=Yn.locale,Xr=Yn.rootPrefixCls,wr=Yn.changeSize,kr=Yn.quickGo,Ar=Yn.goButton,gi=Yn.selectComponentClass,oi=Yn.buildOptionText,fi=Yn.selectPrefixCls,Pi=Yn.disabled,Or=this.state.goInputText,Jn="".concat(Xr,"-options"),qn=gi,nr=null,Ur=null,li=null;if(!wr&&!kr)return null;var Lt=this.getPageSizeOptions();if(wr&&qn){var Kn=Lt.map(function(Bn,yn){return Te.createElement(qn.Option,{key:yn,value:Bn.toString()},(oi||Tt.buildOptionText)(Bn))});nr=Te.createElement(qn,{disabled:Pi,prefixCls:fi,showSearch:!1,className:"".concat(Jn,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Rn||Lt[0]).toString(),onChange:this.changeSize,getPopupContainer:function(yn){return yn.parentNode},"aria-label":cr.page_size,defaultOpen:!1},Kn)}return kr&&(Ar&&(li=typeof Ar=="boolean"?Te.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Pi,className:"".concat(Jn,"-quick-jumper-button")},cr.jump_to_confirm):Te.createElement("span",{onClick:this.go,onKeyUp:this.go},Ar)),Ur=Te.createElement("div",{className:"".concat(Jn,"-quick-jumper")},cr.jump_to,Te.createElement("input",{disabled:Pi,type:"text",value:Or,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":cr.page}),cr.page,li)),Te.createElement("li",{className:"".concat(Jn)},nr,Ur)}}]),Ht}(Te.Component);$e.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ft=$e,yt=function(It){var Ht,Xt=It.rootPrefixCls,Tt=It.page,Yn=It.active,Rn=It.className,cr=It.showTitle,Xr=It.onClick,wr=It.onKeyPress,kr=It.itemRender,Ar="".concat(Xt,"-item"),gi=ze()(Ar,"".concat(Ar,"-").concat(Tt),(Ht={},(0,st.Z)(Ht,"".concat(Ar,"-active"),Yn),(0,st.Z)(Ht,"".concat(Ar,"-disabled"),!Tt),(0,st.Z)(Ht,It.className,Rn),Ht)),oi=function(){Xr(Tt)},fi=function(Jn){wr(Jn,Xr,Tt)},Pi=kr(Tt,"page",Te.createElement("a",{rel:"nofollow"},Tt));return Pi?Te.createElement("li",{title:cr?Tt.toString():null,className:gi,onClick:oi,onKeyPress:fi,tabIndex:0},Pi):null},gn=yt;function rt(){}function Mt(gt){var It=Number(gt);return typeof It=="number"&&!Number.isNaN(It)&&isFinite(It)&&Math.floor(It)===It}var en=function(It,Ht,Xt){return Xt};function Yt(gt,It,Ht){var Xt=typeof gt=="undefined"?It.pageSize:gt;return Math.floor((Ht.total-1)/Xt)+1}var Qe=function(gt){(0,be.Z)(Ht,gt);var It=(0,vt.Z)(Ht);function Ht(Xt){var Tt;(0,ct.Z)(this,Ht),Tt=It.call(this,Xt),Tt.paginationNode=Te.createRef(),Tt.getJumpPrevPage=function(){return Math.max(1,Tt.state.current-(Tt.props.showLessItems?3:5))},Tt.getJumpNextPage=function(){return Math.min(Yt(void 0,Tt.state,Tt.props),Tt.state.current+(Tt.props.showLessItems?3:5))},Tt.getItemIcon=function(wr,kr){var Ar=Tt.props.prefixCls,gi=wr||Te.createElement("button",{type:"button","aria-label":kr,className:"".concat(Ar,"-item-link")});return typeof wr=="function"&&(gi=Te.createElement(wr,(0,dt.Z)({},Tt.props))),gi},Tt.isValid=function(wr){var kr=Tt.props.total;return Mt(wr)&&wr!==Tt.state.current&&Mt(kr)&&kr>0},Tt.shouldDisplayQuickJumper=function(){var wr=Tt.props,kr=wr.showQuickJumper,Ar=wr.total,gi=Tt.state.pageSize;return Ar<=gi?!1:kr},Tt.handleKeyDown=function(wr){(wr.keyCode===mt.ARROW_UP||wr.keyCode===mt.ARROW_DOWN)&&wr.preventDefault()},Tt.handleKeyUp=function(wr){var kr=Tt.getValidValue(wr),Ar=Tt.state.currentInputValue;kr!==Ar&&Tt.setState({currentInputValue:kr}),wr.keyCode===mt.ENTER?Tt.handleChange(kr):wr.keyCode===mt.ARROW_UP?Tt.handleChange(kr-1):wr.keyCode===mt.ARROW_DOWN&&Tt.handleChange(kr+1)},Tt.handleBlur=function(wr){var kr=Tt.getValidValue(wr);Tt.handleChange(kr)},Tt.changePageSize=function(wr){var kr=Tt.state.current,Ar=Yt(wr,Tt.state,Tt.props);kr=kr>Ar?Ar:kr,Ar===0&&(kr=Tt.state.current),typeof wr=="number"&&("pageSize"in Tt.props||Tt.setState({pageSize:wr}),"current"in Tt.props||Tt.setState({current:kr,currentInputValue:kr})),Tt.props.onShowSizeChange(kr,wr),"onChange"in Tt.props&&Tt.props.onChange&&Tt.props.onChange(kr,wr)},Tt.handleChange=function(wr){var kr=Tt.props,Ar=kr.disabled,gi=kr.onChange,oi=Tt.state,fi=oi.pageSize,Pi=oi.current,Or=oi.currentInputValue;if(Tt.isValid(wr)&&!Ar){var Jn=Yt(void 0,Tt.state,Tt.props),qn=wr;return wr>Jn?qn=Jn:wr<1&&(qn=1),"current"in Tt.props||Tt.setState({current:qn}),qn!==Or&&Tt.setState({currentInputValue:qn}),gi(qn,fi),qn}return Pi},Tt.prev=function(){Tt.hasPrev()&&Tt.handleChange(Tt.state.current-1)},Tt.next=function(){Tt.hasNext()&&Tt.handleChange(Tt.state.current+1)},Tt.jumpPrev=function(){Tt.handleChange(Tt.getJumpPrevPage())},Tt.jumpNext=function(){Tt.handleChange(Tt.getJumpNextPage())},Tt.hasPrev=function(){return Tt.state.current>1},Tt.hasNext=function(){return Tt.state.current<Yt(void 0,Tt.state,Tt.props)},Tt.runIfEnter=function(wr,kr){if(wr.key==="Enter"||wr.charCode===13){for(var Ar=arguments.length,gi=new Array(Ar>2?Ar-2:0),oi=2;oi<Ar;oi++)gi[oi-2]=arguments[oi];kr.apply(void 0,gi)}},Tt.runIfEnterPrev=function(wr){Tt.runIfEnter(wr,Tt.prev)},Tt.runIfEnterNext=function(wr){Tt.runIfEnter(wr,Tt.next)},Tt.runIfEnterJumpPrev=function(wr){Tt.runIfEnter(wr,Tt.jumpPrev)},Tt.runIfEnterJumpNext=function(wr){Tt.runIfEnter(wr,Tt.jumpNext)},Tt.handleGoTO=function(wr){(wr.keyCode===mt.ENTER||wr.type==="click")&&Tt.handleChange(Tt.state.currentInputValue)},Tt.renderPrev=function(wr){var kr=Tt.props,Ar=kr.prevIcon,gi=kr.itemRender,oi=gi(wr,"prev",Tt.getItemIcon(Ar,"prev page")),fi=!Tt.hasPrev();return(0,Te.isValidElement)(oi)?(0,Te.cloneElement)(oi,{disabled:fi}):oi},Tt.renderNext=function(wr){var kr=Tt.props,Ar=kr.nextIcon,gi=kr.itemRender,oi=gi(wr,"next",Tt.getItemIcon(Ar,"next page")),fi=!Tt.hasNext();return(0,Te.isValidElement)(oi)?(0,Te.cloneElement)(oi,{disabled:fi}):oi};var Yn=Xt.onChange!==rt,Rn="current"in Xt;Rn&&!Yn&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var cr=Xt.defaultCurrent;"current"in Xt&&(cr=Xt.current);var Xr=Xt.defaultPageSize;return"pageSize"in Xt&&(Xr=Xt.pageSize),cr=Math.min(cr,Yt(Xr,void 0,Xt)),Tt.state={current:cr,currentInputValue:cr,pageSize:Xr},Tt}return(0,qe.Z)(Ht,[{key:"componentDidUpdate",value:function(Tt,Yn){var Rn=this.props.prefixCls;if(Yn.current!==this.state.current&&this.paginationNode.current){var cr=this.paginationNode.current.querySelector(".".concat(Rn,"-item-").concat(Yn.current));if(cr&&document.activeElement===cr){var Xr;cr==null||(Xr=cr.blur)===null||Xr===void 0||Xr.call(cr)}}}},{key:"getValidValue",value:function(Tt){var Yn=Tt.target.value,Rn=Yt(void 0,this.state,this.props),cr=this.state.currentInputValue,Xr;return Yn===""?Xr=Yn:Number.isNaN(Number(Yn))?Xr=cr:Yn>=Rn?Xr=Rn:Xr=Number(Yn),Xr}},{key:"getShowSizeChanger",value:function(){var Tt=this.props,Yn=Tt.showSizeChanger,Rn=Tt.total,cr=Tt.totalBoundaryShowSizeChanger;return typeof Yn!="undefined"?Yn:Rn>cr}},{key:"render",value:function(){var Tt=this.props,Yn=Tt.prefixCls,Rn=Tt.className,cr=Tt.style,Xr=Tt.disabled,wr=Tt.hideOnSinglePage,kr=Tt.total,Ar=Tt.locale,gi=Tt.showQuickJumper,oi=Tt.showLessItems,fi=Tt.showTitle,Pi=Tt.showTotal,Or=Tt.simple,Jn=Tt.itemRender,qn=Tt.showPrevNextJumpers,nr=Tt.jumpPrevIcon,Ur=Tt.jumpNextIcon,li=Tt.selectComponentClass,Lt=Tt.selectPrefixCls,Kn=Tt.pageSizeOptions,Bn=this.state,yn=Bn.current,xr=Bn.pageSize,Sr=Bn.currentInputValue;if(wr===!0&&kr<=xr)return null;var mr=Yt(void 0,this.state,this.props),Qn=[],ht=null,Et=null,zt=null,fn=null,at=null,Rt=gi&&gi.goButton,on=oi?1:2,tn=yn-1>0?yn-1:0,Mn=yn+1<mr?yn+1:mr,wn=Ue(this.props,{aria:!0,data:!0}),rr=Pi&&Te.createElement("li",{className:"".concat(Yn,"-total-text")},Pi(kr,[kr===0?0:(yn-1)*xr+1,yn*xr>kr?kr:yn*xr]));if(Or){Rt&&(typeof Rt=="boolean"?at=Te.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ar.jump_to_confirm):at=Te.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Rt),at=Te.createElement("li",{title:fi?"".concat(Ar.jump_to).concat(yn,"/").concat(mr):null,className:"".concat(Yn,"-simple-pager")},at));var zr=this.renderPrev(tn);return Te.createElement("ul",(0,fe.Z)({className:ze()(Yn,"".concat(Yn,"-simple"),(0,st.Z)({},"".concat(Yn,"-disabled"),Xr),Rn),style:cr,ref:this.paginationNode},wn),rr,zr?Te.createElement("li",{title:fi?Ar.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:ze()("".concat(Yn,"-prev"),(0,st.Z)({},"".concat(Yn,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},zr):null,Te.createElement("li",{title:fi?"".concat(yn,"/").concat(mr):null,className:"".concat(Yn,"-simple-pager")},Te.createElement("input",{type:"text",value:Sr,disabled:Xr,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Te.createElement("span",{className:"".concat(Yn,"-slash")},"/"),mr),Te.createElement("li",{title:fi?Ar.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:ze()("".concat(Yn,"-next"),(0,st.Z)({},"".concat(Yn,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Mn)),at)}if(mr<=3+on*2){var vr={locale:Ar,rootPrefixCls:Yn,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:fi,itemRender:Jn};mr||Qn.push(Te.createElement(gn,(0,fe.Z)({},vr,{key:"noPager",page:1,className:"".concat(Yn,"-item-disabled")})));for(var yr=1;yr<=mr;yr+=1){var Lr=yn===yr;Qn.push(Te.createElement(gn,(0,fe.Z)({},vr,{key:yr,page:yr,active:Lr})))}}else{var Dr=oi?Ar.prev_3:Ar.prev_5,hi=oi?Ar.next_3:Ar.next_5,Vn=Jn(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(nr,"prev page")),br=Jn(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ur,"next page"));qn&&(ht=Vn?Te.createElement("li",{title:fi?Dr:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:ze()("".concat(Yn,"-jump-prev"),(0,st.Z)({},"".concat(Yn,"-jump-prev-custom-icon"),!!nr))},Vn):null,Et=br?Te.createElement("li",{title:fi?hi:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:ze()("".concat(Yn,"-jump-next"),(0,st.Z)({},"".concat(Yn,"-jump-next-custom-icon"),!!Ur))},br):null),fn=Te.createElement(gn,{locale:Ar,last:!0,rootPrefixCls:Yn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:mr,page:mr,active:!1,showTitle:fi,itemRender:Jn}),zt=Te.createElement(gn,{locale:Ar,rootPrefixCls:Yn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:fi,itemRender:Jn});var Ui=Math.max(1,yn-on),na=Math.min(yn+on,mr);yn-1<=on&&(na=1+on*2),mr-yn<=on&&(Ui=mr-on*2);for(var Wr=Ui;Wr<=na;Wr+=1){var vi=yn===Wr;Qn.push(Te.createElement(gn,{locale:Ar,rootPrefixCls:Yn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Wr,page:Wr,active:vi,showTitle:fi,itemRender:Jn}))}yn-1>=on*2&&yn!==3&&(Qn[0]=(0,Te.cloneElement)(Qn[0],{className:"".concat(Yn,"-item-after-jump-prev")}),Qn.unshift(ht)),mr-yn>=on*2&&yn!==mr-2&&(Qn[Qn.length-1]=(0,Te.cloneElement)(Qn[Qn.length-1],{className:"".concat(Yn,"-item-before-jump-next")}),Qn.push(Et)),Ui!==1&&Qn.unshift(zt),na!==mr&&Qn.push(fn)}var ra=!this.hasPrev()||!mr,Kr=!this.hasNext()||!mr,Vi=this.renderPrev(tn),lr=this.renderNext(Mn);return Te.createElement("ul",(0,fe.Z)({className:ze()(Yn,Rn,(0,st.Z)({},"".concat(Yn,"-disabled"),Xr)),style:cr,ref:this.paginationNode},wn),rr,Vi?Te.createElement("li",{title:fi?Ar.prev_page:null,onClick:this.prev,tabIndex:ra?null:0,onKeyPress:this.runIfEnterPrev,className:ze()("".concat(Yn,"-prev"),(0,st.Z)({},"".concat(Yn,"-disabled"),ra)),"aria-disabled":ra},Vi):null,Qn,lr?Te.createElement("li",{title:fi?Ar.next_page:null,onClick:this.next,tabIndex:Kr?null:0,onKeyPress:this.runIfEnterNext,className:ze()("".concat(Yn,"-next"),(0,st.Z)({},"".concat(Yn,"-disabled"),Kr)),"aria-disabled":Kr},lr):null,Te.createElement(Ft,{disabled:Xr,locale:Ar,rootPrefixCls:Yn,selectComponentClass:li,selectPrefixCls:Lt,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:yn,pageSize:xr,pageSizeOptions:Kn,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Rt}))}}],[{key:"getDerivedStateFromProps",value:function(Tt,Yn){var Rn={};if("current"in Tt&&(Rn.current=Tt.current,Tt.current!==Yn.current&&(Rn.currentInputValue=Rn.current)),"pageSize"in Tt&&Tt.pageSize!==Yn.pageSize){var cr=Yn.current,Xr=Yt(Tt.pageSize,Yn,Tt);cr=cr>Xr?Xr:cr,"current"in Tt||(Rn.current=cr,Rn.currentInputValue=cr),Rn.pageSize=Tt.pageSize}return Rn}}]),Ht}(Te.Component);Qe.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:rt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:rt,locale:ut.Z,style:{},itemRender:en,totalBoundaryShowSizeChanger:50};var Ie=Qe,Ot=ie(62906),In=ie(53124),mn=ie(98675),pt=ie(25378),wt=ie(10110),Qt=ie(11713);const Zn=gt=>Te.createElement(Qt.default,Object.assign({},gt,{showSearch:!0,size:"small"})),Cn=gt=>Te.createElement(Qt.default,Object.assign({},gt,{showSearch:!0,size:"middle"}));Zn.Option=Qt.default.Option,Cn.Option=Qt.default.Option;var rn=ie(47673),ln=ie(14747),zn=ie(67968),_n=ie(45503);const Oe=gt=>{const{componentCls:It}=gt;return{[`${It}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${It}-item-link`]:{color:gt.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${It}-item-link`]:{color:gt.colorTextDisabled,cursor:"not-allowed"}}},[`&${It}-disabled`]:{cursor:"not-allowed",[`${It}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:gt.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:gt.colorBorder,backgroundColor:gt.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:gt.itemActiveBgDisabled},a:{color:gt.itemActiveColorDisabled}}},[`${It}-item-link`]:{color:gt.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${It}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${It}-simple-pager`]:{color:gt.colorTextDisabled},[`${It}-jump-prev, ${It}-jump-next`]:{[`${It}-item-link-icon`]:{opacity:0},[`${It}-item-ellipsis`]:{opacity:1}}},[`&${It}-simple`]:{[`${It}-prev, ${It}-next`]:{[`&${It}-disabled ${It}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},ue=gt=>{const{componentCls:It}=gt;return{[`&${It}-mini ${It}-total-text, &${It}-mini ${It}-simple-pager`]:{height:gt.itemSizeSM,lineHeight:`${gt.itemSizeSM}px`},[`&${It}-mini ${It}-item`]:{minWidth:gt.itemSizeSM,height:gt.itemSizeSM,margin:0,lineHeight:`${gt.itemSizeSM-2}px`},[`&${It}-mini:not(${It}-disabled) ${It}-item:not(${It}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:gt.colorBgTextHover},"&:active":{backgroundColor:gt.colorBgTextActive}},[`&${It}-mini ${It}-prev, &${It}-mini ${It}-next`]:{minWidth:gt.itemSizeSM,height:gt.itemSizeSM,margin:0,lineHeight:`${gt.itemSizeSM}px`},[`&${It}-mini:not(${It}-disabled)`]:{[`${It}-prev, ${It}-next`]:{[`&:hover ${It}-item-link`]:{backgroundColor:gt.colorBgTextHover},[`&:active ${It}-item-link`]:{backgroundColor:gt.colorBgTextActive},[`&${It}-disabled:hover ${It}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${It}-mini ${It}-prev ${It}-item-link,
|
|
|
&${It}-mini ${It}-next ${It}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:gt.itemSizeSM,lineHeight:`${gt.itemSizeSM}px`}},[`&${It}-mini ${It}-jump-prev, &${It}-mini ${It}-jump-next`]:{height:gt.itemSizeSM,marginInlineEnd:0,lineHeight:`${gt.itemSizeSM}px`},[`&${It}-mini ${It}-options`]:{marginInlineStart:gt.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:gt.miniOptionsSizeChangerTop},"&-quick-jumper":{height:gt.itemSizeSM,lineHeight:`${gt.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,rn.x0)(gt)),{width:gt.paginationMiniQuickJumperInputWidth,height:gt.controlHeightSM})}}}},le=gt=>{const{componentCls:It}=gt;return{[`
|
|
|
&${It}-simple ${It}-prev,
|
|
|
&${It}-simple ${It}-next
|
|
|
`]:{height:gt.itemSizeSM,lineHeight:`${gt.itemSizeSM}px`,verticalAlign:"top",[`${It}-item-link`]:{height:gt.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:gt.colorBgTextHover},"&:active":{backgroundColor:gt.colorBgTextActive},"&::after":{height:gt.itemSizeSM,lineHeight:`${gt.itemSizeSM}px`}}},[`&${It}-simple ${It}-simple-pager`]:{display:"inline-block",height:gt.itemSizeSM,marginInlineEnd:gt.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:gt.marginXS,padding:`0 ${gt.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:gt.itemInputBg,border:`${gt.lineWidth}px ${gt.lineType} ${gt.colorBorder}`,borderRadius:gt.borderRadius,outline:"none",transition:`border-color ${gt.motionDurationMid}`,color:"inherit","&:hover":{borderColor:gt.colorPrimary},"&:focus":{borderColor:gt.colorPrimaryHover,boxShadow:`${gt.inputOutlineOffset}px 0 ${gt.controlOutlineWidth}px ${gt.controlOutline}`},"&[disabled]":{color:gt.colorTextDisabled,backgroundColor:gt.colorBgContainerDisabled,borderColor:gt.colorBorder,cursor:"not-allowed"}}}}},ve=gt=>{const{componentCls:It}=gt;return{[`${It}-jump-prev, ${It}-jump-next`]:{outline:0,[`${It}-item-container`]:{position:"relative",[`${It}-item-link-icon`]:{color:gt.colorPrimary,fontSize:gt.fontSizeSM,opacity:0,transition:`all ${gt.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${It}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:gt.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:gt.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:gt.paginationEllipsisTextIndent,opacity:1,transition:`all ${gt.motionDurationMid}`}},"&:hover":{[`${It}-item-link-icon`]:{opacity:1},[`${It}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${It}-prev,
|
|
|
${It}-jump-prev,
|
|
|
${It}-jump-next
|
|
|
`]:{marginInlineEnd:gt.marginXS},[`
|
|
|
${It}-prev,
|
|
|
${It}-next,
|
|
|
${It}-jump-prev,
|
|
|
${It}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:gt.itemSize,height:gt.itemSize,color:gt.colorText,fontFamily:gt.fontFamily,lineHeight:`${gt.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:gt.borderRadius,cursor:"pointer",transition:`all ${gt.motionDurationMid}`},[`${It}-prev, ${It}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:gt.colorText,cursor:"pointer",userSelect:"none"},[`${It}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:gt.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${gt.lineWidth}px ${gt.lineType} transparent`,borderRadius:gt.borderRadius,outline:"none",transition:`all ${gt.motionDurationMid}`},[`&:hover ${It}-item-link`]:{backgroundColor:gt.colorBgTextHover},[`&:active ${It}-item-link`]:{backgroundColor:gt.colorBgTextActive},[`&${It}-disabled:hover`]:{[`${It}-item-link`]:{backgroundColor:"transparent"}}},[`${It}-slash`]:{marginInlineEnd:gt.paginationSlashMarginInlineEnd,marginInlineStart:gt.paginationSlashMarginInlineStart},[`${It}-options`]:{display:"inline-block",marginInlineStart:gt.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:gt.controlHeight,marginInlineStart:gt.marginXS,lineHeight:`${gt.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,rn.ik)(gt)),{width:gt.controlHeightLG*1.25,height:gt.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:gt.marginXS,marginInlineEnd:gt.marginXS})}}}},pe=gt=>{const{componentCls:It}=gt;return{[`${It}-item`]:{display:"inline-block",minWidth:gt.itemSize,height:gt.itemSize,marginInlineEnd:gt.marginXS,fontFamily:gt.fontFamily,lineHeight:`${gt.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${gt.lineWidth}px ${gt.lineType} transparent`,borderRadius:gt.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${gt.paginationItemPaddingInline}px`,color:gt.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${It}-item-active)`]:{"&:hover":{transition:`all ${gt.motionDurationMid}`,backgroundColor:gt.colorBgTextHover},"&:active":{backgroundColor:gt.colorBgTextActive}},"&-active":{fontWeight:gt.fontWeightStrong,backgroundColor:gt.itemActiveBg,borderColor:gt.colorPrimary,a:{color:gt.colorPrimary},"&:hover":{borderColor:gt.colorPrimaryHover},"&:hover a":{color:gt.colorPrimaryHover}}}}},se=gt=>{const{componentCls:It}=gt;return{[It]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ln.Wf)(gt)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${It}-total-text`]:{display:"inline-block",height:gt.itemSize,marginInlineEnd:gt.marginXS,lineHeight:`${gt.itemSize-2}px`,verticalAlign:"middle"}}),pe(gt)),ve(gt)),le(gt)),ue(gt)),Oe(gt)),{[`@media only screen and (max-width: ${gt.screenLG}px)`]:{[`${It}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${gt.screenSM}px)`]:{[`${It}-options`]:{display:"none"}}}),[`&${gt.componentCls}-rtl`]:{direction:"rtl"}}},Be=gt=>{const{componentCls:It}=gt;return{[`${It}${It}-disabled:not(${It}-mini)`]:{"&, &:hover":{[`${It}-item-link`]:{borderColor:gt.colorBorder}},"&:focus-visible":{[`${It}-item-link`]:{borderColor:gt.colorBorder}},[`${It}-item, ${It}-item-link`]:{backgroundColor:gt.colorBgContainerDisabled,borderColor:gt.colorBorder,[`&:hover:not(${It}-item-active)`]:{backgroundColor:gt.colorBgContainerDisabled,borderColor:gt.colorBorder,a:{color:gt.colorTextDisabled}},[`&${It}-item-active`]:{backgroundColor:gt.itemActiveBgDisabled}},[`${It}-prev, ${It}-next`]:{"&:hover button":{backgroundColor:gt.colorBgContainerDisabled,borderColor:gt.colorBorder,color:gt.colorTextDisabled},[`${It}-item-link`]:{backgroundColor:gt.colorBgContainerDisabled,borderColor:gt.colorBorder}}},[`${It}:not(${It}-mini)`]:{[`${It}-prev, ${It}-next`]:{"&:hover button":{borderColor:gt.colorPrimaryHover,backgroundColor:gt.itemBg},[`${It}-item-link`]:{backgroundColor:gt.itemLinkBg,borderColor:gt.colorBorder},[`&:hover ${It}-item-link`]:{borderColor:gt.colorPrimary,backgroundColor:gt.itemBg,color:gt.colorPrimary},[`&${It}-disabled`]:{[`${It}-item-link`]:{borderColor:gt.colorBorder,color:gt.colorTextDisabled}}},[`${It}-item`]:{backgroundColor:gt.itemBg,border:`${gt.lineWidth}px ${gt.lineType} ${gt.colorBorder}`,[`&:hover:not(${It}-item-active)`]:{borderColor:gt.colorPrimary,backgroundColor:gt.itemBg,a:{color:gt.colorPrimary}},"&-active":{borderColor:gt.colorPrimary}}}}},ft=gt=>{const{componentCls:It}=gt;return{[`${It}:not(${It}-disabled)`]:{[`${It}-item`]:Object.assign({},(0,ln.Qy)(gt)),[`${It}-jump-prev, ${It}-jump-next`]:{"&:focus-visible":Object.assign({[`${It}-item-link-icon`]:{opacity:1},[`${It}-item-ellipsis`]:{opacity:0}},(0,ln.oN)(gt))},[`${It}-prev, ${It}-next`]:{[`&:focus-visible ${It}-item-link`]:Object.assign({},(0,ln.oN)(gt))}}}};var Bt=(0,zn.Z)("Pagination",gt=>{const It=(0,_n.TS)(gt,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:gt.marginXXS/2,paginationMiniQuickJumperInputWidth:gt.controlHeightLG*1.1,paginationItemPaddingInline:gt.marginXXS*1.5,paginationEllipsisLetterSpacing:gt.marginXXS/2,paginationSlashMarginInlineStart:gt.marginXXS,paginationSlashMarginInlineEnd:gt.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,rn.e5)(gt),(0,rn.TM)(gt));return[se(It),ft(It),gt.wireframe&&Be(It)]},gt=>({itemBg:gt.colorBgContainer,itemSize:gt.controlHeight,itemSizeSM:gt.controlHeightSM,itemActiveBg:gt.colorBgContainer,itemLinkBg:gt.colorBgContainer,itemActiveColorDisabled:gt.colorTextDisabled,itemActiveBgDisabled:gt.controlItemBgActiveDisabled,itemInputBg:gt.colorBgContainer,miniOptionsSizeChangerTop:0})),qt=function(gt,It){var Ht={};for(var Xt in gt)Object.prototype.hasOwnProperty.call(gt,Xt)&&It.indexOf(Xt)<0&&(Ht[Xt]=gt[Xt]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,Xt=Object.getOwnPropertySymbols(gt);Tt<Xt.length;Tt++)It.indexOf(Xt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(gt,Xt[Tt])&&(Ht[Xt[Tt]]=gt[Xt[Tt]]);return Ht},vn=gt=>{const{prefixCls:It,selectPrefixCls:Ht,className:Xt,rootClassName:Tt,style:Yn,size:Rn,locale:cr,selectComponentClass:Xr,responsive:wr,showSizeChanger:kr}=gt,Ar=qt(gt,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:gi}=(0,pt.Z)(wr),{getPrefixCls:oi,direction:fi,pagination:Pi={}}=Te.useContext(In.E_),Or=oi("pagination",It),[Jn,qn]=Bt(Or),nr=kr!=null?kr:Pi.showSizeChanger,Ur=Te.useMemo(()=>{const mr=Te.createElement("span",{className:`${Or}-item-ellipsis`},"\u2022\u2022\u2022"),Qn=Te.createElement("button",{className:`${Or}-item-link`,type:"button",tabIndex:-1},fi==="rtl"?Te.createElement(Ae.Z,null):Te.createElement(ge.Z,null)),ht=Te.createElement("button",{className:`${Or}-item-link`,type:"button",tabIndex:-1},fi==="rtl"?Te.createElement(ge.Z,null):Te.createElement(Ae.Z,null)),Et=Te.createElement("a",{className:`${Or}-item-link`},Te.createElement("div",{className:`${Or}-item-container`},fi==="rtl"?Te.createElement(ke.Z,{className:`${Or}-item-link-icon`}):Te.createElement(ce,{className:`${Or}-item-link-icon`}),mr)),zt=Te.createElement("a",{className:`${Or}-item-link`},Te.createElement("div",{className:`${Or}-item-container`},fi==="rtl"?Te.createElement(ce,{className:`${Or}-item-link-icon`}):Te.createElement(ke.Z,{className:`${Or}-item-link-icon`}),mr));return{prevIcon:Qn,nextIcon:ht,jumpPrevIcon:Et,jumpNextIcon:zt}},[fi,Or]),[li]=(0,wt.Z)("Pagination",Ot.Z),Lt=Object.assign(Object.assign({},li),cr),Kn=(0,mn.Z)(Rn),Bn=Kn==="small"||!!(gi&&!Kn&&wr),yn=oi("select",Ht),xr=ze()({[`${Or}-mini`]:Bn,[`${Or}-rtl`]:fi==="rtl"},Pi==null?void 0:Pi.className,Xt,Tt,qn),Sr=Object.assign(Object.assign({},Pi==null?void 0:Pi.style),Yn);return Jn(Te.createElement(Ie,Object.assign({},Ur,Ar,{style:Sr,prefixCls:Or,selectPrefixCls:yn,className:xr,selectComponentClass:Xr||(Bn?Zn:Cn),locale:Lt,showSizeChanger:nr})))},dn=vn},78045:function(Ln,Kt,ie){"use strict";ie.d(Kt,{ZP:function(){return Qe}});var fe=ie(94184),Te=ie.n(fe),Re=ie(5663),Ge=ie(1337),ye=ie(67294),_e=ie(53124),ce=ie(98675);const ke=ye.createContext(null),ge=ke.Provider;var Ae=ke;const lt=ye.createContext(null),ze=lt.Provider;var st=ie(95860),dt=ie(17799),ct=ie(98866),qe=ie(65223),be=ie(14747),vt=ie(67968),Dt=ie(45503);const it=Ie=>{const{componentCls:Ot,antCls:In}=Ie,mn=`${Ot}-group`;return{[mn]:Object.assign(Object.assign({},(0,be.Wf)(Ie)),{display:"inline-block",fontSize:0,[`&${mn}-rtl`]:{direction:"rtl"},[`${In}-badge ${In}-badge-count`]:{zIndex:1},[`> ${In}-badge:not(:first-child) > ${In}-button-wrapper`]:{borderInlineStart:"none"}})}},ot=Ie=>{const{componentCls:Ot,wrapperMarginInlineEnd:In,colorPrimary:mn,radioSize:pt,motionDurationSlow:wt,motionDurationMid:Qt,motionEaseInOutCirc:Zn,colorBgContainer:Cn,colorBorder:rn,lineWidth:ln,dotSize:zn,colorBgContainerDisabled:_n,colorTextDisabled:Oe,paddingXS:ue,dotColorDisabled:le,lineType:ve,radioDotDisabledSize:pe,wireframe:se,colorWhite:Be}=Ie,ft=`${Ot}-inner`;return{[`${Ot}-wrapper`]:Object.assign(Object.assign({},(0,be.Wf)(Ie)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:In,cursor:"pointer",[`&${Ot}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ie.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${Ot}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${ln}px ${ve} ${mn}`,borderRadius:"50%",visibility:"hidden",content:'""'},[Ot]:Object.assign(Object.assign({},(0,be.Wf)(Ie)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Ot}-wrapper:hover &,
|
|
|
&:hover ${ft}`]:{borderColor:mn},[`${Ot}-input:focus-visible + ${ft}`]:Object.assign({},(0,be.oN)(Ie)),[`${Ot}:hover::after, ${Ot}-wrapper:hover &::after`]:{visibility:"visible"},[`${Ot}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:pt,height:pt,marginBlockStart:pt/-2,marginInlineStart:pt/-2,backgroundColor:se?mn:Be,borderBlockStart:0,borderInlineStart:0,borderRadius:pt,transform:"scale(0)",opacity:0,transition:`all ${wt} ${Zn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:pt,height:pt,backgroundColor:Cn,borderColor:rn,borderStyle:"solid",borderWidth:ln,borderRadius:"50%",transition:`all ${Qt}`},[`${Ot}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Ot}-checked`]:{[ft]:{borderColor:mn,backgroundColor:se?Cn:mn,"&::after":{transform:`scale(${zn/pt})`,opacity:1,transition:`all ${wt} ${Zn}`}}},[`${Ot}-disabled`]:{cursor:"not-allowed",[ft]:{backgroundColor:_n,borderColor:rn,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${Ot}-input`]:{cursor:"not-allowed"},[`${Ot}-disabled + span`]:{color:Oe,cursor:"not-allowed"},[`&${Ot}-checked`]:{[ft]:{"&::after":{transform:`scale(${pe/pt})`}}}},[`span${Ot} + *`]:{paddingInlineStart:ue,paddingInlineEnd:ue}})}},Ce=Ie=>{const{buttonColor:Ot,controlHeight:In,componentCls:mn,lineWidth:pt,lineType:wt,colorBorder:Qt,motionDurationSlow:Zn,motionDurationMid:Cn,buttonPaddingInline:rn,fontSize:ln,buttonBg:zn,fontSizeLG:_n,controlHeightLG:Oe,controlHeightSM:ue,paddingXS:le,borderRadius:ve,borderRadiusSM:pe,borderRadiusLG:se,buttonCheckedBg:Be,buttonSolidCheckedColor:ft,colorTextDisabled:Bt,colorBgContainerDisabled:qt,buttonCheckedBgDisabled:an,buttonCheckedColorDisabled:vn,colorPrimary:dn,colorPrimaryHover:gt,colorPrimaryActive:It,buttonSolidCheckedBg:Ht,buttonSolidCheckedHoverBg:Xt,buttonSolidCheckedActiveBg:Tt}=Ie;return{[`${mn}-button-wrapper`]:{position:"relative",display:"inline-block",height:In,margin:0,paddingInline:rn,paddingBlock:0,color:Ot,fontSize:ln,lineHeight:`${In-pt*2}px`,background:zn,border:`${pt}px ${wt} ${Qt}`,borderBlockStartWidth:pt+.02,borderInlineStartWidth:0,borderInlineEndWidth:pt,cursor:"pointer",transition:[`color ${Cn}`,`background ${Cn}`,`box-shadow ${Cn}`].join(","),a:{color:Ot},[`> ${mn}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-pt,insetInlineStart:-pt,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:pt,paddingInline:0,backgroundColor:Qt,transition:`background-color ${Zn}`,content:'""'}},"&:first-child":{borderInlineStart:`${pt}px ${wt} ${Qt}`,borderStartStartRadius:ve,borderEndStartRadius:ve},"&:last-child":{borderStartEndRadius:ve,borderEndEndRadius:ve},"&:first-child:last-child":{borderRadius:ve},[`${mn}-group-large &`]:{height:Oe,fontSize:_n,lineHeight:`${Oe-pt*2}px`,"&:first-child":{borderStartStartRadius:se,borderEndStartRadius:se},"&:last-child":{borderStartEndRadius:se,borderEndEndRadius:se}},[`${mn}-group-small &`]:{height:ue,paddingInline:le-pt,paddingBlock:0,lineHeight:`${ue-pt*2}px`,"&:first-child":{borderStartStartRadius:pe,borderEndStartRadius:pe},"&:last-child":{borderStartEndRadius:pe,borderEndEndRadius:pe}},"&:hover":{position:"relative",color:dn},"&:has(:focus-visible)":Object.assign({},(0,be.oN)(Ie)),[`${mn}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${mn}-button-wrapper-disabled)`]:{zIndex:1,color:dn,background:Be,borderColor:dn,"&::before":{backgroundColor:dn},"&:first-child":{borderColor:dn},"&:hover":{color:gt,borderColor:gt,"&::before":{backgroundColor:gt}},"&:active":{color:It,borderColor:It,"&::before":{backgroundColor:It}}},[`${mn}-group-solid &-checked:not(${mn}-button-wrapper-disabled)`]:{color:ft,background:Ht,borderColor:Ht,"&:hover":{color:ft,background:Xt,borderColor:Xt},"&:active":{color:ft,background:Tt,borderColor:Tt}},"&-disabled":{color:Bt,backgroundColor:qt,borderColor:Qt,cursor:"not-allowed","&:first-child, &:hover":{color:Bt,backgroundColor:qt,borderColor:Qt}},[`&-disabled${mn}-button-wrapper-checked`]:{color:vn,backgroundColor:an,borderColor:Qt,boxShadow:"none"}}}},Se=Ie=>Ie-4*2;var He=(0,vt.Z)("Radio",Ie=>{const{controlOutline:Ot,controlOutlineWidth:In,radioSize:mn}=Ie,pt=`0 0 0 ${In}px ${Ot}`,wt=pt,Qt=Se(mn),Zn=(0,Dt.TS)(Ie,{radioDotDisabledSize:Qt,radioFocusShadow:pt,radioButtonFocusShadow:wt});return[it(Zn),ot(Zn),Ce(Zn)]},Ie=>{const{wireframe:Ot,padding:In,marginXS:mn,lineWidth:pt,fontSizeLG:wt,colorText:Qt,colorBgContainer:Zn,colorTextDisabled:Cn,controlItemBgActiveDisabled:rn,colorTextLightSolid:ln,colorPrimary:zn,colorPrimaryHover:_n,colorPrimaryActive:Oe}=Ie,ue=4,le=wt,ve=Ot?Se(le):le-(ue+pt)*2;return{radioSize:le,dotSize:ve,dotColorDisabled:Cn,buttonSolidCheckedColor:ln,buttonSolidCheckedBg:zn,buttonSolidCheckedHoverBg:_n,buttonSolidCheckedActiveBg:Oe,buttonBg:Zn,buttonCheckedBg:Zn,buttonColor:Qt,buttonCheckedBgDisabled:rn,buttonCheckedColorDisabled:Cn,buttonPaddingInline:In-pt,wrapperMarginInlineEnd:mn}}),Ue=ie(45353),xt=ie(92429),mt=function(Ie,Ot){var In={};for(var mn in Ie)Object.prototype.hasOwnProperty.call(Ie,mn)&&Ot.indexOf(mn)<0&&(In[mn]=Ie[mn]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,mn=Object.getOwnPropertySymbols(Ie);pt<mn.length;pt++)Ot.indexOf(mn[pt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,mn[pt])&&(In[mn[pt]]=Ie[mn[pt]]);return In};const ut=(Ie,Ot)=>{var In,mn;const pt=ye.useContext(Ae),wt=ye.useContext(lt),{getPrefixCls:Qt,direction:Zn,radio:Cn}=ye.useContext(_e.E_),rn=ye.useRef(null),ln=(0,dt.sQ)(Ot,rn),{isFormItemInput:zn}=ye.useContext(qe.aM),_n=It=>{var Ht,Xt;(Ht=Ie.onChange)===null||Ht===void 0||Ht.call(Ie,It),(Xt=pt==null?void 0:pt.onChange)===null||Xt===void 0||Xt.call(pt,It)},{prefixCls:Oe,className:ue,rootClassName:le,children:ve,style:pe}=Ie,se=mt(Ie,["prefixCls","className","rootClassName","children","style"]),Be=Qt("radio",Oe),ft=((pt==null?void 0:pt.optionType)||wt)==="button",Bt=ft?`${Be}-button`:Be,[qt,an]=He(Be),vn=Object.assign({},se),dn=ye.useContext(ct.Z);pt&&(vn.name=pt.name,vn.onChange=_n,vn.checked=Ie.value===pt.value,vn.disabled=(In=vn.disabled)!==null&&In!==void 0?In:pt.disabled),vn.disabled=(mn=vn.disabled)!==null&&mn!==void 0?mn:dn;const gt=Te()(`${Bt}-wrapper`,{[`${Bt}-wrapper-checked`]:vn.checked,[`${Bt}-wrapper-disabled`]:vn.disabled,[`${Bt}-wrapper-rtl`]:Zn==="rtl",[`${Bt}-wrapper-in-form-item`]:zn},Cn==null?void 0:Cn.className,ue,le,an);return qt(ye.createElement(Ue.Z,{component:"Radio",disabled:vn.disabled},ye.createElement("label",{className:gt,style:Object.assign(Object.assign({},Cn==null?void 0:Cn.style),pe),onMouseEnter:Ie.onMouseEnter,onMouseLeave:Ie.onMouseLeave},ye.createElement(st.Z,Object.assign({},vn,{className:Te()(vn.className,!ft&&xt.A),type:"radio",prefixCls:Bt,ref:ln})),ve!==void 0?ye.createElement("span",null,ve):null)))};var Ft=ye.forwardRef(ut);const yt=ye.forwardRef((Ie,Ot)=>{const{getPrefixCls:In,direction:mn}=ye.useContext(_e.E_),[pt,wt]=(0,Re.Z)(Ie.defaultValue,{value:Ie.value}),Qt=Ht=>{const Xt=pt,Tt=Ht.target.value;"value"in Ie||wt(Tt);const{onChange:Yn}=Ie;Yn&&Tt!==Xt&&Yn(Ht)},{prefixCls:Zn,className:Cn,rootClassName:rn,options:ln,buttonStyle:zn="outline",disabled:_n,children:Oe,size:ue,style:le,id:ve,onMouseEnter:pe,onMouseLeave:se,onFocus:Be,onBlur:ft}=Ie,Bt=In("radio",Zn),qt=`${Bt}-group`,[an,vn]=He(Bt);let dn=Oe;ln&&ln.length>0&&(dn=ln.map(Ht=>typeof Ht=="string"||typeof Ht=="number"?ye.createElement(Ft,{key:Ht.toString(),prefixCls:Bt,disabled:_n,value:Ht,checked:pt===Ht},Ht):ye.createElement(Ft,{key:`radio-group-value-options-${Ht.value}`,prefixCls:Bt,disabled:Ht.disabled||_n,value:Ht.value,checked:pt===Ht.value,title:Ht.title,style:Ht.style},Ht.label)));const gt=(0,ce.Z)(ue),It=Te()(qt,`${qt}-${zn}`,{[`${qt}-${gt}`]:gt,[`${qt}-rtl`]:mn==="rtl"},Cn,rn,vn);return an(ye.createElement("div",Object.assign({},(0,Ge.Z)(Ie,{aria:!0,data:!0}),{className:It,style:le,onMouseEnter:pe,onMouseLeave:se,onFocus:Be,onBlur:ft,id:ve,ref:Ot}),ye.createElement(ge,{value:{onChange:Qt,value:pt,disabled:Ie.disabled,name:Ie.name,optionType:Ie.optionType}},dn)))});var gn=ye.memo(yt),rt=function(Ie,Ot){var In={};for(var mn in Ie)Object.prototype.hasOwnProperty.call(Ie,mn)&&Ot.indexOf(mn)<0&&(In[mn]=Ie[mn]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,mn=Object.getOwnPropertySymbols(Ie);pt<mn.length;pt++)Ot.indexOf(mn[pt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,mn[pt])&&(In[mn[pt]]=Ie[mn[pt]]);return In};const Mt=(Ie,Ot)=>{const{getPrefixCls:In}=ye.useContext(_e.E_),{prefixCls:mn}=Ie,pt=rt(Ie,["prefixCls"]),wt=In("radio",mn);return ye.createElement(ze,{value:"button"},ye.createElement(Ft,Object.assign({prefixCls:wt},pt,{type:"radio",ref:Ot})))};var en=ye.forwardRef(Mt);const Yt=Ft;Yt.Button=en,Yt.Group=gn,Yt.__ANT_RADIO=!0;var Qe=Yt},11713:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return ur}});var fe=ie(94184),Te=ie.n(fe),Re=ie(87462),Ge=ie(74902),ye=ie(4942),_e=ie(1413),ce=ie(97685),ke=ie(45987),ge=ie(71002),Ae=ie(67294);function lt(Ve){var Je=Ae.useRef();Je.current=Ve;var Pt=Ae.useCallback(function(){for(var _t,hn=arguments.length,Dn=new Array(hn),An=0;An<hn;An++)Dn[An]=arguments[An];return(_t=Je.current)===null||_t===void 0?void 0:_t.call.apply(_t,[Je].concat(Dn))},[]);return Pt}function ze(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var st=ze()?Ae.useLayoutEffect:Ae.useEffect,dt=st,ct=function(Je,Pt){var _t=Ae.useRef(!0);st(function(){if(!_t.current)return Je()},Pt),st(function(){return _t.current=!1,function(){_t.current=!0}},[])};function qe(Ve){var Je=Ae.useRef(!1),Pt=Ae.useState(Ve),_t=(0,ce.Z)(Pt,2),hn=_t[0],Dn=_t[1];Ae.useEffect(function(){return Je.current=!1,function(){Je.current=!0}},[]);function An(or,Un){Un&&Je.current||Dn(or)}return[hn,An]}function be(Ve){return Ve!==void 0}function vt(Ve,Je){var Pt=Je||{},_t=Pt.defaultValue,hn=Pt.value,Dn=Pt.onChange,An=Pt.postState,or=qe(function(){return be(hn)?hn:be(_t)?typeof _t=="function"?_t():_t:typeof Ve=="function"?Ve():Ve}),Un=(0,ce.Z)(or,2),Tn=Un[0],tr=Un[1],dr=hn!==void 0?hn:Tn,Pr=An?An(dr):dr,fr=lt(Dn),Fr=qe([dr]),ri=(0,ce.Z)(Fr,2),Vr=ri[0],ii=ri[1];ct(function(){var Jr=Vr[0];Tn!==Jr&&fr(Tn,Jr)},[Vr]),ct(function(){be(hn)||tr(hn)},[hn]);var Br=lt(function(Jr,si){tr(Jr,si),ii([dr],si)});return[Pr,Br]}var Dt={};function it(Ve,Je){}function ot(Ve,Je){}function Ce(){Dt={}}function Se(Ve,Je,Pt){!Je&&!Dt[Pt]&&(Ve(!1,Pt),Dt[Pt]=!0)}function He(Ve,Je){Se(it,Ve,Je)}function Ue(Ve,Je){Se(ot,Ve,Je)}var xt=He,mt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Ve=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(Ve)||/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(Ve==null?void 0:Ve.substr(0,4))},ut={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(Je){var Pt=Je.keyCode;if(Je.altKey&&!Je.ctrlKey||Je.metaKey||Pt>=ut.F1&&Pt<=ut.F12)return!1;switch(Pt){case ut.ALT:case ut.CAPS_LOCK:case ut.CONTEXT_MENU:case ut.CTRL:case ut.DOWN:case ut.END:case ut.ESC:case ut.HOME:case ut.INSERT:case ut.LEFT:case ut.MAC_FF_META:case ut.META:case ut.NUMLOCK:case ut.NUM_CENTER:case ut.PAGE_DOWN:case ut.PAGE_UP:case ut.PAUSE:case ut.PRINT_SCREEN:case ut.RIGHT:case ut.SHIFT:case ut.UP:case ut.WIN_KEY:case ut.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Je){if(Je>=ut.ZERO&&Je<=ut.NINE||Je>=ut.NUM_ZERO&&Je<=ut.NUM_MULTIPLY||Je>=ut.A&&Je<=ut.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Je===0)return!0;switch(Je){case ut.SPACE:case ut.QUESTION_MARK:case ut.NUM_PLUS:case ut.NUM_MINUS:case ut.NUM_PERIOD:case ut.NUM_DIVISION:case ut.SEMICOLON:case ut.DASH:case ut.EQUALS:case ut.COMMA:case ut.PERIOD:case ut.SLASH:case ut.APOSTROPHE:case ut.SINGLE_QUOTE:case ut.OPEN_SQUARE_BRACKET:case ut.BACKSLASH:case ut.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},$e=ut,Ft=ie(47655);function yt(Ve,Je,Pt){var _t=Ae.useRef({});return(!("value"in _t.current)||Pt(_t.current.condition,Je))&&(_t.current.value=Ve(),_t.current.condition=Je),_t.current.value}function gn(Ve,Je){typeof Ve=="function"?Ve(Je):(0,ge.Z)(Ve)==="object"&&Ve&&"current"in Ve&&(Ve.current=Je)}function rt(){for(var Ve=arguments.length,Je=new Array(Ve),Pt=0;Pt<Ve;Pt++)Je[Pt]=arguments[Pt];var _t=Je.filter(function(hn){return hn});return _t.length<=1?_t[0]:function(hn){Je.forEach(function(Dn){gn(Dn,hn)})}}function Mt(){for(var Ve=arguments.length,Je=new Array(Ve),Pt=0;Pt<Ve;Pt++)Je[Pt]=arguments[Pt];return yt(function(){return rt.apply(void 0,Je)},Je,function(_t,hn){return _t.length===hn.length&&_t.every(function(Dn,An){return Dn===hn[An]})})}function en(Ve){var Je,Pt,_t=isMemo(Ve)?Ve.type.type:Ve.type;return!(typeof _t=="function"&&!((Je=_t.prototype)!==null&&Je!==void 0&&Je.render)||typeof Ve=="function"&&!((Pt=Ve.prototype)!==null&&Pt!==void 0&&Pt.render))}var Yt=function(Je){var Pt=Je.className,_t=Je.customizeIcon,hn=Je.customizeIconProps,Dn=Je.onMouseDown,An=Je.onClick,or=Je.children,Un;return typeof _t=="function"?Un=_t(hn):Un=_t,Ae.createElement("span",{className:Pt,onMouseDown:function(tr){tr.preventDefault(),Dn&&Dn(tr)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:An,"aria-hidden":!0},Un!==void 0?Un:Ae.createElement("span",{className:Te()(Pt.split(/\s+/).map(function(Tn){return"".concat(Tn,"-icon")}))},or))},Qe=Yt;function Ie(Ve,Je,Pt,_t,hn){var Dn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,An=arguments.length>6?arguments[6]:void 0,or=arguments.length>7?arguments[7]:void 0,Un=Ae.useMemo(function(){if((0,ge.Z)(_t)==="object")return _t.clearIcon;if(hn)return hn},[_t,hn]),Tn=Ae.useMemo(function(){return!!(!Dn&&_t&&(Pt.length||An)&&!(or==="combobox"&&An===""))},[_t,Dn,Pt.length,An,or]);return{allowClear:Tn,clearIcon:Ae.createElement(Qe,{className:"".concat(Ve,"-clear"),onMouseDown:Je,customizeIcon:Un},"\xD7")}}var Ot=Ae.createContext(null);function In(){return Ae.useContext(Ot)}function mn(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Je=Ae.useState(!1),Pt=(0,ce.Z)(Je,2),_t=Pt[0],hn=Pt[1],Dn=Ae.useRef(null),An=function(){window.clearTimeout(Dn.current)};Ae.useEffect(function(){return An},[]);var or=function(Tn,tr){An(),Dn.current=window.setTimeout(function(){hn(Tn),tr&&tr()},Ve)};return[_t,or,An]}function pt(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Je=Ae.useRef(null),Pt=Ae.useRef(null);Ae.useEffect(function(){return function(){window.clearTimeout(Pt.current)}},[]);function _t(hn){(hn||Je.current===null)&&(Je.current=hn),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Je.current=null},Ve)}return[function(){return Je.current},_t]}function wt(Ve,Je,Pt,_t){var hn=Ae.useRef(null);hn.current={open:Je,triggerOpen:Pt,customizedTrigger:_t},Ae.useEffect(function(){function Dn(An){var or;if(!((or=hn.current)!==null&&or!==void 0&&or.customizedTrigger)){var Un=An.target;Un.shadowRoot&&An.composed&&(Un=An.composedPath()[0]||Un),hn.current.open&&Ve().filter(function(Tn){return Tn}).every(function(Tn){return!Tn.contains(Un)&&Tn!==Un})&&hn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Dn),function(){return window.removeEventListener("mousedown",Dn)}},[])}var Qt=`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`,Cn="".concat(Qt," ").concat(Zn).split(/[\s\n]+/),rn="aria-",ln="data-";function zn(Ve,Je){return Ve.indexOf(Je)===0}function _n(Ve){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pt;Je===!1?Pt={aria:!0,data:!0,attr:!0}:Je===!0?Pt={aria:!0}:Pt=(0,_e.Z)({},Je);var _t={};return Object.keys(Ve).forEach(function(hn){(Pt.aria&&(hn==="role"||zn(hn,rn))||Pt.data&&zn(hn,ln)||Pt.attr&&Cn.includes(hn))&&(_t[hn]=Ve[hn])}),_t}var Oe=ie(48555),ue=ie(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ve=void 0;function pe(Ve,Je){var Pt=Ve.prefixCls,_t=Ve.invalidate,hn=Ve.item,Dn=Ve.renderItem,An=Ve.responsive,or=Ve.responsiveDisabled,Un=Ve.registerSize,Tn=Ve.itemKey,tr=Ve.className,dr=Ve.style,Pr=Ve.children,fr=Ve.display,Fr=Ve.order,ri=Ve.component,Vr=ri===void 0?"div":ri,ii=(0,ke.Z)(Ve,le),Br=An&&!fr;function Jr(zi){Un(Tn,zi)}Ae.useEffect(function(){return function(){Jr(null)}},[]);var si=Dn&&hn!==ve?Dn(hn):Pr,_i;_t||(_i={opacity:Br?0:1,height:Br?0:ve,overflowY:Br?"hidden":ve,order:An?Fr:ve,pointerEvents:Br?"none":ve,position:Br?"absolute":ve});var Hr={};Br&&(Hr["aria-hidden"]=!0);var Bi=Ae.createElement(Vr,(0,Re.Z)({className:Te()(!_t&&Pt,tr),style:(0,_e.Z)((0,_e.Z)({},_i),dr)},Hr,ii,{ref:Je}),si);return An&&(Bi=Ae.createElement(Oe.Z,{onResize:function(Ia){var ma=Ia.offsetWidth;Jr(ma)},disabled:or},Bi)),Bi}var se=Ae.forwardRef(pe);se.displayName="Item";var Be=se,ft=ie(77527),Bt=ie(73935),qt=ie(96523);function an(Ve){if(typeof MessageChannel=="undefined")(0,qt.Z)(Ve);else{var Je=new MessageChannel;Je.port1.onmessage=function(){return Ve()},Je.port2.postMessage(void 0)}}function vn(){var Ve=Ae.useRef(null),Je=function(_t){Ve.current||(Ve.current=[],an(function(){(0,Bt.unstable_batchedUpdates)(function(){Ve.current.forEach(function(hn){hn()}),Ve.current=null})})),Ve.current.push(_t)};return Je}function dn(Ve,Je){var Pt=Ae.useState(Je),_t=(0,ce.Z)(Pt,2),hn=_t[0],Dn=_t[1],An=(0,ft.Z)(function(or){Ve(function(){Dn(or)})});return[hn,An]}var gt=Ae.createContext(null),It=["component"],Ht=["className"],Xt=["className"],Tt=function(Je,Pt){var _t=Ae.useContext(gt);if(!_t){var hn=Je.component,Dn=hn===void 0?"div":hn,An=(0,ke.Z)(Je,It);return Ae.createElement(Dn,(0,Re.Z)({},An,{ref:Pt}))}var or=_t.className,Un=(0,ke.Z)(_t,Ht),Tn=Je.className,tr=(0,ke.Z)(Je,Xt);return Ae.createElement(gt.Provider,{value:null},Ae.createElement(Be,(0,Re.Z)({ref:Pt,className:Te()(or,Tn)},Un,tr)))},Yn=Ae.forwardRef(Tt);Yn.displayName="RawItem";var Rn=Yn,cr=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Xr="responsive",wr="invalidate";function kr(Ve){return"+ ".concat(Ve.length," ...")}function Ar(Ve,Je){var Pt=Ve.prefixCls,_t=Pt===void 0?"rc-overflow":Pt,hn=Ve.data,Dn=hn===void 0?[]:hn,An=Ve.renderItem,or=Ve.renderRawItem,Un=Ve.itemKey,Tn=Ve.itemWidth,tr=Tn===void 0?10:Tn,dr=Ve.ssr,Pr=Ve.style,fr=Ve.className,Fr=Ve.maxCount,ri=Ve.renderRest,Vr=Ve.renderRawRest,ii=Ve.suffix,Br=Ve.component,Jr=Br===void 0?"div":Br,si=Ve.itemComponent,_i=Ve.onVisibleChange,Hr=(0,ke.Z)(Ve,cr),Bi=dr==="full",zi=vn(),Ia=dn(zi,null),ma=(0,ce.Z)(Ia,2),qi=ma[0],Oi=ma[1],Ri=qi||0,xi=dn(zi,new Map),ea=(0,ce.Z)(xi,2),wi=ea[0],ci=ea[1],Wi=dn(zi,0),ha=(0,ce.Z)(Wi,2),go=ha[0],lo=ha[1],Ua=dn(zi,0),Ba=(0,ce.Z)(Ua,2),Ea=Ba[0],ji=Ba[1],Ao=dn(zi,0),la=(0,ce.Z)(Ao,2),Li=la[0],xa=la[1],Ya=(0,Ae.useState)(null),Ma=(0,ce.Z)(Ya,2),Ta=Ma[0],Ki=Ma[1],Ja=(0,Ae.useState)(null),vo=(0,ce.Z)(Ja,2),ro=vo[0],yo=vo[1],Mo=Ae.useMemo(function(){return ro===null&&Bi?Number.MAX_SAFE_INTEGER:ro||0},[ro,qi]),Xo=(0,Ae.useState)(!1),io=(0,ce.Z)(Xo,2),So=io[0],os=io[1],rs="".concat(_t,"-item"),cs=Math.max(go,Ea),Oo=Fr===Xr,bo=Dn.length&&Oo,sa=Fr===wr,Sa=bo||typeof Fr=="number"&&Dn.length>Fr,Qa=(0,Ae.useMemo)(function(){var Ka=Dn;return bo?qi===null&&Bi?Ka=Dn:Ka=Dn.slice(0,Math.min(Dn.length,Ri/tr)):typeof Fr=="number"&&(Ka=Dn.slice(0,Fr)),Ka},[Dn,tr,qi,Fr,bo]),co=(0,Ae.useMemo)(function(){return bo?Dn.slice(Mo+1):Dn.slice(Qa.length)},[Dn,Qa,bo,Mo]),jo=(0,Ae.useCallback)(function(Ka,ei){var Xi;return typeof Un=="function"?Un(Ka):(Xi=Un&&(Ka==null?void 0:Ka[Un]))!==null&&Xi!==void 0?Xi:ei},[Un]),us=(0,Ae.useCallback)(An||function(Ka){return Ka},[An]);function xs(Ka,ei,Xi){ro===Ka&&(ei===void 0||ei===Ta)||(yo(Ka),Xi||(os(Ka<Dn.length-1),_i==null||_i(Ka)),ei!==void 0&&Ki(ei))}function Js(Ka,ei){Oi(ei.clientWidth)}function Fs(Ka,ei){ci(function(Xi){var Yi=new Map(Xi);return ei===null?Yi.delete(Ka):Yi.set(Ka,ei),Yi})}function ds(Ka,ei){ji(ei),lo(Ea)}function zs(Ka,ei){xa(ei)}function za(Ka){return wi.get(jo(Qa[Ka],Ka))}(0,ue.Z)(function(){if(Ri&&typeof cs=="number"&&Qa){var Ka=Li,ei=Qa.length,Xi=ei-1;if(!ei){xs(0,null);return}for(var Yi=0;Yi<ei;Yi+=1){var pa=za(Yi);if(Bi&&(pa=pa||0),pa===void 0){xs(Yi-1,void 0,!0);break}if(Ka+=pa,Xi===0&&Ka<=Ri||Yi===Xi-1&&Ka+za(Xi)<=Ri){xs(Xi,null);break}else if(Ka+cs>Ri){xs(Yi-1,Ka-pa-Li+Ea);break}}ii&&za(0)+Li>Ri&&Ki(null)}},[Ri,wi,Ea,Li,jo,Qa]);var ga=So&&!!co.length,so={};Ta!==null&&bo&&(so={position:"absolute",left:Ta,top:0});var ko={prefixCls:rs,responsive:bo,component:si,invalidate:sa},fs=or?function(Ka,ei){var Xi=jo(Ka,ei);return Ae.createElement(gt.Provider,{key:Xi,value:(0,_e.Z)((0,_e.Z)({},ko),{},{order:ei,item:Ka,itemKey:Xi,registerSize:Fs,display:ei<=Mo})},or(Ka,ei))}:function(Ka,ei){var Xi=jo(Ka,ei);return Ae.createElement(Be,(0,Re.Z)({},ko,{order:ei,key:Xi,item:Ka,renderItem:us,itemKey:Xi,registerSize:Fs,display:ei<=Mo}))},ss,$l={order:ga?Mo:Number.MAX_SAFE_INTEGER,className:"".concat(rs,"-rest"),registerSize:ds,display:ga};if(Vr)Vr&&(ss=Ae.createElement(gt.Provider,{value:(0,_e.Z)((0,_e.Z)({},ko),$l)},Vr(co)));else{var ml=ri||kr;ss=Ae.createElement(Be,(0,Re.Z)({},ko,$l),typeof ml=="function"?ml(co):ml)}var Sl=Ae.createElement(Jr,(0,Re.Z)({className:Te()(!sa&&_t,fr),style:Pr,ref:Je},Hr),Qa.map(fs),Sa?ss:null,ii&&Ae.createElement(Be,(0,Re.Z)({},ko,{responsive:Oo,responsiveDisabled:!bo,order:Mo,className:"".concat(rs,"-suffix"),registerSize:zs,display:!0,style:so}),ii));return Oo&&(Sl=Ae.createElement(Oe.Z,{onResize:Js,disabled:!bo},Sl)),Sl}var gi=Ae.forwardRef(Ar);gi.displayName="Overflow",gi.Item=Rn,gi.RESPONSIVE=Xr,gi.INVALIDATE=wr;var oi=gi,fi=oi,Pi=function(Je,Pt){var _t,hn,Dn=Je.prefixCls,An=Je.id,or=Je.inputElement,Un=Je.disabled,Tn=Je.tabIndex,tr=Je.autoFocus,dr=Je.autoComplete,Pr=Je.editable,fr=Je.activeDescendantId,Fr=Je.value,ri=Je.maxLength,Vr=Je.onKeyDown,ii=Je.onMouseDown,Br=Je.onChange,Jr=Je.onPaste,si=Je.onCompositionStart,_i=Je.onCompositionEnd,Hr=Je.open,Bi=Je.attrs,zi=or||Ae.createElement("input",null),Ia=zi,ma=Ia.ref,qi=Ia.props,Oi=qi.onKeyDown,Ri=qi.onChange,xi=qi.onMouseDown,ea=qi.onCompositionStart,wi=qi.onCompositionEnd,ci=qi.style;return"maxLength"in zi.props,zi=Ae.cloneElement(zi,(0,_e.Z)((0,_e.Z)((0,_e.Z)({type:"search"},qi),{},{id:An,ref:rt(Pt,ma),disabled:Un,tabIndex:Tn,autoComplete:dr||"off",autoFocus:tr,className:Te()("".concat(Dn,"-selection-search-input"),(_t=zi)===null||_t===void 0||(hn=_t.props)===null||hn===void 0?void 0:hn.className),role:"combobox","aria-label":"Search","aria-expanded":Hr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(An,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(An,"_list"),"aria-activedescendant":Hr?fr:void 0},Bi),{},{value:Pr?Fr:"",maxLength:ri,readOnly:!Pr,unselectable:Pr?null:"on",style:(0,_e.Z)((0,_e.Z)({},ci),{},{opacity:Pr?null:0}),onKeyDown:function(ha){Vr(ha),Oi&&Oi(ha)},onMouseDown:function(ha){ii(ha),xi&&xi(ha)},onChange:function(ha){Br(ha),Ri&&Ri(ha)},onCompositionStart:function(ha){si(ha),ea&&ea(ha)},onCompositionEnd:function(ha){_i(ha),wi&&wi(ha)},onPaste:Jr})),zi},Or=Ae.forwardRef(Pi);Or.displayName="Input";var Jn=Or;function qn(Ve){return Array.isArray(Ve)?Ve:Ve!==void 0?[Ve]:[]}var nr=typeof window!="undefined"&&window.document&&window.document.documentElement,Ur=nr;function li(Ve){return Ve!=null}function Lt(Ve){return!Ve&&Ve!==0}function Kn(Ve){return["string","number"].includes((0,ge.Z)(Ve))}function Bn(Ve){var Je=void 0;return Ve&&(Kn(Ve.title)?Je=Ve.title.toString():Kn(Ve.label)&&(Je=Ve.label.toString())),Je}function yn(Ve,Je){Ur?Ae.useLayoutEffect(Ve,Je):Ae.useEffect(Ve,Je)}function xr(Ve){var Je;return(Je=Ve.key)!==null&&Je!==void 0?Je:Ve.value}var Sr=function(Je){Je.preventDefault(),Je.stopPropagation()},mr=function(Je){var Pt=Je.id,_t=Je.prefixCls,hn=Je.values,Dn=Je.open,An=Je.searchValue,or=Je.autoClearSearchValue,Un=Je.inputRef,Tn=Je.placeholder,tr=Je.disabled,dr=Je.mode,Pr=Je.showSearch,fr=Je.autoFocus,Fr=Je.autoComplete,ri=Je.activeDescendantId,Vr=Je.tabIndex,ii=Je.removeIcon,Br=Je.maxTagCount,Jr=Je.maxTagTextLength,si=Je.maxTagPlaceholder,_i=si===void 0?function(Ki){return"+ ".concat(Ki.length," ...")}:si,Hr=Je.tagRender,Bi=Je.onToggleOpen,zi=Je.onRemove,Ia=Je.onInputChange,ma=Je.onInputPaste,qi=Je.onInputKeyDown,Oi=Je.onInputMouseDown,Ri=Je.onInputCompositionStart,xi=Je.onInputCompositionEnd,ea=Ae.useRef(null),wi=(0,Ae.useState)(0),ci=(0,ce.Z)(wi,2),Wi=ci[0],ha=ci[1],go=(0,Ae.useState)(!1),lo=(0,ce.Z)(go,2),Ua=lo[0],Ba=lo[1],Ea="".concat(_t,"-selection"),ji=Dn||dr==="multiple"&&or===!1||dr==="tags"?An:"",Ao=dr==="tags"||dr==="multiple"&&or===!1||Pr&&(Dn||Ua);yn(function(){ha(ea.current.scrollWidth)},[ji]);function la(Ki,Ja,vo,ro,yo){return Ae.createElement("span",{className:Te()("".concat(Ea,"-item"),(0,ye.Z)({},"".concat(Ea,"-item-disabled"),vo)),title:Bn(Ki)},Ae.createElement("span",{className:"".concat(Ea,"-item-content")},Ja),ro&&Ae.createElement(Qe,{className:"".concat(Ea,"-item-remove"),onMouseDown:Sr,onClick:yo,customizeIcon:ii},"\xD7"))}function Li(Ki,Ja,vo,ro,yo){var Mo=function(io){Sr(io),Bi(!Dn)};return Ae.createElement("span",{onMouseDown:Mo},Hr({label:Ja,value:Ki,disabled:vo,closable:ro,onClose:yo}))}function xa(Ki){var Ja=Ki.disabled,vo=Ki.label,ro=Ki.value,yo=!tr&&!Ja,Mo=vo;if(typeof Jr=="number"&&(typeof vo=="string"||typeof vo=="number")){var Xo=String(Mo);Xo.length>Jr&&(Mo="".concat(Xo.slice(0,Jr),"..."))}var io=function(os){os&&os.stopPropagation(),zi(Ki)};return typeof Hr=="function"?Li(ro,Mo,Ja,yo,io):la(Ki,Mo,Ja,yo,io)}function Ya(Ki){var Ja=typeof _i=="function"?_i(Ki):_i;return la({title:Ja},Ja,!1)}var Ma=Ae.createElement("div",{className:"".concat(Ea,"-search"),style:{width:Wi},onFocus:function(){Ba(!0)},onBlur:function(){Ba(!1)}},Ae.createElement(Jn,{ref:Un,open:Dn,prefixCls:_t,id:Pt,inputElement:null,disabled:tr,autoFocus:fr,autoComplete:Fr,editable:Ao,activeDescendantId:ri,value:ji,onKeyDown:qi,onMouseDown:Oi,onChange:Ia,onPaste:ma,onCompositionStart:Ri,onCompositionEnd:xi,tabIndex:Vr,attrs:_n(Je,!0)}),Ae.createElement("span",{ref:ea,className:"".concat(Ea,"-search-mirror"),"aria-hidden":!0},ji,"\xA0")),Ta=Ae.createElement(fi,{prefixCls:"".concat(Ea,"-overflow"),data:hn,renderItem:xa,renderRest:Ya,suffix:Ma,itemKey:xr,maxCount:Br});return Ae.createElement(Ae.Fragment,null,Ta,!hn.length&&!ji&&Ae.createElement("span",{className:"".concat(Ea,"-placeholder")},Tn))},Qn=mr,ht=function(Je){var Pt=Je.inputElement,_t=Je.prefixCls,hn=Je.id,Dn=Je.inputRef,An=Je.disabled,or=Je.autoFocus,Un=Je.autoComplete,Tn=Je.activeDescendantId,tr=Je.mode,dr=Je.open,Pr=Je.values,fr=Je.placeholder,Fr=Je.tabIndex,ri=Je.showSearch,Vr=Je.searchValue,ii=Je.activeValue,Br=Je.maxLength,Jr=Je.onInputKeyDown,si=Je.onInputMouseDown,_i=Je.onInputChange,Hr=Je.onInputPaste,Bi=Je.onInputCompositionStart,zi=Je.onInputCompositionEnd,Ia=Je.title,ma=Ae.useState(!1),qi=(0,ce.Z)(ma,2),Oi=qi[0],Ri=qi[1],xi=tr==="combobox",ea=xi||ri,wi=Pr[0],ci=Vr||"";xi&&ii&&!Oi&&(ci=ii),Ae.useEffect(function(){xi&&Ri(!1)},[xi,ii]);var Wi=tr!=="combobox"&&!dr&&!ri?!1:!!ci,ha=Ia===void 0?Bn(wi):Ia,go=function(){if(wi)return null;var Ua=Wi?{visibility:"hidden"}:void 0;return Ae.createElement("span",{className:"".concat(_t,"-selection-placeholder"),style:Ua},fr)};return Ae.createElement(Ae.Fragment,null,Ae.createElement("span",{className:"".concat(_t,"-selection-search")},Ae.createElement(Jn,{ref:Dn,prefixCls:_t,id:hn,open:dr,inputElement:Pt,disabled:An,autoFocus:or,autoComplete:Un,editable:ea,activeDescendantId:Tn,value:ci,onKeyDown:Jr,onMouseDown:si,onChange:function(Ua){Ri(!0),_i(Ua)},onPaste:Hr,onCompositionStart:Bi,onCompositionEnd:zi,tabIndex:Fr,attrs:_n(Je,!0),maxLength:xi?Br:void 0})),!xi&&wi?Ae.createElement("span",{className:"".concat(_t,"-selection-item"),title:ha,style:Wi?{visibility:"hidden"}:void 0},wi.label):null,go())},Et=ht;function zt(Ve){return![$e.ESC,$e.SHIFT,$e.BACKSPACE,$e.TAB,$e.WIN_KEY,$e.ALT,$e.META,$e.WIN_KEY_RIGHT,$e.CTRL,$e.SEMICOLON,$e.EQUALS,$e.CAPS_LOCK,$e.CONTEXT_MENU,$e.F1,$e.F2,$e.F3,$e.F4,$e.F5,$e.F6,$e.F7,$e.F8,$e.F9,$e.F10,$e.F11,$e.F12].includes(Ve)}var fn=function(Je,Pt){var _t=(0,Ae.useRef)(null),hn=(0,Ae.useRef)(!1),Dn=Je.prefixCls,An=Je.open,or=Je.mode,Un=Je.showSearch,Tn=Je.tokenWithEnter,tr=Je.autoClearSearchValue,dr=Je.onSearch,Pr=Je.onSearchSubmit,fr=Je.onToggleOpen,Fr=Je.onInputKeyDown,ri=Je.domRef;Ae.useImperativeHandle(Pt,function(){return{focus:function(){_t.current.focus()},blur:function(){_t.current.blur()}}});var Vr=pt(0),ii=(0,ce.Z)(Vr,2),Br=ii[0],Jr=ii[1],si=function(ci){var Wi=ci.which;(Wi===$e.UP||Wi===$e.DOWN)&&ci.preventDefault(),Fr&&Fr(ci),Wi===$e.ENTER&&or==="tags"&&!hn.current&&!An&&(Pr==null||Pr(ci.target.value)),zt(Wi)&&fr(!0)},_i=function(){Jr(!0)},Hr=(0,Ae.useRef)(null),Bi=function(ci){dr(ci,!0,hn.current)!==!1&&fr(!0)},zi=function(){hn.current=!0},Ia=function(ci){hn.current=!1,or!=="combobox"&&Bi(ci.target.value)},ma=function(ci){var Wi=ci.target.value;if(Tn&&Hr.current&&/[\r\n]/.test(Hr.current)){var ha=Hr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Wi=Wi.replace(ha,Hr.current)}Hr.current=null,Bi(Wi)},qi=function(ci){var Wi=ci.clipboardData,ha=Wi.getData("text");Hr.current=ha},Oi=function(ci){var Wi=ci.target;if(Wi!==_t.current){var ha=document.body.style.msTouchAction!==void 0;ha?setTimeout(function(){_t.current.focus()}):_t.current.focus()}},Ri=function(ci){var Wi=Br();ci.target!==_t.current&&!Wi&&or!=="combobox"&&ci.preventDefault(),(or!=="combobox"&&(!Un||!Wi)||!An)&&(An&&tr!==!1&&dr("",!0,!1),fr())},xi={inputRef:_t,onInputKeyDown:si,onInputMouseDown:_i,onInputChange:ma,onInputPaste:qi,onInputCompositionStart:zi,onInputCompositionEnd:Ia},ea=or==="multiple"||or==="tags"?Ae.createElement(Qn,(0,Re.Z)({},Je,xi)):Ae.createElement(Et,(0,Re.Z)({},Je,xi));return Ae.createElement("div",{ref:ri,className:"".concat(Dn,"-selector"),onClick:Oi,onMouseDown:Ri},ea)},at=Ae.forwardRef(fn);at.displayName="Selector";var Rt=at,on=ie(62709),tn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Mn=function(Je){var Pt=Je===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"}}},wn=function(Je,Pt){var _t=Je.prefixCls,hn=Je.disabled,Dn=Je.visible,An=Je.children,or=Je.popupElement,Un=Je.animation,Tn=Je.transitionName,tr=Je.dropdownStyle,dr=Je.dropdownClassName,Pr=Je.direction,fr=Pr===void 0?"ltr":Pr,Fr=Je.placement,ri=Je.builtinPlacements,Vr=Je.dropdownMatchSelectWidth,ii=Je.dropdownRender,Br=Je.dropdownAlign,Jr=Je.getPopupContainer,si=Je.empty,_i=Je.getTriggerDOMNode,Hr=Je.onPopupVisibleChange,Bi=Je.onPopupMouseEnter,zi=(0,ke.Z)(Je,tn),Ia="".concat(_t,"-dropdown"),ma=or;ii&&(ma=ii(or));var qi=Ae.useMemo(function(){return ri||Mn(Vr)},[ri,Vr]),Oi=Un?"".concat(Ia,"-").concat(Un):Tn,Ri=typeof Vr=="number",xi=Ae.useMemo(function(){return Ri?null:Vr===!1?"minWidth":"width"},[Vr,Ri]),ea=tr;Ri&&(ea=(0,_e.Z)((0,_e.Z)({},ea),{},{width:Vr}));var wi=Ae.useRef(null);return Ae.useImperativeHandle(Pt,function(){return{getPopupElement:function(){return wi.current}}}),Ae.createElement(on.Z,(0,Re.Z)({},zi,{showAction:Hr?["click"]:[],hideAction:Hr?["click"]:[],popupPlacement:Fr||(fr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:qi,prefixCls:Ia,popupTransitionName:Oi,popup:Ae.createElement("div",{ref:wi,onMouseEnter:Bi},ma),stretch:xi,popupAlign:Br,popupVisible:Dn,getPopupContainer:Jr,popupClassName:Te()(dr,(0,ye.Z)({},"".concat(Ia,"-empty"),si)),popupStyle:ea,getTriggerDOMNode:_i,onPopupVisibleChange:Hr}),An)},rr=Ae.forwardRef(wn);rr.displayName="SelectTrigger";var zr=rr,vr=ie(84506);function yr(Ve,Je){var Pt=Ve.key,_t;return"value"in Ve&&(_t=Ve.value),Pt!=null?Pt:_t!==void 0?_t:"rc-index-key-".concat(Je)}function Lr(Ve,Je){var Pt=Ve||{},_t=Pt.label,hn=Pt.value,Dn=Pt.options,An=Pt.groupLabel,or=_t||(Je?"children":"label");return{label:or,value:hn||"value",options:Dn||"options",groupLabel:An||or}}function Dr(Ve){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Je.fieldNames,_t=Je.childrenAsData,hn=[],Dn=Lr(Pt,!1),An=Dn.label,or=Dn.value,Un=Dn.options,Tn=Dn.groupLabel;function tr(dr,Pr){dr.forEach(function(fr){if(Pr||!(Un in fr)){var Fr=fr[or];hn.push({key:yr(fr,hn.length),groupOption:Pr,data:fr,label:fr[An],value:Fr})}else{var ri=fr[Tn];ri===void 0&&_t&&(ri=fr.label),hn.push({key:yr(fr,hn.length),group:!0,data:fr,label:ri}),tr(fr[Un],!0)}})}return tr(Ve,!1),hn}function hi(Ve){var Je=(0,_e.Z)({},Ve);return"props"in Je||Object.defineProperty(Je,"props",{get:function(){return xt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Je}}),Je}function Vn(Ve,Je){if(!Je||!Je.length)return null;var Pt=!1;function _t(Dn,An){var or=(0,vr.Z)(An),Un=or[0],Tn=or.slice(1);if(!Un)return[Dn];var tr=Dn.split(Un);return Pt=Pt||tr.length>1,tr.reduce(function(dr,Pr){return[].concat((0,Ge.Z)(dr),(0,Ge.Z)(_t(Pr,Tn)))},[]).filter(function(dr){return dr})}var hn=_t(Ve,Je);return Pt?hn:null}var br=["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"],Ui=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function na(Ve){return Ve==="tags"||Ve==="multiple"}var Wr=Ae.forwardRef(function(Ve,Je){var Pt,_t,hn=Ve.id,Dn=Ve.prefixCls,An=Ve.className,or=Ve.showSearch,Un=Ve.tagRender,Tn=Ve.direction,tr=Ve.omitDomProps,dr=Ve.displayValues,Pr=Ve.onDisplayValuesChange,fr=Ve.emptyOptions,Fr=Ve.notFoundContent,ri=Fr===void 0?"Not Found":Fr,Vr=Ve.onClear,ii=Ve.mode,Br=Ve.disabled,Jr=Ve.loading,si=Ve.getInputElement,_i=Ve.getRawInputElement,Hr=Ve.open,Bi=Ve.defaultOpen,zi=Ve.onDropdownVisibleChange,Ia=Ve.activeValue,ma=Ve.onActiveValueChange,qi=Ve.activeDescendantId,Oi=Ve.searchValue,Ri=Ve.autoClearSearchValue,xi=Ve.onSearch,ea=Ve.onSearchSplit,wi=Ve.tokenSeparators,ci=Ve.allowClear,Wi=Ve.suffixIcon,ha=Ve.clearIcon,go=Ve.OptionList,lo=Ve.animation,Ua=Ve.transitionName,Ba=Ve.dropdownStyle,Ea=Ve.dropdownClassName,ji=Ve.dropdownMatchSelectWidth,Ao=Ve.dropdownRender,la=Ve.dropdownAlign,Li=Ve.placement,xa=Ve.builtinPlacements,Ya=Ve.getPopupContainer,Ma=Ve.showAction,Ta=Ma===void 0?[]:Ma,Ki=Ve.onFocus,Ja=Ve.onBlur,vo=Ve.onKeyUp,ro=Ve.onKeyDown,yo=Ve.onMouseDown,Mo=(0,ke.Z)(Ve,br),Xo=na(ii),io=(or!==void 0?or:Xo)||ii==="combobox",So=(0,_e.Z)({},Mo);Ui.forEach(function(_o){delete So[_o]}),tr==null||tr.forEach(function(_o){delete So[_o]});var os=Ae.useState(!1),rs=(0,ce.Z)(os,2),cs=rs[0],Oo=rs[1];Ae.useEffect(function(){Oo(mt())},[]);var bo=Ae.useRef(null),sa=Ae.useRef(null),Sa=Ae.useRef(null),Qa=Ae.useRef(null),co=Ae.useRef(null),jo=mn(),us=(0,ce.Z)(jo,3),xs=us[0],Js=us[1],Fs=us[2];Ae.useImperativeHandle(Je,function(){var _o,ao;return{focus:(_o=Qa.current)===null||_o===void 0?void 0:_o.focus,blur:(ao=Qa.current)===null||ao===void 0?void 0:ao.blur,scrollTo:function(gl){var oo;return(oo=co.current)===null||oo===void 0?void 0:oo.scrollTo(gl)}}});var ds=Ae.useMemo(function(){var _o;if(ii!=="combobox")return Oi;var ao=(_o=dr[0])===null||_o===void 0?void 0:_o.value;return typeof ao=="string"||typeof ao=="number"?String(ao):""},[Oi,ii,dr]),zs=ii==="combobox"&&typeof si=="function"&&si()||null,za=typeof _i=="function"&&_i(),ga=Mt(sa,za==null||(Pt=za.props)===null||Pt===void 0?void 0:Pt.ref),so=Ae.useState(!1),ko=(0,ce.Z)(so,2),fs=ko[0],ss=ko[1];dt(function(){ss(!0)},[]);var $l=vt(!1,{defaultValue:Bi,value:Hr}),ml=(0,ce.Z)($l,2),Sl=ml[0],Ka=ml[1],ei=fs?Sl:!1,Xi=!ri&&fr;(Br||Xi&&ei&&ii==="combobox")&&(ei=!1);var Yi=Xi?!1:ei,pa=Ae.useCallback(function(_o){var ao=_o!==void 0?_o:!ei;Br||(Ka(ao),ei!==ao&&(zi==null||zi(ao)))},[Br,ei,Ka,zi]),Uo=Ae.useMemo(function(){return(wi||[]).some(function(_o){return[`
|
|
|
`,`\r
|
|
|
`].includes(_o)})},[wi]),Yo=function(ao,Ks,gl){var oo=!0,Ho=ao;ma==null||ma(null);var zo=gl?null:Vn(ao,wi);return ii!=="combobox"&&zo&&(Ho="",ea==null||ea(zo),pa(!1),oo=!1),xi&&ds!==Ho&&xi(Ho,{source:Ks?"typing":"effect"}),oo},rl=function(ao){!ao||!ao.trim()||xi(ao,{source:"submit"})};Ae.useEffect(function(){!ei&&!Xo&&ii!=="combobox"&&Yo("",!1,!1)},[ei]),Ae.useEffect(function(){Sl&&Br&&Ka(!1),Br&&Js(!1)},[Br]);var ul=pt(),wl=(0,ce.Z)(ul,2),uo=wl[0],Qs=wl[1],Pl=function(ao){var Ks=uo(),gl=ao.which;if(gl===$e.ENTER&&(ii!=="combobox"&&ao.preventDefault(),ei||pa(!0)),Qs(!!ds),gl===$e.BACKSPACE&&!Ks&&Xo&&!ds&&dr.length){for(var oo=(0,Ge.Z)(dr),Ho=null,zo=oo.length-1;zo>=0;zo-=1){var ws=oo[zo];if(!ws.disabled){oo.splice(zo,1),Ho=ws;break}}Ho&&Pr(oo,{type:"remove",values:[Ho]})}for(var qs=arguments.length,Kl=new Array(qs>1?qs-1:0),Bl=1;Bl<qs;Bl++)Kl[Bl-1]=arguments[Bl];if(ei&&co.current){var Zc;(Zc=co.current).onKeyDown.apply(Zc,[ao].concat(Kl))}ro==null||ro.apply(void 0,[ao].concat(Kl))},Sc=function(ao){for(var Ks=arguments.length,gl=new Array(Ks>1?Ks-1:0),oo=1;oo<Ks;oo++)gl[oo-1]=arguments[oo];if(ei&&co.current){var Ho;(Ho=co.current).onKeyUp.apply(Ho,[ao].concat(gl))}vo==null||vo.apply(void 0,[ao].concat(gl))},Vl=function(ao){var Ks=dr.filter(function(gl){return gl!==ao});Pr(Ks,{type:"remove",values:[ao]})},Cl=Ae.useRef(!1),il=function(){Js(!0),Br||(Ki&&!Cl.current&&Ki.apply(void 0,arguments),Ta.includes("focus")&&pa(!0)),Cl.current=!0},ql=function(){Js(!1,function(){Cl.current=!1,pa(!1)}),!Br&&(ds&&(ii==="tags"?xi(ds,{source:"submit"}):ii==="multiple"&&xi("",{source:"blur"})),Ja&&Ja.apply(void 0,arguments))},dl=[];Ae.useEffect(function(){return function(){dl.forEach(function(_o){return clearTimeout(_o)}),dl.splice(0,dl.length)}},[]);var ec=function(ao){var Ks,gl=ao.target,oo=(Ks=Sa.current)===null||Ks===void 0?void 0:Ks.getPopupElement();if(oo&&oo.contains(gl)){var Ho=setTimeout(function(){var Kl=dl.indexOf(Ho);if(Kl!==-1&&dl.splice(Kl,1),Fs(),!cs&&!oo.contains(document.activeElement)){var Bl;(Bl=Qa.current)===null||Bl===void 0||Bl.focus()}});dl.push(Ho)}for(var zo=arguments.length,ws=new Array(zo>1?zo-1:0),qs=1;qs<zo;qs++)ws[qs-1]=arguments[qs];yo==null||yo.apply(void 0,[ao].concat(ws))},is=Ae.useState({}),wo=(0,ce.Z)(is,2),qo=wo[1];function Ss(){qo({})}var Ds;za&&(Ds=function(ao){pa(ao)}),wt(function(){var _o;return[bo.current,(_o=Sa.current)===null||_o===void 0?void 0:_o.getPopupElement()]},Yi,pa,!!za);var al=Ae.useMemo(function(){return(0,_e.Z)((0,_e.Z)({},Ve),{},{notFoundContent:ri,open:ei,triggerOpen:Yi,id:hn,showSearch:io,multiple:Xo,toggleOpen:pa})},[Ve,ri,Yi,ei,hn,io,Xo,pa]),Ps=!!Wi||Jr,zl;Ps&&(zl=Ae.createElement(Qe,{className:Te()("".concat(Dn,"-arrow"),(0,ye.Z)({},"".concat(Dn,"-arrow-loading"),Jr)),customizeIcon:Wi,customizeIconProps:{loading:Jr,searchValue:ds,open:ei,focused:xs,showSearch:io}}));var Wc=function(){var ao;Vr==null||Vr(),(ao=Qa.current)===null||ao===void 0||ao.focus(),Pr([],{type:"clear",values:dr}),Yo("",!1,!1)},fc=Ie(Dn,Wc,dr,ci,ha,Br,ds,ii),Dc=fc.allowClear,Pc=fc.clearIcon,tc=Ae.createElement(go,{ref:co}),nc=Te()(Dn,An,(_t={},(0,ye.Z)(_t,"".concat(Dn,"-focused"),xs),(0,ye.Z)(_t,"".concat(Dn,"-multiple"),Xo),(0,ye.Z)(_t,"".concat(Dn,"-single"),!Xo),(0,ye.Z)(_t,"".concat(Dn,"-allow-clear"),ci),(0,ye.Z)(_t,"".concat(Dn,"-show-arrow"),Ps),(0,ye.Z)(_t,"".concat(Dn,"-disabled"),Br),(0,ye.Z)(_t,"".concat(Dn,"-loading"),Jr),(0,ye.Z)(_t,"".concat(Dn,"-open"),ei),(0,ye.Z)(_t,"".concat(Dn,"-customize-input"),zs),(0,ye.Z)(_t,"".concat(Dn,"-show-search"),io),_t)),Oc=Ae.createElement(zr,{ref:Sa,disabled:Br,prefixCls:Dn,visible:Yi,popupElement:tc,animation:lo,transitionName:Ua,dropdownStyle:Ba,dropdownClassName:Ea,direction:Tn,dropdownMatchSelectWidth:ji,dropdownRender:Ao,dropdownAlign:la,placement:Li,builtinPlacements:xa,getPopupContainer:Ya,empty:fr,getTriggerDOMNode:function(){return sa.current},onPopupVisibleChange:Ds,onPopupMouseEnter:Ss},za?Ae.cloneElement(za,{ref:ga}):Ae.createElement(Rt,(0,Re.Z)({},Ve,{domRef:sa,prefixCls:Dn,inputElement:zs,ref:Qa,id:hn,showSearch:io,autoClearSearchValue:Ri,mode:ii,activeDescendantId:qi,tagRender:Un,values:dr,open:ei,onToggleOpen:pa,activeValue:Ia,searchValue:ds,onSearch:Yo,onSearchSubmit:rl,onRemove:Vl,tokenWithEnter:Uo}))),Nc;return za?Nc=Oc:Nc=Ae.createElement("div",(0,Re.Z)({className:nc},So,{ref:bo,onMouseDown:ec,onKeyDown:Pl,onKeyUp:Sc,onFocus:il,onBlur:ql}),xs&&!ei&&Ae.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(dr.map(function(_o){var ao=_o.label,Ks=_o.value;return["number","string"].includes((0,ge.Z)(ao))?ao:Ks}).join(", "))),Oc,zl,Dc&&Pc),Ae.createElement(Ot.Provider,{value:al},Nc)}),vi=Wr,ra=function(Ve,Je){var Pt=Ae.useRef({values:new Map,options:new Map}),_t=Ae.useMemo(function(){var Dn=Pt.current,An=Dn.values,or=Dn.options,Un=Ve.map(function(dr){if(dr.label===void 0){var Pr;return(0,_e.Z)((0,_e.Z)({},dr),{},{label:(Pr=An.get(dr.value))===null||Pr===void 0?void 0:Pr.label})}return dr}),Tn=new Map,tr=new Map;return Un.forEach(function(dr){Tn.set(dr.value,dr),tr.set(dr.value,Je.get(dr.value)||or.get(dr.value))}),Pt.current.values=Tn,Pt.current.options=tr,Un},[Ve,Je]),hn=Ae.useCallback(function(Dn){return Je.get(Dn)||Pt.current.options.get(Dn)},[Je]);return[_t,hn]};function Kr(Ve,Je){return qn(Ve).join("").toUpperCase().includes(Je)}var Vi=function(Ve,Je,Pt,_t,hn){return Ae.useMemo(function(){if(!Pt||_t===!1)return Ve;var Dn=Je.options,An=Je.label,or=Je.value,Un=[],Tn=typeof _t=="function",tr=Pt.toUpperCase(),dr=Tn?_t:function(fr,Fr){return hn?Kr(Fr[hn],tr):Fr[Dn]?Kr(Fr[An!=="children"?An:"label"],tr):Kr(Fr[or],tr)},Pr=Tn?function(fr){return hi(fr)}:function(fr){return fr};return Ve.forEach(function(fr){if(fr[Dn]){var Fr=dr(Pt,Pr(fr));if(Fr)Un.push(fr);else{var ri=fr[Dn].filter(function(Vr){return dr(Pt,Pr(Vr))});ri.length&&Un.push((0,_e.Z)((0,_e.Z)({},fr),{},(0,ye.Z)({},Dn,ri)))}return}dr(Pt,Pr(fr))&&Un.push(fr)}),Un},[Ve,_t,hn,Pt,Je])},lr=0,Na=ze();function Ca(){var Ve;return Na?(Ve=lr,lr+=1):Ve="TEST_OR_SSR",Ve}function ho(Ve){var Je=Ae.useState(),Pt=(0,ce.Z)(Je,2),_t=Pt[0],hn=Pt[1];return Ae.useEffect(function(){hn("rc_select_".concat(Ca()))},[]),Ve||_t}function Ha(Ve){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=[];return Ae.Children.forEach(Ve,function(_t){_t==null&&!Je.keepEmpty||(Array.isArray(_t)?Pt=Pt.concat(Ha(_t)):(0,Ft.isFragment)(_t)&&_t.props?Pt=Pt.concat(Ha(_t.props.children,Je)):Pt.push(_t))}),Pt}var _a=["children","value"],Ji=["children"];function Fa(Ve){var Je=Ve,Pt=Je.key,_t=Je.props,hn=_t.children,Dn=_t.value,An=(0,ke.Z)(_t,_a);return(0,_e.Z)({key:Pt,value:Dn!==void 0?Dn:Pt,children:hn},An)}function ya(Ve){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ha(Ve).map(function(Pt,_t){if(!Ae.isValidElement(Pt)||!Pt.type)return null;var hn=Pt,Dn=hn.type.isSelectOptGroup,An=hn.key,or=hn.props,Un=or.children,Tn=(0,ke.Z)(or,Ji);return Je||!Dn?Fa(Pt):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(An===null?_t:An,"__"),label:An},Tn),{},{options:ya(Un)})}).filter(function(Pt){return Pt})}function Wa(Ve,Je,Pt,_t,hn){return Ae.useMemo(function(){var Dn=Ve,An=!Ve;An&&(Dn=ya(Je));var or=new Map,Un=new Map,Tn=function(Pr,fr,Fr){Fr&&typeof Fr=="string"&&Pr.set(fr[Fr],fr)};function tr(dr){for(var Pr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fr=0;fr<dr.length;fr+=1){var Fr=dr[fr];!Fr[Pt.options]||Pr?(or.set(Fr[Pt.value],Fr),Tn(Un,Fr,Pt.label),Tn(Un,Fr,_t),Tn(Un,Fr,hn)):tr(Fr[Pt.options],!0)}}return tr(Dn),{options:Dn,valueOptions:or,labelOptions:Un}},[Ve,Je,Pt,_t,hn])}function po(Ve){var Je=Ae.useRef();Je.current=Ve;var Pt=Ae.useCallback(function(){return Je.current.apply(Je,arguments)},[]);return Pt}var ja=function(){return null};ja.isSelectOptGroup=!0;var Pa=ja,mo=function(){return null};mo.isSelectOption=!0;var Eo=mo;function no(Ve,Je){var Pt=(0,_e.Z)({},Ve);return Array.isArray(Je)&&Je.forEach(function(_t){delete Pt[_t]}),Pt}var ia=ie(73299),Zt=Ae.createContext(null),At=Zt;function xn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jn=["disabled","title","children","style","className"];function hr(Ve){return typeof Ve=="string"||typeof Ve=="number"}var Qr=function(Je,Pt){var _t=In(),hn=_t.prefixCls,Dn=_t.id,An=_t.open,or=_t.multiple,Un=_t.mode,Tn=_t.searchValue,tr=_t.toggleOpen,dr=_t.notFoundContent,Pr=_t.onPopupScroll,fr=Ae.useContext(At),Fr=fr.flattenOptions,ri=fr.onActiveValue,Vr=fr.defaultActiveFirstOption,ii=fr.onSelect,Br=fr.menuItemSelectedIcon,Jr=fr.rawValues,si=fr.fieldNames,_i=fr.virtual,Hr=fr.direction,Bi=fr.listHeight,zi=fr.listItemHeight,Ia="".concat(hn,"-item"),ma=yt(function(){return Fr},[An,Fr],function(la,Li){return Li[0]&&la[1]!==Li[1]}),qi=Ae.useRef(null),Oi=function(Li){Li.preventDefault()},Ri=function(Li){qi.current&&qi.current.scrollTo(typeof Li=="number"?{index:Li}:Li)},xi=function(Li){for(var xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ya=ma.length,Ma=0;Ma<Ya;Ma+=1){var Ta=(Li+Ma*xa+Ya)%Ya,Ki=ma[Ta],Ja=Ki.group,vo=Ki.data;if(!Ja&&!vo.disabled)return Ta}return-1},ea=Ae.useState(function(){return xi(0)}),wi=(0,ce.Z)(ea,2),ci=wi[0],Wi=wi[1],ha=function(Li){var xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Wi(Li);var Ya={source:xa?"keyboard":"mouse"},Ma=ma[Li];if(!Ma){ri(null,-1,Ya);return}ri(Ma.value,Li,Ya)};(0,Ae.useEffect)(function(){ha(Vr!==!1?xi(0):-1)},[ma.length,Tn]);var go=Ae.useCallback(function(la){return Jr.has(la)&&Un!=="combobox"},[Un,(0,Ge.Z)(Jr).toString(),Jr.size]);(0,Ae.useEffect)(function(){var la=setTimeout(function(){if(!or&&An&&Jr.size===1){var xa=Array.from(Jr)[0],Ya=ma.findIndex(function(Ma){var Ta=Ma.data;return Ta.value===xa});Ya!==-1&&(ha(Ya),Ri(Ya))}});if(An){var Li;(Li=qi.current)===null||Li===void 0||Li.scrollTo(void 0)}return function(){return clearTimeout(la)}},[An,Tn,Fr.length]);var lo=function(Li){Li!==void 0&&ii(Li,{selected:!Jr.has(Li)}),or||tr(!1)};if(Ae.useImperativeHandle(Pt,function(){return{onKeyDown:function(Li){var xa=Li.which,Ya=Li.ctrlKey;switch(xa){case $e.N:case $e.P:case $e.UP:case $e.DOWN:{var Ma=0;if(xa===$e.UP?Ma=-1:xa===$e.DOWN?Ma=1:xn()&&Ya&&(xa===$e.N?Ma=1:xa===$e.P&&(Ma=-1)),Ma!==0){var Ta=xi(ci+Ma,Ma);Ri(Ta),ha(Ta,!0)}break}case $e.ENTER:{var Ki=ma[ci];Ki&&!Ki.data.disabled?lo(Ki.value):lo(void 0),An&&Li.preventDefault();break}case $e.ESC:tr(!1),An&&Li.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Li){Ri(Li)}}}),ma.length===0)return Ae.createElement("div",{role:"listbox",id:"".concat(Dn,"_list"),className:"".concat(Ia,"-empty"),onMouseDown:Oi},dr);var Ua=Object.keys(si).map(function(la){return si[la]}),Ba=function(Li){return Li.label};function Ea(la,Li){var xa=la.group;return{role:xa?"presentation":"option",id:"".concat(Dn,"_list_").concat(Li)}}var ji=function(Li){var xa=ma[Li];if(!xa)return null;var Ya=xa.data||{},Ma=Ya.value,Ta=xa.group,Ki=_n(Ya,!0),Ja=Ba(xa);return xa?Ae.createElement("div",(0,Re.Z)({"aria-label":typeof Ja=="string"&&!Ta?Ja:null},Ki,{key:Li},Ea(xa,Li),{"aria-selected":go(Ma)}),Ma):null},Ao={role:"listbox",id:"".concat(Dn,"_list")};return Ae.createElement(Ae.Fragment,null,_i&&Ae.createElement("div",(0,Re.Z)({},Ao,{style:{height:0,width:0,overflow:"hidden"}}),ji(ci-1),ji(ci),ji(ci+1)),Ae.createElement(ia.Z,{itemKey:"key",ref:qi,data:ma,height:Bi,itemHeight:zi,fullHeight:!1,onMouseDown:Oi,onScroll:Pr,virtual:_i,direction:Hr,innerProps:_i?null:Ao},function(la,Li){var xa,Ya=la.group,Ma=la.groupOption,Ta=la.data,Ki=la.label,Ja=la.value,vo=Ta.key;if(Ya){var ro,yo=(ro=Ta.title)!==null&&ro!==void 0?ro:hr(Ki)?Ki.toString():void 0;return Ae.createElement("div",{className:Te()(Ia,"".concat(Ia,"-group")),title:yo},Ki!==void 0?Ki:vo)}var Mo=Ta.disabled,Xo=Ta.title,io=Ta.children,So=Ta.style,os=Ta.className,rs=(0,ke.Z)(Ta,jn),cs=no(rs,Ua),Oo=go(Ja),bo="".concat(Ia,"-option"),sa=Te()(Ia,bo,os,(xa={},(0,ye.Z)(xa,"".concat(bo,"-grouped"),Ma),(0,ye.Z)(xa,"".concat(bo,"-active"),ci===Li&&!Mo),(0,ye.Z)(xa,"".concat(bo,"-disabled"),Mo),(0,ye.Z)(xa,"".concat(bo,"-selected"),Oo),xa)),Sa=Ba(la),Qa=!Br||typeof Br=="function"||Oo,co=typeof Sa=="number"?Sa:Sa||Ja,jo=hr(co)?co.toString():void 0;return Xo!==void 0&&(jo=Xo),Ae.createElement("div",(0,Re.Z)({},_n(cs),_i?{}:Ea(la,Li),{"aria-selected":Oo,className:sa,title:jo,onMouseMove:function(){ci===Li||Mo||ha(Li)},onClick:function(){Mo||lo(Ja)},style:So}),Ae.createElement("div",{className:"".concat(bo,"-content")},co),Ae.isValidElement(Br)||Oo,Qa&&Ae.createElement(Qe,{className:"".concat(Ia,"-option-state"),customizeIcon:Br,customizeIconProps:{isSelected:Oo}},Oo?"\u2713":null))}))},ni=Ae.forwardRef(Qr);ni.displayName="OptionList";var mi=ni;function ki(Ve){var Je=Ve.mode,Pt=Ve.options,_t=Ve.children,hn=Ve.backfill,Dn=Ve.allowClear,An=Ve.placeholder,or=Ve.getInputElement,Un=Ve.showSearch,Tn=Ve.onSearch,tr=Ve.defaultOpen,dr=Ve.autoFocus,Pr=Ve.labelInValue,fr=Ve.value,Fr=Ve.inputValue,ri=Ve.optionLabelProp,Vr=isMultiple(Je),ii=Un!==void 0?Un:Vr||Je==="combobox",Br=Pt||convertChildrenToData(_t);if(warning(Je!=="tags"||Br.every(function(Hr){return!Hr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Je==="tags"||Je==="combobox"){var Jr=Br.some(function(Hr){return Hr.options?Hr.options.some(function(Bi){return typeof("value"in Bi?Bi.value:Bi.key)=="number"}):typeof("value"in Hr?Hr.value:Hr.key)=="number"});warning(!Jr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Je!=="combobox"||!ri,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Je==="combobox"||!hn,"`backfill` only works with `combobox` mode."),warning(Je==="combobox"||!or,"`getInputElement` only work with `combobox` mode."),noteOnce(Je!=="combobox"||!or||!Dn||!An,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Tn&&!ii&&Je!=="combobox"&&Je!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tr||dr,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fr!=null){var si=toArray(fr);warning(!Pr||si.every(function(Hr){return _typeof(Hr)==="object"&&("key"in Hr||"value"in Hr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Vr||Array.isArray(fr),"`value` should be array when `mode` is `multiple` or `tags`")}if(_t){var _i=null;toNodeArray(_t).some(function(Hr){if(!React.isValidElement(Hr)||!Hr.type)return!1;var Bi=Hr,zi=Bi.type;if(zi.isSelectOption)return!1;if(zi.isSelectOptGroup){var Ia=toNodeArray(Hr.props.children).every(function(ma){return!React.isValidElement(ma)||!Hr.type||ma.type.isSelectOption?!0:(_i=ma.type,!1)});return!Ia}return _i=zi,!0}),_i&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_i.displayName||_i.name||_i,"`.")),warning(Fr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Si(Ve,Je){if(Ve){var Pt=function _t(hn){for(var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,An=0;An<hn.length;An++){var or=hn[An];if(or[Je==null?void 0:Je.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Dn&&Array.isArray(or[Je==null?void 0:Je.options])&&_t(or[Je==null?void 0:Je.options],!0))break}};Pt(Ve)}}var Qi=null,aa=["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"],ba=["inputValue"];function sn(Ve){return!Ve||(0,ge.Z)(Ve)!=="object"}var bn=Ae.forwardRef(function(Ve,Je){var Pt=Ve.id,_t=Ve.mode,hn=Ve.prefixCls,Dn=hn===void 0?"rc-select":hn,An=Ve.backfill,or=Ve.fieldNames,Un=Ve.inputValue,Tn=Ve.searchValue,tr=Ve.onSearch,dr=Ve.autoClearSearchValue,Pr=dr===void 0?!0:dr,fr=Ve.onSelect,Fr=Ve.onDeselect,ri=Ve.dropdownMatchSelectWidth,Vr=ri===void 0?!0:ri,ii=Ve.filterOption,Br=Ve.filterSort,Jr=Ve.optionFilterProp,si=Ve.optionLabelProp,_i=Ve.options,Hr=Ve.children,Bi=Ve.defaultActiveFirstOption,zi=Ve.menuItemSelectedIcon,Ia=Ve.virtual,ma=Ve.direction,qi=Ve.listHeight,Oi=qi===void 0?200:qi,Ri=Ve.listItemHeight,xi=Ri===void 0?20:Ri,ea=Ve.value,wi=Ve.defaultValue,ci=Ve.labelInValue,Wi=Ve.onChange,ha=(0,ke.Z)(Ve,aa),go=ho(Pt),lo=na(_t),Ua=!!(!_i&&Hr),Ba=Ae.useMemo(function(){return ii===void 0&&_t==="combobox"?!1:ii},[ii,_t]),Ea=Ae.useMemo(function(){return Lr(or,Ua)},[JSON.stringify(or),Ua]),ji=vt("",{value:Tn!==void 0?Tn:Un,postState:function(Xi){return Xi||""}}),Ao=(0,ce.Z)(ji,2),la=Ao[0],Li=Ao[1],xa=Wa(_i,Hr,Ea,Jr,si),Ya=xa.valueOptions,Ma=xa.labelOptions,Ta=xa.options,Ki=Ae.useCallback(function(ei){var Xi=qn(ei);return Xi.map(function(Yi){var pa,Uo,Yo,rl,ul;if(sn(Yi))pa=Yi;else{var wl;Yo=Yi.key,Uo=Yi.label,pa=(wl=Yi.value)!==null&&wl!==void 0?wl:Yo}var uo=Ya.get(pa);if(uo){var Qs;if(Uo===void 0&&(Uo=uo==null?void 0:uo[si||Ea.label]),Yo===void 0&&(Yo=(Qs=uo==null?void 0:uo.key)!==null&&Qs!==void 0?Qs:pa),rl=uo==null?void 0:uo.disabled,ul=uo==null?void 0:uo.title,0)var Pl}return{label:Uo,value:pa,key:Yo,disabled:rl,title:ul}})},[Ea,si,Ya]),Ja=vt(wi,{value:ea}),vo=(0,ce.Z)(Ja,2),ro=vo[0],yo=vo[1],Mo=Ae.useMemo(function(){var ei,Xi=Ki(ro);return _t==="combobox"&&Lt((ei=Xi[0])===null||ei===void 0?void 0:ei.value)?[]:Xi},[ro,Ki,_t]),Xo=ra(Mo,Ya),io=(0,ce.Z)(Xo,2),So=io[0],os=io[1],rs=Ae.useMemo(function(){if(!_t&&So.length===1){var ei=So[0];if(ei.value===null&&(ei.label===null||ei.label===void 0))return[]}return So.map(function(Xi){var Yi;return(0,_e.Z)((0,_e.Z)({},Xi),{},{label:(Yi=Xi.label)!==null&&Yi!==void 0?Yi:Xi.value})})},[_t,So]),cs=Ae.useMemo(function(){return new Set(So.map(function(ei){return ei.value}))},[So]);Ae.useEffect(function(){if(_t==="combobox"){var ei,Xi=(ei=So[0])===null||ei===void 0?void 0:ei.value;Li(li(Xi)?String(Xi):"")}},[So]);var Oo=po(function(ei,Xi){var Yi,pa=Xi!=null?Xi:ei;return Yi={},(0,ye.Z)(Yi,Ea.value,ei),(0,ye.Z)(Yi,Ea.label,pa),Yi}),bo=Ae.useMemo(function(){if(_t!=="tags")return Ta;var ei=(0,Ge.Z)(Ta),Xi=function(pa){return Ya.has(pa)};return(0,Ge.Z)(So).sort(function(Yi,pa){return Yi.value<pa.value?-1:1}).forEach(function(Yi){var pa=Yi.value;Xi(pa)||ei.push(Oo(pa,Yi.label))}),ei},[Oo,Ta,Ya,So,_t]),sa=Vi(bo,Ea,la,Ba,Jr),Sa=Ae.useMemo(function(){return _t!=="tags"||!la||sa.some(function(ei){return ei[Jr||"value"]===la})||sa.some(function(ei){return ei[Ea.value]===la})?sa:[Oo(la)].concat((0,Ge.Z)(sa))},[Oo,Jr,_t,sa,la,Ea]),Qa=Ae.useMemo(function(){return Br?(0,Ge.Z)(Sa).sort(function(ei,Xi){return Br(ei,Xi)}):Sa},[Sa,Br]),co=Ae.useMemo(function(){return Dr(Qa,{fieldNames:Ea,childrenAsData:Ua})},[Qa,Ea,Ua]),jo=function(Xi){var Yi=Ki(Xi);if(yo(Yi),Wi&&(Yi.length!==So.length||Yi.some(function(Yo,rl){var ul;return((ul=So[rl])===null||ul===void 0?void 0:ul.value)!==(Yo==null?void 0:Yo.value)}))){var pa=ci?Yi:Yi.map(function(Yo){return Yo.value}),Uo=Yi.map(function(Yo){return hi(os(Yo.value))});Wi(lo?pa:pa[0],lo?Uo:Uo[0])}},us=Ae.useState(null),xs=(0,ce.Z)(us,2),Js=xs[0],Fs=xs[1],ds=Ae.useState(0),zs=(0,ce.Z)(ds,2),za=zs[0],ga=zs[1],so=Bi!==void 0?Bi:_t!=="combobox",ko=Ae.useCallback(function(ei,Xi){var Yi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pa=Yi.source,Uo=pa===void 0?"keyboard":pa;ga(Xi),An&&_t==="combobox"&&ei!==null&&Uo==="keyboard"&&Fs(String(ei))},[An,_t]),fs=function(Xi,Yi,pa){var Uo=function(){var Cl,il=os(Xi);return[ci?{label:il==null?void 0:il[Ea.label],value:Xi,key:(Cl=il==null?void 0:il.key)!==null&&Cl!==void 0?Cl:Xi}:Xi,hi(il)]};if(Yi&&fr){var Yo=Uo(),rl=(0,ce.Z)(Yo,2),ul=rl[0],wl=rl[1];fr(ul,wl)}else if(!Yi&&Fr&&pa!=="clear"){var uo=Uo(),Qs=(0,ce.Z)(uo,2),Pl=Qs[0],Sc=Qs[1];Fr(Pl,Sc)}},ss=po(function(ei,Xi){var Yi,pa=lo?Xi.selected:!0;pa?Yi=lo?[].concat((0,Ge.Z)(So),[ei]):[ei]:Yi=So.filter(function(Uo){return Uo.value!==ei}),jo(Yi),fs(ei,pa),_t==="combobox"?Fs(""):(!na||Pr)&&(Li(""),Fs(""))}),$l=function(Xi,Yi){jo(Xi);var pa=Yi.type,Uo=Yi.values;(pa==="remove"||pa==="clear")&&Uo.forEach(function(Yo){fs(Yo.value,!1,pa)})},ml=function(Xi,Yi){if(Li(Xi),Fs(null),Yi.source==="submit"){var pa=(Xi||"").trim();if(pa){var Uo=Array.from(new Set([].concat((0,Ge.Z)(cs),[pa])));jo(Uo),fs(pa,!0),Li("")}return}Yi.source!=="blur"&&(_t==="combobox"&&jo(Xi),tr==null||tr(Xi))},Sl=function(Xi){var Yi=Xi;_t!=="tags"&&(Yi=Xi.map(function(Uo){var Yo=Ma.get(Uo);return Yo==null?void 0:Yo.value}).filter(function(Uo){return Uo!==void 0}));var pa=Array.from(new Set([].concat((0,Ge.Z)(cs),(0,Ge.Z)(Yi))));jo(pa),pa.forEach(function(Uo){fs(Uo,!0)})},Ka=Ae.useMemo(function(){var ei=Ia!==!1&&Vr!==!1;return(0,_e.Z)((0,_e.Z)({},xa),{},{flattenOptions:co,onActiveValue:ko,defaultActiveFirstOption:so,onSelect:ss,menuItemSelectedIcon:zi,rawValues:cs,fieldNames:Ea,virtual:ei,direction:ma,listHeight:Oi,listItemHeight:xi,childrenAsData:Ua})},[xa,co,ko,so,ss,zi,cs,Ea,Ia,Vr,Oi,xi,Ua]);return Ae.createElement(At.Provider,{value:Ka},Ae.createElement(vi,(0,Re.Z)({},ha,{id:go,prefixCls:Dn,ref:Je,omitDomProps:ba,mode:_t,displayValues:rs,onDisplayValuesChange:$l,direction:ma,searchValue:la,onSearch:ml,autoClearSearchValue:Pr,onSearchSplit:Sl,dropdownMatchSelectWidth:Vr,OptionList:mi,emptyOptions:!co.length,activeValue:Js,activeDescendantId:"".concat(go,"_list_").concat(za)})))}),Fn=bn;Fn.Option=Eo,Fn.OptGroup=Pa;var he=Fn,Pe=he,Fe=ie(10366),We=ie(8745),je=ie(33603),et=ie(9708),tt=ie(53124),kt=ie(98866),Wt=ie(88258),Sn=ie(98675),Nn=ie(65223),En=ie(4173),cn=ie(87244),un=ie(13458),Gt=ie(78642),kn=ie(46163),ir=function(Ve,Je){var Pt={};for(var _t in Ve)Object.prototype.hasOwnProperty.call(Ve,_t)&&Je.indexOf(_t)<0&&(Pt[_t]=Ve[_t]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var hn=0,_t=Object.getOwnPropertySymbols(Ve);hn<_t.length;hn++)Je.indexOf(_t[hn])<0&&Object.prototype.propertyIsEnumerable.call(Ve,_t[hn])&&(Pt[_t[hn]]=Ve[_t[hn]]);return Pt};const $n="SECRET_COMBOBOX_MODE_DO_NOT_USE",Hn=(Ve,Je)=>{var Pt,{prefixCls:_t,bordered:hn=!0,className:Dn,rootClassName:An,getPopupContainer:or,popupClassName:Un,dropdownClassName:Tn,listHeight:tr=256,placement:dr,listItemHeight:Pr=24,size:fr,disabled:Fr,notFoundContent:ri,status:Vr,builtinPlacements:ii,dropdownMatchSelectWidth:Br,popupMatchSelectWidth:Jr,direction:si,style:_i,allowClear:Hr}=Ve,Bi=ir(Ve,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:zi,getPrefixCls:Ia,renderEmpty:ma,direction:qi,virtual:Oi,popupMatchSelectWidth:Ri,popupOverflow:xi,select:ea}=Ae.useContext(tt.E_),wi=Ia("select",_t),ci=Ia(),Wi=si!=null?si:qi,{compactSize:ha,compactItemClassnames:go}=(0,En.ri)(wi,Wi),[lo,Ua]=(0,cn.Z)(wi),Ba=Ae.useMemo(()=>{const{mode:bo}=Bi;if(bo!=="combobox")return bo===$n?"combobox":bo},[Bi.mode]),Ea=Ba==="multiple"||Ba==="tags",ji=(0,Gt.Z)(Bi.suffixIcon,Bi.showArrow),Ao=(Pt=Jr!=null?Jr:Br)!==null&&Pt!==void 0?Pt:Ri,{status:la,hasFeedback:Li,isFormItemInput:xa,feedbackIcon:Ya}=Ae.useContext(Nn.aM),Ma=(0,et.F)(la,Vr);let Ta;ri!==void 0?Ta=ri:Ba==="combobox"?Ta=null:Ta=(ma==null?void 0:ma("Select"))||Ae.createElement(Wt.Z,{componentName:"Select"});const{suffixIcon:Ki,itemIcon:Ja,removeIcon:vo,clearIcon:ro}=(0,kn.Z)(Object.assign(Object.assign({},Bi),{multiple:Ea,hasFeedback:Li,feedbackIcon:Ya,showSuffixIcon:ji,prefixCls:wi,showArrow:Bi.showArrow,componentName:"Select"})),yo=Hr===!0?{clearIcon:ro}:Hr,Mo=(0,Fe.Z)(Bi,["suffixIcon","itemIcon"]),Xo=Te()(Un||Tn,{[`${wi}-dropdown-${Wi}`]:Wi==="rtl"},An,Ua),io=(0,Sn.Z)(bo=>{var sa;return(sa=fr!=null?fr:ha)!==null&&sa!==void 0?sa:bo}),So=Ae.useContext(kt.Z),os=Fr!=null?Fr:So,rs=Te()({[`${wi}-lg`]:io==="large",[`${wi}-sm`]:io==="small",[`${wi}-rtl`]:Wi==="rtl",[`${wi}-borderless`]:!hn,[`${wi}-in-form-item`]:xa},(0,et.Z)(wi,Ma,Li),go,ea==null?void 0:ea.className,Dn,An,Ua),cs=Ae.useMemo(()=>dr!==void 0?dr:Wi==="rtl"?"bottomRight":"bottomLeft",[dr,Wi]),Oo=(0,un.Z)(ii,xi);return lo(Ae.createElement(Pe,Object.assign({ref:Je,virtual:Oi,showSearch:ea==null?void 0:ea.showSearch},Mo,{style:Object.assign(Object.assign({},ea==null?void 0:ea.style),_i),dropdownMatchSelectWidth:Ao,builtinPlacements:Oo,transitionName:(0,je.m)(ci,"slide-up",Bi.transitionName),listHeight:tr,listItemHeight:Pr,mode:Ba,prefixCls:wi,placement:cs,direction:Wi,suffixIcon:Ki,menuItemSelectedIcon:Ja,removeIcon:vo,allowClear:yo,notFoundContent:Ta,className:rs,getPopupContainer:or||zi,dropdownClassName:Xo,disabled:os})))},Gn=Ae.forwardRef(Hn),ar=(0,We.Z)(Gn);Gn.SECRET_COMBOBOX_MODE_DO_NOT_USE=$n,Gn.Option=Eo,Gn.OptGroup=Pa,Gn._InternalPanelDoNotUseOrYouWillBeFired=ar;var ur=Gn},87244:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Ce}});var fe=ie(14747),Te=ie(80110),Re=ie(45503),Ge=ie(67968),ye=ie(67771),_e=ie(33297);const ce=Se=>{const{optionHeight:He,optionFontSize:Ue,optionLineHeight:xt,optionPadding:mt}=Se;return{position:"relative",display:"block",minHeight:He,padding:mt,color:Se.colorText,fontWeight:"normal",fontSize:Ue,lineHeight:xt,boxSizing:"border-box"}};var ge=Se=>{const{antCls:He,componentCls:Ue}=Se,xt=`${Ue}-item`,mt=`&${He}-slide-up-enter${He}-slide-up-enter-active`,ut=`&${He}-slide-up-appear${He}-slide-up-appear-active`,$e=`&${He}-slide-up-leave${He}-slide-up-leave-active`,Ft=`${Ue}-dropdown-placement-`;return[{[`${Ue}-dropdown`]:Object.assign(Object.assign({},(0,fe.Wf)(Se)),{position:"absolute",top:-9999,zIndex:Se.zIndexPopup,boxSizing:"border-box",padding:Se.paddingXXS,overflow:"hidden",fontSize:Se.fontSize,fontVariant:"initial",backgroundColor:Se.colorBgElevated,borderRadius:Se.borderRadiusLG,outline:"none",boxShadow:Se.boxShadowSecondary,[`
|
|
|
${mt}${Ft}bottomLeft,
|
|
|
${ut}${Ft}bottomLeft
|
|
|
`]:{animationName:ye.fJ},[`
|
|
|
${mt}${Ft}topLeft,
|
|
|
${ut}${Ft}topLeft,
|
|
|
${mt}${Ft}topRight,
|
|
|
${ut}${Ft}topRight
|
|
|
`]:{animationName:ye.Qt},[`${$e}${Ft}bottomLeft`]:{animationName:ye.Uw},[`
|
|
|
${$e}${Ft}topLeft,
|
|
|
${$e}${Ft}topRight
|
|
|
`]:{animationName:ye.ly},"&-hidden":{display:"none"},[`${xt}`]:Object.assign(Object.assign({},ce(Se)),{cursor:"pointer",transition:`background ${Se.motionDurationSlow} ease`,borderRadius:Se.borderRadiusSM,"&-group":{color:Se.colorTextDescription,fontSize:Se.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},fe.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${xt}-option-disabled)`]:{backgroundColor:Se.optionActiveBg},[`&-selected:not(${xt}-option-disabled)`]:{color:Se.optionSelectedColor,fontWeight:Se.optionSelectedFontWeight,backgroundColor:Se.optionSelectedBg,[`${xt}-option-state`]:{color:Se.colorPrimary}},"&-disabled":{[`&${xt}-option-selected`]:{backgroundColor:Se.colorBgContainerDisabled},color:Se.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Se.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ye.oN)(Se,"slide-up"),(0,ye.oN)(Se,"slide-down"),(0,_e.Fm)(Se,"move-up"),(0,_e.Fm)(Se,"move-down")]};const Ae=2,lt=Se=>{let{controlHeightSM:He,controlHeight:Ue,lineWidth:xt}=Se;const mt=(Ue-He)/2-xt,ut=Math.ceil(mt/2);return[mt,ut]};function ze(Se,He){const{componentCls:Ue,iconCls:xt}=Se,mt=`${Ue}-selection-overflow`,ut=Se.multipleSelectItemHeight,[$e]=lt(Se),Ft=He?`${Ue}-${He}`:"";return{[`${Ue}-multiple${Ft}`]:{fontSize:Se.fontSize,[mt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ue}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${$e-Ae}px ${Ae*2}px`,borderRadius:Se.borderRadius,[`${Ue}-show-search&`]:{cursor:"text"},[`${Ue}-disabled&`]:{background:Se.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ae}px 0`,lineHeight:`${ut}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ue}-show-arrow ${Ue}-selector,
|
|
|
&${Ue}-allow-clear ${Ue}-selector
|
|
|
`]:{paddingInlineEnd:Se.fontSizeIcon+Se.controlPaddingHorizontal},[`${Ue}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ut,marginTop:Ae,marginBottom:Ae,lineHeight:`${ut-Se.lineWidth*2}px`,background:Se.multipleItemBg,border:`${Se.lineWidth}px ${Se.lineType} ${Se.multipleItemBorderColor}`,borderRadius:Se.borderRadiusSM,cursor:"default",transition:`font-size ${Se.motionDurationSlow}, line-height ${Se.motionDurationSlow}, height ${Se.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ae*2,paddingInlineStart:Se.paddingXS,paddingInlineEnd:Se.paddingXS/2,[`${Ue}-disabled&`]:{color:Se.multipleItemColorDisabled,borderColor:Se.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Se.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,fe.Ro)()),{display:"inline-flex",alignItems:"center",color:Se.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${xt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Se.colorIconHover}})},[`${mt}-item + ${mt}-item`]:{[`${Ue}-selection-search`]:{marginInlineStart:0}},[`${Ue}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Se.inputPaddingHorizontalBase-$e,"\n &-input,\n &-mirror\n ":{height:ut,fontFamily:Se.fontFamily,lineHeight:`${ut}px`,transition:`all ${Se.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ue}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Se.inputPaddingHorizontalBase,insetInlineEnd:Se.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Se.motionDurationSlow}`}}}}var dt=Se=>{const{componentCls:He}=Se,Ue=(0,Re.TS)(Se,{controlHeight:Se.controlHeightSM,multipleSelectItemHeight:Se.controlHeightXS,borderRadius:Se.borderRadiusSM,borderRadiusSM:Se.borderRadiusXS}),xt=(0,Re.TS)(Se,{fontSize:Se.fontSizeLG,controlHeight:Se.controlHeightLG,multipleSelectItemHeight:Se.multipleItemHeightLG,borderRadius:Se.borderRadiusLG,borderRadiusSM:Se.borderRadius}),[,mt]=lt(Se);return[ze(Se),ze(Ue,"sm"),{[`${He}-multiple${He}-sm`]:{[`${He}-selection-placeholder`]:{insetInline:Se.controlPaddingHorizontalSM-Se.lineWidth},[`${He}-selection-search`]:{marginInlineStart:mt}}},ze(xt,"lg")]};function ct(Se,He){const{componentCls:Ue,inputPaddingHorizontalBase:xt,borderRadius:mt}=Se,ut=Se.controlHeight-Se.lineWidth*2,$e=Math.ceil(Se.fontSize*1.25),Ft=He?`${Ue}-${He}`:"";return{[`${Ue}-single${Ft}`]:{fontSize:Se.fontSize,[`${Ue}-selector`]:Object.assign(Object.assign({},(0,fe.Wf)(Se)),{display:"flex",borderRadius:mt,[`${Ue}-selection-search`]:{position:"absolute",top:0,insetInlineStart:xt,insetInlineEnd:xt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ue}-selection-item,
|
|
|
${Ue}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${ut}px`,transition:`all ${Se.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ut}px`}},[`${Ue}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ue}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ue}-selection-item:after`,`${Ue}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ue}-show-arrow ${Ue}-selection-item,
|
|
|
&${Ue}-show-arrow ${Ue}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:$e},[`&${Ue}-open ${Ue}-selection-item`]:{color:Se.colorTextPlaceholder},[`&:not(${Ue}-customize-input)`]:{[`${Ue}-selector`]:{width:"100%",height:Se.controlHeight,padding:`0 ${xt}px`,[`${Ue}-selection-search-input`]:{height:ut},"&:after":{lineHeight:`${ut}px`}}},[`&${Ue}-customize-input`]:{[`${Ue}-selector`]:{"&:after":{display:"none"},[`${Ue}-selection-search`]:{position:"static",width:"100%"},[`${Ue}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${xt}px`,"&:after":{display:"none"}}}}}}}function qe(Se){const{componentCls:He}=Se,Ue=Se.controlPaddingHorizontalSM-Se.lineWidth;return[ct(Se),ct((0,Re.TS)(Se,{controlHeight:Se.controlHeightSM,borderRadius:Se.borderRadiusSM}),"sm"),{[`${He}-single${He}-sm`]:{[`&:not(${He}-customize-input)`]:{[`${He}-selection-search`]:{insetInlineStart:Ue,insetInlineEnd:Ue},[`${He}-selector`]:{padding:`0 ${Ue}px`},[`&${He}-show-arrow ${He}-selection-search`]:{insetInlineEnd:Ue+Se.fontSize*1.5},[`
|
|
|
&${He}-show-arrow ${He}-selection-item,
|
|
|
&${He}-show-arrow ${He}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Se.fontSize*1.5}}}},ct((0,Re.TS)(Se,{controlHeight:Se.singleItemHeightLG,fontSize:Se.fontSizeLG,borderRadius:Se.borderRadiusLG}),"lg")]}const be=Se=>{const{componentCls:He,selectorBg:Ue}=Se;return{position:"relative",backgroundColor:Ue,border:`${Se.lineWidth}px ${Se.lineType} ${Se.colorBorder}`,transition:`all ${Se.motionDurationMid} ${Se.motionEaseInOut}`,input:{cursor:"pointer"},[`${He}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${He}-disabled&`]:{color:Se.colorTextDisabled,background:Se.colorBgContainerDisabled,cursor:"not-allowed",[`${He}-multiple&`]:{background:Se.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},vt=function(Se,He){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:xt,borderHoverColor:mt,outlineColor:ut,antCls:$e}=He,Ft=Ue?{[`${xt}-selector`]:{borderColor:mt}}:{};return{[Se]:{[`&:not(${xt}-disabled):not(${xt}-customize-input):not(${$e}-pagination-size-changer)`]:Object.assign(Object.assign({},Ft),{[`${xt}-focused& ${xt}-selector`]:{borderColor:mt,boxShadow:`0 0 0 ${He.controlOutlineWidth}px ${ut}`,outline:0},[`&:hover ${xt}-selector`]:{borderColor:mt}})}}},Dt=Se=>{const{componentCls:He}=Se;return{[`${He}-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=Se=>{const{componentCls:He,inputPaddingHorizontalBase:Ue,iconCls:xt}=Se;return{[He]:Object.assign(Object.assign({},(0,fe.Wf)(Se)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${He}-customize-input) ${He}-selector`]:Object.assign(Object.assign({},be(Se)),Dt(Se)),[`${He}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},fe.vS),[`${He}-selection-placeholder`]:Object.assign(Object.assign({},fe.vS),{flex:1,color:Se.colorTextPlaceholder,pointerEvents:"none"}),[`${He}-arrow`]:Object.assign(Object.assign({},(0,fe.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[xt]:{verticalAlign:"top",transition:`transform ${Se.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${He}-suffix)`]:{pointerEvents:"auto"}},[`${He}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${He}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ue,zIndex:1,display:"inline-block",width:Se.fontSizeIcon,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Se.clearBg,cursor:"pointer",opacity:0,transition:`color ${Se.motionDurationMid} ease, opacity ${Se.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Se.colorTextTertiary}},"&:hover":{[`${He}-clear`]:{opacity:1}}}),[`${He}-has-feedback`]:{[`${He}-clear`]:{insetInlineEnd:Ue+Se.fontSize+Se.paddingXS}}}},ot=Se=>{const{componentCls:He}=Se;return[{[He]:{[`&-borderless ${He}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${He}-in-form-item`]:{width:"100%"}}},it(Se),qe(Se),dt(Se),ge(Se),{[`${He}-rtl`]:{direction:"rtl"}},vt(He,(0,Re.TS)(Se,{borderHoverColor:Se.colorPrimaryHover,outlineColor:Se.controlOutline})),vt(`${He}-status-error`,(0,Re.TS)(Se,{borderHoverColor:Se.colorErrorHover,outlineColor:Se.colorErrorOutline}),!0),vt(`${He}-status-warning`,(0,Re.TS)(Se,{borderHoverColor:Se.colorWarningHover,outlineColor:Se.colorWarningOutline}),!0),(0,Te.c)(Se,{borderElCls:`${He}-selector`,focusElCls:`${He}-focused`})]};var Ce=(0,Ge.Z)("Select",(Se,He)=>{let{rootPrefixCls:Ue}=He;const xt=(0,Re.TS)(Se,{rootPrefixCls:Ue,inputPaddingHorizontalBase:Se.paddingSM-1,multipleSelectItemHeight:Se.multipleItemHeight});return[ot(xt)]},Se=>{const{fontSize:He,lineHeight:Ue,controlHeight:xt,controlPaddingHorizontal:mt,zIndexPopupBase:ut,colorText:$e,fontWeightStrong:Ft,controlItemBgActive:yt,controlItemBgHover:gn,colorBgContainer:rt,colorFillSecondary:Mt,controlHeightLG:en,controlHeightSM:Yt,colorBgContainerDisabled:Qe,colorTextDisabled:Ie}=Se;return{zIndexPopup:ut+50,optionSelectedColor:$e,optionSelectedFontWeight:Ft,optionSelectedBg:yt,optionActiveBg:gn,optionPadding:`${(xt-He*Ue)/2}px ${mt}px`,optionFontSize:He,optionLineHeight:Ue,optionHeight:xt,selectorBg:rt,clearBg:rt,singleItemHeightLG:en,multipleItemBg:Mt,multipleItemBorderColor:"transparent",multipleItemHeight:Yt,multipleItemHeightLG:xt,multipleSelectorBgDisabled:Qe,multipleItemColorDisabled:Ie,multipleItemBorderColorDisabled:"transparent"}})},13458:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});const fe=Re=>{const ye={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Re==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ye),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ye),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ye),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ye),{points:["br","tr"],offset:[0,-4]})}};function Te(Re,Ge){return Re||fe(Ge)}},78642:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return fe}});function fe(Te,Re){return Re!==void 0?Re:Te!==null}},46163:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ke}});var fe=ie(18299),Te=ie(16646),Re=ie(73475),Ge=ie(42922),ye=ie(3407),_e=ie(72395),ce=ie(67294);function ke(ge){let{suffixIcon:Ae,clearIcon:lt,menuItemSelectedIcon:ze,removeIcon:st,loading:dt,multiple:ct,hasFeedback:qe,prefixCls:be,showSuffixIcon:vt,feedbackIcon:Dt,showArrow:it,componentName:ot}=ge;const Ce=lt!=null?lt:ce.createElement(Te.Z,null),Se=mt=>Ae===null&&!qe&&!it?null:ce.createElement(ce.Fragment,null,vt!==!1&&mt,qe&&Dt);let He=null;if(Ae!==void 0)He=Se(Ae);else if(dt)He=Se(ce.createElement(ye.Z,{spin:!0}));else{const mt=`${be}-suffix`;He=ut=>{let{open:$e,showSearch:Ft}=ut;return Se($e&&Ft?ce.createElement(_e.Z,{className:mt}):ce.createElement(Ge.Z,{className:mt}))}}let Ue=null;ze!==void 0?Ue=ze:ct?Ue=ce.createElement(fe.Z,null):Ue=null;let xt=null;return st!==void 0?xt=st:xt=ce.createElement(Re.Z,null),{clearIcon:Ce,suffixIcon:He,itemIcon:Ue,removeIcon:xt}}},33507:function(Ln,Kt){"use strict";const ie=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`}}});Kt.Z=ie},33297:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Fm:function(){return ze}});var fe=ie(34367),Te=ie(93590);const Re=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}}),Ge=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}}),ye=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}}),_e=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}}),ce=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}}),ke=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}}),Ae=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}}),lt={"move-up":{inKeyframes:ge,outKeyframes:Ae},"move-down":{inKeyframes:Re,outKeyframes:Ge},"move-left":{inKeyframes:ye,outKeyframes:_e},"move-right":{inKeyframes:ce,outKeyframes:ke}},ze=(st,dt)=>{const{antCls:ct}=st,qe=`${ct}-${dt}`,{inKeyframes:be,outKeyframes:vt}=lt[dt];return[(0,Te.R)(qe,be,vt,st.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:st.motionEaseOutCirc},[`${qe}-leave`]:{animationTimingFunction:st.motionEaseInOutCirc}}]}},67771:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Qt:function(){return ye},Uw:function(){return Ge},fJ:function(){return Re},ly:function(){return _e},oN:function(){return ze}});var fe=ie(34367),Te=ie(93590);const Re=new fe.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ge=new fe.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ye=new fe.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_e=new fe.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ce=new fe.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ke=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}}),Ae=new fe.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),lt={"slide-up":{inKeyframes:Re,outKeyframes:Ge},"slide-down":{inKeyframes:ye,outKeyframes:_e},"slide-left":{inKeyframes:ce,outKeyframes:ke},"slide-right":{inKeyframes:ge,outKeyframes:Ae}},ze=(st,dt)=>{const{antCls:ct}=st,qe=`${ct}-${dt}`,{inKeyframes:be,outKeyframes:vt}=lt[dt];return[(0,Te.R)(qe,be,vt,st.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:st.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${qe}-leave`]:{animationTimingFunction:st.motionEaseInQuint}}]}},49867:function(Ln,Kt,ie){"use strict";ie.d(Kt,{N:function(){return fe}});const fe=Te=>({color:Te.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Te.motionDurationSlow}`,"&:focus, &:hover":{color:Te.colorLinkHover},"&:active":{color:Te.colorLinkActive}})},47897:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ve}});var fe=ie(3407),Te=ie(94184),Re=ie.n(Te);function Ge(){return Ge=Object.assign?Object.assign.bind():function(pe){for(var se=1;se<arguments.length;se++){var Be=arguments[se];for(var ft in Be)Object.prototype.hasOwnProperty.call(Be,ft)&&(pe[ft]=Be[ft])}return pe},Ge.apply(this,arguments)}function ye(pe){"@babel/helpers - typeof";return ye=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},ye(pe)}function _e(pe,se){if(ye(pe)!=="object"||pe===null)return pe;var Be=pe[Symbol.toPrimitive];if(Be!==void 0){var ft=Be.call(pe,se||"default");if(ye(ft)!=="object")return ft;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(pe)}function ce(pe){var se=_e(pe,"string");return ye(se)==="symbol"?se:String(se)}function ke(pe,se,Be){return se=ce(se),se in pe?Object.defineProperty(pe,se,{value:Be,enumerable:!0,configurable:!0,writable:!0}):pe[se]=Be,pe}function ge(pe){if(Array.isArray(pe))return pe}function Ae(pe,se){var Be=pe==null?null:typeof Symbol!="undefined"&&pe[Symbol.iterator]||pe["@@iterator"];if(Be!=null){var ft,Bt,qt,an,vn=[],dn=!0,gt=!1;try{if(qt=(Be=Be.call(pe)).next,se===0){if(Object(Be)!==Be)return;dn=!1}else for(;!(dn=(ft=qt.call(Be)).done)&&(vn.push(ft.value),vn.length!==se);dn=!0);}catch(It){gt=!0,Bt=It}finally{try{if(!dn&&Be.return!=null&&(an=Be.return(),Object(an)!==an))return}finally{if(gt)throw Bt}}return vn}}function lt(pe,se){(se==null||se>pe.length)&&(se=pe.length);for(var Be=0,ft=new Array(se);Be<se;Be++)ft[Be]=pe[Be];return ft}function ze(pe,se){if(pe){if(typeof pe=="string")return lt(pe,se);var Be=Object.prototype.toString.call(pe).slice(8,-1);if(Be==="Object"&&pe.constructor&&(Be=pe.constructor.name),Be==="Map"||Be==="Set")return Array.from(pe);if(Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be))return lt(pe,se)}}function st(){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 dt(pe,se){return ge(pe)||Ae(pe,se)||ze(pe,se)||st()}function ct(pe,se){if(pe==null)return{};var Be={},ft=Object.keys(pe),Bt,qt;for(qt=0;qt<ft.length;qt++)Bt=ft[qt],!(se.indexOf(Bt)>=0)&&(Be[Bt]=pe[Bt]);return Be}function qe(pe,se){if(pe==null)return{};var Be=ct(pe,se),ft,Bt;if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(pe);for(Bt=0;Bt<qt.length;Bt++)ft=qt[Bt],!(se.indexOf(ft)>=0)&&Object.prototype.propertyIsEnumerable.call(pe,ft)&&(Be[ft]=pe[ft])}return Be}var be=ie(67294);function vt(pe){if(Array.isArray(pe))return pe}function Dt(pe,se){var Be=pe==null?null:typeof Symbol!="undefined"&&pe[Symbol.iterator]||pe["@@iterator"];if(Be!=null){var ft,Bt,qt,an,vn=[],dn=!0,gt=!1;try{if(qt=(Be=Be.call(pe)).next,se===0){if(Object(Be)!==Be)return;dn=!1}else for(;!(dn=(ft=qt.call(Be)).done)&&(vn.push(ft.value),vn.length!==se);dn=!0);}catch(It){gt=!0,Bt=It}finally{try{if(!dn&&Be.return!=null&&(an=Be.return(),Object(an)!==an))return}finally{if(gt)throw Bt}}return vn}}function it(pe,se){(se==null||se>pe.length)&&(se=pe.length);for(var Be=0,ft=new Array(se);Be<se;Be++)ft[Be]=pe[Be];return ft}function ot(pe,se){if(pe){if(typeof pe=="string")return it(pe,se);var Be=Object.prototype.toString.call(pe).slice(8,-1);if(Be==="Object"&&pe.constructor&&(Be=pe.constructor.name),Be==="Map"||Be==="Set")return Array.from(pe);if(Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be))return it(pe,se)}}function Ce(){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 Se(pe,se){return vt(pe)||Dt(pe,se)||ot(pe,se)||Ce()}function He(pe){var se=be.useRef();se.current=pe;var Be=be.useCallback(function(){for(var ft,Bt=arguments.length,qt=new Array(Bt),an=0;an<Bt;an++)qt[an]=arguments[an];return(ft=se.current)===null||ft===void 0?void 0:ft.call.apply(ft,[se].concat(qt))},[]);return Be}function Ue(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var xt=Ue()?be.useLayoutEffect:be.useEffect,mt=function(se,Be){var ft=be.useRef(!0);xt(function(){return se(ft.current)},Be),xt(function(){return ft.current=!1,function(){ft.current=!0}},[])},ut=function(se,Be){mt(function(ft){if(!ft)return se()},Be)},$e=null;function Ft(pe){var se=be.useRef(!1),Be=be.useState(pe),ft=Se(Be,2),Bt=ft[0],qt=ft[1];be.useEffect(function(){return se.current=!1,function(){se.current=!0}},[]);function an(vn,dn){dn&&se.current||qt(vn)}return[Bt,an]}function yt(pe){return pe!==void 0}function gn(pe,se){var Be=se||{},ft=Be.defaultValue,Bt=Be.value,qt=Be.onChange,an=Be.postState,vn=Ft(function(){return yt(Bt)?Bt:yt(ft)?typeof ft=="function"?ft():ft:typeof pe=="function"?pe():pe}),dn=Se(vn,2),gt=dn[0],It=dn[1],Ht=Bt!==void 0?Bt:gt,Xt=an?an(Ht):Ht,Tt=He(qt),Yn=Ft([Ht]),Rn=Se(Yn,2),cr=Rn[0],Xr=Rn[1];ut(function(){var kr=cr[0];gt!==kr&&Tt(gt,kr)},[cr]),ut(function(){yt(Bt)||It(Bt)},[Bt]);var wr=He(function(kr,Ar){It(kr,Ar),Xr([Ht],Ar)});return[Xt,wr]}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 Be=se.keyCode;if(se.altKey&&!se.ctrlKey||se.metaKey||Be>=rt.F1&&Be<=rt.F12)return!1;switch(Be){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}}},Mt=rt,en=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Yt=be.forwardRef(function(pe,se){var Be,ft=pe.prefixCls,Bt=ft===void 0?"rc-switch":ft,qt=pe.className,an=pe.checked,vn=pe.defaultChecked,dn=pe.disabled,gt=pe.loadingIcon,It=pe.checkedChildren,Ht=pe.unCheckedChildren,Xt=pe.onClick,Tt=pe.onChange,Yn=pe.onKeyDown,Rn=qe(pe,en),cr=gn(!1,{value:an,defaultValue:vn}),Xr=dt(cr,2),wr=Xr[0],kr=Xr[1];function Ar(Pi,Or){var Jn=wr;return dn||(Jn=Pi,kr(Jn),Tt==null||Tt(Jn,Or)),Jn}function gi(Pi){Pi.which===Mt.LEFT?Ar(!1,Pi):Pi.which===Mt.RIGHT&&Ar(!0,Pi),Yn==null||Yn(Pi)}function oi(Pi){var Or=Ar(!wr,Pi);Xt==null||Xt(Or,Pi)}var fi=Re()(Bt,qt,(Be={},ke(Be,"".concat(Bt,"-checked"),wr),ke(Be,"".concat(Bt,"-disabled"),dn),Be));return be.createElement("button",Ge({},Rn,{type:"button",role:"switch","aria-checked":wr,disabled:dn,className:fi,ref:se,onKeyDown:gi,onClick:oi}),gt,be.createElement("span",{className:"".concat(Bt,"-inner")},be.createElement("span",{className:"".concat(Bt,"-inner-checked")},It),be.createElement("span",{className:"".concat(Bt,"-inner-unchecked")},Ht)))});Yt.displayName="Switch";var Qe=Yt,Ie=ie(45353),Ot=ie(53124),In=ie(98866),mn=ie(98675),pt=ie(84780),wt=ie(14747),Qt=ie(67968),Zn=ie(45503);const Cn=pe=>{const{componentCls:se,trackHeightSM:Be,trackPadding:ft,trackMinWidthSM:Bt,innerMinMarginSM:qt,innerMaxMarginSM:an,handleSizeSM:vn}=pe,dn=`${se}-inner`;return{[se]:{[`&${se}-small`]:{minWidth:Bt,height:Be,lineHeight:`${Be}px`,[`${se}-inner`]:{paddingInlineStart:an,paddingInlineEnd:qt,[`${dn}-checked`]:{marginInlineStart:`calc(-100% + ${vn+ft*2}px - ${an*2}px)`,marginInlineEnd:`calc(100% - ${vn+ft*2}px + ${an*2}px)`},[`${dn}-unchecked`]:{marginTop:-Be,marginInlineStart:0,marginInlineEnd:0}},[`${se}-handle`]:{width:vn,height:vn},[`${se}-loading-icon`]:{top:(vn-pe.switchLoadingIconSize)/2,fontSize:pe.switchLoadingIconSize},[`&${se}-checked`]:{[`${se}-inner`]:{paddingInlineStart:qt,paddingInlineEnd:an,[`${dn}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${dn}-unchecked`]:{marginInlineStart:`calc(100% - ${vn+ft*2}px + ${an*2}px)`,marginInlineEnd:`calc(-100% + ${vn+ft*2}px - ${an*2}px)`}},[`${se}-handle`]:{insetInlineStart:`calc(100% - ${vn+ft}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${dn}`]:{[`${dn}-unchecked`]:{marginInlineStart:pe.marginXXS/2,marginInlineEnd:-pe.marginXXS/2}},[`&${se}-checked ${dn}`]:{[`${dn}-checked`]:{marginInlineStart:-pe.marginXXS/2,marginInlineEnd:pe.marginXXS/2}}}}}}},rn=pe=>{const{componentCls:se,handleSize:Be}=pe;return{[se]:{[`${se}-loading-icon${pe.iconCls}`]:{position:"relative",top:(Be-pe.fontSize)/2,color:pe.switchLoadingIconColor,verticalAlign:"top"},[`&${se}-checked ${se}-loading-icon`]:{color:pe.switchColor}}}},ln=pe=>{const{componentCls:se,motion:Be,trackPadding:ft,handleBg:Bt,handleShadow:qt,handleSize:an}=pe,vn=`${se}-handle`;return{[se]:{[vn]:{position:"absolute",top:ft,insetInlineStart:ft,width:an,height:an,transition:`all ${pe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Bt,borderRadius:an/2,boxShadow:qt,transition:`all ${pe.switchDuration} ease-in-out`,content:'""'}},[`&${se}-checked ${vn}`]:{insetInlineStart:`calc(100% - ${an+ft}px)`},[`&:not(${se}-disabled):active`]:Be?{[`${vn}::before`]:{insetInlineEnd:pe.switchHandleActiveInset,insetInlineStart:0},[`&${se}-checked ${vn}::before`]:{insetInlineEnd:0,insetInlineStart:pe.switchHandleActiveInset}}:{}}}},zn=pe=>{const{componentCls:se,trackHeight:Be,trackPadding:ft,innerMinMargin:Bt,innerMaxMargin:qt,handleSize:an}=pe,vn=`${se}-inner`;return{[se]:{[vn]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:qt,paddingInlineEnd:Bt,transition:`padding-inline-start ${pe.switchDuration} ease-in-out, padding-inline-end ${pe.switchDuration} ease-in-out`,[`${vn}-checked, ${vn}-unchecked`]:{display:"block",color:pe.colorTextLightSolid,fontSize:pe.fontSizeSM,transition:`margin-inline-start ${pe.switchDuration} ease-in-out, margin-inline-end ${pe.switchDuration} ease-in-out`,pointerEvents:"none"},[`${vn}-checked`]:{marginInlineStart:`calc(-100% + ${an+ft*2}px - ${qt*2}px)`,marginInlineEnd:`calc(100% - ${an+ft*2}px + ${qt*2}px)`},[`${vn}-unchecked`]:{marginTop:-Be,marginInlineStart:0,marginInlineEnd:0}},[`&${se}-checked ${vn}`]:{paddingInlineStart:Bt,paddingInlineEnd:qt,[`${vn}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${vn}-unchecked`]:{marginInlineStart:`calc(100% - ${an+ft*2}px + ${qt*2}px)`,marginInlineEnd:`calc(-100% + ${an+ft*2}px - ${qt*2}px)`}},[`&:not(${se}-disabled):active`]:{[`&:not(${se}-checked) ${vn}`]:{[`${vn}-unchecked`]:{marginInlineStart:ft*2,marginInlineEnd:-ft*2}},[`&${se}-checked ${vn}`]:{[`${vn}-checked`]:{marginInlineStart:-ft*2,marginInlineEnd:ft*2}}}}}},_n=pe=>{const{componentCls:se,trackHeight:Be,trackMinWidth:ft}=pe;return{[se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,wt.Wf)(pe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:ft,height:Be,lineHeight:`${Be}px`,verticalAlign:"middle",background:pe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${pe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${se}-disabled)`]:{background:pe.colorTextTertiary}}),(0,wt.Qy)(pe)),{[`&${se}-checked`]:{background:pe.switchColor,[`&:hover:not(${se}-disabled)`]:{background:pe.colorPrimaryHover}},[`&${se}-loading, &${se}-disabled`]:{cursor:"not-allowed",opacity:pe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${se}-rtl`]:{direction:"rtl"}})}};var Oe=(0,Qt.Z)("Switch",pe=>{const se=(0,Zn.TS)(pe,{switchDuration:pe.motionDurationMid,switchColor:pe.colorPrimary,switchDisabledOpacity:pe.opacityLoading,switchLoadingIconSize:pe.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${pe.opacityLoading})`,switchHandleActiveInset:"-30%"});return[_n(se),zn(se),ln(se),rn(se),Cn(se)]},pe=>{const{fontSize:se,lineHeight:Be,controlHeight:ft,colorWhite:Bt}=pe,qt=se*Be,an=ft/2,vn=2,dn=qt-vn*2,gt=an-vn*2;return{trackHeight:qt,trackHeightSM:an,trackMinWidth:dn*2+vn*4,trackMinWidthSM:gt*2+vn*2,trackPadding:vn,handleBg:Bt,handleSize:dn,handleSizeSM:gt,handleShadow:`0 2px 4px 0 ${new pt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:dn/2,innerMaxMargin:dn+vn+vn*2,innerMinMarginSM:gt/2,innerMaxMarginSM:gt+vn+vn*2}}),ue=function(pe,se){var Be={};for(var ft in pe)Object.prototype.hasOwnProperty.call(pe,ft)&&se.indexOf(ft)<0&&(Be[ft]=pe[ft]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,ft=Object.getOwnPropertySymbols(pe);Bt<ft.length;Bt++)se.indexOf(ft[Bt])<0&&Object.prototype.propertyIsEnumerable.call(pe,ft[Bt])&&(Be[ft[Bt]]=pe[ft[Bt]]);return Be};const le=be.forwardRef((pe,se)=>{const{prefixCls:Be,size:ft,disabled:Bt,loading:qt,className:an,rootClassName:vn,style:dn}=pe,gt=ue(pe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:It,direction:Ht,switch:Xt}=be.useContext(Ot.E_),Tt=be.useContext(In.Z),Yn=(Bt!=null?Bt:Tt)||qt,Rn=It("switch",Be),cr=be.createElement("div",{className:`${Rn}-handle`},qt&&be.createElement(fe.Z,{className:`${Rn}-loading-icon`})),[Xr,wr]=Oe(Rn),kr=(0,mn.Z)(ft),Ar=Re()(Xt==null?void 0:Xt.className,{[`${Rn}-small`]:kr==="small",[`${Rn}-loading`]:qt,[`${Rn}-rtl`]:Ht==="rtl"},an,vn,wr),gi=Object.assign(Object.assign({},Xt==null?void 0:Xt.style),dn);return Xr(be.createElement(Ie.Z,{component:"Switch"},be.createElement(Qe,Object.assign({},gt,{prefixCls:Rn,className:Ar,style:gi,disabled:Yn,ref:se,loadingIcon:cr}))))});le.__ANT_SWITCH=!0;var ve=le},9430:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return Iu}});var fe={},Te="rc-table-internal-hook",Re=ie(97685),Ge=ie(66680),ye=ie(8410),_e=ie(91881),ce=ie(67294),ke=ie(73935);function ge(we){var Le=ce.createContext(void 0),Ze=function(St){var Ct=St.value,Jt=St.children,pn=ce.useRef(Ct);pn.current=Ct;var nn=ce.useState(function(){return{getValue:function(){return pn.current},listeners:new Set}}),Pn=(0,Re.Z)(nn,1),Xn=Pn[0];return(0,ye.Z)(function(){(0,ke.unstable_batchedUpdates)(function(){Xn.listeners.forEach(function(Ut){Ut(Ct)})})},[Ct]),ce.createElement(Le.Provider,{value:Xn},Jt)};return{Context:Le,Provider:Ze,defaultValue:we}}function Ae(we,Le){var Ze=(0,Ge.Z)(typeof Le=="function"?Le:function(Ut){if(Le===void 0)return Ut;if(!Array.isArray(Le))return Ut[Le];var gr={};return Le.forEach(function(Cr){gr[Cr]=Ut[Cr]}),gr}),nt=ce.useContext(we==null?void 0:we.Context),St=nt||{},Ct=St.listeners,Jt=St.getValue,pn=ce.useRef();pn.current=Ze(nt?Jt():we==null?void 0:we.defaultValue);var nn=ce.useState({}),Pn=(0,Re.Z)(nn,2),Xn=Pn[1];return(0,ye.Z)(function(){if(!nt)return;function Ut(gr){var Cr=Ze(gr);(0,_e.Z)(pn.current,Cr,!0)||Xn({})}return Ct.add(Ut),function(){Ct.delete(Ut)}},[nt]),pn.current}var lt=ie(87462),ze=ie(42550);function st(){var we=ce.createContext(null);function Le(){return ce.useContext(we)}function Ze(St,Ct){var Jt=(0,ze.Yr)(St),pn=function(Pn,Xn){var Ut=Jt?{ref:Xn}:{},gr=ce.useRef(0),Cr=ce.useRef(Pn),Mr=Le();return Mr!==null?ce.createElement(St,(0,lt.Z)({},Pn,Ut)):((!Ct||Ct(Cr.current,Pn))&&(gr.current+=1),Cr.current=Pn,ce.createElement(we.Provider,{value:gr.current},ce.createElement(St,(0,lt.Z)({},Pn,Ut))))};return Jt?ce.forwardRef(pn):pn}function nt(St,Ct){var Jt=(0,ze.Yr)(St),pn=function(Pn,Xn){var Ut=Jt?{ref:Xn}:{};return Le(),ce.createElement(St,(0,lt.Z)({},Pn,Ut))};return Jt?ce.memo(ce.forwardRef(pn),Ct):ce.memo(pn,Ct)}return{makeImmutable:Ze,responseImmutable:nt,useImmutableMark:Le}}var dt=st(),ct=dt.makeImmutable,qe=dt.responseImmutable,be=dt.useImmutableMark,vt=st(),Dt=vt.makeImmutable,it=vt.responseImmutable,ot=vt.useImmutableMark,Ce=ge(),Se=Ce;function He(we,Le){var Ze=ce.useRef(0);Ze.current+=1;var nt=ce.useRef(we),St=[];Object.keys(we||{}).map(function(Jt){var pn;(we==null?void 0:we[Jt])!==((pn=nt.current)===null||pn===void 0?void 0:pn[Jt])&&St.push(Jt)}),nt.current=we;var Ct=ce.useRef([]);return St.length&&(Ct.current=St),ce.useDebugValue(Ze.current),ce.useDebugValue(Ct.current.join(", ")),Le&&console.log("".concat(Le,":"),Ze.current,Ct.current),Ze.current}var Ue=null,xt=ce.memo(function(){var we=He();return ce.createElement("h1",null,"Render Times: ",we)});xt.displayName="RenderBlock";var mt=ie(71002),ut=ie(1413),$e=ie(4942),Ft=ie(94184),yt=ie.n(Ft);function gn(we,Le,Ze){var nt=ce.useRef({});return(!("value"in nt.current)||Ze(nt.current.condition,Le))&&(nt.current.value=we(),nt.current.condition=Le),nt.current.value}var rt={},Mt=[],en=function(Le){Mt.push(Le)};function Yt(we,Le){if(0)var Ze}function Qe(we,Le){if(0)var Ze}function Ie(){rt={}}function Ot(we,Le,Ze){!Le&&!rt[Ze]&&(we(!1,Ze),rt[Ze]=!0)}function In(we,Le){Ot(Yt,we,Le)}function mn(we,Le){Ot(Qe,we,Le)}In.preMessage=en,In.resetWarned=Ie,In.noteOnce=mn;var pt=In;function wt(we,Le){var Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=new Set;function St(Ct,Jt){var pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,nn=nt.has(Ct);if(pt(!nn,"Warning: There may be circular references"),nn)return!1;if(Ct===Jt)return!0;if(Ze&&pn>1)return!1;nt.add(Ct);var Pn=pn+1;if(Array.isArray(Ct)){if(!Array.isArray(Jt)||Ct.length!==Jt.length)return!1;for(var Xn=0;Xn<Ct.length;Xn++)if(!St(Ct[Xn],Jt[Xn],Pn))return!1;return!0}if(Ct&&Jt&&(0,mt.Z)(Ct)==="object"&&(0,mt.Z)(Jt)==="object"){var Ut=Object.keys(Ct);return Ut.length!==Object.keys(Jt).length?!1:Ut.every(function(gr){return St(Ct[gr],Jt[gr],Pn)})}return!1}return St(we,Le)}var Qt=wt;function Zn(we,Le){for(var Ze=we,nt=0;nt<Le.length;nt+=1){if(Ze==null)return;Ze=Ze[Le[nt]]}return Ze}var Cn=ce.createContext({renderWithProps:!1}),rn=Cn,ln="RC_TABLE_KEY";function zn(we){return we==null?[]:Array.isArray(we)?we:[we]}function _n(we){var Le=[],Ze={};return we.forEach(function(nt){for(var St=nt||{},Ct=St.key,Jt=St.dataIndex,pn=Ct||zn(Jt).join("-")||ln;Ze[pn];)pn="".concat(pn,"_next");Ze[pn]=!0,Le.push(pn)}),Le}function Oe(we){return we!=null}function ue(we){return we&&(0,mt.Z)(we)==="object"&&!Array.isArray(we)&&!ce.isValidElement(we)}function le(we,Le,Ze,nt,St,Ct){var Jt=ce.useContext(rn),pn=ot(),nn=gn(function(){if(Oe(nt))return[nt];var Pn=Le==null||Le===""?[]:Array.isArray(Le)?Le:[Le],Xn=Zn(we,Pn),Ut=Xn,gr=void 0;if(St){var Cr=St(Xn,we,Ze);ue(Cr)?(Ut=Cr.children,gr=Cr.props,Jt.renderWithProps=!0):Ut=Cr}return[Ut,gr]},[pn,we,nt,Le,St,Ze],function(Pn,Xn){if(Ct){var Ut=(0,Re.Z)(Pn,2),gr=Ut[1],Cr=(0,Re.Z)(Xn,2),Mr=Cr[1];return Ct(Mr,gr)}return Jt.renderWithProps?!0:!Qt(Pn,Xn,!0)});return nn}function ve(we,Le,Ze,nt){var St=we+Le-1;return we<=nt&&St>=Ze}function pe(we,Le){return Ae(Se,function(Ze){var nt=ve(we,Le||1,Ze.hoverStartRow,Ze.hoverEndRow);return[nt,Ze.onHover]})}var se=function(Le){var Ze=Le.ellipsis,nt=Le.rowType,St=Le.children,Ct,Jt=Ze===!0?{showTitle:!0}:Ze;return Jt&&(Jt.showTitle||nt==="header")&&(typeof St=="string"||typeof St=="number"?Ct=St.toString():ce.isValidElement(St)&&typeof St.props.children=="string"&&(Ct=St.props.children)),Ct};function Be(we){var Le,Ze,nt,St,Ct,Jt,pn,nn,Pn=we.component,Xn=we.children,Ut=we.ellipsis,gr=we.scope,Cr=we.prefixCls,Mr=we.className,Rr=we.align,_r=we.record,Yr=we.render,jr=we.dataIndex,ui=we.renderIndex,$i=we.shouldCellUpdate,Ti=we.index,Ni=we.rowType,ca=we.colSpan,Oa=we.rowSpan,Ci=we.fixLeft,Ai=we.fixRight,Ei=we.firstFixLeft,qr=we.lastFixLeft,Di=we.firstFixRight,ua=we.lastFixRight,Va=we.appendNode,La=we.additionalProps,da=La===void 0?{}:La,qa=we.isSticky,Ga="".concat(Cr,"-cell"),Ko=Ae(Se,["supportSticky","allColumnsFixedLeft"]),eo=Ko.supportSticky,es=Ko.allColumnsFixedLeft,ts=le(_r,jr,ui,Xn,Yr,$i),Ra=(0,Re.Z)(ts,2),Ls=Ra[0],Io=Ra[1],Wo={},Ro=typeof Ci=="number"&&eo,Aa=typeof Ai=="number"&&eo;Ro&&(Wo.position="sticky",Wo.left=Ci),Aa&&(Wo.position="sticky",Wo.right=Ai);var yi=(Le=(Ze=(nt=Io==null?void 0:Io.colSpan)!==null&&nt!==void 0?nt:da.colSpan)!==null&&Ze!==void 0?Ze:ca)!==null&&Le!==void 0?Le:1,Gi=(St=(Ct=(Jt=Io==null?void 0:Io.rowSpan)!==null&&Jt!==void 0?Jt:da.rowSpan)!==null&&Ct!==void 0?Ct:Oa)!==null&&St!==void 0?St:1,fa=pe(Ti,Gi),Ii=(0,Re.Z)(fa,2),Do=Ii[0],pi=Ii[1],Da=function(Cs){var fl;_r&&pi(Ti,Ti+Gi-1),da==null||(fl=da.onMouseEnter)===null||fl===void 0||fl.call(da,Cs)},Lo=function(Cs){var fl;_r&&pi(-1,-1),da==null||(fl=da.onMouseLeave)===null||fl===void 0||fl.call(da,Cs)};if(yi===0||Gi===0)return null;var xo=(pn=da.title)!==null&&pn!==void 0?pn:se({rowType:Ni,ellipsis:Ut,children:Ls}),ol=yt()(Ga,Mr,(nn={},(0,$e.Z)(nn,"".concat(Ga,"-fix-left"),Ro&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-left-first"),Ei&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-left-last"),qr&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-left-all"),qr&&es&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-right"),Aa&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-right-first"),Di&&eo),(0,$e.Z)(nn,"".concat(Ga,"-fix-right-last"),ua&&eo),(0,$e.Z)(nn,"".concat(Ga,"-ellipsis"),Ut),(0,$e.Z)(nn,"".concat(Ga,"-with-append"),Va),(0,$e.Z)(nn,"".concat(Ga,"-fix-sticky"),(Ro||Aa)&&qa&&eo),(0,$e.Z)(nn,"".concat(Ga,"-row-hover"),!Io&&Do),nn),da.className,Io==null?void 0:Io.className),Ts={};Rr&&(Ts.textAlign=Rr);var El=(0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)({},Wo),da.style),Ts),Io==null?void 0:Io.style),Ir=Ls;return(0,mt.Z)(Ir)==="object"&&!Array.isArray(Ir)&&!ce.isValidElement(Ir)&&(Ir=null),Ut&&(qr||Di)&&(Ir=ce.createElement("span",{className:"".concat(Ga,"-content")},Ir)),ce.createElement(Pn,(0,lt.Z)({},Io,da,{className:ol,style:El,title:xo,scope:gr,onMouseEnter:Da,onMouseLeave:Lo,colSpan:yi!==1?yi:null,rowSpan:Gi!==1?Gi:null}),Va,Ir)}var ft=ce.memo(Be);function Bt(we,Le,Ze,nt,St,Ct){var Jt=Ze[we]||{},pn=Ze[Le]||{},nn,Pn;Jt.fixed==="left"?nn=nt.left[St==="rtl"?Le:we]:pn.fixed==="right"&&(Pn=nt.right[St==="rtl"?we:Le]);var Xn=!1,Ut=!1,gr=!1,Cr=!1,Mr=Ze[Le+1],Rr=Ze[we-1],_r=!(Ct!=null&&Ct.children);if(St==="rtl"){if(nn!==void 0){var Yr=Rr&&Rr.fixed==="left";Cr=!Yr&&_r}else if(Pn!==void 0){var jr=Mr&&Mr.fixed==="right";gr=!jr&&_r}}else if(nn!==void 0){var ui=Mr&&Mr.fixed==="left";Xn=!ui&&_r}else if(Pn!==void 0){var $i=Rr&&Rr.fixed==="right";Ut=!$i&&_r}return{fixLeft:nn,fixRight:Pn,lastFixLeft:Xn,firstFixRight:Ut,lastFixRight:gr,firstFixLeft:Cr,isSticky:nt.isSticky}}var qt=ce.createContext({}),an=qt;function vn(we){var Le=we.className,Ze=we.index,nt=we.children,St=we.colSpan,Ct=St===void 0?1:St,Jt=we.rowSpan,pn=we.align,nn=Ae(Se,["prefixCls","direction"]),Pn=nn.prefixCls,Xn=nn.direction,Ut=ce.useContext(an),gr=Ut.scrollColumnIndex,Cr=Ut.stickyOffsets,Mr=Ut.flattenColumns,Rr=Ut.columns,_r=Ze+Ct-1,Yr=_r+1===gr?Ct+1:Ct,jr=Bt(Ze,Ze+Yr-1,Mr,Cr,Xn,Rr==null?void 0:Rr[Ze]);return ce.createElement(ft,(0,lt.Z)({className:Le,index:Ze,component:"td",prefixCls:Pn,record:null,dataIndex:null,align:pn,colSpan:Yr,rowSpan:Jt,render:function(){return nt}},jr))}var dn=ie(45987),gt=["children"];function It(we){var Le=we.children,Ze=(0,dn.Z)(we,gt);return ce.createElement("tr",Ze,Le)}function Ht(we){var Le=we.children;return Le}Ht.Row=It,Ht.Cell=vn;var Xt=Ht;function Tt(we){var Le=we.children,Ze=we.stickyOffsets,nt=we.flattenColumns,St=we.columns,Ct=Ae(Se,"prefixCls"),Jt=nt.length-1,pn=nt[Jt],nn=ce.useMemo(function(){return{stickyOffsets:Ze,flattenColumns:nt,scrollColumnIndex:pn!=null&&pn.scrollbar?Jt:null,columns:St}},[pn,nt,Jt,Ze,St]);return ce.createElement(an.Provider,{value:nn},ce.createElement("tfoot",{className:"".concat(Ct,"-summary")},Le))}var Yn=it(Tt),Rn=Xt;function cr(we){var Le=ce.useRef();Le.current=we;var Ze=ce.useCallback(function(){for(var nt,St=arguments.length,Ct=new Array(St),Jt=0;Jt<St;Jt++)Ct[Jt]=arguments[Jt];return(nt=Le.current)===null||nt===void 0?void 0:nt.call.apply(nt,[Le].concat(Ct))},[]);return Ze}function Xr(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var wr=Xr()?ce.useLayoutEffect:ce.useEffect,kr=function(Le,Ze){var nt=React.useRef(!0);wr(function(){return Le(nt.current)},Ze),wr(function(){return nt.current=!1,function(){nt.current=!0}},[])},Ar=function(Le,Ze){kr(function(nt){if(!nt)return Le()},Ze)},gi=null;function oi(we){var Le=React.useRef(!1),Ze=React.useState(we),nt=_slicedToArray(Ze,2),St=nt[0],Ct=nt[1];React.useEffect(function(){return Le.current=!1,function(){Le.current=!0}},[]);function Jt(pn,nn){nn&&Le.current||Ct(pn)}return[St,Jt]}function fi(we){return we!==void 0}function Pi(we,Le){var Ze=Le||{},nt=Ze.defaultValue,St=Ze.value,Ct=Ze.onChange,Jt=Ze.postState,pn=useState(function(){return fi(St)?St:fi(nt)?typeof nt=="function"?nt():nt:typeof we=="function"?we():we}),nn=_slicedToArray(pn,2),Pn=nn[0],Xn=nn[1],Ut=St!==void 0?St:Pn,gr=Jt?Jt(Ut):Ut,Cr=useEvent(Ct),Mr=useState([Ut]),Rr=_slicedToArray(Mr,2),_r=Rr[0],Yr=Rr[1];useLayoutUpdateEffect(function(){var ui=_r[0];Pn!==ui&&Cr(Pn,ui)},[_r]),useLayoutUpdateEffect(function(){fi(St)||Xn(St)},[St]);var jr=useEvent(function(ui,$i){Xn(ui,$i),Yr([Ut],$i)});return[gr,jr]}var Or=ie(35110);function Jn(we,Le){typeof we=="function"?we(Le):(0,mt.Z)(we)==="object"&&we&&"current"in we&&(we.current=Le)}function qn(){for(var we=arguments.length,Le=new Array(we),Ze=0;Ze<we;Ze++)Le[Ze]=arguments[Ze];var nt=Le.filter(function(St){return St});return nt.length<=1?nt[0]:function(St){Le.forEach(function(Ct){Jn(Ct,St)})}}function nr(){for(var we=arguments.length,Le=new Array(we),Ze=0;Ze<we;Ze++)Le[Ze]=arguments[Ze];return useMemo(function(){return qn.apply(void 0,Le)},Le,function(nt,St){return nt.length!==St.length||nt.every(function(Ct,Jt){return Ct!==St[Jt]})})}function Ur(we){var Le,Ze,nt=isMemo(we)?we.type.type:we.type;return!(typeof nt=="function"&&!((Le=nt.prototype)!==null&&Le!==void 0&&Le.render)||typeof we=="function"&&!((Ze=we.prototype)!==null&&Ze!==void 0&&Ze.render))}function li(we){return!isValidElement(we)||isFragment(we)?!1:Ur(we)}function Lt(we,Le,Ze,nt){if(!Le.length)return Ze;var St=_toArray(Le),Ct=St[0],Jt=St.slice(1),pn;return!we&&typeof Ct=="number"?pn=[]:Array.isArray(we)?pn=_toConsumableArray(we):pn=_objectSpread({},we),nt&&Ze===void 0&&Jt.length===1?delete pn[Ct][Jt[0]]:pn[Ct]=Lt(pn[Ct],Jt,Ze,nt),pn}function Kn(we,Le,Ze){var nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Le.length&&nt&&Ze===void 0&&!get(we,Le.slice(0,-1))?we:Lt(we,Le,Ze,nt)}function Bn(we){return _typeof(we)==="object"&&we!==null&&Object.getPrototypeOf(we)===Object.prototype}function yn(we){return Array.isArray(we)?[]:{}}var xr=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Sr(){for(var we=arguments.length,Le=new Array(we),Ze=0;Ze<we;Ze++)Le[Ze]=arguments[Ze];var nt=yn(Le[0]);return Le.forEach(function(St){function Ct(Jt,pn){var nn=new Set(pn),Pn=get(St,Jt),Xn=Array.isArray(Pn);if(Xn||Bn(Pn)){if(!nn.has(Pn)){nn.add(Pn);var Ut=get(nt,Jt);Xn?nt=Kn(nt,Jt,[]):(!Ut||_typeof(Ut)!=="object")&&(nt=Kn(nt,Jt,yn(Pn))),xr(Pn).forEach(function(gr){Ct([].concat(_toConsumableArray(Jt),[gr]),nn)})}}else nt=Kn(nt,Jt,Pn)}Ct([])}),nt}var mr=ie(48555),Qn=function(we){if(!we)return!1;if(we instanceof Element){if(we.offsetParent)return!0;if(we.getBBox){var Le=we.getBBox(),Ze=Le.width,nt=Le.height;if(Ze||nt)return!0}if(we.getBoundingClientRect){var St=we.getBoundingClientRect(),Ct=St.width,Jt=St.height;if(Ct||Jt)return!0}}return!1},ht=function(Le){if(Xr()&&window.document.documentElement){var Ze=Array.isArray(Le)?Le:[Le],nt=window.document.documentElement;return Ze.some(function(St){return St in nt.style})}return!1},Et=function(Le,Ze){if(!ht(Le))return!1;var nt=document.createElement("div"),St=nt.style[Le];return nt.style[Le]=Ze,nt.style[Le]!==St};function zt(we,Le){return!Array.isArray(we)&&Le!==void 0?Et(we,Le):ht(we)}var fn;function at(we){if(typeof document=="undefined")return 0;if(we||fn===void 0){var Le=document.createElement("div");Le.style.width="100%",Le.style.height="200px";var Ze=document.createElement("div"),nt=Ze.style;nt.position="absolute",nt.top="0",nt.left="0",nt.pointerEvents="none",nt.visibility="hidden",nt.width="200px",nt.height="150px",nt.overflow="hidden",Ze.appendChild(Le),document.body.appendChild(Ze);var St=Le.offsetWidth;Ze.style.overflow="scroll";var Ct=Le.offsetWidth;St===Ct&&(Ct=Ze.clientWidth),document.body.removeChild(Ze),fn=St-Ct}return fn}function Rt(we){var Le=we.match(/^(.*)px$/),Ze=Number(Le==null?void 0:Le[1]);return Number.isNaN(Ze)?at():Ze}function on(we){if(typeof document=="undefined"||!we||!(we instanceof Element))return{width:0,height:0};var Le=getComputedStyle(we,"::-webkit-scrollbar"),Ze=Le.width,nt=Le.height;return{width:Rt(Ze),height:Rt(nt)}}var tn=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Mn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,wn="".concat(tn," ").concat(Mn).split(/[\s\n]+/),rr="aria-",zr="data-";function vr(we,Le){return we.indexOf(Le)===0}function yr(we){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze;Le===!1?Ze={aria:!0,data:!0,attr:!0}:Le===!0?Ze={aria:!0}:Ze=(0,ut.Z)({},Le);var nt={};return Object.keys(we).forEach(function(St){(Ze.aria&&(St==="role"||vr(St,rr))||Ze.data&&vr(St,zr)||Ze.attr&&wn.includes(St))&&(nt[St]=we[St])}),nt}function Lr(we,Le,Ze,nt,St,Ct,Jt){we.push({record:Le,indent:Ze,index:Jt});var pn=Ct(Le),nn=St==null?void 0:St.has(pn);if(Le&&Array.isArray(Le[nt])&&nn)for(var Pn=0;Pn<Le[nt].length;Pn+=1)Lr(we,Le[nt][Pn],Ze+1,nt,St,Ct,Pn)}function Dr(we,Le,Ze,nt){var St=ce.useMemo(function(){if(Ze!=null&&Ze.size){for(var Ct=[],Jt=0;Jt<(we==null?void 0:we.length);Jt+=1){var pn=we[Jt];Lr(Ct,pn,0,Le,Ze,nt,Jt)}return Ct}return we==null?void 0:we.map(function(nn,Pn){return{record:nn,indent:0,index:Pn}})},[we,Le,Ze,nt]);return St}function hi(we){var Le=we.prefixCls,Ze=we.children,nt=we.component,St=we.cellComponent,Ct=we.className,Jt=we.expanded,pn=we.colSpan,nn=we.isEmpty,Pn=Ae(Se,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Xn=Pn.scrollbarSize,Ut=Pn.fixHeader,gr=Pn.fixColumn,Cr=Pn.componentWidth,Mr=Pn.horizonScroll,Rr=Ze;return(nn?Mr&&Cr:gr)&&(Rr=ce.createElement("div",{style:{width:Cr-(Ut?Xn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Le,"-expanded-row-fixed")},Rr)),ce.createElement(nt,{className:Ct,style:{display:Jt?null:"none"}},ce.createElement(ft,{component:St,prefixCls:Le,colSpan:pn},Rr))}var Vn=hi;function br(we,Le,Ze,nt){var St=Ae(Se,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ct=St.flattenColumns,Jt=St.expandableType,pn=St.expandedKeys,nn=St.childrenColumnName,Pn=St.onTriggerExpand,Xn=St.rowExpandable,Ut=St.onRow,gr=St.expandRowByClick,Cr=St.rowClassName,Mr=Jt==="nest",Rr=Jt==="row"&&(!Xn||Xn(we)),_r=Rr||Mr,Yr=pn&&pn.has(Le),jr=nn&&we&&we[nn],ui=cr(Pn),$i=Ut==null?void 0:Ut(we,Ze),Ti=$i==null?void 0:$i.onClick,Ni=function(Ai){gr&&_r&&Pn(we,Ai);for(var Ei=arguments.length,qr=new Array(Ei>1?Ei-1:0),Di=1;Di<Ei;Di++)qr[Di-1]=arguments[Di];Ti==null||Ti.apply(void 0,[Ai].concat(qr))},ca;typeof Cr=="string"?ca=Cr:typeof Cr=="function"&&(ca=Cr(we,Ze,nt));var Oa=_n(Ct);return(0,ut.Z)((0,ut.Z)({},St),{},{columnsKey:Oa,nestExpandable:Mr,expanded:Yr,hasNestChildren:jr,record:we,onTriggerExpand:ui,rowSupportExpand:Rr,expandable:_r,rowProps:(0,ut.Z)((0,ut.Z)({},$i),{},{className:yt()(ca,$i==null?void 0:$i.className),onClick:Ni})})}function Ui(we,Le,Ze,nt,St){var Ct=we.record,Jt=we.prefixCls,pn=we.columnsKey,nn=we.fixedInfoList,Pn=we.expandIconColumnIndex,Xn=we.nestExpandable,Ut=we.indentSize,gr=we.expandIcon,Cr=we.expanded,Mr=we.hasNestChildren,Rr=we.onTriggerExpand,_r=pn[Ze],Yr=nn[Ze],jr;Ze===(Pn||0)&&Xn&&(jr=ce.createElement(ce.Fragment,null,ce.createElement("span",{style:{paddingLeft:"".concat(Ut*nt,"px")},className:"".concat(Jt,"-row-indent indent-level-").concat(nt)}),gr({prefixCls:Jt,expanded:Cr,expandable:Mr,record:Ct,onExpand:Rr})));var ui;return Le.onCell&&(ui=Le.onCell(Ct,St)),{key:_r,fixedInfo:Yr,appendCellNode:jr,additionalCellProps:ui||{}}}function na(we){var Le=we.className,Ze=we.style,nt=we.record,St=we.index,Ct=we.renderIndex,Jt=we.rowKey,pn=we.indent,nn=pn===void 0?0:pn,Pn=we.rowComponent,Xn=we.cellComponent,Ut=we.scopeCellComponent,gr=br(nt,Jt,St,nn),Cr=gr.prefixCls,Mr=gr.flattenColumns,Rr=gr.expandedRowClassName,_r=gr.expandedRowRender,Yr=gr.rowProps,jr=gr.expanded,ui=gr.rowSupportExpand,$i=ce.useState(!1),Ti=(0,Re.Z)($i,2),Ni=Ti[0],ca=Ti[1];ce.useEffect(function(){jr&&ca(!0)},[jr]);var Oa=ce.createElement(Pn,(0,lt.Z)({},Yr,{"data-row-key":Jt,className:yt()(Le,"".concat(Cr,"-row"),"".concat(Cr,"-row-level-").concat(nn),Yr==null?void 0:Yr.className),style:(0,ut.Z)((0,ut.Z)({},Ze),Yr==null?void 0:Yr.style)}),Mr.map(function(qr,Di){var ua=qr.render,Va=qr.dataIndex,La=qr.className,da=Ui(gr,qr,Di,nn,St),qa=da.key,Ga=da.fixedInfo,Ko=da.appendCellNode,eo=da.additionalCellProps;return ce.createElement(ft,(0,lt.Z)({className:La,ellipsis:qr.ellipsis,align:qr.align,scope:qr.rowScope,component:qr.rowScope?Ut:Xn,prefixCls:Cr,key:qa,record:nt,index:St,renderIndex:Ct,dataIndex:Va,render:ua,shouldCellUpdate:qr.shouldCellUpdate},Ga,{appendNode:Ko,additionalProps:eo}))})),Ci;if(ui&&(Ni||jr)){var Ai=_r(nt,St,nn+1,jr),Ei=Rr&&Rr(nt,St,nn);Ci=ce.createElement(Vn,{expanded:jr,className:yt()("".concat(Cr,"-expanded-row"),"".concat(Cr,"-expanded-row-level-").concat(nn+1),Ei),prefixCls:Cr,component:Pn,cellComponent:Xn,colSpan:Mr.length,isEmpty:!1},Ai)}return ce.createElement(ce.Fragment,null,Oa,Ci)}na.displayName="BodyRow";var Wr=it(na);function vi(we){var Le=we.columnKey,Ze=we.onColumnResize,nt=ce.useRef();return ce.useEffect(function(){nt.current&&Ze(Le,nt.current.offsetWidth)},[]),ce.createElement(mr.Z,{data:Le},ce.createElement("td",{ref:nt,style:{padding:0,border:0,height:0}},ce.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ra(we){var Le=we.prefixCls,Ze=we.columnsKey,nt=we.onColumnResize;return ce.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0,fontSize:0}},ce.createElement(mr.Z.Collection,{onBatchResize:function(Ct){Ct.forEach(function(Jt){var pn=Jt.data,nn=Jt.size;nt(pn,nn.offsetWidth)})}},Ze.map(function(St){return ce.createElement(vi,{key:St,columnKey:St,onColumnResize:nt})})))}function Kr(we){var Le=we.data,Ze=we.measureColumnWidth,nt=Ae(Se,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),St=nt.prefixCls,Ct=nt.getComponent,Jt=nt.onColumnResize,pn=nt.flattenColumns,nn=nt.getRowKey,Pn=nt.expandedKeys,Xn=nt.childrenColumnName,Ut=nt.emptyNode,gr=Dr(Le,Xn,Pn,nn),Cr=ce.useRef({renderWithProps:!1}),Mr=Ct(["body","wrapper"],"tbody"),Rr=Ct(["body","row"],"tr"),_r=Ct(["body","cell"],"td"),Yr=Ct(["body","cell"],"th"),jr;Le.length?jr=gr.map(function($i,Ti){var Ni=$i.record,ca=$i.indent,Oa=$i.index,Ci=nn(Ni,Ti);return ce.createElement(Wr,{key:Ci,rowKey:Ci,record:Ni,index:Ti,renderIndex:Oa,rowComponent:Rr,cellComponent:_r,scopeCellComponent:Yr,getRowKey:nn,indent:ca})}):jr=ce.createElement(Vn,{expanded:!0,className:"".concat(St,"-placeholder"),prefixCls:St,component:Rr,cellComponent:_r,colSpan:pn.length,isEmpty:!0},Ut);var ui=_n(pn);return ce.createElement(rn.Provider,{value:Cr.current},ce.createElement(Mr,{className:"".concat(St,"-tbody")},Ze&&ce.createElement(ra,{prefixCls:St,columnsKey:ui,onColumnResize:Jt}),jr))}Kr.displayName="Body";var Vi=it(Kr),lr=["expandable"],Na="RC_TABLE_INTERNAL_COL_DEFINE";function Ca(we){var Le=we.expandable,Ze=(0,dn.Z)(we,lr),nt;return"expandable"in we?nt=(0,ut.Z)((0,ut.Z)({},Ze),Le):nt=Ze,nt.showExpandColumn===!1&&(nt.expandIconColumnIndex=-1),nt}var ho=["columnType"];function Ha(we){for(var Le=we.colWidths,Ze=we.columns,nt=we.columCount,St=[],Ct=nt||Ze.length,Jt=!1,pn=Ct-1;pn>=0;pn-=1){var nn=Le[pn],Pn=Ze&&Ze[pn],Xn=Pn&&Pn[Na];if(nn||Xn||Jt){var Ut=Xn||{},gr=Ut.columnType,Cr=(0,dn.Z)(Ut,ho);St.unshift(ce.createElement("col",(0,lt.Z)({key:pn,style:{width:nn}},Cr))),Jt=!0}}return ce.createElement("colgroup",null,St)}var _a=Ha,Ji=ie(74902),Fa=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function ya(we,Le){return(0,ce.useMemo)(function(){for(var Ze=[],nt=0;nt<Le;nt+=1){var St=we[nt];if(St!==void 0)Ze[nt]=St;else return null}return Ze},[we.join("_"),Le])}var Wa=ce.forwardRef(function(we,Le){var Ze=we.className,nt=we.noData,St=we.columns,Ct=we.flattenColumns,Jt=we.colWidths,pn=we.columCount,nn=we.stickyOffsets,Pn=we.direction,Xn=we.fixHeader,Ut=we.stickyTopOffset,gr=we.stickyBottomOffset,Cr=we.stickyClassName,Mr=we.onScroll,Rr=we.maxContentScroll,_r=we.children,Yr=(0,dn.Z)(we,Fa),jr=Ae(Se,["prefixCls","scrollbarSize","isSticky"]),ui=jr.prefixCls,$i=jr.scrollbarSize,Ti=jr.isSticky,Ni=Ti&&!Xn?0:$i,ca=ce.useRef(null),Oa=ce.useCallback(function(La){Jn(Le,La),Jn(ca,La)},[]);ce.useEffect(function(){var La;function da(qa){var Ga=qa,Ko=Ga.currentTarget,eo=Ga.deltaX;eo&&(Mr({currentTarget:Ko,scrollLeft:Ko.scrollLeft+eo}),qa.preventDefault())}return(La=ca.current)===null||La===void 0||La.addEventListener("wheel",da),function(){var qa;(qa=ca.current)===null||qa===void 0||qa.removeEventListener("wheel",da)}},[]);var Ci=ce.useMemo(function(){return Ct.every(function(La){return La.width})},[Ct]),Ai=Ct[Ct.length-1],Ei={fixed:Ai?Ai.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ui,"-cell-scrollbar")}}},qr=(0,ce.useMemo)(function(){return Ni?[].concat((0,Ji.Z)(St),[Ei]):St},[Ni,St]),Di=(0,ce.useMemo)(function(){return Ni?[].concat((0,Ji.Z)(Ct),[Ei]):Ct},[Ni,Ct]),ua=(0,ce.useMemo)(function(){var La=nn.right,da=nn.left;return(0,ut.Z)((0,ut.Z)({},nn),{},{left:Pn==="rtl"?[].concat((0,Ji.Z)(da.map(function(qa){return qa+Ni})),[0]):da,right:Pn==="rtl"?La:[].concat((0,Ji.Z)(La.map(function(qa){return qa+Ni})),[0]),isSticky:Ti})},[Ni,nn,Ti]),Va=ya(Jt,pn);return ce.createElement("div",{style:(0,ut.Z)({overflow:"hidden"},Ti?{top:Ut,bottom:gr}:{}),ref:Oa,className:yt()(Ze,(0,$e.Z)({},Cr,!!Cr))},ce.createElement("table",{style:{tableLayout:"fixed",visibility:nt||Va?null:"hidden"}},(!nt||!Rr||Ci)&&ce.createElement(_a,{colWidths:Va?[].concat((0,Ji.Z)(Va),[Ni]):[],columCount:pn+1,columns:Di}),_r((0,ut.Z)((0,ut.Z)({},Yr),{},{stickyOffsets:ua,columns:qr,flattenColumns:Di}))))});Wa.displayName="FixedHolder";var po=ce.memo(Wa);function ja(we){var Le=we.cells,Ze=we.stickyOffsets,nt=we.flattenColumns,St=we.rowComponent,Ct=we.cellComponent,Jt=we.tdCellComponent,pn=we.onHeaderRow,nn=we.index,Pn=Ae(Se,["prefixCls","direction"]),Xn=Pn.prefixCls,Ut=Pn.direction,gr;pn&&(gr=pn(Le.map(function(Mr){return Mr.column}),nn));var Cr=_n(Le.map(function(Mr){return Mr.column}));return ce.createElement(St,gr,Le.map(function(Mr,Rr){var _r=Mr.column,Yr=Bt(Mr.colStart,Mr.colEnd,nt,Ze,Ut,_r),jr;return _r&&_r.onHeaderCell&&(jr=Mr.column.onHeaderCell(_r)),ce.createElement(ft,(0,lt.Z)({},Mr,{scope:_r.title?Mr.colSpan>1?"colgroup":"col":null,ellipsis:_r.ellipsis,align:_r.align,component:_r.title?Ct:Jt,prefixCls:Xn,key:Cr[Rr]},Yr,{additionalProps:jr,rowType:"header"}))}))}ja.displayName="HeaderRow";var Pa=ja;function mo(we){var Le=[];function Ze(Jt,pn){var nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Le[nn]=Le[nn]||[];var Pn=pn,Xn=Jt.filter(Boolean).map(function(Ut){var gr={key:Ut.key,className:Ut.className||"",children:Ut.title,column:Ut,colStart:Pn},Cr=1,Mr=Ut.children;return Mr&&Mr.length>0&&(Cr=Ze(Mr,Pn,nn+1).reduce(function(Rr,_r){return Rr+_r},0),gr.hasSubColumns=!0),"colSpan"in Ut&&(Cr=Ut.colSpan),"rowSpan"in Ut&&(gr.rowSpan=Ut.rowSpan),gr.colSpan=Cr,gr.colEnd=gr.colStart+Cr-1,Le[nn].push(gr),Pn+=Cr,Cr});return Xn}Ze(we,0);for(var nt=Le.length,St=function(pn){Le[pn].forEach(function(nn){!("rowSpan"in nn)&&!nn.hasSubColumns&&(nn.rowSpan=nt-pn)})},Ct=0;Ct<nt;Ct+=1)St(Ct);return Le}function Eo(we){var Le=we.stickyOffsets,Ze=we.columns,nt=we.flattenColumns,St=we.onHeaderRow,Ct=Ae(Se,["prefixCls","getComponent"]),Jt=Ct.prefixCls,pn=Ct.getComponent,nn=ce.useMemo(function(){return mo(Ze)},[Ze]),Pn=pn(["header","wrapper"],"thead"),Xn=pn(["header","row"],"tr"),Ut=pn(["header","cell"],"th"),gr=pn(["header","cell"],"td");return ce.createElement(Pn,{className:"".concat(Jt,"-thead")},nn.map(function(Cr,Mr){var Rr=ce.createElement(Pa,{key:Mr,flattenColumns:nt,cells:Cr,stickyOffsets:Le,rowComponent:Xn,cellComponent:Ut,tdCellComponent:gr,onHeaderRow:St,index:Mr});return Rr}))}var no=it(Eo);function ia(we){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ze=[];return ce.Children.forEach(we,function(nt){nt==null&&!Le.keepEmpty||(Array.isArray(nt)?Ze=Ze.concat(ia(nt)):(0,Or.isFragment)(nt)&&nt.props?Ze=Ze.concat(ia(nt.props.children,Le)):Ze.push(nt))}),Ze}function Zt(we){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Le=="number"?Le:Le.endsWith("%")?we*parseFloat(Le)/100:null}function At(we,Le){return ce.useMemo(function(){if(Le&&Le>0){var Ze=0,nt=0;we.forEach(function(Pn){var Xn=Zt(Le,Pn.width);Xn?Ze+=Xn:nt+=1});var St=Le-Ze,Ct=nt,Jt=St/nt,pn=0,nn=we.map(function(Pn){var Xn=(0,ut.Z)({},Pn),Ut=Zt(Le,Xn.width);if(Ut)Xn.width=Ut;else{var gr=Math.floor(Jt);Xn.width=Ct===1?St:gr,St-=gr,Ct-=1}return pn+=Xn.width,Xn});return[nn,pn]}return[we,Le]},[we,Le])}var xn=["children"],jn=["fixed"];function hr(we){return ia(we).filter(function(Le){return ce.isValidElement(Le)}).map(function(Le){var Ze=Le.key,nt=Le.props,St=nt.children,Ct=(0,dn.Z)(nt,xn),Jt=(0,ut.Z)({key:Ze},Ct);return St&&(Jt.children=hr(St)),Jt})}function Qr(we){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return we.filter(function(Ze){return Ze&&(0,mt.Z)(Ze)==="object"}).reduce(function(Ze,nt,St){var Ct=nt.fixed,Jt=Ct===!0?"left":Ct,pn="".concat(Le,"-").concat(St),nn=nt.children;return nn&&nn.length>0?[].concat((0,Ji.Z)(Ze),(0,Ji.Z)(Qr(nn,pn).map(function(Pn){return(0,ut.Z)({fixed:Jt},Pn)}))):[].concat((0,Ji.Z)(Ze),[(0,ut.Z)((0,ut.Z)({key:pn},nt),{},{fixed:Jt})])},[])}function ni(we){for(var Le=!0,Ze=0;Ze<we.length;Ze+=1){var nt=we[Ze];if(Le&&nt.fixed!=="left")Le=!1;else if(!Le&&nt.fixed==="left"){warning(!1,"Index ".concat(Ze-1," of `columns` missing `fixed='left'` prop."));break}}for(var St=!0,Ct=we.length-1;Ct>=0;Ct-=1){var Jt=we[Ct];if(St&&Jt.fixed!=="right")St=!1;else if(!St&&Jt.fixed==="right"){warning(!1,"Index ".concat(Ct+1," of `columns` missing `fixed='right'` prop."));break}}}function mi(we){return we.map(function(Le){var Ze=Le.fixed,nt=(0,dn.Z)(Le,jn),St=Ze;return Ze==="left"?St="right":Ze==="right"&&(St="left"),(0,ut.Z)({fixed:St},nt)})}function ki(we,Le){var Ze=we.prefixCls,nt=we.columns,St=we.children,Ct=we.expandable,Jt=we.expandedKeys,pn=we.columnTitle,nn=we.getRowKey,Pn=we.onTriggerExpand,Xn=we.expandIcon,Ut=we.rowExpandable,gr=we.expandIconColumnIndex,Cr=we.direction,Mr=we.expandRowByClick,Rr=we.columnWidth,_r=we.fixed,Yr=we.scrollWidth,jr=ce.useMemo(function(){return nt||hr(St)},[nt,St]),ui=ce.useMemo(function(){if(Ct){var Ai,Ei=jr.slice();if(!Ei.includes(fe)){var qr=gr||0;qr>=0&&Ei.splice(qr,0,fe)}var Di=Ei.indexOf(fe);Ei=Ei.filter(function(da,qa){return da!==fe||qa===Di});var ua=jr[Di],Va;(_r==="left"||_r)&&!gr?Va="left":(_r==="right"||_r)&&gr===jr.length?Va="right":Va=ua?ua.fixed:null;var La=(Ai={},(0,$e.Z)(Ai,Na,{className:"".concat(Ze,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,$e.Z)(Ai,"title",pn),(0,$e.Z)(Ai,"fixed",Va),(0,$e.Z)(Ai,"className","".concat(Ze,"-row-expand-icon-cell")),(0,$e.Z)(Ai,"width",Rr),(0,$e.Z)(Ai,"render",function(qa,Ga,Ko){var eo=nn(Ga,Ko),es=Jt.has(eo),ts=Ut?Ut(Ga):!0,Ra=Xn({prefixCls:Ze,expanded:es,expandable:ts,record:Ga,onExpand:Pn});return Mr?ce.createElement("span",{onClick:function(Io){return Io.stopPropagation()}},Ra):Ra}),Ai);return Ei.map(function(da){return da===fe?La:da})}return jr.filter(function(da){return da!==fe})},[Ct,jr,nn,Jt,Xn,Cr]),$i=ce.useMemo(function(){var Ai=ui;return Le&&(Ai=Le(Ai)),Ai.length||(Ai=[{render:function(){return null}}]),Ai},[Le,ui,Cr]),Ti=ce.useMemo(function(){return Cr==="rtl"?mi(Qr($i)):Qr($i)},[$i,Cr,Yr]),Ni=At(Ti,Yr),ca=(0,Re.Z)(Ni,2),Oa=ca[0],Ci=ca[1];return[$i,Oa,Ci]}var Si=ki;function Qi(we){var Le,Ze=we.prefixCls,nt=we.record,St=we.onExpand,Ct=we.expanded,Jt=we.expandable,pn="".concat(Ze,"-row-expand-icon");if(!Jt)return ce.createElement("span",{className:yt()(pn,"".concat(Ze,"-row-spaced"))});var nn=function(Xn){St(nt,Xn),Xn.stopPropagation()};return ce.createElement("span",{className:yt()(pn,(Le={},(0,$e.Z)(Le,"".concat(Ze,"-row-expanded"),Ct),(0,$e.Z)(Le,"".concat(Ze,"-row-collapsed"),!Ct),Le)),onClick:nn})}function aa(we,Le,Ze){var nt=[];function St(Ct){(Ct||[]).forEach(function(Jt,pn){nt.push(Le(Jt,pn)),St(Jt[Ze])})}return St(we),nt}function ba(we,Le,Ze){var nt=Ca(we),St=nt.expandIcon,Ct=nt.expandedRowKeys,Jt=nt.defaultExpandedRowKeys,pn=nt.defaultExpandAllRows,nn=nt.expandedRowRender,Pn=nt.onExpand,Xn=nt.onExpandedRowsChange,Ut=nt.childrenColumnName,gr=St||Qi,Cr=Ut||"children",Mr=ce.useMemo(function(){return nn?"row":we.expandable&&we.internalHooks===Te&&we.expandable.__PARENT_RENDER_ICON__||Le.some(function(Ti){return Ti&&(0,mt.Z)(Ti)==="object"&&Ti[Cr]})?"nest":!1},[!!nn,Le]),Rr=ce.useState(function(){return Jt||(pn?aa(Le,Ze,Cr):[])}),_r=(0,Re.Z)(Rr,2),Yr=_r[0],jr=_r[1],ui=ce.useMemo(function(){return new Set(Ct||Yr||[])},[Ct,Yr]),$i=ce.useCallback(function(Ti){var Ni=Ze(Ti,Le.indexOf(Ti)),ca,Oa=ui.has(Ni);Oa?(ui.delete(Ni),ca=(0,Ji.Z)(ui)):ca=[].concat((0,Ji.Z)(ui),[Ni]),jr(ca),Pn&&Pn(!Oa,Ti),Xn&&Xn(ca)},[Ze,ui,Le,Pn,Xn]);return[nt,Mr,ui,gr,Cr,$i]}function sn(we,Le,Ze,nt){var St=we.map(function(Ct,Jt){return Bt(Jt,Jt,we,Le,Ze,nt==null?void 0:nt[Jt])});return gn(function(){return St},[St],function(Ct,Jt){return!Qt(Ct,Jt)})}function bn(we){var Le=(0,ce.useRef)(we),Ze=(0,ce.useState)({}),nt=(0,Re.Z)(Ze,2),St=nt[1],Ct=(0,ce.useRef)(null),Jt=(0,ce.useRef)([]);function pn(nn){Jt.current.push(nn);var Pn=Promise.resolve();Ct.current=Pn,Pn.then(function(){if(Ct.current===Pn){var Xn=Jt.current,Ut=Le.current;Jt.current=[],Xn.forEach(function(gr){Le.current=gr(Le.current)}),Ct.current=null,Ut!==Le.current&&St({})}})}return(0,ce.useEffect)(function(){return function(){Ct.current=null}},[]),[Le.current,pn]}function Fn(we){var Le=(0,ce.useRef)(we||null),Ze=(0,ce.useRef)();function nt(){window.clearTimeout(Ze.current)}function St(Jt){Le.current=Jt,nt(),Ze.current=window.setTimeout(function(){Le.current=null,Ze.current=void 0},100)}function Ct(){return Le.current}return(0,ce.useEffect)(function(){return nt},[]),[St,Ct]}function he(){var we=ce.useState(-1),Le=(0,Re.Z)(we,2),Ze=Le[0],nt=Le[1],St=ce.useState(-1),Ct=(0,Re.Z)(St,2),Jt=Ct[0],pn=Ct[1],nn=ce.useCallback(function(Pn,Xn){nt(Pn),pn(Xn)},[]);return[Ze,Jt,nn]}var Pe=Xr()?window:null;function Fe(we,Le){var Ze=(0,mt.Z)(we)==="object"?we:{},nt=Ze.offsetHeader,St=nt===void 0?0:nt,Ct=Ze.offsetSummary,Jt=Ct===void 0?0:Ct,pn=Ze.offsetScroll,nn=pn===void 0?0:pn,Pn=Ze.getContainer,Xn=Pn===void 0?function(){return Pe}:Pn,Ut=Xn()||Pe;return ce.useMemo(function(){var gr=!!we;return{isSticky:gr,stickyClassName:gr?"".concat(Le,"-sticky-holder"):"",offsetHeader:St,offsetSummary:Jt,offsetScroll:nn,container:Ut}},[nn,St,Jt,Le,Ut])}function We(we,Le,Ze){var nt=(0,ce.useMemo)(function(){for(var St=[],Ct=[],Jt=0,pn=0,nn=0;nn<Le;nn+=1)if(Ze==="rtl"){Ct[nn]=pn,pn+=we[nn]||0;var Pn=Le-nn-1;St[Pn]=Jt,Jt+=we[Pn]||0}else{St[nn]=Jt,Jt+=we[nn]||0;var Xn=Le-nn-1;Ct[Xn]=pn,pn+=we[Xn]||0}return{left:St,right:Ct}},[we,Le,Ze]);return nt}var je=We;function et(we){var Le=we.className,Ze=we.children;return ce.createElement("div",{className:Le},Ze)}var tt=et;function kt(we,Le,Ze,nt){var St=ke.unstable_batchedUpdates?function(Jt){ke.unstable_batchedUpdates(Ze,Jt)}:Ze;return we!=null&&we.addEventListener&&we.addEventListener(Le,St,nt),{remove:function(){we!=null&&we.removeEventListener&&we.removeEventListener(Le,St,nt)}}}var Wt=/margin|padding|width|height|max|min|offset/,Sn={left:!0,top:!0},Nn={cssFloat:1,styleFloat:1,float:1};function En(we){return we.nodeType===1?we.ownerDocument.defaultView.getComputedStyle(we,null):{}}function cn(we,Le,Ze){if(Le=Le.toLowerCase(),Ze==="auto"){if(Le==="height")return we.offsetHeight;if(Le==="width")return we.offsetWidth}return Le in Sn||(Sn[Le]=Wt.test(Le)),Sn[Le]?parseFloat(Ze)||0:Ze}function un(we,Le){var Ze=arguments.length,nt=En(we);return Le=Nn[Le]?"cssFloat"in we.style?"cssFloat":"styleFloat":Le,Ze===1?nt:cn(we,Le,nt[Le]||we.style[Le])}function Gt(we,Le,Ze){var nt=arguments.length;if(Le=Nn[Le]?"cssFloat"in we.style?"cssFloat":"styleFloat":Le,nt===3)return typeof Ze=="number"&&Wt.test(Le)&&(Ze="".concat(Ze,"px")),we.style[Le]=Ze,Ze;for(var St in Le)Le.hasOwnProperty(St)&&Gt(we,St,Le[St]);return En(we)}function kn(we){return we===document.body?document.documentElement.clientWidth:we.offsetWidth}function ir(we){return we===document.body?window.innerHeight||document.documentElement.clientHeight:we.offsetHeight}function $n(){var we=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),Le=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:we,height:Le}}function Hn(){var we=document.documentElement.clientWidth,Le=window.innerHeight||document.documentElement.clientHeight;return{width:we,height:Le}}function Gn(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function ar(we){var Le=we.getBoundingClientRect(),Ze=document.documentElement;return{left:Le.left+(window.pageXOffset||Ze.scrollLeft)-(Ze.clientLeft||document.body.clientLeft||0),top:Le.top+(window.pageYOffset||Ze.scrollTop)-(Ze.clientTop||document.body.clientTop||0)}}var ur=function(Le,Ze){var nt,St,Ct=Le.scrollBodyRef,Jt=Le.onScroll,pn=Le.offsetScroll,nn=Le.container,Pn=Ae(Se,"prefixCls"),Xn=((nt=Ct.current)===null||nt===void 0?void 0:nt.scrollWidth)||0,Ut=((St=Ct.current)===null||St===void 0?void 0:St.clientWidth)||0,gr=Xn&&Ut*(Ut/Xn),Cr=ce.useRef(),Mr=bn({scrollLeft:0,isHiddenScrollBar:!1}),Rr=(0,Re.Z)(Mr,2),_r=Rr[0],Yr=Rr[1],jr=ce.useRef({delta:0,x:0}),ui=ce.useState(!1),$i=(0,Re.Z)(ui,2),Ti=$i[0],Ni=$i[1],ca=function(){Ni(!1)},Oa=function(Di){Di.persist(),jr.current.delta=Di.pageX-_r.scrollLeft,jr.current.x=0,Ni(!0),Di.preventDefault()},Ci=function(Di){var ua,Va=Di||((ua=window)===null||ua===void 0?void 0:ua.event),La=Va.buttons;if(!Ti||La===0){Ti&&Ni(!1);return}var da=jr.current.x+Di.pageX-jr.current.x-jr.current.delta;da<=0&&(da=0),da+gr>=Ut&&(da=Ut-gr),Jt({scrollLeft:da/Ut*(Xn+2)}),jr.current.x=Di.pageX},Ai=function(){if(Ct.current){var Di=ar(Ct.current).top,ua=Di+Ct.current.offsetHeight,Va=nn===window?document.documentElement.scrollTop+window.innerHeight:ar(nn).top+nn.clientHeight;ua-at()<=Va||Di>=Va-pn?Yr(function(La){return(0,ut.Z)((0,ut.Z)({},La),{},{isHiddenScrollBar:!0})}):Yr(function(La){return(0,ut.Z)((0,ut.Z)({},La),{},{isHiddenScrollBar:!1})})}},Ei=function(Di){Yr(function(ua){return(0,ut.Z)((0,ut.Z)({},ua),{},{scrollLeft:Di/Xn*Ut||0})})};return ce.useImperativeHandle(Ze,function(){return{setScrollLeft:Ei}}),ce.useEffect(function(){var qr=kt(document.body,"mouseup",ca,!1),Di=kt(document.body,"mousemove",Ci,!1);return Ai(),function(){qr.remove(),Di.remove()}},[gr,Ti]),ce.useEffect(function(){var qr=kt(nn,"scroll",Ai,!1),Di=kt(window,"resize",Ai,!1);return function(){qr.remove(),Di.remove()}},[nn]),ce.useEffect(function(){_r.isHiddenScrollBar||Yr(function(qr){var Di=Ct.current;return Di?(0,ut.Z)((0,ut.Z)({},qr),{},{scrollLeft:Di.scrollLeft/Di.scrollWidth*Di.clientWidth}):qr})},[_r.isHiddenScrollBar]),Xn<=Ut||!gr||_r.isHiddenScrollBar?null:ce.createElement("div",{style:{height:at(),width:Ut,bottom:pn},className:"".concat(Pn,"-sticky-scroll")},ce.createElement("div",{onMouseDown:Oa,ref:Cr,className:yt()("".concat(Pn,"-sticky-scroll-bar"),(0,$e.Z)({},"".concat(Pn,"-sticky-scroll-bar-active"),Ti)),style:{width:"".concat(gr,"px"),transform:"translate3d(".concat(_r.scrollLeft,"px, 0, 0)")}}))},Ve=ce.forwardRef(ur);function Je(we){return null}var Pt=Je;function _t(we){return null}var hn=_t,Dn="rc-table",An=[],or={};function Un(){return"No Data"}function Tn(we){var Le,Ze=(0,ut.Z)({rowKey:"key",prefixCls:Dn,emptyText:Un},we),nt=Ze.prefixCls,St=Ze.className,Ct=Ze.rowClassName,Jt=Ze.style,pn=Ze.data,nn=Ze.rowKey,Pn=Ze.scroll,Xn=Ze.tableLayout,Ut=Ze.direction,gr=Ze.title,Cr=Ze.footer,Mr=Ze.summary,Rr=Ze.caption,_r=Ze.id,Yr=Ze.showHeader,jr=Ze.components,ui=Ze.emptyText,$i=Ze.onRow,Ti=Ze.onHeaderRow,Ni=Ze.internalHooks,ca=Ze.transformColumns,Oa=Ze.internalRefs,Ci=Ze.tailor,Ai=Ze.sticky,Ei=pn||An,qr=!!Ei.length,Di=Ni===Te,ua=ce.useCallback(function($o,as){return Zn(jr,$o)||as},[jr]),Va=ce.useMemo(function(){return typeof nn=="function"?nn:function($o){var as=$o&&$o[nn];return as}},[nn]),La=ua(["body"]),da=he(),qa=(0,Re.Z)(da,3),Ga=qa[0],Ko=qa[1],eo=qa[2],es=ba(Ze,Ei,Va),ts=(0,Re.Z)(es,6),Ra=ts[0],Ls=ts[1],Io=ts[2],Wo=ts[3],Ro=ts[4],Aa=ts[5],yi=Pn==null?void 0:Pn.x,Gi=ce.useState(0),fa=(0,Re.Z)(Gi,2),Ii=fa[0],Do=fa[1],pi=Si((0,ut.Z)((0,ut.Z)((0,ut.Z)({},Ze),Ra),{},{expandable:!!Ra.expandedRowRender,columnTitle:Ra.columnTitle,expandedKeys:Io,getRowKey:Va,onTriggerExpand:Aa,expandIcon:Wo,expandIconColumnIndex:Ra.expandIconColumnIndex,direction:Ut,scrollWidth:Di&&Ci&&typeof yi=="number"?yi:null}),Di?ca:null),Da=(0,Re.Z)(pi,3),Lo=Da[0],xo=Da[1],ol=Da[2],Ts=ol!=null?ol:yi,El=ce.useMemo(function(){return{columns:Lo,flattenColumns:xo}},[Lo,xo]),Ir=ce.useRef(),Fl=ce.useRef(),Cs=ce.useRef(),fl=ce.useRef(),yl=ce.useRef(),To=ce.useState(!1),No=(0,Re.Z)(To,2),ns=No[0],Za=No[1],Rs=ce.useState(!1),to=(0,Re.Z)(Rs,2),As=to[0],Hs=to[1],Ws=bn(new Map),Ml=(0,Re.Z)(Ws,2),Es=Ml[0],kl=Ml[1],Ms=_n(xo),Zs=Ms.map(function($o){return Es.get($o)}),js=ce.useMemo(function(){return Zs},[Zs.join("_")]),ks=je(js,xo.length,Ut),ms=Pn&&Oe(Pn.y),ls=Pn&&Oe(Ts)||!!Ra.fixed,Xl=ls&&xo.some(function($o){var as=$o.fixed;return as}),Cc=ce.useRef(),hs=Fe(Ai,nt),sl=hs.isSticky,Du=hs.offsetHeader,Ec=hs.offsetSummary,fo=hs.offsetScroll,ta=hs.stickyClassName,Os=hs.container,Zo=ce.useMemo(function(){return Mr==null?void 0:Mr(Ei)},[Mr,Ei]),Us=(ms||sl)&&ce.isValidElement(Zo)&&Zo.type===Xt&&Zo.props.fixed,pr,_l,lc;ms&&(_l={overflowY:"scroll",maxHeight:Pn.y}),ls&&(pr={overflowX:"auto"},ms||(_l={overflowY:"hidden"}),lc={width:Ts===!0?"auto":Ts,minWidth:"100%"});var Pu=ce.useCallback(function($o,as){Qn(Ir.current)&&kl(function(Ol){if(Ol.get($o)!==as){var gc=new Map(Ol);return gc.set($o,as),gc}return Ol})},[]),id=Fn(null),cc=(0,Re.Z)(id,2),hu=cc[0],Td=cc[1];function Vs($o,as){as&&(typeof as=="function"?as($o):as.scrollLeft!==$o&&(as.scrollLeft=$o,as.scrollLeft!==$o&&setTimeout(function(){as.scrollLeft=$o},0)))}var Wl=cr(function($o){var as=$o.currentTarget,Ol=$o.scrollLeft,gc=Ut==="rtl",Bo=typeof Ol=="number"?Ol:as.scrollLeft,ld=as||or;if(!Td()||Td()===ld){var cd;hu(ld),Vs(Bo,Fl.current),Vs(Bo,Cs.current),Vs(Bo,yl.current),Vs(Bo,(cd=Cc.current)===null||cd===void 0?void 0:cd.setScrollLeft)}var kc=as||Fl.current;if(kc){var ud=kc.scrollWidth,Gc=kc.clientWidth;if(ud===Gc){Za(!1),Hs(!1);return}gc?(Za(-Bo<ud-Gc),Hs(-Bo>0)):(Za(Bo>0),Hs(Bo<ud-Gc))}}),pu=function(){ls&&Cs.current?Wl({currentTarget:Cs.current}):(Za(!1),Hs(!1))},Ou=function(as){var Ol=as.width;Ol!==Ii&&(pu(),Do(Ir.current?Ir.current.offsetWidth:Ol))},Ad=ce.useRef(!1);ce.useEffect(function(){Ad.current&&pu()},[ls,pn,Lo.length]),ce.useEffect(function(){Ad.current=!0},[]);var Id=ce.useState(0),Nu=(0,Re.Z)(Id,2),mu=Nu[0],Vc=Nu[1],bl=ce.useState(!0),pc=(0,Re.Z)(bl,2),ad=pc[0],od=pc[1];ce.useEffect(function(){(!Ci||!Di)&&(Cs.current instanceof Element?Vc(on(Cs.current).width):Vc(on(fl.current).width)),od(zt("position","sticky"))},[]),ce.useEffect(function(){Di&&Oa&&(Oa.body.current=Cs.current)});var Mc=ce.useCallback(function($o){return ce.createElement(ce.Fragment,null,ce.createElement(no,$o),Us==="top"&&ce.createElement(Yn,$o,Zo))},[Us,Zo]),Dd=ce.useCallback(function($o){return ce.createElement(Yn,$o,Zo)},[Zo]),gu=ua(["table"],"table"),Ru=ce.useMemo(function(){return Xn||(Xl?Ts==="max-content"?"auto":"fixed":ms||sl||xo.some(function($o){var as=$o.ellipsis;return as})?"fixed":"auto")},[ms,Xl,xo,Xn,sl]),sd,$u={colWidths:js,columCount:xo.length,stickyOffsets:ks,onHeaderRow:Ti,fixHeader:ms,scroll:Pn},$a=ce.useMemo(function(){return qr?null:typeof ui=="function"?ui():ui},[qr,ui]),Pd=ce.createElement(Vi,{data:Ei,measureColumnWidth:ms||ls||sl}),Bu=ce.createElement(_a,{colWidths:xo.map(function($o){var as=$o.width;return as}),columns:xo}),Yl=Rr!=null?ce.createElement("caption",{className:"".concat(nt,"-caption")},Rr):void 0,ac=yr(Ze,{data:!0}),mc=yr(Ze,{aria:!0});if(ms||sl){var vu;typeof La=="function"?(vu=La(Ei,{scrollbarSize:mu,ref:Cs,onScroll:Wl}),$u.colWidths=xo.map(function($o,as){var Ol=$o.width,gc=as===xo.length-1?Ol-mu:Ol;return typeof gc=="number"&&!Number.isNaN(gc)?gc:0})):vu=ce.createElement("div",{style:(0,ut.Z)((0,ut.Z)({},pr),_l),onScroll:Wl,ref:Cs,className:yt()("".concat(nt,"-body"))},ce.createElement(gu,(0,lt.Z)({style:(0,ut.Z)((0,ut.Z)({},lc),{},{tableLayout:Ru})},mc),Yl,Bu,Pd,!Us&&Zo&&ce.createElement(Yn,{stickyOffsets:ks,flattenColumns:xo,columns:Lo},Zo)));var Fu=(0,ut.Z)((0,ut.Z)((0,ut.Z)({noData:!Ei.length,maxContentScroll:ls&&Ts==="max-content"},$u),El),{},{direction:Ut,stickyClassName:ta,onScroll:Wl});sd=ce.createElement(ce.Fragment,null,Yr!==!1&&ce.createElement(po,(0,lt.Z)({},Fu,{stickyTopOffset:Du,className:"".concat(nt,"-header"),ref:Fl}),Mc),vu,Us&&Us!=="top"&&ce.createElement(po,(0,lt.Z)({},Fu,{stickyBottomOffset:Ec,className:"".concat(nt,"-summary"),ref:yl}),Dd),sl&&ce.createElement(Ve,{ref:Cc,offsetScroll:fo,scrollBodyRef:Cs,onScroll:Wl,container:Os}))}else sd=ce.createElement("div",{style:(0,ut.Z)((0,ut.Z)({},pr),_l),className:yt()("".concat(nt,"-content")),onScroll:Wl,ref:Cs},ce.createElement(gu,(0,lt.Z)({style:(0,ut.Z)((0,ut.Z)({},lc),{},{tableLayout:Ru})},mc),Yl,Bu,Yr!==!1&&ce.createElement(no,(0,lt.Z)({},$u,El)),Pd,Zo&&ce.createElement(Yn,{stickyOffsets:ks,flattenColumns:xo,columns:Lo},Zo)));var yu=ce.createElement("div",(0,lt.Z)({className:yt()(nt,St,(Le={},(0,$e.Z)(Le,"".concat(nt,"-rtl"),Ut==="rtl"),(0,$e.Z)(Le,"".concat(nt,"-ping-left"),ns),(0,$e.Z)(Le,"".concat(nt,"-ping-right"),As),(0,$e.Z)(Le,"".concat(nt,"-layout-fixed"),Xn==="fixed"),(0,$e.Z)(Le,"".concat(nt,"-fixed-header"),ms),(0,$e.Z)(Le,"".concat(nt,"-fixed-column"),Xl),(0,$e.Z)(Le,"".concat(nt,"-scroll-horizontal"),ls),(0,$e.Z)(Le,"".concat(nt,"-has-fix-left"),xo[0]&&xo[0].fixed),(0,$e.Z)(Le,"".concat(nt,"-has-fix-right"),xo[xo.length-1]&&xo[xo.length-1].fixed==="right"),Le)),style:Jt,id:_r,ref:Ir},ac),gr&&ce.createElement(tt,{className:"".concat(nt,"-title")},gr(Ei)),ce.createElement("div",{ref:fl,className:"".concat(nt,"-container")},sd),Cr&&ce.createElement(tt,{className:"".concat(nt,"-footer")},Cr(Ei)));ls&&(yu=ce.createElement(mr.Z,{onResize:Ou},yu));var Bc=sn(xo,ks,Ut,Lo),Od=ce.useMemo(function(){return{scrollX:Ts,prefixCls:nt,getComponent:ua,scrollbarSize:mu,direction:Ut,fixedInfoList:Bc,isSticky:sl,supportSticky:ad,componentWidth:Ii,fixHeader:ms,fixColumn:Xl,horizonScroll:ls,tableLayout:Ru,rowClassName:Ct,expandedRowClassName:Ra.expandedRowClassName,expandIcon:Wo,expandableType:Ls,expandRowByClick:Ra.expandRowByClick,expandedRowRender:Ra.expandedRowRender,onTriggerExpand:Aa,expandIconColumnIndex:Ra.expandIconColumnIndex,indentSize:Ra.indentSize,allColumnsFixedLeft:xo.every(function($o){return $o.fixed==="left"}),emptyNode:$a,columns:Lo,flattenColumns:xo,onColumnResize:Pu,hoverStartRow:Ga,hoverEndRow:Ko,onHover:eo,rowExpandable:Ra.rowExpandable,onRow:$i,getRowKey:Va,expandedKeys:Io,childrenColumnName:Ro}},[Ts,nt,ua,mu,Ut,Bc,sl,ad,Ii,ms,Xl,ls,Ru,Ct,Ra.expandedRowClassName,Wo,Ls,Ra.expandRowByClick,Ra.expandedRowRender,Aa,Ra.expandIconColumnIndex,Ra.indentSize,$a,Lo,xo,Pu,Ga,Ko,eo,Ra.rowExpandable,$i,Va,Io,Ro]);return ce.createElement(Se.Provider,{value:Od},yu)}function tr(we){return Dt(Tn,we)}var dr=tr();dr.EXPAND_COLUMN=fe,dr.INTERNAL_HOOKS=Te,dr.Column=Pt,dr.ColumnGroup=hn,dr.Summary=Rn;var Pr=dr,fr=ie(73299),Fr=ge(null),ri=ge(null);function Vr(we,Le,Ze){var nt=Le||1;return Ze[we+nt]-(Ze[we]||0)}function ii(we){var Le=we.rowInfo,Ze=we.column,nt=we.colIndex,St=we.indent,Ct=we.index,Jt=we.renderIndex,pn=we.record,nn=we.style,Pn=we.className,Xn=we.inverse,Ut=we.getHeight,gr=Ze.render,Cr=Ze.dataIndex,Mr=Ze.className,Rr=Ze.width,_r=Ae(ri,["columnsOffset"]),Yr=_r.columnsOffset,jr=Ui(Le,Ze,nt,St,Ct),ui=jr.key,$i=jr.fixedInfo,Ti=jr.appendCellNode,Ni=jr.additionalCellProps,ca=Ni.style,Oa=Ni.colSpan,Ci=Oa===void 0?1:Oa,Ai=Ni.rowSpan,Ei=Ai===void 0?1:Ai,qr=nt-1,Di=Vr(qr,Ci,Yr),ua=Ci>1?Rr-Di:0,Va=(0,ut.Z)((0,ut.Z)((0,ut.Z)({},ca),nn),{},{flex:"0 0 ".concat(Di,"px"),width:"".concat(Di,"px"),marginRight:ua,pointerEvents:"auto"}),La=ce.useMemo(function(){return Xn?Ei<=1:Ci===0||Ei===0||Ei>1},[Ei,Ci,Xn]);La?Va.visibility="hidden":Xn&&(Va.height=Ut==null?void 0:Ut(Ei));var da=La?function(){return null}:gr,qa={};return(Ei===0||Ci===0)&&(qa.rowSpan=1,qa.colSpan=1),ce.createElement(ft,(0,lt.Z)({className:yt()(Mr,Pn),ellipsis:Ze.ellipsis,align:Ze.align,scope:Ze.rowScope,component:"div",prefixCls:Le.prefixCls,key:ui,record:pn,index:Ct,renderIndex:Jt,dataIndex:Cr,render:da,shouldCellUpdate:Ze.shouldCellUpdate},$i,{appendNode:Ti,additionalProps:(0,ut.Z)((0,ut.Z)({},Ni),{},{style:Va},qa)}))}var Br=ii,Jr=["data","index","className","rowKey","style","extra","getHeight"],si=ce.forwardRef(function(we,Le){var Ze=we.data,nt=we.index,St=we.className,Ct=we.rowKey,Jt=we.style,pn=we.extra,nn=we.getHeight,Pn=(0,dn.Z)(we,Jr),Xn=Ze.record,Ut=Ze.indent,gr=Ze.index,Cr=Ae(Se,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Mr=Cr.scrollX,Rr=Cr.flattenColumns,_r=Cr.prefixCls,Yr=Cr.fixColumn,jr=Cr.componentWidth,ui=br(Xn,Ct,nt,Ut),$i=ui.rowSupportExpand,Ti=ui.expanded,Ni=ui.rowProps,ca=ui.expandedRowRender,Oa=ui.expandedRowClassName,Ci;if($i&&Ti){var Ai=ca(Xn,nt,Ut+1,Ti),Ei=Oa==null?void 0:Oa(Xn,nt,Ut),qr={};Yr&&(qr={style:(0,$e.Z)({},"--virtual-width","".concat(jr,"px"))});var Di="".concat(_r,"-expanded-row-cell");Ci=ce.createElement("div",{className:yt()("".concat(_r,"-expanded-row"),"".concat(_r,"-expanded-row-level-").concat(Ut+1),Ei)},ce.createElement(ft,{component:"div",prefixCls:_r,className:yt()(Di,(0,$e.Z)({},"".concat(Di,"-fixed"),Yr)),additionalProps:qr},Ai))}var ua=(0,ut.Z)((0,ut.Z)({},Jt),{},{width:Mr});pn&&(ua.position="absolute",ua.pointerEvents="none");var Va=ce.createElement("div",(0,lt.Z)({},Ni,Pn,{ref:$i?null:Le,className:yt()(St,"".concat(_r,"-row"),Ni==null?void 0:Ni.className,(0,$e.Z)({},"".concat(_r,"-row-extra"),pn)),style:(0,ut.Z)((0,ut.Z)({},ua),Ni==null?void 0:Ni.style)}),Rr.map(function(La,da){return ce.createElement(Br,{key:da,rowInfo:ui,column:La,colIndex:da,indent:Ut,index:nt,renderIndex:gr,record:Xn,inverse:pn,getHeight:nn})}));return $i?ce.createElement("div",{ref:Le},Va,Ci):Va}),_i=it(si),Hr=_i,Bi=ce.forwardRef(function(we,Le){var Ze=we.data,nt=we.onScroll,St=Ae(Se,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Ct=St.flattenColumns,Jt=St.onColumnResize,pn=St.getRowKey,nn=St.expandedKeys,Pn=St.prefixCls,Xn=St.childrenColumnName,Ut=St.emptyNode,gr=St.scrollX,Cr=Ae(Fr),Mr=Cr.scrollY,Rr=Cr.listItemHeight,_r=ce.useRef(),Yr=Dr(Ze,Xn,nn,pn),jr=ce.useMemo(function(){var Ci=0;return Ct.map(function(Ai){var Ei=Ai.width,qr=Ai.key;return Ci+=Ei,[qr,Ei,Ci]})},[Ct]),ui=ce.useMemo(function(){return jr.map(function(Ci){return Ci[2]})},[jr]);ce.useEffect(function(){jr.forEach(function(Ci){var Ai=(0,Re.Z)(Ci,2),Ei=Ai[0],qr=Ai[1];Jt(Ei,qr)})},[jr]),ce.useImperativeHandle(Le,function(){var Ci={};return Object.defineProperty(Ci,"scrollLeft",{get:function(){var Ei;return((Ei=_r.current)===null||Ei===void 0?void 0:Ei.getScrollInfo().x)||0},set:function(Ei){var qr;(qr=_r.current)===null||qr===void 0||qr.scrollTo({left:Ei})}}),Ci});var $i=function(Ai,Ei){var qr,Di=(qr=Yr[Ei])===null||qr===void 0?void 0:qr.record,ua=Ai.onCell;if(ua){var Va,La=ua(Di,Ei);return(Va=La==null?void 0:La.rowSpan)!==null&&Va!==void 0?Va:1}return 1},Ti=function(Ai){var Ei=Ai.start,qr=Ai.end,Di=Ai.getSize,ua=Ai.offsetY;if(qr<0)return null;for(var Va=Ct.filter(function(yi){return $i(yi,Ei)===0}),La=Ei,da=function(Gi){if(Va=Va.filter(function(fa){return $i(fa,Gi)===0}),!Va.length)return La=Gi,"break"},qa=Ei;qa>=0;qa-=1){var Ga=da(qa);if(Ga==="break")break}for(var Ko=Ct.filter(function(yi){return $i(yi,qr)!==1}),eo=qr,es=function(Gi){if(Ko=Ko.filter(function(fa){return $i(fa,Gi)!==1}),!Ko.length)return eo=Math.max(Gi-1,qr),"break"},ts=qr;ts<Yr.length;ts+=1){var Ra=es(ts);if(Ra==="break")break}for(var Ls=[],Io=function(Gi){var fa=Yr[Gi];if(!fa)return"continue";Ct.some(function(Ii){return $i(Ii,Gi)>1})&&Ls.push(Gi)},Wo=La;Wo<=eo;Wo+=1)var Ro=Io(Wo);var Aa=Ls.map(function(yi){var Gi=Yr[yi],fa=pn(Gi.record,yi),Ii=function(Da){var Lo=yi+Da-1,xo=pn(Yr[Lo].record,Lo),ol=Di(fa,xo);return ol.bottom-ol.top},Do=Di(fa);return ce.createElement(Hr,{key:yi,data:Gi,rowKey:fa,index:yi,style:{top:-ua+Do.top},extra:!0,getHeight:Ii})});return Aa},Ni=ce.useMemo(function(){return{columnsOffset:ui}},[ui]),ca="".concat(Pn,"-tbody"),Oa;return Yr.length?Oa=ce.createElement(fr.Z,{fullHeight:!1,ref:_r,className:yt()(ca,"".concat(ca,"-virtual")),height:Mr,itemHeight:Rr||24,data:Yr,itemKey:function(Ai){return pn(Ai.record)},scrollWidth:gr,onVirtualScroll:function(Ai){var Ei=Ai.x;nt({scrollLeft:Ei})},extraRender:Ti},function(Ci,Ai,Ei){var qr=pn(Ci.record,Ai);return ce.createElement(Hr,(0,lt.Z)({data:Ci,rowKey:qr,index:Ai},Ei))}):Oa=ce.createElement("div",{className:yt()("".concat(Pn,"-placeholder"))},ce.createElement(ft,{component:"div",prefixCls:Pn},Ut)),ce.createElement(ri.Provider,{value:Ni},Oa)}),zi=it(Bi),Ia=zi,ma=function(Le,Ze){var nt=Ze.ref,St=Ze.onScroll;return ce.createElement(Ia,{ref:nt,data:Le,onScroll:St})},qi=100;function Oi(we){var Le=we.columns,Ze=we.scroll,nt=we.prefixCls,St=nt===void 0?Dn:nt,Ct=we.className,Jt=we.listItemHeight,pn=Ze||{},nn=pn.x,Pn=pn.y;typeof nn!="number"&&(nn=((Le||[]).length+1)*qi),typeof Pn!="number"&&(Pn=500);var Xn=ce.useMemo(function(){return{scrollY:Pn,listItemHeight:Jt}},[Pn,Jt]);return ce.createElement(Fr.Provider,{value:Xn},ce.createElement(Pr,(0,lt.Z)({},we,{className:yt()(Ct,"".concat(St,"-virtual")),scroll:(0,ut.Z)((0,ut.Z)({},Ze),{},{x:nn}),components:{body:ma},columns:Le,internalHooks:Te,tailor:!0})))}function Ri(we){return Dt(Oi,we)}var xi=Ri(),ea=null;function wi(we){return null}var ci=wi;function Wi(we){return null}var ha=Wi,go=ie(10366),lo=ie(58375),Ua=ie(53124),Ba=ie(88258),Ea=ie(98675),ji=ie(25378),Ao=ie(24457),la=ie(28452),Li=ie(57953),xa=ie(29691);function Ya(we){return function(Ze){let{prefixCls:nt,onExpand:St,record:Ct,expanded:Jt,expandable:pn}=Ze;const nn=`${nt}-row-expand-icon`;return ce.createElement("button",{type:"button",onClick:Pn=>{St(Ct,Pn),Pn.stopPropagation()},className:yt()(nn,{[`${nn}-spaced`]:!pn,[`${nn}-expanded`]:pn&&Jt,[`${nn}-collapsed`]:pn&&!Jt}),"aria-label":Jt?we.collapse:we.expand,"aria-expanded":Jt})}}var Ma=Ya;function Ta(we,Le){return"key"in we&&we.key!==void 0&&we.key!==null?we.key:we.dataIndex?Array.isArray(we.dataIndex)?we.dataIndex.join("."):we.dataIndex:Le}function Ki(we,Le){return Le?`${Le}-${we}`:`${we}`}function Ja(we,Le){return typeof we=="function"?we(Le):we}function vo(we,Le){const Ze=Ja(we,Le);return Object.prototype.toString.call(Ze)==="[object Object]"?"":Ze}var ro={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},yo=ro,Mo=ie(84089),Xo=function(Le,Ze){return ce.createElement(Mo.Z,(0,lt.Z)({},Le,{ref:Ze,icon:yo}))},io=ce.forwardRef(Xo),So=ie(7699),os=ie(57838);function rs(we){const Le=ce.useRef(we),Ze=(0,os.Z)();return[()=>Le.current,nt=>{Le.current=nt,Ze()}]}var cs=ie(71577),Oo=ie(84567),bo=ie(85418),sa=ie(32983),Sa=ie(68508),Qa=ie(76529),co=ie(78045),jo=ie(79870),us=ie(72395),xs=ie(69677);function Js(we){let{value:Le,onChange:Ze,filterSearch:nt,tablePrefixCls:St,locale:Ct}=we;return nt?ce.createElement("div",{className:`${St}-filter-dropdown-search`},ce.createElement(xs.default,{prefix:ce.createElement(us.Z,null),placeholder:Ct.filterSearchPlaceholder,onChange:Ze,value:Le,htmlSize:1,className:`${St}-filter-dropdown-search-input`})):null}var Fs=Js,ds=ie(92389);const zs=we=>{const{keyCode:Le}=we;Le===ds.Z.ENTER&&we.stopPropagation()};var ga=ce.forwardRef((we,Le)=>ce.createElement("div",{className:we.className,onClick:Ze=>Ze.stopPropagation(),onKeyDown:zs,ref:Le},we.children));function so(we){let Le=[];return(we||[]).forEach(Ze=>{let{value:nt,children:St}=Ze;Le.push(nt),St&&(Le=[].concat((0,Ji.Z)(Le),(0,Ji.Z)(so(St))))}),Le}function ko(we){return we.some(Le=>{let{children:Ze}=Le;return Ze})}function fs(we,Le){return typeof Le=="string"||typeof Le=="number"?Le==null?void 0:Le.toString().toLowerCase().includes(we.trim().toLowerCase()):!1}function ss(we){let{filters:Le,prefixCls:Ze,filteredKeys:nt,filterMultiple:St,searchValue:Ct,filterSearch:Jt}=we;return Le.map((pn,nn)=>{const Pn=String(pn.value);if(pn.children)return{key:Pn||nn,label:pn.text,popupClassName:`${Ze}-dropdown-submenu`,children:ss({filters:pn.children,prefixCls:Ze,filteredKeys:nt,filterMultiple:St,searchValue:Ct,filterSearch:Jt})};const Xn=St?Oo.default:co.ZP,Ut={key:pn.value!==void 0?Pn:nn,label:ce.createElement(ce.Fragment,null,ce.createElement(Xn,{checked:nt.includes(Pn)}),ce.createElement("span",null,pn.text))};return Ct.trim()?typeof Jt=="function"?Jt(Ct,pn)?Ut:null:fs(Ct,pn.text)?Ut:null:Ut})}function $l(we){var Le,Ze;const{tablePrefixCls:nt,prefixCls:St,column:Ct,dropdownPrefixCls:Jt,columnKey:pn,filterMultiple:nn,filterMode:Pn="menu",filterSearch:Xn=!1,filterState:Ut,triggerFilter:gr,locale:Cr,children:Mr,getPopupContainer:Rr}=we,{filterDropdownOpen:_r,onFilterDropdownOpenChange:Yr,filterResetToDefaultFilteredValue:jr,defaultFilteredValue:ui,filterDropdownVisible:$i,onFilterDropdownVisibleChange:Ti}=Ct,[Ni,ca]=ce.useState(!1),Oa=!!(Ut&&(!((Le=Ut.filteredKeys)===null||Le===void 0)&&Le.length||Ut.forceFiltered)),Ci=pi=>{ca(pi),Yr==null||Yr(pi),Ti==null||Ti(pi)},Ai=(Ze=_r!=null?_r:$i)!==null&&Ze!==void 0?Ze:Ni,Ei=Ut==null?void 0:Ut.filteredKeys,[qr,Di]=rs(Ei||[]),ua=pi=>{let{selectedKeys:Da}=pi;Di(Da)},Va=(pi,Da)=>{let{node:Lo,checked:xo}=Da;ua(nn?{selectedKeys:pi}:{selectedKeys:xo&&Lo.key?[Lo.key]:[]})};ce.useEffect(()=>{Ni&&ua({selectedKeys:Ei||[]})},[Ei]);const[La,da]=ce.useState([]),qa=pi=>{da(pi)},[Ga,Ko]=ce.useState(""),eo=pi=>{const{value:Da}=pi.target;Ko(Da)};ce.useEffect(()=>{Ni||Ko("")},[Ni]);const es=pi=>{const Da=pi&&pi.length?pi:null;if(Da===null&&(!Ut||!Ut.filteredKeys)||(0,So.Z)(Da,Ut==null?void 0:Ut.filteredKeys,!0))return null;gr({column:Ct,key:pn,filteredKeys:Da})},ts=()=>{Ci(!1),es(qr())},Ra=function(){let{confirm:pi,closeDropdown:Da}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};pi&&es([]),Da&&Ci(!1),Ko(""),Di(jr?(ui||[]).map(Lo=>String(Lo)):[])},Ls=function(){let{closeDropdown:pi}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};pi&&Ci(!1),es(qr())},Io=pi=>{pi&&Ei!==void 0&&Di(Ei||[]),Ci(pi),!pi&&!Ct.filterDropdown&&ts()},Wo=yt()({[`${Jt}-menu-without-submenu`]:!ko(Ct.filters||[])}),Ro=pi=>{if(pi.target.checked){const Da=so(Ct==null?void 0:Ct.filters).map(Lo=>String(Lo));Di(Da)}else Di([])},Aa=pi=>{let{filters:Da}=pi;return(Da||[]).map((Lo,xo)=>{const ol=String(Lo.value),Ts={title:Lo.text,key:Lo.value!==void 0?ol:xo};return Lo.children&&(Ts.children=Aa({filters:Lo.children})),Ts})},yi=pi=>{var Da;return Object.assign(Object.assign({},pi),{text:pi.title,value:pi.key,children:((Da=pi.children)===null||Da===void 0?void 0:Da.map(Lo=>yi(Lo)))||[]})};let Gi;if(typeof Ct.filterDropdown=="function")Gi=Ct.filterDropdown({prefixCls:`${Jt}-custom`,setSelectedKeys:pi=>ua({selectedKeys:pi}),selectedKeys:qr(),confirm:Ls,clearFilters:Ra,filters:Ct.filters,visible:Ai,close:()=>{Ci(!1)}});else if(Ct.filterDropdown)Gi=Ct.filterDropdown;else{const pi=qr()||[],Da=()=>(Ct.filters||[]).length===0?ce.createElement(sa.Z,{image:sa.Z.PRESENTED_IMAGE_SIMPLE,description:Cr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Pn==="tree"?ce.createElement(ce.Fragment,null,ce.createElement(Fs,{filterSearch:Xn,value:Ga,onChange:eo,tablePrefixCls:nt,locale:Cr}),ce.createElement("div",{className:`${nt}-filter-dropdown-tree`},nn?ce.createElement(Oo.default,{checked:pi.length===so(Ct.filters).length,indeterminate:pi.length>0&&pi.length<so(Ct.filters).length,className:`${nt}-filter-dropdown-checkall`,onChange:Ro},Cr.filterCheckall):null,ce.createElement(jo.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:nn,checkStrictly:!nn,className:`${Jt}-menu`,onCheck:Va,checkedKeys:pi,selectedKeys:pi,showIcon:!1,treeData:Aa({filters:Ct.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ga.trim()?xo=>typeof Xn=="function"?Xn(Ga,yi(xo)):fs(Ga,xo.title):void 0}))):ce.createElement(ce.Fragment,null,ce.createElement(Fs,{filterSearch:Xn,value:Ga,onChange:eo,tablePrefixCls:nt,locale:Cr}),ce.createElement(Sa.default,{selectable:!0,multiple:nn,prefixCls:`${Jt}-menu`,className:Wo,onSelect:ua,onDeselect:ua,selectedKeys:pi,getPopupContainer:Rr,openKeys:La,onOpenChange:qa,items:ss({filters:Ct.filters||[],filterSearch:Xn,prefixCls:St,filteredKeys:qr(),filterMultiple:nn,searchValue:Ga})})),Lo=()=>jr?(0,So.Z)((ui||[]).map(xo=>String(xo)),pi,!0):pi.length===0;Gi=ce.createElement(ce.Fragment,null,Da(),ce.createElement("div",{className:`${St}-dropdown-btns`},ce.createElement(cs.ZP,{type:"link",size:"small",disabled:Lo(),onClick:()=>Ra()},Cr.filterReset),ce.createElement(cs.ZP,{type:"primary",size:"small",onClick:ts},Cr.filterConfirm)))}Ct.filterDropdown&&(Gi=ce.createElement(Qa.J,{selectable:void 0},Gi));const fa=()=>ce.createElement(ga,{className:`${St}-dropdown`},Gi);let Ii;typeof Ct.filterIcon=="function"?Ii=Ct.filterIcon(Oa):Ct.filterIcon?Ii=Ct.filterIcon:Ii=ce.createElement(io,null);const{direction:Do}=ce.useContext(Ua.E_);return ce.createElement("div",{className:`${St}-column`},ce.createElement("span",{className:`${nt}-column-title`},Mr),ce.createElement(bo.Z,{dropdownRender:fa,trigger:["click"],open:Ai,onOpenChange:Io,getPopupContainer:Rr,placement:Do==="rtl"?"bottomLeft":"bottomRight"},ce.createElement("span",{role:"button",tabIndex:-1,className:yt()(`${St}-trigger`,{active:Oa}),onClick:pi=>{pi.stopPropagation()}},Ii)))}var ml=$l;function Sl(we,Le,Ze){let nt=[];return(we||[]).forEach((St,Ct)=>{var Jt;const pn=Ki(Ct,Ze);if(St.filters||"filterDropdown"in St||"onFilter"in St)if("filteredValue"in St){let nn=St.filteredValue;"filterDropdown"in St||(nn=(Jt=nn==null?void 0:nn.map(String))!==null&&Jt!==void 0?Jt:nn),nt.push({column:St,key:Ta(St,pn),filteredKeys:nn,forceFiltered:St.filtered})}else nt.push({column:St,key:Ta(St,pn),filteredKeys:Le&&St.defaultFilteredValue?St.defaultFilteredValue:void 0,forceFiltered:St.filtered});"children"in St&&(nt=[].concat((0,Ji.Z)(nt),(0,Ji.Z)(Sl(St.children,Le,pn))))}),nt}function Ka(we,Le,Ze,nt,St,Ct,Jt,pn){return Ze.map((nn,Pn)=>{const Xn=Ki(Pn,pn),{filterMultiple:Ut=!0,filterMode:gr,filterSearch:Cr}=nn;let Mr=nn;if(Mr.filters||Mr.filterDropdown){const Rr=Ta(Mr,Xn),_r=nt.find(Yr=>{let{key:jr}=Yr;return Rr===jr});Mr=Object.assign(Object.assign({},Mr),{title:Yr=>ce.createElement(ml,{tablePrefixCls:we,prefixCls:`${we}-filter`,dropdownPrefixCls:Le,column:Mr,columnKey:Rr,filterState:_r,filterMultiple:Ut,filterMode:gr,filterSearch:Cr,triggerFilter:Ct,locale:St,getPopupContainer:Jt},Ja(nn.title,Yr))})}return"children"in Mr&&(Mr=Object.assign(Object.assign({},Mr),{children:Ka(we,Le,Mr.children,nt,St,Ct,Jt,Xn)})),Mr})}function ei(we){const Le={};return we.forEach(Ze=>{let{key:nt,filteredKeys:St,column:Ct}=Ze;const{filters:Jt,filterDropdown:pn}=Ct;if(pn)Le[nt]=St||null;else if(Array.isArray(St)){const nn=so(Jt);Le[nt]=nn.filter(Pn=>St.includes(String(Pn)))}else Le[nt]=null}),Le}function Xi(we,Le){return Le.reduce((Ze,nt)=>{const{column:{onFilter:St,filters:Ct},filteredKeys:Jt}=nt;return St&&Jt&&Jt.length?Ze.filter(pn=>Jt.some(nn=>{const Pn=so(Ct),Xn=Pn.findIndex(gr=>String(gr)===String(nn)),Ut=Xn!==-1?Pn[Xn]:nn;return St(Ut,pn)})):Ze},we)}const Yi=we=>we.flatMap(Le=>"children"in Le?[Le].concat((0,Ji.Z)(Yi(Le.children||[]))):[Le]);function pa(we){let{prefixCls:Le,dropdownPrefixCls:Ze,mergedColumns:nt,onFilterChange:St,getPopupContainer:Ct,locale:Jt}=we;const pn=ce.useMemo(()=>Yi(nt||[]),[nt]),[nn,Pn]=ce.useState(()=>Sl(pn,!0)),Xn=ce.useMemo(()=>{const Mr=Sl(pn,!1);if(Mr.length===0)return Mr;let Rr=!0,_r=!0;if(Mr.forEach(Yr=>{let{filteredKeys:jr}=Yr;jr!==void 0?Rr=!1:_r=!1}),Rr){const Yr=(pn||[]).map((jr,ui)=>Ta(jr,Ki(ui)));return nn.filter(jr=>{let{key:ui}=jr;return Yr.includes(ui)}).map(jr=>{const ui=pn[Yr.findIndex($i=>$i===jr.key)];return Object.assign(Object.assign({},jr),{column:Object.assign(Object.assign({},jr.column),ui),forceFiltered:ui.filtered})})}return Mr},[pn,nn]),Ut=ce.useMemo(()=>ei(Xn),[Xn]),gr=Mr=>{const Rr=Xn.filter(_r=>{let{key:Yr}=_r;return Yr!==Mr.key});Rr.push(Mr),Pn(Rr),St(ei(Rr),Rr)};return[Mr=>Ka(Le,Ze,Mr,Xn,Jt,gr,Ct),Xn,Ut]}var Uo=pa;function Yo(we,Le,Ze){const nt=ce.useRef({});function St(Ct){if(!nt.current||nt.current.data!==we||nt.current.childrenColumnName!==Le||nt.current.getRowKey!==Ze){let pn=function(nn){nn.forEach((Pn,Xn)=>{const Ut=Ze(Pn,Xn);Jt.set(Ut,Pn),Pn&&typeof Pn=="object"&&Le in Pn&&pn(Pn[Le]||[])})};const Jt=new Map;pn(we),nt.current={data:we,childrenColumnName:Le,kvMap:Jt,getRowKey:Ze}}return nt.current.kvMap.get(Ct)}return[St]}var rl=ie(38780),ul=function(we,Le){var Ze={};for(var nt in we)Object.prototype.hasOwnProperty.call(we,nt)&&Le.indexOf(nt)<0&&(Ze[nt]=we[nt]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var St=0,nt=Object.getOwnPropertySymbols(we);St<nt.length;St++)Le.indexOf(nt[St])<0&&Object.prototype.propertyIsEnumerable.call(we,nt[St])&&(Ze[nt[St]]=we[nt[St]]);return Ze};const wl=10;function uo(we,Le){const Ze={current:we.current,pageSize:we.pageSize};return Object.keys(Le&&typeof Le=="object"?Le:{}).forEach(St=>{const Ct=we[St];typeof Ct!="function"&&(Ze[St]=Ct)}),Ze}function Qs(we,Le,Ze){const nt=Ze&&typeof Ze=="object"?Ze:{},{total:St=0}=nt,Ct=ul(nt,["total"]),[Jt,pn]=(0,ce.useState)(()=>({current:"defaultCurrent"in Ct?Ct.defaultCurrent:1,pageSize:"defaultPageSize"in Ct?Ct.defaultPageSize:wl})),nn=(0,rl.Z)(Jt,Ct,{total:St>0?St:we}),Pn=Math.ceil((St||we)/nn.pageSize);nn.current>Pn&&(nn.current=Pn||1);const Xn=(gr,Cr)=>{pn({current:gr!=null?gr:1,pageSize:Cr||nn.pageSize})},Ut=(gr,Cr)=>{var Mr;Ze&&((Mr=Ze.onChange)===null||Mr===void 0||Mr.call(Ze,gr,Cr)),Xn(gr,Cr),Le(gr,Cr||(nn==null?void 0:nn.pageSize))};return Ze===!1?[{},()=>{}]:[Object.assign(Object.assign({},nn),{onChange:Ut}),Xn]}var Pl=Qs,Sc=ie(42922),Vl=ie(29873),Cl=ie(97153),il=ie(83898),ql=ie(5663);const dl={},ec="SELECT_ALL",is="SELECT_INVERT",wo="SELECT_NONE",qo=[],Ss=(we,Le)=>{let Ze=[];return(Le||[]).forEach(nt=>{Ze.push(nt),nt&&typeof nt=="object"&&we in nt&&(Ze=[].concat((0,Ji.Z)(Ze),(0,Ji.Z)(Ss(we,nt[we]))))}),Ze};var al=(we,Le)=>{const{preserveSelectedRowKeys:Ze,selectedRowKeys:nt,defaultSelectedRowKeys:St,getCheckboxProps:Ct,onChange:Jt,onSelect:pn,onSelectAll:nn,onSelectInvert:Pn,onSelectNone:Xn,onSelectMultiple:Ut,columnWidth:gr,type:Cr,selections:Mr,fixed:Rr,renderCell:_r,hideSelectAll:Yr,checkStrictly:jr=!0}=Le||{},{prefixCls:ui,data:$i,pageData:Ti,getRecordByKey:Ni,getRowKey:ca,expandType:Oa,childrenColumnName:Ci,locale:Ai,getPopupContainer:Ei}=we,[qr,Di]=(0,ql.Z)(nt||St||qo,{value:nt}),ua=ce.useRef(new Map),Va=(0,ce.useCallback)(yi=>{if(Ze){const Gi=new Map;yi.forEach(fa=>{let Ii=Ni(fa);!Ii&&ua.current.has(fa)&&(Ii=ua.current.get(fa)),Gi.set(fa,Ii)}),ua.current=Gi}},[Ni,Ze]);ce.useEffect(()=>{Va(qr)},[qr]);const{keyEntities:La}=(0,ce.useMemo)(()=>{if(jr)return{keyEntities:null};let yi=$i;if(Ze){const Gi=new Set($i.map((Ii,Do)=>ca(Ii,Do))),fa=Array.from(ua.current).reduce((Ii,Do)=>{let[pi,Da]=Do;return Gi.has(pi)?Ii:Ii.concat(Da)},[]);yi=[].concat((0,Ji.Z)(yi),(0,Ji.Z)(fa))}return(0,il.I8)(yi,{externalGetKey:ca,childrenPropName:Ci})},[$i,ca,jr,Ci,Ze]),da=(0,ce.useMemo)(()=>Ss(Ci,Ti),[Ci,Ti]),qa=(0,ce.useMemo)(()=>{const yi=new Map;return da.forEach((Gi,fa)=>{const Ii=ca(Gi,fa),Do=(Ct?Ct(Gi):null)||{};yi.set(Ii,Do)}),yi},[da,ca,Ct]),Ga=(0,ce.useCallback)(yi=>{var Gi;return!!(!((Gi=qa.get(ca(yi)))===null||Gi===void 0)&&Gi.disabled)},[qa,ca]),[Ko,eo]=(0,ce.useMemo)(()=>{if(jr)return[qr||[],[]];const{checkedKeys:yi,halfCheckedKeys:Gi}=(0,Cl.S)(qr,!0,La,Ga);return[yi||[],Gi]},[qr,jr,La,Ga]),es=(0,ce.useMemo)(()=>{const yi=Cr==="radio"?Ko.slice(0,1):Ko;return new Set(yi)},[Ko,Cr]),ts=(0,ce.useMemo)(()=>Cr==="radio"?new Set:new Set(eo),[eo,Cr]),[Ra,Ls]=(0,ce.useState)(null);ce.useEffect(()=>{Le||Di(qo)},[!!Le]);const Io=(0,ce.useCallback)((yi,Gi)=>{let fa,Ii;Va(yi),Ze?(fa=yi,Ii=yi.map(Do=>ua.current.get(Do))):(fa=[],Ii=[],yi.forEach(Do=>{const pi=Ni(Do);pi!==void 0&&(fa.push(Do),Ii.push(pi))})),Di(fa),Jt==null||Jt(fa,Ii,{type:Gi})},[Di,Ni,Jt,Ze]),Wo=(0,ce.useCallback)((yi,Gi,fa,Ii)=>{if(pn){const Do=fa.map(pi=>Ni(pi));pn(Ni(yi),Gi,Do,Ii)}Io(fa,"single")},[pn,Ni,Io]),Ro=(0,ce.useMemo)(()=>!Mr||Yr?null:(Mr===!0?[ec,is,wo]:Mr).map(Gi=>Gi===ec?{key:"all",text:Ai.selectionAll,onSelect(){Io($i.map((fa,Ii)=>ca(fa,Ii)).filter(fa=>{const Ii=qa.get(fa);return!(Ii!=null&&Ii.disabled)||es.has(fa)}),"all")}}:Gi===is?{key:"invert",text:Ai.selectInvert,onSelect(){const fa=new Set(es);Ti.forEach((Do,pi)=>{const Da=ca(Do,pi),Lo=qa.get(Da);Lo!=null&&Lo.disabled||(fa.has(Da)?fa.delete(Da):fa.add(Da))});const Ii=Array.from(fa);Pn&&Pn(Ii),Io(Ii,"invert")}}:Gi===wo?{key:"none",text:Ai.selectNone,onSelect(){Xn==null||Xn(),Io(Array.from(es).filter(fa=>{const Ii=qa.get(fa);return Ii==null?void 0:Ii.disabled}),"none")}}:Gi).map(Gi=>Object.assign(Object.assign({},Gi),{onSelect:function(){for(var fa,Ii,Do=arguments.length,pi=new Array(Do),Da=0;Da<Do;Da++)pi[Da]=arguments[Da];(Ii=Gi.onSelect)===null||Ii===void 0||(fa=Ii).call.apply(fa,[Gi].concat(pi)),Ls(null)}})),[Mr,es,Ti,ca,Pn,Io]);return[(0,ce.useCallback)(yi=>{var Gi;if(!Le)return yi.filter(To=>To!==dl);let fa=(0,Ji.Z)(yi);const Ii=new Set(es),Do=da.map(ca).filter(To=>!qa.get(To).disabled),pi=Do.every(To=>Ii.has(To)),Da=Do.some(To=>Ii.has(To)),Lo=()=>{const To=[];pi?Do.forEach(ns=>{Ii.delete(ns),To.push(ns)}):Do.forEach(ns=>{Ii.has(ns)||(Ii.add(ns),To.push(ns))});const No=Array.from(Ii);nn==null||nn(!pi,No.map(ns=>Ni(ns)),To.map(ns=>Ni(ns))),Io(No,"all"),Ls(null)};let xo;if(Cr!=="radio"){let To;if(Ro){const to={getPopupContainer:Ei,items:Ro.map((As,Hs)=>{const{key:Ws,text:Ml,onSelect:Es}=As;return{key:Ws!=null?Ws:Hs,onClick:()=>{Es==null||Es(Do)},label:Ml}})};To=ce.createElement("div",{className:`${ui}-selection-extra`},ce.createElement(bo.Z,{menu:to,getPopupContainer:Ei},ce.createElement("span",null,ce.createElement(Sc.Z,null))))}const No=da.map((to,As)=>{const Hs=ca(to,As),Ws=qa.get(Hs)||{};return Object.assign({checked:Ii.has(Hs)},Ws)}).filter(to=>{let{disabled:As}=to;return As}),ns=!!No.length&&No.length===da.length,Za=ns&&No.every(to=>{let{checked:As}=to;return As}),Rs=ns&&No.some(to=>{let{checked:As}=to;return As});xo=!Yr&&ce.createElement("div",{className:`${ui}-selection`},ce.createElement(Oo.default,{checked:ns?Za:!!da.length&&pi,indeterminate:ns?!Za&&Rs:!pi&&Da,onChange:Lo,disabled:da.length===0||ns,"aria-label":To?"Custom selection":"Select all",skipGroup:!0}),To)}let ol;Cr==="radio"?ol=(To,No,ns)=>{const Za=ca(No,ns),Rs=Ii.has(Za);return{node:ce.createElement(co.ZP,Object.assign({},qa.get(Za),{checked:Rs,onClick:to=>to.stopPropagation(),onChange:to=>{Ii.has(Za)||Wo(Za,!0,[Za],to.nativeEvent)}})),checked:Rs}}:ol=(To,No,ns)=>{var Za;const Rs=ca(No,ns),to=Ii.has(Rs),As=ts.has(Rs),Hs=qa.get(Rs);let Ws;return Oa==="nest"?Ws=As:Ws=(Za=Hs==null?void 0:Hs.indeterminate)!==null&&Za!==void 0?Za:As,{node:ce.createElement(Oo.default,Object.assign({},Hs,{indeterminate:Ws,checked:to,skipGroup:!0,onClick:Ml=>Ml.stopPropagation(),onChange:Ml=>{let{nativeEvent:Es}=Ml;const{shiftKey:kl}=Es;let Ms=-1,Zs=-1;if(kl&&jr){const js=new Set([Ra,Rs]);Do.some((ks,ms)=>{if(js.has(ks))if(Ms===-1)Ms=ms;else return Zs=ms,!0;return!1})}if(Zs!==-1&&Ms!==Zs&&jr){const js=Do.slice(Ms,Zs+1),ks=[];to?js.forEach(ls=>{Ii.has(ls)&&(ks.push(ls),Ii.delete(ls))}):js.forEach(ls=>{Ii.has(ls)||(ks.push(ls),Ii.add(ls))});const ms=Array.from(Ii);Ut==null||Ut(!to,ms.map(ls=>Ni(ls)),ks.map(ls=>Ni(ls))),Io(ms,"multiple")}else{const js=Ko;if(jr){const ks=to?(0,Vl._5)(js,Rs):(0,Vl.L0)(js,Rs);Wo(Rs,!to,ks,Es)}else{const ks=(0,Cl.S)([].concat((0,Ji.Z)(js),[Rs]),!0,La,Ga),{checkedKeys:ms,halfCheckedKeys:ls}=ks;let Xl=ms;if(to){const Cc=new Set(ms);Cc.delete(Rs),Xl=(0,Cl.S)(Array.from(Cc),{checked:!1,halfCheckedKeys:ls},La,Ga).checkedKeys}Wo(Rs,!to,Xl,Es)}}Ls(to?null:Rs)}})),checked:to}};const Ts=(To,No,ns)=>{const{node:Za,checked:Rs}=ol(To,No,ns);return _r?_r(Rs,No,ns,Za):Za};if(!fa.includes(dl))if(fa.findIndex(To=>{var No;return((No=To[Na])===null||No===void 0?void 0:No.columnType)==="EXPAND_COLUMN"})===0){const[To,...No]=fa;fa=[To,dl].concat((0,Ji.Z)(No))}else fa=[dl].concat((0,Ji.Z)(fa));const El=fa.indexOf(dl);fa=fa.filter((To,No)=>To!==dl||No===El);const Ir=fa[El-1],Fl=fa[El+1];let Cs=Rr;Cs===void 0&&((Fl==null?void 0:Fl.fixed)!==void 0?Cs=Fl.fixed:(Ir==null?void 0:Ir.fixed)!==void 0&&(Cs=Ir.fixed)),Cs&&Ir&&((Gi=Ir[Na])===null||Gi===void 0?void 0:Gi.columnType)==="EXPAND_COLUMN"&&Ir.fixed===void 0&&(Ir.fixed=Cs);const fl=yt()(`${ui}-selection-col`,{[`${ui}-selection-col-with-dropdown`]:Mr&&Cr==="checkbox"}),yl={fixed:Cs,width:gr,className:`${ui}-selection-column`,title:Le.columnTitle||xo,render:Ts,onCell:Le.onCell,[Na]:{className:fl}};return fa.map(To=>To===dl?yl:To)},[ca,da,Le,Ko,es,ts,gr,Ro,Oa,Ra,qa,Ut,Wo,Ga]),es]},Ps=ie(33463),zl=ie(28575),Wc=ie(83062);const fc="ascend",Dc="descend";function Pc(we){return typeof we.sorter=="object"&&typeof we.sorter.multiple=="number"?we.sorter.multiple:!1}function tc(we){return typeof we=="function"?we:we&&typeof we=="object"&&we.compare?we.compare:!1}function nc(we,Le){return Le?we[we.indexOf(Le)+1]:we[0]}function Oc(we,Le,Ze){let nt=[];function St(Ct,Jt){nt.push({column:Ct,key:Ta(Ct,Jt),multiplePriority:Pc(Ct),sortOrder:Ct.sortOrder})}return(we||[]).forEach((Ct,Jt)=>{const pn=Ki(Jt,Ze);Ct.children?("sortOrder"in Ct&&St(Ct,pn),nt=[].concat((0,Ji.Z)(nt),(0,Ji.Z)(Oc(Ct.children,Le,pn)))):Ct.sorter&&("sortOrder"in Ct?St(Ct,pn):Le&&Ct.defaultSortOrder&&nt.push({column:Ct,key:Ta(Ct,pn),multiplePriority:Pc(Ct),sortOrder:Ct.defaultSortOrder}))}),nt}function Nc(we,Le,Ze,nt,St,Ct,Jt,pn){return(Le||[]).map((nn,Pn)=>{const Xn=Ki(Pn,pn);let Ut=nn;if(Ut.sorter){const gr=Ut.sortDirections||St,Cr=Ut.showSorterTooltip===void 0?Jt:Ut.showSorterTooltip,Mr=Ta(Ut,Xn),Rr=Ze.find(Oa=>{let{key:Ci}=Oa;return Ci===Mr}),_r=Rr?Rr.sortOrder:null,Yr=nc(gr,_r);let jr;if(nn.sortIcon)jr=nn.sortIcon({sortOrder:_r});else{const Oa=gr.includes(fc)&&ce.createElement(zl.Z,{className:yt()(`${we}-column-sorter-up`,{active:_r===fc})}),Ci=gr.includes(Dc)&&ce.createElement(Ps.Z,{className:yt()(`${we}-column-sorter-down`,{active:_r===Dc})});jr=ce.createElement("span",{className:yt()(`${we}-column-sorter`,{[`${we}-column-sorter-full`]:!!(Oa&&Ci)})},ce.createElement("span",{className:`${we}-column-sorter-inner`,"aria-hidden":"true"},Oa,Ci))}const{cancelSort:ui,triggerAsc:$i,triggerDesc:Ti}=Ct||{};let Ni=ui;Yr===Dc?Ni=Ti:Yr===fc&&(Ni=$i);const ca=typeof Cr=="object"?Cr:{title:Ni};Ut=Object.assign(Object.assign({},Ut),{className:yt()(Ut.className,{[`${we}-column-sort`]:_r}),title:Oa=>{const Ci=ce.createElement("div",{className:`${we}-column-sorters`},ce.createElement("span",{className:`${we}-column-title`},Ja(nn.title,Oa)),jr);return Cr?ce.createElement(Wc.Z,Object.assign({},ca),Ci):Ci},onHeaderCell:Oa=>{const Ci=nn.onHeaderCell&&nn.onHeaderCell(Oa)||{},Ai=Ci.onClick,Ei=Ci.onKeyDown;Ci.onClick=ua=>{nt({column:nn,key:Mr,sortOrder:Yr,multiplePriority:Pc(nn)}),Ai==null||Ai(ua)},Ci.onKeyDown=ua=>{ua.keyCode===ds.Z.ENTER&&(nt({column:nn,key:Mr,sortOrder:Yr,multiplePriority:Pc(nn)}),Ei==null||Ei(ua))};const qr=vo(nn.title,{}),Di=qr==null?void 0:qr.toString();return _r?Ci["aria-sort"]=_r==="ascend"?"ascending":"descending":Ci["aria-label"]=Di||"",Ci.className=yt()(Ci.className,`${we}-column-has-sorters`),Ci.tabIndex=0,nn.ellipsis&&(Ci.title=(qr!=null?qr:"").toString()),Ci}})}return"children"in Ut&&(Ut=Object.assign(Object.assign({},Ut),{children:Nc(we,Ut.children,Ze,nt,St,Ct,Jt,Xn)})),Ut})}function _o(we){const{column:Le,sortOrder:Ze}=we;return{column:Le,order:Ze,field:Le.dataIndex,columnKey:Le.key}}function ao(we){const Le=we.filter(Ze=>{let{sortOrder:nt}=Ze;return nt}).map(_o);return Le.length===0&&we.length?Object.assign(Object.assign({},_o(we[we.length-1])),{column:void 0}):Le.length<=1?Le[0]||{}:Le}function Ks(we,Le,Ze){const nt=Le.slice().sort((Jt,pn)=>pn.multiplePriority-Jt.multiplePriority),St=we.slice(),Ct=nt.filter(Jt=>{let{column:{sorter:pn},sortOrder:nn}=Jt;return tc(pn)&&nn});return Ct.length?St.sort((Jt,pn)=>{for(let nn=0;nn<Ct.length;nn+=1){const Pn=Ct[nn],{column:{sorter:Xn},sortOrder:Ut}=Pn,gr=tc(Xn);if(gr&&Ut){const Cr=gr(Jt,pn,Ut);if(Cr!==0)return Ut===fc?Cr:-Cr}}return 0}).map(Jt=>{const pn=Jt[Ze];return pn?Object.assign(Object.assign({},Jt),{[Ze]:Ks(pn,Le,Ze)}):Jt}):St}function gl(we){let{prefixCls:Le,mergedColumns:Ze,onSorterChange:nt,sortDirections:St,tableLocale:Ct,showSorterTooltip:Jt}=we;const[pn,nn]=ce.useState(Oc(Ze,!0)),Pn=ce.useMemo(()=>{let Mr=!0;const Rr=Oc(Ze,!1);if(!Rr.length)return pn;const _r=[];function Yr(ui){Mr?_r.push(ui):_r.push(Object.assign(Object.assign({},ui),{sortOrder:null}))}let jr=null;return Rr.forEach(ui=>{jr===null?(Yr(ui),ui.sortOrder&&(ui.multiplePriority===!1?Mr=!1:jr=!0)):(jr&&ui.multiplePriority!==!1||(Mr=!1),Yr(ui))}),_r},[Ze,pn]),Xn=ce.useMemo(()=>{const Mr=Pn.map(Rr=>{let{column:_r,sortOrder:Yr}=Rr;return{column:_r,order:Yr}});return{sortColumns:Mr,sortColumn:Mr[0]&&Mr[0].column,sortOrder:Mr[0]&&Mr[0].order}},[Pn]);function Ut(Mr){let Rr;Mr.multiplePriority===!1||!Pn.length||Pn[0].multiplePriority===!1?Rr=[Mr]:Rr=[].concat((0,Ji.Z)(Pn.filter(_r=>{let{key:Yr}=_r;return Yr!==Mr.key})),[Mr]),nn(Rr),nt(ao(Rr),Rr)}return[Mr=>Nc(Le,Mr,Pn,Ut,St,Ct,Jt),Pn,Xn,()=>ao(Pn)]}function oo(we,Le){return we.map(Ze=>{const nt=Object.assign({},Ze);return nt.title=Ja(Ze.title,Le),"children"in nt&&(nt.children=oo(nt.children,Le)),nt})}function Ho(we){return[ce.useCallback(Ze=>oo(Ze,we),[we])]}var zo=tr((we,Le)=>{const{_renderTimes:Ze}=we,{_renderTimes:nt}=Le;return Ze!==nt}),ws=Ri((we,Le)=>{const{_renderTimes:Ze}=we,{_renderTimes:nt}=Le;return Ze!==nt}),qs=ie(84780),Kl=ie(14747),Bl=ie(67968),Zc=ie(45503),Md=we=>{const{componentCls:Le}=we,Ze=`${we.lineWidth}px ${we.lineType} ${we.tableBorderColor}`,nt=(St,Ct,Jt)=>({[`&${Le}-${St}`]:{[`> ${Le}-container`]:{[`> ${Le}-content, > ${Le}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Le}-expanded-row-fixed`]:{margin:`-${Ct}px -${Jt+we.lineWidth}px`}}}}}});return{[`${Le}-wrapper`]:{[`${Le}${Le}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Le}-title`]:{border:Ze,borderBottom:0},[`> ${Le}-container`]:{borderInlineStart:Ze,borderTop:Ze,[`
|
|
|
> ${Le}-content,
|
|
|
> ${Le}-header,
|
|
|
> ${Le}-body,
|
|
|
> ${Le}-summary
|
|
|
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:Ze},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Ze},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Le}-cell-fix-right-first::after`]:{borderInlineEnd:Ze}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Le}-expanded-row-fixed`]:{margin:`-${we.tablePaddingVertical}px -${we.tablePaddingHorizontal+we.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:we.lineWidth,bottom:0,borderInlineEnd:Ze,content:'""'}}}}}},[`&${Le}-scroll-horizontal`]:{[`> ${Le}-container > ${Le}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Le}-expanded-row,
|
|
|
> tr${Le}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},nt("middle",we.tablePaddingVerticalMiddle,we.tablePaddingHorizontalMiddle)),nt("small",we.tablePaddingVerticalSmall,we.tablePaddingHorizontalSmall)),{[`> ${Le}-footer`]:{border:Ze,borderTop:0}}),[`${Le}-cell`]:{[`${Le}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${we.lineWidth}px 0 ${we.lineWidth}px ${we.tableHeaderBg}`}},[`${Le}-bordered ${Le}-cell-scrollbar`]:{borderInlineEnd:Ze}}}},Gu=we=>{const{componentCls:Le}=we;return{[`${Le}-wrapper`]:{[`${Le}-cell-ellipsis`]:Object.assign(Object.assign({},Kl.vS),{wordBreak:"keep-all",[`
|
|
|
&${Le}-cell-fix-left-last,
|
|
|
&${Le}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Le}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Le}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},kd=we=>{const{componentCls:Le}=we;return{[`${Le}-wrapper`]:{[`${Le}-tbody > tr${Le}-placeholder`]:{textAlign:"center",color:we.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:we.colorBgContainer}}}}},ku=ie(49867),Ju=we=>{const{componentCls:Le,antCls:Ze,controlInteractiveSize:nt,motionDurationSlow:St,lineWidth:Ct,paddingXS:Jt,lineType:pn,tableBorderColor:nn,tableExpandIconBg:Pn,tableExpandColumnWidth:Xn,borderRadius:Ut,fontSize:gr,fontSizeSM:Cr,lineHeight:Mr,tablePaddingVertical:Rr,tablePaddingHorizontal:_r,tableExpandedRowBg:Yr,paddingXXS:jr}=we,ui=nt/2-Ct,$i=ui*2+Ct*3,Ti=`${Ct}px ${pn} ${nn}`,Ni=jr-Ct;return{[`${Le}-wrapper`]:{[`${Le}-expand-icon-col`]:{width:Xn},[`${Le}-row-expand-icon-cell`]:{textAlign:"center",[`${Le}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Le}-row-indent`]:{height:1,float:"left"},[`${Le}-row-expand-icon`]:Object.assign(Object.assign({},(0,ku.N)(we)),{position:"relative",float:"left",boxSizing:"border-box",width:$i,height:$i,padding:0,color:"inherit",lineHeight:`${$i}px`,background:Pn,border:Ti,borderRadius:Ut,transform:`scale(${nt/$i})`,transition:`all ${St}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${St} ease-out`,content:'""'},"&::before":{top:ui,insetInlineEnd:Ni,insetInlineStart:Ni,height:Ct},"&::after":{top:Ni,bottom:Ni,insetInlineStart:ui,width:Ct,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${Le}-row-indent + ${Le}-row-expand-icon`]:{marginTop:(gr*Mr-Ct*3)/2-Math.ceil((Cr*1.4-Ct*3)/2),marginInlineEnd:Jt},[`tr${Le}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Yr}},[`${Ze}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Le}-expanded-row-fixed`]:{position:"relative",margin:`-${Rr}px -${_r}px`,padding:`${Rr}px ${_r}px`}}}},Lu=we=>{const{componentCls:Le,antCls:Ze,iconCls:nt,tableFilterDropdownWidth:St,tableFilterDropdownSearchWidth:Ct,paddingXXS:Jt,paddingXS:pn,colorText:nn,lineWidth:Pn,lineType:Xn,tableBorderColor:Ut,tableHeaderIconColor:gr,fontSizeSM:Cr,tablePaddingHorizontal:Mr,borderRadius:Rr,motionDurationSlow:_r,colorTextDescription:Yr,colorPrimary:jr,tableHeaderFilterActiveBg:ui,colorTextDisabled:$i,tableFilterDropdownBg:Ti,tableFilterDropdownHeight:Ni,controlItemBgHover:ca,controlItemBgActive:Oa,boxShadowSecondary:Ci,filterDropdownMenuBg:Ai}=we,Ei=`${Ze}-dropdown`,qr=`${Le}-filter-dropdown`,Di=`${Ze}-tree`,ua=`${Pn}px ${Xn} ${Ut}`;return[{[`${Le}-wrapper`]:{[`${Le}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Le}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Jt,marginInline:`${Jt}px ${-Mr/2}px`,padding:`0 ${Jt}px`,color:gr,fontSize:Cr,borderRadius:Rr,cursor:"pointer",transition:`all ${_r}`,"&:hover":{color:Yr,background:ui},"&.active":{color:jr}}}},{[`${Ze}-dropdown`]:{[qr]:Object.assign(Object.assign({},(0,Kl.Wf)(we)),{minWidth:St,backgroundColor:Ti,borderRadius:Rr,boxShadow:Ci,overflow:"hidden",[`${Ei}-menu`]:{maxHeight:Ni,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Ai,"&:empty::after":{display:"block",padding:`${pn}px 0`,color:$i,fontSize:Cr,textAlign:"center",content:'"Not Found"'}},[`${qr}-tree`]:{paddingBlock:`${pn}px 0`,paddingInline:pn,[Di]:{padding:0},[`${Di}-treenode ${Di}-node-content-wrapper:hover`]:{backgroundColor:ca},[`${Di}-treenode-checkbox-checked ${Di}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Oa}}},[`${qr}-search`]:{padding:pn,borderBottom:ua,"&-input":{input:{minWidth:Ct},[nt]:{color:$i}}},[`${qr}-checkall`]:{width:"100%",marginBottom:Jt,marginInlineStart:Jt},[`${qr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${pn-Pn}px ${pn}px`,overflow:"hidden",borderTop:ua}})}},{[`${Ze}-dropdown ${qr}, ${qr}-submenu`]:{[`${Ze}-checkbox-wrapper + span`]:{paddingInlineStart:pn,color:nn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},jc=we=>{const{componentCls:Le,lineWidth:Ze,colorSplit:nt,motionDurationSlow:St,zIndexTableFixed:Ct,tableBg:Jt,zIndexTableSticky:pn}=we,nn=nt;return{[`${Le}-wrapper`]:{[`
|
|
|
${Le}-cell-fix-left,
|
|
|
${Le}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Ct,background:Jt},[`
|
|
|
${Le}-cell-fix-left-first::after,
|
|
|
${Le}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Ze,width:30,transform:"translateX(100%)",transition:`box-shadow ${St}`,content:'""',pointerEvents:"none"},[`${Le}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Le}-cell-fix-right-first::after,
|
|
|
${Le}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-Ze,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${St}`,content:'""',pointerEvents:"none"},[`${Le}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:pn+1,width:30,transition:`box-shadow ${St}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Le}-ping-left`]:{[`&:not(${Le}-has-fix-left) ${Le}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${nn}`}},[`
|
|
|
${Le}-cell-fix-left-first::after,
|
|
|
${Le}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${nn}`},[`${Le}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Le}-ping-right`]:{[`&:not(${Le}-has-fix-right) ${Le}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${nn}`}},[`
|
|
|
${Le}-cell-fix-right-first::after,
|
|
|
${Le}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${nn}`}}}}},lu=we=>{const{componentCls:Le,antCls:Ze}=we;return{[`${Le}-wrapper`]:{[`${Le}-pagination${Ze}-pagination`]:{margin:`${we.margin}px 0`},[`${Le}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:we.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Rc=we=>{const{componentCls:Le,tableRadius:Ze}=we;return{[`${Le}-wrapper`]:{[Le]:{[`${Le}-title, ${Le}-header`]:{borderRadius:`${Ze}px ${Ze}px 0 0`},[`${Le}-title + ${Le}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Le}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:Ze,borderStartEndRadius:Ze,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Ze},"> *:last-child":{borderStartEndRadius:Ze}}},"&-footer":{borderRadius:`0 0 ${Ze}px ${Ze}px`}}}}},Qu=we=>{const{componentCls:Le}=we;return{[`${Le}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Le}-pagination-left`]:{justifyContent:"flex-end"},[`${Le}-pagination-right`]:{justifyContent:"flex-start"},[`${Le}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Le}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Le}-row-indent`]:{float:"right"}}}}},Go=we=>{const{componentCls:Le,antCls:Ze,iconCls:nt,fontSizeIcon:St,padding:Ct,paddingXS:Jt,tableHeaderIconColor:pn,tableHeaderIconColorHover:nn,tableSelectionColumnWidth:Pn}=we;return{[`${Le}-wrapper`]:{[`${Le}-selection-col`]:{width:Pn,[`&${Le}-selection-col-with-dropdown`]:{width:Pn+St+Ct/4}},[`${Le}-bordered ${Le}-selection-col`]:{width:Pn+Jt*2,[`&${Le}-selection-col-with-dropdown`]:{width:Pn+St+Ct/4+Jt*2}},[`
|
|
|
table tr th${Le}-selection-column,
|
|
|
table tr td${Le}-selection-column
|
|
|
`]:{paddingInlineEnd:we.paddingXS,paddingInlineStart:we.paddingXS,textAlign:"center",[`${Ze}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Le}-selection-column${Le}-cell-fix-left`]:{zIndex:we.zIndexTableFixed+1},[`table tr th${Le}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Le}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Le}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${we.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${we.tablePaddingHorizontal/4}px`,[nt]:{color:pn,fontSize:St,verticalAlign:"baseline","&:hover":{color:nn}}}}}},ic=we=>{const{componentCls:Le}=we,Ze=(nt,St,Ct,Jt)=>({[`${Le}${Le}-${nt}`]:{fontSize:Jt,[`
|
|
|
${Le}-title,
|
|
|
${Le}-footer,
|
|
|
${Le}-cell,
|
|
|
${Le}-thead > tr > th,
|
|
|
${Le}-tbody > tr > th,
|
|
|
${Le}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${St}px ${Ct}px`},[`${Le}-filter-trigger`]:{marginInlineEnd:`-${Ct/2}px`},[`${Le}-expanded-row-fixed`]:{margin:`-${St}px -${Ct}px`},[`${Le}-tbody`]:{[`${Le}-wrapper:only-child ${Le}`]:{marginBlock:`-${St}px`,marginInline:`${we.tableExpandColumnWidth-Ct}px -${Ct}px`}},[`${Le}-selection-column`]:{paddingInlineStart:`${Ct/4}px`}}});return{[`${Le}-wrapper`]:Object.assign(Object.assign({},Ze("middle",we.tablePaddingVerticalMiddle,we.tablePaddingHorizontalMiddle,we.tableFontSizeMiddle)),Ze("small",we.tablePaddingVerticalSmall,we.tablePaddingHorizontalSmall,we.tableFontSizeSmall))}},qu=we=>{const{componentCls:Le,marginXXS:Ze,fontSizeIcon:nt,tableHeaderIconColor:St,tableHeaderIconColorHover:Ct}=we;return{[`${Le}-wrapper`]:{[`${Le}-thead th${Le}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${we.motionDurationSlow}`,"&:hover":{background:we.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:we.colorPrimary},[`
|
|
|
&${Le}-cell-fix-left:hover,
|
|
|
&${Le}-cell-fix-right:hover
|
|
|
`]:{background:we.tableFixedHeaderSortActiveBg}},[`${Le}-thead th${Le}-column-sort`]:{background:we.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Le}-column-sort`]:{background:we.tableBodySortBg},[`${Le}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Le}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Le}-column-sorter`]:{marginInlineStart:Ze,color:St,fontSize:0,transition:`color ${we.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:nt,"&.active":{color:we.colorPrimary}},[`${Le}-column-sorter-up + ${Le}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Le}-column-sorters:hover ${Le}-column-sorter`]:{color:Ct}}}},$c=we=>{const{componentCls:Le,opacityLoading:Ze,tableScrollThumbBg:nt,tableScrollThumbBgHover:St,tableScrollThumbSize:Ct,tableScrollBg:Jt,zIndexTableSticky:pn,stickyScrollBarBorderRadius:nn}=we,Pn=`${we.lineWidth}px ${we.lineType} ${we.tableBorderColor}`;return{[`${Le}-wrapper`]:{[`${Le}-sticky`]:{"&-holder":{position:"sticky",zIndex:pn,background:we.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ct}px !important`,zIndex:pn,display:"flex",alignItems:"center",background:Jt,borderTop:Pn,opacity:Ze,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Ct,backgroundColor:nt,borderRadius:nn,transition:`all ${we.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:St}}}}}}},cu=we=>{const{componentCls:Le,lineWidth:Ze,tableBorderColor:nt}=we,St=`${Ze}px ${we.lineType} ${nt}`;return{[`${Le}-wrapper`]:{[`${Le}-summary`]:{position:"relative",zIndex:we.zIndexTableFixed,background:we.tableBg,"> tr":{"> th, > td":{borderBottom:St}}},[`div${Le}-summary`]:{boxShadow:`0 -${Ze}px 0 ${nt}`}}}},nd=we=>{const{componentCls:Le}=we,Ze=`${we.lineWidth}px ${we.lineType} ${we.tableBorderColor}`,nt=`${Le}-expanded-row-cell`;return{[`${Le}-wrapper`]:{[`${Le}-tbody-virtual`]:{[`${Le}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Le}-cell`]:{borderBottom:Ze},[`${Le}-expanded-row`]:{[`${nt}${nt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${we.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Le}-bordered`]:{[`${Le}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Ze,position:"absolute"},[`${Le}-cell`]:{borderInlineEnd:Ze,[`&${Le}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-we.lineWidth,borderInlineStart:Ze}}}}}}};const Tu=we=>{const{componentCls:Le,fontWeightStrong:Ze,tablePaddingVertical:nt,tablePaddingHorizontal:St,lineWidth:Ct,lineType:Jt,tableBorderColor:pn,tableFontSize:nn,tableBg:Pn,tableRadius:Xn,tableHeaderTextColor:Ut,motionDurationMid:gr,tableHeaderBg:Cr,tableHeaderCellSplitColor:Mr,tableRowHoverBg:Rr,tableSelectedRowBg:_r,tableSelectedRowHoverBg:Yr,tableFooterTextColor:jr,tableFooterBg:ui,paddingContentVerticalLG:$i}=we,Ti=`${Ct}px ${Jt} ${pn}`;return{[`${Le}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Kl.dF)()),{[Le]:Object.assign(Object.assign({},(0,Kl.Wf)(we)),{fontSize:nn,background:Pn,borderRadius:`${Xn}px ${Xn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Xn}px ${Xn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Le}-cell,
|
|
|
${Le}-thead > tr > th,
|
|
|
${Le}-tbody > tr > th,
|
|
|
${Le}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${$i}px ${St}px`,overflowWrap:"break-word"},[`${Le}-title`]:{padding:`${nt}px ${St}px`},[`${Le}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Ut,fontWeight:Ze,textAlign:"start",background:Cr,borderBottom:Ti,transition:`background ${gr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Le}-selection-column):not(${Le}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Mr,transform:"translateY(-50%)",transition:`background-color ${gr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Le}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${gr}, border-color ${gr}`,borderBottom:Ti,[`
|
|
|
> ${Le}-wrapper:only-child,
|
|
|
> ${Le}-expanded-row-fixed > ${Le}-wrapper:only-child
|
|
|
`]:{[Le]:{marginBlock:`-${nt}px`,marginInline:`${we.tableExpandColumnWidth-St}px -${St}px`,[`${Le}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Ut,fontWeight:Ze,textAlign:"start",background:Cr,borderBottom:Ti,transition:`background ${gr} ease`},[`
|
|
|
&${Le}-row:hover > th,
|
|
|
&${Le}-row:hover > td,
|
|
|
> th${Le}-cell-row-hover,
|
|
|
> td${Le}-cell-row-hover
|
|
|
`]:{background:Rr},[`&${Le}-row-selected`]:{"> th, > td":{background:_r},"&:hover > th, &:hover > td":{background:Yr}}}},[`${Le}-footer`]:{padding:`${nt}px ${St}px`,color:jr,background:ui}})}};var hc=(0,Bl.Z)("Table",we=>{const{colorTextHeading:Le,colorSplit:Ze,colorIcon:nt,colorIconHover:St,opacityLoading:Ct,colorBgContainer:Jt,controlInteractiveSize:pn,headerBg:nn,headerColor:Pn,headerSortActiveBg:Xn,headerSortHoverBg:Ut,bodySortBg:gr,rowHoverBg:Cr,rowSelectedBg:Mr,rowSelectedHoverBg:Rr,rowExpandedBg:_r,cellPaddingBlock:Yr,cellPaddingInline:jr,cellPaddingBlockMD:ui,cellPaddingInlineMD:$i,cellPaddingBlockSM:Ti,cellPaddingInlineSM:Ni,borderColor:ca,footerBg:Oa,footerColor:Ci,headerBorderRadius:Ai,cellFontSize:Ei,cellFontSizeMD:qr,cellFontSizeSM:Di,headerSplitColor:ua,fixedHeaderSortActiveBg:Va,headerFilterHoverBg:La,filterDropdownBg:da,expandIconBg:qa,selectionColumnWidth:Ga,stickyScrollBarBg:Ko}=we,eo=new qs.C(nt),es=new qs.C(St),ts=2,Ra=(0,Zc.TS)(we,{tableFontSize:Ei,tableBg:Jt,tableRadius:Ai,tablePaddingVertical:Yr,tablePaddingHorizontal:jr,tablePaddingVerticalMiddle:ui,tablePaddingHorizontalMiddle:$i,tablePaddingVerticalSmall:Ti,tablePaddingHorizontalSmall:Ni,tableBorderColor:ca,tableHeaderTextColor:Pn,tableHeaderBg:nn,tableFooterTextColor:Ci,tableFooterBg:Oa,tableHeaderCellSplitColor:ua,tableHeaderSortBg:Xn,tableHeaderSortHoverBg:Ut,tableHeaderIconColor:eo.clone().setAlpha(eo.getAlpha()*Ct).toRgbString(),tableHeaderIconColorHover:es.clone().setAlpha(es.getAlpha()*Ct).toRgbString(),tableBodySortBg:gr,tableFixedHeaderSortActiveBg:Va,tableHeaderFilterActiveBg:La,tableFilterDropdownBg:da,tableRowHoverBg:Cr,tableSelectedRowBg:Mr,tableSelectedRowHoverBg:Rr,zIndexTableFixed:ts,zIndexTableSticky:ts+1,tableFontSizeMiddle:qr,tableFontSizeSmall:Di,tableSelectionColumnWidth:Ga,tableExpandIconBg:qa,tableExpandColumnWidth:pn+2*we.padding,tableExpandedRowBg:_r,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ko,tableScrollThumbBgHover:Le,tableScrollBg:Ze});return[Tu(Ra),lu(Ra),cu(Ra),qu(Ra),Lu(Ra),Md(Ra),Rc(Ra),Ju(Ra),cu(Ra),kd(Ra),Go(Ra),jc(Ra),$c(Ra),Gu(Ra),ic(Ra),Qu(Ra),nd(Ra)]},we=>{const{colorFillAlter:Le,colorBgContainer:Ze,colorTextHeading:nt,colorFillSecondary:St,colorFillContent:Ct,controlItemBgActive:Jt,controlItemBgActiveHover:pn,padding:nn,paddingSM:Pn,paddingXS:Xn,colorBorderSecondary:Ut,borderRadiusLG:gr,fontSize:Cr,controlHeight:Mr,colorTextPlaceholder:Rr}=we,_r=new qs.C(St).onBackground(Ze).toHexShortString(),Yr=new qs.C(Ct).onBackground(Ze).toHexShortString(),jr=new qs.C(Le).onBackground(Ze).toHexShortString();return{headerBg:jr,headerColor:nt,headerSortActiveBg:_r,headerSortHoverBg:Yr,bodySortBg:jr,rowHoverBg:jr,rowSelectedBg:Jt,rowSelectedHoverBg:pn,rowExpandedBg:Le,cellPaddingBlock:nn,cellPaddingInline:nn,cellPaddingBlockMD:Pn,cellPaddingInlineMD:Xn,cellPaddingBlockSM:Xn,cellPaddingInlineSM:Xn,borderColor:Ut,headerBorderRadius:gr,footerBg:jr,footerColor:nt,cellFontSize:Cr,cellFontSizeMD:Cr,cellFontSizeSM:Cr,headerSplitColor:Ut,fixedHeaderSortActiveBg:_r,headerFilterHoverBg:Ct,filterDropdownMenuBg:Ze,filterDropdownBg:Ze,expandIconBg:Ze,selectionColumnWidth:Mr,stickyScrollBarBg:Rr,stickyScrollBarBorderRadius:100}});const uu=[],du=(we,Le)=>{const{prefixCls:Ze,className:nt,rootClassName:St,style:Ct,size:Jt,bordered:pn,dropdownPrefixCls:nn,dataSource:Pn,pagination:Xn,rowSelection:Ut,rowKey:gr="key",rowClassName:Cr,columns:Mr,children:Rr,childrenColumnName:_r,onChange:Yr,getPopupContainer:jr,loading:ui,expandIcon:$i,expandable:Ti,expandedRowRender:Ni,expandIconColumnIndex:ca,indentSize:Oa,scroll:Ci,sortDirections:Ai,locale:Ei,showSorterTooltip:qr=!0,virtual:Di}=we,ua=ce.useMemo(()=>Mr||hr(Rr),[Mr,Rr]),Va=ce.useMemo(()=>ua.some(fo=>fo.responsive),[ua]),La=(0,ji.Z)(Va),da=ce.useMemo(()=>{const fo=new Set(Object.keys(La).filter(ta=>La[ta]));return ua.filter(ta=>!ta.responsive||ta.responsive.some(Os=>fo.has(Os)))},[ua,La]),qa=(0,go.Z)(we,["className","style","columns"]),{locale:Ga=Ao.Z,direction:Ko,table:eo,renderEmpty:es,getPrefixCls:ts,getPopupContainer:Ra}=ce.useContext(Ua.E_),Ls=(0,Ea.Z)(Jt),Io=Object.assign(Object.assign({},Ga.Table),Ei),Wo=Pn||uu,Ro=ts("table",Ze),Aa=ts("dropdown",nn),yi=Object.assign({childrenColumnName:_r,expandIconColumnIndex:ca},Ti),{childrenColumnName:Gi="children"}=yi,fa=ce.useMemo(()=>Wo.some(fo=>fo==null?void 0:fo[Gi])?"nest":Ni||Ti&&Ti.expandedRowRender?"row":null,[Wo]),Ii={body:ce.useRef()},Do=ce.useMemo(()=>typeof gr=="function"?gr:fo=>fo==null?void 0:fo[gr],[gr]),[pi]=Yo(Wo,Gi,Do),Da={},Lo=function(fo,ta){let Os=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Zo,Us,pr;const _l=Object.assign(Object.assign({},Da),fo);Os&&((Zo=Da.resetPagination)===null||Zo===void 0||Zo.call(Da),!((Us=_l.pagination)===null||Us===void 0)&&Us.current&&(_l.pagination.current=1),Xn&&Xn.onChange&&Xn.onChange(1,(pr=_l.pagination)===null||pr===void 0?void 0:pr.pageSize)),Ci&&Ci.scrollToFirstRowOnChange!==!1&&Ii.body.current&&(0,lo.Z)(0,{getContainer:()=>Ii.body.current}),Yr==null||Yr(_l.pagination,_l.filters,_l.sorter,{currentDataSource:Xi(Ks(Wo,_l.sorterStates,Gi),_l.filterStates),action:ta})},xo=(fo,ta)=>{Lo({sorter:fo,sorterStates:ta},"sort",!1)},[ol,Ts,El,Ir]=gl({prefixCls:Ro,mergedColumns:da,onSorterChange:xo,sortDirections:Ai||["ascend","descend"],tableLocale:Io,showSorterTooltip:qr}),Fl=ce.useMemo(()=>Ks(Wo,Ts,Gi),[Wo,Ts]);Da.sorter=Ir(),Da.sorterStates=Ts;const Cs=(fo,ta)=>{Lo({filters:fo,filterStates:ta},"filter",!0)},[fl,yl,To]=Uo({prefixCls:Ro,locale:Io,dropdownPrefixCls:Aa,mergedColumns:da,onFilterChange:Cs,getPopupContainer:jr||Ra}),No=Xi(Fl,yl);Da.filters=To,Da.filterStates=yl;const ns=ce.useMemo(()=>{const fo={};return Object.keys(To).forEach(ta=>{To[ta]!==null&&(fo[ta]=To[ta])}),Object.assign(Object.assign({},El),{filters:fo})},[El,To]),[Za]=Ho(ns),Rs=(fo,ta)=>{Lo({pagination:Object.assign(Object.assign({},Da.pagination),{current:fo,pageSize:ta})},"paginate")},[to,As]=Pl(No.length,Rs,Xn);Da.pagination=Xn===!1?{}:uo(to,Xn),Da.resetPagination=As;const Hs=ce.useMemo(()=>{if(Xn===!1||!to.pageSize)return No;const{current:fo=1,total:ta,pageSize:Os=wl}=to;return No.length<ta?No.length>Os?No.slice((fo-1)*Os,fo*Os):No:No.slice((fo-1)*Os,fo*Os)},[!!Xn,No,to&&to.current,to&&to.pageSize,to&&to.total]),[Ws,Ml]=al({prefixCls:Ro,data:No,pageData:Hs,getRowKey:Do,getRecordByKey:pi,expandType:fa,childrenColumnName:Gi,locale:Io,getPopupContainer:jr||Ra},Ut),Es=(fo,ta,Os)=>{let Zo;return typeof Cr=="function"?Zo=yt()(Cr(fo,ta,Os)):Zo=yt()(Cr),yt()({[`${Ro}-row-selected`]:Ml.has(Do(fo,ta))},Zo)};yi.__PARENT_RENDER_ICON__=yi.expandIcon,yi.expandIcon=yi.expandIcon||$i||Ma(Io),fa==="nest"&&yi.expandIconColumnIndex===void 0?yi.expandIconColumnIndex=Ut?1:0:yi.expandIconColumnIndex>0&&Ut&&(yi.expandIconColumnIndex-=1),typeof yi.indentSize!="number"&&(yi.indentSize=typeof Oa=="number"?Oa:15);const kl=ce.useCallback(fo=>Za(Ws(fl(ol(fo)))),[ol,fl,Ws]);let Ms,Zs;if(Xn!==!1&&(to!=null&&to.total)){let fo;to.size?fo=to.size:fo=Ls==="small"||Ls==="middle"?"small":void 0;const ta=Us=>ce.createElement(la.Z,Object.assign({},to,{className:yt()(`${Ro}-pagination ${Ro}-pagination-${Us}`,to.className),size:fo})),Os=Ko==="rtl"?"left":"right",{position:Zo}=to;if(Zo!==null&&Array.isArray(Zo)){const Us=Zo.find(lc=>lc.includes("top")),pr=Zo.find(lc=>lc.includes("bottom")),_l=Zo.every(lc=>`${lc}`=="none");!Us&&!pr&&!_l&&(Zs=ta(Os)),Us&&(Ms=ta(Us.toLowerCase().replace("top",""))),pr&&(Zs=ta(pr.toLowerCase().replace("bottom","")))}else Zs=ta(Os)}let js;typeof ui=="boolean"?js={spinning:ui}:typeof ui=="object"&&(js=Object.assign({spinning:!0},ui));const[ks,ms]=hc(Ro),[,ls]=(0,xa.Z)(),Xl=yt()(`${Ro}-wrapper`,eo==null?void 0:eo.className,{[`${Ro}-wrapper-rtl`]:Ko==="rtl"},nt,St,ms),Cc=Object.assign(Object.assign({},eo==null?void 0:eo.style),Ct),hs=Ei&&Ei.emptyText||(es==null?void 0:es("Table"))||ce.createElement(Ba.Z,{componentName:"Table"}),sl=Di?ws:zo,Du={},Ec=ce.useMemo(()=>{const{fontSize:fo,lineHeight:ta,padding:Os,paddingXS:Zo,paddingSM:Us}=ls,pr=Math.floor(fo*ta);switch(Ls){case"large":return Os*2+pr;case"small":return Zo*2+pr;default:return Us*2+pr}},[ls,Ls]);return Di&&(Du.listItemHeight=Ec),ks(ce.createElement("div",{ref:Le,className:Xl,style:Cc},ce.createElement(Li.Z,Object.assign({spinning:!1},js),Ms,ce.createElement(sl,Object.assign({},Du,qa,{columns:da,direction:Ko,expandable:yi,prefixCls:Ro,className:yt()({[`${Ro}-middle`]:Ls==="middle",[`${Ro}-small`]:Ls==="small",[`${Ro}-bordered`]:pn,[`${Ro}-empty`]:Wo.length===0}),data:Hs,rowKey:Do,rowClassName:Es,emptyText:hs,internalHooks:Te,internalRefs:Ii,transformColumns:kl})),Zs)))};var Au=ce.forwardRef(du);const fu=(we,Le)=>{const Ze=ce.useRef(0);return Ze.current+=1,ce.createElement(Au,Object.assign({},we,{ref:Le,_renderTimes:Ze.current}))},Gl=ce.forwardRef(fu);Gl.SELECTION_COLUMN=dl,Gl.EXPAND_COLUMN=fe,Gl.SELECTION_ALL=ec,Gl.SELECTION_INVERT=is,Gl.SELECTION_NONE=wo,Gl.Column=ci,Gl.ColumnGroup=ha,Gl.Summary=Rn;var rd=Gl,Iu=rd},66368:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return Fn}});var fe=ie(73475),Te=ie(25877),Re=ie(38308),Ge=ie(94184),ye=ie.n(Ge),_e=ie(87462),ce=ie(4942),ke=ie(1413),ge=ie(97685),Ae=ie(71002),lt=ie(45987),ze=ie(67294),st=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))};function dt(he){var Pe=ze.useRef();Pe.current=he;var Fe=ze.useCallback(function(){for(var We,je=arguments.length,et=new Array(je),tt=0;tt<je;tt++)et[tt]=arguments[tt];return(We=Pe.current)===null||We===void 0?void 0:We.call.apply(We,[Pe].concat(et))},[]);return Fe}function ct(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var qe=ct()?ze.useLayoutEffect:ze.useEffect,be=function(Pe,Fe){var We=ze.useRef(!0);qe(function(){return Pe(We.current)},Fe),qe(function(){return We.current=!1,function(){We.current=!0}},[])},vt=function(Pe,Fe){be(function(We){if(!We)return Pe()},Fe)},Dt=null;function it(he){var Pe=ze.useRef(!1),Fe=ze.useState(he),We=(0,ge.Z)(Fe,2),je=We[0],et=We[1];ze.useEffect(function(){return Pe.current=!1,function(){Pe.current=!0}},[]);function tt(kt,Wt){Wt&&Pe.current||et(kt)}return[je,tt]}function ot(he){return he!==void 0}function Ce(he,Pe){var Fe=Pe||{},We=Fe.defaultValue,je=Fe.value,et=Fe.onChange,tt=Fe.postState,kt=it(function(){return ot(je)?je:ot(We)?typeof We=="function"?We():We:typeof he=="function"?he():he}),Wt=(0,ge.Z)(kt,2),Sn=Wt[0],Nn=Wt[1],En=je!==void 0?je:Sn,cn=tt?tt(En):En,un=dt(et),Gt=it([En]),kn=(0,ge.Z)(Gt,2),ir=kn[0],$n=kn[1];vt(function(){var Gn=ir[0];Sn!==Gn&&un(Sn,Gn)},[ir]),vt(function(){ot(je)||Nn(je)},[je]);var Hn=dt(function(Gn,ar){Nn(Gn,ar),$n([En],ar)});return[cn,Hn]}var Se=ie(62874),He=(0,ze.createContext)(null),Ue=ze.forwardRef(function(he,Pe){var Fe=he.prefixCls,We=he.className,je=he.style,et=he.id,tt=he.active,kt=he.tabKey,Wt=he.children;return ze.createElement("div",{id:et&&"".concat(et,"-panel-").concat(kt),role:"tabpanel",tabIndex:tt?0:-1,"aria-labelledby":et&&"".concat(et,"-tab-").concat(kt),"aria-hidden":!tt,style:je,className:ye()(Fe,tt&&"".concat(Fe,"-active"),We),ref:Pe},Wt)}),xt=Ue,mt=["key","forceRender","style","className"];function ut(he){var Pe=he.id,Fe=he.activeKey,We=he.animated,je=he.tabPosition,et=he.destroyInactiveTabPane,tt=ze.useContext(He),kt=tt.prefixCls,Wt=tt.tabs,Sn=We.tabPane,Nn="".concat(kt,"-tabpane");return ze.createElement("div",{className:ye()("".concat(kt,"-content-holder"))},ze.createElement("div",{className:ye()("".concat(kt,"-content"),"".concat(kt,"-content-").concat(je),(0,ce.Z)({},"".concat(kt,"-content-animated"),Sn))},Wt.map(function(En){var cn=En.key,un=En.forceRender,Gt=En.style,kn=En.className,ir=(0,lt.Z)(En,mt),$n=cn===Fe;return ze.createElement(Se.Z,(0,_e.Z)({key:cn,visible:$n,forceRender:un,removeOnLeave:!!et,leavedClassName:"".concat(Nn,"-hidden")},We.tabPaneMotion),function(Hn,Gn){var ar=Hn.style,ur=Hn.className;return ze.createElement(xt,(0,_e.Z)({},ir,{prefixCls:Nn,id:Pe,tabKey:cn,animated:Sn,active:$n,style:(0,ke.Z)((0,ke.Z)({},Gt),ar),className:ye()(kn,ur),ref:Gn}))})})))}var $e=ie(74902),Ft=ie(48555),yt=ie(59864);function gn(he,Pe,Fe){var We=ze.useRef({});return(!("value"in We.current)||Fe(We.current.condition,Pe))&&(We.current.value=he(),We.current.condition=Pe),We.current.value}function rt(he,Pe){typeof he=="function"?he(Pe):(0,Ae.Z)(he)==="object"&&he&&"current"in he&&(he.current=Pe)}function Mt(){for(var he=arguments.length,Pe=new Array(he),Fe=0;Fe<he;Fe++)Pe[Fe]=arguments[Fe];var We=Pe.filter(function(je){return je});return We.length<=1?We[0]:function(je){Pe.forEach(function(et){rt(et,je)})}}function en(){for(var he=arguments.length,Pe=new Array(he),Fe=0;Fe<he;Fe++)Pe[Fe]=arguments[Fe];return gn(function(){return Mt.apply(void 0,Pe)},Pe,function(We,je){return We.length===je.length&&We.every(function(et,tt){return et===je[tt]})})}function Yt(he){var Pe,Fe,We=isMemo(he)?he.type.type:he.type;return!(typeof We=="function"&&!((Pe=We.prototype)!==null&&Pe!==void 0&&Pe.render)||typeof he=="function"&&!((Fe=he.prototype)!==null&&Fe!==void 0&&Fe.render))}var Qe={width:0,height:0,left:0,top:0};function Ie(he,Pe,Fe){return(0,ze.useMemo)(function(){for(var We,je=new Map,et=Pe.get((We=he[0])===null||We===void 0?void 0:We.key)||Qe,tt=et.left+et.width,kt=0;kt<he.length;kt+=1){var Wt=he[kt].key,Sn=Pe.get(Wt);if(!Sn){var Nn;Sn=Pe.get((Nn=he[kt-1])===null||Nn===void 0?void 0:Nn.key)||Qe}var En=je.get(Wt)||(0,ke.Z)({},Sn);En.right=tt-En.left-En.width,je.set(Wt,En)}return je},[he.map(function(We){return We.key}).join("_"),Pe,Fe])}function Ot(he,Pe){var Fe=ze.useRef(he),We=ze.useState({}),je=(0,ge.Z)(We,2),et=je[1];function tt(kt){var Wt=typeof kt=="function"?kt(Fe.current):kt;Wt!==Fe.current&&Pe(Wt,Fe.current),Fe.current=Wt,et({})}return[Fe.current,tt]}var In=.1,mn=.01,pt=20,wt=Math.pow(.995,pt);function Qt(he,Pe){var Fe=(0,ze.useState)(),We=(0,ge.Z)(Fe,2),je=We[0],et=We[1],tt=(0,ze.useState)(0),kt=(0,ge.Z)(tt,2),Wt=kt[0],Sn=kt[1],Nn=(0,ze.useState)(0),En=(0,ge.Z)(Nn,2),cn=En[0],un=En[1],Gt=(0,ze.useState)(),kn=(0,ge.Z)(Gt,2),ir=kn[0],$n=kn[1],Hn=(0,ze.useRef)();function Gn(_t){var hn=_t.touches[0],Dn=hn.screenX,An=hn.screenY;et({x:Dn,y:An}),window.clearInterval(Hn.current)}function ar(_t){if(je){_t.preventDefault();var hn=_t.touches[0],Dn=hn.screenX,An=hn.screenY;et({x:Dn,y:An});var or=Dn-je.x,Un=An-je.y;Pe(or,Un);var Tn=Date.now();Sn(Tn),un(Tn-Wt),$n({x:or,y:Un})}}function ur(){if(je&&(et(null),$n(null),ir)){var _t=ir.x/cn,hn=ir.y/cn,Dn=Math.abs(_t),An=Math.abs(hn);if(Math.max(Dn,An)<In)return;var or=_t,Un=hn;Hn.current=window.setInterval(function(){if(Math.abs(or)<mn&&Math.abs(Un)<mn){window.clearInterval(Hn.current);return}or*=wt,Un*=wt,Pe(or*pt,Un*pt)},pt)}}var Ve=(0,ze.useRef)();function Je(_t){var hn=_t.deltaX,Dn=_t.deltaY,An=0,or=Math.abs(hn),Un=Math.abs(Dn);or===Un?An=Ve.current==="x"?hn:Dn:or>Un?(An=hn,Ve.current="x"):(An=Dn,Ve.current="y"),Pe(-An,-An)&&_t.preventDefault()}var Pt=(0,ze.useRef)(null);Pt.current={onTouchStart:Gn,onTouchMove:ar,onTouchEnd:ur,onWheel:Je},ze.useEffect(function(){function _t(or){Pt.current.onTouchStart(or)}function hn(or){Pt.current.onTouchMove(or)}function Dn(or){Pt.current.onTouchEnd(or)}function An(or){Pt.current.onWheel(or)}return document.addEventListener("touchmove",hn,{passive:!1}),document.addEventListener("touchend",Dn,{passive:!1}),he.current.addEventListener("touchstart",_t,{passive:!1}),he.current.addEventListener("wheel",An),function(){document.removeEventListener("touchmove",hn),document.removeEventListener("touchend",Dn)}},[])}function Zn(he){var Pe=(0,ze.useState)(0),Fe=(0,ge.Z)(Pe,2),We=Fe[0],je=Fe[1],et=(0,ze.useRef)(0),tt=(0,ze.useRef)();return tt.current=he,vt(function(){var kt;(kt=tt.current)===null||kt===void 0||kt.call(tt)},[We]),function(){et.current===We&&(et.current+=1,je(et.current))}}function Cn(he){var Pe=(0,ze.useRef)([]),Fe=(0,ze.useState)({}),We=(0,ge.Z)(Fe,2),je=We[1],et=(0,ze.useRef)(typeof he=="function"?he():he),tt=Zn(function(){var Wt=et.current;Pe.current.forEach(function(Sn){Wt=Sn(Wt)}),Pe.current=[],et.current=Wt,je({})});function kt(Wt){Pe.current.push(Wt),tt()}return[et.current,kt]}var rn={width:0,height:0,left:0,top:0,right:0};function ln(he,Pe,Fe,We,je,et,tt){var kt=tt.tabs,Wt=tt.tabPosition,Sn=tt.rtl,Nn,En,cn;return["top","bottom"].includes(Wt)?(Nn="width",En=Sn?"right":"left",cn=Math.abs(Fe)):(Nn="height",En="top",cn=-Fe),(0,ze.useMemo)(function(){if(!kt.length)return[0,0];for(var un=kt.length,Gt=un,kn=0;kn<un;kn+=1){var ir=he.get(kt[kn].key)||rn;if(ir[En]+ir[Nn]>cn+Pe){Gt=kn-1;break}}for(var $n=0,Hn=un-1;Hn>=0;Hn-=1){var Gn=he.get(kt[Hn].key)||rn;if(Gn[En]<cn){$n=Hn+1;break}}return $n>=Gt?[0,0]:[$n,Gt]},[he,Pe,We,je,et,cn,Wt,kt.map(function(un){return un.key}).join("_"),Sn])}function zn(he){var Pe;return he instanceof Map?(Pe={},he.forEach(function(Fe,We){Pe[We]=Fe})):Pe=he,JSON.stringify(Pe)}var _n="TABS_DQ";function Oe(he){return String(he).replace(/"/g,_n)}function ue(he,Pe,Fe,We){return!(!Fe||We||he===!1||he===void 0&&(Pe===!1||Pe===null))}function le(he,Pe){var Fe=he.prefixCls,We=he.editable,je=he.locale,et=he.style;return!We||We.showAdd===!1?null:ze.createElement("button",{ref:Pe,type:"button",className:"".concat(Fe,"-nav-add"),style:et,"aria-label":(je==null?void 0:je.addAriaLabel)||"Add tab",onClick:function(kt){We.onEdit("add",{event:kt})}},We.addIcon||"+")}var ve=ze.forwardRef(le),pe=ze.forwardRef(function(he,Pe){var Fe=he.position,We=he.prefixCls,je=he.extra;if(!je)return null;var et,tt={};return(0,Ae.Z)(je)==="object"&&!ze.isValidElement(je)?tt=je:tt.right=je,Fe==="right"&&(et=tt.right),Fe==="left"&&(et=tt.left),et?ze.createElement("div",{className:"".concat(We,"-extra-content"),ref:Pe},et):null}),se=pe,Be=ie(62709);function ft(he,Pe,Fe){var We=React.useRef({});return(!("value"in We.current)||Fe(We.current.condition,Pe))&&(We.current.value=he(),We.current.condition=Pe),We.current.value}function Bt(he,Pe){typeof he=="function"?he(Pe):(0,Ae.Z)(he)==="object"&&he&&"current"in he&&(he.current=Pe)}function qt(){for(var he=arguments.length,Pe=new Array(he),Fe=0;Fe<he;Fe++)Pe[Fe]=arguments[Fe];var We=Pe.filter(function(je){return je});return We.length<=1?We[0]:function(je){Pe.forEach(function(et){Bt(et,je)})}}function an(){for(var he=arguments.length,Pe=new Array(he),Fe=0;Fe<he;Fe++)Pe[Fe]=arguments[Fe];return useMemo(function(){return qt.apply(void 0,Pe)},Pe,function(We,je){return We.length===je.length&&We.every(function(et,tt){return et===je[tt]})})}function vn(he){var Pe,Fe,We=(0,yt.isMemo)(he)?he.type.type:he.type;return!(typeof We=="function"&&!((Pe=We.prototype)!==null&&Pe!==void 0&&Pe.render)||typeof he=="function"&&!((Fe=he.prototype)!==null&&Fe!==void 0&&Fe.render))}var dn={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(Pe){var Fe=Pe.keyCode;if(Pe.altKey&&!Pe.ctrlKey||Pe.metaKey||Fe>=dn.F1&&Fe<=dn.F12)return!1;switch(Fe){case dn.ALT:case dn.CAPS_LOCK:case dn.CONTEXT_MENU:case dn.CTRL:case dn.DOWN:case dn.END:case dn.ESC:case dn.HOME:case dn.INSERT:case dn.LEFT:case dn.MAC_FF_META:case dn.META:case dn.NUMLOCK:case dn.NUM_CENTER:case dn.PAGE_DOWN:case dn.PAGE_UP:case dn.PAUSE:case dn.PRINT_SCREEN:case dn.RIGHT:case dn.SHIFT:case dn.UP:case dn.WIN_KEY:case dn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Pe){if(Pe>=dn.ZERO&&Pe<=dn.NINE||Pe>=dn.NUM_ZERO&&Pe<=dn.NUM_MULTIPLY||Pe>=dn.A&&Pe<=dn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Pe===0)return!0;switch(Pe){case dn.SPACE:case dn.QUESTION_MARK:case dn.NUM_PLUS:case dn.NUM_MINUS:case dn.NUM_PERIOD:case dn.NUM_DIVISION:case dn.SEMICOLON:case dn.DASH:case dn.EQUALS:case dn.COMMA:case dn.PERIOD:case dn.SLASH:case dn.APOSTROPHE:case dn.SINGLE_QUOTE:case dn.OPEN_SQUARE_BRACKET:case dn.BACKSLASH:case dn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gt=dn,It=function(Pe){return+setTimeout(Pe,16)},Ht=function(Pe){return clearTimeout(Pe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(It=function(Pe){return window.requestAnimationFrame(Pe)},Ht=function(Pe){return window.cancelAnimationFrame(Pe)});var Xt=0,Tt=new Map;function Yn(he){Tt.delete(he)}var Rn=function(Pe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Xt+=1;var We=Xt;function je(et){if(et===0)Yn(We),Pe();else{var tt=It(function(){je(et-1)});Tt.set(We,tt)}}return je(Fe),We};Rn.cancel=function(he){var Pe=Tt.get(he);return Yn(Pe),Ht(Pe)};var cr=Rn,Xr=gt.ESC,wr=gt.TAB;function kr(he){var Pe=he.visible,Fe=he.triggerRef,We=he.onVisibleChange,je=he.autoFocus,et=he.overlayRef,tt=ze.useRef(!1),kt=function(){if(Pe){var En,cn;(En=Fe.current)===null||En===void 0||(cn=En.focus)===null||cn===void 0||cn.call(En),We==null||We(!1)}},Wt=function(){var En;return(En=et.current)!==null&&En!==void 0&&En.focus?(et.current.focus(),tt.current=!0,!0):!1},Sn=function(En){switch(En.keyCode){case Xr:kt();break;case wr:{var cn=!1;tt.current||(cn=Wt()),cn?En.preventDefault():kt();break}}};ze.useEffect(function(){return Pe?(window.addEventListener("keydown",Sn),je&&cr(Wt,3),function(){window.removeEventListener("keydown",Sn),tt.current=!1}):function(){tt.current=!1}},[Pe])}var Ar=(0,ze.forwardRef)(function(he,Pe){var Fe=he.overlay,We=he.arrow,je=he.prefixCls,et=(0,ze.useMemo)(function(){var kt;return typeof Fe=="function"?kt=Fe():kt=Fe,kt},[Fe]),tt=qt(Pe,et==null?void 0:et.ref);return ze.createElement(ze.Fragment,null,We&&ze.createElement("div",{className:"".concat(je,"-arrow")}),ze.cloneElement(et,{ref:vn(et)?tt:void 0}))}),gi=Ar,oi={adjustX:1,adjustY:1},fi=[0,0],Pi={topLeft:{points:["bl","tl"],overflow:oi,offset:[0,-4],targetOffset:fi},top:{points:["bc","tc"],overflow:oi,offset:[0,-4],targetOffset:fi},topRight:{points:["br","tr"],overflow:oi,offset:[0,-4],targetOffset:fi},bottomLeft:{points:["tl","bl"],overflow:oi,offset:[0,4],targetOffset:fi},bottom:{points:["tc","bc"],overflow:oi,offset:[0,4],targetOffset:fi},bottomRight:{points:["tr","br"],overflow:oi,offset:[0,4],targetOffset:fi}},Or=Pi,Jn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function qn(he,Pe){var Fe,We=he.arrow,je=We===void 0?!1:We,et=he.prefixCls,tt=et===void 0?"rc-dropdown":et,kt=he.transitionName,Wt=he.animation,Sn=he.align,Nn=he.placement,En=Nn===void 0?"bottomLeft":Nn,cn=he.placements,un=cn===void 0?Or:cn,Gt=he.getPopupContainer,kn=he.showAction,ir=he.hideAction,$n=he.overlayClassName,Hn=he.overlayStyle,Gn=he.visible,ar=he.trigger,ur=ar===void 0?["hover"]:ar,Ve=he.autoFocus,Je=he.overlay,Pt=he.children,_t=he.onVisibleChange,hn=(0,lt.Z)(he,Jn),Dn=ze.useState(),An=(0,ge.Z)(Dn,2),or=An[0],Un=An[1],Tn="visible"in he?Gn:or,tr=ze.useRef(null),dr=ze.useRef(null),Pr=ze.useRef(null);ze.useImperativeHandle(Pe,function(){return tr.current});var fr=function(Hr){Un(Hr),_t==null||_t(Hr)};kr({visible:Tn,triggerRef:Pr,onVisibleChange:fr,autoFocus:Ve,overlayRef:dr});var Fr=function(Hr){var Bi=he.onOverlayClick;Un(!1),Bi&&Bi(Hr)},ri=function(){return ze.createElement(gi,{ref:dr,overlay:Je,prefixCls:tt,arrow:je})},Vr=function(){return typeof Je=="function"?ri:ri()},ii=function(){var Hr=he.minOverlayWidthMatchTrigger,Bi=he.alignPoint;return"minOverlayWidthMatchTrigger"in he?Hr:!Bi},Br=function(){var Hr=he.openClassName;return Hr!==void 0?Hr:"".concat(tt,"-open")},Jr=ze.cloneElement(Pt,{className:ye()((Fe=Pt.props)===null||Fe===void 0?void 0:Fe.className,Tn&&Br()),ref:vn(Pt)?qt(Pr,Pt.ref):void 0}),si=ir;return!si&&ur.indexOf("contextMenu")!==-1&&(si=["click"]),ze.createElement(Be.Z,(0,_e.Z)({builtinPlacements:un},hn,{prefixCls:tt,ref:tr,popupClassName:ye()($n,(0,ce.Z)({},"".concat(tt,"-show-arrow"),je)),popupStyle:Hn,action:ur,showAction:kn,hideAction:si,popupPlacement:En,popupAlign:Sn,popupTransitionName:kt,popupAnimation:Wt,popupVisible:Tn,stretch:ii()?"minWidth":"",popup:Vr(),onPopupVisibleChange:fr,onPopupClick:Fr,getPopupContainer:Gt}),Jr)}var nr=ze.forwardRef(qn),Ur=nr,li=ie(78595),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(Pe){var Fe=Pe.keyCode;if(Pe.altKey&&!Pe.ctrlKey||Pe.metaKey||Fe>=Lt.F1&&Fe<=Lt.F12)return!1;switch(Fe){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(Pe){if(Pe>=Lt.ZERO&&Pe<=Lt.NINE||Pe>=Lt.NUM_ZERO&&Pe<=Lt.NUM_MULTIPLY||Pe>=Lt.A&&Pe<=Lt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Pe===0)return!0;switch(Pe){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}}},Kn=Lt;function Bn(he,Pe){var Fe=he.prefixCls,We=he.id,je=he.tabs,et=he.locale,tt=he.mobile,kt=he.moreIcon,Wt=kt===void 0?"More":kt,Sn=he.moreTransitionName,Nn=he.style,En=he.className,cn=he.editable,un=he.tabBarGutter,Gt=he.rtl,kn=he.removeAriaLabel,ir=he.onTabClick,$n=he.getPopupContainer,Hn=he.popupClassName,Gn=(0,ze.useState)(!1),ar=(0,ge.Z)(Gn,2),ur=ar[0],Ve=ar[1],Je=(0,ze.useState)(null),Pt=(0,ge.Z)(Je,2),_t=Pt[0],hn=Pt[1],Dn="".concat(We,"-more-popup"),An="".concat(Fe,"-dropdown"),or=_t!==null?"".concat(Dn,"-").concat(_t):null,Un=et==null?void 0:et.dropdownAriaLabel;function Tn(Vr,ii){Vr.preventDefault(),Vr.stopPropagation(),cn.onEdit("remove",{key:ii,event:Vr})}var tr=ze.createElement(li.ZP,{onClick:function(ii){var Br=ii.key,Jr=ii.domEvent;ir(Br,Jr),Ve(!1)},prefixCls:"".concat(An,"-menu"),id:Dn,tabIndex:-1,role:"listbox","aria-activedescendant":or,selectedKeys:[_t],"aria-label":Un!==void 0?Un:"expanded dropdown"},je.map(function(Vr){var ii=Vr.closable,Br=Vr.disabled,Jr=Vr.closeIcon,si=Vr.key,_i=Vr.label,Hr=ue(ii,Jr,cn,Br);return ze.createElement(li.sN,{key:si,id:"".concat(Dn,"-").concat(si),role:"option","aria-controls":We&&"".concat(We,"-panel-").concat(si),disabled:Br},ze.createElement("span",null,_i),Hr&&ze.createElement("button",{type:"button","aria-label":kn||"remove",tabIndex:0,className:"".concat(An,"-menu-item-remove"),onClick:function(zi){zi.stopPropagation(),Tn(zi,si)}},Jr||cn.removeIcon||"\xD7"))}));function dr(Vr){for(var ii=je.filter(function(Hr){return!Hr.disabled}),Br=ii.findIndex(function(Hr){return Hr.key===_t})||0,Jr=ii.length,si=0;si<Jr;si+=1){Br=(Br+Vr+Jr)%Jr;var _i=ii[Br];if(!_i.disabled){hn(_i.key);return}}}function Pr(Vr){var ii=Vr.which;if(!ur){[Kn.DOWN,Kn.SPACE,Kn.ENTER].includes(ii)&&(Ve(!0),Vr.preventDefault());return}switch(ii){case Kn.UP:dr(-1),Vr.preventDefault();break;case Kn.DOWN:dr(1),Vr.preventDefault();break;case Kn.ESC:Ve(!1);break;case Kn.SPACE:case Kn.ENTER:_t!==null&&ir(_t,Vr);break}}(0,ze.useEffect)(function(){var Vr=document.getElementById(or);Vr&&Vr.scrollIntoView&&Vr.scrollIntoView(!1)},[_t]),(0,ze.useEffect)(function(){ur||hn(null)},[ur]);var fr=(0,ce.Z)({},Gt?"marginRight":"marginLeft",un);je.length||(fr.visibility="hidden",fr.order=1);var Fr=ye()((0,ce.Z)({},"".concat(An,"-rtl"),Gt)),ri=tt?null:ze.createElement(Ur,{prefixCls:An,overlay:tr,trigger:["hover"],visible:je.length?ur:!1,transitionName:Sn,onVisibleChange:Ve,overlayClassName:ye()(Fr,Hn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:$n},ze.createElement("button",{type:"button",className:"".concat(Fe,"-nav-more"),style:fr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Dn,id:"".concat(We,"-more"),"aria-expanded":ur,onKeyDown:Pr},Wt));return ze.createElement("div",{className:ye()("".concat(Fe,"-nav-operations"),En),style:Nn,ref:Pe},ri,ze.createElement(ve,{prefixCls:Fe,locale:et,editable:cn}))}var yn=ze.memo(ze.forwardRef(Bn),function(he,Pe){return Pe.tabMoving});function xr(he){var Pe,Fe=he.prefixCls,We=he.id,je=he.active,et=he.tab,tt=et.key,kt=et.label,Wt=et.disabled,Sn=et.closeIcon,Nn=he.closable,En=he.renderWrapper,cn=he.removeAriaLabel,un=he.editable,Gt=he.onClick,kn=he.onFocus,ir=he.style,$n="".concat(Fe,"-tab"),Hn=ue(Nn,Sn,un,Wt);function Gn(Ve){Wt||Gt(Ve)}function ar(Ve){Ve.preventDefault(),Ve.stopPropagation(),un.onEdit("remove",{key:tt,event:Ve})}var ur=ze.createElement("div",{key:tt,"data-node-key":Oe(tt),className:ye()($n,(Pe={},(0,ce.Z)(Pe,"".concat($n,"-with-remove"),Hn),(0,ce.Z)(Pe,"".concat($n,"-active"),je),(0,ce.Z)(Pe,"".concat($n,"-disabled"),Wt),Pe)),style:ir,onClick:Gn},ze.createElement("div",{role:"tab","aria-selected":je,id:We&&"".concat(We,"-tab-").concat(tt),className:"".concat($n,"-btn"),"aria-controls":We&&"".concat(We,"-panel-").concat(tt),"aria-disabled":Wt,tabIndex:Wt?null:0,onClick:function(Je){Je.stopPropagation(),Gn(Je)},onKeyDown:function(Je){[Kn.SPACE,Kn.ENTER].includes(Je.which)&&(Je.preventDefault(),Gn(Je))},onFocus:kn},kt),Hn&&ze.createElement("button",{type:"button","aria-label":cn||"remove",tabIndex:0,className:"".concat($n,"-remove"),onClick:function(Je){Je.stopPropagation(),ar(Je)}},Sn||un.removeIcon||"\xD7"));return En?En(ur):ur}var Sr=xr,mr=function(Pe){return+setTimeout(Pe,16)},Qn=function(Pe){return clearTimeout(Pe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(mr=function(Pe){return window.requestAnimationFrame(Pe)},Qn=function(Pe){return window.cancelAnimationFrame(Pe)});var ht=0,Et=new Map;function zt(he){Et.delete(he)}var fn=function(Pe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ht+=1;var We=ht;function je(et){if(et===0)zt(We),Pe();else{var tt=mr(function(){je(et-1)});Et.set(We,tt)}}return je(Fe),We};fn.cancel=function(he){var Pe=Et.get(he);return zt(Pe),Qn(Pe)};var at=fn,Rt=function(Pe){var Fe=Pe.activeTabOffset,We=Pe.horizontal,je=Pe.rtl,et=Pe.indicatorSize,tt=(0,ze.useState)(),kt=(0,ge.Z)(tt,2),Wt=kt[0],Sn=kt[1],Nn=(0,ze.useRef)(),En=function(Gt){return typeof et=="function"?et(Gt):typeof et=="number"?et:Gt};function cn(){at.cancel(Nn.current)}return(0,ze.useEffect)(function(){var un={};return Fe&&(We?(je?(un.right=Fe.right+Fe.width/2,un.transform="translateX(50%)"):(un.left=Fe.left+Fe.width/2,un.transform="translateX(-50%)"),un.width=En(Fe.width)):(un.top=Fe.top+Fe.height/2,un.transform="translateY(-50%)",un.height=En(Fe.height))),cn(),Nn.current=at(function(){Sn(un)}),cn},[Fe,We,je,et]),{style:Wt}},on=Rt,tn=function(Pe){var Fe=Pe.current||{},We=Fe.offsetWidth,je=We===void 0?0:We,et=Fe.offsetHeight,tt=et===void 0?0:et;return[je,tt]},Mn=function(Pe,Fe){return Pe[Fe?0:1]};function wn(he,Pe){var Fe,We=ze.useContext(He),je=We.prefixCls,et=We.tabs,tt=he.className,kt=he.style,Wt=he.id,Sn=he.animated,Nn=he.activeKey,En=he.rtl,cn=he.extra,un=he.editable,Gt=he.locale,kn=he.tabPosition,ir=he.tabBarGutter,$n=he.children,Hn=he.onTabClick,Gn=he.onTabScroll,ar=he.indicatorSize,ur=(0,ze.useRef)(),Ve=(0,ze.useRef)(),Je=(0,ze.useRef)(),Pt=(0,ze.useRef)(),_t=(0,ze.useRef)(),hn=(0,ze.useRef)(),Dn=(0,ze.useRef)(),An=kn==="top"||kn==="bottom",or=Ot(0,function(za,ga){An&&Gn&&Gn({direction:za>ga?"left":"right"})}),Un=(0,ge.Z)(or,2),Tn=Un[0],tr=Un[1],dr=Ot(0,function(za,ga){!An&&Gn&&Gn({direction:za>ga?"top":"bottom"})}),Pr=(0,ge.Z)(dr,2),fr=Pr[0],Fr=Pr[1],ri=(0,ze.useState)([0,0]),Vr=(0,ge.Z)(ri,2),ii=Vr[0],Br=Vr[1],Jr=(0,ze.useState)([0,0]),si=(0,ge.Z)(Jr,2),_i=si[0],Hr=si[1],Bi=(0,ze.useState)([0,0]),zi=(0,ge.Z)(Bi,2),Ia=zi[0],ma=zi[1],qi=(0,ze.useState)([0,0]),Oi=(0,ge.Z)(qi,2),Ri=Oi[0],xi=Oi[1],ea=Cn(new Map),wi=(0,ge.Z)(ea,2),ci=wi[0],Wi=wi[1],ha=Ie(et,ci,_i[0]),go=Mn(ii,An),lo=Mn(_i,An),Ua=Mn(Ia,An),Ba=Mn(Ri,An),Ea=go<lo+Ua,ji=Ea?go-Ba:go-Ua,Ao="".concat(je,"-nav-operations-hidden"),la=0,Li=0;An&&En?(la=0,Li=Math.max(0,lo-ji)):(la=Math.min(0,ji-lo),Li=0);function xa(za){return za<la?la:za>Li?Li:za}var Ya=(0,ze.useRef)(),Ma=(0,ze.useState)(),Ta=(0,ge.Z)(Ma,2),Ki=Ta[0],Ja=Ta[1];function vo(){Ja(Date.now())}function ro(){window.clearTimeout(Ya.current)}Qt(Pt,function(za,ga){function so(ko,fs){ko(function(ss){var $l=xa(ss+fs);return $l})}return Ea?(An?so(tr,za):so(Fr,ga),ro(),vo(),!0):!1}),(0,ze.useEffect)(function(){return ro(),Ki&&(Ya.current=window.setTimeout(function(){Ja(0)},100)),ro},[Ki]);var yo=ln(ha,ji,An?Tn:fr,lo,Ua,Ba,(0,ke.Z)((0,ke.Z)({},he),{},{tabs:et})),Mo=(0,ge.Z)(yo,2),Xo=Mo[0],io=Mo[1],So=dt(function(){var za=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nn,ga=ha.get(za)||{width:0,height:0,left:0,right:0,top:0};if(An){var so=Tn;En?ga.right<Tn?so=ga.right:ga.right+ga.width>Tn+ji&&(so=ga.right+ga.width-ji):ga.left<-Tn?so=-ga.left:ga.left+ga.width>-Tn+ji&&(so=-(ga.left+ga.width-ji)),Fr(0),tr(xa(so))}else{var ko=fr;ga.top<-fr?ko=-ga.top:ga.top+ga.height>-fr+ji&&(ko=-(ga.top+ga.height-ji)),tr(0),Fr(xa(ko))}}),os={};kn==="top"||kn==="bottom"?os[En?"marginRight":"marginLeft"]=ir:os.marginTop=ir;var rs=et.map(function(za,ga){var so=za.key;return ze.createElement(Sr,{id:Wt,prefixCls:je,key:so,tab:za,style:ga===0?void 0:os,closable:za.closable,editable:un,active:so===Nn,renderWrapper:$n,removeAriaLabel:Gt==null?void 0:Gt.removeAriaLabel,onClick:function(fs){Hn(so,fs)},onFocus:function(){So(so),vo(),Pt.current&&(En||(Pt.current.scrollLeft=0),Pt.current.scrollTop=0)}})}),cs=function(){return Wi(function(){var ga=new Map;return et.forEach(function(so){var ko,fs=so.key,ss=(ko=_t.current)===null||ko===void 0?void 0:ko.querySelector('[data-node-key="'.concat(Oe(fs),'"]'));ss&&ga.set(fs,{width:ss.offsetWidth,height:ss.offsetHeight,left:ss.offsetLeft,top:ss.offsetTop})}),ga})};(0,ze.useEffect)(function(){cs()},[et.map(function(za){return za.key}).join("_")]);var Oo=Zn(function(){var za=tn(ur),ga=tn(Ve),so=tn(Je);Br([za[0]-ga[0]-so[0],za[1]-ga[1]-so[1]]);var ko=tn(Dn);ma(ko);var fs=tn(hn);xi(fs);var ss=tn(_t);Hr([ss[0]-ko[0],ss[1]-ko[1]]),cs()}),bo=et.slice(0,Xo),sa=et.slice(io+1),Sa=[].concat((0,$e.Z)(bo),(0,$e.Z)(sa)),Qa=ha.get(Nn),co=on({activeTabOffset:Qa,horizontal:An,rtl:En,indicatorSize:ar}),jo=co.style;(0,ze.useEffect)(function(){So()},[Nn,la,Li,zn(Qa),zn(ha),An]),(0,ze.useEffect)(function(){Oo()},[En]);var us=!!Sa.length,xs="".concat(je,"-nav-wrap"),Js,Fs,ds,zs;return An?En?(Fs=Tn>0,Js=Tn!==Li):(Js=Tn<0,Fs=Tn!==la):(ds=fr<0,zs=fr!==la),ze.createElement(Ft.Z,{onResize:Oo},ze.createElement("div",{ref:en(Pe,ur),role:"tablist",className:ye()("".concat(je,"-nav"),tt),style:kt,onKeyDown:function(){vo()}},ze.createElement(se,{ref:Ve,position:"left",extra:cn,prefixCls:je}),ze.createElement(Ft.Z,{onResize:Oo},ze.createElement("div",{className:ye()(xs,(Fe={},(0,ce.Z)(Fe,"".concat(xs,"-ping-left"),Js),(0,ce.Z)(Fe,"".concat(xs,"-ping-right"),Fs),(0,ce.Z)(Fe,"".concat(xs,"-ping-top"),ds),(0,ce.Z)(Fe,"".concat(xs,"-ping-bottom"),zs),Fe)),ref:Pt},ze.createElement(Ft.Z,{onResize:Oo},ze.createElement("div",{ref:_t,className:"".concat(je,"-nav-list"),style:{transform:"translate(".concat(Tn,"px, ").concat(fr,"px)"),transition:Ki?"none":void 0}},rs,ze.createElement(ve,{ref:Dn,prefixCls:je,locale:Gt,editable:un,style:(0,ke.Z)((0,ke.Z)({},rs.length===0?void 0:os),{},{visibility:us?"hidden":null})}),ze.createElement("div",{className:ye()("".concat(je,"-ink-bar"),(0,ce.Z)({},"".concat(je,"-ink-bar-animated"),Sn.inkBar)),style:jo}))))),ze.createElement(yn,(0,_e.Z)({},he,{removeAriaLabel:Gt==null?void 0:Gt.removeAriaLabel,ref:hn,prefixCls:je,tabs:Sa,className:!us&&Ao,tabMoving:!!Ki})),ze.createElement(se,{ref:Je,position:"right",extra:cn,prefixCls:je})))}var rr=ze.forwardRef(wn),zr=["renderTabBar"],vr=["label","key"];function yr(he){var Pe=he.renderTabBar,Fe=(0,lt.Z)(he,zr),We=ze.useContext(He),je=We.tabs;if(Pe){var et=(0,ke.Z)((0,ke.Z)({},Fe),{},{panes:je.map(function(tt){var kt=tt.label,Wt=tt.key,Sn=(0,lt.Z)(tt,vr);return ze.createElement(xt,(0,_e.Z)({tab:kt,key:Wt,tabKey:Wt},Sn))})});return Pe(et,rr)}return ze.createElement(rr,Fe)}var Lr={},Dr=[],hi=function(Pe){Dr.push(Pe)};function Vn(he,Pe){if(0)var Fe}function br(he,Pe){if(0)var Fe}function Ui(){Lr={}}function na(he,Pe,Fe){!Pe&&!Lr[Fe]&&(he(!1,Fe),Lr[Fe]=!0)}function Wr(he,Pe){na(Vn,he,Pe)}function vi(he,Pe){na(br,he,Pe)}Wr.preMessage=hi,Wr.resetWarned=Ui,Wr.noteOnce=vi;var ra=null;function Kr(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Pe;return he===!1?Pe={inkBar:!1,tabPane:!1}:he===!0?Pe={inkBar:!0,tabPane:!1}:Pe=(0,ke.Z)({inkBar:!0},(0,Ae.Z)(he)==="object"?he:{}),Pe.tabPaneMotion&&Pe.tabPane===void 0&&(Pe.tabPane=!0),!Pe.tabPaneMotion&&Pe.tabPane&&(Pe.tabPane=!1),Pe}var Vi=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],lr=0;function Na(he,Pe){var Fe,We=he.id,je=he.prefixCls,et=je===void 0?"rc-tabs":je,tt=he.className,kt=he.items,Wt=he.direction,Sn=he.activeKey,Nn=he.defaultActiveKey,En=he.editable,cn=he.animated,un=he.tabPosition,Gt=un===void 0?"top":un,kn=he.tabBarGutter,ir=he.tabBarStyle,$n=he.tabBarExtraContent,Hn=he.locale,Gn=he.moreIcon,ar=he.moreTransitionName,ur=he.destroyInactiveTabPane,Ve=he.renderTabBar,Je=he.onChange,Pt=he.onTabClick,_t=he.onTabScroll,hn=he.getPopupContainer,Dn=he.popupClassName,An=he.indicatorSize,or=(0,lt.Z)(he,Vi),Un=ze.useMemo(function(){return(kt||[]).filter(function(xi){return xi&&(0,Ae.Z)(xi)==="object"&&"key"in xi})},[kt]),Tn=Wt==="rtl",tr=Kr(cn),dr=(0,ze.useState)(!1),Pr=(0,ge.Z)(dr,2),fr=Pr[0],Fr=Pr[1];(0,ze.useEffect)(function(){Fr(st())},[]);var ri=Ce(function(){var xi;return(xi=Un[0])===null||xi===void 0?void 0:xi.key},{value:Sn,defaultValue:Nn}),Vr=(0,ge.Z)(ri,2),ii=Vr[0],Br=Vr[1],Jr=(0,ze.useState)(function(){return Un.findIndex(function(xi){return xi.key===ii})}),si=(0,ge.Z)(Jr,2),_i=si[0],Hr=si[1];(0,ze.useEffect)(function(){var xi=Un.findIndex(function(wi){return wi.key===ii});if(xi===-1){var ea;xi=Math.max(0,Math.min(_i,Un.length-1)),Br((ea=Un[xi])===null||ea===void 0?void 0:ea.key)}Hr(xi)},[Un.map(function(xi){return xi.key}).join("_"),ii,_i]);var Bi=Ce(null,{value:We}),zi=(0,ge.Z)(Bi,2),Ia=zi[0],ma=zi[1];(0,ze.useEffect)(function(){We||(ma("rc-tabs-".concat(lr)),lr+=1)},[]);function qi(xi,ea){Pt==null||Pt(xi,ea);var wi=xi!==ii;Br(xi),wi&&(Je==null||Je(xi))}var Oi={id:Ia,activeKey:ii,animated:tr,tabPosition:Gt,rtl:Tn,mobile:fr},Ri=(0,ke.Z)((0,ke.Z)({},Oi),{},{editable:En,locale:Hn,moreIcon:Gn,moreTransitionName:ar,tabBarGutter:kn,onTabClick:qi,onTabScroll:_t,extra:$n,style:ir,panes:null,getPopupContainer:hn,popupClassName:Dn,indicatorSize:An});return ze.createElement(He.Provider,{value:{tabs:Un,prefixCls:et}},ze.createElement("div",(0,_e.Z)({ref:Pe,id:We,className:ye()(et,"".concat(et,"-").concat(Gt),(Fe={},(0,ce.Z)(Fe,"".concat(et,"-mobile"),fr),(0,ce.Z)(Fe,"".concat(et,"-editable"),En),(0,ce.Z)(Fe,"".concat(et,"-rtl"),Tn),Fe),tt)},or),ze.createElement(yr,(0,_e.Z)({},Ri,{renderTabBar:Ve})),ze.createElement(ut,(0,_e.Z)({destroyInactiveTabPane:ur},Oi,{animated:tr}))))}var Ca=ze.forwardRef(Na),ho=Ca,Ha=ho,_a=ie(53124),Ji=ie(98675),ya=()=>null,Wa=ie(33603);const po={motionAppear:!1,motionEnter:!0,motionLeave:!0};function ja(he){let Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Fe;return Pe===!1?Fe={inkBar:!1,tabPane:!1}:Pe===!0?Fe={inkBar:!0,tabPane:!0}:Fe=Object.assign({inkBar:!0},typeof Pe=="object"?Pe:{}),Fe.tabPane&&(Fe.tabPaneMotion=Object.assign(Object.assign({},po),{motionName:(0,Wa.m)(he,"switch")})),Fe}var Pa=ie(37419),mo=function(he,Pe){var Fe={};for(var We in he)Object.prototype.hasOwnProperty.call(he,We)&&Pe.indexOf(We)<0&&(Fe[We]=he[We]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,We=Object.getOwnPropertySymbols(he);je<We.length;je++)Pe.indexOf(We[je])<0&&Object.prototype.propertyIsEnumerable.call(he,We[je])&&(Fe[We[je]]=he[We[je]]);return Fe};function Eo(he){return he.filter(Pe=>Pe)}function no(he,Pe){if(he)return he;const Fe=(0,Pa.Z)(Pe).map(We=>{if(ze.isValidElement(We)){const{key:je,props:et}=We,tt=et||{},{tab:kt}=tt,Wt=mo(tt,["tab"]);return Object.assign(Object.assign({key:String(je)},Wt),{label:kt})}return null});return Eo(Fe)}var ia=ie(14747),Zt=ie(67968),At=ie(45503),xn=ie(67771),hr=he=>{const{componentCls:Pe,motionDurationSlow:Fe}=he;return[{[Pe]:{[`${Pe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Fe}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Fe}`}}}}},[(0,xn.oN)(he,"slide-up"),(0,xn.oN)(he,"slide-down")]]};const Qr=he=>{const{componentCls:Pe,tabsCardPadding:Fe,cardBg:We,cardGutter:je,colorBorderSecondary:et,itemSelectedColor:tt}=he;return{[`${Pe}-card`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab`]:{margin:0,padding:Fe,background:We,border:`${he.lineWidth}px ${he.lineType} ${et}`,transition:`all ${he.motionDurationSlow} ${he.motionEaseInOut}`},[`${Pe}-tab-active`]:{color:tt,background:he.colorBgContainer},[`${Pe}-ink-bar`]:{visibility:"hidden"}},[`&${Pe}-top, &${Pe}-bottom`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab + ${Pe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${je}px`}}}},[`&${Pe}-top`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab`]:{borderRadius:`${he.borderRadiusLG}px ${he.borderRadiusLG}px 0 0`},[`${Pe}-tab-active`]:{borderBottomColor:he.colorBgContainer}}},[`&${Pe}-bottom`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab`]:{borderRadius:`0 0 ${he.borderRadiusLG}px ${he.borderRadiusLG}px`},[`${Pe}-tab-active`]:{borderTopColor:he.colorBgContainer}}},[`&${Pe}-left, &${Pe}-right`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab + ${Pe}-tab`]:{marginTop:`${je}px`}}},[`&${Pe}-left`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${he.borderRadiusLG}px 0 0 ${he.borderRadiusLG}px`}},[`${Pe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:he.colorBgContainer}}}},[`&${Pe}-right`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${he.borderRadiusLG}px ${he.borderRadiusLG}px 0`}},[`${Pe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:he.colorBgContainer}}}}}}},ni=he=>{const{componentCls:Pe,itemHoverColor:Fe,dropdownEdgeChildVerticalPadding:We}=he;return{[`${Pe}-dropdown`]:Object.assign(Object.assign({},(0,ia.Wf)(he)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:he.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Pe}-dropdown-menu`]:{maxHeight:he.tabsDropdownHeight,margin:0,padding:`${We}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:he.colorBgContainer,backgroundClip:"padding-box",borderRadius:he.borderRadiusLG,outline:"none",boxShadow:he.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ia.vS),{display:"flex",alignItems:"center",minWidth:he.tabsDropdownWidth,margin:0,padding:`${he.paddingXXS}px ${he.paddingSM}px`,color:he.colorText,fontWeight:"normal",fontSize:he.fontSize,lineHeight:he.lineHeight,cursor:"pointer",transition:`all ${he.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:he.marginSM},color:he.colorTextDescription,fontSize:he.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Fe}},"&:hover":{background:he.controlItemBgHover},"&-disabled":{"&, &:hover":{color:he.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},mi=he=>{const{componentCls:Pe,margin:Fe,colorBorderSecondary:We,horizontalMargin:je,verticalItemPadding:et,verticalItemMargin:tt}=he;return{[`${Pe}-top, ${Pe}-bottom`]:{flexDirection:"column",[`> ${Pe}-nav, > div > ${Pe}-nav`]:{margin:je,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${he.lineWidth}px ${he.lineType} ${We}`,content:"''"},[`${Pe}-ink-bar`]:{height:he.lineWidthBold,"&-animated":{transition:`width ${he.motionDurationSlow}, left ${he.motionDurationSlow},
|
|
|
right ${he.motionDurationSlow}`}},[`${Pe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:he.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:he.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:he.boxShadowTabsOverflowRight},[`&${Pe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Pe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Pe}-top`]:{[`> ${Pe}-nav,
|
|
|
> div > ${Pe}-nav`]:{"&::before":{bottom:0},[`${Pe}-ink-bar`]:{bottom:0}}},[`${Pe}-bottom`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{order:1,marginTop:`${Fe}px`,marginBottom:0,"&::before":{top:0},[`${Pe}-ink-bar`]:{top:0}},[`> ${Pe}-content-holder, > div > ${Pe}-content-holder`]:{order:0}},[`${Pe}-left, ${Pe}-right`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{flexDirection:"column",minWidth:he.controlHeight*1.25,[`${Pe}-tab`]:{padding:et,textAlign:"center"},[`${Pe}-tab + ${Pe}-tab`]:{margin:tt},[`${Pe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:he.controlHeight},"&::before":{top:0,boxShadow:he.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:he.boxShadowTabsOverflowBottom},[`&${Pe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Pe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Pe}-ink-bar`]:{width:he.lineWidthBold,"&-animated":{transition:`height ${he.motionDurationSlow}, top ${he.motionDurationSlow}`}},[`${Pe}-nav-list, ${Pe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Pe}-left`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Pe}-content-holder, > div > ${Pe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${he.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${he.lineWidth}px ${he.lineType} ${he.colorBorder}`},[`> ${Pe}-content > ${Pe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:he.paddingLG}}}},[`${Pe}-right`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{order:1,[`${Pe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Pe}-content-holder, > div > ${Pe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-he.lineWidth},borderRight:{_skip_check_:!0,value:`${he.lineWidth}px ${he.lineType} ${he.colorBorder}`},[`> ${Pe}-content > ${Pe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:he.paddingLG}}}}}},ki=he=>{const{componentCls:Pe,cardPaddingSM:Fe,cardPaddingLG:We,horizontalItemPaddingSM:je,horizontalItemPaddingLG:et}=he;return{[Pe]:{"&-small":{[`> ${Pe}-nav`]:{[`${Pe}-tab`]:{padding:je,fontSize:he.titleFontSizeSM}}},"&-large":{[`> ${Pe}-nav`]:{[`${Pe}-tab`]:{padding:et,fontSize:he.titleFontSizeLG}}}},[`${Pe}-card`]:{[`&${Pe}-small`]:{[`> ${Pe}-nav`]:{[`${Pe}-tab`]:{padding:Fe}},[`&${Pe}-bottom`]:{[`> ${Pe}-nav ${Pe}-tab`]:{borderRadius:`0 0 ${he.borderRadius}px ${he.borderRadius}px`}},[`&${Pe}-top`]:{[`> ${Pe}-nav ${Pe}-tab`]:{borderRadius:`${he.borderRadius}px ${he.borderRadius}px 0 0`}},[`&${Pe}-right`]:{[`> ${Pe}-nav ${Pe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${he.borderRadius}px ${he.borderRadius}px 0`}}},[`&${Pe}-left`]:{[`> ${Pe}-nav ${Pe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${he.borderRadius}px 0 0 ${he.borderRadius}px`}}}},[`&${Pe}-large`]:{[`> ${Pe}-nav`]:{[`${Pe}-tab`]:{padding:We}}}}}},Si=he=>{const{componentCls:Pe,itemActiveColor:Fe,itemHoverColor:We,iconCls:je,tabsHorizontalItemMargin:et,horizontalItemPadding:tt,itemSelectedColor:kt,itemColor:Wt}=he,Sn=`${Pe}-tab`;return{[Sn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:tt,fontSize:he.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Wt,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Fe}},(0,ia.Qy)(he)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-he.marginXXS},marginLeft:{_skip_check_:!0,value:he.marginXS},color:he.colorTextDescription,fontSize:he.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${he.motionDurationSlow}`,"&:hover":{color:he.colorTextHeading}},"&:hover":{color:We},[`&${Sn}-active ${Sn}-btn`]:{color:kt,textShadow:he.tabsActiveTextShadow},[`&${Sn}-disabled`]:{color:he.colorTextDisabled,cursor:"not-allowed"},[`&${Sn}-disabled ${Sn}-btn, &${Sn}-disabled ${Pe}-remove`]:{"&:focus, &:active":{color:he.colorTextDisabled}},[`& ${Sn}-remove ${je}`]:{margin:0},[je]:{marginRight:{_skip_check_:!0,value:he.marginSM}}},[`${Sn} + ${Sn}`]:{margin:{_skip_check_:!0,value:et}}}},Qi=he=>{const{componentCls:Pe,tabsHorizontalItemMarginRTL:Fe,iconCls:We,cardGutter:je}=he;return{[`${Pe}-rtl`]:{direction:"rtl",[`${Pe}-nav`]:{[`${Pe}-tab`]:{margin:{_skip_check_:!0,value:Fe},[`${Pe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[We]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${he.marginSM}px`}},[`${Pe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${he.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${he.marginXXS}px`},[We]:{margin:0}}}},[`&${Pe}-left`]:{[`> ${Pe}-nav`]:{order:1},[`> ${Pe}-content-holder`]:{order:0}},[`&${Pe}-right`]:{[`> ${Pe}-nav`]:{order:0},[`> ${Pe}-content-holder`]:{order:1}},[`&${Pe}-card${Pe}-top, &${Pe}-card${Pe}-bottom`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-tab + ${Pe}-tab`]:{marginRight:{_skip_check_:!0,value:je},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Pe}-dropdown-rtl`]:{direction:"rtl"},[`${Pe}-menu-item`]:{[`${Pe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},aa=he=>{const{componentCls:Pe,tabsCardPadding:Fe,cardHeight:We,cardGutter:je,itemHoverColor:et,itemActiveColor:tt,colorBorderSecondary:kt}=he;return{[Pe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ia.Wf)(he)),{display:"flex",[`> ${Pe}-nav, > div > ${Pe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Pe}-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 ${he.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Pe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${he.motionDurationSlow}`},[`${Pe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Pe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Pe}-nav-more`]:{position:"relative",padding:Fe,background:"transparent",border:0,color:he.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:he.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Pe}-nav-add`]:Object.assign({minWidth:We,marginLeft:{_skip_check_:!0,value:je},padding:`0 ${he.paddingXS}px`,background:"transparent",border:`${he.lineWidth}px ${he.lineType} ${kt}`,borderRadius:`${he.borderRadiusLG}px ${he.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:he.colorText,transition:`all ${he.motionDurationSlow} ${he.motionEaseInOut}`,"&:hover":{color:et},"&:active, &:focus:not(:focus-visible)":{color:tt}},(0,ia.Qy)(he))},[`${Pe}-extra-content`]:{flex:"none"},[`${Pe}-ink-bar`]:{position:"absolute",background:he.inkBarColor,pointerEvents:"none"}}),Si(he)),{[`${Pe}-content`]:{position:"relative",width:"100%"},[`${Pe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Pe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Pe}-centered`]:{[`> ${Pe}-nav, > div > ${Pe}-nav`]:{[`${Pe}-nav-wrap`]:{[`&:not([class*='${Pe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var ba=(0,Zt.Z)("Tabs",he=>{const Pe=(0,At.TS)(he,{tabsCardPadding:he.cardPadding||`${(he.cardHeight-Math.round(he.fontSize*he.lineHeight))/2-he.lineWidth}px ${he.padding}px`,dropdownEdgeChildVerticalPadding:he.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${he.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${he.horizontalItemGutter}px`});return[ki(Pe),Qi(Pe),mi(Pe),ni(Pe),Qr(Pe),aa(Pe),hr(Pe)]},he=>{const Pe=he.controlHeightLG;return{zIndexPopup:he.zIndexPopupBase+50,cardBg:he.colorFillAlter,cardHeight:Pe,cardPadding:"",cardPaddingSM:`${he.paddingXXS*1.5}px ${he.padding}px`,cardPaddingLG:`${he.paddingXS}px ${he.padding}px ${he.paddingXXS*1.5}px`,titleFontSize:he.fontSize,titleFontSizeLG:he.fontSizeLG,titleFontSizeSM:he.fontSize,inkBarColor:he.colorPrimary,horizontalMargin:`0 0 ${he.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${he.paddingSM}px 0`,horizontalItemPaddingSM:`${he.paddingXS}px 0`,horizontalItemPaddingLG:`${he.padding}px 0`,verticalItemPadding:`${he.paddingXS}px ${he.paddingLG}px`,verticalItemMargin:`${he.margin}px 0 0 0`,itemColor:he.colorText,itemSelectedColor:he.colorPrimary,itemHoverColor:he.colorPrimaryHover,itemActiveColor:he.colorPrimaryActive,cardGutter:he.marginXXS/2}}),sn=function(he,Pe){var Fe={};for(var We in he)Object.prototype.hasOwnProperty.call(he,We)&&Pe.indexOf(We)<0&&(Fe[We]=he[We]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,We=Object.getOwnPropertySymbols(he);je<We.length;je++)Pe.indexOf(We[je])<0&&Object.prototype.propertyIsEnumerable.call(he,We[je])&&(Fe[We[je]]=he[We[je]]);return Fe};const bn=he=>{const{type:Pe,className:Fe,rootClassName:We,size:je,onEdit:et,hideAdd:tt,centered:kt,addIcon:Wt,popupClassName:Sn,children:Nn,items:En,animated:cn,style:un,indicatorSize:Gt}=he,kn=sn(he,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:ir,moreIcon:$n=ze.createElement(Te.Z,null)}=kn,{direction:Hn,tabs:Gn,getPrefixCls:ar,getPopupContainer:ur}=ze.useContext(_a.E_),Ve=ar("tabs",ir),[Je,Pt]=ba(Ve);let _t;Pe==="editable-card"&&(_t={onEdit:(Tn,tr)=>{let{key:dr,event:Pr}=tr;et==null||et(Tn==="add"?Pr:dr,Tn)},removeIcon:ze.createElement(fe.Z,null),addIcon:Wt||ze.createElement(Re.Z,null),showAdd:tt!==!0});const hn=ar(),Dn=no(En,Nn),An=ja(Ve,cn),or=(0,Ji.Z)(je),Un=Object.assign(Object.assign({},Gn==null?void 0:Gn.style),un);return Je(ze.createElement(Ha,Object.assign({direction:Hn,getPopupContainer:ur,moreTransitionName:`${hn}-slide-up`},kn,{items:Dn,className:ye()({[`${Ve}-${or}`]:or,[`${Ve}-card`]:["card","editable-card"].includes(Pe),[`${Ve}-editable-card`]:Pe==="editable-card",[`${Ve}-centered`]:kt},Gn==null?void 0:Gn.className,Fe,We,Pt),popupClassName:ye()(Sn,Pt),style:Un,editable:_t,moreIcon:$n,prefixCls:Ve,animated:An,indicatorSize:Gt!=null?Gt:Gn==null?void 0:Gn.indicatorSize})))};bn.TabPane=ya;var Fn=bn},79870:function(Ln,Kt,ie){"use strict";ie.d(Kt,{default:function(){return ba}});var fe=ie(87462),Te=ie(4942),Re=ie(71002),Ge=ie(1413),ye=ie(74902),_e=ie(15671),ce=ie(43144),ke=ie(97326),ge=ie(60136),Ae=ie(51630),lt=ie(94184),ze=ie.n(lt),st={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(bn){var Fn=bn.keyCode;if(bn.altKey&&!bn.ctrlKey||bn.metaKey||Fn>=st.F1&&Fn<=st.F12)return!1;switch(Fn){case st.ALT:case st.CAPS_LOCK:case st.CONTEXT_MENU:case st.CTRL:case st.DOWN:case st.END:case st.ESC:case st.HOME:case st.INSERT:case st.LEFT:case st.MAC_FF_META:case st.META:case st.NUMLOCK:case st.NUM_CENTER:case st.PAGE_DOWN:case st.PAGE_UP:case st.PAUSE:case st.PRINT_SCREEN:case st.RIGHT:case st.SHIFT:case st.UP:case st.WIN_KEY:case st.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(bn){if(bn>=st.ZERO&&bn<=st.NINE||bn>=st.NUM_ZERO&&bn<=st.NUM_MULTIPLY||bn>=st.A&&bn<=st.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&bn===0)return!0;switch(bn){case st.SPACE:case st.QUESTION_MARK:case st.NUM_PLUS:case st.NUM_MINUS:case st.NUM_PERIOD:case st.NUM_DIVISION:case st.SEMICOLON:case st.DASH:case st.EQUALS:case st.COMMA:case st.PERIOD:case st.SLASH:case st.APOSTROPHE:case st.SINGLE_QUOTE:case st.OPEN_SQUARE_BRACKET:case st.BACKSLASH:case st.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},dt=st,ct=ie(34952),qe=ie(72978),be=ie(67294),vt=ie(69610);function Dt(sn){var bn=sn.dropPosition,Fn=sn.dropLevelOffset,he=sn.indent,Pe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(bn){case-1:Pe.top=0,Pe.left=-Fn*he;break;case 1:Pe.bottom=0,Pe.left=-Fn*he;break;case 0:Pe.bottom=0,Pe.left=he;break}return be.createElement("div",{style:Pe})}var it=ie(36459),ot=ie(97685),Ce=ie(45987);function Se(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var He=Se()?be.useLayoutEffect:be.useEffect,Ue=He,xt=function(bn,Fn){var he=React.useRef(!0);He(function(){if(!he.current)return bn()},Fn),He(function(){return he.current=!1,function(){he.current=!0}},[])},mt=ie(73299),ut=ie(73935);function $e(sn){return sn instanceof HTMLElement||sn instanceof SVGElement}function Ft(sn){return $e(sn)?sn:sn instanceof be.Component?ut.findDOMNode(sn):null}var yt=ie(28580);function gn(sn,bn,Fn){var he=React.useRef({});return(!("value"in he.current)||Fn(he.current.condition,bn))&&(he.current.value=sn(),he.current.condition=bn),he.current.value}function rt(sn,bn){typeof sn=="function"?sn(bn):(0,Re.Z)(sn)==="object"&&sn&&"current"in sn&&(sn.current=bn)}function Mt(){for(var sn=arguments.length,bn=new Array(sn),Fn=0;Fn<sn;Fn++)bn[Fn]=arguments[Fn];var he=bn.filter(function(Pe){return Pe});return he.length<=1?he[0]:function(Pe){bn.forEach(function(Fe){rt(Fe,Pe)})}}function en(){for(var sn=arguments.length,bn=new Array(sn),Fn=0;Fn<sn;Fn++)bn[Fn]=arguments[Fn];return useMemo(function(){return Mt.apply(void 0,bn)},bn,function(he,Pe){return he.length===Pe.length&&he.every(function(Fe,We){return Fe===Pe[We]})})}function Yt(sn){var bn,Fn,he=(0,yt.isMemo)(sn)?sn.type.type:sn.type;return!(typeof he=="function"&&!((bn=he.prototype)!==null&&bn!==void 0&&bn.render)||typeof sn=="function"&&!((Fn=sn.prototype)!==null&&Fn!==void 0&&Fn.render))}function Qe(sn,bn){var Fn={};return Fn[sn.toLowerCase()]=bn.toLowerCase(),Fn["Webkit".concat(sn)]="webkit".concat(bn),Fn["Moz".concat(sn)]="moz".concat(bn),Fn["ms".concat(sn)]="MS".concat(bn),Fn["O".concat(sn)]="o".concat(bn.toLowerCase()),Fn}function Ie(sn,bn){var Fn={animationend:Qe("Animation","AnimationEnd"),transitionend:Qe("Transition","TransitionEnd")};return sn&&("AnimationEvent"in bn||delete Fn.animationend.animation,"TransitionEvent"in bn||delete Fn.transitionend.transition),Fn}var Ot=Ie(Se(),typeof window!="undefined"?window:{}),In={};if(Se()){var mn=document.createElement("div");In=mn.style}var pt={};function wt(sn){if(pt[sn])return pt[sn];var bn=Ot[sn];if(bn)for(var Fn=Object.keys(bn),he=Fn.length,Pe=0;Pe<he;Pe+=1){var Fe=Fn[Pe];if(Object.prototype.hasOwnProperty.call(bn,Fe)&&Fe in In)return pt[sn]=bn[Fe],pt[sn]}return""}var Qt=wt("animationend"),Zn=wt("transitionend"),Cn=!!(Qt&&Zn),rn=Qt||"animationend",ln=Zn||"transitionend";function zn(sn,bn){if(!sn)return null;if((0,Re.Z)(sn)==="object"){var Fn=bn.replace(/-\w/g,function(he){return he[1].toUpperCase()});return sn[Fn]}return"".concat(sn,"-").concat(bn)}var _n="none",Oe="appear",ue="enter",le="leave",ve="none",pe="prepare",se="start",Be="active",ft="end";function Bt(sn){var bn=be.useRef(!1),Fn=be.useState(sn),he=(0,ot.Z)(Fn,2),Pe=he[0],Fe=he[1];be.useEffect(function(){return bn.current=!1,function(){bn.current=!0}},[]);function We(je,et){et&&bn.current||Fe(je)}return[Pe,We]}var qt=function(bn){return+setTimeout(bn,16)},an=function(bn){return clearTimeout(bn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(qt=function(bn){return window.requestAnimationFrame(bn)},an=function(bn){return window.cancelAnimationFrame(bn)});var vn=0,dn=new Map;function gt(sn){dn.delete(sn)}var It=function(bn){var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;vn+=1;var he=vn;function Pe(Fe){if(Fe===0)gt(he),bn();else{var We=qt(function(){Pe(Fe-1)});dn.set(he,We)}}return Pe(Fn),he};It.cancel=function(sn){var bn=dn.get(sn);return gt(bn),an(bn)};var Ht=It,Xt=function(){var sn=be.useRef(null);function bn(){Ht.cancel(sn.current)}function Fn(he){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;bn();var Fe=Ht(function(){Pe<=1?he({isCanceled:function(){return Fe!==sn.current}}):Fn(he,Pe-1)});sn.current=Fe}return be.useEffect(function(){return function(){bn()}},[]),[Fn,bn]},Tt=Se()?be.useLayoutEffect:be.useEffect,Yn=Tt,Rn=[pe,se,Be,ft],cr=!1,Xr=!0;function wr(sn){return sn===Be||sn===ft}var kr=function(sn,bn){var Fn=Bt(ve),he=(0,ot.Z)(Fn,2),Pe=he[0],Fe=he[1],We=Xt(),je=(0,ot.Z)(We,2),et=je[0],tt=je[1];function kt(){Fe(pe,!0)}return Yn(function(){if(Pe!==ve&&Pe!==ft){var Wt=Rn.indexOf(Pe),Sn=Rn[Wt+1],Nn=bn(Pe);Nn===cr?Fe(Sn,!0):et(function(En){function cn(){En.isCanceled()||Fe(Sn,!0)}Nn===!0?cn():Promise.resolve(Nn).then(cn)})}},[sn,Pe]),be.useEffect(function(){return function(){tt()}},[]),[kt,Pe]},Ar=function(sn){var bn=(0,be.useRef)(),Fn=(0,be.useRef)(sn);Fn.current=sn;var he=be.useCallback(function(We){Fn.current(We)},[]);function Pe(We){We&&(We.removeEventListener(ln,he),We.removeEventListener(rn,he))}function Fe(We){bn.current&&bn.current!==We&&Pe(bn.current),We&&We!==bn.current&&(We.addEventListener(ln,he),We.addEventListener(rn,he),bn.current=We)}return be.useEffect(function(){return function(){Pe(bn.current)}},[]),[Fe,Pe]};function gi(sn,bn,Fn,he){var Pe=he.motionEnter,Fe=Pe===void 0?!0:Pe,We=he.motionAppear,je=We===void 0?!0:We,et=he.motionLeave,tt=et===void 0?!0:et,kt=he.motionDeadline,Wt=he.motionLeaveImmediately,Sn=he.onAppearPrepare,Nn=he.onEnterPrepare,En=he.onLeavePrepare,cn=he.onAppearStart,un=he.onEnterStart,Gt=he.onLeaveStart,kn=he.onAppearActive,ir=he.onEnterActive,$n=he.onLeaveActive,Hn=he.onAppearEnd,Gn=he.onEnterEnd,ar=he.onLeaveEnd,ur=he.onVisibleChanged,Ve=Bt(),Je=(0,ot.Z)(Ve,2),Pt=Je[0],_t=Je[1],hn=Bt(_n),Dn=(0,ot.Z)(hn,2),An=Dn[0],or=Dn[1],Un=Bt(null),Tn=(0,ot.Z)(Un,2),tr=Tn[0],dr=Tn[1],Pr=(0,be.useRef)(!1),fr=(0,be.useRef)(null);function Fr(){return Fn()}var ri=(0,be.useRef)(!1);function Vr(Oi){var Ri=Fr();if(!(Oi&&!Oi.deadline&&Oi.target!==Ri)){var xi=ri.current,ea;An===Oe&&xi?ea=Hn==null?void 0:Hn(Ri,Oi):An===ue&&xi?ea=Gn==null?void 0:Gn(Ri,Oi):An===le&&xi&&(ea=ar==null?void 0:ar(Ri,Oi)),An!==_n&&xi&&ea!==!1&&(or(_n,!0),dr(null,!0))}}var ii=Ar(Vr),Br=(0,ot.Z)(ii,1),Jr=Br[0],si=be.useMemo(function(){var Oi,Ri,xi;switch(An){case Oe:return Oi={},(0,Te.Z)(Oi,pe,Sn),(0,Te.Z)(Oi,se,cn),(0,Te.Z)(Oi,Be,kn),Oi;case ue:return Ri={},(0,Te.Z)(Ri,pe,Nn),(0,Te.Z)(Ri,se,un),(0,Te.Z)(Ri,Be,ir),Ri;case le:return xi={},(0,Te.Z)(xi,pe,En),(0,Te.Z)(xi,se,Gt),(0,Te.Z)(xi,Be,$n),xi;default:return{}}},[An]),_i=kr(An,function(Oi){if(Oi===pe){var Ri=si[pe];return Ri?Ri(Fr()):cr}if(zi in si){var xi;dr(((xi=si[zi])===null||xi===void 0?void 0:xi.call(si,Fr(),null))||null)}return zi===Be&&(Jr(Fr()),kt>0&&(clearTimeout(fr.current),fr.current=setTimeout(function(){Vr({deadline:!0})},kt))),Xr}),Hr=(0,ot.Z)(_i,2),Bi=Hr[0],zi=Hr[1],Ia=wr(zi);ri.current=Ia,Yn(function(){_t(bn);var Oi=Pr.current;if(Pr.current=!0,!!sn){var Ri;!Oi&&bn&&je&&(Ri=Oe),Oi&&bn&&Fe&&(Ri=ue),(Oi&&!bn&&tt||!Oi&&Wt&&!bn&&tt)&&(Ri=le),Ri&&(or(Ri),Bi())}},[bn]),(0,be.useEffect)(function(){(An===Oe&&!je||An===ue&&!Fe||An===le&&!tt)&&or(_n)},[je,Fe,tt]),(0,be.useEffect)(function(){return function(){Pr.current=!1,clearTimeout(fr.current)}},[]);var ma=be.useRef(!1);(0,be.useEffect)(function(){Pt&&(ma.current=!0),Pt!==void 0&&An===_n&&((ma.current||Pt)&&(ur==null||ur(Pt)),ma.current=!0)},[Pt,An]);var qi=tr;return si[pe]&&zi===se&&(qi=(0,Ge.Z)({transition:"none"},qi)),[An,zi,qi,Pt!=null?Pt:bn]}var oi=function(sn){(0,ge.Z)(Fn,sn);var bn=(0,Ae.Z)(Fn);function Fn(){return(0,_e.Z)(this,Fn),bn.apply(this,arguments)}return(0,ce.Z)(Fn,[{key:"render",value:function(){return this.props.children}}]),Fn}(be.Component),fi=oi;function Pi(sn){var bn=sn;(0,Re.Z)(sn)==="object"&&(bn=sn.transitionSupport);function Fn(Pe){return!!(Pe.motionName&&bn)}var he=be.forwardRef(function(Pe,Fe){var We=Pe.visible,je=We===void 0?!0:We,et=Pe.removeOnLeave,tt=et===void 0?!0:et,kt=Pe.forceRender,Wt=Pe.children,Sn=Pe.motionName,Nn=Pe.leavedClassName,En=Pe.eventProps,cn=Fn(Pe),un=(0,be.useRef)(),Gt=(0,be.useRef)();function kn(){try{return un.current instanceof HTMLElement?un.current:Ft(Gt.current)}catch(Un){return null}}var ir=gi(cn,je,kn,Pe),$n=(0,ot.Z)(ir,4),Hn=$n[0],Gn=$n[1],ar=$n[2],ur=$n[3],Ve=be.useRef(ur);ur&&(Ve.current=!0);var Je=be.useCallback(function(Un){un.current=Un,rt(Fe,Un)},[Fe]),Pt,_t=(0,Ge.Z)((0,Ge.Z)({},En),{},{visible:je});if(!Wt)Pt=null;else if(Hn===_n||!Fn(Pe))ur?Pt=Wt((0,Ge.Z)({},_t),Je):!tt&&Ve.current&&Nn?Pt=Wt((0,Ge.Z)((0,Ge.Z)({},_t),{},{className:Nn}),Je):kt||!tt&&!Nn?Pt=Wt((0,Ge.Z)((0,Ge.Z)({},_t),{},{style:{display:"none"}}),Je):Pt=null;else{var hn,Dn;Gn===pe?Dn="prepare":wr(Gn)?Dn="active":Gn===se&&(Dn="start"),Pt=Wt((0,Ge.Z)((0,Ge.Z)({},_t),{},{className:ze()(zn(Sn,Hn),(hn={},(0,Te.Z)(hn,zn(Sn,"".concat(Hn,"-").concat(Dn)),Dn),(0,Te.Z)(hn,Sn,typeof Sn=="string"),hn)),style:ar}),Je)}if(be.isValidElement(Pt)&&Yt(Pt)){var An=Pt,or=An.ref;or||(Pt=be.cloneElement(Pt,{ref:Je}))}return be.createElement(fi,{ref:Gt},Pt)});return he.displayName="CSSMotion",he}var Or=Pi(Cn),Jn="add",qn="keep",nr="remove",Ur="removed";function li(sn){var bn;return sn&&(0,Re.Z)(sn)==="object"&&"key"in sn?bn=sn:bn={key:sn},(0,Ge.Z)((0,Ge.Z)({},bn),{},{key:String(bn.key)})}function Lt(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return sn.map(li)}function Kn(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fn=[],he=0,Pe=bn.length,Fe=Lt(sn),We=Lt(bn);Fe.forEach(function(tt){for(var kt=!1,Wt=he;Wt<Pe;Wt+=1){var Sn=We[Wt];if(Sn.key===tt.key){he<Wt&&(Fn=Fn.concat(We.slice(he,Wt).map(function(Nn){return(0,Ge.Z)((0,Ge.Z)({},Nn),{},{status:Jn})})),he=Wt),Fn.push((0,Ge.Z)((0,Ge.Z)({},Sn),{},{status:qn})),he+=1,kt=!0;break}}kt||Fn.push((0,Ge.Z)((0,Ge.Z)({},tt),{},{status:nr}))}),he<Pe&&(Fn=Fn.concat(We.slice(he).map(function(tt){return(0,Ge.Z)((0,Ge.Z)({},tt),{},{status:Jn})})));var je={};Fn.forEach(function(tt){var kt=tt.key;je[kt]=(je[kt]||0)+1});var et=Object.keys(je).filter(function(tt){return je[tt]>1});return et.forEach(function(tt){Fn=Fn.filter(function(kt){var Wt=kt.key,Sn=kt.status;return Wt!==tt||Sn!==nr}),Fn.forEach(function(kt){kt.key===tt&&(kt.status=qn)})}),Fn}var Bn=["component","children","onVisibleChanged","onAllRemoved"],yn=["status"],xr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Sr(sn){var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Or,Fn=function(he){(0,ge.Z)(Fe,he);var Pe=(0,Ae.Z)(Fe);function Fe(){var We;(0,_e.Z)(this,Fe);for(var je=arguments.length,et=new Array(je),tt=0;tt<je;tt++)et[tt]=arguments[tt];return We=Pe.call.apply(Pe,[this].concat(et)),(0,Te.Z)((0,ke.Z)(We),"state",{keyEntities:[]}),(0,Te.Z)((0,ke.Z)(We),"removeKey",function(kt){var Wt=We.state.keyEntities,Sn=Wt.map(function(Nn){return Nn.key!==kt?Nn:(0,Ge.Z)((0,Ge.Z)({},Nn),{},{status:Ur})});return We.setState({keyEntities:Sn}),Sn.filter(function(Nn){var En=Nn.status;return En!==Ur}).length}),We}return(0,ce.Z)(Fe,[{key:"render",value:function(){var je=this,et=this.state.keyEntities,tt=this.props,kt=tt.component,Wt=tt.children,Sn=tt.onVisibleChanged,Nn=tt.onAllRemoved,En=(0,Ce.Z)(tt,Bn),cn=kt||be.Fragment,un={};return xr.forEach(function(Gt){un[Gt]=En[Gt],delete En[Gt]}),delete En.keys,be.createElement(cn,En,et.map(function(Gt){var kn=Gt.status,ir=(0,Ce.Z)(Gt,yn),$n=kn===Jn||kn===qn;return be.createElement(bn,(0,fe.Z)({},un,{key:ir.key,visible:$n,eventProps:ir,onVisibleChanged:function(Gn){if(Sn==null||Sn(Gn,{key:ir.key}),!Gn){var ar=je.removeKey(ir.key);ar===0&&Nn&&Nn()}}}),Wt)}))}}],[{key:"getDerivedStateFromProps",value:function(je,et){var tt=je.keys,kt=et.keyEntities,Wt=Lt(tt),Sn=Kn(kt,Wt);return{keyEntities:Sn.filter(function(Nn){var En=kt.find(function(cn){var un=cn.key;return Nn.key===un});return!(En&&En.status===Ur&&Nn.status===nr)})}}}]),Fe}(be.Component);return(0,Te.Z)(Fn,"defaultProps",{component:"div"}),Fn}var mr=Sr(Cn),Qn=Or,ht=ie(56261);function Et(sn,bn){var Fn=be.useState(!1),he=(0,ot.Z)(Fn,2),Pe=he[0],Fe=he[1];be.useLayoutEffect(function(){if(Pe)return sn(),function(){bn()}},[Pe]),be.useLayoutEffect(function(){return Fe(!0),function(){Fe(!1)}},[])}var zt=ie(83898),fn=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],at=function(bn,Fn){var he=bn.className,Pe=bn.style,Fe=bn.motion,We=bn.motionNodes,je=bn.motionType,et=bn.onMotionStart,tt=bn.onMotionEnd,kt=bn.active,Wt=bn.treeNodeRequiredProps,Sn=(0,Ce.Z)(bn,fn),Nn=be.useState(!0),En=(0,ot.Z)(Nn,2),cn=En[0],un=En[1],Gt=be.useContext(vt.k),kn=Gt.prefixCls,ir=We&&je!=="hide";Ue(function(){We&&ir!==cn&&un(ir)},[We]);var $n=function(){We&&et()},Hn=be.useRef(!1),Gn=function(){We&&!Hn.current&&(Hn.current=!0,tt())};Et($n,Gn);var ar=function(Ve){ir===Ve&&Gn()};return We?be.createElement(Qn,(0,fe.Z)({ref:Fn,visible:cn},Fe,{motionAppear:je==="show",onVisibleChanged:ar}),function(ur,Ve){var Je=ur.className,Pt=ur.style;return be.createElement("div",{ref:Ve,className:ze()("".concat(kn,"-treenode-motion"),Je),style:Pt},We.map(function(_t){var hn=(0,fe.Z)({},((0,it.Z)(_t.data),_t.data)),Dn=_t.title,An=_t.key,or=_t.isStart,Un=_t.isEnd;delete hn.children;var Tn=(0,zt.H8)(An,Wt);return be.createElement(ht.Z,(0,fe.Z)({},hn,Tn,{title:Dn,active:kt,data:_t.data,key:An,isStart:or,isEnd:Un}))}))}):be.createElement(ht.Z,(0,fe.Z)({domRef:Fn,className:he,style:Pe},Sn,{active:kt}))};at.displayName="MotionTreeNode";var Rt=be.forwardRef(at),on=Rt;function tn(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fn=sn.length,he=bn.length;if(Math.abs(Fn-he)!==1)return{add:!1,key:null};function Pe(Fe,We){var je=new Map;Fe.forEach(function(tt){je.set(tt,!0)});var et=We.filter(function(tt){return!je.has(tt)});return et.length===1?et[0]:null}return Fn<he?{add:!0,key:Pe(sn,bn)}:{add:!1,key:Pe(bn,sn)}}function Mn(sn,bn,Fn){var he=sn.findIndex(function(je){return je.key===Fn}),Pe=sn[he+1],Fe=bn.findIndex(function(je){return je.key===Fn});if(Pe){var We=bn.findIndex(function(je){return je.key===Pe.key});return bn.slice(Fe+1,We)}return bn.slice(Fe+1)}var wn=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],rr={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},zr=function(){},vr="RC_TREE_MOTION_".concat(Math.random()),yr={key:vr},Lr={key:vr,level:0,index:0,pos:"0",node:yr,nodes:[yr]},Dr={parent:null,children:[],pos:Lr.pos,data:yr,title:null,key:vr,isStart:[],isEnd:[]};function hi(sn,bn,Fn,he){return bn===!1||!Fn?sn:sn.slice(0,Math.ceil(Fn/he)+1)}function Vn(sn){var bn=sn.key,Fn=sn.pos;return(0,zt.km)(bn,Fn)}function br(sn){for(var bn=String(sn.data.key),Fn=sn;Fn.parent;)Fn=Fn.parent,bn="".concat(Fn.data.key," > ").concat(bn);return bn}var Ui=be.forwardRef(function(sn,bn){var Fn=sn.prefixCls,he=sn.data,Pe=sn.selectable,Fe=sn.checkable,We=sn.expandedKeys,je=sn.selectedKeys,et=sn.checkedKeys,tt=sn.loadedKeys,kt=sn.loadingKeys,Wt=sn.halfCheckedKeys,Sn=sn.keyEntities,Nn=sn.disabled,En=sn.dragging,cn=sn.dragOverNodeKey,un=sn.dropPosition,Gt=sn.motion,kn=sn.height,ir=sn.itemHeight,$n=sn.virtual,Hn=sn.focusable,Gn=sn.activeItem,ar=sn.focused,ur=sn.tabIndex,Ve=sn.onKeyDown,Je=sn.onFocus,Pt=sn.onBlur,_t=sn.onActiveChange,hn=sn.onListChangeStart,Dn=sn.onListChangeEnd,An=(0,Ce.Z)(sn,wn),or=be.useRef(null),Un=be.useRef(null);be.useImperativeHandle(bn,function(){return{scrollTo:function(Wi){or.current.scrollTo(Wi)},getIndentWidth:function(){return Un.current.offsetWidth}}});var Tn=be.useState(We),tr=(0,ot.Z)(Tn,2),dr=tr[0],Pr=tr[1],fr=be.useState(he),Fr=(0,ot.Z)(fr,2),ri=Fr[0],Vr=Fr[1],ii=be.useState(he),Br=(0,ot.Z)(ii,2),Jr=Br[0],si=Br[1],_i=be.useState([]),Hr=(0,ot.Z)(_i,2),Bi=Hr[0],zi=Hr[1],Ia=be.useState(null),ma=(0,ot.Z)(Ia,2),qi=ma[0],Oi=ma[1],Ri=be.useRef(he);Ri.current=he;function xi(){var ci=Ri.current;Vr(ci),si(ci),zi([]),Oi(null),Dn()}Ue(function(){Pr(We);var ci=tn(dr,We);if(ci.key!==null)if(ci.add){var Wi=ri.findIndex(function(Ea){var ji=Ea.key;return ji===ci.key}),ha=hi(Mn(ri,he,ci.key),$n,kn,ir),go=ri.slice();go.splice(Wi+1,0,Dr),si(go),zi(ha),Oi("show")}else{var lo=he.findIndex(function(Ea){var ji=Ea.key;return ji===ci.key}),Ua=hi(Mn(he,ri,ci.key),$n,kn,ir),Ba=he.slice();Ba.splice(lo+1,0,Dr),si(Ba),zi(Ua),Oi("hide")}else ri!==he&&(Vr(he),si(he))},[We,he]),be.useEffect(function(){En||xi()},[En]);var ea=Gt?Jr:he,wi={expandedKeys:We,selectedKeys:je,loadedKeys:tt,loadingKeys:kt,checkedKeys:et,halfCheckedKeys:Wt,dragOverNodeKey:cn,dropPosition:un,keyEntities:Sn};return be.createElement(be.Fragment,null,ar&&Gn&&be.createElement("span",{style:rr,"aria-live":"assertive"},br(Gn)),be.createElement("div",null,be.createElement("input",{style:rr,disabled:Hn===!1||Nn,tabIndex:Hn!==!1?ur:null,onKeyDown:Ve,onFocus:Je,onBlur:Pt,value:"",onChange:zr,"aria-label":"for screen reader"})),be.createElement("div",{className:"".concat(Fn,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},be.createElement("div",{className:"".concat(Fn,"-indent")},be.createElement("div",{ref:Un,className:"".concat(Fn,"-indent-unit")}))),be.createElement(mt.Z,(0,fe.Z)({},An,{data:ea,itemKey:Vn,height:kn,fullHeight:!1,virtual:$n,itemHeight:ir,prefixCls:"".concat(Fn,"-list"),ref:or,onVisibleChange:function(Wi,ha){var go=new Set(Wi),lo=ha.filter(function(Ua){return!go.has(Ua)});lo.some(function(Ua){return Vn(Ua)===vr})&&xi()}}),function(ci){var Wi=ci.pos,ha=(0,fe.Z)({},((0,it.Z)(ci.data),ci.data)),go=ci.title,lo=ci.key,Ua=ci.isStart,Ba=ci.isEnd,Ea=(0,zt.km)(lo,Wi);delete ha.key,delete ha.children;var ji=(0,zt.H8)(Ea,wi);return be.createElement(on,(0,fe.Z)({},ha,ji,{title:go,active:!!Gn&&lo===Gn.key,pos:Wi,data:ci.data,isStart:Ua,isEnd:Ba,motion:Gt,motionNodes:lo===vr?Bi:null,motionType:qi,onMotionStart:hn,onMotionEnd:xi,treeNodeRequiredProps:wi,onMouseMove:function(){_t(null)}}))}))});Ui.displayName="NodeList";var na=Ui,Wr=ie(29873),vi=ie(97153),ra=ie(3596),Kr=10,Vi=function(sn){(0,ge.Z)(Fn,sn);var bn=(0,Ae.Z)(Fn);function Fn(){var he;(0,_e.Z)(this,Fn);for(var Pe=arguments.length,Fe=new Array(Pe),We=0;We<Pe;We++)Fe[We]=arguments[We];return he=bn.call.apply(bn,[this].concat(Fe)),he.destroyed=!1,he.delayedDragEnterLogic=void 0,he.loadingRetryTimes={},he.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,zt.w$)()},he.dragStartMousePosition=null,he.dragNode=void 0,he.currentMouseOverDroppableNodeKey=null,he.listRef=be.createRef(),he.onNodeDragStart=function(je,et){var tt=he.state,kt=tt.expandedKeys,Wt=tt.keyEntities,Sn=he.props.onDragStart,Nn=et.props.eventKey;he.dragNode=et,he.dragStartMousePosition={x:je.clientX,y:je.clientY};var En=(0,Wr._5)(kt,Nn);he.setState({draggingNodeKey:Nn,dragChildrenKeys:(0,Wr.wA)(Nn,Wt),indent:he.listRef.current.getIndentWidth()}),he.setExpandedKeys(En),window.addEventListener("dragend",he.onWindowDragEnd),Sn==null||Sn({event:je,node:(0,zt.F)(et.props)})},he.onNodeDragEnter=function(je,et){var tt=he.state,kt=tt.expandedKeys,Wt=tt.keyEntities,Sn=tt.dragChildrenKeys,Nn=tt.flattenNodes,En=tt.indent,cn=he.props,un=cn.onDragEnter,Gt=cn.onExpand,kn=cn.allowDrop,ir=cn.direction,$n=et.props,Hn=$n.pos,Gn=$n.eventKey,ar=(0,ke.Z)(he),ur=ar.dragNode;if(he.currentMouseOverDroppableNodeKey!==Gn&&(he.currentMouseOverDroppableNodeKey=Gn),!ur){he.resetDragState();return}var Ve=(0,Wr.OM)(je,ur,et,En,he.dragStartMousePosition,kn,Nn,Wt,kt,ir),Je=Ve.dropPosition,Pt=Ve.dropLevelOffset,_t=Ve.dropTargetKey,hn=Ve.dropContainerKey,Dn=Ve.dropTargetPos,An=Ve.dropAllowed,or=Ve.dragOverNodeKey;if(Sn.indexOf(_t)!==-1||!An){he.resetDragState();return}if(he.delayedDragEnterLogic||(he.delayedDragEnterLogic={}),Object.keys(he.delayedDragEnterLogic).forEach(function(Un){clearTimeout(he.delayedDragEnterLogic[Un])}),ur.props.eventKey!==et.props.eventKey&&(je.persist(),he.delayedDragEnterLogic[Hn]=window.setTimeout(function(){if(he.state.draggingNodeKey!==null){var Un=(0,ye.Z)(kt),Tn=(0,ra.Z)(Wt,et.props.eventKey);Tn&&(Tn.children||[]).length&&(Un=(0,Wr.L0)(kt,et.props.eventKey)),"expandedKeys"in he.props||he.setExpandedKeys(Un),Gt==null||Gt(Un,{node:(0,zt.F)(et.props),expanded:!0,nativeEvent:je.nativeEvent})}},800)),ur.props.eventKey===_t&&Pt===0){he.resetDragState();return}he.setState({dragOverNodeKey:or,dropPosition:Je,dropLevelOffset:Pt,dropTargetKey:_t,dropContainerKey:hn,dropTargetPos:Dn,dropAllowed:An}),un==null||un({event:je,node:(0,zt.F)(et.props),expandedKeys:kt})},he.onNodeDragOver=function(je,et){var tt=he.state,kt=tt.dragChildrenKeys,Wt=tt.flattenNodes,Sn=tt.keyEntities,Nn=tt.expandedKeys,En=tt.indent,cn=he.props,un=cn.onDragOver,Gt=cn.allowDrop,kn=cn.direction,ir=(0,ke.Z)(he),$n=ir.dragNode;if($n){var Hn=(0,Wr.OM)(je,$n,et,En,he.dragStartMousePosition,Gt,Wt,Sn,Nn,kn),Gn=Hn.dropPosition,ar=Hn.dropLevelOffset,ur=Hn.dropTargetKey,Ve=Hn.dropContainerKey,Je=Hn.dropAllowed,Pt=Hn.dropTargetPos,_t=Hn.dragOverNodeKey;kt.indexOf(ur)!==-1||!Je||($n.props.eventKey===ur&&ar===0?he.state.dropPosition===null&&he.state.dropLevelOffset===null&&he.state.dropTargetKey===null&&he.state.dropContainerKey===null&&he.state.dropTargetPos===null&&he.state.dropAllowed===!1&&he.state.dragOverNodeKey===null||he.resetDragState():Gn===he.state.dropPosition&&ar===he.state.dropLevelOffset&&ur===he.state.dropTargetKey&&Ve===he.state.dropContainerKey&&Pt===he.state.dropTargetPos&&Je===he.state.dropAllowed&&_t===he.state.dragOverNodeKey||he.setState({dropPosition:Gn,dropLevelOffset:ar,dropTargetKey:ur,dropContainerKey:Ve,dropTargetPos:Pt,dropAllowed:Je,dragOverNodeKey:_t}),un==null||un({event:je,node:(0,zt.F)(et.props)}))}},he.onNodeDragLeave=function(je,et){he.currentMouseOverDroppableNodeKey===et.props.eventKey&&!je.currentTarget.contains(je.relatedTarget)&&(he.resetDragState(),he.currentMouseOverDroppableNodeKey=null);var tt=he.props.onDragLeave;tt==null||tt({event:je,node:(0,zt.F)(et.props)})},he.onWindowDragEnd=function(je){he.onNodeDragEnd(je,null,!0),window.removeEventListener("dragend",he.onWindowDragEnd)},he.onNodeDragEnd=function(je,et){var tt=he.props.onDragEnd;he.setState({dragOverNodeKey:null}),he.cleanDragState(),tt==null||tt({event:je,node:(0,zt.F)(et.props)}),he.dragNode=null,window.removeEventListener("dragend",he.onWindowDragEnd)},he.onNodeDrop=function(je,et){var tt,kt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Wt=he.state,Sn=Wt.dragChildrenKeys,Nn=Wt.dropPosition,En=Wt.dropTargetKey,cn=Wt.dropTargetPos,un=Wt.dropAllowed;if(un){var Gt=he.props.onDrop;if(he.setState({dragOverNodeKey:null}),he.cleanDragState(),En!==null){var kn=(0,Ge.Z)((0,Ge.Z)({},(0,zt.H8)(En,he.getTreeNodeRequiredProps())),{},{active:((tt=he.getActiveItem())===null||tt===void 0?void 0:tt.key)===En,data:(0,ra.Z)(he.state.keyEntities,En).node}),ir=Sn.indexOf(En)!==-1;(0,qe.ZP)(!ir,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var $n=(0,Wr.yx)(cn),Hn={event:je,node:(0,zt.F)(kn),dragNode:he.dragNode?(0,zt.F)(he.dragNode.props):null,dragNodesKeys:[he.dragNode.props.eventKey].concat(Sn),dropToGap:Nn!==0,dropPosition:Nn+Number($n[$n.length-1])};kt||Gt==null||Gt(Hn),he.dragNode=null}}},he.cleanDragState=function(){var je=he.state.draggingNodeKey;je!==null&&he.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),he.dragStartMousePosition=null,he.currentMouseOverDroppableNodeKey=null},he.triggerExpandActionExpand=function(je,et){var tt=he.state,kt=tt.expandedKeys,Wt=tt.flattenNodes,Sn=et.expanded,Nn=et.key,En=et.isLeaf;if(!(En||je.shiftKey||je.metaKey||je.ctrlKey)){var cn=Wt.filter(function(Gt){return Gt.key===Nn})[0],un=(0,zt.F)((0,Ge.Z)((0,Ge.Z)({},(0,zt.H8)(Nn,he.getTreeNodeRequiredProps())),{},{data:cn.data}));he.setExpandedKeys(Sn?(0,Wr._5)(kt,Nn):(0,Wr.L0)(kt,Nn)),he.onNodeExpand(je,un)}},he.onNodeClick=function(je,et){var tt=he.props,kt=tt.onClick,Wt=tt.expandAction;Wt==="click"&&he.triggerExpandActionExpand(je,et),kt==null||kt(je,et)},he.onNodeDoubleClick=function(je,et){var tt=he.props,kt=tt.onDoubleClick,Wt=tt.expandAction;Wt==="doubleClick"&&he.triggerExpandActionExpand(je,et),kt==null||kt(je,et)},he.onNodeSelect=function(je,et){var tt=he.state.selectedKeys,kt=he.state,Wt=kt.keyEntities,Sn=kt.fieldNames,Nn=he.props,En=Nn.onSelect,cn=Nn.multiple,un=et.selected,Gt=et[Sn.key],kn=!un;kn?cn?tt=(0,Wr.L0)(tt,Gt):tt=[Gt]:tt=(0,Wr._5)(tt,Gt);var ir=tt.map(function($n){var Hn=(0,ra.Z)(Wt,$n);return Hn?Hn.node:null}).filter(function($n){return $n});he.setUncontrolledState({selectedKeys:tt}),En==null||En(tt,{event:"select",selected:kn,node:et,selectedNodes:ir,nativeEvent:je.nativeEvent})},he.onNodeCheck=function(je,et,tt){var kt=he.state,Wt=kt.keyEntities,Sn=kt.checkedKeys,Nn=kt.halfCheckedKeys,En=he.props,cn=En.checkStrictly,un=En.onCheck,Gt=et.key,kn,ir={event:"check",node:et,checked:tt,nativeEvent:je.nativeEvent};if(cn){var $n=tt?(0,Wr.L0)(Sn,Gt):(0,Wr._5)(Sn,Gt),Hn=(0,Wr._5)(Nn,Gt);kn={checked:$n,halfChecked:Hn},ir.checkedNodes=$n.map(function(Pt){return(0,ra.Z)(Wt,Pt)}).filter(function(Pt){return Pt}).map(function(Pt){return Pt.node}),he.setUncontrolledState({checkedKeys:$n})}else{var Gn=(0,vi.S)([].concat((0,ye.Z)(Sn),[Gt]),!0,Wt),ar=Gn.checkedKeys,ur=Gn.halfCheckedKeys;if(!tt){var Ve=new Set(ar);Ve.delete(Gt);var Je=(0,vi.S)(Array.from(Ve),{checked:!1,halfCheckedKeys:ur},Wt);ar=Je.checkedKeys,ur=Je.halfCheckedKeys}kn=ar,ir.checkedNodes=[],ir.checkedNodesPositions=[],ir.halfCheckedKeys=ur,ar.forEach(function(Pt){var _t=(0,ra.Z)(Wt,Pt);if(_t){var hn=_t.node,Dn=_t.pos;ir.checkedNodes.push(hn),ir.checkedNodesPositions.push({node:hn,pos:Dn})}}),he.setUncontrolledState({checkedKeys:ar},!1,{halfCheckedKeys:ur})}un==null||un(kn,ir)},he.onNodeLoad=function(je){var et=je.key,tt=new Promise(function(kt,Wt){he.setState(function(Sn){var Nn=Sn.loadedKeys,En=Nn===void 0?[]:Nn,cn=Sn.loadingKeys,un=cn===void 0?[]:cn,Gt=he.props,kn=Gt.loadData,ir=Gt.onLoad;if(!kn||En.indexOf(et)!==-1||un.indexOf(et)!==-1)return null;var $n=kn(je);return $n.then(function(){var Hn=he.state.loadedKeys,Gn=(0,Wr.L0)(Hn,et);ir==null||ir(Gn,{event:"load",node:je}),he.setUncontrolledState({loadedKeys:Gn}),he.setState(function(ar){return{loadingKeys:(0,Wr._5)(ar.loadingKeys,et)}}),kt()}).catch(function(Hn){if(he.setState(function(ar){return{loadingKeys:(0,Wr._5)(ar.loadingKeys,et)}}),he.loadingRetryTimes[et]=(he.loadingRetryTimes[et]||0)+1,he.loadingRetryTimes[et]>=Kr){var Gn=he.state.loadedKeys;(0,qe.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),he.setUncontrolledState({loadedKeys:(0,Wr.L0)(Gn,et)}),kt()}Wt(Hn)}),{loadingKeys:(0,Wr.L0)(un,et)}})});return tt.catch(function(){}),tt},he.onNodeMouseEnter=function(je,et){var tt=he.props.onMouseEnter;tt==null||tt({event:je,node:et})},he.onNodeMouseLeave=function(je,et){var tt=he.props.onMouseLeave;tt==null||tt({event:je,node:et})},he.onNodeContextMenu=function(je,et){var tt=he.props.onRightClick;tt&&(je.preventDefault(),tt({event:je,node:et}))},he.onFocus=function(){var je=he.props.onFocus;he.setState({focused:!0});for(var et=arguments.length,tt=new Array(et),kt=0;kt<et;kt++)tt[kt]=arguments[kt];je==null||je.apply(void 0,tt)},he.onBlur=function(){var je=he.props.onBlur;he.setState({focused:!1}),he.onActiveChange(null);for(var et=arguments.length,tt=new Array(et),kt=0;kt<et;kt++)tt[kt]=arguments[kt];je==null||je.apply(void 0,tt)},he.getTreeNodeRequiredProps=function(){var je=he.state,et=je.expandedKeys,tt=je.selectedKeys,kt=je.loadedKeys,Wt=je.loadingKeys,Sn=je.checkedKeys,Nn=je.halfCheckedKeys,En=je.dragOverNodeKey,cn=je.dropPosition,un=je.keyEntities;return{expandedKeys:et||[],selectedKeys:tt||[],loadedKeys:kt||[],loadingKeys:Wt||[],checkedKeys:Sn||[],halfCheckedKeys:Nn||[],dragOverNodeKey:En,dropPosition:cn,keyEntities:un}},he.setExpandedKeys=function(je){var et=he.state,tt=et.treeData,kt=et.fieldNames,Wt=(0,zt.oH)(tt,je,kt);he.setUncontrolledState({expandedKeys:je,flattenNodes:Wt},!0)},he.onNodeExpand=function(je,et){var tt=he.state.expandedKeys,kt=he.state,Wt=kt.listChanging,Sn=kt.fieldNames,Nn=he.props,En=Nn.onExpand,cn=Nn.loadData,un=et.expanded,Gt=et[Sn.key];if(!Wt){var kn=tt.indexOf(Gt),ir=!un;if((0,qe.ZP)(un&&kn!==-1||!un&&kn===-1,"Expand state not sync with index check"),ir?tt=(0,Wr.L0)(tt,Gt):tt=(0,Wr._5)(tt,Gt),he.setExpandedKeys(tt),En==null||En(tt,{node:et,expanded:ir,nativeEvent:je.nativeEvent}),ir&&cn){var $n=he.onNodeLoad(et);$n&&$n.then(function(){var Hn=(0,zt.oH)(he.state.treeData,tt,Sn);he.setUncontrolledState({flattenNodes:Hn})}).catch(function(){var Hn=he.state.expandedKeys,Gn=(0,Wr._5)(Hn,Gt);he.setExpandedKeys(Gn)})}}},he.onListChangeStart=function(){he.setUncontrolledState({listChanging:!0})},he.onListChangeEnd=function(){setTimeout(function(){he.setUncontrolledState({listChanging:!1})})},he.onActiveChange=function(je){var et=he.state.activeKey,tt=he.props.onActiveChange;et!==je&&(he.setState({activeKey:je}),je!==null&&he.scrollTo({key:je}),tt==null||tt(je))},he.getActiveItem=function(){var je=he.state,et=je.activeKey,tt=je.flattenNodes;return et===null?null:tt.find(function(kt){var Wt=kt.key;return Wt===et})||null},he.offsetActiveKey=function(je){var et=he.state,tt=et.flattenNodes,kt=et.activeKey,Wt=tt.findIndex(function(En){var cn=En.key;return cn===kt});Wt===-1&&je<0&&(Wt=tt.length),Wt=(Wt+je+tt.length)%tt.length;var Sn=tt[Wt];if(Sn){var Nn=Sn.key;he.onActiveChange(Nn)}else he.onActiveChange(null)},he.onKeyDown=function(je){var et=he.state,tt=et.activeKey,kt=et.expandedKeys,Wt=et.checkedKeys,Sn=et.fieldNames,Nn=he.props,En=Nn.onKeyDown,cn=Nn.checkable,un=Nn.selectable;switch(je.which){case dt.UP:{he.offsetActiveKey(-1),je.preventDefault();break}case dt.DOWN:{he.offsetActiveKey(1),je.preventDefault();break}}var Gt=he.getActiveItem();if(Gt&&Gt.data){var kn=he.getTreeNodeRequiredProps(),ir=Gt.data.isLeaf===!1||!!(Gt.data[Sn.children]||[]).length,$n=(0,zt.F)((0,Ge.Z)((0,Ge.Z)({},(0,zt.H8)(tt,kn)),{},{data:Gt.data,active:!0}));switch(je.which){case dt.LEFT:{ir&&kt.includes(tt)?he.onNodeExpand({},$n):Gt.parent&&he.onActiveChange(Gt.parent.key),je.preventDefault();break}case dt.RIGHT:{ir&&!kt.includes(tt)?he.onNodeExpand({},$n):Gt.children&&Gt.children.length&&he.onActiveChange(Gt.children[0].key),je.preventDefault();break}case dt.ENTER:case dt.SPACE:{cn&&!$n.disabled&&$n.checkable!==!1&&!$n.disableCheckbox?he.onNodeCheck({},$n,!Wt.includes(tt)):!cn&&un&&!$n.disabled&&$n.selectable!==!1&&he.onNodeSelect({},$n);break}}}En==null||En(je)},he.setUncontrolledState=function(je){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!he.destroyed){var kt=!1,Wt=!0,Sn={};Object.keys(je).forEach(function(Nn){if(Nn in he.props){Wt=!1;return}kt=!0,Sn[Nn]=je[Nn]}),kt&&(!et||Wt)&&he.setState((0,Ge.Z)((0,Ge.Z)({},Sn),tt))}},he.scrollTo=function(je){he.listRef.current.scrollTo(je)},he}return(0,ce.Z)(Fn,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Pe=this.props.activeKey;Pe!==void 0&&Pe!==this.state.activeKey&&(this.setState({activeKey:Pe}),Pe!==null&&this.scrollTo({key:Pe}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Pe,Fe=this.state,We=Fe.focused,je=Fe.flattenNodes,et=Fe.keyEntities,tt=Fe.draggingNodeKey,kt=Fe.activeKey,Wt=Fe.dropLevelOffset,Sn=Fe.dropContainerKey,Nn=Fe.dropTargetKey,En=Fe.dropPosition,cn=Fe.dragOverNodeKey,un=Fe.indent,Gt=this.props,kn=Gt.prefixCls,ir=Gt.className,$n=Gt.style,Hn=Gt.showLine,Gn=Gt.focusable,ar=Gt.tabIndex,ur=ar===void 0?0:ar,Ve=Gt.selectable,Je=Gt.showIcon,Pt=Gt.icon,_t=Gt.switcherIcon,hn=Gt.draggable,Dn=Gt.checkable,An=Gt.checkStrictly,or=Gt.disabled,Un=Gt.motion,Tn=Gt.loadData,tr=Gt.filterTreeNode,dr=Gt.height,Pr=Gt.itemHeight,fr=Gt.virtual,Fr=Gt.titleRender,ri=Gt.dropIndicatorRender,Vr=Gt.onContextMenu,ii=Gt.onScroll,Br=Gt.direction,Jr=Gt.rootClassName,si=Gt.rootStyle,_i=(0,ct.Z)(this.props,{aria:!0,data:!0}),Hr;return hn&&((0,Re.Z)(hn)==="object"?Hr=hn:typeof hn=="function"?Hr={nodeDraggable:hn}:Hr={}),be.createElement(vt.k.Provider,{value:{prefixCls:kn,selectable:Ve,showIcon:Je,icon:Pt,switcherIcon:_t,draggable:Hr,draggingNodeKey:tt,checkable:Dn,checkStrictly:An,disabled:or,keyEntities:et,dropLevelOffset:Wt,dropContainerKey:Sn,dropTargetKey:Nn,dropPosition:En,dragOverNodeKey:cn,indent:un,direction:Br,dropIndicatorRender:ri,loadData:Tn,filterTreeNode:tr,titleRender:Fr,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},be.createElement("div",{role:"tree",className:ze()(kn,ir,Jr,(Pe={},(0,Te.Z)(Pe,"".concat(kn,"-show-line"),Hn),(0,Te.Z)(Pe,"".concat(kn,"-focused"),We),(0,Te.Z)(Pe,"".concat(kn,"-active-focused"),kt!==null),Pe)),style:si},be.createElement(na,(0,fe.Z)({ref:this.listRef,prefixCls:kn,style:$n,data:je,disabled:or,selectable:Ve,checkable:!!Dn,motion:Un,dragging:tt!==null,height:dr,itemHeight:Pr,virtual:fr,focusable:Gn,focused:We,tabIndex:ur,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Vr,onScroll:ii},this.getTreeNodeRequiredProps(),_i))))}}],[{key:"getDerivedStateFromProps",value:function(Pe,Fe){var We=Fe.prevProps,je={prevProps:Pe};function et(Gn){return!We&&Gn in Pe||We&&We[Gn]!==Pe[Gn]}var tt,kt=Fe.fieldNames;if(et("fieldNames")&&(kt=(0,zt.w$)(Pe.fieldNames),je.fieldNames=kt),et("treeData")?tt=Pe.treeData:et("children")&&((0,qe.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),tt=(0,zt.zn)(Pe.children)),tt){je.treeData=tt;var Wt=(0,zt.I8)(tt,{fieldNames:kt});je.keyEntities=(0,Ge.Z)((0,Te.Z)({},vr,Lr),Wt.keyEntities)}var Sn=je.keyEntities||Fe.keyEntities;if(et("expandedKeys")||We&&et("autoExpandParent"))je.expandedKeys=Pe.autoExpandParent||!We&&Pe.defaultExpandParent?(0,Wr.r7)(Pe.expandedKeys,Sn):Pe.expandedKeys;else if(!We&&Pe.defaultExpandAll){var Nn=(0,Ge.Z)({},Sn);delete Nn[vr],je.expandedKeys=Object.keys(Nn).map(function(Gn){return Nn[Gn].key})}else!We&&Pe.defaultExpandedKeys&&(je.expandedKeys=Pe.autoExpandParent||Pe.defaultExpandParent?(0,Wr.r7)(Pe.defaultExpandedKeys,Sn):Pe.defaultExpandedKeys);if(je.expandedKeys||delete je.expandedKeys,tt||je.expandedKeys){var En=(0,zt.oH)(tt||Fe.treeData,je.expandedKeys||Fe.expandedKeys,kt);je.flattenNodes=En}if(Pe.selectable&&(et("selectedKeys")?je.selectedKeys=(0,Wr.BT)(Pe.selectedKeys,Pe):!We&&Pe.defaultSelectedKeys&&(je.selectedKeys=(0,Wr.BT)(Pe.defaultSelectedKeys,Pe))),Pe.checkable){var cn;if(et("checkedKeys")?cn=(0,Wr.E6)(Pe.checkedKeys)||{}:!We&&Pe.defaultCheckedKeys?cn=(0,Wr.E6)(Pe.defaultCheckedKeys)||{}:tt&&(cn=(0,Wr.E6)(Pe.checkedKeys)||{checkedKeys:Fe.checkedKeys,halfCheckedKeys:Fe.halfCheckedKeys}),cn){var un=cn,Gt=un.checkedKeys,kn=Gt===void 0?[]:Gt,ir=un.halfCheckedKeys,$n=ir===void 0?[]:ir;if(!Pe.checkStrictly){var Hn=(0,vi.S)(kn,!0,Sn);kn=Hn.checkedKeys,$n=Hn.halfCheckedKeys}je.checkedKeys=kn,je.halfCheckedKeys=$n}}return et("loadedKeys")&&(je.loadedKeys=Pe.loadedKeys),je}}]),Fn}(be.Component);Vi.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Dt,allowDrop:function(){return!0},expandAction:!1},Vi.TreeNode=ht.Z;var lr=Vi,Na=lr,Ca=ie(73148),ho=ie(56747),Ha={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},_a=Ha,Ji=ie(84089),Fa=function(bn,Fn){return be.createElement(Ji.Z,(0,fe.Z)({},bn,{ref:Fn,icon:_a}))},ya=be.forwardRef(Fa),Wa=ie(53124),po=ie(50881),ja=ie(33603),Pa=ie(32157);const mo=4;function Eo(sn){const{dropPosition:bn,dropLevelOffset:Fn,prefixCls:he,indent:Pe,direction:Fe="ltr"}=sn,We=Fe==="ltr"?"left":"right",je=Fe==="ltr"?"right":"left",et={[We]:-Fn*Pe+mo,[je]:0};switch(bn){case-1:et.top=-3;break;case 1:et.bottom=-3;break;default:et.bottom=-3,et[We]=Pe+mo;break}return be.createElement("div",{style:et,className:`${he}-drop-indicator`})}var no=ie(99184),Zt=be.forwardRef((sn,bn)=>{const{getPrefixCls:Fn,direction:he,virtual:Pe,tree:Fe}=be.useContext(Wa.E_),{prefixCls:We,className:je,showIcon:et=!1,showLine:tt,switcherIcon:kt,blockNode:Wt=!1,children:Sn,checkable:Nn=!1,selectable:En=!0,draggable:cn,motion:un,style:Gt}=sn,kn=Fn("tree",We),ir=Fn(),$n=un!=null?un:Object.assign(Object.assign({},(0,ja.Z)(ir)),{motionAppear:!1}),Hn=Object.assign(Object.assign({},sn),{checkable:Nn,selectable:En,showIcon:et,motion:$n,blockNode:Wt,showLine:!!tt,dropIndicatorRender:Eo}),[Gn,ar]=(0,Pa.ZP)(kn),ur=be.useMemo(()=>{if(!cn)return!1;let Je={};switch(typeof cn){case"function":Je.nodeDraggable=cn;break;case"object":Je=Object.assign({},cn);break;default:break}return Je.icon!==!1&&(Je.icon=Je.icon||be.createElement(po.Z,null)),Je},[cn]),Ve=Je=>be.createElement(no.Z,{prefixCls:kn,switcherIcon:kt,treeNodeProps:Je,showLine:tt});return Gn(be.createElement(Na,Object.assign({itemHeight:20,ref:bn,virtual:Pe},Hn,{style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),Gt),prefixCls:kn,className:ze()({[`${kn}-icon-hide`]:!et,[`${kn}-block-node`]:Wt,[`${kn}-unselectable`]:!En,[`${kn}-rtl`]:he==="rtl"},Fe==null?void 0:Fe.className,je,ar),direction:he,checkable:Nn&&be.createElement("span",{className:`${kn}-checkbox-inner`}),selectable:En,switcherIcon:Ve,draggable:ur}),Sn))}),At;(function(sn){sn[sn.None=0]="None",sn[sn.Start=1]="Start",sn[sn.End=2]="End"})(At||(At={}));function xn(sn,bn){function Fn(he){const{key:Pe,children:Fe}=he;bn(Pe,he)!==!1&&xn(Fe||[],bn)}sn.forEach(Fn)}function jn(sn){let{treeData:bn,expandedKeys:Fn,startKey:he,endKey:Pe}=sn;const Fe=[];let We=At.None;if(he&&he===Pe)return[he];if(!he||!Pe)return[];function je(et){return et===he||et===Pe}return xn(bn,et=>{if(We===At.End)return!1;if(je(et)){if(Fe.push(et),We===At.None)We=At.Start;else if(We===At.Start)return We=At.End,!1}else We===At.Start&&Fe.push(et);return Fn.includes(et)}),Fe}function hr(sn,bn){const Fn=(0,ye.Z)(bn),he=[];return xn(sn,(Pe,Fe)=>{const We=Fn.indexOf(Pe);return We!==-1&&(he.push(Fe),Fn.splice(We,1)),!!Fn.length}),he}var Qr=function(sn,bn){var Fn={};for(var he in sn)Object.prototype.hasOwnProperty.call(sn,he)&&bn.indexOf(he)<0&&(Fn[he]=sn[he]);if(sn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,he=Object.getOwnPropertySymbols(sn);Pe<he.length;Pe++)bn.indexOf(he[Pe])<0&&Object.prototype.propertyIsEnumerable.call(sn,he[Pe])&&(Fn[he[Pe]]=sn[he[Pe]]);return Fn};function ni(sn){const{isLeaf:bn,expanded:Fn}=sn;return bn?be.createElement(Ca.Z,null):Fn?be.createElement(ho.Z,null):be.createElement(ya,null)}function mi(sn){let{treeData:bn,children:Fn}=sn;return bn||(0,zt.zn)(Fn)}const ki=(sn,bn)=>{var{defaultExpandAll:Fn,defaultExpandParent:he,defaultExpandedKeys:Pe}=sn,Fe=Qr(sn,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const We=be.useRef(),je=be.useRef(),et=()=>{const{keyEntities:ur}=(0,zt.I8)(mi(Fe));let Ve;return Fn?Ve=Object.keys(ur):he?Ve=(0,Wr.r7)(Fe.expandedKeys||Pe||[],ur):Ve=Fe.expandedKeys||Pe,Ve},[tt,kt]=be.useState(Fe.selectedKeys||Fe.defaultSelectedKeys||[]),[Wt,Sn]=be.useState(()=>et());be.useEffect(()=>{"selectedKeys"in Fe&&kt(Fe.selectedKeys)},[Fe.selectedKeys]),be.useEffect(()=>{"expandedKeys"in Fe&&Sn(Fe.expandedKeys)},[Fe.expandedKeys]);const Nn=(ur,Ve)=>{var Je;return"expandedKeys"in Fe||Sn(ur),(Je=Fe.onExpand)===null||Je===void 0?void 0:Je.call(Fe,ur,Ve)},En=(ur,Ve)=>{var Je;const{multiple:Pt}=Fe,{node:_t,nativeEvent:hn}=Ve,{key:Dn=""}=_t,An=mi(Fe),or=Object.assign(Object.assign({},Ve),{selected:!0}),Un=(hn==null?void 0:hn.ctrlKey)||(hn==null?void 0:hn.metaKey),Tn=hn==null?void 0:hn.shiftKey;let tr;Pt&&Un?(tr=ur,We.current=Dn,je.current=tr,or.selectedNodes=hr(An,tr)):Pt&&Tn?(tr=Array.from(new Set([].concat((0,ye.Z)(je.current||[]),(0,ye.Z)(jn({treeData:An,expandedKeys:Wt,startKey:Dn,endKey:We.current}))))),or.selectedNodes=hr(An,tr)):(tr=[Dn],We.current=Dn,je.current=tr,or.selectedNodes=hr(An,tr)),(Je=Fe.onSelect)===null||Je===void 0||Je.call(Fe,tr,or),"selectedKeys"in Fe||kt(tr)},{getPrefixCls:cn,direction:un}=be.useContext(Wa.E_),{prefixCls:Gt,className:kn,showIcon:ir=!0,expandAction:$n="click"}=Fe,Hn=Qr(Fe,["prefixCls","className","showIcon","expandAction"]),Gn=cn("tree",Gt),ar=ze()(`${Gn}-directory`,{[`${Gn}-directory-rtl`]:un==="rtl"},kn);return be.createElement(Zt,Object.assign({icon:ni,ref:bn,blockNode:!0},Hn,{showIcon:ir,expandAction:$n,prefixCls:Gn,className:ar,expandedKeys:Wt,selectedKeys:tt,onSelect:En,onExpand:Nn}))};var Qi=be.forwardRef(ki);const aa=Zt;aa.DirectoryTree=Qi,aa.TreeNode=ht.Z;var ba=aa},32157:function(Ln,Kt,ie){"use strict";ie.d(Kt,{TM:function(){return st},Yk:function(){return ze}});var fe=ie(34367),Te=ie(63185),Re=ie(14747),Ge=ie(33507),ye=ie(45503),_e=ie(67968);const ce=new fe.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ke=(dt,ct)=>({[`.${dt}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ct.motionDurationSlow}`}}}),ge=(dt,ct)=>({[`.${dt}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:ct.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ct.lineWidthBold}px solid ${ct.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Ae=(dt,ct)=>{const{treeCls:qe,treeNodeCls:be,treeNodePadding:vt,titleHeight:Dt,nodeSelectedBg:it,nodeHoverBg:ot}=ct,Ce=ct.paddingXS;return{[qe]:Object.assign(Object.assign({},(0,Re.Wf)(ct)),{background:ct.colorBgContainer,borderRadius:ct.borderRadius,transition:`background-color ${ct.motionDurationSlow}`,[`&${qe}-rtl`]:{[`${qe}-switcher`]:{"&_close":{[`${qe}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${qe}-active-focused)`]:Object.assign({},(0,Re.oN)(ct)),[`${qe}-list-holder-inner`]:{alignItems:"flex-start"},[`&${qe}-block-node`]:{[`${qe}-list-holder-inner`]:{alignItems:"stretch",[`${qe}-node-content-wrapper`]:{flex:"auto"},[`${be}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:vt,insetInlineStart:0,border:`1px solid ${ct.colorPrimary}`,opacity:0,animationName:ce,animationDuration:ct.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${be}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${vt}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${qe}-node-content-wrapper`]:{color:ct.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${qe}-node-content-wrapper`]:Object.assign({},(0,Re.oN)(ct)),[`&:not(${be}-disabled).filter-node ${qe}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${qe}-draggable-icon`]:{flexShrink:0,width:Dt,lineHeight:`${Dt}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${ct.motionDurationSlow}`,[`${be}:hover &`]:{opacity:.45}},[`&${be}-disabled`]:{[`${qe}-draggable-icon`]:{visibility:"hidden"}}}},[`${qe}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:Dt}},[`${qe}-draggable-icon`]:{visibility:"hidden"},[`${qe}-switcher`]:Object.assign(Object.assign({},ke(dt,ct)),{position:"relative",flex:"none",alignSelf:"stretch",width:Dt,margin:0,lineHeight:`${Dt}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${qe}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:ct.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Dt/2,bottom:-vt,marginInlineStart:-1,borderInlineEnd:`1px solid ${ct.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:Dt/2*.8,height:Dt/2,borderBottom:`1px solid ${ct.colorBorder}`,content:'""'}}}),[`${qe}-checkbox`]:{top:"initial",marginInlineEnd:Ce},[`${qe}-node-content-wrapper, ${qe}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:Dt,margin:0,padding:`0 ${ct.paddingXS/2}px`,color:"inherit",lineHeight:`${Dt}px`,background:"transparent",borderRadius:ct.borderRadius,cursor:"pointer",transition:`all ${ct.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:ot},[`&${qe}-node-selected`]:{backgroundColor:it},[`${qe}-iconEle`]:{display:"inline-block",width:Dt,height:Dt,lineHeight:`${Dt}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${qe}-unselectable ${qe}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${qe}-node-content-wrapper`]:Object.assign({lineHeight:`${Dt}px`,userSelect:"none"},ge(dt,ct)),[`${be}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${ct.colorPrimary}`}},"&-show-line":{[`${qe}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Dt/2,bottom:-vt,borderInlineEnd:`1px solid ${ct.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${qe}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${be}-leaf-last`]:{[`${qe}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${Dt/2}px !important`}}}}})}},lt=dt=>{const{treeCls:ct,treeNodeCls:qe,treeNodePadding:be,directoryNodeSelectedBg:vt,directoryNodeSelectedColor:Dt}=dt;return{[`${ct}${ct}-directory`]:{[qe]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:be,insetInlineStart:0,transition:`background-color ${dt.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:dt.controlItemBgHover}},"> *":{zIndex:1},[`${ct}-switcher`]:{transition:`color ${dt.motionDurationMid}`},[`${ct}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ct}-node-selected`]:{color:Dt,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:vt},[`${ct}-switcher`]:{color:Dt},[`${ct}-node-content-wrapper`]:{color:Dt,background:"transparent"}}}}}},ze=(dt,ct)=>{const qe=`.${dt}`,be=`${qe}-treenode`,vt=ct.paddingXS/2,Dt=(0,ye.TS)(ct,{treeCls:qe,treeNodeCls:be,treeNodePadding:vt});return[Ae(dt,Dt),lt(Dt)]},st=dt=>{const{controlHeightSM:ct}=dt;return{titleHeight:ct,nodeHoverBg:dt.controlItemBgHover,nodeSelectedBg:dt.controlItemBgActive}};Kt.ZP=(0,_e.Z)("Tree",(dt,ct)=>{let{prefixCls:qe}=ct;return[{[dt.componentCls]:(0,Te.C2)(`${qe}-checkbox`,dt)},ze(qe,dt),(0,Ge.Z)(dt)]},dt=>{const{colorTextLightSolid:ct,colorPrimary:qe}=dt;return Object.assign(Object.assign({},st(dt)),{directoryNodeSelectedColor:ct,directoryNodeSelectedBg:qe})})},99184:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return qe}});var fe=ie(87462),Te=ie(67294),Re={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},Ge=Re,ye=ie(84089),_e=function(vt,Dt){return Te.createElement(ye.Z,(0,fe.Z)({},vt,{ref:Dt,icon:Ge}))},ce=Te.forwardRef(_e),ke=ie(73148),ge=ie(3407),Ae=ie(34182),lt=ie(74664),ze=ie(94184),st=ie.n(ze),dt=ie(96159),qe=be=>{const{prefixCls:vt,switcherIcon:Dt,treeNodeProps:it,showLine:ot}=be,{isLeaf:Ce,expanded:Se,loading:He}=it;if(He)return Te.createElement(ge.Z,{className:`${vt}-switcher-loading-icon`});let Ue;if(ot&&typeof ot=="object"&&(Ue=ot.showLeafIcon),Ce){if(!ot)return null;if(typeof Ue!="boolean"&&Ue){const ut=typeof Ue=="function"?Ue(it):Ue,$e=`${vt}-switcher-line-custom-icon`;return(0,dt.l$)(ut)?(0,dt.Tm)(ut,{className:st()(ut.props.className||"",$e)}):ut}return Ue?Te.createElement(ke.Z,{className:`${vt}-switcher-line-icon`}):Te.createElement("span",{className:`${vt}-switcher-leaf-line`})}const xt=`${vt}-switcher-icon`,mt=typeof Dt=="function"?Dt(it):Dt;return(0,dt.l$)(mt)?(0,dt.Tm)(mt,{className:st()(mt.props.className||"",xt)}):mt!==void 0?mt:ot?Se?Te.createElement(Ae.Z,{className:`${vt}-switcher-line-icon`}):Te.createElement(lt.Z,{className:`${vt}-switcher-line-icon`}):Te.createElement(ce,{className:xt})}},72665:function(Ln,Kt){"use strict";var ie;var fe=typeof Symbol=="function"&&Symbol.for,Te=fe?Symbol.for("react.element"):60103,Re=fe?Symbol.for("react.portal"):60106,Ge=fe?Symbol.for("react.fragment"):60107,ye=fe?Symbol.for("react.strict_mode"):60108,_e=fe?Symbol.for("react.profiler"):60114,ce=fe?Symbol.for("react.provider"):60109,ke=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Ae=fe?Symbol.for("react.concurrent_mode"):60111,lt=fe?Symbol.for("react.forward_ref"):60112,ze=fe?Symbol.for("react.suspense"):60113,st=fe?Symbol.for("react.suspense_list"):60120,dt=fe?Symbol.for("react.memo"):60115,ct=fe?Symbol.for("react.lazy"):60116,qe=fe?Symbol.for("react.block"):60121,be=fe?Symbol.for("react.fundamental"):60117,vt=fe?Symbol.for("react.responder"):60118,Dt=fe?Symbol.for("react.scope"):60119;function it(Ce){if(typeof Ce=="object"&&Ce!==null){var Se=Ce.$$typeof;switch(Se){case Te:switch(Ce=Ce.type,Ce){case ge:case Ae:case Ge:case _e:case ye:case ze:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case ke:case lt:case ct:case dt:case ce:return Ce;default:return Se}}case Re:return Se}}}function ot(Ce){return it(Ce)===Ae}ie=ge,ie=Ae,ie=ke,ie=ce,ie=Te,ie=lt,ie=Ge,ie=ct,ie=dt,ie=Re,ie=_e,ie=ye,ie=ze,ie=function(Ce){return ot(Ce)||it(Ce)===ge},ie=ot,ie=function(Ce){return it(Ce)===ke},ie=function(Ce){return it(Ce)===ce},ie=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Te},ie=function(Ce){return it(Ce)===lt},ie=function(Ce){return it(Ce)===Ge},ie=function(Ce){return it(Ce)===ct},Kt.isMemo=function(Ce){return it(Ce)===dt},ie=function(Ce){return it(Ce)===Re},ie=function(Ce){return it(Ce)===_e},ie=function(Ce){return it(Ce)===ye},ie=function(Ce){return it(Ce)===ze},ie=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ge||Ce===Ae||Ce===_e||Ce===ye||Ce===ze||Ce===st||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===ct||Ce.$$typeof===dt||Ce.$$typeof===ce||Ce.$$typeof===ke||Ce.$$typeof===lt||Ce.$$typeof===be||Ce.$$typeof===vt||Ce.$$typeof===Dt||Ce.$$typeof===qe)},ie=it},12060:function(Ln,Kt,ie){"use strict";Ln.exports=ie(72665)},41771:function(Ln,Kt){"use strict";var ie;var fe=typeof Symbol=="function"&&Symbol.for,Te=fe?Symbol.for("react.element"):60103,Re=fe?Symbol.for("react.portal"):60106,Ge=fe?Symbol.for("react.fragment"):60107,ye=fe?Symbol.for("react.strict_mode"):60108,_e=fe?Symbol.for("react.profiler"):60114,ce=fe?Symbol.for("react.provider"):60109,ke=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Ae=fe?Symbol.for("react.concurrent_mode"):60111,lt=fe?Symbol.for("react.forward_ref"):60112,ze=fe?Symbol.for("react.suspense"):60113,st=fe?Symbol.for("react.suspense_list"):60120,dt=fe?Symbol.for("react.memo"):60115,ct=fe?Symbol.for("react.lazy"):60116,qe=fe?Symbol.for("react.block"):60121,be=fe?Symbol.for("react.fundamental"):60117,vt=fe?Symbol.for("react.responder"):60118,Dt=fe?Symbol.for("react.scope"):60119;function it(Ce){if(typeof Ce=="object"&&Ce!==null){var Se=Ce.$$typeof;switch(Se){case Te:switch(Ce=Ce.type,Ce){case ge:case Ae:case Ge:case _e:case ye:case ze:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case ke:case lt:case ct:case dt:case ce:return Ce;default:return Se}}case Re:return Se}}}function ot(Ce){return it(Ce)===Ae}ie=ge,ie=Ae,ie=ke,ie=ce,ie=Te,ie=lt,ie=Ge,ie=ct,ie=dt,ie=Re,ie=_e,ie=ye,ie=ze,ie=function(Ce){return ot(Ce)||it(Ce)===ge},ie=ot,ie=function(Ce){return it(Ce)===ke},ie=function(Ce){return it(Ce)===ce},ie=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Te},ie=function(Ce){return it(Ce)===lt},Kt.isFragment=function(Ce){return it(Ce)===Ge},ie=function(Ce){return it(Ce)===ct},ie=function(Ce){return it(Ce)===dt},ie=function(Ce){return it(Ce)===Re},ie=function(Ce){return it(Ce)===_e},ie=function(Ce){return it(Ce)===ye},ie=function(Ce){return it(Ce)===ze},ie=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ge||Ce===Ae||Ce===_e||Ce===ye||Ce===ze||Ce===st||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===ct||Ce.$$typeof===dt||Ce.$$typeof===ce||Ce.$$typeof===ke||Ce.$$typeof===lt||Ce.$$typeof===be||Ce.$$typeof===vt||Ce.$$typeof===Dt||Ce.$$typeof===qe)},ie=it},47655:function(Ln,Kt,ie){"use strict";Ln.exports=ie(41771)},64701:function(Ln,Kt,ie){"use strict";ie.r(Kt),ie.d(Kt,{ResizableTextArea:function(){return In},default:function(){return Cn}});var fe=ie(87462),Te=ie(1413),Re=ie(4942),Ge=ie(71002),ye=ie(97685),_e=ie(45987),ce=ie(74902),ke=ie(94184),ge=ie.n(ke),Ae=ie(67656),lt=ie(87887),ze=ie(67294);function st(rn){var ln=ze.useRef();ln.current=rn;var zn=ze.useCallback(function(){for(var _n,Oe=arguments.length,ue=new Array(Oe),le=0;le<Oe;le++)ue[le]=arguments[le];return(_n=ln.current)===null||_n===void 0?void 0:_n.call.apply(_n,[ln].concat(ue))},[]);return zn}function dt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ct=dt()?ze.useLayoutEffect:ze.useEffect,qe=ct,be=function(ln,zn){var _n=ze.useRef(!0);ct(function(){if(!_n.current)return ln()},zn),ct(function(){return _n.current=!1,function(){_n.current=!0}},[])};function vt(rn){var ln=ze.useRef(!1),zn=ze.useState(rn),_n=(0,ye.Z)(zn,2),Oe=_n[0],ue=_n[1];ze.useEffect(function(){return ln.current=!1,function(){ln.current=!0}},[]);function le(ve,pe){pe&&ln.current||ue(ve)}return[Oe,le]}function Dt(rn){return rn!==void 0}function it(rn,ln){var zn=ln||{},_n=zn.defaultValue,Oe=zn.value,ue=zn.onChange,le=zn.postState,ve=vt(function(){return Dt(Oe)?Oe:Dt(_n)?typeof _n=="function"?_n():_n:typeof rn=="function"?rn():rn}),pe=(0,ye.Z)(ve,2),se=pe[0],Be=pe[1],ft=Oe!==void 0?Oe:se,Bt=le?le(ft):ft,qt=st(ue),an=vt([ft]),vn=(0,ye.Z)(an,2),dn=vn[0],gt=vn[1];be(function(){var Ht=dn[0];se!==Ht&&qt(se,Ht)},[dn]),be(function(){Dt(Oe)||Be(Oe)},[Oe]);var It=st(function(Ht,Xt){Be(Ht,Xt),gt([ft],Xt)});return[Bt,It]}var ot=ie(48555),Ce=function(ln){return+setTimeout(ln,16)},Se=function(ln){return clearTimeout(ln)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ce=function(ln){return window.requestAnimationFrame(ln)},Se=function(ln){return window.cancelAnimationFrame(ln)});var He=0,Ue=new Map;function xt(rn){Ue.delete(rn)}var mt=function(ln){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;He+=1;var _n=He;function Oe(ue){if(ue===0)xt(_n),ln();else{var le=Ce(function(){Oe(ue-1)});Ue.set(_n,le)}}return Oe(zn),_n};mt.cancel=function(rn){var ln=Ue.get(rn);return xt(ln),Se(ln)};var ut=mt,$e=`
|
|
|
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;
|
|
|
`,Ft=["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"],yt={},gn;function rt(rn){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zn=rn.getAttribute("id")||rn.getAttribute("data-reactid")||rn.getAttribute("name");if(ln&&yt[zn])return yt[zn];var _n=window.getComputedStyle(rn),Oe=_n.getPropertyValue("box-sizing")||_n.getPropertyValue("-moz-box-sizing")||_n.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(_n.getPropertyValue("padding-bottom"))+parseFloat(_n.getPropertyValue("padding-top")),le=parseFloat(_n.getPropertyValue("border-bottom-width"))+parseFloat(_n.getPropertyValue("border-top-width")),ve=Ft.map(function(se){return"".concat(se,":").concat(_n.getPropertyValue(se))}).join(";"),pe={sizingStyle:ve,paddingSize:ue,borderSize:le,boxSizing:Oe};return ln&&zn&&(yt[zn]=pe),pe}function Mt(rn){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;gn||(gn=document.createElement("textarea"),gn.setAttribute("tab-index","-1"),gn.setAttribute("aria-hidden","true"),document.body.appendChild(gn)),rn.getAttribute("wrap")?gn.setAttribute("wrap",rn.getAttribute("wrap")):gn.removeAttribute("wrap");var Oe=rt(rn,ln),ue=Oe.paddingSize,le=Oe.borderSize,ve=Oe.boxSizing,pe=Oe.sizingStyle;gn.setAttribute("style","".concat(pe,";").concat($e)),gn.value=rn.value||rn.placeholder||"";var se=void 0,Be=void 0,ft,Bt=gn.scrollHeight;if(ve==="border-box"?Bt+=le:ve==="content-box"&&(Bt-=ue),zn!==null||_n!==null){gn.value=" ";var qt=gn.scrollHeight-ue;zn!==null&&(se=qt*zn,ve==="border-box"&&(se=se+ue+le),Bt=Math.max(se,Bt)),_n!==null&&(Be=qt*_n,ve==="border-box"&&(Be=Be+ue+le),ft=Bt>Be?"":"hidden",Bt=Math.min(Be,Bt))}var an={height:Bt,overflowY:ft,resize:"none"};return se&&(an.minHeight=se),Be&&(an.maxHeight=Be),an}var en=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Yt=0,Qe=1,Ie=2,Ot=ze.forwardRef(function(rn,ln){var zn=rn,_n=zn.prefixCls,Oe=zn.onPressEnter,ue=zn.defaultValue,le=zn.value,ve=zn.autoSize,pe=zn.onResize,se=zn.className,Be=zn.style,ft=zn.disabled,Bt=zn.onChange,qt=zn.onInternalAutoSize,an=(0,_e.Z)(zn,en),vn=it(ue,{value:le,postState:function(yn){return yn!=null?yn:""}}),dn=(0,ye.Z)(vn,2),gt=dn[0],It=dn[1],Ht=function(yn){It(yn.target.value),Bt==null||Bt(yn)},Xt=ze.useRef();ze.useImperativeHandle(ln,function(){return{textArea:Xt.current}});var Tt=ze.useMemo(function(){return ve&&(0,Ge.Z)(ve)==="object"?[ve.minRows,ve.maxRows]:[]},[ve]),Yn=(0,ye.Z)(Tt,2),Rn=Yn[0],cr=Yn[1],Xr=!!ve,wr=function(){try{if(document.activeElement===Xt.current){var yn=Xt.current,xr=yn.selectionStart,Sr=yn.selectionEnd,mr=yn.scrollTop;Xt.current.setSelectionRange(xr,Sr),Xt.current.scrollTop=mr}}catch(Qn){}},kr=ze.useState(Ie),Ar=(0,ye.Z)(kr,2),gi=Ar[0],oi=Ar[1],fi=ze.useState(),Pi=(0,ye.Z)(fi,2),Or=Pi[0],Jn=Pi[1],qn=function(){oi(Yt)};qe(function(){Xr&&qn()},[le,Rn,cr,Xr]),qe(function(){if(gi===Yt)oi(Qe);else if(gi===Qe){var Bn=Mt(Xt.current,!1,Rn,cr);oi(Ie),Jn(Bn)}else wr()},[gi]);var nr=ze.useRef(),Ur=function(){ut.cancel(nr.current)},li=function(yn){gi===Ie&&(pe==null||pe(yn),ve&&(Ur(),nr.current=ut(function(){qn()})))};ze.useEffect(function(){return Ur},[]);var Lt=Xr?Or:null,Kn=(0,Te.Z)((0,Te.Z)({},Be),Lt);return(gi===Yt||gi===Qe)&&(Kn.overflowY="hidden",Kn.overflowX="hidden"),ze.createElement(ot.Z,{onResize:li,disabled:!(ve||pe)},ze.createElement("textarea",(0,fe.Z)({},an,{ref:Xt,style:Kn,className:ge()(_n,se,(0,Re.Z)({},"".concat(_n,"-disabled"),ft)),disabled:ft,value:gt,onChange:Ht})))}),In=Ot,mn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function pt(rn,ln){return(0,ce.Z)(rn||"").slice(0,ln).join("")}function wt(rn,ln,zn,_n){var Oe=zn;return rn?Oe=pt(zn,_n):(0,ce.Z)(ln||"").length<zn.length&&(0,ce.Z)(zn||"").length>_n&&(Oe=ln),Oe}var Qt=ze.forwardRef(function(rn,ln){var zn,_n=rn.defaultValue,Oe=rn.value,ue=rn.onFocus,le=rn.onBlur,ve=rn.onChange,pe=rn.allowClear,se=rn.maxLength,Be=rn.onCompositionStart,ft=rn.onCompositionEnd,Bt=rn.suffix,qt=rn.prefixCls,an=qt===void 0?"rc-textarea":qt,vn=rn.classes,dn=rn.showCount,gt=rn.className,It=rn.style,Ht=rn.disabled,Xt=rn.hidden,Tt=rn.classNames,Yn=rn.styles,Rn=rn.onResize,cr=(0,_e.Z)(rn,mn),Xr=it(_n,{value:Oe,defaultValue:_n}),wr=(0,ye.Z)(Xr,2),kr=wr[0],Ar=wr[1],gi=(0,ze.useRef)(null),oi=ze.useState(!1),fi=(0,ye.Z)(oi,2),Pi=fi[0],Or=fi[1],Jn=ze.useState(!1),qn=(0,ye.Z)(Jn,2),nr=qn[0],Ur=qn[1],li=ze.useRef(),Lt=ze.useRef(0),Kn=ze.useState(null),Bn=(0,ye.Z)(Kn,2),yn=Bn[0],xr=Bn[1],Sr=function(){var Lr;(Lr=gi.current)===null||Lr===void 0||Lr.textArea.focus()};(0,ze.useImperativeHandle)(ln,function(){return{resizableTextArea:gi.current,focus:Sr,blur:function(){var Lr;(Lr=gi.current)===null||Lr===void 0||Lr.textArea.blur()}}}),(0,ze.useEffect)(function(){Or(function(yr){return!Ht&&yr})},[Ht]);var mr=Number(se)>0,Qn=function(Lr){Ur(!0),li.current=kr,Lt.current=Lr.currentTarget.selectionStart,Be==null||Be(Lr)},ht=function(Lr){Ur(!1);var Dr=Lr.currentTarget.value;if(mr){var hi,Vn=Lt.current>=se+1||Lt.current===((hi=li.current)===null||hi===void 0?void 0:hi.length);Dr=wt(Vn,li.current,Dr,se)}Dr!==kr&&(Ar(Dr),(0,lt.rJ)(Lr.currentTarget,Lr,ve,Dr)),ft==null||ft(Lr)},Et=function(Lr){var Dr=Lr.target.value;if(!nr&&mr){var hi=Lr.target.selectionStart>=se+1||Lr.target.selectionStart===Dr.length||!Lr.target.selectionStart;Dr=wt(hi,kr,Dr,se)}Ar(Dr),(0,lt.rJ)(Lr.currentTarget,Lr,ve,Dr)},zt=function(Lr){var Dr=cr.onPressEnter,hi=cr.onKeyDown;Lr.key==="Enter"&&Dr&&Dr(Lr),hi==null||hi(Lr)},fn=function(Lr){Or(!0),ue==null||ue(Lr)},at=function(Lr){Or(!1),le==null||le(Lr)},Rt=function(Lr){var Dr;Ar(""),Sr(),(0,lt.rJ)((Dr=gi.current)===null||Dr===void 0?void 0:Dr.textArea,Lr,ve)},on=(0,lt.D7)(kr);!nr&&mr&&Oe==null&&(on=pt(on,se));var tn=Bt,Mn;if(dn){var wn=(0,ce.Z)(on).length;(0,Ge.Z)(dn)==="object"?Mn=dn.formatter({value:on,count:wn,maxLength:se}):Mn="".concat(wn).concat(mr?" / ".concat(se):""),tn=ze.createElement(ze.Fragment,null,tn,ze.createElement("span",{className:ge()("".concat(an,"-data-count"),Tt==null?void 0:Tt.count),style:Yn==null?void 0:Yn.count},Mn))}var rr=function(Lr){var Dr;Rn==null||Rn(Lr),(Dr=gi.current)!==null&&Dr!==void 0&&Dr.textArea.style.height&&xr(!0)},zr=!cr.autoSize&&!dn&&!pe,vr=ze.createElement(Ae.BaseInput,{value:on,allowClear:pe,handleReset:Rt,suffix:tn,prefixCls:an,classes:{affixWrapper:ge()(vn==null?void 0:vn.affixWrapper,(zn={},(0,Re.Z)(zn,"".concat(an,"-show-count"),dn),(0,Re.Z)(zn,"".concat(an,"-textarea-allow-clear"),pe),zn))},disabled:Ht,focused:Pi,className:gt,style:(0,Te.Z)((0,Te.Z)({},It),yn&&!zr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Mn=="string"?Mn:void 0}},hidden:Xt,inputElement:ze.createElement(In,(0,fe.Z)({},cr,{onKeyDown:zt,onChange:Et,onFocus:fn,onBlur:at,onCompositionStart:Qn,onCompositionEnd:ht,className:Tt==null?void 0:Tt.textarea,style:(0,Te.Z)((0,Te.Z)({},Yn==null?void 0:Yn.textarea),{},{resize:It==null?void 0:It.resize}),disabled:Ht,prefixCls:an,onResize:rr,ref:gi}))});return vr}),Zn=Qt,Cn=Zn},56261:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Ue}});var fe=ie(87462),Te=ie(4942),Re=ie(45987),Ge=ie(1413),ye=ie(15671),_e=ie(43144),ce=ie(97326),ke=ie(60136),ge=ie(51630),Ae=ie(94184),lt=ie.n(Ae),ze=ie(34952),st=ie(67294),dt=ie(69610),ct=function(mt){for(var ut=mt.prefixCls,$e=mt.level,Ft=mt.isStart,yt=mt.isEnd,gn="".concat(ut,"-indent-unit"),rt=[],Mt=0;Mt<$e;Mt+=1){var en;rt.push(st.createElement("span",{key:Mt,className:lt()(gn,(en={},(0,Te.Z)(en,"".concat(gn,"-start"),Ft[Mt]),(0,Te.Z)(en,"".concat(gn,"-end"),yt[Mt]),en))}))}return st.createElement("span",{"aria-hidden":"true",className:"".concat(ut,"-indent")},rt)},qe=st.memo(ct),be=ie(3596),vt=ie(83898),Dt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],it="open",ot="close",Ce="---",Se=function(xt){(0,ke.Z)(ut,xt);var mt=(0,ge.Z)(ut);function ut(){var $e;(0,ye.Z)(this,ut);for(var Ft=arguments.length,yt=new Array(Ft),gn=0;gn<Ft;gn++)yt[gn]=arguments[gn];return $e=mt.call.apply(mt,[this].concat(yt)),$e.state={dragNodeHighlight:!1},$e.selectHandle=void 0,$e.cacheIndent=void 0,$e.onSelectorClick=function(rt){var Mt=$e.props.context.onNodeClick;Mt(rt,(0,vt.F)($e.props)),$e.isSelectable()?$e.onSelect(rt):$e.onCheck(rt)},$e.onSelectorDoubleClick=function(rt){var Mt=$e.props.context.onNodeDoubleClick;Mt(rt,(0,vt.F)($e.props))},$e.onSelect=function(rt){if(!$e.isDisabled()){var Mt=$e.props.context.onNodeSelect;Mt(rt,(0,vt.F)($e.props))}},$e.onCheck=function(rt){if(!$e.isDisabled()){var Mt=$e.props,en=Mt.disableCheckbox,Yt=Mt.checked,Qe=$e.props.context.onNodeCheck;if(!(!$e.isCheckable()||en)){var Ie=!Yt;Qe(rt,(0,vt.F)($e.props),Ie)}}},$e.onMouseEnter=function(rt){var Mt=$e.props.context.onNodeMouseEnter;Mt(rt,(0,vt.F)($e.props))},$e.onMouseLeave=function(rt){var Mt=$e.props.context.onNodeMouseLeave;Mt(rt,(0,vt.F)($e.props))},$e.onContextMenu=function(rt){var Mt=$e.props.context.onNodeContextMenu;Mt(rt,(0,vt.F)($e.props))},$e.onDragStart=function(rt){var Mt=$e.props.context.onNodeDragStart;rt.stopPropagation(),$e.setState({dragNodeHighlight:!0}),Mt(rt,(0,ce.Z)($e));try{rt.dataTransfer.setData("text/plain","")}catch(en){}},$e.onDragEnter=function(rt){var Mt=$e.props.context.onNodeDragEnter;rt.preventDefault(),rt.stopPropagation(),Mt(rt,(0,ce.Z)($e))},$e.onDragOver=function(rt){var Mt=$e.props.context.onNodeDragOver;rt.preventDefault(),rt.stopPropagation(),Mt(rt,(0,ce.Z)($e))},$e.onDragLeave=function(rt){var Mt=$e.props.context.onNodeDragLeave;rt.stopPropagation(),Mt(rt,(0,ce.Z)($e))},$e.onDragEnd=function(rt){var Mt=$e.props.context.onNodeDragEnd;rt.stopPropagation(),$e.setState({dragNodeHighlight:!1}),Mt(rt,(0,ce.Z)($e))},$e.onDrop=function(rt){var Mt=$e.props.context.onNodeDrop;rt.preventDefault(),rt.stopPropagation(),$e.setState({dragNodeHighlight:!1}),Mt(rt,(0,ce.Z)($e))},$e.onExpand=function(rt){var Mt=$e.props,en=Mt.loading,Yt=Mt.context.onNodeExpand;en||Yt(rt,(0,vt.F)($e.props))},$e.setSelectHandle=function(rt){$e.selectHandle=rt},$e.getNodeState=function(){var rt=$e.props.expanded;return $e.isLeaf()?null:rt?it:ot},$e.hasChildren=function(){var rt=$e.props.eventKey,Mt=$e.props.context.keyEntities,en=(0,be.Z)(Mt,rt)||{},Yt=en.children;return!!(Yt||[]).length},$e.isLeaf=function(){var rt=$e.props,Mt=rt.isLeaf,en=rt.loaded,Yt=$e.props.context.loadData,Qe=$e.hasChildren();return Mt===!1?!1:Mt||!Yt&&!Qe||Yt&&en&&!Qe},$e.isDisabled=function(){var rt=$e.props.disabled,Mt=$e.props.context.disabled;return!!(Mt||rt)},$e.isCheckable=function(){var rt=$e.props.checkable,Mt=$e.props.context.checkable;return!Mt||rt===!1?!1:Mt},$e.syncLoadData=function(rt){var Mt=rt.expanded,en=rt.loading,Yt=rt.loaded,Qe=$e.props.context,Ie=Qe.loadData,Ot=Qe.onNodeLoad;en||Ie&&Mt&&!$e.isLeaf()&&!$e.hasChildren()&&!Yt&&Ot((0,vt.F)($e.props))},$e.isDraggable=function(){var rt=$e.props,Mt=rt.data,en=rt.context.draggable;return!!(en&&(!en.nodeDraggable||en.nodeDraggable(Mt)))},$e.renderDragHandler=function(){var rt=$e.props.context,Mt=rt.draggable,en=rt.prefixCls;return Mt!=null&&Mt.icon?st.createElement("span",{className:"".concat(en,"-draggable-icon")},Mt.icon):null},$e.renderSwitcherIconDom=function(rt){var Mt=$e.props.switcherIcon,en=$e.props.context.switcherIcon,Yt=Mt||en;return typeof Yt=="function"?Yt((0,Ge.Z)((0,Ge.Z)({},$e.props),{},{isLeaf:rt})):Yt},$e.renderSwitcher=function(){var rt=$e.props.expanded,Mt=$e.props.context.prefixCls;if($e.isLeaf()){var en=$e.renderSwitcherIconDom(!0);return en!==!1?st.createElement("span",{className:lt()("".concat(Mt,"-switcher"),"".concat(Mt,"-switcher-noop"))},en):null}var Yt=lt()("".concat(Mt,"-switcher"),"".concat(Mt,"-switcher_").concat(rt?it:ot)),Qe=$e.renderSwitcherIconDom(!1);return Qe!==!1?st.createElement("span",{onClick:$e.onExpand,className:Yt},Qe):null},$e.renderCheckbox=function(){var rt=$e.props,Mt=rt.checked,en=rt.halfChecked,Yt=rt.disableCheckbox,Qe=$e.props.context.prefixCls,Ie=$e.isDisabled(),Ot=$e.isCheckable();if(!Ot)return null;var In=typeof Ot!="boolean"?Ot:null;return st.createElement("span",{className:lt()("".concat(Qe,"-checkbox"),Mt&&"".concat(Qe,"-checkbox-checked"),!Mt&&en&&"".concat(Qe,"-checkbox-indeterminate"),(Ie||Yt)&&"".concat(Qe,"-checkbox-disabled")),onClick:$e.onCheck},In)},$e.renderIcon=function(){var rt=$e.props.loading,Mt=$e.props.context.prefixCls;return st.createElement("span",{className:lt()("".concat(Mt,"-iconEle"),"".concat(Mt,"-icon__").concat($e.getNodeState()||"docu"),rt&&"".concat(Mt,"-icon_loading"))})},$e.renderSelector=function(){var rt=$e.state.dragNodeHighlight,Mt=$e.props,en=Mt.title,Yt=en===void 0?Ce:en,Qe=Mt.selected,Ie=Mt.icon,Ot=Mt.loading,In=Mt.data,mn=$e.props.context,pt=mn.prefixCls,wt=mn.showIcon,Qt=mn.icon,Zn=mn.loadData,Cn=mn.titleRender,rn=$e.isDisabled(),ln="".concat(pt,"-node-content-wrapper"),zn;if(wt){var _n=Ie||Qt;zn=_n?st.createElement("span",{className:lt()("".concat(pt,"-iconEle"),"".concat(pt,"-icon__customize"))},typeof _n=="function"?_n($e.props):_n):$e.renderIcon()}else Zn&&Ot&&(zn=$e.renderIcon());var Oe;typeof Yt=="function"?Oe=Yt(In):Cn?Oe=Cn(In):Oe=Yt;var ue=st.createElement("span",{className:"".concat(pt,"-title")},Oe);return st.createElement("span",{ref:$e.setSelectHandle,title:typeof Yt=="string"?Yt:"",className:lt()("".concat(ln),"".concat(ln,"-").concat($e.getNodeState()||"normal"),!rn&&(Qe||rt)&&"".concat(pt,"-node-selected")),onMouseEnter:$e.onMouseEnter,onMouseLeave:$e.onMouseLeave,onContextMenu:$e.onContextMenu,onClick:$e.onSelectorClick,onDoubleClick:$e.onSelectorDoubleClick},zn,ue,$e.renderDropIndicator())},$e.renderDropIndicator=function(){var rt=$e.props,Mt=rt.disabled,en=rt.eventKey,Yt=$e.props.context,Qe=Yt.draggable,Ie=Yt.dropLevelOffset,Ot=Yt.dropPosition,In=Yt.prefixCls,mn=Yt.indent,pt=Yt.dropIndicatorRender,wt=Yt.dragOverNodeKey,Qt=Yt.direction,Zn=!!Qe,Cn=!Mt&&Zn&&wt===en,rn=mn!=null?mn:$e.cacheIndent;return $e.cacheIndent=mn,Cn?pt({dropPosition:Ot,dropLevelOffset:Ie,indent:rn,prefixCls:In,direction:Qt}):null},$e}return(0,_e.Z)(ut,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Ft=this.props.selectable,yt=this.props.context.selectable;return typeof Ft=="boolean"?Ft:yt}},{key:"render",value:function(){var Ft,yt=this.props,gn=yt.eventKey,rt=yt.className,Mt=yt.style,en=yt.dragOver,Yt=yt.dragOverGapTop,Qe=yt.dragOverGapBottom,Ie=yt.isLeaf,Ot=yt.isStart,In=yt.isEnd,mn=yt.expanded,pt=yt.selected,wt=yt.checked,Qt=yt.halfChecked,Zn=yt.loading,Cn=yt.domRef,rn=yt.active,ln=yt.data,zn=yt.onMouseMove,_n=yt.selectable,Oe=(0,Re.Z)(yt,Dt),ue=this.props.context,le=ue.prefixCls,ve=ue.filterTreeNode,pe=ue.keyEntities,se=ue.dropContainerKey,Be=ue.dropTargetKey,ft=ue.draggingNodeKey,Bt=this.isDisabled(),qt=(0,ze.Z)(Oe,{aria:!0,data:!0}),an=(0,be.Z)(pe,gn)||{},vn=an.level,dn=In[In.length-1],gt=this.isDraggable(),It=!Bt&>,Ht=ft===gn,Xt=_n!==void 0?{"aria-selected":!!_n}:void 0;return st.createElement("div",(0,fe.Z)({ref:Cn,className:lt()(rt,"".concat(le,"-treenode"),(Ft={},(0,Te.Z)(Ft,"".concat(le,"-treenode-disabled"),Bt),(0,Te.Z)(Ft,"".concat(le,"-treenode-switcher-").concat(mn?"open":"close"),!Ie),(0,Te.Z)(Ft,"".concat(le,"-treenode-checkbox-checked"),wt),(0,Te.Z)(Ft,"".concat(le,"-treenode-checkbox-indeterminate"),Qt),(0,Te.Z)(Ft,"".concat(le,"-treenode-selected"),pt),(0,Te.Z)(Ft,"".concat(le,"-treenode-loading"),Zn),(0,Te.Z)(Ft,"".concat(le,"-treenode-active"),rn),(0,Te.Z)(Ft,"".concat(le,"-treenode-leaf-last"),dn),(0,Te.Z)(Ft,"".concat(le,"-treenode-draggable"),gt),(0,Te.Z)(Ft,"dragging",Ht),(0,Te.Z)(Ft,"drop-target",Be===gn),(0,Te.Z)(Ft,"drop-container",se===gn),(0,Te.Z)(Ft,"drag-over",!Bt&&en),(0,Te.Z)(Ft,"drag-over-gap-top",!Bt&&Yt),(0,Te.Z)(Ft,"drag-over-gap-bottom",!Bt&&Qe),(0,Te.Z)(Ft,"filter-node",ve&&ve((0,vt.F)(this.props))),Ft)),style:Mt,draggable:It,"aria-grabbed":Ht,onDragStart:It?this.onDragStart:void 0,onDragEnter:gt?this.onDragEnter:void 0,onDragOver:gt?this.onDragOver:void 0,onDragLeave:gt?this.onDragLeave:void 0,onDrop:gt?this.onDrop:void 0,onDragEnd:gt?this.onDragEnd:void 0,onMouseMove:zn},Xt,qt),st.createElement(qe,{prefixCls:le,level:vn,isStart:Ot,isEnd:In}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ut}(st.Component),He=function(mt){return st.createElement(dt.k.Consumer,null,function(ut){return st.createElement(Se,(0,fe.Z)({},mt,{context:ut}))})};He.displayName="TreeNode",He.isTreeNode=1;var Ue=He},69610:function(Ln,Kt,ie){"use strict";ie.d(Kt,{k:function(){return Te}});var fe=ie(67294),Te=fe.createContext(null)},29873:function(Ln,Kt,ie){"use strict";ie.d(Kt,{BT:function(){return qe},E6:function(){return Dt},L0:function(){return Ae},OM:function(){return ct},_5:function(){return ge},r7:function(){return it},wA:function(){return ze},yx:function(){return lt}});var fe=ie(74902),Te=ie(71002),Re=ie(72978),Ge=ie(67294),ye=ie(56261),_e=ie(3596),ce=ie(83898),ke=null;function ge(ot,Ce){if(!ot)return[];var Se=ot.slice(),He=Se.indexOf(Ce);return He>=0&&Se.splice(He,1),Se}function Ae(ot,Ce){var Se=(ot||[]).slice();return Se.indexOf(Ce)===-1&&Se.push(Ce),Se}function lt(ot){return ot.split("-")}function ze(ot,Ce){var Se=[],He=(0,_e.Z)(Ce,ot);function Ue(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];xt.forEach(function(mt){var ut=mt.key,$e=mt.children;Se.push(ut),Ue($e)})}return Ue(He.children),Se}function st(ot){if(ot.parent){var Ce=lt(ot.pos);return Number(Ce[Ce.length-1])===ot.parent.children.length-1}return!1}function dt(ot){var Ce=lt(ot.pos);return Number(Ce[Ce.length-1])===0}function ct(ot,Ce,Se,He,Ue,xt,mt,ut,$e,Ft){var yt,gn=ot.clientX,rt=ot.clientY,Mt=ot.target.getBoundingClientRect(),en=Mt.top,Yt=Mt.height,Qe=(Ft==="rtl"?-1:1)*(((Ue==null?void 0:Ue.x)||0)-gn),Ie=(Qe-12)/He,Ot=(0,_e.Z)(ut,Se.props.eventKey);if(rt<en+Yt/2){var In=mt.findIndex(function(ue){return ue.key===Ot.key}),mn=In<=0?0:In-1,pt=mt[mn].key;Ot=(0,_e.Z)(ut,pt)}var wt=Ot.key,Qt=Ot,Zn=Ot.key,Cn=0,rn=0;if(!$e.includes(wt))for(var ln=0;ln<Ie&&st(Ot);ln+=1)Ot=Ot.parent,rn+=1;var zn=Ce.props.data,_n=Ot.node,Oe=!0;return dt(Ot)&&Ot.level===0&&rt<en+Yt/2&&xt({dragNode:zn,dropNode:_n,dropPosition:-1})&&Ot.key===Se.props.eventKey?Cn=-1:(Qt.children||[]).length&&$e.includes(Zn)?xt({dragNode:zn,dropNode:_n,dropPosition:0})?Cn=0:Oe=!1:rn===0?Ie>-1.5?xt({dragNode:zn,dropNode:_n,dropPosition:1})?Cn=1:Oe=!1:xt({dragNode:zn,dropNode:_n,dropPosition:0})?Cn=0:xt({dragNode:zn,dropNode:_n,dropPosition:1})?Cn=1:Oe=!1:xt({dragNode:zn,dropNode:_n,dropPosition:1})?Cn=1:Oe=!1,{dropPosition:Cn,dropLevelOffset:rn,dropTargetKey:Ot.key,dropTargetPos:Ot.pos,dragOverNodeKey:Zn,dropContainerKey:Cn===0?null:((yt=Ot.parent)===null||yt===void 0?void 0:yt.key)||null,dropAllowed:Oe}}function qe(ot,Ce){if(ot){var Se=Ce.multiple;return Se?ot.slice():ot.length?[ot[0]]:ot}}var be=function(Ce){return Ce};function vt(ot,Ce){if(!ot)return[];var Se=Ce||{},He=Se.processProps,Ue=He===void 0?be:He,xt=Array.isArray(ot)?ot:[ot];return xt.map(function(mt){var ut=mt.children,$e=_objectWithoutProperties(mt,ke),Ft=vt(ut,Ce);return React.createElement(TreeNode,_extends({key:$e.key},Ue($e)),Ft)})}function Dt(ot){if(!ot)return null;var Ce;if(Array.isArray(ot))Ce={checkedKeys:ot,halfCheckedKeys:void 0};else if((0,Te.Z)(ot)==="object")Ce={checkedKeys:ot.checked||void 0,halfCheckedKeys:ot.halfChecked||void 0};else return(0,Re.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ce}function it(ot,Ce){var Se=new Set;function He(Ue){if(!Se.has(Ue)){var xt=(0,_e.Z)(Ce,Ue);if(xt){Se.add(Ue);var mt=xt.parent,ut=xt.node;ut.disabled||mt&&He(mt.key)}}}return(ot||[]).forEach(function(Ue){He(Ue)}),(0,fe.Z)(Se)}},97153:function(Ln,Kt,ie){"use strict";ie.d(Kt,{S:function(){return ce}});var fe=ie(72978),Te=ie(3596);function Re(ke,ge){var Ae=new Set;return ke.forEach(function(lt){ge.has(lt)||Ae.add(lt)}),Ae}function Ge(ke){var ge=ke||{},Ae=ge.disabled,lt=ge.disableCheckbox,ze=ge.checkable;return!!(Ae||lt)||ze===!1}function ye(ke,ge,Ae,lt){for(var ze=new Set(ke),st=new Set,dt=0;dt<=Ae;dt+=1){var ct=ge.get(dt)||new Set;ct.forEach(function(Dt){var it=Dt.key,ot=Dt.node,Ce=Dt.children,Se=Ce===void 0?[]:Ce;ze.has(it)&&!lt(ot)&&Se.filter(function(He){return!lt(He.node)}).forEach(function(He){ze.add(He.key)})})}for(var qe=new Set,be=Ae;be>=0;be-=1){var vt=ge.get(be)||new Set;vt.forEach(function(Dt){var it=Dt.parent,ot=Dt.node;if(!(lt(ot)||!Dt.parent||qe.has(Dt.parent.key))){if(lt(Dt.parent.node)){qe.add(it.key);return}var Ce=!0,Se=!1;(it.children||[]).filter(function(He){return!lt(He.node)}).forEach(function(He){var Ue=He.key,xt=ze.has(Ue);Ce&&!xt&&(Ce=!1),!Se&&(xt||st.has(Ue))&&(Se=!0)}),Ce&&ze.add(it.key),Se&&st.add(it.key),qe.add(it.key)}})}return{checkedKeys:Array.from(ze),halfCheckedKeys:Array.from(Re(st,ze))}}function _e(ke,ge,Ae,lt,ze){for(var st=new Set(ke),dt=new Set(ge),ct=0;ct<=lt;ct+=1){var qe=Ae.get(ct)||new Set;qe.forEach(function(it){var ot=it.key,Ce=it.node,Se=it.children,He=Se===void 0?[]:Se;!st.has(ot)&&!dt.has(ot)&&!ze(Ce)&&He.filter(function(Ue){return!ze(Ue.node)}).forEach(function(Ue){st.delete(Ue.key)})})}dt=new Set;for(var be=new Set,vt=lt;vt>=0;vt-=1){var Dt=Ae.get(vt)||new Set;Dt.forEach(function(it){var ot=it.parent,Ce=it.node;if(!(ze(Ce)||!it.parent||be.has(it.parent.key))){if(ze(it.parent.node)){be.add(ot.key);return}var Se=!0,He=!1;(ot.children||[]).filter(function(Ue){return!ze(Ue.node)}).forEach(function(Ue){var xt=Ue.key,mt=st.has(xt);Se&&!mt&&(Se=!1),!He&&(mt||dt.has(xt))&&(He=!0)}),Se||st.delete(ot.key),He&&dt.add(ot.key),be.add(ot.key)}})}return{checkedKeys:Array.from(st),halfCheckedKeys:Array.from(Re(dt,st))}}function ce(ke,ge,Ae,lt){var ze=[],st;lt?st=lt:st=Ge;var dt=new Set(ke.filter(function(vt){var Dt=!!(0,Te.Z)(Ae,vt);return Dt||ze.push(vt),Dt})),ct=new Map,qe=0;Object.keys(Ae).forEach(function(vt){var Dt=Ae[vt],it=Dt.level,ot=ct.get(it);ot||(ot=new Set,ct.set(it,ot)),ot.add(Dt),qe=Math.max(qe,it)}),(0,fe.ZP)(!ze.length,"Tree missing follow keys: ".concat(ze.slice(0,100).map(function(vt){return"'".concat(vt,"'")}).join(", ")));var be;return ge===!0?be=ye(dt,ct,qe,st):be=_e(dt,ge.halfCheckedKeys,ct,qe,st),be}},3596:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return fe}});function fe(Te,Re){return Te[Re]}},83898:function(Ln,Kt,ie){"use strict";ie.d(Kt,{I8:function(){return it},F:function(){return Ce},zn:function(){return be},w$:function(){return ct},oH:function(){return vt},km:function(){return dt},H8:function(){return ot}});var fe=ie(71002),Te=ie(74902),Re=ie(1413),Ge=ie(45987),ye=ie(67294),_e=ie(28580);function ce(Se){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ue=[];return ye.Children.forEach(Se,function(xt){xt==null&&!He.keepEmpty||(Array.isArray(xt)?Ue=Ue.concat(ce(xt)):(0,_e.isFragment)(xt)&&xt.props?Ue=Ue.concat(ce(xt.props.children,He)):Ue.push(xt))}),Ue}function ke(Se,He){var Ue=(0,Re.Z)({},Se);return Array.isArray(He)&&He.forEach(function(xt){delete Ue[xt]}),Ue}var ge=ie(72978),Ae=ie(3596),lt=["children"];function ze(Se,He){return"".concat(Se,"-").concat(He)}function st(Se){return Se&&Se.type&&Se.type.isTreeNode}function dt(Se,He){return Se!=null?Se:He}function ct(Se){var He=Se||{},Ue=He.title,xt=He._title,mt=He.key,ut=He.children,$e=Ue||"title";return{title:$e,_title:xt||[$e],key:mt||"key",children:ut||"children"}}function qe(Se,He){var Ue=new Map;function xt(mt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(mt||[]).forEach(function($e){var Ft=$e[He.key],yt=$e[He.children];warning(Ft!=null,"Tree node must have a certain key: [".concat(ut).concat(Ft,"]"));var gn=String(Ft);warning(!Ue.has(gn)||Ft===null||Ft===void 0,"Same 'key' exist in the Tree: ".concat(gn)),Ue.set(gn,!0),xt(yt,"".concat(ut).concat(gn," > "))})}xt(Se)}function be(Se){function He(Ue){var xt=ce(Ue);return xt.map(function(mt){if(!st(mt))return(0,ge.ZP)(!mt,"Tree/TreeNode can only accept TreeNode as children."),null;var ut=mt.key,$e=mt.props,Ft=$e.children,yt=(0,Ge.Z)($e,lt),gn=(0,Re.Z)({key:ut},yt),rt=He(Ft);return rt.length&&(gn.children=rt),gn}).filter(function(mt){return mt})}return He(Se)}function vt(Se,He,Ue){var xt=ct(Ue),mt=xt._title,ut=xt.key,$e=xt.children,Ft=new Set(He===!0?[]:He),yt=[];function gn(rt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return rt.map(function(en,Yt){for(var Qe=ze(Mt?Mt.pos:"0",Yt),Ie=dt(en[ut],Qe),Ot,In=0;In<mt.length;In+=1){var mn=mt[In];if(en[mn]!==void 0){Ot=en[mn];break}}var pt=(0,Re.Z)((0,Re.Z)({},ke(en,[].concat((0,Te.Z)(mt),[ut,$e]))),{},{title:Ot,key:Ie,parent:Mt,pos:Qe,children:null,data:en,isStart:[].concat((0,Te.Z)(Mt?Mt.isStart:[]),[Yt===0]),isEnd:[].concat((0,Te.Z)(Mt?Mt.isEnd:[]),[Yt===rt.length-1])});return yt.push(pt),He===!0||Ft.has(Ie)?pt.children=gn(en[$e]||[],pt):pt.children=[],pt})}return gn(Se),yt}function Dt(Se,He,Ue){var xt={};(0,fe.Z)(Ue)==="object"?xt=Ue:xt={externalGetKey:Ue},xt=xt||{};var mt=xt,ut=mt.childrenPropName,$e=mt.externalGetKey,Ft=mt.fieldNames,yt=ct(Ft),gn=yt.key,rt=yt.children,Mt=ut||rt,en;$e?typeof $e=="string"?en=function(Ie){return Ie[$e]}:typeof $e=="function"&&(en=function(Ie){return $e(Ie)}):en=function(Ie,Ot){return dt(Ie[gn],Ot)};function Yt(Qe,Ie,Ot,In){var mn=Qe?Qe[Mt]:Se,pt=Qe?ze(Ot.pos,Ie):"0",wt=Qe?[].concat((0,Te.Z)(In),[Qe]):[];if(Qe){var Qt=en(Qe,pt),Zn={node:Qe,index:Ie,pos:pt,key:Qt,parentPos:Ot.node?Ot.pos:null,level:Ot.level+1,nodes:wt};He(Zn)}mn&&mn.forEach(function(Cn,rn){Yt(Cn,rn,{node:Qe,pos:pt,level:Ot?Ot.level+1:-1},wt)})}Yt(null)}function it(Se){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ue=He.initWrapper,xt=He.processEntity,mt=He.onProcessFinished,ut=He.externalGetKey,$e=He.childrenPropName,Ft=He.fieldNames,yt=arguments.length>2?arguments[2]:void 0,gn=ut||yt,rt={},Mt={},en={posEntities:rt,keyEntities:Mt};return Ue&&(en=Ue(en)||en),Dt(Se,function(Yt){var Qe=Yt.node,Ie=Yt.index,Ot=Yt.pos,In=Yt.key,mn=Yt.parentPos,pt=Yt.level,wt=Yt.nodes,Qt={node:Qe,nodes:wt,index:Ie,key:In,pos:Ot,level:pt},Zn=dt(In,Ot);rt[Ot]=Qt,Mt[Zn]=Qt,Qt.parent=rt[mn],Qt.parent&&(Qt.parent.children=Qt.parent.children||[],Qt.parent.children.push(Qt)),xt&&xt(Qt,en)},{externalGetKey:gn,childrenPropName:$e,fieldNames:Ft}),mt&&mt(en),en}function ot(Se,He){var Ue=He.expandedKeys,xt=He.selectedKeys,mt=He.loadedKeys,ut=He.loadingKeys,$e=He.checkedKeys,Ft=He.halfCheckedKeys,yt=He.dragOverNodeKey,gn=He.dropPosition,rt=He.keyEntities,Mt=(0,Ae.Z)(rt,Se),en={eventKey:Se,expanded:Ue.indexOf(Se)!==-1,selected:xt.indexOf(Se)!==-1,loaded:mt.indexOf(Se)!==-1,loading:ut.indexOf(Se)!==-1,checked:$e.indexOf(Se)!==-1,halfChecked:Ft.indexOf(Se)!==-1,pos:String(Mt?Mt.pos:""),dragOver:yt===Se&&gn===0,dragOverGapTop:yt===Se&&gn===-1,dragOverGapBottom:yt===Se&&gn===1};return en}function Ce(Se){var He=Se.data,Ue=Se.expanded,xt=Se.selected,mt=Se.checked,ut=Se.loaded,$e=Se.loading,Ft=Se.halfChecked,yt=Se.dragOver,gn=Se.dragOverGapTop,rt=Se.dragOverGapBottom,Mt=Se.pos,en=Se.active,Yt=Se.eventKey,Qe=(0,Re.Z)((0,Re.Z)({},He),{},{expanded:Ue,selected:xt,checked:mt,loaded:ut,loading:$e,halfChecked:Ft,dragOver:yt,dragOverGapTop:gn,dragOverGapBottom:rt,pos:Mt,active:en,key:Yt});return"props"in Qe||Object.defineProperty(Qe,"props",{get:function(){return(0,ge.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Se}}),Qe}},34952:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ke}});var fe=ie(1413),Te=`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`,Re=`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`,Ge="".concat(Te," ").concat(Re).split(/[\s\n]+/),ye="aria-",_e="data-";function ce(ge,Ae){return ge.indexOf(Ae)===0}function ke(ge){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt;Ae===!1?lt={aria:!0,data:!0,attr:!0}:Ae===!0?lt={aria:!0}:lt=(0,fe.Z)({},Ae);var ze={};return Object.keys(ge).forEach(function(st){(lt.aria&&(st==="role"||ce(st,ye))||lt.data&&ce(st,_e)||lt.attr&&Ge.includes(st))&&(ze[st]=ge[st])}),ze}},72978:function(Ln,Kt,ie){"use strict";var fe={};function Te(ke,ge){}function Re(ke,ge){}function Ge(){fe={}}function ye(ke,ge,Ae){!ge&&!fe[Ae]&&(ke(!1,Ae),fe[Ae]=!0)}function _e(ke,ge){ye(Te,ke,ge)}function ce(ke,ge){ye(Re,ke,ge)}Kt.ZP=_e},81533:function(Ln,Kt){"use strict";var ie;var fe=typeof Symbol=="function"&&Symbol.for,Te=fe?Symbol.for("react.element"):60103,Re=fe?Symbol.for("react.portal"):60106,Ge=fe?Symbol.for("react.fragment"):60107,ye=fe?Symbol.for("react.strict_mode"):60108,_e=fe?Symbol.for("react.profiler"):60114,ce=fe?Symbol.for("react.provider"):60109,ke=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Ae=fe?Symbol.for("react.concurrent_mode"):60111,lt=fe?Symbol.for("react.forward_ref"):60112,ze=fe?Symbol.for("react.suspense"):60113,st=fe?Symbol.for("react.suspense_list"):60120,dt=fe?Symbol.for("react.memo"):60115,ct=fe?Symbol.for("react.lazy"):60116,qe=fe?Symbol.for("react.block"):60121,be=fe?Symbol.for("react.fundamental"):60117,vt=fe?Symbol.for("react.responder"):60118,Dt=fe?Symbol.for("react.scope"):60119;function it(Ce){if(typeof Ce=="object"&&Ce!==null){var Se=Ce.$$typeof;switch(Se){case Te:switch(Ce=Ce.type,Ce){case ge:case Ae:case Ge:case _e:case ye:case ze:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case ke:case lt:case ct:case dt:case ce:return Ce;default:return Se}}case Re:return Se}}}function ot(Ce){return it(Ce)===Ae}ie=ge,ie=Ae,ie=ke,ie=ce,ie=Te,ie=lt,ie=Ge,ie=ct,ie=dt,ie=Re,ie=_e,ie=ye,ie=ze,ie=function(Ce){return ot(Ce)||it(Ce)===ge},ie=ot,ie=function(Ce){return it(Ce)===ke},ie=function(Ce){return it(Ce)===ce},ie=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Te},ie=function(Ce){return it(Ce)===lt},Kt.isFragment=function(Ce){return it(Ce)===Ge},ie=function(Ce){return it(Ce)===ct},Kt.isMemo=function(Ce){return it(Ce)===dt},ie=function(Ce){return it(Ce)===Re},ie=function(Ce){return it(Ce)===_e},ie=function(Ce){return it(Ce)===ye},ie=function(Ce){return it(Ce)===ze},ie=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ge||Ce===Ae||Ce===_e||Ce===ye||Ce===ze||Ce===st||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===ct||Ce.$$typeof===dt||Ce.$$typeof===ce||Ce.$$typeof===ke||Ce.$$typeof===lt||Ce.$$typeof===be||Ce.$$typeof===vt||Ce.$$typeof===Dt||Ce.$$typeof===qe)},ie=it},28580:function(Ln,Kt,ie){"use strict";Ln.exports=ie(81533)},92389:function(Ln,Kt){"use strict";var ie={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(Te){var Re=Te.keyCode;if(Te.altKey&&!Te.ctrlKey||Te.metaKey||Re>=ie.F1&&Re<=ie.F12)return!1;switch(Re){case ie.ALT:case ie.CAPS_LOCK:case ie.CONTEXT_MENU:case ie.CTRL:case ie.DOWN:case ie.END:case ie.ESC:case ie.HOME:case ie.INSERT:case ie.LEFT:case ie.MAC_FF_META:case ie.META:case ie.NUMLOCK:case ie.NUM_CENTER:case ie.PAGE_DOWN:case ie.PAGE_UP:case ie.PAUSE:case ie.PRINT_SCREEN:case ie.RIGHT:case ie.SHIFT:case ie.UP:case ie.WIN_KEY:case ie.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Te){if(Te>=ie.ZERO&&Te<=ie.NINE||Te>=ie.NUM_ZERO&&Te<=ie.NUM_MULTIPLY||Te>=ie.A&&Te<=ie.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Te===0)return!0;switch(Te){case ie.SPACE:case ie.QUESTION_MARK:case ie.NUM_PLUS:case ie.NUM_MINUS:case ie.NUM_PERIOD:case ie.NUM_DIVISION:case ie.SEMICOLON:case ie.DASH:case ie.EQUALS:case ie.COMMA:case ie.PERIOD:case ie.SLASH:case ie.APOSTROPHE:case ie.SINGLE_QUOTE:case ie.OPEN_SQUARE_BRACKET:case ie.BACKSLASH:case ie.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};Kt.Z=ie},1337:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ke}});var fe=ie(1413),Te=`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`,Re=`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`,Ge="".concat(Te," ").concat(Re).split(/[\s\n]+/),ye="aria-",_e="data-";function ce(ge,Ae){return ge.indexOf(Ae)===0}function ke(ge){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt;Ae===!1?lt={aria:!0,data:!0,attr:!0}:Ae===!0?lt={aria:!0}:lt=(0,fe.Z)({},Ae);var ze={};return Object.keys(ge).forEach(function(st){(lt.aria&&(st==="role"||ce(st,ye))||lt.data&&ce(st,_e)||lt.attr&&Ge.includes(st))&&(ze[st]=ge[st])}),ze}},88386:function(Ln,Kt,ie){(function(fe){fe(ie(4631))})(function(fe){fe.defineOption("placeholder","",function(ke,ge,Ae){var lt=Ae&&Ae!=fe.Init;if(ge&&!lt)ke.on("blur",ye),ke.on("change",_e),ke.on("swapDoc",_e),fe.on(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose=function(){Ge(ke)}),_e(ke);else if(!ge&<){ke.off("blur",ye),ke.off("change",_e),ke.off("swapDoc",_e),fe.off(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose),Te(ke);var ze=ke.getWrapperElement();ze.className=ze.className.replace(" CodeMirror-empty","")}ge&&!ke.hasFocus()&&ye(ke)});function Te(ke){ke.state.placeholder&&(ke.state.placeholder.parentNode.removeChild(ke.state.placeholder),ke.state.placeholder=null)}function Re(ke){Te(ke);var ge=ke.state.placeholder=document.createElement("pre");ge.style.cssText="height: 0; overflow: visible",ge.style.direction=ke.getOption("direction"),ge.className="CodeMirror-placeholder CodeMirror-line-like";var Ae=ke.getOption("placeholder");typeof Ae=="string"&&(Ae=document.createTextNode(Ae)),ge.appendChild(Ae),ke.display.lineSpace.insertBefore(ge,ke.display.lineSpace.firstChild)}function Ge(ke){setTimeout(function(){var ge=!1,Ae=ke.getInputField();Ae.nodeName=="TEXTAREA"?ge=!Ae.value:ke.lineCount()==1&&(ge=!/[^\u200b]/.test(Ae.querySelector(".CodeMirror-line").textContent)),ge?Re(ke):Te(ke)},20)}function ye(ke){ce(ke)&&Re(ke)}function _e(ke){var ge=ke.getWrapperElement(),Ae=ce(ke);ge.className=ge.className.replace(" CodeMirror-empty","")+(Ae?" CodeMirror-empty":""),Ae?Re(ke):Te(ke)}function ce(ke){return ke.lineCount()===1&&ke.getLine(0)===""}})},82801:function(Ln,Kt,ie){(function(fe){fe(ie(4631))})(function(fe){var Te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Re=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(ct,qe,be){be&&be!=fe.Init&&(ct.removeKeyMap(ye),ct.state.closeBrackets=null),qe&&(_e(Ge(qe,"pairs")),ct.state.closeBrackets=qe,ct.addKeyMap(ye))});function Ge(ct,qe){return qe=="pairs"&&typeof ct=="string"?ct:typeof ct=="object"&&ct[qe]!=null?ct[qe]:Te[qe]}var ye={Backspace:ge,Enter:Ae};function _e(ct){for(var qe=0;qe<ct.length;qe++){var be=ct.charAt(qe),vt="'"+be+"'";ye[vt]||(ye[vt]=ce(be))}}_e(Te.pairs+"`");function ce(ct){return function(qe){return ze(qe,ct)}}function ke(ct){var qe=ct.state.closeBrackets;if(!qe||qe.override)return qe;var be=ct.getModeAt(ct.getCursor());return be.closeBrackets||qe}function ge(ct){var qe=ke(ct);if(!qe||ct.getOption("disableInput"))return fe.Pass;for(var be=Ge(qe,"pairs"),vt=ct.listSelections(),Dt=0;Dt<vt.length;Dt++){if(!vt[Dt].empty())return fe.Pass;var it=st(ct,vt[Dt].head);if(!it||be.indexOf(it)%2!=0)return fe.Pass}for(var Dt=vt.length-1;Dt>=0;Dt--){var ot=vt[Dt].head;ct.replaceRange("",Re(ot.line,ot.ch-1),Re(ot.line,ot.ch+1),"+delete")}}function Ae(ct){var qe=ke(ct),be=qe&&Ge(qe,"explode");if(!be||ct.getOption("disableInput"))return fe.Pass;for(var vt=ct.listSelections(),Dt=0;Dt<vt.length;Dt++){if(!vt[Dt].empty())return fe.Pass;var it=st(ct,vt[Dt].head);if(!it||be.indexOf(it)%2!=0)return fe.Pass}ct.operation(function(){var ot=ct.lineSeparator()||`
|
|
|
`;ct.replaceSelection(ot+ot,null),ct.execCommand("goCharLeft"),vt=ct.listSelections();for(var Ce=0;Ce<vt.length;Ce++){var Se=vt[Ce].head.line;ct.indentLine(Se,null,!0),ct.indentLine(Se+1,null,!0)}})}function lt(ct){var qe=fe.cmpPos(ct.anchor,ct.head)>0;return{anchor:new Re(ct.anchor.line,ct.anchor.ch+(qe?-1:1)),head:new Re(ct.head.line,ct.head.ch+(qe?1:-1))}}function ze(ct,qe){var be=ke(ct);if(!be||ct.getOption("disableInput"))return fe.Pass;var vt=Ge(be,"pairs"),Dt=vt.indexOf(qe);if(Dt==-1)return fe.Pass;for(var it=Ge(be,"closeBefore"),ot=Ge(be,"triples"),Ce=vt.charAt(Dt+1)==qe,Se=ct.listSelections(),He=Dt%2==0,Ue,xt=0;xt<Se.length;xt++){var mt=Se[xt],ut=mt.head,$e,Ft=ct.getRange(ut,Re(ut.line,ut.ch+1));if(He&&!mt.empty())$e="surround";else if((Ce||!He)&&Ft==qe)Ce&&dt(ct,ut)?$e="both":ot.indexOf(qe)>=0&&ct.getRange(ut,Re(ut.line,ut.ch+3))==qe+qe+qe?$e="skipThree":$e="skip";else if(Ce&&ut.ch>1&&ot.indexOf(qe)>=0&&ct.getRange(Re(ut.line,ut.ch-2),ut)==qe+qe){if(ut.ch>2&&/\bstring/.test(ct.getTokenTypeAt(Re(ut.line,ut.ch-2))))return fe.Pass;$e="addFour"}else if(Ce){var yt=ut.ch==0?" ":ct.getRange(Re(ut.line,ut.ch-1),ut);if(!fe.isWordChar(Ft)&&yt!=qe&&!fe.isWordChar(yt))$e="both";else return fe.Pass}else if(He&&(Ft.length===0||/\s/.test(Ft)||it.indexOf(Ft)>-1))$e="both";else return fe.Pass;if(!Ue)Ue=$e;else if(Ue!=$e)return fe.Pass}var gn=Dt%2?vt.charAt(Dt-1):qe,rt=Dt%2?qe:vt.charAt(Dt+1);ct.operation(function(){if(Ue=="skip")ct.execCommand("goCharRight");else if(Ue=="skipThree")for(var Mt=0;Mt<3;Mt++)ct.execCommand("goCharRight");else if(Ue=="surround"){for(var en=ct.getSelections(),Mt=0;Mt<en.length;Mt++)en[Mt]=gn+en[Mt]+rt;ct.replaceSelections(en,"around"),en=ct.listSelections().slice();for(var Mt=0;Mt<en.length;Mt++)en[Mt]=lt(en[Mt]);ct.setSelections(en)}else Ue=="both"?(ct.replaceSelection(gn+rt,null),ct.triggerElectric(gn+rt),ct.execCommand("goCharLeft")):Ue=="addFour"&&(ct.replaceSelection(gn+gn+gn+gn,"before"),ct.execCommand("goCharRight"))})}function st(ct,qe){var be=ct.getRange(Re(qe.line,qe.ch-1),Re(qe.line,qe.ch+1));return be.length==2?be:null}function dt(ct,qe){var be=ct.getTokenAt(Re(qe.line,qe.ch+1));return/\bstring/.test(be.type)&&be.start==qe.ch&&(qe.ch==0||!/\bstring/.test(ct.getTokenTypeAt(qe)))}})},57341:function(Ln,Kt,ie){(function(fe){fe(ie(4631),ie(4786))})(function(fe){fe.defineOption("autoCloseTags",!1,function(ge,Ae,lt){if(lt!=fe.Init&<&&ge.removeKeyMap("autoCloseTags"),!!Ae){var ze={name:"autoCloseTags"};(typeof Ae!="object"||Ae.whenClosing!==!1)&&(ze["'/'"]=function(st){return _e(st)}),(typeof Ae!="object"||Ae.whenOpening!==!1)&&(ze["'>'"]=function(st){return Ge(st)}),ge.addKeyMap(ze)}});var Te=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Re=["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 Ge(ge){if(ge.getOption("disableInput"))return fe.Pass;for(var Ae=ge.listSelections(),lt=[],ze=ge.getOption("autoCloseTags"),st=0;st<Ae.length;st++){if(!Ae[st].empty())return fe.Pass;var dt=Ae[st].head,ct=ge.getTokenAt(dt),qe=fe.innerMode(ge.getMode(),ct.state),be=qe.state,vt=qe.mode.xmlCurrentTag&&qe.mode.xmlCurrentTag(be),Dt=vt&&vt.name;if(!Dt)return fe.Pass;var it=qe.mode.configuration=="html",ot=typeof ze=="object"&&ze.dontCloseTags||it&&Te,Ce=typeof ze=="object"&&ze.indentTags||it&ℜct.end>dt.ch&&(Dt=Dt.slice(0,Dt.length-ct.end+dt.ch));var Se=Dt.toLowerCase();if(!Dt||ct.type=="string"&&(ct.end!=dt.ch||!/[\"\']/.test(ct.string.charAt(ct.string.length-1))||ct.string.length==1)||ct.type=="tag"&&vt.close||ct.string.indexOf("/")==dt.ch-ct.start-1||ot&&ce(ot,Se)>-1||ke(ge,qe.mode.xmlCurrentContext&&qe.mode.xmlCurrentContext(be)||[],Dt,dt,!0))return fe.Pass;var He=typeof ze=="object"&&ze.emptyTags;if(He&&ce(He,Dt)>-1){lt[st]={text:"/>",newPos:fe.Pos(dt.line,dt.ch+2)};continue}var Ue=Ce&&ce(Ce,Se)>-1;lt[st]={indent:Ue,text:">"+(Ue?`
|
|
|
|
|
|
`:"")+"</"+Dt+">",newPos:Ue?fe.Pos(dt.line+1,0):fe.Pos(dt.line,dt.ch+1)}}for(var xt=typeof ze=="object"&&ze.dontIndentOnAutoClose,st=Ae.length-1;st>=0;st--){var mt=lt[st];ge.replaceRange(mt.text,Ae[st].head,Ae[st].anchor,"+insert");var ut=ge.listSelections().slice(0);ut[st]={head:mt.newPos,anchor:mt.newPos},ge.setSelections(ut),!xt&&mt.indent&&(ge.indentLine(mt.newPos.line,null,!0),ge.indentLine(mt.newPos.line+1,null,!0))}}function ye(ge,Ae){for(var lt=ge.listSelections(),ze=[],st=Ae?"/":"</",dt=ge.getOption("autoCloseTags"),ct=typeof dt=="object"&&dt.dontIndentOnSlash,qe=0;qe<lt.length;qe++){if(!lt[qe].empty())return fe.Pass;var be=lt[qe].head,vt=ge.getTokenAt(be),Dt=fe.innerMode(ge.getMode(),vt.state),it=Dt.state;if(Ae&&(vt.type=="string"||vt.string.charAt(0)!="<"||vt.start!=be.ch-1))return fe.Pass;var ot,Ce=Dt.mode.name!="xml"&&ge.getMode().name=="htmlmixed";if(Ce&&Dt.mode.name=="javascript")ot=st+"script";else if(Ce&&Dt.mode.name=="css")ot=st+"style";else{var Se=Dt.mode.xmlCurrentContext&&Dt.mode.xmlCurrentContext(it);if(!Se||Se.length&&ke(ge,Se,Se[Se.length-1],be))return fe.Pass;ot=st+Se[Se.length-1]}ge.getLine(be.line).charAt(vt.end)!=">"&&(ot+=">"),ze[qe]=ot}if(ge.replaceSelections(ze),lt=ge.listSelections(),!ct)for(var qe=0;qe<lt.length;qe++)(qe==lt.length-1||lt[qe].head.line<lt[qe+1].head.line)&&ge.indentLine(lt[qe].head.line)}function _e(ge){return ge.getOption("disableInput")?fe.Pass:ye(ge,!0)}fe.commands.closeTag=function(ge){return ye(ge)};function ce(ge,Ae){if(ge.indexOf)return ge.indexOf(Ae);for(var lt=0,ze=ge.length;lt<ze;++lt)if(ge[lt]==Ae)return lt;return-1}function ke(ge,Ae,lt,ze,st){if(!fe.scanForClosingTag)return!1;var dt=Math.min(ge.lastLine()+1,ze.line+500),ct=fe.scanForClosingTag(ge,ze,null,dt);if(!ct||ct.tag!=lt)return!1;for(var qe=st?1:0,be=Ae.length-1;be>=0&&Ae[be]==lt;be--)++qe;ze=ct.to;for(var be=1;be<qe;be++){var vt=fe.scanForClosingTag(ge,ze,null,dt);if(!vt||vt.tag!=lt)return!1;ze=vt.to}return!0}})},4786:function(Ln,Kt,ie){(function(fe){fe(ie(4631))})(function(fe){"use strict";var Te=fe.Pos;function Re(be,vt){return be.line-vt.line||be.ch-vt.ch}var Ge="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",ye=Ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_e=new RegExp("<(/?)(["+Ge+"]["+ye+"]*)","g");function ce(be,vt,Dt,it){this.line=vt,this.ch=Dt,this.cm=be,this.text=be.getLine(vt),this.min=it?Math.max(it.from,be.firstLine()):be.firstLine(),this.max=it?Math.min(it.to-1,be.lastLine()):be.lastLine()}function ke(be,vt){var Dt=be.cm.getTokenTypeAt(Te(be.line,vt));return Dt&&/\btag\b/.test(Dt)}function ge(be){if(!(be.line>=be.max))return be.ch=0,be.text=be.cm.getLine(++be.line),!0}function Ae(be){if(!(be.line<=be.min))return be.text=be.cm.getLine(--be.line),be.ch=be.text.length,!0}function lt(be){for(;;){var vt=be.text.indexOf(">",be.ch);if(vt==-1){if(ge(be))continue;return}if(!ke(be,vt+1)){be.ch=vt+1;continue}var Dt=be.text.lastIndexOf("/",vt),it=Dt>-1&&!/\S/.test(be.text.slice(Dt+1,vt));return be.ch=vt+1,it?"selfClose":"regular"}}function ze(be){for(;;){var vt=be.ch?be.text.lastIndexOf("<",be.ch-1):-1;if(vt==-1){if(Ae(be))continue;return}if(!ke(be,vt+1)){be.ch=vt;continue}_e.lastIndex=vt,be.ch=vt;var Dt=_e.exec(be.text);if(Dt&&Dt.index==vt)return Dt}}function st(be){for(;;){_e.lastIndex=be.ch;var vt=_e.exec(be.text);if(!vt){if(ge(be))continue;return}if(!ke(be,vt.index+1)){be.ch=vt.index+1;continue}return be.ch=vt.index+vt[0].length,vt}}function dt(be){for(;;){var vt=be.ch?be.text.lastIndexOf(">",be.ch-1):-1;if(vt==-1){if(Ae(be))continue;return}if(!ke(be,vt+1)){be.ch=vt;continue}var Dt=be.text.lastIndexOf("/",vt),it=Dt>-1&&!/\S/.test(be.text.slice(Dt+1,vt));return be.ch=vt+1,it?"selfClose":"regular"}}function ct(be,vt){for(var Dt=[];;){var it=st(be),ot,Ce=be.line,Se=be.ch-(it?it[0].length:0);if(!it||!(ot=lt(be)))return;if(ot!="selfClose")if(it[1]){for(var He=Dt.length-1;He>=0;--He)if(Dt[He]==it[2]){Dt.length=He;break}if(He<0&&(!vt||vt==it[2]))return{tag:it[2],from:Te(Ce,Se),to:Te(be.line,be.ch)}}else Dt.push(it[2])}}function qe(be,vt){for(var Dt=[];;){var it=dt(be);if(!it)return;if(it=="selfClose"){ze(be);continue}var ot=be.line,Ce=be.ch,Se=ze(be);if(!Se)return;if(Se[1])Dt.push(Se[2]);else{for(var He=Dt.length-1;He>=0;--He)if(Dt[He]==Se[2]){Dt.length=He;break}if(He<0&&(!vt||vt==Se[2]))return{tag:Se[2],from:Te(be.line,be.ch),to:Te(ot,Ce)}}}}fe.registerHelper("fold","xml",function(be,vt){for(var Dt=new ce(be,vt.line,0);;){var it=st(Dt);if(!it||Dt.line!=vt.line)return;var ot=lt(Dt);if(!ot)return;if(!it[1]&&ot!="selfClose"){var Ce=Te(Dt.line,Dt.ch),Se=ct(Dt,it[2]);return Se&&Re(Se.from,Ce)>0?{from:Ce,to:Se.from}:null}}}),fe.findMatchingTag=function(be,vt,Dt){var it=new ce(be,vt.line,vt.ch,Dt);if(!(it.text.indexOf(">")==-1&&it.text.indexOf("<")==-1)){var ot=lt(it),Ce=ot&&Te(it.line,it.ch),Se=ot&&ze(it);if(!(!ot||!Se||Re(it,vt)>0)){var He={from:Te(it.line,it.ch),to:Ce,tag:Se[2]};return ot=="selfClose"?{open:He,close:null,at:"open"}:Se[1]?{open:qe(it,Se[2]),close:He,at:"close"}:(it=new ce(be,Ce.line,Ce.ch,Dt),{open:He,close:ct(it,Se[2]),at:"open"})}}},fe.findEnclosingTag=function(be,vt,Dt,it){for(var ot=new ce(be,vt.line,vt.ch,Dt);;){var Ce=qe(ot,it);if(!Ce)break;var Se=new ce(be,vt.line,vt.ch,Dt),He=ct(Se,Ce.tag);if(He)return{open:Ce,close:He}}},fe.scanForClosingTag=function(be,vt,Dt,it){var ot=new ce(be,vt.line,vt.ch,it?{from:0,to:it}:null);return ct(ot,Dt)}})},4631:function(Ln){(function(Kt,ie){Ln.exports=ie()})(this,function(){"use strict";var Kt=navigator.userAgent,ie=navigator.platform,fe=/gecko\/\d/i.test(Kt),Te=/MSIE \d/.test(Kt),Re=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kt),Ge=/Edge\/(\d+)/.exec(Kt),ye=Te||Re||Ge,_e=ye&&(Te?document.documentMode||6:+(Ge||Re)[1]),ce=!Ge&&/WebKit\//.test(Kt),ke=ce&&/Qt\/\d+\.\d+/.test(Kt),ge=!Ge&&/Chrome\//.test(Kt),Ae=/Opera\//.test(Kt),lt=/Apple Computer/.test(navigator.vendor),ze=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Kt),st=/PhantomJS/.test(Kt),dt=!Ge&&/AppleWebKit/.test(Kt)&&/Mobile\/\w+/.test(Kt),ct=/Android/.test(Kt),qe=dt||ct||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Kt),be=dt||/Mac/.test(ie),vt=/\bCrOS\b/.test(Kt),Dt=/win/i.test(ie),it=Ae&&Kt.match(/Version\/(\d*\.\d*)/);it&&(it=Number(it[1])),it&&it>=15&&(Ae=!1,ce=!0);var ot=be&&(ke||Ae&&(it==null||it<12.11)),Ce=fe||ye&&_e>=9;function Se(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var He=function(x,z){var ne=x.className,te=Se(z).exec(ne);if(te){var ae=ne.slice(te.index+te[0].length);x.className=ne.slice(0,te.index)+(ae?te[1]+ae:"")}};function Ue(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function xt(x,z){return Ue(x).appendChild(z)}function mt(x,z,ne,te){var ae=document.createElement(x);if(ne&&(ae.className=ne),te&&(ae.style.cssText=te),typeof z=="string")ae.appendChild(document.createTextNode(z));else if(z)for(var de=0;de<z.length;++de)ae.appendChild(z[de]);return ae}function ut(x,z,ne,te){var ae=mt(x,z,ne,te);return ae.setAttribute("role","presentation"),ae}var $e;document.createRange?$e=function(x,z,ne,te){var ae=document.createRange();return ae.setEnd(te||x,ne),ae.setStart(x,z),ae}:$e=function(x,z,ne){var te=document.body.createTextRange();try{te.moveToElementText(x.parentNode)}catch(ae){return te}return te.collapse(!0),te.moveEnd("character",ne),te.moveStart("character",z),te};function Ft(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 yt(){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 gn(x,z){var ne=x.className;Se(z).test(ne)||(x.className+=(ne?" ":"")+z)}function rt(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!Se(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var Mt=function(x){x.select()};dt?Mt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ye&&(Mt=function(x){try{x.select()}catch(z){}});function en(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function Yt(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 Qe(x,z,ne,te,ae){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var de=te||0,Ee=ae||0;;){var Ne=x.indexOf(" ",de);if(Ne<0||Ne>=z)return Ee+(z-de);Ee+=Ne-de,Ee+=ne-Ee%ne,de=Ne+1}}var Ie=function(){this.id=null,this.f=null,this.time=0,this.handler=en(this.onTimeout,this)};Ie.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Ie.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 Ot(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var In=50,mn={toString:function(){return"CodeMirror.Pass"}},pt={scroll:!1},wt={origin:"*mouse"},Qt={origin:"+move"};function Zn(x,z,ne){for(var te=0,ae=0;;){var de=x.indexOf(" ",te);de==-1&&(de=x.length);var Ee=de-te;if(de==x.length||ae+Ee>=z)return te+Math.min(Ee,z-ae);if(ae+=de-te,ae+=ne-ae%ne,te=de+1,ae>=z)return te}}var Cn=[""];function rn(x){for(;Cn.length<=x;)Cn.push(ln(Cn)+" ");return Cn[x]}function ln(x){return x[x.length-1]}function zn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function _n(x,z,ne){for(var te=0,ae=ne(z);te<x.length&&ne(x[te])<=ae;)te++;x.splice(te,0,z)}function Oe(){}function ue(x,z){var ne;return Object.create?ne=Object.create(x):(Oe.prototype=x,ne=new Oe),z&&Yt(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ve(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||le.test(x))}function pe(x,z){return z?z.source.indexOf("\\w")>-1&&ve(x)?!0:z.test(x):ve(x)}function se(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Be=/[\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 ft(x){return x.charCodeAt(0)>=768&&Be.test(x)}function Bt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&ft(x.charAt(z));)z+=ne;return z}function qt(x,z,ne){for(var te=z>ne?-1:1;;){if(z==ne)return z;var ae=(z+ne)/2,de=te<0?Math.ceil(ae):Math.floor(ae);if(de==z)return x(de)?z:ne;x(de)?ne=de:z=de+te}}function an(x,z,ne,te){if(!x)return te(z,ne,"ltr",0);for(var ae=!1,de=0;de<x.length;++de){var Ee=x[de];(Ee.from<ne&&Ee.to>z||z==ne&&Ee.to==z)&&(te(Math.max(Ee.from,z),Math.min(Ee.to,ne),Ee.level==1?"rtl":"ltr",de),ae=!0)}ae||te(z,ne,"ltr")}var vn=null;function dn(x,z,ne){var te;vn=null;for(var ae=0;ae<x.length;++ae){var de=x[ae];if(de.from<z&&de.to>z)return ae;de.to==z&&(de.from!=de.to&&ne=="before"?te=ae:vn=ae),de.from==z&&(de.from!=de.to&&ne!="before"?te=ae:vn=ae)}return te!=null?te:vn}var gt=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ne(Xe){return Xe<=247?x.charAt(Xe):1424<=Xe&&Xe<=1524?"R":1536<=Xe&&Xe<=1785?z.charAt(Xe-1536):1774<=Xe&&Xe<=2220?"r":8192<=Xe&&Xe<=8203?"w":Xe==8204?"b":"L"}var te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ae=/[stwN]/,de=/[LRr]/,Ee=/[Lb1n]/,Ne=/[1n]/;function Ke(Xe,Nt,Vt){this.level=Xe,this.from=Nt,this.to=Vt}return function(Xe,Nt){var Vt=Nt=="ltr"?"L":"R";if(Xe.length==0||Nt=="ltr"&&!te.test(Xe))return!1;for(var Wn=Xe.length,On=[],Er=0;Er<Wn;++Er)On.push(ne(Xe.charCodeAt(Er)));for(var $r=0,ai=Vt;$r<Wn;++$r){var Mi=On[$r];Mi=="m"?On[$r]=ai:ai=Mi}for(var Fi=0,bi=Vt;Fi<Wn;++Fi){var Hi=On[Fi];Hi=="1"&&bi=="r"?On[Fi]="n":de.test(Hi)&&(bi=Hi,Hi=="r"&&(On[Fi]="R"))}for(var wa=1,ka=On[0];wa<Wn-1;++wa){var Co=On[wa];Co=="+"&&ka=="1"&&On[wa+1]=="1"?On[wa]="1":Co==","&&ka==On[wa+1]&&(ka=="1"||ka=="n")&&(On[wa]=ka),ka=Co}for(var vs=0;vs<Wn;++vs){var xl=On[vs];if(xl==",")On[vs]="N";else if(xl=="%"){var $s=void 0;for($s=vs+1;$s<Wn&&On[$s]=="%";++$s);for(var Zl=vs&&On[vs-1]=="!"||$s<Wn&&On[$s]=="1"?"1":"N",jl=vs;jl<$s;++jl)On[jl]=Zl;vs=$s-1}}for(var ll=0,Ul=Vt;ll<Wn;++ll){var Xa=On[ll];Ul=="L"&&Xa=="1"?On[ll]="L":de.test(Xa)&&(Ul=Xa)}for(var Gs=0;Gs<Wn;++Gs)if(ae.test(On[Gs])){var Bs=void 0;for(Bs=Gs+1;Bs<Wn&&ae.test(On[Bs]);++Bs);for(var Xs=(Gs?On[Gs-1]:Vt)=="L",el=(Bs<Wn?On[Bs]:Vt)=="L",xu=Xs==el?Xs?"L":"R":Vt,Jl=Gs;Jl<Bs;++Jl)On[Jl]=xu;Gs=Bs-1}for(var Ll=[],Jo,hl=0;hl<Wn;)if(Ee.test(On[hl])){var Nd=hl;for(++hl;hl<Wn&&Ee.test(On[hl]);++hl);Ll.push(new Ke(0,Nd,hl))}else{var zc=hl,Xc=Ll.length,_c=Nt=="rtl"?1:0;for(++hl;hl<Wn&&On[hl]!="L";++hl);for(var cl=zc;cl<hl;)if(Ne.test(On[cl])){zc<cl&&(Ll.splice(Xc,0,new Ke(1,zc,cl)),Xc+=_c);var Su=cl;for(++cl;cl<hl&&Ne.test(On[cl]);++cl);Ll.splice(Xc,0,new Ke(2,Su,cl)),Xc+=_c,zc=cl}else++cl;zc<hl&&Ll.splice(Xc,0,new Ke(1,zc,hl))}return Nt=="ltr"&&(Ll[0].level==1&&(Jo=Xe.match(/^\s+/))&&(Ll[0].from=Jo[0].length,Ll.unshift(new Ke(0,0,Jo[0].length))),ln(Ll).level==1&&(Jo=Xe.match(/\s+$/))&&(ln(Ll).to-=Jo[0].length,Ll.push(new Ke(0,Wn-Jo[0].length,Wn)))),Nt=="rtl"?Ll.reverse():Ll}}();function It(x,z){var ne=x.order;return ne==null&&(ne=x.order=gt(x.text,z)),ne}var Ht=[],Xt=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]||Ht).concat(ne)}};function Tt(x,z){return x._handlers&&x._handlers[z]||Ht}function Yn(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,ae=te&&te[z];if(ae){var de=Ot(ae,ne);de>-1&&(te[z]=ae.slice(0,de).concat(ae.slice(de+1)))}}}function Rn(x,z){var ne=Tt(x,z);if(ne.length)for(var te=Array.prototype.slice.call(arguments,2),ae=0;ae<ne.length;++ae)ne[ae].apply(null,te)}function cr(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),Rn(x,ne||z.type,x,z),oi(z)||z.codemirrorIgnore}function Xr(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)Ot(ne,z[te])==-1&&ne.push(z[te])}function wr(x,z){return Tt(x,z).length>0}function kr(x){x.prototype.on=function(z,ne){Xt(this,z,ne)},x.prototype.off=function(z,ne){Yn(this,z,ne)}}function Ar(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function gi(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function oi(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function fi(x){Ar(x),gi(x)}function Pi(x){return x.target||x.srcElement}function Or(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),be&&x.ctrlKey&&z==1&&(z=3),z}var Jn=function(){if(ye&&_e<9)return!1;var x=mt("div");return"draggable"in x||"dragDrop"in x}(),qn;function nr(x){if(qn==null){var z=mt("span","\u200B");xt(x,mt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(qn=z.offsetWidth<=1&&z.offsetHeight>2&&!(ye&&_e<8))}var ne=qn?mt("span","\u200B"):mt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var Ur;function li(x){if(Ur!=null)return Ur;var z=xt(x,document.createTextNode("A\u062EA")),ne=$e(z,0,1).getBoundingClientRect(),te=$e(z,1,2).getBoundingClientRect();return Ue(x),!ne||ne.left==ne.right?!1:Ur=te.right-ne.right<3}var Lt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(x){for(var z=0,ne=[],te=x.length;z<=te;){var ae=x.indexOf(`
|
|
|
`,z);ae==-1&&(ae=x.length);var de=x.slice(z,x.charAt(ae-1)=="\r"?ae-1:ae),Ee=de.indexOf("\r");Ee!=-1?(ne.push(de.slice(0,Ee)),z+=Ee+1):(ne.push(de),z=ae+1)}return ne}:function(x){return x.split(/\r\n?|\n/)},Kn=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},Bn=function(){var x=mt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),yn=null;function xr(x){if(yn!=null)return yn;var z=xt(x,mt("span","x")),ne=z.getBoundingClientRect(),te=$e(z,0,1).getBoundingClientRect();return yn=Math.abs(ne.left-te.left)>1}var Sr={},mr={};function Qn(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),Sr[x]=z}function ht(x,z){mr[x]=z}function Et(x){if(typeof x=="string"&&mr.hasOwnProperty(x))x=mr[x];else if(x&&typeof x.name=="string"&&mr.hasOwnProperty(x.name)){var z=mr[x.name];typeof z=="string"&&(z={name:z}),x=ue(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return Et("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return Et("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function zt(x,z){z=Et(z);var ne=Sr[z.name];if(!ne)return zt(x,"text/plain");var te=ne(x,z);if(fn.hasOwnProperty(z.name)){var ae=fn[z.name];for(var de in ae)ae.hasOwnProperty(de)&&(te.hasOwnProperty(de)&&(te["_"+de]=te[de]),te[de]=ae[de])}if(te.name=z.name,z.helperType&&(te.helperType=z.helperType),z.modeProps)for(var Ee in z.modeProps)te[Ee]=z.modeProps[Ee];return te}var fn={};function at(x,z){var ne=fn.hasOwnProperty(x)?fn[x]:fn[x]={};Yt(z,ne)}function Rt(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var ne={};for(var te in z){var ae=z[te];ae instanceof Array&&(ae=ae.concat([])),ne[te]=ae}return ne}function on(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 tn(x,z,ne){return x.startState?x.startState(z,ne):!0}var Mn=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};Mn.prototype.eol=function(){return this.pos>=this.string.length},Mn.prototype.sol=function(){return this.pos==this.lineStart},Mn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Mn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Mn.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},Mn.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Mn.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Mn.prototype.skipToEnd=function(){this.pos=this.string.length},Mn.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Mn.prototype.backUp=function(x){this.pos-=x},Mn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},Mn.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},Mn.prototype.match=function(x,z,ne){if(typeof x=="string"){var te=function(Ee){return ne?Ee.toLowerCase():Ee},ae=this.string.substr(this.pos,x.length);if(te(ae)==te(x))return z!==!1&&(this.pos+=x.length),!0}else{var de=this.string.slice(this.pos).match(x);return de&&de.index>0?null:(de&&z!==!1&&(this.pos+=de[0].length),de)}},Mn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Mn.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Mn.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Mn.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function wn(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 ae=ne.children[te],de=ae.chunkSize();if(z<de){ne=ae;break}z-=de}return ne.lines[z]}function rr(x,z,ne){var te=[],ae=z.line;return x.iter(z.line,ne.line+1,function(de){var Ee=de.text;ae==ne.line&&(Ee=Ee.slice(0,ne.ch)),ae==z.line&&(Ee=Ee.slice(z.ch)),te.push(Ee),++ae}),te}function zr(x,z,ne){var te=[];return x.iter(z,ne,function(ae){te.push(ae.text)}),te}function vr(x,z){var ne=z-x.height;if(ne)for(var te=x;te;te=te.parent)te.height+=ne}function yr(x){if(x.parent==null)return null;for(var z=x.parent,ne=Ot(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ae=0;te.children[ae]!=z;++ae)ne+=te.children[ae].chunkSize();return ne+z.first}function Lr(x,z){var ne=x.first;e:do{for(var te=0;te<x.children.length;++te){var ae=x.children[te],de=ae.height;if(z<de){x=ae;continue e}z-=de,ne+=ae.chunkSize()}return ne}while(!x.lines);for(var Ee=0;Ee<x.lines.length;++Ee){var Ne=x.lines[Ee],Ke=Ne.height;if(z<Ke)break;z-=Ke}return ne+Ee}function Dr(x,z){return z>=x.first&&z<x.first+x.size}function hi(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function Vn(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof Vn))return new Vn(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function br(x,z){return x.line-z.line||x.ch-z.ch}function Ui(x,z){return x.sticky==z.sticky&&br(x,z)==0}function na(x){return Vn(x.line,x.ch)}function Wr(x,z){return br(x,z)<0?z:x}function vi(x,z){return br(x,z)<0?x:z}function ra(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Kr(x,z){if(z.line<x.first)return Vn(x.first,0);var ne=x.first+x.size-1;return z.line>ne?Vn(ne,wn(x,ne).text.length):Vi(z,wn(x,z.line).text.length)}function Vi(x,z){var ne=x.ch;return ne==null||ne>z?Vn(x.line,z):ne<0?Vn(x.line,0):x}function lr(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=Kr(x,z[te]);return ne}var Na=function(x,z){this.state=x,this.lookAhead=z},Ca=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};Ca.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},Ca.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}},Ca.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ca.fromSaved=function(x,z,ne){return z instanceof Na?new Ca(x,Rt(x.mode,z.state),ne,z.lookAhead):new Ca(x,Rt(x.mode,z),ne)},Ca.prototype.save=function(x){var z=x!==!1?Rt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Na(z,this.maxLookAhead):z};function ho(x,z,ne,te){var ae=[x.state.modeGen],de={};Pa(x,z.text,x.doc.mode,ne,function(Xe,Nt){return ae.push(Xe,Nt)},de,te);for(var Ee=ne.state,Ne=function(Xe){ne.baseTokens=ae;var Nt=x.state.overlays[Xe],Vt=1,Wn=0;ne.state=!0,Pa(x,z.text,Nt.mode,ne,function(On,Er){for(var $r=Vt;Wn<On;){var ai=ae[Vt];ai>On&&ae.splice(Vt,1,On,ae[Vt+1],ai),Vt+=2,Wn=Math.min(On,ai)}if(Er)if(Nt.opaque)ae.splice($r,Vt-$r,On,"overlay "+Er),Vt=$r+2;else for(;$r<Vt;$r+=2){var Mi=ae[$r+1];ae[$r+1]=(Mi?Mi+" ":"")+"overlay "+Er}},de),ne.state=Ee,ne.baseTokens=null,ne.baseTokenPos=1},Ke=0;Ke<x.state.overlays.length;++Ke)Ne(Ke);return{styles:ae,classes:de.bgClass||de.textClass?de:null}}function Ha(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=_a(x,yr(z)),ae=z.text.length>x.options.maxHighlightLength&&Rt(x.doc.mode,te.state),de=ho(x,z,te);ae&&(te.state=ae),z.stateAfter=te.save(!ae),z.styles=de.styles,de.classes?z.styleClasses=de.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 _a(x,z,ne){var te=x.doc,ae=x.display;if(!te.mode.startState)return new Ca(te,!0,z);var de=mo(x,z,ne),Ee=de>te.first&&wn(te,de-1).stateAfter,Ne=Ee?Ca.fromSaved(te,Ee,de):new Ca(te,tn(te.mode),de);return te.iter(de,z,function(Ke){Ji(x,Ke.text,Ne);var Xe=Ne.line;Ke.stateAfter=Xe==z-1||Xe%5==0||Xe>=ae.viewFrom&&Xe<ae.viewTo?Ne.save():null,Ne.nextLine()}),ne&&(te.modeFrontier=Ne.line),Ne}function Ji(x,z,ne,te){var ae=x.doc.mode,de=new Mn(z,x.options.tabSize,ne);for(de.start=de.pos=te||0,z==""&&Fa(ae,ne.state);!de.eol();)ya(ae,de,ne.state),de.start=de.pos}function Fa(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=on(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function ya(x,z,ne,te){for(var ae=0;ae<10;ae++){te&&(te[0]=on(x,ne).mode);var de=x.token(z,ne);if(z.pos>z.start)return de}throw new Error("Mode "+x.name+" failed to advance stream.")}var Wa=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function po(x,z,ne,te){var ae=x.doc,de=ae.mode,Ee;z=Kr(ae,z);var Ne=wn(ae,z.line),Ke=_a(x,z.line,ne),Xe=new Mn(Ne.text,x.options.tabSize,Ke),Nt;for(te&&(Nt=[]);(te||Xe.pos<z.ch)&&!Xe.eol();)Xe.start=Xe.pos,Ee=ya(de,Xe,Ke.state),te&&Nt.push(new Wa(Xe,Ee,Rt(ae.mode,Ke.state)));return te?Nt:new Wa(Xe,Ee,Ke.state)}function ja(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 Pa(x,z,ne,te,ae,de,Ee){var Ne=ne.flattenSpans;Ne==null&&(Ne=x.options.flattenSpans);var Ke=0,Xe=null,Nt=new Mn(z,x.options.tabSize,te),Vt,Wn=x.options.addModeClass&&[null];for(z==""&&ja(Fa(ne,te.state),de);!Nt.eol();){if(Nt.pos>x.options.maxHighlightLength?(Ne=!1,Ee&&Ji(x,z,te,Nt.pos),Nt.pos=z.length,Vt=null):Vt=ja(ya(ne,Nt,te.state,Wn),de),Wn){var On=Wn[0].name;On&&(Vt="m-"+(Vt?On+" "+Vt:On))}if(!Ne||Xe!=Vt){for(;Ke<Nt.start;)Ke=Math.min(Nt.start,Ke+5e3),ae(Ke,Xe);Xe=Vt}Nt.start=Nt.pos}for(;Ke<Nt.pos;){var Er=Math.min(Nt.pos,Ke+5e3);ae(Er,Xe),Ke=Er}}function mo(x,z,ne){for(var te,ae,de=x.doc,Ee=ne?-1:z-(x.doc.mode.innerMode?1e3:100),Ne=z;Ne>Ee;--Ne){if(Ne<=de.first)return de.first;var Ke=wn(de,Ne-1),Xe=Ke.stateAfter;if(Xe&&(!ne||Ne+(Xe instanceof Na?Xe.lookAhead:0)<=de.modeFrontier))return Ne;var Nt=Qe(Ke.text,null,x.options.tabSize);(ae==null||te>Nt)&&(ae=Ne-1,te=Nt)}return ae}function Eo(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 ae=wn(x,te).stateAfter;if(ae&&(!(ae instanceof Na)||te+ae.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var no=!1,ia=!1;function Zt(){no=!0}function At(){ia=!0}function xn(x,z,ne){this.marker=x,this.from=z,this.to=ne}function jn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function hr(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function Qr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function ni(x,z,ne){var te;if(x)for(var ae=0;ae<x.length;++ae){var de=x[ae],Ee=de.marker,Ne=de.from==null||(Ee.inclusiveLeft?de.from<=z:de.from<z);if(Ne||de.from==z&&Ee.type=="bookmark"&&(!ne||!de.marker.insertLeft)){var Ke=de.to==null||(Ee.inclusiveRight?de.to>=z:de.to>z);(te||(te=[])).push(new xn(Ee,de.from,Ke?null:de.to))}}return te}function mi(x,z,ne){var te;if(x)for(var ae=0;ae<x.length;++ae){var de=x[ae],Ee=de.marker,Ne=de.to==null||(Ee.inclusiveRight?de.to>=z:de.to>z);if(Ne||de.from==z&&Ee.type=="bookmark"&&(!ne||de.marker.insertLeft)){var Ke=de.from==null||(Ee.inclusiveLeft?de.from<=z:de.from<z);(te||(te=[])).push(new xn(Ee,Ke?null:de.from-z,de.to==null?null:de.to-z))}}return te}function ki(x,z){if(z.full)return null;var ne=Dr(x,z.from.line)&&wn(x,z.from.line).markedSpans,te=Dr(x,z.to.line)&&wn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ae=z.from.ch,de=z.to.ch,Ee=br(z.from,z.to)==0,Ne=ni(ne,ae,Ee),Ke=mi(te,de,Ee),Xe=z.text.length==1,Nt=ln(z.text).length+(Xe?ae:0);if(Ne)for(var Vt=0;Vt<Ne.length;++Vt){var Wn=Ne[Vt];if(Wn.to==null){var On=jn(Ke,Wn.marker);On?Xe&&(Wn.to=On.to==null?null:On.to+Nt):Wn.to=ae}}if(Ke)for(var Er=0;Er<Ke.length;++Er){var $r=Ke[Er];if($r.to!=null&&($r.to+=Nt),$r.from==null){var ai=jn(Ne,$r.marker);ai||($r.from=Nt,Xe&&(Ne||(Ne=[])).push($r))}else $r.from+=Nt,Xe&&(Ne||(Ne=[])).push($r)}Ne&&(Ne=Si(Ne)),Ke&&Ke!=Ne&&(Ke=Si(Ke));var Mi=[Ne];if(!Xe){var Fi=z.text.length-2,bi;if(Fi>0&&Ne)for(var Hi=0;Hi<Ne.length;++Hi)Ne[Hi].to==null&&(bi||(bi=[])).push(new xn(Ne[Hi].marker,null,null));for(var wa=0;wa<Fi;++wa)Mi.push(bi);Mi.push(Ke)}return Mi}function Si(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 Qi(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(On){if(On.markedSpans)for(var Er=0;Er<On.markedSpans.length;++Er){var $r=On.markedSpans[Er].marker;$r.readOnly&&(!te||Ot(te,$r)==-1)&&(te||(te=[])).push($r)}}),!te)return null;for(var ae=[{from:z,to:ne}],de=0;de<te.length;++de)for(var Ee=te[de],Ne=Ee.find(0),Ke=0;Ke<ae.length;++Ke){var Xe=ae[Ke];if(!(br(Xe.to,Ne.from)<0||br(Xe.from,Ne.to)>0)){var Nt=[Ke,1],Vt=br(Xe.from,Ne.from),Wn=br(Xe.to,Ne.to);(Vt<0||!Ee.inclusiveLeft&&!Vt)&&Nt.push({from:Xe.from,to:Ne.from}),(Wn>0||!Ee.inclusiveRight&&!Wn)&&Nt.push({from:Ne.to,to:Xe.to}),ae.splice.apply(ae,Nt),Ke+=Nt.length-3}}return ae}function aa(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function ba(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function sn(x){return x.inclusiveLeft?-1:0}function bn(x){return x.inclusiveRight?1:0}function Fn(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ae=z.find(),de=br(te.from,ae.from)||sn(x)-sn(z);if(de)return-de;var Ee=br(te.to,ae.to)||bn(x)-bn(z);return Ee||z.id-x.id}function he(x,z){var ne=ia&&x.markedSpans,te;if(ne)for(var ae=void 0,de=0;de<ne.length;++de)ae=ne[de],ae.marker.collapsed&&(z?ae.from:ae.to)==null&&(!te||Fn(te,ae.marker)<0)&&(te=ae.marker);return te}function Pe(x){return he(x,!0)}function Fe(x){return he(x,!1)}function We(x,z){var ne=ia&&x.markedSpans,te;if(ne)for(var ae=0;ae<ne.length;++ae){var de=ne[ae];de.marker.collapsed&&(de.from==null||de.from<z)&&(de.to==null||de.to>z)&&(!te||Fn(te,de.marker)<0)&&(te=de.marker)}return te}function je(x,z,ne,te,ae){var de=wn(x,z),Ee=ia&&de.markedSpans;if(Ee)for(var Ne=0;Ne<Ee.length;++Ne){var Ke=Ee[Ne];if(Ke.marker.collapsed){var Xe=Ke.marker.find(0),Nt=br(Xe.from,ne)||sn(Ke.marker)-sn(ae),Vt=br(Xe.to,te)||bn(Ke.marker)-bn(ae);if(!(Nt>=0&&Vt<=0||Nt<=0&&Vt>=0)&&(Nt<=0&&(Ke.marker.inclusiveRight&&ae.inclusiveLeft?br(Xe.to,ne)>=0:br(Xe.to,ne)>0)||Nt>=0&&(Ke.marker.inclusiveRight&&ae.inclusiveLeft?br(Xe.from,te)<=0:br(Xe.from,te)<0)))return!0}}}function et(x){for(var z;z=Pe(x);)x=z.find(-1,!0).line;return x}function tt(x){for(var z;z=Fe(x);)x=z.find(1,!0).line;return x}function kt(x){for(var z,ne;z=Fe(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function Wt(x,z){var ne=wn(x,z),te=et(ne);return ne==te?z:yr(te)}function Sn(x,z){if(z>x.lastLine())return z;var ne=wn(x,z),te;if(!Nn(x,ne))return z;for(;te=Fe(ne);)ne=te.find(1,!0).line;return yr(ne)+1}function Nn(x,z){var ne=ia&&z.markedSpans;if(ne){for(var te=void 0,ae=0;ae<ne.length;++ae)if(te=ne[ae],!!te.marker.collapsed){if(te.from==null)return!0;if(!te.marker.widgetNode&&te.from==0&&te.marker.inclusiveLeft&&En(x,z,te))return!0}}}function En(x,z,ne){if(ne.to==null){var te=ne.marker.find(1,!0);return En(x,te.line,jn(te.line.markedSpans,ne.marker))}if(ne.marker.inclusiveRight&&ne.to==z.text.length)return!0;for(var ae=void 0,de=0;de<z.markedSpans.length;++de)if(ae=z.markedSpans[de],ae.marker.collapsed&&!ae.marker.widgetNode&&ae.from==ne.to&&(ae.to==null||ae.to!=ne.from)&&(ae.marker.inclusiveLeft||ne.marker.inclusiveRight)&&En(x,z,ae))return!0}function cn(x){x=et(x);for(var z=0,ne=x.parent,te=0;te<ne.lines.length;++te){var ae=ne.lines[te];if(ae==x)break;z+=ae.height}for(var de=ne.parent;de;ne=de,de=ne.parent)for(var Ee=0;Ee<de.children.length;++Ee){var Ne=de.children[Ee];if(Ne==ne)break;z+=Ne.height}return z}function un(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Pe(te);){var ae=ne.find(0,!0);te=ae.from.line,z+=ae.from.ch-ae.to.ch}for(te=x;ne=Fe(te);){var de=ne.find(0,!0);z-=te.text.length-de.from.ch,te=de.to.line,z+=te.text.length-de.to.ch}return z}function Gt(x){var z=x.display,ne=x.doc;z.maxLine=wn(ne,ne.first),z.maxLineLength=un(z.maxLine),z.maxLineChanged=!0,ne.iter(function(te){var ae=un(te);ae>z.maxLineLength&&(z.maxLineLength=ae,z.maxLine=te)})}var kn=function(x,z,ne){this.text=x,ba(this,z),this.height=ne?ne(this):1};kn.prototype.lineNo=function(){return yr(this)},kr(kn);function ir(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),aa(x),ba(x,ne);var ae=te?te(x):1;ae!=x.height&&vr(x,ae)}function $n(x){x.parent=null,aa(x)}var Hn={},Gn={};function ar(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?Gn:Hn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function ur(x,z){var ne=ut("span",null,null,ce?"padding-right: .1px":null),te={pre:ut("pre",[ne],"CodeMirror-line"),content:ne,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var ae=0;ae<=(z.rest?z.rest.length:0);ae++){var de=ae?z.rest[ae-1]:z.line,Ee=void 0;te.pos=0,te.addToken=Je,li(x.display.measure)&&(Ee=It(de,x.doc.direction))&&(te.addToken=_t(te.addToken,Ee)),te.map=[];var Ne=z!=x.display.externalMeasured&&yr(de);Dn(de,te,Ha(x,de,Ne)),de.styleClasses&&(de.styleClasses.bgClass&&(te.bgClass=rt(de.styleClasses.bgClass,te.bgClass||"")),de.styleClasses.textClass&&(te.textClass=rt(de.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(nr(x.display.measure))),ae==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(ce){var Ke=te.content.lastChild;(/\bcm-tab\b/.test(Ke.className)||Ke.querySelector&&Ke.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return Rn(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=rt(te.pre.className,te.textClass||"")),te}function Ve(x){var z=mt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Je(x,z,ne,te,ae,de,Ee){if(z){var Ne=x.splitSpaces?Pt(z,x.trailingSpace):z,Ke=x.cm.state.specialChars,Xe=!1,Nt;if(!Ke.test(z))x.col+=z.length,Nt=document.createTextNode(Ne),x.map.push(x.pos,x.pos+z.length,Nt),ye&&_e<9&&(Xe=!0),x.pos+=z.length;else{Nt=document.createDocumentFragment();for(var Vt=0;;){Ke.lastIndex=Vt;var Wn=Ke.exec(z),On=Wn?Wn.index-Vt:z.length-Vt;if(On){var Er=document.createTextNode(Ne.slice(Vt,Vt+On));ye&&_e<9?Nt.appendChild(mt("span",[Er])):Nt.appendChild(Er),x.map.push(x.pos,x.pos+On,Er),x.col+=On,x.pos+=On}if(!Wn)break;Vt+=On+1;var $r=void 0;if(Wn[0]==" "){var ai=x.cm.options.tabSize,Mi=ai-x.col%ai;$r=Nt.appendChild(mt("span",rn(Mi),"cm-tab")),$r.setAttribute("role","presentation"),$r.setAttribute("cm-text"," "),x.col+=Mi}else Wn[0]=="\r"||Wn[0]==`
|
|
|
`?($r=Nt.appendChild(mt("span",Wn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$r.setAttribute("cm-text",Wn[0]),x.col+=1):($r=x.cm.options.specialCharPlaceholder(Wn[0]),$r.setAttribute("cm-text",Wn[0]),ye&&_e<9?Nt.appendChild(mt("span",[$r])):Nt.appendChild($r),x.col+=1);x.map.push(x.pos,x.pos+1,$r),x.pos++}}if(x.trailingSpace=Ne.charCodeAt(z.length-1)==32,ne||te||ae||Xe||de||Ee){var Fi=ne||"";te&&(Fi+=te),ae&&(Fi+=ae);var bi=mt("span",[Nt],Fi,de);if(Ee)for(var Hi in Ee)Ee.hasOwnProperty(Hi)&&Hi!="style"&&Hi!="class"&&bi.setAttribute(Hi,Ee[Hi]);return x.content.appendChild(bi)}x.content.appendChild(Nt)}}function Pt(x,z){if(x.length>1&&!/ /.test(x))return x;for(var ne=z,te="",ae=0;ae<x.length;ae++){var de=x.charAt(ae);de==" "&&ne&&(ae==x.length-1||x.charCodeAt(ae+1)==32)&&(de="\xA0"),te+=de,ne=de==" "}return te}function _t(x,z){return function(ne,te,ae,de,Ee,Ne,Ke){ae=ae?ae+" cm-force-border":"cm-force-border";for(var Xe=ne.pos,Nt=Xe+te.length;;){for(var Vt=void 0,Wn=0;Wn<z.length&&(Vt=z[Wn],!(Vt.to>Xe&&Vt.from<=Xe));Wn++);if(Vt.to>=Nt)return x(ne,te,ae,de,Ee,Ne,Ke);x(ne,te.slice(0,Vt.to-Xe),ae,de,null,Ne,Ke),de=null,te=te.slice(Vt.to-Xe),Xe=Vt.to}}}function hn(x,z,ne,te){var ae=!te&&ne.widgetNode;ae&&x.map.push(x.pos,x.pos+z,ae),!te&&x.cm.display.input.needsContentAttribute&&(ae||(ae=x.content.appendChild(document.createElement("span"))),ae.setAttribute("cm-marker",ne.id)),ae&&(x.cm.display.input.setUneditable(ae),x.content.appendChild(ae)),x.pos+=z,x.trailingSpace=!1}function Dn(x,z,ne){var te=x.markedSpans,ae=x.text,de=0;if(!te){for(var Ee=1;Ee<ne.length;Ee+=2)z.addToken(z,ae.slice(de,de=ne[Ee]),ar(ne[Ee+1],z.cm.options));return}for(var Ne=ae.length,Ke=0,Xe=1,Nt="",Vt,Wn,On=0,Er,$r,ai,Mi,Fi;;){if(On==Ke){Er=$r=ai=Wn="",Fi=null,Mi=null,On=1/0;for(var bi=[],Hi=void 0,wa=0;wa<te.length;++wa){var ka=te[wa],Co=ka.marker;if(Co.type=="bookmark"&&ka.from==Ke&&Co.widgetNode)bi.push(Co);else if(ka.from<=Ke&&(ka.to==null||ka.to>Ke||Co.collapsed&&ka.to==Ke&&ka.from==Ke)){if(ka.to!=null&&ka.to!=Ke&&On>ka.to&&(On=ka.to,$r=""),Co.className&&(Er+=" "+Co.className),Co.css&&(Wn=(Wn?Wn+";":"")+Co.css),Co.startStyle&&ka.from==Ke&&(ai+=" "+Co.startStyle),Co.endStyle&&ka.to==On&&(Hi||(Hi=[])).push(Co.endStyle,ka.to),Co.title&&((Fi||(Fi={})).title=Co.title),Co.attributes)for(var vs in Co.attributes)(Fi||(Fi={}))[vs]=Co.attributes[vs];Co.collapsed&&(!Mi||Fn(Mi.marker,Co)<0)&&(Mi=ka)}else ka.from>Ke&&On>ka.from&&(On=ka.from)}if(Hi)for(var xl=0;xl<Hi.length;xl+=2)Hi[xl+1]==On&&($r+=" "+Hi[xl]);if(!Mi||Mi.from==Ke)for(var $s=0;$s<bi.length;++$s)hn(z,0,bi[$s]);if(Mi&&(Mi.from||0)==Ke){if(hn(z,(Mi.to==null?Ne+1:Mi.to)-Ke,Mi.marker,Mi.from==null),Mi.to==null)return;Mi.to==Ke&&(Mi=!1)}}if(Ke>=Ne)break;for(var Zl=Math.min(Ne,On);;){if(Nt){var jl=Ke+Nt.length;if(!Mi){var ll=jl>Zl?Nt.slice(0,Zl-Ke):Nt;z.addToken(z,ll,Vt?Vt+Er:Er,ai,Ke+ll.length==On?$r:"",Wn,Fi)}if(jl>=Zl){Nt=Nt.slice(Zl-Ke),Ke=Zl;break}Ke=jl,ai=""}Nt=ae.slice(de,de=ne[Xe++]),Vt=ar(ne[Xe++],z.cm.options)}}}function An(x,z,ne){this.line=z,this.rest=kt(z),this.size=this.rest?yr(ln(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=Nn(x,z)}function or(x,z,ne){for(var te=[],ae,de=z;de<ne;de=ae){var Ee=new An(x.doc,wn(x.doc,de),de);ae=de+Ee.size,te.push(Ee)}return te}var Un=null;function Tn(x){Un?Un.ops.push(x):x.ownsGroup=Un={ops:[x],delayedCallbacks:[]}}function tr(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 ae=x.ops[te];if(ae.cursorActivityHandlers)for(;ae.cursorActivityCalled<ae.cursorActivityHandlers.length;)ae.cursorActivityHandlers[ae.cursorActivityCalled++].call(null,ae.cm)}}while(ne<z.length)}function dr(x,z){var ne=x.ownsGroup;if(ne)try{tr(ne)}finally{Un=null,z(ne)}}var Pr=null;function fr(x,z){var ne=Tt(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ae;Un?ae=Un.delayedCallbacks:Pr?ae=Pr:(ae=Pr=[],setTimeout(Fr,0));for(var de=function(Ne){ae.push(function(){return ne[Ne].apply(null,te)})},Ee=0;Ee<ne.length;++Ee)de(Ee)}}function Fr(){var x=Pr;Pr=null;for(var z=0;z<x.length;++z)x[z]()}function ri(x,z,ne,te){for(var ae=0;ae<z.changes.length;ae++){var de=z.changes[ae];de=="text"?Jr(x,z):de=="gutter"?_i(x,z,ne,te):de=="class"?si(x,z):de=="widget"&&Hr(x,z,te)}z.changes=null}function Vr(x){return x.node==x.text&&(x.node=mt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ye&&_e<8&&(x.node.style.zIndex=2)),x.node}function ii(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=Vr(z);z.background=te.insertBefore(mt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function Br(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):ur(x,z)}function Jr(x,z){var ne=z.text.className,te=Br(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,si(x,z)):ne&&(z.text.className=ne)}function si(x,z){ii(x,z),z.line.wrapClass?Vr(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 _i(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 ae=Vr(z);z.gutterBackground=mt("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),ae.insertBefore(z.gutterBackground,z.text)}var de=z.line.gutterMarkers;if(x.options.lineNumbers||de){var Ee=Vr(z),Ne=z.gutter=mt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(Ne),Ee.insertBefore(Ne,z.text),z.line.gutterClass&&(Ne.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!de||!de["CodeMirror-linenumbers"])&&(z.lineNumber=Ne.appendChild(mt("div",hi(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),de)for(var Ke=0;Ke<x.display.gutterSpecs.length;++Ke){var Xe=x.display.gutterSpecs[Ke].className,Nt=de.hasOwnProperty(Xe)&&de[Xe];Nt&&Ne.appendChild(mt("div",[Nt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[Xe]+"px; width: "+te.gutterWidth[Xe]+"px"))}}}function Hr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=Se("CodeMirror-linewidget"),ae=z.node.firstChild,de=void 0;ae;ae=de)de=ae.nextSibling,te.test(ae.className)&&z.node.removeChild(ae);zi(x,z,ne)}function Bi(x,z,ne,te){var ae=Br(x,z);return z.text=z.node=ae.pre,ae.bgClass&&(z.bgClass=ae.bgClass),ae.textClass&&(z.textClass=ae.textClass),si(x,z),_i(x,z,ne,te),zi(x,z,te),z.node}function zi(x,z,ne){if(Ia(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)Ia(x,z.rest[te],z,ne,!1)}function Ia(x,z,ne,te,ae){if(z.widgets)for(var de=Vr(ne),Ee=0,Ne=z.widgets;Ee<Ne.length;++Ee){var Ke=Ne[Ee],Xe=mt("div",[Ke.node],"CodeMirror-linewidget"+(Ke.className?" "+Ke.className:""));Ke.handleMouseEvents||Xe.setAttribute("cm-ignore-events","true"),ma(Ke,Xe,ne,te),x.display.input.setUneditable(Xe),ae&&Ke.above?de.insertBefore(Xe,ne.gutter||ne.text):de.appendChild(Xe),fr(Ke,"redraw")}}function ma(x,z,ne,te){if(x.noHScroll){(ne.alignable||(ne.alignable=[])).push(z);var ae=te.wrapperWidth;z.style.left=te.fixedPos+"px",x.coverGutter||(ae-=te.gutterTotalWidth,z.style.paddingLeft=te.gutterTotalWidth+"px"),z.style.width=ae+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-te.gutterTotalWidth+"px"))}function qi(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!Ft(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;"),xt(z.display.measure,mt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function Oi(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 Ri(x){return x.lineSpace.offsetTop}function xi(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function ea(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=xt(x.measure,mt("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 wi(x){return In-x.display.nativeBarWidth}function ci(x){return x.display.scroller.clientWidth-wi(x)-x.display.barWidth}function Wi(x){return x.display.scroller.clientHeight-wi(x)-x.display.barHeight}function ha(x,z,ne){var te=x.options.lineWrapping,ae=te&&ci(x);if(!z.measure.heights||te&&z.measure.width!=ae){var de=z.measure.heights=[];if(te){z.measure.width=ae;for(var Ee=z.text.firstChild.getClientRects(),Ne=0;Ne<Ee.length-1;Ne++){var Ke=Ee[Ne],Xe=Ee[Ne+1];Math.abs(Ke.bottom-Xe.bottom)>2&&de.push((Ke.bottom+Xe.top)/2-ne.top)}}de.push(ne.bottom-ne.top)}}function go(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 ae=0;ae<x.rest.length;ae++)if(yr(x.rest[ae])>ne)return{map:x.measure.maps[ae],cache:x.measure.caches[ae],before:!0}}function lo(x,z){z=et(z);var ne=yr(z),te=x.display.externalMeasured=new An(x.doc,z,ne);te.lineN=ne;var ae=te.built=ur(x,te);return te.text=ae.pre,xt(x.display.lineMeasure,ae.pre),te}function Ua(x,z,ne,te){return ji(x,Ea(x,z),ne,te)}function Ba(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[za(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function Ea(x,z){var ne=yr(z),te=Ba(x,ne);te&&!te.text?te=null:te&&te.changes&&(ri(x,te,ne,xs(x)),x.curOp.forceUpdate=!0),te||(te=lo(x,z));var ae=go(te,z,ne);return{line:z,view:te,rect:null,map:ae.map,cache:ae.cache,before:ae.before,hasHeights:!1}}function ji(x,z,ne,te,ae){z.before&&(ne=-1);var de=ne+(te||""),Ee;return z.cache.hasOwnProperty(de)?Ee=z.cache[de]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(ha(x,z.view,z.rect),z.hasHeights=!0),Ee=xa(x,z,ne,te),Ee.bogus||(z.cache[de]=Ee)),{left:Ee.left,right:Ee.right,top:ae?Ee.rtop:Ee.top,bottom:ae?Ee.rbottom:Ee.bottom}}var Ao={left:0,right:0,top:0,bottom:0};function la(x,z,ne){for(var te,ae,de,Ee,Ne,Ke,Xe=0;Xe<x.length;Xe+=3)if(Ne=x[Xe],Ke=x[Xe+1],z<Ne?(ae=0,de=1,Ee="left"):z<Ke?(ae=z-Ne,de=ae+1):(Xe==x.length-3||z==Ke&&x[Xe+3]>z)&&(de=Ke-Ne,ae=de-1,z>=Ke&&(Ee="right")),ae!=null){if(te=x[Xe+2],Ne==Ke&&ne==(te.insertLeft?"left":"right")&&(Ee=ne),ne=="left"&&ae==0)for(;Xe&&x[Xe-2]==x[Xe-3]&&x[Xe-1].insertLeft;)te=x[(Xe-=3)+2],Ee="left";if(ne=="right"&&ae==Ke-Ne)for(;Xe<x.length-3&&x[Xe+3]==x[Xe+4]&&!x[Xe+5].insertLeft;)te=x[(Xe+=3)+2],Ee="right";break}return{node:te,start:ae,end:de,collapse:Ee,coverStart:Ne,coverEnd:Ke}}function Li(x,z){var ne=Ao;if(z=="left")for(var te=0;te<x.length&&(ne=x[te]).left==ne.right;te++);else for(var ae=x.length-1;ae>=0&&(ne=x[ae]).left==ne.right;ae--);return ne}function xa(x,z,ne,te){var ae=la(z.map,ne,te),de=ae.node,Ee=ae.start,Ne=ae.end,Ke=ae.collapse,Xe;if(de.nodeType==3){for(var Nt=0;Nt<4;Nt++){for(;Ee&&ft(z.line.text.charAt(ae.coverStart+Ee));)--Ee;for(;ae.coverStart+Ne<ae.coverEnd&&ft(z.line.text.charAt(ae.coverStart+Ne));)++Ne;if(ye&&_e<9&&Ee==0&&Ne==ae.coverEnd-ae.coverStart?Xe=de.parentNode.getBoundingClientRect():Xe=Li($e(de,Ee,Ne).getClientRects(),te),Xe.left||Xe.right||Ee==0)break;Ne=Ee,Ee=Ee-1,Ke="right"}ye&&_e<11&&(Xe=Ya(x.display.measure,Xe))}else{Ee>0&&(Ke=te="right");var Vt;x.options.lineWrapping&&(Vt=de.getClientRects()).length>1?Xe=Vt[te=="right"?Vt.length-1:0]:Xe=de.getBoundingClientRect()}if(ye&&_e<9&&!Ee&&(!Xe||!Xe.left&&!Xe.right)){var Wn=de.parentNode.getClientRects()[0];Wn?Xe={left:Wn.left,right:Wn.left+us(x.display),top:Wn.top,bottom:Wn.bottom}:Xe=Ao}for(var On=Xe.top-z.rect.top,Er=Xe.bottom-z.rect.top,$r=(On+Er)/2,ai=z.view.measure.heights,Mi=0;Mi<ai.length-1&&!($r<ai[Mi]);Mi++);var Fi=Mi?ai[Mi-1]:0,bi=ai[Mi],Hi={left:(Ke=="right"?Xe.right:Xe.left)-z.rect.left,right:(Ke=="left"?Xe.left:Xe.right)-z.rect.left,top:Fi,bottom:bi};return!Xe.left&&!Xe.right&&(Hi.bogus=!0),x.options.singleCursorHeightPerLine||(Hi.rtop=On,Hi.rbottom=Er),Hi}function Ya(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xr(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 Ma(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 Ta(x){x.display.externalMeasure=null,Ue(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Ma(x.display.view[z])}function Ki(x){Ta(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function Ja(){return ge&&ct?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function vo(){return ge&&ct?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ro(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=qi(x.widgets[ne]));return z}function yo(x,z,ne,te,ae){if(!ae){var de=ro(z);ne.top+=de,ne.bottom+=de}if(te=="line")return ne;te||(te="local");var Ee=cn(z);if(te=="local"?Ee+=Ri(x.display):Ee-=x.display.viewOffset,te=="page"||te=="window"){var Ne=x.display.lineSpace.getBoundingClientRect();Ee+=Ne.top+(te=="window"?0:vo());var Ke=Ne.left+(te=="window"?0:Ja());ne.left+=Ke,ne.right+=Ke}return ne.top+=Ee,ne.bottom+=Ee,ne}function Mo(x,z,ne){if(ne=="div")return z;var te=z.left,ae=z.top;if(ne=="page")te-=Ja(),ae-=vo();else if(ne=="local"||!ne){var de=x.display.sizer.getBoundingClientRect();te+=de.left,ae+=de.top}var Ee=x.display.lineSpace.getBoundingClientRect();return{left:te-Ee.left,top:ae-Ee.top}}function Xo(x,z,ne,te,ae){return te||(te=wn(x.doc,z.line)),yo(x,te,Ua(x,te,z.ch,ae),ne)}function io(x,z,ne,te,ae,de){te=te||wn(x.doc,z.line),ae||(ae=Ea(x,te));function Ee(Er,$r){var ai=ji(x,ae,Er,$r?"right":"left",de);return $r?ai.left=ai.right:ai.right=ai.left,yo(x,te,ai,ne)}var Ne=It(te,x.doc.direction),Ke=z.ch,Xe=z.sticky;if(Ke>=te.text.length?(Ke=te.text.length,Xe="before"):Ke<=0&&(Ke=0,Xe="after"),!Ne)return Ee(Xe=="before"?Ke-1:Ke,Xe=="before");function Nt(Er,$r,ai){var Mi=Ne[$r],Fi=Mi.level==1;return Ee(ai?Er-1:Er,Fi!=ai)}var Vt=dn(Ne,Ke,Xe),Wn=vn,On=Nt(Ke,Vt,Xe=="before");return Wn!=null&&(On.other=Nt(Ke,Wn,Xe!="before")),On}function So(x,z){var ne=0;z=Kr(x.doc,z),x.options.lineWrapping||(ne=us(x.display)*z.ch);var te=wn(x.doc,z.line),ae=cn(te)+Ri(x.display);return{left:ne,right:ne,top:ae,bottom:ae+te.height}}function os(x,z,ne,te,ae){var de=Vn(x,z,ne);return de.xRel=ae,te&&(de.outside=te),de}function rs(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return os(te.first,0,null,-1,-1);var ae=Lr(te,ne),de=te.first+te.size-1;if(ae>de)return os(te.first+te.size-1,wn(te,de).text.length,null,1,1);z<0&&(z=0);for(var Ee=wn(te,ae);;){var Ne=sa(x,Ee,ae,z,ne),Ke=We(Ee,Ne.ch+(Ne.xRel>0||Ne.outside>0?1:0));if(!Ke)return Ne;var Xe=Ke.find(1);if(Xe.line==ae)return Xe;Ee=wn(te,ae=Xe.line)}}function cs(x,z,ne,te){te-=ro(z);var ae=z.text.length,de=qt(function(Ee){return ji(x,ne,Ee-1).bottom<=te},ae,0);return ae=qt(function(Ee){return ji(x,ne,Ee).top>te},de,ae),{begin:de,end:ae}}function Oo(x,z,ne,te){ne||(ne=Ea(x,z));var ae=yo(x,z,ji(x,ne,te),"line").top;return cs(x,z,ne,ae)}function bo(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function sa(x,z,ne,te,ae){ae-=cn(z);var de=Ea(x,z),Ee=ro(z),Ne=0,Ke=z.text.length,Xe=!0,Nt=It(z,x.doc.direction);if(Nt){var Vt=(x.options.lineWrapping?Qa:Sa)(x,z,ne,de,Nt,te,ae);Xe=Vt.level!=1,Ne=Xe?Vt.from:Vt.to-1,Ke=Xe?Vt.to:Vt.from-1}var Wn=null,On=null,Er=qt(function(wa){var ka=ji(x,de,wa);return ka.top+=Ee,ka.bottom+=Ee,bo(ka,te,ae,!1)?(ka.top<=ae&&ka.left<=te&&(Wn=wa,On=ka),!0):!1},Ne,Ke),$r,ai,Mi=!1;if(On){var Fi=te-On.left<On.right-te,bi=Fi==Xe;Er=Wn+(bi?0:1),ai=bi?"after":"before",$r=Fi?On.left:On.right}else{!Xe&&(Er==Ke||Er==Ne)&&Er++,ai=Er==0?"after":Er==z.text.length?"before":ji(x,de,Er-(Xe?1:0)).bottom+Ee<=ae==Xe?"after":"before";var Hi=io(x,Vn(ne,Er,ai),"line",z,de);$r=Hi.left,Mi=ae<Hi.top?-1:ae>=Hi.bottom?1:0}return Er=Bt(z.text,Er,1),os(ne,Er,ai,Mi,te-$r)}function Sa(x,z,ne,te,ae,de,Ee){var Ne=qt(function(Vt){var Wn=ae[Vt],On=Wn.level!=1;return bo(io(x,Vn(ne,On?Wn.to:Wn.from,On?"before":"after"),"line",z,te),de,Ee,!0)},0,ae.length-1),Ke=ae[Ne];if(Ne>0){var Xe=Ke.level!=1,Nt=io(x,Vn(ne,Xe?Ke.from:Ke.to,Xe?"after":"before"),"line",z,te);bo(Nt,de,Ee,!0)&&Nt.top>Ee&&(Ke=ae[Ne-1])}return Ke}function Qa(x,z,ne,te,ae,de,Ee){var Ne=cs(x,z,te,Ee),Ke=Ne.begin,Xe=Ne.end;/\s/.test(z.text.charAt(Xe-1))&&Xe--;for(var Nt=null,Vt=null,Wn=0;Wn<ae.length;Wn++){var On=ae[Wn];if(!(On.from>=Xe||On.to<=Ke)){var Er=On.level!=1,$r=ji(x,te,Er?Math.min(Xe,On.to)-1:Math.max(Ke,On.from)).right,ai=$r<de?de-$r+1e9:$r-de;(!Nt||Vt>ai)&&(Nt=On,Vt=ai)}}return Nt||(Nt=ae[ae.length-1]),Nt.from<Ke&&(Nt={from:Ke,to:Nt.to,level:Nt.level}),Nt.to>Xe&&(Nt={from:Nt.from,to:Xe,level:Nt.level}),Nt}var co;function jo(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(co==null){co=mt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)co.appendChild(document.createTextNode("x")),co.appendChild(mt("br"));co.appendChild(document.createTextNode("x"))}xt(x.measure,co);var ne=co.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),Ue(x.measure),ne||1}function us(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=mt("span","xxxxxxxxxx"),ne=mt("pre",[z],"CodeMirror-line-like");xt(x.measure,ne);var te=z.getBoundingClientRect(),ae=(te.right-te.left)/10;return ae>2&&(x.cachedCharWidth=ae),ae||10}function xs(x){for(var z=x.display,ne={},te={},ae=z.gutters.clientLeft,de=z.gutters.firstChild,Ee=0;de;de=de.nextSibling,++Ee){var Ne=x.display.gutterSpecs[Ee].className;ne[Ne]=de.offsetLeft+de.clientLeft+ae,te[Ne]=de.clientWidth}return{fixedPos:Js(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Js(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Fs(x){var z=jo(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/us(x.display)-3);return function(ae){if(Nn(x.doc,ae))return 0;var de=0;if(ae.widgets)for(var Ee=0;Ee<ae.widgets.length;Ee++)ae.widgets[Ee].height&&(de+=ae.widgets[Ee].height);return ne?de+(Math.ceil(ae.text.length/te)||1)*z:de+z}}function ds(x){var z=x.doc,ne=Fs(x);z.iter(function(te){var ae=ne(te);ae!=te.height&&vr(te,ae)})}function zs(x,z,ne,te){var ae=x.display;if(!ne&&Pi(z).getAttribute("cm-not-content")=="true")return null;var de,Ee,Ne=ae.lineSpace.getBoundingClientRect();try{de=z.clientX-Ne.left,Ee=z.clientY-Ne.top}catch(Vt){return null}var Ke=rs(x,de,Ee),Xe;if(te&&Ke.xRel>0&&(Xe=wn(x.doc,Ke.line).text).length==Ke.ch){var Nt=Qe(Xe,Xe.length,x.options.tabSize)-Xe.length;Ke=Vn(Ke.line,Math.max(0,Math.round((de-ea(x.display).left)/us(x.display))-Nt))}return Ke}function za(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 ga(x,z,ne,te){z==null&&(z=x.doc.first),ne==null&&(ne=x.doc.first+x.doc.size),te||(te=0);var ae=x.display;if(te&&ne<ae.viewTo&&(ae.updateLineNumbers==null||ae.updateLineNumbers>z)&&(ae.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=ae.viewTo)ia&&Wt(x.doc,z)<ae.viewTo&&ko(x);else if(ne<=ae.viewFrom)ia&&Sn(x.doc,ne+te)>ae.viewFrom?ko(x):(ae.viewFrom+=te,ae.viewTo+=te);else if(z<=ae.viewFrom&&ne>=ae.viewTo)ko(x);else if(z<=ae.viewFrom){var de=fs(x,ne,ne+te,1);de?(ae.view=ae.view.slice(de.index),ae.viewFrom=de.lineN,ae.viewTo+=te):ko(x)}else if(ne>=ae.viewTo){var Ee=fs(x,z,z,-1);Ee?(ae.view=ae.view.slice(0,Ee.index),ae.viewTo=Ee.lineN):ko(x)}else{var Ne=fs(x,z,z,-1),Ke=fs(x,ne,ne+te,1);Ne&&Ke?(ae.view=ae.view.slice(0,Ne.index).concat(or(x,Ne.lineN,Ke.lineN)).concat(ae.view.slice(Ke.index)),ae.viewTo+=te):ko(x)}var Xe=ae.externalMeasured;Xe&&(ne<Xe.lineN?Xe.lineN+=te:z<Xe.lineN+Xe.size&&(ae.externalMeasured=null))}function so(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ae=x.display.externalMeasured;if(ae&&z>=ae.lineN&&z<ae.lineN+ae.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var de=te.view[za(x,z)];if(de.node!=null){var Ee=de.changes||(de.changes=[]);Ot(Ee,ne)==-1&&Ee.push(ne)}}}function ko(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function fs(x,z,ne,te){var ae=za(x,z),de,Ee=x.display.view;if(!ia||ne==x.doc.first+x.doc.size)return{index:ae,lineN:ne};for(var Ne=x.display.viewFrom,Ke=0;Ke<ae;Ke++)Ne+=Ee[Ke].size;if(Ne!=z){if(te>0){if(ae==Ee.length-1)return null;de=Ne+Ee[ae].size-z,ae++}else de=Ne-z;z+=de,ne+=de}for(;Wt(x.doc,ne)!=ne;){if(ae==(te<0?0:Ee.length-1))return null;ne+=te*Ee[ae-(te<0?1:0)].size,ae+=te}return{index:ae,lineN:ne}}function ss(x,z,ne){var te=x.display,ae=te.view;ae.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(za(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,za(x,ne)))),te.viewTo=ne}function $l(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ae=z[te];!ae.hidden&&(!ae.node||ae.changes)&&++ne}return ne}function ml(x){x.display.input.showSelection(x.display.input.prepareSelection())}function Sl(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ae=te.cursors=document.createDocumentFragment(),de=te.selection=document.createDocumentFragment(),Ee=0;Ee<ne.sel.ranges.length;Ee++)if(!(!z&&Ee==ne.sel.primIndex)){var Ne=ne.sel.ranges[Ee];if(!(Ne.from().line>=x.display.viewTo||Ne.to().line<x.display.viewFrom)){var Ke=Ne.empty();(Ke||x.options.showCursorWhenSelecting)&&Ka(x,Ne.head,ae),Ke||Xi(x,Ne,de)}}return te}function Ka(x,z,ne){var te=io(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ae=ne.appendChild(mt("div","\xA0","CodeMirror-cursor"));if(ae.style.left=te.left+"px",ae.style.top=te.top+"px",ae.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var de=ne.appendChild(mt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));de.style.display="",de.style.left=te.other.left+"px",de.style.top=te.other.top+"px",de.style.height=(te.other.bottom-te.other.top)*.85+"px"}}function ei(x,z){return x.top-z.top||x.left-z.left}function Xi(x,z,ne){var te=x.display,ae=x.doc,de=document.createDocumentFragment(),Ee=ea(x.display),Ne=Ee.left,Ke=Math.max(te.sizerWidth,ci(x)-te.sizer.offsetLeft)-Ee.right,Xe=ae.direction=="ltr";function Nt(bi,Hi,wa,ka){Hi<0&&(Hi=0),Hi=Math.round(Hi),ka=Math.round(ka),de.appendChild(mt("div",null,"CodeMirror-selected","position: absolute; left: "+bi+`px;
|
|
|
top: `+Hi+"px; width: "+(wa==null?Ke-bi:wa)+`px;
|
|
|
height: `+(ka-Hi)+"px"))}function Vt(bi,Hi,wa){var ka=wn(ae,bi),Co=ka.text.length,vs,xl;function $s(ll,Ul){return Xo(x,Vn(bi,ll),"div",ka,Ul)}function Zl(ll,Ul,Xa){var Gs=Oo(x,ka,null,ll),Bs=Ul=="ltr"==(Xa=="after")?"left":"right",Xs=Xa=="after"?Gs.begin:Gs.end-(/\s/.test(ka.text.charAt(Gs.end-1))?2:1);return $s(Xs,Bs)[Bs]}var jl=It(ka,ae.direction);return an(jl,Hi||0,wa==null?Co:wa,function(ll,Ul,Xa,Gs){var Bs=Xa=="ltr",Xs=$s(ll,Bs?"left":"right"),el=$s(Ul-1,Bs?"right":"left"),xu=Hi==null&&ll==0,Jl=wa==null&&Ul==Co,Ll=Gs==0,Jo=!jl||Gs==jl.length-1;if(el.top-Xs.top<=3){var hl=(Xe?xu:Jl)&&Ll,Nd=(Xe?Jl:xu)&&Jo,zc=hl?Ne:(Bs?Xs:el).left,Xc=Nd?Ke:(Bs?el:Xs).right;Nt(zc,Xs.top,Xc-zc,Xs.bottom)}else{var _c,cl,Su,Tl;Bs?(_c=Xe&&xu&&Ll?Ne:Xs.left,cl=Xe?Ke:Zl(ll,Xa,"before"),Su=Xe?Ne:Zl(Ul,Xa,"after"),Tl=Xe&&Jl&&Jo?Ke:el.right):(_c=Xe?Zl(ll,Xa,"before"):Ne,cl=!Xe&&xu&&Ll?Ke:Xs.right,Su=!Xe&&Jl&&Jo?Ne:el.left,Tl=Xe?Zl(Ul,Xa,"after"):Ke),Nt(_c,Xs.top,cl-_c,Xs.bottom),Xs.bottom<el.top&&Nt(Ne,Xs.bottom,null,el.top),Nt(Su,el.top,Tl-Su,el.bottom)}(!vs||ei(Xs,vs)<0)&&(vs=Xs),ei(el,vs)<0&&(vs=el),(!xl||ei(Xs,xl)<0)&&(xl=Xs),ei(el,xl)<0&&(xl=el)}),{start:vs,end:xl}}var Wn=z.from(),On=z.to();if(Wn.line==On.line)Vt(Wn.line,Wn.ch,On.ch);else{var Er=wn(ae,Wn.line),$r=wn(ae,On.line),ai=et(Er)==et($r),Mi=Vt(Wn.line,Wn.ch,ai?Er.text.length+1:null).end,Fi=Vt(On.line,ai?0:null,On.ch).start;ai&&(Mi.top<Fi.top-2?(Nt(Mi.right,Mi.top,null,Mi.bottom),Nt(Ne,Fi.top,Fi.left,Fi.bottom)):Nt(Mi.right,Mi.top,Fi.left-Mi.right,Mi.bottom)),Mi.bottom<Fi.top&&Nt(Ne,Mi.bottom,null,Fi.top)}ne.appendChild(de)}function Yi(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()||rl(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function pa(x){x.state.focused||(x.display.input.focus(),Yo(x))}function Uo(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,rl(x))},100)}function Yo(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(Rn(x,"focus",x,z),x.state.focused=!0,gn(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),ce&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Yi(x))}function rl(x,z){x.state.delayingBlurEvent||(x.state.focused&&(Rn(x,"blur",x,z),x.state.focused=!1,He(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function ul(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ae=z.view[te],de=x.options.lineWrapping,Ee=void 0,Ne=0;if(!ae.hidden){if(ye&&_e<8){var Ke=ae.node.offsetTop+ae.node.offsetHeight;Ee=Ke-ne,ne=Ke}else{var Xe=ae.node.getBoundingClientRect();Ee=Xe.bottom-Xe.top,!de&&ae.text.firstChild&&(Ne=ae.text.firstChild.getBoundingClientRect().right-Xe.left-1)}var Nt=ae.line.height-Ee;if((Nt>.005||Nt<-.005)&&(vr(ae.line,Ee),wl(ae.line),ae.rest))for(var Vt=0;Vt<ae.rest.length;Vt++)wl(ae.rest[Vt]);if(Ne>x.display.sizerWidth){var Wn=Math.ceil(Ne/us(x.display));Wn>x.display.maxLineLength&&(x.display.maxLineLength=Wn,x.display.maxLine=ae.line,x.display.maxLineChanged=!0)}}}}function wl(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 uo(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Ri(x));var ae=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,de=Lr(z,te),Ee=Lr(z,ae);if(ne&&ne.ensure){var Ne=ne.ensure.from.line,Ke=ne.ensure.to.line;Ne<de?(de=Ne,Ee=Lr(z,cn(wn(z,Ne))+x.wrapper.clientHeight)):Math.min(Ke,z.lastLine())>=Ee&&(de=Lr(z,cn(wn(z,Ke))-x.wrapper.clientHeight),Ee=Ke)}return{from:de,to:Math.max(Ee,de+1)}}function Qs(x,z){if(!cr(x,"scrollCursorIntoView")){var ne=x.display,te=ne.sizer.getBoundingClientRect(),ae=null;if(z.top+te.top<0?ae=!0:z.bottom+te.top>(window.innerHeight||document.documentElement.clientHeight)&&(ae=!1),ae!=null&&!st){var de=mt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-Ri(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+wi(x)+ne.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(de),de.scrollIntoView(ae),x.display.lineSpace.removeChild(de)}}}function Pl(x,z,ne,te){te==null&&(te=0);var ae;!x.options.lineWrapping&&z==ne&&(z=z.ch?Vn(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?Vn(z.line,z.ch+1,"before"):z);for(var de=0;de<5;de++){var Ee=!1,Ne=io(x,z),Ke=!ne||ne==z?Ne:io(x,ne);ae={left:Math.min(Ne.left,Ke.left),top:Math.min(Ne.top,Ke.top)-te,right:Math.max(Ne.left,Ke.left),bottom:Math.max(Ne.bottom,Ke.bottom)+te};var Xe=Vl(x,ae),Nt=x.doc.scrollTop,Vt=x.doc.scrollLeft;if(Xe.scrollTop!=null&&(wo(x,Xe.scrollTop),Math.abs(x.doc.scrollTop-Nt)>1&&(Ee=!0)),Xe.scrollLeft!=null&&(Ss(x,Xe.scrollLeft),Math.abs(x.doc.scrollLeft-Vt)>1&&(Ee=!0)),!Ee)break}return ae}function Sc(x,z){var ne=Vl(x,z);ne.scrollTop!=null&&wo(x,ne.scrollTop),ne.scrollLeft!=null&&Ss(x,ne.scrollLeft)}function Vl(x,z){var ne=x.display,te=jo(x.display);z.top<0&&(z.top=0);var ae=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,de=Wi(x),Ee={};z.bottom-z.top>de&&(z.bottom=z.top+de);var Ne=x.doc.height+xi(ne),Ke=z.top<te,Xe=z.bottom>Ne-te;if(z.top<ae)Ee.scrollTop=Ke?0:z.top;else if(z.bottom>ae+de){var Nt=Math.min(z.top,(Xe?Ne:z.bottom)-de);Nt!=ae&&(Ee.scrollTop=Nt)}var Vt=x.options.fixedGutter?0:ne.gutters.offsetWidth,Wn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Vt,On=ci(x)-ne.gutters.offsetWidth,Er=z.right-z.left>On;return Er&&(z.right=z.left+On),z.left<10?Ee.scrollLeft=0:z.left<Wn?Ee.scrollLeft=Math.max(0,z.left+Vt-(Er?0:10)):z.right>On+Wn-3&&(Ee.scrollLeft=z.right+(Er?0:10)-On),Ee}function Cl(x,z){z!=null&&(ec(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function il(x){ec(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function ql(x,z,ne){(z!=null||ne!=null)&&ec(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function dl(x,z){ec(x),x.curOp.scrollToPos=z}function ec(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=So(x,z.from),te=So(x,z.to);is(x,ne,te,z.margin)}}function is(x,z,ne,te){var ae=Vl(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});ql(x,ae.scrollLeft,ae.scrollTop)}function wo(x,z){Math.abs(x.doc.scrollTop-z)<2||(fe||Xu(x,{top:z}),qo(x,z,!0),fe&&Xu(x),qs(x,100))}function qo(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 Ss(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,Ju(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function Ds(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+xi(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+wi(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var al=function(x,z,ne){this.cm=ne;var te=this.vert=mt("div",[mt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ae=this.horiz=mt("div",[mt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ae.tabIndex=-1,x(te),x(ae),Xt(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),Xt(ae,"scroll",function(){ae.clientWidth&&z(ae.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ye&&_e<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};al.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 ae=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ae)+"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 de=x.viewWidth-x.barLeft-(ne?te:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+de)+"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}},al.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},al.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},al.prototype.zeroWidthHack=function(){var x=be&&!ze?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ie,this.disableVert=new Ie},al.prototype.enableZeroWidthBar=function(x,z,ne){x.style.pointerEvents="auto";function te(){var ae=x.getBoundingClientRect(),de=ne=="vert"?document.elementFromPoint(ae.right-1,(ae.top+ae.bottom)/2):document.elementFromPoint((ae.right+ae.left)/2,ae.bottom-1);de!=x?x.style.pointerEvents="none":z.set(1e3,te)}z.set(1e3,te)},al.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var Ps=function(){};Ps.prototype.update=function(){return{bottom:0,right:0}},Ps.prototype.setScrollLeft=function(){},Ps.prototype.setScrollTop=function(){},Ps.prototype.clear=function(){};function zl(x,z){z||(z=Ds(x));var ne=x.display.barWidth,te=x.display.barHeight;Wc(x,z);for(var ae=0;ae<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ae++)ne!=x.display.barWidth&&x.options.lineWrapping&&ul(x),Wc(x,Ds(x)),ne=x.display.barWidth,te=x.display.barHeight}function Wc(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 fc={native:al,null:Ps};function Dc(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&He(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new fc[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),Xt(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"?Ss(x,z):wo(x,z)},x),x.display.scrollbars.addClass&&gn(x.display.wrapper,x.display.scrollbars.addClass)}var Pc=0;function tc(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:++Pc},Tn(x.curOp)}function nc(x){var z=x.curOp;z&&dr(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;Oc(ne)})}function Oc(x){for(var z=x.ops,ne=0;ne<z.length;ne++)Nc(z[ne]);for(var te=0;te<z.length;te++)_o(z[te]);for(var ae=0;ae<z.length;ae++)ao(z[ae]);for(var de=0;de<z.length;de++)Ks(z[de]);for(var Ee=0;Ee<z.length;Ee++)gl(z[Ee])}function Nc(x){var z=x.cm,ne=z.display;Zc(z),x.updateMaxLine&&Gt(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 Bl(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function _o(x){x.updatedDisplay=x.mustUpdate&&Vu(x.cm,x.update)}function ao(x){var z=x.cm,ne=z.display;x.updatedDisplay&&ul(z),x.barMeasure=Ds(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Ua(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+wi(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-ci(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Ks(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&Ss(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==yt();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&zl(z,x.barMeasure),x.updatedDisplay&&Yu(z,x.barMeasure),x.selectionChanged&&Yi(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&pa(x.cm)}function gl(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&Gu(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&qo(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&Ss(z,x.scrollLeft,!0,!0),x.scrollToPos){var ae=Pl(z,Kr(te,x.scrollToPos.from),Kr(te,x.scrollToPos.to),x.scrollToPos.margin);Qs(z,ae)}var de=x.maybeHiddenMarkers,Ee=x.maybeUnhiddenMarkers;if(de)for(var Ne=0;Ne<de.length;++Ne)de[Ne].lines.length||Rn(de[Ne],"hide");if(Ee)for(var Ke=0;Ke<Ee.length;++Ke)Ee[Ke].lines.length&&Rn(Ee[Ke],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&Rn(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function oo(x,z){if(x.curOp)return z();tc(x);try{return z()}finally{nc(x)}}function Ho(x,z){return function(){if(x.curOp)return z.apply(x,arguments);tc(x);try{return z.apply(x,arguments)}finally{nc(x)}}}function zo(x){return function(){if(this.curOp)return x.apply(this,arguments);tc(this);try{return x.apply(this,arguments)}finally{nc(this)}}}function ws(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);tc(z);try{return x.apply(this,arguments)}finally{nc(z)}}}function qs(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,en(Kl,x))}function Kl(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=_a(x,z.highlightFrontier),ae=[];z.iter(te.line,Math.min(z.first+z.size,x.display.viewTo+500),function(de){if(te.line>=x.display.viewFrom){var Ee=de.styles,Ne=de.text.length>x.options.maxHighlightLength?Rt(z.mode,te.state):null,Ke=ho(x,de,te,!0);Ne&&(te.state=Ne),de.styles=Ke.styles;var Xe=de.styleClasses,Nt=Ke.classes;Nt?de.styleClasses=Nt:Xe&&(de.styleClasses=null);for(var Vt=!Ee||Ee.length!=de.styles.length||Xe!=Nt&&(!Xe||!Nt||Xe.bgClass!=Nt.bgClass||Xe.textClass!=Nt.textClass),Wn=0;!Vt&&Wn<Ee.length;++Wn)Vt=Ee[Wn]!=de.styles[Wn];Vt&&ae.push(te.line),de.stateAfter=te.save(),te.nextLine()}else de.text.length<=x.options.maxHighlightLength&&Ji(x,de.text,te),de.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return qs(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ae.length&&oo(x,function(){for(var de=0;de<ae.length;de++)so(x,ae[de],"text")})}}var Bl=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=uo(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=ci(x),this.force=ne,this.dims=xs(x),this.events=[]};Bl.prototype.signal=function(x,z){wr(x,z)&&this.events.push(arguments)},Bl.prototype.finish=function(){for(var x=0;x<this.events.length;x++)Rn.apply(null,this.events[x])};function Zc(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=wi(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=wi(x)+"px",z.scrollbarsClipped=!0)}function tf(x){if(x.hasFocus())return null;var z=yt();if(!z||!Ft(x.display.lineDiv,z))return null;var ne={activeElt:z};if(window.getSelection){var te=window.getSelection();te.anchorNode&&te.extend&&Ft(x.display.lineDiv,te.anchorNode)&&(ne.anchorNode=te.anchorNode,ne.anchorOffset=te.anchorOffset,ne.focusNode=te.focusNode,ne.focusOffset=te.focusOffset)}return ne}function Md(x){if(!(!x||!x.activeElt||x.activeElt==yt())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&Ft(document.body,x.anchorNode)&&Ft(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 Vu(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return ko(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&&$l(x)==0)return!1;_u(x)&&(ko(x),z.dims=xs(x));var ae=te.first+te.size,de=Math.max(z.visible.from-x.options.viewportMargin,te.first),Ee=Math.min(ae,z.visible.to+x.options.viewportMargin);ne.viewFrom<de&&de-ne.viewFrom<20&&(de=Math.max(te.first,ne.viewFrom)),ne.viewTo>Ee&&ne.viewTo-Ee<20&&(Ee=Math.min(ae,ne.viewTo)),ia&&(de=Wt(x.doc,de),Ee=Sn(x.doc,Ee));var Ne=de!=ne.viewFrom||Ee!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;ss(x,de,Ee),ne.viewOffset=cn(wn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Ke=$l(x);if(!Ne&&Ke==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var Xe=tf(x);return Ke>4&&(ne.lineDiv.style.display="none"),kd(x,ne.updateLineNumbers,z.dims),Ke>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Md(Xe),Ue(ne.cursorDiv),Ue(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,Ne&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,qs(x,400)),ne.updateLineNumbers=null,!0}function Gu(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==ci(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+xi(x.display)-Wi(x),ne.top)}),z.visible=uo(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=uo(x.display,x.doc,ne));if(!Vu(x,z))break;ul(x);var ae=Ds(x);ml(x),zl(x,ae),Yu(x,ae),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 Xu(x,z){var ne=new Bl(x,z);if(Vu(x,ne)){ul(x),Gu(x,ne);var te=Ds(x);ml(x),zl(x,te),Yu(x,te),ne.finish()}}function kd(x,z,ne){var te=x.display,ae=x.options.lineNumbers,de=te.lineDiv,Ee=de.firstChild;function Ne(Er){var $r=Er.nextSibling;return ce&&be&&x.display.currentWheelTarget==Er?Er.style.display="none":Er.parentNode.removeChild(Er),$r}for(var Ke=te.view,Xe=te.viewFrom,Nt=0;Nt<Ke.length;Nt++){var Vt=Ke[Nt];if(!Vt.hidden)if(!Vt.node||Vt.node.parentNode!=de){var Wn=Bi(x,Vt,Xe,ne);de.insertBefore(Wn,Ee)}else{for(;Ee!=Vt.node;)Ee=Ne(Ee);var On=ae&&z!=null&&z<=Xe&&Vt.lineNumber;Vt.changes&&(Ot(Vt.changes,"gutter")>-1&&(On=!1),ri(x,Vt,Xe,ne)),On&&(Ue(Vt.lineNumber),Vt.lineNumber.appendChild(document.createTextNode(hi(x.options,Xe)))),Ee=Vt.node.nextSibling}Xe+=Vt.size}for(;Ee;)Ee=Ne(Ee)}function ku(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Yu(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+wi(x)+"px"}function Ju(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Js(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ae=z.gutters.offsetWidth,de=te+"px",Ee=0;Ee<ne.length;Ee++)if(!ne[Ee].hidden){x.options.fixedGutter&&(ne[Ee].gutter&&(ne[Ee].gutter.style.left=de),ne[Ee].gutterBackground&&(ne[Ee].gutterBackground.style.left=de));var Ne=ne[Ee].alignable;if(Ne)for(var Ke=0;Ke<Ne.length;Ke++)Ne[Ke].style.left=de}x.options.fixedGutter&&(z.gutters.style.left=te+ae+"px")}}function _u(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=hi(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ae=te.measure.appendChild(mt("div",[mt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),de=ae.firstChild.offsetWidth,Ee=ae.offsetWidth-de;return te.lineGutter.style.width="",te.lineNumInnerWidth=Math.max(de,te.lineGutter.offsetWidth-Ee)+1,te.lineNumWidth=te.lineNumInnerWidth+Ee,te.lineNumChars=te.lineNumInnerWidth?ne.length:-1,te.lineGutter.style.width=te.lineNumWidth+"px",ku(x.display),!0}return!1}function Lu(x,z){for(var ne=[],te=!1,ae=0;ae<x.length;ae++){var de=x[ae],Ee=null;if(typeof de!="string"&&(Ee=de.style,de=de.className),de=="CodeMirror-linenumbers")if(z)te=!0;else continue;ne.push({className:de,style:Ee})}return z&&!te&&ne.push({className:"CodeMirror-linenumbers",style:null}),ne}function _d(x){var z=x.gutters,ne=x.gutterSpecs;Ue(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ae=ne[te],de=ae.className,Ee=ae.style,Ne=z.appendChild(mt("div",null,"CodeMirror-gutter "+de));Ee&&(Ne.style.cssText=Ee),de=="CodeMirror-linenumbers"&&(x.lineGutter=Ne,Ne.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",ku(x)}function jc(x){_d(x.display),ga(x),Ju(x)}function nf(x,z,ne,te){var ae=this;this.input=ne,ae.scrollbarFiller=mt("div",null,"CodeMirror-scrollbar-filler"),ae.scrollbarFiller.setAttribute("cm-not-content","true"),ae.gutterFiller=mt("div",null,"CodeMirror-gutter-filler"),ae.gutterFiller.setAttribute("cm-not-content","true"),ae.lineDiv=ut("div",null,"CodeMirror-code"),ae.selectionDiv=mt("div",null,null,"position: relative; z-index: 1"),ae.cursorDiv=mt("div",null,"CodeMirror-cursors"),ae.measure=mt("div",null,"CodeMirror-measure"),ae.lineMeasure=mt("div",null,"CodeMirror-measure"),ae.lineSpace=ut("div",[ae.measure,ae.lineMeasure,ae.selectionDiv,ae.cursorDiv,ae.lineDiv],null,"position: relative; outline: none");var de=ut("div",[ae.lineSpace],"CodeMirror-lines");ae.mover=mt("div",[de],null,"position: relative"),ae.sizer=mt("div",[ae.mover],"CodeMirror-sizer"),ae.sizerWidth=null,ae.heightForcer=mt("div",null,null,"position: absolute; height: "+In+"px; width: 1px;"),ae.gutters=mt("div",null,"CodeMirror-gutters"),ae.lineGutter=null,ae.scroller=mt("div",[ae.sizer,ae.heightForcer,ae.gutters],"CodeMirror-scroll"),ae.scroller.setAttribute("tabIndex","-1"),ae.wrapper=mt("div",[ae.scrollbarFiller,ae.gutterFiller,ae.scroller],"CodeMirror"),ye&&_e<8&&(ae.gutters.style.zIndex=-1,ae.scroller.style.paddingRight=0),!ce&&!(fe&&qe)&&(ae.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ae.wrapper):x(ae.wrapper)),ae.viewFrom=ae.viewTo=z.first,ae.reportedViewFrom=ae.reportedViewTo=z.first,ae.view=[],ae.renderedView=null,ae.externalMeasured=null,ae.viewOffset=0,ae.lastWrapHeight=ae.lastWrapWidth=0,ae.updateLineNumbers=null,ae.nativeBarWidth=ae.barHeight=ae.barWidth=0,ae.scrollbarsClipped=!1,ae.lineNumWidth=ae.lineNumInnerWidth=ae.lineNumChars=null,ae.alignWidgets=!1,ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.maxLine=null,ae.maxLineLength=0,ae.maxLineChanged=!1,ae.wheelDX=ae.wheelDY=ae.wheelStartX=ae.wheelStartY=null,ae.shift=!1,ae.selForContextMenu=null,ae.activeTouch=null,ae.gutterSpecs=Lu(te.gutters,te.lineNumbers),_d(ae),ne.init(ae)}var lu=0,vl=null;ye?vl=-.53:fe?vl=15:ge?vl=-.7:lt&&(vl=-1/3);function Rc(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 Ld(x){var z=Rc(x);return z.x*=vl,z.y*=vl,z}function Qu(x,z){var ne=Rc(z),te=ne.x,ae=ne.y,de=x.display,Ee=de.scroller,Ne=Ee.scrollWidth>Ee.clientWidth,Ke=Ee.scrollHeight>Ee.clientHeight;if(te&&Ne||ae&&Ke){if(ae&&be&&ce){e:for(var Xe=z.target,Nt=de.view;Xe!=Ee;Xe=Xe.parentNode)for(var Vt=0;Vt<Nt.length;Vt++)if(Nt[Vt].node==Xe){x.display.currentWheelTarget=Xe;break e}}if(te&&!fe&&!Ae&&vl!=null){ae&&Ke&&wo(x,Math.max(0,Ee.scrollTop+ae*vl)),Ss(x,Math.max(0,Ee.scrollLeft+te*vl)),(!ae||ae&&Ke)&&Ar(z),de.wheelStartX=null;return}if(ae&&vl!=null){var Wn=ae*vl,On=x.doc.scrollTop,Er=On+de.wrapper.clientHeight;Wn<0?On=Math.max(0,On+Wn-50):Er=Math.min(x.doc.height,Er+Wn+50),Xu(x,{top:On,bottom:Er})}lu<20&&(de.wheelStartX==null?(de.wheelStartX=Ee.scrollLeft,de.wheelStartY=Ee.scrollTop,de.wheelDX=te,de.wheelDY=ae,setTimeout(function(){if(de.wheelStartX!=null){var $r=Ee.scrollLeft-de.wheelStartX,ai=Ee.scrollTop-de.wheelStartY,Mi=ai&&de.wheelDY&&ai/de.wheelDY||$r&&de.wheelDX&&$r/de.wheelDX;de.wheelStartX=de.wheelStartY=null,Mi&&(vl=(vl*lu+Mi)/(lu+1),++lu)}},200)):(de.wheelDX+=te,de.wheelDY+=ae))}}var Hl=function(x,z){this.ranges=x,this.primIndex=z};Hl.prototype.primary=function(){return this.ranges[this.primIndex]},Hl.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(!Ui(ne.anchor,te.anchor)||!Ui(ne.head,te.head))return!1}return!0},Hl.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new Go(na(this.ranges[z].anchor),na(this.ranges[z].head));return new Hl(x,this.primIndex)},Hl.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},Hl.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(br(z,te.from())>=0&&br(x,te.to())<=0)return ne}return-1};var Go=function(x,z){this.anchor=x,this.head=z};Go.prototype.from=function(){return vi(this.anchor,this.head)},Go.prototype.to=function(){return Wr(this.anchor,this.head)},Go.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function rc(x,z,ne){var te=x&&x.options.selectionsMayTouch,ae=z[ne];z.sort(function(Wn,On){return br(Wn.from(),On.from())}),ne=Ot(z,ae);for(var de=1;de<z.length;de++){var Ee=z[de],Ne=z[de-1],Ke=br(Ne.to(),Ee.from());if(te&&!Ee.empty()?Ke>0:Ke>=0){var Xe=vi(Ne.from(),Ee.from()),Nt=Wr(Ne.to(),Ee.to()),Vt=Ne.empty()?Ee.from()==Ee.head:Ne.from()==Ne.head;de<=ne&&--ne,z.splice(--de,2,new Go(Vt?Nt:Xe,Vt?Xe:Nt))}}return new Hl(z,ne)}function ic(x,z){return new Hl([new Go(x,z||x)],0)}function wc(x){return x.text?Vn(x.from.line+x.text.length-1,ln(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function qu(x,z){if(br(x,z.from)<0)return x;if(br(x,z.to)<=0)return wc(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+=wc(z).ch-z.to.ch),Vn(ne,te)}function ed(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ae=x.sel.ranges[te];ne.push(new Go(qu(ae.anchor,z),qu(ae.head,z)))}return rc(x.cm,ne,x.sel.primIndex)}function $c(x,z,ne){return x.line==z.line?Vn(ne.line,x.ch-z.ch+ne.ch):Vn(ne.line+(x.line-z.line),x.ch)}function td(x,z,ne){for(var te=[],ae=Vn(x.first,0),de=ae,Ee=0;Ee<z.length;Ee++){var Ne=z[Ee],Ke=$c(Ne.from,ae,de),Xe=$c(wc(Ne),ae,de);if(ae=Ne.to,de=Xe,ne=="around"){var Nt=x.sel.ranges[Ee],Vt=br(Nt.head,Nt.anchor)<0;te[Ee]=new Go(Vt?Xe:Ke,Vt?Ke:Xe)}else te[Ee]=new Go(Ke,Ke)}return new Hl(te,x.sel.primIndex)}function cu(x){x.doc.mode=zt(x.options,x.doc.modeOption),Uc(x)}function Uc(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,qs(x,100),x.state.modeGen++,x.curOp&&ga(x)}function nd(x,z){return z.from.ch==0&&z.to.ch==0&&ln(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Tu(x,z,ne,te){function ae(Fi){return ne?ne[Fi]:null}function de(Fi,bi,Hi){ir(Fi,bi,Hi,te),fr(Fi,"change",Fi,z)}function Ee(Fi,bi){for(var Hi=[],wa=Fi;wa<bi;++wa)Hi.push(new kn(Xe[wa],ae(wa),te));return Hi}var Ne=z.from,Ke=z.to,Xe=z.text,Nt=wn(x,Ne.line),Vt=wn(x,Ke.line),Wn=ln(Xe),On=ae(Xe.length-1),Er=Ke.line-Ne.line;if(z.full)x.insert(0,Ee(0,Xe.length)),x.remove(Xe.length,x.size-Xe.length);else if(nd(x,z)){var $r=Ee(0,Xe.length-1);de(Vt,Vt.text,On),Er&&x.remove(Ne.line,Er),$r.length&&x.insert(Ne.line,$r)}else if(Nt==Vt)if(Xe.length==1)de(Nt,Nt.text.slice(0,Ne.ch)+Wn+Nt.text.slice(Ke.ch),On);else{var ai=Ee(1,Xe.length-1);ai.push(new kn(Wn+Nt.text.slice(Ke.ch),On,te)),de(Nt,Nt.text.slice(0,Ne.ch)+Xe[0],ae(0)),x.insert(Ne.line+1,ai)}else if(Xe.length==1)de(Nt,Nt.text.slice(0,Ne.ch)+Xe[0]+Vt.text.slice(Ke.ch),ae(0)),x.remove(Ne.line+1,Er);else{de(Nt,Nt.text.slice(0,Ne.ch)+Xe[0],ae(0)),de(Vt,Wn+Vt.text.slice(Ke.ch),On);var Mi=Ee(1,Xe.length-1);Er>1&&x.remove(Ne.line+1,Er-1),x.insert(Ne.line+1,Mi)}fr(x,"change",x,z)}function hc(x,z,ne){function te(ae,de,Ee){if(ae.linked)for(var Ne=0;Ne<ae.linked.length;++Ne){var Ke=ae.linked[Ne];if(Ke.doc!=de){var Xe=Ee&&Ke.sharedHist;ne&&!Xe||(z(Ke.doc,Xe),te(Ke.doc,ae,Xe))}}}te(x,null,!0)}function uu(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,ds(x),cu(x),du(x),x.options.lineWrapping||Gt(x),x.options.mode=z.modeOption,ga(x)}function du(x){(x.doc.direction=="rtl"?gn:He)(x.display.lineDiv,"CodeMirror-rtl")}function Au(x){oo(x,function(){du(x),ga(x)})}function fu(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 Gl(x,z){var ne={from:na(z.from),to:wc(z),text:rr(x,z.from,z.to)};return St(x,ne,z.from.line,z.to.line+1),hc(x,function(te){return St(te,ne,z.from.line,z.to.line+1)},!0),ne}function rd(x){for(;x.length;){var z=ln(x);if(z.ranges)x.pop();else break}}function Iu(x,z){if(z)return rd(x.done),ln(x.done);if(x.done.length&&!ln(x.done).ranges)return ln(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),ln(x.done)}function we(x,z,ne,te){var ae=x.history;ae.undone.length=0;var de=+new Date,Ee,Ne;if((ae.lastOp==te||ae.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&ae.lastModTime>de-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(Ee=Iu(ae,ae.lastOp==te)))Ne=ln(Ee.changes),br(z.from,z.to)==0&&br(z.from,Ne.to)==0?Ne.to=wc(z):Ee.changes.push(Gl(x,z));else{var Ke=ln(ae.done);for((!Ke||!Ke.ranges)&&nt(x.sel,ae.done),Ee={changes:[Gl(x,z)],generation:ae.generation},ae.done.push(Ee);ae.done.length>ae.undoDepth;)ae.done.shift(),ae.done[0].ranges||ae.done.shift()}ae.done.push(ne),ae.generation=++ae.maxGeneration,ae.lastModTime=ae.lastSelTime=de,ae.lastOp=ae.lastSelOp=te,ae.lastOrigin=ae.lastSelOrigin=z.origin,Ne||Rn(x,"historyAdded")}function Le(x,z,ne,te){var ae=z.charAt(0);return ae=="*"||ae=="+"&&ne.ranges.length==te.ranges.length&&ne.somethingSelected()==te.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function Ze(x,z,ne,te){var ae=x.history,de=te&&te.origin;ne==ae.lastSelOp||de&&ae.lastSelOrigin==de&&(ae.lastModTime==ae.lastSelTime&&ae.lastOrigin==de||Le(x,de,ln(ae.done),z))?ae.done[ae.done.length-1]=z:nt(z,ae.done),ae.lastSelTime=+new Date,ae.lastSelOrigin=de,ae.lastSelOp=ne,te&&te.clearRedo!==!1&&rd(ae.undone)}function nt(x,z){var ne=ln(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function St(x,z,ne,te){var ae=z["spans_"+x.id],de=0;x.iter(Math.max(x.first,ne),Math.min(x.first+x.size,te),function(Ee){Ee.markedSpans&&((ae||(ae=z["spans_"+x.id]={}))[de]=Ee.markedSpans),++de})}function Ct(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 Jt(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ae=0;ae<z.text.length;++ae)te.push(Ct(ne[ae]));return te}function pn(x,z){var ne=Jt(x,z),te=ki(x,z);if(!ne)return te;if(!te)return ne;for(var ae=0;ae<ne.length;++ae){var de=ne[ae],Ee=te[ae];if(de&&Ee)e:for(var Ne=0;Ne<Ee.length;++Ne){for(var Ke=Ee[Ne],Xe=0;Xe<de.length;++Xe)if(de[Xe].marker==Ke.marker)continue e;de.push(Ke)}else Ee&&(ne[ae]=Ee)}return ne}function nn(x,z,ne){for(var te=[],ae=0;ae<x.length;++ae){var de=x[ae];if(de.ranges){te.push(ne?Hl.prototype.deepCopy.call(de):de);continue}var Ee=de.changes,Ne=[];te.push({changes:Ne});for(var Ke=0;Ke<Ee.length;++Ke){var Xe=Ee[Ke],Nt=void 0;if(Ne.push({from:Xe.from,to:Xe.to,text:Xe.text}),z)for(var Vt in Xe)(Nt=Vt.match(/^spans_(\d+)$/))&&Ot(z,Number(Nt[1]))>-1&&(ln(Ne)[Vt]=Xe[Vt],delete Xe[Vt])}}return te}function Pn(x,z,ne,te){if(te){var ae=x.anchor;if(ne){var de=br(z,ae)<0;de!=br(ne,ae)<0?(ae=z,z=ne):de!=br(z,ne)<0&&(z=ne)}return new Go(ae,z)}else return new Go(ne||z,z)}function Xn(x,z,ne,te,ae){ae==null&&(ae=x.cm&&(x.cm.display.shift||x.extend)),_r(x,new Hl([Pn(x.sel.primary(),z,ne,ae)],0),te)}function Ut(x,z,ne){for(var te=[],ae=x.cm&&(x.cm.display.shift||x.extend),de=0;de<x.sel.ranges.length;de++)te[de]=Pn(x.sel.ranges[de],z[de],null,ae);var Ee=rc(x.cm,te,x.sel.primIndex);_r(x,Ee,ne)}function gr(x,z,ne,te){var ae=x.sel.ranges.slice(0);ae[z]=ne,_r(x,rc(x.cm,ae,x.sel.primIndex),te)}function Cr(x,z,ne,te){_r(x,ic(z,ne),te)}function Mr(x,z,ne){var te={ranges:z.ranges,update:function(ae){this.ranges=[];for(var de=0;de<ae.length;de++)this.ranges[de]=new Go(Kr(x,ae[de].anchor),Kr(x,ae[de].head))},origin:ne&&ne.origin};return Rn(x,"beforeSelectionChange",x,te),x.cm&&Rn(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?rc(x.cm,te.ranges,te.ranges.length-1):z}function Rr(x,z,ne){var te=x.history.done,ae=ln(te);ae&&ae.ranges?(te[te.length-1]=z,Yr(x,z,ne)):_r(x,z,ne)}function _r(x,z,ne){Yr(x,z,ne),Ze(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function Yr(x,z,ne){(wr(x,"beforeSelectionChange")||x.cm&&wr(x.cm,"beforeSelectionChange"))&&(z=Mr(x,z,ne));var te=ne&&ne.bias||(br(z.primary().head,x.sel.primary().head)<0?-1:1);jr(x,$i(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&il(x.cm)}function jr(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Xr(x.cm)),fr(x,"cursorActivity",x))}function ui(x){jr(x,$i(x,x.sel,null,!1))}function $i(x,z,ne,te){for(var ae,de=0;de<z.ranges.length;de++){var Ee=z.ranges[de],Ne=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[de],Ke=Ni(x,Ee.anchor,Ne&&Ne.anchor,ne,te),Xe=Ni(x,Ee.head,Ne&&Ne.head,ne,te);(ae||Ke!=Ee.anchor||Xe!=Ee.head)&&(ae||(ae=z.ranges.slice(0,de)),ae[de]=new Go(Ke,Xe))}return ae?rc(x.cm,ae,z.primIndex):z}function Ti(x,z,ne,te,ae){var de=wn(x,z.line);if(de.markedSpans)for(var Ee=0;Ee<de.markedSpans.length;++Ee){var Ne=de.markedSpans[Ee],Ke=Ne.marker,Xe="selectLeft"in Ke?!Ke.selectLeft:Ke.inclusiveLeft,Nt="selectRight"in Ke?!Ke.selectRight:Ke.inclusiveRight;if((Ne.from==null||(Xe?Ne.from<=z.ch:Ne.from<z.ch))&&(Ne.to==null||(Nt?Ne.to>=z.ch:Ne.to>z.ch))){if(ae&&(Rn(Ke,"beforeCursorEnter"),Ke.explicitlyCleared))if(de.markedSpans){--Ee;continue}else break;if(!Ke.atomic)continue;if(ne){var Vt=Ke.find(te<0?1:-1),Wn=void 0;if((te<0?Nt:Xe)&&(Vt=ca(x,Vt,-te,Vt&&Vt.line==z.line?de:null)),Vt&&Vt.line==z.line&&(Wn=br(Vt,ne))&&(te<0?Wn<0:Wn>0))return Ti(x,Vt,z,te,ae)}var On=Ke.find(te<0?-1:1);return(te<0?Xe:Nt)&&(On=ca(x,On,te,On.line==z.line?de:null)),On?Ti(x,On,z,te,ae):null}}return z}function Ni(x,z,ne,te,ae){var de=te||1,Ee=Ti(x,z,ne,de,ae)||!ae&&Ti(x,z,ne,de,!0)||Ti(x,z,ne,-de,ae)||!ae&&Ti(x,z,ne,-de,!0);return Ee||(x.cantEdit=!0,Vn(x.first,0))}function ca(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?Kr(x,Vn(z.line-1)):null:ne>0&&z.ch==(te||wn(x,z.line)).text.length?z.line<x.first+x.size-1?Vn(z.line+1,0):null:new Vn(z.line,z.ch+ne)}function Oa(x){x.setSelection(Vn(x.firstLine(),0),Vn(x.lastLine()),pt)}function Ci(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(ae,de,Ee,Ne){ae&&(te.from=Kr(x,ae)),de&&(te.to=Kr(x,de)),Ee&&(te.text=Ee),Ne!==void 0&&(te.origin=Ne)}),Rn(x,"beforeChange",x,te),x.cm&&Rn(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 Ai(x,z,ne){if(x.cm){if(!x.cm.curOp)return Ho(x.cm,Ai)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((wr(x,"beforeChange")||x.cm&&wr(x.cm,"beforeChange"))&&(z=Ci(x,z,!0),!z))){var te=no&&!ne&&Qi(x,z.from,z.to);if(te)for(var ae=te.length-1;ae>=0;--ae)Ei(x,{from:te[ae].from,to:te[ae].to,text:ae?[""]:z.text,origin:z.origin});else Ei(x,z)}}function Ei(x,z){if(!(z.text.length==1&&z.text[0]==""&&br(z.from,z.to)==0)){var ne=ed(x,z);we(x,z,ne,x.cm?x.cm.curOp.id:NaN),ua(x,z,ne,ki(x,z));var te=[];hc(x,function(ae,de){!de&&Ot(te,ae.history)==-1&&(Ga(ae.history,z),te.push(ae.history)),ua(ae,z,null,ki(ae,z))})}}function qr(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ae=x.history,de,Ee=x.sel,Ne=z=="undo"?ae.done:ae.undone,Ke=z=="undo"?ae.undone:ae.done,Xe=0;Xe<Ne.length&&(de=Ne[Xe],!(ne?de.ranges&&!de.equals(x.sel):!de.ranges));Xe++);if(Xe!=Ne.length){for(ae.lastOrigin=ae.lastSelOrigin=null;;)if(de=Ne.pop(),de.ranges){if(nt(de,Ke),ne&&!de.equals(x.sel)){_r(x,de,{clearRedo:!1});return}Ee=de}else if(te){Ne.push(de);return}else break;var Nt=[];nt(Ee,Ke),Ke.push({changes:Nt,generation:ae.generation}),ae.generation=de.generation||++ae.maxGeneration;for(var Vt=wr(x,"beforeChange")||x.cm&&wr(x.cm,"beforeChange"),Wn=function($r){var ai=de.changes[$r];if(ai.origin=z,Vt&&!Ci(x,ai,!1))return Ne.length=0,{};Nt.push(Gl(x,ai));var Mi=$r?ed(x,ai):ln(Ne);ua(x,ai,Mi,pn(x,ai)),!$r&&x.cm&&x.cm.scrollIntoView({from:ai.from,to:wc(ai)});var Fi=[];hc(x,function(bi,Hi){!Hi&&Ot(Fi,bi.history)==-1&&(Ga(bi.history,ai),Fi.push(bi.history)),ua(bi,ai,null,pn(bi,ai))})},On=de.changes.length-1;On>=0;--On){var Er=Wn(On);if(Er)return Er.v}}}}function Di(x,z){if(z!=0&&(x.first+=z,x.sel=new Hl(zn(x.sel.ranges,function(ae){return new Go(Vn(ae.anchor.line+z,ae.anchor.ch),Vn(ae.head.line+z,ae.head.ch))}),x.sel.primIndex),x.cm)){ga(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)so(x.cm,te,"gutter")}}function ua(x,z,ne,te){if(x.cm&&!x.cm.curOp)return Ho(x.cm,ua)(x,z,ne,te);if(z.to.line<x.first){Di(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 ae=z.text.length-1-(x.first-z.from.line);Di(x,ae),z={from:Vn(x.first,0),to:Vn(z.to.line+ae,z.to.ch),text:[ln(z.text)],origin:z.origin}}var de=x.lastLine();z.to.line>de&&(z={from:z.from,to:Vn(de,wn(x,de).text.length),text:[z.text[0]],origin:z.origin}),z.removed=rr(x,z.from,z.to),ne||(ne=ed(x,z)),x.cm?Va(x.cm,z,te):Tu(x,z,te),Yr(x,ne,pt),x.cantEdit&&Ni(x,Vn(x.firstLine(),0))&&(x.cantEdit=!1)}}function Va(x,z,ne){var te=x.doc,ae=x.display,de=z.from,Ee=z.to,Ne=!1,Ke=de.line;x.options.lineWrapping||(Ke=yr(et(wn(te,de.line))),te.iter(Ke,Ee.line+1,function(On){if(On==ae.maxLine)return Ne=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Xr(x),Tu(te,z,ne,Fs(x)),x.options.lineWrapping||(te.iter(Ke,de.line+z.text.length,function(On){var Er=un(On);Er>ae.maxLineLength&&(ae.maxLine=On,ae.maxLineLength=Er,ae.maxLineChanged=!0,Ne=!1)}),Ne&&(x.curOp.updateMaxLine=!0)),Eo(te,de.line),qs(x,400);var Xe=z.text.length-(Ee.line-de.line)-1;z.full?ga(x):de.line==Ee.line&&z.text.length==1&&!nd(x.doc,z)?so(x,de.line,"text"):ga(x,de.line,Ee.line+1,Xe);var Nt=wr(x,"changes"),Vt=wr(x,"change");if(Vt||Nt){var Wn={from:de,to:Ee,text:z.text,removed:z.removed,origin:z.origin};Vt&&fr(x,"change",x,Wn),Nt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(Wn)}x.display.selForContextMenu=null}function La(x,z,ne,te,ae){var de;te||(te=ne),br(te,ne)<0&&(de=[te,ne],ne=de[0],te=de[1]),typeof z=="string"&&(z=x.splitLines(z)),Ai(x,{from:ne,to:te,text:z,origin:ae})}function da(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function qa(x,z,ne,te){for(var ae=0;ae<x.length;++ae){var de=x[ae],Ee=!0;if(de.ranges){de.copied||(de=x[ae]=de.deepCopy(),de.copied=!0);for(var Ne=0;Ne<de.ranges.length;Ne++)da(de.ranges[Ne].anchor,z,ne,te),da(de.ranges[Ne].head,z,ne,te);continue}for(var Ke=0;Ke<de.changes.length;++Ke){var Xe=de.changes[Ke];if(ne<Xe.from.line)Xe.from=Vn(Xe.from.line+te,Xe.from.ch),Xe.to=Vn(Xe.to.line+te,Xe.to.ch);else if(z<=Xe.to.line){Ee=!1;break}}Ee||(x.splice(0,ae+1),ae=0)}}function Ga(x,z){var ne=z.from.line,te=z.to.line,ae=z.text.length-(te-ne)-1;qa(x.done,ne,te,ae),qa(x.undone,ne,te,ae)}function Ko(x,z,ne,te){var ae=z,de=z;return typeof z=="number"?de=wn(x,ra(x,z)):ae=yr(z),ae==null?null:(te(de,ae)&&x.cm&&so(x.cm,ae,ne),de)}function eo(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}eo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ae=this.lines[ne];this.height-=ae.height,$n(ae),fr(ae,"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 es(x){this.children=x;for(var z=0,ne=0,te=0;te<x.length;++te){var ae=x[te];z+=ae.chunkSize(),ne+=ae.height,ae.parent=this}this.size=z,this.height=ne,this.parent=null}es.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],ae=te.chunkSize();if(x<ae){var de=Math.min(z,ae-x),Ee=te.height;if(te.removeInner(x,de),this.height-=Ee-te.height,ae==de&&(this.children.splice(ne--,1),te.parent=null),(z-=de)==0)break;x=0}else x-=ae}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof eo))){var Ne=[];this.collapse(Ne),this.children=[new eo(Ne)],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 ae=this.children[te],de=ae.chunkSize();if(x<=de){if(ae.insertInner(x,z,ne),ae.lines&&ae.lines.length>50){for(var Ee=ae.lines.length%25+25,Ne=Ee;Ne<ae.lines.length;){var Ke=new eo(ae.lines.slice(Ne,Ne+=25));ae.height-=Ke.height,this.children.splice(++te,0,Ke),Ke.parent=this}ae.lines=ae.lines.slice(0,Ee),this.maybeSpill()}break}x-=de}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new es(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ae=Ot(x.parent.children,x);x.parent.children.splice(ae+1,0,ne)}else{var te=new es(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 ae=this.children[te],de=ae.chunkSize();if(x<de){var Ee=Math.min(z,de-x);if(ae.iterN(x,Ee,ne))return!0;if((z-=Ee)==0)break;x=0}else x-=de}}};var ts=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};ts.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=yr(ne);if(!(te==null||!z)){for(var ae=0;ae<z.length;++ae)z[ae]==this&&z.splice(ae--,1);z.length||(ne.widgets=null);var de=qi(this);vr(ne,Math.max(0,ne.height-de)),x&&(oo(x,function(){Ra(x,ne,-de),so(x,te,"widget")}),fr(x,"lineWidgetCleared",x,this,te))}},ts.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ae=qi(this)-z;ae&&(Nn(this.doc,te)||vr(te,te.height+ae),ne&&oo(ne,function(){ne.curOp.forceUpdate=!0,Ra(ne,te,ae),fr(ne,"lineWidgetChanged",ne,x,yr(te))}))},kr(ts);function Ra(x,z,ne){cn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Cl(x,ne)}function Ls(x,z,ne,te){var ae=new ts(x,ne,te),de=x.cm;return de&&ae.noHScroll&&(de.display.alignWidgets=!0),Ko(x,z,"widget",function(Ee){var Ne=Ee.widgets||(Ee.widgets=[]);if(ae.insertAt==null?Ne.push(ae):Ne.splice(Math.min(Ne.length-1,Math.max(0,ae.insertAt)),0,ae),ae.line=Ee,de&&!Nn(x,Ee)){var Ke=cn(Ee)<x.scrollTop;vr(Ee,Ee.height+qi(ae)),Ke&&Cl(de,ae.height),de.curOp.forceUpdate=!0}return!0}),de&&fr(de,"lineWidgetAdded",de,ae,typeof z=="number"?z:yr(z)),ae}var Io=0,Wo=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++Io};Wo.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&tc(x),wr(this,"clear")){var ne=this.find();ne&&fr(this,"clear",ne.from,ne.to)}for(var te=null,ae=null,de=0;de<this.lines.length;++de){var Ee=this.lines[de],Ne=jn(Ee.markedSpans,this);x&&!this.collapsed?so(x,yr(Ee),"text"):x&&(Ne.to!=null&&(ae=yr(Ee)),Ne.from!=null&&(te=yr(Ee))),Ee.markedSpans=hr(Ee.markedSpans,Ne),Ne.from==null&&this.collapsed&&!Nn(this.doc,Ee)&&x&&vr(Ee,jo(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Ke=0;Ke<this.lines.length;++Ke){var Xe=et(this.lines[Ke]),Nt=un(Xe);Nt>x.display.maxLineLength&&(x.display.maxLine=Xe,x.display.maxLineLength=Nt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&ga(x,te,ae+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&ui(x.doc)),x&&fr(x,"markerCleared",x,this,te,ae),z&&nc(x),this.parent&&this.parent.clear()}},Wo.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ae=0;ae<this.lines.length;++ae){var de=this.lines[ae],Ee=jn(de.markedSpans,this);if(Ee.from!=null&&(ne=Vn(z?de:yr(de),Ee.from),x==-1))return ne;if(Ee.to!=null&&(te=Vn(z?de:yr(de),Ee.to),x==1))return te}return ne&&{from:ne,to:te}},Wo.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||oo(te,function(){var ae=z.line,de=yr(z.line),Ee=Ba(te,de);if(Ee&&(Ma(Ee),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!Nn(ne.doc,ae)&&ne.height!=null){var Ne=ne.height;ne.height=null;var Ke=qi(ne)-Ne;Ke&&vr(ae,ae.height+Ke)}fr(te,"markerChanged",te,x)})},Wo.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||Ot(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},Wo.prototype.detachLine=function(x){if(this.lines.splice(Ot(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},kr(Wo);function Ro(x,z,ne,te,ae){if(te&&te.shared)return yi(x,z,ne,te,ae);if(x.cm&&!x.cm.curOp)return Ho(x.cm,Ro)(x,z,ne,te,ae);var de=new Wo(x,ae),Ee=br(z,ne);if(te&&Yt(te,de,!1),Ee>0||Ee==0&&de.clearWhenEmpty!==!1)return de;if(de.replacedWith&&(de.collapsed=!0,de.widgetNode=ut("span",[de.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||de.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(de.widgetNode.insertLeft=!0)),de.collapsed){if(je(x,z.line,z,ne,de)||z.line!=ne.line&&je(x,ne.line,z,ne,de))throw new Error("Inserting collapsed marker partially overlapping an existing one");At()}de.addToHistory&&we(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var Ne=z.line,Ke=x.cm,Xe;if(x.iter(Ne,ne.line+1,function(Vt){Ke&&de.collapsed&&!Ke.options.lineWrapping&&et(Vt)==Ke.display.maxLine&&(Xe=!0),de.collapsed&&Ne!=z.line&&vr(Vt,0),Qr(Vt,new xn(de,Ne==z.line?z.ch:null,Ne==ne.line?ne.ch:null)),++Ne}),de.collapsed&&x.iter(z.line,ne.line+1,function(Vt){Nn(x,Vt)&&vr(Vt,0)}),de.clearOnEnter&&Xt(de,"beforeCursorEnter",function(){return de.clear()}),de.readOnly&&(Zt(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),de.collapsed&&(de.id=++Io,de.atomic=!0),Ke){if(Xe&&(Ke.curOp.updateMaxLine=!0),de.collapsed)ga(Ke,z.line,ne.line+1);else if(de.className||de.startStyle||de.endStyle||de.css||de.attributes||de.title)for(var Nt=z.line;Nt<=ne.line;Nt++)so(Ke,Nt,"text");de.atomic&&ui(Ke.doc),fr(Ke,"markerAdded",Ke,de)}return de}var Aa=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};Aa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();fr(this,"clear")}},Aa.prototype.find=function(x,z){return this.primary.find(x,z)},kr(Aa);function yi(x,z,ne,te,ae){te=Yt(te),te.shared=!1;var de=[Ro(x,z,ne,te,ae)],Ee=de[0],Ne=te.widgetNode;return hc(x,function(Ke){Ne&&(te.widgetNode=Ne.cloneNode(!0)),de.push(Ro(Ke,Kr(Ke,z),Kr(Ke,ne),te,ae));for(var Xe=0;Xe<Ke.linked.length;++Xe)if(Ke.linked[Xe].isParent)return;Ee=ln(de)}),new Aa(de,Ee)}function Gi(x){return x.findMarks(Vn(x.first,0),x.clipPos(Vn(x.lastLine())),function(z){return z.parent})}function fa(x,z){for(var ne=0;ne<z.length;ne++){var te=z[ne],ae=te.find(),de=x.clipPos(ae.from),Ee=x.clipPos(ae.to);if(br(de,Ee)){var Ne=Ro(x,de,Ee,te.primary,te.primary.type);te.markers.push(Ne),Ne.parent=te}}}function Ii(x){for(var z=function(te){var ae=x[te],de=[ae.primary.doc];hc(ae.primary.doc,function(Ke){return de.push(Ke)});for(var Ee=0;Ee<ae.markers.length;Ee++){var Ne=ae.markers[Ee];Ot(de,Ne.doc)==-1&&(Ne.parent=null,ae.markers.splice(Ee--,1))}},ne=0;ne<x.length;ne++)z(ne)}var Do=0,pi=function(x,z,ne,te,ae){if(!(this instanceof pi))return new pi(x,z,ne,te,ae);ne==null&&(ne=0),es.call(this,[new eo([new kn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var de=Vn(ne,0);this.sel=ic(de),this.history=new fu(null),this.id=++Do,this.modeOption=z,this.lineSep=te,this.direction=ae=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Tu(this,{from:de,to:de,text:x}),_r(this,ic(de),pt)};pi.prototype=ue(es.prototype,{constructor:pi,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=zr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:ws(function(x){var z=Vn(this.first,0),ne=this.first+this.size-1;Ai(this,{from:z,to:Vn(ne,wn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&ql(this.cm,0,0),_r(this,ic(z),pt)}),replaceRange:function(x,z,ne,te){z=Kr(this,z),ne=ne?Kr(this,ne):z,La(this,x,z,ne,te)},getRange:function(x,z,ne){var te=rr(this,Kr(this,x),Kr(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(Dr(this,x))return wn(this,x)},getLineNumber:function(x){return yr(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=wn(this,x)),et(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Kr(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:ws(function(x,z,ne){Cr(this,Kr(this,typeof x=="number"?Vn(x,z||0):x),null,ne)}),setSelection:ws(function(x,z,ne){Cr(this,Kr(this,x),Kr(this,z||x),ne)}),extendSelection:ws(function(x,z,ne){Xn(this,Kr(this,x),z&&Kr(this,z),ne)}),extendSelections:ws(function(x,z){Ut(this,lr(this,x),z)}),extendSelectionsBy:ws(function(x,z){var ne=zn(this.sel.ranges,x);Ut(this,lr(this,ne),z)}),setSelections:ws(function(x,z,ne){if(x.length){for(var te=[],ae=0;ae<x.length;ae++)te[ae]=new Go(Kr(this,x[ae].anchor),Kr(this,x[ae].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),_r(this,rc(this.cm,te,z),ne)}}),addSelection:ws(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new Go(Kr(this,x),Kr(this,z||x))),_r(this,rc(this.cm,te,te.length-1),ne)}),getSelection:function(x){for(var z=this.sel.ranges,ne,te=0;te<z.length;te++){var ae=rr(this,z[te].from(),z[te].to());ne=ne?ne.concat(ae):ae}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 ae=rr(this,ne[te].from(),ne[te].to());x!==!1&&(ae=ae.join(x||this.lineSeparator())),z[te]=ae}return z},replaceSelection:function(x,z,ne){for(var te=[],ae=0;ae<this.sel.ranges.length;ae++)te[ae]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:ws(function(x,z,ne){for(var te=[],ae=this.sel,de=0;de<ae.ranges.length;de++){var Ee=ae.ranges[de];te[de]={from:Ee.from(),to:Ee.to(),text:this.splitLines(x[de]),origin:ne}}for(var Ne=z&&z!="end"&&td(this,te,z),Ke=te.length-1;Ke>=0;Ke--)Ai(this,te[Ke]);Ne?Rr(this,Ne):this.cm&&il(this.cm)}),undo:ws(function(){qr(this,"undo")}),redo:ws(function(){qr(this,"redo")}),undoSelection:ws(function(){qr(this,"undo",!0)}),redoSelection:ws(function(){qr(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 ae=0;ae<x.undone.length;ae++)x.undone[ae].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new fu(this.history.maxGeneration),hc(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:nn(this.history.done),undone:nn(this.history.undone)}},setHistory:function(x){var z=this.history=new fu(this.history.maxGeneration);z.done=nn(x.done.slice(0),null,!0),z.undone=nn(x.undone.slice(0),null,!0)},setGutterMarker:ws(function(x,z,ne){return Ko(this,x,"gutter",function(te){var ae=te.gutterMarkers||(te.gutterMarkers={});return ae[z]=ne,!ne&&se(ae)&&(te.gutterMarkers=null),!0})}),clearGutter:ws(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Ko(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(!Dr(this,x)||(z=x,x=wn(this,x),!x))return null}else if(z=yr(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:ws(function(x,z,ne){return Ko(this,x,z=="gutter"?"gutter":"class",function(te){var ae=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!te[ae])te[ae]=ne;else{if(Se(ne).test(te[ae]))return!1;te[ae]+=" "+ne}return!0})}),removeLineClass:ws(function(x,z,ne){return Ko(this,x,z=="gutter"?"gutter":"class",function(te){var ae=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",de=te[ae];if(de)if(ne==null)te[ae]=null;else{var Ee=de.match(Se(ne));if(!Ee)return!1;var Ne=Ee.index+Ee[0].length;te[ae]=de.slice(0,Ee.index)+(!Ee.index||Ne==de.length?"":" ")+de.slice(Ne)||null}else return!1;return!0})}),addLineWidget:ws(function(x,z,ne){return Ls(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return Ro(this,Kr(this,x),Kr(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=Kr(this,x),Ro(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=Kr(this,x);var z=[],ne=wn(this,x.line).markedSpans;if(ne)for(var te=0;te<ne.length;++te){var ae=ne[te];(ae.from==null||ae.from<=x.ch)&&(ae.to==null||ae.to>=x.ch)&&z.push(ae.marker.parent||ae.marker)}return z},findMarks:function(x,z,ne){x=Kr(this,x),z=Kr(this,z);var te=[],ae=x.line;return this.iter(x.line,z.line+1,function(de){var Ee=de.markedSpans;if(Ee)for(var Ne=0;Ne<Ee.length;Ne++){var Ke=Ee[Ne];!(Ke.to!=null&&ae==x.line&&x.ch>=Ke.to||Ke.from==null&&ae!=x.line||Ke.from!=null&&ae==z.line&&Ke.from>=z.ch)&&(!ne||ne(Ke.marker))&&te.push(Ke.marker.parent||Ke.marker)}++ae}),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(ae){var de=ae.text.length+te;if(de>x)return z=x,!0;x-=de,++ne}),Kr(this,Vn(ne,z))},indexFromPos:function(x){x=Kr(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 pi(zr(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 pi(zr(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}],fa(te,Gi(this)),te},unlinkDoc:function(x){if(x instanceof $a&&(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),Ii(Gi(this));break}}if(x.history==this.history){var te=[x.id];hc(x,function(ae){return te.push(ae.id)},!0),x.history=new fu(null),x.history.done=nn(this.history.done,te),x.history.undone=nn(this.history.undone,te)}},iterLinkedDocs:function(x){hc(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):Lt(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:ws(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Au(this.cm))})}),pi.prototype.eachLine=pi.prototype.iter;var Da=0;function Lo(x){var z=this;if(Ts(z),!(cr(z,x)||Oi(z.display,x))){Ar(x),ye&&(Da=+new Date);var ne=zs(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ae=te.length,de=Array(ae),Ee=0,Ne=function(){++Ee==ae&&Ho(z,function(){ne=Kr(z.doc,ne);var On={from:ne,to:ne,text:z.doc.splitLines(de.filter(function(Er){return Er!=null}).join(z.doc.lineSeparator())),origin:"paste"};Ai(z.doc,On),Rr(z.doc,ic(Kr(z.doc,ne),Kr(z.doc,wc(On))))})()},Ke=function(On,Er){if(z.options.allowDropFileTypes&&Ot(z.options.allowDropFileTypes,On.type)==-1){Ne();return}var $r=new FileReader;$r.onerror=function(){return Ne()},$r.onload=function(){var ai=$r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ai)){Ne();return}de[Er]=ai,Ne()},$r.readAsText(On)},Xe=0;Xe<te.length;Xe++)Ke(te[Xe],Xe);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 Nt=x.dataTransfer.getData("Text");if(Nt){var Vt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Vt=z.listSelections()),Yr(z.doc,ic(ne,ne)),Vt)for(var Wn=0;Wn<Vt.length;++Wn)La(z.doc,"",Vt[Wn].anchor,Vt[Wn].head,"drag");z.replaceSelection(Nt,"around","paste"),z.display.input.focus()}}catch(On){}}}}function xo(x,z){if(ye&&(!x.state.draggingText||+new Date-Da<100)){fi(z);return}if(!(cr(x,z)||Oi(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!lt)){var ne=mt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ae&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Ae&&ne.parentNode.removeChild(ne)}}function ol(x,z){var ne=zs(x,z);if(ne){var te=document.createDocumentFragment();Ka(x,ne,te),x.display.dragCursor||(x.display.dragCursor=mt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),xt(x.display.dragCursor,te)}}function Ts(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function El(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),ne=[],te=0;te<z.length;te++){var ae=z[te].CodeMirror;ae&&ne.push(ae)}ne.length&&ne[0].operation(function(){for(var de=0;de<ne.length;de++)x(ne[de])})}}var Ir=!1;function Fl(){Ir||(Cs(),Ir=!0)}function Cs(){var x;Xt(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,El(fl)},100))}),Xt(window,"blur",function(){return El(rl)})}function fl(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var yl={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"},To=0;To<10;To++)yl[To+48]=yl[To+96]=String(To);for(var No=65;No<=90;No++)yl[No]=String.fromCharCode(No);for(var ns=1;ns<=12;ns++)yl[ns+111]=yl[ns+63235]="F"+ns;var Za={};Za.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"},Za.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"},Za.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"},Za.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"]},Za.default=be?Za.macDefault:Za.pcDefault;function Rs(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var ne,te,ae,de,Ee=0;Ee<z.length-1;Ee++){var Ne=z[Ee];if(/^(cmd|meta|m)$/i.test(Ne))de=!0;else if(/^a(lt)?$/i.test(Ne))ne=!0;else if(/^(c|ctrl|control)$/i.test(Ne))te=!0;else if(/^s(hift)?$/i.test(Ne))ae=!0;else throw new Error("Unrecognized modifier name: "+Ne)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),de&&(x="Cmd-"+x),ae&&(x="Shift-"+x),x}function to(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 ae=zn(ne.split(" "),Rs),de=0;de<ae.length;de++){var Ee=void 0,Ne=void 0;de==ae.length-1?(Ne=ae.join(" "),Ee=te):(Ne=ae.slice(0,de+1).join(" "),Ee="...");var Ke=z[Ne];if(!Ke)z[Ne]=Ee;else if(Ke!=Ee)throw new Error("Inconsistent bindings for "+Ne)}delete x[ne]}for(var Xe in z)x[Xe]=z[Xe];return x}function As(x,z,ne,te){z=Es(z);var ae=z.call?z.call(x,te):z[x];if(ae===!1)return"nothing";if(ae==="...")return"multi";if(ae!=null&&ne(ae))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return As(x,z.fallthrough,ne,te);for(var de=0;de<z.fallthrough.length;de++){var Ee=As(x,z.fallthrough[de],ne,te);if(Ee)return Ee}}}function Hs(x){var z=typeof x=="string"?x:yl[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Ws(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(ot?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(ot?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function Ml(x,z){if(Ae&&x.keyCode==34&&x.char)return!1;var ne=yl[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),Ws(ne,x,z))}function Es(x){return typeof x=="string"?Za[x]:x}function kl(x,z){for(var ne=x.doc.sel.ranges,te=[],ae=0;ae<ne.length;ae++){for(var de=z(ne[ae]);te.length&&br(de.from,ln(te).to)<=0;){var Ee=te.pop();if(br(Ee.from,de.from)<0){de.from=Ee.from;break}}te.push(de)}oo(x,function(){for(var Ne=te.length-1;Ne>=0;Ne--)La(x.doc,"",te[Ne].from,te[Ne].to,"+delete");il(x)})}function Ms(x,z,ne){var te=Bt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Zs(x,z,ne){var te=Ms(x,z.ch,ne);return te==null?null:new Vn(z.line,te,ne<0?"after":"before")}function js(x,z,ne,te,ae){if(x){z.doc.direction=="rtl"&&(ae=-ae);var de=It(ne,z.doc.direction);if(de){var Ee=ae<0?ln(de):de[0],Ne=ae<0==(Ee.level==1),Ke=Ne?"after":"before",Xe;if(Ee.level>0||z.doc.direction=="rtl"){var Nt=Ea(z,ne);Xe=ae<0?ne.text.length-1:0;var Vt=ji(z,Nt,Xe).top;Xe=qt(function(Wn){return ji(z,Nt,Wn).top==Vt},ae<0==(Ee.level==1)?Ee.from:Ee.to-1,Xe),Ke=="before"&&(Xe=Ms(ne,Xe,1))}else Xe=ae<0?Ee.to:Ee.from;return new Vn(te,Xe,Ke)}}return new Vn(te,ae<0?ne.text.length:0,ae<0?"before":"after")}function ks(x,z,ne,te){var ae=It(z,x.doc.direction);if(!ae)return Zs(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 de=dn(ae,ne.ch,ne.sticky),Ee=ae[de];if(x.doc.direction=="ltr"&&Ee.level%2==0&&(te>0?Ee.to>ne.ch:Ee.from<ne.ch))return Zs(z,ne,te);var Ne=function(Mi,Fi){return Ms(z,Mi instanceof Vn?Mi.ch:Mi,Fi)},Ke,Xe=function(Mi){return x.options.lineWrapping?(Ke=Ke||Ea(x,z),Oo(x,z,Ke,Mi)):{begin:0,end:z.text.length}},Nt=Xe(ne.sticky=="before"?Ne(ne,-1):ne.ch);if(x.doc.direction=="rtl"||Ee.level==1){var Vt=Ee.level==1==te<0,Wn=Ne(ne,Vt?1:-1);if(Wn!=null&&(Vt?Wn<=Ee.to&&Wn<=Nt.end:Wn>=Ee.from&&Wn>=Nt.begin)){var On=Vt?"before":"after";return new Vn(ne.line,Wn,On)}}var Er=function(Mi,Fi,bi){for(var Hi=function(vs,xl){return xl?new Vn(ne.line,Ne(vs,1),"before"):new Vn(ne.line,vs,"after")};Mi>=0&&Mi<ae.length;Mi+=Fi){var wa=ae[Mi],ka=Fi>0==(wa.level!=1),Co=ka?bi.begin:Ne(bi.end,-1);if(wa.from<=Co&&Co<wa.to||(Co=ka?wa.from:Ne(wa.to,-1),bi.begin<=Co&&Co<bi.end))return Hi(Co,ka)}},$r=Er(de+te,te,Nt);if($r)return $r;var ai=te>0?Nt.end:Ne(Nt.begin,-1);return ai!=null&&!(te>0&&ai==z.text.length)&&($r=Er(te>0?0:ae.length-1,te,Xe(ai)),$r)?$r:null}var ms={selectAll:Oa,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),pt)},killLine:function(x){return kl(x,function(z){if(z.empty()){var ne=wn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:Vn(z.head.line+1,0)}:{from:z.head,to:Vn(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return kl(x,function(z){return{from:Vn(z.from().line,0),to:Kr(x.doc,Vn(z.to().line+1,0))}})},delLineLeft:function(x){return kl(x,function(z){return{from:Vn(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return kl(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 kl(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(Vn(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(Vn(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return ls(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return Cc(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return Xl(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")},Qt)},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")},Qt)},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/)?Cc(x,z.head):te},Qt)},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,ae=0;ae<ne.length;ae++){var de=ne[ae].from(),Ee=Qe(x.getLine(de.line),de.ch,te);z.push(rn(te-Ee%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return oo(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ae=z[te].head,de=wn(x.doc,ae.line).text;if(de){if(ae.ch==de.length&&(ae=new Vn(ae.line,ae.ch-1)),ae.ch>0)ae=new Vn(ae.line,ae.ch+1),x.replaceRange(de.charAt(ae.ch-1)+de.charAt(ae.ch-2),Vn(ae.line,ae.ch-2),ae,"+transpose");else if(ae.line>x.doc.first){var Ee=wn(x.doc,ae.line-1).text;Ee&&(ae=new Vn(ae.line,1),x.replaceRange(de.charAt(0)+x.doc.lineSeparator()+Ee.charAt(Ee.length-1),Vn(ae.line-1,Ee.length-1),ae,"+transpose"))}}ne.push(new Go(ae,ae))}x.setSelections(ne)})},newlineAndIndent:function(x){return oo(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);il(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function ls(x,z){var ne=wn(x.doc,z),te=et(ne);return te!=ne&&(z=yr(te)),js(!0,x,te,z,1)}function Xl(x,z){var ne=wn(x.doc,z),te=tt(ne);return te!=ne&&(z=yr(te)),js(!0,x,ne,z,-1)}function Cc(x,z){var ne=ls(x,z.line),te=wn(x.doc,ne.line),ae=It(te,x.doc.direction);if(!ae||ae[0].level==0){var de=Math.max(ne.ch,te.text.search(/\S/)),Ee=z.line==ne.line&&z.ch<=de&&z.ch;return Vn(ne.line,Ee?0:de,ne.sticky)}return ne}function hs(x,z,ne){if(typeof z=="string"&&(z=ms[z],!z))return!1;x.display.input.ensurePolled();var te=x.display.shift,ae=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ne&&(x.display.shift=!1),ae=z(x)!=mn}finally{x.display.shift=te,x.state.suppressEdits=!1}return ae}function sl(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ae=As(z,x.state.keyMaps[te],ne,x);if(ae)return ae}return x.options.extraKeys&&As(z,x.options.extraKeys,ne,x)||As(z,x.options.keyMap,ne,x)}var Du=new Ie;function Ec(x,z,ne,te){var ae=x.state.keySeq;if(ae){if(Hs(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:Du.set(50,function(){x.state.keySeq==ae&&(x.state.keySeq=null,x.display.input.reset())}),fo(x,ae+" "+z,ne,te))return!0}return fo(x,z,ne,te)}function fo(x,z,ne,te){var ae=sl(x,z,te);return ae=="multi"&&(x.state.keySeq=z),ae=="handled"&&fr(x,"keyHandled",x,z,ne),(ae=="handled"||ae=="multi")&&(Ar(ne),Yi(x)),!!ae}function ta(x,z){var ne=Ml(z,!0);return ne?z.shiftKey&&!x.state.keySeq?Ec(x,"Shift-"+ne,z,function(te){return hs(x,te,!0)})||Ec(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return hs(x,te)}):Ec(x,ne,z,function(te){return hs(x,te)}):!1}function Os(x,z,ne){return Ec(x,"'"+ne+"'",z,function(te){return hs(x,te,!0)})}var Zo=null;function Us(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=yt(),!cr(z,x))){ye&&_e<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=ta(z,x);Ae&&(Zo=te?ne:null,!te&&ne==88&&!Bn&&(be?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),fe&&!be&&!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;gn(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(He(z,"CodeMirror-crosshair"),Yn(document,"keyup",ne),Yn(document,"mouseover",ne))}Xt(document,"keyup",ne),Xt(document,"mouseover",ne)}function _l(x){x.keyCode==16&&(this.doc.sel.shift=!1),cr(this,x)}function lc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Oi(z.display,x)||cr(z,x)||x.ctrlKey&&!x.altKey||be&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Ae&&ne==Zo){Zo=null,Ar(x);return}if(!(Ae&&(!x.which||x.which<10)&&ta(z,x))){var ae=String.fromCharCode(te==null?ne:te);ae!="\b"&&(Os(z,x,ae)||z.display.input.onKeyPress(x))}}}var Pu=400,id=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};id.prototype.compare=function(x,z,ne){return this.time+Pu>x&&br(z,this.pos)==0&&ne==this.button};var cc,hu;function Td(x,z){var ne=+new Date;return hu&&hu.compare(ne,x,z)?(cc=hu=null,"triple"):cc&&cc.compare(ne,x,z)?(hu=new id(ne,x,z),cc=null,"double"):(cc=new id(ne,x,z),hu=null,"single")}function Vs(x){var z=this,ne=z.display;if(!(cr(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,Oi(ne,x)){ce||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!bl(z,x)){var te=zs(z,x),ae=Or(x),de=te?Td(te,ae):"single";window.focus(),ae==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&Wl(z,ae,te,de,x))&&(ae==1?te?Ou(z,te,de,x):Pi(x)==ne.scroller&&Ar(x):ae==2?(te&&Xn(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ae==3&&(Ce?z.display.input.onContextMenu(x):Uo(z)))}}}function Wl(x,z,ne,te,ae){var de="Click";return te=="double"?de="Double"+de:te=="triple"&&(de="Triple"+de),de=(z==1?"Left":z==2?"Middle":"Right")+de,Ec(x,Ws(de,ae),ae,function(Ee){if(typeof Ee=="string"&&(Ee=ms[Ee]),!Ee)return!1;var Ne=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),Ne=Ee(x,ne)!=mn}finally{x.state.suppressEdits=!1}return Ne})}function pu(x,z,ne){var te=x.getOption("configureMouse"),ae=te?te(x,z,ne):{};if(ae.unit==null){var de=vt?ne.shiftKey&&ne.metaKey:ne.altKey;ae.unit=de?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(ae.extend==null||x.doc.extend)&&(ae.extend=x.doc.extend||ne.shiftKey),ae.addNew==null&&(ae.addNew=be?ne.metaKey:ne.ctrlKey),ae.moveOnDrag==null&&(ae.moveOnDrag=!(be?ne.altKey:ne.ctrlKey)),ae}function Ou(x,z,ne,te){ye?setTimeout(en(pa,x),0):x.curOp.focus=yt();var ae=pu(x,ne,te),de=x.doc.sel,Ee;x.options.dragDrop&&Jn&&!x.isReadOnly()&&ne=="single"&&(Ee=de.contains(z))>-1&&(br((Ee=de.ranges[Ee]).from(),z)<0||z.xRel>0)&&(br(Ee.to(),z)>0||z.xRel<0)?Ad(x,te,z,ae):Nu(x,te,z,ae)}function Ad(x,z,ne,te){var ae=x.display,de=!1,Ee=Ho(x,function(Xe){ce&&(ae.scroller.draggable=!1),x.state.draggingText=!1,Yn(ae.wrapper.ownerDocument,"mouseup",Ee),Yn(ae.wrapper.ownerDocument,"mousemove",Ne),Yn(ae.scroller,"dragstart",Ke),Yn(ae.scroller,"drop",Ee),de||(Ar(Xe),te.addNew||Xn(x.doc,ne,null,null,te.extend),ce&&!lt||ye&&_e==9?setTimeout(function(){ae.wrapper.ownerDocument.body.focus({preventScroll:!0}),ae.input.focus()},20):ae.input.focus())}),Ne=function(Xe){de=de||Math.abs(z.clientX-Xe.clientX)+Math.abs(z.clientY-Xe.clientY)>=10},Ke=function(){return de=!0};ce&&(ae.scroller.draggable=!0),x.state.draggingText=Ee,Ee.copy=!te.moveOnDrag,ae.scroller.dragDrop&&ae.scroller.dragDrop(),Xt(ae.wrapper.ownerDocument,"mouseup",Ee),Xt(ae.wrapper.ownerDocument,"mousemove",Ne),Xt(ae.scroller,"dragstart",Ke),Xt(ae.scroller,"drop",Ee),Uo(x),setTimeout(function(){return ae.input.focus()},20)}function Id(x,z,ne){if(ne=="char")return new Go(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new Go(Vn(z.line,0),Kr(x.doc,Vn(z.line+1,0)));var te=ne(x,z);return new Go(te.from,te.to)}function Nu(x,z,ne,te){var ae=x.display,de=x.doc;Ar(z);var Ee,Ne,Ke=de.sel,Xe=Ke.ranges;if(te.addNew&&!te.extend?(Ne=de.sel.contains(ne),Ne>-1?Ee=Xe[Ne]:Ee=new Go(ne,ne)):(Ee=de.sel.primary(),Ne=de.sel.primIndex),te.unit=="rectangle")te.addNew||(Ee=new Go(ne,ne)),ne=zs(x,z,!0,!0),Ne=-1;else{var Nt=Id(x,ne,te.unit);te.extend?Ee=Pn(Ee,Nt.anchor,Nt.head,te.extend):Ee=Nt}te.addNew?Ne==-1?(Ne=Xe.length,_r(de,rc(x,Xe.concat([Ee]),Ne),{scroll:!1,origin:"*mouse"})):Xe.length>1&&Xe[Ne].empty()&&te.unit=="char"&&!te.extend?(_r(de,rc(x,Xe.slice(0,Ne).concat(Xe.slice(Ne+1)),0),{scroll:!1,origin:"*mouse"}),Ke=de.sel):gr(de,Ne,Ee,wt):(Ne=0,_r(de,new Hl([Ee],0),wt),Ke=de.sel);var Vt=ne;function Wn(bi){if(br(Vt,bi)!=0)if(Vt=bi,te.unit=="rectangle"){for(var Hi=[],wa=x.options.tabSize,ka=Qe(wn(de,ne.line).text,ne.ch,wa),Co=Qe(wn(de,bi.line).text,bi.ch,wa),vs=Math.min(ka,Co),xl=Math.max(ka,Co),$s=Math.min(ne.line,bi.line),Zl=Math.min(x.lastLine(),Math.max(ne.line,bi.line));$s<=Zl;$s++){var jl=wn(de,$s).text,ll=Zn(jl,vs,wa);vs==xl?Hi.push(new Go(Vn($s,ll),Vn($s,ll))):jl.length>ll&&Hi.push(new Go(Vn($s,ll),Vn($s,Zn(jl,xl,wa))))}Hi.length||Hi.push(new Go(ne,ne)),_r(de,rc(x,Ke.ranges.slice(0,Ne).concat(Hi),Ne),{origin:"*mouse",scroll:!1}),x.scrollIntoView(bi)}else{var Ul=Ee,Xa=Id(x,bi,te.unit),Gs=Ul.anchor,Bs;br(Xa.anchor,Gs)>0?(Bs=Xa.head,Gs=vi(Ul.from(),Xa.anchor)):(Bs=Xa.anchor,Gs=Wr(Ul.to(),Xa.head));var Xs=Ke.ranges.slice(0);Xs[Ne]=mu(x,new Go(Kr(de,Gs),Bs)),_r(de,rc(x,Xs,Ne),wt)}}var On=ae.wrapper.getBoundingClientRect(),Er=0;function $r(bi){var Hi=++Er,wa=zs(x,bi,!0,te.unit=="rectangle");if(wa)if(br(wa,Vt)!=0){x.curOp.focus=yt(),Wn(wa);var ka=uo(ae,de);(wa.line>=ka.to||wa.line<ka.from)&&setTimeout(Ho(x,function(){Er==Hi&&$r(bi)}),150)}else{var Co=bi.clientY<On.top?-20:bi.clientY>On.bottom?20:0;Co&&setTimeout(Ho(x,function(){Er==Hi&&(ae.scroller.scrollTop+=Co,$r(bi))}),50)}}function ai(bi){x.state.selectingText=!1,Er=1/0,bi&&(Ar(bi),ae.input.focus()),Yn(ae.wrapper.ownerDocument,"mousemove",Mi),Yn(ae.wrapper.ownerDocument,"mouseup",Fi),de.history.lastSelOrigin=null}var Mi=Ho(x,function(bi){bi.buttons===0||!Or(bi)?ai(bi):$r(bi)}),Fi=Ho(x,ai);x.state.selectingText=Fi,Xt(ae.wrapper.ownerDocument,"mousemove",Mi),Xt(ae.wrapper.ownerDocument,"mouseup",Fi)}function mu(x,z){var ne=z.anchor,te=z.head,ae=wn(x.doc,ne.line);if(br(ne,te)==0&&ne.sticky==te.sticky)return z;var de=It(ae);if(!de)return z;var Ee=dn(de,ne.ch,ne.sticky),Ne=de[Ee];if(Ne.from!=ne.ch&&Ne.to!=ne.ch)return z;var Ke=Ee+(Ne.from==ne.ch==(Ne.level!=1)?0:1);if(Ke==0||Ke==de.length)return z;var Xe;if(te.line!=ne.line)Xe=(te.line-ne.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var Nt=dn(de,te.ch,te.sticky),Vt=Nt-Ee||(te.ch-ne.ch)*(Ne.level==1?-1:1);Nt==Ke-1||Nt==Ke?Xe=Vt<0:Xe=Vt>0}var Wn=de[Ke+(Xe?-1:0)],On=Xe==(Wn.level==1),Er=On?Wn.from:Wn.to,$r=On?"after":"before";return ne.ch==Er&&ne.sticky==$r?z:new Go(new Vn(ne.line,Er,$r),te)}function Vc(x,z,ne,te){var ae,de;if(z.touches)ae=z.touches[0].clientX,de=z.touches[0].clientY;else try{ae=z.clientX,de=z.clientY}catch(Wn){return!1}if(ae>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;te&&Ar(z);var Ee=x.display,Ne=Ee.lineDiv.getBoundingClientRect();if(de>Ne.bottom||!wr(x,ne))return oi(z);de-=Ne.top-Ee.viewOffset;for(var Ke=0;Ke<x.display.gutterSpecs.length;++Ke){var Xe=Ee.gutters.childNodes[Ke];if(Xe&&Xe.getBoundingClientRect().right>=ae){var Nt=Lr(x.doc,de),Vt=x.display.gutterSpecs[Ke];return Rn(x,ne,x,Nt,Vt.className,z),oi(z)}}}function bl(x,z){return Vc(x,z,"gutterClick",!0)}function pc(x,z){Oi(x.display,z)||ad(x,z)||cr(x,z,"contextmenu")||Ce||x.display.input.onContextMenu(z)}function ad(x,z){return wr(x,"gutterContextMenu")?Vc(x,z,"gutterContextMenu",!1):!1}function od(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 Mc={toString:function(){return"CodeMirror.Init"}},Dd={},gu={};function Ru(x){var z=x.optionHandlers;function ne(te,ae,de,Ee){x.defaults[te]=ae,de&&(z[te]=Ee?function(Ne,Ke,Xe){Xe!=Mc&&de(Ne,Ke,Xe)}:de)}x.defineOption=ne,x.Init=Mc,ne("value","",function(te,ae){return te.setValue(ae)},!0),ne("mode",null,function(te,ae){te.doc.modeOption=ae,cu(te)},!0),ne("indentUnit",2,cu,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Uc(te),Ki(te),ga(te)},!0),ne("lineSeparator",null,function(te,ae){if(te.doc.lineSep=ae,!!ae){var de=[],Ee=te.doc.first;te.doc.iter(function(Ke){for(var Xe=0;;){var Nt=Ke.text.indexOf(ae,Xe);if(Nt==-1)break;Xe=Nt+ae.length,de.push(Vn(Ee,Nt))}Ee++});for(var Ne=de.length-1;Ne>=0;Ne--)La(te.doc,ae,de[Ne],Vn(de[Ne].line,de[Ne].ch+ae.length))}}),ne("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(te,ae,de){te.state.specialChars=new RegExp(ae.source+(ae.test(" ")?"":"| "),"g"),de!=Mc&&te.refresh()}),ne("specialCharPlaceholder",Ve,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",qe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ne("spellcheck",!1,function(te,ae){return te.getInputField().spellcheck=ae},!0),ne("autocorrect",!1,function(te,ae){return te.getInputField().autocorrect=ae},!0),ne("autocapitalize",!1,function(te,ae){return te.getInputField().autocapitalize=ae},!0),ne("rtlMoveVisually",!Dt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){od(te),jc(te)},!0),ne("keyMap","default",function(te,ae,de){var Ee=Es(ae),Ne=de!=Mc&&Es(de);Ne&&Ne.detach&&Ne.detach(te,Ee),Ee.attach&&Ee.attach(te,Ne||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,$u,!0),ne("gutters",[],function(te,ae){te.display.gutterSpecs=Lu(ae,te.options.lineNumbers),jc(te)},!0),ne("fixedGutter",!0,function(te,ae){te.display.gutters.style.left=ae?Js(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return zl(te)},!0),ne("scrollbarStyle","native",function(te){Dc(te),zl(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ae){te.display.gutterSpecs=Lu(te.options.gutters,ae),jc(te)},!0),ne("firstLineNumber",1,jc,!0),ne("lineNumberFormatter",function(te){return te},jc,!0),ne("showCursorWhenSelecting",!1,ml,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ae){ae=="nocursor"&&(rl(te),te.display.input.blur()),te.display.input.readOnlyChanged(ae)}),ne("screenReaderLabel",null,function(te,ae){ae=ae===""?null:ae,te.display.input.screenReaderLabelChanged(ae)}),ne("disableInput",!1,function(te,ae){ae||te.display.input.reset()},!0),ne("dragDrop",!0,sd),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,ml,!0),ne("singleCursorHeightPerLine",!0,ml,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Uc,!0),ne("addModeClass",!1,Uc,!0),ne("pollInterval",100),ne("undoDepth",200,function(te,ae){return te.doc.history.undoDepth=ae}),ne("historyEventDelay",1250),ne("viewportMargin",10,function(te){return te.refresh()},!0),ne("maxHighlightLength",1e4,Uc,!0),ne("moveInputWithCursor",!0,function(te,ae){ae||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ae){return te.display.input.getField().tabIndex=ae||""}),ne("autofocus",null),ne("direction","ltr",function(te,ae){return te.doc.setDirection(ae)},!0),ne("phrases",null)}function sd(x,z,ne){var te=ne&&ne!=Mc;if(!z!=!te){var ae=x.display.dragFunctions,de=z?Xt:Yn;de(x.display.scroller,"dragstart",ae.start),de(x.display.scroller,"dragenter",ae.enter),de(x.display.scroller,"dragover",ae.over),de(x.display.scroller,"dragleave",ae.leave),de(x.display.scroller,"drop",ae.drop)}}function $u(x){x.options.lineWrapping?(gn(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(He(x.display.wrapper,"CodeMirror-wrap"),Gt(x)),ds(x),ga(x),Ki(x),setTimeout(function(){return zl(x)},100)}function $a(x,z){var ne=this;if(!(this instanceof $a))return new $a(x,z);this.options=z=z?Yt(z):{},Yt(Dd,z,!1);var te=z.value;typeof te=="string"?te=new pi(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ae=new $a.inputStyles[z.inputStyle](this),de=this.display=new nf(x,te,ae,z);de.wrapper.CodeMirror=this,od(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Dc(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 Ie,keySeq:null,specialChars:null},z.autofocus&&!qe&&de.input.focus(),ye&&_e<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),Pd(this),Fl(),tc(this),this.curOp.forceUpdate=!0,uu(this,te),z.autofocus&&!qe||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&Yo(ne)},20):rl(this);for(var Ee in gu)gu.hasOwnProperty(Ee)&&gu[Ee](this,z[Ee],Mc);_u(this),z.finishInit&&z.finishInit(this);for(var Ne=0;Ne<Bu.length;++Ne)Bu[Ne](this);nc(this),ce&&z.lineWrapping&&getComputedStyle(de.lineDiv).textRendering=="optimizelegibility"&&(de.lineDiv.style.textRendering="auto")}$a.defaults=Dd,$a.optionHandlers=gu;function Pd(x){var z=x.display;Xt(z.scroller,"mousedown",Ho(x,Vs)),ye&&_e<11?Xt(z.scroller,"dblclick",Ho(x,function(Ke){if(!cr(x,Ke)){var Xe=zs(x,Ke);if(!(!Xe||bl(x,Ke)||Oi(x.display,Ke))){Ar(Ke);var Nt=x.findWordAt(Xe);Xn(x.doc,Nt.anchor,Nt.head)}}})):Xt(z.scroller,"dblclick",function(Ke){return cr(x,Ke)||Ar(Ke)}),Xt(z.scroller,"contextmenu",function(Ke){return pc(x,Ke)}),Xt(z.input.getField(),"contextmenu",function(Ke){z.scroller.contains(Ke.target)||pc(x,Ke)});var ne,te={end:0};function ae(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function de(Ke){if(Ke.touches.length!=1)return!1;var Xe=Ke.touches[0];return Xe.radiusX<=1&&Xe.radiusY<=1}function Ee(Ke,Xe){if(Xe.left==null)return!0;var Nt=Xe.left-Ke.left,Vt=Xe.top-Ke.top;return Nt*Nt+Vt*Vt>20*20}Xt(z.scroller,"touchstart",function(Ke){if(!cr(x,Ke)&&!de(Ke)&&!bl(x,Ke)){z.input.ensurePolled(),clearTimeout(ne);var Xe=+new Date;z.activeTouch={start:Xe,moved:!1,prev:Xe-te.end<=300?te:null},Ke.touches.length==1&&(z.activeTouch.left=Ke.touches[0].pageX,z.activeTouch.top=Ke.touches[0].pageY)}}),Xt(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),Xt(z.scroller,"touchend",function(Ke){var Xe=z.activeTouch;if(Xe&&!Oi(z,Ke)&&Xe.left!=null&&!Xe.moved&&new Date-Xe.start<300){var Nt=x.coordsChar(z.activeTouch,"page"),Vt;!Xe.prev||Ee(Xe,Xe.prev)?Vt=new Go(Nt,Nt):!Xe.prev.prev||Ee(Xe,Xe.prev.prev)?Vt=x.findWordAt(Nt):Vt=new Go(Vn(Nt.line,0),Kr(x.doc,Vn(Nt.line+1,0))),x.setSelection(Vt.anchor,Vt.head),x.focus(),Ar(Ke)}ae()}),Xt(z.scroller,"touchcancel",ae),Xt(z.scroller,"scroll",function(){z.scroller.clientHeight&&(wo(x,z.scroller.scrollTop),Ss(x,z.scroller.scrollLeft,!0),Rn(x,"scroll",x))}),Xt(z.scroller,"mousewheel",function(Ke){return Qu(x,Ke)}),Xt(z.scroller,"DOMMouseScroll",function(Ke){return Qu(x,Ke)}),Xt(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Ke){cr(x,Ke)||fi(Ke)},over:function(Ke){cr(x,Ke)||(ol(x,Ke),fi(Ke))},start:function(Ke){return xo(x,Ke)},drop:Ho(x,Lo),leave:function(Ke){cr(x,Ke)||Ts(x)}};var Ne=z.input.getField();Xt(Ne,"keyup",function(Ke){return _l.call(x,Ke)}),Xt(Ne,"keydown",Ho(x,Us)),Xt(Ne,"keypress",Ho(x,lc)),Xt(Ne,"focus",function(Ke){return Yo(x,Ke)}),Xt(Ne,"blur",function(Ke){return rl(x,Ke)})}var Bu=[];$a.defineInitHook=function(x){return Bu.push(x)};function Yl(x,z,ne,te){var ae=x.doc,de;ne==null&&(ne="add"),ne=="smart"&&(ae.mode.indent?de=_a(x,z).state:ne="prev");var Ee=x.options.tabSize,Ne=wn(ae,z),Ke=Qe(Ne.text,null,Ee);Ne.stateAfter&&(Ne.stateAfter=null);var Xe=Ne.text.match(/^\s*/)[0],Nt;if(!te&&!/\S/.test(Ne.text))Nt=0,ne="not";else if(ne=="smart"&&(Nt=ae.mode.indent(de,Ne.text.slice(Xe.length),Ne.text),Nt==mn||Nt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ae.first?Nt=Qe(wn(ae,z-1).text,null,Ee):Nt=0:ne=="add"?Nt=Ke+x.options.indentUnit:ne=="subtract"?Nt=Ke-x.options.indentUnit:typeof ne=="number"&&(Nt=Ke+ne),Nt=Math.max(0,Nt);var Vt="",Wn=0;if(x.options.indentWithTabs)for(var On=Math.floor(Nt/Ee);On;--On)Wn+=Ee,Vt+=" ";if(Wn<Nt&&(Vt+=rn(Nt-Wn)),Vt!=Xe)return La(ae,Vt,Vn(z,0),Vn(z,Xe.length),"+input"),Ne.stateAfter=null,!0;for(var Er=0;Er<ae.sel.ranges.length;Er++){var $r=ae.sel.ranges[Er];if($r.head.line==z&&$r.head.ch<Xe.length){var ai=Vn(z,Xe.length);gr(ae,Er,new Go(ai,ai));break}}}var ac=null;function mc(x){ac=x}function vu(x,z,ne,te,ae){var de=x.doc;x.display.shift=!1,te||(te=de.sel);var Ee=+new Date-200,Ne=ae=="paste"||x.state.pasteIncoming>Ee,Ke=Lt(z),Xe=null;if(Ne&&te.ranges.length>1)if(ac&&ac.text.join(`
|
|
|
`)==z){if(te.ranges.length%ac.text.length==0){Xe=[];for(var Nt=0;Nt<ac.text.length;Nt++)Xe.push(de.splitLines(ac.text[Nt]))}}else Ke.length==te.ranges.length&&x.options.pasteLinesPerSelection&&(Xe=zn(Ke,function(Mi){return[Mi]}));for(var Vt=x.curOp.updateInput,Wn=te.ranges.length-1;Wn>=0;Wn--){var On=te.ranges[Wn],Er=On.from(),$r=On.to();On.empty()&&(ne&&ne>0?Er=Vn(Er.line,Er.ch-ne):x.state.overwrite&&!Ne?$r=Vn($r.line,Math.min(wn(de,$r.line).text.length,$r.ch+ln(Ke).length)):Ne&&ac&&ac.lineWise&&ac.text.join(`
|
|
|
`)==Ke.join(`
|
|
|
`)&&(Er=$r=Vn(Er.line,0)));var ai={from:Er,to:$r,text:Xe?Xe[Wn%Xe.length]:Ke,origin:ae||(Ne?"paste":x.state.cutIncoming>Ee?"cut":"+input")};Ai(x.doc,ai),fr(x,"inputRead",x,ai)}z&&!Ne&&yu(x,z),il(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Vt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function Fu(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&oo(z,function(){return vu(z,ne,0,null,"paste")}),!0}function yu(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ae=ne.ranges[te];if(!(ae.head.ch>100||te&&ne.ranges[te-1].head.line==ae.head.line)){var de=x.getModeAt(ae.head),Ee=!1;if(de.electricChars){for(var Ne=0;Ne<de.electricChars.length;Ne++)if(z.indexOf(de.electricChars.charAt(Ne))>-1){Ee=Yl(x,ae.head.line,"smart");break}}else de.electricInput&&de.electricInput.test(wn(x.doc,ae.head.line).text.slice(0,ae.head.ch))&&(Ee=Yl(x,ae.head.line,"smart"));Ee&&fr(x,"electricInput",x,ae.head.line)}}}function Bc(x){for(var z=[],ne=[],te=0;te<x.doc.sel.ranges.length;te++){var ae=x.doc.sel.ranges[te].head.line,de={anchor:Vn(ae,0),head:Vn(ae+1,0)};ne.push(de),z.push(x.getRange(de.anchor,de.head))}return{text:z,ranges:ne}}function Od(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function $o(){var x=mt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=mt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ce?x.style.width="1000px":x.setAttribute("wrap","off"),dt&&(x.style.border="1px solid black"),Od(x),z}function as(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ae){var de=this.options,Ee=de[te];de[te]==ae&&te!="mode"||(de[te]=ae,z.hasOwnProperty(te)&&Ho(this,z[te])(this,ae,Ee),Rn(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ae){this.state.keyMaps[ae?"push":"unshift"](Es(te))},removeKeyMap:function(te){for(var ae=this.state.keyMaps,de=0;de<ae.length;++de)if(ae[de]==te||ae[de].name==te)return ae.splice(de,1),!0},addOverlay:zo(function(te,ae){var de=te.token?te:x.getMode(this.options,te);if(de.startState)throw new Error("Overlays may not be stateful.");_n(this.state.overlays,{mode:de,modeSpec:te,opaque:ae&&ae.opaque,priority:ae&&ae.priority||0},function(Ee){return Ee.priority}),this.state.modeGen++,ga(this)}),removeOverlay:zo(function(te){for(var ae=this.state.overlays,de=0;de<ae.length;++de){var Ee=ae[de].modeSpec;if(Ee==te||typeof te=="string"&&Ee.name==te){ae.splice(de,1),this.state.modeGen++,ga(this);return}}}),indentLine:zo(function(te,ae,de){typeof ae!="string"&&typeof ae!="number"&&(ae==null?ae=this.options.smartIndent?"smart":"prev":ae=ae?"add":"subtract"),Dr(this.doc,te)&&Yl(this,te,ae,de)}),indentSelection:zo(function(te){for(var ae=this.doc.sel.ranges,de=-1,Ee=0;Ee<ae.length;Ee++){var Ne=ae[Ee];if(Ne.empty())Ne.head.line>de&&(Yl(this,Ne.head.line,te,!0),de=Ne.head.line,Ee==this.doc.sel.primIndex&&il(this));else{var Ke=Ne.from(),Xe=Ne.to(),Nt=Math.max(de,Ke.line);de=Math.min(this.lastLine(),Xe.line-(Xe.ch?0:1))+1;for(var Vt=Nt;Vt<de;++Vt)Yl(this,Vt,te);var Wn=this.doc.sel.ranges;Ke.ch==0&&ae.length==Wn.length&&Wn[Ee].from().ch>0&&gr(this.doc,Ee,new Go(Ke,Wn[Ee].to()),pt)}}}),getTokenAt:function(te,ae){return po(this,te,ae)},getLineTokens:function(te,ae){return po(this,Vn(te),ae,!0)},getTokenTypeAt:function(te){te=Kr(this.doc,te);var ae=Ha(this,wn(this.doc,te.line)),de=0,Ee=(ae.length-1)/2,Ne=te.ch,Ke;if(Ne==0)Ke=ae[2];else for(;;){var Xe=de+Ee>>1;if((Xe?ae[Xe*2-1]:0)>=Ne)Ee=Xe;else if(ae[Xe*2+1]<Ne)de=Xe+1;else{Ke=ae[Xe*2+2];break}}var Nt=Ke?Ke.indexOf("overlay "):-1;return Nt<0?Ke:Nt==0?null:Ke.slice(0,Nt-1)},getModeAt:function(te){var ae=this.doc.mode;return ae.innerMode?x.innerMode(ae,this.getTokenAt(te).state).mode:ae},getHelper:function(te,ae){return this.getHelpers(te,ae)[0]},getHelpers:function(te,ae){var de=[];if(!ne.hasOwnProperty(ae))return de;var Ee=ne[ae],Ne=this.getModeAt(te);if(typeof Ne[ae]=="string")Ee[Ne[ae]]&&de.push(Ee[Ne[ae]]);else if(Ne[ae])for(var Ke=0;Ke<Ne[ae].length;Ke++){var Xe=Ee[Ne[ae][Ke]];Xe&&de.push(Xe)}else Ne.helperType&&Ee[Ne.helperType]?de.push(Ee[Ne.helperType]):Ee[Ne.name]&&de.push(Ee[Ne.name]);for(var Nt=0;Nt<Ee._global.length;Nt++){var Vt=Ee._global[Nt];Vt.pred(Ne,this)&&Ot(de,Vt.val)==-1&&de.push(Vt.val)}return de},getStateAfter:function(te,ae){var de=this.doc;return te=ra(de,te==null?de.first+de.size-1:te),_a(this,te+1,ae).state},cursorCoords:function(te,ae){var de,Ee=this.doc.sel.primary();return te==null?de=Ee.head:typeof te=="object"?de=Kr(this.doc,te):de=te?Ee.from():Ee.to(),io(this,de,ae||"page")},charCoords:function(te,ae){return Xo(this,Kr(this.doc,te),ae||"page")},coordsChar:function(te,ae){return te=Mo(this,te,ae||"page"),rs(this,te.left,te.top)},lineAtHeight:function(te,ae){return te=Mo(this,{top:te,left:0},ae||"page").top,Lr(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ae,de){var Ee=!1,Ne;if(typeof te=="number"){var Ke=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Ke&&(te=Ke,Ee=!0),Ne=wn(this.doc,te)}else Ne=te;return yo(this,Ne,{top:0,left:0},ae||"page",de||Ee).top+(Ee?this.doc.height-cn(Ne):0)},defaultTextHeight:function(){return jo(this.display)},defaultCharWidth:function(){return us(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ae,de,Ee,Ne){var Ke=this.display;te=io(this,Kr(this.doc,te));var Xe=te.bottom,Nt=te.left;if(ae.style.position="absolute",ae.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ae),Ke.sizer.appendChild(ae),Ee=="over")Xe=te.top;else if(Ee=="above"||Ee=="near"){var Vt=Math.max(Ke.wrapper.clientHeight,this.doc.height),Wn=Math.max(Ke.sizer.clientWidth,Ke.lineSpace.clientWidth);(Ee=="above"||te.bottom+ae.offsetHeight>Vt)&&te.top>ae.offsetHeight?Xe=te.top-ae.offsetHeight:te.bottom+ae.offsetHeight<=Vt&&(Xe=te.bottom),Nt+ae.offsetWidth>Wn&&(Nt=Wn-ae.offsetWidth)}ae.style.top=Xe+"px",ae.style.left=ae.style.right="",Ne=="right"?(Nt=Ke.sizer.clientWidth-ae.offsetWidth,ae.style.right="0px"):(Ne=="left"?Nt=0:Ne=="middle"&&(Nt=(Ke.sizer.clientWidth-ae.offsetWidth)/2),ae.style.left=Nt+"px"),de&&Sc(this,{left:Nt,top:Xe,right:Nt+ae.offsetWidth,bottom:Xe+ae.offsetHeight})},triggerOnKeyDown:zo(Us),triggerOnKeyPress:zo(lc),triggerOnKeyUp:_l,triggerOnMouseDown:zo(Vs),execCommand:function(te){if(ms.hasOwnProperty(te))return ms[te].call(null,this)},triggerElectric:zo(function(te){yu(this,te)}),findPosH:function(te,ae,de,Ee){var Ne=1;ae<0&&(Ne=-1,ae=-ae);for(var Ke=Kr(this.doc,te),Xe=0;Xe<ae&&(Ke=Ol(this.doc,Ke,Ne,de,Ee),!Ke.hitSide);++Xe);return Ke},moveH:zo(function(te,ae){var de=this;this.extendSelectionsBy(function(Ee){return de.display.shift||de.doc.extend||Ee.empty()?Ol(de.doc,Ee.head,te,ae,de.options.rtlMoveVisually):te<0?Ee.from():Ee.to()},Qt)}),deleteH:zo(function(te,ae){var de=this.doc.sel,Ee=this.doc;de.somethingSelected()?Ee.replaceSelection("",null,"+delete"):kl(this,function(Ne){var Ke=Ol(Ee,Ne.head,te,ae,!1);return te<0?{from:Ke,to:Ne.head}:{from:Ne.head,to:Ke}})}),findPosV:function(te,ae,de,Ee){var Ne=1,Ke=Ee;ae<0&&(Ne=-1,ae=-ae);for(var Xe=Kr(this.doc,te),Nt=0;Nt<ae;++Nt){var Vt=io(this,Xe,"div");if(Ke==null?Ke=Vt.left:Vt.left=Ke,Xe=gc(this,Vt,Ne,de),Xe.hitSide)break}return Xe},moveV:zo(function(te,ae){var de=this,Ee=this.doc,Ne=[],Ke=!this.display.shift&&!Ee.extend&&Ee.sel.somethingSelected();if(Ee.extendSelectionsBy(function(Nt){if(Ke)return te<0?Nt.from():Nt.to();var Vt=io(de,Nt.head,"div");Nt.goalColumn!=null&&(Vt.left=Nt.goalColumn),Ne.push(Vt.left);var Wn=gc(de,Vt,te,ae);return ae=="page"&&Nt==Ee.sel.primary()&&Cl(de,Xo(de,Wn,"div").top-Vt.top),Wn},Qt),Ne.length)for(var Xe=0;Xe<Ee.sel.ranges.length;Xe++)Ee.sel.ranges[Xe].goalColumn=Ne[Xe]}),findWordAt:function(te){var ae=this.doc,de=wn(ae,te.line).text,Ee=te.ch,Ne=te.ch;if(de){var Ke=this.getHelper(te,"wordChars");(te.sticky=="before"||Ne==de.length)&&Ee?--Ee:++Ne;for(var Xe=de.charAt(Ee),Nt=pe(Xe,Ke)?function(Vt){return pe(Vt,Ke)}:/\s/.test(Xe)?function(Vt){return/\s/.test(Vt)}:function(Vt){return!/\s/.test(Vt)&&!pe(Vt)};Ee>0&&Nt(de.charAt(Ee-1));)--Ee;for(;Ne<de.length&&Nt(de.charAt(Ne));)++Ne}return new Go(Vn(te.line,Ee),Vn(te.line,Ne))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?gn(this.display.cursorDiv,"CodeMirror-overwrite"):He(this.display.cursorDiv,"CodeMirror-overwrite"),Rn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==yt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:zo(function(te,ae){ql(this,te,ae)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-wi(this)-this.display.barHeight,width:te.scrollWidth-wi(this)-this.display.barWidth,clientHeight:Wi(this),clientWidth:ci(this)}},scrollIntoView:zo(function(te,ae){te==null?(te={from:this.doc.sel.primary().head,to:null},ae==null&&(ae=this.options.cursorScrollMargin)):typeof te=="number"?te={from:Vn(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ae||0,te.from.line!=null?dl(this,te):is(this,te.from,te.to,te.margin)}),setSize:zo(function(te,ae){var de=this,Ee=function(Ke){return typeof Ke=="number"||/^\d+$/.test(String(Ke))?Ke+"px":Ke};te!=null&&(this.display.wrapper.style.width=Ee(te)),ae!=null&&(this.display.wrapper.style.height=Ee(ae)),this.options.lineWrapping&&Ta(this);var Ne=this.display.viewFrom;this.doc.iter(Ne,this.display.viewTo,function(Ke){if(Ke.widgets){for(var Xe=0;Xe<Ke.widgets.length;Xe++)if(Ke.widgets[Xe].noHScroll){so(de,Ne,"widget");break}}++Ne}),this.curOp.forceUpdate=!0,Rn(this,"refresh",this)}),operation:function(te){return oo(this,te)},startOperation:function(){return tc(this)},endOperation:function(){return nc(this)},refresh:zo(function(){var te=this.display.cachedTextHeight;ga(this),this.curOp.forceUpdate=!0,Ki(this),ql(this,this.doc.scrollLeft,this.doc.scrollTop),ku(this.display),(te==null||Math.abs(te-jo(this.display))>.5||this.options.lineWrapping)&&ds(this),Rn(this,"refresh",this)}),swapDoc:zo(function(te){var ae=this.doc;return ae.cm=null,this.state.selectingText&&this.state.selectingText(),uu(this,te),Ki(this),this.display.input.reset(),ql(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,fr(this,"swapDoc",this,ae),ae}),phrase:function(te){var ae=this.options.phrases;return ae&&Object.prototype.hasOwnProperty.call(ae,te)?ae[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}},kr(x),x.registerHelper=function(te,ae,de){ne.hasOwnProperty(te)||(ne[te]=x[te]={_global:[]}),ne[te][ae]=de},x.registerGlobalHelper=function(te,ae,de,Ee){x.registerHelper(te,ae,Ee),ne[te]._global.push({pred:de,val:Ee})}}function Ol(x,z,ne,te,ae){var de=z,Ee=ne,Ne=wn(x,z.line),Ke=ae&&x.direction=="rtl"?-ne:ne;function Xe(){var Fi=z.line+Ke;return Fi<x.first||Fi>=x.first+x.size?!1:(z=new Vn(Fi,z.ch,z.sticky),Ne=wn(x,Fi))}function Nt(Fi){var bi;if(te=="codepoint"){var Hi=Ne.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(Hi)?bi=null:bi=new Vn(z.line,Math.max(0,Math.min(Ne.text.length,z.ch+ne*(Hi>=55296&&Hi<56320?2:1))),-ne)}else ae?bi=ks(x.cm,Ne,z,ne):bi=Zs(Ne,z,ne);if(bi==null)if(!Fi&&Xe())z=js(ae,x.cm,Ne,z.line,Ke);else return!1;else z=bi;return!0}if(te=="char"||te=="codepoint")Nt();else if(te=="column")Nt(!0);else if(te=="word"||te=="group")for(var Vt=null,Wn=te=="group",On=x.cm&&x.cm.getHelper(z,"wordChars"),Er=!0;!(ne<0&&!Nt(!Er));Er=!1){var $r=Ne.text.charAt(z.ch)||`
|
|
|
`,ai=pe($r,On)?"w":Wn&&$r==`
|
|
|
`?"n":!Wn||/\s/.test($r)?null:"p";if(Wn&&!Er&&!ai&&(ai="s"),Vt&&Vt!=ai){ne<0&&(ne=1,Nt(),z.sticky="after");break}if(ai&&(Vt=ai),ne>0&&!Nt(!Er))break}var Mi=Ni(x,z,de,Ee,!0);return Ui(de,Mi)&&(Mi.hitSide=!0),Mi}function gc(x,z,ne,te){var ae=x.doc,de=z.left,Ee;if(te=="page"){var Ne=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ke=Math.max(Ne-.5*jo(x.display),3);Ee=(ne>0?z.bottom:z.top)+ne*Ke}else te=="line"&&(Ee=ne>0?z.bottom+3:z.top-3);for(var Xe;Xe=rs(x,de,Ee),!!Xe.outside;){if(ne<0?Ee<=0:Ee>=ae.height){Xe.hitSide=!0;break}Ee+=ne*5}return Xe}var Bo=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ie,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Bo.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ae=ne.div=x.lineDiv;Od(ae,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function de(Ne){for(var Ke=Ne.target;Ke;Ke=Ke.parentNode){if(Ke==ae)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ke.className))break}return!1}Xt(ae,"paste",function(Ne){!de(Ne)||cr(te,Ne)||Fu(Ne,te)||_e<=11&&setTimeout(Ho(te,function(){return z.updateFromDOM()}),20)}),Xt(ae,"compositionstart",function(Ne){z.composing={data:Ne.data,done:!1}}),Xt(ae,"compositionupdate",function(Ne){z.composing||(z.composing={data:Ne.data,done:!1})}),Xt(ae,"compositionend",function(Ne){z.composing&&(Ne.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),Xt(ae,"touchstart",function(){return ne.forceCompositionEnd()}),Xt(ae,"input",function(){z.composing||z.readFromDOMSoon()});function Ee(Ne){if(!(!de(Ne)||cr(te,Ne))){if(te.somethingSelected())mc({lineWise:!1,text:te.getSelections()}),Ne.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Ke=Bc(te);mc({lineWise:!0,text:Ke.text}),Ne.type=="cut"&&te.operation(function(){te.setSelections(Ke.ranges,0,pt),te.replaceSelection("",null,"cut")})}else return;if(Ne.clipboardData){Ne.clipboardData.clearData();var Xe=ac.text.join(`
|
|
|
`);if(Ne.clipboardData.setData("Text",Xe),Ne.clipboardData.getData("Text")==Xe){Ne.preventDefault();return}}var Nt=$o(),Vt=Nt.firstChild;te.display.lineSpace.insertBefore(Nt,te.display.lineSpace.firstChild),Vt.value=ac.text.join(`
|
|
|
`);var Wn=document.activeElement;Mt(Vt),setTimeout(function(){te.display.lineSpace.removeChild(Nt),Wn.focus(),Wn==ae&&ne.showPrimarySelection()},50)}}Xt(ae,"copy",Ee),Xt(ae,"cut",Ee)},Bo.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Bo.prototype.prepareSelection=function(){var x=Sl(this.cm,!1);return x.focus=document.activeElement==this.div,x},Bo.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bo.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,ne=z.doc.sel.primary(),te=ne.from(),ae=ne.to();if(z.display.viewTo==z.display.viewFrom||te.line>=z.display.viewTo||ae.line<z.display.viewFrom){x.removeAllRanges();return}var de=Gc(z,x.anchorNode,x.anchorOffset),Ee=Gc(z,x.focusNode,x.focusOffset);if(!(de&&!de.bad&&Ee&&!Ee.bad&&br(vi(de,Ee),te)==0&&br(Wr(de,Ee),ae)==0)){var Ne=z.display.view,Ke=te.line>=z.display.viewFrom&&ld(z,te)||{node:Ne[0].measure.map[2],offset:0},Xe=ae.line<z.display.viewTo&&ld(z,ae);if(!Xe){var Nt=Ne[Ne.length-1].measure,Vt=Nt.maps?Nt.maps[Nt.maps.length-1]:Nt.map;Xe={node:Vt[Vt.length-1],offset:Vt[Vt.length-2]-Vt[Vt.length-3]}}if(!Ke||!Xe){x.removeAllRanges();return}var Wn=x.rangeCount&&x.getRangeAt(0),On;try{On=$e(Ke.node,Ke.offset,Xe.offset,Xe.node)}catch(Er){}On&&(!fe&&z.state.focused?(x.collapse(Ke.node,Ke.offset),On.collapsed||(x.removeAllRanges(),x.addRange(On))):(x.removeAllRanges(),x.addRange(On)),Wn&&x.anchorNode==null?x.addRange(Wn):fe&&this.startGracePeriod()),this.rememberSelection()}},Bo.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)},Bo.prototype.showMultipleSelections=function(x){xt(this.cm.display.cursorDiv,x.cursors),xt(this.cm.display.selectionDiv,x.selection)},Bo.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Bo.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Ft(this.div,z)},Bo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bo.prototype.blur=function(){this.div.blur()},Bo.prototype.getField=function(){return this.div},Bo.prototype.supportsTouch=function(){return!0},Bo.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():oo(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)},Bo.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Bo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(ct&&ge&&this.cm.display.gutterSpecs.length&&cd(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Gc(z,x.anchorNode,x.anchorOffset),te=Gc(z,x.focusNode,x.focusOffset);ne&&te&&oo(z,function(){_r(z.doc,ic(ne,te),pt),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},Bo.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(),ae=ne.to();if(te.ch==0&&te.line>x.firstLine()&&(te=Vn(te.line-1,wn(x.doc,te.line-1).length)),ae.ch==wn(x.doc,ae.line).text.length&&ae.line<x.lastLine()&&(ae=Vn(ae.line+1,0)),te.line<z.viewFrom||ae.line>z.viewTo-1)return!1;var de,Ee,Ne;te.line==z.viewFrom||(de=za(x,te.line))==0?(Ee=yr(z.view[0].line),Ne=z.view[0].node):(Ee=yr(z.view[de].line),Ne=z.view[de-1].node.nextSibling);var Ke=za(x,ae.line),Xe,Nt;if(Ke==z.view.length-1?(Xe=z.viewTo-1,Nt=z.lineDiv.lastChild):(Xe=yr(z.view[Ke+1].line)-1,Nt=z.view[Ke+1].node.previousSibling),!Ne)return!1;for(var Vt=x.doc.splitLines(ud(x,Ne,Nt,Ee,Xe)),Wn=rr(x.doc,Vn(Ee,0),Vn(Xe,wn(x.doc,Xe).text.length));Vt.length>1&&Wn.length>1;)if(ln(Vt)==ln(Wn))Vt.pop(),Wn.pop(),Xe--;else if(Vt[0]==Wn[0])Vt.shift(),Wn.shift(),Ee++;else break;for(var On=0,Er=0,$r=Vt[0],ai=Wn[0],Mi=Math.min($r.length,ai.length);On<Mi&&$r.charCodeAt(On)==ai.charCodeAt(On);)++On;for(var Fi=ln(Vt),bi=ln(Wn),Hi=Math.min(Fi.length-(Vt.length==1?On:0),bi.length-(Wn.length==1?On:0));Er<Hi&&Fi.charCodeAt(Fi.length-Er-1)==bi.charCodeAt(bi.length-Er-1);)++Er;if(Vt.length==1&&Wn.length==1&&Ee==te.line)for(;On&&On>te.ch&&Fi.charCodeAt(Fi.length-Er-1)==bi.charCodeAt(bi.length-Er-1);)On--,Er++;Vt[Vt.length-1]=Fi.slice(0,Fi.length-Er).replace(/^\u200b+/,""),Vt[0]=Vt[0].slice(On).replace(/\u200b+$/,"");var wa=Vn(Ee,On),ka=Vn(Xe,Wn.length?ln(Wn).length-Er:0);if(Vt.length>1||Vt[0]||br(wa,ka))return La(x.doc,Vt,wa,ka,"+input"),!0},Bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bo.prototype.reset=function(){this.forceCompositionEnd()},Bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bo.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))},Bo.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&oo(this.cm,function(){return ga(x.cm)})},Bo.prototype.setUneditable=function(x){x.contentEditable="false"},Bo.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||Ho(this.cm,vu)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Bo.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Bo.prototype.onContextMenu=function(){},Bo.prototype.resetPosition=function(){},Bo.prototype.needsContentAttribute=!0;function ld(x,z){var ne=Ba(x,z.line);if(!ne||ne.hidden)return null;var te=wn(x.doc,z.line),ae=go(ne,te,z.line),de=It(te,x.doc.direction),Ee="left";if(de){var Ne=dn(de,z.ch);Ee=Ne%2?"right":"left"}var Ke=la(ae.map,z.ch,Ee);return Ke.offset=Ke.collapse=="right"?Ke.end:Ke.start,Ke}function cd(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function kc(x,z){return z&&(x.bad=!0),x}function ud(x,z,ne,te,ae){var de="",Ee=!1,Ne=x.doc.lineSeparator(),Ke=!1;function Xe(On){return function(Er){return Er.id==On}}function Nt(){Ee&&(de+=Ne,Ke&&(de+=Ne),Ee=Ke=!1)}function Vt(On){On&&(Nt(),de+=On)}function Wn(On){if(On.nodeType==1){var Er=On.getAttribute("cm-text");if(Er){Vt(Er);return}var $r=On.getAttribute("cm-marker"),ai;if($r){var Mi=x.findMarks(Vn(te,0),Vn(ae+1,0),Xe(+$r));Mi.length&&(ai=Mi[0].find(0))&&Vt(rr(x.doc,ai.from,ai.to).join(Ne));return}if(On.getAttribute("contenteditable")=="false")return;var Fi=/^(pre|div|p|li|table|br)$/i.test(On.nodeName);if(!/^br$/i.test(On.nodeName)&&On.textContent.length==0)return;Fi&&Nt();for(var bi=0;bi<On.childNodes.length;bi++)Wn(On.childNodes[bi]);/^(pre|p)$/i.test(On.nodeName)&&(Ke=!0),Fi&&(Ee=!0)}else On.nodeType==3&&Vt(On.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Wn(z),z!=ne;)z=z.nextSibling,Ke=!1;return de}function Gc(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return kc(x.clipPos(Vn(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 ae=0;ae<x.display.view.length;ae++){var de=x.display.view[ae];if(de.node==te)return dh(de,z,ne)}}function dh(x,z,ne){var te=x.text.firstChild,ae=!1;if(!z||!Ft(te,z))return kc(Vn(yr(x.line),0),!0);if(z==te&&(ae=!0,z=te.childNodes[ne],ne=0,!z)){var de=x.rest?ln(x.rest):x.line;return kc(Vn(yr(de),de.text.length),ae)}var Ee=z.nodeType==3?z:null,Ne=z;for(!Ee&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(Ee=z.firstChild,ne&&(ne=Ee.nodeValue.length));Ne.parentNode!=te;)Ne=Ne.parentNode;var Ke=x.measure,Xe=Ke.maps;function Nt(ai,Mi,Fi){for(var bi=-1;bi<(Xe?Xe.length:0);bi++)for(var Hi=bi<0?Ke.map:Xe[bi],wa=0;wa<Hi.length;wa+=3){var ka=Hi[wa+2];if(ka==ai||ka==Mi){var Co=yr(bi<0?x.line:x.rest[bi]),vs=Hi[wa]+Fi;return(Fi<0||ka!=ai)&&(vs=Hi[wa+(Fi?1:0)]),Vn(Co,vs)}}}var Vt=Nt(Ee,Ne,ne);if(Vt)return kc(Vt,ae);for(var Wn=Ne.nextSibling,On=Ee?Ee.nodeValue.length-ne:0;Wn;Wn=Wn.nextSibling){if(Vt=Nt(Wn,Wn.firstChild,0),Vt)return kc(Vn(Vt.line,Vt.ch-On),ae);On+=Wn.textContent.length}for(var Er=Ne.previousSibling,$r=ne;Er;Er=Er.previousSibling){if(Vt=Nt(Er,Er.firstChild,-1),Vt)return kc(Vn(Vt.line,Vt.ch+$r),ae);$r+=Er.textContent.length}}var gs=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ie,this.hasSelection=!1,this.composing=null};gs.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ae=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),dt&&(ae.style.width="0px"),Xt(ae,"input",function(){ye&&_e>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),Xt(ae,"paste",function(Ee){cr(te,Ee)||Fu(Ee,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function de(Ee){if(!cr(te,Ee)){if(te.somethingSelected())mc({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var Ne=Bc(te);mc({lineWise:!0,text:Ne.text}),Ee.type=="cut"?te.setSelections(Ne.ranges,null,pt):(ne.prevInput="",ae.value=Ne.text.join(`
|
|
|
`),Mt(ae))}else return;Ee.type=="cut"&&(te.state.cutIncoming=+new Date)}}Xt(ae,"cut",de),Xt(ae,"copy",de),Xt(x.scroller,"paste",function(Ee){if(!(Oi(x,Ee)||cr(te,Ee))){if(!ae.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var Ne=new Event("paste");Ne.clipboardData=Ee.clipboardData,ae.dispatchEvent(Ne)}}),Xt(x.lineSpace,"selectstart",function(Ee){Oi(x,Ee)||Ar(Ee)}),Xt(ae,"compositionstart",function(){var Ee=te.getCursor("from");ne.composing&&ne.composing.range.clear(),ne.composing={start:Ee,range:te.markText(Ee,te.getCursor("to"),{className:"CodeMirror-composing"})}}),Xt(ae,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},gs.prototype.createField=function(x){this.wrapper=$o(),this.textarea=this.wrapper.firstChild},gs.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},gs.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=Sl(x);if(x.options.moveInputWithCursor){var ae=io(x,ne.sel.primary().head,"div"),de=z.wrapper.getBoundingClientRect(),Ee=z.lineDiv.getBoundingClientRect();te.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,ae.top+Ee.top-de.top)),te.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,ae.left+Ee.left-de.left))}return te},gs.prototype.showSelection=function(x){var z=this.cm,ne=z.display;xt(ne.cursorDiv,x.cursors),xt(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},gs.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&&Mt(this.textarea),ye&&_e>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ye&&_e>=9&&(this.hasSelection=null))}},gs.prototype.getField=function(){return this.textarea},gs.prototype.supportsTouch=function(){return!1},gs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!qe||yt()!=this.textarea))try{this.textarea.focus()}catch(x){}},gs.prototype.blur=function(){this.textarea.blur()},gs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},gs.prototype.receivedFocus=function(){this.slowPoll()},gs.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},gs.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)},gs.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||Kn(ne)&&!te&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var ae=ne.value;if(ae==te&&!z.somethingSelected())return!1;if(ye&&_e>=9&&this.hasSelection===ae||be&&/[\uf700-\uf7ff]/.test(ae))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var de=ae.charCodeAt(0);if(de==8203&&!te&&(te="\u200B"),de==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ee=0,Ne=Math.min(te.length,ae.length);Ee<Ne&&te.charCodeAt(Ee)==ae.charCodeAt(Ee);)++Ee;return oo(z,function(){vu(z,ae.slice(Ee),te.length-Ee,null,x.composing?"*compose":null),ae.length>1e3||ae.indexOf(`
|
|
|
`)>-1?ne.value=x.prevInput="":x.prevInput=ae,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},gs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},gs.prototype.onKeyPress=function(){ye&&_e>=9&&(this.hasSelection=null),this.fastPoll()},gs.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ae=z.textarea;z.contextMenuPending&&z.contextMenuPending();var de=zs(ne,x),Ee=te.scroller.scrollTop;if(!de||Ae)return;var Ne=ne.options.resetSelectionOnContextMenu;Ne&&ne.doc.sel.contains(de)==-1&&Ho(ne,_r)(ne.doc,ic(de),pt);var Ke=ae.style.cssText,Xe=z.wrapper.style.cssText,Nt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ae.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-Nt.top-5)+"px; left: "+(x.clientX-Nt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ye?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Vt;ce&&(Vt=window.scrollY),te.input.focus(),ce&&window.scrollTo(null,Vt),te.input.reset(),ne.somethingSelected()||(ae.value=z.prevInput=" "),z.contextMenuPending=On,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function Wn(){if(ae.selectionStart!=null){var $r=ne.somethingSelected(),ai="\u200B"+($r?ae.value:"");ae.value="\u21DA",ae.value=ai,z.prevInput=$r?"":"\u200B",ae.selectionStart=1,ae.selectionEnd=ai.length,te.selForContextMenu=ne.doc.sel}}function On(){if(z.contextMenuPending==On&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Xe,ae.style.cssText=Ke,ye&&_e<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=Ee),ae.selectionStart!=null)){(!ye||ye&&_e<9)&&Wn();var $r=0,ai=function(){te.selForContextMenu==ne.doc.sel&&ae.selectionStart==0&&ae.selectionEnd>0&&z.prevInput=="\u200B"?Ho(ne,Oa)(ne):$r++<10?te.detectingSelectAll=setTimeout(ai,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout(ai,200)}}if(ye&&_e>=9&&Wn(),Ce){fi(x);var Er=function(){Yn(window,"mouseup",Er),setTimeout(On,20)};Xt(window,"mouseup",Er)}else setTimeout(On,50)},gs.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},gs.prototype.setUneditable=function(){},gs.prototype.needsContentAttribute=!1;function bu(x,z){if(z=z?Yt(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=yt();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=Ne.getValue()}var ae;if(x.form&&(Xt(x.form,"submit",te),!z.leaveSubmitMethodAlone)){var de=x.form;ae=de.submit;try{var Ee=de.submit=function(){te(),de.submit=ae,de.submit(),de.submit=Ee}}catch(Ke){}}z.finishInit=function(Ke){Ke.save=te,Ke.getTextArea=function(){return x},Ke.toTextArea=function(){Ke.toTextArea=isNaN,te(),x.parentNode.removeChild(Ke.getWrapperElement()),x.style.display="",x.form&&(Yn(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ae))}},x.style.display="none";var Ne=$a(function(Ke){return x.parentNode.insertBefore(Ke,x.nextSibling)},z);return Ne}function zu(x){x.off=Yn,x.on=Xt,x.wheelEventPixels=Ld,x.Doc=pi,x.splitLines=Lt,x.countColumn=Qe,x.findColumn=Zn,x.isWordChar=ve,x.Pass=mn,x.signal=Rn,x.Line=kn,x.changeEnd=wc,x.scrollbarModel=fc,x.Pos=Vn,x.cmpPos=br,x.modes=Sr,x.mimeModes=mr,x.resolveMode=Et,x.getMode=zt,x.modeExtensions=fn,x.extendMode=at,x.copyState=Rt,x.startState=tn,x.innerMode=on,x.commands=ms,x.keyMap=Za,x.keyName=Ml,x.isModifierKey=Hs,x.lookupKey=As,x.normalizeKeyMap=to,x.StringStream=Mn,x.SharedTextMarker=Aa,x.TextMarker=Wo,x.LineWidget=ts,x.e_preventDefault=Ar,x.e_stopPropagation=gi,x.e_stop=fi,x.addClass=gn,x.contains=Ft,x.rmClass=He,x.keyNames=yl}Ru($a),as($a);var Fc="iter insert remove copy getEditor constructor".split(" ");for(var uc in pi.prototype)pi.prototype.hasOwnProperty(uc)&&Ot(Fc,uc)<0&&($a.prototype[uc]=function(x){return function(){return x.apply(this.doc,arguments)}}(pi.prototype[uc]));return kr(pi),$a.inputStyles={textarea:gs,contenteditable:Bo},$a.defineMode=function(x){!$a.defaults.mode&&x!="null"&&($a.defaults.mode=x),Qn.apply(this,arguments)},$a.defineMIME=ht,$a.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),$a.defineMIME("text/plain","null"),$a.defineExtension=function(x,z){$a.prototype[x]=z},$a.defineDocExtension=function(x,z){pi.prototype[x]=z},$a.fromTextArea=bu,zu($a),$a.version="5.58.2",$a})},49047:function(Ln,Kt,ie){(function(fe){fe(ie(4631),ie(29589),ie(52539))})(function(fe){"use strict";fe.defineMode("markdown",function(Te,Re){var Ge=fe.getMode(Te,"text/html"),ye=Ge.name=="null";function _e(Qe){if(fe.findModeByName){var Ie=fe.findModeByName(Qe);Ie&&(Qe=Ie.mime||Ie.mimes[0])}var Ot=fe.getMode(Te,Qe);return Ot.name=="null"?null:Ot}Re.highlightFormatting===void 0&&(Re.highlightFormatting=!1),Re.maxBlockquoteDepth===void 0&&(Re.maxBlockquoteDepth=0),Re.taskLists===void 0&&(Re.taskLists=!1),Re.strikethrough===void 0&&(Re.strikethrough=!1),Re.emoji===void 0&&(Re.emoji=!1),Re.fencedCodeBlockHighlighting===void 0&&(Re.fencedCodeBlockHighlighting=!0),Re.fencedCodeBlockDefaultMode===void 0&&(Re.fencedCodeBlockDefaultMode="text/plain"),Re.xml===void 0&&(Re.xml=!0),Re.tokenTypeOverrides===void 0&&(Re.tokenTypeOverrides={});var ce={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 ke in ce)ce.hasOwnProperty(ke)&&Re.tokenTypeOverrides[ke]&&(ce[ke]=Re.tokenTypeOverrides[ke]);var ge=/^([*\-_])(?:\s*\1){2,}\s*$/,Ae=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,lt=/^\[(x| )\](?=\s)/i,ze=Re.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,st=/^ {0,3}(?:\={1,}|-{2,})\s*$/,dt=/^[^#!\[\]*_\\<>` "'(~:]+/,ct=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,qe=/^\s*\[[^\]]+?\]:.*$/,be=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,vt=" ";function Dt(Qe,Ie,Ot){return Ie.f=Ie.inline=Ot,Ot(Qe,Ie)}function it(Qe,Ie,Ot){return Ie.f=Ie.block=Ot,Ot(Qe,Ie)}function ot(Qe){return!Qe||!/\S/.test(Qe.string)}function Ce(Qe){if(Qe.linkTitle=!1,Qe.linkHref=!1,Qe.linkText=!1,Qe.em=!1,Qe.strong=!1,Qe.strikethrough=!1,Qe.quote=0,Qe.indentedCode=!1,Qe.f==He){var Ie=ye;if(!Ie){var Ot=fe.innerMode(Ge,Qe.htmlState);Ie=Ot.mode.name=="xml"&&Ot.state.tagStart===null&&!Ot.state.context&&Ot.state.tokenize.isInText}Ie&&(Qe.f=ut,Qe.block=Se,Qe.htmlState=null)}return Qe.trailingSpace=0,Qe.trailingSpaceNewLine=!1,Qe.prevLine=Qe.thisLine,Qe.thisLine={stream:null},null}function Se(Qe,Ie){var Ot=Qe.column()===Ie.indentation,In=ot(Ie.prevLine.stream),mn=Ie.indentedCode,pt=Ie.prevLine.hr,wt=Ie.list!==!1,Qt=(Ie.listStack[Ie.listStack.length-1]||0)+3;Ie.indentedCode=!1;var Zn=Ie.indentation;if(Ie.indentationDiff===null&&(Ie.indentationDiff=Ie.indentation,wt)){for(Ie.list=null;Zn<Ie.listStack[Ie.listStack.length-1];)Ie.listStack.pop(),Ie.listStack.length?Ie.indentation=Ie.listStack[Ie.listStack.length-1]:Ie.list=!1;Ie.list!==!1&&(Ie.indentationDiff=Zn-Ie.listStack[Ie.listStack.length-1])}var Cn=!In&&!pt&&!Ie.prevLine.header&&(!wt||!mn)&&!Ie.prevLine.fencedCodeEnd,rn=(Ie.list===!1||pt||In)&&Ie.indentation<=Qt&&Qe.match(ge),ln=null;if(Ie.indentationDiff>=4&&(mn||Ie.prevLine.fencedCodeEnd||Ie.prevLine.header||In))return Qe.skipToEnd(),Ie.indentedCode=!0,ce.code;if(Qe.eatSpace())return null;if(Ot&&Ie.indentation<=Qt&&(ln=Qe.match(ze))&&ln[1].length<=6)return Ie.quote=0,Ie.header=ln[1].length,Ie.thisLine.header=!0,Re.highlightFormatting&&(Ie.formatting="header"),Ie.f=Ie.inline,xt(Ie);if(Ie.indentation<=Qt&&Qe.eat(">"))return Ie.quote=Ot?1:Ie.quote+1,Re.highlightFormatting&&(Ie.formatting="quote"),Qe.eatSpace(),xt(Ie);if(!rn&&!Ie.setext&&Ot&&Ie.indentation<=Qt&&(ln=Qe.match(Ae))){var zn=ln[1]?"ol":"ul";return Ie.indentation=Zn+Qe.current().length,Ie.list=!0,Ie.quote=0,Ie.listStack.push(Ie.indentation),Ie.em=!1,Ie.strong=!1,Ie.code=!1,Ie.strikethrough=!1,Re.taskLists&&Qe.match(lt,!1)&&(Ie.taskList=!0),Ie.f=Ie.inline,Re.highlightFormatting&&(Ie.formatting=["list","list-"+zn]),xt(Ie)}else{if(Ot&&Ie.indentation<=Qt&&(ln=Qe.match(ct,!0)))return Ie.quote=0,Ie.fencedEndRE=new RegExp(ln[1]+"+ *$"),Ie.localMode=Re.fencedCodeBlockHighlighting&&_e(ln[2]||Re.fencedCodeBlockDefaultMode),Ie.localMode&&(Ie.localState=fe.startState(Ie.localMode)),Ie.f=Ie.block=Ue,Re.highlightFormatting&&(Ie.formatting="code-block"),Ie.code=-1,xt(Ie);if(Ie.setext||(!Cn||!wt)&&!Ie.quote&&Ie.list===!1&&!Ie.code&&!rn&&!qe.test(Qe.string)&&(ln=Qe.lookAhead(1))&&(ln=ln.match(st)))return Ie.setext?(Ie.header=Ie.setext,Ie.setext=0,Qe.skipToEnd(),Re.highlightFormatting&&(Ie.formatting="header")):(Ie.header=ln[0].charAt(0)=="="?1:2,Ie.setext=Ie.header),Ie.thisLine.header=!0,Ie.f=Ie.inline,xt(Ie);if(rn)return Qe.skipToEnd(),Ie.hr=!0,Ie.thisLine.hr=!0,ce.hr;if(Qe.peek()==="[")return Dt(Qe,Ie,rt)}return Dt(Qe,Ie,Ie.inline)}function He(Qe,Ie){var Ot=Ge.token(Qe,Ie.htmlState);if(!ye){var In=fe.innerMode(Ge,Ie.htmlState);(In.mode.name=="xml"&&In.state.tagStart===null&&!In.state.context&&In.state.tokenize.isInText||Ie.md_inside&&Qe.current().indexOf(">")>-1)&&(Ie.f=ut,Ie.block=Se,Ie.htmlState=null)}return Ot}function Ue(Qe,Ie){var Ot=Ie.listStack[Ie.listStack.length-1]||0,In=Ie.indentation<Ot,mn=Ot+3;if(Ie.fencedEndRE&&Ie.indentation<=mn&&(In||Qe.match(Ie.fencedEndRE))){Re.highlightFormatting&&(Ie.formatting="code-block");var pt;return In||(pt=xt(Ie)),Ie.localMode=Ie.localState=null,Ie.block=Se,Ie.f=ut,Ie.fencedEndRE=null,Ie.code=0,Ie.thisLine.fencedCodeEnd=!0,In?it(Qe,Ie,Ie.block):pt}else return Ie.localMode?Ie.localMode.token(Qe,Ie.localState):(Qe.skipToEnd(),ce.code)}function xt(Qe){var Ie=[];if(Qe.formatting){Ie.push(ce.formatting),typeof Qe.formatting=="string"&&(Qe.formatting=[Qe.formatting]);for(var Ot=0;Ot<Qe.formatting.length;Ot++)Ie.push(ce.formatting+"-"+Qe.formatting[Ot]),Qe.formatting[Ot]==="header"&&Ie.push(ce.formatting+"-"+Qe.formatting[Ot]+"-"+Qe.header),Qe.formatting[Ot]==="quote"&&(!Re.maxBlockquoteDepth||Re.maxBlockquoteDepth>=Qe.quote?Ie.push(ce.formatting+"-"+Qe.formatting[Ot]+"-"+Qe.quote):Ie.push("error"))}if(Qe.taskOpen)return Ie.push("meta"),Ie.length?Ie.join(" "):null;if(Qe.taskClosed)return Ie.push("property"),Ie.length?Ie.join(" "):null;if(Qe.linkHref?Ie.push(ce.linkHref,"url"):(Qe.strong&&Ie.push(ce.strong),Qe.em&&Ie.push(ce.em),Qe.strikethrough&&Ie.push(ce.strikethrough),Qe.emoji&&Ie.push(ce.emoji),Qe.linkText&&Ie.push(ce.linkText),Qe.code&&Ie.push(ce.code),Qe.image&&Ie.push(ce.image),Qe.imageAltText&&Ie.push(ce.imageAltText,"link"),Qe.imageMarker&&Ie.push(ce.imageMarker)),Qe.header&&Ie.push(ce.header,ce.header+"-"+Qe.header),Qe.quote&&(Ie.push(ce.quote),!Re.maxBlockquoteDepth||Re.maxBlockquoteDepth>=Qe.quote?Ie.push(ce.quote+"-"+Qe.quote):Ie.push(ce.quote+"-"+Re.maxBlockquoteDepth)),Qe.list!==!1){var In=(Qe.listStack.length-1)%3;In?In===1?Ie.push(ce.list2):Ie.push(ce.list3):Ie.push(ce.list1)}return Qe.trailingSpaceNewLine?Ie.push("trailing-space-new-line"):Qe.trailingSpace&&Ie.push("trailing-space-"+(Qe.trailingSpace%2?"a":"b")),Ie.length?Ie.join(" "):null}function mt(Qe,Ie){if(Qe.match(dt,!0))return xt(Ie)}function ut(Qe,Ie){var Ot=Ie.text(Qe,Ie);if(typeof Ot!="undefined")return Ot;if(Ie.list)return Ie.list=null,xt(Ie);if(Ie.taskList){var In=Qe.match(lt,!0)[1]===" ";return In?Ie.taskOpen=!0:Ie.taskClosed=!0,Re.highlightFormatting&&(Ie.formatting="task"),Ie.taskList=!1,xt(Ie)}if(Ie.taskOpen=!1,Ie.taskClosed=!1,Ie.header&&Qe.match(/^#+$/,!0))return Re.highlightFormatting&&(Ie.formatting="header"),xt(Ie);var mn=Qe.next();if(Ie.linkTitle){Ie.linkTitle=!1;var pt=mn;mn==="("&&(pt=")"),pt=(pt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var wt="^\\s*(?:[^"+pt+"\\\\]+|\\\\\\\\|\\\\.)"+pt;if(Qe.match(new RegExp(wt),!0))return ce.linkHref}if(mn==="`"){var Qt=Ie.formatting;Re.highlightFormatting&&(Ie.formatting="code"),Qe.eatWhile("`");var Zn=Qe.current().length;if(Ie.code==0&&(!Ie.quote||Zn==1))return Ie.code=Zn,xt(Ie);if(Zn==Ie.code){var Cn=xt(Ie);return Ie.code=0,Cn}else return Ie.formatting=Qt,xt(Ie)}else if(Ie.code)return xt(Ie);if(mn==="\\"&&(Qe.next(),Re.highlightFormatting)){var rn=xt(Ie),ln=ce.formatting+"-escape";return rn?rn+" "+ln:ln}if(mn==="!"&&Qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ie.imageMarker=!0,Ie.image=!0,Re.highlightFormatting&&(Ie.formatting="image"),xt(Ie);if(mn==="["&&Ie.imageMarker&&Qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ie.imageMarker=!1,Ie.imageAltText=!0,Re.highlightFormatting&&(Ie.formatting="image"),xt(Ie);if(mn==="]"&&Ie.imageAltText){Re.highlightFormatting&&(Ie.formatting="image");var rn=xt(Ie);return Ie.imageAltText=!1,Ie.image=!1,Ie.inline=Ie.f=Ft,rn}if(mn==="["&&!Ie.image)return Ie.linkText&&Qe.match(/^.*?\]/)||(Ie.linkText=!0,Re.highlightFormatting&&(Ie.formatting="link")),xt(Ie);if(mn==="]"&&Ie.linkText){Re.highlightFormatting&&(Ie.formatting="link");var rn=xt(Ie);return Ie.linkText=!1,Ie.inline=Ie.f=Qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ft:ut,rn}if(mn==="<"&&Qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ie.f=Ie.inline=$e,Re.highlightFormatting&&(Ie.formatting="link");var rn=xt(Ie);return rn?rn+=" ":rn="",rn+ce.linkInline}if(mn==="<"&&Qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ie.f=Ie.inline=$e,Re.highlightFormatting&&(Ie.formatting="link");var rn=xt(Ie);return rn?rn+=" ":rn="",rn+ce.linkEmail}if(Re.xml&&mn==="<"&&Qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var zn=Qe.string.indexOf(">",Qe.pos);if(zn!=-1){var _n=Qe.string.substring(Qe.start,zn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_n)&&(Ie.md_inside=!0)}return Qe.backUp(1),Ie.htmlState=fe.startState(Ge),it(Qe,Ie,He)}if(Re.xml&&mn==="<"&&Qe.match(/^\/\w*?>/))return Ie.md_inside=!1,"tag";if(mn==="*"||mn==="_"){for(var Oe=1,ue=Qe.pos==1?" ":Qe.string.charAt(Qe.pos-2);Oe<3&&Qe.eat(mn);)Oe++;var le=Qe.peek()||" ",ve=!/\s/.test(le)&&(!be.test(le)||/\s/.test(ue)||be.test(ue)),pe=!/\s/.test(ue)&&(!be.test(ue)||/\s/.test(le)||be.test(le)),se=null,Be=null;if(Oe%2&&(!Ie.em&&ve&&(mn==="*"||!pe||be.test(ue))?se=!0:Ie.em==mn&&pe&&(mn==="*"||!ve||be.test(le))&&(se=!1)),Oe>1&&(!Ie.strong&&ve&&(mn==="*"||!pe||be.test(ue))?Be=!0:Ie.strong==mn&&pe&&(mn==="*"||!ve||be.test(le))&&(Be=!1)),Be!=null||se!=null){Re.highlightFormatting&&(Ie.formatting=se==null?"strong":Be==null?"em":"strong em"),se===!0&&(Ie.em=mn),Be===!0&&(Ie.strong=mn);var Cn=xt(Ie);return se===!1&&(Ie.em=!1),Be===!1&&(Ie.strong=!1),Cn}}else if(mn===" "&&(Qe.eat("*")||Qe.eat("_"))){if(Qe.peek()===" ")return xt(Ie);Qe.backUp(1)}if(Re.strikethrough){if(mn==="~"&&Qe.eatWhile(mn)){if(Ie.strikethrough){Re.highlightFormatting&&(Ie.formatting="strikethrough");var Cn=xt(Ie);return Ie.strikethrough=!1,Cn}else if(Qe.match(/^[^\s]/,!1))return Ie.strikethrough=!0,Re.highlightFormatting&&(Ie.formatting="strikethrough"),xt(Ie)}else if(mn===" "&&Qe.match(/^~~/,!0)){if(Qe.peek()===" ")return xt(Ie);Qe.backUp(2)}}if(Re.emoji&&mn===":"&&Qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ie.emoji=!0,Re.highlightFormatting&&(Ie.formatting="emoji");var ft=xt(Ie);return Ie.emoji=!1,ft}return mn===" "&&(Qe.match(/^ +$/,!1)?Ie.trailingSpace++:Ie.trailingSpace&&(Ie.trailingSpaceNewLine=!0)),xt(Ie)}function $e(Qe,Ie){var Ot=Qe.next();if(Ot===">"){Ie.f=Ie.inline=ut,Re.highlightFormatting&&(Ie.formatting="link");var In=xt(Ie);return In?In+=" ":In="",In+ce.linkInline}return Qe.match(/^[^>]+/,!0),ce.linkInline}function Ft(Qe,Ie){if(Qe.eatSpace())return null;var Ot=Qe.next();return Ot==="("||Ot==="["?(Ie.f=Ie.inline=gn(Ot==="("?")":"]"),Re.highlightFormatting&&(Ie.formatting="link-string"),Ie.linkHref=!0,xt(Ie)):"error"}var yt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function gn(Qe){return function(Ie,Ot){var In=Ie.next();if(In===Qe){Ot.f=Ot.inline=ut,Re.highlightFormatting&&(Ot.formatting="link-string");var mn=xt(Ot);return Ot.linkHref=!1,mn}return Ie.match(yt[Qe]),Ot.linkHref=!0,xt(Ot)}}function rt(Qe,Ie){return Qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ie.f=Mt,Qe.next(),Re.highlightFormatting&&(Ie.formatting="link"),Ie.linkText=!0,xt(Ie)):Dt(Qe,Ie,ut)}function Mt(Qe,Ie){if(Qe.match(/^\]:/,!0)){Ie.f=Ie.inline=en,Re.highlightFormatting&&(Ie.formatting="link");var Ot=xt(Ie);return Ie.linkText=!1,Ot}return Qe.match(/^([^\]\\]|\\.)+/,!0),ce.linkText}function en(Qe,Ie){return Qe.eatSpace()?null:(Qe.match(/^[^\s]+/,!0),Qe.peek()===void 0?Ie.linkTitle=!0:Qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ie.f=Ie.inline=ut,ce.linkHref+" url")}var Yt={startState:function(){return{f:Se,prevLine:{stream:null},thisLine:{stream:null},block:Se,htmlState:null,indentation:0,inline:ut,text:mt,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(Qe){return{f:Qe.f,prevLine:Qe.prevLine,thisLine:Qe.thisLine,block:Qe.block,htmlState:Qe.htmlState&&fe.copyState(Ge,Qe.htmlState),indentation:Qe.indentation,localMode:Qe.localMode,localState:Qe.localMode?fe.copyState(Qe.localMode,Qe.localState):null,inline:Qe.inline,text:Qe.text,formatting:!1,linkText:Qe.linkText,linkTitle:Qe.linkTitle,linkHref:Qe.linkHref,code:Qe.code,em:Qe.em,strong:Qe.strong,strikethrough:Qe.strikethrough,emoji:Qe.emoji,header:Qe.header,setext:Qe.setext,hr:Qe.hr,taskList:Qe.taskList,list:Qe.list,listStack:Qe.listStack.slice(0),quote:Qe.quote,indentedCode:Qe.indentedCode,trailingSpace:Qe.trailingSpace,trailingSpaceNewLine:Qe.trailingSpaceNewLine,md_inside:Qe.md_inside,fencedEndRE:Qe.fencedEndRE}},token:function(Qe,Ie){if(Ie.formatting=!1,Qe!=Ie.thisLine.stream){if(Ie.header=0,Ie.hr=!1,Qe.match(/^\s*$/,!0))return Ce(Ie),null;if(Ie.prevLine=Ie.thisLine,Ie.thisLine={stream:Qe},Ie.taskList=!1,Ie.trailingSpace=0,Ie.trailingSpaceNewLine=!1,!Ie.localState&&(Ie.f=Ie.block,Ie.f!=He)){var Ot=Qe.match(/^\s*/,!0)[0].replace(/\t/g,vt).length;if(Ie.indentation=Ot,Ie.indentationDiff=null,Ot>0)return null}}return Ie.f(Qe,Ie)},innerMode:function(Qe){return Qe.block==He?{state:Qe.htmlState,mode:Ge}:Qe.localState?{state:Qe.localState,mode:Qe.localMode}:{state:Qe,mode:Yt}},indent:function(Qe,Ie,Ot){return Qe.block==He&&Ge.indent?Ge.indent(Qe.htmlState,Ie,Ot):Qe.localState&&Qe.localMode.indent?Qe.localMode.indent(Qe.localState,Ie,Ot):fe.Pass},blankLine:Ce,getType:xt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Yt},"xml"),fe.defineMIME("text/markdown","markdown"),fe.defineMIME("text/x-markdown","markdown")})},52539:function(Ln,Kt,ie){(function(fe){fe(ie(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 Te=0;Te<fe.modeInfo.length;Te++){var Re=fe.modeInfo[Te];Re.mimes&&(Re.mime=Re.mimes[0])}fe.findModeByMIME=function(Ge){Ge=Ge.toLowerCase();for(var ye=0;ye<fe.modeInfo.length;ye++){var _e=fe.modeInfo[ye];if(_e.mime==Ge)return _e;if(_e.mimes){for(var ce=0;ce<_e.mimes.length;ce++)if(_e.mimes[ce]==Ge)return _e}}if(/\+xml$/.test(Ge))return fe.findModeByMIME("application/xml");if(/\+json$/.test(Ge))return fe.findModeByMIME("application/json")},fe.findModeByExtension=function(Ge){Ge=Ge.toLowerCase();for(var ye=0;ye<fe.modeInfo.length;ye++){var _e=fe.modeInfo[ye];if(_e.ext){for(var ce=0;ce<_e.ext.length;ce++)if(_e.ext[ce]==Ge)return _e}}},fe.findModeByFileName=function(Ge){for(var ye=0;ye<fe.modeInfo.length;ye++){var _e=fe.modeInfo[ye];if(_e.file&&_e.file.test(Ge))return _e}var ce=Ge.lastIndexOf("."),ke=ce>-1&&Ge.substring(ce+1,Ge.length);if(ke)return fe.findModeByExtension(ke)},fe.findModeByName=function(Ge){Ge=Ge.toLowerCase();for(var ye=0;ye<fe.modeInfo.length;ye++){var _e=fe.modeInfo[ye];if(_e.name.toLowerCase()==Ge)return _e;if(_e.alias){for(var ce=0;ce<_e.alias.length;ce++)if(_e.alias[ce].toLowerCase()==Ge)return _e}}}})},80785:function(Ln,Kt,ie){(function(fe){fe(ie(4631))})(function(fe){"use strict";fe.defineMode("stex",function(Te,Re){"use strict";function Ge(dt,ct){dt.cmdState.push(ct)}function ye(dt){return dt.cmdState.length>0?dt.cmdState[dt.cmdState.length-1]:null}function _e(dt){var ct=dt.cmdState.pop();ct&&ct.closeBracket()}function ce(dt){for(var ct=dt.cmdState,qe=ct.length-1;qe>=0;qe--){var be=ct[qe];if(be.name!="DEFAULT")return be}return{styleIdentifier:function(){return null}}}function ke(dt,ct,qe){return function(){this.name=dt,this.bracketNo=0,this.style=ct,this.styles=qe,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=ke("importmodule","tag",["string","builtin"]),ge.documentclass=ke("documentclass","tag",["","atom"]),ge.usepackage=ke("usepackage","tag",["atom"]),ge.begin=ke("begin","tag",["atom"]),ge.end=ke("end","tag",["atom"]),ge.label=ke("label","tag",["atom"]),ge.ref=ke("ref","tag",["atom"]),ge.eqref=ke("eqref","tag",["atom"]),ge.cite=ke("cite","tag",["atom"]),ge.bibitem=ke("bibitem","tag",["atom"]),ge.Bibitem=ke("Bibitem","tag",["atom"]),ge.RBibitem=ke("RBibitem","tag",["atom"]),ge.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ae(dt,ct){dt.f=ct}function lt(dt,ct){var qe;if(dt.match(/^\\[a-zA-Z@]+/)){var be=dt.current().slice(1);return qe=ge.hasOwnProperty(be)?ge[be]:ge.DEFAULT,qe=new qe,Ge(ct,qe),Ae(ct,st),qe.style}if(dt.match(/^\\[$&%#{}_]/)||dt.match(/^\\[,;!\/\\]/))return"tag";if(dt.match("\\["))return Ae(ct,function(Dt,it){return ze(Dt,it,"\\]")}),"keyword";if(dt.match("\\("))return Ae(ct,function(Dt,it){return ze(Dt,it,"\\)")}),"keyword";if(dt.match("$$"))return Ae(ct,function(Dt,it){return ze(Dt,it,"$$")}),"keyword";if(dt.match("$"))return Ae(ct,function(Dt,it){return ze(Dt,it,"$")}),"keyword";var vt=dt.next();if(vt=="%")return dt.skipToEnd(),"comment";if(vt=="}"||vt=="]"){if(qe=ye(ct),qe)qe.closeBracket(vt),Ae(ct,st);else return"error";return"bracket"}else return vt=="{"||vt=="["?(qe=ge.DEFAULT,qe=new qe,Ge(ct,qe),"bracket"):/\d/.test(vt)?(dt.eatWhile(/[\w.%]/),"atom"):(dt.eatWhile(/[\w\-_]/),qe=ce(ct),qe.name=="begin"&&(qe.argument=dt.current()),qe.styleIdentifier())}function ze(dt,ct,qe){if(dt.eatSpace())return null;if(qe&&dt.match(qe))return Ae(ct,lt),"keyword";if(dt.match(/^\\[a-zA-Z@]+/))return"tag";if(dt.match(/^[a-zA-Z]+/))return"variable-2";if(dt.match(/^\\[$&%#{}_]/)||dt.match(/^\\[,;!\/]/)||dt.match(/^[\^_&]/))return"tag";if(dt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(dt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var be=dt.next();return be=="{"||be=="}"||be=="["||be=="]"||be=="("||be==")"?"bracket":be=="%"?(dt.skipToEnd(),"comment"):"error"}function st(dt,ct){var qe=dt.peek(),be;return qe=="{"||qe=="["?(be=ye(ct),be.openBracket(qe),dt.eat(qe),Ae(ct,lt),"bracket"):/[ \t\r]/.test(qe)?(dt.eat(qe),null):(Ae(ct,lt),_e(ct),lt(dt,ct))}return{startState:function(){var dt=Re.inMathMode?function(ct,qe){return ze(ct,qe)}:lt;return{cmdState:[],f:dt}},copyState:function(dt){return{cmdState:dt.cmdState.slice(),f:dt.f}},token:function(dt,ct){return ct.f(dt,ct)},blankLine:function(dt){dt.f=lt,dt.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},29589:function(Ln,Kt,ie){(function(fe){fe(ie(4631))})(function(fe){"use strict";var Te={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},Re={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(Ge,ye){var _e=Ge.indentUnit,ce={},ke=ye.htmlMode?Te:Re;for(var ge in ke)ce[ge]=ke[ge];for(var ge in ye)ce[ge]=ye[ge];var Ae,lt;function ze($e,Ft){function yt(Mt){return Ft.tokenize=Mt,Mt($e,Ft)}var gn=$e.next();if(gn=="<")return $e.eat("!")?$e.eat("[")?$e.match("CDATA[")?yt(ct("atom","]]>")):null:$e.match("--")?yt(ct("comment","-->")):$e.match("DOCTYPE",!0,!0)?($e.eatWhile(/[\w\._\-]/),yt(qe(1))):null:$e.eat("?")?($e.eatWhile(/[\w\._\-]/),Ft.tokenize=ct("meta","?>"),"meta"):(Ae=$e.eat("/")?"closeTag":"openTag",Ft.tokenize=st,"tag bracket");if(gn=="&"){var rt;return $e.eat("#")?$e.eat("x")?rt=$e.eatWhile(/[a-fA-F\d]/)&&$e.eat(";"):rt=$e.eatWhile(/[\d]/)&&$e.eat(";"):rt=$e.eatWhile(/[\w\.\-:]/)&&$e.eat(";"),rt?"atom":"error"}else return $e.eatWhile(/[^&<]/),null}ze.isInText=!0;function st($e,Ft){var yt=$e.next();if(yt==">"||yt=="/"&&$e.eat(">"))return Ft.tokenize=ze,Ae=yt==">"?"endTag":"selfcloseTag","tag bracket";if(yt=="=")return Ae="equals",null;if(yt=="<"){Ft.tokenize=ze,Ft.state=it,Ft.tagName=Ft.tagStart=null;var gn=Ft.tokenize($e,Ft);return gn?gn+" tag error":"tag error"}else return/[\'\"]/.test(yt)?(Ft.tokenize=dt(yt),Ft.stringStartCol=$e.column(),Ft.tokenize($e,Ft)):($e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function dt($e){var Ft=function(yt,gn){for(;!yt.eol();)if(yt.next()==$e){gn.tokenize=st;break}return"string"};return Ft.isInAttribute=!0,Ft}function ct($e,Ft){return function(yt,gn){for(;!yt.eol();){if(yt.match(Ft)){gn.tokenize=ze;break}yt.next()}return $e}}function qe($e){return function(Ft,yt){for(var gn;(gn=Ft.next())!=null;){if(gn=="<")return yt.tokenize=qe($e+1),yt.tokenize(Ft,yt);if(gn==">")if($e==1){yt.tokenize=ze;break}else return yt.tokenize=qe($e-1),yt.tokenize(Ft,yt)}return"meta"}}function be($e,Ft,yt){this.prev=$e.context,this.tagName=Ft,this.indent=$e.indented,this.startOfLine=yt,(ce.doNotIndent.hasOwnProperty(Ft)||$e.context&&$e.context.noIndent)&&(this.noIndent=!0)}function vt($e){$e.context&&($e.context=$e.context.prev)}function Dt($e,Ft){for(var yt;;){if(!$e.context||(yt=$e.context.tagName,!ce.contextGrabbers.hasOwnProperty(yt)||!ce.contextGrabbers[yt].hasOwnProperty(Ft)))return;vt($e)}}function it($e,Ft,yt){return $e=="openTag"?(yt.tagStart=Ft.column(),ot):$e=="closeTag"?Ce:it}function ot($e,Ft,yt){return $e=="word"?(yt.tagName=Ft.current(),lt="tag",Ue):ce.allowMissingTagName&&$e=="endTag"?(lt="tag bracket",Ue($e,Ft,yt)):(lt="error",ot)}function Ce($e,Ft,yt){if($e=="word"){var gn=Ft.current();return yt.context&&yt.context.tagName!=gn&&ce.implicitlyClosed.hasOwnProperty(yt.context.tagName)&&vt(yt),yt.context&&yt.context.tagName==gn||ce.matchClosing===!1?(lt="tag",Se):(lt="tag error",He)}else return ce.allowMissingTagName&&$e=="endTag"?(lt="tag bracket",Se($e,Ft,yt)):(lt="error",He)}function Se($e,Ft,yt){return $e!="endTag"?(lt="error",Se):(vt(yt),it)}function He($e,Ft,yt){return lt="error",Se($e,Ft,yt)}function Ue($e,Ft,yt){if($e=="word")return lt="attribute",xt;if($e=="endTag"||$e=="selfcloseTag"){var gn=yt.tagName,rt=yt.tagStart;return yt.tagName=yt.tagStart=null,$e=="selfcloseTag"||ce.autoSelfClosers.hasOwnProperty(gn)?Dt(yt,gn):(Dt(yt,gn),yt.context=new be(yt,gn,rt==yt.indented)),it}return lt="error",Ue}function xt($e,Ft,yt){return $e=="equals"?mt:(ce.allowMissing||(lt="error"),Ue($e,Ft,yt))}function mt($e,Ft,yt){return $e=="string"?ut:$e=="word"&&ce.allowUnquoted?(lt="string",Ue):(lt="error",Ue($e,Ft,yt))}function ut($e,Ft,yt){return $e=="string"?ut:Ue($e,Ft,yt)}return{startState:function($e){var Ft={tokenize:ze,state:it,indented:$e||0,tagName:null,tagStart:null,context:null};return $e!=null&&(Ft.baseIndent=$e),Ft},token:function($e,Ft){if(!Ft.tagName&&$e.sol()&&(Ft.indented=$e.indentation()),$e.eatSpace())return null;Ae=null;var yt=Ft.tokenize($e,Ft);return(yt||Ae)&&yt!="comment"&&(lt=null,Ft.state=Ft.state(Ae||yt,$e,Ft),lt&&(yt=lt=="error"?yt+" error":lt)),yt},indent:function($e,Ft,yt){var gn=$e.context;if($e.tokenize.isInAttribute)return $e.tagStart==$e.indented?$e.stringStartCol+1:$e.indented+_e;if(gn&&gn.noIndent)return fe.Pass;if($e.tokenize!=st&&$e.tokenize!=ze)return yt?yt.match(/^(\s*)/)[0].length:0;if($e.tagName)return ce.multilineTagIndentPastTag!==!1?$e.tagStart+$e.tagName.length+2:$e.tagStart+_e*(ce.multilineTagIndentFactor||1);if(ce.alignCDATA&&/<!\[CDATA\[/.test(Ft))return 0;var rt=Ft&&/^<(\/)?([\w_:\.-]*)/.exec(Ft);if(rt&&rt[1])for(;gn;)if(gn.tagName==rt[2]){gn=gn.prev;break}else if(ce.implicitlyClosed.hasOwnProperty(gn.tagName))gn=gn.prev;else break;else if(rt)for(;gn;){var Mt=ce.contextGrabbers[gn.tagName];if(Mt&&Mt.hasOwnProperty(rt[2]))gn=gn.prev;else break}for(;gn&&gn.prev&&!gn.startOfLine;)gn=gn.prev;return gn?gn.indent+_e:$e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ce.htmlMode?"html":"xml",helperType:ce.htmlMode?"html":"xml",skipAttribute:function($e){$e.state==mt&&($e.state=Ue)},xmlCurrentTag:function($e){return $e.tagName?{name:$e.tagName,close:$e.type=="closeTag"}:null},xmlCurrentContext:function($e){for(var Ft=[],yt=$e.context;yt;yt=yt.prev)yt.tagName&&Ft.push(yt.tagName);return Ft.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(Ln,Kt,ie){"use strict";ie.d(Kt,{hP:function(){return _n}});var fe=function(Oe,ue){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ve){le.__proto__=ve}||function(le,ve){for(var pe in ve)Object.prototype.hasOwnProperty.call(ve,pe)&&(le[pe]=ve[pe])})(Oe,ue)};function Te(Oe,ue){function le(){this.constructor=Oe}fe(Oe,ue),Oe.prototype=ue===null?Object.create(ue):(le.prototype=ue.prototype,new le)}function Re(Oe,ue,le,ve){return new(le||(le=Promise))(function(pe,se){function Be(qt){try{Bt(ve.next(qt))}catch(an){se(an)}}function ft(qt){try{Bt(ve.throw(qt))}catch(an){se(an)}}function Bt(qt){var an;qt.done?pe(qt.value):(an=qt.value,an instanceof le?an:new le(function(vn){vn(an)})).then(Be,ft)}Bt((ve=ve.apply(Oe,ue||[])).next())})}function Ge(Oe,ue){var le,ve,pe,se,Be={label:0,sent:function(){if(1&pe[0])throw pe[1];return pe[1]},trys:[],ops:[]};return se={next:ft(0),throw:ft(1),return:ft(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function ft(Bt){return function(qt){return function(an){if(le)throw new TypeError("Generator is already executing.");for(;Be;)try{if(le=1,ve&&(pe=2&an[0]?ve.return:an[0]?ve.throw||((pe=ve.return)&&pe.call(ve),0):ve.next)&&!(pe=pe.call(ve,an[1])).done)return pe;switch(ve=0,pe&&(an=[2&an[0],pe.value]),an[0]){case 0:case 1:pe=an;break;case 4:return Be.label++,{value:an[1],done:!1};case 5:Be.label++,ve=an[1],an=[0];continue;case 7:an=Be.ops.pop(),Be.trys.pop();continue;default:if(pe=Be.trys,!((pe=pe.length>0&&pe[pe.length-1])||an[0]!==6&&an[0]!==2)){Be=0;continue}if(an[0]===3&&(!pe||an[1]>pe[0]&&an[1]<pe[3])){Be.label=an[1];break}if(an[0]===6&&Be.label<pe[1]){Be.label=pe[1],pe=an;break}if(pe&&Be.label<pe[2]){Be.label=pe[2],Be.ops.push(an);break}pe[2]&&Be.ops.pop(),Be.trys.pop();continue}an=ue.call(Oe,Be)}catch(vn){an=[6,vn],ve=0}finally{le=pe=0}if(5&an[0])throw an[1];return{value:an[0]?an[1]:void 0,done:!0}}([Bt,qt])}}}function ye(){for(var Oe=0,ue=0,le=arguments.length;ue<le;ue++)Oe+=arguments[ue].length;var ve=Array(Oe),pe=0;for(ue=0;ue<le;ue++)for(var se=arguments[ue],Be=0,ft=se.length;Be<ft;Be++,pe++)ve[pe]=se[Be];return ve}var _e=function(){function Oe(){}return Oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Oe.setAttributes=function(ue,le){for(var ve=0,pe=le;ve<pe.length;ve++){var se=pe[ve],Be=se[0],ft=se[1];ue.setAttribute(Be,ft)}},Oe.createRect=function(ue,le,ve){var pe=document.createElementNS("http://www.w3.org/2000/svg","rect");return pe.setAttribute("width",ue.toString()),pe.setAttribute("height",le.toString()),ve&&Oe.setAttributes(pe,ve),pe},Oe.createLine=function(ue,le,ve,pe,se){var Be=document.createElementNS("http://www.w3.org/2000/svg","line");return Be.setAttribute("x1",ue.toString()),Be.setAttribute("y1",le.toString()),Be.setAttribute("x2",ve.toString()),Be.setAttribute("y2",pe.toString()),se&&Oe.setAttributes(Be,se),Be},Oe.createPolygon=function(ue,le){var ve=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ve.setAttribute("points",ue),le&&Oe.setAttributes(ve,le),ve},Oe.createCircle=function(ue,le){var ve=document.createElementNS("http://www.w3.org/2000/svg","circle");return ve.setAttribute("cx",(ue/2).toString()),ve.setAttribute("cy",(ue/2).toString()),ve.setAttribute("r",ue.toString()),le&&Oe.setAttributes(ve,le),ve},Oe.createEllipse=function(ue,le,ve){var pe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return pe.setAttribute("cx",(ue/2).toString()),pe.setAttribute("cy",(le/2).toString()),pe.setAttribute("rx",(ue/2).toString()),pe.setAttribute("ry",(le/2).toString()),ve&&Oe.setAttributes(pe,ve),pe},Oe.createGroup=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&Oe.setAttributes(le,ue),le},Oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Oe.createMarker=function(ue,le,ve,pe,se,Be,ft){var Bt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Oe.setAttributes(Bt,[["id",ue],["orient",le],["markerWidth",ve.toString()],["markerHeight",pe.toString()],["refX",se.toString()],["refY",Be.toString()]]),Bt.appendChild(ft),Bt},Oe.createText=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),ue&&Oe.setAttributes(le,ue),le},Oe.createTSpan=function(ue,le){var ve=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ve.textContent=ue,le&&Oe.setAttributes(ve,le),ve},Oe.createImage=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&Oe.setAttributes(le,ue),le},Oe.createPoint=function(ue,le){var ve=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ve.x=ue,ve.y=le,ve},Oe.createPath=function(ue,le){var ve=document.createElementNS("http://www.w3.org/2000/svg","path");return ve.setAttribute("d",ue),le&&Oe.setAttributes(ve,le),ve},Oe}(),ce=function(){function Oe(){}return Oe.addKey=function(ue){Oe.key=ue},Object.defineProperty(Oe,"isLicensed",{get:function(){return!!Oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Oe.key)},enumerable:!1,configurable:!0}),Oe}(),ke=function(){function Oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Oe.prototype.rasterize=function(ue,le,ve){var pe=this;return new Promise(function(se){var Be=ve!==void 0?ve:document.createElement("canvas");ue===null&&(pe.markersOnly=!0,pe.naturalSize=!1);var ft=document.createElementNS("http://www.w3.org/2000/svg","svg");ft.setAttribute("xmlns","http://www.w3.org/2000/svg"),ft.setAttribute("width",le.width.baseVal.valueAsString),ft.setAttribute("height",le.height.baseVal.valueAsString),ft.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),ft.innerHTML=le.innerHTML,pe.naturalSize===!0?(ft.width.baseVal.value=ue.naturalWidth,ft.height.baseVal.value=ue.naturalHeight):pe.width!==void 0&&pe.height!==void 0&&(ft.width.baseVal.value=pe.width,ft.height.baseVal.value=pe.height),Be.width=ft.width.baseVal.value,Be.height=ft.height.baseVal.value;var Bt=ft.outerHTML,qt=Be.getContext("2d");pe.markersOnly!==!0&&qt.drawImage(ue,0,0,Be.width,Be.height);var an=window.URL,vn=new Image(Be.width,Be.height);vn.setAttribute("crossOrigin","anonymous");var dn=new Blob([Bt],{type:"image/svg+xml"}),gt=an.createObjectURL(dn);vn.onload=function(){qt.drawImage(vn,0,0),an.revokeObjectURL(gt);var It=Be.toDataURL(pe.imageType,pe.imageQuality);se(It)},vn.src=gt})},Oe}(),ge=function(){},Ae=function(){function Oe(ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(Oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Oe.prototype.addClass=function(ue){return this.styleSheet===void 0&&this.addStyleSheet(),ue.name=""+this.classNamePrefix+ue.localName,this.classes.push(ue),this.styleSheet.sheet.insertRule("."+ue.name+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length),ue},Oe.prototype.addRule=function(ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ue),this.styleSheet.sheet.insertRule(ue.selector+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length)},Oe.prototype.addStyleSheet=function(){var ue;this.styleSheet=document.createElement("style"),((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).appendChild(this.styleSheet),this.addRule(new lt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new lt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new lt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ze("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ze("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Oe.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Oe}(),lt=function(Oe,ue){this.selector=Oe,this.style=ue},ze=function(Oe,ue){this.localName=Oe,this.style=ue},st=function(){function Oe(ue,le,ve,pe,se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ue,this.displayMode=le,this.markerItems=ve,this.uiStyleSettings=pe,this.styles=se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Oe.prototype.show=function(ue){var le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ve=document.createElement("div");ve.className=this.toolbarBlockStyleClass.name,ve.style.whiteSpace="nowrap",this.uiContainer.appendChild(ve),this.addActionButton(ve,'<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(ve,'<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(ve,'<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(ve,'<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(ve,'<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(ve,'<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(ve,'<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(ve,'<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 Be=document.createElement("div");Be.className=""+le.toolbarButtonStyleClass.name,Be.setAttribute("data-type-name",se.typeName),Be.innerHTML=se.icon,Be.addEventListener("click",function(){le.markerToolbarButtonClicked(Be,se)}),le.buttons.push(Be),le.markerButtons.push(Be)}),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 pe=document.createElement("div");pe.className=this.toolbarBlockStyleClass.name,pe.style.whiteSpace="nowrap",pe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(pe),this.addActionButton(pe,'<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(pe,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Oe.prototype.addButtonClickListener=function(ue){this.buttonClickListeners.push(ue)},Oe.prototype.removeButtonClickListener=function(ue){this.buttonClickListeners.indexOf(ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ue),1)},Oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ue=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<ue||le===ue&&this.markerButtons.length-1===ue?this.markerButtonBlock.appendChild(this.markerButtons[le]):(le===ue&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[le]))}},Oe.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Oe.prototype.resetButtonStyles=function(){var ue=this;this.buttons.forEach(function(le){le.className=le.className.replace(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name,"").trim(),le.className=le.className.replace(ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ue.toolbarActiveButtonStyleColorsClass.name,"").trim(),le.className+=" "+(ue.uiStyleSettings.toolbarButtonStyleColorsClassName?ue.uiStyleSettings.toolbarButtonStyleColorsClassName:ue.toolbarButtonStyleColorsClass.name)})},Oe.prototype.addActionButton=function(ue,le,ve){var pe=this,se=document.createElement("div");switch(se.className=""+this.toolbarButtonStyleClass.name,se.innerHTML=le,se.setAttribute("data-action",ve),se.addEventListener("click",function(){pe.actionToolbarButtonClicked(se,ve)}),ve){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}ue.appendChild(se),this.buttons.push(se)},Oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ze("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 ze("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ze("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ze("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 ze("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ze("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ze("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ze("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new lt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new lt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Oe.prototype.markerToolbarButtonClicked=function(ue,le){this.setActiveButton(ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ve){return ve("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},Oe.prototype.actionToolbarButtonClicked=function(ue,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ve){return ve("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Oe.prototype.setActiveButton=function(ue){this.resetButtonStyles(),ue.className=ue.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ue.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Oe.prototype.setActiveMarkerButton=function(ue){var le=this.markerButtons.find(function(ve){return ve.getAttribute("data-type-name")===ue});le&&this.setActiveButton(le)},Oe.prototype.setCurrentMarker=function(ue){var le=this;this.currentMarker=ue,this.buttons.filter(function(ve){return/delete|notes/.test(ve.getAttribute("data-action"))}).forEach(function(ve){le.currentMarker===void 0?(ve.style.fillOpacity="0.4",ve.style.pointerEvents="none"):(ve.style.fillOpacity="1",ve.style.pointerEvents="all")})},Oe}(),dt=function(){function Oe(ue,le,ve,pe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ue,this.displayMode=le,this.uiStyleSettings=ve,this.styles=pe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Oe.prototype.addStyles=function(){var ue;this.toolboxStyleClass=this.styles.addClass(new ze("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 ze("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ze("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ze("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ze("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 ze("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ue!==void 0?ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ze("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 ze("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ze("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new lt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new lt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Oe.prototype.show=function(ue){var le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ue,this.uiContainer.className=this.toolboxStyleClass.name+" "+((le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&le!==void 0?le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Oe.prototype.setPanelButtons=function(ue){var le,ve,pe=this;this.panels=ue,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+" "+((ve=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ve!==void 0?ve:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Be;se.uiStyleSettings=pe.uiStyleSettings;var ft=document.createElement("div");ft.className=pe.toolboxButtonStyleClass.name+" "+((Be=pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Be!==void 0?Be:pe.toolboxButtonStyleColorsClass.name),ft.innerHTML=se.icon,ft.title=se.title,ft.addEventListener("click",function(){pe.panelButtonClick(se)}),pe.panelButtons.push(ft),pe.buttonRow.appendChild(ft)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Oe.prototype.panelButtonClick=function(ue){var le=this,ve=-1;if(ue!==this.activePanel){ve=this.panels.indexOf(ue),this.panelRow.innerHTML="";var pe=ue.getUi();pe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(pe),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=ue}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,Be){var ft,Bt;se.className=le.toolboxButtonStyleClass.name+" "+(Be===ve?""+((ft=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ft!==void 0?ft:le.toolboxActiveButtonStyleColorsClass.name):""+((Bt=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Bt!==void 0?Bt:le.toolboxButtonStyleColorsClass.name))})},Oe}(),ct=function(Oe,ue){this.title=Oe,this.icon=ue},qe=function(Oe){function ue(le,ve,pe,se){var Be=Oe.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 Be.colors=[],Be.addTransparent=!1,Be.colorBoxes=[],Be.colors=ve,Be.currentColor=pe,Be.setCurrentColor=Be.setCurrentColor.bind(Be),Be.getColorBox=Be.getColorBox.bind(Be),Be}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");return ve.style.overflow="hidden",ve.style.whiteSpace="nowrap",this.colors.forEach(function(pe){var se=le.getColorBox(pe);ve.appendChild(se),le.colorBoxes.push(se)}),ve},ue.prototype.getColorBox=function(le){var ve=this,pe=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-pe,Be=document.createElement("div");Be.style.display="inline-block",Be.style.boxSizing="content-box",Be.style.width=se-2+"px",Be.style.height=se-2+"px",Be.style.padding="1px",Be.style.marginRight="2px",Be.style.marginBottom="2px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderRadius=(se+2)/2+"px",Be.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){ve.setCurrentColor(le,Be)});var ft=document.createElement("div");return ft.style.display="inline-block",ft.style.width=se-2+"px",ft.style.height=se-2+"px",ft.style.backgroundColor=le,ft.style.borderRadius=se/2+"px",le==="transparent"&&(ft.style.fill=this.uiStyleSettings.toolboxAccentColor,ft.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>`),Be.appendChild(ft),Be},ue.prototype.setCurrentColor=function(le,ve){var pe=this;this.currentColor=le,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},ue}(ct),be=function(){function Oe(ue,le,ve){this._state="new",this._isSelected=!1,this._container=ue,this._overlayContainer=le,this.globalSettings=ve,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(ue){return!1},Object.defineProperty(Oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Oe.prototype.pointerDown=function(ue,le){},Oe.prototype.dblClick=function(ue,le){},Oe.prototype.manipulate=function(ue){},Oe.prototype.pointerUp=function(ue){this.stateChanged()},Oe.prototype.dispose=function(){},Oe.prototype.addMarkerVisualToContainer=function(ue){this.container.childNodes.length>0?this.container.insertBefore(ue,this.container.childNodes[0]):this.container.appendChild(ue)},Oe.prototype.getState=function(){return{typeName:Oe.typeName,state:this.state,notes:this.notes}},Oe.prototype.restoreState=function(ue){this._state=ue.state,this.notes=ue.notes},Oe.prototype.scale=function(ue,le){},Oe.prototype.colorChanged=function(ue){this.onColorChanged&&this.onColorChanged(ue),this.stateChanged()},Oe.prototype.fillColorChanged=function(ue){this.onFillColorChanged&&this.onFillColorChanged(ue),this.stateChanged()},Oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ue=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ue.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ue)&&this.onStateChanged(this)}},Oe.typeName="MarkerBase",Oe}(),vt=function(){function Oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Oe.prototype.findGripByVisual=function(ue){return this.topLeft.ownsTarget(ue)?this.topLeft:this.topCenter.ownsTarget(ue)?this.topCenter:this.topRight.ownsTarget(ue)?this.topRight:this.centerLeft.ownsTarget(ue)?this.centerLeft:this.centerRight.ownsTarget(ue)?this.centerRight:this.bottomLeft.ownsTarget(ue)?this.bottomLeft:this.bottomCenter.ownsTarget(ue)?this.bottomCenter:this.bottomRight.ownsTarget(ue)?this.bottomRight:void 0},Oe}(),Dt=function(){function Oe(){this.GRIP_SIZE=10,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Oe.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},Oe}(),it=function(){function Oe(){}return Oe.toITransformMatrix=function(ue){return{a:ue.a,b:ue.b,c:ue.c,d:ue.d,e:ue.e,f:ue.f}},Oe.toSVGMatrix=function(ue,le){return ue.a=le.a,ue.b=le.b,ue.c=le.c,ue.d=le.d,ue.e=le.e,ue.f=le.f,ue},Oe}(),ot=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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(_e.createTransform()),se.setupControlBox(),se}return Te(ue,Oe),Object.defineProperty(ue.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"visual",{get:function(){return this._visual},set:function(le){this._visual=le;var ve=_e.createTransform();this._visual.transform.baseVal.appendItem(ve)},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!!Oe.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),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 pe=this.unrotatePoint(le);if(this.manipulationStartX=pe.x,this.manipulationStartY=pe.y,this.offsetX=pe.x-this.left,this.offsetY=pe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ve),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ve)){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 Be=this.container.transform.baseVal.getItem(0);Be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ue.prototype.pointerUp=function(le){var ve=this.state;Oe.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",ve==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ue.prototype.moveVisual=function(le){this.visual.style.transform="translate("+le.x+"px, "+le.y+"px)"},ue.prototype.manipulate=function(le){var ve=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(ve.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ve.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ve):this.state==="rotate"&&this.rotate(le)},ue.prototype.resize=function(le){var ve=this.manipulationStartLeft,pe=this.manipulationStartWidth,se=this.manipulationStartTop,Be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ve=this.manipulationStartLeft+le.x-this.manipulationStartX,pe=this.manipulationStartWidth+this.manipulationStartLeft-ve;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:pe=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,Be=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Be=this.manipulationStartHeight+le.y-this.manipulationStartY}pe>=0?(this.left=ve,this.width=pe):(this.left=ve+pe,this.width=-pe),Be>=0?(this.top=se,this.height=Be):(this.top=se+Be,this.height=-Be),this.setSize()},ue.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ue.prototype.rotate=function(le){if(Math.abs(le.x-this.centerX)>.1){var ve=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*ve,this.applyRotation()}},ue.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)},ue.prototype.rotatePoint=function(le){if(this.rotationAngle===0)return le;var ve=this.container.getCTM(),pe=_e.createPoint(le.x,le.y);return{x:(pe=pe.matrixTransform(ve)).x,y:pe.y}},ue.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var ve=this.container.getCTM();ve=ve.inverse();var pe=_e.createPoint(le.x,le.y);return{x:(pe=pe.matrixTransform(ve)).x,y:pe.y}},ue.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=_e.createGroup();var le=_e.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=_e.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=_e.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new vt,this.addControlGrips(),this.controlBox.style.display="none"},ue.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()},ue.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()},ue.prototype.createGrip=function(){var le=new Dt;return le.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,ve=-le/2,pe=ve,se=(this.width+this.CB_DISTANCE)/2-le/2,Be=(this.height+this.CB_DISTANCE)/2-le/2,ft=this.height+this.CB_DISTANCE-le/2,Bt=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,ve,pe),this.positionGrip(this.controlGrips.topCenter.visual,se,pe),this.positionGrip(this.controlGrips.topRight.visual,Bt,pe),this.positionGrip(this.controlGrips.centerLeft.visual,ve,Be),this.positionGrip(this.controlGrips.centerRight.visual,Bt,Be),this.positionGrip(this.controlGrips.bottomLeft.visual,ve,ft),this.positionGrip(this.controlGrips.bottomCenter.visual,se,ft),this.positionGrip(this.controlGrips.bottomRight.visual,Bt,ft),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,pe-3*this.CB_DISTANCE)},ue.prototype.positionGrip=function(le,ve,pe){var se=le.transform.baseVal.getItem(0);se.setTranslate(ve,pe),le.transform.baseVal.replaceItem(se,0)},ue.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ue.prototype.showControlBox=function(){this.controlBox.style.display=""},ue.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)},Oe.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le);var ve=le;this.left=ve.left,this.top=ve.top,this.width=ve.width,this.height=ve.height,this.rotationAngle=ve.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ve.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ve.containerTransformMatrix))},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve);var pe=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:pe.x*le,y:pe.y*ve});this.left=se.x,this.top=se.y,this.width=this.width*le,this.height=this.height*ve,this.adjustControlBox()},ue}(be),Ce=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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 Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=_e.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)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Oe.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Oe.prototype.setSize.call(this),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){Oe.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this))},ue.prototype.restoreState=function(le){var ve=le;this.fillColor=ve.fillColor,this.strokeColor=ve.strokeColor,this.strokeWidth=ve.strokeWidth,this.strokeDasharray=ve.strokeDasharray,this.opacity=ve.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.setSize()},ue.title="Rectangle marker",ue}(ot),Se=function(Oe){function ue(le,ve,pe,se){var Be=Oe.call(this,le,se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Be.widths=[],Be.widthBoxes=[],Be.widths=ve,Be.currentWidth=pe,Be.setCurrentWidth=Be.setCurrentWidth.bind(Be),Be}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");return ve.style.display="flex",ve.style.overflow="hidden",ve.style.flexGrow="2",this.widths.forEach(function(pe){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=pe===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentWidth(pe,se)}),ve.appendChild(se);var Be=document.createElement("div");Be.innerText=pe.toString(),Be.style.marginRight="5px",se.appendChild(Be);var ft=document.createElement("div");ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.display="flex",ft.style.alignItems="center";var Bt=document.createElement("hr");Bt.style.minWidth="20px",Bt.style.border="0px",Bt.style.borderTop=pe+"px solid "+le.uiStyleSettings.toolboxColor,Bt.style.flexGrow="2",ft.appendChild(Bt),se.appendChild(ft),le.widthBoxes.push(se)}),ve},ue.prototype.setCurrentWidth=function(le,ve){var pe=this;this.currentWidth=le,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ue}(ct),He=function(Oe){function ue(le,ve,pe,se){var Be=Oe.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 Be.styles=[],Be.styleBoxes=[],Be.styles=ve,Be.currentStyle=pe,Be.setCurrentStyle=Be.setCurrentStyle.bind(Be),Be}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");return ve.style.display="flex",ve.style.overflow="hidden",ve.style.flexGrow="2",this.styles.forEach(function(pe){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=pe===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentStyle(pe,se)}),ve.appendChild(se);var Be=document.createElement("div");Be.style.minHeight="20px",Be.style.flexGrow="2",Be.style.overflow="hidden";var ft=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(pe!==""?'stroke-dasharray="'+pe+'"':"")+` />
|
|
|
</svg>`;Be.innerHTML=ft,se.appendChild(Be),le.styleBoxes.push(se)}),ve},ue.prototype.setCurrentStyle=function(le,ve){var pe=this;this.currentStyle=le,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ue}(ct),Ue=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.strokeColor=pe.defaultColor,se.strokeWidth=pe.defaultStrokeWidth,se.strokeDasharray=pe.defaultStrokeDasharray,se.strokePanel=new qe("Line color",pe.defaultColorSet,pe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new He("Line style",pe.defaultStrokeDasharrays,pe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Te(ue,Oe),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Oe.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="FrameMarker",ue.title="Frame marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ue}(Ce),xt=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"},mt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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 Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!!Oe.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),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(ve)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ve)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ue.prototype.pointerUp=function(le){var ve=this.state;Oe.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",ve==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ue.prototype.adjustVisual=function(){},ue.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)},ue.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()},ue.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=_e.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ue.prototype.adjustControlBox=function(){this.positionGrips()},ue.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ue.prototype.createGrip=function(){var le=new Dt;return le.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(le.visual),le},ue.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)},ue.prototype.positionGrip=function(le,ve,pe){var se=le.transform.baseVal.getItem(0);se.setTranslate(ve,pe),le.transform.baseVal.replaceItem(se,0)},ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Oe.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le);var ve=le;this.x1=ve.x1,this.y1=ve.y1,this.x2=ve.x2,this.y2=ve.y2},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.x1=this.x1*le,this.y1=this.y1*ve,this.x2=this.x2*le,this.y2=this.y2*ve,this.adjustVisual(),this.adjustControlBox()},ue}(be),ut=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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=pe.defaultColor,se.strokeWidth=pe.defaultStrokeWidth,se.strokeDasharray=pe.defaultStrokeDasharray,se.strokePanel=new qe("Line color",pe.defaultColorSet,pe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new He("Line style",pe.defaultStrokeDasharrays,pe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},ue.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_e.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)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ue.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()),_e.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le);var ve=le;this.strokeColor=ve.strokeColor,this.strokeWidth=ve.strokeWidth,this.strokeDasharray=ve.strokeDasharray,this.createVisual(),this.adjustVisual()},ue.typeName="LineMarker",ue.title="Line marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ue}(mt),$e=function(Oe){function ue(le,ve,pe,se){var Be=Oe.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 Be.fonts=[],Be.fontBoxes=[],Be.fonts=ve,Be.currentFont=pe,Be.setCurrentFont=Be.setCurrentFont.bind(Be),Be}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");return ve.style.overflow="hidden",ve.style.flexGrow="2",this.fonts.forEach(function(pe){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=pe===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentFont(pe,se)}),ve.appendChild(se);var Be=document.createElement("div");Be.style.display="flex",Be.style.minHeight="20px",Be.style.flexGrow="2",Be.style.fontFamily=pe,Be.style.overflow="hidden";var ft=document.createElement("div");ft.style.whiteSpace="nowrap",ft.style.overflow="hidden",ft.style.textOverflow="ellipsis",ft.innerHTML="The quick brown fox jumps over the lazy dog",Be.appendChild(ft),se.appendChild(Be),le.fontBoxes.push(se)}),ve},ue.prototype.setCurrentFont=function(le,ve){var pe=this;this.currentFont=le,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ue}(ct),Ft=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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=pe.defaultColor,se.fontFamily=pe.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 qe("Color",pe.defaultColorSet,pe.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new $e("Font",pe.defaultFontFamilies,pe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){if(Oe.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var ve=!1;return this.textElement.childNodes.forEach(function(pe){pe===le&&(ve=!0)}),ve},ue.prototype.createVisual=function(){this.visual=_e.createGroup(),this.bgRectangle=_e.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_e.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.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(ve){le.textElement.appendChild(_e.createTSpan(ve.trim()===""?" ":ve.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ue.prototype.getTextScale=function(){var le=this.textElement.getBBox(),ve=1;if(le.width>0&&le.height>0){var pe=(1*this.width-this.width*this.padding*2/100)/le.width,se=(1*this.height-this.height*this.padding*2/100)/le.height;ve=Math.min(pe,se)}return ve},ue.prototype.getTextPosition=function(le){var ve=this.textElement.getBBox(),pe=0,se=0;return ve.width>0&&ve.height>0&&(pe=(this.width-ve.width*le)/2,se=this.height/2-ve.height*le/2),{x:pe,y:se}},ue.prototype.sizeText=function(){var le=this.textElement.getBBox(),ve=this.getTextScale(),pe=this.getTextPosition(ve);pe.y-=le.y*ve,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+pe.x+"px, "+pe.y+"px) scale("+ve+", "+ve+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(pe.x,pe.y),this.textElement.transform.baseVal.getItem(1).setScale(ve,ve))},ue.prototype.manipulate=function(le){Oe.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)},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},ue.prototype.setSize=function(){Oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ue.prototype.pointerUp=function(le){var ve=this.state;ve==="creating"&&(this._suppressMarkerCreateEvent=!0),Oe.prototype.pointerUp.call(this,le),this.setSize(),(ve==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.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(ve){ve.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ve=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&ve>.9;)ve-=.1,le.textEditor.style.fontSize=Math.max(ve,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ve){ve.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ve){if(ve.clipboardData){var pe=ve.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(pe)),ve.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")},ue.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var le=this.getTextScale(),ve=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),pe=this.textElement.getBBox(),se={x:pe.width*le,y:pe.height*le};ve.x-=se.x/2,ve.y-=se.y/2,this.textEditor.style.top=ve.y+"px",this.textEditor.style.left=ve.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ve.x+"px",this.textEditor.style.fontSize=Math.max(16*le,12)+"px",this.textElement.style.display="none"}},ue.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()},ue.prototype.select=function(){Oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Oe.prototype.deselect.call(this)},ue.prototype.dblClick=function(le,ve){Oe.prototype.dblClick.call(this,le,ve),this.showTextEditor()},ue.prototype.setColor=function(le){this.textElement&&_e.setAttributes(this.textElement,[["fill",le]]),this.color=le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(le)},ue.prototype.setFont=function(le){this.textElement&&_e.setAttributes(this.textElement,[["font-family",le]]),this.fontFamily=le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ue.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ue.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var ve=le;this.color=ve.color,this.fontFamily=ve.fontFamily,this.padding=ve.padding,this.text=ve.text,this.createVisual(),Oe.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.setSize(),this.sizeText(),this.positionTextEditor()},ue.typeName="TextMarker",ue.title="Text marker",ue.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>',ue}(ot),yt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=pe.defaultColor,se.lineWidth=pe.defaultStrokeWidth,se.pixelRatio=pe.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 qe("Color",pe.defaultColorSet,pe.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},ue.prototype.createVisual=function(){this.visual=_e.createGroup(),this.drawingImage=_e.createImage(),this.visual.appendChild(this.drawingImage);var le=_e.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},ue.prototype.pointerDown=function(le,ve){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):Oe.prototype.pointerDown.call(this,le,ve)},ue.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):Oe.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Oe.prototype.pointerUp.call(this,le)},ue.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)},ue.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.select.call(this)},ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.deselect.call(this)},ue.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ve=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],pe=ve[0],se=ve[1],Be=ve[2],ft=ve[3],Bt=!1,qt=0;qt<this.canvasElement.height;qt++)for(var an=0;an<this.canvasElement.width;an++)le.data[qt*this.canvasElement.width*4+4*an+3]>0&&(Bt=!0,qt<se&&(se=qt),an<pe&&(pe=an),qt>ft&&(ft=qt),an>Be&&(Be=an));if(Bt){this.left=pe/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Be-pe)/this.pixelRatio,this.height=(ft-se)/this.pixelRatio;var vn=document.createElement("canvas");vn.width=Be-pe,vn.height=ft-se,vn.getContext("2d").putImageData(this.canvasContext.getImageData(pe,se,Be-pe,ft-se),0,0),this.drawingImgUrl=vn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ue.prototype.setDrawingImage=function(){_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ue.prototype.setColor=function(le){this.color=le,this.colorChanged(le)},ue.prototype.setLineWidth=function(le){this.lineWidth=le},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({drawingImgUrl:this.drawingImgUrl},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){this.createVisual(),Oe.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.setDrawingImage()},ue.typeName="FreehandMarker",ue.title="Freehand marker",ue.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>',ue}(ot),gn=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,pe||'<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=ve,se.setCurrentType=se.setCurrentType.bind(se),se}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");ve.style.display="flex",ve.style.overflow="hidden",ve.style.flexGrow="2";for(var pe=function(ft){var Bt="both";switch(ft){case 0:Bt="both";break;case 1:Bt="start";break;case 2:Bt="end";break;case 3:Bt="none"}var qt=document.createElement("div");if(qt.style.display="flex",qt.style.flexGrow="2",qt.style.alignItems="center",qt.style.justifyContent="space-between",qt.style.padding="5px",qt.style.borderWidth="2px",qt.style.borderStyle="solid",qt.style.borderColor=Bt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",qt.addEventListener("click",function(){le.setCurrentType(Bt,qt)}),ve.appendChild(qt),Bt==="both"||Bt==="start"){var an=document.createElement("div");an.style.display="flex",an.style.alignItems="center",an.style.minHeight="20px",an.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>`,an.style.marginLeft="5px",qt.appendChild(an)}var vn=document.createElement("div");vn.style.display="flex",vn.style.alignItems="center",vn.style.minHeight="20px",vn.style.flexGrow="2";var dn=document.createElement("hr");if(dn.style.minWidth="20px",dn.style.border="0px",dn.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),dn.style.flexGrow="2",vn.appendChild(dn),qt.appendChild(vn),Bt==="both"||Bt==="end"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.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>`,gt.style.marginRight="5px",qt.appendChild(gt)}se.typeBoxes.push(qt)},se=this,Be=0;Be<4;Be++)pe(Be);return ve},ue.prototype.setCurrentType=function(le,ve){var pe=this;this.currentType=le,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings!==void 0?pe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ue}(ct),rt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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 gn("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},ue.prototype.getArrowPoints=function(le,ve){var pe=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return le-pe/2+","+(ve+se/2)+" "+le+","+(ve-se/2)+" "+(le+pe/2)+","+(ve+se/2)},ue.prototype.createTips=function(){this.arrow1=_e.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_e.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow2)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",_e.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_e.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 ve=this.arrow1.transform.baseVal.getItem(0);ve.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ve,0);var pe=this.arrow2.transform.baseVal.getItem(0);pe.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(pe,0)}},ue.prototype.setArrowType=function(le){this.arrowType=le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({arrowType:this.arrowType},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le);var ve=le;this.arrowType=ve.arrowType,this.createTips(),this.adjustVisual()},ue.typeName="ArrowMarker",ue.title="Arrow marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ue}(ut),Mt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.fillColor=pe.defaultFillColor,se.strokeWidth=0,se.fillPanel=new qe("Color",pe.defaultColorSet,pe.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return Te(ue,Oe),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Oe.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="CoverMarker",ue.title="Cover marker",ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ue}(Ce),en=function(Oe){function ue(le,ve,pe,se){var Be=Oe.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 Be.opacities=[],Be.opacityBoxes=[],Be.opacities=ve,Be.currentOpacity=pe,Be.setCurrentOpacity=Be.setCurrentOpacity.bind(Be),Be}return Te(ue,Oe),ue.prototype.getUi=function(){var le=this,ve=document.createElement("div");return ve.style.display="flex",ve.style.overflow="hidden",ve.style.flexGrow="2",ve.style.justifyContent="space-between",this.opacities.forEach(function(pe){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=pe===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){le.setCurrentOpacity(pe,se)}),ve.appendChild(se);var Be=document.createElement("div");Be.innerText=100*pe+"%",se.appendChild(Be),le.opacityBoxes.push(se)}),ve},ue.prototype.setCurrentOpacity=function(le,ve){var pe=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ve?pe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ue}(ct),Yt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=pe.defaultHighlightColor,se.strokeWidth=0,se.opacity=pe.defaultHighlightOpacity,se.fillPanel=new qe("Color",pe.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new en("Opacity",pe.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return Te(ue,Oe),ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Oe.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="HighlightMarker",ue.title="Highlight marker",ue.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>',ue}(Mt),Qe='<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>',Ie='<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>',Ot=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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=pe.defaultStrokeColor,se.bgColor=pe.defaultFillColor,se.fontFamily=pe.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 qe("Text color",pe.defaultColorSet,se.color,Qe),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new qe("Fill color",pe.defaultColorSet,se.bgColor,Ie),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new $e("Font",pe.defaultFontFamilies,pe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new Dt,se.tipGrip.visual.transform.baseVal.appendItem(_e.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return Oe.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},ue.prototype.createTip=function(){_e.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_e.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ue.prototype.pointerDown=function(le,ve){this.state==="new"&&Oe.prototype.pointerDown.call(this,le,ve),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ve)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Oe.prototype.pointerDown.call(this,le,ve)},ue.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Oe.prototype.pointerUp.call(this,le);else{var ve=this.state==="creating";Oe.prototype.pointerUp.call(this,le),this.setTipPoints(ve),this.positionTip()}},ue.prototype.manipulate=function(le){if(this.tipMoving){var ve=this.unrotatePoint(le);this.tipPosition={x:ve.x-this.manipulationStartLeft,y:ve.y-this.manipulationStartTop},this.positionTip()}else Oe.prototype.manipulate.call(this,le)},ue.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(_e.setAttributes(this.bgRectangle,[["fill",le]]),_e.setAttributes(this.tip,[["fill",le]])),this.bgColor=le,this.fillColorChanged(le)},ue.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},ue.prototype.setTipPoints=function(le){le===void 0&&(le=!1);var ve=Math.min(this.height/2,15),pe=this.height/5;le&&(this.tipPosition={x:ve+pe/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))?(pe=this.width/5,ve=Math.min(this.width/2,15),this.tipBase1Position={x:ve,y:0},this.tipBase2Position={x:ve+pe,y:0}):(this.tipBase1Position={x:0,y:ve},this.tipBase2Position={x:0,y:ve+pe}):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))?(pe=this.width/5,ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ve-pe,y:0},this.tipBase2Position={x:this.width-ve,y:0}):(this.tipBase1Position={x:this.width,y:ve},this.tipBase2Position={x:this.width,y:ve+pe}):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))?(pe=this.width/5,ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ve-pe,y:this.height},this.tipBase2Position={x:this.width-ve,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ve-pe},this.tipBase2Position={x:this.width,y:this.height-ve}):se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(pe=this.width/5,ve=Math.min(this.width/2,15),this.tipBase1Position={x:ve,y:this.height},this.tipBase2Position={x:ve+pe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ve},this.tipBase2Position={x:0,y:this.height-ve-pe})},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),this.positionTip()},ue.prototype.positionTip=function(){_e.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(ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.positionTip(),Oe.prototype.select.call(this)},ue.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var ve=le;this.bgColor=ve.bgColor,this.tipPosition=ve.tipPosition,Oe.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*ve},this.positionTip()},ue.typeName="CalloutMarker",ue.title="Callout marker",ue.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>',ue}(Ft),In=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=pe.defaultColor,se.strokeWidth=pe.defaultStrokeWidth,se.strokeDasharray=pe.defaultStrokeDasharray,se.fillColor=pe.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 qe("Line color",ye(pe.defaultColorSet,["transparent"]),pe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new qe("Fill color",ye(pe.defaultColorSet,["transparent"]),se.fillColor,Ie),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new He("Line style",pe.defaultStrokeDasharrays,pe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new en("Opacity",pe.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=_e.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)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Oe.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Oe.prototype.setSize.call(this),_e.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ue.prototype.pointerUp=function(le){Oe.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var ve=le;this.fillColor=ve.fillColor,this.strokeColor=ve.strokeColor,this.strokeWidth=ve.strokeWidth,this.strokeDasharray=ve.strokeDasharray,this.opacity=ve.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.setSize()},ue.typeName="EllipseMarker",ue.title="Ellipse marker",ue.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>',ue}(ot),mn=function(Oe){function ue(le,ve,pe){return Oe.call(this,le,ve,pe)||this}return Te(ue,Oe),Object.defineProperty(ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},ue.prototype.createTips=function(){this.tip1=_e.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(_e.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_e.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(_e.createTransform()),this.visual.appendChild(this.tip2)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_e.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()]]),_e.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),ve=this.tip1.transform.baseVal.getItem(0);ve.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ve,0);var pe=this.tip2.transform.baseVal.getItem(0);pe.setRotate(le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(pe,0)}},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Oe.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le),this.createTips(),this.adjustVisual()},ue.typeName="MeasurementMarker",ue.title="Measurement marker",ue.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>',ue}(ut),pt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||this;return se.strokePanel.colors=pe.defaultColorSet,se.fillColor="transparent",se}return Te(ue,Oe),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Oe.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.typeName="EllipseFrameMarker",ue.title="Ellipse frame marker",ue.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>',ue}(In),wt=function(){function Oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Oe.prototype.addUndoStep=function(ue){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ue)||(this.undoStack.push(ue),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ue)&&this.redoStack.splice(0,this.redoStack.length))},Oe.prototype.replaceLastUndoStep=function(ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ue)},Oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Oe.prototype.undo=function(){if(this.undoStack.length>1){var ue=this.undoStack.pop();return ue!==void 0&&this.redoStack.push(ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Oe}(),Qt=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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=pe.defaultColor,se.strokeWidth=pe.defaultStrokeWidth,se.strokeDasharray=pe.defaultStrokeDasharray,se.strokePanel=new qe("Line color",pe.defaultColorSet,pe.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new He("Line style",pe.defaultStrokeDasharrays,pe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorCurve&&le!==this.visibleCurve&&!this.curveGrip.ownsTarget(le))},ue.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ue.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorCurve=_e.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_e.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)},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),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(ve)&&(this.activeGrip=this.curveGrip,this._state="resize")},ue.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_e.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setupControlBox=function(){Oe.prototype.setupControlBox.call(this),this.curveControlLine1=_e.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_e.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)},ue.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Oe.prototype.addControlGrips.call(this)},ue.prototype.positionGrips=function(){Oe.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()))},ue.prototype.manipulate=function(le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+le.y-this.manipulationStartY),Oe.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),Oe.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)},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.adjustVisual(),this.colorChanged(le)},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.adjustVisual()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.adjustVisual()},ue.prototype.scale=function(le,ve){this.curveX=this.curveX*le,this.curveY=this.curveY*ve,Oe.prototype.scale.call(this,le,ve)},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Oe.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Oe.prototype.restoreState.call(this,le);var ve=le;this.strokeColor=ve.strokeColor,this.strokeWidth=ve.strokeWidth,this.strokeDasharray=ve.strokeDasharray,this.curveX=ve.curveX,this.curveY=ve.curveY,this.createVisual(),this.adjustVisual()},ue.typeName="CurveMarker",ue.title="Curve marker",ue.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>',ue}(mt),Zn=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,ve,pe)||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=pe.defaultColor,se.strokeWidth=pe.defaultStrokeWidth,se.strokeDasharray=pe.defaultStrokeDasharray,se.fillColor=pe.defaultFillColor,se.textColor=pe.defaultStrokeColor,se.fontFamily=pe.defaultFontFamily,se.fontSize=pe.defaultCaptionFontSize,se.captionText=pe.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 qe("Line color",ye(pe.defaultColorSet,["transparent"]),se.strokeColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new qe("Fill color",ye(pe.defaultColorSet,["transparent"]),se.fillColor,Ie),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new Se("Line width",pe.defaultStrokeWidths,pe.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new He("Line style",pe.defaultStrokeDasharrays,pe.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.fontFamilyPanel=new $e("Font",pe.defaultFontFamilies,pe.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.textColorPanel=new qe("Text color",pe.defaultColorSet,se.textColor,Qe),se.textColorPanel.onColorChanged=se.setTextColor,se}return Te(ue,Oe),ue.prototype.ownsTarget=function(le){return!(!Oe.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},ue.prototype.createVisual=function(){this.visual=_e.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=_e.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=_e.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=_e.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()},ue.prototype.setCaptionText=function(le){this.captionText=le,this.captionElement.textContent=this.captionText,this.sizeCaption()},ue.prototype.pointerDown=function(le,ve){Oe.prototype.pointerDown.call(this,le,ve),this.isMoved=!1,this.pointerDownPoint=le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Oe.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)},ue.prototype.resize=function(le){Oe.prototype.resize.call(this,le),this.setSize()},ue.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),_e.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')"]]),_e.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')"]])},ue.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(ve){ve.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ve){ve.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ve){ve.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()},ue.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"))},ue.prototype.finishTextEditing=function(le){this.setCaptionText(le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ue.prototype.setFont=function(le){this.captionElement&&_e.setAttributes(this.captionElement,[["font-family",le]]),this.fontFamily=le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ue.prototype.setTextColor=function(le){this.captionElement&&_e.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ue.prototype.setSize=function(){Oe.prototype.setSize.call(this),_e.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ue.prototype.pointerUp=function(le){Oe.prototype.pointerUp.call(this,le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ue.prototype.dblClick=function(le,ve){Oe.prototype.dblClick.call(this,le,ve),this.showTextEditor()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&_e.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&_e.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&_e.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&_e.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ue.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},Oe.prototype.getState.call(this));return le.typeName=this.typeName,le},ue.prototype.restoreState=function(le){var ve=le;this.fillColor=ve.fillColor,this.strokeColor=ve.strokeColor,this.strokeWidth=ve.strokeWidth,this.strokeDasharray=ve.strokeDasharray,this.textColor=ve.textColor,this.fontFamily=ve.fontFamily,this.captionText=ve.captionText,this.fontSize=ve.fontSize,this.createVisual(),Oe.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,ve){Oe.prototype.scale.call(this,le,ve),this.setSize()},ue.typeName="CaptionFrameMarker",ue.title="Caption frame marker",ue.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>',ue}(ot),Cn=function(){function Oe(ue,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ue,this.cancelable=le}return Object.defineProperty(Oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Oe.prototype.preventDefault=function(){this._defaultPrevented=!0},Oe}(),rn=function(Oe){function ue(le,ve,pe){var se=Oe.call(this,le,!1)||this;return se.dataUrl=ve,se.state=pe,se}return Te(ue,Oe),ue}(Cn),ln=function(Oe){function ue(le,ve,pe){pe===void 0&&(pe=!1);var se=Oe.call(this,le,pe)||this;return se.marker=ve,se}return Te(ue,Oe),ue}(Cn),zn=function(){function Oe(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Oe.prototype.addEventListener=function(ue,le){this[ue].push(le)},Oe.prototype.removeEventListener=function(ue,le){var ve=this[ue].indexOf(le);ve>-1&&this[ue].splice(ve,1)},Oe}(),_n=function(){function Oe(ue){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new xt,this._isOpen=!1,this.undoRedoManager=new wt,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 zn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Oe.instanceCounter++,this.styles=new Ae(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ue,this.targetRoot=document.body,this.width=ue.clientWidth,this.height=ue.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ue,yt,rt,Ft,pt,In,Yt,Ot,mn,Mt,ut,Qt,Zn]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ue,yt,rt,Ft,In,Yt,Ot]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ue,yt,rt,Ft,Yt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ue){var le=this;this._availableMarkerTypes.splice(0),ue.forEach(function(ve){if(typeof ve=="string"){var pe=le.ALL_MARKER_TYPES.find(function(se){return se.typeName===ve});pe!==void 0&&le._availableMarkerTypes.push(pe)}else le._availableMarkerTypes.push(ve)})},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ue){this._zoomLevel=ue,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Oe.prototype.show=function(){var ue=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 Cn(ue))})},Oe.prototype.render=function(){return Re(this,void 0,void 0,function(){var ue;return Ge(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(ue=new ke).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.markersOnly=this.renderMarkersOnly,ue.width=this.renderWidth,ue.height=this.renderHeight,[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return le.sent(),[4,ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,le.sent()]}})})},Oe.prototype.close=function(ue){var le=this;if(ue===void 0&&(ue=!1),this.isOpen){var ve=!1;ue||this.eventListeners.beforeclose.forEach(function(pe){var se=new Cn(le,!0);pe(se),se.defaultPrevented&&(ve=!0)}),ve||(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(pe){return pe(new Cn(le))}),this.detachEvents(),this._isOpen=!1)}},Oe.prototype.addMarkersToToolbar=function(){for(var ue,le=[],ve=0;ve<arguments.length;ve++)le[ve]=arguments[ve];(ue=this._availableMarkerTypes).push.apply(ue,le)},Oe.prototype.addRenderEventListener=function(ue){this.addEventListener("render",function(le){ue(le.dataUrl,le.state)})},Oe.prototype.removeRenderEventListener=function(ue){},Oe.prototype.addCloseEventListener=function(ue){this.addEventListener("close",function(){ue()})},Oe.prototype.removeCloseEventListener=function(ue){},Oe.prototype.setupResizeObserver=function(){var ue=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ue.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Oe.prototype.onPopupTargetResize=function(){var ue=1*this.target.clientWidth/this.target.clientHeight,le=this.editorCanvas.clientWidth/ue>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ue:this.editorCanvas.clientWidth,ve=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ue;this.resize(le,ve)},Oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Oe.prototype.resize=function(ue,le){this._isResizing=!0;var ve=ue/this.imageWidth,pe=le/this.imageHeight;this.imageWidth=Math.round(ue),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(ve,pe),this._isResizing=!1},Oe.prototype.scaleMarkers=function(ue,le){var ve,pe=this;this._currentMarker&&this._currentMarker instanceof Ft?this._currentMarker.scale(ue,le):(ve=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(se){se!==pe._currentMarker&&se.scale(ue,le)}),ve!==void 0&&this.setCurrentMarker(ve)},Oe.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Oe.prototype.setTopLeft=function(){var ue=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=ue.left-le.left,this.top=ue.top-le.top},Oe.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Oe.prototype.addDefs=function(){for(var ue,le=[],ve=0;ve<arguments.length;ve++)le[ve]=arguments[ve];this.defs=_e.createDefs(),this.addDefsToImage(),(ue=this.defs).append.apply(ue,le)},Oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Oe.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Oe.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Oe.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Oe.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var ue=document.createElement("a");ue.href="https://markerjs.com/",ue.target="_blank",ue.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>',ue.title="Powered by marker.js",ue.style.display="grid",ue.style.alignItems="center",ue.style.justifyItems="center",ue.style.padding="3px",ue.style.width="20px",ue.style.height="20px",this.logoUI.appendChild(ue),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Oe.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Oe.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Oe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var ue=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=ue+"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 st(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 dt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Oe.prototype.removeMarker=function(ue){this.markerImage.removeChild(ue.container),this.markers.indexOf(ue)>-1&&this.markers.splice(this.markers.indexOf(ue),1),ue.dispose()},Oe.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Oe.prototype.toolbarButtonClicked=function(ue,le){if(ue==="marker"&&le!==void 0)this.createNewMarker(le);else if(ue==="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()}},Oe.prototype.deleteSelectedMarker=function(){var ue=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(pe){var se=new ln(ue,ue._currentMarker,!0);pe(se),se.defaultPrevented&&(le=!0)}),!le){var ve=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(pe){return pe(new ln(ue,ve))})}}},Oe.prototype.clear=function(){var ue=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Be){var ft=new ln(ue,void 0,!0);Be(ft),ft.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var ve=function(Be){var ft=pe.markers[Be];pe.setCurrentMarker(pe.markers[Be]),pe._currentMarker.dispose(),pe.markerImage.removeChild(pe._currentMarker.container),pe.markers.splice(pe.markers.indexOf(pe._currentMarker),1),pe.eventListeners.markerdelete.forEach(function(Bt){return Bt(new ln(ue,ft))})},pe=this,se=this.markers.length-1;se>=0;se--)ve(se);this.addUndoStep()}},Object.defineProperty(Oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Oe.prototype.showNotesEditor=function(){var ue;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=(ue=this._currentMarker.notes)!==null&&ue!==void 0?ue:"",this.overlayContainer.appendChild(this.notesArea))},Oe.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Oe.prototype.addUndoStep=function(){var ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),ve=this.undoRedoManager.getLastUndoStep();if(!ve||ve.width===le.width&&ve.height===le.height){var pe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),pe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(se){return se(new Cn(ue))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(se){return se(new Cn(ue))})}},Oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Oe.prototype.undoStep=function(){var ue=this,le=this.undoRedoManager.undo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ve){return ve(new Cn(ue))}))},Oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Oe.prototype.redoStep=function(){var ue=this,le=this.undoRedoManager.redo();le!==void 0&&(this.restoreState(le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ve){return ve(new Cn(ue))}))},Oe.prototype.stepZoom=function(){var ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ue<this.zoomSteps.length-1?this.zoomSteps[ue+1]:this.zoomSteps[0]},Oe.prototype.panTo=function(ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ue.x,top:this.prevPanPoint.y-ue.y}),this.prevPanPoint=ue},Oe.prototype.startRenderAndClose=function(){return Re(this,void 0,void 0,function(){var ue,le,ve=this;return Ge(this,function(pe){switch(pe.label){case 0:return[4,this.render()];case 1:return ue=pe.sent(),le=this.getState(),this.eventListeners.render.forEach(function(se){return se(new rn(ve,ue,le))}),this.close(!0),[2]}})})},Oe.prototype.getState=function(ue){ue===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ve){return le.markers.push(ve.getState())}),le},Oe.prototype.restoreState=function(ue){var le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ue.markers.forEach(function(ve){var pe=le._availableMarkerTypes.find(function(Be){return Be.typeName===ve.typeName});if(pe!==void 0){var se=le.addNewMarker(pe);se.restoreState(ve),le.markers.push(se)}}),ue.width&&ue.height&&(ue.width!==this.imageWidth||ue.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ue.width,this.imageHeight/ue.height),this.eventListeners.restorestate.forEach(function(ve){return ve(new Cn(le))})},Oe.prototype.addNewMarker=function(ue){var le=_e.createGroup();return this.markerImage.appendChild(le),new ue(le,this.overlayContainer,this.settings)},Oe.prototype.createNewMarker=function(ue){var le,ve=this;(le=typeof ue=="string"?this._availableMarkerTypes.find(function(pe){return pe.typeName===ue}):ue)&&(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(pe){return pe(new ln(ve,ve._currentMarker))}))},Oe.prototype.markerCreated=function(ue){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ue),this.setCurrentMarker(ue),ue instanceof yt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(yt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ve){return ve(new ln(le,le._currentMarker))})},Oe.prototype.colorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ue,this.settings.defaultStrokeColor=ue)},Oe.prototype.fillColorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ue)},Oe.prototype.markerStateChanged=function(ue){var le=this;this.eventListeners.markerchange.forEach(function(ve){return ve(new ln(le,ue))})},Oe.prototype.setCurrentMarker=function(ue){var le=this;this._currentMarker!==ue&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ve){return ve(new ln(le,le._currentMarker))})),this._currentMarker=ue,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(ve){return ve(new ln(le,le._currentMarker))}))},Oe.prototype.onPointerDown=function(ue){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ue.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(ve){return ve.ownsTarget(ue.target)});le!==void 0?(this.setCurrentMarker(le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ue.clientX,y:ue.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ue.clientX,ue.clientY))},Oe.prototype.onDblClick=function(ue){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(ve){return ve.ownsTarget(ue.target)});le!==void 0&&le!==this._currentMarker&&this.setCurrentMarker(le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ue.clientX,ue.clientY),ue.target):this.setCurrentMarker()}},Oe.prototype.onPointerMove=function(ue){this.touchPoints!==1&&ue.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ue.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ue.clientX,ue.clientY)):this.zoomLevel>1&&this.panTo({x:ue.clientX,y:ue.clientY}))},Oe.prototype.onPointerUp=function(ue){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ue.clientX,ue.clientY)),this.isDragging=!1,this.addUndoStep()},Oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Oe.prototype.onKeyUp=function(ue){this._currentMarker===void 0||this.notesArea!==void 0||ue.key!=="Delete"&&ue.key!=="Backspace"||this.deleteSelectedMarker()},Oe.prototype.clientToLocalCoordinates=function(ue,le){var ve=this.markerImage.getBoundingClientRect();return{x:(ue-ve.left)/this.zoomLevel,y:(le-ve.top)/this.zoomLevel}},Oe.prototype.onWindowResize=function(){this.positionUI()},Oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ue=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ue+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Oe.prototype.addLicenseKey=function(ue){ce.addKey(ue)},Oe.prototype.addEventListener=function(ue,le){this.eventListeners.addEventListener(ue,le)},Oe.prototype.removeEventListener=function(ue,le){this.eventListeners.removeEventListener(ue,le)},Oe.prototype.renderState=function(ue){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ue),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Oe.prototype.focus=function(){var ue=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 Cn(ue))}))},Oe.prototype.blur=function(){var ue=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(le){return le(new Cn(ue))}))},Oe.instanceCounter=0,Oe}()},95860:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return it}});var fe=ie(87462),Te=ie(1413),Re=ie(4942),Ge=ie(97685),ye=ie(45987),_e=ie(94184),ce=ie.n(_e),ke=ie(67294);function ge(ot){var Ce=ke.useRef();Ce.current=ot;var Se=ke.useCallback(function(){for(var He,Ue=arguments.length,xt=new Array(Ue),mt=0;mt<Ue;mt++)xt[mt]=arguments[mt];return(He=Ce.current)===null||He===void 0?void 0:He.call.apply(He,[Ce].concat(xt))},[]);return Se}function Ae(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=Ae()?ke.useLayoutEffect:ke.useEffect,ze=function(Ce,Se){var He=ke.useRef(!0);lt(function(){return Ce(He.current)},Se),lt(function(){return He.current=!1,function(){He.current=!0}},[])},st=function(Ce,Se){ze(function(He){if(!He)return Ce()},Se)},dt=null;function ct(ot){var Ce=ke.useRef(!1),Se=ke.useState(ot),He=(0,Ge.Z)(Se,2),Ue=He[0],xt=He[1];ke.useEffect(function(){return Ce.current=!1,function(){Ce.current=!0}},[]);function mt(ut,$e){$e&&Ce.current||xt(ut)}return[Ue,mt]}function qe(ot){return ot!==void 0}function be(ot,Ce){var Se=Ce||{},He=Se.defaultValue,Ue=Se.value,xt=Se.onChange,mt=Se.postState,ut=ct(function(){return qe(Ue)?Ue:qe(He)?typeof He=="function"?He():He:typeof ot=="function"?ot():ot}),$e=(0,Ge.Z)(ut,2),Ft=$e[0],yt=$e[1],gn=Ue!==void 0?Ue:Ft,rt=mt?mt(gn):gn,Mt=ge(xt),en=ct([gn]),Yt=(0,Ge.Z)(en,2),Qe=Yt[0],Ie=Yt[1];st(function(){var In=Qe[0];Ft!==In&&Mt(Ft,In)},[Qe]),st(function(){qe(Ue)||yt(Ue)},[Ue]);var Ot=ge(function(In,mn){yt(In,mn),Ie([gn],mn)});return[rt,Ot]}var vt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Dt=(0,ke.forwardRef)(function(ot,Ce){var Se,He=ot.prefixCls,Ue=He===void 0?"rc-checkbox":He,xt=ot.className,mt=ot.style,ut=ot.checked,$e=ot.disabled,Ft=ot.defaultChecked,yt=Ft===void 0?!1:Ft,gn=ot.type,rt=gn===void 0?"checkbox":gn,Mt=ot.title,en=ot.onChange,Yt=(0,ye.Z)(ot,vt),Qe=(0,ke.useRef)(null),Ie=be(yt,{value:ut}),Ot=(0,Ge.Z)(Ie,2),In=Ot[0],mn=Ot[1];(0,ke.useImperativeHandle)(Ce,function(){return{focus:function(){var Zn;(Zn=Qe.current)===null||Zn===void 0||Zn.focus()},blur:function(){var Zn;(Zn=Qe.current)===null||Zn===void 0||Zn.blur()},input:Qe.current}});var pt=ce()(Ue,xt,(Se={},(0,Re.Z)(Se,"".concat(Ue,"-checked"),In),(0,Re.Z)(Se,"".concat(Ue,"-disabled"),$e),Se)),wt=function(Zn){$e||("checked"in ot||mn(Zn.target.checked),en==null||en({target:(0,Te.Z)((0,Te.Z)({},ot),{},{type:rt,checked:Zn.target.checked}),stopPropagation:function(){Zn.stopPropagation()},preventDefault:function(){Zn.preventDefault()},nativeEvent:Zn.nativeEvent}))};return ke.createElement("span",{className:pt,title:Mt,style:mt},ke.createElement("input",(0,fe.Z)({},Yt,{className:"".concat(Ue,"-input"),ref:Qe,onChange:wt,disabled:$e,checked:!!In,type:rt})),ke.createElement("span",{className:"".concat(Ue,"-inner")}))}),it=Dt},26819:function(Ln,Kt){"use strict";var ie;var fe=typeof Symbol=="function"&&Symbol.for,Te=fe?Symbol.for("react.element"):60103,Re=fe?Symbol.for("react.portal"):60106,Ge=fe?Symbol.for("react.fragment"):60107,ye=fe?Symbol.for("react.strict_mode"):60108,_e=fe?Symbol.for("react.profiler"):60114,ce=fe?Symbol.for("react.provider"):60109,ke=fe?Symbol.for("react.context"):60110,ge=fe?Symbol.for("react.async_mode"):60111,Ae=fe?Symbol.for("react.concurrent_mode"):60111,lt=fe?Symbol.for("react.forward_ref"):60112,ze=fe?Symbol.for("react.suspense"):60113,st=fe?Symbol.for("react.suspense_list"):60120,dt=fe?Symbol.for("react.memo"):60115,ct=fe?Symbol.for("react.lazy"):60116,qe=fe?Symbol.for("react.block"):60121,be=fe?Symbol.for("react.fundamental"):60117,vt=fe?Symbol.for("react.responder"):60118,Dt=fe?Symbol.for("react.scope"):60119;function it(Ce){if(typeof Ce=="object"&&Ce!==null){var Se=Ce.$$typeof;switch(Se){case Te:switch(Ce=Ce.type,Ce){case ge:case Ae:case Ge:case _e:case ye:case ze:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case ke:case lt:case ct:case dt:case ce:return Ce;default:return Se}}case Re:return Se}}}function ot(Ce){return it(Ce)===Ae}ie=ge,ie=Ae,ie=ke,ie=ce,ie=Te,ie=lt,ie=Ge,ie=ct,ie=dt,ie=Re,ie=_e,ie=ye,ie=ze,ie=function(Ce){return ot(Ce)||it(Ce)===ge},ie=ot,ie=function(Ce){return it(Ce)===ke},ie=function(Ce){return it(Ce)===ce},ie=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Te},ie=function(Ce){return it(Ce)===lt},ie=function(Ce){return it(Ce)===Ge},ie=function(Ce){return it(Ce)===ct},Kt.isMemo=function(Ce){return it(Ce)===dt},ie=function(Ce){return it(Ce)===Re},ie=function(Ce){return it(Ce)===_e},ie=function(Ce){return it(Ce)===ye},ie=function(Ce){return it(Ce)===ze},ie=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===Ge||Ce===Ae||Ce===_e||Ce===ye||Ce===ze||Ce===st||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===ct||Ce.$$typeof===dt||Ce.$$typeof===ce||Ce.$$typeof===ke||Ce.$$typeof===lt||Ce.$$typeof===be||Ce.$$typeof===vt||Ce.$$typeof===Dt||Ce.$$typeof===qe)},ie=it},18459:function(Ln,Kt,ie){"use strict";Ln.exports=ie(26819)},16651:function(Ln,Kt){"use strict";var ie;var fe=Symbol.for("react.element"),Te=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ke=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),lt=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),ct;ct=Symbol.for("react.module.reference");function qe(be){if(typeof be=="object"&&be!==null){var vt=be.$$typeof;switch(vt){case fe:switch(be=be.type,be){case Re:case ye:case Ge:case Ae:case lt:return be;default:switch(be=be&&be.$$typeof,be){case ke:case ce:case ge:case st:case ze:case _e:return be;default:return vt}}case Te:return vt}}}ie=ce,ie=_e,ie=fe,ie=ge,ie=Re,ie=st,ie=ze,ie=Te,ie=ye,ie=Ge,ie=Ae,ie=lt,ie=function(){return!1},ie=function(){return!1},ie=function(be){return qe(be)===ce},ie=function(be){return qe(be)===_e},ie=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===fe},ie=function(be){return qe(be)===ge},ie=function(be){return qe(be)===Re},ie=function(be){return qe(be)===st},ie=function(be){return qe(be)===ze},ie=function(be){return qe(be)===Te},ie=function(be){return qe(be)===ye},ie=function(be){return qe(be)===Ge},ie=function(be){return qe(be)===Ae},ie=function(be){return qe(be)===lt},ie=function(be){return typeof be=="string"||typeof be=="function"||be===Re||be===ye||be===Ge||be===Ae||be===lt||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===st||be.$$typeof===ze||be.$$typeof===_e||be.$$typeof===ce||be.$$typeof===ge||be.$$typeof===ct||be.getModuleId!==void 0)},ie=qe},33993:function(Ln,Kt,ie){"use strict";ie(16651)},82523:function(Ln,Kt){"use strict";var ie;var fe=Symbol.for("react.element"),Te=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ke=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),lt=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),ct;ct=Symbol.for("react.module.reference");function qe(be){if(typeof be=="object"&&be!==null){var vt=be.$$typeof;switch(vt){case fe:switch(be=be.type,be){case Re:case ye:case Ge:case Ae:case lt:return be;default:switch(be=be&&be.$$typeof,be){case ke:case ce:case ge:case st:case ze:case _e:return be;default:return vt}}case Te:return vt}}}ie=ce,ie=_e,ie=fe,ie=ge,ie=Re,ie=st,ie=ze,ie=Te,ie=ye,ie=Ge,ie=Ae,ie=lt,ie=function(){return!1},ie=function(){return!1},ie=function(be){return qe(be)===ce},ie=function(be){return qe(be)===_e},ie=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===fe},ie=function(be){return qe(be)===ge},ie=function(be){return qe(be)===Re},ie=function(be){return qe(be)===st},ie=function(be){return qe(be)===ze},ie=function(be){return qe(be)===Te},ie=function(be){return qe(be)===ye},ie=function(be){return qe(be)===Ge},ie=function(be){return qe(be)===Ae},ie=function(be){return qe(be)===lt},ie=function(be){return typeof be=="string"||typeof be=="function"||be===Re||be===ye||be===Ge||be===Ae||be===lt||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===st||be.$$typeof===ze||be.$$typeof===_e||be.$$typeof===ce||be.$$typeof===ge||be.$$typeof===ct||be.getModuleId!==void 0)},ie=qe},27183:function(Ln,Kt,ie){"use strict";ie(82523)},67656:function(Ln,Kt,ie){"use strict";ie.r(Kt),ie.d(Kt,{BaseInput:function(){return Ae},default:function(){return Dt}});var fe=ie(87462),Te=ie(1413),Re=ie(4942),Ge=ie(71002),ye=ie(94184),_e=ie.n(ye),ce=ie(67294),ke=ie(87887),ge=function(ot){var Ce,Se,He=ot.inputElement,Ue=ot.prefixCls,xt=ot.prefix,mt=ot.suffix,ut=ot.addonBefore,$e=ot.addonAfter,Ft=ot.className,yt=ot.style,gn=ot.disabled,rt=ot.readOnly,Mt=ot.focused,en=ot.triggerFocus,Yt=ot.allowClear,Qe=ot.value,Ie=ot.handleReset,Ot=ot.hidden,In=ot.classes,mn=ot.classNames,pt=ot.dataAttrs,wt=ot.styles,Qt=ot.components,Zn=(Qt==null?void 0:Qt.affixWrapper)||"span",Cn=(Qt==null?void 0:Qt.groupWrapper)||"span",rn=(Qt==null?void 0:Qt.wrapper)||"span",ln=(Qt==null?void 0:Qt.groupAddon)||"span",zn=(0,ce.useRef)(null),_n=function(vn){var dn;(dn=zn.current)!==null&&dn!==void 0&&dn.contains(vn.target)&&(en==null||en())},Oe=function(){var vn;if(!Yt)return null;var dn=!gn&&!rt&&Qe,gt="".concat(Ue,"-clear-icon"),It=(0,Ge.Z)(Yt)==="object"&&Yt!==null&&Yt!==void 0&&Yt.clearIcon?Yt.clearIcon:"\u2716";return ce.createElement("span",{onClick:Ie,onMouseDown:function(Xt){return Xt.preventDefault()},className:_e()(gt,(vn={},(0,Re.Z)(vn,"".concat(gt,"-hidden"),!dn),(0,Re.Z)(vn,"".concat(gt,"-has-suffix"),!!mt),vn)),role:"button",tabIndex:-1},It)},ue=(0,ce.cloneElement)(He,{value:Qe,hidden:Ot,className:_e()((Ce=He.props)===null||Ce===void 0?void 0:Ce.className,!(0,ke.X3)(ot)&&!(0,ke.He)(ot)&&Ft)||null,style:(0,Te.Z)((0,Te.Z)({},(Se=He.props)===null||Se===void 0?void 0:Se.style),!(0,ke.X3)(ot)&&!(0,ke.He)(ot)?yt:{})});if((0,ke.X3)(ot)){var le,ve="".concat(Ue,"-affix-wrapper"),pe=_e()(ve,(le={},(0,Re.Z)(le,"".concat(ve,"-disabled"),gn),(0,Re.Z)(le,"".concat(ve,"-focused"),Mt),(0,Re.Z)(le,"".concat(ve,"-readonly"),rt),(0,Re.Z)(le,"".concat(ve,"-input-with-clear-btn"),mt&&Yt&&Qe),le),!(0,ke.He)(ot)&&Ft,In==null?void 0:In.affixWrapper,mn==null?void 0:mn.affixWrapper),se=(mt||Yt)&&ce.createElement("span",{className:_e()("".concat(Ue,"-suffix"),mn==null?void 0:mn.suffix),style:wt==null?void 0:wt.suffix},Oe(),mt);ue=ce.createElement(Zn,(0,fe.Z)({className:pe,style:(0,Te.Z)((0,Te.Z)({},(0,ke.He)(ot)?void 0:yt),wt==null?void 0:wt.affixWrapper),hidden:!(0,ke.He)(ot)&&Ot,onClick:_n},pt==null?void 0:pt.affixWrapper,{ref:zn}),xt&&ce.createElement("span",{className:_e()("".concat(Ue,"-prefix"),mn==null?void 0:mn.prefix),style:wt==null?void 0:wt.prefix},xt),(0,ce.cloneElement)(He,{value:Qe,hidden:null}),se)}if((0,ke.He)(ot)){var Be="".concat(Ue,"-group"),ft="".concat(Be,"-addon"),Bt=_e()("".concat(Ue,"-wrapper"),Be,In==null?void 0:In.wrapper),qt=_e()("".concat(Ue,"-group-wrapper"),Ft,In==null?void 0:In.group);return ce.createElement(Cn,{className:qt,style:yt,hidden:Ot},ce.createElement(rn,{className:Bt},ut&&ce.createElement(ln,{className:ft},ut),(0,ce.cloneElement)(ue,{hidden:null}),$e&&ce.createElement(ln,{className:ft},$e)))}return ue},Ae=ge,lt=ie(74902),ze=ie(97685),st=ie(45987),dt=ie(21770),ct=ie(98423),qe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],be=(0,ce.forwardRef)(function(it,ot){var Ce=it.autoComplete,Se=it.onChange,He=it.onFocus,Ue=it.onBlur,xt=it.onPressEnter,mt=it.onKeyDown,ut=it.prefixCls,$e=ut===void 0?"rc-input":ut,Ft=it.disabled,yt=it.htmlSize,gn=it.className,rt=it.maxLength,Mt=it.suffix,en=it.showCount,Yt=it.type,Qe=Yt===void 0?"text":Yt,Ie=it.classes,Ot=it.classNames,In=it.styles,mn=(0,st.Z)(it,qe),pt=(0,dt.Z)(it.defaultValue,{value:it.value}),wt=(0,ze.Z)(pt,2),Qt=wt[0],Zn=wt[1],Cn=(0,ce.useState)(!1),rn=(0,ze.Z)(Cn,2),ln=rn[0],zn=rn[1],_n=(0,ce.useRef)(null),Oe=function(qt){_n.current&&(0,ke.nH)(_n.current,qt)};(0,ce.useImperativeHandle)(ot,function(){return{focus:Oe,blur:function(){var qt;(qt=_n.current)===null||qt===void 0||qt.blur()},setSelectionRange:function(qt,an,vn){var dn;(dn=_n.current)===null||dn===void 0||dn.setSelectionRange(qt,an,vn)},select:function(){var qt;(qt=_n.current)===null||qt===void 0||qt.select()},input:_n.current}}),(0,ce.useEffect)(function(){zn(function(Bt){return Bt&&Ft?!1:Bt})},[Ft]);var ue=function(qt){it.value===void 0&&Zn(qt.target.value),_n.current&&(0,ke.rJ)(_n.current,qt,Se)},le=function(qt){xt&&qt.key==="Enter"&&xt(qt),mt==null||mt(qt)},ve=function(qt){zn(!0),He==null||He(qt)},pe=function(qt){zn(!1),Ue==null||Ue(qt)},se=function(qt){Zn(""),Oe(),_n.current&&(0,ke.rJ)(_n.current,qt,Se)},Be=function(){var qt=(0,ct.Z)(it,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ce.createElement("input",(0,fe.Z)({autoComplete:Ce},qt,{onChange:ue,onFocus:ve,onBlur:pe,onKeyDown:le,className:_e()($e,(0,Re.Z)({},"".concat($e,"-disabled"),Ft),Ot==null?void 0:Ot.input),style:In==null?void 0:In.input,ref:_n,size:yt,type:Qe}))},ft=function(){var qt=Number(rt)>0;if(Mt||en){var an=(0,ke.D7)(Qt),vn=(0,lt.Z)(an).length,dn=(0,Ge.Z)(en)==="object"?en.formatter({value:an,count:vn,maxLength:rt}):"".concat(vn).concat(qt?" / ".concat(rt):"");return ce.createElement(ce.Fragment,null,!!en&&ce.createElement("span",{className:_e()("".concat($e,"-show-count-suffix"),(0,Re.Z)({},"".concat($e,"-show-count-has-suffix"),!!Mt),Ot==null?void 0:Ot.count),style:(0,Te.Z)({},In==null?void 0:In.count)},dn),Mt)}return null};return ce.createElement(Ae,(0,fe.Z)({},mn,{prefixCls:$e,className:gn,inputElement:Be(),handleReset:se,value:(0,ke.D7)(Qt),focused:ln,triggerFocus:Oe,suffix:ft(),disabled:Ft,classes:Ie,classNames:Ot,styles:In}))}),vt=be,Dt=vt},87887:function(Ln,Kt,ie){"use strict";ie.d(Kt,{D7:function(){return ye},He:function(){return fe},X3:function(){return Te},nH:function(){return Ge},rJ:function(){return Re}});function fe(_e){return!!(_e.addonBefore||_e.addonAfter)}function Te(_e){return!!(_e.prefix||_e.suffix||_e.allowClear)}function Re(_e,ce,ke,ge){if(ke){var Ae=ce;if(ce.type==="click"){var lt=_e.cloneNode(!0);Ae=Object.create(ce,{target:{value:lt},currentTarget:{value:lt}}),lt.value="",ke(Ae);return}if(ge!==void 0){Ae=Object.create(ce,{target:{value:_e},currentTarget:{value:_e}}),_e.value=ge,ke(Ae);return}ke(Ae)}}function Ge(_e,ce){if(_e){_e.focus(ce);var ke=ce||{},ge=ke.cursor;if(ge){var Ae=_e.value.length;switch(ge){case"start":_e.setSelectionRange(0,0);break;case"end":_e.setSelectionRange(Ae,Ae);break;default:_e.setSelectionRange(0,Ae)}}}}function ye(_e){return typeof _e=="undefined"||_e===null?"":String(_e)}},78595:function(Ln,Kt,ie){"use strict";ie.d(Kt,{iz:function(){return ki},ck:function(){return Vi},BW:function(){return mi},sN:function(){return Vi},Wd:function(){return xn},ZP:function(){return Pe},Xl:function(){return dn}});var fe=ie(87462),Te=ie(4942),Re=ie(1413),Ge=ie(74902),ye=ie(97685),_e=ie(45987),ce=ie(94184),ke=ie.n(ce),ge=ie(67294),Ae=ie(48555);function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ze=lt()?ge.useLayoutEffect:ge.useEffect,st=function(We,je){var et=ge.useRef(!0);ze(function(){return We(et.current)},je),ze(function(){return et.current=!1,function(){et.current=!0}},[])},dt=function(We,je){st(function(et){if(!et)return We()},je)},ct=st,qe=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],be=void 0;function vt(Fe,We){var je=Fe.prefixCls,et=Fe.invalidate,tt=Fe.item,kt=Fe.renderItem,Wt=Fe.responsive,Sn=Fe.responsiveDisabled,Nn=Fe.registerSize,En=Fe.itemKey,cn=Fe.className,un=Fe.style,Gt=Fe.children,kn=Fe.display,ir=Fe.order,$n=Fe.component,Hn=$n===void 0?"div":$n,Gn=(0,_e.Z)(Fe,qe),ar=Wt&&!kn;function ur(hn){Nn(En,hn)}ge.useEffect(function(){return function(){ur(null)}},[]);var Ve=kt&&tt!==be?kt(tt):Gt,Je;et||(Je={opacity:ar?0:1,height:ar?0:be,overflowY:ar?"hidden":be,order:Wt?ir:be,pointerEvents:ar?"none":be,position:ar?"absolute":be});var Pt={};ar&&(Pt["aria-hidden"]=!0);var _t=ge.createElement(Hn,(0,fe.Z)({className:ke()(!et&&je,cn),style:(0,Re.Z)((0,Re.Z)({},Je),un)},Pt,Gn,{ref:We}),Ve);return Wt&&(_t=ge.createElement(Ae.Z,{onResize:function(Dn){var An=Dn.offsetWidth;ur(An)},disabled:Sn},_t)),_t}var Dt=ge.forwardRef(vt);Dt.displayName="Item";var it=Dt;function ot(Fe){var We=ge.useRef();We.current=Fe;var je=ge.useCallback(function(){for(var et,tt=arguments.length,kt=new Array(tt),Wt=0;Wt<tt;Wt++)kt[Wt]=arguments[Wt];return(et=We.current)===null||et===void 0?void 0:et.call.apply(et,[We].concat(kt))},[]);return je}var Ce=ie(73935),Se=function(We){return+setTimeout(We,16)},He=function(We){return clearTimeout(We)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Se=function(We){return window.requestAnimationFrame(We)},He=function(We){return window.cancelAnimationFrame(We)});var Ue=0,xt=new Map;function mt(Fe){xt.delete(Fe)}var ut=function(We){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ue+=1;var et=Ue;function tt(kt){if(kt===0)mt(et),We();else{var Wt=Se(function(){tt(kt-1)});xt.set(et,Wt)}}return tt(je),et};ut.cancel=function(Fe){var We=xt.get(Fe);return mt(We),He(We)};var $e=ut;function Ft(Fe){if(typeof MessageChannel=="undefined")$e(Fe);else{var We=new MessageChannel;We.port1.onmessage=function(){return Fe()},We.port2.postMessage(void 0)}}function yt(){var Fe=ge.useRef(null),We=function(et){Fe.current||(Fe.current=[],Ft(function(){(0,Ce.unstable_batchedUpdates)(function(){Fe.current.forEach(function(tt){tt()}),Fe.current=null})})),Fe.current.push(et)};return We}function gn(Fe,We){var je=ge.useState(We),et=(0,ye.Z)(je,2),tt=et[0],kt=et[1],Wt=ot(function(Sn){Fe(function(){kt(Sn)})});return[tt,Wt]}var rt=ge.createContext(null),Mt=["component"],en=["className"],Yt=["className"],Qe=function(We,je){var et=ge.useContext(rt);if(!et){var tt=We.component,kt=tt===void 0?"div":tt,Wt=(0,_e.Z)(We,Mt);return ge.createElement(kt,(0,fe.Z)({},Wt,{ref:je}))}var Sn=et.className,Nn=(0,_e.Z)(et,en),En=We.className,cn=(0,_e.Z)(We,Yt);return ge.createElement(rt.Provider,{value:null},ge.createElement(it,(0,fe.Z)({ref:je,className:ke()(Sn,En)},Nn,cn)))},Ie=ge.forwardRef(Qe);Ie.displayName="RawItem";var Ot=Ie,In=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],mn="responsive",pt="invalidate";function wt(Fe){return"+ ".concat(Fe.length," ...")}function Qt(Fe,We){var je=Fe.prefixCls,et=je===void 0?"rc-overflow":je,tt=Fe.data,kt=tt===void 0?[]:tt,Wt=Fe.renderItem,Sn=Fe.renderRawItem,Nn=Fe.itemKey,En=Fe.itemWidth,cn=En===void 0?10:En,un=Fe.ssr,Gt=Fe.style,kn=Fe.className,ir=Fe.maxCount,$n=Fe.renderRest,Hn=Fe.renderRawRest,Gn=Fe.suffix,ar=Fe.component,ur=ar===void 0?"div":ar,Ve=Fe.itemComponent,Je=Fe.onVisibleChange,Pt=(0,_e.Z)(Fe,In),_t=un==="full",hn=yt(),Dn=gn(hn,null),An=(0,ye.Z)(Dn,2),or=An[0],Un=An[1],Tn=or||0,tr=gn(hn,new Map),dr=(0,ye.Z)(tr,2),Pr=dr[0],fr=dr[1],Fr=gn(hn,0),ri=(0,ye.Z)(Fr,2),Vr=ri[0],ii=ri[1],Br=gn(hn,0),Jr=(0,ye.Z)(Br,2),si=Jr[0],_i=Jr[1],Hr=gn(hn,0),Bi=(0,ye.Z)(Hr,2),zi=Bi[0],Ia=Bi[1],ma=(0,ge.useState)(null),qi=(0,ye.Z)(ma,2),Oi=qi[0],Ri=qi[1],xi=(0,ge.useState)(null),ea=(0,ye.Z)(xi,2),wi=ea[0],ci=ea[1],Wi=ge.useMemo(function(){return wi===null&&_t?Number.MAX_SAFE_INTEGER:wi||0},[wi,or]),ha=(0,ge.useState)(!1),go=(0,ye.Z)(ha,2),lo=go[0],Ua=go[1],Ba="".concat(et,"-item"),Ea=Math.max(Vr,si),ji=ir===mn,Ao=kt.length&&ji,la=ir===pt,Li=Ao||typeof ir=="number"&&kt.length>ir,xa=(0,ge.useMemo)(function(){var sa=kt;return Ao?or===null&&_t?sa=kt:sa=kt.slice(0,Math.min(kt.length,Tn/cn)):typeof ir=="number"&&(sa=kt.slice(0,ir)),sa},[kt,cn,or,ir,Ao]),Ya=(0,ge.useMemo)(function(){return Ao?kt.slice(Wi+1):kt.slice(xa.length)},[kt,xa,Ao,Wi]),Ma=(0,ge.useCallback)(function(sa,Sa){var Qa;return typeof Nn=="function"?Nn(sa):(Qa=Nn&&(sa==null?void 0:sa[Nn]))!==null&&Qa!==void 0?Qa:Sa},[Nn]),Ta=(0,ge.useCallback)(Wt||function(sa){return sa},[Wt]);function Ki(sa,Sa,Qa){wi===sa&&(Sa===void 0||Sa===Oi)||(ci(sa),Qa||(Ua(sa<kt.length-1),Je==null||Je(sa)),Sa!==void 0&&Ri(Sa))}function Ja(sa,Sa){Un(Sa.clientWidth)}function vo(sa,Sa){fr(function(Qa){var co=new Map(Qa);return Sa===null?co.delete(sa):co.set(sa,Sa),co})}function ro(sa,Sa){_i(Sa),ii(si)}function yo(sa,Sa){Ia(Sa)}function Mo(sa){return Pr.get(Ma(xa[sa],sa))}ct(function(){if(Tn&&typeof Ea=="number"&&xa){var sa=zi,Sa=xa.length,Qa=Sa-1;if(!Sa){Ki(0,null);return}for(var co=0;co<Sa;co+=1){var jo=Mo(co);if(_t&&(jo=jo||0),jo===void 0){Ki(co-1,void 0,!0);break}if(sa+=jo,Qa===0&&sa<=Tn||co===Qa-1&&sa+Mo(Qa)<=Tn){Ki(Qa,null);break}else if(sa+Ea>Tn){Ki(co-1,sa-jo-zi+si);break}}Gn&&Mo(0)+zi>Tn&&Ri(null)}},[Tn,Pr,si,zi,Ma,xa]);var Xo=lo&&!!Ya.length,io={};Oi!==null&&Ao&&(io={position:"absolute",left:Oi,top:0});var So={prefixCls:Ba,responsive:Ao,component:Ve,invalidate:la},os=Sn?function(sa,Sa){var Qa=Ma(sa,Sa);return ge.createElement(rt.Provider,{key:Qa,value:(0,Re.Z)((0,Re.Z)({},So),{},{order:Sa,item:sa,itemKey:Qa,registerSize:vo,display:Sa<=Wi})},Sn(sa,Sa))}:function(sa,Sa){var Qa=Ma(sa,Sa);return ge.createElement(it,(0,fe.Z)({},So,{order:Sa,key:Qa,item:sa,renderItem:Ta,itemKey:Qa,registerSize:vo,display:Sa<=Wi}))},rs,cs={order:Xo?Wi:Number.MAX_SAFE_INTEGER,className:"".concat(Ba,"-rest"),registerSize:ro,display:Xo};if(Hn)Hn&&(rs=ge.createElement(rt.Provider,{value:(0,Re.Z)((0,Re.Z)({},So),cs)},Hn(Ya)));else{var Oo=$n||wt;rs=ge.createElement(it,(0,fe.Z)({},So,cs),typeof Oo=="function"?Oo(Ya):Oo)}var bo=ge.createElement(ur,(0,fe.Z)({className:ke()(!la&&et,kn),style:Gt,ref:We},Pt),xa.map(os),Li?rs:null,Gn&&ge.createElement(it,(0,fe.Z)({},So,{responsive:ji,responsiveDisabled:!Ao,order:Wi,className:"".concat(Ba,"-suffix"),registerSize:yo,display:!0,style:io}),Gn));return ji&&(bo=ge.createElement(Ae.Z,{onResize:Ja,disabled:!Ao},bo)),bo}var Zn=ge.forwardRef(Qt);Zn.displayName="Overflow",Zn.Item=Ot,Zn.RESPONSIVE=mn,Zn.INVALIDATE=pt;var Cn=Zn,rn=Cn,ln=ie(21770),zn=ie(80334),_n=ie(91881),Oe=ge.createContext(null);function ue(Fe,We){return Fe===void 0?null:"".concat(Fe,"-").concat(We)}function le(Fe){var We=ge.useContext(Oe);return ue(We,Fe)}var ve=ie(56982),pe=["children","locked"],se=ge.createContext(null);function Be(Fe,We){var je=(0,Re.Z)({},Fe);return Object.keys(We).forEach(function(et){var tt=We[et];tt!==void 0&&(je[et]=tt)}),je}function ft(Fe){var We=Fe.children,je=Fe.locked,et=(0,_e.Z)(Fe,pe),tt=ge.useContext(se),kt=(0,ve.Z)(function(){return Be(tt,et)},[tt,et],function(Wt,Sn){return!je&&(Wt[0]!==Sn[0]||!(0,_n.Z)(Wt[1],Sn[1],!0))});return ge.createElement(se.Provider,{value:kt},We)}var Bt=[],qt=ge.createContext(null);function an(){return ge.useContext(qt)}var vn=ge.createContext(Bt);function dn(Fe){var We=ge.useContext(vn);return ge.useMemo(function(){return Fe!==void 0?[].concat((0,Ge.Z)(We),[Fe]):We},[We,Fe])}var gt=ge.createContext(null),It=ge.createContext({}),Ht=It,Xt=ie(15105),Tt=ie(75164),Yn=function(Fe){if(!Fe)return!1;if(Fe instanceof Element){if(Fe.offsetParent)return!0;if(Fe.getBBox){var We=Fe.getBBox(),je=We.width,et=We.height;if(je||et)return!0}if(Fe.getBoundingClientRect){var tt=Fe.getBoundingClientRect(),kt=tt.width,Wt=tt.height;if(kt||Wt)return!0}}return!1};function Rn(Fe){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Yn(Fe)){var je=Fe.nodeName.toLowerCase(),et=["input","select","textarea","button"].includes(je)||Fe.isContentEditable||je==="a"&&!!Fe.getAttribute("href"),tt=Fe.getAttribute("tabindex"),kt=Number(tt),Wt=null;return tt&&!Number.isNaN(kt)?Wt=kt:et&&Wt===null&&(Wt=0),et&&Fe.disabled&&(Wt=null),Wt!==null&&(Wt>=0||We&&Wt<0)}return!1}function cr(Fe){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,je=(0,Ge.Z)(Fe.querySelectorAll("*")).filter(function(et){return Rn(et,We)});return Rn(Fe,We)&&je.unshift(Fe),je}var Xr=null;function wr(){Xr=document.activeElement}function kr(){Xr=null}function Ar(){if(Xr)try{Xr.focus()}catch(Fe){}}function gi(Fe,We){if(We.keyCode===9){var je=cr(Fe),et=je[We.shiftKey?0:je.length-1],tt=et===document.activeElement||Fe===document.activeElement;if(tt){var kt=je[We.shiftKey?je.length-1:0];kt.focus(),We.preventDefault()}}}var oi=Xt.Z.LEFT,fi=Xt.Z.RIGHT,Pi=Xt.Z.UP,Or=Xt.Z.DOWN,Jn=Xt.Z.ENTER,qn=Xt.Z.ESC,nr=Xt.Z.HOME,Ur=Xt.Z.END,li=[Pi,Or,oi,fi];function Lt(Fe,We,je,et){var tt,kt,Wt,Sn,Nn="prev",En="next",cn="children",un="parent";if(Fe==="inline"&&et===Jn)return{inlineTrigger:!0};var Gt=(tt={},(0,Te.Z)(tt,Pi,Nn),(0,Te.Z)(tt,Or,En),tt),kn=(kt={},(0,Te.Z)(kt,oi,je?En:Nn),(0,Te.Z)(kt,fi,je?Nn:En),(0,Te.Z)(kt,Or,cn),(0,Te.Z)(kt,Jn,cn),kt),ir=(Wt={},(0,Te.Z)(Wt,Pi,Nn),(0,Te.Z)(Wt,Or,En),(0,Te.Z)(Wt,Jn,cn),(0,Te.Z)(Wt,qn,un),(0,Te.Z)(Wt,oi,je?cn:un),(0,Te.Z)(Wt,fi,je?un:cn),Wt),$n={inline:Gt,horizontal:kn,vertical:ir,inlineSub:Gt,horizontalSub:ir,verticalSub:ir},Hn=(Sn=$n["".concat(Fe).concat(We?"":"Sub")])===null||Sn===void 0?void 0:Sn[et];switch(Hn){case Nn:return{offset:-1,sibling:!0};case En:return{offset:1,sibling:!0};case un:return{offset:-1,sibling:!1};case cn:return{offset:1,sibling:!1};default:return null}}function Kn(Fe){for(var We=Fe;We;){if(We.getAttribute("data-menu-list"))return We;We=We.parentElement}return null}function Bn(Fe,We){for(var je=Fe||document.activeElement;je;){if(We.has(je))return je;je=je.parentElement}return null}function yn(Fe,We){var je=cr(Fe,!0);return je.filter(function(et){return We.has(et)})}function xr(Fe,We,je){var et=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Fe)return null;var tt=yn(Fe,We),kt=tt.length,Wt=tt.findIndex(function(Sn){return je===Sn});return et<0?Wt===-1?Wt=kt-1:Wt-=1:et>0&&(Wt+=1),Wt=(Wt+kt)%kt,tt[Wt]}function Sr(Fe,We,je,et,tt,kt,Wt,Sn,Nn,En){var cn=ge.useRef(),un=ge.useRef();un.current=We;var Gt=function(){Tt.Z.cancel(cn.current)};return ge.useEffect(function(){return function(){Gt()}},[]),function(kn){var ir=kn.which;if([].concat(li,[Jn,qn,nr,Ur]).includes(ir)){var $n,Hn,Gn,ar=function(){$n=new Set,Hn=new Map,Gn=new Map;var dr=kt();return dr.forEach(function(Pr){var fr=document.querySelector("[data-menu-id='".concat(ue(et,Pr),"']"));fr&&($n.add(fr),Gn.set(fr,Pr),Hn.set(Pr,fr))}),$n};ar();var ur=Hn.get(We),Ve=Bn(ur,$n),Je=Gn.get(Ve),Pt=Lt(Fe,Wt(Je,!0).length===1,je,ir);if(!Pt&&ir!==nr&&ir!==Ur)return;(li.includes(ir)||[nr,Ur].includes(ir))&&kn.preventDefault();var _t=function(dr){if(dr){var Pr=dr,fr=dr.querySelector("a");fr!=null&&fr.getAttribute("href")&&(Pr=fr);var Fr=Gn.get(dr);Sn(Fr),Gt(),cn.current=(0,Tt.Z)(function(){un.current===Fr&&Pr.focus()})}};if([nr,Ur].includes(ir)||Pt.sibling||!Ve){var hn;!Ve||Fe==="inline"?hn=tt.current:hn=Kn(Ve);var Dn,An=yn(hn,$n);ir===nr?Dn=An[0]:ir===Ur?Dn=An[An.length-1]:Dn=xr(hn,$n,Ve,Pt.offset),_t(Dn)}else if(Pt.inlineTrigger)Nn(Je);else if(Pt.offset>0)Nn(Je,!0),Gt(),cn.current=(0,Tt.Z)(function(){ar();var tr=Ve.getAttribute("aria-controls"),dr=document.getElementById(tr),Pr=xr(dr,$n);_t(Pr)},5);else if(Pt.offset<0){var or=Wt(Je,!0),Un=or[or.length-2],Tn=Hn.get(Un);Nn(Un,!1),_t(Tn)}}En==null||En(kn)}}function mr(Fe){Promise.resolve().then(Fe)}var Qn="__RC_UTIL_PATH_SPLIT__",ht=function(We){return We.join(Qn)},Et=function(We){return We.split(Qn)},zt="rc-menu-more";function fn(){var Fe=ge.useState({}),We=(0,ye.Z)(Fe,2),je=We[1],et=(0,ge.useRef)(new Map),tt=(0,ge.useRef)(new Map),kt=ge.useState([]),Wt=(0,ye.Z)(kt,2),Sn=Wt[0],Nn=Wt[1],En=(0,ge.useRef)(0),cn=(0,ge.useRef)(!1),un=function(){cn.current||je({})},Gt=(0,ge.useCallback)(function(ur,Ve){var Je=ht(Ve);tt.current.set(Je,ur),et.current.set(ur,Je),En.current+=1;var Pt=En.current;mr(function(){Pt===En.current&&un()})},[]),kn=(0,ge.useCallback)(function(ur,Ve){var Je=ht(Ve);tt.current.delete(Je),et.current.delete(ur)},[]),ir=(0,ge.useCallback)(function(ur){Nn(ur)},[]),$n=(0,ge.useCallback)(function(ur,Ve){var Je=et.current.get(ur)||"",Pt=Et(Je);return Ve&&Sn.includes(Pt[0])&&Pt.unshift(zt),Pt},[Sn]),Hn=(0,ge.useCallback)(function(ur,Ve){return ur.some(function(Je){var Pt=$n(Je,!0);return Pt.includes(Ve)})},[$n]),Gn=function(){var Ve=(0,Ge.Z)(et.current.keys());return Sn.length&&Ve.push(zt),Ve},ar=(0,ge.useCallback)(function(ur){var Ve="".concat(et.current.get(ur)).concat(Qn),Je=new Set;return(0,Ge.Z)(tt.current.keys()).forEach(function(Pt){Pt.startsWith(Ve)&&Je.add(tt.current.get(Pt))}),Je},[]);return ge.useEffect(function(){return function(){cn.current=!0}},[]),{registerPath:Gt,unregisterPath:kn,refreshOverflowKeys:ir,isSubPathKey:Hn,getKeyPath:$n,getKeys:Gn,getSubPathKeys:ar}}function at(Fe){var We=ge.useRef(Fe);We.current=Fe;var je=ge.useCallback(function(){for(var et,tt=arguments.length,kt=new Array(tt),Wt=0;Wt<tt;Wt++)kt[Wt]=arguments[Wt];return(et=We.current)===null||et===void 0?void 0:et.call.apply(et,[We].concat(kt))},[]);return Fe?je:void 0}var Rt=Math.random().toFixed(5).toString().slice(2),on=0;function tn(Fe){var We=(0,ln.Z)(Fe,{value:Fe}),je=(0,ye.Z)(We,2),et=je[0],tt=je[1];return ge.useEffect(function(){on+=1;var kt="".concat(Rt,"-").concat(on);tt("rc-menu-uuid-".concat(kt))},[]),et}var Mn=ie(15671),wn=ie(43144),rr=ie(60136),zr=ie(51630),vr=ie(98423),yr=ie(42550);function Lr(Fe,We,je,et){var tt=ge.useContext(se),kt=tt.activeKey,Wt=tt.onActive,Sn=tt.onInactive,Nn={active:kt===Fe};return We||(Nn.onMouseEnter=function(En){je==null||je({key:Fe,domEvent:En}),Wt(Fe)},Nn.onMouseLeave=function(En){et==null||et({key:Fe,domEvent:En}),Sn(Fe)}),Nn}function Dr(Fe){var We=ge.useContext(se),je=We.mode,et=We.rtl,tt=We.inlineIndent;if(je!=="inline")return null;var kt=Fe;return et?{paddingRight:kt*tt}:{paddingLeft:kt*tt}}function hi(Fe){var We=Fe.icon,je=Fe.props,et=Fe.children,tt;return We===null||We===!1?null:(typeof We=="function"?tt=ge.createElement(We,(0,Re.Z)({},je)):typeof We!="boolean"&&(tt=We),tt||et||null)}var Vn=["item"];function br(Fe){var We=Fe.item,je=(0,_e.Z)(Fe,Vn);return Object.defineProperty(je,"item",{get:function(){return(0,zn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),We}}),je}var Ui=["title","attribute","elementRef"],na=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Wr=["active"],vi=function(Fe){(0,rr.Z)(je,Fe);var We=(0,zr.Z)(je);function je(){return(0,Mn.Z)(this,je),We.apply(this,arguments)}return(0,wn.Z)(je,[{key:"render",value:function(){var tt=this.props,kt=tt.title,Wt=tt.attribute,Sn=tt.elementRef,Nn=(0,_e.Z)(tt,Ui),En=(0,vr.Z)(Nn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,zn.ZP)(!Wt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),ge.createElement(rn.Item,(0,fe.Z)({},Wt,{title:typeof kt=="string"?kt:void 0},En,{ref:Sn}))}}]),je}(ge.Component),ra=ge.forwardRef(function(Fe,We){var je,et=Fe.style,tt=Fe.className,kt=Fe.eventKey,Wt=Fe.warnKey,Sn=Fe.disabled,Nn=Fe.itemIcon,En=Fe.children,cn=Fe.role,un=Fe.onMouseEnter,Gt=Fe.onMouseLeave,kn=Fe.onClick,ir=Fe.onKeyDown,$n=Fe.onFocus,Hn=(0,_e.Z)(Fe,na),Gn=le(kt),ar=ge.useContext(se),ur=ar.prefixCls,Ve=ar.onItemClick,Je=ar.disabled,Pt=ar.overflowDisabled,_t=ar.itemIcon,hn=ar.selectedKeys,Dn=ar.onActive,An=ge.useContext(Ht),or=An._internalRenderMenuItem,Un="".concat(ur,"-item"),Tn=ge.useRef(),tr=ge.useRef(),dr=Je||Sn,Pr=(0,yr.x1)(We,tr),fr=dn(kt),Fr=function(qi){return{key:kt,keyPath:(0,Ge.Z)(fr).reverse(),item:Tn.current,domEvent:qi}},ri=Nn||_t,Vr=Lr(kt,dr,un,Gt),ii=Vr.active,Br=(0,_e.Z)(Vr,Wr),Jr=hn.includes(kt),si=Dr(fr.length),_i=function(qi){if(!dr){var Oi=Fr(qi);kn==null||kn(br(Oi)),Ve(Oi)}},Hr=function(qi){if(ir==null||ir(qi),qi.which===Xt.Z.ENTER){var Oi=Fr(qi);kn==null||kn(br(Oi)),Ve(Oi)}},Bi=function(qi){Dn(kt),$n==null||$n(qi)},zi={};Fe.role==="option"&&(zi["aria-selected"]=Jr);var Ia=ge.createElement(vi,(0,fe.Z)({ref:Tn,elementRef:Pr,role:cn===null?"none":cn||"menuitem",tabIndex:Sn?null:-1,"data-menu-id":Pt&&Gn?null:Gn},Hn,Br,zi,{component:"li","aria-disabled":Sn,style:(0,Re.Z)((0,Re.Z)({},si),et),className:ke()(Un,(je={},(0,Te.Z)(je,"".concat(Un,"-active"),ii),(0,Te.Z)(je,"".concat(Un,"-selected"),Jr),(0,Te.Z)(je,"".concat(Un,"-disabled"),dr),je),tt),onClick:_i,onKeyDown:Hr,onFocus:Bi}),En,ge.createElement(hi,{props:(0,Re.Z)((0,Re.Z)({},Fe),{},{isSelected:Jr}),icon:ri}));return or&&(Ia=or(Ia,Fe,{selected:Jr})),Ia});function Kr(Fe,We){var je=Fe.eventKey,et=an(),tt=dn(je);return ge.useEffect(function(){if(et)return et.registerPath(je,tt),function(){et.unregisterPath(je,tt)}},[tt]),et?null:ge.createElement(ra,(0,fe.Z)({},Fe,{ref:We}))}var Vi=ge.forwardRef(Kr),lr=["className","children"],Na=function(We,je){var et=We.className,tt=We.children,kt=(0,_e.Z)(We,lr),Wt=ge.useContext(se),Sn=Wt.prefixCls,Nn=Wt.mode,En=Wt.rtl;return ge.createElement("ul",(0,fe.Z)({className:ke()(Sn,En&&"".concat(Sn,"-rtl"),"".concat(Sn,"-sub"),"".concat(Sn,"-").concat(Nn==="inline"?"inline":"vertical"),et),role:"menu"},kt,{"data-menu-list":!0,ref:je}),tt)},Ca=ge.forwardRef(Na);Ca.displayName="SubMenuList";var ho=Ca,Ha=ie(50344);function _a(Fe,We){return(0,Ha.Z)(Fe).map(function(je,et){if(ge.isValidElement(je)){var tt,kt,Wt=je.key,Sn=(tt=(kt=je.props)===null||kt===void 0?void 0:kt.eventKey)!==null&&tt!==void 0?tt:Wt,Nn=Sn==null;Nn&&(Sn="tmp_key-".concat([].concat((0,Ge.Z)(We),[et]).join("-")));var En={key:Sn,eventKey:Sn};return ge.cloneElement(je,En)}return je})}var Ji=ie(62709),Fa={adjustX:1,adjustY:1},ya={topLeft:{points:["bl","tl"],overflow:Fa},topRight:{points:["br","tr"],overflow:Fa},bottomLeft:{points:["tl","bl"],overflow:Fa},bottomRight:{points:["tr","br"],overflow:Fa},leftTop:{points:["tr","tl"],overflow:Fa},leftBottom:{points:["br","bl"],overflow:Fa},rightTop:{points:["tl","tr"],overflow:Fa},rightBottom:{points:["bl","br"],overflow:Fa}},Wa={topLeft:{points:["bl","tl"],overflow:Fa},topRight:{points:["br","tr"],overflow:Fa},bottomLeft:{points:["tl","bl"],overflow:Fa},bottomRight:{points:["tr","br"],overflow:Fa},rightTop:{points:["tr","tl"],overflow:Fa},rightBottom:{points:["br","bl"],overflow:Fa},leftTop:{points:["tl","tr"],overflow:Fa},leftBottom:{points:["bl","br"],overflow:Fa}},po=null;function ja(Fe,We,je){if(We)return We;if(je)return je[Fe]||je.other}var Pa={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function mo(Fe){var We=Fe.prefixCls,je=Fe.visible,et=Fe.children,tt=Fe.popup,kt=Fe.popupStyle,Wt=Fe.popupClassName,Sn=Fe.popupOffset,Nn=Fe.disabled,En=Fe.mode,cn=Fe.onVisibleChange,un=ge.useContext(se),Gt=un.getPopupContainer,kn=un.rtl,ir=un.subMenuOpenDelay,$n=un.subMenuCloseDelay,Hn=un.builtinPlacements,Gn=un.triggerSubMenuAction,ar=un.forceSubMenuRender,ur=un.rootClassName,Ve=un.motion,Je=un.defaultMotions,Pt=ge.useState(!1),_t=(0,ye.Z)(Pt,2),hn=_t[0],Dn=_t[1],An=kn?(0,Re.Z)((0,Re.Z)({},Wa),Hn):(0,Re.Z)((0,Re.Z)({},ya),Hn),or=Pa[En],Un=ja(En,Ve,Je),Tn=ge.useRef(Un);En!=="inline"&&(Tn.current=Un);var tr=(0,Re.Z)((0,Re.Z)({},Tn.current),{},{leavedClassName:"".concat(We,"-hidden"),removeOnLeave:!1,motionAppear:!0}),dr=ge.useRef();return ge.useEffect(function(){return dr.current=(0,Tt.Z)(function(){Dn(je)}),function(){Tt.Z.cancel(dr.current)}},[je]),ge.createElement(Ji.Z,{prefixCls:We,popupClassName:ke()("".concat(We,"-popup"),(0,Te.Z)({},"".concat(We,"-rtl"),kn),Wt,ur),stretch:En==="horizontal"?"minWidth":null,getPopupContainer:Gt,builtinPlacements:An,popupPlacement:or,popupVisible:hn,popup:tt,popupStyle:kt,popupAlign:Sn&&{offset:Sn},action:Nn?[]:[Gn],mouseEnterDelay:ir,mouseLeaveDelay:$n,onPopupVisibleChange:cn,forceRender:ar,popupMotion:tr,fresh:!0},et)}var Eo=ie(62874);function no(Fe){var We=Fe.id,je=Fe.open,et=Fe.keyPath,tt=Fe.children,kt="inline",Wt=ge.useContext(se),Sn=Wt.prefixCls,Nn=Wt.forceSubMenuRender,En=Wt.motion,cn=Wt.defaultMotions,un=Wt.mode,Gt=ge.useRef(!1);Gt.current=un===kt;var kn=ge.useState(!Gt.current),ir=(0,ye.Z)(kn,2),$n=ir[0],Hn=ir[1],Gn=Gt.current?je:!1;ge.useEffect(function(){Gt.current&&Hn(!1)},[un]);var ar=(0,Re.Z)({},ja(kt,En,cn));et.length>1&&(ar.motionAppear=!1);var ur=ar.onVisibleChanged;return ar.onVisibleChanged=function(Ve){return!Gt.current&&!Ve&&Hn(!0),ur==null?void 0:ur(Ve)},$n?null:ge.createElement(ft,{mode:kt,locked:!Gt.current},ge.createElement(Eo.Z,(0,fe.Z)({visible:Gn},ar,{forceRender:Nn,removeOnLeave:!1,leavedClassName:"".concat(Sn,"-hidden")}),function(Ve){var Je=Ve.className,Pt=Ve.style;return ge.createElement(ho,{id:We,className:Je,style:Pt},tt)}))}var ia=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Zt=["active"],At=function(We){var je,et=We.style,tt=We.className,kt=We.title,Wt=We.eventKey,Sn=We.warnKey,Nn=We.disabled,En=We.internalPopupClose,cn=We.children,un=We.itemIcon,Gt=We.expandIcon,kn=We.popupClassName,ir=We.popupOffset,$n=We.popupStyle,Hn=We.onClick,Gn=We.onMouseEnter,ar=We.onMouseLeave,ur=We.onTitleClick,Ve=We.onTitleMouseEnter,Je=We.onTitleMouseLeave,Pt=(0,_e.Z)(We,ia),_t=le(Wt),hn=ge.useContext(se),Dn=hn.prefixCls,An=hn.mode,or=hn.openKeys,Un=hn.disabled,Tn=hn.overflowDisabled,tr=hn.activeKey,dr=hn.selectedKeys,Pr=hn.itemIcon,fr=hn.expandIcon,Fr=hn.onItemClick,ri=hn.onOpenChange,Vr=hn.onActive,ii=ge.useContext(Ht),Br=ii._internalRenderSubMenuItem,Jr=ge.useContext(gt),si=Jr.isSubPathKey,_i=dn(),Hr="".concat(Dn,"-submenu"),Bi=Un||Nn,zi=ge.useRef(),Ia=ge.useRef(),ma=un!=null?un:Pr,qi=Gt!=null?Gt:fr,Oi=or.includes(Wt),Ri=!Tn&&Oi,xi=si(dr,Wt),ea=Lr(Wt,Bi,Ve,Je),wi=ea.active,ci=(0,_e.Z)(ea,Zt),Wi=ge.useState(!1),ha=(0,ye.Z)(Wi,2),go=ha[0],lo=ha[1],Ua=function(yo){Bi||lo(yo)},Ba=function(yo){Ua(!0),Gn==null||Gn({key:Wt,domEvent:yo})},Ea=function(yo){Ua(!1),ar==null||ar({key:Wt,domEvent:yo})},ji=ge.useMemo(function(){return wi||(An!=="inline"?go||si([tr],Wt):!1)},[An,wi,tr,go,Wt,si]),Ao=Dr(_i.length),la=function(yo){Bi||(ur==null||ur({key:Wt,domEvent:yo}),An==="inline"&&ri(Wt,!Oi))},Li=at(function(ro){Hn==null||Hn(br(ro)),Fr(ro)}),xa=function(yo){An!=="inline"&&ri(Wt,yo)},Ya=function(){Vr(Wt)},Ma=_t&&"".concat(_t,"-popup"),Ta=ge.createElement("div",(0,fe.Z)({role:"menuitem",style:Ao,className:"".concat(Hr,"-title"),tabIndex:Bi?null:-1,ref:zi,title:typeof kt=="string"?kt:null,"data-menu-id":Tn&&_t?null:_t,"aria-expanded":Ri,"aria-haspopup":!0,"aria-controls":Ma,"aria-disabled":Bi,onClick:la,onFocus:Ya},ci),kt,ge.createElement(hi,{icon:An!=="horizontal"?qi:void 0,props:(0,Re.Z)((0,Re.Z)({},We),{},{isOpen:Ri,isSubMenu:!0})},ge.createElement("i",{className:"".concat(Hr,"-arrow")}))),Ki=ge.useRef(An);if(An!=="inline"&&_i.length>1?Ki.current="vertical":Ki.current=An,!Tn){var Ja=Ki.current;Ta=ge.createElement(mo,{mode:Ja,prefixCls:Hr,visible:!En&&Ri&&An!=="inline",popupClassName:kn,popupOffset:ir,popupStyle:$n,popup:ge.createElement(ft,{mode:Ja==="horizontal"?"vertical":Ja},ge.createElement(ho,{id:Ma,ref:Ia},cn)),disabled:Bi,onVisibleChange:xa},Ta)}var vo=ge.createElement(rn.Item,(0,fe.Z)({role:"none"},Pt,{component:"li",style:et,className:ke()(Hr,"".concat(Hr,"-").concat(An),tt,(je={},(0,Te.Z)(je,"".concat(Hr,"-open"),Ri),(0,Te.Z)(je,"".concat(Hr,"-active"),ji),(0,Te.Z)(je,"".concat(Hr,"-selected"),xi),(0,Te.Z)(je,"".concat(Hr,"-disabled"),Bi),je)),onMouseEnter:Ba,onMouseLeave:Ea}),Ta,!Tn&&ge.createElement(no,{id:Ma,open:Ri,keyPath:_i},cn));return Br&&(vo=Br(vo,We,{selected:xi,active:ji,open:Ri,disabled:Bi})),ge.createElement(ft,{onItemClick:Li,mode:An==="horizontal"?"vertical":An,itemIcon:ma,expandIcon:qi},vo)};function xn(Fe){var We=Fe.eventKey,je=Fe.children,et=dn(We),tt=_a(je,et),kt=an();ge.useEffect(function(){if(kt)return kt.registerPath(We,et),function(){kt.unregisterPath(We,et)}},[et]);var Wt;return kt?Wt=tt:Wt=ge.createElement(At,Fe,tt),ge.createElement(vn.Provider,{value:et},Wt)}var jn=ie(71002),hr=["className","title","eventKey","children"],Qr=["children"],ni=function(We){var je=We.className,et=We.title,tt=We.eventKey,kt=We.children,Wt=(0,_e.Z)(We,hr),Sn=ge.useContext(se),Nn=Sn.prefixCls,En="".concat(Nn,"-item-group");return ge.createElement("li",(0,fe.Z)({role:"presentation"},Wt,{onClick:function(un){return un.stopPropagation()},className:ke()(En,je)}),ge.createElement("div",{role:"presentation",className:"".concat(En,"-title"),title:typeof et=="string"?et:void 0},et),ge.createElement("ul",{role:"group",className:"".concat(En,"-list")},kt))};function mi(Fe){var We=Fe.children,je=(0,_e.Z)(Fe,Qr),et=dn(je.eventKey),tt=_a(We,et),kt=an();return kt?tt:ge.createElement(ni,(0,vr.Z)(je,["warnKey"]),tt)}function ki(Fe){var We=Fe.className,je=Fe.style,et=ge.useContext(se),tt=et.prefixCls,kt=an();return kt?null:ge.createElement("li",{role:"separator",className:ke()("".concat(tt,"-item-divider"),We),style:je})}var Si=["label","children","key","type"];function Qi(Fe){return(Fe||[]).map(function(We,je){if(We&&(0,jn.Z)(We)==="object"){var et=We,tt=et.label,kt=et.children,Wt=et.key,Sn=et.type,Nn=(0,_e.Z)(et,Si),En=Wt!=null?Wt:"tmp-".concat(je);return kt||Sn==="group"?Sn==="group"?ge.createElement(mi,(0,fe.Z)({key:En},Nn,{title:tt}),Qi(kt)):ge.createElement(xn,(0,fe.Z)({key:En},Nn,{title:tt}),Qi(kt)):Sn==="divider"?ge.createElement(ki,(0,fe.Z)({key:En},Nn)):ge.createElement(Vi,(0,fe.Z)({key:En},Nn),tt)}return null}).filter(function(We){return We})}function aa(Fe,We,je){var et=Fe;return We&&(et=Qi(We)),_a(et,je)}var ba=["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"],sn=[],bn=ge.forwardRef(function(Fe,We){var je,et,tt=Fe,kt=tt.prefixCls,Wt=kt===void 0?"rc-menu":kt,Sn=tt.rootClassName,Nn=tt.style,En=tt.className,cn=tt.tabIndex,un=cn===void 0?0:cn,Gt=tt.items,kn=tt.children,ir=tt.direction,$n=tt.id,Hn=tt.mode,Gn=Hn===void 0?"vertical":Hn,ar=tt.inlineCollapsed,ur=tt.disabled,Ve=tt.disabledOverflow,Je=tt.subMenuOpenDelay,Pt=Je===void 0?.1:Je,_t=tt.subMenuCloseDelay,hn=_t===void 0?.1:_t,Dn=tt.forceSubMenuRender,An=tt.defaultOpenKeys,or=tt.openKeys,Un=tt.activeKey,Tn=tt.defaultActiveFirst,tr=tt.selectable,dr=tr===void 0?!0:tr,Pr=tt.multiple,fr=Pr===void 0?!1:Pr,Fr=tt.defaultSelectedKeys,ri=tt.selectedKeys,Vr=tt.onSelect,ii=tt.onDeselect,Br=tt.inlineIndent,Jr=Br===void 0?24:Br,si=tt.motion,_i=tt.defaultMotions,Hr=tt.triggerSubMenuAction,Bi=Hr===void 0?"hover":Hr,zi=tt.builtinPlacements,Ia=tt.itemIcon,ma=tt.expandIcon,qi=tt.overflowedIndicator,Oi=qi===void 0?"...":qi,Ri=tt.overflowedIndicatorPopupClassName,xi=tt.getPopupContainer,ea=tt.onClick,wi=tt.onOpenChange,ci=tt.onKeyDown,Wi=tt.openAnimation,ha=tt.openTransitionName,go=tt._internalRenderMenuItem,lo=tt._internalRenderSubMenuItem,Ua=(0,_e.Z)(tt,ba),Ba=ge.useMemo(function(){return aa(kn,Gt,sn)},[kn,Gt]),Ea=ge.useState(!1),ji=(0,ye.Z)(Ea,2),Ao=ji[0],la=ji[1],Li=ge.useRef(),xa=tn($n),Ya=ir==="rtl",Ma=(0,ln.Z)(An,{value:or,postState:function(wo){return wo||sn}}),Ta=(0,ye.Z)(Ma,2),Ki=Ta[0],Ja=Ta[1],vo=function(wo){var qo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ss(){Ja(wo),wi==null||wi(wo)}qo?(0,Ce.flushSync)(Ss):Ss()},ro=ge.useState(Ki),yo=(0,ye.Z)(ro,2),Mo=yo[0],Xo=yo[1],io=ge.useRef(!1),So=ge.useMemo(function(){return(Gn==="inline"||Gn==="vertical")&&ar?["vertical",ar]:[Gn,!1]},[Gn,ar]),os=(0,ye.Z)(So,2),rs=os[0],cs=os[1],Oo=rs==="inline",bo=ge.useState(rs),sa=(0,ye.Z)(bo,2),Sa=sa[0],Qa=sa[1],co=ge.useState(cs),jo=(0,ye.Z)(co,2),us=jo[0],xs=jo[1];ge.useEffect(function(){Qa(rs),xs(cs),io.current&&(Oo?Ja(Mo):vo(sn))},[rs,cs]);var Js=ge.useState(0),Fs=(0,ye.Z)(Js,2),ds=Fs[0],zs=Fs[1],za=ds>=Ba.length-1||Sa!=="horizontal"||Ve;ge.useEffect(function(){Oo&&Xo(Ki)},[Ki]),ge.useEffect(function(){return io.current=!0,function(){io.current=!1}},[]);var ga=fn(),so=ga.registerPath,ko=ga.unregisterPath,fs=ga.refreshOverflowKeys,ss=ga.isSubPathKey,$l=ga.getKeyPath,ml=ga.getKeys,Sl=ga.getSubPathKeys,Ka=ge.useMemo(function(){return{registerPath:so,unregisterPath:ko}},[so,ko]),ei=ge.useMemo(function(){return{isSubPathKey:ss}},[ss]);ge.useEffect(function(){fs(za?sn:Ba.slice(ds+1).map(function(is){return is.key}))},[ds,za]);var Xi=(0,ln.Z)(Un||Tn&&((je=Ba[0])===null||je===void 0?void 0:je.key),{value:Un}),Yi=(0,ye.Z)(Xi,2),pa=Yi[0],Uo=Yi[1],Yo=at(function(is){Uo(is)}),rl=at(function(){Uo(void 0)});(0,ge.useImperativeHandle)(We,function(){return{list:Li.current,focus:function(wo){var qo,Ss=pa!=null?pa:(qo=Ba.find(function(zl){return!zl.props.disabled}))===null||qo===void 0?void 0:qo.key;if(Ss){var Ds,al,Ps;(Ds=Li.current)===null||Ds===void 0||(al=Ds.querySelector("li[data-menu-id='".concat(ue(xa,Ss),"']")))===null||al===void 0||(Ps=al.focus)===null||Ps===void 0||Ps.call(al,wo)}}}});var ul=(0,ln.Z)(Fr||[],{value:ri,postState:function(wo){return Array.isArray(wo)?wo:wo==null?sn:[wo]}}),wl=(0,ye.Z)(ul,2),uo=wl[0],Qs=wl[1],Pl=function(wo){if(dr){var qo=wo.key,Ss=uo.includes(qo),Ds;fr?Ss?Ds=uo.filter(function(Ps){return Ps!==qo}):Ds=[].concat((0,Ge.Z)(uo),[qo]):Ds=[qo],Qs(Ds);var al=(0,Re.Z)((0,Re.Z)({},wo),{},{selectedKeys:Ds});Ss?ii==null||ii(al):Vr==null||Vr(al)}!fr&&Ki.length&&Sa!=="inline"&&vo(sn)},Sc=at(function(is){ea==null||ea(br(is)),Pl(is)}),Vl=at(function(is,wo){var qo=Ki.filter(function(Ds){return Ds!==is});if(wo)qo.push(is);else if(Sa!=="inline"){var Ss=Sl(is);qo=qo.filter(function(Ds){return!Ss.has(Ds)})}(0,_n.Z)(Ki,qo,!0)||vo(qo,!0)}),Cl=function(wo,qo){var Ss=qo!=null?qo:!Ki.includes(wo);Vl(wo,Ss)},il=Sr(Sa,pa,Ya,xa,Li,ml,$l,Uo,Cl,ci);ge.useEffect(function(){la(!0)},[]);var ql=ge.useMemo(function(){return{_internalRenderMenuItem:go,_internalRenderSubMenuItem:lo}},[go,lo]),dl=Sa!=="horizontal"||Ve?Ba:Ba.map(function(is,wo){return ge.createElement(ft,{key:is.key,overflowDisabled:wo>ds},is)}),ec=ge.createElement(rn,(0,fe.Z)({id:$n,ref:Li,prefixCls:"".concat(Wt,"-overflow"),component:"ul",itemComponent:Vi,className:ke()(Wt,"".concat(Wt,"-root"),"".concat(Wt,"-").concat(Sa),En,(et={},(0,Te.Z)(et,"".concat(Wt,"-inline-collapsed"),us),(0,Te.Z)(et,"".concat(Wt,"-rtl"),Ya),et),Sn),dir:ir,style:Nn,role:"menu",tabIndex:un,data:dl,renderRawItem:function(wo){return wo},renderRawRest:function(wo){var qo=wo.length,Ss=qo?Ba.slice(-qo):null;return ge.createElement(xn,{eventKey:zt,title:Oi,disabled:za,internalPopupClose:qo===0,popupClassName:Ri},Ss)},maxCount:Sa!=="horizontal"||Ve?rn.INVALIDATE:rn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(wo){zs(wo)},onKeyDown:il},Ua));return ge.createElement(Ht.Provider,{value:ql},ge.createElement(Oe.Provider,{value:xa},ge.createElement(ft,{prefixCls:Wt,rootClassName:Sn,mode:Sa,openKeys:Ki,rtl:Ya,disabled:ur,motion:Ao?si:null,defaultMotions:Ao?_i:null,activeKey:pa,onActive:Yo,onInactive:rl,selectedKeys:uo,inlineIndent:Jr,subMenuOpenDelay:Pt,subMenuCloseDelay:hn,forceSubMenuRender:Dn,builtinPlacements:zi,triggerSubMenuAction:Bi,getPopupContainer:xi,itemIcon:Ia,expandIcon:ma,onItemClick:Sc,onOpenChange:Vl},ge.createElement(gt.Provider,{value:ei},ec),ge.createElement("div",{style:{display:"none"},"aria-hidden":!0},ge.createElement(qt.Provider,{value:Ka},Ba)))))}),Fn=bn,he=Fn;he.Item=Vi,he.SubMenu=xn,he.ItemGroup=mi,he.Divider=ki;var Pe=he},81626:function(Ln,Kt){"use strict";Kt.Z={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"}},46762:function(Ln,Kt){"use strict";var ie;var fe=Symbol.for("react.element"),Te=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ke=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),lt=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),ct;ct=Symbol.for("react.module.reference");function qe(be){if(typeof be=="object"&&be!==null){var vt=be.$$typeof;switch(vt){case fe:switch(be=be.type,be){case Re:case ye:case Ge:case Ae:case lt:return be;default:switch(be=be&&be.$$typeof,be){case ke:case ce:case ge:case st:case ze:case _e:return be;default:return vt}}case Te:return vt}}}ie=ce,ie=_e,ie=fe,ie=ge,ie=Re,ie=st,ie=ze,ie=Te,ie=ye,ie=Ge,ie=Ae,ie=lt,ie=function(){return!1},ie=function(){return!1},ie=function(be){return qe(be)===ce},ie=function(be){return qe(be)===_e},ie=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===fe},ie=function(be){return qe(be)===ge},Kt.isFragment=function(be){return qe(be)===Re},ie=function(be){return qe(be)===st},ie=function(be){return qe(be)===ze},ie=function(be){return qe(be)===Te},ie=function(be){return qe(be)===ye},ie=function(be){return qe(be)===Ge},ie=function(be){return qe(be)===Ae},ie=function(be){return qe(be)===lt},ie=function(be){return typeof be=="string"||typeof be=="function"||be===Re||be===ye||be===Ge||be===Ae||be===lt||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===st||be.$$typeof===ze||be.$$typeof===_e||be.$$typeof===ce||be.$$typeof===ge||be.$$typeof===ct||be.getModuleId!==void 0)},ie=qe},35110:function(Ln,Kt,ie){"use strict";Ln.exports=ie(46762)},66680:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});var fe=ie(67294);function Te(Re){var Ge=fe.useRef();Ge.current=Re;var ye=fe.useCallback(function(){for(var _e,ce=arguments.length,ke=new Array(ce),ge=0;ge<ce;ge++)ke[ge]=arguments[ge];return(_e=Ge.current)===null||_e===void 0?void 0:_e.call.apply(_e,[Ge].concat(ke))},[]);return ye}},21770:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return _e}});var fe=ie(97685),Te=ie(66680),Re=ie(8410),Ge=ie(63896);function ye(ce){return ce!==void 0}function _e(ce,ke){var ge=ke||{},Ae=ge.defaultValue,lt=ge.value,ze=ge.onChange,st=ge.postState,dt=(0,Ge.Z)(function(){return ye(lt)?lt:ye(Ae)?typeof Ae=="function"?Ae():Ae:typeof ce=="function"?ce():ce}),ct=(0,fe.Z)(dt,2),qe=ct[0],be=ct[1],vt=lt!==void 0?lt:qe,Dt=st?st(vt):vt,it=(0,Te.Z)(ze),ot=(0,Ge.Z)([vt]),Ce=(0,fe.Z)(ot,2),Se=Ce[0],He=Ce[1];(0,Re.o)(function(){var xt=Se[0];qe!==xt&&it(qe,xt)},[Se]),(0,Re.o)(function(){ye(lt)||be(lt)},[lt]);var Ue=(0,Te.Z)(function(xt,mt){be(xt,mt),He([vt],mt)});return[Dt,Ue]}},91881:function(Ln,Kt,ie){"use strict";var fe=ie(71002),Te=ie(80334);function Re(Ge,ye){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ce=new Set;function ke(ge,Ae){var lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ze=ce.has(ge);if((0,Te.ZP)(!ze,"Warning: There may be circular references"),ze)return!1;if(ge===Ae)return!0;if(_e&<>1)return!1;ce.add(ge);var st=lt+1;if(Array.isArray(ge)){if(!Array.isArray(Ae)||ge.length!==Ae.length)return!1;for(var dt=0;dt<ge.length;dt++)if(!ke(ge[dt],Ae[dt],st))return!1;return!0}if(ge&&Ae&&(0,fe.Z)(ge)==="object"&&(0,fe.Z)(Ae)==="object"){var ct=Object.keys(ge);return ct.length!==Object.keys(Ae).length?!1:ct.every(function(qe){return ke(ge[qe],Ae[qe],st)})}return!1}return ke(Ge,ye)}Kt.Z=Re},98423:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return Te}});var fe=ie(1413);function Te(Re,Ge){var ye=(0,fe.Z)({},Re);return Array.isArray(Ge)&&Ge.forEach(function(_e){delete ye[_e]}),ye}},73299:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return li}});var fe=ie(87462),Te=ie(1413),Re=ie(71002),Ge=ie(97685),ye=ie(4942),_e=ie(45987),ce=ie(67294),ke=ie(73935),ge=ie(94184),Ae=ie.n(ge),lt=ie(48555),ze=ce.forwardRef(function(Lt,Kn){var Bn=Lt.height,yn=Lt.offsetY,xr=Lt.offsetX,Sr=Lt.children,mr=Lt.prefixCls,Qn=Lt.onInnerResize,ht=Lt.innerProps,Et=Lt.rtl,zt=Lt.extra,fn={},at={display:"flex",flexDirection:"column"};if(yn!==void 0){var Rt;fn={height:Bn,position:"relative",overflow:"hidden"},at=(0,Te.Z)((0,Te.Z)({},at),{},(Rt={transform:"translateY(".concat(yn,"px)")},(0,ye.Z)(Rt,Et?"marginRight":"marginLeft",-xr),(0,ye.Z)(Rt,"position","absolute"),(0,ye.Z)(Rt,"left",0),(0,ye.Z)(Rt,"right",0),(0,ye.Z)(Rt,"top",0),Rt))}return ce.createElement("div",{style:fn},ce.createElement(lt.Z,{onResize:function(tn){var Mn=tn.offsetHeight;Mn&&Qn&&Qn()}},ce.createElement("div",(0,fe.Z)({style:at,className:Ae()((0,ye.Z)({},"".concat(mr,"-holder-inner"),mr)),ref:Kn},ht),Sr,zt)))});ze.displayName="Filler";var st=ze,dt=function(Kn){return+setTimeout(Kn,16)},ct=function(Kn){return clearTimeout(Kn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(dt=function(Kn){return window.requestAnimationFrame(Kn)},ct=function(Kn){return window.cancelAnimationFrame(Kn)});var qe=0,be=new Map;function vt(Lt){be.delete(Lt)}var Dt=function(Kn){var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;qe+=1;var yn=qe;function xr(Sr){if(Sr===0)vt(yn),Kn();else{var mr=dt(function(){xr(Sr-1)});be.set(yn,mr)}}return xr(Bn),yn};Dt.cancel=function(Lt){var Kn=be.get(Lt);return vt(Kn),ct(Kn)};var it=Dt;function ot(Lt,Kn){var Bn="touches"in Lt?Lt.touches[0]:Lt;return Bn[Kn?"pageX":"pageY"]}var Ce=ce.forwardRef(function(Lt,Kn){var Bn,yn=Lt.prefixCls,xr=Lt.rtl,Sr=Lt.scrollOffset,mr=Lt.scrollRange,Qn=Lt.onStartMove,ht=Lt.onStopMove,Et=Lt.onScroll,zt=Lt.horizontal,fn=Lt.spinSize,at=Lt.containerSize,Rt=Lt.style,on=Lt.thumbStyle,tn=ce.useState(!1),Mn=(0,Ge.Z)(tn,2),wn=Mn[0],rr=Mn[1],zr=ce.useState(null),vr=(0,Ge.Z)(zr,2),yr=vr[0],Lr=vr[1],Dr=ce.useState(null),hi=(0,Ge.Z)(Dr,2),Vn=hi[0],br=hi[1],Ui=!xr,na=ce.useRef(),Wr=ce.useRef(),vi=ce.useState(!1),ra=(0,Ge.Z)(vi,2),Kr=ra[0],Vi=ra[1],lr=ce.useRef(),Na=function(){clearTimeout(lr.current),Vi(!0),lr.current=setTimeout(function(){Vi(!1)},3e3)},Ca=mr-at||0,ho=at-fn||0,Ha=Ca>0,_a=ce.useMemo(function(){if(Sr===0||Ca===0)return 0;var Eo=Sr/Ca;return Eo*ho},[Sr,Ca,ho]),Ji=function(no){no.stopPropagation(),no.preventDefault()},Fa=ce.useRef({top:_a,dragging:wn,pageY:yr,startTop:Vn});Fa.current={top:_a,dragging:wn,pageY:yr,startTop:Vn};var ya=function(no){rr(!0),Lr(ot(no,zt)),br(Fa.current.top),Qn(),no.stopPropagation(),no.preventDefault()};ce.useEffect(function(){var Eo=function(At){At.preventDefault()},no=na.current,ia=Wr.current;return no.addEventListener("touchstart",Eo),ia.addEventListener("touchstart",ya),function(){no.removeEventListener("touchstart",Eo),ia.removeEventListener("touchstart",ya)}},[]);var Wa=ce.useRef();Wa.current=Ca;var po=ce.useRef();po.current=ho,ce.useEffect(function(){if(wn){var Eo,no=function(At){var xn=Fa.current,jn=xn.dragging,hr=xn.pageY,Qr=xn.startTop;if(it.cancel(Eo),jn){var ni=ot(At,zt)-hr,mi=Qr;!Ui&&zt?mi-=ni:mi+=ni;var ki=Wa.current,Si=po.current,Qi=Si?mi/Si:0,aa=Math.ceil(Qi*ki);aa=Math.max(aa,0),aa=Math.min(aa,ki),Eo=it(function(){Et(aa,zt)})}},ia=function(){rr(!1),ht()};return window.addEventListener("mousemove",no),window.addEventListener("touchmove",no),window.addEventListener("mouseup",ia),window.addEventListener("touchend",ia),function(){window.removeEventListener("mousemove",no),window.removeEventListener("touchmove",no),window.removeEventListener("mouseup",ia),window.removeEventListener("touchend",ia),it.cancel(Eo)}}},[wn]),ce.useEffect(function(){Na()},[Sr]),ce.useImperativeHandle(Kn,function(){return{delayHidden:Na}});var ja="".concat(yn,"-scrollbar"),Pa={position:"absolute",visibility:Kr&&Ha?null:"hidden"},mo={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return zt?(Pa.height=8,Pa.left=0,Pa.right=0,Pa.bottom=0,mo.height="100%",mo.width=fn,Ui?mo.left=_a:mo.right=_a):(Pa.width=8,Pa.top=0,Pa.bottom=0,Ui?Pa.right=0:Pa.left=0,mo.width="100%",mo.height=fn,mo.top=_a),ce.createElement("div",{ref:na,className:Ae()(ja,(Bn={},(0,ye.Z)(Bn,"".concat(ja,"-horizontal"),zt),(0,ye.Z)(Bn,"".concat(ja,"-vertical"),!zt),(0,ye.Z)(Bn,"".concat(ja,"-visible"),Kr),Bn)),style:(0,Te.Z)((0,Te.Z)({},Pa),Rt),onMouseDown:Ji,onMouseMove:Na},ce.createElement("div",{ref:Wr,className:Ae()("".concat(ja,"-thumb"),(0,ye.Z)({},"".concat(ja,"-thumb-moving"),wn)),style:(0,Te.Z)((0,Te.Z)({},mo),on),onMouseDown:ya}))}),Se=Ce;function He(Lt){var Kn=Lt.children,Bn=Lt.setRef,yn=ce.useCallback(function(xr){Bn(xr)},[]);return ce.cloneElement(Kn,{ref:yn})}function Ue(Lt,Kn,Bn,yn,xr,Sr,mr){var Qn=mr.getKey;return Lt.slice(Kn,Bn+1).map(function(ht,Et){var zt=Kn+Et,fn=Sr(ht,zt,{style:{width:yn}}),at=Qn(ht);return ce.createElement(He,{key:at,setRef:function(on){return xr(ht,on)}},fn)})}function xt(Lt){return Lt instanceof HTMLElement||Lt instanceof SVGElement}function mt(Lt){return xt(Lt)?Lt:Lt instanceof ce.Component?ke.findDOMNode(Lt):null}var ut=ie(15671),$e=ie(43144),Ft=function(){function Lt(){(0,ut.Z)(this,Lt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,$e.Z)(Lt,[{key:"set",value:function(Bn,yn){this.maps[Bn]=yn,this.id+=1}},{key:"get",value:function(Bn){return this.maps[Bn]}}]),Lt}(),yt=Ft;function gn(Lt,Kn,Bn){var yn=ce.useState(0),xr=(0,Ge.Z)(yn,2),Sr=xr[0],mr=xr[1],Qn=(0,ce.useRef)(new Map),ht=(0,ce.useRef)(new yt),Et=(0,ce.useRef)();function zt(){it.cancel(Et.current)}function fn(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;zt();var on=function(){Qn.current.forEach(function(Mn,wn){if(Mn&&Mn.offsetParent){var rr=mt(Mn),zr=rr.offsetHeight;ht.current.get(wn)!==zr&&ht.current.set(wn,rr.offsetHeight)}}),mr(function(Mn){return Mn+1})};Rt?on():Et.current=it(on)}function at(Rt,on){var tn=Lt(Rt),Mn=Qn.current.get(tn);on?(Qn.current.set(tn,on),fn()):Qn.current.delete(tn),!Mn!=!on&&(on?Kn==null||Kn(Rt):Bn==null||Bn(Rt))}return(0,ce.useEffect)(function(){return zt},[]),[at,fn,ht.current,Sr]}function rt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Mt=rt()?ce.useLayoutEffect:ce.useEffect,en=function(Kn,Bn){var yn=ce.useRef(!0);Mt(function(){return Kn(yn.current)},Bn),Mt(function(){return yn.current=!1,function(){yn.current=!0}},[])},Yt=function(Kn,Bn){en(function(yn){if(!yn)return Kn()},Bn)},Qe=en;function Ie(Lt){var Kn=ce.useRef();Kn.current=Lt;var Bn=ce.useCallback(function(){for(var yn,xr=arguments.length,Sr=new Array(xr),mr=0;mr<xr;mr++)Sr[mr]=arguments[mr];return(yn=Kn.current)===null||yn===void 0?void 0:yn.call.apply(yn,[Kn].concat(Sr))},[]);return Bn}function Ot(Lt){var Kn=React.useRef(!1),Bn=React.useState(Lt),yn=_slicedToArray(Bn,2),xr=yn[0],Sr=yn[1];React.useEffect(function(){return Kn.current=!1,function(){Kn.current=!0}},[]);function mr(Qn,ht){ht&&Kn.current||Sr(Qn)}return[xr,mr]}function In(Lt){return Lt!==void 0}function mn(Lt,Kn){var Bn=Kn||{},yn=Bn.defaultValue,xr=Bn.value,Sr=Bn.onChange,mr=Bn.postState,Qn=useState(function(){return In(xr)?xr:In(yn)?typeof yn=="function"?yn():yn:typeof Lt=="function"?Lt():Lt}),ht=_slicedToArray(Qn,2),Et=ht[0],zt=ht[1],fn=xr!==void 0?xr:Et,at=mr?mr(fn):fn,Rt=useEvent(Sr),on=useState([fn]),tn=_slicedToArray(on,2),Mn=tn[0],wn=tn[1];useLayoutUpdateEffect(function(){var zr=Mn[0];Et!==zr&&Rt(Et,zr)},[Mn]),useLayoutUpdateEffect(function(){In(xr)||zt(xr)},[xr]);var rr=useEvent(function(zr,vr){zt(zr,vr),wn([fn],vr)});return[at,rr]}var pt=ie(31461);function wt(Lt,Kn,Bn){var yn=React.useRef({});return(!("value"in yn.current)||Bn(yn.current.condition,Kn))&&(yn.current.value=Lt(),yn.current.condition=Kn),yn.current.value}function Qt(Lt,Kn){typeof Lt=="function"?Lt(Kn):_typeof(Lt)==="object"&&Lt&&"current"in Lt&&(Lt.current=Kn)}function Zn(){for(var Lt=arguments.length,Kn=new Array(Lt),Bn=0;Bn<Lt;Bn++)Kn[Bn]=arguments[Bn];var yn=Kn.filter(function(xr){return xr});return yn.length<=1?yn[0]:function(xr){Kn.forEach(function(Sr){Qt(Sr,xr)})}}function Cn(){for(var Lt=arguments.length,Kn=new Array(Lt),Bn=0;Bn<Lt;Bn++)Kn[Bn]=arguments[Bn];return useMemo(function(){return Zn.apply(void 0,Kn)},Kn,function(yn,xr){return yn.length!==xr.length||yn.every(function(Sr,mr){return Sr!==xr[mr]})})}function rn(Lt){var Kn,Bn,yn=isMemo(Lt)?Lt.type.type:Lt.type;return!(typeof yn=="function"&&!((Kn=yn.prototype)!==null&&Kn!==void 0&&Kn.render)||typeof Lt=="function"&&!((Bn=Lt.prototype)!==null&&Bn!==void 0&&Bn.render))}function ln(Lt){return!isValidElement(Lt)||isFragment(Lt)?!1:rn(Lt)}function zn(Lt,Kn,Bn,yn){if(!Kn.length)return Bn;var xr=_toArray(Kn),Sr=xr[0],mr=xr.slice(1),Qn;return!Lt&&typeof Sr=="number"?Qn=[]:Array.isArray(Lt)?Qn=_toConsumableArray(Lt):Qn=_objectSpread({},Lt),yn&&Bn===void 0&&mr.length===1?delete Qn[Sr][mr[0]]:Qn[Sr]=zn(Qn[Sr],mr,Bn,yn),Qn}function _n(Lt,Kn,Bn){var yn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Kn.length&&yn&&Bn===void 0&&!get(Lt,Kn.slice(0,-1))?Lt:zn(Lt,Kn,Bn,yn)}function Oe(Lt){return _typeof(Lt)==="object"&&Lt!==null&&Object.getPrototypeOf(Lt)===Object.prototype}function ue(Lt){return Array.isArray(Lt)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function ve(){for(var Lt=arguments.length,Kn=new Array(Lt),Bn=0;Bn<Lt;Bn++)Kn[Bn]=arguments[Bn];var yn=ue(Kn[0]);return Kn.forEach(function(xr){function Sr(mr,Qn){var ht=new Set(Qn),Et=get(xr,mr),zt=Array.isArray(Et);if(zt||Oe(Et)){if(!ht.has(Et)){ht.add(Et);var fn=get(yn,mr);zt?yn=_n(yn,mr,[]):(!fn||_typeof(fn)!=="object")&&(yn=_n(yn,mr,ue(Et))),le(Et).forEach(function(at){Sr([].concat(_toConsumableArray(mr),[at]),ht)})}}else yn=_n(yn,mr,Et)}Sr([])}),yn}var pe={},se=[],Be=function(Kn){se.push(Kn)};function ft(Lt,Kn){if(0)var Bn}function Bt(Lt,Kn){if(0)var Bn}function qt(){pe={}}function an(Lt,Kn,Bn){!Kn&&!pe[Bn]&&(Lt(!1,Bn),pe[Bn]=!0)}function vn(Lt,Kn){an(ft,Lt,Kn)}function dn(Lt,Kn){an(Bt,Lt,Kn)}vn.preMessage=Be,vn.resetWarned=qt,vn.noteOnce=dn;var gt=null,It=10;function Ht(Lt,Kn,Bn,yn,xr,Sr,mr,Qn){var ht=ce.useRef(),Et=ce.useState(null),zt=(0,Ge.Z)(Et,2),fn=zt[0],at=zt[1];return Qe(function(){if(fn&&fn.times<It){if(!Lt.current){at(function(Na){return(0,Te.Z)({},Na)});return}Sr();var Rt=fn.targetAlign,on=fn.originAlign,tn=fn.index,Mn=fn.offset,wn=Lt.current.clientHeight,rr=!1,zr=Rt,vr=null;if(wn){for(var yr=Rt||on,Lr=0,Dr=0,hi=0,Vn=Math.min(Kn.length-1,tn),br=0;br<=Vn;br+=1){var Ui=xr(Kn[br]);Dr=Lr;var na=Bn.get(Ui);hi=Dr+(na===void 0?yn:na),Lr=hi}for(var Wr=yr==="top"?Mn:wn-Mn,vi=Vn;vi>=0;vi-=1){var ra=xr(Kn[vi]),Kr=Bn.get(ra);if(Kr===void 0){rr=!0;break}if(Wr-=Kr,Wr<=0)break}switch(yr){case"top":vr=Dr-Mn;break;case"bottom":vr=hi-wn+Mn;break;default:{var Vi=Lt.current.scrollTop,lr=Vi+wn;Dr<Vi?zr="top":hi>lr&&(zr="bottom")}}vr!==null&&mr(vr),vr!==fn.lastTop&&(rr=!0)}rr&&at(function(Na){return(0,Te.Z)((0,Te.Z)({},Na),{},{times:Na.times+1,targetAlign:zr,lastTop:vr})})}},[fn,Lt.current]),function(Rt){if(Rt==null){Qn();return}if(it.cancel(ht.current),typeof Rt=="number")mr(Rt);else if(Rt&&(0,Re.Z)(Rt)==="object"){var on,tn=Rt.align;"index"in Rt?on=Rt.index:on=Kn.findIndex(function(rr){return xr(rr)===Rt.key});var Mn=Rt.offset,wn=Mn===void 0?0:Mn;at({times:0,index:on,offset:wn,originAlign:tn})}}}function Xt(Lt,Kn,Bn,yn){var xr=Bn-Lt,Sr=Kn-Bn,mr=Math.min(xr,Sr)*2;if(yn<=mr){var Qn=Math.floor(yn/2);return yn%2?Bn+Qn+1:Bn-Qn}return xr>Sr?Bn-(yn-Sr):Bn+(yn-xr)}function Tt(Lt,Kn,Bn){var yn=Lt.length,xr=Kn.length,Sr,mr;if(yn===0&&xr===0)return null;yn<xr?(Sr=Lt,mr=Kn):(Sr=Kn,mr=Lt);var Qn={__EMPTY_ITEM__:!0};function ht(on){return on!==void 0?Bn(on):Qn}for(var Et=null,zt=Math.abs(yn-xr)!==1,fn=0;fn<mr.length;fn+=1){var at=ht(Sr[fn]),Rt=ht(mr[fn]);if(at!==Rt){Et=fn,zt=zt||at!==ht(mr[fn+1]);break}}return Et===null?null:{index:Et,multiple:zt}}function Yn(Lt,Kn,Bn){var yn=ce.useState(Lt),xr=(0,Ge.Z)(yn,2),Sr=xr[0],mr=xr[1],Qn=ce.useState(null),ht=(0,Ge.Z)(Qn,2),Et=ht[0],zt=ht[1];return ce.useEffect(function(){var fn=Tt(Sr||[],Lt||[],Kn);(fn==null?void 0:fn.index)!==void 0&&(Bn==null||Bn(fn.index),zt(Lt[fn.index])),mr(Lt)},[Lt]),[Et]}var Rn=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),cr=Rn,Xr=function(Lt,Kn){var Bn=(0,ce.useRef)(!1),yn=(0,ce.useRef)(null);function xr(){clearTimeout(yn.current),Bn.current=!0,yn.current=setTimeout(function(){Bn.current=!1},50)}var Sr=(0,ce.useRef)({top:Lt,bottom:Kn});return Sr.current.top=Lt,Sr.current.bottom=Kn,function(mr){var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=mr<0&&Sr.current.top||mr>0&&Sr.current.bottom;return Qn&&ht?(clearTimeout(yn.current),Bn.current=!1):(!ht||Bn.current)&&xr(),!Bn.current&&ht}};function wr(Lt,Kn,Bn,yn,xr){var Sr=(0,ce.useRef)(0),mr=(0,ce.useRef)(null),Qn=(0,ce.useRef)(null),ht=(0,ce.useRef)(!1),Et=Xr(Kn,Bn);function zt(Mn,wn){it.cancel(mr.current),Sr.current+=wn,Qn.current=wn,!Et(wn)&&(cr||Mn.preventDefault(),mr.current=it(function(){var rr=ht.current?10:1;xr(Sr.current*rr),Sr.current=0}))}function fn(Mn,wn){xr(wn,!0),cr||Mn.preventDefault()}var at=(0,ce.useRef)(null),Rt=(0,ce.useRef)(null);function on(Mn){if(Lt){it.cancel(Rt.current),Rt.current=it(function(){at.current=null},2);var wn=Mn.deltaX,rr=Mn.deltaY,zr=Mn.shiftKey,vr=wn,yr=rr;(at.current==="sx"||!at.current&&zr&&rr&&!wn)&&(vr=rr,yr=0,at.current="sx");var Lr=Math.abs(vr),Dr=Math.abs(yr);at.current===null&&(at.current=yn&&Lr>Dr?"x":"y"),at.current==="y"?zt(Mn,yr):fn(Mn,vr)}}function tn(Mn){Lt&&(ht.current=Mn.detail===Qn.current)}return[on,tn]}var kr=14/15;function Ar(Lt,Kn,Bn){var yn=(0,ce.useRef)(!1),xr=(0,ce.useRef)(0),Sr=(0,ce.useRef)(null),mr=(0,ce.useRef)(null),Qn,ht=function(at){if(yn.current){var Rt=Math.ceil(at.touches[0].pageY),on=xr.current-Rt;xr.current=Rt,Bn(on)&&at.preventDefault(),clearInterval(mr.current),mr.current=setInterval(function(){on*=kr,(!Bn(on,!0)||Math.abs(on)<=.1)&&clearInterval(mr.current)},16)}},Et=function(){yn.current=!1,Qn()},zt=function(at){Qn(),at.touches.length===1&&!yn.current&&(yn.current=!0,xr.current=Math.ceil(at.touches[0].pageY),Sr.current=at.target,Sr.current.addEventListener("touchmove",ht),Sr.current.addEventListener("touchend",Et))};Qn=function(){Sr.current&&(Sr.current.removeEventListener("touchmove",ht),Sr.current.removeEventListener("touchend",Et))},Qe(function(){return Lt&&Kn.current.addEventListener("touchstart",zt),function(){var fn;(fn=Kn.current)===null||fn===void 0||fn.removeEventListener("touchstart",zt),Qn(),clearInterval(mr.current)}},[Lt])}var gi=20;function oi(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Bn=Lt/Kn*100;return isNaN(Bn)&&(Bn=0),Bn=Math.max(Bn,gi),Bn=Math.min(Bn,Lt/2),Math.floor(Bn)}function fi(Lt,Kn,Bn,yn){var xr=ce.useMemo(function(){return[new Map,[]]},[Lt,Bn.id,yn]),Sr=(0,Ge.Z)(xr,2),mr=Sr[0],Qn=Sr[1],ht=function(zt){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zt,at=mr.get(zt),Rt=mr.get(fn);if(at===void 0||Rt===void 0)for(var on=Lt.length,tn=Qn.length;tn<on;tn+=1){var Mn,wn=Lt[tn],rr=Kn(wn);mr.set(rr,tn);var zr=(Mn=Bn.get(rr))!==null&&Mn!==void 0?Mn:yn;if(Qn[tn]=(Qn[tn-1]||0)+zr,rr===zt&&(at=tn),rr===fn&&(Rt=tn),at!==void 0&&Rt!==void 0)break}return{top:Qn[at-1]||0,bottom:Qn[Rt]}};return ht}var Pi=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Or=[],Jn={overflowY:"auto",overflowAnchor:"none"};function qn(Lt,Kn){var Bn=Lt.prefixCls,yn=Bn===void 0?"rc-virtual-list":Bn,xr=Lt.className,Sr=Lt.height,mr=Lt.itemHeight,Qn=Lt.fullHeight,ht=Qn===void 0?!0:Qn,Et=Lt.style,zt=Lt.data,fn=Lt.children,at=Lt.itemKey,Rt=Lt.virtual,on=Lt.direction,tn=Lt.scrollWidth,Mn=Lt.component,wn=Mn===void 0?"div":Mn,rr=Lt.onScroll,zr=Lt.onVirtualScroll,vr=Lt.onVisibleChange,yr=Lt.innerProps,Lr=Lt.extraRender,Dr=Lt.styles,hi=(0,_e.Z)(Lt,Pi),Vn=!!(Rt!==!1&&Sr&&mr),br=Vn&&zt&&(mr*zt.length>Sr||!!tn),Ui=on==="rtl",na=Ae()(yn,(0,ye.Z)({},"".concat(yn,"-rtl"),Ui),xr),Wr=zt||Or,vi=(0,ce.useRef)(),ra=(0,ce.useRef)(),Kr=(0,ce.useState)(0),Vi=(0,Ge.Z)(Kr,2),lr=Vi[0],Na=Vi[1],Ca=(0,ce.useState)(0),ho=(0,Ge.Z)(Ca,2),Ha=ho[0],_a=ho[1],Ji=(0,ce.useState)(!1),Fa=(0,Ge.Z)(Ji,2),ya=Fa[0],Wa=Fa[1],po=function(){Wa(!0)},ja=function(){Wa(!1)},Pa=ce.useCallback(function(Tn){return typeof at=="function"?at(Tn):Tn==null?void 0:Tn[at]},[at]),mo={getKey:Pa};function Eo(Tn){Na(function(tr){var dr;typeof Tn=="function"?dr=Tn(tr):dr=Tn;var Pr=Sn(dr);return vi.current.scrollTop=Pr,Pr})}var no=(0,ce.useRef)({start:0,end:Wr.length}),ia=(0,ce.useRef)(),Zt=Yn(Wr,Pa),At=(0,Ge.Z)(Zt,1),xn=At[0];ia.current=xn;var jn=gn(Pa,null,null),hr=(0,Ge.Z)(jn,4),Qr=hr[0],ni=hr[1],mi=hr[2],ki=hr[3],Si=ce.useMemo(function(){if(!Vn)return{scrollHeight:void 0,start:0,end:Wr.length-1,offset:void 0};if(!br){var Tn;return{scrollHeight:((Tn=ra.current)===null||Tn===void 0?void 0:Tn.offsetHeight)||0,start:0,end:Wr.length-1,offset:void 0}}for(var tr=0,dr,Pr,fr,Fr=Wr.length,ri=0;ri<Fr;ri+=1){var Vr=Wr[ri],ii=Pa(Vr),Br=mi.get(ii),Jr=tr+(Br===void 0?mr:Br);Jr>=lr&&dr===void 0&&(dr=ri,Pr=tr),Jr>lr+Sr&&fr===void 0&&(fr=ri),tr=Jr}return dr===void 0&&(dr=0,Pr=0,fr=Math.ceil(Sr/mr)),fr===void 0&&(fr=Wr.length-1),fr=Math.min(fr+1,Wr.length-1),{scrollHeight:tr,start:dr,end:fr,offset:Pr}},[br,Vn,lr,Wr,ki,Sr]),Qi=Si.scrollHeight,aa=Si.start,ba=Si.end,sn=Si.offset;no.current.start=aa,no.current.end=ba;var bn=ce.useState({width:0,height:Sr}),Fn=(0,Ge.Z)(bn,2),he=Fn[0],Pe=Fn[1],Fe=function(tr){Pe({width:tr.width||tr.offsetWidth,height:tr.height||tr.offsetHeight})},We=(0,ce.useRef)(),je=(0,ce.useRef)(),et=ce.useMemo(function(){return oi(he.width,tn)},[he.width,tn]),tt=ce.useMemo(function(){return oi(he.height,Qi)},[he.height,Qi]),kt=Qi-Sr,Wt=(0,ce.useRef)(kt);Wt.current=kt;function Sn(Tn){var tr=Tn;return Number.isNaN(Wt.current)||(tr=Math.min(tr,Wt.current)),tr=Math.max(tr,0),tr}var Nn=lr<=0,En=lr>=kt,cn=Xr(Nn,En),un=function(){return{x:Ui?-Ha:Ha,y:lr}},Gt=(0,ce.useRef)(un()),kn=Ie(function(){if(zr){var Tn=un();(Gt.current.x!==Tn.x||Gt.current.y!==Tn.y)&&(zr(Tn),Gt.current=Tn)}});function ir(Tn,tr){var dr=Tn;tr?((0,ke.flushSync)(function(){_a(dr)}),kn()):Eo(dr)}function $n(Tn){var tr=Tn.currentTarget.scrollTop;tr!==lr&&Eo(tr),rr==null||rr(Tn),kn()}var Hn=function(tr){var dr=tr,Pr=tn-he.width;return dr=Math.max(dr,0),dr=Math.min(dr,Pr),dr},Gn=Ie(function(Tn,tr){tr?((0,ke.flushSync)(function(){_a(function(dr){var Pr=dr+(Ui?-Tn:Tn);return Hn(Pr)})}),kn()):Eo(function(dr){var Pr=dr+Tn;return Pr})}),ar=wr(Vn,Nn,En,!!tn,Gn),ur=(0,Ge.Z)(ar,2),Ve=ur[0],Je=ur[1];Ar(Vn,vi,function(Tn,tr){return cn(Tn,tr)?!1:(Ve({preventDefault:function(){},deltaY:Tn}),!0)}),Qe(function(){function Tn(dr){Vn&&dr.preventDefault()}var tr=vi.current;return tr.addEventListener("wheel",Ve),tr.addEventListener("DOMMouseScroll",Je),tr.addEventListener("MozMousePixelScroll",Tn),function(){tr.removeEventListener("wheel",Ve),tr.removeEventListener("DOMMouseScroll",Je),tr.removeEventListener("MozMousePixelScroll",Tn)}},[Vn]),Qe(function(){tn&&_a(function(Tn){return Hn(Tn)})},[he.width,tn]);var Pt=function(){var tr,dr;(tr=We.current)===null||tr===void 0||tr.delayHidden(),(dr=je.current)===null||dr===void 0||dr.delayHidden()},_t=Ht(vi,Wr,mi,mr,Pa,function(){return ni(!0)},Eo,Pt);ce.useImperativeHandle(Kn,function(){return{getScrollInfo:un,scrollTo:function(tr){function dr(Pr){return Pr&&(0,Re.Z)(Pr)==="object"&&("left"in Pr||"top"in Pr)}dr(tr)?(tr.left!==void 0&&_a(Hn(tr.left)),_t(tr.top)):_t(tr)}}}),Qe(function(){if(vr){var Tn=Wr.slice(aa,ba+1);vr(Tn,Wr)}},[aa,ba,Wr]);var hn=fi(Wr,Pa,mi,mr),Dn=Lr==null?void 0:Lr({start:aa,end:ba,virtual:br,offsetX:Ha,offsetY:sn,rtl:Ui,getSize:hn}),An=Ue(Wr,aa,ba,tn,Qr,fn,mo),or=null;Sr&&(or=(0,Te.Z)((0,ye.Z)({},ht?"height":"maxHeight",Sr),Jn),Vn&&(or.overflowY="hidden",tn&&(or.overflowX="hidden"),ya&&(or.pointerEvents="none")));var Un={};return Ui&&(Un.dir="rtl"),ce.createElement("div",(0,fe.Z)({style:(0,Te.Z)((0,Te.Z)({},Et),{},{position:"relative"}),className:na},Un,hi),ce.createElement(lt.Z,{onResize:Fe},ce.createElement(wn,{className:"".concat(yn,"-holder"),style:or,ref:vi,onScroll:$n,onMouseEnter:Pt},ce.createElement(st,{prefixCls:yn,height:Qi,offsetX:Ha,offsetY:sn,scrollWidth:tn,onInnerResize:ni,ref:ra,innerProps:yr,rtl:Ui,extra:Dn},An))),br&&Qi>Sr&&ce.createElement(Se,{ref:We,prefixCls:yn,scrollOffset:lr,scrollRange:Qi,rtl:Ui,onScroll:ir,onStartMove:po,onStopMove:ja,spinSize:tt,containerSize:he.height,style:Dr==null?void 0:Dr.verticalScrollBar,thumbStyle:Dr==null?void 0:Dr.verticalScrollBarThumb}),br&&tn&&ce.createElement(Se,{ref:je,prefixCls:yn,scrollOffset:Ha,scrollRange:tn,rtl:Ui,onScroll:ir,onStartMove:po,onStopMove:ja,spinSize:et,containerSize:he.width,horizontal:!0,style:Dr==null?void 0:Dr.horizontalScrollBar,thumbStyle:Dr==null?void 0:Dr.horizontalScrollBarThumb}))}var nr=ce.forwardRef(qn);nr.displayName="List";var Ur=nr,li=Ur},66392:function(Ln,Kt){"use strict";var ie;var fe=Symbol.for("react.element"),Te=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ke=Symbol.for("react.server_context"),ge=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),lt=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),st=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),ct;ct=Symbol.for("react.module.reference");function qe(be){if(typeof be=="object"&&be!==null){var vt=be.$$typeof;switch(vt){case fe:switch(be=be.type,be){case Re:case ye:case Ge:case Ae:case lt:return be;default:switch(be=be&&be.$$typeof,be){case ke:case ce:case ge:case st:case ze:case _e:return be;default:return vt}}case Te:return vt}}}ie=ce,ie=_e,ie=fe,ie=ge,ie=Re,ie=st,ie=ze,ie=Te,ie=ye,ie=Ge,ie=Ae,ie=lt,ie=function(){return!1},ie=function(){return!1},ie=function(be){return qe(be)===ce},ie=function(be){return qe(be)===_e},ie=function(be){return typeof be=="object"&&be!==null&&be.$$typeof===fe},ie=function(be){return qe(be)===ge},ie=function(be){return qe(be)===Re},ie=function(be){return qe(be)===st},ie=function(be){return qe(be)===ze},ie=function(be){return qe(be)===Te},ie=function(be){return qe(be)===ye},ie=function(be){return qe(be)===Ge},ie=function(be){return qe(be)===Ae},ie=function(be){return qe(be)===lt},ie=function(be){return typeof be=="string"||typeof be=="function"||be===Re||be===ye||be===Ge||be===Ae||be===lt||be===dt||typeof be=="object"&&be!==null&&(be.$$typeof===st||be.$$typeof===ze||be.$$typeof===_e||be.$$typeof===ce||be.$$typeof===ge||be.$$typeof===ct||be.getModuleId!==void 0)},ie=qe},31461:function(Ln,Kt,ie){"use strict";ie(66392)},36459:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return fe}});function fe(Te){if(Te==null)throw new TypeError("Cannot destructure "+Te)}},84279:function(Ln,Kt,ie){"use strict";var fe=Object.defineProperty,Te=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,ce=(a,y,b)=>y in a?fe(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,ke=(a,y)=>{for(var b in y||(y={}))ye.call(y,b)&&ce(a,b,y[b]);if(Ge)for(var b of Ge(y))_e.call(y,b)&&ce(a,b,y[b]);return a},ge=(a,y)=>Te(a,Re(y)),Ae=a=>typeof a=="symbol"?a:a+"",lt=(a,y)=>{var b={};for(var E in a)ye.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ge)for(var E of Ge(a))y.indexOf(E)<0&&_e.call(a,E)&&(b[E]=a[E]);return b};function ze(a){return Array.isArray(a)}var st={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 dt(){return"window"in globalThis&&"document"in globalThis}function ct(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function qe(){return typeof navigator.vibrate=="function"}function be(){var a,y;if(!dt())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function vt(){if(!dt())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 Dt(){return HTMLElement.prototype.hasOwnProperty("popover")}var it={strings:st,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return it._locale||(it._locale=dt()?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]=ke(ke({},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=ot(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=ot(E);ee&&b.setAttribute("aria-label",ee)}}}};function ot(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),me=0;for(;oe;){if(y[me++]){const Me=oe[2]?parseInt(oe[2],10)-1:me-1;let De=y[Me];typeof De=="number"&&(De=it.numberFormatter.format(De)),b=b.replace(oe[1],De)}oe=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var Ce={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Se={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},He={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"},Ue={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"},xt={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"},mt={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 ut(a){var y,b,E,ee,re,oe;const me=a.split("!");let xe,Me,De,Ye=255,bt=255,$t=255,jt=-1;const sr=me.length>0&&me[0].startsWith("-");sr&&(me[0]=me[0].slice(1));for(let Gr=0;Gr<me.length;Gr++){xe=Ye,Me=bt,De=$t;const er=(y=me[Gr].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],Tr=er==null?void 0:er.toLowerCase(),ti=er&&(oe=(re=(ee=(E=(b=Ue[Tr])!=null?b:Ue[xt[er]])!=null?E:Se[er])!=null?ee:mt[er])!=null?re:Ce[er])!=null?oe:me[Gr].trim();let Nr=ti.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(Nr!=null&&Nr[1]&&Nr[2]&&Nr[3])Ye=Math.max(0,Math.min(255,Number.parseInt(Nr[1],16))),bt=Math.max(0,Math.min(255,Number.parseInt(Nr[2],16))),$t=Math.max(0,Math.min(255,Number.parseInt(Nr[3],16)));else if(Nr=ti.match(/^#([\da-f]{3})$/i),Nr!=null&&Nr[1]){const Zi=Number.parseInt(Nr[1][0],16),va=Number.parseInt(Nr[1][1],16),oa=Number.parseInt(Nr[1][2],16);Ye=Math.max(0,Math.min(255,Zi*16+Zi)),bt=Math.max(0,Math.min(255,va*16+va)),$t=Math.max(0,Math.min(255,oa*16+oa))}else if(Nr=ti.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),Nr!=null&&Nr[1]&&Nr[2]&&Nr[3])Ye=Math.max(0,Math.min(255,Number.parseInt(Nr[1]))),bt=Math.max(0,Math.min(255,Number.parseInt(Nr[2]))),$t=Math.max(0,Math.min(255,Number.parseInt(Nr[3])));else return;jt>=0&&(Ye=(1-jt)*Ye+jt*xe,bt=(1-jt)*bt+jt*Me,$t=(1-jt)*$t+jt*De,jt=-1),Gr+1<me.length&&(jt=Math.max(0,Math.min(100,Number.parseInt(me[++Gr])))/100)}return jt>=0&&(Ye=jt*Ye+(1-jt)*xe,bt=jt*bt+(1-jt)*Me,$t=jt*$t+(1-jt)*De),sr&&(Ye=255-Ye,bt=255-bt,$t=255-$t),"#"+("00"+Math.round(Ye).toString(16)).slice(-2)+("00"+Math.round(bt).toString(16)).slice(-2)+("00"+Math.round($t).toString(16)).slice(-2)}function $e(a){var y,b;return a=a.trim(),(b=(y=He[a.toLowerCase()])!=null?y:He[xt[a]])!=null?b:ut(a)}function Ft(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 yt(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 gn(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*yt(re,ee,y+2)),g:Math.round(255*yt(re,ee,y)),b:Math.round(255*yt(re,ee,y-2))}}function rt(a){return a<0?0:a>255?255:Math.round(a)}function Mt(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 en(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ee=Math.min(y,b,E),re=Math.max(y,b,E),oe=re-ee;let me,xe;re===ee?me=0:y===re?me=(b-E)/oe:b===re?me=2+(E-y)/oe:E===re&&(me=4+(y-b)/oe),me=Math.min(me*60,360),me<0&&(me+=360);const Me=(ee+re)/2;return re===ee?xe=0:Me<=.5?xe=oe/(re+ee):xe=oe/(2-re-ee),{h:me,s:xe,l:Me}}function Yt(a){let y=Ft(a);if(!y)return a;let{h:b,s:E,l:ee}=en(y);return E+=.1,ee-=.1,Mt(gn({h:b,s:E,l:ee}))}var Qe={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"},Ie={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},Ot=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function In(a,y,b){if(!/[A-Za-z\d]/.test(a)||(b==="up"&&(b=void 0),!y&&!b))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of Ot)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(Ie[re]||re)}return a}function mn(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Ie)if(Ie[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of Ot)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 pt(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=Qe[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:oe,variant:me,style:xe}=mn(ee);switch(re=oe,me){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(xe){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function wt(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Qt={},Zn=ke({},Qe),Cn={},rn={},ln={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}"},zn={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}},_n={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}},Oe={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:_n},"amsmath.sty":{package:zn,primitive:!0},"texvc.sty":{package:ln,primitive:!1}},ue={" ":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!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,ve,pe;vt()?(ve=new RegExp("\\p{Letter}","u"),pe=new RegExp("[0-9\\p{Letter}]","u")):(ve=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,pe=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function se(a,y,b="mord",E){y!==void 0&&(Qt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},Zn[y]||(Zn[y]=a))}function Be(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 ft(a,y){for(let b=a;b<=y;b++)se(String.fromCodePoint(b),b)}function Bt(a){var y;return(y=rn[a])!=null?y:null}function qt(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const oe in Cn)oe.startsWith(y)&&!Cn[oe].infix&&ee.push({match:oe,frequency:(b=Cn[oe].frequency)!=null?b:0});for(const oe in Qt)oe.startsWith(y)&&ee.push({match:oe,frequency:(E=Qt[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,me)=>{var xe,Me;return oe.frequency===me.frequency?oe.match.length===me.match.length?oe.match<me.match?-1:1:oe.match.length-me.match.length:((xe=me.frequency)!=null?xe:0)-((Me=oe.frequency)!=null?Me:0)}),ee.map(oe=>oe.match)}function an(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function vn(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:an(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...vn(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:an(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...vn(b[E]))}return y}function dn(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 gt(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)rn[E]=b}function It(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:vn(y),createAtom:b};for(const re of a)rn[re]=ee}function Ht(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:vn(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")Cn["\\"+a]=re;else for(const oe of a)Cn["\\"+oe]=re}var Xt;function Tt(a){return Xt||(Xt=Rn(Oe)),a?Rn(ke(ke({},Xt),a)):Xt}function Yn(a,y){var b,E,ee,re;if(typeof a=="string"){let oe=0;const me=a;return/(^|[^\\])#1/.test(me)&&(oe=1),/(^|[^\\])#2/.test(me)&&(oe=2),/(^|[^\\])#3/.test(me)&&(oe=3),/(^|[^\\])#4/.test(me)&&(oe=4),/(^|[^\\])#5/.test(me)&&(oe=5),/(^|[^\\])#6/.test(me)&&(oe=6),/(^|[^\\])#7/.test(me)&&(oe=7),/(^|[^\\])#8/.test(me)&&(oe=8),/(^|[^\\])#9/.test(me)&&(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:me}}return ke({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 Rn(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]=Yn(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Yn(E)}return y}function cr(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=Cn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Qt[a]:ue[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ue[a]})}else if(y==="math"){if(b=Qt[a],!b&&a.length===1){const E=wr("math",a.codePointAt(0));return E.startsWith("\\")?ge(ke({},cr(E,"math")),{command:E}):null}}else ue[a]?b={definitionType:"symbol",type:"mord",codepoint:ue[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Xr(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function wr(a,y){if(y===void 0)return"";if(a==="math"&&Zn[y])return Zn[y];if(a==="text"){const b=Object.keys(ue).find(E=>ue[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var kr=[0,.68889,0,0,.72222],Ar=[0,.68889,0,0,.66667],gi=[0,.68889,0,0,.77778],oi=[0,.68889,0,0,.61111],fi=[.16667,.68889,0,0,.77778],Pi=[0,.68889,0,0,.55556],Or=[0,0,0,0,.25],Jn=[0,.825,0,0,2.33334],qn=[0,.9,0,0,2.33334],nr=[0,.68889,0,0,.54028],Ur=[-.03598,.46402,0,0,.5],li=[-.13313,.36687,0,0,1],Lt=[.01354,.52239,0,0,1],Kn=[.01354,.52239,0,0,1.11111],Bn=[0,.54986,0,0,1],yn=[0,.69224,0,0,.5],xr=[0,.43056,0,0,1],Sr=[.08198,.58198,0,0,.77778],mr=[.19444,.69224,0,0,.41667],Qn=[.1808,.675,0,0,1],ht=[.19444,.69224,0,0,.83334],Et=[.13667,.63667,0,0,1],zt=[-.064,.437,0,0,1.334],fn=[.08167,.58167,0,0,.77778],at=[0,.69224,0,0,.72222],Rt=[0,.69224,0,0,.66667],on=[-.13313,.36687,0,0,.77778],tn=[.06062,.54986,0,0,.77778],Mn=[0,.69224,0,0,.77778],wn=[.25583,.75583,0,0,.77778],rr=[.25142,.75726,0,0,.77778],zr=[.20576,.70576,0,0,.77778],vr=[.30274,.79383,0,0,.77778],yr=[.22958,.72958,0,0,.77778],Lr=[.1808,.675,0,0,.77778],Dr=[.13667,.63667,0,0,.77778],hi=[.13597,.63597,0,0,.77778],Vn=[.03517,.54986,0,0,.77778],br=[0,.675,0,0,.77778],Ui=[.19444,.69224,0,0,.61111],na=[0,.54986,0,0,.76042],Wr=[0,.54986,0,0,.66667],vi=[.0391,.5391,0,0,.77778],ra=[.03517,.54986,0,0,1.33334],Kr=[.38569,.88569,0,0,.77778],Vi=[.23222,.74111,0,0,.77778],lr=[.19444,.69224,0,0,.77778],Na=[0,.37788,0,0,.5],Ca=[0,.54986,0,0,.72222],ho=[0,.69224,0,0,.83334],Ha=[.11111,.69224,0,0,.66667],_a=[.26167,.75726,0,0,.77778],Ji=[.48256,.98256,0,0,.77778],Fa=[.28481,.79383,0,0,.77778],ya=[.08167,.58167,0,0,.22222],Wa=[.08167,.58167,0,0,.38889],po=[0,.43056,.04028,0,.66667],ja=[.41951,.91951,0,0,.77778],Pa=[.24982,.74947,0,0,.38865],mo=[.08319,.58283,0,0,.75623],Eo=[0,.10803,0,0,.27764],no=[0,.47534,0,0,.50181],ia=[.18906,.47534,0,0,.50181],Zt=[0,.69141,0,0,.50181],At=[.24982,.74947,0,0,.27764],xn=[0,.69141,0,0,.21471],jn=[.25,.75,0,0,.44722],hr=[0,.64444,0,0,.575],Qr=[.08556,.58556,0,0,.89444],ni=[0,.69444,0,0,.89444],mi=[0,.68611,0,0,.9],ki=[0,.68611,0,0,.86944],Si=[.25,.75,0,0,.575],Qi=[.25,.75,0,0,.31944],aa=[0,.69444,0,0,.63889],ba=[0,.69444,0,0,.31944],sn=[0,.44444,0,0,.63889],bn=[0,.44444,0,0,.51111],Fn=[0,.69444,0,0,.575],he=[.13333,.63333,0,0,.89444],Pe=[0,.44444,0,0,.31944],Fe=[0,.69444,0,0,.86944],We=[0,.68611,0,0,.69166],je=[0,.68611,0,0,.83055],et=[0,.68611,0,0,.89444],tt=[0,.69444,0,0,.60278],kt=[.19444,.69444,0,0,.51111],Wt=[0,.69444,0,0,.83055],Sn=[-.10889,.39111,0,0,1.14999],Nn=[.19444,.69444,0,0,.575],En=[.19444,.69444,0,0,1.14999],cn=[.19444,.69444,0,0,.70277],un=[.05556,.75,0,0,.575],Gt=[0,.68611,0,0,.95833],kn=[.08556,.58556,0,0,.76666],ir=[-.02639,.47361,0,0,.575],$n=[0,.44444,0,0,.89444],Hn=[0,.55556,0,0,.76666],Gn=[-.10889,.39111,0,0,.89444],ar=[.00222,.50222,0,0,.89444],ur=[.19667,.69667,0,0,.89444],Ve=[.08556,.58556,0,0,1.14999],Je=[0,.69444,0,0,.70277],Pt=[-.02778,.47222,0,0,.575],_t=[.25,.75,0,0,.51111],hn=[-.13889,.36111,0,0,1.14999],Dn=[.19444,.69444,0,0,1.02222],An=[.12963,.69444,0,0,.89444],or=[.19444,.69444,0,0,.44722],Un=[0,.64444,.13167,0,.59111],Tn=[.19444,.64444,.13167,0,.59111],tr=[0,.68611,.17208,0,.8961],dr=[.19444,.44444,.105,0,.53222],Pr=[0,.44444,.085,0,.82666],fr=[0,.69444,.06709,0,.59111],Fr=[0,.69444,.12945,0,.35555],ri=[0,.69444,0,0,.94888],Vr=[0,.69444,.11472,0,.59111],ii=[0,.68611,.10778,0,.88555],Br=[0,.69444,.07939,0,.62055],Jr=[0,.69444,.12417,0,.30667],si=[0,.64444,.13556,0,.51111],_i=[.19444,.64444,.13556,0,.51111],Hr=[0,.68333,.16389,0,.74333],Bi=[.19444,.43056,.08847,0,.46],zi=[0,.43056,.07514,0,.71555],Ia=[0,.69444,.06646,0,.51111],ma=[0,.69444,0,0,.83129],qi=[0,.69444,.1225,0,.51111],Oi=[0,.68333,.09403,0,.76666],Ri=[0,.68333,.11111,0,.76666],xi=[0,.69444,.06961,0,.51444],ea=[0,.69444,0,0,.27778],wi=[.25,.75,0,0,.38889],ci=[0,.64444,0,0,.5],Wi=[0,.69444,0,0,.77778],ha=[0,.68333,0,0,.75],go=[0,.68333,0,0,.77778],lo=[0,.68333,0,0,.68056],Ua=[0,.68333,0,0,.72222],Ba=[.25,.75,0,0,.5],Ea=[.25,.75,0,0,.27778],ji=[0,.69444,0,0,.5],Ao=[0,.69444,0,0,.55556],la=[0,.43056,0,0,.44445],Li=[0,.43056,0,0,.5],xa=[.19444,.43056,0,0,.55556],Ya=[0,.43056,0,0,.55556],Ma=[.08333,.58333,0,0,.77778],Ta=[0,.43056,0,0,.27778],Ki=[0,.66786,0,0,.27778],Ja=[0,.69444,0,0,.75],vo=[0,.66786,0,0,.5],ro=[0,.68333,0,0,.625],yo=[.19444,.69444,0,0,.44445],Mo=[0,.69444,0,0,.72222],Xo=[.19444,.69444,0,0,.5],io=[.19444,.69444,0,0,1],So=[.011,.511,0,0,1.126],os=[.19444,.69444,0,0,.61111],rs=[.05556,.75,0,0,.5],cs=[0,.68333,0,0,.83334],Oo=[.0391,.5391,0,0,.66667],bo=[-.05555,.44445,0,0,.5],sa=[0,.43056,0,0,.77778],Sa=[0,.55556,0,0,.66667],Qa=[-.03625,.46375,0,0,.77778],co=[-.01688,.48312,0,0,.77778],jo=[.0391,.5391,0,0,1],us=[0,.69444,0,0,.61111],xs=[-.03472,.46528,0,0,.5],Js=[.25,.75,0,0,.44445],Fs=[-.14236,.35764,0,0,1],ds=[.244,.744,0,0,.412],zs=[.19444,.69444,0,0,.88889],za=[.12963,.69444,0,0,.77778],ga=[.19444,.69444,0,0,.38889],so=[.011,.511,0,0,1.638],ko=[.19444,.69444,0,0,0],fs=[0,.44444,0,0,.575],ss=[.19444,.44444,0,0,.575],$l=[0,.68611,0,0,.75555],ml=[0,.69444,0,0,.66759],Sl=[0,.68611,0,0,.80555],Ka=[0,.68611,.08229,0,.98229],ei=[0,.68611,0,0,.76666],Xi=[0,.44444,0,0,.58472],Yi=[.19444,.44444,0,0,.6118],pa=[.19444,.43056,0,0,.5],Uo=[0,.68333,.02778,.08334,.76278],Yo=[0,.68333,.08125,.05556,.83125],rl=[0,.43056,0,.05556,.48472],ul=[.19444,.43056,0,.08334,.51702],wl=[.25,.75,0,0,.42778],uo=[0,.69444,0,0,.55],Qs=[0,.69444,0,0,.73334],Pl=[0,.69444,0,0,.79445],Sc=[0,.69444,0,0,.51945],Vl=[0,.69444,0,0,.70278],Cl=[0,.69444,0,0,.76389],il=[.25,.75,0,0,.34306],ql=[0,.69444,0,0,.56111],dl=[0,.69444,0,0,.25556],ec=[.19444,.45833,0,0,.56111],is=[0,.45833,0,0,.56111],wo=[0,.69444,0,0,.30556],qo=[0,.69444,0,0,.58056],Ss=[0,.69444,0,0,.67223],Ds=[0,.69444,0,0,.85556],al=[0,.69444,0,0,.55834],Ps=[0,.65556,.11156,0,.5],zl=[0,.69444,.08094,0,.70834],Wc=[.17014,0,0,0,.44445],fc=[0,.69444,.0799,0,.5],Dc=[0,.69444,0,0,.73752],Pc=[0,.69444,.09205,0,.5],tc=[0,.69444,.09031,0,.77778],nc=[0,.69444,.07816,0,.27778],Oc=[0,.69444,.00316,0,.5],Nc=[.19444,.69444,0,0,.83334],_o=[.05556,.75,0,0,.83334],ao=[0,.75,0,0,.5],Ks=[.125,.08333,0,0,.27778],gl=[0,.08333,0,0,.27778],oo=[0,.65556,0,0,.5],Ho=[0,.69444,0,0,.47222],zo=[0,.69444,0,0,.66667],ws=[0,.69444,0,0,.59722],qs=[0,.69444,0,0,.54167],Kl=[0,.69444,0,0,.70834],Bl=[.25,.75,0,0,.28889],Zc=[0,.69444,0,0,.51667],tf=[0,.44444,0,0,.44445],Md=[.19444,.44444,0,0,.51667],Vu=[0,.44444,0,0,.38333],Gu=[0,.44444,0,0,.51667],Xu=[0,.69444,0,0,.83334],kd=[.35001,.85,0,0,.45834],ku=[.35001,.85,0,0,.57778],Yu=[.35001,.85,0,0,.41667],Ju=[.35001,.85,0,0,.58334],_u=[0,.72222,0,0,.55556],Lu=[1e-5,.6,0,0,.66667],_d=[1e-5,.6,0,0,.77778],jc=[.25001,.75,0,0,.94445],nf=[.306,.805,.19445,0,.47222],lu=[.30612,.805,.19445,0,.47222],vl=[.25001,.75,0,0,.83334],Rc=[.35001,.85,0,0,.47222],Ld=[.25001,.75,0,0,1.11111],Qu=[.65002,1.15,0,0,.59722],Hl=[.65002,1.15,0,0,.81111],Go=[.65002,1.15,0,0,.47222],rc=[.65002,1.15,0,0,.66667],ic=[0,.75,0,0,1],wc=[.55001,1.05,0,0,1.27778],qu=[.862,1.36,.44445,0,.55556],ed=[.86225,1.36,.44445,0,.55556],$c=[.55001,1.05,0,0,1.11111],td=[.65002,1.15,0,0,.52778],cu=[.65002,1.15,0,0,.61111],Uc=[.55001,1.05,0,0,1.51112],nd=[.95003,1.45,0,0,.73611],Tu=[.95003,1.45,0,0,1.04445],hc=[.95003,1.45,0,0,.52778],uu=[.95003,1.45,0,0,.75],du=[0,.75,0,0,1.44445],Au=[.95003,1.45,0,0,.58334],fu=[1.25003,1.75,0,0,.79167],Gl=[1.25003,1.75,0,0,1.27778],rd=[1.25003,1.75,0,0,.58334],Iu=[1.25003,1.75,0,0,.80556],we=[0,.825,0,0,1.8889],Le=[1.25003,1.75,0,0,.63889],Ze=[.64502,1.155,0,0,.875],nt=[1e-5,.6,0,0,.875],St=[-99e-5,.601,0,0,.66667],Ct=[.64502,1.155,0,0,.66667],Jt=[1e-5,.9,0,0,.88889],pn=[.65002,1.15,0,0,.88889],nn=[.90001,0,0,0,.88889],Pn=[-.00499,.605,0,0,1.05556],Xn=[0,.12,0,0,.45],Ut=[0,.61111,0,0,.525],gr=[.08333,.69444,0,0,.525],Cr=[-.08056,.53055,0,0,.525],Mr=[-.05556,.55556,0,0,.525],Rr=[0,.43056,0,0,.525],_r=[.22222,.43056,0,0,.525],Yr=[0,0,0,0,.525],jr={"AMS-Regular":{32:Or,65:kr,66:Ar,67:kr,68:kr,69:Ar,70:oi,71:gi,72:gi,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:gi,76:Ar,77:[0,.68889,0,0,.94445],78:kr,79:fi,80:oi,81:fi,82:kr,83:Pi,84:Ar,85:kr,86:kr,87:[0,.68889,0,0,1],88:kr,89:kr,90:Ar,107:Pi,160:Or,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Pi,295:nr,710:Jn,732:qn,770:Jn,771:qn,989:fn,1008:po,8245:[0,.54986,0,0,.275],8463:nr,8487:kr,8498:Pi,8502:Ar,8503:[0,.68889,0,0,.44445],8504:Ar,8513:[0,.68889,0,0,.63889],8592:Ur,8594:Ur,8602:li,8603:li,8606:Lt,8608:Lt,8610:Kn,8611:Kn,8619:Bn,8620:Bn,8621:[-.13313,.37788,0,0,1.38889],8622:li,8624:yn,8625:yn,8630:xr,8631:xr,8634:Sr,8635:Sr,8638:mr,8639:mr,8642:mr,8643:mr,8644:Qn,8646:Qn,8647:Qn,8648:ht,8649:Qn,8650:ht,8651:Lt,8652:Lt,8653:li,8654:li,8655:li,8666:Et,8667:Et,8669:[-.13313,.37788,0,0,1],8672:zt,8674:zt,8705:[0,.825,0,0,.5],8708:Pi,8709:fn,8717:[0,.43056,0,0,.42917],8722:Ur,8724:[.08198,.69224,0,0,.77778],8726:fn,8733:Mn,8736:at,8737:at,8738:[.03517,.52239,0,0,.72222],8739:ya,8740:[.25142,.74111,0,0,.27778],8741:Wa,8742:[.25142,.74111,0,0,.5],8756:Rt,8757:Rt,8764:on,8765:[-.13313,.37788,0,0,.77778],8769:on,8770:Qa,8774:vr,8776:co,8778:fn,8782:tn,8783:tn,8785:Sr,8786:Sr,8787:Sr,8790:Mn,8791:yr,8796:[.08198,.91667,0,0,.77778],8806:wn,8807:wn,8808:rr,8809:rr,8812:[.25583,.75583,0,0,.5],8814:zr,8815:zr,8816:vr,8817:vr,8818:yr,8819:yr,8822:Lr,8823:Lr,8828:Dr,8829:Dr,8830:yr,8831:yr,8832:zr,8833:zr,8840:vr,8841:vr,8842:hi,8843:hi,8847:Vn,8848:Vn,8858:Sr,8859:Sr,8861:Sr,8862:br,8863:br,8864:br,8865:br,8872:[0,.69224,0,0,.61111],8873:at,8874:[0,.69224,0,0,.88889],8876:oi,8877:oi,8878:kr,8879:kr,8882:Vn,8883:Vn,8884:Dr,8885:Dr,8888:[0,.54986,0,0,1.11111],8890:xa,8891:Ui,8892:Ui,8901:[0,.54986,0,0,.27778],8903:fn,8905:fn,8906:fn,8907:Mn,8908:Mn,8909:[-.03598,.46402,0,0,.77778],8910:na,8911:na,8912:Vn,8913:Vn,8914:Wr,8915:Wr,8916:Rt,8918:vi,8919:vi,8920:ra,8921:ra,8922:Kr,8923:Kr,8926:Dr,8927:Dr,8928:vr,8929:vr,8934:Vi,8935:Vi,8936:Vi,8937:Vi,8938:zr,8939:zr,8940:vr,8941:vr,8994:lr,8995:lr,9416:[.15559,.69224,0,0,.90222],9484:yn,9488:yn,9492:Na,9496:Na,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:br,9633:br,9650:Ca,9651:Ca,9654:Vn,9660:Ca,9661:Ca,9664:Vn,9674:Ha,9733:[.19444,.69224,0,0,.94445],10003:ho,10016:ho,10731:Ha,10846:[.19444,.75583,0,0,.61111],10877:Dr,10878:Dr,10885:wn,10886:wn,10887:hi,10888:hi,10889:_a,10890:_a,10891:Ji,10892:Ji,10901:Dr,10902:Dr,10933:rr,10934:rr,10935:_a,10936:_a,10937:_a,10938:_a,10949:wn,10950:wn,10955:Fa,10956:Fa,57350:ya,57351:Wa,57352:fn,57353:po,57356:rr,57357:rr,57358:ja,57359:vr,57360:vr,57361:ja,57366:rr,57367:rr,57368:rr,57369:rr,57370:hi,57371:hi},"Caligraphic-Regular":{32:Or,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:Or},"Fraktur-Regular":{32:Or,33:[0,.69141,0,0,.29574],34:xn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Pa,41:Pa,42:[0,.62119,0,0,.27764],43:mo,44:Eo,45:mo,46:Eo,47:[.24982,.74947,0,0,.50181],48:no,49:no,50:no,51:ia,52:ia,53:ia,54:Zt,55:ia,56:Zt,57:ia,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:At,93:At,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:Or,8216:xn,8217:xn,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:Or,33:[0,.69444,0,0,.35],34:tt,35:[.19444,.69444,0,0,.95833],36:un,37:[.05556,.75,0,0,.95833],38:ni,39:ba,40:jn,41:jn,42:[0,.75,0,0,.575],43:he,44:[.19444,.15556,0,0,.31944],45:Vu,46:[0,.15556,0,0,.31944],47:Si,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,58:Pe,59:[.19444,.44444,0,0,.31944],60:Qr,61:Gn,62:Qr,63:[0,.69444,0,0,.54305],64:ni,65:ki,66:[0,.68611,0,0,.81805],67:je,68:[0,.68611,0,0,.88194],69:$l,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:mi,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:We,77:[0,.68611,0,0,1.09166],78:mi,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:ki,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Qi,92:Si,93:Qi,94:Fn,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:aa,99:bn,100:aa,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:aa,105:ba,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:ba,109:[0,.44444,0,0,.95833],110:sn,111:fs,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:sn,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:bn,123:Si,124:Qi,125:Si,126:[.35,.34444,0,0,.575],160:Or,163:[0,.69444,0,0,.86853],168:Fn,172:[0,.44444,0,0,.76666],176:Fe,177:he,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:he,216:[.04861,.73472,0,0,.89444],223:ws,230:[0,.44444,0,0,.83055],247:he,248:[.09722,.54167,0,0,.575],305:Pe,338:[0,.68611,0,0,1.16944],339:$n,567:[.19444,.44444,0,0,.35139],710:Fn,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Fn,715:Fn,728:Fn,729:ba,730:Fe,732:Fn,733:Fn,915:We,916:Gt,920:et,923:Sl,926:ei,928:mi,931:je,933:et,934:je,936:et,937:je,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:ba,8217:ba,8220:tt,8221:tt,8224:kt,8225:kt,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:ml,8465:Wt,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Wt,8501:Je,8592:Sn,8593:Nn,8594:Sn,8595:Nn,8596:Sn,8597:Si,8598:En,8599:En,8600:En,8601:En,8636:Sn,8637:Sn,8640:Sn,8641:Sn,8656:Sn,8657:cn,8658:Sn,8659:cn,8660:Sn,8661:[.25,.75,0,0,.70277],8704:aa,8706:[0,.69444,.06389,0,.62847],8707:aa,8709:un,8711:Gt,8712:kn,8715:kn,8722:he,8723:he,8725:Si,8726:Si,8727:Pt,8728:ir,8729:ir,8730:[.18,.82,0,0,.95833],8733:$n,8734:[0,.44444,0,0,1.14999],8736:at,8739:Qi,8741:Si,8743:Hn,8744:Hn,8745:Hn,8746:Hn,8747:[.19444,.69444,.12778,0,.56875],8764:Gn,8768:[.19444,.69444,0,0,.31944],8771:ar,8776:[.02444,.52444,0,0,.89444],8781:ar,8801:ar,8804:ur,8805:ur,8810:Ve,8811:Ve,8826:Qr,8827:Qr,8834:Qr,8835:Qr,8838:ur,8839:ur,8846:Hn,8849:ur,8850:ur,8851:Hn,8852:Hn,8853:he,8854:he,8855:he,8856:he,8857:he,8866:Je,8867:Je,8868:ni,8869:ni,8900:ir,8901:[-.02639,.47361,0,0,.31944],8902:Pt,8968:_t,8969:_t,8970:_t,8971:_t,8994:hn,8995:hn,9651:Dn,9657:Pt,9661:Dn,9667:Pt,9711:En,9824:An,9825:An,9826:An,9827:An,9837:[0,.75,0,0,.44722],9838:or,9839:or,10216:jn,10217:jn,10815:mi,10927:ur,10928:ur,57376:ko},"Main-BoldItalic":{32:Or,33:[0,.69444,.11417,0,.38611],34:Br,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Fr,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:Un,49:Un,50:Un,51:Un,52:Tn,53:Un,54:Un,55:Tn,56:Un,57:Un,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Vr,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:tr,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:tr,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:fr,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:dr,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:dr,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:Or,168:[0,.69444,.11473,0,.59111],176:ri,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:Pr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:Pr,567:[.19444,.44444,.04611,0,.385],710:fr,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:Fr,730:ri,732:Vr,733:Vr,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:tr,931:[0,.68611,.11431,0,.82666],933:ii,934:[0,.68611,.05632,0,.82666],936:ii,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Fr,8217:Fr,8220:[0,.69444,.16772,0,.62055],8221:Br},"Main-Italic":{32:Or,33:Jr,34:xi,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Jr,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:si,49:si,50:si,51:si,52:_i,53:si,54:si,55:_i,56:si,57:si,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:qi,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:Hr,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:Hr,79:Oi,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:Hr,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:Ia,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:Bi,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:Bi,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:Or,168:[0,.66786,.10474,0,.51111],176:ma,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:zi,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:zi,710:Ia,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:ma,732:[0,.66786,.11585,0,.51111],733:qi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Oi,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Hr,931:[0,.68333,.12028,0,.71555],933:Ri,934:[0,.68333,.05986,0,.71555],936:Ri,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Jr,8217:Jr,8220:[0,.69444,.1685,0,.51444],8221:xi,8463:nr},"Main-Regular":{32:Or,33:ea,34:ji,35:Nc,36:rs,37:_o,38:Wi,39:ea,40:wi,41:wi,42:ao,43:Ma,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:Ba,48:ci,49:ci,50:ci,51:ci,52:ci,53:ci,54:ci,55:ci,56:ci,57:ci,58:Ta,59:[.19444,.43056,0,0,.27778],60:vi,61:on,62:vi,63:Ho,64:Wi,65:ha,66:[0,.68333,0,0,.70834],67:Ua,68:[0,.68333,0,0,.76389],69:lo,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:ha,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:go,76:ro,77:[0,.68333,0,0,.91667],78:ha,79:go,80:lo,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Ua,85:ha,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:ha,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Ea,92:Ba,93:Ea,94:ji,95:[.31,.12056,.02778,0,.5],97:Li,98:Ao,99:la,100:Ao,101:la,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Ao,105:Ki,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:ea,109:[0,.43056,0,0,.83334],110:Ya,111:Li,112:xa,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:Ya,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:la,123:Ba,124:Ea,125:Ba,126:[.35,.31786,0,0,.5],160:Or,163:[0,.69444,0,0,.76909],167:yo,168:vo,172:[0,.43056,0,0,.66667],176:Ja,177:Ma,182:os,184:Wc,198:[0,.68333,0,0,.90278],215:Ma,216:[.04861,.73194,0,0,.77778],223:ji,230:[0,.43056,0,0,.72222],247:Ma,248:[.09722,.52778,0,0,.5],305:Ta,338:[0,.68333,0,0,1.01389],339:sa,567:[.19444,.43056,0,0,.30556],710:ji,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:ji,715:ji,728:ji,729:Ki,730:Ja,732:vo,733:ji,915:ro,916:cs,920:go,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:ha,931:Ua,933:go,934:Ua,936:go,937:Ua,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:ea,8217:ea,8220:ji,8221:ji,8224:yo,8225:yo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:nr,8465:Mo,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Mo,8501:us,8592:li,8593:Xo,8594:li,8595:Xo,8596:li,8597:Ba,8598:io,8599:io,8600:io,8601:io,8614:[.011,.511,0,0,1],8617:So,8618:So,8636:li,8637:li,8640:li,8641:li,8652:[.011,.671,0,0,1],8656:li,8657:os,8658:li,8659:os,8660:li,8661:[.25,.75,0,0,.61111],8704:Ao,8706:[0,.69444,.05556,.08334,.5309],8707:Ao,8709:rs,8711:cs,8712:Oo,8715:Oo,8722:Ma,8723:Ma,8725:Ba,8726:Ba,8727:xs,8728:bo,8729:bo,8730:[.2,.8,0,0,.83334],8733:sa,8734:xr,8736:at,8739:Ea,8741:Ba,8743:Sa,8744:Sa,8745:Sa,8746:Sa,8747:[.19444,.69444,.11111,0,.41667],8764:on,8768:[.19444,.69444,0,0,.27778],8771:Qa,8773:[-.022,.589,0,0,1],8776:co,8781:Qa,8784:[-.133,.67,0,0,.778],8801:Qa,8804:hi,8805:hi,8810:jo,8811:jo,8826:vi,8827:vi,8834:vi,8835:vi,8838:hi,8839:hi,8846:Sa,8849:hi,8850:hi,8851:Sa,8852:Sa,8853:Ma,8854:Ma,8855:Ma,8856:Ma,8857:Ma,8866:us,8867:us,8868:Wi,8869:Wi,8872:[.249,.75,0,0,.867],8900:bo,8901:[-.05555,.44445,0,0,.27778],8902:xs,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:Js,8969:Js,8970:Js,8971:Js,8994:Fs,8995:Fs,9136:ds,9137:ds,9651:zs,9657:xs,9661:zs,9667:xs,9711:io,9824:za,9825:za,9826:za,9827:za,9837:[0,.75,0,0,.38889],9838:ga,9839:ga,10216:wi,10217:wi,10222:ds,10223:ds,10229:[.011,.511,0,0,1.609],10230:so,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:so,10815:ha,10927:hi,10928:hi,57376:ko},"Math-BoldItalic":{32:Or,48:fs,49:fs,50:fs,51:ss,52:ss,53:ss,54:hr,55:ss,56:hr,57:ss,65:ki,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:Ka,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:$l,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:ml,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:Xi,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:Or,915:[0,.68611,.15972,0,.65694],916:Gt,920:[0,.68611,.03194,0,.86722],923:Sl,926:[0,.68611,.07458,0,.84125],928:Ka,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:ei,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:Xi,960:[0,.44444,.03704,0,.68241],961:Yi,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:Yi,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:Or,48:Li,49:Li,50:Li,51:pa,52:pa,53:pa,54:ci,55:pa,56:ci,57:pa,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:Yo,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:Uo,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:rl,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:Or,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Uo,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Yo,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:rl,960:[0,.43056,.03588,0,.57003],961:ul,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:ul,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:Or,33:[0,.69444,0,0,.36667],34:al,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:wo,40:wl,41:wl,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:uo,49:uo,50:uo,51:uo,52:uo,53:uo,54:uo,55:uo,56:uo,57:uo,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Sc,64:Qs,65:Qs,66:Qs,67:Vl,68:Pl,69:[0,.69444,0,0,.64167],70:us,71:Qs,72:Pl,73:[0,.69444,0,0,.33056],74:Sc,75:Cl,76:qo,77:[0,.69444,0,0,.97778],78:Pl,79:Pl,80:Vl,81:[.10556,.69444,0,0,.79445],82:Vl,83:us,84:Qs,85:Cl,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Qs,89:[0,.69444,.0275,0,.73334],90:Ss,91:il,93:il,94:uo,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ql,99:[0,.45833,0,0,.48889],100:ql,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ql,105:dl,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:dl,109:[0,.45833,0,0,.86667],110:is,111:[0,.45833,0,0,.55],112:ec,113:ec,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:is,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:Or,168:uo,176:Qs,180:uo,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:uo,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:uo,729:wo,730:Qs,732:uo,733:uo,915:qo,916:[0,.69444,0,0,.91667],920:Ds,923:Ss,926:Qs,928:Pl,931:Pl,933:Ds,934:Pl,936:Ds,937:Pl,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:wo,8217:wo,8220:al,8221:al},"SansSerif-Italic":{32:Or,33:[0,.69444,.05733,0,.31945],34:Oc,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:nc,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:Ks,45:[0,.44444,.01946,0,.33333],46:gl,47:[.25,.75,.13164,0,.5],48:Ps,49:Ps,50:Ps,51:Ps,52:Ps,53:Ps,54:Ps,55:Ps,56:Ps,57:Ps,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:zo,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:zl,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:qs,77:[0,.69444,.08094,0,.875],78:zl,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:fc,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:Or,168:[0,.67937,.06385,0,.5],176:Dc,184:Wc,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:fc,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Pc,715:ji,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Dc,732:[0,.67659,.08826,0,.5],733:Pc,915:[0,.69444,.13372,0,.54167],916:Xu,920:[0,.69444,.07555,0,.77778],923:us,926:[0,.69444,.12816,0,.66667],928:zl,931:[0,.69444,.11983,0,.72222],933:tc,934:[0,.69444,.04603,0,.72222],936:tc,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:nc,8217:nc,8220:[0,.69444,.14205,0,.5],8221:Oc},"SansSerif-Regular":{32:Or,33:[0,.69444,0,0,.31945],34:ji,35:Nc,36:rs,37:_o,38:[0,.69444,0,0,.75834],39:ea,40:wi,41:wi,42:ao,43:Ma,44:Ks,45:[0,.44444,0,0,.33333],46:gl,47:Ba,48:oo,49:oo,50:oo,51:oo,52:oo,53:oo,54:oo,55:oo,56:oo,57:oo,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Ho,64:zo,65:zo,66:zo,67:aa,68:[0,.69444,0,0,.72223],69:ws,70:[0,.69444,0,0,.56945],71:zo,72:Kl,73:ea,74:Ho,75:[0,.69444,0,0,.69445],76:qs,77:[0,.69444,0,0,.875],78:Kl,79:[0,.69444,0,0,.73611],80:aa,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Ao,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:zo,89:[0,.69444,.025,0,.66667],90:us,91:Bl,93:Bl,94:ji,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Zc,99:tf,100:Zc,101:tf,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Zc,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:Gu,111:[0,.44444,0,0,.5],112:Md,113:Md,114:[0,.44444,.01389,0,.34167],115:Vu,116:[0,.57143,0,0,.36111],117:Gu,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:Or,168:[0,.67937,0,0,.5],176:zo,184:Wc,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:ji,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:ji,715:ji,728:ji,729:[0,.67937,0,0,.27778],730:zo,732:[0,.67659,0,0,.5],733:ji,915:qs,916:Xu,920:Wi,923:us,926:zo,928:Kl,931:Mo,933:Wi,934:Mo,936:Wi,937:Mo,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:ea,8217:ea,8220:ji,8221:ji},"Script-Regular":{32:Or,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:Or},"Size1-Regular":{32:Or,40:kd,41:kd,47:ku,91:Yu,92:ku,93:Yu,123:Ju,125:Ju,160:Or,710:_u,732:_u,770:_u,771:_u,8214:[-99e-5,.601,0,0,.77778],8593:Lu,8595:Lu,8657:_d,8659:_d,8719:jc,8720:jc,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:lu,8748:nf,8749:nf,8750:lu,8896:vl,8897:vl,8898:vl,8899:vl,8968:Rc,8969:Rc,8970:Rc,8971:Rc,9168:St,10216:Rc,10217:Rc,10752:Ld,10753:Ld,10754:Ld,10756:vl,10758:vl},"Size2-Regular":{32:Or,40:Qu,41:Qu,47:Hl,91:Go,92:Hl,93:Go,123:rc,125:rc,160:Or,710:ic,732:ic,770:ic,771:ic,8719:wc,8720:wc,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:ed,8748:qu,8749:qu,8750:ed,8896:$c,8897:$c,8898:$c,8899:$c,8968:td,8969:td,8970:td,8971:td,10216:cu,10217:cu,10752:Uc,10753:Uc,10754:Uc,10756:$c,10758:$c},"Size3-Regular":{32:Or,40:nd,41:nd,47:Tu,91:hc,92:Tu,93:hc,123:uu,125:uu,160:Or,710:du,732:du,770:du,771:du,8730:[.95003,1.45,0,0,1],8968:Au,8969:Au,8970:Au,8971:Au,10216:uu,10217:uu},"Size4-Regular":{32:Or,40:fu,41:fu,47:Gl,91:rd,92:Gl,93:rd,123:Iu,125:Iu,160:Or,710:we,732:we,770:we,771:we,8730:[1.25003,1.75,0,0,1],8968:Le,8969:Le,8970:Le,8971:Le,9115:Ze,9116:nt,9117:Ze,9118:Ze,9119:nt,9120:Ze,9121:Ct,9122:St,9123:Ct,9124:Ct,9125:St,9126:Ct,9127:Jt,9128:pn,9129:nn,9130:[0,.3,0,0,.88889],9131:Jt,9132:pn,9133:nn,9143:[.88502,.915,0,0,1.05556],10216:Iu,10217:Iu,57344:Pn,57345:Pn,57680:Xn,57681:Xn,57682:Xn,57683:Xn},"Typewriter-Regular":{32:Yr,33:Ut,34:Ut,35:Ut,36:gr,37:gr,38:Ut,39:Ut,40:gr,41:gr,42:[0,.52083,0,0,.525],43:Cr,44:[.13889,.125,0,0,.525],45:Cr,46:[0,.125,0,0,.525],47:gr,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,58:Rr,59:[.13889,.43056,0,0,.525],60:Mr,61:[-.19549,.41562,0,0,.525],62:Mr,63:Ut,64:Ut,65:Ut,66:Ut,67:Ut,68:Ut,69:Ut,70:Ut,71:Ut,72:Ut,73:Ut,74:Ut,75:Ut,76:Ut,77:Ut,78:Ut,79:Ut,80:Ut,81:[.13889,.61111,0,0,.525],82:Ut,83:Ut,84:Ut,85:Ut,86:Ut,87:Ut,88:Ut,89:Ut,90:Ut,91:gr,92:gr,93:gr,94:Ut,95:[.09514,0,0,0,.525],96:Ut,97:Rr,98:Ut,99:Rr,100:Ut,101:Rr,102:Ut,103:_r,104:Ut,105:Ut,106:[.22222,.61111,0,0,.525],107:Ut,108:Ut,109:Rr,110:Rr,111:Rr,112:_r,113:_r,114:Rr,115:Rr,116:[0,.55358,0,0,.525],117:Rr,118:Rr,119:Rr,120:Rr,121:_r,122:Rr,123:gr,124:gr,125:gr,126:Ut,127:Ut,160:Yr,176:Ut,184:[.19445,0,0,0,.525],305:Rr,567:_r,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Ut,715:Ut,728:Ut,730:Ut,770:Ut,771:Ut,776:Ut,915:Ut,916:Ut,920:Ut,923:Ut,926:Ut,928:Ut,931:Ut,933:Ut,934:Ut,936:Ut,937:Ut,8216:Ut,8217:Ut,8242:Ut,9251:[.11111,.21944,0,0,.525]}},ui=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,$i=10,Ti=.25,Ni=1.2,ca=.431,Oa={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[ca,ca,ca],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:[Ti,Ti,Ti],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]},Ci=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ai=5,Ei={"\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 qr(a,y){a===void 0&&(a=77);const b=jr[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 Ei)a=Ei[E].codePointAt(0);else if(ui.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 Di={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]},ua={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]},Va={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 La(a){if(ua[a]){const[Me,De,Ye]=ua[a],bt=`<span class="stretchy" style="height:${Ye}em"><svg width="100%" height="${Ye}em" viewBox="0 0 ${Me} ${De}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Va[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Ye/2)/100}em;min-width:0">${bt}</span>`}const[y,b,E,ee]=Di[a];let re,oe;const me=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 xe=y.map((Me,De)=>`<span class="${re[De]}" style=height:${me}em><svg width=400em height=${me}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${oe[De]} slice"><path fill="currentcolor" d="${Va[Me]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${me}em;min-width:${b}em;">${xe}</span>`}function da(a){return Di[a]?Di[a][2]/1e3:ua[a][2]}function qa(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=su(2,16)+re*su(2,10)+oe,b++}}y.push(E)}return y}var Ga=8205,Ko=[[Ga,1],[65038,2],[127995,5],[129456,4],[917536,96]],eo,es=[127462,127487];function ts(a){var y;if(eo===void 0){eo={};for(const b of Ko)for(let E=b[0];E<=b[0]+b[1]-1;E++)eo[E]=!0}return(y=eo[a])!=null?y:!1}function Ra(a){return a>=es[0]&&a<=es[1]}function Ls(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=qa(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===Ga){const oe=E-1;for(E+=2;b[E]===Ga;)E+=2;y.push(String.fromCodePoint(...b.slice(oe,E-oe+1)))}else if(ts(re)){const oe=E-1;for(;ts(b[E]);)E+=b[E]===Ga?2:1;y.push(String.fromCodePoint(...b.slice(oe,2*E-oe-1)))}else Ra(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var Io=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=Ls(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 Wo(a,y){var b,E,ee,re;const oe=[];let me=a.next();if(me&&me!=="\\relax"){if(me==="\\noexpand")me=a.next(),me&&oe.push(me);else if(me==="\\obeyspaces")a.obeyspaces=!0;else if(me==="\\bgroup")oe.push("<{>");else if(me==="\\egroup")oe.push("<}>");else if(me==="\\string"){if(me=a.next(),me)if(me.startsWith("\\"))for(const xe of me)oe.push(xe==="\\"?"\\backslash":xe);else me==="<{>"?oe.push("\\{"):me==="<space>"?oe.push("~"):me==="<}>"&&oe.push("\\}")}else if(me==="\\csname"){for(;a.peek()==="<space>";)a.next();let xe="",Me=!1,De=[];do{if(De.length===0)if(/^#[\d?@]$/.test(a.peek())){const Ye=a.get().slice(1);De=Ro((E=(b=y==null?void 0:y(Ye))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),me=De[0]}else me=a.next(),De=me?[me]:[];Me=De.length===0,!Me&&me==="\\endcsname"&&(Me=!0,De.shift()),Me||(Me=me==="<$>"||me==="<$$>"||me==="<{>"||me==="<}>"||typeof me=="string"&&me.length>1&&me.startsWith("\\")),Me||(xe+=De.shift())}while(!Me);xe&&oe.push("\\"+xe),oe.push(...De)}else if(me!=="\\endcsname")if(me.length>1&&me.startsWith("#")){const xe=me.slice(1);oe.push(...Ro((re=(ee=y==null?void 0:y(xe))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else oe.push(me)}return oe}function Ro(a,y=null){const b=[];let E="";for(const oe of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const me=oe.match(/((?:\\%)|[^%])*/);me!==null&&b.push(me[0])}const ee=new Io(pt(b.join(""))),re=[];do re.push(...Wo(ee,y));while(!ee.end());return re}function Aa(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 yi(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:Aa([a,...y.map(b=>`{${b}}`)])}function Gi(a){return Aa(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var fa=class Tf{constructor(y){Tf._registry[y]=this}static createAtom(y,b,E){return Tf._registry[y].createAtom(b,cr(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of Do(y)){const oe=Tf._registry[re[0].mode];ee.push(...oe.serialize(re,b))}return Aa(ee)}return Aa(xo(y,b))}static getFont(y,b,E){return Tf._registry[y].getFont(b,E)}};fa._registry={};var Ii=fa;function Do(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 pi(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 Da(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const oe of Do(a)){const me=y.defaultMode;for(const xe of pi(oe,"color")){const Me=xe[0].computedStyle,De=Ii._registry[xe[0].mode].serialize(xe,ge(ke({},y),{defaultMode:me==="text"?"text":"math"}));!y.skipStyles&&Me.color&&Me.color!=="none"&&(!E||ee!==Me.color)?re.push(yi("\\textcolor",(b=Me.verbatimColor)!=null?b:Me.color,Aa(De))):re.push(Aa(De))}}return re}function Lo(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return pi(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 yi("\\colorbox",(re=oe.verbatimBackgroundColor)!=null?re:oe.backgroundColor,Aa(Da(ee,ge(ke({},y),{defaultMode:"text"}))))}return Aa(Da(ee,y))})}function xo(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 pi(a,"fontSize")){const oe=re[0].computedStyle.fontSize,me=Lo(re,y);me&&(oe&&oe!=="auto"&&(!b||E!==oe)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][oe],...me):ee.push(...me))}return ee}function ol(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 Ts(a){if(a.length===0)return"ord";const y=ol(a[0].type),b=ol(a[a.length-1].type);return y&&y===b?y:"ord"}function El(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 Ir=class E0{constructor(y,b){var E,ee,re,oe,me;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:ze(y)?this.children=y.filter(Me=>Me!==null):y&&y instanceof E0&&(this.children=[y]),this.children)for(const Me of this.children)Me.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 xe=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(xe=(me=Ii.getFont((oe=b.mode)!=null?oe:"math",this,ge(ke({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?me:void 0),xe||(xe="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),To(this,xe)}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=El(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=El(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"]=El(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"]=El(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"]=El(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=Yt(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 $t of this.children)re+=$t.toMarkup();let oe="";if(this.svgBody)oe=La(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 $t=(b=this.cssProperties)==null?void 0:b.padding;$t?(oe+=`top:${$t};`,oe+=`left:${$t};`,oe+=`width:calc(100% - 2 * ${$t} );`):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 me="";const xe=this.classes.split(" ");xe.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&xe.push("ML__latex-caret"),this.isSelected&&xe.push("ML__selected");const Me=xe.length===1?xe[0]:xe.filter(($t,jt,sr)=>$t.length>0&&sr.indexOf($t)===jt).join(" ");if(Me.length>0&&(me+=` class="${Me}"`),this.id&&(me+=` data-atom-id=${this.id}`),this.cssId&&(me+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(me+=" "+Object.keys(this.attributes).map($t=>`${$t}="${this.attributes[$t]}"`).join(" ")),this.htmlData){const $t=this.htmlData.split(",");for(const jt of $t){const sr=jt.match(/([^=]+)=(.+$)/);if(sr){const Gr=sr[1].trim().replace(/ /g,"-");Gr&&(me+=` data-${Gr}="${sr[2]}" `)}else{const Gr=jt.trim().replace(/ /g,"-");Gr&&(me+=` data-${Gr} `)}}}const De=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&De.width===void 0&&(De.width=`${Math.ceil(this._width*100)/100}em`);const Ye=Object.keys(De).map($t=>`${$t}:${De[$t]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||oe.length>0)&&Ye.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const $t=this.htmlStyle.split(";");let jt="";for(const sr of $t){const Gr=sr.match(/([^=]+):(.+$)/);if(Gr){const er=Gr[1].trim().replace(/ /g,"-");er&&(jt+=`${er}:${Gr[2]};`)}}jt&&(me+=` style="${jt}"`)}Ye.length>0&&(me+=` style="${Ye.join(";")}"`);let bt="";return me.length>0||oe.length>0?bt=`<span${me}>${re}${oe}</span>`:bt=re,this.caret==="text"?bt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(bt+='<span class="ML__caret"></span>'),bt}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 xe of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&xe in y.cssProperties||this.cssProperties&&xe 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 xe of Object.keys(this.cssProperties))if(this.cssProperties[xe]!==y.cssProperties[xe])return!1}const oe=this.classes.trim().replace(/\s+/g," ").split(" "),me=y.classes.trim().replace(/\s+/g," ").split(" ");if(oe.length!==me.length)return!1;oe.sort(),me.sort();for(const[xe,Me]of oe.entries())if(Me==="vertical-separator"||Me!==me[xe])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 Fl(a){if(!a||a.length===0)return[];a[0].children=Fl(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=Fl(a[b].children),y.push(a[b]));return y}function Cs(a){return a.children&&(a.children=Fl(a.children)),a}function fl(a,y){if(!a)return new Ir(null,y);const b=new Ir(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 Ir(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 Ir(E,ge(ke({},y),{type:"lift"}))}function yl(a){const y=da(a)/2,b=new Ir(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function To(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=qr(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,me)=>oe+me.width,0),a.maxFontSize=re}}function No(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 me=y[oe],xe=-me.shift-re-me.box.depth,Me=xe-(b.box.height+b.box.depth);re=re+xe,E.push(Me),E.push(me),b=me}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 ns(a){var y;const[b,E]=No(a);if(!b)return[[],0,0];const ee=new Ir(null,{classes:"pstrut"});let re=0;for(const jt of b)if(typeof jt!="number"){const sr=jt.box;re=Math.max(re,sr.maxFontSize,sr.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const oe=[];let me=E,xe=E,Me=E,De=0;for(const jt of b){if(typeof jt=="number")Me+=jt;else{const sr=jt.box,Gr=(y=jt.classes)!=null?y:[],er=new Ir([ee,sr],{classes:Gr.join(" "),style:jt.style});sr.setStyle("height",sr.height+sr.depth,"em"),sr.setStyle("display","inline-block"),er.setStyle("top",-re-Me-sr.depth,"em"),jt.marginLeft&&er.setStyle("margin-left",jt.marginLeft,"em"),jt.marginRight&&er.setStyle("margin-right",jt.marginRight,"em"),oe.push(er),Me+=sr.height+sr.depth,De=Math.max(De,er.width)}me=Math.min(me,Me),xe=Math.max(xe,Me)}oe.forEach(jt=>{jt.softWidth=De});const Ye=new Ir(oe,{classes:"vlist"});if(Ye.softWidth=De,Ye.height=xe,Ye.setStyle("height",xe,"em"),me>=0)return[[new Ir(Ye,{classes:"vlist-r"})],xe,-me];const bt=new Ir(new Ir(null),{classes:"vlist"});bt.height=-me,bt.setStyle("height",-me,"em");const $t=new Ir(8203,{classes:"vlist-s",maxFontSize:0});return $t.softWidth=0,$t.height=0,$t.depth=0,[[new Ir([Ye,$t],{classes:"vlist-r"}),new Ir(bt,{classes:"vlist-r"})],xe,-me]}var Za=class extends Ir{constructor(a,y){var b;const[E,ee,re]=ns(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,me)=>Math.max(oe,me.width),0)}};function Rs(a,y){var b,E,ee,re,oe;const me=a.metrics,xe=new Ir(y.base),Me=(b=y.baseShift)!=null?b:0,De=(E=y.slant)!=null?E:0;let Ye=0,bt=0;y.above&&(Ye=(ee=y.aboveShift)!=null?ee:Math.max(me.bigOpSpacing1,me.bigOpSpacing3-y.above.depth)),y.below&&(bt=(re=y.belowShift)!=null?re:Math.max(me.bigOpSpacing2,me.bigOpSpacing4-y.below.height));let $t=null;if(y.below&&y.above){const jt=me.bigOpSpacing5+y.below.height+y.below.depth+bt+xe.depth+Me;$t=new Za({bottom:jt,children:[me.bigOpSpacing5,{box:y.below,marginLeft:-De,classes:["ML__center"]},bt,{box:xe,classes:["ML__center"]},Ye,{box:y.above,marginLeft:De,classes:["ML__center"]},me.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)$t=new Za({top:xe.height-Me,children:[me.bigOpSpacing5,{box:y.below,marginLeft:-De,classes:["ML__center"]},bt,{box:xe,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const jt=xe.depth+Me;$t=new Za({bottom:jt,children:[{box:xe,classes:["ML__center"]},Ye,{box:y.above,marginLeft:De,classes:["ML__center"]},me.bigOpSpacing5]}).wrap(a)}else{const jt=xe.depth+Me;$t=new Za({bottom:jt,children:[{box:xe},me.bigOpSpacing5]}).wrap(a)}return new Ir($t,{type:(oe=y.type)!=null?oe:"op"})}var to=7,As=6,Hs=5,Ws=4,Ml=3,Es=2,kl=1,Ms=0,Zs=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(Oa).reduce((ee,re)=>ge(ke({},ee),{[re]:Oa[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return ks[[Ms,kl,Ms,kl,Es,Ml,Es,Ml][this.id]]}get sub(){return ks[[Ms,Ms,Ms,Ms,Es,Es,Es,Es][this.id]]}get fracNum(){return ks[[Ms,kl,Ms,kl,Es,Ml,Ws,Hs][this.id]]}get fracDen(){return ks[[Ms,Ms,Ms,Ms,Es,Es,Ws,Ws][this.id]]}get cramp(){return ks[[Ms,Ms,Es,Es,Ws,Ws,As,As][this.id]]}get isTight(){return this.sizeDelta<0}},js={7:new Zs(to,0,!1),6:new Zs(As,0,!0),5:new Zs(Hs,0,!1),4:new Zs(Ws,0,!0),3:new Zs(Ml,-3,!1),2:new Zs(Es,-3,!0),1:new Zs(kl,-4,!1),0:new Zs(Ms,-4,!0)},ks=ge(ke({},js),{displaystyle:js[to],textstyle:js[Hs],scriptstyle:js[Ml],scriptscriptstyle:js[kl]});function ms(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:$i,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=su(10,y);return Math.round(a.dimension/$i*E*ee)/ee}return a.dimension*E}function ls(a,y){if(a===null)return 0;const b=ms(a)/$i;if(Number.isFinite(y)){const E=su(10,y);return Math.round(b*E)/E}return b}function Xl(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function Cc(a){let y=Xl(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${Xl(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${Xl(a.shrink)}`),y}function hs(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=Cc(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 sl(a,y){return a==null?null:"number"in a?ge(ke({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?ge(ke({},a),{factor:a.factor*y}):ge(ke({},a),{factor:y}):"dimension"in a?ge(ke({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:sl(a.glue,y),shrink:sl(a.shrink,y),grow:sl(a.grow,y)}:a.shrink?{glue:sl(a.glue,y),shrink:sl(a.shrink,y)}:a.grow?{glue:sl(a.glue,y),grow:sl(a.grow,y)}:{glue:sl(a.glue,y)}:null}var Du={"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 Ec(){return ke({},Du)}function fo(){return{registers:Ec(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:it.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:ut,backgroundColorMap:$e,getMacro:a=>Xr(a,Tt())}}var ta=class M0{constructor(y,b){var E,ee,re,oe,me,xe,Me,De,Ye,bt,$t,jt,sr,Gr,er;let Tr;y!=null&&y.parent?(this.parent=y.parent,Tr=y.parent,this.registers={}):(Tr=ke(ke({},fo()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=Tr.registers),Tr.atomIdsSettings&&(this.atomIdsSettings=ke({},Tr.atomIdsSettings)),this.renderPlaceholder=Tr.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=Tr.letterShapeStyle,this.minFontScale=Tr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(xe=(me=this.parent)==null?void 0:me.color)!=null?xe:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(De=(Me=this.parent)==null?void 0:Me.backgroundColor)!=null?De:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((Ye=this.parent)==null?void 0:Ye.size)?this.size=b.fontSize:this.size=($t=(bt=this.parent)==null?void 0:bt.size)!=null?$t:Ai;let ti=(sr=(jt=this.parent)==null?void 0:jt.mathstyle)!=null?sr:ks.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(Tr instanceof M0)switch(y.mathstyle){case"cramp":ti=ti.cramp;break;case"superscript":ti=ti.sup;break;case"subscript":ti=ti.sub;break;case"numerator":ti=ti.fracNum;break;case"denominator":ti=ti.fracDen;break}switch(y.mathstyle){case"textstyle":ti=ks.textstyle;break;case"displaystyle":ti=ks.displaystyle;break;case"scriptstyle":ti=ks.scriptstyle;break;case"scriptscriptstyle":ti=ks.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=ti,this.smartFence=Tr.smartFence,this.placeholderSymbol=Tr.placeholderSymbol,this.colorMap=(Gr=Tr.colorMap)!=null?Gr:Nr=>Nr,this.backgroundColorMap=(er=Tr.backgroundColorMap)!=null?er:Nr=>Nr,this.getMacro=Tr.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===to||this.mathstyle.id===As}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(Ci[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 ls(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(ke({},re),{dimension:E*re.dimension}):"glue"in re?ge(ke({},re),{glue:ge(ke({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?ge(ke({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?ge(ke({},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:ms(E,b)/$i}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}},Os=["body","above","below","superscript","subscript"];function Zo(a){return typeof a=="string"&&Os.includes(a)}function Us(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var pr=class Eu{constructor(y){var b,E,ee,re,oe,me;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=ke({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(oe=y.captureSelection)!=null?oe:!1,this.skipBoundary=(me=y.skipBoundary)!=null?me:!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=_l(b),oe=[];for(const xe of re){const Me=xe[0].style,De=lc(y,xe,{style:{color:Me.color,backgroundColor:Me.backgroundColor,fontSize:Me.fontSize}});De&&oe.push(De)}if(oe.length===0)return null;const me=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return oe.length===1&&!me&&!(E!=null&&E.type)?oe[0].wrap(y):new Ir(oe,{classes:me,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Ii.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 Eu({type:"mord",value:y,mode:"math"}):new Eu(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=ke({},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=id(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?Aa([yi(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?Aa([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Ii.serialize(this.body,ge(ke({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Ii.serialize(this.above,y)}belowToLatex(y){return Ii.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=ge(ke({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Ii.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=Ii.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(Zo(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of Os)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(Zo(y)),Zo(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 Us(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Us(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=ke(ke({},(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=ke(ke({},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(Zo(b)),!Zo(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 Eu({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(Zo(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 Os)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=cr(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new ta({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 me=null,xe=null;const Me=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let De=0;if(re){const sr=new ta({parent:y,mathstyle:"superscript"});me=Eu.createBox(sr,re),Me||(De=ee.height-y.metrics.supDrop*sr.scalingFactor)}let Ye=0;if(oe){const sr=new ta({parent:y,mathstyle:"subscript"});xe=Eu.createBox(sr,oe),Me||(Ye=ee.depth+y.metrics.subDrop*sr.scalingFactor)}let bt;y.isDisplayStyle?bt=y.metrics.sup1:y.isCramped?bt=y.metrics.sup3:bt=y.metrics.sup2;const $t=.5/$i/y.scalingFactor;let jt=null;if(xe&&me){De=Math.max(De,bt,me.depth+.25*y.metrics.xHeight),Ye=Math.max(Ye,y.metrics.sub2);const sr=y.metrics.defaultRuleThickness;if(De-me.depth-(xe.height-Ye)<4*sr){Ye=4*sr-(De-me.depth)+xe.height;const er=.8*y.metrics.xHeight-(De-me.depth);er>0&&(De+=er,Ye-=er)}const Gr=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;jt=new Za({individualShift:[{box:xe,shift:Ye,marginLeft:Gr},{box:me,shift:-De}]}).wrap(y)}else xe&&!me?(Ye=Math.max(Ye,y.metrics.sub1,xe.height-.8*ca),jt=new Za({shift:Ye,children:[{box:xe,marginRight:$t,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!xe&&me&&(De=Math.max(De,bt,me.depth+.25*ca),jt=new Za({shift:-De,children:[{box:me,marginRight:$t}]}));return new Ir([ee,new Ir(jt,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Eu.createBox(new ta({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?Eu.createBox(new ta({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):Rs(y,ge(ke({},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 me=(E=this.value)!=null?E:this.body,xe=(ee=b==null?void 0:b.boxType)!=null?ee:ol(this.type);let Me=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(Me+=" ML__text");const De=typeof me=="string"||me===void 0?new Ir(me!=null?me:null,{type:xe,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:ge(ke({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:Me}):(oe=Eu.createBox(y,me,{type:xe,classes:Me}))!=null?oe:new Ir(null);return y.isTight&&(De.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(De.italic=0),De.right=De.italic,this.bind(y,De),this.caret&&!this.superscript&&!this.subscript&&(De.caret=this.caret),De}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 _l(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 lc(a,y,b){var E,ee,re,oe,me;if(!y||y.length===0)return null;const xe=new ta({parent:a},b.style),Me=!((E=xe.atomIdsSettings)!=null&&E.groupNumbers);let De=[];if(y.length===1){const bt=y[0],$t=bt.render(xe);$t&&(Me&&bt.isSelected&&$t.selected(!0),De=[$t])}else{let bt="",$t=!0;for(const jt of y){(ee=xe.atomIdsSettings)!=null&&ee.groupNumbers&&bt&&($t&&jt.isDigit()||!$t&&Pu(jt))&&(xe.atomIdsSettings.overrideID=bt);const sr=jt.render(xe);xe.atomIdsSettings&&(xe.atomIdsSettings.overrideID=void 0),sr&&((re=xe.atomIdsSettings)!=null&&re.groupNumbers&&((jt.isDigit()||Pu(jt))&&(!bt||$t!==jt.isDigit())&&($t=jt.isDigit(),bt=(oe=jt.id)!=null?oe:""),bt&&(!(jt.isDigit()||Pu(jt))||!jt.hasEmptyBranch("superscript")||!jt.hasEmptyBranch("subscript"))&&(bt="")),Me&&jt.isSelected&&sr.selected(!0),De.push(sr))}}if(De.length===0)return null;const Ye=new Ir(De,ge(ke({isTight:xe.isTight},b),{type:(me=b.type)!=null?me:"lift"}));return Ye.isSelected=De.every(bt=>bt.isSelected),Ye.wrap(xe)}function Pu(a){return a.mode==="text"}function id(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 cc=class k0 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 k0(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:wr("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&&Td(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function Td(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Vs(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 pu(a){return Array.isArray(a)&&a.length===2}function Ou(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function Ad(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function Id(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,me=!1,xe=!1,Me=!1,De=!1,Ye=!1,bt=!1,$t=!1,jt=!1,sr=!1,Gr=!1,er=a[0],Tr=0;for(;er!=null&&er.type&&/^(subsup|placeholder)$/.test(er.type);)Tr+=1,er=a[Tr];return b=!er||er.type==="first",er&&(sr=er.mode==="text",E=!sr&&er.type==="mord"&&ve.test(er.value),ee=!sr&&er.type==="mord"&&/\d+$/.test(er.value),re=!sr&&er.isFunction,oe=er.type==="genfrac",me=er.type==="surd",xe=er.type==="mbin",Me=er.type==="mrel",De=er.type==="mop"||er.type==="operator"||er.type==="extensible-symbol",Ye=er.type==="mpunct"||er.type==="minner",bt=er.type==="array",$t=er.type==="mopen",jt=er.type==="mclose"||er.type==="leftright",Gr=er.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")&&me||y.after.includes("binop")&&xe||y.after.includes("relop")&&Me||y.after.includes("operator")&&De||y.after.includes("punct")&&Ye||y.after.includes("array")&&bt||y.after.includes("openfence")&&$t||y.after.includes("closefence")&&jt||y.after.includes("text")&&sr||y.after.includes("space")&&Gr?y.value:""}function Nu(a,y,b){return b?Id(a,b[y]):""}var mu={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 Vc(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=Dd(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",bl(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function bl(a,y){var b,E,ee;if(!a)return"";let re=!1,oe;const me=(b=y.inlineShortcuts)!=null?b:mu;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(oe=pc(a.slice(1),{inlineShortcuts:me,noWrap:!0}),a=a[0]+"{"+oe.match+"}",a+=bl(oe.rest,y),re=!0),re||(oe=a.match(/^(sqrt|\u221A)(.*)/),oe&&(oe=pc(oe[2],{inlineShortcuts:me,noWrap:!0}),a="\\sqrt{"+((E=oe.match)!=null?E:"\\placeholder{}")+"}",a+=bl(oe.rest,y),re=!0)),re||(oe=a.match(/^(\\cbrt|\u221B)(.*)/),oe&&(oe=pc(oe[2],{inlineShortcuts:me,noWrap:!0}),a="\\sqrt[3]{"+((ee=oe.match)!=null?ee:"\\placeholder{}")+"}",a+=bl(oe.rest,y),re=!0)),re||(oe=a.match(/^abs(.*)/),oe&&(oe=pc(oe[1],{inlineShortcuts:me,noWrap:!0}),a="\\left|"+oe.match+"\\right|",a+=bl(oe.rest,y),re=!0)),re||(oe=a.match(/^["”“](.*?)["”“](.*)/),oe&&(a="\\text{"+oe[1]+"}",a+=bl(oe[2],y),re=!0)),re||(oe=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),oe&&(a=ad(oe[1],me),a+=bl(oe[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(oe=pc(a.slice(1),{inlineShortcuts:me,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+oe.match+"\\right)":a[0]+oe.match,a+=bl(oe.rest,y),re=!0),re||(oe=a.match(/^([a-zA-Z]+)(.*)/),oe&&(a=ad(oe[1],me),a+=bl(oe[2],y),re=!0)),!re)if(oe=pc(a,{inlineShortcuts:me,noWrap:!0}),oe.match&&oe.rest[0]==="/"){const xe=pc(oe.rest.slice(1),{inlineShortcuts:me,noWrap:!0});xe.match&&(a="\\frac{"+oe.match+"}{"+xe.match+"}"+bl(xe.rest,y)),re=!0}else oe.match&&(a=a.startsWith("(")?"\\left("+oe.match+"\\right)"+bl(oe.rest,y):oe.match+bl(oe.rest,y),re=!0);return re||(oe=a.match(/^(\s+)(.*)$/),oe&&(a=" "+bl(oe[2],y),re=!0)),a}function pc(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let oe=1,me=1;for(;me<a.length&&oe>0;)a[me]===ee&&oe++,a[me]===re&&oe--,me++;oe===0?(y.noWrap&&ee==="("?b=bl(a.substring(1,me-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+bl(a.substring(1,me-1),y)+"\\right"+re),E=a.slice(Math.max(0,me))):(b=a.substring(1,me),E="")}else{let oe=a.match(/^([a-zA-Z]+)/);if(oe){let me=Nu(null,a,y.inlineShortcuts);if(me)return me=me.replace("_{#?}",""),me=me.replace("^{#?}",""),{match:me,rest:a.slice(me.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 ad(a,y){let b=Nu(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var od=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Mc(a){const y=a.trim();for(const b of od)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 Dd(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=Mc(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 gu="$$",Ru="$$",sd=(a,y,b)=>(od.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${gu} ${y} ${Ru}`),y),$u=class uh{constructor(y){uh._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)?uh._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]:Vs(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]:Vs(ee.selection);let oe=ee.getAtoms(re);if(oe.every(me=>me.mode==="text"||!me.mode))b.clipboardData.setData("text/plain",oe.filter(me=>me instanceof cc).map(me=>me.value).join(""));else if(oe.every(me=>me.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(me=>{var xe;return(xe=me.value)!=null?xe:""}).join(""));else{let me;oe.length===1&&oe[0].verbatimLatex!==void 0?me=oe[0].verbatimLatex:me=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",me);try{b.clipboardData.setData("text/plain",y.options.onExport(y,me,re))}catch(xe){}if(oe.length===1){const xe=oe[0];(xe.type==="root"||xe.type==="group")&&(oe=xe.body.filter(Me=>Me.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(oe.map(xe=>xe.toJson())))}catch(xe){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const xe=window.MathfieldElement.computeEngine;if(xe)try{const Me=xe.jsonSerializationOptions;xe.jsonSerializationOptions={metadata:["latex"]};const De=xe.parse(ee.getValue(re,"latex-unstyled"));xe.jsonSerializationOptions=Me;const Ye=JSON.stringify(De.json);Ye&&b.clipboardData.setData("application/json",Ye)}catch(Me){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return uh._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};$u._modes={};var $a=$u,Pd=[{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","^"]}],Bu={"\\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 Yl(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function ac(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 mc(a){const y=ac(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function vu(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 Fu(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),me=Math.ceil(y.top-E.top);return{left:oe,right:oe+ee,top:me,bottom:me+re}}function yu(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=yu(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 Bc(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?yu(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function Od(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 xe=Math.floor(re.getBoundingClientRect().width)/oe;xe=isNaN(xe)?1:xe;const Me=Fu(a,Bc(a,ee),xe);if(Me){const De=vu(ee);if(E.has(De)){const Ye=E.get(De);E.set(De,{left:Math.min(Ye.left,Me.left),right:Math.max(Ye.right,Me.right),top:Math.min(Ye.top,Me.top),bottom:Math.max(Ye.bottom,Me.bottom)})}else E.set(De,Me)}}return[...E.values()]}function $o(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...Od(a,E,y)),[])}function as(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Ol(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 gc=`@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;
|
|
|
}
|
|
|
`,Bo=`.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);
|
|
|
}
|
|
|
`,ld=`#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);
|
|
|
}
|
|
|
`,cd=`/* 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;
|
|
|
}
|
|
|
`,kc=`/* 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);*/
|
|
|
}
|
|
|
`,ud=`.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));
|
|
|
}
|
|
|
`,Gc=`: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;
|
|
|
}
|
|
|
`,gs;function bu(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=Bo;break;case"mathfield":y=gc;break;case"environment-popover":y=ld;break;case"suggestion-popover":y=cd;break;case"keystroke-caption":y=kc;break;case"virtual-keyboard":y=ud;break;case"ui":y=Gc;break;case"menu":y=dh;break;default:debugger}return y}function zu(a){return gs||(gs={}),gs[a]||(gs[a]=new CSSStyleSheet,gs[a].replaceSync(bu(a))),gs[a]}var Fc;function uc(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(bu(a))),window.document.head.appendChild(b);return}if(Fc||(Fc={}),((y=Fc[a])!=null?y:0)!==0)Fc[a]+=1;else{const b=zu(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],Fc[a]=1}}function x(a){if("adoptedStyleSheets"in document&&Fc!=null&&Fc[a]&&(Fc[a]-=1,Fc[a]<=0)){const y=gs[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class _0 extends pr{constructor(y){var b;super(ge(ke({},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 _0(y)}toJson(){return ge(ke({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new ta({parent:y,mathstyle:"cramp"},this.style),ee=(b=pr.createBox(E,this.body))!=null?b:new Ir("\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,ca),me;if(this.svgAccent)me=yl(this.svgAccent),oe=E.metrics.bigOpSpacing1-oe;else if(this.accent){const Me=new Ir(this.accent,{fontFamily:"Main-Regular"});Me.italic=0;const De=this.accent===8407?" ML__accent-vec":"";me=new Ir(new Ir(Me),{classes:"ML__accent-body"+De})}me=new Za({shift:0,children:[{box:new Ir(ee)},-oe,{box:me,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const xe=new Ir(me,{type:"lift"});return this.caret&&(xe.caret=this.caret),this.bind(E,xe.wrap(E)),this.attachSupsub(E,{base:xe})}},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 ae(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 de(a,y,b,E){var ee;const oe=new Ir(ae(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)*Ti),oe}function Ee(a,y,b,E,ee){var re,oe;const me=new ta({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),xe=new Ir(ae(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(me);return b&&xe.setTop((1-me.scalingFactor)*Ti),xe}function Ne(a,y,b,E,ee){var re;let oe,me,xe,Me;oe=xe=Me=ae(a),me=null;let De="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?xe=oe=Me=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?xe=oe=Me=8741:a==="\\uparrow"?xe=Me=9168:a==="\\Uparrow"?xe=Me=8214:a==="\\downarrow"?oe=xe=9168:a==="\\Downarrow"?oe=xe=8214:a==="\\updownarrow"?(oe=8593,xe=9168,Me=8595):a==="\\Updownarrow"?(oe=8657,xe=8214,Me=8659):a==="["||a==="\\lbrack"?(oe=9121,xe=9122,Me=9123,De="Size4-Regular"):a==="]"||a==="\\rbrack"?(oe=9124,xe=9125,Me=9126,De="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(xe=oe=9122,Me=9123,De="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(oe=9121,xe=Me=9122,De="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(xe=oe=9125,Me=9126,De="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(oe=9124,xe=Me=9125,De="Size4-Regular"):a==="("||a==="\\lparen"?(oe=9115,xe=9116,Me=9117,De="Size4-Regular"):a===")"||a==="\\rparen"?(oe=9118,xe=9119,Me=9120,De="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(oe=9127,me=9128,Me=9129,xe=9130,De="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(oe=9131,me=9132,Me=9133,xe=9130,De="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(oe=9127,Me=9129,xe=9130,De="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(oe=9131,Me=9133,xe=9130,De="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(oe=9127,Me=9133,xe=9130,De="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(oe=9131,Me=9129,xe=9130,De="Size4-Regular"):a==="\\surd"?(oe=57345,Me=9143,xe=57344,De="Size4-Regular"):a==="\\ulcorner"?(oe=9484,xe=Me=32):a==="\\urcorner"?(oe=9488,xe=Me=32):a==="\\llcorner"?(Me=9492,xe=oe=32):a==="\\lrcorner"&&(oe=9496,xe=oe=32);const Ye=qr(oe,De),bt=Ye.height+Ye.depth,$t=qr(xe,De),jt=$t.height+$t.depth,sr=qr(Me,De),Gr=sr.height+sr.depth;let er=0,Tr=1;if(me!==null){const Il=qr(me,De);er=Il.height+Il.depth,Tr=2}const ti=bt+Gr+er,Nr=Math.max(0,Math.ceil((y-ti)/(Tr*jt))),Zi=ti+Nr*Tr*jt;let va=Ti;b&&(va=va*E.scalingFactor);const oa=Zi/2-va,Fo=.008,ps=[];ps.push({box:new Ir(Me,{fontFamily:De})}),ps.push(-Fo);const di=new Ir(xe,{fontFamily:De});if(me===null)for(let Il=0;Il<Nr;Il++)ps.push({box:di});else{for(let Il=0;Il<Nr;Il++)ps.push({box:di});ps.push(-Fo),ps.push({box:new Ir(me,{fontFamily:De})}),ps.push(-Fo);for(let Il=0;Il<Nr;Il++)ps.push({box:di})}ps.push(-Fo),ps.push({box:new Ir(oe,{fontFamily:De})});let bc="";De==="Size1-Regular"?bc=" delim-size1":De==="Size4-Regular"&&(bc=" delim-size4");const nu=new Za({bottom:oa,children:ps},{classes:bc});return new Ir(nu,ge(ke({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Ke=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Xe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),Nt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Vt=[0,1.2,1.8,2.4,3];function Wn(a,y,b,E){return a===void 0||a==="."?Hi(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Ke.has(a)||Nt.has(a)?Ee(a,y,!1,b,E):Xe.has(a)?Ne(a,Vt[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var On=[{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}],Er=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],$r=[{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 Mi(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=qr(a,ai(b[re]));if(oe.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let me=oe.height+oe.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?me*=Math.max(Ci[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(me*=Math.max(Ci[Math.max(1,E.size-1)],E.minFontScale))),me>y)return b[re]}return b[b.length-1]}function Fi(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return Hi(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let oe;Nt.has(y)?oe=On:Ke.has(y)?oe=$r:oe=Er;const me=Mi(ae(y),b,oe,ee),xe=new ta({parent:ee,mathstyle:me.mathstyle},re==null?void 0:re.style);return me.type==="small"?de(y,xe,E,ge(ke({},re),{type:a})):me.type==="large"?Ee(y,me.size,E,xe,ge(ke({},re),{type:a})):(console.assert(me.type==="stack"),Ne(y,b,E,xe,ge(ke({},re),{type:a})))}function bi(a,y,b,E,ee,re){if(y===".")return Hi(ee,re==null?void 0:re.classes);const oe=Ti*ee.scalingFactor,me=901,xe=5/$i,Me=Math.max(b-oe,E+oe),De=Math.max(Me/500*me,2*Me-xe);return Fi(a,y,De,!0,ee,re)}function Hi(a,y){const b=new Ir(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new ta({parent:a,mathstyle:"textstyle"}))}var wa=class L0 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 L0(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{}"}},ka=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Co=["cases","dcases","rcases"],vs=["align","align*","aligned","gather","gathered","split"],xl=["array","subequations","eqnarray"];function $s(a){return xl.concat(vs).concat(Co).concat(ka).includes(a)}function Zl(a){return ka.includes(a)}function jl(a){return Co.includes(a)}function ll(a){return vs.includes(a)}function Ul(a,y,b){let E=0;for(const Me of b)"align"in Me&&(E+=1);let ee=0;const re=[];for(const Me of y){let De=0;for(ee=Math.max(ee,Math.min(Me.length,E));De<Me.length;){const Ye=[],bt=Math.min(Me.length,De+E);for(;De<bt;){const $t=Me[De];$t.length===0?Ye.push([new pr({type:"first",mode:a.mode})]):$t[0].type!=="first"?Ye.push([new pr({type:"first",mode:a.mode}),...$t]):(console.assert(!$t.slice(1).some(jt=>jt.type==="first")),Ye.push($t)),De+=1}re.push(Ye)}}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 Me of re){if(Me.length!==ee)for(let De=Me.length;De<ee;De++)Me.push([new pr({type:"first",mode:a.mode}),new wa]);oe.push(Me)}let me=0,xe=0;for(const Me of oe){xe=0;for(const De of Me){for(const Ye of De)Ye.parent=a,Ye.parentBranch=[me,xe];xe+=1}me+=1}return a.isDirty=!0,oe}var Xa=class T0 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=Ul(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 T0(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=ge(ke({},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(Us(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Us(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(Zo(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,me;const xe=new ta({parent:y,mathstyle:this.mathstyleName},this.style),Me=xe.getRegisterAsEm("arrayrulewidth"),De=xe.getRegisterAsEm("arraycolsep"),Ye=xe.getRegisterAsEm("doublerulesep"),bt=(E=(b=this.arraystretch)!=null?b:xe.getRegisterAsNumber("arraystretch"))!=null?E:1;let $t=typeof this.arraycolsep=="number"?this.arraycolsep:De;this.colSeparationType==="small"&&($t=.2778*(new ta({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const jt=bt*Ni,sr=.7*jt,Gr=.3*jt;let er=0;const Tr=[];let ti=0;const Nr=this.array.length;for(let bs=0;bs<Nr;++bs){const nl=this.array[bs];ti=Math.max(ti,nl.length);const Dl=new ta({parent:xe,mathstyle:this.mathstyleName},this.style);let ru=sr/Dl.scalingFactor,iu=Gr/Dl.scalingFactor;const au={cells:[],height:0,depth:0,pos:0};for(const Hc of nl){const ep=(ee=pr.createBox(Dl,Hc,{type:"ignore"}))!=null?ee:new Ir(null,{type:"ignore"});iu=Math.max(iu,ep.depth),ru=Math.max(ru,ep.height),au.cells.push(ep)}let ou=(re=ls(this.rowGaps[bs]))!=null?re:0;ou>0&&(ou+=Gr,iu=Math.max(iu,ou),ou=0),bs<Nr-1&&!Zl(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(iu+=xe.getRegisterAsEm("jot")),au.height=ru,au.depth=iu,er+=ru,au.pos=er,er+=iu+ou,Tr.push(au)}const Zi=er/2+Ti,va=[];for(let bs=0;bs<ti;bs++){const nl=[];for(const Dl of Tr){const ru=Dl.cells[bs];ru.depth=Dl.depth,ru.height=Dl.height,nl.push({box:ru,shift:Dl.pos-Zi})}nl.length>0&&va.push(new Za({individualShift:nl}))}const oa=[];let Fo=!1,ps=!1,di=0,bc=!this.leftDelim;const{colFormat:nu}=this;for(const bs of nu){if("align"in bs&&di>=va.length)break;if("align"in bs)Fo?oa.push(Bs(2*$t)):(ps||bc)&&oa.push(Bs($t)),oa.push(new Ir(va[di],{classes:"col-align-"+bs.align})),di++,Fo=!0,ps=!1,bc=!1;else if("gap"in bs){if(typeof bs.gap=="number")oa.push(Bs(bs.gap));else{const nl=Xs(y,Tr,Zi,bs.gap);nl&&oa.push(nl)}Fo=!1,ps=!1,bc=!1}else if("separator"in bs){const nl=new Ir(null,{classes:"vertical-separator"});nl.height=er,nl.setStyle("height",er,"em"),nl.setStyle("border-right",`${Me}em ${bs.separator} currentColor`),nl.setStyle("vertical-align",-(er-Zi),"em");let Dl=0;ps?Dl=Ye-Me:Fo&&(Dl=$t-Me),nl.left=Dl,oa.push(nl),Fo=!1,ps=!0,bc=!1}}Fo&&!this.rightDelim&&oa.push(Bs($t));const Ac=new Ir(oa,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Ac.caret=this.caret),this.bind(y,Ac);const Il=Ac.height,xc=Ac.depth,sc=this.bind(y,new Ir([this.bind(y,bi("open",(oe=this.leftDelim)!=null?oe:".",Il,xc,xe,{isSelected:this.isSelected})),Ac,this.bind(y,bi("close",(me=this.rightDelim)!=null?me:".",Il,xc,xe,{isSelected:this.isSelected}))],{type:"ord"}));return sc?(sc.setStyle("display","inline-block"),this.caret&&(sc.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:sc}))):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}}`),Aa(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(Gs(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(Gs(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,Gs(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,Gs(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 Gs(a){const y=new pr({type:"first",mode:a.mode});y.parent=a;const b=new wa;return b.parent=a,[y,b]}function Bs(a){const y=new Ir(null,{classes:"arraycolsep"});return y.width=a,y}function Xs(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 Za({individualShift:ee}).wrap(a)}var el=class A0 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 A0(y)}toJson(){return ge(ke({},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 me=y.toEm((b=this.offset)!=null?b:{dimension:0});oe.depth+=me,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 xe=new ta({parent:y},this.style),Me=xe.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),De=new Ir(null,{classes:"ML__box"});De.height=oe.height+Me,De.depth=oe.depth+Me,De.setStyle("box-sizing","border-box"),De.setStyle("position","absolute"),De.setStyle("top",-Me+.3,"em"),De.setStyle("left",0),De.setStyle("height",De.height+De.depth,"em"),De.setStyle("width","100%"),this.backgroundcolor&&De.setStyle("background-color",(ee=xe.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&De.setStyle("border",`${xe.getRegisterAsEm("fboxrule",2)}em solid ${(re=xe.toColor(this.framecolor))!=null?re:"black"}`),this.border&&De.setStyle("border",this.border);const Ye=new Ir([De,oe],{type:"lift"});return Ye.setStyle("display","inline-block"),Ye.setStyle("position","relative"),Ye.setStyle("line-height",0),Ye.height=oe.height+Me+(me>0?me:0),Ye.depth=oe.depth+Me+(me<0?-me:0),Ye.setStyle("padding-left",Me,"em"),Ye.setStyle("padding-right",Me,"em"),Ye.setStyle("height",Math.floor(100*(oe.height+oe.depth+2*Me+Math.abs(me)))/100,"em"),Ye.setStyle("margin-top",-Me,"em"),Ye.setStyle("top",Math.floor(100*(oe.depth-oe.height+2*Me-me))/100,"em"),Ye.setStyle("vertical-align",Math.floor(100*(oe.depth+2*Me))/100,"em"),this.caret&&(Ye.caret=this.caret),this.attachSupsub(y,{base:Ye})}_serialize(y){return y.skipStyles?Aa([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},xu=class I0 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 I0(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Ir(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},Jl=class D0 extends pr{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new D0(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Ll=class P0 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 P0(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=cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Jo=class O0 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 O0((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"?Aa(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?Aa(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):Aa([!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 ta({parent:y},this.style);console.assert(this.body!==void 0);const re=new ta({parent:y,mathstyle:"textstyle"},this.style),oe=(b=pr.createBox(ee,this.body,{type:"inner"}))!=null?b:new Ir(null,{type:"inner"}),me=oe.height/re.scalingFactor,xe=oe.depth/re.scalingFactor,Me=[];if(this.leftDelim&&Me.push(this.bind(re,bi("open",this.leftDelim,me,xe,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),oe&&(hl(oe.children,this,ee,me,xe),Me.push(oe)),this.rightDelim){let $t=this.containsCaret?" ML__contains-caret":"",jt=this.rightDelim;jt==="?"&&(ee.smartFence?(jt=this.matchingRightDelim(),$t+=" ML__smart-fence__close"):jt="."),Me.push(this.bind(re,bi("close",jt,me,xe,re,{isSelected:this.isSelected,classes:$t+" ML__close",mode:this.mode,style:this.style})))}let De=this.variant==="mleft...mright";const Ye=this.leftSibling;Ye&&(!De&&Ye.isFunction&&(De=!0),!De&&Ye.type==="subsup"&&((E=Ye.leftSibling)!=null&&E.isFunction)&&(De=!0));const bt=new Ir(Me,{type:De?"close":"inner",classes:"left-right"});return bt.setStyle("margin-top",`${-oe.depth}em`),bt.setStyle("height",`${oe.height+oe.depth}em`),this.caret&&(bt.caret=this.caret),this.bind(ee,bt.wrap(ee))}};function hl(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,bi("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&&hl(oe.children,y,b,E,ee)}}var Nd=class N0 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 N0(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}},zc=class R0 extends pr{constructor(){super({type:"macro-argument"})}static fromJson(y){return new R0}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},Xc=class $0 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 $0(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 ta({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 me=new Ir(oe,{type:"ord"});me.setStyle("display","inline-block"),me.setStyle("height",oe.height+oe.depth,"em"),me.setStyle("vertical-align",-re,"em");let xe="ML__prompt ";this.locked?xe+=" ML__lockedPromptBox ":xe+=" ML__editablePromptBox ",this.correctness==="correct"?xe+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(xe+=" ML__incorrectPromptBox "),this.containsCaret&&(xe+=" ML__focusedPromptBox ");const Me=new Ir(null,{classes:xe,attributes:{part:"prompt"}});Me.height=me.height+re,Me.depth=me.depth+re,Me.width=me.width+2*ee,Me.setStyle("box-sizing","border-box"),Me.setStyle("position","absolute"),Me.setStyle("height",me.height+me.depth+2*re,"em"),ee===0&&Me.setStyle("width","100%"),ee!==0&&(Me.setStyle("width",`calc(100% + ${2*ee}em)`),Me.setStyle("top",E,"em"),Me.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(Me.width=3*ee,Me.setStyle("width",`calc(100% + ${3*ee}em)`),Me.setStyle("left",-1.5*ee,"em"));let De="";this.correctness==="incorrect"&&(De+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),De&&(Me.svgOverlay=De);const Ye=new Ir([Me,me],{classes:"ML__prompt-atom"});return Ye.setStyle("position","relative"),Ye.setStyle("display","inline-block"),Ye.setStyle("line-height",0),Ye.height=me.height+re+.2,Ye.depth=me.depth+re,Ye.left=ee,Ye.right=ee,Ye.setStyle("height",me.height+re,"em"),Ye.setStyle("top",me.depth-me.height,"em"),Ye.setStyle("vertical-align",me.depth+re,"em"),Ye.setStyle("margin-left",.5,"em"),Ye.setStyle("margin-right",.5,"em"),this.caret&&(Ye.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Ye}))}_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]"),yi(ee,E)}},_c=class B0 extends pr{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new B0(y);for(const E of Os)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new ta({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new Ir(null),oe=new Ir(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 cl(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Su=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 ta&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new ta({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:ke({},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(ke({before:Gi(this.tokens.slice(this.index,this.index+10)),after:Gi(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 ke({},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 _c({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:y}=this;if(y<this.tokens.length&&this.tokens[y].startsWith("\\")){const b=cr(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const y=(a=this.args)==null?void 0:a.call(this,"?");return y?Tl(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new wa({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();cl(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(cl(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 me="";for(;this.hasPattern(oe);)me+=this.get();if(!a&&(this.match(".")||this.match(",")))for(me+=".";this.hasPattern(oe);)me+=this.get();const xe=a?Number.parseInt(me,re):Number.parseFloat(me);return Number.isNaN(xe)?null:{number:E?-xe:xe,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()||!cl(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=Bt(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const me of y.params)if(me.isOptional)b.push(this.scanOptionalArgument(me.type));else{const xe=this.scanArgument(me.type);xe||this.onError({code:"missing-argument",arg:a}),b.push(xe)}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 me=null;this.skipWhitespace(),this.match("[")&&(me=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(me!=null?me:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(me=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(me)));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=cr(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Ll(y,this.parseMode,this.style);return b.verbatimLatex=Gi(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 Jo("",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(!cl(a)&&!a.startsWith("\\"))return null;this.next();const y=cr(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new Jl("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Jl("\\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 Jl(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 Jo(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(wt(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(cl(a)){const b=Ii.createAtom(this.parseMode,a,ke({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=cr(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new Jl(a)];if(b.definitionType==="symbol"){const E=ke({},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 Jl(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 me=this.scanOptionalArgument("string"),xe=this.scanOptionalArgument("math"),Me=pr.serialize(xe,{defaultMode:"math"});let De=[],Ye;!Ye&&Me==="correct"?Ye="correct":!Ye&&Me==="incorrect"?Ye="incorrect":Me!==""&&(De=xe);const bt=this.scanOptionalArgument("string")==="locked",$t=this.scanArgument("auto");let jt;return $t&&Array.isArray($t)&&$t.length>0?jt=$t:$t&&typeof $t=="object"&&"group"in $t?jt=$t.group:jt=De,me?[new Xc(me,Ye,bt,jt!=null?jt:De,{mode:this.parseMode,style:this.style})]:[new wa({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const me=this.index,xe=this.scanLiteralGroup()||this.next();if(!xe)return null;if(this.context.registers[xe.substring(1)]){const Me=this.scanArgument("string");Me!==null&&(this.context.registers[xe.substring(1)]=Me);const De=Aa([a,Gi(this.tokens.slice(me,this.index))]);return[new pr({type:"text",value:"",verbatimLatex:De})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=cr(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(me=>new pr({type:"text",value:me,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new Jl(a)]);const oe=this.index;if(re.definitionType==="symbol"){const me=ke({},this.style);re.variant&&(me.variant=re.variant),ee=new pr({type:re.type,command:a,style:me,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const me=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let xe,Me=[];if(re.parse?Me=re.parse(this):[xe,Me]=this.scanArguments(re),this.parseMode=me,re.applyMode&&!re.applyStyle&&!re.createAtom)return wt(Me[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:Me,style:this.style,mode:this.parseMode}),xe&&(ee.body=wt(this.scanArgument(xe)));else if(typeof re.applyStyle=="function"){const De=ke(ke({},this.style),re.applyStyle(a,Me,this.context)),Ye=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),xe){const bt=this.style;this.style=De;const $t=this.scanArgument(xe);return this.style=bt,this.parseMode=Ye,wt($t)}this.style=De}else ee=new pr({type:"mord",command:(b=re.command)!=null?b:a,style:ke({},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 me=Aa([a,Gi(this.tokens.slice(oe,this.index))]);me&&(ee.verbatimLatex=me)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const me=this.scanSmartFence();if(me)return[ee,me]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(cl(a)){const y=Ii.createAtom(this.parseMode,a,ke({},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 cc(" "," ",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 me=this.scanLiteralGroup();if(!me){const xe=this.index;this.scanExpression(),me=Gi(this.tokens.slice(xe,this.index))}re[oe]=me}return new Nd(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:Gi(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,me=new Su(Ro(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:{}}),xe=[];for(;!me.end();)xe.push(...me.scan(()=>!1));return xe}function tp(a,y){var b;const E=new Su(Ro(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 np=class F0 extends pr{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=Ns.go(Zr.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 F0(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return ge(ke({},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}};Ht(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new np(a.command,(y=a.args[0])!=null?y:"")}});var Zr={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 me=Zr.stateMachines[y],xe=me.transitions[b]||me.transitions["*"];e:for(var Me=0;Me<xe.length;Me++){var De=Zr.patterns.match_(xe[Me].pattern,a);if(De){for(var Ye=xe[Me].task,bt=0;bt<Ye.action_.length;bt++){var $t;if(me.actions[Ye.action_[bt].type_])$t=me.actions[Ye.action_[bt].type_](E,De.match_,Ye.action_[bt].option);else if(Zr.actions[Ye.action_[bt].type_])$t=Zr.actions[Ye.action_[bt].type_](E,De.match_,Ye.action_[bt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Ye.action_[bt].type_+")"];Zr.concatArray(oe,$t)}if(b=Ye.nextState||b,a.length>0){if(Ye.revisit||(a=De.remainder),!Ye.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=Zr.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 Zr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Zr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Zr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Zr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Zr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Zr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Zr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Zr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Zr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Zr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Zr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Zr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Zr.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 Zr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Zr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Zr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Zr.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 Zr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Zr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Zr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Zr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Zr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Zr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Zr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Zr.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=Zr.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,me,xe,Me){var De=function(er,Tr){if(typeof Tr=="string")return er.indexOf(Tr)!==0?null:Tr;var ti=er.match(Tr);return ti?ti[0]:null},Ye=function(er,Tr,ti){for(var Nr=0;Tr<er.length;){var Zi=er.charAt(Tr),va=De(er.substr(Tr),ti);if(va!==null&&Nr===0)return{endMatchBegin:Tr,endMatchEnd:Tr+va.length};if(Zi==="{")Nr++;else if(Zi==="}"){if(Nr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];Nr--}Tr++}return Nr>0,null},bt=De(a,y);if(bt===null||(a=a.substr(bt.length),bt=De(a,b),bt===null))return null;var $t=Ye(a,bt.length,E||ee);if($t===null)return null;var jt=a.substring(0,E?$t.endMatchEnd:$t.endMatchBegin);if(re||oe){var sr=this.findObserveGroups(a.substr($t.endMatchEnd),re,oe,me,xe);if(sr===null)return null;var Gr=[jt,sr.match_];return{match_:Me?Gr.join(""):Gr,remainder:sr.remainder}}else return{match_:jt,remainder:a.substr($t.endMatchEnd)}},match_:function(a,y){var b=Zr.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return Zr.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 Zr.go(y,"text")},"{text}":function(a,y){var b=["{"];return Zr.concatArray(b,Zr.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return Zr.go(y,"tex-math")},"tex-math tight":function(a,y){return Zr.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 Zr.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 Zr.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 me=0;me<oe.action_.length;me++)typeof oe.action_[me]=="string"&&(oe.action_[me]={type_:oe.action_[me]})}else oe.action_=[];for(var xe=y.split("|"),Me=0;Me<xe.length;Me++)if(E[ee]==="*")for(var De in re)re[De].push({pattern:xe[Me],task:oe});else re[E[ee]].push({pattern:xe[Me],task:oe})}return re},stateMachines:{}};Zr.stateMachines={ce:{transitions:Zr.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 Zr.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 Zr.concatArray(b,this.output(a)),Zr.concatArray(b,Zr.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=Zr.patterns.match_("orbital",a.o||""),ee=Zr.patterns.match_("one lowercase greek letter $",a.o||""),re=Zr.patterns.match_("one lowercase latin letter $",a.o||""),oe=Zr.patterns.match_("$one lowercase latin letter$ $",a.o||""),me=y==="-"&&(E&&E.remainder===""||ee||re||oe);me&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var xe=[];return me?(Zr.concatArray(xe,this.output(a)),xe.push({type_:"hyphen"})):(E=Zr.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(Zr.concatArray(xe,Zr.actions["d="](a,y)),Zr.concatArray(xe,this.output(a))):(Zr.concatArray(xe,this.output(a)),Zr.concatArray(xe,Zr.actions.bond(a,y,"-")))),xe},"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:Zr.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"&&Zr.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:Zr.go(a.a,"a"),b:Zr.go(a.b,"bd"),p:Zr.go(a.p,"pq"),o:Zr.go(a.o,"o"),q:Zr.go(a.q,"pq"),d:Zr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Zr.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Zr.go(a.rd);var re;a.rqt==="M"?re=Zr.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Zr.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 Zr.concatArray(b,Zr.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:Zr.go(y[0]),p2:Zr.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:Zr.go(y[0]),p2:Zr.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:Zr.go(y[0]),p2:Zr.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:Zr.go(y[0]),p2:Zr.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Zr.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:Zr.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:Zr.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:Zr.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:Zr.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:Zr.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Zr.go(y[1],"pq")}}}},bd:{transitions:Zr.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:Zr.go(y[1],"bd")}}}},oxidation:{transitions:Zr.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:Zr.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:Zr.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:Zr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Zr.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]&&(Zr.concatArray(b,Zr.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?Zr.concatArray(b,Zr.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]),Zr.concatArray(b,Zr.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=Zr.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=Zr.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:Zr.go(a.d,"pu"),q:Zr.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_:"/"}),Zr.concatArray(y,ee.q))}else y=Zr.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:Zr.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=Zr.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=Zr.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:Zr.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 Ns={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+=Ns._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&Ns.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:Ns._goInner(a.a),b:Ns._goInner(a.b),p:Ns._goInner(a.p),o:Ns._goInner(a.o),q:Ns._goInner(a.q),d:Ns._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 "+Ns._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+Ns._goInner(a.p1);break;case"bond":if(y=Ns._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{"+Ns._goInner(a.p1)+"}{"+Ns._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+Ns._goInner(a.p1)+"}{"+Ns._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+Ns._goInner(a.p1)+"}{"+Ns._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+Ns._goInner(a.p1)+"}{"+Ns._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+Ns._goInner(a.p1)+"}_{"+Ns._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+Ns._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:Ns._goInner(a.rd),rq:Ns._goInner(a.rq)},oe=Ns._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=Ns._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 My(a){}function ky(a){}var rp=class z0 extends pr{constructor(y){super(ge(ke({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new z0(y)}toJson(){return ge(ke({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Ir(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):yi(this.command,this.value)}},ip=class K0 extends pr{constructor(y){super(ge(ke({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new K0(y)}toJson(){return ge(ke({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=Wn(this.value,this.size,y,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return b?(b=this.bind(y,b),this.caret&&(b.caret=this.caret),b):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):yi(this.command,this.value)}},rf=class H0 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 H0(y.command,y.body,y.notation,y)}toJson(){return ge(ke({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(y){var b;if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=cr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",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 yi(ee,this.bodyToLatex(y))}render(y){const b=new ta({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 Ir(null,{classes:"ML__notation"});let me=E.height+E.depth+2*re;const xe=E.width+2*re;let Me="";if(this.notation.horizontalstrike&&(Me+=this.line(3,50,97,50)),this.notation.verticalstrike&&(Me+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(Me+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(Me+=this.line(3,3,97,97)),this.notation.updiagonalarrow){Me+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const jt=.03*Math.sqrt(xe*xe+me*me)*1,sr=E.width*jt,Gr=(E.depth+E.height)*jt,er=re+E.width;let Tr=re;Tr+Gr-.4*sr<0&&(Tr=.4*sr-Gr),Me+='<polygon points="',Me+=`${er},${Tr} ${er-sr-.4*Gr},${Tr+Gr-.4*sr} `,Me+=`${er-.7*sr},${Tr+.7*Gr} ${er-sr+.4*Gr},${Tr+Gr+.4*sr} `,Me+=`${er},${Tr}`,Me+=`" stroke='none' fill="${this.strokeColor}"`,Me+="/>"}let De=0;if(this.notation.phasorangle){const bt=ap(b),$t=(E.height+E.depth+2*bt+re).toString(),jt=(E.height+E.depth)/2;Me+=this.line(re.toString(),$t,(re+jt+E.width).toString(),$t),Me+=this.line(re.toString(),$t,(re+jt).toString(),(re-bt).toString()),me+=bt,De=jt,E.left+=me/2-re}if(this.notation.longdiv){const bt=ap(b);me+=bt,Me+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const $t=.3;De=$t+bt,E.left+=$t+bt,E.setTop(re+bt),Me+='<path d="',Me+=`M ${re} ${re} a${$t} ${(E.depth+E.height+2*bt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*bt} "`,Me+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,Me+="/>"}if(oe.width=E.width+2*re+De,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*me)/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),Me){let bt="";this.shadow==="auto"&&(bt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(bt+=`filter: drop-shadow(${this.shadow})`),bt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,bt+=' stroke-linecap="round"',this.svgStrokeStyle&&(bt+=` stroke-dasharray="${this.svgStrokeStyle}"`),oe.svgStyle=bt,oe.svgOverlay=Me}const Ye=new Ir([oe,E]);return Ye.setStyle("position","relative"),Ye.setStyle("vertical-align",re,"em"),Ye.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),Ye.setStyle("display","inline-block"),Ye.height=oe.height,Ye.depth=oe.depth,Ye.width=oe.width-2*re,Ye.left=re,Ye.right=re,this.caret&&(Ye.caret=this.caret),Ye.wrap(b)}line(y,b,E,ee){return`<line x1="${Af(y)}" y1="${Af(b)}" x2="${Af(E)}" y2="${Af(ee)}" vector-effect="non-scaling-stroke"></line>`}};function Af(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 ap(a){const y=a.isDisplayStyle?ca:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var Rd=class W0 extends pr{constructor(y,b,E){var ee,re;super(ge(ke({},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 W0(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),ke(ke({},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 ta({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,oe=new ta({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),me=this.numerPrefix?new Ir([new Ir(this.numerPrefix),pr.createBox(oe,this.above)],{isTight:oe.isTight,type:"ignore"}):(b=pr.createBox(oe,this.above,{type:"ignore"}))!=null?b:new Ir(null,{type:"ignore"}),xe=new ta({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),Me=this.denomPrefix?new Ir([new Ir(this.denomPrefix),pr.createBox(xe,this.below,{type:"ignore"})]):(E=pr.createBox(xe,this.below,{type:"ignore"}))!=null?E:new Ir(null,{type:"ignore"}),De=this.hasBarLine?re.defaultRuleThickness:0;let Ye,bt=0,$t;ee.isDisplayStyle?(Ye=oe.metrics.num1,bt=De>0?3*De:7*De,$t=xe.metrics.denom1):(De>0?(Ye=oe.metrics.num2,bt=De):(Ye=oe.metrics.num3,bt=3*re.defaultRuleThickness),$t=xe.metrics.denom2);const jt=[];this.isSelected&&jt.push("ML__selected");const sr=me.depth,Gr=Me.height;let er;if(De<=0){const oa=Ye-sr-(Gr-$t);oa<bt&&(Ye+=(bt-oa)/2,$t+=(bt-oa)/2),er=new Za({individualShift:[{box:me,shift:-Ye,classes:[...jt,"ML__center"]},{box:Me,shift:$t,classes:[...jt,"ML__center"]}]}).wrap(ee)}else{const oa=new Ir(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});oa.softWidth=Math.max(me.width,Me.width),oa.height=De/2,oa.depth=De/2;const Fo=Ti+De/2;Ye<bt+sr+Fo&&(Ye=bt+sr+Fo);const ps=Ti-De/2;$t<bt+Gr-ps&&($t=bt+Gr-ps),er=new Za({individualShift:[{box:Me,shift:$t,classes:[...jt,"ML__center"]},{box:oa,shift:-ps,classes:jt},{box:me,shift:-Ye,classes:[...jt,"ML__center"]}]}).wrap(ee)}const Tr=ee.isDisplayStyle?re.delim1:re.delim2,ti=this.leftDelim?this.bind(y,Fi("open",this.leftDelim,Tr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Hi(ee,"open");let Nr=null;this.continuousFraction?Nr=new Ir(null,{type:"close"}):this.rightDelim?Nr=this.bind(y,Fi("close",this.rightDelim,Tr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):Nr=Hi(ee,"close");const Zi=new Ir([ti,er,Nr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),va=this.bind(y,Zi);return this.caret&&(va.caret=this.caret),this.attachSupsub(y,{base:va})}},Nl=class Z0 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 Z0(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),ke({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Ir(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}},af=class j0 extends pr{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new Nl(b)),this.skipBoundary=!1}static fromJson(y){return new j0("")}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 U0 extends pr{constructor(y,b){super(ge(ke({},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 U0(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 Ir(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-Ti*y.scalingFactor,oe=ee.italic;ee.setTop(re);let me=ee;if(this.superscript||this.subscript){const xe=(b=this.subsupPlacement)!=null?b:"auto";me=xe==="over-under"||xe==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:oe}):this.attachSupsub(y,{base:ee})}return new Ir(this.bind(y,me),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[];return E.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),Aa(E)}},dd=class V0 extends pr{constructor(y){const b=y.body;super(ge(ke({},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 V0(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),ke(ke({},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 Ir([b,new Ir(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Lc=class G0 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 G0(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?yl(this.svgBody):pr.createBox(y,this.body,{type:"ignore"});const E=new ta({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=yl(this.svgAbove):this.above&&(ee=pr.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=yl(this.svgBelow):this.below&&(re=pr.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Ir([Hi(y,"open"),b,Hi(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 me=new Ir(y.base,{type:y.type});return me.setStyle("position","relative"),me}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 me=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Za({bottom:me,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 Za({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:oe},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Za({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:oe},a.metrics.bigOpSpacing5]}));return new Ir(E,{type:y.type})}var of=class X0 extends pr{constructor(y){var b,E,ee,re;super(ge(ke({},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 X0(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),ke(ke({},super.toJson()),y)}render(y){const b=new ta({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 Ir(null,{classes:"fix"});return new Ir([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 Za({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},sf=class Y0 extends pr{constructor(y){var b;super(ke({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 Y0(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 Ir(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Ir(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 Ir(null,{classes:ee})}return E=this.bind(y,E),this.caret&&(E.caret=this.caret),E}_serialize(y){var b;if(!y.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=cr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${hs(this.width)}}`:`${ee}${hs(this.width)}`}},op=class J0 extends pr{constructor(y){var b;super(ge(ke({},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 J0(ge(ke({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?yi(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:yi(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 ta({parent:y,mathstyle:"cramp"},this.style),ee=(b=pr.createBox(E,this.body,{type:"inner"}))!=null?b:new Ir(null),re=E.scalingFactor,oe=E.metrics.defaultRuleThickness/re,me=y.isDisplayStyle?ca:oe,xe=new Ir(null,{classes:"ML__sqrt-line",style:this.style});xe.height=oe,xe.softWidth=ee.width;let Me=re*(oe+me/4);const Ye=Math.max(re*2*me,ee.height+ee.depth)+Me+oe,bt=new ta({parent:y},this.style),$t=this.bind(bt,new Ir(Fi("inner","\\surd",Ye,!1,bt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!$t)return null;const jt=$t.height+$t.depth-oe;jt>ee.height+ee.depth+Me&&(Me=(Me+jt-(ee.height+ee.depth))/2),$t.setTop($t.height-ee.height-Me);const sr=this.bind(y,new Za({firstBaseline:[{box:new Ir(ee)},Me-2*oe,{box:xe},oe]})),Gr=pr.createBox(new ta({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!Gr){const ti=new Ir([$t,sr],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return ti.setStyle("display","inline-block"),ti.setStyle("height",ti.height+ti.depth,"em"),this.caret&&(ti.caret=this.caret),this.bind(y,ti)}const er=new Za({shift:-.6*(Math.max($t.height,sr.height)-Math.max($t.depth,sr.depth)),children:[{box:Gr}]}),Tr=new Ir([new Ir(er,{classes:"ML__sqrt-index",type:"ignore"}),$t,sr],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return Tr.height=$t.height,Tr.depth=$t.depth,this.caret&&(Tr.caret=this.caret),this.bind(y,Tr)}},sm=class extends Ir{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 If(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"){If(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){cf(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 lf(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 cf(b,(oe,me)=>{var xe,Me,De;if(!oe)return;const Ye=oe.type,bt=me.isTight?(xe=cm[Ye])!=null?xe:null:(Me=lm[Ye])!=null?Me:null,$t=(De=bt==null?void 0:bt[me.type])!=null?De:null;$t===3&&If(me,E),$t===4&&If(me,ee),$t===5&&If(me,re)}),a}function cf(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=cf(E.children,y,b):E.type==="ignore"?cf(E.children,y):(y(b,E),cf(E.children,y),b=E);return b}var hh=class Q0 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 Q0(ge(ke({},y),{tooltip:Ku(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(ke({},super.toJson()),{tooltip:b})}render(y){const b=pr.createBox(new ta,this.body);if(!b)return null;const E=new ta({parent:y,mathstyle:"displaystyle"},{fontSize:Ai}),ee=Cs(lf(new Ir(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Ir([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},fd=class q0 extends pr{constructor(y,b){super(ge(ke({},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 q0(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 Ir(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 Ir(this.bind(y,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=cr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),Aa(E)}};function Ku(a){if(ze(a))return a.map(E=>Ku(E));if(typeof a=="string")return pr.fromJson(a);a=ke({},a);for(const E of Os)a[E]&&(a[E]=Ku(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=Ku(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=Xa.fromJson(a)),y==="box"&&(b=el.fromJson(a)),y==="chem"&&(b=np.fromJson(a)),y==="composition"&&(b=xu.fromJson(a)),y==="delim"&&(b=rp.fromJson(a)),y==="enclose"&&(b=rf.fromJson(a)),y==="error"&&(b=Jl.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=Rd.fromJson(a)),y==="group"&&(b=Ll.fromJson(a)),y==="latex"&&(b=Nl.fromJson(a)),y==="latexgroup"&&(b=af.fromJson(a)),y==="leftright"&&(b=Jo.fromJson(a)),y==="macro"&&(b=Nd.fromJson(a)),y==="macro-argument"&&(b=zc.fromJson(a)),y==="operator"&&(b=fd.fromJson(a)),y==="overlap"&&(b=dd.fromJson(a)),y==="overunder"&&(b=Lc.fromJson(a)),y==="placeholder"&&(b=wa.fromJson(a)),y==="prompt"&&(b=Xc.fromJson(a)),y==="phantom"&&(b=of.fromJson(a)),y==="sizeddelim"&&(b=ip.fromJson(a)),y==="spacing"&&(b=sf.fromJson(a)),y==="subsup"&&(b=_c.fromJson(a)),y==="surd"&&(b=op.fromJson(a)),y==="text"&&(b=cc.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 Os)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=>Ku(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>Ku(b)):y)}var sp={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]$/},lp=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,lp,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 Ii{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 me=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const Me=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 me&&(Me.isFunction=!0),a.startsWith("\\")&&(Me.verbatimLatex=a),Me}const xe=new pr({type:"mord",mode:"math",command:(oe=y.command)!=null?oe:a,value:a,style:b});return me&&(xe.isFunction=!0),a.startsWith("\\")&&(xe.verbatimLatex=a),xe}serialize(a,y){const b=gm(a,ge(ke({},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((me,xe)=>{var Me;me.test(a.value)&&pm[(Me=y.letterShapeStyle)!=null?Me:"tex"][xe]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(sp[ee]!==void 0);const[re,oe]=sp[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=In(a.value,b,E),null):(lp.test(a.value)&&(a.classes+=" lcGreek"),oe&&(a.classes+=" "+oe),re)}};function gm(a,y){const{parent:b}=a[0],E=cp(b);return pi(a,"variant").map(ee=>{const re=cp(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 me=Aa(ee.map(xe=>xe._serialize(y)));return oe?yi(oe,me):me})}function cp(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 pi(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?`{${yi("\\fontshape",ee)}${Aa(E)}}`:re?yi(re,Aa(E)):Aa(E)})}function bm(a,y){return pi(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?`{${yi("\\fontseries",ee)}${Aa(E)}}`:re?yi(re,Aa(E)):Aa(E)})}function xm(a,y){return pi(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} ${Aa(re)}`:Aa(re)})}function Sm(a,y,b){return pi(a,"fontFamily").map(E=>{var ee,re;const oe=xm(E,y),me=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return me?`\\${me}{${Aa(oe)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${Aa(oe)}}`:b?`\\text{${Aa(oe)}}`:Aa(oe)})}var up={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},wm=class extends Ii{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new cc(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return Sm(a,ge(ke({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,oe;const{fontFamily:me}=y;if(up[me]?a.classes+=" "+up[me]:me&&a.setStyle("font-family",me),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 xe=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);xe&&(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=xe[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=xe[2])!=null?re:""])!=null?oe:"")}return"Main-Regular"}};new wm;var Cm=class extends Ii{constructor(){super("latex")}createAtom(a){return new Nl(a)}serialize(a,y){return a.filter(b=>b instanceof Nl&&!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:["","=","","="]}},dp={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:["\\","|","",""]}},fp={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:["=","=","=","="]}},Tm={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:[".",".",".","."]}},Im={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Dm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pm={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function hp(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 $d(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Om={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},uf=[],df;function gh(){switch(be()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function vc(a){(!a.platform||a.platform===gh())&&uf.push(a)}function Nm(a,y){var b;const E={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!a)return E;for(const[ee,re]of Object.entries(y.mapping)){if(re[0]===a)return E.key=`[${ee}]`,E;if(re[1]===a)return E.shift=!0,E.key=`[${ee}]`,E;if(re[2]===a)return E.alt=!0,E.key=`[${ee}]`,E;if(re[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ee}]`,E}return E.key=(b=Om[a])!=null?b:"",E}function Rm(a){if(a.code)return a;const y=Object.entries(ff().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[oe,me]of y)if(me[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(ke({},a),{altKey:b,shiftKey:E,code:ee}))}function $m(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 uf)((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);uf.sort((ee,re)=>re.score-ee.score)}function Bm(a){df=uf.find(y=>a.startsWith(y.locale))}function ff(){return df!=null?df:uf[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return dp;case"linux":return fp}return mh}switch(gh()){case"apple":vc(mh),vc(Mm),vc(Im),vc(Lm);break;case"windows":vc(dp),vc(km),vc(Dm),vc(Tm);break;case"linux":vc(fp),vc(_m),vc(Pm),vc(Am);break}vc(Em);function vh(a){var y;const b=/macos|ios/.test(be()),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:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",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 Df(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 hd(a){const y={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(y.alt=!0),a.ctrlKey&&(y.control=!0),a.metaKey&&(y.meta=!0),a.shiftKey&&(y.shift=!0)),y}function zm(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.meta}var Km=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Pf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Of(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var Yc=class Mu{static get scrim(){return Mu._scrim||(Mu._scrim=new Mu),Mu._scrim}static open(y){Mu.scrim.open(y)}static close(){Mu.scrim.close()}static get state(){return Mu.scrim.state}static get element(){return Mu.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=Of();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:"",Of()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,oe=!1,me=!1;const xe=new AbortController,Me=xe.signal;return a.addEventListener("keydown",De=>{if(re||De.key==="Process"||De.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(De.code)){E=null;return}E=De,ee=null,b.onKeystroke(De)?a.textContent="":E=null},{capture:!0,signal:Me}),a.addEventListener("keypress",De=>{re||(E&&ee&&b.onKeystroke(E),ee=De)},{capture:!0,signal:Me}),a.addEventListener("compositionstart",De=>{a.textContent="",re=!0,b.onCompositionStart(De.data)},{capture:!0,signal:Me}),a.addEventListener("compositionupdate",De=>{re&&b.onCompositionUpdate(De.data)},{capture:!0,signal:Me}),a.addEventListener("compositionend",De=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(De.data))},{capture:!0,signal:Me}),a.addEventListener("beforeinput",De=>De.stopImmediatePropagation(),{signal:Me}),a.addEventListener("input",De=>{var Ye;if(!re&&(a.textContent="",De.inputType!=="insertCompositionText")){if(De.inputType==="insertFromPaste"){De.preventDefault(),De.stopPropagation();return}b.onInput((Ye=De.data)!=null?Ye:""),De.preventDefault(),De.stopPropagation()}},{signal:Me}),a.addEventListener("paste",De=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(De)||De.preventDefault(),De.stopImmediatePropagation()},{signal:Me}),a.addEventListener("cut",De=>b.onCut(De),{capture:!0,signal:Me}),a.addEventListener("copy",De=>b.onCopy(De),{capture:!0,signal:Me}),a.addEventListener("blur",De=>{var Ye,bt;if(((bt=(Ye=De.relatedTarget)==null?void 0:Ye._mathfield)==null?void 0:bt.element)===y){a.focus({preventScroll:!0}),De.preventDefault(),De.stopPropagation();return}const $t=Yc.state;if($t==="open"||$t==="opening"){De.preventDefault(),De.stopPropagation();return}if(De.relatedTarget===De.target.getRootNode().host){De.preventDefault(),De.stopPropagation();return}me||oe||(me=!0,E=null,ee=null,b.onBlur(),me=!1)},{capture:!0,signal:Me}),a.addEventListener("focus",De=>{me||oe||(oe=!0,b.onFocus(),oe=!1)},{capture:!0,signal:Me}),{dispose:()=>xe.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:()=>Of()===a,setAriaLabel:De=>a.setAttribute("aria-label",De),setValue:De=>{var Ye;a.textContent=De,a.style.left="-1000px",(Ye=window.getSelection())==null||Ye.selectAllChildren(a)},moveTo:(De,Ye)=>{a.style.top=`${Ye}px`,a.style.left=`${De}px`}}}function Bd(a){var y;if(!a||!Pf(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 pp(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(dt()){const y=be(),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=$d(hp(pp(b))),ee=$d({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(be()),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 mp(a){let y=a;return ze(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function jm(a,y){let b=[];if(typeof y=="string"){const re=Bu[y];ze(re)?b=re.slice():re&&b.push(re)}const E=mp(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(mp(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=hp(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=be()==="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(ke({},a),{key:$d(b)});const ee=Nm(b.key,y);if(!ee)return ge(ke({},a),{key:$d(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 ${$d(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(ke({},a),{key:$d(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function Vm(a,y){const b=[],E=[];for(const ee of a)try{const re=Um(ee,y);if(!re)continue;const oe=E.find(me=>me.key===re.key&&me.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 $a{constructor(){super("latex")}createAtom(a){return new Nl(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"}),Ys(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(Vs(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 xe of y)le.test(xe)&&re.push(new Nl(xe));let oe=a.at(a.position);if(oe instanceof af&&(oe=oe.lastChild),!(oe.parent instanceof af)){const xe=new af("");oe.parent.addChildAfter(xe,oe),oe=xe.firstChild}const me=oe.parent.addChildrenAfter(re,oe);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(me)):me&&(a.position=a.offsetOf(me))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function hf(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 gp(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 xe=a.at(E);ee=xe instanceof Nl&&xe.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let oe=E,me=!1;for(;oe<=re&&!me;){const xe=a.at(oe);me=!(xe instanceof Nl&&xe.isSuggestion),me||oe++}return[E-1,oe-1]}new Gm;function Nf(a){const y=hf(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 pf(a,y){var b;const{model:E}=a;Nf(a);for(const De of hf(E))De.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){zd(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof Nl&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof Nl&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof Nl&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const oe=ee.map(De=>De.value).join(""),me=qt(a,oe);if(me.length===0){if(/^\\[a-zA-Z\*]+$/.test(oe))for(const De of ee)De.isError=!0;zd(a);return}const xe=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=xe<0?me.length-1:xe%me.length;const Me=me[a.suggestionIndex];if(Me!==oe){const De=ee[ee.length-1];De.parent.addChildrenAfter([...Me.slice(oe.length-Me.length)].map(Ye=>new Nl(Ye,{isSuggestion:!0})),De),pd(a,{interactive:!0})}Jm(a,me)}function vp(a){const[y,b]=gp(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 Fd(a,y="accept",b){var E,ee;zd(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const Me=hf(a.model).filter(De=>De.isSuggestion);if(Me.length!==0){for(const De of Me)De.isSuggestion=!1;a.model.position=a.model.offsetOf(Me[Me.length-1])}if(y==="accept-suggestion")return Me.length!==0}const me=hf(a.model).filter(Me=>!Me.isSuggestion).map(Me=>Me.value).join(""),xe=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(xe),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||($a.insert(a.model,me,{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 Rf(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function Ym(a,y){const b=new ta({from:a.context}),E=new pr({mode:"math",type:"root",body:Tl(y,{context:b})}),ee=Cs(lf(new Ir(E.render(b),{classes:"ML__base"}),b));return fl(ee,{classes:"ML__latex"}).toMarkup()}function Jm(a,y){var b;if(y.length===0){zd(a);return}let E="";for(const[re,oe]of y.entries()){const me=oe,xe=Ym(a,oe),Me=jm(a.keybindings,me).join("<br>");E+=`<li role="button" data-command="${me}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${me}</span><span class="ML__popover__command">${xe}</span>`,Me&&(E+=`<span class="ML__popover__keybinding">${Me}</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"),$f(a),(re=ee.querySelector(".ML__popover__current"))==null||re.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function xh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function $f(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){zd(a);return}if(y!=null&&y.deferred){setTimeout(()=>$f(a),32);return}const E=mc(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,me=window.innerHeight-document.documentElement.clientHeight,xe=window.mathVirtualKeyboard.boundingRect.height,Me=document.getElementById("mathlive-suggestion-popover");E.x+Me.offsetWidth/2>re-oe?Me.style.left=`${re-Me.offsetWidth-oe}px`:E.x-Me.offsetWidth/2<0?Me.style.left="0":Me.style.left=`${E.x-Me.offsetWidth/2}px`;const De=E.y-E.height;ee-me-xe-E.y<De?(Me.classList.add("ML__popover--reverse-direction"),Me.classList.remove("top-tip"),Me.classList.add("bottom-tip"),Me.style.top=`${E.y-E.height-Me.offsetHeight-15}px`):(Me.classList.remove("ML__popover--reverse-direction"),Me.classList.add("top-tip"),Me.classList.remove("bottom-tip"),Me.style.top=`${E.y+15}px`)}function zd(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=Rf("mathlive-suggestion-popover"),uc("suggestion-popover"),uc("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Fd(a,"reject"),$a.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 Bf=null,yp,bp,Sh=((bp=(yp=globalThis==null?void 0:globalThis.document)==null?void 0:yp.currentScript)==null?void 0:bp.src)||eg();function xp(a){return Uu(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(Bf===null)try{const y=yield fetch(Sh,{method:"HEAD"});y.status===200&&(Bf=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${Sh}")`)}return new URL(a,Bf!=null?Bf:Sh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var yc="not-loaded";function ng(){return Uu(this,null,function*(){return yc="not-loaded",Ff()})}function Ff(){return Uu(this,null,function*(){var a;if(yc!=="not-loaded")return;if(yc="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){yc="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))){yc="ready";return}if(!window.MathfieldElement.fontsDirectory){yc="not-loaded";return}const ee=yield xp(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),yc="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(me=>{try{return me.load()}catch(xe){}}))).forEach(me=>document.fonts.add(me)),yc="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")}yc="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 Ys(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Yl(a)&&a.dirty&&(a.atomBoundsCache=new Map,pd(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new ta({from:ge(ke({},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 fl(lf(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function Sp(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 pd(a,y){if(!Yl(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=Sp(a,y);const me=a.element.querySelector("[part=menu-toggle]");if(me&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?me.style.display="none":me.style.display=""),a.model.atoms.length<=1){const xe=a.options.contentPlaceholder;xe&&(oe+=`<span part=placeholder class="ML__content-placeholder">${Al(xe)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(oe),zf(a,y.interactive),a.dirty=!1}function zf(a,y){const b=a.field;if(!b)return;for(const me of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))me.remove();!(y!=null&&y)&&yc!=="error"&&yc!=="ready"&&setTimeout(()=>{yc==="ready"?zf(a):setTimeout(()=>zf(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){$f(a,{deferred:!0});let me=E.at(E.position);for(;me&&me.type!=="prompt"&&!(me.containsCaret&&me.displayContainsHighlight);)me=me.parent;if(me!=null&&me.containsCaret&&me.displayContainsHighlight){const xe=Fu(a,Bc(a,me),oe);if(xe){xe.left/=oe,xe.right/=oe,xe.top/=oe,xe.bottom/=oe;const Me=document.createElement("div");Me.classList.add("ML__contains-highlight"),Me.style.position="absolute",Me.style.left=`${xe.left+1}px`,Me.style.top=`${Math.ceil(xe.top)}px`,Me.style.width=`${Math.ceil(xe.right-xe.left)}px`,Me.style.height=`${Math.ceil(xe.bottom-xe.top)}px`,b.insertBefore(Me,b.childNodes[0])}}return}for(const me of ag($o(a,{excludeAtomsWithBackground:!0}))){me.left/=oe,me.right/=oe,me.top/=oe,me.bottom/=oe;const xe=document.createElement("div");xe.classList.add("ML__selection"),xe.style.position="absolute",xe.style.left=`${me.left}px`,xe.style.top=`${me.top}px`,xe.style.width=`${Math.ceil(me.right-me.left)}px`,xe.style.height=`${Math.ceil(me.bottom-me.top-1)}px`,b.insertBefore(xe,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 wp=3,Jc;function dc(a,y){y=ke({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Jc||(Jc={});for(const b of Object.keys(a))console.assert(!Jc[b],"Selector already defined: ",b),Jc[b]=ge(ke({},y),{fn:a[b]})}function wh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return wh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Jc[y]}function Kd(a){var y;return(y=wh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,oe=!1;ze(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,Me=>Me[1].toUpperCase());const me=Jc[E],xe=me==null?void 0:me.target;if(xe==="model"){if(!a.isSelectionEditable&&(me!=null&&me.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Nf(a),Jc[E].fn(a.model,...ee),pf(a),oe=!0,re=!0}else if(xe==="virtual-keyboard")oe=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Jc[E]){if(!a.isSelectionEditable&&(me!=null&&me.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),oe=Jc[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return xe!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||me!=null&&me.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),me!=null&&me.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),oe&&Ys(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),v0.keypressVibration&&qe()&&navigator.vibrate(wp);const E=wh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}dc({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return pf(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return pf(a,{atIndex:a.suggestionIndex-1}),!1}dc({complete:Fd},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),dc({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Kf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Kf}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(!as(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;Kd(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(ke({type:Kf,action:y},b),this.targetOrigin)}},Cp={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:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</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>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\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]"]]}},Hf={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"}]},mf;function Ep(a,y){var b,E,ee;const re=Hu.singleton;if(!re)return;const oe=Hd(a),me=(E=(b=re.getKeycap(oe==null?void 0:oe.id))==null?void 0:b.variants)!=null?E:"";if(typeof me=="string"&&!Mp(me)||Array.isArray(me)&&me.length===0){y==null||y();return}const xe={};let Me="";for(const sr of fg(me)){const Gr=_p(sr),er=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);xe[er]=Gr;const[Tr,ti]=Wf(Gr);Me+=`<div id=${er} class="item ${ti}">${Tr}</div>`}const De=document.createElement("div");De.setAttribute("aria-hidden","true"),De.className="MLK__variant-panel",De.style.height="auto";const Ye=Object.keys(xe).length;let bt=5;Ye===1?bt=1:Ye===2||Ye===4?bt=2:Ye===3||Ye===5||Ye===6?bt=3:Ye>=7&&Ye<14&&(bt=4),De.style.width=`calc(var(--variant-keycap-length) * ${bt} + 12px)`,De.innerHTML=v0.createHTML(Me),Yc.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:De}),mf=new AbortController;const{signal:$t}=mf,jt=a==null?void 0:a.getBoundingClientRect();if(jt){jt.top-De.clientHeight<0&&(De.style.width="auto",Ye<=6?De.style.height="56px":Ye<=12?De.style.height="108px":Ye<=18?De.style.height="205px":De.classList.add("compact"));const sr=Math.max(0,Math.min(window.innerWidth-De.offsetWidth,(jt.left+jt.right-De.offsetWidth)/2)),Gr=jt.top-De.clientHeight+5;De.style.transform=`translate(${sr}px, ${Gr}px)`,De.classList.add("is-visible"),requestAnimationFrame(()=>{De.addEventListener("pointerup",er=>{const Tr=Hd(er.target);!(Tr!=null&&Tr.id)||!xe[Tr.id]||(Eh(xe[Tr.id]),gf(),y==null||y(),er.preventDefault())},{capture:!0,passive:!1,signal:$t}),De.addEventListener("pointerenter",er=>{const Tr=Hd(er.target);!(Tr!=null&&Tr.id)||!xe[Tr.id]||Tr.classList.add("is-active")},{capture:!0,signal:$t}),De.addEventListener("pointerleave",er=>{const Tr=Hd(er.target);!(Tr!=null&&Tr.id)||!xe[Tr.id]||Tr.classList.remove("is-active")},{capture:!0,signal:$t}),window.addEventListener("pointercancel",()=>{gf(),y==null||y()},{signal:$t}),window.addEventListener("pointerup",()=>{gf(),y==null||y()},{signal:$t})})}}function gf(){mf==null||mf.abort(),mf=null,Yc.state==="open"&&Yc.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(Ue))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ue[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(He))y.push({class:"swatch-button",label:'<span style="background:'+He[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function Mp(a){return Hf[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(Hf[a]||(Hf[a]=(y=dg(a))!=null?y:[]),Hf[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 vf(a){if(!a)return"";const y=new ta,b=new pr({mode:"math",type:"root",body:Tl(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=Cs(lf(new Ir(b.render(y),{classes:"ML__base"}),y));return fl(E,{classes:"ML__latex"}).toMarkup()}function yf(a){var y;if(Array.isArray(a))return a.map(E=>yf(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=>_p(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 me=ff();me&&(E=me.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 me of re){const xe=[];for(const Me of me)/[a-z]/.test(Me)?xe.push({label:Me,class:"hide-shift",shift:{label:Me.toUpperCase()},variants:Mp(Me)?Me:void 0}):Me==="~"?E!=="dvorak"?xe.push("[backspace]"):xe.push({label:"[backspace]",width:1}):Me==="^"?xe.push("[shift]"):Me===" "&&xe.push("[separator-5]");oe.push(xe)}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:yf({rows:oe})}}function kp(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(Cp[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),kp(Cp[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=lt(ee,["rows"]);y=ge(ke({},oe),{layers:yf({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,oe=lt(ee,["markup"]);y=ge(ke({},oe),{layers:yf(a.markup)})}else y=ke({},a),"layers"in a?y.layers=yf(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()){Wd(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 me=oe,xe=[re===y?"selected":"layer-switch"];me.tooltip&&xe.push("MLK__tooltip"),me.labelClass&&xe.push(...me.labelClass.split(" ")),ee+=`<div class="${xe.join(" ")}"`,me.tooltip&&(ee+=" data-tooltip='"+((b=ot(me.tooltip))!=null?b:me.tooltip)+"' "),re!==y&&(ee+=`data-layer="${me.layers[0].id}"`),ee+=`>${(E=me.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='${ot("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${ot("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${ot("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${ot("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${ot("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=Hu.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]=Wf(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){uc("virtual-keyboard"),uc("core"),Ff()}function Sg(){x("core"),x("virtual-keyboard")}var wg=`<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(wg+a.normalizedLayouts.map((oe,me)=>Eg(a,oe,me)).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",me=>{var xe,Me;let De=me.target,Ye="";for(;De&&!Ye;)Ye=(xe=De==null?void 0:De.getAttribute("data-command"))!=null?xe:"",De=(Me=De==null?void 0:De.parentElement)!=null?Me:null;Ye&&a.executeCommand(JSON.parse(Ye))});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",me=>me.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,me]=Wf(ee);/(^|\s)separator/.test(me)?b+=`<div class="${me}"`:b+=`<div tabindex="-1" id="${re}" class="${me}"`,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 Wf(a,y={shifted:!1}){var b,E,ee,re,oe,me,xe;let Me="",De=(b=a.class)!=null?b:"";if(y.shifted&&Wd(a)&&(De+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?Me=vf(a.shift):typeof a.shift=="object"&&(Me=a.shift.label?a.shift.label:(E=vf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(De=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(Me=a.label?a.label:(oe=vf(a.latex||a.insert||"")||a.key)!=null?oe:"",a.shift){let Ye;typeof a.shift=="string"?Ye=vf(a.shift):a.shift.label?Ye=a.shift.label:Ye=(me=vf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?me:"",Me+=`<span class="MLK__shift">${Ye}</span>`}a.aside&&(Me+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(De)&&(De+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(De)||(De+=" MLK__keycap"),!/\bw[0-9]+\b/.test(De)&&a.width&&(De+=(xe={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?xe:""),[Me,De||"MLK__keycap"]}var md={"[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:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",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 _p(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!md[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&md[a.label]&&(b=ge(ke(ke({},md[a.label]),a),{label:md[a.label].label})),"key"in a&&a.key&&md[a.key]&&(b=ge(ke(ke({},md[a.key]),a),{key:md[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=ke(ke({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=ke(ke({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=ke(ke({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=ke(ke({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var bf;function kg(a){var y;if(a.button!==0)return;const b=Hu.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=Hd(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,me=oe.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Zf(oe),{capture:!0,signal:me}),ee.addEventListener("pointerleave",Zf(oe),{capture:!0,signal:me}),ee.addEventListener("pointercancel",Zf(oe),{signal:me}),ee.addEventListener("pointerup",Zf(oe),{signal:me}),Wd(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(bf&&clearTimeout(bf),bf=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),Ep(ee,()=>{oe.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Zf(a){return y=>{const b=Hd(y.target);if(!(b!=null&&b.id))return;const E=Hu.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"),Wd(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"),Wd(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){bf&&clearTimeout(bf),Wd(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=Hu.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 Hd(a){if(!a)return;let y=a;for(;y&&!_g(y);)y=y.parentElement;return y!=null?y:void 0}function Wd(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var Hu=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=Lp();oe&&!oe.readOnly&&oe.mathVirtualKeyboardPolicy==="auto"&&ct()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{Lp()||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=>kp(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]=Wf(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}),gf(),Sg(),(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)&&Ep(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!as(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=Kd(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:ke({type:Kf,action:y},b)}));return}if(E)E.postMessage(ke({type:Kf,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=Kd(y);return ze(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Kd(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Jc[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 Lp(){var a,y;let b=Of(),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(dt()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=Hu.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function jf(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(ze(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(me=>parseInt(me.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=Hu.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=Rn(a.macros);break;default:ze(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=ke({},a[b]):y[b]=a[b]}return y}function gd(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:ze(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=ke({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Uf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:ut,backgroundColorMap:$e,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:Pd,inlineShortcuts:mu,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sd,value:""}}function Tp(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function Wu(a,y){!a||!y||(ze(a)?a.forEach(b=>Wu(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),Wu(a.body,y),Wu(a.above,y),Wu(a.below,y),Wu(a.subscript,y),Wu(a.superscript,y)))}function Mh(a,y,b,E){function ee(oe,me){for(const xe of re)if(xe.style[oe]!==me)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=Ai),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 xu(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Tg(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}gt(["math","displaymath"],Tc),gt("center",Tc),Ht("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 Xa("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),It("array","{columns:colspec}",(a,y,b,E)=>new Xa(a,kh(y),b,{columns:E[0],mathstyleName:"textstyle"})),It(["equation","equation*","subequations"],"",(a,y,b)=>new Xa(a,kh(y),b,{columns:[{align:"c"}]})),It(["multline","multline*"],"",Tc),It(["align","align*","aligned","eqnarray"],"",Tc),It("split","",Tc),It(["gather","gathered"],"",Tc),It(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Tc),It(["smallmatrix","smallmatrix*"],"[columns:colspec]",Tc),It(["cases","dcases","rcases"],"",Tc);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 wa]]):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 Tc(a,y=[[[]]],b=[],E=[]){switch(y=kh(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new Xa(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new Xa(a,y,b,{mathstyleName:"textstyle"});case"center":return new Xa(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new Xa(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Xa(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Xa(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:vd(E[0])});case"bmatrix":case"bmatrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:vd(E[0])});case"Bmatrix":case"Bmatrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:vd(E[0])});case"vmatrix":case"vmatrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:vd(E[0])});case"Vmatrix":case"Vmatrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:vd(E[0])});case"matrix":case"matrix*":return new Xa(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:vd(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new Xa(a,y,b,{mathstyleName:"scriptstyle",columns:vd(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Xa(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 Xa(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Xa(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const me of y)ee=Math.max(ee,me.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 Xa(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new Xa(a,y,b,{mathstyleName:"textstyle"})}function vd(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof Xa);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof Xa)){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=Xf()),ee.length===0&&(ee=Xf());let oe;return y.endsWith("column")?(oe=Tc("split",[[re,ee]]),a.root=oe,yd(oe,0,0)?bd(a,oe,0,0):yd(oe,0,1)?bd(a,oe,0,1):a.position=a.offsetOf(E)):(oe=Tc("lines",[[re],[ee]]),a.root=oe,yd(oe,0,0)?bd(a,oe,0,0):yd(oe,1,0)?bd(a,oe,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Jo){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=Xf()),re.length===0&&(re=Xf());let me="pmatrix";const xe=ee.leftDelim,Me=ee.rightDelim;xe==="("&&(Me===")"||Me==="?")?me="pmatrix":(xe==="["||xe==="\\lbrack")&&(Me==="]"||Me==="\\rbrack"||Me==="?")?me="bmatrix":xe==="\\vert"&&Me==="\\vert"?me="vmatrix":xe==="\\Vert"&&Me==="\\Vert"?me="Vmatrix":(xe==="{"||xe==="\\lbrace")&&(Me==="."||Me==="?")&&(me="cases");const De=Tc(me,y.endsWith("column")?[[oe,re]]:[[oe],[re]]);return ee.parent.addChildBefore(De,ee),ee.parent.removeChild(ee),yd(De,0,0)?bd(a,De,0,0):y.endsWith("column")?yd(De,0,1)?bd(a,De,0,1):a.position=a.offsetOf(b):yd(De,1,0)?bd(a,De,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof Xa?[b.parent,b.parentBranch]:[void 0,[0,0]]}function yd(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function bd(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Vf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function Gf(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Vf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Vf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Vf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Vf(a,b,E,ee,"start");break}}function Ap(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ip(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Og(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Dp(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 Pp(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof Xa);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof Xa){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 Ng(a){return a.contentWillChange({inputType:"deleteContent"})?(Pp(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Rg(a){return a.contentWillChange({inputType:"deleteContent"})?(Pp(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}dc({addRowAfter:Ap,addColumnAfter:Ip,addRowBefore:Pg,addColumnBefore:Og,removeRow:Ng,removeColumn:Rg,setEnvironment:Dp},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Xf(){return[new wa]}var Op=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}};Op.maximumDepth=1e3;var $g=Op;function _h(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(pe.test(a.at(y).value)){let re=y,oe;do oe=a.at(re).mode==="text"&&pe.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 Zd(a,y,b){var E,ee,re,oe,me,xe,Me;const De=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Ye=a.at(a.position);if(y==="forward"&&(Ye.type==="subsup"?(Ye=Ye.rightSibling,Ye||(Ye=a.at(a.position+1))):Ye=a.at(a.position+1)),!Ye)return a.announce("plonk"),!1;let bt=a.offsetOf(Ye);if(Ye instanceof cc)bt=_h(a,bt,y);else if(Ye instanceof Nl)if(Ye.isSuggestion)for(console.assert(y==="forward");Ye&&Ye instanceof Nl;)Ye.isSuggestion=!1,bt=a.offsetOf(Ye),Ye=Ye.rightSibling;else if(y==="forward"){if(Ye=Ye.rightSibling,!Ye||!(Ye instanceof Nl))return a.announce("plonk"),!1;for(;Ye&&Ye instanceof Nl&&/[a-zA-Z\*]/.test(Ye.value);)bt=a.offsetOf(Ye),Ye=Ye.rightSibling}else{if(Ye=Ye.leftSibling,!Ye||!(Ye instanceof Nl))return a.announce("plonk"),!1;for(;Ye&&Ye instanceof Nl&&/[a-zA-Z\*]/.test(Ye.value);)bt=a.offsetOf(Ye),Ye=Ye.leftSibling}else if(y==="forward"&&Ye.type==="mopen"){let $t=0;do Ye.type==="mopen"?$t+=1:Ye.type==="mclose"&&($t-=1),Ye=Ye.rightSibling;while(!Ye.isLastSibling&&$t!==0);bt=a.offsetOf(Ye.leftSibling)}else if(y==="backward"&&Ye.type==="mclose"){let $t=0;do Ye.type==="mopen"?$t+=1:Ye.type==="mclose"&&($t-=1),Ye=Ye.leftSibling;while(!Ye.isFirstSibling&&$t!==0);bt=a.offsetOf(Ye)}else if(y==="backward")if(Ye.type==="first")for(;bt>0&&Ye.type==="first";)bt-=1,Ye=a.at(bt);else{const $t=Ye.type;Ye.type==="subsup"&&(bt=a.offsetOf(a.at(bt).leftSibling)),bt-=1;let jt=(ee=a.at(bt))==null?void 0:ee.type;for(;bt>=0&&jt===$t;)((re=a.at(bt))==null?void 0:re.type)==="subsup"?bt=a.offsetOf(a.at(bt).leftSibling):bt-=1,jt=a.at(bt).type}else{const{type:$t}=Ye;let jt=(oe=a.at(bt))==null?void 0:oe.type;const{lastOffset:sr}=a;for(;bt<=sr&&(jt===$t||jt==="subsup");){for(;((me=a.at(bt).rightSibling)==null?void 0:me.type)==="subsup";)bt=a.offsetOf(a.at(bt).rightSibling);bt+=1,jt=(xe=a.at(bt))==null?void 0:xe.type}bt-=1}if((Me=b==null?void 0:b.extend)!=null&&Me){if(!a.setSelection(a.anchor,bt))return a.announce("plonk"),!1}else{if(bt===a.position)return a.announce("plonk"),!1;a.position=bt}return a.announce("move",De),a.mathfield.stopCoalescingUndo(),!0}function Qc(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[me,xe]=gp(a);me!==void 0&&xe!==void 0&&a.deleteAtoms([me,xe])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let me=Yf(a,a.position,y);me<0&&(me=0),me>a.lastOffset&&(me=a.lastOffset);const xe=a.setSelection(a.anchor,me);return a.mathfield.stopCoalescingUndo(),xe}if(a.selectionIsPlaceholder){a.collapseSelection(y);const me=Qc(a,y);return a.mathfield.stopCoalescingUndo(),me}let re=a.position;const oe=re;if(a.collapseSelection(y)?(re=a.position,Np(a,re)||(re=Yf(a,re,y))):re=Yf(a,re,y),re<0||re>a.lastOffset){let me=!0;return a.silenceNotifications||(me=(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),me&&a.announce("plonk"),me}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",oe),!0}function Yf(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||Np(a,y)?y:Yf(a,y,b)}function Np(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=Ol(a.getHTMLElement(y[ee])).right,oe=Math.abs(b-re);if(oe<=E)E=oe;else break}return y[ee-1]}function Jf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,oe=re?b.filter(Me=>Me.type==="prompt"&&!Me.captureSelection):b,me=Ol(a.mathfield.getHTMLElement(y)).right,xe=a.offsetOf(Bg(a.mathfield,oe,me))-(re?1:0);if(E){const[Me,De]=a.selection.ranges[0];let Ye;xe<(ee==="up"?Me:De)?Ye={ranges:[[xe,De]],direction:"backward"}:Ye={ranges:[[Me,xe]],direction:"forward"},a.setSelection(Ye)}else a.setPositionHandlingPlaceholder(xe);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 xe,Me;let De=!0;return a.silenceNotifications||(De=(Me=(xe=a.mathfield.host)==null?void 0:xe.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Me:!0),a.announce(De?"plonk":"line"),De},oe=a.at(a.position);let me=oe;for(;me&&me.parentBranch!=="below"&&!(Array.isArray(me.parentBranch)&&me.parent instanceof Xa);)me=me.parent;if(Array.isArray(me==null?void 0:me.parentBranch)&&me.parent instanceof Xa){const xe=me.parent;if(me.parentBranch[0]<1)return re();const Me=me.parentBranch[0]-1,De=xe.array[Me][me.parentBranch[1]];if(!De.some(bt=>bt.type==="prompt"&&!bt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Jf(a,oe,De,ee,"up")}else if(me){const xe=(E=me.parent.branch("above"))!=null?E:me.parent.createBranch("above");if(!xe.some(De=>De.type==="prompt"&&De.placeholderId)&&a.mathfield.hasEditablePrompts)return re();Jf(a,oe,xe,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 xe,Me;let De=!0;return a.silenceNotifications||(De=(Me=(xe=a.mathfield.host)==null?void 0:xe.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Me:!0),a.announce(De?"plonk":"line"),De},oe=a.at(a.position);let me=oe;for(;me&&me.parentBranch!=="above"&&!(Array.isArray(me.parentBranch)&&me.parent instanceof Xa);)me=me.parent;if(Array.isArray(me==null?void 0:me.parentBranch)&&me.parent instanceof Xa){const xe=me.parent;if(me.parentBranch[0]+1>xe.array.length-1)return re();const Me=me.parentBranch[0]+1,De=xe.array[Me][me.parentBranch[1]];if(!De.some(bt=>bt.type==="prompt"&&!bt.captureSelection)&&a.mathfield.hasEditablePrompts)return re();Jf(a,oe,De,ee,"down")}else if(me){const xe=(E=me.parent.branch("below"))!=null?E:me.parent.createBranch("below");if(!xe.some(De=>De.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();Jf(a,oe,xe,ee,"down")}else return re();return!0}function Rp(a){const y=a.position,b=a.at(y).parent;return b!=null&&b.parent?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),a.announce("move",y),!0):(a.announce("plonk"),!1)}function Kg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!1):E=!0,b=b.parent;return E?y:0}function Hg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!0):E=!1,b=b.parent;return E?y:0}function $p(a){var y;if(a.collapseSelection(),Kg(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=b.rightSibling)==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new _c({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function Bp(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new _c({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(xe){const Me=[],De=[];return[...xe.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((bt,$t)=>{const jt=E(bt);jt===0?Me.push(bt):De.push({documentOrder:$t,tabIndex:jt,node:bt})}),De.sort((bt,$t)=>bt.tabIndex===$t.tabIndex?bt.documentOrder-$t.documentOrder:bt.tabIndex-$t.tabIndex).map(bt=>bt.node).concat(Me)}function y(xe){return!(!b(xe)||ee(xe)||E(xe)<0)}function b(xe){return!(xe.disabled||xe.type==="hidden"&&xe.tagName.toUpperCase()==="INPUT"||me(xe))}function E(xe){var Me;const De=Number.parseInt((Me=xe.getAttribute("tabindex"))!=null?Me:"NaN",10);return Number.isNaN(De)?xe.contentEditable==="true"||(xe.nodeName==="AUDIO"||xe.nodeName==="VIDEO")&&xe.getAttribute("tabindex")===null?0:xe.tabIndex:De}function ee(xe){return xe.tagName.toUpperCase()==="INPUT"&&xe.type==="radio"&&!oe(xe)}function re(xe,Me){for(const De of xe)if(De.checked&&De.form===Me)return De;return null}function oe(xe){var Me;if(!xe.name)return!0;const Ye=((Me=xe.form)!=null?Me:xe.ownerDocument).querySelectorAll('input[type="radio"][name="'+xe.name+'"]'),bt=re(Ye,xe.form);return!bt||bt===xe}function me(xe){if(!dt()||xe===document.activeElement||xe.contains(document.activeElement))return!1;if(getComputedStyle(xe).visibility==="hidden")return!0;const Me=xe.getBoundingClientRect();if(Me.width===0||Me.height===0)return!0;for(;xe;){if(getComputedStyle(xe).display==="none")return!0;xe=xe.parentElement}return!1}return dt()?a(document.body):[]}function Ql(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"?Ql(a,[y.leftSibling,y]):Ql(a,[y,y.leftSibling])}function Kc(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 Qf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Qc(a,y);let oe;const me=a.at(a.anchor).parentPrompt;me?y==="forward"?oe=a.offsetOf(me)+1:oe=a.offsetOf(me.leftSibling):oe=Math.max(a.position+re,0);const xe=Lh(a,oe,y);if(!xe||y==="forward"&&a.offsetOf(xe)<oe||y==="backward"&&a.offsetOf(xe)>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 De=Wg();if(!document.activeElement||De.length<=1)return a.announce("plonk"),!1;let Ye=De.indexOf(document.activeElement)+re;return Ye<0&&(Ye=De.length-1),Ye>=De.length&&(Ye=0),De[Ye].focus(),a.mathfield.stopCoalescingUndo(),!0}return Kc(a,xe),!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)}dc({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 me=b.subsupPlacement?Bp(a):$p(a);return a.mathfield.stopCoalescingUndo(),me}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=>Rp(a),moveToNextChar:a=>Qc(a,"forward"),moveToPreviousChar:a=>Qc(a,"backward"),moveUp:a=>Qc(a,"upward"),moveDown:a=>Qc(a,"downward"),moveToNextWord:a=>Zd(a,"forward"),moveToPreviousWord:a=>Zd(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 Qf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let bt=re;for(;bt&&bt.mode==="text";)bt=bt.leftSibling;let $t=re;for(;((y=$t.rightSibling)==null?void 0:y.mode)==="text";)$t=$t.rightSibling;if(bt&&$t)return Ql(a,[bt,$t])}if(re.rightSibling.mode==="text"){let bt=re;for(;bt&&bt.mode==="text";)bt=bt.rightSibling;return bt?(Kc(a,(b=bt.leftSibling)!=null?b:bt),a.mathfield.switchMode("math"),!0):Kc(a,a.lastOffset)}}const me=a.at(a.anchor).parentPrompt,xe=me?a.offsetOf(me)+1:Math.max(a.position+1,0),Me=Lh(a,xe,"forward");if(Me)return Kc(a,Me);const De=Fp(a,re,bt=>bt.type==="leftright"||bt.type==="text","forward");if(De){if(De.mode==="text"){let bt=De;for(;bt&&bt.mode==="text";)bt=bt.rightSibling;return Ql(a,[(E=De.leftSibling)!=null?E:De,(ee=bt.leftSibling)!=null?ee:bt])}return Ql(a,De)}const Ye=re.parent;if(Ye){if(Ye.type==="leftright"||Ye.type==="surd")return Ql(a,Ye);if(re.parentBranch==="superscript"&&Ye.subscript)return Ql(a,Ye.subscript);if(re.parentBranch==="above"&&Ye.below)return Ql(a,Ye.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return Kc(a,Ye);if(re.parentBranch==="above"||re.parentBranch==="below")return Ql(a,Ye)}return Kc(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Qf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let me=b;for(;me&&me.mode==="text";)me=me.leftSibling;let xe=b;for(;((y=xe.rightSibling)==null?void 0:y.mode)==="text";)xe=xe.rightSibling;if(me&&xe)return Ql(a,[me,xe])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?Kc(a,b):Kc(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 Kc(a,oe);if(E==="math"){const me=Fp(a,b,Me=>Me.type==="leftright"||Me.type==="text","backward");if(me){if(me.mode==="text"){let Me=me;for(;Me&&Me.mode==="text";)Me=Me.leftSibling;return Ql(a,[me,Me])}return Ql(a,me)}const xe=b.parent;if(xe){if(xe.type==="leftright"||xe.type==="surd")return Ql(a,xe);if(b.parentBranch==="subscript"&&xe.superscript)return Ql(a,xe.superscript);if(b.parentBranch==="below"&&xe.above)return Ql(a,xe.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return Kc(a,xe);if(b.parentBranch==="above"||b.parentBranch==="below")return Ql(a,xe)}return Kc(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:$p,moveToSubscript:Bp},{target:"model",changeSelection:!0}),dc({moveToNextPlaceholder:a=>Qf(a,"forward"),moveToPreviousPlaceholder:a=>Qf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function Fp(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 qf(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 xd(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}Th(a),a.contentDidChange({data:Aa(re),inputType:"insertText"})}function Th(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 jg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Pf(b))return!1;const ee=Bd(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)&&xd(E,1),!0;const oe={")":"(","}":"{","]":"["}[ee],{parent:me}=E.at(E.position);if(oe&&me instanceof Jo&&me.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 xd(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){xd(E,1);const xe=E.at(E.position);return xe.value="\u22C5",xe.style.variant="normal",xe.command="\\cdot",xe.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 xd(E,1),!0;if(/\([a-z][,;]$/.test(re))return xd(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Th(E),!0}else{if(y==="[Space]")return qf(E,void 0,oe=>/[a-z][:,;.]$/.test(oe.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return qf(E,void 0,oe=>/[a-zA-Z]/.test(oe.value)),!0;if(/(^|\W)(if)$/i.test(re))return qf(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 qf(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=zp(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function Vg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=zp();y.innerHTML=""}else{const y=Rf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function zp(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(uc("keystroke-caption"),uc("core"),Rf("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function Kp(a,y){var b,E,ee;const{model:re}=a,oe=pp(y);if(y.isTrusted){$m(y);const $t=ff();a.keyboardLayout!==$t.id&&(a.keyboardLayout=$t.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Ug(a,oe),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let me,xe="",Me;const De=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(oe==="[Backspace]")De.pop();else if(!Pf(y))a.flushInlineShortcutBuffer();else{const $t=Bd(y),jt=[...(E=(b=De[De.length-1])==null?void 0:b.keystrokes)!=null?E:[],$t];De.push({state:re.getState(),keystrokes:jt,leftSiblings:Xg(a)});let sr=0,Gr="";for(;!me&&sr<jt.length;)Me=De.length-(jt.length-sr),Gr=jt.slice(sr).join(""),me=Nu(De[Me].leftSiblings,Gr,a.options.inlineShortcuts),!me&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(Gr)&&(me=a.options.onInlineShortcut(a,Gr)),sr+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(me?a.switchMode("math"):jg(a,oe,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),xe=""))}if(!me){if(xe||(xe=Zm(a.keybindings,re.mode,y)),!xe&&(oe==="[Enter]"||oe==="[Return]")){let $t=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&($t=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),$t||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),$t}if((!xe||oe==="[Space]")&&re.mode==="math"){if(oe==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return $a.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),xe="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const $t=re.at(re.position+1),jt=re.at(re.position-1);if(($t==null?void 0:$t.mode)==="text"||(jt==null?void 0:jt.mode)==="text")return $a.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===","&&Bd(y)===","&&(xe="insertDecimalSeparator")}}if(!me&&!xe){if(re.mathfield.smartFence){if(Ih(re,Bd(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:$t}=re.at(re.position);if($t instanceof Jo&&$t.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(oe))return a.snapshot(),$t.isDirty=!0,$t.rightDelim=oe,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Bd(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const jt=Bd(y);if(jt==="("||jt==="{"||jt==="["){const sr={"(":"(","{":"\\lbrace","[":"\\lbrack"}[jt],Gr={"(":")","{":"\\rbrace","[":"\\rbrack"}[jt],[er,Tr]=Vs(re.selection);return a.snapshot(),re.position=Tr,$a.insert(re,Gr,{format:"latex"}),re.position=er,$a.insert(re,sr,{format:"latex"}),re.setSelection(er+1,Tr+1),re.contentDidChange({data:jt,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Ye=re.at(Math.max(re.position,re.anchor)),{parent:bt}=Ye;if(xe==="moveAfterParent"&&(bt==null?void 0:bt.type)==="leftright"&&Ye.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(xe="",Ys(a)),a.keyboardDelegate.cancelComposition(),xe)a.executeCommand(xe);else if(me){const $t=a.effectiveStyle;re.setState(De[Me].state);const jt=De[De.length-1].keystrokes;for(const sr of jt)$a.insert(re,sr,{silenceNotifications:!0,style:$t});a.snapshot("insert-shortcut"),re.setState(De[Me].state),re.deferNotifications({content:!0,selection:!0,data:me,type:"insertText"},()=>($a.insert(re,me,{format:"latex",style:$t}),Th(a.model),me.endsWith(" ")&&(a.switchMode("text"),$a.insert(re," ",{style:$t,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=Ls(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(xe=>xe.toUpperCase())),b.simulateKeystroke){let xe=!0;for(const Me of ee)Kp(a,new KeyboardEvent("keypress",{key:Me}))&&(xe=!1);if(xe)return}const oe=E.at(E.position),me=ke(ke({},oe.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Vs(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Nf(a);for(const xe of ee)$a.insert(E,xe);a.snapshot("insert-latex"),pf(a)});else if(E.mode==="text"){for(const xe of ee)$a.insert(E,xe,{style:me});a.snapshot("insert-text")}else if(E.mode==="math")for(const xe of ee)Yg(a,xe,me,oe);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function Yg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){Jg(ee),$a.insert(ee,y,{style:b}),a.snapshot(),Rp(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=ke({},b),oe.style.variant&&(b.variant=oe.style.variant),oe.style.variantStyle&&(b.variantStyle=oe.style.variantStyle))}$a.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function Jg(a){a.selectionIsCollapsed||(a.deleteAtoms(Vs(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const oe=te[re],me=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[xe,Me]=Vs(a.selection),De=a.extractAtoms([xe,Me]),Ye=ee.addChildrenAfter([new Jo("left...right",De,{leftDelim:re,rightDelim:me})],a.at(xe));return a.setSelection(a.offsetOf(Ye.firstChild),a.offsetOf(Ye.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const xe=ee instanceof Jo?ee.leftDelim+ee.rightDelim:"";if(xe==="\\lbrace\\rbrace"||xe==="\\{\\}"||xe==="\\lbrace?")return a.mathfield.snapshot(),$a.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(me){if(ee instanceof Jo&&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 Jo)){let Ye=E;for(;Ye&&!(Ye.type==="mclose"&&Ye.value===me);)Ye=Ye.rightSibling;if(Ye){a.mathfield.snapshot();const bt=a.extractAtoms([a.offsetOf(E),a.offsetOf(Ye)]);return bt.pop(),ee.addChildrenAfter([new Jo("left...right",bt,{leftDelim:re,rightDelim:me})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const xe=a.offsetOf(E.lastSibling);let Me;for(Me=a.position;Me<=xe;Me++){const Ye=a.at(Me);if(Ye instanceof Jo&&(Ye.leftDelim==="?"||Ye.leftDelim===".")&&Hp(re,Ye.rightDelim))break}const De=a.at(Me);if(Me<=xe&&De instanceof Jo){De.leftDelim=re,a.mathfield.snapshot();let Ye=a.extractAtoms([a.position,Me-1]);return Ye=Ye.filter(bt=>bt.type!=="first"),De.addChildren(Ye,De.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Jo&&(ee.leftDelim==="?"||ee.leftDelim===".")&&Hp(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const Ye=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const bt of Ye)ee.parent.addChildBefore(bt,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Jo&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),$a.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Ye=a.offsetOf(E.lastSibling),bt=a.extractAtoms([a.position,Ye]);a.at(a.position).body=bt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(oe){let xe=E;for(;xe;){if(xe.type==="mopen"&&xe.value===oe){a.mathfield.snapshot();const $t=xe.leftSibling,jt=a.extractAtoms([a.offsetOf(xe.leftSibling),a.offsetOf(E)]);jt.shift();const sr=new Jo("left...right",jt,{leftDelim:oe,rightDelim:re});return ee.addChildrenAfter([sr],$t),a.position=a.offsetOf(sr),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}xe=xe.leftSibling}if(ee instanceof Jo&&E.isLastSibling&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const Me=a.offsetOf(E.firstSibling);let De;for(De=a.position;De>=Me;De--){const $t=a.at(De);if($t instanceof Jo&&($t.rightDelim==="?"||$t.rightDelim===".")&&Dh($t.leftDelim,re))break}const Ye=a.at(De);if(De>=Me&&Ye instanceof Jo)return a.mathfield.snapshot(),Ye.rightDelim=re,Ye.addChildren(a.extractAtoms([De,a.position]),Ye.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Jo&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const bt=ee.parent;return bt instanceof Jo&&(bt.rightDelim==="?"||bt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(bt),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function Hp(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}dc({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:Vg,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(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}}),dc({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"}),dc({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})&&(pf(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Ys(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=ke(ke({},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}dc({applyStyle:Qg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,oe,me,xe,Me,De,Ye;const bt={};if(typeof y.color=="string"){const jt=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";jt!==y.color&&(bt.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),bt.color=jt}if(typeof y.backgroundColor=="string"){const jt=(oe=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?oe:"none";jt!==y.backgroundColor&&(bt.verbatimBackgroundColor=(me=y.verbatimBackgroundColor)!=null?me:y.backgroundColor),bt.backgroundColor=jt}typeof y.fontFamily=="string"&&(bt.fontFamily=y.fontFamily),typeof y.series=="string"&&(bt.fontSeries=y.series),typeof y.fontSeries=="string"&&(bt.fontSeries=y.fontSeries.toLowerCase()),bt.fontSeries&&(bt.fontSeries=(xe={bold:"b",medium:"m",normal:"m"}[bt.fontSeries])!=null?xe:bt.fontSeries),typeof y.shape=="string"&&(bt.fontShape=y.shape),typeof y.fontShape=="string"&&(bt.fontShape=y.fontShape.toLowerCase()),bt.fontShape&&(bt.fontShape=(Me={italic:"it",up:"n",upright:"n",normal:"n"}[bt.fontShape])!=null?Me:bt.fontShape),y.variant&&(bt.variant=y.variant.toLowerCase()),y.variantStyle&&(bt.variantStyle=y.variantStyle.toLowerCase());const $t=(De=y.size)!=null?De:y.fontSize;return typeof $t=="number"?bt.fontSize=Math.max(1,Math.min(10,$t)):typeof $t=="string"&&(bt.fontSize=(Ye={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[$t.toLowerCase()])!=null?Ye:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[$t]),bt}function Oh(a){let[y,b]=Vs(a.selection);if(y=Wp(a,y,"backward"),b=Wp(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 Wp(a,y,b){var E,ee,re;let oe=a.at(y);if(!oe)return y;const me=b==="forward"?1:-1;if(oe.mode==="text"){for(;oe&&!(oe.mode!=="text"||!pe.test(oe.value));)y+=me,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+=me,oe=a.at(y);else for(;oe&&oe.mode==="latex"&&/[a-zA-Z\*]/.test(oe.value);)y+=me,oe=a.at(y);else if(oe.value==="{"){if(b==="forward"){for(;oe&&oe.mode==="latex"&&oe.value!=="}";)y+=me,oe=a.at(y);return y}return y-1}else if(oe.value==="}"){if(b==="backward"){for(;oe&&oe.mode==="latex"&&oe.value!=="{";)y+=me,oe=a.at(y);return y-1}return y}return y-1}if(oe.mode==="math"){if(oe.isDigit()){for(;(E=a.at(y+me))!=null&&E.isDigit();)y+=me;return b==="backward"?y-1:y}if(oe.style.variant||oe.style.variantStyle){let xe=(ee=a.at(y))==null?void 0:ee.style;for(;xe&&xe.variant===oe.style.variant&&xe.variantStyle===oe.style.variantStyle;)xe=(re=a.at(y+me))==null?void 0:re.style,y+=me;return b==="backward"?y-1:y}return y}return y}dc({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Qc(a,"forward",{extend:!0}),extendSelectionBackward:a=>Qc(a,"backward",{extend:!0}),extendToNextWord:a=>Zd(a,"forward",{extend:!0}),extendToPreviousWord:a=>Zd(a,"backward",{extend:!0}),extendSelectionUpward:a=>Qc(a,"upward",{extend:!0}),extendSelectionDownward:a=>Qc(a,"downward",{extend:!0}),extendToNextBoundary:a=>Zd(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Zd(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 Sd=null,xf=0,eh=class Ic{static start(y,b,E,ee){var re;Ic.element=y,(re=Ic.controller)==null||re.abort(),Ic.controller=new AbortController;const oe={signal:Ic.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,oe),y.addEventListener("pointerup",ee,oe),y.addEventListener("pointercancel",ee,oe),Nh(b)&&(Ic.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=Ic.controller)==null||y.abort(),Ic.controller=void 0,typeof Ic.pointerId=="number"&&(Ic.element.releasePointerCapture(Ic.pointerId),Ic.pointerId=void 0)}};function Nh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Zp(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,oe=!1,me="none",xe=!1,Me=!1;const De=y.clientX,Ye=y.clientY,bt=Date.now(),$t=E.field,jt=setInterval(()=>{xe?$t.scroll({top:0,left:$t.scrollLeft-16}):Me&&$t.scroll({top:0,left:$t.scrollLeft+16})},32);function sr(){eh.stop(),re=!1,clearInterval(jt),a.element.classList.remove("tracking"),y&&y.preventDefault()}function Gr(Tr){if(!E.hasFocus()){sr();return}const ti=Tr.clientX,Nr=Tr.clientY,Zi=Nh(Tr)&&Tr.pointerType==="touch"?20:5;if(Date.now()<bt+500&&Math.abs(De-ti)<Zi&&Math.abs(Ye-Nr)<Zi){Tr.preventDefault(),Tr.stopPropagation();return}const va=$t.getBoundingClientRect();Me=ti>va.right,xe=ti<va.left;let oa=ee;Nh(Tr)&&(Tr.isPrimary||(oa=Sf(E,Tr.clientX,Tr.clientY,{bias:0})));const Fo=Sf(E,ti,Nr,{bias:ti<=De?ti===De?0:-1:1});oa>=0&&Fo>=0&&(E.model.extendSelectionTo(oa,Fo),Ys(a)),oe&&Oh(E.model)}Sd&&Math.abs(Sd.x-De)<5&&Math.abs(Sd.y-Ye)<5&&Date.now()<Sd.time+500?(xf+=1,Sd.time=bt):(Sd={x:De,y:Ye,time:bt},xf=1);const er=$t.getBoundingClientRect();if(De>=er.left&&De<=er.right&&Ye>=er.top&&Ye<=er.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Sf(a,De,Ye,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const Tr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),vp(a.model)||Tr?me="all":me="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),me="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),me="selection"):(a.model.position=ee,vp(a.model)?me="all":me="selection");a.defaultStyle={},y.detail===3||xf>2?(sr(),(y.detail===3||xf===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},me="all")):re||(re=!0,eh.start($t,y,Gr,sr),(y.detail===2||xf===2)&&(oe=!0,Oh(a.model),me="all"))}a.hasFocus()||(me="none",a.focus({preventScroll:!0}))}else Sd=null;a.stopCoalescingUndo(),me!=="none"&&(a.model.selectionIsCollapsed&&(me="all"),Ys(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 jp(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=Bc(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 me of b.children){const xe=jp(a,y,me,E,ee);xe[0]<=oe[0]&&(oe=xe)}return oe[1]||(oe=[qg(E,ee,re),b]),y.set(b.id,oe),oe}function ev(a,y,b){const[,E]=jp(a,new Map,a.model.root,y,b);return E}function Sf(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 me=[];let xe=oe;for(;xe;)me.unshift(xe),xe=xe.parent;for(const De of me)if(De.captureSelection){oe=De;break}let Me=a.model.offsetOf(oe);if(Me<0)return-1;if(oe.leftSibling)if(E.bias===0&&oe.type!=="placeholder"){const De=Bc(a,oe);De&&y<(De.left+De.right)/2&&(Me=a.model.offsetOf(oe.leftSibling))}else E.bias<0&&(Me=a.model.offsetOf(oe.leftSibling));return Me}var tv=class extends $a{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=Ku(re),{model:me}=a;me.selectionIsCollapsed||me.deleteAtoms(Vs(me.selection));const xe=me.at(me.position);if(xe.parent instanceof Xa){console.assert(xe.parentBranch!==void 0);const Me=[];let De=[];oe[0].type==="first"&&oe.shift(),oe[oe.length-1].type==="first"&&oe.pop();for(const jt of oe)jt.type==="first"&&De.length>0?(Me.push(De),De=[jt]):De.push(jt);De.length>0&&Me.push(De);let Ye=Number(xe.parentBranch[0]),bt=Number(xe.parentBranch[1]);const $t=xe.parent.maxColumns;for(;xe.parent.colCount-bt<Me.length&&xe.parent.colCount<$t;)xe.parent.addColumn();xe.parent.addChildrenAfter(Me[0],xe);for(let jt=1;jt<Me.length;jt++)bt++,bt>=$t&&(bt=0,xe.parent.addRowAfter(Ye),Ye++),xe.parent.setCell(Ye,bt,Me[jt])}else xe.parent.addChildrenAfter(oe.filter(Me=>Me.type!=="first"),xe);return me.position=me.offsetOf(oe[oe.length-1]),me.contentDidChange({inputType:"insertFromPaste"}),Ys(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]=Mc(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Ys(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 me=a.silenceNotifications;a.silenceNotifications=!0;const xe={"?":"\\placeholder{}","@":"\\placeholder{}"};xe[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vs(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 Me=-1;xe[0]?xe["@"]=xe[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(Me=rv(a),Me>=0&&(xe["@"]=a.getValue(Me,a.position,"latex"))),xe[0]||(xe[0]=xe["?"]);let De=!1;const Ye=ti=>(De=!0,xe[ti]);let[bt,$t]=Up(a,y,Ye,b);if(!$t)return!1;const jt=$t.length===1&&$t[0].type==="genfrac";jt&&Me>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(xe["@"]=xe["?"],De=!1,[bt,$t]=Up(a,y,Ye,b)):Me>=0&&a.deleteAtoms([Me,a.position]);const{parent:sr}=a.at(a.position),Gr=sr.hasEmptyBranch("body");if(jt&&bt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&sr instanceof Jo&&sr.leftDelim==="("&&Gr){const ti=sr.parent,Nr=sr.parentBranch;ti.removeChild(sr),ti.setChildren($t,Nr)}const er=a.at(a.position);er.parent.addChildrenAfter($t,er),bt==="latex"&&typeof y=="string"&&(sr==null?void 0:sr.type)==="root"&&Gr&&!De&&(sr.verbatimLatex=y),a.silenceNotifications=me;const Tr=$t[$t.length-1];if(b.selectionMode==="placeholder"){const ti=$t.flatMap(Nr=>[Nr,...Nr.children]).find(Nr=>Nr.type==="placeholder");if(ti){const Nr=a.offsetOf(ti);a.setSelection(Nr-1,Nr),a.announce("move")}else Tr&&(a.position=a.offsetOf(Tr))}else b.selectionMode==="before"||(b.selectionMode==="after"?Tr&&(a.position=a.offsetOf(Tr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(Tr)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=oe,!0}};function Up(a,y,b,E){var ee;let re,oe=[];if(typeof y!="string"||E.format==="math-json"){const me=window.MathfieldElement.computeEngine;if(!me)return["math-json",[]];[re,y]=["latex",me.box(y).latex],oe=Tl(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Vc(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),oe=Tl(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&th(oe)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Vc(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=Mc(y)),oe=Tl(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&th(oe));return Wu(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 Jo&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function th(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Jo&&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)){th(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof Xa)for(const b of y.cells)th(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||Vp(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(Vp(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 Vp(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 $a{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"),Ys(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(Vs(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(Wu(re,b.style),!re)return!1;const oe=a.at(a.position),me=oe.parent.addChildrenAfter(re,oe);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(me)):me&&(a.position=a.offsetOf(me))),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 qc(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var _s=4,oc=20,pl=2*(oc+_s),nh=(a,y)=>`
|
|
|
<line x1="${a+oc}" y1="${y+oc}"
|
|
|
x2="${a>y?a+oc:7*oc+10*_s}"
|
|
|
y2="${a<y?y+oc:7*oc+10*_s}"/>
|
|
|
<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>`,Gp=(a,y)=>`
|
|
|
<line x1="${a+oc}" y1="${y+oc}"
|
|
|
x2="${a>y?a+oc:7*oc+10*_s}"
|
|
|
y2="${a<y?y+oc:7*oc+10*_s}"/>
|
|
|
<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>`,rh=(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*oc+10*_s+5} ${8*oc+10*_s+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${pl+_s}"
|
|
|
height="${3*pl}"
|
|
|
width="${pl}"
|
|
|
rx="${pl/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${pl+_s}"
|
|
|
y="0"
|
|
|
height="${pl}"
|
|
|
width="${3*pl}"
|
|
|
rx="${pl/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${rh(2*(_s+pl),2*_s+3*pl,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${rh(2*(_s+pl),2*_s+pl,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${rh(2*_s+3*pl,2*(_s+pl),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${rh(2*_s+pl,2*(_s+pl),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${nh(2*_s+pl,_s)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${Gp(2*_s+2*pl,_s)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${nh(2*_s+3*pl,_s)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${nh(_s,2*_s+pl)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${Gp(_s,2*_s+2*pl)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${nh(_s,2*_s+3*pl)}
|
|
|
</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>`,Xp=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:Xp,vmatrix:uv,Vmatrix:dv},$h={cases:fv,rcases:hv,Bmatrix:Xp};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(jt=>{(!ee||jt.length>ee)&&(ee=jt.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Rf("mathlive-environment-popover"),uc("environment-popover"),uc("core"),re.setAttribute("aria-hidden","true"));let oe;const me=re.querySelector(".MLEP__environment-controls");me?oe=me:(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 xe=[],Me="";const De=a.model.parentEnvironment.environmentName;if(Zl(De)){const jt=gv(De);Me=Rh[jt]("active");const sr=Rh,{[jt]:Gr}=sr,er=lt(sr,[Ae(jt)]);xe=Object.values(er).map(Tr=>Tr("inactive"))}else if(jl(De)){const jt=vv(De);Me=$h[jt]("active");const sr=$h,{[jt]:Gr}=sr,er=lt(sr,[Ae(jt)]);xe=Object.values(er).map(Tr=>Tr("inactive"))}else ll(De)&&(Me=Rh.matrix("active"),xe=Object.values($h).map(jt=>jt("inactive")));const Ye=document.createElement("div");Ye.className="MLEP__environment-delimiter-controls",Ye.style.display="flex",Ye.style.flexDirection="column",Ye.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${Me}
|
|
|
${xe.join("")}
|
|
|
</div>`,Me&&oe.appendChild(Ye),oe.querySelectorAll("[data-command]").forEach(jt=>{const sr=jt.dataset.command;let Gr=sr;try{Gr=JSON.parse(sr)}catch(er){}jt.addEventListener("mousedown",er=>er.preventDefault()),Gr&&jt.addEventListener("click",()=>a.executeCommand(Gr))});const $t=(b=a.field)==null?void 0:b.getBoundingClientRect();$t&&(re.style.top=`${window.scrollY+($t.top-re.clientHeight-15)}px`,re.style.left=`${$t.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 ih(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&$s(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 Yp(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function Jp(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=Yp(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(),me=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let xe=Math.min(me,(E=y.height)!=null?E:oe.height),Me=Fh(y.location.y,xe,y.verticalPos,re);Me+xe>window.innerHeight-8&&(y.alternateLocation?(Me=Fh(y.alternateLocation.y,xe,y.verticalPos,re),Me+xe>window.innerHeight-8&&(Me=void 0)):Me=void 0),Number.isFinite(Me)||(Me=Math.max(8,window.innerHeight-8-xe),8+xe>window.innerHeight-8&&(a.style.bottom="8px")),xe=Math.min(Me+xe,window.innerHeight-8)-Me;const De=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Ye=Math.min(De,(ee=y.width)!=null?ee:oe.width),bt=Fh(y.location.x,Ye,y.horizontalPos,re);bt+Ye>window.innerWidth-8&&(y.alternateLocation?(bt=yv(y.alternateLocation.x,Ye,y.verticalPos,re),bt+Ye>window.innerWidth-8&&(bt=void 0)):bt=void 0),Number.isFinite(bt)||(bt=Math.max(8,window.innerWidth-8-Ye),8+Ye>window.innerWidth-8&&(a.style.right="8px")),Ye=Math.min(bt+Ye,window.innerWidth-8)-bt,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-bt-Ye).toString()}px`:a.style.left=`${Math.ceil(bt).toString()}px`,a.style.top=`${Math.ceil(Me).toString()}px`,xe!==oe.height&&(a.style.height=`${Math.ceil(xe).toString()}px`),Ye!==oe.width&&(a.style.width=`${Math.ceil(Ye).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function jd(a){return"submenu"in a}function eu(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var Qp={};function Hh(a){let y=Qp[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,Qp[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 qp=80,e0=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,jd(a)?(this.type="submenu",this.submenu=new t0(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=eu(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),eu(ee)&&(this.checked=eu(ee)&&((y=Ud(ee.checked,a))!=null?y:!1)),(eu(ee)||jd(ee))&&(this.enabled=(b=Ud(ee.enabled,a))!=null?b:!0,this.visible=(E=Ud(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(eu(ee)||Kh(ee)||jd(ee))&&(this.label=Ud(ee.label,a),this.tooltip=Ud(ee.tooltip,a),this.ariaLabel=Ud(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),eu(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(eu(this._declaration)||Kh(this._declaration)||jd(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(!eu(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()},qp)},qp)}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=Yp(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:Jp(b,"trailing",E),y:b.top-4},alternateLocation:{x:Jp(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(Sv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const oe=this.submenu.element.getBoundingClientRect(),me=this.element.getBoundingClientRect();oe.left<me.left+me.width/2&&(re="left")}return re==="right"?E>0:E<0}};function Sv(a,y,b){return Math.hypot(a,y)/b}function Ud(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var t0=class ef{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 e0(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(Me=>Me.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(Me=>Me.visible&&Me.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(Me=>Me.updateState(y));let oe,me=0;for(const Me of this._menuItems)Me.type==="heading"?(oe&&me===0&&(oe.visible=!1),oe=Me,me=0):Me.type==="divider"&&oe?(oe.visible=me>0,oe=void 0,me=0):oe&&Me.visible&&(me+=1);oe&&(oe.visible=me>0);let xe=!0;for(const Me of this._menuItems)Me.type==="divider"?(Me.visible=!xe,xe=!0):Me.visible&&(xe=!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 ef._collator||(ef._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),ef._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(me=>me.type!=="divider"&&me.visible&&me.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(me=>me.label.length))-y.length;if(ee<0)return null;let re=null,oe=0;for(;oe<ee&&!re;)re=(b=E.find(me=>ef.collator.compare(y,me.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),Dt()&&(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),Dt()&&((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}},n0=class rm extends t0{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(r0),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=hd(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=hd(y));let re=!0;const oe=this.activeSubmenu,me=oe.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":me==null||me.select(hd(y));break;case"ArrowRight":if((me==null?void 0:me.type)==="submenu")me.select(hd(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!me)oe.activeMenuItem=oe.firstMenuItem;else{const xe=(b=oe.getMenuItemColumn(me))!=null?b:-1;if(xe>=0&&xe<((E=oe.columnCount)!=null?E:1)-1){const Me=oe.nextMenuItem(1);Me&&(oe.activeMenuItem=Me)}}break;case"ArrowLeft":if(oe===this.rootMenu)me||(oe.activeMenuItem=oe.firstMenuItem);else if((me&&(ee=oe.getMenuItemColumn(me))!=null?ee:-1)<=0||!me){oe.hide();const Me=oe.parentMenu.activeMenuItem;if(Me){const{element:De}=Me;De==null||De.focus(),De==null||De.classList.remove("is-submenu-open")}}else{const Me=oe.nextMenuItem(-1);Me&&(oe.activeMenuItem=Me)}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 xe=oe.findMenuItem(this.typingBuffer);xe&&(oe.activeMenuItem=xe),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Pf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const xe=oe.findMenuItem(this.typingBuffer);xe&&(oe.activeMenuItem=xe),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 Yc.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),Yc.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),Yc.state==="open"&&Yc.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(ke({},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,Yc.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)}};n0.SUBMENU_DELAY=120;var wv=n0;function r0(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(eu(a)||jd(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||eu(a)&&typeof a.checked=="function"?!0:jd(a)?a.submenu.some(r0):!1}var ah=class{};ah.DELAY=300,ah.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=Df(a);E||y(!1);let ee=E;const re=setTimeout(()=>{oe.abort(),y(xv(ee,E)<ah.MAX_DISTANCE)},ah.DELAY),oe=new AbortController,me=oe.signal;for(const xe of["pointermove","pointerup","pointercancel"])window.addEventListener(xe,Me=>{if(Me.type==="pointerup"||Me.type==="pointercancel")clearTimeout(re),oe.abort(),y(!1);else if(Me.type==="pointermove"){const De=Df(Me);De&&(ee=De)}},{passive:!0,signal:me})})}function i0(a,y,b){return Uu(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:Df(E),modifiers:hd(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:hd(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=Df(a);if(yield Cv(a))return b.state!=="closed"?!1:(b.show({target:y,location:ee}),!0)}return!1})}var a0={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Ht(Object.keys(a0),"{body:auto}",{createAtom:a=>new z(ge(ke({},a),{body:wt(a.args[0]),accentChar:a0[a.command.slice(1)]}))}),Ht(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=dn(wt(a.args[0]));return new z(ge(ke({},a),{body:wt(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Ht(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(ge(ke({},a),{body:wt(a.args[0]),svgAccent:"overarc"}))}),Ht(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Lc(ge(ke({},a),{body:wt(a.args[0]),svgBelow:"underarc"}))}),Ht("utilde","{body:auto}",{createAtom:a=>{const y=wt(a.args[0]),b=dn(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Lc(ge(ke({},a),{body:y,svgBelow:E,boxType:Ts(y)}))}}),Ht("^","{:string}",{createAtom:a=>{var y;return new pr(ge(ke({},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:"^"}))}}),Ht("`","{:string}",{createAtom:a=>{var y;return new pr(ge(ke({},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:"`"}))}}),Ht("'","{:string}",{createAtom:a=>{var y;return new pr(ge(ke({},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:"'"}))}}),Ht('"',"{:string}",{createAtom:a=>{var y,b;return new pr(ge(ke({},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]:'"'}))}}),Ht(".","{:string}",{createAtom:a=>{var y,b;return new pr(ge(ke({},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]:"."}))}}),Ht("=","{:string}",{createAtom:a=>{var y,b;return new pr(ge(ke({},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]:"="}))}}),Ht("~","{:string}",{createAtom:a=>{var y;return new pr(ge(ke({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"}))}}),Ht("c","{:string}",{createAtom:a=>{var y;return new pr(ge(ke({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Ht("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 me of oe){const xe=me.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(xe)ee.strokeWidth=xe[1],ee.strokeStyle=xe[2],ee.strokeColor=xe[3];else{const Me=me.match(/\s*([a-z]*)\s*=\s*"(.*)"/);Me&&(Me[1]==="mathbackground"?ee.backgroundcolor=Me[2]:Me[1]==="mathcolor"?ee.strokeColor=Me[2]:Me[1]==="padding"?ee.padding=Me[2]:Me[1]==="shadow"&&(ee.shadow=Me[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 rf(a.command,wt(E[2]),re,ee)}}),Ht("cancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,wt(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:{}})}}),Ht("bcancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,wt(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:{}})}}),Ht("xcancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,wt(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:{}})}}),Ht(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Lc(ge(ke({},a),{body:wt((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Ht("overbrace","{:auto}",{createAtom:a=>new Lc(ge(ke({},a),{body:wt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Ht(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Lc(ge(ke({},a),{body:wt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Ht(["underbrace"],"{:auto}",{createAtom:a=>new Lc(ge(ke({},a),{body:wt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Ht(["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 Lc(ge(ke({},a),{svgBody:a.command.slice(1),above:((b=wt((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:wt((E=a.args)==null?void 0:E[1]),below:(re=wt((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)}`}),Ht(["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 fd(a.command.slice(1),ge(ke({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Ht(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new fd({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],ge(ke({},a),{limits:"over-under",variant:"main"}))}),Ht(["lim","mod"],"",{ifMode:"math",createAtom:a=>new fd(a.command.slice(1),ge(ke({},a),{limits:"over-under",variant:"main"}))}),Ht(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new fd(a.command.slice(1),ge(ke({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Ht(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new pr(ge(ke({},a),{body:wt(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 Ir("\xB0",{style:ge(ke({},a.style),{variant:"normal",variantStyle:"up"})});return new Ir([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Ht("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new op(ge(ke({},a),{body:wt(a.args[1]),index:a.args[0]?wt(a.args[0]):void 0}))}),Ht(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=ke({},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 Rd(E[0]?wt(E[0]):[new wa],E[1]?wt(E[1]):[new wa],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}`:yi(a.command,b,E)}}),Ht(["brace","brack"],"",{infix:!0,createAtom:a=>new Rd(wt(a.args[0]),wt(a.args[1]),ge(ke({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>Aa([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Ht(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new Rd(wt(E[0]),wt(E[1]),ge(ke({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>Aa([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Ht(["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 Rd(wt(E[0]),wt(E[1]),ge(ke({},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)}`}),Ht("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new Rd(wt(a.args[0]),wt(a.args[1]),ge(ke({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Ht(["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(ke({},a),{limits:"auto",variant:"main"}))}),Ht("smallint","",{ifMode:"math",createAtom:a=>new fd("\u222B",ge(ke({},a),{limits:"adjacent",variant:"main"}))});var o0={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"};Ht(Object.keys(o0),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=o0[y.slice(1)];return new fh(b,ge(ke({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Ht(["Re","Im"],"",{ifMode:"math",createAtom:a=>new fd({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],ge(ke({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Ht("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new rp(ge(ke({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Ht("the","{:value}",{createAtom:a=>new pr(ge(ke({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new ta({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Ir(((b=hs(re))!=null?b:"").split("").map(oe=>new Ir(oe,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:ke({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=hs(a.args[0]))!=null?y:"\\relax"}`}}),Ht("mathtip","{:auto}{:math}",{createAtom:a=>new hh(ge(ke({},a),{body:wt(a.args[0]),tooltip:wt(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${pr.serialize([a.tooltip],ge(ke({},y),{defaultMode:"math"}))}}`}),Ht("texttip","{:auto}{:text}",{createAtom:a=>new hh(ge(ke({},a),{body:wt(a.args[0]),tooltip:wt(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${pr.serialize([a.tooltip],ge(ke({},y),{defaultMode:"text"}))}}`}),Ht("error","{:math}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Ht("ensuremath","{:math}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(ge(ke({},y),{defaultMode:"math"}))}}`}),Ht("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=hs(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Ht("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=hs(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Ht("boxed","{content:math}",{createAtom:a=>new el(ge(ke({},a),{body:wt(a.args[0]),framecolor:{string:"black"}}))}),Ht("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=hs(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Ht("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new el(ge(ke({},a),{body:wt(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(ke({},y),{defaultMode:"text"})):yi(a.command,(b=hs(a.framecolor))!=null?b:"",(E=hs(a.backgroundcolor))!=null?E:"",a.bodyToLatex(ge(ke({},y),{defaultMode:"text"})))}}),Ht("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=wt(a.args[1]);return b?new el(ge(ke({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new el(ge(ke({},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=hs(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=hs(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return yi(ee,a.bodyToLatex(y))}}),Ht(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(a.args[0])})),render:(a,y)=>{const b=new ta({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):`{${Aa([a.command,a.bodyToLatex(y)])}}`}),Ht(["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]})}),Ht("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Ht("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Ht("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Ht("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Ht("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Ht(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new pr(ge(ke({},a),{body:wt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Ht("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Ht("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Ht("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Ht("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Ht("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Ht("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Ht("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Ht("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Ht("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Ht("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Ht("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Ht("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Ht("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Ht("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Ht("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Ht("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Ht("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Ht("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Ht("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Ht("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Ht("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Ht("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Ht("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Ht("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Ht("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Ht("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Ht("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Ht(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Ht(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Ht("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Ht("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Ht("mbox","{:text}",{ifMode:"math",createAtom:a=>new pr(ge(ke({},a),{type:"mord",body:wt(a.args[0]),mode:"math"})),serialize:(a,y)=>yi("\\mbox",a.bodyToLatex(ge(ke({},y),{defaultMode:"text"})))}),Ht("text","{:text}",{ifMode:"math",applyMode:"text"}),Ht(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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:""})}}),Ht(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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}}),Ht("htmlData","{data:string}{content:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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}}),Ht(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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}}),Ht("em","{:rest}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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"})}),Ht("emph","{:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(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 s0={"\\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}};Ht(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new ip(ge(ke({},a),{delim:(y=a.args[0])!=null?y:".",size:s0[a.command].size,delimType:s0[a.command].mclass}))}}),Ht(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new sf(ge(ke({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Ht(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new sf(ge(ke({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Ht("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new pr(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Hs||E===Ws)&&(b=1),(E===Ml||E===Es)&&(b=2),(E===kl||E===Ms)&&(b=3);const ee=wt(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)}}`}),Ht("mathop","{:auto}",{createAtom:a=>new pr(ge(ke({},a),{type:"mop",body:wt(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 Ir(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[yi(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)),Aa(b)}}),Ht(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new pr(ge(ke({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:wt(a.args[0])}))}),Ht(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=wt(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(ke({},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 Ir(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[yi(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)),Aa(b)}}),Ht(["char","unicode"],"{charcode:value}",{createAtom:a=>new pr(ge(ke({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${hs((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)}}),Ht("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new pr(a),render:(a,y)=>{var b,E,ee;const re=new ta({parent:y,mathstyle:"textstyle"},a.style),oe=re.toEm((b=a.args[0])!=null?b:{dimension:0}),me=re.toEm((E=a.args[1])!=null?E:{dimension:10}),xe=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),Me=new Ir(null,{classes:"rule",type:"ord"});return Me.width=me,Me.height=xe+oe,Me.depth=-oe,Me.setStyle("border-right-width",me,"em"),Me.setStyle("border-top-width",xe,"em"),Me.setStyle("border-color",a.style.color),Me.setStyle("vertical-align",oe,"em"),a.isSelected&&Me.setStyle("opacity","50%"),a.bind(re,Me),a.caret&&(Me.caret=a.caret),Me.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${hs(a.args[0])}]`:""}{${hs(a.args[1])}}{${hs(a.args[2])}}`}),Ht(["overline","underline"],"{:auto}",{createAtom:a=>new pr(ge(ke({},a),{body:wt(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new ta({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 Ir(null,{classes:b+"-line"});oe.height=re,oe.maxFontSize=re*1.125*E.scalingFactor;let me;return b==="overline"?me=new Za({shift:0,children:[{box:ee},3*re,{box:oe},re]}):me=new Za({top:ee.height,children:[re,{box:oe},3*re,{box:ee}]}),a.caret&&(me.caret=a.caret),new Ir(me,{classes:b,type:"ignore"})}}),Ht("overset","{:auto}{base:auto}",{createAtom:a=>{const y=wt(a.args[1]);return new Lc(ge(ke({},a),{above:wt(a.args[0]),body:y,skipBoundary:!1,boxType:Ts(y)}))},serialize:(a,y)=>yi(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Ht("underset","{:auto}{base:auto}",{createAtom:a=>{const y=wt(a.args[1]);return new Lc(ge(ke({},a),{below:wt(a.args[0]),body:y,skipBoundary:!1,boxType:Ts(y)}))},serialize:(a,y)=>yi(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Ht("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=wt(a.args[2]);return new Lc(ge(ke({},a),{above:wt(a.args[0]),below:wt(a.args[1]),body:y,skipBoundary:!1,boxType:Ts(y)}))},serialize:(a,y)=>yi(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Ht(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Lc(ge(ke({},a),{body:wt(a.args[2]),above:wt(a.args[1]),below:wt(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>yi(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Ht("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new of(ge(ke({},a),{body:wt(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}))}}),Ht(["vphantom"],"{:auto}",{createAtom:a=>new of(ge(ke({},a),{body:wt(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Ht(["hphantom"],"{:auto}",{createAtom:a=>new of(ge(ke({},a),{body:wt(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Ht(["phantom"],"{:auto}",{createAtom:a=>new of(ge(ke({},a),{body:wt(a.args[0]),isInvisible:!0}))}),Ht("not","{:math}",{createAtom:a=>{const y=wt(a.args[0]);return y.length===0?new pr(ge(ke({},a),{type:"mrel",value:"\uE020"})):new pr(ge(ke({},a),{body:[new dd(ge(ke({},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":Ts(wt(a.args[0])),ee=pr.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Ht(["ne","neq"],"",{createAtom:a=>new pr(ge(ke({},a),{type:"mrel",body:[new dd(ge(ke({},a),{body:"\uE020",align:"right",boxType:"rel"})),new pr(ge(ke({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Ht("rlap","{:auto}",{createAtom:a=>new dd(ge(ke({},a),{body:wt(a.args[0]),align:"right"}))}),Ht("llap","{:auto}",{createAtom:a=>new dd(ge(ke({},a),{body:wt(a.args[0]),align:"left"}))}),Ht("mathrlap","{:math}",{createAtom:a=>new dd(ge(ke({},a),{body:wt(a.args[0]),align:"left"}))}),Ht("mathllap","{:math}",{createAtom:a=>new dd(ge(ke({},a),{body:wt(a.args[0]),align:"left"}))}),Ht("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new el(ge(ke({},a),{body:wt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return yi("\\raisebox",(b=hs(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Ht("raise","{:value}{:auto}",{createAtom:a=>{var y;return new el(ge(ke({},a),{body:wt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return yi("\\raise",(b=hs(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Ht("lower","{:value}{:auto}",{createAtom:a=>{var y;return new el(ge(ke({},a),{body:wt(a.args[1]),padding:{dimension:0},offset:(y=sl(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return yi("\\lower",(E=hs(sl((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Be("0123456789/@.?!"),ft(65,90),ft(97,122),Be([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Be([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Be([["\\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]]),Be([["\\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"),Be([["\\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"]]),Be([["\\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"]]),Be([["\\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"),Be([["+",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"),Be([["\\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"),Be([["\\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]]),Be([["=",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"),Be([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Be([["\\wp",8472],["\\aleph",8501]]),Be([["\\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"),Be([["\\ ",160],["~",160]],"space"),Ht(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new sf(a)}),Ht("space","",{createAtom:a=>new sf(a)}),Be([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Be([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Be([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var l0="<mo>⁡</mo>",oh="<mo>⁢</mo>";function sh(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ys(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Ev(a,y,b){var E,ee,re,oe,me,xe,Me,De,Ye,bt,$t;let jt=!1;y=y!=null?y:a.atoms.length;let sr="",Gr="",er=a.atoms[a.index];const Tr=(ee=(E=er.style)==null?void 0:E.variant)!=null?ee:"",ti=(oe=(re=er.style)==null?void 0:re.variantStyle)!=null?oe:"";let Nr="";if(Tr||ti){const va=In(er.value,(me=er.style)==null?void 0:me.variant,(xe=er.style)==null?void 0:xe.variantStyle);if(va!==er.value)return a.index+=1,sr=`<mi${ys(er.id,b)}>${va}</mi>`,wu(sr,a,b)||(a.mathML+=sr,a.lastType="mi"),!0;Nr=(Me={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"}[ti+Tr])!=null?Me:"",Nr=` mathvariant="${Nr}"`}const Zi={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(er.command==="!")return a.index+=1,sr="<mo>!</mo>",wu(sr,a,b)||(a.mathML+=sr,a.lastType="mo"),!0;if(Zi[er.command]){a.index+=1;let va=`<mi${ys(er.id,b)}${Nr}>${Zi[er.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(va=oh+va),wu(va,a,b)||(a.mathML+=va,a.lastType="mi"),!0}if(er.command==="\\operatorname")Gr=Vd(er.body),a.index+=1;else if(Tr||ti)for(;a.index<y&&(er.type==="mord"||er.type==="macro")&&!er.isDigit()&&Tr===((Ye=(De=er.style)==null?void 0:De.variant)!=null?Ye:"")&&ti===(($t=(bt=er.style)==null?void 0:bt.variantStyle)!=null?$t:"");)Gr+=Vd([er]),a.index+=1,er=a.atoms[a.index];else(er.type==="mord"||er.type==="macro")&&!er.isDigit()&&(Gr+=Vd([er]),a.index+=1);if(Gr.length>0){jt=!0,sr=`<mi${Nr}>${Gr}</mi>`;const va=a.lastType;sr.endsWith(">f</mi>")||sr.endsWith(">g</mi>")?(sr+=l0,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(sr)?"mo":"mi",wu(sr,a,b)||((va==="mi"||va==="mn"||va==="mtext"||va==="fence")&&(sr=oh+sr),a.mathML+=sr)}return jt}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 wu(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=Qo(ee.superscript,b);y.lastType="";const me=Qo(ee.subscript,b);if(y.lastType=re,!oe&&!me)return!1;let xe="";return oe&&me?xe=`<msubsup>${a}${me}${oe}</msubsup>`:oe?xe=`<msup>${a}${oe}</msup>`:me&&(xe=`<msub>${a}${me}</msub>`),y.mathML+=xe,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 ${ys(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"+ys(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Mv(a)&&(re=a.index,a.index+=1),wu(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Tv(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,me=0;const xe=a.index;let Me=-1,De=xe+1;for(;De<y&&!oe;)a.atoms[De].type==="mopen"?me+=1:a.atoms[De].type==="mclose"&&(me-=1),me===-1&&(oe=!0,Me=De),De+=1;oe&&(ee="<mrow>",ee+=wd(a.atoms[xe],b),ee+=Qo(a.atoms,b,xe+1,Me),ee+=wd(a.atoms[Me],b),ee+="</mrow>",a.index=Me+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=oh),wu(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 me={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\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(me[oe.command]){a.index+=1;const xe=`<mo${ys(oe.id,b)}>${me[oe.command]}</mo>`;return wu(xe,a,b)||(a.mathML+=xe,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 xe=wd(oe,b);return oe.superscript&&oe.subscript?(ee+="<munderover>"+xe,ee+=Qo(oe.subscript,b),ee+=Qo(oe.superscript,b),ee+="</munderover>"):oe.superscript?(ee+="<mover>"+xe,ee+=Qo(oe.superscript,b),ee+="</mover>"):oe.subscript&&(ee+="<munder>"+xe,ee+=Qo(oe.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const xe=a.atoms[a.index],Me=xe.value==="\\operatorname",De=Me?'<mi class="MathML-Unit"'+ys(xe.id,b)+">"+Vd(xe.value)+"</mi>":wd(xe,b);ee+=De,!Me&&!/^<mo>(.*)<\/mo>$/.test(De)?(ee+=l0,re="applyfunction"):re=Me?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=oh+ee),a.index+=1}return ee.length>0&&(E=!0,wu(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Qo(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)||Tv(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>⁤</mo>"+oe),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,wu(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 wd(a,y){let b="";const E=Vd(a.value);return E&&(b="<mo"+ys(a.id,y)+">"+E+"</mo>"),b}function Vd(a){if(!a)return"";if(typeof a=="string")return sh(a);if(!Array.isArray(a)&&typeof a.body=="string")return sh(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return sh(y)}function Wh(a,y){var b,E,ee,re,oe,me,xe,Me,De,Ye,bt,$t,jt,sr,Gr,er,Tr,ti,Nr,Zi,va,oa;if(a.mode==="text")return`<mi${ys(a.id,y)}>${a.value}</mi>`;const Fo={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"},ps={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let di="",bc="",nu,Ac,Il,xc,sc,bs;const{command:nl}=a;if(a.command==="\\error")return`<merror${ys(a.id,y)}>${Qo(a.body,y)}</merror>`;const Dl={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},ru={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":di=Qo(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(di+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(di+="<mo>"+(Dl[a.leftDelim]||a.leftDelim)+"</mo>")),di+="<mtable",a.colFormat){for(di+=' columnalign="',Il=0;Il<a.colFormat.length;Il++)a.colFormat[Il].align&&(di+={l:"left",c:"center",r:"right"}[a.colFormat[Il].align]+" ");di+='"'}for(di+=">",Ac=0;Ac<a.array.length;Ac++){for(di+="<mtr>",nu=0;nu<a.array[Ac].length;nu++)di+="<mtd>"+Qo(a.array[Ac][nu],y)+"</mtd>";di+="</mtr>"}di+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(di+="<mo>"+(Dl[a.leftDelim]||a.rightDelim)+"</mo>"),di+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(di+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(di+="<mo"+ys(a.id,y)+">"+(Dl[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(di+="<mfrac>",di+=Qo(a.above,y)||"<mi> </mi>",di+=Qo(a.below,y)||"<mi> </mi>",di+="</mfrac>"):(di+="<mtable"+ys(a.id,y)+">",di+="<mtr>"+Qo(a.above,y)+"</mtr>",di+="<mtr>"+Qo(a.below,y)+"</mtr>",di+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(di+="<mo"+ys(a.id,y)+">"+(Dl[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(di+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(di+="<msqrt"+ys(a.id,y)+">",di+=Qo(a.body,y),di+="</msqrt>"):(di+="<mroot"+ys(a.id,y)+">",di+=Qo(a.body,y),di+=Qo(a.above,y),di+="</mroot>");break;case"leftright":const iu=a,au=iu.leftDelim;di="<mrow>",au&&au!=="."&&(di+=`<mo${ys(a.id,y)}>${(b=Dl[au])!=null?b:au}</mo>`),a.body&&(di+=Qo(a.body,y));const ou=iu.matchingRightDelim();ou&&ou!=="."&&(di+=`<mo${ys(a.id,y)}>${(E=Dl[ou])!=null?E:ou}</mo>`),di+="</mrow>";break;case"sizeddelim":case"delim":di+=`<mo${ys(a.id,y)}>${Dl[a.value]||a.value}</mo>`;break;case"accent":di+='<mover accent="true"'+ys(a.id,y)+">",di+=Qo(a.body,y),di+="<mo>"+(ru[nl]||a.accent)+"</mo>",di+="</mover>";break;case"line":case"overlap":break;case"overunder":sc=a.above,xc=a.below,(a.svgAbove||sc)&&(a.svgBelow||xc)?bs=a.body:sc&&sc.length>0?(bs=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(xc=a.body[0].below,bs=a.body[0].body):((me=(oe=a.body)==null?void 0:oe[0])==null?void 0:me.type)==="first"&&((Me=(xe=a.body)==null?void 0:xe[1])!=null&&Me.below)&&(xc=a.body[1].below,bs=a.body[1].body)):xc&&xc.length>0&&(bs=a.body,(Ye=(De=a.body)==null?void 0:De[0])!=null&&Ye.above?(sc=a.body[0].above,bs=a.body[0].body):(($t=(bt=a.body)==null?void 0:bt[0])==null?void 0:$t.type)==="first"&&((sr=(jt=a.body)==null?void 0:jt[1])!=null&&sr.above)&&(sc=a.body[1].overscript,bs=a.body[1].body)),(a.svgAbove||sc)&&(a.svgBelow||xc)?(di+=`<munderover ${ys(a.id,y)}>`,di+=(Gr=Fo[a.svgBody])!=null?Gr:Qo(bs,y),di+=(er=Fo[a.svgBelow])!=null?er:Qo(xc,y),di+=(Tr=Fo[a.svgAbove])!=null?Tr:Qo(sc,y),di+="</munderover>"):a.svgAbove||sc?(di+=`<mover ${ys(a.id,y)}>`+((ti=Fo[a.svgBody])!=null?ti:Qo(bs,y)),di+=(Nr=Fo[a.svgAbove])!=null?Nr:Qo(sc,y),di+="</mover>"):(a.svgBelow||xc)&&(di+=`<munder ${ys(a.id,y)}>`+((Zi=Fo[a.svgBody])!=null?Zi:Qo(bs,y)),di+=(va=Fo[a.svgBelow])!=null?va:Qo(xc,y),di+="</munder>");break;case"placeholder":di+="?";break;case"mord":{di=typeof a.value=="string"?a.value:nl,nl==="\\char"?di="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":di.length>0&&di.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?di="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?di=a.value.charAt(0):(console.error("Did not expect this"),di=""));const Hc=/\d/.test(di)?"mn":"mi";di=`<${Hc}${ys(a.id,y)}>${sh(di)}</${Hc}>`;break}case"mbin":case"mrel":case"minner":di=wd(a,y);break;case"mpunct":di='<mo separator="true"'+ys(a.id,y)+">"+nl+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(di="<mo"+ys(a.id,y)+">",di+=nl==="\\operatorname"?a.body:nl||a.body,di+="</mo>");break;case"box":di='<menclose notation="box"',a.backgroundcolor&&(di+=' mathbackground="'+a.backgroundcolor+'"'),di+=ys(a.id,y)+">"+Qo(a.body,y)+"</menclose>";break;case"spacing":di+='<mspace width="'+((oa=ps[nl])!=null?oa:0)+'em"/>';break;case"enclose":di='<menclose notation="';for(const Hc in a.notation)Object.prototype.hasOwnProperty.call(a.notation,Hc)&&a.notation[Hc]&&(di+=bc+Hc,bc=" ");di+=ys(a.id,y)+'">'+Qo(a.body,y)+"</menclose>";break;case"prompt":di='<menclose notation="roundexbox""">'+Qo(a.body,y)+"</menclose>";break;case"space":di+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":di+=wd(a,y);break;case"mclose":di+=wd(a,y);break;case"macro":{const Hc=a.command+Vd(a.macroArgs);Hc&&(di+=`<mo ${ys(a.id,y)}>${Hc}</mo>`)}break;case"latexgroup":di+=Qo(a.body,y);break;case"latex":di+="<mtext"+ys(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":di+=Qo(a.body,y);break;case"text":di+=`<mtext ${ys(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${ys(a.id,y)} displaystyle="true">${Qo(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${ys(a.id,y)} displaystyle="false">${Qo(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return di}var Gd={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Zh={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function wf(a){let y=0;if(ze(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(ze(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function c0(a){let y="";if(ze(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 Po(a,y){var b,E,ee,re,oe;function me(De){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(De)?` <say-as interpret-as="character">${De}</say-as>`:/[A-Z]/.test(De)?`capital <say-as interpret-as="character">${De.toLowerCase()}</say-as>`:De:/[a-z]/.test(De)?" '"+De.toUpperCase()+"'":/[A-Z]/.test(De)?" 'capital "+De.toUpperCase()+"'":De}function xe(De){return"<emphasis>"+De+"</emphasis>"}if(!y)return"";let Me="";if(ze(y)){let De=!1,Ye=!1;for(let bt=0;bt<y.length;bt++)y[bt].type!=="first"&&(y[bt].mode!=="text"&&(Ye=!1),bt<y.length-2&&y[bt].type==="mopen"&&y[bt+2].type==="mclose"&&y[bt+1].type==="mord"?(Me+=" of ",Me+=xe(Po(a,y[bt+1])),bt+=2):y[bt].mode==="text"?Ye?Me+=(b=y[bt].value)!=null?b:" ":(Ye=!0,Me+=Po("text",y[bt])):y[bt].isDigit()?De?Me+=y[bt].asDigit():(De=!0,Me+=Po(a,y[bt])):(De=!1,Me+=Po(a,y[bt])))}else if(y.mode==="text")y.id&&a==="math"&&(Me+='<mark name="'+y.id.toString()+'"/>'),Me+=y.value;else{y.id&&a==="math"&&(Me+='<mark name="'+y.id.toString()+'"/>');let De="",Ye="",bt="",$t=!1;const{command:jt}=y;switch(jt){case"\\vec":return"vector "+Po(a,y.body);case"\\acute":return Po(a,y.body)+" acute";case"\\grave":return Po(a,y.body)+" grave";case"\\dot":return"dot over"+Po(a,y.body);case"\\ddot":return"double dot over"+Po(a,y.body);case"\\mathring":return"ring over"+Po(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Po(a,y.body);case"\\bar":return Po(a,y.body)+" bar";case"\\breve":return Po(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Po(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Po(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Po(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Po(a,y.body)}switch(y.type){case"prompt":const sr=y.body.length>1?'start input . <break time="500ms"/> '+Po(a,y.body)+'. <break time="500ms"/> end input':"blank";Me+=' <break time="300ms"/> '+sr+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const Gr=y.array,er=y.environmentName;if(Object.keys(Zh).includes(er)){Me+=` begin ${Zh[er]} `;for(let Nr=0;Nr<Gr.length;Nr++){Nr>0&&(Me+=","),Me+=` row ${Nr+1} `;for(let Zi=0;Zi<Gr[Nr].length;Zi++)Zi>0&&(Me+=","),Me+=` column ${Zi+1}: `,Me+=Po("math",Gr[Nr][Zi])}Me+=` end ${Zh[er]} `}break;case"group":jt==="\\ne"?Me+=" not equal ":(jt==="\\not"&&(Me+=" not "),Me+=Po("math",y.body));break;case"root":Me+=Po("math",y.body);break;case"genfrac":if(De=Po("math",y.above),Ye=Po("math",y.below),wf(y.above)&&wf(y.below)){const Zi={"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 "}[c0(y.above)+"/"+c0(y.below)];Zi?Me=Zi:Me+=De+" over "+Ye}else Me+=' the fraction <break time="150ms"/>'+De+' over <break time="150ms"/>'+Ye+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(bt=Po("math",y.body),y.hasEmptyBranch("above"))Me+=wf(y.body)?" the square root of "+bt+" , ":' the square root of <break time="200ms"/>'+bt+'. <break time="200ms"/> End square root';else{let Nr=Po("math",y.above);Nr=Nr.trim();const Zi=Nr.replace(/<mark([^/]*)\/>/g,"");Zi==="3"?Me+=' the cube root of <break time="200ms"/>'+bt+'. <break time="200ms"/> End cube root':Zi==="n"?Me+=' the nth root of <break time="200ms"/>'+bt+'. <break time="200ms"/> End root':Me+=' the root with index: <break time="200ms"/>'+Nr+', of <break time="200ms"/>'+bt+'. <break time="200ms"/> End root'}break;case"leftright":{const Nr=y;Me+=(ee=Nr.leftDelim?Gd[Nr.leftDelim]:void 0)!=null?ee:Nr.leftDelim,Me+=Po("math",y.body),Me+=(re=Nr.rightDelim?Gd[Nr.rightDelim]:void 0)!=null?re:Nr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const Tr=jt.replace(/^\\/g,""),ti=Tt()[Tr];ti&&(ti!=null&&ti.expand?Me+=Po("math",y.body):Me+=`${Tr} `);break;case"placeholder":Me+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(jt==="\\mathbin"||jt==="\\mathrel"||jt==="\\mathopen"||jt==="\\mathclose"||jt==="\\mathpunct"||jt==="\\mathord"||jt==="\\mathinner"){Me=Po(a,y.body);break}let Nr=y.isDigit()?y.asDigit():y.value,Zi=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(Zi=y.value,Nr=Zi),a==="text")Me+=Nr;else{if(y.type==="mbin"&&(Me+='<break time="150ms"/>'),Nr){const va=Gd[Nr]||(Zi?Gd[Zi.trim()]:"");if(va)Me+=" "+va;else{const oa=Zi?Iv(Zi.trim()):"";Me+=oa||me(Nr)}}else Me+=Po("math",y.body);y.type==="mbin"&&(Me+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const Nr=y.command;if(Nr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zi=Po("math",y.superscript);Zi=Zi.trim();let va=Po("math",y.subscript);va=va.trim(),Me+=' the summation from <break time="200ms"/>'+va+'<break time="200ms"/> to <break time="200ms"/>'+Zi+'<break time="200ms"/> of <break time="150ms"/>',$t=!0}else if(y.hasEmptyBranch("subscript"))Me+=" the summation of";else{let Zi=Po("math",y.subscript);Zi=Zi.trim(),Me+=' the summation from <break time="200ms"/>'+Zi+'<break time="200ms"/> of <break time="150ms"/>',$t=!0}else if(Nr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zi=Po("math",y.superscript);Zi=Zi.trim();let va=Po("math",y.subscript);va=va.trim(),Me+=' the product from <break time="200ms"/>'+va+'<break time="200ms"/> to <break time="200ms"/>'+Zi+'<break time="200ms"/> of <break time="150ms"/>',$t=!0}else if(y.hasEmptyBranch("subscript"))Me+=" the product of ";else{let Zi=Po("math",y.subscript);Zi=Zi.trim(),Me+=' the product from <break time="200ms"/>'+Zi+'<break time="200ms"/> of <break time="150ms"/>',$t=!0}else if(Nr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let Zi=Po("math",y.superscript);Zi=Zi.trim();let va=Po("math",y.subscript);va=va.trim(),Me+=' the integral from <break time="200ms"/>'+xe(va)+'<break time="200ms"/> to <break time="200ms"/>'+xe(Zi)+' <break time="200ms"/> of ',$t=!0}else Me+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const Zi=(oe=Gd[y.value])!=null?oe:y.command?Gd[y.command]:void 0;Me+=Zi||" "+y.value}else y.command&&(y.command==="\\mathop"?Me+=Po("math",y.body):y.command==="\\operatorname"?Me+=Pv(y.body):Me+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":bt=Po("math",y.body),Me+=" crossed out "+bt+". End crossed out.";break;case"space":case"spacing":break}if(!$t&&!y.hasEmptyBranch("superscript")){let sr=Po(a,y.superscript);sr=sr.trim();const Gr=sr.replace(/<[^>]*>/g,"");if(wf(y.superscript)){if(a==="math"){const er=Dv(y.superscript);er&&(Me+='<mark name="'+er+'"/>')}Gr==="\u2032"?Me+=" prime ":Gr==="2"?Me+=" squared ":Gr==="3"?Me+=" cubed ":Number.isNaN(Number.parseInt(Gr))?Me+=" to the "+sr+"; ":Me+=' to the <say-as interpret-as="ordinal">'+Gr+"</say-as> power; "}else Number.isNaN(Number.parseInt(Gr))?Me+=" raised to the "+sr+"; ":Me+=' raised to the <say-as interpret-as="ordinal">'+Gr+"</say-as> power; "}if(!$t&&!y.hasEmptyBranch("subscript")){let sr=Po("math",y.subscript);sr=sr.trim(),Me+=wf(y.subscript)?" sub "+sr:" subscript "+sr+". End subscript. "}}return Me}function Xd(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Qo(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=ge(ke({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=ge(ke({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=ge(ke({},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(me){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",me)}return oe}return""}let E=Po("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"&&be()==="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 Cf={"\\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"},Ef={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Ov(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function tl(a){var y,b,E,ee,re,oe,me,xe,Me,De,Ye,bt,$t;if(!a)return"";if(ze(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(tl).join("");if(a[0].mode==="text"){let ti=0,Nr="";for(;((y=a[ti])==null?void 0:y.mode)==="text";)Nr+=a[ti].body?tl(a[ti].body):a[ti].value,ti++;return`"${Nr}" ${tl(a.slice(ti))}`}let er=0;const Tr=[];for(;a[er]&&a[er].mode==="math";){let ti="";for(;a[er]&&a[er].type==="mord"&&/\d/.test(a[er].value);)ti+=a[er++].value;ti?Tr.push(ti):Tr.push(tl(a[er++]))}return Tr.push(tl(a.slice(er))),Ov(Tr)}if(a.mode==="text")return`"${a.value}"`;let jt="";const{command:sr}=a;let Gr;if(sr==="\\placeholder")return`(${tl(a.body)})`;switch(a.type){case"accent":const er={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[sr];jt=`${er!=null?er:""} ${tl(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(oa=>oa.value).join("");case"group":case"root":jt=(b=Cf[sr])!=null?b:tl(a.body);break;case"genfrac":{const oa=a;(oa.leftDelim||oa.rightDelim)&&(jt=oa.leftDelim==="."||!oa.leftDelim?"{:":oa.leftDelim),oa.hasBarLine?(jt+="(",jt+=tl(oa.above),jt+=")/(",jt+=tl(oa.below),jt+=")"):(jt+="("+tl(oa.above)+"),",jt+="("+tl(oa.below)+")"),(oa.leftDelim||oa.rightDelim)&&(jt+=oa.rightDelim==="."||!oa.rightDelim?"{:":oa.rightDelim)}break;case"surd":jt+=a.hasEmptyBranch("above")?"sqrt("+tl(a.body)+")":"root("+tl(a.above)+")("+tl(a.body)+")";break;case"latex":jt=a.value;break;case"leftright":{const oa=a,Fo=oa.leftDelim;jt+=Fo==="."||!Fo?"{:":Fo,jt+=tl(oa.body);const ps=oa.matchingRightDelim();jt+=ps==="."||!ps?":}":ps}break;case"sizeddelim":case"delim":jt=a.value;break;case"overlap":break;case"overunder":break;case"mord":jt=(ee=(E=Cf[sr])!=null?E:sr)!=null?ee:typeof a.value=="string"?a.value:"",jt.startsWith("\\")&&(jt+=" "),Gr=sr?sr.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Gr?jt=String.fromCodePoint(Number.parseInt("0x"+Gr[1])):jt.length>0&&jt.startsWith("\\")&&(jt=typeof a.value=="string"?a.value.charAt(0):a.command),jt=Nv(jt,a.style);break;case"mbin":case"mrel":case"minner":jt=(oe=(re=Cf[sr])!=null?re:Ef[sr])!=null?oe:a.value;break;case"mopen":case"mclose":jt=a.value;break;case"mpunct":jt=(me=Ef[sr])!=null?me:sr;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Ef[sr]?jt=Ef[sr]:jt=sr==="\\operatorname"?tl(a.body):(xe=a.value)!=null?xe:sr,jt+=" ");break;case"array":const Tr=a.array,ti=a.environmentName,Nr=(Me={bmatrix:["[","]"],"bmatrix*":["[","]"]}[ti])!=null?Me:["(",")"],Zi=[];for(const oa of Tr){const Fo=[];for(const ps of oa)Fo.push(Nr[0]+tl(ps)+Nr[1]);Zi.push(Fo.join(","))}const va=(De={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[ti])!=null?De:["(",")"];jt=va[0]+Zi.join(",")+va[1];break;case"box":break;case"spacing":jt=(Ye=Cf[sr])!=null?Ye:" ";break;case"enclose":jt="("+tl(a.body)+")";break;case"space":jt=" ";break;case"subsup":jt="";break;case"macro":jt=($t=(bt=Cf[sr])!=null?bt:Ef[sr])!=null?$t:tl(a.body);break}if(!a.hasEmptyBranch("subscript")){jt+="_";const er=tl(a.subscript);jt+=er.length!==1?`(${er})`:er}if(!a.hasEmptyBranch("superscript")){jt+="^";const er=tl(a.superscript);jt+=er.length!==1?`(${er})`:er}return jt}function Nv(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function Al(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new ta({from:ge(ke({},fo()),{renderPlaceholder:()=>new Ir(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?(Cs(lf(oe,ee)),fl(oe,{classes:"ML__latex"}).toMarkup()):""}function _y(a){return tp(a,{context:fo()})}function Rv(a,y={}){return Qo(Tl(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function $v(a){const y=Tl(a,{parseMode:"math",mathstyle:"displaystyle"});return Xd(y)}var lh;function Bv(a){var y,b;if(!lh){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;E?lh=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=lh==null?void 0:lh.box(a).latex)!=null?b:""}function Ly(a,y="math"){return tl(new pr({type:"root",body:Tl(a,{parseMode:y})}))}function Ty(a){return Vc(a,{format:"ascii-math"})[1]}function jh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?u0(a):a}function Yd(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,me={L:y,C:ee,H:oe};return a.alpha!==void 0&&(me.alpha=a.alpha),me}function Vh(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),re=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),oe=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),me=4.076741661347994*ee-3.307711590408193*re+.230969928729428*oe,xe=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*oe,Me=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*oe,De=Ye=>{const bt=Math.abs(Ye);return bt<=.0031308?Ye*12.92:(Math.sign(Ye)||1)*(1.055*Math.pow(bt,1/2.4)-.055)};return[De(me),De(xe),De(Me)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=Yd(b*255),E=Yd(E*255),ee=Yd(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function u0(a){let[y,b,E]=Vh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Vh(Uh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,oe=a.L,me=(re+oe)/2;ee.C=me;const xe=.36/Math.pow(2,12);for(;oe-re>xe;)me=(re+oe)/2,ee.C=me,[y,b,E]=Vh(Uh(ee)),Gh([y,b,E])?re=me:oe=me;return Xh([y,b,E],a.alpha)}function Kv(a){return u0(Uh(a))}function d0(a,y){const b=jh(a),E=jh(y),ee=.56,re=.57,oe=.62,me=.65,xe=.022,Me=1.414,De=.1,Ye=5e-4,bt=1.14,$t=.027,jt=1.14,sr=.027;function Gr(oa){return oa>=xe?oa:oa+su(xe-oa,Me)}function er(oa){return(oa<0?-1:1)*Math.pow(Math.abs(oa),2.4)}const Tr=Gr(er(E.r/255)*.2126729+er(E.g/255)*.7151522+er(E.b/255)*.072175),ti=Gr(er(b.r/255)*.2126729+er(b.g/255)*.7151522+er(b.b/255)*.072175);let Nr,Zi,va;return Math.abs(ti-Tr)<Ye?Zi=0:ti>Tr?(Nr=su(ti,ee)-su(Tr,re),Zi=Nr*bt):(Nr=su(ti,me)-su(Tr,oe),Zi=Nr*jt),Math.abs(Zi)<De?va=0:Zi>0?va=Zi-sr:va=Zi+$t,va*100}function f0(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=d0(a,b),ee=d0(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=jh(a);let b=((1<<24)+(Yd(y.r)<<16)+(Yd(y.g)<<8)+Yd(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 Is(a){const y=h0(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function h0(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=h0(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Zv(a,y){return Is(a).length>0}function jv(a){return[Yh(a,"double-struck","mathbb","tooltip.blackboard"),Yh(a,"fraktur","mathfrak","tooltip.fraktur"),Yh(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:()=>Al(`\\vec{${Is(a)}}`),visible:()=>Is(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Al(`\\overrightarrow{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Al(`\\overleftarrow{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Al(`\\dot{${Is(a)}}`),visible:()=>Is(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Al(`\\ddot{${Is(a)}}`),visible:()=>Is(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Al(`\\bar{${Is(a)}}`),visible:()=>Is(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Al(`\\overline{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Al(`\\overgroup{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Al(`\\overbrace{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Al(`\\underline{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Al(`\\undergroup{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Al(`\\underbrace{${Is(a)}}`),visible:()=>Is(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vv(a){return[{label:()=>Al(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Al(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Al(`\\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(He))y.push({class:(Hv(f0(He[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${He[b]} "></span>`,ariaLabel:()=>{var E;return(E=ot(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}function Xv(a){const y=[];for(const b of Object.keys(Ue))y.push({class:(f0(Ue[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ue[b]} "></span>`,ariaLabel:()=>{var E;return(E=ot(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var Yv=class extends e0{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 Yv(ee,re,b,E),label:"\u2610",tooltip:()=>ot("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:()=>ot("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Cd(a)},{label:()=>ot("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Cd(a)},{label:()=>ot("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Cd(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=ey(a);return b<y.maxColumns}},{label:()=>ot("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Cd(a)},{type:"divider"},{label:()=>ot("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Cd(a)},{label:()=>ot("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Cd(a)},{type:"divider"},{label:()=>ot("menu.borders"),visible:()=>(qv(a)||Cd(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>Mf(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>Mf(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>Mf(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>Mf(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>Mf(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ot("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:Jv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ot("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ot("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Fd(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ot("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Fd(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ot("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ot("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>ot("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ot("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ot("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Uv(a),submenuClass:"variant-submenu"},{label:()=>ot("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&Is(a).length>0,submenu:Vv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ot("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=ty(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:()=>ot("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?ot("menu.solve-for",Al(b)):ot("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:()=>ot("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ot("menu.copy"),id:"copy",submenu:[{label:()=>ot("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>$a.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ot("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>$a.copyToClipboard(a,"ascii-math")},{label:()=>ot("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>$a.copyToClipboard(a,"math-ml")}]},{label:()=>ot("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ot("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Cd(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function qv(a){return a.model.at(a.model.position).type==="array"}function ey(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 Mf(a,y){Nf(a),a.flushInlineShortcutBuffer(),Dp(a.model,y),Ys(a)}function ty(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yh(a,y,b,E){return{label:()=>Al(`\\${b}{${Is(a)}}`),tooltip:()=>{var ee;return(ee=ot(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:()=>Al(`\\${b}{${Is(a)}}`),tooltip:()=>{var ee;return(ee=ot(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 Jd(a,y){return a+Xd(y)}dc({speak:(a,y,b)=>ny(a,y,b)},{target:"mathfield"});function ny(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function oe(De){let Ye=null;switch(De){case"all":Ye=re.root;break;case"selection":Ye=re.getAtoms(re.selection);break;case"left":{Ye=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{Ye=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":Ye=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:bt}=re.at(re.position);bt!=null&&bt.parent?Ye=bt:Ye=re.root;break}default:Ye=re.root}return Ye}function me(De){let Ye="";switch(De){case"all":console.log("Internal failure: speak all failed");break;case"selection":Ye="no selection";break;case"left":Ye="at start";break;case"right":Ye="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Ye="no parent";break;default:console.log('unknown speak_ param value: "'+De+'"');break}return Ye}const xe=oe(y);if(xe===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,me(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const Me=Xd(xe);return dt()&&b.withHighlighting?(ju().readAloudMathfield=a,pd(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,Me)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(Me),!1}function ry(a){var y,b;if(!dt()){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 me=new Uint8Array(oe.AudioStream),xe=new Blob([me.buffer],{type:"audio/mpeg"}),Me=URL.createObjectURL(xe);new Audio(Me).play().catch(Ye=>console.log(Ye))}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 p0(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 iy(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Jd("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=ay(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+oy(a.model);else if(y==="replacement")ee=Jd("",a.model.at(a.model.position));else if(y==="line"){const re=Jd("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Jd(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function ay(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 ${p0(ee)};`,ee=ee.parent;return E}function oy(a){if(!a.selectionIsCollapsed)return Jd("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=p0(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Jd("",b),y}var sy=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=Ku(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 De=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(De))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(De-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(De-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(De+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(De+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=De,this._position=De,this._selection=re;return}const oe=Vs(re);re.direction==="backward"?[this._position,this._anchor]=oe:[this._anchor,this._position]=oe;const me=this.at(oe[0]+1),xe=this.at(oe[1]),Me=pr.commonAncestor(me,xe);(Me==null?void 0:Me.type)==="array"&&me.parent===Me&&xe.parent===Me?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 Nl&&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(Ou(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((Me,De)=>[...Me,...this.getAtoms(De,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,me=Math.max(ee,re);if(!E.includeChildren&&oe===1&&me===this.lastOffset)return[this.root];let xe=[];for(let Me=oe;Me<=me;Me++){const De=this.atoms[Me];m0(this,De,oe,me)&&xe.push(De)}return E.includeChildren||(xe=xe.filter(Me=>{let De=!1,{parent:Ye}=Me;for(;Ye&&!De;)De=m0(this,Ye,oe,me),Ye=Ye.parent;return!De})),xe}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 Qo(a);if(b==="spoken")return Xd(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Xd(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=Xd(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?tl(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):pu(a)?(E=[this.normalizeRange(a)],ee=y):Ou(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 Aa(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)&&iy(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 me=this.root.changeCounter!==oe,xe=E!==this._anchor||ee!==this._position||hu(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&me&&this.contentDidChange({inputType:a.type}),a.selection&&xe&&this.selectionDidChange(),me||xe}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(pu(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 Ou(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(qc(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(ke({},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(qc(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function m0(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 kf(a,y,b,E){var ee,re,oe,me,xe,Me;const De=b.parent;if(De&&b instanceof Jo){const Ye=!E&&y==="forward"||E==="body"&&y==="backward";let bt=Ye?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Ye?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(De.addChildrenAfter(b.removeBranch("body"),b),De.removeChild(b),bt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(De.addChildrenAfter(b.removeBranch("body"),b),De.removeChild(b),bt--),a.position=bt,!0}if(De&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Ye=b.leftSibling;b.hasChildren&&De.addChildrenAfter(b.removeBranch("body"),b),De.removeChild(b),a.position=a.offsetOf(Ye)}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),De.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(De&&(b.type==="box"||b.type==="enclose")){const Ye=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return De.addChildrenAfter(b.removeBranch("body"),b),De.removeChild(b),a.position=a.offsetOf(Ye),!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 Ye=_f.fractionNavigationOrder==="numerator-denominator"?"above":"below",bt=Ye==="above"?"below":"above";if(De&&(y==="forward"&&E===Ye||y==="backward"&&E===bt)){const $t=b.removeBranch(Ye),jt=b.removeBranch(bt);return De.addChildrenAfter([...$t,...jt],b),De.removeChild(b),a.position=a.offsetOf($t.length>0?$t[$t.length-1]:jt[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 Ye=y==="forward"?(oe=(ee=b.superscript)==null?void 0:ee[0])!=null?oe:(re=b.subscript)==null?void 0:re[0]:(Me=(me=b.subscript)==null?void 0:me[0].lastSibling)!=null?Me:(xe=b.superscript)==null?void 0:xe[0].lastSibling;return Ye&&(a.position=a.offsetOf(Ye)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Ye=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Ye,!0}if(E==="superscript")if(y==="backward"){const Ye=a.offsetOf(b.firstChild)-1;console.assert(Ye>=0),a.position=Ye}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 Ye=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Ye}return!0}if((De==null?void 0:De.type)==="genfrac"&&!E&&b.type!=="first"){let Ye=a.offsetOf(b.leftSibling);return De.removeChild(b),De.hasEmptyBranch("above")&&De.hasEmptyBranch("below")?(Ye=a.offsetOf(De.leftSibling),De.parent.removeChild(De),a.announce("delete",void 0,[De]),a.position=Ye,!0):(a.announce("delete",void 0,[b]),a.position=Ye,!0)}if(y==="backward"&&((De==null?void 0:De.command)==="\\ln"||(De==null?void 0:De.command)==="\\log")&&b.parentBranch!=="body"){const Ye=a.offsetOf(De.leftSibling);return De.parent.removeChild(De),a.announce("delete",void 0,[De]),a.position=Ye,!0}return!1}function ly(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&&kf(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(kf(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])}}):tu(a,Vs(a.selection),"deleteContentBackward")}function cy(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&&kf(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&kf(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&kf(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])}):tu(a,Vs(a.selection),"deleteContentForward")}function tu(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 me=E[E.length-1];if(oe===ee&&me===re){const xe=E[0].parent;xe.parent&&xe.type!=="prompt"&&(y=[a.offsetOf(xe.leftSibling),a.offsetOf(xe)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const xe=E[0].parent,Me=E[0].parentBranch==="below"?"above":"below",De=a.offsetOf(xe.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Ye,bt;const $t=xe.removeBranch(Me);if($t.length===1&&$t[0].type==="placeholder")(bt=xe.parent)==null||bt.removeChild(xe),a.position=Math.max(0,De);else{const jt=xe.parent.addChildrenAfter($t,xe);(Ye=xe.parent)==null||Ye.removeChild(xe),a.position=a.offsetOf(jt)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}dc({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&tu(a,[0,-1],"deleteContent"),deleteForward:a=>cy(a),deleteBackward:a=>ly(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&tu(a,[a.anchor,_h(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&tu(a,[a.anchor,_h(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&tu(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&tu(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&tu(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&tu(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var uy=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ot("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>`,dy=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${ot("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>`,fy=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=ke(ge(ke({},Uf()),{macros:Tt(),registers:Ec()}),jf(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 me=Tp(this.options),xe=new pr({type:"root",mode:me,body:Tl(oe,{context:this.context})});this.model=new sy(this,me,xe),this.undoManager=new $g(this.model);const Me=[];if(Me.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>"),Me.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),Me.push("<span part=content class=ML__content>"),Me.push(Sp(this)),Me.push("</span>"),window.mathVirtualKeyboard&&(Me.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">`),Me.push(uy),Me.push("</div>")),Me.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),Me.push(dy),Me.push("</div>"),Me.push("</span>"),Me.push("<span class=ML__sr-only>"),Me.push("<span role=status aria-live=assertive aria-atomic=true></span>"),Me.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(Me.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",Ye=>Ye.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(qc(this)))},{signal:re}),this._menu=new wv(Qv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const De=this.element.querySelector("[part=menu-toggle]");De==null||De.addEventListener("pointerdown",Ye=>{if(Ye.currentTarget!==De||this._menu.state!=="closed")return;this.element.classList.add("tracking");const bt=De.getBoundingClientRect();this._menu.modifiers=hd(Ye),this._menu.show({target:De,location:{x:bt.left,y:bt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Ye.preventDefault(),Ye.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(De.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Hm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:re}),document.addEventListener("scroll",this,{signal:re}),this.resizeObserver=new ResizeObserver(()=>Ys(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),df&&!it.locale.startsWith(df.locale)&&Bm(it.locale),yc!=="ready"&&document.fonts.ready.then(()=>zf(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(qc(this)),ih(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:mc(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:ut(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:$e(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=ke({},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 xe of Object.keys(y)){const Me=this.queryStyle({[xe]:y[xe]});if(Me==="none")return"none";if(Me==="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 me=0;for(const xe of re){if(xe.type==="first"){oe-=1;continue}xe.style[E]===ee&&(me+=1)}return me===0?"none":me===oe?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=ff())!=null?a:Fm());return((y=ff())==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=ke(ke({},this.options),jf(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)&&$a.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)&&Ys(this)}getOptions(a){return gd(this.options,a)}getOption(a){return gd(this.options,a)}handleEvent(a){return Uu(this,null,function*(){var y;if(Yl(this)){if(Ch(a)){if(!as(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(Kd(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"&&Zp(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Zp(this,a),a.shiftKey===!1&&(yield i0(a,this.element.querySelector("[part=container]"),this._menu))&&eh.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield i0(a,this.element.querySelector("[part=container]"),this._menu))&&eh.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&ih(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Yl(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Yl(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Yl(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 Kd(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(qc(this))),!1):og(this,a)}get errors(){return tp(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=Ad(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();$a.insert(this.model,a,y)&&(Ys(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&&pd(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=mc(this.field);else{const E=$o(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&&qe()&&navigator.vibrate(wp),window.MathfieldElement.playSound("keypress")),a==="\\\\"?Ap(this.model):a==="&"?Ip(this.model):this.model.selectionIsCollapsed?$a.insert(this.model,a,ke({style:this.model.at(this.model.position).computedStyle},y)):$a.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Ys(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 me=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const xe=Tl(y,{context:this.context,parseMode:a});oe.collapseSelection("forward");const Me=oe.at(oe.position);oe.position=oe.offsetOf(Me.parent.addChildrenAfter(xe,Me)),me=!0}if(this.model.mode=a,a==="latex"){let xe=oe.selectionIsCollapsed;Fd(this,"accept");let Me,De=oe.at(oe.position);if(xe)Me="\\";else{const bt=Vs(oe.selection);Me=this.model.getValue(bt,"latex");const $t=this.model.extractAtoms(bt);$t.length===1&&$t[0].type==="placeholder"&&(Me=y,xe=!0),De=oe.at(bt[0])}const Ye=new af(Me);De.parent.addChildAfter(Ye,De),xe?oe.position=oe.offsetOf(Ye.lastChild):oe.setSelection(oe.offsetOf(Ye.firstChild),oe.offsetOf(Ye.lastChild))}else hf(oe).forEach(xe=>{xe.isError=!1});if(b){const xe=Tl(b,{context:this.context,parseMode:re});oe.collapseSelection("forward");const Me=oe.at(oe.position);oe.position=oe.offsetOf(Me.parent.addChildrenAfter(xe,Me)),me=!0}return Ys(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),me}),this.model.mode=a,window.mathVirtualKeyboard.update(qc(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};pu(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=ke(ke({},this.defaultStyle),re);return}const me=ke({},this.defaultStyle);for(const xe of Object.keys(re))me[xe]===re[xe]?(xe==="color"&&delete me.verbatimColor,xe==="backgroundColor"&&delete me.verbatimBackgroundColor,delete me[xe]):me[xe]=re[xe];this.defaultStyle=me;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const me of this.model.selection.ranges)Mh(this.model,me,re,{operation:oe});else Mh(this.model,ee.range,re,{operation:oe})}),Ys(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=mc(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Sf(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),Ys(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(ke({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),Ys(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),Ys(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(qc(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(qc(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(qc(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:Tp(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Fd(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(qc(this)),ih(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",ge(ke({},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(),pd(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="",zd(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})),Ys(this),this.focusBlurInProgress=!1,Bh();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Yl(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 Kp(this,a)}onCompositionStart(a){this.model.deleteAtoms(Vs(this.model.selection));const y=mc(this.field);y&&requestAnimationFrame(()=>{pd(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Ys(this)}onCompositionEnd(a){Tg(this.model),Ah(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),$a.onCopy(this,a),tu(this.model,Vs(this.model.selection),"deleteByCut"),this.snapshot("cut"),Ys(this))}onCopy(a){$a.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=$a.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),$f(this),ih(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=>Xr(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function g0(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)g0(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 hy(a,y){var b;if(!dt())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"]};ju().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 me=new TextDecoder("utf-8").decode(new Uint8Array(oe.AudioStream));ju().readAloudMarks=me.split(`
|
|
|
`).map(xe=>xe?JSON.parse(xe):{}),ju().readAloudTokens=[];for(const xe of ju().readAloudMarks)xe.value&&ju().readAloudTokens.push(xe.value);ju().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(xe,Me)=>{if(xe){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${xe}`);return}if(!(Me!=null&&Me.AudioStream))return;const De=new Uint8Array(Me.AudioStream),Ye=new Blob([De.buffer],{type:"audio/mpeg"}),bt=URL.createObjectURL(Ye),$t=ju();$t.readAloudAudio?$t.readAloudAudio.pause():($t.readAloudAudio=new Audio,$t.readAloudAudio.addEventListener("ended",()=>{const jt=$t.readAloudMathfield;$t.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),jt?(pd(jt),$t.readAloudElement=null,$t.readAloudMathfield=null,$t.readAloudTokens=[],$t.readAloudMarks=[],$t.readAloudCurrentMark=""):g0($t.readAloudElement)}),$t.readAloudAudio.addEventListener("timeupdate",()=>{let jt="";const sr=$t.readAloudAudio.currentTime*1e3+100;for(const Gr of $t.readAloudMarks)Gr.time<sr&&(jt=Gr.value);$t.readAloudCurrentMark!==jt&&($t.readAloudCurrentToken=jt,jt&&jt===$t.readAloudFinalToken?$t.readAloudAudio.pause():($t.readAloudCurrentMark=jt,qh($t.readAloudElement,$t.readAloudCurrentMark)))})),$t.readAloudAudio.src=bt,$t.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),$t.readAloudAudio.play()})})}dt()||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 Vo=new WeakMap,py=.5,Zu={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 = ..."},Rl=class Ed extends HTMLElement{static get formAssociated(){return Qd()}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 Uu(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 xp(`${E}/${b}`))).arrayBuffer(),oe=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=oe}catch(ee){}})}static playSound(y){return Uu(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=py,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(Zu[E])if(Zu[E].startsWith("mf."))if(Zu[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${Zu[E]}`);else{const ee=Zu[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 ${Zu[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(Qd()&&(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=[zu("core"),zu("mathfield"),zu("mathfield-element"),zu("ui"),zu("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>"+bu("core")+bu("mathfield")+bu("mathfield-element")+bu("ui")+bu("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=Ed.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?gd(this._mathfield.options,y):Vo.has(this)?ke({},gd(ke(ke({},Uf()),jf(Vo.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?gd(this._mathfield.options,y):Vo.has(this)?gd(ke(ke({},Uf()),jf(Vo.get(this).options)),y):null}reflectAttributes(){const y=Uf(),b=this._getOptions();Object.keys(Ed.optionsAttributes).forEach(E=>{const ee=Cu(E);Ed.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Ed.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(Vo.has(this)){const b=ke(ke({},Vo.get(this).options),y);Vo.set(this,ge(ke({},Vo.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Vo.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))Zu[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${Zu[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(Vo.has(this)){let oe,me,xe;if(Ou(y)?([oe,me]=y.ranges[0],xe=b):pu(y)?([oe,me]=y,xe=b):Wl(y)&&Wl(b)?(oe=y,me=b,xe=E):(oe=0,me=-1,xe=y),(xe===void 0||xe==="latex")&&oe===0&&me===-1)return(re=(ee=Vo.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(Vo.has(this)){const ee=Vo.get(this).options;Vo.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Lf(this);Vo.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?Sf(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=Bc(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;Yc.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,me=re.userSelect!=="none";if(me)oe.host.addEventListener("pointerdown",this,!0);else{const De=oe.querySelector("span");De.style.pointerEvents="none"}oe.host.addEventListener("focus",this,!0),oe.host.addEventListener("blur",this,!0),Qd()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),me&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const xe=oe.querySelector("slot:not([name])");if(xe)try{this._style=xe.assignedElements().filter(De=>De.tagName.toLowerCase()==="style").map(De=>De.textContent).join("")}catch(De){console.error(De)}if(this._style){const De=document.createElement("style");De.textContent=this._style,oe.appendChild(De)}let Me="";if(this.hasAttribute("value")?Me=this.getAttribute("value"):Me=(y=xe==null?void 0:xe.assignedNodes().map(De=>De.nodeType===3?De.textContent:"").join("").trim())!=null?y:"",this._mathfield=new fy(oe.querySelector(":host > span"),ge(ke({},(E=(b=Vo.get(this))==null?void 0:b.options)!=null?E:Lf(this)),{eventSink:this,value:Me})),!Vo.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const De of Object.keys(Ed.optionsAttributes))this.upgradeProperty(Cu(De))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Vo.has(this)){const De=this._mathfield,Ye=Vo.get(this),bt=Ye.menuItems;De.model.deferNotifications({content:!1,selection:!1},()=>{const $t=Ye.value;$t!==void 0&&De.setValue($t),De.model.selection=Ye.selection,Vo.delete(this)}),bt&&(this.menuItems=bt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Ff()}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=gd(this._mathfield.options,Object.keys(Ed.optionsAttributes).map(ee=>Cu(ee)));Vo.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":Ys(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",""),Qd()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Qd()?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"),Qd()?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(ke({},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=Vo.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}Vo.has(this)?Vo.set(this,ge(ke({},Vo.get(this)),{menuItems:y})):Vo.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Lf(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:Vo.has(this)?Vo.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,Ys(this._mathfield);return}if(Vo.has(this)){Vo.set(this,ge(ke({},Vo.get(this)),{selection:y}));return}Vo.set(this,{value:void 0,selection:y,options:Lf(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:Vo.has(this)?Vo.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Ys(this._mathfield)),Vo.has(this)){Vo.set(this,ge(ke({},Vo.get(this)),{selection:{ranges:[[y,y]]}}));return}Vo.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Lf(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}};Rl.version="0.98.5",Rl._fontsDirectory="./fonts",Rl._soundsDirectory="./sounds",Rl.keypressVibration=!0,Rl._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},Rl._plonkSound="plonk.wav",Rl.audioBuffers={},Rl.createHTML=a=>a,Rl._speechEngineRate="100%",Rl._speechEngineVoice="Joanna",Rl._textToSpeechMarkup="",Rl._textToSpeechRules="mathlive",Rl._textToSpeechRulesOptions={},Rl.speakHook=ry,Rl.readAloudHook=hy,Rl._decimalSeparator=".",Rl.fractionNavigationOrder="numerator-denominator",Rl._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 _f=Rl;function Cu(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Lf(a){const y={readOnly:!1},b=_f.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[Cu(E)]=!0:b[E]==="on/off"?ee==="on"?y[Cu(E)]=!0:ee==="off"?y[Cu(E)]=!1:y[Cu(E)]=void 0:b[E]==="number"?y[Cu(E)]=Number.parseFloat(ee!=null?ee:"0"):y[Cu(E)]=ee}}),y}function Qd(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var v0=_f,y0,b0,x0,S0;if(dt()&&!((y0=window.customElements)!=null&&y0.get("math-field"))){(x0=window[b0=Symbol.for("io.cortexjs.mathlive")])!=null||(window[b0]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=_f,(S0=window.customElements)==null||S0.define("math-field",_f)}function my(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 ch(a,y,b,E,ee="latex"){const re=[];for(const oe of a)if(oe.type==="text"){const me=oe.data;let xe=!0,Me=0,De;De=me.indexOf(y),De!==-1&&(Me=De,Me>0&&re.push({type:"text",data:me.slice(0,Me)}),xe=!1);let Ye=!1;for(;!Ye;){if(xe){if(De=me.indexOf(y,Me),De===-1){Ye=!0;break}Me!==De&&re.push({type:"text",data:me.slice(Me,De)}),Me=De}else{if(De=my(b,me,Me+y.length),De===-1){Ye=!0;break}let bt=me.slice(Me+y.length,De);ee==="ascii-math"&&([,bt]=Vc(bt,{format:"ascii-math"})),re.push({type:"math",data:bt,rawData:me.slice(Me,De+b.length),mathstyle:E}),Me=De+b.length}xe=!xe}Me<me.length&&re.push({type:"text",data:me.slice(Me)})}else re.push(oe);return re}function w0(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=ch(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=ch(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=ch(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=ch(E,ee,re,"displaystyle","ascii-math")}),E}function gy(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 vy(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 qd(a,y,b,E){var ee;const re=vy(a,b,y||"textstyle",E),oe=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(oe)){const me=document.createElement("span");if(/\bmathml\b/i.test(oe)&&b.renderToMathML&&me.append(gy(a,b)),/\bspeakable-text\b/i.test(oe)&&b.renderToSpeakableText){const xe=document.createElement("span");xe.setAttribute("translate","no");const Me=b.renderToSpeakableText(a);xe.innerHTML=window.MathfieldElement.createHTML(Me),xe.className="ML__sr-only",me.append(xe)}return me.append(re),me}return re}function yy(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=qd(a,"",y,!0);oe&&re.appendChild(oe)}else{if(!a.trim())return null;const oe=w0(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 me of oe)if(me.type==="text")re.appendChild(document.createTextNode(me.data));else{const xe=qd(me.data,me.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);xe&&re.appendChild(xe)}}return re}function C0(a,y){var b,E,ee,re,oe,me,xe,Me,De,Ye,bt,$t,jt,sr,Gr,er;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Tr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(Tr)){a.textContent="";const Nr=qd(Tr,"",y,!0);Nr&&a.append(Nr);return}const ti=w0(Tr,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(ti.length===1&&ti[0].type==="math"){a.textContent="";const Nr=qd(ti[0].data,ti[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Nr&&a.append(Nr);return}if(ti.length===1&&ti[0].type==="text")return}for(let Tr=a.childNodes.length-1;Tr>=0;Tr--){const ti=a.childNodes[Tr];if(ti.nodeType===3){const Nr=yy((oe=ti.textContent)!=null?oe:"",y);Nr&&(Tr+=Nr.childNodes.length-1,ti.replaceWith(Nr))}else if(ti.nodeType===1){const Nr=ti,Zi=ti.nodeName.toLowerCase();if(Zi==="script"){const va=ti;let oa;if((me=y.processScriptTypePattern)!=null&&me.test(va.type))oa=(xe=va.textContent)!=null?xe:"";else if((Me=y.processMathJSONScriptTypePattern)!=null&&Me.test(va.type))try{oa=(Ye=y.serializeToLatex)==null?void 0:Ye.call(y,JSON.parse((De=va.textContent)!=null?De:""))}catch(Fo){console.error(Fo)}if(oa){let Fo="textstyle";for(const di of va.type.split(";")){const[bc,nu]=di.toLowerCase().split("=");bc.trim()==="mode"&&(Fo=nu.trim()==="display"?"displaystyle":"textstyle")}const ps=qd(oa,Fo,y,!0);ps&&va.parentNode.replaceChild(ps,va)}}else if((($t=(bt=y.processClassPattern)==null?void 0:bt.test(Nr.className))!=null?$t:!1)||!((sr=(jt=y.skipTags)==null?void 0:jt.includes(Zi))!=null&&sr||(er=(Gr=y.ignoreClassPattern)==null?void 0:Gr.test(Nr.className))!=null&&er))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const oa=a.textContent;a.textContent="";const Fo=qd(oa!=null?oa:"","displaystyle",y,!0);Fo&&a.append(Fo)}else C0(Nr,y)}}}var by={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 xy(a,y){var b,E,ee,re;try{const oe=ke(ke({},by),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:""),Ff(),uc("core"),C0(a,oe)}catch(oe){oe instanceof Error?console.error("renderMathInElement(): "+oe.message):console.error("renderMathInElement(): Could not render math for element",a)}}function Sy(a,y){const b=Hu.singleton;return b?(b.show(),gf(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function wy(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}dc({switchKeyboardLayer:Sy,toggleVirtualKeyboard:wy,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function ju(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Ay(){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 Iy(a){Ey(document.body,a)}function Cy(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 Ey(a,y){var b,E,ee,re;const oe=Cy(a);if(!oe)return;const me=y!=null?y:{};(b=me.renderToMarkup)!=null||(me.renderToMarkup=Al),(E=me.renderToMathML)!=null||(me.renderToMathML=Rv),(ee=me.renderToSpeakableText)!=null||(me.renderToSpeakableText=$v),(re=me.serializeToLatex)!=null||(me.serializeToLatex=Bv),xy(oe,me)}var Dy={mathlive:"0.98.5"}},17423:function(Ln,Kt,ie){"use strict";ie.d(Kt,{Z:function(){return ke}});const fe=ge=>typeof ge=="object"&&ge!=null&&ge.nodeType===1,Te=(ge,Ae)=>(!Ae||ge!=="hidden")&&ge!=="visible"&&ge!=="clip",Re=(ge,Ae)=>{if(ge.clientHeight<ge.scrollHeight||ge.clientWidth<ge.scrollWidth){const lt=getComputedStyle(ge,null);return Te(lt.overflowY,Ae)||Te(lt.overflowX,Ae)||(ze=>{const st=(dt=>{if(!dt.ownerDocument||!dt.ownerDocument.defaultView)return null;try{return dt.ownerDocument.defaultView.frameElement}catch(ct){return null}})(ze);return!!st&&(st.clientHeight<ze.scrollHeight||st.clientWidth<ze.scrollWidth)})(ge)}return!1},Ge=(ge,Ae,lt,ze,st,dt,ct,qe)=>dt<ge&&ct>Ae||dt>ge&&ct<Ae?0:dt<=ge&&qe<=lt||ct>=Ae&&qe>=lt?dt-ge-ze:ct>Ae&&qe<lt||dt<ge&&qe>lt?ct-Ae+st:0,ye=ge=>{const Ae=ge.parentElement;return Ae==null?ge.getRootNode().host||null:Ae},_e=(ge,Ae)=>{var lt,ze,st,dt;if(typeof document=="undefined")return[];const{scrollMode:ct,block:qe,inline:be,boundary:vt,skipOverflowHiddenElements:Dt}=Ae,it=typeof vt=="function"?vt:mn=>mn!==vt;if(!fe(ge))throw new TypeError("Invalid target");const ot=document.scrollingElement||document.documentElement,Ce=[];let Se=ge;for(;fe(Se)&&it(Se);){if(Se=ye(Se),Se===ot){Ce.push(Se);break}Se!=null&&Se===document.body&&Re(Se)&&!Re(document.documentElement)||Se!=null&&Re(Se,Dt)&&Ce.push(Se)}const He=(ze=(lt=window.visualViewport)==null?void 0:lt.width)!=null?ze:innerWidth,Ue=(dt=(st=window.visualViewport)==null?void 0:st.height)!=null?dt:innerHeight,{scrollX:xt,scrollY:mt}=window,{height:ut,width:$e,top:Ft,right:yt,bottom:gn,left:rt}=ge.getBoundingClientRect(),{top:Mt,right:en,bottom:Yt,left:Qe}=(mn=>{const pt=window.getComputedStyle(mn);return{top:parseFloat(pt.scrollMarginTop)||0,right:parseFloat(pt.scrollMarginRight)||0,bottom:parseFloat(pt.scrollMarginBottom)||0,left:parseFloat(pt.scrollMarginLeft)||0}})(ge);let Ie=qe==="start"||qe==="nearest"?Ft-Mt:qe==="end"?gn+Yt:Ft+ut/2-Mt+Yt,Ot=be==="center"?rt+$e/2-Qe+en:be==="end"?yt+en:rt-Qe;const In=[];for(let mn=0;mn<Ce.length;mn++){const pt=Ce[mn],{height:wt,width:Qt,top:Zn,right:Cn,bottom:rn,left:ln}=pt.getBoundingClientRect();if(ct==="if-needed"&&Ft>=0&&rt>=0&&gn<=Ue&&yt<=He&&Ft>=Zn&&gn<=rn&&rt>=ln&&yt<=Cn)return In;const zn=getComputedStyle(pt),_n=parseInt(zn.borderLeftWidth,10),Oe=parseInt(zn.borderTopWidth,10),ue=parseInt(zn.borderRightWidth,10),le=parseInt(zn.borderBottomWidth,10);let ve=0,pe=0;const se="offsetWidth"in pt?pt.offsetWidth-pt.clientWidth-_n-ue:0,Be="offsetHeight"in pt?pt.offsetHeight-pt.clientHeight-Oe-le:0,ft="offsetWidth"in pt?pt.offsetWidth===0?0:Qt/pt.offsetWidth:0,Bt="offsetHeight"in pt?pt.offsetHeight===0?0:wt/pt.offsetHeight:0;if(ot===pt)ve=qe==="start"?Ie:qe==="end"?Ie-Ue:qe==="nearest"?Ge(mt,mt+Ue,Ue,Oe,le,mt+Ie,mt+Ie+ut,ut):Ie-Ue/2,pe=be==="start"?Ot:be==="center"?Ot-He/2:be==="end"?Ot-He:Ge(xt,xt+He,He,_n,ue,xt+Ot,xt+Ot+$e,$e),ve=Math.max(0,ve+mt),pe=Math.max(0,pe+xt);else{ve=qe==="start"?Ie-Zn-Oe:qe==="end"?Ie-rn+le+Be:qe==="nearest"?Ge(Zn,rn,wt,Oe,le+Be,Ie,Ie+ut,ut):Ie-(Zn+wt/2)+Be/2,pe=be==="start"?Ot-ln-_n:be==="center"?Ot-(ln+Qt/2)+se/2:be==="end"?Ot-Cn+ue+se:Ge(ln,Cn,Qt,_n,ue+se,Ot,Ot+$e,$e);const{scrollLeft:qt,scrollTop:an}=pt;ve=Bt===0?0:Math.max(0,Math.min(an+ve/Bt,pt.scrollHeight-wt/Bt+Be)),pe=ft===0?0:Math.max(0,Math.min(qt+pe/ft,pt.scrollWidth-Qt/ft+se)),Ie+=an-ve,Ot+=qt-pe}In.push({el:pt,top:ve,left:pe})}return In},ce=ge=>ge===!1?{block:"end",inline:"nearest"}:(Ae=>Ae===Object(Ae)&&Object.keys(Ae).length!==0)(ge)?ge:{block:"start",inline:"nearest"};function ke(ge,Ae){if(!ge.isConnected||!(st=>{let dt=st;for(;dt&&dt.parentNode;){if(dt.parentNode===document)return!0;dt=dt.parentNode instanceof ShadowRoot?dt.parentNode.host:dt.parentNode}return!1})(ge))return;const lt=(st=>{const dt=window.getComputedStyle(st);return{top:parseFloat(dt.scrollMarginTop)||0,right:parseFloat(dt.scrollMarginRight)||0,bottom:parseFloat(dt.scrollMarginBottom)||0,left:parseFloat(dt.scrollMarginLeft)||0}})(ge);if((st=>typeof st=="object"&&typeof st.behavior=="function")(Ae))return Ae.behavior(_e(ge,Ae));const ze=typeof Ae=="boolean"||Ae==null?void 0:Ae.behavior;for(const{el:st,top:dt,left:ct}of _e(ge,ce(Ae))){const qe=dt-lt.top+lt.bottom,be=ct-lt.left+lt.right;st.scroll({top:qe,left:be,behavior:ze})}}}}]);
|
|
|
}()); |