|
|
!(function(){var Nu=Math.pow;var cd=(dn,St,ee)=>new Promise((te,Se)=>{var Le=fe=>{try{ce(ee.next(fe))}catch(ae){Se(ae)}},Ce=fe=>{try{ce(ee.throw(fe))}catch(ae){Se(ae)}},ce=fe=>fe.done?te(fe.value):Promise.resolve(fe.value).then(Le,Ce);ce((ee=ee.apply(dn,St)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7460],{33463:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},28575:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},18299:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},18699:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},81893:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},42922:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},25877:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},55304:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},63237:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},99569:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},73148:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},56747:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},53555:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},50881:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},22751:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},34182:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},38308:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},74664:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},32693:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},17663:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},91034:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},72395:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},53978:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ae}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(re,de){return Se.createElement(ce.Z,(0,te.Z)({},re,{ref:de,icon:Ce}))},ae=Se.forwardRef(fe)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(dn,St){"use strict";St.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},77969:function(dn,St){"use strict";St.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},12867:function(){"use strict"},22707:function(dn,St,ee){"use strict";var te=ee(67294),Se=Object.defineProperty,Le=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,fe=(re,de,he)=>de in re?Se(re,de,{enumerable:!0,configurable:!0,writable:!0,value:he}):re[de]=he,ae=(re,de)=>{for(var he in de||(de={}))Ce.call(de,he)&&fe(re,he,de[he]);if(Le)for(var he of Le(de))ce.call(de,he)&&fe(re,he,de[he]);return re};const le=re=>React.createElement("svg",ae({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},re),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));St.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},8861:function(dn,St,ee){"use strict";var te=ee(67294),Se=Object.defineProperty,Le=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,fe=(re,de,he)=>de in re?Se(re,de,{enumerable:!0,configurable:!0,writable:!0,value:he}):re[de]=he,ae=(re,de)=>{for(var he in de||(de={}))Ce.call(de,he)&&fe(re,he,de[he]);if(Le)for(var he of Le(de))ce.call(de,he)&&fe(re,he,de[he]);return re};const le=re=>React.createElement("svg",ae({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},re),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));St.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},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 dn={},St="5.0",ee={},te=null,Se=!1,Le=!1,Ce=null,ce=!1,fe=null,ae=null,le=0;le<arguments.length;le++){var re=arguments[le];if(re!==null)switch(typeof re){case"number":St=re.toFixed(1);break;case"string":re.match(new RegExp("^[0-9]\\.[0-9]+$"))?St=re:Ce=re;break;case"object":typeof re.is3D!="undefined"?te=re:ee=re;break;case"boolean":Se=re,Le=!0;break}}te===null&&(te={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ee.material_id!==void 0&&!Le&&(Se=!0)),Ce!==null&&ee.id===void 0&&(ee.id=Ce);var de="",he="",me=!1,se=null,ye=null,_e=null,Me=!1,ve=null,Fe=null,$e=null,Te=null,ze=null;ee.height!==void 0&&(ee.height=Math.round(ee.height)),ee.width!==void 0&&(ee.width=Math.round(ee.width));var Ee=function(Tt){return parseFloat(Tt)>4?parseFloat(Tt):5};dn.setHTML5Codebase=function(Tt,Lt){ae=Tt,jt(Tt,Lt)},dn.setJavaCodebase=dn.setJavaCodebaseVersion=dn.isCompiledInstalled=dn.setPreCompiledScriptPath=dn.setPreCompiledResourcePath=function(){},dn.setHTML5CodebaseVersion=function(Tt,Lt){var Jt=parseFloat(Tt);if(Jt!==NaN&&Jt<5){console.log("The GeoGebra HTML5 codebase version "+Jt+" is deprecated. Using version latest instead.");return}fe=Tt,Ge(Tt,Lt)},dn.getHTML5CodebaseVersion=function(){return ye},dn.getParameters=function(){return ee},dn.setFontsCSSURL=function(Tt){Te=Tt},dn.setGiacJSURL=function(Tt){},dn.setJNLPFile=function(Tt){de=Tt},dn.setJNLPBaseDir=function(Tt){},dn.inject=function(){function Tt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Lt="auto",Jt=ee.id,kn,In=!1,Qt=0;Qt<arguments.length;Qt++){var Mn=arguments[Qt];typeof Mn=="string"?(Mn=Mn.toLowerCase(),Mn.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Lt=Mn:Jt=arguments[Qt]):typeof Mn=="boolean"?In=Mn:Mn instanceof HTMLElement&&(kn=Mn)}Wn();function Wn(){if(!ce){setTimeout(Wn,200);return}Lt=Ut(Lt);var zn=kn||document.getElementById(Jt);if(!zn){console.log("possibly bug on ajax loading? ");return}if(dn.removeExistingApplet(zn,!1),ee.width===void 0&&zn.clientWidth&&(ee.width=zn.clientWidth),ee.height===void 0&&zn.clientHeight&&(ee.height=zn.clientHeight),!(ee.width&&ee.height)&&Lt==="html5"&&(delete ee.width,delete ee.height),se=Lt,Lt==="screenshot")pt(zn,ee);else{var at=!1;ee.hasOwnProperty("playButton")&&ee.playButton||ee.hasOwnProperty("clickToLoad")&&ee.clickToLoad?at=!0:ee.hasOwnProperty("playButtonAutoDecide")&&ee.playButtonAutoDecide&&(at=(!be()||Tt())&&Re()),at?(se="screenshot",Ze(zn,ee,In,Lt)):zt(zn,ee,In)}}};function be(){try{return window.self!==window.top}catch(Tt){return!0}}function Re(){return ee.hasOwnProperty("screenshotGenerator")&&ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}dn.getViews=function(){return te},dn.isJavaInstalled=function(){return!1};var De=function(Tt){var Lt=function(Qt){var Mn=JSON.parse(Qt),Wn=function(Oe){return Oe.type=="G"||Oe.type=="E"},zn=Mn.elements?Mn.elements.filter(Wn)[0]:Mn;if(!zn||!zn.url){Jt();return}ee.fileName=zn.url,et(zn.settings||{}),te.is3D=!0;var at="https://www.geogebra.org/images/";dn.setPreviewImage(ve||zn.previewUrl,at+"GeoGebra_loading.png",at+"applet_play.png"),Tt()},Jt=function(){ee.onError&&ee.onError(),yn("Error: Fetching material (id "+ee.material_id+") failed.",ee)},kn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",In="/materials/"+ee.material_id+"?scope=basic";Ye("https://"+kn+"/api/proxy.php?path="+encodeURIComponent(In),Lt,Jt)};function et(Tt){var Lt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Jt){Tt[Jt]=!!Tt[Jt]}),Lt.forEach(function(Jt){ee[Jt]===void 0&&Tt[Jt]!==void 0&&(ee[Jt]=Tt[Jt])}),ee.showToolBarHelp===void 0&&(ee.showToolBarHelp=ee.showToolBar)}function Ye(Tt,Lt,Jt){var kn=new XMLHttpRequest;kn.open("GET",Tt),kn.onload=function(){Lt(kn.responseText)},kn.onerror=Jt,kn.send()}dn.isHTML5Installed=function(){return!0},dn.getLoadedAppletType=function(){return se},dn.setPreviewImage=function(Tt,Lt,Jt){ve=Tt,Fe=Lt,$e=Jt},dn.removeExistingApplet=function(Tt,Lt){var Jt;typeof Tt=="string"&&(Tt=document.getElementById(Tt)),se=null;var kn=null;for(Jt=0;Jt<Tt.childNodes.length;Jt++){var In=Tt.childNodes[Jt],Qt=In.className;Qt==="applet_screenshot"?Lt?(In.style.display="block",se="screenshot"):In.style.display="none":Qt!=="applet_scaler prerender"&&(Tt.removeChild(In),kn=Qt&&Qt.indexOf("appletParameters")!=-1?In.id:null,Jt--)}var Mn=ee.id!==void 0?ee.id:kn,Wn=window[Mn];Wn&&typeof Wn.getBase64=="function"&&(Wn.remove(),window[Mn]=null)},dn.refreshHitPoints=function(){if(Ee(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Tt=dn.getAppletObject();return Tt&&typeof Tt.recalculateEnvironments=="function"?(Tt.recalculateEnvironments(),!0):!1},dn.startAnimation=function(){var Tt=dn.getAppletObject();return Tt&&typeof Tt.startAnimation=="function"?(Tt.startAnimation(),!0):!1},dn.stopAnimation=function(){var Tt=dn.getAppletObject();return Tt&&typeof Tt.stopAnimation=="function"?(Tt.stopAnimation(),!0):!1},dn.getAppletObject=function(){var Tt=ee.id!==void 0?ee.id:"ggbApplet";return window[Tt]},dn.resize=function(){};var dt=function(Tt,Lt,Jt){var kn=document.createElement("param");kn.setAttribute("name",Lt),kn.setAttribute("value",Jt),Tt.appendChild(kn)},Ke=function(Tt){return Tt&&Tt!=="false"},zt=function(Tt,Lt,Jt){Ee(ye)<=4.2&&(Jt=!0);var kn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ye||ggbHTML5LoadedCodebaseIsWebSimple&&!Me)&&(kn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var In=document.createElement("div");In.classList.add("appletParameters","notranslate");var Qt=Lt.width,Mn=Lt.height;if(Lt.disableAutoScale=Lt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Lt.disableAutoScale,Lt.width!==void 0)if(Ee(ye)<=4.4)Ke(Lt.showToolBar)&&(Lt.height-=7),Ke(Lt.showAlgebraInput)&&(Lt.height-=37),Lt.width<605&&Ke(Lt.showToolBar)&&(Lt.width=605,Qt=605);else{var Wn=100;(Ke(Lt.showToolBar)||Ke(Lt.showMenuBar))&&(Lt.hasOwnProperty("customToolBar")&&(Lt.customToolbar=Lt.customToolBar),Wn=Ke(Lt.showMenuBar)?245:155),Qt<Wn&&(Lt.width=Wn,Qt=Wn)}In.style.border="none",In.style.display="inline-block";for(var zn in Lt)Lt.hasOwnProperty(zn)&&zn!=="appletOnLoad"&&In.setAttribute("data-param-"+zn,Lt[zn]);Te&&In.setAttribute("data-param-fontscssurl",Te),dn.resize=function(){GGBAppletUtils.responsiveResize(Tt,Lt)},window.addEventListener("resize",function(on){dn.resize()});var at=typeof Lt.appletOnLoad=="function"?Lt.appletOnLoad:function(){};if(!Jt&&Lt.width!==void 0){Lt.hasOwnProperty("showSplash")||In.setAttribute("data-param-showSplash","false");var Oe=Tt.querySelector(".applet_scaler.prerender"),ke=Oe!==null;if(ke)var Be=Oe.querySelector(".ggb_preview");else{var Be=ft(Qt,Mn,Lt.borderColor,!1);Oe=document.createElement("div"),Oe.className="applet_scaler",Oe.style.position="relative",Oe.style.display="block",Oe.style.width=Qt+"px",Oe.style.height=Mn+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Oe,"66%"),Ee(ye)>=5?(Lt.appletOnLoad=function(on){var Dt=Tt.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Oe),window.GGBT_wsf_view&&$(window).trigger("resize"),at(on)},ke||Oe.appendChild(Be)):In.appendChild(Be),Oe.appendChild(In),ke||Tt.appendChild(Oe),setTimeout(function(){dn.resize()},1)}else{var Ne=document.createElement("div");Ne.className="applet_scaler",Ne.style.position="relative",Ne.style.display="block",Ne.appendChild(In),Tt.appendChild(Ne),Lt.appletOnLoad=function(on){dn.resize(),at(on)}}function we(on,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(on,Dt.appletOnLoad):renderGGBElement(on),yn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function rt(on,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:on,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Xt){we(Xt.article,Xt.params)}),html5AppletsToProcess=null)},Ee(ye)<5&&(on.className+=" geogebraweb")):we(on,Dt)}if(kn){scriptLoadStarted=!0;for(var It=0;It<In.childNodes.length;It++){var Ct=In.childNodes[It].tagName;Ct==="TABLE"&&(In.removeChild(In.childNodes[It]),It--)}if(ggbHTML5LoadedScript!==null){var $t=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');$t!=null&&$t.parentNode.removeChild($t)}var Vt=document.createElement("script"),wt=function(){rt(In,Lt)};Vt.src=he+_e,ggbHTML5LoadedCodebaseIsWebSimple=Me,ggbHTML5LoadedCodebaseVersion=ye,ggbHTML5LoadedScript=Vt.src,yn("GeoGebra HTML5 codebase loaded: '"+he+"'.",Lt),!ae&&(!fe||fe=="5.0")?(Me?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),wt()):he.requirejs?__webpack_require__.e(12).then(function(){var on=[__webpack_require__(12)];wt.apply(null,on)}.bind(this)).catch(__webpack_require__.oe):(Vt.onload=wt,Tt.appendChild(Vt))}else rt(In,Lt);Lt.height=Mn,Lt.width=Qt},pt=function(Tt,Lt,Jt){var kn=ft(Lt.width,Lt.height,Lt.borderColor,Jt),In=document.createElement("div");In.style.position="relative",In.style.display="block",In.style.width=Lt.width+"px",In.style.height=Lt.height+"px",In.className="applet_screenshot applet_scaler"+(Jt?" applet_screenshot_play":""),In.appendChild(kn);var Qt=GGBAppletUtils.getScale(Lt,Tt,Jt);Jt?(Tt.appendChild(tt()),window.GGBT_wsf_view||(Tt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(In,"66%"),Tt.appendChild(In),Qt!==1&&!isNaN(Qt)&&(GGBAppletUtils.scaleElement(In,Qt),In.style.width=Lt.width+"px",In.style.height=Lt.height+"px",In.parentNode.style.width=Lt.width*Qt+"px",In.parentNode.style.height=Lt.height*Qt+"px"),dn.resize=function(){Kt(Tt,kn,In,Jt)},window.addEventListener("resize",function(Mn){dn.resize()}),dn.resize()};function Kt(Tt,Lt,Jt,kn){if(Tt.contains(Lt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Tt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Tt)}var In=GGBAppletUtils.getScale(ee,Tt,kn);Jt.parentNode!==null&&(!isNaN(In)&&In!==1?(GGBAppletUtils.scaleElement(Jt,In),Jt.parentNode.style.width=ee.width*In+"px",Jt.parentNode.style.height=ee.height*In+"px"):(GGBAppletUtils.scaleElement(Jt,1),Jt.parentNode.style.width=ee.width+"px",Jt.parentNode.style.height=ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Tt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}dn.onExitFullscreen=function(Tt,Lt){Lt.appendChild(Tt)};var Ze=function(Tt,Lt,Jt,kn){pt(Tt,Lt,!0);for(var In=function(){var Wn=[];for(Mn=0;Mn<Tt.childNodes.length;Mn++)Wn.push(Tt.childNodes[Mn]);if(window.GGBT_wsf_view){var zn=window.GGBT_wsf_view.renderFullScreen(Tt,Lt.id),at=document.getElementById("fullscreencontainer"),Oe=jQuery(Tt).find(".fullscreencontent");Oe.length>0?(zn.remove(),Oe.attr("id","fullscreencontent").show(),jQuery(at).append(Oe),window.dispatchEvent(new Event("resize"))):zt(zn,Lt,!1),window.GGBT_wsf_view.launchFullScreen(at)}else se=kn,zt(Tt,Lt,!1);if(!window.GGBT_wsf_view)for(Mn=0;Mn<Wn.length;Mn++)Tt.removeChild(Wn[Mn])},Qt=Tt.getElementsByClassName("ggb_preview_play"),Mn=0;Mn<Qt.length;Mn++)Qt[Mn].addEventListener("click",In,!1),Qt[Mn].addEventListener("ontouchstart",In,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Tt),Re()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},tt=function(){var Tt=document.createElement("div");if(Tt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Lt='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Jt=document.createElement("style");Jt.styleSheet?Jt.styleSheet.cssText=Lt:Jt.appendChild(document.createTextNode(Lt)),document.getElementsByTagName("head")[0].appendChild(Jt)}return Tt},ft=function(Tt,Lt,Jt,kn){var In=document.createElement("div");In.className="ggb_preview",In.style.position="absolute",In.style.zIndex="90",In.style.width=Tt-2+"px",In.style.height=Lt-2+"px",In.style.top="0px",In.style.left="0px",In.style.overflow="hidden",In.style.backgroundColor="white";var Qt="lightgrey";Jt!==void 0&&(Jt==="none"?Qt="transparent":Qt=Jt),In.style.border="1px solid "+Qt;var Mn=document.createElement("img");if(Mn.style.position="relative",Mn.style.zIndex="1000",Mn.style.top="-1px",Mn.style.left="-1px",ve!==null&&Mn.setAttribute("src",ve),Mn.style.opacity=.7,Fe!==null){var Wn,zn,at;if(!kn){Wn=document.createElement("img"),Wn.style.position="absolute",Wn.style.zIndex="1001",Wn.style.opacity=1,Mn.style.opacity=.3,zn=360,zn>Tt/4*3&&(zn=Tt/4*3),at=zn/5.8,Wn.setAttribute("src",Fe),Wn.setAttribute("width",zn),Wn.setAttribute("height",at);var Oe=(Tt-zn)/2,ke=(Lt-at)/2;Wn.style.left=Oe+"px",Wn.style.top=ke+"px",In.appendChild(Wn)}}return In.appendChild(Mn),In},Ut=function(Tt){return Tt=Tt.toLowerCase(),Tt==="html5"||Tt==="screenshot"?Tt:"html5"},nt=["web","webSimple","web3d","tablet","tablet3d","phone"],Ge=function(Tt,Lt){if(ye=Tt,Lt){jt(ye,!0);return}var Jt=!Se;if(Jt){var kn=Ee(ye);!isNaN(kn)&&kn<4.4&&(Jt=!1)}var In,Qt;window.location.protocol.substr(0,4)==="http"?In=window.location.protocol:In="http:";var Mn=ye.indexOf("//");Mn>0?Qt=ye:Mn===0?Qt=In+ye:Qt="https://www.geogebra.org/apps/5.2.814.0/";for(var Wn in nt)if(ye.slice(nt[Wn].length*-1)===nt[Wn]||ye.slice((nt[Wn].length+1)*-1)===nt[Wn]+"/"){jt(Qt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Jt&&!te.is3D&&!te.AV&&!te.SV&&!te.CV&&!te.EV2&&!te.CP&&!te.PC&&!te.DA&&!te.FI&&!te.PV&&!Ke(ee.showToolBar)&&!Ke(ee.showMenuBar)&&!Ke(ee.showAlgebraInput)&&!Ke(ee.enableRightClick)&&(!ee.appName||ee.appName=="classic")?Qt+="webSimple/":Qt+="web3d/",jt(Qt,!1)},jt=function(Tt,Lt){if(Tt.requirejs){he=Tt;return}Tt.slice(-1)!=="/"&&(Tt+="/"),he=Tt,Lt===null&&(Lt=Tt.indexOf("http")===-1),me=Lt,_e="web.nocache.js",Me=!1;var Jt=he.split("/");Jt.length>1&&(!Lt&&Jt[Jt.length-2]==="webSimple"?(_e="webSimple.nocache.js",Me=!0):nt.indexOf(Jt[Jt.length-2])>=0&&(_e=Jt[Jt.length-2]+".nocache.js")),Jt=Tt.split("/"),ye=Jt[Jt.length-3],ye.substr(0,4)==="test"?ye=ye.substr(4,1)+"."+ye.substr(5,1):(ye.substr(0,3)==="war"||ye.substr(0,4)==="beta")&&(ye="5.0");var kn=parseFloat(ye);kn!==NaN&&kn<5&&Tt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+kn+" is deprecated. Using version latest instead."),Ge("5.0",Lt))},yn=function(Tt,Lt){window.console&&window.console.log&&(!Lt||typeof Lt.showLogging=="undefined"||Lt.showLogging&&Lt.showLogging!=="false")&&console.log(Tt)};ee.material_id!==void 0?De(ln):ln();function ln(){var Tt=St;fe!==null?Tt=fe:parseFloat(Tt)<5&&(Tt="5.0"),Ge(Tt,!1),ae!==null&&jt(ae,me),ce=!0}return dn},GGBAppletUtils=function(){"use strict";function dn(){return window.GGBT_wsf_edit!==void 0}function St(ce,fe){fe!=1?(ce.style.transformOrigin="0% 0% 0px",ce.style.webkitTransformOrigin="0% 0% 0px",ce.style.transform="scale("+fe+","+fe+")",ce.style.webkitTransform="scale("+fe+","+fe+")",ce.style.maxWidth="initial",ce.querySelector(".ggb_preview")!==null&&(ce.querySelector(".ggb_preview").style.maxWidth="initial"),ce.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ce.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ce.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ce.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ce.style.transform="none",ce.style.webkitTransform="none")}function ee(ce,fe,ae,le,re,de){var he=null;if(de!=null&&de!="")for(var me=ce.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+de+" ")>-1){he=me;break}else me=me.parentNode;var se=0,ye=0,_e=0,Me=0,ve=0,Fe=0,$e=0;if(he)se=he.offsetWidth,ye=Math.max(le?he.offsetWidth:0,he.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(se=Math.min(window.innerWidth,document.documentElement.clientWidth),ye=Math.min(window.innerHeight,document.documentElement.clientHeight),_e=se):(se=window.innerWidth,ye=window.innerHeight,_e=window.innerWidth),ce){var Te=ce.getBoundingClientRect();Te.left>0&&Te.left<=se&&(re===void 0||!re)&&(document.dir==="rtl"?(ve=se-Te.width-Te.left,Fe=_e<=480?10:30):(Fe=Te.left,ve=_e<=480?10:30),Me=Fe+ve)}if(ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ze=ce.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me=40,$e=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Me=0,$e=40)}}return ce&&((ae===void 0||!ae)&&fe>0&&fe+Me<se?se=fe:se-=Me,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ae===void 0||!ae)&&(ye-=$e)),{width:se,height:ye}}function te(ce,fe,ae,le,re){if(ce.isScreenshoGenerator)return 1;var de=le!==void 0&&le,he=ce.noScaleMargin!=null&&ce.noScaleMargin,me=function(ze){return ze&&ze!=="false"},se=me(ce.autoHeight),ye=ee(fe,ce.width,ae,se,de&&window.GGBT_wsf_view||he,re),_e=parseInt(ye.width),Me=ce.width,ve=ce.height;if(Me===void 0){var Fe=fe.querySelector(".appletParameters");Fe&&(Me=Fe.offsetWidth,ve=Fe.offsetHeight)}var $e=_e/Me,Te=de?1:ye.height/ve;return ae!==void 0&&!ae&&($e=Math.min(1,$e),Te=Math.min(1,Te)),Math.min($e,Te)}function Se(ce,fe,ae){var le=1,re,de=!1;if(ce.hasOwnProperty("allowUpscale")&&(de=ce.allowUpscale),ce.hasOwnProperty("scale")&&(le=parseFloat(ce.scale),(isNaN(le)||le===null||le===0)&&(le=1),le>1&&(de=!0)),fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(ce.hasOwnProperty("disableAutoScale")&&ce.disableAutoScale))re=te(ce,fe,de,ae,ce.scaleContainerClass);else return le;return de&&(!ce.hasOwnProperty("scale")||le===1)?re:Math.min(le,re)}function Le(ce){var fe=Math.min(window.innerWidth,document.documentElement.clientWidth),ae=Math.min(window.innerHeight,document.documentElement.clientHeight),le=ce.getBoundingClientRect(),re=(fe-le.width)/2,de=(ae-le.height)/2;de<0&&(de=0),ce.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(re<40?ce.style.left="40px":ce.style.left=re+"px",ce.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?ce.style.top="40px":ce.style.top=de+"px",ce.style.left=re+"px")}function Ce(ce,fe){var ae=ce.querySelector(".appletParameters");if(ae){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!==ae.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ce)}if(ae.parentElement&&/fullscreen/.test(ae.parentElement.className))return;var le=Se(fe,ce);dn()&&ae.setAttribute("data-param-scale",le);for(var re=null,de=0;de<ce.childNodes.length;de++)if(ce.childNodes[de].className!==void 0&&ce.childNodes[de].className.match(/^applet_scaler/)){re=ce.childNodes[de];break}if(re!==null&&re.querySelector(".noscale")!==null)return;var he=fe.id!==void 0?fe.id:"ggbApplet",me=window[he];(me==null||!me.recalculateEnvironments)&&re!==null&&!re.className.match(/fullscreen/)&&(re.parentNode.style.transform="",!isNaN(le)&&le!==1?(re.parentNode.style.width=fe.width*le+"px",re.parentNode.style.height=fe.height*le+"px",St(re,le)):(St(re,1),re.parentNode.style.width=fe.width+"px",re.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Le(ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ae).parents(".content-added-content"))}}return{responsiveResize:Ce,isFlexibleWorksheetEditor:dn,positionCenter:Le,getScale:Se,scaleElement:St}}();__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 dn=n.location.search;return dn.indexOf(J)!=-1||dn.indexOf(K)!=-1}function q(dn,St){}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(dn){var St=s[L].bindings;s[L].bindings=function(){for(var ee=St?St():{},te=dn[webModule.__softPermutationId],Se=O;Se<te.length;Se++){var Le=te[Se];ee[Le[O]]=Le[P]}return ee}};var t;function u(){return v(),t}function v(){if(!t){var dn=o.createElement(Q);if(dn.id=L,dn.style.cssText=R+S,dn.tabIndex=-1,o.body.appendChild(dn),t=dn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var St=document.compatMode==U?V:W;t.write(St+X),t.close()}}}function w(dn){function St(te){function Se(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Le=Se();if(Le){te();return}function Ce(){if(!Le){if(!Se())return;Le=!0,te(),o.removeEventListener&&o.removeEventListener(Z,Ce,!1),ce&&clearInterval(ce)}}o.addEventListener&&o.addEventListener(Z,Ce,!1);var ce=setInterval(function(){Ce()},$)}function ee(te){var Se=u(),Le=Se.body,Ce=Se.createElement(_);Ce.language=ab,Ce.crossOrigin=W,Ce.src=te,webModule.__errFn&&(Ce.onerror=function(){webModule.__errFn(L,new Error(bb+te))}),Le.appendChild(Ce)}St(function(){ee(dn)})}webModule.__startLoadingFragment=function(dn){return C(dn)},webModule.__installRunAsyncCode=function(dn){var St=u(),ee=St.body,te=St.createElement(_);te.language=ab,te.text=dn,ee.appendChild(te),ee.removeChild(te)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(dn){var St=c[dn];return St==null?null:St},r=d,webModule.__errFn=e}function B(){function dn(ce){var fe=ce.lastIndexOf(rb);fe==-1&&(fe=ce.length);var ae=ce.indexOf(sb);ae==-1&&(ae=ce.length);var le=ce.lastIndexOf(tb,Math.min(ae,fe));return le>=O?ce.substring(O,le+P):W}function St(ce){if(!ce.match(/^\w+:\/\//)){var fe=o.createElement(ub);fe.src=ce+vb,ce=dn(fe.src)}return ce}function ee(){var ce=__gwt_getMetaProperty(wb);return ce!=null?ce:W}function te(){for(var ce=o.getElementsByTagName(_),fe=O;fe<ce.length;++fe)if(ce[fe].src.indexOf(xb)!=-1)return dn(ce[fe].src);return W}function Se(){var ce=o.getElementsByTagName(yb);return ce.length>O?ce[ce.length-P].href:W}function Le(){var ce=o.location;return ce.href==ce.protocol+zb+ce.host+ce.pathname+ce.search+ce.hash}var Ce=ee();return Ce==W&&(Ce=te()),Ce==W&&(Ce=Se()),Ce==W&&Le()&&(Ce=dn(o.location.href)),Ce=St(Ce),Ce}function C(dn){return dn.match(/^\//)||dn.match(/^[a-zA-Z]+:\/\//)?dn:webModule.__moduleBase+dn}function D(){var dn=[],St=O,ee=[],te=[];function Se(ce){var fe=te[ce](),ae=ee[ce];if(fe in ae)return fe;var le=[];for(var re in ae)le[ae[re]]=re;throw r&&r(ce,le,fe),null}if(__gwt_isKnownPropertyValue=function(ce,fe){return fe in ee[ce]},webModule.__getPropMap=function(){var ce={};for(var fe in ee)ee.hasOwnProperty(fe)&&(ce[fe]=Se(fe));return ce},webModule.__computePropValue=Se,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Le;try{Le=Cb;var Ce=Le.indexOf(Db);Ce!=-1&&(St=parseInt(Le.substring(Ce+P),$),Le=Le.substring(O,Ce))}catch(ce){}return webModule.__softPermutationId=St,C(Le+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(dn,St,ee){"use strict";ee.d(St,{Ax:function(){return Ce},Ds:function(){return ce},KI:function(){return ae},SI:function(){return Le},f1:function(){return Se}});var te=ee(11320);function Se(le){let re=!0;if(le.length>0){for(let de=0;de<le.length;de++)if(le[de].compile_success==0||!le[de].compile_success){re=!1;break}}else re=!1;return re}function Le(le,re=""){let de=[];for(let he=0;he<le.length;he++){let me=le[he],se=re?`${re}/${me.name}`:`${me.name}`;de.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:se})}return de}function Ce(le,re,de){for(let he=0;he<le.length;he++){let me=le[he];if(me.key===re){me.children=de;break}me.children&&Ce(me.children,re,de)}return le}function ce(le,re,de){let he;return function(){let me=this,se=arguments,ye=function(){he=null,de||le.apply(me,se)},_e=de&&!he;clearTimeout(he),he=setTimeout(ye,re),_e&&le.apply(me,se)}}const fe=!0,ae=te.Z.API_SERVER},95235:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return _e}});var te=ee(67294),Se=ee(33170),Le=ee(25934),Ce=ee(94184),ce=ee.n(Ce),fe={upload:"upload___jpwPD"},ae=Object.defineProperty,le=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,he=(Me,ve,Fe)=>ve in Me?ae(Me,ve,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Me[ve]=Fe,me=(Me,ve)=>{for(var Fe in ve||(ve={}))re.call(ve,Fe)&&he(Me,Fe,ve[Fe]);if(le)for(var Fe of le(ve))de.call(ve,Fe)&&he(Me,Fe,ve[Fe]);return Me},se=(Me,ve,Fe)=>new Promise(($e,Te)=>{var ze=Re=>{try{be(Fe.next(Re))}catch(De){Te(De)}},Ee=Re=>{try{be(Fe.throw(Re))}catch(De){Te(De)}},be=Re=>Re.done?$e(Re.value):Promise.resolve(Re.value).then(ze,Ee);be((Fe=Fe.apply(Me,ve)).next())}),_e=(0,te.forwardRef)(({chunkSize:Me=1024*1024*2,options:ve={},onBeginInitFile:Fe,onBefore:$e,onProgress:Te,onComplete:ze,onError:Ee,onCancel:be,children:Re,accept:De,className:et,style:Ye={},concurrency:dt=4},Ke)=>{const zt=(0,te.useRef)((0,Le.Z)()),pt=(0,te.useRef)(new Map);(0,te.useImperativeHandle)(Ke,()=>({cancel:ft=>{var Ut;ft?((Ut=pt.current.get(ft))==null||Ut.abort(),pt.current.delete(ft)):(pt.current.forEach(nt=>nt.abort()),pt.current.clear()),be==null||be(ft?{name:ft}:null)}}));const Kt=()=>{const ft=document.getElementById(zt.current);ft&&(ft.value="")},Ze=ft=>se(void 0,null,function*(){const Ut=ft.name+ft.size+ft.lastModified;if(pt.current.has(Ut))return;if(($e==null?void 0:$e(ft))===!0){Kt();return}Fe==null||Fe(ft);const nt=new AbortController;pt.current.set(Ut,nt);try{const Ge=Math.ceil(ft.size/Me),jt=yield(0,Se.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:me({fileName:ft.name,chunkCount:Ge},ve)});if((jt==null?void 0:jt.status)!==0)throw new Error("init failed");const{upload_id:yn}=jt,ln=[];for(let Lt=0;Lt<Ge;Lt++){const Jt=Lt*Me,kn=Math.min(Jt+Me,ft.size),In=ft.slice(Jt,kn),Qt=new FormData;Qt.append("chunk",In),Qt.append("fileName",ft.name),Qt.append("chunkIndex",String(Lt+1)),Qt.append("uploadId",yn),Object.keys(ve).forEach(Mn=>Qt.append(Mn,ve[Mn])),ln.push(()=>(0,Se.ZP)("/api/attachments/multipart_upload",{method:"POST",body:Qt,signal:nt.signal},!0).then(Mn=>{const Wn=Math.round((Lt+1)/Ge*100);Te==null||Te({file:ft,percent:Wn})}))}for(let Lt=0;Lt<ln.length;Lt+=dt){if(nt.signal.aborted)throw new Error("cancelled");yield Promise.all(ln.slice(Lt,Lt+dt).map(Jt=>Jt()))}const Tt=yield(0,Se.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:me({fileName:ft.name,chunkCount:Ge,uploadId:yn},ve)});if(Tt!=null&&Tt.object)ze==null||ze(Tt,ft);else throw new Error("complete failed")}catch(Ge){Ge.name!=="AbortError"&&(Ee==null||Ee(Ge,ft))}finally{pt.current.delete(Ut)}}),tt=ft=>{const Ut=ft.target.files;Ut&&(Array.from(Ut).forEach(nt=>Ze(nt)),Kt())};return te.createElement(te.Fragment,null,te.createElement("input",{type:"file",multiple:!0,id:zt.current,style:{display:"none"},onChange:tt,accept:De}),te.createElement("label",{htmlFor:zt.current,className:ce()(fe.upload,et),style:Ye},Re))})},63205:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return he}});var te=ee(67294),Se={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Le=ee(94184),Ce=ee.n(Le),ce=ee(57953),fe=ee(15979),ae=ee(33170),le=ee(28706),re=(me,se,ye)=>new Promise((_e,Me)=>{var ve=Te=>{try{$e(ye.next(Te))}catch(ze){Me(ze)}},Fe=Te=>{try{$e(ye.throw(Te))}catch(ze){Me(ze)}},$e=Te=>Te.done?_e(Te.value):Promise.resolve(Te.value).then(ve,Fe);$e((ye=ye.apply(me,se)).next())}),he=({data:me,className:se,fullWidth:ye,style:_e={},onClose:Me,onOk:ve,showFullTools:Fe,noAssociationId:$e})=>{const Te=(0,te.useRef)(null),ze=(0,te.useRef)(null),Ee=(0,te.useRef)(null),be=(0,te.useRef)(null),[Re,De]=(0,te.useState)(!1),[et,Ye]=(0,te.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,te.useEffect)(()=>{Ee.current||(Ee.current=document.createElement("style"),document.head.appendChild(Ee.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),Ee.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&dt()):(document.body.removeAttribute("data-custom"),Ee.current&&(document.head.removeChild(Ee.current),Ee.current=null))},[me==null?void 0:me.visible]);const dt=()=>re(void 0,null,function*(){De(!0),Ye("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ze=yield(0,le.ZJ)(me==null?void 0:me.src);Te.current.src="",Te.current.src=Ze,Te.current.onload=function(){Kt()},De(!1),Ye("")}),Ke=()=>{document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",Me()},zt=Ze=>re(void 0,null,function*(){De(!0),Ye("\u6B63\u5728\u4FDD\u5B58\u4E2D");const tt=yield(0,ae.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Ze.dataUrl}});tt!=null&&tt.id&&!$e?(yield(0,ae.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:tt==null?void 0:tt.id,settings:JSON.stringify(Ze.state)}})).status===0&&ve():tt!=null&&tt.id&&ve(tt),document.body.removeAttribute("data-custom"),Ee.current.innerHTML=" ",De(!1),Ye("")}),pt=()=>{const Ze=document.querySelector('a[href="https://markerjs.com/"]');Ze&&Ze.parentNode&&(Ze.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(ft=>{const Ut=document.querySelector(ft.name);Ut&&Ut.setAttribute("title",ft.title)})},Kt=()=>{ze.current=new fe.hP(Te.current),ze.current.targetRoot=be.current,ze.current.addEventListener("render",zt),ze.current.addEventListener("beforeclose",Ke),Fe&&(ze.current.availableMarkerTypes=ze.current.ALL_MARKER_TYPES,ze.current.uiStyleSettings.redoButtonVisible=!0,ze.current.uiStyleSettings.notesButtonVisible=!0,ze.current.uiStyleSettings.zoomButtonVisible=!0,ze.current.uiStyleSettings.zoomOutButtonVisible=!0,ze.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ze.current.uiStyleSettings,ze.current.show(),me!=null&&me.snapshotData&&ze.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),pt()},300)};return te.createElement(te.Fragment,null,(me==null?void 0:me.visible)&&te.createElement(ce.Z,{spinning:Re,tip:et,style:{position:"absolute"}},te.createElement("div",{ref:be,className:Ce()(Se.imageDimensions,se,ye?Se.fullWidth:""),style:_e},te.createElement("img",{className:Se.img,ref:Te}))))}},36527:function(dn,St,ee){"use strict";var te=ee(67294),Se=ee(71230),Le=ee(15746),Ce=ee(66368),ce=ee(71577),fe=ee(35598),ae=ee(71736),le=ee(84279),re=ee(67294);const de=(0,te.forwardRef)(({callback:he,showSaveButton:me,value:se=""},ye)=>{const _e=(0,te.useRef)(),Me=[{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 "}]}]}],ve=[{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}`}]}]}],Fe=ze=>{_e.current.setValue(_e.current.getValue()+" "+ze.value+" ")},$e=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:re.createElement(Se.Z,{className:ae.Z.lists,gutter:[10,10]},Me.map((ze,Ee)=>re.createElement(Le.Z,{flex:"110px",className:ae.Z.item},re.createElement("div",null,re.createElement(fe.Z,{value:`$$${ze.value}$$`}),ze.name),re.createElement("div",{className:ae.Z.children},ze.children.map((be,Re)=>re.createElement("div",{key:Re},re.createElement("h1",null,be.name),re.createElement(Se.Z,{gutter:[10,10]},be.data.map((De,et)=>re.createElement(Le.Z,{key:et,onClick:()=>Fe(De),className:ae.Z.diamond},re.createElement(fe.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:re.createElement(Se.Z,{className:ae.Z.lists,gutter:[10,10]},ve.map((ze,Ee)=>re.createElement(Le.Z,{flex:"110px",className:ae.Z.item},re.createElement("div",null,re.createElement(fe.Z,{value:"`$$"+ze.value+"$$`"}),ze.name),re.createElement("div",{className:ae.Z.children},ze.children.map((be,Re)=>re.createElement("div",{key:Re},be.name&&re.createElement("h1",null,be.name),re.createElement(Se.Z,{gutter:[10,10]},be.data.map((De,et)=>re.createElement(Le.Z,{key:et,onClick:()=>Fe(De),className:ae.Z.diamond},re.createElement(fe.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],Te=()=>{var ze=document.createElement("div");ze.innerHTML=_e.current.getValue();var Ee=ze.innerText;return he&&he(Ee),Ee};return(0,te.useImperativeHandle)(ye,()=>({getData:Te})),re.createElement("div",{className:ae.Z.mathWrap},re.createElement(Ce.default,{defaultActiveKey:"1",items:$e}),re.createElement("math-field",{locale:"zh_cn",className:ae.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:_e,style:{width:800,marginTop:30,fontSize:18}},se||""),me&&re.createElement("div",{className:ae.Z.button},re.createElement(ce.ZP,{size:"large",onClick:Te,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});St.Z=de},7621:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ce}});var te=ee(35973),Se={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Le=ee(67294),Ce=({message:ce,className:fe,children:ae,style:le={}})=>Le.createElement("div",{className:`custom-spinner ${Se.idsRingWrapper} ${fe}`},Le.createElement("div",{className:Se.ldsRing},Le.createElement("div",null),Le.createElement("div",null),Le.createElement("div",null),Le.createElement("div",null)),ce?Le.createElement("p",{style:le},ce):null,ae,Le.createElement(te.Outlet,null))},60076:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ce}});var te=ee(67294),Se=ee(33054),Le=ee(67294),Ce=({defaultX:ce="40%",leftChild:fe,rightChild:ae,className:le,hideResize:re=!1})=>{const[de,he]=(0,te.useState)(ce),me=(0,te.useRef)();function se(){me.current=!0}(0,te.useEffect)(()=>{function Me(Fe){me.current&&(Se.Z.publish("resize-move-bar",Fe),he(Fe.pageX))}function ve(){me.current=!1}return window.addEventListener("mousemove",Me),window.addEventListener("mouseup",ve),()=>{window.removeEventListener("mousemove",Me),window.removeEventListener("mouseup",ve)}},[]);const ye=typeof de=="number"&&de!==.01?`${de}px`:ce,_e=`calc(100% - ${re?"0px":"4px"} - ${ye})`;return Le.createElement("div",{className:`split-panel-container ${le}`},Le.createElement("section",{style:{width:ye,display:de===.01?"none":""}},fe),Le.createElement("section",{className:"resize-x-bar",onMouseDown:se},Le.createElement("a",{className:"btn-resize"},Le.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Le.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),Le.createElement("section",{style:{width:_e}},ae))}},38658:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return fe}});var te=ee(67294),Se={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Le=ee(94184),Ce=ee.n(Le),fe=({className:ae,style:le={},leftNode:re,leftTitle:de="\u81EA\u6D4B\u8F93\u5165",rightNode:he,rightTitle:me="\u8FD0\u884C\u7ED3\u679C"})=>te.createElement("div",{className:Ce()(Se.result,ae),style:le},te.createElement("div",{className:Se.left},te.createElement("div",{className:Se.title},te.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),te.createElement("span",null,de)),te.createElement("div",{className:Se.leftNode},re)),te.createElement("div",{className:Se.right},te.createElement("div",{className:Se.title},te.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),te.createElement("span",null,me)),te.createElement("div",{className:Se.rightNode},he)))},88508:function(dn,St,ee){"use strict";var te=ee(67294);const Se=Ce=>String(Ce).length===1?`0${Ce}`:Ce,Le=({className:Ce="",onChange:ce,defaultValue:fe=0})=>{const[ae,le]=(0,te.useState)(fe);(0,te.useEffect)(()=>{const me=setTimeout(()=>{le(ae+1e3)},1e3);return ce(ae+1e3),()=>{clearInterval(me)}},[ae]);const re=parseInt(ae/(60*6e4))||"00",de=parseInt(ae%(60*6e4)/6e4)||"00",he=parseInt(ae%6e4/1e3)||"00";return te.createElement("div",{className:Ce},Se(re),":",Se(de),":",Se(he))};St.Z=Le},6104:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Me}});var te=ee(67294),Se=ee(2453),Le=ee(85418),Ce=ee(24577),ce=ee(67631),fe=ee.n(ce),ae=ee(52262),le=ee(74855),re=ee(51959),de={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},he=(ve,Fe,$e)=>new Promise((Te,ze)=>{var Ee=De=>{try{Re($e.next(De))}catch(et){ze(et)}},be=De=>{try{Re($e.throw(De))}catch(et){ze(et)}},Re=De=>De.done?Te(De.value):Promise.resolve(De.value).then(Ee,be);Re(($e=$e.apply(ve,Fe)).next())});function me(ve){if(isNaN(ve))return{minutes:"00",seconds:"00"};const Fe=new Date(ve*1e3).toISOString().substr(11,8);return{hour:Fe.substr(0,2),minutes:Fe.substr(3,2),seconds:Fe.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function se(ve,Fe){return ve-Fe}function ye(ve){ve.sort(se);let Fe=0;for(let $e=0;$e<ve.length-1;$e++){let Te=Math.abs(ve[$e+1]-ve[$e]);Te<21&&(Fe+=Te)}return Fe}const _e=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var Me=(0,te.forwardRef)(({allow_skip:ve,src:Fe,toLog:$e,videoId:Te,logWatchHistory:ze,courseId:Ee=null,startTime:be,handlePause:Re=()=>{},handlePlay:De=()=>{},handlePlayEnded:et=()=>{},autoPlay:Ye=!1,onPlayEnded:dt=()=>{},isShowWaterMark:Ke=!0},zt)=>{var pt;const Ze=((pt=Fe==null?void 0:Fe.split("."))==null?void 0:pt.pop())==="flv",tt=(0,te.useRef)(),ft=(0,te.useRef)(),Ut=(0,te.useRef)(),nt=(0,te.useRef)(),Ge=(0,te.useRef)(),jt=(0,te.useRef)(),yn=(0,te.useRef)(),ln=(0,te.useRef)(),Tt=(0,te.useRef)(),Lt=(0,te.useRef)(),Jt=(0,te.useRef)(),kn=(0,te.useRef)(),In=(0,te.useRef)(),Qt=(0,te.useRef)(),Mn=navigator.userAgent.toLowerCase().match(_e),Wn=Mn?Mn[0]:"pc",zn=(0,te.useRef)(!1),at=(0,ae.eY)();let Oe=0,ke=0,Be=0,Ne=null,we=!1,rt=20,It=1,Ct=!1,$t=!1,Vt=[];(0,te.useImperativeHandle)(zt,()=>({getLastUpdatedTime:()=>tt.current.currentTime,getDuration:()=>tt.current.duration})),Se.ZP.config({maxCount:1,getContainer:()=>Ut.current});const wt=(0,te.useCallback)((Zn,Yn=!1)=>{let pr={point:tt.current.currentTime};Ne?(pr.log_id=Ne,pr.watch_duration=ye(Vt),pr.total_duration=ke):(Ee?(pr.video_id=parseInt(Te,10),pr.course_id=Ee):pr.video_id=Te,pr.duration=Oe,pr.device=Wn),Yn&&(pr.ed="1");function ti(){return he(this,null,function*(){Ct=!0,Ne=yield ze==null?void 0:ze(pr),Ct=!1,Zn&&Zn()})}ti()},[Te,Ee]);(0,te.useEffect)(()=>{tt.current&&(nt.current.style.display="none",Ge.current.style.display="block"),Se.ZP.destroy();let Zn=null;return Ce.Z.isSupported&&Ze&&Fe&&(Fe==null?void 0:Fe.indexOf(".m3u8"))<0?(Zn=Ce.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:Fe,muted:!1}),tt.current&&(Zn.attachMediaElement(tt.current),Zn.load())):tt.current.setAttribute("src",Fe),Dt(),()=>{Zn&&(Zn.unload(),Zn.pause(),Zn.destroy(),Zn=null)}},[tt,Ze,Fe]);function on(){tt.current.paused?(nt.current.style.display="none",Ge.current.style.display="block"):(nt.current.style.display="block",Ge.current.style.display="none")}function Dt(){Jt.current.style.display="none",In.current.style.display="none",kn.current.style.display="none",tt.current.muted||tt.current.volume===0?Jt.current.style.display="block":tt.current.volume>0&&tt.current.volume<=.5?In.current.style.display="block":kn.current.style.display="block"}(0,te.useEffect)(()=>{const Zn=document.getElementById("play"),Yn=document.querySelectorAll(".playback-icons use");function pr(){De(),be&&!zn.current&&(tt.current.currentTime=be),zn.current=!0,Vt.push(tt.current.currentTime),we||(we=!0,$e&&wt())}function ti(){return he(this,null,function*(){on(),Vt.push(tt.current.currentTime),$e&&wt(()=>{Ne=null,Be=0,we=!1,Ct=!1,$t=!1,Vt=[],ke=0,It=1},!0),dt()})}function Pn(){jt.current.value=Math.round(tt.current.currentTime),yn.current.value=Math.round(tt.current.currentTime)}function Or(){const li=me(Math.round(tt.current.currentTime));Tt.current.innerText=`${li.hour>0?li.hour+":":""}${li.minutes}:${li.seconds}`,Tt.current.setAttribute("datetime",`${li.hour>0?" "+li.hour+" ":""}${li.minutes}m ${li.seconds}s`)}function Br(){var li,rn,nr,dr,rr,Jr,Ar;const Mr=Math.round((li=tt.current)==null?void 0:li.duration);(nr=(rn=jt.current)==null?void 0:rn.setAttribute)==null||nr.call(rn,"max",Mr),(rr=(dr=yn.current)==null?void 0:dr.setAttribute)==null||rr.call(dr,"max",Mr);const tr=me(Mr);ln.current&&(ln.current.innerText=`${tr.hour>0?tr.hour+":":""}${tr.minutes}:${tr.seconds}`,(Ar=(Jr=ln.current).setAttribute)==null||Ar.call(Jr,"datetime",`${tr.hour>0?" "+tr.hour+" ":""}${tr.minutes}m ${tr.seconds}s`))}function Di(){try{const li=Math.round(tt.current.duration);jt.current.setAttribute("max",li),yn.current.setAttribute("max",li);const rn=me(li);ln.current.innerText=`${rn.hour>0?rn.hour+":":""}${rn.minutes}:${rn.seconds}`,ln.current.setAttribute("datetime",`${rn.hour>0?" "+rn.hour+" ":""}${rn.minutes}m ${rn.seconds}s`),Pn(),Or();const{width:nr,height:dr,x:rr,y:Jr}=ft.current.getBoundingClientRect();if(rr<0||Jr<0||!nr)return;if(!$t){let Ar=tt.current.currentTime,Mr=Ar-Be;Math.abs(Mr)<10?(ke+=Math.abs(Mr),Be=Ar,Ct||ke-It*rt>=0&&(It++,Vt.push(Be),$e&&wt())):(Be=Ar,$e&&wt())}}catch(li){console.log(li)}}function mi(){$t=!0}function ci(){tt.current.playing&&Vt.push(tt.current.currentTime,Be),Be=tt.current.currentTime,$t=!1}function Fr(){Oe=tt.current.duration,Oe<=20&&(rt=Oe/3),tt.current.addEventListener("play",pr)}function zr(li){li.preventDefault(),(0,re.vp)()?(tt.current.style.width="100%",tt.current.style.height="100%"):tt.current.style.cssText=""}function Fi(){Re()}function ko(li){if(!ve){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const rn=li.target.dataset.seek?li.target.dataset.seek:li.target.value;tt.current.currentTime=rn,yn.current.value=rn,jt.current.value=rn}function aa(li){const rn=Math.round(li.offsetX/li.target.clientWidth*parseInt(li.target.getAttribute("max"),10));jt.current.setAttribute("data-seek",rn);const nr=me(rn);Lt.current.textContent=`${nr.hour>0?nr.hour+":":""}${nr.minutes}:${nr.seconds}`;const dr=tt.current.getBoundingClientRect();Lt.current.style.left=`${li.pageX-dr.left}px`}function Wo(li){switch(li.code){case"Space":li.preventDefault(),bn();break;case"ArrowRight":if(li.preventDefault(),!ve){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(tt.current.currentTime>=tt.current.duration)break;tt.current.currentTime=parseInt(tt.current.currentTime)+5,Pn();break;case"ArrowLeft":if(li.preventDefault(),!ve){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(tt.current.currentTime===0)break;tt.current.currentTime=parseInt(tt.current.currentTime)-5,Pn();break;case"ArrowUp":li.preventDefault(),tt.current.volume<1&&(tt.current.volume=(parseInt(tt.current.volume*10)+1)/10);break;case"ArrowDown":li.preventDefault(),tt.current.volume>0&&(tt.current.volume=(parseInt(tt.current.volume*10)-1)/10);break}}return Ut.current.addEventListener((0,re.gH)(),zr),tt.current.addEventListener("canplay",Fr),tt.current.addEventListener("ended",ti),tt.current.addEventListener("seeking",mi),tt.current.addEventListener("seeked",ci),tt.current.addEventListener("loadedmetadata",Br),jt.current.addEventListener("mousemove",aa),jt.current.addEventListener("input",ko),tt.current.addEventListener("timeupdate",Di),tt.current.addEventListener("pause",Fi),tt.current.addEventListener("volumechange",Dt),document.addEventListener("keydown",Wo),()=>{var li,rn,nr,dr,rr,Jr,Ar,Mr,tr,Zt,Ot,ge;(li=tt.current)==null||li.removeEventListener("canplay",Fr),(rn=tt.current)==null||rn.removeEventListener("play",pr),(nr=tt.current)==null||nr.removeEventListener("ended",ti),(dr=tt.current)==null||dr.removeEventListener("seeking",mi),(rr=tt.current)==null||rr.removeEventListener("seeked",ci),(Jr=jt.current)==null||Jr.removeEventListener("mousemove",aa),(Ar=jt.current)==null||Ar.removeEventListener("input",ko),(Mr=tt.current)==null||Mr.removeEventListener("timeupdate",Di),(tr=tt.current)==null||tr.removeEventListener("pause",Fi),(Zt=tt.current)==null||Zt.removeEventListener("loadedmetadata",Br),(Ot=tt.current)==null||Ot.removeEventListener("volumechange",Dt),document.removeEventListener("keydown",Wo),(ge=tt.current)!=null&&ge.playing&&(Vt.push(Be,tt.current.currentTime),$e&&wt())}},[tt,Fe]),(0,te.useEffect)(()=>{if(tt.current.onended=()=>{et(tt)},tt.current.oncontextmenu=()=>!1,(Fe==null?void 0:Fe.indexOf(".m3u8"))>-1){if(tt.current.canPlayType("application/vnd.apple.mpegurl"))tt.current.src=Fe;else if(fe().isSupported()){var Zn=new(fe());Zn.loadSource(Fe),Zn.attachMedia(tt.current)}}},[Fe]);const[Xt,nn]=(0,te.useState)(1),bn=()=>{tt.current.paused||tt.current.ended?tt.current.play():tt.current.pause(),on()};function en(){tt.current.muted=!tt.current.muted,tt.current.muted?(Qt.current.setAttribute("data-volume",volume.value),Qt.current.value=0):Qt.current.value=Qt.current.dataset.volume}return te.createElement("div",{style:{position:"relative"},ref:Ut},te.createElement("div",{ref:ft,className:`${de.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${de.animate__loop}`},Ke&&at?at.login:" "),te.createElement("div",{className:de.container},te.createElement("div",{className:de["video-container"],id:"video-container"},te.createElement("div",{className:de["playback-animation"],id:"playback-animation"},te.createElement("svg",{className:de["playback-icons"]},te.createElement("use",{className:"hidden",href:"#play-icon"}),te.createElement("use",{href:"#pause"}))),te.createElement("video",{className:de.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:tt,autoPlay:Ye}),te.createElement("div",{className:`${de["video-controls"]} `,id:"video-controls"},te.createElement("div",{className:de["bottom-controls"]},te.createElement("div",{className:de["left-controls"]},te.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:bn},te.createElement("svg",{className:de["playback-icons"]},te.createElement("use",{ref:Ge,href:"#play-icon"}),te.createElement("use",{ref:nt,style:{display:"none"},href:"#pause"}))),te.createElement("div",{className:de.time},te.createElement("time",{id:"time-elapsed",ref:Tt},"00:00"),te.createElement("span",null," / "),te.createElement("time",{id:"duration",ref:ln},"00:00"))),te.createElement("div",{className:de["right-controls"]},ve&&te.createElement(Le.Z,{placement:"top",overlayClassName:de.rateOverlay,getPopupContainer:Zn=>Zn.parentNode,menu:{items:[{key:"1",label:te.createElement("span",{onClick:()=>{nn(1),tt.current.playbackRate=1}},"1.0x")},{key:"2",label:te.createElement("span",{onClick:()=>{nn(1.5),tt.current.playbackRate=1.5}},"1.5x")},{key:"3",label:te.createElement("span",{onClick:()=>{nn(2),tt.current.playbackRate=2}},"2.0x")}]}},te.createElement("div",{className:`${de.controlText} mr5`},"\u500D\u901F")),te.createElement(le.CopyToClipboard,{text:Fe,onCopy:()=>Se.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},te.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),te.createElement("div",{className:de["volume-controls"]},te.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:de["volume-button"],id:"volume-button",onClick:en},te.createElement("i",{ref:Jt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),te.createElement("i",{ref:In,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),te.createElement("i",{ref:kn,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),te.createElement("input",{className:de.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Qt,style:{display:"none"},onClick:Dt})),te.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:de["fullscreen-button"],onClick:()=>{(0,re.vp)()?(0,re.BU)():(0,re.Dj)(Ut.current)}},te.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),te.createElement("div",{className:de["video-progress"]},te.createElement("progress",{ref:yn,value:"0",min:"0"}),te.createElement("input",{className:de.seek,ref:jt,value:"0",min:"0",type:"range",step:"1"}),te.createElement("div",{className:de["seek-tooltip"],ref:Lt,id:"seek-tooltip"},"00:00"))))),te.createElement("svg",{style:{display:"none"}},te.createElement("defs",null,te.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},te.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),te.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},te.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),te.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},te.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),te.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},te.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),te.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},te.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),te.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},te.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),te.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},te.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),te.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},te.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},71865:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ce}});var te=ee(67294),Se=ee(33054),Le=ee(99398),Ce=()=>{const[ce,fe]=(0,te.useState)(""),[ae,le]=(0,te.useState)(0);let[re,de]=(0,te.useState)(),[he,me]=(0,te.useState)();const[se,ye]=(0,te.useState)(!1),_e=(0,te.useRef)("");(0,te.useEffect)(()=>Se.Z.subscribe("preview-image",et=>{fe(et),console.log(be.current),document.body.style.overflow="hidden"}),[]),(0,te.useEffect)(()=>(document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)}),[]),(0,te.useEffect)(()=>{_e.current=ce},[ce]);function Me(De){De.keyCode==27&&_e.current&&ve()}function ve(){document.body.style.overflow="auto",de(void 0),me(void 0),le(0),fe("")}function Fe(){le(ae+90)}function $e(){re=be.current.width*1.1,he=be.current.height*1.1,me(he),de(re)}function Te(){re=be.current.width/1.1,he=be.current.height/1.1,me(he),de(re)}const ze=(0,te.useRef)(),Ee=(0,te.useRef)(),be=(0,te.useRef)(),Re=De=>{(De.nativeEvent.target===ze.current||De.nativeEvent.target===Ee.current)&&ve()};return te.createElement(te.Fragment,null,ce?te.createElement("div",null,te.createElement("div",{className:"preview-wrp-group",ref:Ee},te.createElement(Le.Z,{className:"image-preview",src:ce,style:{display:"none"},preview:{visible:!0,src:ce,movable:!1,onVisibleChange:De=>{fe("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},57444:function(dn,St,ee){"use strict";ee.d(St,{h:function(){return ze}});var te=ee(67294),Se=ee(11713),Le=ee(22150),Ce=ee(71577),ce=ee(4631),fe=ee.n(ce),ae=ee(71749),le=ee(30483),re=Object.defineProperty,de=Object.defineProperties,he=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,_e=(Ee,be,Re)=>be in Ee?re(Ee,be,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ee[be]=Re,Me=(Ee,be)=>{for(var Re in be||(be={}))se.call(be,Re)&&_e(Ee,Re,be[Re]);if(me)for(var Re of me(be))ye.call(be,Re)&&_e(Ee,Re,be[Re]);return Ee},ve=(Ee,be)=>de(Ee,he(be));const Fe=Se.default.Option,$e={labelCol:{span:4},wrapperCol:{span:20}},Te={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"]};St.Z=({callback:Ee,onCancel:be})=>{const[Re,De]=(0,te.useState)("python");function et(dt){De(Te[dt][1])}function Ye(dt){Ee(dt)}return te.createElement(Le.default,ve(Me({},$e),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ye,style:{width:500}}),te.createElement(Le.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},te.createElement(Se.default,{getPopupContainer:dt=>dt.parentNode,onChange:et},Object.keys(Te).map(dt=>te.createElement(Fe,{key:dt,value:dt},Te[dt][0])))),te.createElement(Le.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},te.createElement(ze,{mode:Re})),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ce.ZP,{type:"ghost",onClick:be},"\u53D6\u6D88")))};function ze({value:Ee,onChange:be,mode:Re,options:De={}}){const et=(0,te.useRef)(),[Ye,dt]=(0,te.useState)();return(0,te.useEffect)(()=>{if(Ye){let Ke=function(zt){const pt=zt.getValue();be&&be(pt)};return Ye.on("change",Ke),()=>{Ye.off("change",Ke)}}},[Ye,be]),(0,te.useEffect)(()=>{Ye&&Ye.setOption("mode",Re)},[Ye,Re]),(0,te.useEffect)(()=>{Ye&&(Ee!==Ye.getValue()||Ee==="")&&setTimeout(()=>{Ye.setValue(Ee||"")},300)},[Ye,Ee]),(0,te.useEffect)(()=>{if(et.current&&!Ye){const Ke=fe().fromTextArea(et.current,Me({mode:Re,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));dt(Ke)}},[et.current,Ye]),te.createElement("div",{className:"my-codemirror-container"},te.createElement("textarea",{ref:et}))}},91304:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Mr}});var te=ee(67294),Se=ee(4631),Le=ee.n(Se),Ce=ee(91033),ce=ee(71749),fe=ee(57341),ae=ee(82801),le=ee(88386),re=ee(49047),de=ee(80785),he=ee(35598),me=({value:tr="",className:Zt,showTextOnly:Ot,showLines:ge,style:Ie={}})=>{const Ae=(0,te.useMemo)(()=>"",[tr]);return te.createElement(te.Fragment,null,te.createElement("div",{dangerouslySetInnerHTML:{__html:Ae}}))},se=ee(67294),ye=Object.defineProperty,_e=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Te=(tr,Zt,Ot)=>Zt in tr?ye(tr,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):tr[Zt]=Ot,ze=(tr,Zt)=>{for(var Ot in Zt||(Zt={}))Fe.call(Zt,Ot)&&Te(tr,Ot,Zt[Ot]);if(ve)for(var Ot of ve(Zt))$e.call(Zt,Ot)&&Te(tr,Ot,Zt[Ot]);return tr},Ee=(tr,Zt)=>_e(tr,Me(Zt));let be=[{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 Re({onActionCallback:tr,title:Zt,icon:Ot,actionName:ge,className:Ie="",children:Ae}){function We(){tr(ge)}return se.createElement("a",{title:Zt,className:Ie,onClick:We},se.createElement("i",{className:`${Ot}`}),Ae)}var De=({watch:tr,showNullButton:Zt,showNullProgramButton:Ot,onActionCallback:ge,fullScreen:Ie,insertTemp:Ae,hidetoolBar:We,extraUse:it})=>{const xt=[...be,{title:`${tr?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${tr?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return se.createElement("ul",{className:"markdown-toolbar-container"},!We&&xt.map((Ft,an)=>se.createElement("li",{key:an},Ft.actionName?se.createElement(Re,Ee(ze({},Ft),{onActionCallback:ge})):se.createElement("span",{className:"v-line"}))),Zt?se.createElement("li",null,se.createElement(Re,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ge},se.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Ot?se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement(Re,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:ge},se.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),se.createElement("li",null,se.createElement(Re,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:ge},se.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Ae&&se.createElement("li",null,se.createElement(Re,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Ae}`,onActionCallback:ge},se.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),it&&se.createElement("li",null,it),se.createElement("li",{className:"btn-full-screen"},se.createElement(Re,{icon:`${Ie?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ie?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ge})))},et=ee(76621),Ye=ee(22150),dt=ee(69677),Ke=ee(71577),zt=Object.defineProperty,pt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Ut=(tr,Zt,Ot)=>Zt in tr?zt(tr,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):tr[Zt]=Ot,nt=(tr,Zt)=>{for(var Ot in Zt||(Zt={}))tt.call(Zt,Ot)&&Ut(tr,Ot,Zt[Ot]);if(Ze)for(var Ot of Ze(Zt))ft.call(Zt,Ot)&&Ut(tr,Ot,Zt[Ot]);return tr},Ge=(tr,Zt)=>pt(tr,Kt(Zt));const jt={labelCol:{span:4},wrapperCol:{span:20}};var yn=({callback:tr,onCancel:Zt})=>{function Ot(ge){tr(ge)}return te.createElement(Ye.default,Ge(nt({},jt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ot,style:{width:500}}),te.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},te.createElement(dt.default,null)),te.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},te.createElement(dt.default,null)),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ke.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},ln=ee(57444),Tt=ee(70859),Lt=ee(14446),Jt=ee(71230),kn=ee(63205),In=ee(67294),Qt=({callback:tr,onCancel:Zt})=>{const Ot=document.createElement("canvas"),ge=Ot.getContext("2d");Ot.width=1e3,Ot.height=800,ge.fillStyle="#ffffff",ge.fillRect(0,0,Ot.width,Ot.height);const Ie=Ot.toDataURL("image/png");return In.createElement(Lt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},In.createElement(Jt.Z,{style:{height:"100vh"}},In.createElement(kn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ie,visible:!0,title:String(Date.now())},onOk:Ae=>{tr({src:Ae.url})},onClose:Zt})))},Mn=ee(72565),Wn=ee(15746),zn=ee(2453),at={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Oe=ee(67294),Be=(0,te.forwardRef)(({onCancel:tr,editImgId:Zt,callback:Ot},ge)=>{let Ie=(0,te.useRef)(),Ae=(0,te.useRef)(),We=(0,te.useRef)(),it=(0,te.useRef)(!1);const xt=(0,te.useRef)(!1);console.log("ref:",ge);const[Ft,an]=(0,te.useState)(0),[Rn,mr]=(0,te.useState)("100vh");return(0,te.useEffect)(()=>{an(1);try{indexedDB.databases().then(or=>{or.forEach(cr=>indexedDB.deleteDatabase(cr.name))})}catch(or){}},[]),(0,te.useImperativeHandle)(ge,()=>({setHeight:mr})),Oe.createElement("div",{ref:xt,className:"body-overflow-initial"},Oe.createElement(Mn.Z,{width:"100vw",height:Rn,footer:null,closable:!0,placement:"bottom",open:!!Ft,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${at.drawerWrap}`,onClose:()=>{window.saveDrawData(or=>{Ot({src:`/api/attachments/${or}`,id:or})})},title:Oe.createElement(Jt.Z,{align:"middle"},Oe.createElement(Wn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Oe.createElement(Wn.Z,{onClick:()=>{mr(Rn==="60px"?"100vh":"60px")}},Oe.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Oe.createElement(Wn.Z,{onClick:()=>{window.saveDrawData(or=>{if(or===null){zn.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}zn.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Ot({src:`/api/attachments/${or}`,id:or,disabledClose:!0})})}},Oe.createElement(Ke.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Oe.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${Zt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Ae})))}),Ne=ee(11320),we=ee(78045),rt=ee(31795);const It=we.ZP.Group,Ct={margin:"0 8px"};var $t=({callback:tr,onCancel:Zt})=>{function Ot(ge){tr(ge)}return te.createElement(Ye.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ot},te.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},te.createElement("span",{style:Ct},"\u5355\u5143\u683C\u6570\uFF1A"),te.createElement("span",{style:Ct},"\u884C\u6570"),te.createElement(Ye.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},te.createElement(rt.Z,null)),te.createElement("span",{style:Ct},"\u5217\u6570"),te.createElement(Ye.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},te.createElement(rt.Z,null))),te.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},te.createElement("span",{style:Ct},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),te.createElement(Ye.default.Item,{name:"align"},te.createElement(It,null,te.createElement(we.ZP,{value:"default"},te.createElement("i",{className:"fa fa-align-justify"})),te.createElement(we.ZP,{value:"left"},te.createElement("i",{className:"fa fa-align-left"})),te.createElement(we.ZP,{value:"center"},te.createElement("i",{className:"fa fa-align-center"})),te.createElement(we.ZP,{value:"right"},te.createElement("i",{className:"fa fa-align-right"}))))),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Ke.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},Vt=ee(47897),wt=ee(61016),on=ee.n(wt),Xt=(0,te.forwardRef)(({use3d:tr,width:Zt,height:Ot,callback:ge,showSaveButton:Ie},Ae)=>{const We=(0,te.useRef)(),it=(0,te.useRef)(),[xt,Ft]=(0,te.useState)(!1),an=(0,te.useRef)({id:We,appName:"graphing",width:Zt||1e3,height:Ot||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,te.useEffect)(()=>{it.current=new(on())(an.current,!0),window.onload=function(){it.current.inject("applet_container")}},[]);const Rn=()=>{var mr=window.ggbApplet.getPNGBase64(1,!0,72);return ge&&ge(mr),mr};return(0,te.useEffect)(()=>{an.current.appName=xt?"3D":"graphing",it.current.inject("applet_container")},[xt]),(0,te.useEffect)(()=>{Ft(tr)},[tr]),(0,te.useImperativeHandle)(Ae,()=>({getImgData:Rn})),te.createElement(te.Fragment,null,te.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:We}),te.createElement(Jt.Z,{align:"middle"},te.createElement(Wn.Z,{flex:1},te.createElement(Vt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:xt,onChange:mr=>Ft(mr)})),te.createElement(Wn.Z,null,te.createElement(Ke.ZP,{size:"large",onClick:Rn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),nn=ee(36527),bn=ee(25934);const en="link",Zn="upload-image",Yn="add-flowchart",pr="draw-image",ti="add-flowchart",Pn="code-block",Or="add-table",Br="------------",Di={default:Br,left:`:${Br}`,center:`:${Br}:`,right:`${Br}:`};var mi=ee(99914),ci=(tr,Zt,Ot)=>new Promise((ge,Ie)=>{var Ae=xt=>{try{it(Ot.next(xt))}catch(Ft){Ie(Ft)}},We=xt=>{try{it(Ot.throw(xt))}catch(Ft){Ie(Ft)}},it=xt=>xt.done?ge(xt.value):Promise.resolve(xt.value).then(Ae,We);it((Ot=Ot.apply(tr,Zt)).next())});function Fr(){}let zr=0;const Fi=1e4,ko="\u2581",aa="@\u2581\u2581@",Wo="@\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`,rn=["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 nr(tr){return/^\d+$/.test(tr)?`${tr}px`:tr}const rr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Jr={[rr+"-B"]:"bold",[rr+"-I"]:"italic"},Ar={[en]:"\u6DFB\u52A0\u94FE\u63A5",[Pn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Zn]:"\u6DFB\u52A0\u56FE\u7247",[pr]:"\u6DFB\u52A0\u753B\u56FE",[Yn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Or]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Mr=({defaultValue:tr="",onChange:Zt,width:Ot="100%",height:ge=400,miniToolbar:Ie=!1,isFocus:Ae=!1,watch:We,insertTemp:it,mode:xt="markdown",id:Ft="markdown-editor-id",showResizeBar:an=!1,noStorage:Rn=!1,showNullButton:mr=!1,showNullProgramButton:or=!1,hidetoolBar:cr=!1,fullScreen:Xn=!1,onBlur:br,onCMBeforeChange:_r,onFullScreen:mn,className:$n="",disablePaste:Vr=!1,disabled:qr=!1,disabledFill:Ir=!1,placeholder:hi="",values:Ni="",extraUse:yr,onAddBlank:bi})=>{const[ar,fo]=(0,te.useState)(null),[qi,ua]=(0,te.useState)(tr),[Jo,bo]=(0,te.useState)(We),[oo,na]=(0,te.useState)(Xn),[Eo,ra]=(0,te.useState)(""),[ea,Ho]=(0,te.useState)(0),[No,Ba]=(0,te.useState)(ge),[Wa,Ia]=(0,te.useState)(!1),Ao=(0,te.useRef)((0,bn.Z)()),pn=(0,te.useRef)(!1),sn=(0,te.useRef)(),[Hn,lr]=(0,te.useState)(0),[Cr,vi]=(0,te.useState)(0),_i=(0,te.useRef)(),ji=(0,te.useRef)(),Xi=(0,te.useRef)(),Ci=(0,te.useRef)(),_o=(0,te.useRef)(),To=(0,te.useRef)(),Ko=()=>ci(void 0,null,function*(){var An;const Dn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ao.current}});(An=Dn==null?void 0:Dn.attachments)!=null&&An.length&&(console.log("cm:",ar,_i),Dn.attachments.map(wn=>{wn.content_type.indexOf("image")>-1?ar.replaceSelection(``):wn.content_type.indexOf("video")>-1?ar.replaceSelection(`<video width="100%" controls src="${Ne.Z.API_SERVER}/api/attachments/${data.id}"></video>`):wn.content_type.indexOf("pdf")>-1?ar.replaceSelection(`<a href="${Ne.Z.API_SERVER}/api/attachments/${wn.id}?type=${wn.content_type}&disposition=inline" target="_blank">${wn.name}</a>`):ar.replaceSelection(`[${wn.name}](${Ne.Z.API_SERVER}/api/attachments/${wn.id}?type=${wn.content_type})`)}))});(0,te.useEffect)(()=>{const An=window.scrollY||window.pageYOffset;ua(Ni),ar==null||ar.setValue(Ni),window.scrollTo(0,An)},[Ni]),(0,te.useEffect)(()=>{mn==null||mn(oo)},[oo]),(0,te.useEffect)(()=>{if(_i.current){let An=function(wn,Un){var vr;if(Vr){Un.preventDefault();return}const er=Un.clipboardData;if(er){const ir=er.types.toString(),fr=er.items;if(ir==="Files"||er.types.indexOf("Files")>-1){if(Un.preventDefault(),xt=="stex")return;try{let _t=fr[1];((vr=fr[0])==null?void 0:vr.kind)==="file"&&(_t=fr[0]);const vt=_t.getAsFile(),Xe=vt.name.split(".").pop();(0,Tt.I)(vt,ot=>{var Nt,Pt,qt;ot.id?((Nt=vt==null?void 0:vt.type)==null?void 0:Nt.indexOf("image"))>-1?Dn.replaceSelection(`<img width="100%" src="/api/attachments/${ot.id}?type=${ot.content_type})" alt="" />`):((Pt=vt==null?void 0:vt.type)==null?void 0:Pt.indexOf("video"))>-1?Dn.replaceSelection(`<video width="100%" controls src="/api/attachments/${ot.id}"></video>`):((qt=vt==null?void 0:vt.type)==null?void 0:qt.indexOf("pdf"))>-1?Dn.replaceSelection(`<a href="/api/attachments/${ot.id}?type=${vt.type}&disposition=inline" target="_blank">${vt.name}</a>`):rn.includes(Xe)?Dn.replaceSelection(`<a href="/api/attachments/${ot.id}?type=office&disposition=inline" target="_blank">${vt.name}</a>`):Dn.replaceSelection(`[${vt.name}](/api/attachments/${ot.id}?type=${ot.content_type})`):(ot==null?void 0:ot.status)===401&&(zn.ZP.warning((ot==null?void 0:ot.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(_t){zn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Dn=Le().fromTextArea(_i.current,{mode:xt,lineNumbers:!Ie,lineWrapping:!0,value:tr,autoCloseTags:!or,autoCloseBrackets:!0});return Dn.on("keyup",function(wn,Un){Un.keyCode===8&&(wn.getValue()==""?Dn.setOption("placeholder",hi):Dn.setOption("placeholder",null))}),Dn.on("keydown",function(wn,Un){if(Un.keyCode===8){var vr=Bn(wn);vr&&Un.preventDefault()}}),Ae&&Dn.focus(),Dn.on("paste",An),Dn.on("dragleave",function(wn,Un){ji.current.classList.remove("mouse-hover-md")}),qr&&Dn.on("beforeChange",function(wn,Un){(Un.origin==="paste"||Un.origin==="+input")&&Un.cancel()}),fo(Dn),()=>{Dn.off("paste",An)}}},[]);const Tn=(0,te.useCallback)(()=>{if(ji.current)try{}catch(An){console.log(An,"---- to set md editor body height")}},[No,ji,oo]);(0,te.useEffect)(()=>{function An(){let Dn=new Ce.Z(wn=>{for(let Un of wn)(Un.target.offsetHeight>0||Un.target.offsetWidth>0)&&(Tn(),ar.setSize("100%","100%"),ar.refresh())});return Dn.observe(_i.current.parentElement),Dn}if(ar){const Dn=An();return()=>{var wn,Un;(wn=_i.current)!=null&&wn.parentElement&&Dn.unobserve((Un=_i.current)==null?void 0:Un.parentElement)}}},[ar,Tn]),(0,te.useEffect)(()=>{if(ar){let An=[];for(const[Dn,wn]of Object.entries(Jr)){let Un={[Dn]:()=>{Qn(wn)}};An.push(Un),ar.addKeyMap(Un)}return sn.current=setInterval(()=>{pn.current&&Ko()},4e3),()=>{clearInterval(sn.current);for(let Dn of An)ar.removeKeyMap(Dn)}}},[ar]),(0,te.useEffect)(()=>{Xn!==oo&&na(Xn)},[Xn]),(0,mi.Z)(()=>{if(!Rn&&ea>0){let An=new Date().getTime(),Dn=window.sessionStorage.getItem(Ft);An>=ea+Fi&&(!Dn||Dn!==qi)&&(window.sessionStorage.setItem(Ft,qi),Ia(!0))}},Fi),(0,te.useEffect)(()=>{bo(We)},[ar,We]),(0,te.useEffect)(()=>{ar&&Ae&&ar.focus()},[ar,Ae]),(0,te.useEffect)(()=>{if(Jo&&ar){let An=function(wn){let Un=wn.target;if(Ci.current){let vr=Un.scrollTop/Un.scrollHeight;Ci.current.scrollTop=Ci.current.scrollHeight*vr}};const Dn=ar.getScrollerElement();return Dn.addEventListener("scroll",An),()=>{Dn.removeEventListener("scroll",An)}}},[ar,Jo]),(0,te.useEffect)(()=>{if(ar&&_r){let An=function(Dn,wn){_r(Dn,wn)};return ar.on("beforeChange",An),()=>{ar.off("beforeChange",An)}}},[ar,_r]),(0,te.useEffect)(()=>{if(ar&&br){let An=function(){br(ar.getValue())};return ar.on("blur",An),()=>{ar.off("blur",An)}}},[ar,br]);function Bn(An,Dn){var wn=An.getDoc(),Un=wn.getCursor(),vr=wn.getLine(Un.line),er=vr.charAt(Un.ch-1),ir=vr.lastIndexOf("@\u2581@",Un.ch),fr=vr.lastIndexOf("@\u2581\u2581@",Un.ch),_t=ir>fr?ir:fr,vt=ir>fr?3:4;if(aa.indexOf(er)===-1)return null;if(console.log("change1:",Dn,An,vr,Un,_t,ir,fr,er),_t>=0&&Un.ch-_t<5){var Xe=_t+vt;return wn.replaceRange("",{line:Un.line,ch:_t},{line:Un.line,ch:Xe}),{line:Un.line,ch:Xe}}return null}(0,te.useEffect)(()=>{if(ar){let An=function(Dn,wn){const Un=Dn.getValue();ua(Un),Ho(new Date().getTime()),Dn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Zt&&(or?Zt(Un,tn(Un)):Zt(Un))};return ar.on("change",An),()=>{ar.off("change",An)}}},[ar,Zt]),(0,te.useEffect)(()=>{if(ar)if(tr==null)ar.setValue(""),ua("");else{const An=window.scrollY||window.pageYOffset;tr!==ar.getValue()&&(ar.setValue(tr),ua(tr),ar.setCursor(qr?1:ar.lineCount(),0),window.scrollTo(0,An))}},[ar,tr]);const Qn=(0,te.useCallback)(An=>{const Dn=ar.getCursor(),wn=ar.getSelection();let Un=wn.split(`
|
|
|
`);switch(An){case"bold":return ar.replaceSelection("**"+wn+"**"),wn===""&&ar.setCursor(Dn.line,Dn.ch+2),ar.focus();case"italic":return ar.replaceSelection("*"+wn+"*"),wn===""&&ar.setCursor(Dn.line,Dn.ch+1),ar.focus();case"code":return ar.replaceSelection("`"+wn+"`"),wn===""&&ar.setCursor(Dn.line,Dn.ch+1),ar.focus();case"inline-latex":return ra("inline-latex"),ar.focus();case"latex":return ar.replaceSelection("```latex\n"+wn+"\n```"),ar.setCursor(Dn.line+1,wn.length+1),ar.focus();case"line-break":return ar.replaceSelection(`<br/>
|
|
|
`),ar.focus();case"list-ul":return wn===""?ar.replaceSelection("- "+wn):ar.replaceSelection(Un.map(vr=>vr===""?"":`- ${vr}`).join(`
|
|
|
`)),ar.focus();case"list-ol":return wn===""?ar.replaceSelection("1. "+wn):ar.replaceSelection(Un.map((vr,er)=>vr===""?"":`${er+1}. ${vr}`).join(`
|
|
|
`)),ar.focus();case"add-null-ch":bi==null||bi();return;case"add-signal":return wn===""&&ar.setCursor(Dn.line,Dn.ch),ar.replaceSelection(Wo),ar.focus();case"add-multiple":return wn===""&&ar.setCursor(Dn.line,Dn.ch),ar.replaceSelection(aa),ar.focus();case"inster-template-1":return wn===""&&ar.setCursor(Dn.line,Dn.ch),ar.replaceSelection(li),ar.focus();case"eraser":return ar.setValue(""),ar.focus();case"trigger-watch":return bo(!Jo),ar.focus();case"trigger-full-screen":return na(!oo),ar.focus();case en:ra(en);return;case Pn:ra(Pn);return;case Zn:ra(Zn);return;case pr:ra(pr);return;case"maths-latex":ra("maths-latex");return;case Yn:_o.current="",sessionStorage.removeItem("file_id"),ra(Yn);return;case Or:ra(Or);return;default:throw new Error}},[ar,Jo,oo]),He=(0,te.useCallback)((An,Dn)=>{var wn,Un,vr,er,ir,fr;ra("");const{src:_t,alt:vt,id:Xe}=An||{};switch(Eo){case en:const{title:hn,link:gn}=An;return ar.replaceSelection(`[${hn}](${gn})`),ar.focus();case Pn:const{language:Nn,content:On}=An;return ar.replaceSelection(["```"+Nn,On,"```"].join(`
|
|
|
`)),ar.focus();case"maths-latex":for(var ot=atob(An),Nt=new Uint8Array(ot.length),Pt=0;Pt<ot.length;Pt++)Nt[Pt]=ot.charCodeAt(Pt);var qt=new Blob([Nt],{type:"image/png"});(0,Tt.I)(qt,Ur=>{Ur.id?ar.replaceSelection(``):(Ur==null?void 0:Ur.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":ar.replaceSelection("`$$"+An+"$$`");break;case ti:if(!Xe)return;ar.focus(),ar.getValue().indexOf(_t)===-1?ar.replaceSelection(`<center><img id="${Xe}" width="80%" src="${_t}" class="draw-flowchart" alt="${vt||""}" /></center>`):document.getElementById(Xe).src=Ne.Z.API_SERVER+_t+"?t="+Date.now();try{setTimeout(()=>{br(ar.getValue())},100)}catch(Ur){}break;case Zn:case pr:const vn=Dn,Fn=(vr=(Un=(wn=vn==null?void 0:vn.name)==null?void 0:wn.split("."))==null?void 0:Un.pop)==null?void 0:vr.call(Un);return((er=vn==null?void 0:vn.type)==null?void 0:er.indexOf("image"))>-1||!(vn!=null&&vn.type)?vn!=null&&vn.align||vn!=null&&vn.width?ar.replaceSelection(`<p style="text-align:${vn.align||"initial"}"><img width="${vn.width?vn.width+"%":"initial"}" src="${_t}" alt="${vt||""}" /></p>`):ar.replaceSelection(`<img width="100%" src="${_t}" alt="${vt||""}" />`):((ir=vn==null?void 0:vn.type)==null?void 0:ir.indexOf("video"))>-1?ar.replaceSelection(`<video width="100%" controls src="${_t}"></video>`):((fr=vn==null?void 0:vn.type)==null?void 0:fr.indexOf("pdf"))>-1?ar.replaceSelection(`<a href="${_t}?type=${vn.type}&disposition=inline" target="_blank">${vn.name}</a>`):rn.includes(Fn)?ar.replaceSelection(`<a href="${_t}?type=office&disposition=inline" target="_blank">${vn.name}</a>`):ar.replaceSelection(`[${vn.name}](${_t})`),ar.focus();case Or:const{row:Gn,col:xr,align:sr}=An;let Lr=`
|
|
|
`;for(let Ur=0;Ur<Gn;Ur++){let Pr=[],Qr=[];for(let Tr=0;Tr<xr;Tr++)Ur===1&&Qr.push(Di[sr]),Pr.push(" ");Ur===1&&(Lr+=`| ${Qr.join(" | ")} |
|
|
|
`),Lr+=`| ${Pr.join(xr===1?"":" | ")} |
|
|
|
`}return ar.replaceSelection(Lr+`
|
|
|
`),ar.focus();default:throw new Error}},[ar,Eo]),lt=(0,te.useMemo)(()=>{switch(Eo){case en:return te.createElement(yn,{callback:He,onCancel:ut});case Pn:return te.createElement(ln.Z,{callback:He,onCancel:ut});case Zn:return te.createElement(Tt.Z,{callback:He,onCancel:ut});case Yn:return te.createElement(Be,{editImgId:_o.current,callback:He,onCancel:ut});case Or:return te.createElement($t,{callback:He,onCancel:ut});case"maths-latex":return te.createElement(Xt,{showSaveButton:!0,callback:He});case"inline-latex":return te.createElement(nn.Z,{showSaveButton:!0,callback:He});default:return null}},[Eo]);function ut(){ra("")}(0,te.useEffect)(()=>{if(Xi.current){let An=function(ir){vr=!0,er=ir.pageY},Dn=function(){vr=!1},wn=function(ir){if(vr){let fr=ir.pageY-er;fr<0&&(fr=0),fr>300&&(fr=300);let _t=ge+fr+"px";Ba(_t)}},Un=Xi.current,vr=!1,er=0;return Un.addEventListener("mousedown",An),document.addEventListener("mousemove",wn),document.addEventListener("mouseup",Dn),()=>{Un.removeEventListener("mousedown",An),document.removeEventListener("mousemove",wn),document.removeEventListener("mouseup",Dn)}}},[ar,Xi]),(0,te.useEffect)(()=>{Ba(ge)},[ge]);const gt=nr(Ot),yt=nr(No),kt={width:gt,height:yt},At=(0,te.useMemo)(()=>{if(ea){let An=new Date(ea),Dn=An.getHours(),wn=An.getMinutes(),Un=An.getSeconds();return Dn=Dn<10?"0"+Dn:Dn,wn=wn<10?"0"+wn:wn,Un=Un<10?"0"+Un:Un,`${Dn}:${wn}:${Un}`}return 0},[ea]),tn=An=>{const Dn=[];if(or){let wn=-1;An=An.replace(/(@▁▁@|@▁@)/g,function(Un,vr,er){Dn.push({multiLine:Un!==Wo})})}return Dn};function fn(){window.sessionStorage.removeItem(Ft),Ia(!1),Ho(0)}function jn(){Ia(!1),Ho(0),ar.setValue(window.sessionStorage.getItem(Ft))}(0,te.useEffect)(()=>{Ar[Eo]&&Eo!==pr&&Eo!==Yn&&setTimeout(()=>{const An=document.getElementsByClassName("markdown-popup-form")[0],Dn=window.innerWidth/2-An.offsetWidth/2,wn=window.innerHeight/2-An.offsetHeight/2;lr(Dn),vi(wn)},0)},[Eo]);const qn=An=>{An.preventDefault();const Dn=An.clientX-Hn,wn=An.clientY-Cr;document.body.onmousemove=Un=>{let vr=Un.clientX-Dn,er=Un.clientY-wn;const ir=document.getElementsByClassName("markdown-popup-form")[0],fr=window.innerWidth-ir.offsetWidth,_t=window.innerHeight-ir.offsetHeight;vr=Math.max(0,Math.min(vr,fr)),er=Math.max(0,Math.min(er,_t)),Kn(Un.clientX,Un.clientY,Dn,wn)&&(lr(vr),vi(er))},document.body.onmouseup=function(){document.body.onmousemove=null}},Kn=(An,Dn,wn,Un)=>{const vr=document.body.clientHeight,er=document.body.clientWidth;return An<20&&wn>An||An>er-20&&wn<An||Dn<20&&Un>Dn||Dn>vr-20&&Un<Dn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return te.createElement(te.Fragment,null,te.createElement("div",{className:"markdown-editor-wrapper",ref:ji},te.createElement("div",{className:`markdown-editor-container ${$n} ${Jo?"on-preview":""} ${Ie?"mini":""} ${oo?"full-screen":""}`,style:kt},te.createElement(De,{insertTemp:it,watch:Jo,fullScreen:oo,showNullButton:mr,showNullProgramButton:or,onActionCallback:Qn,hidetoolBar:cr,extraUse:yr}),te.createElement("div",{className:"markdown-editor-body"},te.createElement("div",{className:"codemirror-container"},te.createElement("textarea",{ref:_i,placeholder:hi})),Jo?te.createElement("div",{ref:Ci,className:"preview-container"},xt==="stex"&&te.createElement(me,{value:qi}),xt!=="stex"&&te.createElement(he.Z,{edit:!0,disabledFill:Ir,showProgramFill:or,value:qi,openEditor:An=>{var Dn;_o.current=An,(Dn=To.current)==null||Dn.setHeight("100vh"),setTimeout(()=>{ra("add-flowchart")},150)}})):null))),an?te.createElement("a",{ref:Xi,className:"editor-resize"}):null,Eo===pr&&te.createElement(Qt,{callback:He,onCancel:ut}),Eo===Yn&&te.createElement(Be,{ref:To,editImgId:_o.current,callback:He,onCancel:ut}),te.createElement(et.Z,null,Ar[Eo]&&Eo!==pr&&Eo!==Yn?te.createElement(Lt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Hn,top:Cr},title:te.createElement("div",{style:{cursor:"move"},onMouseDown:qn},Ar[Eo]),open:!0,onCancel:ut,footer:null,destroyOnClose:!0,width:Eo===Yn?"1200px":null,height:Eo===Yn?"80vh":null,className:"markdown-popup-form"},lt):null))}},70859:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Re},I:function(){return et}});var te=ee(22150),Se=ee(2453),Le=ee(69677),Ce=ee(93421),ce=ee(31795),fe=ee(78045),ae=ee(71577),le=ee(15476),re=ee(67294),de=ee(52262),he=ee(67294),me=Object.defineProperty,se=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Fe=(Ye,dt,Ke)=>dt in Ye?me(Ye,dt,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ye[dt]=Ke,$e=(Ye,dt)=>{for(var Ke in dt||(dt={}))Me.call(dt,Ke)&&Fe(Ye,Ke,dt[Ke]);if(_e)for(var Ke of _e(dt))ve.call(dt,Ke)&&Fe(Ye,Ke,dt[Ke]);return Ye},Te=(Ye,dt)=>se(Ye,ye(dt));const{useForm:ze}=te.default,Ee={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}};var Re=({callback:Ye,onCancel:dt})=>{const[Ke]=ze();let zt=(0,re.useRef)();function pt(tt){zt.current.width=Ke.getFieldValue("width"),zt.current.align=Ke.getFieldValue("align"),Ye(tt,zt.current)}function Kt(tt,ft){if(tt.status===-1){Se.ZP.error(tt.message);return}Ke.setFieldsValue({src:`/api/attachments/${tt.id}`,type:ft.type})}function Ze(tt){let ft=tt.target.files[0];zt.current=ft,et(ft,Kt)}return he.createElement(te.default,Te($e({form:Ke},be),{className:"upload-image-panel",onFinish:pt,style:{width:470,overflow:"hidden"}}),he.createElement(te.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(te.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},he.createElement(Le.default,{style:Ee})),he.createElement(De,{onFileChange:Ze}))),he.createElement(te.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Le.default,{style:{width:264}})),he.createElement(te.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},he.createElement(Ce.Z,null,he.createElement(te.default.Item,{name:"width",style:{margin:0}},he.createElement(ce.Z,{style:{width:264}})),he.createElement("span",{className:"ml8"},"%"))),he.createElement(te.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},he.createElement(fe.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"}]})),he.createElement("aside",null,he.createElement(te.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},he.createElement(ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(ae.ZP,{type:"default",onClick:dt},"\u53D6\u6D88"))))};function De({onFileChange:Ye}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:Ye}))}function et(Ye,dt){if(!Ye)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,de.bg)())throw Se.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Ke=new FormData;Ke.append("editormd-image-file",Ye),Ke.append("file_param_name","editormd-image-file"),Ke.append("byxhr","true");var zt=new window.XMLHttpRequest;zt.withCredentials=!0,zt.addEventListener("load",function(pt){dt(JSON.parse(pt.target.responseText),Ye)},!1),zt.addEventListener("error",function(pt){console.error(pt)},!1),zt.open("POST",`${le.KI}/api/attachments.json`),zt.send(Ke)}},76621:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Le}});var te=ee(67294),Se=ee(73935);class Le extends te.Component{constructor(ce){super(ce);const fe=window.document;this.node=fe.createElement("div"),fe.body.appendChild(this.node)}render(){const{children:ce}=this.props;return(0,Se.createPortal)(ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},19522:function(dn,St,ee){"use strict";var te=ee(12867),Se=ee(11713),Le=ee(47897),Ce=ee(67294);const ce=Se.default.Option;St.Z=({isTheoretical:fe,onFontSizeChange:ae,cmFontSize:le,cmCodeMode:re,autoFormat:de,onCodeModeChange:he,onTabToSpace:me,onAutoFormat:se,formatDocument:ye,className:_e="",tabToSpace:Me,children:ve,code_editor:Fe,challenge:$e,shixun_environment_id:Te,shixun_environments:ze})=>{var Ee;const be={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Re=(Ee=ze==null?void 0:ze.find(De=>De.shixun_environment_id===Te))==null?void 0:Ee.program_language;return Ce.createElement("div",{className:`tpi-code-setting ${_e}`},Ce.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Ce.createElement("section",null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Ce.createElement(Se.default,{bordered:!1,size:"small",value:re,onChange:he},Ce.createElement(ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Ce.createElement(ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!fe&&Ce.createElement(Ce.Fragment,null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Ce.createElement(Se.default,{bordered:!1,size:"small",value:le,onChange:ae},Ce.createElement(ce,{value:12},"12px"),Ce.createElement(ce,{value:14},"14px"),Ce.createElement(ce,{value:16},"16px"),Ce.createElement(ce,{value:18},"18px"),Ce.createElement(ce,{value:20},"20px"),Ce.createElement(ce,{value:22},"22px"))),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"Tab\u8F6C\u6362"),Ce.createElement(Le.Z,{checked:Me,onChange:me})),Ce.createElement("div",{className:"file-item",onClick:ye},Ce.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!fe&&Ce.createElement(Ce.Fragment,null,Ce.createElement("h3",null,"\u5FEB\u6377\u952E"),Ce.createElement("section",null,Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Ce.createElement("span",null,"Ctrl + S")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Ce.createElement("span",null,"F1 / Alt + F1")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Ce.createElement("span",null,"Ctrl + ]/[")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Ce.createElement("span",null,"Ctrl + Shift + \\")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Ce.createElement("span",null,"Home")),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Ce.createElement("span",null,"End"))),ve),!fe&&Ce.createElement(Ce.Fragment,null,Ce.createElement("h3",null,"\u5FEB\u6377\u952E"),Ce.createElement("section",null,Re&&Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Ce.createElement("span",null,Re)),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Ce.createElement("span",null,be[$e==null?void 0:$e.difficulty])),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Ce.createElement("span",null,Fe==null?void 0:Fe.name)),Ce.createElement("div",{className:"file-item"},Ce.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Ce.createElement("span",null,Fe!=null&&Fe.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},99914:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});var te=ee(67294);function Se(Le,Ce){const ce=(0,te.useRef)();(0,te.useEffect)(()=>{ce.current=Le}),(0,te.useEffect)(()=>{function fe(){ce.current()}if(Ce!==null){let ae=setInterval(fe,Ce);return()=>clearInterval(ae)}},[Ce])}},72971:function(dn,St,ee){"use strict";ee.d(St,{Im:function(){return Ye},ZP:function(){return Ze},gZ:function(){return pt}});var te=ee(67294),Se=ee(69677),Le=ee(71577),Ce=ee(42922),ce=ee(53978),fe=ee(94189),ae=ee(19575),le=ee(7621),re=ee(35598),de=ee(28706),he=ee(38658),me=ee(12320),se=ee(94184),ye=ee.n(se),_e=ee(67294),Me=Object.defineProperty,ve=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ee=(tt,ft,Ut)=>ft in tt?Me(tt,ft,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):tt[ft]=Ut,be=(tt,ft)=>{for(var Ut in ft||(ft={}))Te.call(ft,Ut)&&Ee(tt,Ut,ft[Ut]);if($e)for(var Ut of $e(ft))ze.call(ft,Ut)&&Ee(tt,Ut,ft[Ut]);return tt},Re=(tt,ft)=>ve(tt,Fe(ft));const{TextArea:De}=Se.default,et={visible:!1,tabIndex:"0"},Ye={[fe.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[fe.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[fe.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var dt=(tt=>(tt[tt.SET_VISIBLE=0]="SET_VISIBLE",tt[tt.SET_TABINDEX=1]="SET_TABINDEX",tt))(dt||{});function Ke(tt,ft){switch(ft.type){case 0:return Re(be({},tt),{visible:ft.payload});case 1:return Re(be({},tt),{tabIndex:ft.payload});default:throw new Error}}function zt({value:tt,className:ft}){const[Ut,nt]=(0,te.useState)(!1),Ge=(0,te.useRef)(),jt=(0,te.useRef)();return(0,te.useEffect)(()=>{Ut&&(jt.current.reset(),jt.current.write((0,de.pp)(tt||"")))},[tt,Ut]),(0,te.useEffect)(()=>{var yn,ln,Tt,Lt;if(Ge.current){jt.current=new me.Terminal({fontSize:14,disableStdin:!0}),jt.current.open(Ge.current);const Jt=Ge.current.offsetWidth-14,kn=((Lt=(Tt=(ln=(yn=jt.current)==null?void 0:yn._core)==null?void 0:ln._renderService)==null?void 0:Tt.dimensions)==null?void 0:Lt.actualCellWidth)||9.5,In=Math.ceil(Jt/kn);jt.current.resize(In,8),nt(!0)}},[]),_e.createElement("div",{ref:Ge,className:ye()("XtermText-valueRef",ft)})}function pt(tt){const{status:ft,error_msg:Ut,output:nt,input:Ge,expected_output:jt,is_file:yn,input_file_url:ln,output_file_url:Tt,expected_output_file_url:Lt}=tt;let Jt=null;const kn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ft){case fe.h.NOMATCH:Jt=_e.createElement(_e.Fragment,null,_e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yn&&_e.createElement(zt,{className:"mb10",value:Ge}),yn&&_e.createElement("div",{style:kn},_e.createElement("a",{onClick:()=>(0,de.LR)(ln,Ge)},Ge)),_e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yn&&_e.createElement(zt,{className:"mb10",value:nt&&ae.Base64.decode(nt)||""}),yn&&_e.createElement("div",{style:kn},_e.createElement("a",{onClick:()=>(0,de.LR)(Tt,nt)},nt)),_e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yn&&_e.createElement(zt,{className:"mb10",value:jt&&ae.Base64.decode(jt)||""}),yn&&_e.createElement("div",{style:kn},_e.createElement("a",{onClick:()=>(0,de.LR)(Lt,jt)},jt)));break;case fe.h.EXECUTEFAILURE:Jt=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yn&&_e.createElement(re.Z,{value:Ge,style:kn}),yn&&_e.createElement("div",{style:kn},_e.createElement("a",{onClick:()=>(0,de.LR)(ln,Ge)},Ge)),_e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),_e.createElement("pre",{className:"error"},ae.Base64.decode(Ut)));break;case fe.h.COMPILEFAILURE:Jt=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yn&&_e.createElement(re.Z,{value:Ge,style:kn}),yn&&_e.createElement("div",{style:kn},_e.createElement("a",{onClick:()=>(0,de.LR)(ln,Ge)},Ge)),_e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),_e.createElement("pre",{className:"error"},ae.Base64.decode(Ut)));break;case fe.h.PODFAILURE:Jt=_e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case fe.h.TIMEOUT:Jt=_e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return _e.createElement(_e.Fragment,null," ",Jt," ")}function Kt(tt){const{status:ft,error_msg:Ut,execute_time:nt,output:Ge,input:jt,expected_output:yn,is_file:ln,input_file_url:Tt,output_file_url:Lt,expected_output_file_url:Jt}=tt;let kn=null;switch(ft){case fe.h.OK:kn=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",nt,"\u79D2"),_e.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),_e.createElement("pre",null,ae.Base64.decode(Ge)));break;case fe.h.NOMATCH:kn=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u8F93\u5165\uFF1A",_e.createElement("pre",null,jt)),_e.createElement("p",null,"\u8F93\u51FA\uFF1A",Ge&&ae.Base64.decode(Ge)),_e.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",yn&&ae.Base64.decode(yn)));break;case fe.h.EXECUTEFAILURE:kn=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",_e.createElement("pre",null,jt)),_e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),_e.createElement("pre",{className:"error"},ae.Base64.decode(Ut)));break;case fe.h.COMPILEFAILURE:kn=_e.createElement(_e.Fragment,null,_e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",_e.createElement("pre",null,jt)),_e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),_e.createElement("pre",{className:"error"},ae.Base64.decode(Ut)));break;case fe.h.PODFAILURE:kn=_e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case fe.h.TIMEOUT:kn=_e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return _e.createElement(_e.Fragment,null," ",kn," ")}var Ze=({id:tt,is_file:ft,input:Ut,debuging:nt,submitting:Ge,executingMessage:jt,debugResult:yn,onChangeInput:ln,onDebugCode:Tt,onSubmitCode:Lt})=>{const[Jt,kn]=(0,te.useReducer)(Ke,et),{visible:In,tabIndex:Qt}=Jt;(0,te.useEffect)(()=>{kn({type:0,payload:!1})},[tt]);function Mn(Oe){let ke=Oe.target.id;kn({type:1,payload:ke})}function Wn(){kn({type:0,payload:!In})}const zn=(0,te.useMemo)(()=>{if(yn){const{status:Oe}=yn;return _e.createElement(_e.Fragment,null,Kt(yn))}return null},[yn]);function at(){kn({type:0,payload:!0}),kn({type:1,payload:"1"}),Tt()}return _e.createElement("div",{className:"test-case-panel"},_e.createElement("div",{className:`test-case-panel-body ${In?"active":""}`},_e.createElement("ul",{className:"s-navs"},_e.createElement("li",null,_e.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),_e.createElement(he.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:_e.createElement(De,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:ft?"":Ut,onChange:ln}),rightNode:nt?_e.createElement(le.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):yn?zn:_e.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),_e.createElement("a",{className:`btn-collapse ${In?"up":""}`,onClick:Wn},In?_e.createElement(Ce.Z,null):_e.createElement(ce.Z,null)),_e.createElement("footer",{className:"footer"},_e.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),_e.createElement("div",{className:"flex-container"},_e.createElement(Le.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),_e.createElement(Le.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),_e.createElement(Le.ZP,{className:"btn-green",type:"ghost",loading:nt,onClick:at},"\u8C03\u8BD5\u4EE3\u7801"),_e.createElement(Le.ZP,{type:"primary",className:"custom-ant-disabled",loading:Ge,disabled:Ge,onClick:()=>{kn({type:0,payload:!1}),Lt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},10903:function(dn,St,ee){"use strict";ee.r(St),ee.d(St,{default:function(){return Ka}});var te=ee(67294),Se=ee(53555),Le=ee(32693),Ce=ee(35973),ce=ee(55054),fe=ee(2453),ae=ee(14446),le=ee(57953),re=ee(11713),de=ee(33227),he=ee(60076),me=ee(11320),se=ee(55304),ye=ee(72565),_e=ee(36295),Me=ee(76621),ve=ee(40471),Fe=ee(19522),$e=ee(67294),Te=Object.defineProperty,ze=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,et=(mt,Bt,Wt)=>Bt in mt?Te(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Ye=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Re.call(Bt,Wt)&&et(mt,Wt,Bt[Wt]);if(be)for(var Wt of be(Bt))De.call(Bt,Wt)&&et(mt,Wt,Bt[Wt]);return mt},dt=(mt,Bt)=>ze(mt,Ee(Bt));const Ke={theme:(0,ve.G)("cmCodeMode","vs-dark"),fontSize:(0,ve.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ve.G)("cmTabToSpace",!0)};var zt=(mt=>(mt[mt.set_font_size=0]="set_font_size",mt[mt.set_theme=1]="set_theme",mt[mt.on_tab_to_space=2]="on_tab_to_space",mt[mt.set_show_editor_setting=3]="set_show_editor_setting",mt))(zt||{});function pt(mt,Bt){switch(Bt.type){case 3:return dt(Ye({},mt),{showEditorSetting:Bt.payload});case 1:return dt(Ye({},mt),{theme:Bt.payload});case 0:return dt(Ye({},mt),{fontSize:Bt.payload});case 2:return dt(Ye({},mt),{tabToSpace:Bt.payload});default:throw new Error}}var Kt=({isLoading:mt,value:Bt,onChange:Wt,language:di,onUpdateCode:jr,ActionBarRender:Rr=Kr=>$e.createElement(Ze,{onShowCodeSetting:Kr})})=>{const[Kr,kr]=(0,te.useReducer)(pt,Ke),{theme:Gr,fontSize:Li,showEditorSetting:Fa,tabToSpace:zo}=Kr,Va=(0,te.useRef)(),Lo=(0,te.useRef)(),Ra={onFontSizeChange:qa=>{kr({type:0,payload:qa}),(0,ve.t)("cmFontSize",qa)},tabToSpace:zo,cmFontSize:Li,className:"oj",cmCodeMode:Gr,onTabToSpace:qa=>{kr({type:2,payload:qa}),(0,ve.t)("cmTabToSpace",qa)},onCodeModeChange:qa=>{kr({type:1,payload:qa}),(0,ve.t)("cmCodeMode",qa)}};function Zo(){kr({type:3,payload:!1})}function Ns(){kr({type:3,payload:!0})}const Ta={value:Bt,language:di,theme:Gr,height:"calc(100% - 56px)",options:{fontSize:Li,insertSpaces:zo},onChange:qa=>{Wt(qa),Lo.current=qa,clearTimeout(Va.current),Va.current=setTimeout(()=>{jr(Lo.current)},1e4)},onEditBlur:qa=>{Lo.current&&jr(Lo.current)}};return $e.createElement(te.Fragment,null,$e.createElement("div",{className:"code-panel-container"},Rr(Ns),!mt&&$e.createElement(_e.ZP,Ye({},Ta))),$e.createElement(Me.Z,null,$e.createElement(ye.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Fa,onClose:Zo},$e.createElement(Fe.Z,Ye({},Ra)))))};function Ze({onShowCodeSetting:mt}){return $e.createElement("div",{className:"action-bar"},$e.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),$e.createElement("a",{onClick:mt},$e.createElement("i",{className:"iconfont icon-shezhi"})))}var tt=ee(19575),ft=ee(77969),Ut=ee(72971),nt=ee(69677),Ge=ee(22150),jt=ee(71577);const{TextArea:yn}=nt.default,ln=5e3;var Tt=({callback:mt,onCancel:Bt,notes:Wt})=>{function di(jr){mt(jr)}return te.createElement(Ge.default,{className:"note-form-panel",onFinish:di,initialValues:{notes:Wt}},te.createElement(Ge.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:ln,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${ln}`}]},te.createElement(yn,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),te.createElement(Ge.default.Item,{style:{textAlign:"right"}},te.createElement(jt.ZP,{type:"ghost",onClick:Bt,style:{marginRight:10}}," \u53D6\u6D88 "),te.createElement(jt.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Lt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},Jt={pagination:"pagination___npPu7",info:"info___aRH6C"},kn=ee(9430),In=ee(28452),Qt=ee(3407),Mn=ee(18699),Wn=ee(94189),zn=ee(28706),at=ee(27484),Oe=ee.n(at);const{Column:ke}=kn.default;var Be=({submitResult:mt,submitting:Bt,submitRecords:Wt,page:di,onPageChange:jr,topicId:Rr})=>{const{status:Kr,id:kr,input:Gr,output:Li,expected_output:Fa,is_file:zo,input_file_url:Va,output_file_url:Lo,expected_output_file_url:Ra,error_msg:Zo}=mt||{},{records:Ns,records_count:Ta}=Wt||{},qa=(0,Ce.useParams)();function Hs(){zo?(0,zn.vQ)(tt.Base64.decode(Zo)).then(()=>{fe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):(0,zn.vQ)(tt.Base64.decode(Li)).then(()=>{fe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return te.createElement(le.Z,{spinning:Bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:te.createElement(Qt.Z,{style:{fontSize:24},spin:!0})},kr?te.createElement(te.Fragment,null,te.createElement("ul",{className:Jt.info},te.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",te.createElement("span",{className:Kr===Wn.h.OK?"c-green":"c-red"},Ut.Im[Kr])),te.createElement("li",{className:Jt.error},te.createElement("a",{onClick:Hs},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",te.createElement(Mn.Z,null)," ")),te.createElement("li",null,te.createElement(Ce.Link,{to:`/problems/${Rr}/record-detail/${kr}?backId=${qa==null?void 0:qa.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Kr!==Wn.h.OK?te.createElement(te.Fragment,null,te.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),te.createElement("pre",null,!zo&&Gr,zo&&te.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,zn.LR)(Va,Gr)},Gr)),te.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),te.createElement("pre",null,(Kr===4||Kr===5)&&tt.Base64.decode(Zo),Kr!=4&&Kr!=5&&(zo?te.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,zn.LR)(Lo,Li)},Li):tt.Base64.decode(Li))),te.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),te.createElement("pre",null,!zo&&tt.Base64.decode(Fa),zo&&te.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,zn.LR)(Ra,Fa)},Fa))):null):null,(Ns==null?void 0:Ns.length)>0?te.createElement(kn.default,{dataSource:Ns,rowKey:"id",pagination:!1},te.createElement(ke,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(ba,Ds)=>te.createElement("span",null," ",Oe()(ba).format("YYYY-MM-DD HH:mm:ss"))}),te.createElement(ke,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(ba,Ds)=>{var Ri;return te.createElement(Ce.Link,{className:ba===0?"c-green":"c-red",to:`/problems/${Rr}/record-detail/${Ds.id}?backId=${qa==null?void 0:qa.save_identifier}`},(Ri=Ut.Im[ba])==null?void 0:Ri.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),te.createElement(ke,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),te.createElement(ke,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),te.createElement(ke,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,Ta>15?te.createElement(In.Z,{className:Jt.pagination,current:di,pageSize:15,total:Ta,onChange:jr}):null)},Ne=ee(26194),we=ee(66309),rt=ee(93421),It={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ct=ee(35598),$t=ee(67294);const Vt={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var wt=({hack:mt,onTriggerPraise:Bt,toDiscuss:Wt})=>{const{language:di,difficulty:jr,time_limit:Rr,username:Kr,user_path:kr,user_praise:Gr,comments_count:Li,praises_count:Fa,description:zo,pass_count:Va,submit_count:Lo}=mt,Ra=(0,Ce.useLocation)();console.log(mt.language,"language");const Zo=Vt[jr];return $t.createElement($t.Fragment,null,$t.createElement("ul",{className:It.info},$t.createElement("li",null,"\u96BE\u5EA6\uFF1A",$t.createElement(we.Z,{color:Zo==null?void 0:Zo.color},Zo==null?void 0:Zo.name)),$t.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",$t.createElement("b",null,Rr,"\u79D2"))),$t.createElement(Ct.Z,{value:zo,className:It.desc}),$t.createElement("ul",{className:It["commit-info"]},$t.createElement("li",null,$t.createElement(rt.Z,{size:4},$t.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",$t.createElement("b",null,Va))),$t.createElement("li",null,$t.createElement(rt.Z,{size:4},$t.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",$t.createElement("b",null,Lo))," "),$t.createElement("li",{style:{flex:"1 0 0"}}),$t.createElement("li",null,$t.createElement(rt.Z,{size:4},$t.createElement("i",{className:"iconfont icon-huifu1",onClick:Wt})," ",$t.createElement("b",null,Li))," ")))},on=ee(33054),Dt=Object.defineProperty,Xt=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,en=(mt,Bt,Wt)=>Bt in mt?Dt(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Zn=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))nn.call(Bt,Wt)&&en(mt,Wt,Bt[Wt]);if(Xt)for(var Wt of Xt(Bt))bn.call(Bt,Wt)&&en(mt,Wt,Bt[Wt]);return mt};const Yn=mt=>React.createElement("svg",Zn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var pr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",ti=ee(33170);function Pn(mt){return(0,ti.U2)("comments.json",mt)}function Or(mt){return(0,ti.v_)(`/discusses/${mt}/plus.json`,{container_type:"Discuss",type:1})}function Br(mt){return(0,ti.v_)("comments/reply.json",mt)}function Di(mt){return(0,ti.v_)("comments.json",mt)}function mi(mt){return(0,ti.v_)(`comments/${mt==null?void 0:mt.id}/hidden.json`,mt)}function ci(mt){return(0,ti.IV)(`comments/${mt==null?void 0:mt.id}.json`)}var Fr=ee(93989),zr=ee(52262);function Fi({author:mt}){return te.createElement("a",{href:`/users/${mt.login}`,target:"_blank"},te.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${me.Z.IMG_SERVER}/images/${mt.image_url}`,width:"50"}))}function ko({data:mt,index:Bt,parentDiscussIndex:Wt,user:di,onSetActionType:jr}){const{author:Rr,can_delete:Kr,content:kr,id:Gr,time:Li}=mt;function Fa(){jr({id:Gr,index:Bt,type:"delete-discuss",parentDiscussIndex:Wt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const zo=di.admin||Kr||Rr.user_id===di.user_id;return te.createElement("div",{className:"discuss-item-container second-discuss "},te.createElement(Fi,{author:Rr}),te.createElement("section",null,te.createElement("div",{className:"discuss-info"},te.createElement("a",{href:`/users/${Rr.login}`,target:"_blank"},Rr.name),te.createElement("span",{className:"grey"},Li),te.createElement("div",{className:"btn-group",style:{marginBottom:0}},zo?te.createElement("a",{onClick:Fa,title:"\u5220\u9664"},te.createElement("i",{className:"iconfont icon-shanchu"})):null)),te.createElement(Ct.Z,{className:"discuss-content",value:kr})))}var aa=({user:mt,data:Bt,index:Wt,onPlusDiscuss:di,onSetActionType:jr,activeDiscussIndex:Rr,onReplyDiscuss:Kr,onSetActiveDiscussIndex:kr})=>{const{content:Gr,children:Li,hidden:Fa,id:zo,praise_count:Va,time:Lo,user_praise:Ra,can_delete:Zo,author:Ns}=Bt;console.log(Zo&&(!Li||Li.length==0),"children22");function Ta(){kr(zo)}function qa(){di(zo,!Ra,Wt)}function Hs(){jr({id:zo,index:Wt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function ba(){jr({id:zo,index:Wt,params:{hidden:Fa?"0":"1"},type:"hidden-discuss",message:Fa?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Ds=mt.admin||mt.user_id===Ns.user_id;return te.createElement("div",{className:"discuss-item-container",key:zo},te.createElement(Fi,{author:Ns}),te.createElement("section",null,te.createElement("div",{className:"discuss-info"},te.createElement("a",{href:`/users/${Ns.login}`,target:"_blank"}," ",Ns.name," "),te.createElement("span",{className:"grey"},Lo)),te.createElement(Ct.Z,{className:"discuss-content",value:Gr}),Li&&Li.length>0?te.createElement("div",{className:"reply-discuss-container"},Li.map((Ri,Oa)=>te.createElement(ko,{key:Ri.id,data:Ri,index:Oa,user:mt,onSetActionType:jr,parentDiscussIndex:Wt}))):null,te.createElement("div",{className:"btn-group"},(0,zr.Ny)()?te.createElement("a",{onClick:ba,title:Fa?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},te.createElement("i",{className:Fa?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Zo&&(!Li||Li.length==0)?te.createElement("a",{onClick:Hs,title:"\u5220\u9664"},te.createElement("i",{className:"iconfont icon-shanchu"})):null,te.createElement("a",{onClick:Ta,title:"\u56DE\u590D"}," ",te.createElement("i",{className:"iconfont icon-huifu1"})," "),te.createElement("a",{onClick:qa,className:Ra?"c-orange":""},te.createElement("i",{className:Ra?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),te.createElement("span",null,Va||""))),te.createElement(Fr.Z,{id:zo,activeDiscussIndex:Rr,onReplyDiscuss:Kr})))},Wo=ee(71865),li=ee(91304),rn=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),nr=({user_praise:mt,praise_count:Bt,praisePlus:Wt,onCreateDiscuss:di,discuss_count:jr})=>{const[Rr,Kr]=(0,te.useState)(!1),[kr,Gr]=(0,te.useState)("");function Li(Lo){Gr(Lo)}function Fa(){Kr(!0)}function zo(){Kr(!1)}function Va(){return rn(this,null,function*(){di(kr),Gr(""),Kr(!1)})}return te.createElement("div",{className:`dis-input-editor-container ${Rr?"active":""} `},te.createElement("div",{className:Rr?"text-area hide":"text-area"},te.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Fa}),te.createElement("a",{style:{alignItems:"center"}}," ",te.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",jr," "),te.createElement("a",{className:"c-light-black",onClick:Wt,style:{alignItems:"center"},title:mt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},te.createElement("i",{className:`mr3 ${mt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Bt?te.createElement("span",null,Bt):"")),Rr?te.createElement("div",{className:"input-mask",onClick:zo}):null,te.createElement("div",{className:Rr?"md-container":"md-container hide"},te.createElement(li.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:kr,height:240,onChange:Li}),te.createElement("div",{className:"tip-container",onClick:zo},te.createElement("a",{className:"btn-send",onClick:Va}," \u53D1\u9001 "))))},dr=Object.defineProperty,rr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,Ar=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,Zt=(mt,Bt,Wt)=>Bt in mt?dr(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Ot=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Mr.call(Bt,Wt)&&Zt(mt,Wt,Bt[Wt]);if(Ar)for(var Wt of Ar(Bt))tr.call(Bt,Wt)&&Zt(mt,Wt,Bt[Wt]);return mt},ge=(mt,Bt)=>rr(mt,Jr(Bt)),Ie=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())});const Ae={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var We=(mt=>(mt[mt.GET_DISCUSSES=0]="GET_DISCUSSES",mt[mt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",mt[mt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",mt[mt.PLUS_DISCUSS=3]="PLUS_DISCUSS",mt[mt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",mt[mt.SET_PAGE=5]="SET_PAGE",mt[mt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",mt))(We||{});function it(mt,Bt){switch(Bt.type){case 6:return ge(Ot({},mt),{loading:!0});case 0:return Ot(Ot({},mt),Bt.payload);case 1:return Ot(Ot({},mt),Bt.payload);case 4:return Ot(Ot({},mt),Bt.payload);case 3:return Ot(Ot({},mt),Bt.payload);case 5:return Ot(Ot({},mt),Bt.payload);case 2:return Ot(Ot({},mt),Bt.payload);default:throw new Error}}var xt=({user:mt,identifier:Bt,hack:Wt,onTriggerPraise:di,setDiscussTotal:jr})=>{const[Rr,Kr]=(0,te.useReducer)(it,Ae),{loading:kr,page:Gr,data:Li,count:Fa,actionType:zo,activeDiscussIndex:Va}=Rr;console.log("---",Rr);const Lo=(0,te.useCallback)(()=>Ie(void 0,null,function*(){Kr({type:6});const Ri=yield Pn({container_type:"Practice",container_identifier:Bt,limit:10,page:Gr}),{comments:Oa,disscuss_count:za}=Ri;Kr({type:0,payload:{data:Oa,count:za,loading:!1}}),jr(za)}),[Gr,Bt]);(0,te.useEffect)(()=>{Lo()},[Bt,Gr]);function Ra(Ri){Kr({type:5,payload:{page:Ri}})}function Zo(Ri){Kr({type:4,payload:{actionType:Ri}})}function Ns(Ri){Kr(Va===Ri?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Ri}})}function Ta(Ri,Oa,za){return Ie(this,null,function*(){try{const Gs=yield Or(Ri);Li[za].user_praise=Oa,Li[za].praise_count=Gs.praise_count,Kr({type:3,payload:{data:[...Li]}})}catch(Gs){console.log(Gs)}})}function qa(){return Ie(this,null,function*(){const{id:Ri,params:Oa,type:za,index:Gs,parentDiscussIndex:Gl}=zo;za==="hidden-discuss"&&(console.log(Oa,"params"),yield mi(Ot({id:Ri,container_type:"Practice",container_identifier:Bt},Oa)),Gl?Li[Gl].children[Gs].hidden=Oa.hidden==1:Li[Gs].hidden=Oa.hidden==1,Kr({type:4,payload:{actionType:null,data:[...Li]}})),za==="delete-discuss"&&(yield ci({id:Ri,container_type:"Practice",container_identifier:Bt}),Kr({type:4,payload:{actionType:null}}),yield Lo())})}function Hs(){Kr({type:4,payload:{actionType:null}})}function ba(Ri,Oa){return Ie(this,null,function*(){try{yield Br({container_type:"Practice",container_identifier:Bt,comments:{content:Oa,parent_id:Ri}}),Lo()}catch(za){console.log(za)}})}function Ds(Ri){return Ie(this,null,function*(){Kr({type:6}),yield Di({comments:{content:Ri},container_type:"Practice",container_identifier:Bt}),Lo()})}return te.createElement(te.Fragment,null,te.createElement("div",{className:"discuss-panel"},Li.length===0?te.createElement(Ne.Z,null):te.createElement(le.Z,{spinning:kr},Li.map((Ri,Oa)=>te.createElement(aa,{onReplyDiscuss:ba,onPlusDiscuss:Ta,onSetActiveDiscussIndex:Ns,onSetActionType:Zo,data:Ri,index:Oa,user:mt,activeDiscussIndex:Va}))),Fa>10?te.createElement("div",{className:"pagination-container mt10 mb10"},te.createElement(In.Z,{showQuickJumper:!0,onChange:Ra,current:Gr,total:Fa,showTotal:Ri=>te.createElement("span",{style:{color:"#656F87"}},"\u5171",te.createElement("span",{className:"c-light-primary"},Ri),"\u6761\u6570\u636E")})):null),te.createElement(nr,{user_praise:Wt.user_praise,praise_count:Wt.praises_count,praisePlus:di,discuss_count:Wt.comments_count,onCreateDiscuss:Ds}),te.createElement(Me.Z,null,te.createElement(ae.default,{centered:!0,title:"\u63D0\u793A",open:!!zo,onOk:qa,onCancel:Hs},te.createElement("p",null,zo?zo.message:"")),te.createElement(Wo.Z,null)))},Ft={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},an={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Rn=Object.defineProperty,mr=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable,Xn=(mt,Bt,Wt)=>Bt in mt?Rn(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,br=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))or.call(Bt,Wt)&&Xn(mt,Wt,Bt[Wt]);if(mr)for(var Wt of mr(Bt))cr.call(Bt,Wt)&&Xn(mt,Wt,Bt[Wt]);return mt};const _r=mt=>React.createElement("svg",br({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var mn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",$n=Object.defineProperty,Vr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,hi=(mt,Bt,Wt)=>Bt in mt?$n(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Ni=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))qr.call(Bt,Wt)&&hi(mt,Wt,Bt[Wt]);if(Vr)for(var Wt of Vr(Bt))Ir.call(Bt,Wt)&&hi(mt,Wt,Bt[Wt]);return mt};const yr=mt=>React.createElement("svg",Ni({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var bi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",ar=Object.defineProperty,fo=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,Jo=(mt,Bt,Wt)=>Bt in mt?ar(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,bo=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))qi.call(Bt,Wt)&&Jo(mt,Wt,Bt[Wt]);if(fo)for(var Wt of fo(Bt))ua.call(Bt,Wt)&&Jo(mt,Wt,Bt[Wt]);return mt};const oo=mt=>React.createElement("svg",bo({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var na="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",Eo=Object.defineProperty,ra=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable,No=(mt,Bt,Wt)=>Bt in mt?Eo(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Ba=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))ea.call(Bt,Wt)&&No(mt,Wt,Bt[Wt]);if(ra)for(var Wt of ra(Bt))Ho.call(Bt,Wt)&&No(mt,Wt,Bt[Wt]);return mt};const Wa=mt=>React.createElement("svg",Ba({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Ia="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Ao=Object.defineProperty,pn=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable,lr=(mt,Bt,Wt)=>Bt in mt?Ao(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Cr=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))sn.call(Bt,Wt)&&lr(mt,Wt,Bt[Wt]);if(pn)for(var Wt of pn(Bt))Hn.call(Bt,Wt)&&lr(mt,Wt,Bt[Wt]);return mt};const vi=mt=>React.createElement("svg",Cr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var _i="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Xi=({style:mt={},onClick:Bt,onAssist:Wt,onHide:di,data:jr,active:Rr,showLine:Kr})=>te.createElement(te.Fragment,null,te.createElement("div",{className:Rr===(jr==null?void 0:jr.id)?`${an.list} ${an.active}`:an.list,style:mt,onClick:()=>Bt(jr)},(jr==null?void 0:jr.video)&&te.createElement("div",{className:an.left},te.createElement("img",{src:jr==null?void 0:jr.video_cover}),te.createElement("div",null,te.createElement("img",{src:mn}),te.createElement("span",null,jr==null?void 0:jr.video_duration)),te.createElement("div",{className:an.mask})),te.createElement("div",{className:an.right},te.createElement("div",{className:an.name},te.createElement("img",{src:me.Z.IMG_SERVER+"/images/"+(jr==null?void 0:jr.image_url),width:30,height:30}),te.createElement("div",{title:jr==null?void 0:jr.name,className:an.title},jr==null?void 0:jr.name),(jr==null?void 0:jr.is_authority)&&te.createElement("div",{className:an.b},"\u5B98\u65B9"),(jr==null?void 0:jr.is_excellent)&&te.createElement("div",{className:an.a},"\u7CBE\u9009")),te.createElement("div",{className:an.des},te.createElement(Ct.Z,{showLines:2,showTextOnly:!0,value:(jr==null?void 0:jr.content)||"\u6682\u65E0\u5185\u5BB9"})),te.createElement("div",{className:an.tag},te.createElement("span",{className:"current",onClick:kr=>{kr.stopPropagation(),Wt(jr)}},te.createElement("img",{src:jr!=null&&jr.user_liker?na:bi}),te.createElement("span",{style:{color:jr!=null&&jr.user_liker?"#0152d9":"#656f87"}},jr==null?void 0:jr.praises_count)),te.createElement("span",null,te.createElement("img",{src:Ia}),te.createElement("span",null,jr==null?void 0:jr.discusses_count)),te.createElement("span",null,te.createElement("img",{src:_i}),te.createElement("span",null,jr==null?void 0:jr.viewed_count)),(0,zr.Ny)()&&te.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:kr=>{kr.stopPropagation(),di(jr)}},jr!=null&&jr.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Kr&&te.createElement("div",{className:an.line})),Ci={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},_o=ee(83062),To=Object.defineProperty,Ko=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Qn=(mt,Bt,Wt)=>Bt in mt?To(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,He=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Tn.call(Bt,Wt)&&Qn(mt,Wt,Bt[Wt]);if(Ko)for(var Wt of Ko(Bt))Bn.call(Bt,Wt)&&Qn(mt,Wt,Bt[Wt]);return mt};const lt=mt=>React.createElement("svg",He({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var ut="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",gt=Object.defineProperty,yt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,tn=(mt,Bt,Wt)=>Bt in mt?gt(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,fn=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))kt.call(Bt,Wt)&&tn(mt,Wt,Bt[Wt]);if(yt)for(var Wt of yt(Bt))At.call(Bt,Wt)&&tn(mt,Wt,Bt[Wt]);return mt};const jn=mt=>React.createElement("svg",fn({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var qn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Kn=Object.defineProperty,An=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,wn=Object.prototype.propertyIsEnumerable,Un=(mt,Bt,Wt)=>Bt in mt?Kn(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,vr=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Dn.call(Bt,Wt)&&Un(mt,Wt,Bt[Wt]);if(An)for(var Wt of An(Bt))wn.call(Bt,Wt)&&Un(mt,Wt,Bt[Wt]);return mt};const er=mt=>React.createElement("svg",vr({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},mt),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var ir="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",fr=ee(95235),_t=Object.defineProperty,vt=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,qt=(mt,Bt,Wt)=>Bt in mt?_t(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,hn=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Nt.call(Bt,Wt)&&qt(mt,Wt,Bt[Wt]);if(ot)for(var Wt of ot(Bt))Pt.call(Bt,Wt)&&qt(mt,Wt,Bt[Wt]);return mt},gn=(mt,Bt)=>vt(mt,Xe(Bt)),Nn=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),vn=({onClose:mt,onOk:Bt,identifier:Wt,active:di})=>{var jr,Rr;const[Kr]=Ge.default.useForm(),[kr,Gr]=(0,te.useState)({}),[Li,Fa]=(0,te.useState)(!1),[zo,Va]=(0,te.useState)(!1),[Lo,Ra]=(0,te.useState)([]),Zo=(0,zr.eY)(),Ns=(0,Ce.useParams)(),Ta=(0,te.useRef)();(0,te.useEffect)(()=>{di&&qa()},[di]);const qa=()=>Nn(void 0,null,function*(){var uo,Sa,cs,as,kc,jc,Ac,Tc,_c,Kc;const Bo=yield(0,de.M3)(Wt,{active:di});if((Bo==null?void 0:Bo.status)===0){const Ps={name:(uo=Bo==null?void 0:Bo.data)==null?void 0:uo.name,content:(Sa=Bo==null?void 0:Bo.data)==null?void 0:Sa.content};Kr.setFieldsValue(Ps),Gr(Ps),(as=(cs=Bo==null?void 0:Bo.data)==null?void 0:cs.videos)!=null&&as[0]&&Ra([{video_id:(Ac=(jc=(kc=Bo==null?void 0:Bo.data)==null?void 0:kc.videos)==null?void 0:jc[0])==null?void 0:Ac.video_id,name:(Kc=(_c=(Tc=Bo==null?void 0:Bo.data)==null?void 0:Tc.videos)==null?void 0:_c[0])==null?void 0:Kc.title,loaded:100}])}}),Hs=(uo,Sa)=>{Gr(hn({},Sa))},ba=uo=>Nn(void 0,null,function*(){const Sa={videos:Lo,articles:uo};Va(!0);let cs;di?(Sa.active=di,cs=yield(0,de.gu)(Wt,Sa)):cs=yield(0,de.bx)(Wt,Sa),(cs==null?void 0:cs.status)===0&&(console.log(di||(cs==null?void 0:cs.id),44),Bt(di||(cs==null?void 0:cs.id))),Va(!1)}),Ds=(uo,Sa)=>{ae.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:te.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Sa?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Sa?Ra([]):(Ta.current.cancel(),Ra([]))}})},Ri=()=>te.createElement(fr.Z,gn(hn({},oa),{ref:Ta}),te.createElement("div",{className:Ci.main},te.createElement("img",{src:ut,alt:""}),te.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))),Oa=uo=>te.createElement("div",{className:Ci.mainLoading},te.createElement("div",{className:Ci.proWarp},te.createElement("div",{className:Ci.pro},te.createElement("div",{style:{width:uo}})),te.createElement("span",null,uo||0,"%")),te.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),te.createElement("div",{className:Ci.tip},te.createElement(_o.Z,{getPopupContainer:Sa=>Sa.parentNode,title:te.createElement("div",null,te.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",te.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),te.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),te.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},te.createElement("img",{src:ir,alt:""})))),za=uo=>te.createElement("div",{className:Ci.mainSucceed},te.createElement("img",{src:qn,alt:""}),te.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),te.createElement("div",{className:Ci.tip},te.createElement(_o.Z,{getPopupContainer:Sa=>Sa.parentNode,title:te.createElement("div",null,te.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",te.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),te.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),te.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},te.createElement("img",{src:ir,alt:""}))),te.createElement("div",{className:Ci.del,onClick:()=>Ds(uo.name,uo.loaded==100)},te.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Gs=()=>te.createElement(te.Fragment,null,Lo==null?void 0:Lo.map((uo,Sa)=>te.createElement(te.Fragment,{key:Sa},uo.loaded==100?za(uo):Oa(uo.loaded)))),Gl=()=>{ae.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:mt})},oa={accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",onBefore:uo=>{const cs=uo.name.toLowerCase();return cs&&cs.indexOf(".avi")==-1&&cs.indexOf(".flv")==-1&&cs.indexOf(".f4v")==-1&&cs.indexOf(".m4v")==-1&&cs.indexOf(".mov")==-1&&cs.indexOf(".mp4")==-1&&cs.indexOf(".rmvb")==-1&&cs.indexOf(".swf")==-1&&cs.indexOf(".webm")==-1&&cs.indexOf(".wmv")==-1?(fe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),!0):uo.size>1024*1024*1024?(fe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),!0):Lo!=null&&Lo.find(as=>as.name===uo.name)?(fe.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),!0):!1},onBeginInitFile:uo=>{Ra([{name:uo.filename,loaded:0}])},onComplete:uo=>{Ra([{name:uo.filename,loaded:uo.percent,video_id:uo.id}])},onError:()=>{Ra([])},onProgress:uo=>{Ra([{name:uo.filename,loaded:uo.percent}])},chunkSize:1024*1024*2,options:{user_id:(jr=Zo==null?void 0:Zo.userInfo)==null?void 0:jr.user_id}},Na=Lo==null?void 0:Lo.length;return te.createElement("div",{className:Ci.listForm},te.createElement("header",null,di?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),te.createElement("section",{className:Ci.scroll,id:"sss"},te.createElement("div",{className:Ci.formWrap}," ",te.createElement(Ge.default,{form:Kr,scrollToFirstError:!0,layout:"vertical",onValuesChange:Hs,onFinish:ba},te.createElement(Ge.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},te.createElement(nt.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((Rr=kr.name)==null?void 0:Rr.length)||0}/60`})),te.createElement(Ge.default.Item,{name:"content",label:"\u5185\u5BB9:"},te.createElement(li.Z,{defaultValue:kr.content||"",watch:!0})))),te.createElement("div",{className:Ci.upload},Na?Gs():Ri())),te.createElement("div",{className:Ci.btns},te.createElement(jt.ZP,{onClick:Gl,type:"primary",ghost:!0},"\u5173\u95ED"),te.createElement(jt.ZP,{loading:zo,disabled:Li,onClick:()=>Kr.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Fn={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},Gn=ee(46303),xr=Object.defineProperty,sr=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Pr=(mt,Bt,Wt)=>Bt in mt?xr(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Qr=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Lr.call(Bt,Wt)&&Pr(mt,Wt,Bt[Wt]);if(sr)for(var Wt of sr(Bt))Ur.call(Bt,Wt)&&Pr(mt,Wt,Bt[Wt]);return mt};const Tr=mt=>React.createElement("svg",Qr({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var Wr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",ni=Object.defineProperty,Si=Object.getOwnPropertySymbols,Nr=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,gi=(mt,Bt,Wt)=>Bt in mt?ni(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,vo=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Nr.call(Bt,Wt)&&gi(mt,Wt,Bt[Wt]);if(Si)for(var Wt of Si(Bt))wi.call(Bt,Wt)&&gi(mt,Wt,Bt[Wt]);return mt};const Ji=mt=>React.createElement("svg",vo({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var Pi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",Mi=Object.defineProperty,Ai=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable,ai=(mt,Bt,Wt)=>Bt in mt?Mi(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,ii=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))pi.call(Bt,Wt)&&ai(mt,Wt,Bt[Wt]);if(Ai)for(var Wt of Ai(Bt))zi.call(Bt,Wt)&&ai(mt,Wt,Bt[Wt]);return mt};const Ui=mt=>React.createElement("svg",ii({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var to="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",la={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},da=ee(71230),So=ee(15746),go={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},Zi=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())});const Ii=({id:mt,cb:Bt})=>{const[Wt,di]=(0,te.useState)("");return te.createElement("aside",{className:"mt10"},te.createElement(li.Z,{defaultValue:Wt,id:"writeForumsReviewId",onChange:jr=>{di(jr)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),te.createElement(da.Z,null,te.createElement(So.Z,{flex:"1"}),te.createElement(So.Z,null,te.createElement(jt.ZP,{type:"primary",size:"middle",onClick:()=>Zi(void 0,null,function*(){Wt===""?fe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Bt(mt,Wt)})},"\u53D1\u9001"))))},pa=({data:mt})=>{var Bt;return te.createElement("div",{className:go.thirdlyLevelDiscuss},te.createElement("span",{className:"c-grey-333"},te.createElement("span",{className:"font 14 c-light-primary"},(Bt=mt==null?void 0:mt.author)==null?void 0:Bt.name),"@",te.createElement("span",{className:"font 14 c-light-primary"},mt==null?void 0:mt.parent_name),":"),te.createElement(Ct.Z,{value:mt==null?void 0:mt.content}))},io=({data:mt,onReplyDiscuss:Bt,thirdlyReply:Wt,setThirdlyReply:di})=>{var jr,Rr,Kr,kr;const Gr=(0,zr.eY)();return console.log(Gr,"user"),te.createElement("div",{className:go.list},te.createElement("img",{src:me.Z.IMG_SERVER+"/images/"+((jr=mt==null?void 0:mt.author)==null?void 0:jr.image_url)}),te.createElement("div",{className:go.wrap},te.createElement("div",{className:"font14",style:{marginBottom:6}},te.createElement("span",{className:"c-grey-333"},(Rr=mt==null?void 0:mt.author)==null?void 0:Rr.name),(Gr==null?void 0:Gr.login)!==((Kr=mt==null?void 0:mt.author)==null?void 0:Kr.login)&&te.createElement("span",{onClick:()=>di(mt==null?void 0:mt.id),className:"c-grey-999 current",style:{float:"right"}},te.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),te.createElement("span",null,"\u56DE\u590D"))),te.createElement(Ct.Z,{value:mt==null?void 0:mt.content}),(kr=mt==null?void 0:mt.children)==null?void 0:kr.map(Li=>te.createElement(pa,{key:Li.id,data:Li})),Wt===(mt==null?void 0:mt.id)&&te.createElement("div",null,te.createElement(Ii,{id:mt==null?void 0:mt.id,cb:Bt}),te.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>di(null),className:"c-light-primary current"},te.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),te.createElement("div",{className:go.line})))};var Ki=({data:mt,onReplyDiscuss:Bt,secondReply:Wt,setSecondReply:di,thirdlyReply:jr,setThirdlyReply:Rr,onPlusDiscuss:Kr})=>{var kr,Gr,Li,Fa;const[zo,Va]=(0,te.useState)(!1);return console.log(mt,"data"),te.createElement("div",{className:go.discussItem},te.createElement("div",{className:go.list},te.createElement("img",{src:me.Z.IMG_SERVER+"/images/"+((kr=mt==null?void 0:mt.author)==null?void 0:kr.image_url)}),te.createElement("div",{className:go.wrap},te.createElement("div",{className:"font14",style:{marginBottom:6}},te.createElement("span",{className:"c-grey-333 mr30"},(Gr=mt==null?void 0:mt.author)==null?void 0:Gr.name),te.createElement("span",{className:"c-grey-999"},mt==null?void 0:mt.time)),te.createElement(Ct.Z,{value:mt==null?void 0:mt.content}),te.createElement("div",{className:go.btns},te.createElement("div",{onClick:()=>Kr(mt==null?void 0:mt.id),className:mt!=null&&mt.user_praise?"c-light-primary":"c-grey-999"},te.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),te.createElement("span",null,mt==null?void 0:mt.praise_count)),te.createElement("div",{onClick:()=>{var Lo;((Lo=mt==null?void 0:mt.children)==null?void 0:Lo.length)!==0&&(di(null),Va(!zo))},style:{color:zo?"#0152d9":"#999999"}},te.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),te.createElement("span",null,zo?"\u6536\u8D77\u8BC4\u8BBA":(Li=mt==null?void 0:mt.children)==null?void 0:Li.length)),te.createElement("div",{onClick:()=>{Va(!1),di(Wt===(mt==null?void 0:mt.id)?null:mt==null?void 0:mt.id)},style:{color:Wt===(mt==null?void 0:mt.id)?"#0152d9":"#999999"}},te.createElement("i",{className:"iconfont icon-huifu3 mr3"}),te.createElement("span",null,Wt===(mt==null?void 0:mt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Wt===(mt==null?void 0:mt.id)&&te.createElement(Ii,{id:mt==null?void 0:mt.id,cb:(Lo,Ra)=>{Bt(Lo,Ra),Va(!0)}}),zo&&te.createElement("div",{className:go.secondLevelDiscuss},(Fa=mt==null?void 0:mt.children)==null?void 0:Fa.map(Lo=>te.createElement(io,{thirdlyReply:jr,setThirdlyReply:Rr,key:Lo.id,data:Lo,onReplyDiscuss:Bt}))))))},Io=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),qo=({identifier:mt,active:Bt,onOk:Wt})=>{const[di,jr]=(0,te.useState)(""),[Rr,Kr]=(0,te.useState)(1),[kr,Gr]=(0,te.useState)([]),[Li,Fa]=(0,te.useState)(0),[zo,Va]=(0,te.useState)(null),[Lo,Ra]=(0,te.useState)(null);(0,te.useEffect)(()=>{Zo(1),Kr(1)},[Bt]);const Zo=ba=>Io(void 0,null,function*(){const Ds=yield Pn({container_type:"QuestionSolutionArticle",container_identifier:Bt,limit:5,page:ba});Ds!=null&&Ds.comments&&(Gr((Ds==null?void 0:Ds.comments)||[]),Kr(ba),Fa(Ds==null?void 0:Ds.disscuss_count))}),Ns=()=>Io(void 0,null,function*(){if(di===""){fe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const ba=yield Di({comments:{content:di},container_type:"QuestionSolutionArticle",container_identifier:Bt});ba!=null&&ba.discuss&&(jr(""),Zo(Rr),Wt())}),Ta=(ba,Ds,Ri)=>Io(void 0,null,function*(){const Oa=yield Br({container_type:"QuestionSolutionArticle",container_identifier:Bt,comments:{content:Ds,parent_id:ba}});Va(null),Ra(null),Zo(Rr)}),qa=ba=>Io(void 0,null,function*(){const Ds=yield Or(ba);Zo(Rr)}),Hs=ba=>{Kr(ba),Zo(ba)};return te.createElement("div",{className:la.discuss},te.createElement("aside",{className:la.reply,style:{borderWidth:Li?1:0}},te.createElement(li.Z,{defaultValue:di,id:"writeForumsReviewId",onChange:ba=>{jr(ba)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),te.createElement(da.Z,null,te.createElement(So.Z,{flex:"1"}),te.createElement(So.Z,null,te.createElement(jt.ZP,{type:"primary",size:"middle",onClick:()=>Ns()},"\u53D1\u9001")))),kr==null?void 0:kr.map(ba=>te.createElement(Ki,{secondReply:zo,setSecondReply:Va,thirdlyReply:Lo,setThirdlyReply:Ra,key:ba.id,data:ba,onReplyDiscuss:Ta,onPlusDiscuss:qa})),te.createElement(In.Z,{className:la.pagination,showTotal:ba=>te.createElement("span",{style:{color:"#656F87"}},"\u5171",te.createElement("span",{className:"c-light-primary"},ba),"\u6761\u6570\u636E"),current:Rr,onChange:Hs,total:Li,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Qi=ee(6104),ma=Object.defineProperty,va=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable,Ea=(mt,Bt,Wt)=>Bt in mt?ma(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Ja=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))ia.call(Bt,Wt)&&Ea(mt,Wt,Bt[Wt]);if(va)for(var Wt of va(Bt))ca.call(Bt,Wt)&&Ea(mt,Wt,Bt[Wt]);return mt},Ma=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),vs=({active:mt,identifier:Bt,onAssist:Wt,onEdit:di,onArticlesSkip:jr,onClose:Rr,onOk:Kr,onDelete:kr,detailsIndex:Gr,btnShowStatus:Li})=>{var Fa,zo,Va,Lo,Ra,Zo,Ns,Ta,qa,Hs;const[ba,Ds]=(0,te.useState)(!0),[Ri,Oa]=(0,te.useState)({});(0,te.useEffect)(()=>{mt&&za()},[mt,Gr]);const za=(Na=!0)=>Ma(void 0,null,function*(){Na&&Ds(!0);const uo=yield(0,de.wO)(Bt,{active:mt});(uo==null?void 0:uo.status)===0&&Oa((uo==null?void 0:uo.data)||{}),Ds(!1)}),Gs=Na=>Ma(void 0,null,function*(){const uo=yield(0,de.qe)(Bt,Ja({active:mt},Na));(uo==null?void 0:uo.status)===0&&(za(!1),Kr())}),Gl=Na=>Ma(void 0,null,function*(){(yield(0,de.Rg)(Bt,{active:Na==null?void 0:Na.id})).status===0&&(za(!1),Kr())}),Yi=Na=>{ae.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>kr(Na)})},oa=()=>{za(!1),Kr()};return te.createElement("div",{className:Fn.listDetails},te.createElement(Gn.Z,{className:"pt20 pl20 pr20",loading:ba,active:!0,paragraph:{rows:5}},te.createElement("div",{className:Fn.head},te.createElement("div",{className:Fn.name},te.createElement("div",{title:Ri==null?void 0:Ri.name,className:Fn.title},Ri==null?void 0:Ri.name),(Ri==null?void 0:Ri.is_authority)&&te.createElement("div",{className:Fn.b},"\u5B98\u65B9"),(Ri==null?void 0:Ri.is_excellent)&&te.createElement("div",{className:Fn.a},"\u7CBE\u9009")),te.createElement("div",{className:Fn.tag},te.createElement("img",{src:me.Z.IMG_SERVER+"/images/"+(Ri==null?void 0:Ri.image_url)}),te.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Ri==null?void 0:Ri.username),te.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Oe()(Ri==null?void 0:Ri.created_at).format("YYYY-MM-DD")),te.createElement("span",null,te.createElement("img",{src:bi}),te.createElement("span",null,Ri==null?void 0:Ri.praises_count)),te.createElement("span",null,te.createElement("img",{src:Ia}),te.createElement("span",null,Ri==null?void 0:Ri.discusses_count)),te.createElement("span",null,te.createElement("img",{src:_i}),te.createElement("span",null,Ri==null?void 0:Ri.viewed_count)),te.createElement("div",{className:Fn.btn},((0,zr.Ny)()||(Ri==null?void 0:Ri.is_self))&&te.createElement(te.Fragment,null,te.createElement(jt.ZP,{onClick:()=>Yi(Ri),type:"primary",ghost:!0},"\u5220\u9664"),te.createElement(jt.ZP,{onClick:()=>di(Ri),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,zr.Ny)()&&te.createElement(jt.ZP,{onClick:()=>Gs({is_authority:!(Ri!=null&&Ri.is_authority)}),type:"primary"},te.createElement("img",{src:Pi}),Ri!=null&&Ri.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,zr.Ny)()&&te.createElement(jt.ZP,{onClick:()=>Gs({is_excellent:!(Ri!=null&&Ri.is_excellent)}),type:"primary"},te.createElement("img",{src:Wr}),Ri!=null&&Ri.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),te.createElement("div",{className:Fn.scroll},((zo=(Fa=Ri==null?void 0:Ri.videos)==null?void 0:Fa[0])==null?void 0:zo.id)&&te.createElement("div",{className:Fn.video},te.createElement(le.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Lo=(Va=Ri==null?void 0:Ri.videos)==null?void 0:Va[0])!=null&&Lo.transcoded)},te.createElement(Qi.Z,{poster:(Zo=(Ra=Ri==null?void 0:Ri.videos)==null?void 0:Ra[0])==null?void 0:Zo.cover_url,src:((Ta=(Ns=Ri==null?void 0:Ri.videos)==null?void 0:Ns[0])==null?void 0:Ta.play_url)||"",videoId:(Hs=(qa=Ri==null?void 0:Ri.videos)==null?void 0:qa[0])==null?void 0:Hs.id,logWatchHistory:()=>{}}))),te.createElement(Ct.Z,{className:Fn.html,value:(Ri==null?void 0:Ri.content)||""}),te.createElement("div",{onClick:()=>Gl(Ri),className:Fn.g},te.createElement("img",{className:"mr10",src:(Ri!=null&&Ri.user_liker,to)}),te.createElement("span",null,Ri==null?void 0:Ri.praises_count)),te.createElement(qo,{onOk:oa,active:mt,identifier:Bt})),te.createElement("div",{className:Fn.btns},te.createElement(jt.ZP,{onClick:()=>Rr(),type:"primary",ghost:!0},"\u5173\u95ED"),Li[0]&&te.createElement(jt.ZP,{onClick:Na=>jr(Na,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Li[1]&&te.createElement(jt.ZP,{onClick:Na=>jr(Na,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},Es=Object.defineProperty,Ls=Object.getOwnPropertySymbols,Qa=Object.prototype.hasOwnProperty,La=Object.prototype.propertyIsEnumerable,ho=(mt,Bt,Wt)=>Bt in mt?Es(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Po=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Qa.call(Bt,Wt)&&ho(mt,Wt,Bt[Wt]);if(Ls)for(var Wt of Ls(Bt))La.call(Bt,Wt)&&ho(mt,Wt,Bt[Wt]);return mt};const _a=mt=>React.createElement("svg",Po({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var Da="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",gs=ee(28575),Rs=ee(33463),Ws=Object.defineProperty,hl=Object.defineProperties,ul=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,es=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Co=(mt,Bt,Wt)=>Bt in mt?Ws(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,Qo=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))es.call(Bt,Wt)&&Co(mt,Wt,Bt[Wt]);if(Ts)for(var Wt of Ts(Bt))Bi.call(Bt,Wt)&&Co(mt,Wt,Bt[Wt]);return mt},Ca=(mt,Bt)=>hl(mt,ul(Bt)),is=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),bl=({identifier:mt,tabStatus:Bt,setFilterListTotal:Wt,setListStatus:di})=>{const jr={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[Rr,Kr]=(0,te.useState)(Qo({},jr));const[kr,Gr]=(0,te.useState)(!1),[Li,Fa]=(0,te.useState)(0),[zo,Va]=(0,te.useState)(1),[Lo,Ra]=(0,te.useState)(null),[Zo,Ns]=(0,te.useState)([]),[Ta,qa]=(0,te.useState)([!0,!0]),[Hs,ba]=(0,te.useState)(0),Ds=(0,te.useRef)(null);(0,te.useEffect)(()=>{Sa()},[Bt]),(0,te.useEffect)(()=>{Ri()},[Lo]),(0,te.useEffect)(()=>{za(Qo({},jr)),Sa()},[mt]),(0,te.useEffect)(()=>(window.addEventListener("resize",Oa),di(Hs),()=>{window.removeEventListener("resize",Oa)}),[Hs]);const Ri=()=>is(void 0,null,function*(){if(!Lo){qa([!0,!0]);return}const Bo=[!0,!0],Ps=Zo==null?void 0:Zo.findIndex(jl=>jl.id===Lo);Ps===0&&Rr.page===1&&(Bo[0]=!1),(Rr.page-1)*Rr.limit+(Ps+1)===Rr.total&&(Bo[1]=!1),qa(Bo)}),Oa=()=>{var Bo;if(Hs){const Ps=window.innerWidth-((Bo=Ds.current)==null?void 0:Bo.clientWidth);Fa(Ps)}},za=Bo=>is(void 0,null,function*(){var Ps,jl,Pc;Gr(!0);const Kl=yield(0,de.WH)(mt,Bo);return(Kl==null?void 0:Kl.status)===0&&(Ns(((Ps=Kl==null?void 0:Kl.data)==null?void 0:Ps.articles)||[]),Kr(Ca(Qo({},Bo),{total:(jl=Kl==null?void 0:Kl.data)==null?void 0:jl.articles_count})),Wt((Pc=Kl==null?void 0:Kl.data)==null?void 0:Pc.articles_count)),Gr(!1),Kl}),Gs=()=>{(Rr==null?void 0:Rr.sort_direction)===null?Rr.sort_direction="asc":(Rr==null?void 0:Rr.sort_direction)==="asc"?Rr.sort_direction="desc":(Rr==null?void 0:Rr.sort_direction)==="desc"&&(Rr.sort_direction=null),Rr.page=1,Sa(),Kr(Qo({},Rr)),za(Rr)},Gl=()=>{Rr.page=1,Rr.search=Rr==null?void 0:Rr.save_search,Sa(),Kr(Qo({},Rr)),za(Rr)},Yi=()=>{var Bo;const Ps=document.getElementsByClassName("btn-resize");Ps[0].style.visibility="hidden";const jl=window.innerWidth-((Bo=Ds.current)==null?void 0:Bo.clientWidth);Fa(jl)},oa=()=>{Yi(),ba(1)},Na=Bo=>{Yi(),Ra(Bo==null?void 0:Bo.id),ba(3)},uo=Bo=>{Yi(),Ra(Bo==null?void 0:Bo.id),ba(2)},Sa=()=>{const Bo=document.getElementsByClassName("btn-resize");Bo[0].style.visibility="visible",Fa(0),ba(0),Ra(null)},cs=Bo=>{ba(3),Ra(Bo),Rr.page=1,Kr(Qo({},Rr)),za(Rr)},as=Bo=>{ba(3),Ra(Bo),Kr(Qo({},Rr)),za(Rr)},kc=Bo=>{Kr(Qo({},Rr)),za(Rr)},jc=Bo=>is(void 0,null,function*(){(yield(0,de.Rg)(mt,{active:Bo==null?void 0:Bo.id})).status===0&&(za(Rr),Va(zo+1))}),Ac=Bo=>is(void 0,null,function*(){(yield(0,de.rL)(mt,{active:Bo==null?void 0:Bo.id})).status===0&&(za(Rr),Va(zo+1))}),Tc=Bo=>is(void 0,null,function*(){(yield(0,de.de)(mt,{active:Bo==null?void 0:Bo.id})).status===0&&(Sa(),za(Rr))}),_c=Bo=>{Rr.page=Bo,Kr(Qo({},Rr)),za(Rr)},Kc=(Bo,Ps)=>is(void 0,null,function*(){var jl,Pc,Kl,oc;const Cc=Zo==null?void 0:Zo.findIndex(al=>al.id===Lo);if(console.log(Cc,Ps,22),Ps==="prev"){if(Cc===void 0){fe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Cc===0){if(Rr.page===1){fe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Rr.page!==1){Rr.page=Rr.page-1,Kr(Qo({},Rr));const al=yield za(Rr);if((al==null?void 0:al.status)===0){const Ve=(Kl=al==null?void 0:al.data)==null?void 0:Kl.articles[((Pc=(jl=al==null?void 0:al.data)==null?void 0:jl.articles)==null?void 0:Pc.length)-1];Ra(Ve==null?void 0:Ve.id),console.log(Bo.target,555)}}}else{const al=Zo[Cc-1];Ra(al==null?void 0:al.id)}}if(Ps==="next"){if(Cc===void 0){fe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((Rr.page-1)*Rr.limit+(Cc+1)===Rr.total){fe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Cc+1===Rr.limit){Rr.page=Rr.page+1,Kr(Qo({},Rr));const al=yield za(Rr);if((al==null?void 0:al.status)===0){const Ve=(oc=al==null?void 0:al.data)==null?void 0:oc.articles[0];Ra(Ve==null?void 0:Ve.id)}}else{const al=Zo[Cc+1];Ra(al==null?void 0:al.id)}}});return te.createElement("div",{className:Ft.wrap,ref:Ds},te.createElement("div",{className:Ft.head},te.createElement("div",{className:Ft.sort,onClick:Gs},te.createElement("span",null,"\u6700\u65B0"),te.createElement("aside",null,te.createElement(gs.Z,{style:{color:(Rr==null?void 0:Rr.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),te.createElement(Rs.Z,{style:{color:(Rr==null?void 0:Rr.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),te.createElement(nt.default.Search,{value:Rr.save_search,className:Ft["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Bo=>{Rr.save_search=Bo.target.value,Kr(Qo({},Rr))},onSearch:Gl}),te.createElement("div",{onClick:oa,className:Ft.btn},te.createElement("img",{src:Da}),"\u5199\u9898\u89E3")),te.createElement("div",{className:Ft.listWarp},te.createElement(le.Z,{spinning:kr,className:"mt20"},Zo==null?void 0:Zo.map((Bo,Ps)=>{let jl=!0;return Ps+1===Zo.length&&Ps!==0&&(jl=!1),te.createElement(Xi,{active:Lo,key:Bo.id,data:Bo,showLine:jl,onClick:Na,onAssist:jc,onHide:Ac})}),(Zo==null?void 0:Zo.length)===0&&te.createElement(Ne.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),te.createElement(In.Z,{className:Ft.pagination,showTotal:Bo=>te.createElement("span",{style:{color:"#656F87"}},"\u5171",te.createElement("span",{className:"c-light-primary"},Bo),"\u6761\u6570\u636E"),total:Rr.total,showSizeChanger:!1,current:Rr==null?void 0:Rr.page,onChange:_c,hideOnSinglePage:!0,showQuickJumper:!0}),Hs>0&&te.createElement("div",{className:Ft.fixedRight,style:{width:Li}},Hs===1&&te.createElement(vn,{identifier:mt,onClose:Sa,onOk:cs}),Hs===2&&te.createElement(vn,{active:Lo,identifier:mt,onClose:Sa,onOk:as}),Hs===3&&te.createElement(vs,{btnShowStatus:Ta,onArticlesSkip:Kc,detailsIndex:zo,active:Lo,identifier:mt,onClose:Sa,onOk:kc,onEdit:uo,onAssist:jc,onDelete:Tc})))},rl={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},$l=Object.defineProperty,ya=Object.defineProperties,yi=Object.getOwnPropertyDescriptors,Mo=Object.getOwnPropertySymbols,Do=Object.prototype.hasOwnProperty,Uo=Object.prototype.propertyIsEnumerable,Ss=(mt,Bt,Wt)=>Bt in mt?$l(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,ls=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))Do.call(Bt,Wt)&&Ss(mt,Wt,Bt[Wt]);if(Mo)for(var Wt of Mo(Bt))Uo.call(Bt,Wt)&&Ss(mt,Wt,Bt[Wt]);return mt},Sl=(mt,Bt)=>ya(mt,yi(Bt)),pl=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())}),Xa=({visible:mt,onVisible:Bt,value:Wt,onChange:di,setIndex:jr})=>{var Rr;const Kr={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[kr,Gr]=(0,te.useState)(Kr);const[Li,Fa]=(0,te.useState)([]),[zo,Va]=(0,te.useState)([]),[Lo,Ra]=(0,te.useState)(!1),Zo=(0,te.useRef)([]),Ns=(0,te.useRef)(null),Ta=(0,Ce.useParams)();(0,te.useEffect)(()=>(Ta!=null&&Ta.id&&(Ns.current=setInterval(()=>{qa(30)},3e4)),()=>{clearInterval(Ns.current)}),[]);const qa=Yi=>pl(void 0,null,function*(){const oa=yield(0,de.uc)(Ta==null?void 0:Ta.id,{practice_time:Yi})});(0,te.useEffect)(()=>{za(kr),Ri()},[]),(0,te.useEffect)(()=>(window.addEventListener("click",ba),()=>{window.removeEventListener("click",ba)}),[Ta==null?void 0:Ta.save_identifier,mt]),(0,te.useEffect)(()=>{const Yi=Zo.current.findIndex(cs=>cs.identifier===(Ta==null?void 0:Ta.save_identifier)),oa=Zo.current[Yi-1],Na=Zo.current[Yi+1],uo=document.getElementById("oj-prev"),Sa=document.getElementById("oj-next");oa?uo.style.display="block":uo.style.display="none",Na?Sa.style.display="block":Sa.style.display="none"},[Ta==null?void 0:Ta.save_identifier,Zo.current]);const Hs=(Yi,oa)=>{if(Yi.id===oa)return Yi;for(let Na=0,uo=Yi;uo=uo.parentNode;Na++){if(uo.id===oa)return uo;if(uo==document.documentElement)return!1}},ba=Yi=>pl(void 0,null,function*(){!Hs(Yi.target,"oj-drawer")&&mt&&Bt(!1);const oa=Zo.current.findIndex(Sa=>Sa.identifier===(Ta==null?void 0:Ta.save_identifier)),Na=Zo.current[oa-1],uo=Zo.current[oa+1];if(Yi.target.id==="oj-prev"){if(!Na||oa===-1){fe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}Yi.target.style.pointerEvents="none",Yi.target.style.cursor="not-allowed",yield Gs(Na==null?void 0:Na.identifier),jr("0"),setTimeout(()=>{Yi.target.style.pointerEvents="auto",Yi.target.style.cursor="pointer"},400)}if(Yi.target.id==="oj-next"||Yi.target.id==="oj-modal-next"){if(!uo||oa===-1){fe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}Yi.target.style.pointerEvents="none",Yi.target.style.cursor="not-allowed",yield Gs(uo==null?void 0:uo.identifier),jr("0"),setTimeout(()=>{Yi.target.style.pointerEvents="auto",Yi.target.style.cursor="pointer"},400)}});(0,te.useEffect)(()=>{di(Ta==null?void 0:Ta.save_identifier);const Yi=zo.findIndex(oa=>oa.some(Na=>Na.identifier===(Ta==null?void 0:Ta.save_identifier)));Gr(Yi===-1?Sl(ls({},kr),{page:1}):Sl(ls({},kr),{page:Yi+1}))},[Ta==null?void 0:Ta.save_identifier,zo]);const Ds=Yi=>{kr.page=1,kr.tag_discipline_id=Yi,Gr(ls({},kr)),za(kr)},Ri=()=>pl(void 0,null,function*(){const Yi=yield(0,ti.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});Fa(Yi.tag_disciplines||[])}),Oa=Yi=>{kr.page=1,kr.difficulty=typeof Yi=="number"?Yi:null,Gr(ls({},kr)),za(kr)},za=Yi=>pl(void 0,null,function*(){var oa,Na;Ra(!0);const uo=yield(0,de.KC)(Yi);if(uo!=null&&uo.practices_list){for(var Sa=(oa=uo==null?void 0:uo.practices_list)==null?void 0:oa.length,cs=[],as=0;as<Sa;as+=kr==null?void 0:kr.per_page)cs.push((Na=uo==null?void 0:uo.practices_list)==null?void 0:Na.slice(as,as+(kr==null?void 0:kr.per_page)));Gr(Sl(ls({},kr),{total:uo==null?void 0:uo.practices_count})),Zo.current=(uo==null?void 0:uo.practices_list)||[],Va(cs)}Ra(!1)}),Gs=(Yi,oa)=>pl(void 0,null,function*(){const Na=yield(0,ti.ZP)(`/api/practices/${Yi}/start`,{method:"get"});(Na==null?void 0:Na.status)===0&&Ce.history.push(`/problems/${Na==null?void 0:Na.identifier}/oj/${Yi}`)}),Gl=Yi=>{kr.page=Yi,Gr(ls({},kr))};return te.createElement("div",{className:rl.wrap,id:"oj-drawer",style:{left:mt?0:-700}},te.createElement("div",{className:rl.head},te.createElement("div",{className:rl.title},"\u9898\u76EE\u5217\u8868"),te.createElement(nt.default.Search,{value:kr==null?void 0:kr.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:Yi=>{kr.save_search=Yi.target.value,Gr(ls({},kr))},onSearch:()=>{kr.page=1,kr.search=kr.save_search,Gr(ls({},kr)),za(kr)}}),te.createElement(re.default,{value:kr==null?void 0:kr.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:Yi=>Yi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Ds},Li.map(Yi=>te.createElement(re.default.Option,{key:Yi.id,value:Yi.id},Yi.name))),te.createElement(re.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:Yi=>Yi.parentNode,value:kr==null?void 0:kr.difficulty,onChange:Oa},te.createElement(re.default.Option,{value:1},"\u7B80\u5355"),te.createElement(re.default.Option,{value:2},"\u9002\u4E2D"),te.createElement(re.default.Option,{value:3},"\u56F0\u96BE"))),te.createElement("div",{className:rl.content},te.createElement(le.Z,{spinning:Lo},(Rr=zo==null?void 0:zo[kr.page-1])==null?void 0:Rr.map(Yi=>te.createElement("div",{key:Yi.identifier,className:rl.list,onClick:oa=>Gs(Yi.identifier,oa)},te.createElement("i",{style:{visibility:Wt===Yi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),te.createElement("span",{style:{fontWeight:Wt===Yi.identifier?"bold":400,color:Wt===Yi.identifier?"#ffffff":"#bac4cd"},title:Yi==null?void 0:Yi.name},Yi.name),(Yi==null?void 0:Yi.difficulty)===1&&te.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(Yi==null?void 0:Yi.difficulty)===2&&te.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(Yi==null?void 0:Yi.difficulty)===3&&te.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),te.createElement("div",{className:rl.footer},te.createElement(In.Z,{showTotal:Yi=>te.createElement("span",{style:{color:"#656F87"}},"\u5171",te.createElement("span",{className:"c-light-primary"},Yi),"\u6761\u6570\u636E"),total:kr.total,pageSize:kr==null?void 0:kr.per_page,current:kr==null?void 0:kr.page,showSizeChanger:!1,onChange:Gl,showQuickJumper:!0,hideOnSinglePage:!0})))},wl=({hack:mt,onTriggerPraise:Bt,topicId:Wt,page:di,onPageChange:jr,user:Rr,submitRecords:Kr,submitting:kr,submitResult:Gr})=>{const[Li]=(0,Ce.useSearchParams)(),Fa=(0,Ce.useLocation)(),[zo,Va]=(0,te.useState)(Li.get("tab")||"0"),[Lo,Ra]=(0,te.useState)(0),[Zo,Ns]=(0,te.useState)(0),[Ta,qa]=(0,te.useState)(0),[Hs,ba]=(0,te.useState)(),[Ds,Ri]=(0,te.useState)(!1);function Oa(Gs){const Gl=Gs.target.id;if(zo==="3"&&Gl!==zo&&(Zo===1||Zo===2)){ae.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{Va(Gl)}});return}Va(Gl)}(0,te.useEffect)(()=>on.Z.subscribe("to-commit-info",()=>{Va("1")}),[]);function za(){Va("2")}return te.createElement("div",{className:Lt["left-panel"]},te.createElement("ul",{className:`${Lt["s-navs"]} ${Lt["bg-white"]} ${Lt.b1}`},te.createElement("li",{className:"mr40 current"},te.createElement("img",{onClick:()=>Ri(!0),src:pr})),te.createElement("li",{className:Lt["oj-mr"]},te.createElement("a",{className:zo==="0"?Lt.active:"",id:"0",onClick:Oa},"\u4EFB\u52A1\u63CF\u8FF0")),te.createElement("li",{className:Lt["oj-mr"]},te.createElement("a",{className:zo==="3"?Lt.active:"",id:"3",onClick:Oa},"\u9898\u89E3",Ta?`(${Ta})`:"")),te.createElement("li",{className:Lt["oj-mr"]},te.createElement("a",{className:zo==="2"?Lt.active:"",id:"2",onClick:Oa},"\u8BC4\u8BBA",Lo?`(${Lo})`:"")),te.createElement("li",null,te.createElement("a",{className:zo==="1"?Lt.active:"",id:"1",onClick:Oa},"\u63D0\u4EA4\u8BB0\u5F55"))),te.createElement("div",{className:`${Lt["tab-panel-body"]} ${zo==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},te.createElement(wt,{hack:mt,onTriggerPraise:Bt,toDiscuss:za})),te.createElement("div",{className:`${Lt["tab-panel-body"]} ${zo==="1"?"":"hide"}`},Kr!=null&&Kr.records_count?te.createElement(Be,{page:di,onPageChange:jr,topicId:Wt,submitting:kr,submitRecords:Kr,submitResult:Gr}):te.createElement(Ne.Z,null)),te.createElement("div",{className:`${Lt["tab-panel-body"]} ${zo==="2"?"":"hide"}`,style:{padding:0}},te.createElement(xt,{setDiscussTotal:Ra,user:Rr,identifier:mt.identifier,hack:mt,onTriggerPraise:Bt})),te.createElement("div",{className:`${Lt["tab-panel-body"]} ${zo==="3"?"":"hide"}`,style:{padding:0}},te.createElement(bl,{setListStatus:Ns,setFilterListTotal:qa,tabStatus:zo,identifier:mt.identifier})),te.createElement(Xa,{visible:Ds,setIndex:Va,onVisible:Gs=>Ri(Gs),value:Hs,onChange:Gs=>ba(Gs)}))},ic=ee(88508),Vc=ee(62522),xc=ee(22707),Ql=ee(8861),Al=ee(96486),Ec=ee.n(Al),Hl=ee(74855),Fo=ee(67294),Bs=Object.defineProperty,ts=Object.defineProperties,Os=Object.getOwnPropertyDescriptors,$s=Object.getOwnPropertySymbols,il=Object.prototype.hasOwnProperty,El=Object.prototype.propertyIsEnumerable,ol=(mt,Bt,Wt)=>Bt in mt?Bs(mt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):mt[Bt]=Wt,ns=(mt,Bt)=>{for(var Wt in Bt||(Bt={}))il.call(Bt,Wt)&&ol(mt,Wt,Bt[Wt]);if($s)for(var Wt of $s(Bt))El.call(Bt,Wt)&&ol(mt,Wt,Bt[Wt]);return mt},qs=(mt,Bt)=>ts(mt,Os(Bt)),Hc=(mt,Bt)=>{var Wt={};for(var di in mt)il.call(mt,di)&&Bt.indexOf(di)<0&&(Wt[di]=mt[di]);if(mt!=null&&$s)for(var di of $s(mt))Bt.indexOf(di)<0&&El.call(mt,di)&&(Wt[di]=mt[di]);return Wt},Tl=(mt,Bt,Wt)=>new Promise((di,jr)=>{var Rr=Gr=>{try{kr(Wt.next(Gr))}catch(Li){jr(Li)}},Kr=Gr=>{try{kr(Wt.throw(Gr))}catch(Li){jr(Li)}},kr=Gr=>Gr.done?di(Gr.value):Promise.resolve(Gr.value).then(Rr,Kr);kr((Wt=Wt.apply(mt,Bt)).next())});const{Countdown:au}=ce.default,Mc={Java:"java",C:"c",Python:"py","C++":"c"};var Lc=(mt=>(mt[mt.SET_LOADING=0]="SET_LOADING",mt[mt.GET_DATA=1]="GET_DATA",mt[mt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",mt[mt.SET_DATA=3]="SET_DATA",mt[mt.SET_DEBUGING=4]="SET_DEBUGING",mt[mt.SET_SUBMITING=5]="SET_SUBMITING",mt[mt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",mt[mt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",mt[mt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",mt[mt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",mt[mt.SET_PAGE=10]="SET_PAGE",mt[mt.GET_LANGUAGE=11]="GET_LANGUAGE",mt[mt.GET_DRAWER=12]="GET_DRAWER",mt))(Lc||{});function Nc(){return new Date().getTime()}const Jc={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function os(mt,Bt){switch(Bt.type){case 1:return ns(ns({},mt),Bt.payload);case 3:return qs(ns({},mt),{data:Bt.payload});case 0:return qs(ns({},mt),{loading:Bt.payload});case 11:return qs(ns({},mt),{languageList:Bt.payload});case 12:return qs(ns({},mt),{drawerData:Bt.payload});case 9:return qs(ns({},mt),{showNote:Bt.payload});case 4:return qs(ns({},mt),{debuging:Bt.payload});case 5:return qs(ns({},mt),{submitting:Bt.payload});case 2:return qs(ns({},mt),{submitRecords:Bt.payload});case 10:return qs(ns({},mt),{submitRecordPage:Bt.payload});case 6:return qs(ns({},mt),{executingMessage:Bt.payload});case 7:return ns(ns({},mt),Bt.payload);case 8:return ns(ns({},mt),Bt.payload);default:throw new Error}}var Ka=({children:mt})=>{var Bt,Wt,di,jr;const[Rr,Kr]=(0,te.useReducer)(os,Jc),{id:kr}=(0,Ce.useParams)(),Gr=(0,Ce.useLocation)(),[Li]=(0,Ce.useSearchParams)(),{languageValue:Fa,languageList:zo,loading:Va,data:Lo,debugResult:Ra,submitResult:Zo,submitRecords:Ns,submitRecordPage:Ta,showNote:qa,debuging:Hs,submitting:ba,executingMessage:Ds}=Rr,[Ri,Oa]=(0,te.useState)("#FFF"),[za,Gs]=(0,te.useState)(null),[Gl,Yi]=(0,te.useState)({}),[oa,Na]=(0,te.useState)(!1),uo=(0,te.useRef)(null),Sa=(0,te.useRef)(null),cs=Lo==null?void 0:Lo.user,as=Lo==null?void 0:Lo.hack;(0,te.useEffect)(()=>((0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,te.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,te.useEffect)(()=>{var Ht;if(oa){const Yt=document.getElementById("oj-next"),xn=document.getElementById("oj-modal-next");((Ht=Yt==null?void 0:Yt.style)==null?void 0:Ht.display)==="none"?xn.style.display="none":xn.style.display="block"}},[oa]),(0,te.useEffect)(()=>{function Ht(){return Tl(this,null,function*(){var Yt,xn,Ln;const _n=yield(0,de.fu)(kr);if(_n.status===401)document.location.href="/user/login";else{_n.hack=_n.practice,_n.hack.code=tt.Base64.decode((Yt=_n==null?void 0:_n.hack)==null?void 0:Yt.code);const Vn=`${cs==null?void 0:cs.login}-language`;localStorage.getItem(Vn)&&(_n.hack.language=localStorage.getItem(Vn)),Sa.current=Ec().cloneDeep(_n),Sa.current.language=(xn=_n==null?void 0:_n.hack)==null?void 0:xn.language,Kr({type:1,payload:{loading:!1,data:_n}}),Kr({type:8,payload:{languageValue:(Ln=_n==null?void 0:_n.hack)==null?void 0:Ln.language}})}})}kr&&Ht()},[kr]),(0,te.useEffect)(()=>{Kr({type:8,payload:{debugResult:void 0}}),Ac(),Na(!1)},[kr]),(0,te.useEffect)(()=>{clearTimeout(uo.current)},[kr]),(0,te.useEffect)(()=>{jc()},[kr,Ta]);const kc=()=>{window.parent.postMessage("backExercise","*")};function jc(){return Tl(this,null,function*(){try{const Ht=yield(0,de.zO)(kr,{limit:15,page:Ta});Kr({type:2,payload:Ht})}catch(Ht){console.log(Ht)}})}function Ac(){return Tl(this,null,function*(){try{const Ht=yield(0,de.dd)(kr);Kr({type:11,payload:Ht==null?void 0:Ht.data})}catch(Ht){console.log(Ht)}})}function Tc(Ht){Kr({type:10,payload:Ht})}function _c(Ht){return Tl(this,null,function*(){var Yt,xn,Ln;const _n=((Ln=(xn=(Yt=window==null?void 0:window.location)==null?void 0:Yt.pathname)==null?void 0:xn.split("/"))==null?void 0:Ln[2])||kr;return yield(0,de.n4)(_n,Ht||{code:tt.Base64.encode(as.code),language:Fa})})}function Kc(){return Tl(this,null,function*(){var Ht;if(!as.code||((Ht=as.code)==null?void 0:Ht.trim())===""){fe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!ba){Kr({type:5,payload:!0});try{if(on.Z.publish("to-commit-info"),(yield _c()).status===0){let Sn=function(){return Tl(this,null,function*(){const{status:Er,data:Dr}=yield(0,de.rX)(kr,"submit"),ei=Nc()-hr>(_n*Vn+3)*1e3;if(Er!==0&&!ei&&setTimeout(Sn,1e3),ei){ae.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Kr({type:5,payload:!1});return}if(Er===0){Dr.status===2&&ae.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const Zr=yield(0,de.zO)(kr,{limit:15,page:Ta});Kr({type:8,payload:qs(ns({},Rr),{submitResult:Dr,submitting:!1,submitRecords:Zr})}),(Dr==null?void 0:Dr.status)===0&&Na(!0)}})},xn={};const Ln=yield(0,de.bM)(kr,xn);if(Ln.status===-1&&Li.get("exercisesId")){window.parent.location.href=`/classrooms/${Li.get("coursesId")}/exercise/${Li.get("exercisesId")}/detail`;return}const{time_limit:_n,test_case_size:Vn}=as,hr=Nc();(Ln==null?void 0:Ln.status)>-1?Sn():Kr({type:4,payload:!1})}}catch(Yt){Kr({type:5,payload:!1})}}})}function Bo(){return Tl(this,null,function*(){var Ht;if(!as.code||((Ht=as.code)==null?void 0:Ht.trim())===""){fe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}Rr.debuging=!0,Kr({type:4,payload:!0});try{if((yield _c()).status===0){let hr=function(){return Tl(this,null,function*(){const{status:Sn,message:Er,data:Dr}=yield(0,de.rX)(kr,"debug"),ei=Nc()-Vn>(xn+3)*1e3;if(Sn!==0&&!ei&&(Kr({type:6,payload:Er}),setTimeout(hr,1e3)),ei){ae.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Kr({type:4,payload:!1});return}Sn===0&&(Kr({type:4,payload:!1}),Dr.status===2&&ae.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Kr({type:7,payload:qs(ns({},Rr),{debugResult:Dr,debuging:!1})}))})};const{time_limit:xn}=as;let Ln={input:encodeURIComponent(Lo.test_case.input)};const _n=yield(0,de.MU)(kr,Ln);if(_n.status===-1&&Li.get("exercisesId")){window.parent.location.href=`/classrooms/${Li.get("coursesId")}/exercise/${Li.get("exercisesId")}/detail`;return}const Vn=Nc();(_n==null?void 0:_n.status)>-1?hr():Kr({type:4,payload:!1})}else Kr({type:4,payload:!1})}catch(Yt){console.log(Yt)}finally{}})}function Ps(Ht){var Yt;clearTimeout(uo.current),uo.current=setTimeout(()=>{var xn;_c({code:tt.Base64.encode(Ht),language:(xn=Sa==null?void 0:Sa.current)==null?void 0:xn.language})},2e3),Kr({type:3,payload:qs(ns({},Sa==null?void 0:Sa.current),{hack:qs(ns({},(Yt=Sa==null?void 0:Sa.current)==null?void 0:Yt.hack),{code:Ht})})})}function jl(Ht){let Yt=Ht.target.value;Kr({type:3,payload:qs(ns({},Lo),{test_case:{input:Yt}})})}const Pc=Ht=>Tl(void 0,null,function*(){var Yt;if(Kr({type:0,payload:!0}),(yield _c()).status===0){Kr({type:8,payload:{languageValue:Ht}}),Sa.current.language=Ht;const Ln=`${cs==null?void 0:cs.login}-language`;localStorage.setItem(Ln,Ht);const _n=yield(0,de.dd)(kr);if(_n.status===0){const Vn=(Yt=_n==null?void 0:_n.data)==null?void 0:Yt.find(hr=>hr.language===Ht);Ps(tt.Base64.decode(Vn.code))}setTimeout(()=>{Kr({type:0,payload:!1})},300)}});function Kl(){return Tl(this,null,function*(){try{const Ht=yield(0,de.H7)(kr,{language:Fa});Ht.status===401?Ce.history.replace("/login",{from:Gr.pathname}):(Ps(tt.Base64.decode(Ht.code)),Ac())}catch(Ht){console.log(Ht)}})}function oc(){ae.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Fo.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Fo.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return Tl(this,null,function*(){const Ht=yield(0,de.fi)(kr,{language:Fa});Ht.status===401?Ce.history.replace("/login",{from:Gr.pathname}):Ps(tt.Base64.decode(Ht.code))})}})}function Cc(){Kr({type:9,payload:!0})}function al(){Kr({type:9,payload:!1})}function Ve(Ht){return Tl(this,null,function*(){yield(0,de.MK)(kr,Ht),Kr({type:1,payload:{showNote:!1,data:qs(ns({},Lo),{hack:qs(ns({},as),{notes:Ht.notes})})}})})}const Qe={input:(Bt=Lo==null?void 0:Lo.test_case)==null?void 0:Bt.input,is_file:(Wt=Lo==null?void 0:Lo.test_case)==null?void 0:Wt.is_file,language:((di=Sa.current)==null?void 0:di.language)||(as==null?void 0:as.language),code:as==null?void 0:as.code,title:"main."+Mc[as==null?void 0:as.language],modify_code:as==null?void 0:as.modify_code,notes:as==null?void 0:as.notes,debugResult:Ra,debuging:Hs,submitting:ba,executingMessage:Ds,id:kr,languageValue:Fa,languageList:zo,onChangeLanguage:Pc,onCancelNote:al,onAddNote:Ve,showNote:qa,onShowNote:Cc,onSubmitCode:Kc,onChangeCode:Ps,onChangeInput:jl,onDebugCode:Bo,onResetCode:Kl,onSyncCode:oc,onUpdateCode:_c};function bt(){return Tl(this,null,function*(){const{praise_count:Ht}=yield(0,de.vl)(as.id,{container_type:"Hack",type:1});let Yt=qs(ns({},Lo),{hack:qs(ns({},as),{praises_count:Ht,user_praise:!as.user_praise})});Kr({type:3,payload:Yt})})}const Rt={topicId:kr,submitResult:Zo,submitRecords:Ns,submitting:ba,page:Ta,onPageChange:Tc,hack:as,user:Lo==null?void 0:Lo.user,onTriggerPraise:bt};return console.log(Lo,Sa==null?void 0:Sa.current,"data--------"),Fo.createElement(Fo.Fragment,null,Fo.createElement(le.Z,{className:"oj-custom-large-spin",size:"large",spinning:Va},Lo?Fo.createElement("div",{className:"oj-custom-warp"},Fo.createElement("header",{className:ft.Z.header,style:{minWidth:1200}},Fo.createElement("div",null,Fo.createElement("img",{src:`${me.Z.IMG_SERVER}/images/${cs.image_url}`,alt:"user",width:30}),Fo.createElement("span",null,cs.name)),Fo.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Fo.createElement("div",null,as.name),Fo.createElement(ic.Z,{onChange:Ht=>{},className:"font12 c-grey-999"})),Fo.createElement(Hl.CopyToClipboard,{text:`${(jr=window.location)==null?void 0:jr.origin}/problems/${as.identifier}/share`,onCopy:()=>fe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Fo.createElement("span",{className:ft.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Fo.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),as.edit_privilege?Fo.createElement(Ce.Link,{className:ft.Z.btn_back,to:`/problems/${as.identifier}/ojedit`,style:{marginRight:10}}," ",Fo.createElement(Se.Z,null)," \u7F16\u8F91"):null,Fo.createElement(Ce.Link,{className:ft.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Fo.createElement(Le.Z,null),"\u9000\u51FA")),Fo.createElement(he.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Fo.createElement(wl,ns({},Rt)),rightChild:Fo.createElement(Vl,ns({},Qe))})):null),Fo.createElement(ae.default,{centered:!0,closable:!1,width:680,footer:null,open:oa,className:"oj-modal"},Fo.createElement("section",{className:"oj-modal-content"},Fo.createElement("div",{className:"oj-modal-head"},Fo.createElement("img",{src:Vc,alt:""}),Fo.createElement("i",{onClick:()=>Na(!1),className:"iconfont icon-guanbi1"})),Fo.createElement("aside",null,Fo.createElement("img",{className:"mr30",src:Ql.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Fo.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Zo==null?void 0:Zo.execute_time,"s"),"\u4F18\u4E8E",Fo.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Zo==null?void 0:Zo.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Fo.createElement("aside",{className:"mb50"},Fo.createElement("img",{src:xc.Z,className:"mr30"}),Fo.createElement("span",{className:"oj-modal-tt"},Fo.createElement("span",null,Fo.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Fo.createElement("span",{className:"c-light-primary"},Zo==null?void 0:Zo.execute_memory,"mb")),Fo.createElement("span",null,Fo.createElement("span",null))),"\u4F18\u4E8E",Fo.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Zo==null?void 0:Zo.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Fo.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function xl({languageValue:mt,languageList:Bt,onChangeLanguage:Wt,title:di,modify_code:jr,onSyncCode:Rr,onShowCodeSetting:Kr,onResetCode:kr}){const Gr=(0,Ce.useLocation)(),Li=()=>{ae.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Fo.createElement(se.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:kr})};return Fo.createElement("div",{className:"action-bar"},Fo.createElement(re.default,{className:"oj-select",value:mt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Wt},Bt==null?void 0:Bt.map(Fa=>Fo.createElement(re.default.Option,{key:Fa.language,value:Fa.language},Fa.language))),Fo.createElement("span",null),Fo.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Li},Fo.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Fo.createElement("a",{onClick:Kr},Fo.createElement("i",{className:"iconfont icon-shezhi"})))}function Vl(mt){var Bt=mt,{id:Wt,input:di,is_file:jr,showNote:Rr,onShowNote:Kr,notes:kr,onCancelNote:Gr,onAddNote:Li,debugResult:Fa,language:zo,debuging:Va,submitting:Lo,executingMessage:Ra,code:Zo,onSubmitCode:Ns,onDebugCode:Ta,onChangeCode:qa,onChangeInput:Hs,onUpdateCode:ba}=Bt,Ds=Hc(Bt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Ri(za){return Fo.createElement(xl,qs(ns({},Ds),{onShowCodeSetting:za}))}const Oa={id:Wt,input:di,debugResult:Fa,debuging:Va,is_file:jr,submitting:Lo,executingMessage:Ra,onDebugCode:Ta,onChangeCode:qa,onSubmitCode:Ns,onChangeInput:Hs};return Fo.createElement("div",{className:"right-panel"},Fo.createElement(Kt,{onUpdateCode:()=>{},language:zo,value:Zo,onChange:qa,ActionBarRender:Ri}),Fo.createElement("div",{className:`note-form-area ${Rr?"active":""}`},Fo.createElement(Tt,{onCancel:Gr,notes:kr,callback:Li})),Fo.createElement(Ut.ZP,ns({},Oa)))}},94189:function(dn,St,ee){"use strict";ee.d(St,{h:function(){return te}});var te=(Se=>(Se[Se.NOMATCH=-1]="NOMATCH",Se[Se.OK=0]="OK",Se[Se.TIMEOUT=2]="TIMEOUT",Se[Se.PODFAILURE=3]="PODFAILURE",Se[Se.COMPILEFAILURE=4]="COMPILEFAILURE",Se[Se.EXECUTEFAILURE=5]="EXECUTEFAILURE",Se[Se.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Se))(te||{})},33227:function(dn,St,ee){"use strict";ee.d(St,{H7:function(){return re},KC:function(){return ye},M3:function(){return Fe},MK:function(){return le},MU:function(){return Ce},Rg:function(){return ze},WH:function(){return _e},X6:function(){return fe},bM:function(){return Le},bx:function(){return Me},dd:function(){return me},de:function(){return be},fi:function(){return de},fu:function(){return Se},gu:function(){return ve},n4:function(){return he},qe:function(){return Te},rL:function(){return Ee},rX:function(){return ae},uc:function(){return Re},vl:function(){return se},wO:function(){return $e},zO:function(){return ce}});var te=ee(33170);function Se(De){return(0,te.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function Le(De,et){return(0,te.v_)(`mypractices/${De}/code_submit.json`,et)}function Ce(De,et){return(0,te.v_)(`mypractices/${De}/code_debug.json`,et)}function ce(De,et){return et.language&&(et.language=encodeURIComponent(et.language)),(0,te.U2)(`mypractices/${De}/submit_records.json`,et)}function fe(De){return(0,te.U2)("mypractices/record_detail.json",{id:De})}function ae(De,et){return(0,te.U2)(`mypractices/${De}/result.json`,{mode:et})}function le(De,et){return(0,te.v_)(`mypractices/${De}/add_notes.json`,et)}function re(De,et){return(0,te.v_)(`mypractices/${De}/restore_initial_code.json`,et)}function de(De,et){return(0,te.v_)(`mypractices/${De}/sync_code.json`,et)}function he(De,et){return(0,te.v_)(`mypractices/${De}/update_code.json`,et)}function me(De){return(0,te.v_)(`mypractices/${De}/initial_codes.json`)}function se(De,et){return(0,te.v_)(`discusses/${De}/plus.json`,et)}function ye(De){return(0,te.U2)("practices/practices_list.json",De)}function _e(De,et){return(0,te.U2)(`practices/${De}/question_solution_articles`,et)}function Me(De,et){return(0,te.v_)(`practices/${De}/question_solution_articles`,et)}function ve(De,et){return(0,te.gz)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}`,et)}function Fe(De,et){return(0,te.U2)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}/edit`,et)}function $e(De,et){return(0,te.U2)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}`,et)}function Te(De,et){return(0,te.v_)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}/set_authority_or_excellent`,et)}function ze(De,et){return(0,te.v_)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}/praise_or_treads`,et)}function Ee(De,et){return(0,te.v_)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}/hide`)}function be(De,et){return(0,te.IV)(`practices/${De}/question_solution_articles/${et==null?void 0:et.active}`,et)}function Re(De,et){return(0,te.v_)(`mypractices/${De}/update_practice_time_sum`,et)}},93989:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return se}});var te=ee(67294),Se=ee(2453),Le=ee(83062),Ce=ee(57953),ce=ee(71230),fe=ee(15746),ae=ee(28452),le=ee(71577),re=ee(91304),de=ee(33170),he=ee(35598),me=(_e,Me,ve)=>new Promise((Fe,$e)=>{var Te=be=>{try{Ee(ve.next(be))}catch(Re){$e(Re)}},ze=be=>{try{Ee(ve.throw(be))}catch(Re){$e(Re)}},Ee=be=>be.done?Fe(be.value):Promise.resolve(be.value).then(Te,ze);Ee((ve=ve.apply(_e,Me)).next())}),se=({id:_e,activeDiscussIndex:Me,onReplyDiscuss:ve,adminOrOperator:Fe})=>{const[$e,Te]=(0,te.useState)(""),[ze,Ee]=(0,te.useState)(!1);function be(De){Te(De)}function Re(){if(!$e){Se.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}ve(_e,$e),Te("")}return(0,te.useEffect)(()=>{Me!=_e&&Ee(!1)},[Me]),te.createElement("div",{key:_e,className:"discuss-item-editor",style:{display:Me===_e?"block":"none",width:"100%"}},te.createElement(re.Z,{miniToolbar:!0,startInit:Me===_e,defaultValue:$e,id:_e,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:be,extraUse:Fe&&te.createElement(Le.Z,{color:"#fff",open:ze,destroyTooltipOnHide:!0,title:ye({id:_e,isOpen:ze,activeDiscussIndex:Me,onChange:be,setIsOpen:Ee}),overlayStyle:{maxWidth:600}},te.createElement("a",{title:ze?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>Ee(!ze)},te.createElement("i",{className:"iconfont icon-dianzan11"})))}),te.createElement("a",{onClick:Re,className:"btn-send"},"\u53D1\u9001"))};const ye=_e=>{const[Me,ve]=(0,te.useState)(!1),[Fe,$e]=(0,te.useState)([]),[Te,ze]=(0,te.useState)(1);(0,te.useEffect)(()=>{_e!=null&&_e.isOpen?Ee():(ze(1),$e([]))},[_e==null?void 0:_e.isOpen]);const Ee=()=>me(void 0,null,function*(){ve(!0);const be=yield(0,de.ZP)(`/api/discusses/${_e==null?void 0:_e.id}/recommend_answer.json`,{method:"get"});(be==null?void 0:be.status)==0&&$e(be==null?void 0:be.answer),ve(!1)});return te.createElement(Ce.Z,{spinning:Me},te.createElement("div",{style:{color:"#000"}},te.createElement(he.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(Fe==null?void 0:Fe[Te-1])||""}),te.createElement(ce.Z,{justify:"end",align:"middle"},te.createElement(fe.Z,null,te.createElement(ae.Z,{simple:!0,current:Te,pageSize:1,total:(Fe==null?void 0:Fe.length)||0,onChange:be=>{ze(be)}})),te.createElement(fe.Z,null,te.createElement(le.ZP,{onClick:()=>me(void 0,null,function*(){_e==null||_e.onChange(Fe==null?void 0:Fe[Te-1]),_e==null||_e.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},51959:function(dn,St,ee){"use strict";ee.d(St,{BU:function(){return Se},Dj:function(){return te},gH:function(){return Le},vp:function(){return Ce}});function te(ce){try{ce.mozRequestFullScreen?ce.mozRequestFullScreen():ce.webkitRequestFullScreen&&ce.webkitRequestFullScreen()}catch(fe){console.log(fe,":e")}}function Se(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Le=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Ce(){var ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,fe=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",ce),window.isFullScreen?window.isFullScreen:ce!=null}},40471:function(dn,St,ee){"use strict";ee.d(St,{G:function(){return ce},t:function(){return Ce}});var te=ee(58971),Se=ee.n(te);const Le=null;function Ce(fe,ae){let le=Se().get("__ec");le||(le={}),le[fe]=ae,Se().set("__ec",le)}function ce(fe,ae){let le=Se().get("__ec");return le?le[fe]===void 0?ae:le[fe]:ae}},24577:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Zt}});class te{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(ge,Ie){return ge.__proto__=Ie,ge},Object.assign=Object.assign||function(ge){if(ge==null)throw new TypeError("Cannot convert undefined or null to object");let Ie=Object(ge);for(let Ae=1;Ae<arguments.length;Ae++){let We=arguments[Ae];if(We!=null)for(let it in We)We.hasOwnProperty(it)&&(Ie[it]=We[it])}return Ie},typeof self.Promise!="function"&&ee(82702).polyfill()}}te.install();var Se=te,Le=ee(17187),Ce=ee.n(Le);class ce{static e(ge,Ie){(!ge||ce.FORCE_GLOBAL_TAG)&&(ge=ce.GLOBAL_TAG);let Ae=`[${ge}] > ${Ie}`;ce.ENABLE_CALLBACK&&ce.emitter.emit("log","error",Ae),ce.ENABLE_ERROR&&(console.error?console.error(Ae):console.warn?console.warn(Ae):console.log(Ae))}static i(ge,Ie){(!ge||ce.FORCE_GLOBAL_TAG)&&(ge=ce.GLOBAL_TAG);let Ae=`[${ge}] > ${Ie}`;ce.ENABLE_CALLBACK&&ce.emitter.emit("log","info",Ae),ce.ENABLE_INFO&&(console.info?console.info(Ae):console.log(Ae))}static w(ge,Ie){(!ge||ce.FORCE_GLOBAL_TAG)&&(ge=ce.GLOBAL_TAG);let Ae=`[${ge}] > ${Ie}`;ce.ENABLE_CALLBACK&&ce.emitter.emit("log","warn",Ae),ce.ENABLE_WARN&&(console.warn?console.warn(Ae):console.log(Ae))}static d(ge,Ie){(!ge||ce.FORCE_GLOBAL_TAG)&&(ge=ce.GLOBAL_TAG);let Ae=`[${ge}] > ${Ie}`;ce.ENABLE_CALLBACK&&ce.emitter.emit("log","debug",Ae),ce.ENABLE_DEBUG&&(console.debug?console.debug(Ae):console.log(Ae))}static v(ge,Ie){(!ge||ce.FORCE_GLOBAL_TAG)&&(ge=ce.GLOBAL_TAG);let Ae=`[${ge}] > ${Ie}`;ce.ENABLE_CALLBACK&&ce.emitter.emit("log","verbose",Ae),ce.ENABLE_VERBOSE&&console.log(Ae)}}ce.GLOBAL_TAG="flv.js",ce.FORCE_GLOBAL_TAG=!1,ce.ENABLE_ERROR=!0,ce.ENABLE_INFO=!0,ce.ENABLE_WARN=!0,ce.ENABLE_DEBUG=!0,ce.ENABLE_VERBOSE=!0,ce.ENABLE_CALLBACK=!1,ce.emitter=new(Ce());var fe=ce;class ae{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(ge){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=ge,this._totalBytes+=ge):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=ge,this._totalBytes+=ge):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=ge,this._totalBytes+=ge,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let ge=(this._now()-this._lastCheckpoint)/1e3;return ge==0&&(ge=1),this._intervalBytes/ge/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let ge=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/ge/1024}}var le=ae;class re{constructor(ge){this._message=ge}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class de extends re{constructor(ge){super(ge)}get name(){return"IllegalStateException"}}class he extends re{constructor(ge){super(ge)}get name(){return"InvalidArgumentException"}}class me extends re{constructor(ge){super(ge)}get name(){return"NotImplementedException"}}const se={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ye={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class _e{constructor(ge){this._type=ge||"undefined",this._status=se.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=se.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===se.kConnecting||this._status===se.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(ge){this._onContentLengthKnown=ge}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(ge){this._onURLRedirect=ge}get onDataArrival(){return this._onDataArrival}set onDataArrival(ge){this._onDataArrival=ge}get onError(){return this._onError}set onError(ge){this._onError=ge}get onComplete(){return this._onComplete}set onComplete(ge){this._onComplete=ge}open(ge,Ie){throw new me("Unimplemented abstract function!")}abort(){throw new me("Unimplemented abstract function!")}}let Me={};function ve(){let Ot=self.navigator.userAgent.toLowerCase(),ge=/(edge)\/([\w.]+)/.exec(Ot)||/(opr)[\/]([\w.]+)/.exec(Ot)||/(chrome)[ \/]([\w.]+)/.exec(Ot)||/(iemobile)[\/]([\w.]+)/.exec(Ot)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Ot)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Ot)||/(webkit)[ \/]([\w.]+)/.exec(Ot)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Ot)||/(msie) ([\w.]+)/.exec(Ot)||Ot.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Ot)||Ot.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Ot)||[],Ie=/(ipad)/.exec(Ot)||/(ipod)/.exec(Ot)||/(windows phone)/.exec(Ot)||/(iphone)/.exec(Ot)||/(kindle)/.exec(Ot)||/(android)/.exec(Ot)||/(windows)/.exec(Ot)||/(mac)/.exec(Ot)||/(linux)/.exec(Ot)||/(cros)/.exec(Ot)||[],Ae={browser:ge[5]||ge[3]||ge[1]||"",version:ge[2]||ge[4]||"0",majorVersion:ge[4]||ge[2]||"0",platform:Ie[0]||""},We={};if(Ae.browser){We[Ae.browser]=!0;let it=Ae.majorVersion.split(".");We.version={major:parseInt(Ae.majorVersion,10),string:Ae.version},it.length>1&&(We.version.minor=parseInt(it[1],10)),it.length>2&&(We.version.build=parseInt(it[2],10))}if(Ae.platform&&(We[Ae.platform]=!0),(We.chrome||We.opr||We.safari)&&(We.webkit=!0),We.rv||We.iemobile){We.rv&&delete We.rv;let it="msie";Ae.browser=it,We[it]=!0}if(We.edge){delete We.edge;let it="msedge";Ae.browser=it,We[it]=!0}if(We.opr){let it="opera";Ae.browser=it,We[it]=!0}if(We.safari&&We.android){let it="android";Ae.browser=it,We[it]=!0}We.name=Ae.browser,We.platform=Ae.platform;for(let it in Me)Me.hasOwnProperty(it)&&delete Me[it];Object.assign(Me,We)}ve();var Fe=Me;class $e extends _e{static isSupported(){try{let ge=Fe.msedge&&Fe.version.minor>=15048,Ie=Fe.msedge?ge:!0;return self.fetch&&self.ReadableStream&&Ie}catch(ge){return!1}}constructor(ge,Ie){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=ge,this._config=Ie,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(ge,Ie){this._dataSource=ge,this._range=Ie;let Ae=ge.url;this._config.reuseRedirectedURL&&ge.redirectedURL!=null&&(Ae=ge.redirectedURL);let We=this._seekHandler.getConfig(Ae,Ie),it=new self.Headers;if(typeof We.headers=="object"){let Ft=We.headers;for(let an in Ft)Ft.hasOwnProperty(an)&&it.append(an,Ft[an])}let xt={method:"GET",headers:it,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Ft in this._config.headers)it.append(Ft,this._config.headers[Ft]);ge.cors===!1&&(xt.mode="same-origin"),ge.withCredentials&&(xt.credentials="include"),ge.referrerPolicy&&(xt.referrerPolicy=ge.referrerPolicy),this._status=se.kConnecting,self.fetch(We.url,xt).then(Ft=>{if(this._requestAbort){this._requestAbort=!1,this._status=se.kIdle;return}if(Ft.ok&&Ft.status>=200&&Ft.status<=299){if(Ft.url!==We.url&&this._onURLRedirect){let Rn=this._seekHandler.removeURLParameters(Ft.url);this._onURLRedirect(Rn)}let an=Ft.headers.get("Content-Length");return an!=null&&(this._contentLength=parseInt(an),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Ft.body.getReader())}else if(this._status=se.kError,this._onError)this._onError(ye.HTTP_STATUS_CODE_INVALID,{code:Ft.status,msg:Ft.statusText});else throw new re("FetchStreamLoader: Http code invalid, "+Ft.status+" "+Ft.statusText)}).catch(Ft=>{if(this._status=se.kError,this._onError)this._onError(ye.EXCEPTION,{code:-1,msg:Ft.message});else throw Ft})}abort(){this._requestAbort=!0}_pump(ge){return ge.read().then(Ie=>{if(Ie.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=se.kError;let Ae=ye.EARLY_EOF,We={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Ae,We);else throw new re(We.msg)}else this._status=se.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=se.kComplete,ge.cancel();this._status=se.kBuffering;let Ae=Ie.value.buffer,We=this._range.from+this._receivedLength;this._receivedLength+=Ae.byteLength,this._onDataArrival&&this._onDataArrival(Ae,We,this._receivedLength),this._pump(ge)}}).catch(Ie=>{if(Ie.code===11&&Fe.msedge)return;this._status=se.kError;let Ae=0,We=null;if((Ie.code===19||Ie.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Ae=ye.EARLY_EOF,We={code:Ie.code,msg:"Fetch stream meet Early-EOF"}):(Ae=ye.EXCEPTION,We={code:Ie.code,msg:Ie.message}),this._onError)this._onError(Ae,We);else throw new re(We.msg)})}}var Te=$e;class ze extends _e{static isSupported(){try{let ge=new XMLHttpRequest;return ge.open("GET","https://example.com",!0),ge.responseType="moz-chunked-arraybuffer",ge.responseType==="moz-chunked-arraybuffer"}catch(ge){return fe.w("MozChunkedLoader",ge.message),!1}}constructor(ge,Ie){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=ge,this._config=Ie,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(ge,Ie){this._dataSource=ge,this._range=Ie;let Ae=ge.url;this._config.reuseRedirectedURL&&ge.redirectedURL!=null&&(Ae=ge.redirectedURL);let We=this._seekHandler.getConfig(Ae,Ie);this._requestURL=We.url;let it=this._xhr=new XMLHttpRequest;if(it.open("GET",We.url,!0),it.responseType="moz-chunked-arraybuffer",it.onreadystatechange=this._onReadyStateChange.bind(this),it.onprogress=this._onProgress.bind(this),it.onloadend=this._onLoadEnd.bind(this),it.onerror=this._onXhrError.bind(this),ge.withCredentials&&(it.withCredentials=!0),typeof We.headers=="object"){let xt=We.headers;for(let Ft in xt)xt.hasOwnProperty(Ft)&&it.setRequestHeader(Ft,xt[Ft])}if(typeof this._config.headers=="object"){let xt=this._config.headers;for(let Ft in xt)xt.hasOwnProperty(Ft)&&it.setRequestHeader(Ft,xt[Ft])}this._status=se.kConnecting,it.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=se.kComplete}_onReadyStateChange(ge){let Ie=ge.target;if(Ie.readyState===2){if(Ie.responseURL!=null&&Ie.responseURL!==this._requestURL&&this._onURLRedirect){let Ae=this._seekHandler.removeURLParameters(Ie.responseURL);this._onURLRedirect(Ae)}if(Ie.status!==0&&(Ie.status<200||Ie.status>299))if(this._status=se.kError,this._onError)this._onError(ye.HTTP_STATUS_CODE_INVALID,{code:Ie.status,msg:Ie.statusText});else throw new re("MozChunkedLoader: Http code invalid, "+Ie.status+" "+Ie.statusText);else this._status=se.kBuffering}}_onProgress(ge){if(this._status===se.kError)return;this._contentLength===null&&ge.total!==null&&ge.total!==0&&(this._contentLength=ge.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Ie=ge.target.response,Ae=this._range.from+this._receivedLength;this._receivedLength+=Ie.byteLength,this._onDataArrival&&this._onDataArrival(Ie,Ae,this._receivedLength)}_onLoadEnd(ge){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===se.kError)return;this._status=se.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(ge){this._status=se.kError;let Ie=0,Ae=null;if(this._contentLength&&ge.loaded<this._contentLength?(Ie=ye.EARLY_EOF,Ae={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Ie=ye.EXCEPTION,Ae={code:-1,msg:ge.constructor.name+" "+ge.type}),this._onError)this._onError(Ie,Ae);else throw new re(Ae.msg)}}var Ee=ze;class be extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let ge=new XMLHttpRequest;return ge.open("GET","https://example.com",!0),ge.responseType="ms-stream",ge.responseType==="ms-stream"}catch(ge){return Log.w("MSStreamLoader",ge.message),!1}}constructor(ge,Ie){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=ge,this._config=Ie,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(ge,Ie){this._internalOpen(ge,Ie,!1)}_internalOpen(ge,Ie,Ae){this._dataSource=ge,Ae?this._currentRange=Ie:this._totalRange=Ie;let We=ge.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?We=this._currentRedirectedURL:ge.redirectedURL!=null&&(We=ge.redirectedURL));let it=this._seekHandler.getConfig(We,Ie);this._currentRequestURL=it.url;let xt=this._reader=new self.MSStreamReader;xt.onprogress=this._msrOnProgress.bind(this),xt.onload=this._msrOnLoad.bind(this),xt.onerror=this._msrOnError.bind(this);let Ft=this._xhr=new XMLHttpRequest;if(Ft.open("GET",it.url,!0),Ft.responseType="ms-stream",Ft.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Ft.onerror=this._xhrOnError.bind(this),ge.withCredentials&&(Ft.withCredentials=!0),typeof it.headers=="object"){let an=it.headers;for(let Rn in an)an.hasOwnProperty(Rn)&&Ft.setRequestHeader(Rn,an[Rn])}if(typeof this._config.headers=="object"){let an=this._config.headers;for(let Rn in an)an.hasOwnProperty(Rn)&&Ft.setRequestHeader(Rn,an[Rn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Ft.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(ge){let Ie=ge.target;if(Ie.readyState===2)if(Ie.status>=200&&Ie.status<=299){if(this._status=LoaderStatus.kBuffering,Ie.responseURL!=null){let We=this._seekHandler.removeURLParameters(Ie.responseURL);Ie.responseURL!==this._currentRequestURL&&We!==this._currentRedirectedURL&&(this._currentRedirectedURL=We,this._onURLRedirect&&this._onURLRedirect(We))}let Ae=Ie.getResponseHeader("Content-Length");if(Ae!=null&&this._contentLength==null){let We=parseInt(Ae);We>0&&(this._contentLength=We,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Ie.status,msg:Ie.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Ie.status+" "+Ie.statusText);else if(Ie.readyState===3&&Ie.status>=200&&Ie.status<=299){this._status=LoaderStatus.kBuffering;let Ae=Ie.response;this._reader.readAsArrayBuffer(Ae)}}_xhrOnError(ge){this._status=LoaderStatus.kError;let Ie=LoaderErrors.EXCEPTION,Ae={code:-1,msg:ge.constructor.name+" "+ge.type};if(this._onError)this._onError(Ie,Ae);else throw new RuntimeException(Ae.msg)}_msrOnProgress(ge){let Ae=ge.target.result;if(Ae==null){this._doReconnectIfNeeded();return}let We=Ae.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Ae.byteLength;let it=this._totalRange.from+this._receivedLength;this._receivedLength+=We.byteLength,this._onDataArrival&&this._onDataArrival(We,it,this._receivedLength),Ae.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${it+We.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let ge={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,ge,!0)}}_msrOnLoad(ge){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(ge){this._status=LoaderStatus.kError;let Ie=0,Ae=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Ie=LoaderErrors.EARLY_EOF,Ae={code:-1,msg:"MSStream meet Early-Eof"}):(Ie=LoaderErrors.EARLY_EOF,Ae={code:-1,msg:ge.constructor.name+" "+ge.type}),this._onError)this._onError(Ie,Ae);else throw new RuntimeException(Ae.msg)}}var Re=null;class De extends _e{static isSupported(){try{let ge=new XMLHttpRequest;return ge.open("GET","https://example.com",!0),ge.responseType="arraybuffer",ge.responseType==="arraybuffer"}catch(ge){return fe.w("RangeLoader",ge.message),!1}}constructor(ge,Ie){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=ge,this._config=Ie,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new le,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(ge,Ie){this._dataSource=ge,this._range=Ie,this._status=se.kConnecting;let Ae=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Ae=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Ae?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let ge=this._currentChunkSizeKB*1024,Ie=this._range.from+this._receivedLength,Ae=Ie+ge;this._contentLength!=null&&Ae-this._range.from>=this._contentLength&&(Ae=this._range.from+this._contentLength-1),this._currentRequestRange={from:Ie,to:Ae},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(ge,Ie){this._lastTimeLoaded=0;let Ae=ge.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ae=this._currentRedirectedURL:ge.redirectedURL!=null&&(Ae=ge.redirectedURL));let We=this._seekHandler.getConfig(Ae,Ie);this._currentRequestURL=We.url;let it=this._xhr=new XMLHttpRequest;if(it.open("GET",We.url,!0),it.responseType="arraybuffer",it.onreadystatechange=this._onReadyStateChange.bind(this),it.onprogress=this._onProgress.bind(this),it.onload=this._onLoad.bind(this),it.onerror=this._onXhrError.bind(this),ge.withCredentials&&(it.withCredentials=!0),typeof We.headers=="object"){let xt=We.headers;for(let Ft in xt)xt.hasOwnProperty(Ft)&&it.setRequestHeader(Ft,xt[Ft])}if(typeof this._config.headers=="object"){let xt=this._config.headers;for(let Ft in xt)xt.hasOwnProperty(Ft)&&it.setRequestHeader(Ft,xt[Ft])}it.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=se.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(ge){let Ie=ge.target;if(Ie.readyState===2){if(Ie.responseURL!=null){let Ae=this._seekHandler.removeURLParameters(Ie.responseURL);Ie.responseURL!==this._currentRequestURL&&Ae!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ae,this._onURLRedirect&&this._onURLRedirect(Ae))}if(Ie.status>=200&&Ie.status<=299){if(this._waitForTotalLength)return;this._status=se.kBuffering}else if(this._status=se.kError,this._onError)this._onError(ye.HTTP_STATUS_CODE_INVALID,{code:Ie.status,msg:Ie.statusText});else throw new re("RangeLoader: Http code invalid, "+Ie.status+" "+Ie.statusText)}}_onProgress(ge){if(this._status===se.kError)return;if(this._contentLength===null){let Ae=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Ae=!0;let We=ge.total;this._internalAbort(),We!=null&We!==0&&(this._totalLength=We)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Ae){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let Ie=ge.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ge.loaded,this._speedSampler.addBytes(Ie)}_normalizeSpeed(ge){let Ie=this._chunkSizeKBList,Ae=Ie.length-1,We=0,it=0,xt=Ae;if(ge<Ie[0])return Ie[0];for(;it<=xt;){if(We=it+Math.floor((xt-it)/2),We===Ae||ge>=Ie[We]&&ge<Ie[We+1])return Ie[We];Ie[We]<ge?it=We+1:xt=We-1}}_onLoad(ge){if(this._status===se.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Ie=this._speedSampler.lastSecondKBps;if(Ie===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Ie=this._speedSampler.currentKBps)),Ie!==0){let xt=this._normalizeSpeed(Ie);this._currentSpeedNormalized!==xt&&(this._currentSpeedNormalized=xt,this._currentChunkSizeKB=xt)}let Ae=ge.target.response,We=this._range.from+this._receivedLength;this._receivedLength+=Ae.byteLength;let it=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():it=!0,this._onDataArrival&&this._onDataArrival(Ae,We,this._receivedLength),it&&(this._status=se.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(ge){this._status=se.kError;let Ie=0,Ae=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Ie=ye.EARLY_EOF,Ae={code:-1,msg:"RangeLoader meet Early-Eof"}):(Ie=ye.EXCEPTION,Ae={code:-1,msg:ge.constructor.name+" "+ge.type}),this._onError)this._onError(Ie,Ae);else throw new re(Ae.msg)}}var et=De;class Ye extends _e{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(ge){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(ge){try{let Ie=this._ws=new self.WebSocket(ge.url);Ie.binaryType="arraybuffer",Ie.onopen=this._onWebSocketOpen.bind(this),Ie.onclose=this._onWebSocketClose.bind(this),Ie.onmessage=this._onWebSocketMessage.bind(this),Ie.onerror=this._onWebSocketError.bind(this),this._status=se.kConnecting}catch(Ie){this._status=se.kError;let Ae={code:Ie.code,msg:Ie.message};if(this._onError)this._onError(ye.EXCEPTION,Ae);else throw new re(Ae.msg)}}abort(){let ge=this._ws;ge&&(ge.readyState===0||ge.readyState===1)&&(this._requestAbort=!0,ge.close()),this._ws=null,this._status=se.kComplete}_onWebSocketOpen(ge){this._status=se.kBuffering}_onWebSocketClose(ge){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=se.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(ge){if(ge.data instanceof ArrayBuffer)this._dispatchArrayBuffer(ge.data);else if(ge.data instanceof Blob){let Ie=new FileReader;Ie.onload=()=>{this._dispatchArrayBuffer(Ie.result)},Ie.readAsArrayBuffer(ge.data)}else{this._status=se.kError;let Ie={code:-1,msg:"Unsupported WebSocket message type: "+ge.data.constructor.name};if(this._onError)this._onError(ye.EXCEPTION,Ie);else throw new re(Ie.msg)}}_dispatchArrayBuffer(ge){let Ie=ge,Ae=this._receivedLength;this._receivedLength+=Ie.byteLength,this._onDataArrival&&this._onDataArrival(Ie,Ae,this._receivedLength)}_onWebSocketError(ge){this._status=se.kError;let Ie={code:ge.code,msg:ge.message};if(this._onError)this._onError(ye.EXCEPTION,Ie);else throw new re(Ie.msg)}}var dt=Ye;class Ke{constructor(ge){this._zeroStart=ge||!1}getConfig(ge,Ie){let Ae={};if(Ie.from!==0||Ie.to!==-1){let We;Ie.to!==-1?We=`bytes=${Ie.from.toString()}-${Ie.to.toString()}`:We=`bytes=${Ie.from.toString()}-`,Ae.Range=We}else this._zeroStart&&(Ae.Range="bytes=0-");return{url:ge,headers:Ae}}removeURLParameters(ge){return ge}}var zt=Ke;class pt{constructor(ge,Ie){this._startName=ge,this._endName=Ie}getConfig(ge,Ie){let Ae=ge;if(Ie.from!==0||Ie.to!==-1){let We=!0;Ae.indexOf("?")===-1&&(Ae+="?",We=!1),We&&(Ae+="&"),Ae+=`${this._startName}=${Ie.from.toString()}`,Ie.to!==-1&&(Ae+=`&${this._endName}=${Ie.to.toString()}`)}return{url:Ae,headers:{}}}removeURLParameters(ge){let Ie=ge.split("?")[0],Ae,We=ge.indexOf("?");We!==-1&&(Ae=ge.substring(We+1));let it="";if(Ae!=null&&Ae.length>0){let xt=Ae.split("&");for(let Ft=0;Ft<xt.length;Ft++){let an=xt[Ft].split("="),Rn=Ft>0;an[0]!==this._startName&&an[0]!==this._endName&&(Rn&&(it+="&"),it+=xt[Ft])}}return it.length===0?Ie:Ie+"?"+it}}var Kt=pt;class Ze{constructor(ge,Ie,Ae){this.TAG="IOController",this._config=Ie,this._extraData=Ae,this._stashInitialSize=1024*384,Ie.stashInitialSize!=null&&Ie.stashInitialSize>0&&(this._stashInitialSize=Ie.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,Ie.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=ge,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(ge.url),this._refTotalLength=ge.filesize?ge.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new le,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(ge){this._extraData=ge}get onDataArrival(){return this._onDataArrival}set onDataArrival(ge){this._onDataArrival=ge}get onSeeked(){return this._onSeeked}set onSeeked(ge){this._onSeeked=ge}get onError(){return this._onError}set onError(ge){this._onError=ge}get onComplete(){return this._onComplete}set onComplete(ge){this._onComplete=ge}get onRedirect(){return this._onRedirect}set onRedirect(ge){this._onRedirect=ge}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(ge){this._onRecoveredEarlyEof=ge}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===et?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let ge=this._config;if(ge.seekType==="range")this._seekHandler=new zt(this._config.rangeLoadZeroStart);else if(ge.seekType==="param"){let Ie=ge.seekParamStart||"bstart",Ae=ge.seekParamEnd||"bend";this._seekHandler=new Kt(Ie,Ae)}else if(ge.seekType==="custom"){if(typeof ge.customSeekHandler!="function")throw new he("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new ge.customSeekHandler}else throw new he(`Invalid seekType in config: ${ge.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=dt;else if(Te.isSupported())this._loaderClass=Te;else if(Ee.isSupported())this._loaderClass=Ee;else if(et.isSupported())this._loaderClass=et;else throw new re("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(ge){this._currentRange={from:0,to:-1},ge&&(this._currentRange.from=ge),this._speedSampler.reset(),ge||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let ge=this._resumeFrom;this._resumeFrom=0,this._internalSeek(ge,!0)}}seek(ge){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(ge,!0)}_internalSeek(ge,Ie){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Ie),this._loader.destroy(),this._loader=null;let Ae={from:ge,to:-1};this._currentRange={from:Ae.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Ae),this._onSeeked&&this._onSeeked()}updateUrl(ge){if(!ge||typeof ge!="string"||ge.length===0)throw new he("Url must be a non-empty string!");this._dataSource.url=ge}_expandBuffer(ge){let Ie=this._stashSize;for(;Ie+1024*1024*1<ge;)Ie*=2;if(Ie+=1024*1024*1,Ie===this._bufferSize)return;let Ae=new ArrayBuffer(Ie);if(this._stashUsed>0){let We=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Ae,0,Ie).set(We,0)}this._stashBuffer=Ae,this._bufferSize=Ie}_normalizeSpeed(ge){let Ie=this._speedNormalizeList,Ae=Ie.length-1,We=0,it=0,xt=Ae;if(ge<Ie[0])return Ie[0];for(;it<=xt;){if(We=it+Math.floor((xt-it)/2),We===Ae||ge>=Ie[We]&&ge<Ie[We+1])return Ie[We];Ie[We]<ge?it=We+1:xt=We-1}}_adjustStashSize(ge){let Ie=0;this._config.isLive||ge<512?Ie=ge:ge>=512&&ge<=1024?Ie=Math.floor(ge*1.5):Ie=ge*2,Ie>8192&&(Ie=8192);let Ae=Ie*1024+1024*1024*1;this._bufferSize<Ae&&this._expandBuffer(Ae),this._stashSize=Ie*1024}_dispatchChunks(ge,Ie){return this._currentRange.to=Ie+ge.byteLength-1,this._onDataArrival(ge,Ie)}_onURLRedirect(ge){this._redirectedURL=ge,this._onRedirect&&this._onRedirect(ge)}_onContentLengthKnown(ge){ge&&this._fullRequestFlag&&(this._totalLength=ge,this._fullRequestFlag=!1)}_onLoaderChunkArrival(ge,Ie,Ae){if(!this._onDataArrival)throw new de("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(ge.byteLength);let We=this._speedSampler.lastSecondKBps;if(We!==0){let it=this._normalizeSpeed(We);this._speedNormalized!==it&&(this._speedNormalized=it,this._adjustStashSize(it))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Ie),this._stashUsed+ge.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(ge),this._stashUsed),this._stashUsed+=ge.byteLength;else{let it=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let xt=this._stashBuffer.slice(0,this._stashUsed),Ft=this._dispatchChunks(xt,this._stashByteStart);if(Ft<xt.byteLength){if(Ft>0){let an=new Uint8Array(xt,Ft);it.set(an,0),this._stashUsed=an.byteLength,this._stashByteStart+=Ft}}else this._stashUsed=0,this._stashByteStart+=Ft;this._stashUsed+ge.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+ge.byteLength),it=new Uint8Array(this._stashBuffer,0,this._bufferSize)),it.set(new Uint8Array(ge),this._stashUsed),this._stashUsed+=ge.byteLength}else{let xt=this._dispatchChunks(ge,Ie);if(xt<ge.byteLength){let Ft=ge.byteLength-xt;Ft>this._bufferSize&&(this._expandBuffer(Ft),it=new Uint8Array(this._stashBuffer,0,this._bufferSize)),it.set(new Uint8Array(ge,xt),0),this._stashUsed+=Ft,this._stashByteStart=Ie+xt}}}else if(this._stashUsed===0){let it=this._dispatchChunks(ge,Ie);if(it<ge.byteLength){let xt=ge.byteLength-it;xt>this._bufferSize&&this._expandBuffer(xt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(ge,it),0),this._stashUsed+=xt,this._stashByteStart=Ie+it}}else{this._stashUsed+ge.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+ge.byteLength);let it=new Uint8Array(this._stashBuffer,0,this._bufferSize);it.set(new Uint8Array(ge),this._stashUsed),this._stashUsed+=ge.byteLength;let xt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(xt<this._stashUsed&&xt>0){let Ft=new Uint8Array(this._stashBuffer,xt);it.set(Ft,0)}this._stashUsed-=xt,this._stashByteStart+=xt}}_flushStashBuffer(ge){if(this._stashUsed>0){let Ie=this._stashBuffer.slice(0,this._stashUsed),Ae=this._dispatchChunks(Ie,this._stashByteStart),We=Ie.byteLength-Ae;if(Ae<Ie.byteLength)if(ge)fe.w(this.TAG,`${We} bytes unconsumed data remain when flush buffer, dropped`);else{if(Ae>0){let it=new Uint8Array(this._stashBuffer,0,this._bufferSize),xt=new Uint8Array(Ie,Ae);it.set(xt,0),this._stashUsed=xt.byteLength,this._stashByteStart+=Ae}return 0}return this._stashUsed=0,this._stashByteStart=0,We}return 0}_onLoaderComplete(ge,Ie){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(ge,Ie){switch(fe.e(this.TAG,`Loader error, code = ${Ie.code}, msg = ${Ie.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,ge=ye.UNRECOVERABLE_EARLY_EOF),ge){case ye.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Ae=this._currentRange.to+1;Ae<this._totalLength&&(fe.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Ae,!1));return}ge=ye.UNRECOVERABLE_EARLY_EOF;break}case ye.UNRECOVERABLE_EARLY_EOF:case ye.CONNECTING_TIMEOUT:case ye.HTTP_STATUS_CODE_INVALID:case ye.EXCEPTION:break}if(this._onError)this._onError(ge,Ie);else throw new re("IOException: "+Ie.msg)}}var tt=Ze;const ft={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function Ut(){return Object.assign({},ft)}class nt{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let ge=new tt({},Ut()),Ie=ge.loaderType;return ge.destroy(),Ie=="fetch-stream-loader"||Ie=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let ge=new tt({},Ut()),Ie=ge.loaderType;return ge.destroy(),Ie}static supportNativeMediaPlayback(ge){nt.videoElement==null&&(nt.videoElement=window.document.createElement("video"));let Ie=nt.videoElement.canPlayType(ge);return Ie==="probably"||Ie=="maybe"}static getFeatureList(){let ge={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return ge.mseFlvPlayback=nt.supportMSEH264Playback(),ge.networkStreamIO=nt.supportNetworkStreamIO(),ge.networkLoaderName=nt.getNetworkLoaderTypeName(),ge.mseLiveFlvPlayback=ge.mseFlvPlayback&&ge.networkStreamIO,ge.nativeMP4H264Playback=nt.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),ge.nativeWebmVP8Playback=nt.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),ge.nativeWebmVP9Playback=nt.supportNativeMediaPlayback('video/webm; codecs="vp9"'),ge}}var Ge=nt,yn={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class ln{static get forceGlobalTag(){return fe.FORCE_GLOBAL_TAG}static set forceGlobalTag(ge){fe.FORCE_GLOBAL_TAG=ge,ln._notifyChange()}static get globalTag(){return fe.GLOBAL_TAG}static set globalTag(ge){fe.GLOBAL_TAG=ge,ln._notifyChange()}static get enableAll(){return fe.ENABLE_VERBOSE&&fe.ENABLE_DEBUG&&fe.ENABLE_INFO&&fe.ENABLE_WARN&&fe.ENABLE_ERROR}static set enableAll(ge){fe.ENABLE_VERBOSE=ge,fe.ENABLE_DEBUG=ge,fe.ENABLE_INFO=ge,fe.ENABLE_WARN=ge,fe.ENABLE_ERROR=ge,ln._notifyChange()}static get enableDebug(){return fe.ENABLE_DEBUG}static set enableDebug(ge){fe.ENABLE_DEBUG=ge,ln._notifyChange()}static get enableVerbose(){return fe.ENABLE_VERBOSE}static set enableVerbose(ge){fe.ENABLE_VERBOSE=ge,ln._notifyChange()}static get enableInfo(){return fe.ENABLE_INFO}static set enableInfo(ge){fe.ENABLE_INFO=ge,ln._notifyChange()}static get enableWarn(){return fe.ENABLE_WARN}static set enableWarn(ge){fe.ENABLE_WARN=ge,ln._notifyChange()}static get enableError(){return fe.ENABLE_ERROR}static set enableError(ge){fe.ENABLE_ERROR=ge,ln._notifyChange()}static getConfig(){return{globalTag:fe.GLOBAL_TAG,forceGlobalTag:fe.FORCE_GLOBAL_TAG,enableVerbose:fe.ENABLE_VERBOSE,enableDebug:fe.ENABLE_DEBUG,enableInfo:fe.ENABLE_INFO,enableWarn:fe.ENABLE_WARN,enableError:fe.ENABLE_ERROR,enableCallback:fe.ENABLE_CALLBACK}}static applyConfig(ge){fe.GLOBAL_TAG=ge.globalTag,fe.FORCE_GLOBAL_TAG=ge.forceGlobalTag,fe.ENABLE_VERBOSE=ge.enableVerbose,fe.ENABLE_DEBUG=ge.enableDebug,fe.ENABLE_INFO=ge.enableInfo,fe.ENABLE_WARN=ge.enableWarn,fe.ENABLE_ERROR=ge.enableError,fe.ENABLE_CALLBACK=ge.enableCallback}static _notifyChange(){let ge=ln.emitter;if(ge.listenerCount("change")>0){let Ie=ln.getConfig();ge.emit("change",Ie)}}static registerListener(ge){ln.emitter.addListener("change",ge)}static removeListener(ge){ln.emitter.removeListener("change",ge)}static addLogListener(ge){fe.emitter.addListener("log",ge),fe.emitter.listenerCount("log")>0&&(fe.ENABLE_CALLBACK=!0,ln._notifyChange())}static removeLogListener(ge){fe.emitter.removeListener("log",ge),fe.emitter.listenerCount("log")===0&&(fe.ENABLE_CALLBACK=!1,ln._notifyChange())}}ln.emitter=new(Ce());var Tt=ln;class Lt{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let ge=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Ie=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&ge&&Ie}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(ge){if(this.keyframesIndex==null)return null;let Ie=this.keyframesIndex,Ae=this._search(Ie.times,ge);return{index:Ae,milliseconds:Ie.times[Ae],fileposition:Ie.filepositions[Ae]}}_search(ge,Ie){let Ae=0,We=ge.length-1,it=0,xt=0,Ft=We;for(Ie<ge[0]&&(Ae=0,xt=Ft+1);xt<=Ft;)if(it=xt+Math.floor((Ft-xt)/2),it===We||Ie>=ge[it]&&Ie<ge[it+1]){Ae=it;break}else ge[it]<Ie?xt=it+1:Ft=it-1;return Ae}}var Jt=Lt;function kn(Ot,ge,Ie){let Ae=Ot;if(ge+Ie<Ae.length){for(;Ie--;)if((Ae[++ge]&192)!==128)return!1;return!0}else return!1}function In(Ot){let ge=[],Ie=Ot,Ae=0,We=Ot.length;for(;Ae<We;){if(Ie[Ae]<128){ge.push(String.fromCharCode(Ie[Ae])),++Ae;continue}else if(!(Ie[Ae]<192)){if(Ie[Ae]<224){if(kn(Ie,Ae,1)){let it=(Ie[Ae]&31)<<6|Ie[Ae+1]&63;if(it>=128){ge.push(String.fromCharCode(it&65535)),Ae+=2;continue}}}else if(Ie[Ae]<240){if(kn(Ie,Ae,2)){let it=(Ie[Ae]&15)<<12|(Ie[Ae+1]&63)<<6|Ie[Ae+2]&63;if(it>=2048&&(it&63488)!==55296){ge.push(String.fromCharCode(it&65535)),Ae+=3;continue}}}else if(Ie[Ae]<248&&kn(Ie,Ae,3)){let it=(Ie[Ae]&7)<<18|(Ie[Ae+1]&63)<<12|(Ie[Ae+2]&63)<<6|Ie[Ae+3]&63;if(it>65536&&it<1114112){it-=65536,ge.push(String.fromCharCode(it>>>10|55296)),ge.push(String.fromCharCode(it&1023|56320)),Ae+=4;continue}}}ge.push("\uFFFD"),++Ae}return ge.join("")}var Qt=In;let Mn=function(){let Ot=new ArrayBuffer(2);return new DataView(Ot).setInt16(0,256,!0),new Int16Array(Ot)[0]===256}();class Wn{static parseScriptData(ge,Ie,Ae){let We={};try{let it=Wn.parseValue(ge,Ie,Ae),xt=Wn.parseValue(ge,Ie+it.size,Ae-it.size);We[it.data]=xt.data}catch(it){fe.e("AMF",it.toString())}return We}static parseObject(ge,Ie,Ae){if(Ae<3)throw new de("Data not enough when parse ScriptDataObject");let We=Wn.parseString(ge,Ie,Ae),it=Wn.parseValue(ge,Ie+We.size,Ae-We.size),xt=it.objectEnd;return{data:{name:We.data,value:it.data},size:We.size+it.size,objectEnd:xt}}static parseVariable(ge,Ie,Ae){return Wn.parseObject(ge,Ie,Ae)}static parseString(ge,Ie,Ae){if(Ae<2)throw new de("Data not enough when parse String");let it=new DataView(ge,Ie,Ae).getUint16(0,!Mn),xt;return it>0?xt=Qt(new Uint8Array(ge,Ie+2,it)):xt="",{data:xt,size:2+it}}static parseLongString(ge,Ie,Ae){if(Ae<4)throw new de("Data not enough when parse LongString");let it=new DataView(ge,Ie,Ae).getUint32(0,!Mn),xt;return it>0?xt=Qt(new Uint8Array(ge,Ie+4,it)):xt="",{data:xt,size:4+it}}static parseDate(ge,Ie,Ae){if(Ae<10)throw new de("Data size invalid when parse Date");let We=new DataView(ge,Ie,Ae),it=We.getFloat64(0,!Mn),xt=We.getInt16(8,!Mn);return it+=xt*60*1e3,{data:new Date(it),size:10}}static parseValue(ge,Ie,Ae){if(Ae<1)throw new de("Data not enough when parse Value");let We=new DataView(ge,Ie,Ae),it=1,xt=We.getUint8(0),Ft,an=!1;try{switch(xt){case 0:Ft=We.getFloat64(1,!Mn),it+=8;break;case 1:{Ft=!!We.getUint8(1),it+=1;break}case 2:{let Rn=Wn.parseString(ge,Ie+1,Ae-1);Ft=Rn.data,it+=Rn.size;break}case 3:{Ft={};let Rn=0;for((We.getUint32(Ae-4,!Mn)&16777215)===9&&(Rn=3);it<Ae-4;){let mr=Wn.parseObject(ge,Ie+it,Ae-it-Rn);if(mr.objectEnd)break;Ft[mr.data.name]=mr.data.value,it+=mr.size}it<=Ae-3&&(We.getUint32(it-1,!Mn)&16777215)===9&&(it+=3);break}case 8:{Ft={},it+=4;let Rn=0;for((We.getUint32(Ae-4,!Mn)&16777215)===9&&(Rn=3);it<Ae-8;){let mr=Wn.parseVariable(ge,Ie+it,Ae-it-Rn);if(mr.objectEnd)break;Ft[mr.data.name]=mr.data.value,it+=mr.size}it<=Ae-3&&(We.getUint32(it-1,!Mn)&16777215)===9&&(it+=3);break}case 9:Ft=void 0,it=1,an=!0;break;case 10:{Ft=[];let Rn=We.getUint32(1,!Mn);it+=4;for(let mr=0;mr<Rn;mr++){let or=Wn.parseValue(ge,Ie+it,Ae-it);Ft.push(or.data),it+=or.size}break}case 11:{let Rn=Wn.parseDate(ge,Ie+1,Ae-1);Ft=Rn.data,it+=Rn.size;break}case 12:{let Rn=Wn.parseString(ge,Ie+1,Ae-1);Ft=Rn.data,it+=Rn.size;break}default:it=Ae,fe.w("AMF","Unsupported AMF value type "+xt)}}catch(Rn){fe.e("AMF",Rn.toString())}return{data:Ft,size:it,objectEnd:an}}}var zn=Wn;class at{constructor(ge){this.TAG="ExpGolomb",this._buffer=ge,this._buffer_index=0,this._total_bytes=ge.byteLength,this._total_bits=ge.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let ge=this._total_bytes-this._buffer_index;if(ge<=0)throw new de("ExpGolomb: _fillCurrentWord() but no bytes available");let Ie=Math.min(4,ge),Ae=new Uint8Array(4);Ae.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Ie)),this._current_word=new DataView(Ae.buffer).getUint32(0,!1),this._buffer_index+=Ie,this._current_word_bits_left=Ie*8}readBits(ge){if(ge>32)throw new he("ExpGolomb: readBits() bits exceeded max 32bits!");if(ge<=this._current_word_bits_left){let xt=this._current_word>>>32-ge;return this._current_word<<=ge,this._current_word_bits_left-=ge,xt}let Ie=this._current_word_bits_left?this._current_word:0;Ie=Ie>>>32-this._current_word_bits_left;let Ae=ge-this._current_word_bits_left;this._fillCurrentWord();let We=Math.min(Ae,this._current_word_bits_left),it=this._current_word>>>32-We;return this._current_word<<=We,this._current_word_bits_left-=We,Ie=Ie<<We|it,Ie}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let ge;for(ge=0;ge<this._current_word_bits_left;ge++)if(this._current_word&2147483648>>>ge)return this._current_word<<=ge,this._current_word_bits_left-=ge,ge;return this._fillCurrentWord(),ge+this._skipLeadingZero()}readUEG(){let ge=this._skipLeadingZero();return this.readBits(ge+1)-1}readSEG(){let ge=this.readUEG();return ge&1?ge+1>>>1:-1*(ge>>>1)}}var Oe=at;class ke{static _ebsp2rbsp(ge){let Ie=ge,Ae=Ie.byteLength,We=new Uint8Array(Ae),it=0;for(let xt=0;xt<Ae;xt++)xt>=2&&Ie[xt]===3&&Ie[xt-1]===0&&Ie[xt-2]===0||(We[it]=Ie[xt],it++);return new Uint8Array(We.buffer,0,it)}static parseSPS(ge){let Ie=ke._ebsp2rbsp(ge),Ae=new Oe(Ie);Ae.readByte();let We=Ae.readByte();Ae.readByte();let it=Ae.readByte();Ae.readUEG();let xt=ke.getProfileString(We),Ft=ke.getLevelString(it),an=1,Rn=420,mr=[0,420,422,444],or=8;if((We===100||We===110||We===122||We===244||We===44||We===83||We===86||We===118||We===128||We===138||We===144)&&(an=Ae.readUEG(),an===3&&Ae.readBits(1),an<=3&&(Rn=mr[an]),or=Ae.readUEG()+8,Ae.readUEG(),Ae.readBits(1),Ae.readBool())){let ea=an!==3?8:12;for(let Ho=0;Ho<ea;Ho++)Ae.readBool()&&(Ho<6?ke._skipScalingList(Ae,16):ke._skipScalingList(Ae,64))}Ae.readUEG();let cr=Ae.readUEG();if(cr===0)Ae.readUEG();else if(cr===1){Ae.readBits(1),Ae.readSEG(),Ae.readSEG();let ea=Ae.readUEG();for(let Ho=0;Ho<ea;Ho++)Ae.readSEG()}let Xn=Ae.readUEG();Ae.readBits(1);let br=Ae.readUEG(),_r=Ae.readUEG(),mn=Ae.readBits(1);mn===0&&Ae.readBits(1),Ae.readBits(1);let $n=0,Vr=0,qr=0,Ir=0;Ae.readBool()&&($n=Ae.readUEG(),Vr=Ae.readUEG(),qr=Ae.readUEG(),Ir=Ae.readUEG());let Ni=1,yr=1,bi=0,ar=!0,fo=0,qi=0;if(Ae.readBool()){if(Ae.readBool()){let ea=Ae.readByte(),Ho=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],No=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ea>0&&ea<16?(Ni=Ho[ea-1],yr=No[ea-1]):ea===255&&(Ni=Ae.readByte()<<8|Ae.readByte(),yr=Ae.readByte()<<8|Ae.readByte())}if(Ae.readBool()&&Ae.readBool(),Ae.readBool()&&(Ae.readBits(4),Ae.readBool()&&Ae.readBits(24)),Ae.readBool()&&(Ae.readUEG(),Ae.readUEG()),Ae.readBool()){let ea=Ae.readBits(32),Ho=Ae.readBits(32);ar=Ae.readBool(),fo=Ho,qi=ea*2,bi=fo/qi}}let Jo=1;(Ni!==1||yr!==1)&&(Jo=Ni/yr);let bo=0,oo=0;if(an===0)bo=1,oo=2-mn;else{let ea=an===3?1:2,Ho=an===1?2:1;bo=ea,oo=Ho*(2-mn)}let na=(br+1)*16,Eo=(2-mn)*((_r+1)*16);na-=($n+Vr)*bo,Eo-=(qr+Ir)*oo;let ra=Math.ceil(na*Jo);return Ae.destroy(),Ae=null,{profile_string:xt,level_string:Ft,bit_depth:or,ref_frames:Xn,chroma_format:Rn,chroma_format_string:ke.getChromaFormatString(Rn),frame_rate:{fixed:ar,fps:bi,fps_den:qi,fps_num:fo},sar_ratio:{width:Ni,height:yr},codec_size:{width:na,height:Eo},present_size:{width:ra,height:Eo}}}static _skipScalingList(ge,Ie){let Ae=8,We=8,it=0;for(let xt=0;xt<Ie;xt++)We!==0&&(it=ge.readSEG(),We=(Ae+it+256)%256),Ae=We===0?Ae:We}static getProfileString(ge){switch(ge){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(ge){return(ge/10).toFixed(1)}static getChromaFormatString(ge){switch(ge){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Be=ke,we={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function rt(Ot){return Ot>>>8&255|(Ot&255)<<8}function It(Ot){return(Ot&4278190080)>>>24|(Ot&16711680)>>>8|(Ot&65280)<<8|(Ot&255)<<24}function Ct(Ot,ge){return Ot[ge]<<24|Ot[ge+1]<<16|Ot[ge+2]<<8|Ot[ge+3]}class $t{constructor(ge,Ie){this.TAG="FLVDemuxer",this._config=Ie,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=ge.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=ge.hasAudioTrack,this._hasVideo=ge.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Jt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let Ae=new ArrayBuffer(2);return new DataView(Ae).setInt16(0,256,!0),new Int16Array(Ae)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(ge){let Ie=new Uint8Array(ge),Ae={match:!1};if(Ie[0]!==70||Ie[1]!==76||Ie[2]!==86||Ie[3]!==1)return Ae;let We=(Ie[4]&4)>>>2!==0,it=(Ie[4]&1)!==0,xt=Ct(Ie,5);return xt<9?Ae:{match:!0,consumed:xt,dataOffset:xt,hasAudioTrack:We,hasVideoTrack:it}}bindDataSource(ge){return ge.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(ge){this._onTrackMetadata=ge}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(ge){this._onMediaInfo=ge}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(ge){this._onMetaDataArrived=ge}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(ge){this._onScriptDataArrived=ge}get onError(){return this._onError}set onError(ge){this._onError=ge}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(ge){this._onDataAvailable=ge}get timestampBase(){return this._timestampBase}set timestampBase(ge){this._timestampBase=ge}get overridedDuration(){return this._duration}set overridedDuration(ge){this._durationOverrided=!0,this._duration=ge,this._mediaInfo.duration=ge}set overridedHasAudio(ge){this._hasAudioFlagOverrided=!0,this._hasAudio=ge,this._mediaInfo.hasAudio=ge}set overridedHasVideo(ge){this._hasVideoFlagOverrided=!0,this._hasVideo=ge,this._mediaInfo.hasVideo=ge}resetMediaInfo(){this._mediaInfo=new Jt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(ge,Ie){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new de("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Ae=0,We=this._littleEndian;if(Ie===0)if(ge.byteLength>13)Ae=$t.probe(ge).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Ie+Ae!==this._dataOffset&&fe.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(ge,Ae).getUint32(0,!We)!==0&&fe.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Ae+=4);Ae<ge.byteLength;){this._dispatch=!0;let it=new DataView(ge,Ae);if(Ae+11+4>ge.byteLength)break;let xt=it.getUint8(0),Ft=it.getUint32(0,!We)&16777215;if(Ae+11+Ft+4>ge.byteLength)break;if(xt!==8&&xt!==9&&xt!==18){fe.w(this.TAG,`Unsupported tag type ${xt}, skipped`),Ae+=11+Ft+4;continue}let an=it.getUint8(4),Rn=it.getUint8(5),mr=it.getUint8(6),or=it.getUint8(7),cr=mr|Rn<<8|an<<16|or<<24;(it.getUint32(7,!We)&16777215)!==0&&fe.w(this.TAG,"Meet tag which has StreamID != 0!");let br=Ae+11;switch(xt){case 8:this._parseAudioData(ge,br,Ft,cr);break;case 9:this._parseVideoData(ge,br,Ft,cr,Ie+Ae);break;case 18:this._parseScriptData(ge,br,Ft);break}let _r=it.getUint32(11+Ft,!We);_r!==11+Ft&&fe.w(this.TAG,`Invalid PrevTagSize ${_r}`),Ae+=11+Ft+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Ae}_parseScriptData(ge,Ie,Ae){let We=zn.parseScriptData(ge,Ie,Ae);if(We.hasOwnProperty("onMetaData")){if(We.onMetaData==null||typeof We.onMetaData!="object"){fe.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&fe.w(this.TAG,"Found another onMetaData tag!"),this._metadata=We;let it=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},it)),typeof it.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=it.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof it.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=it.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof it.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=it.audiodatarate),typeof it.videodatarate=="number"&&(this._mediaInfo.videoDataRate=it.videodatarate),typeof it.width=="number"&&(this._mediaInfo.width=it.width),typeof it.height=="number"&&(this._mediaInfo.height=it.height),typeof it.duration=="number"){if(!this._durationOverrided){let xt=Math.floor(it.duration*this._timescale);this._duration=xt,this._mediaInfo.duration=xt}}else this._mediaInfo.duration=0;if(typeof it.framerate=="number"){let xt=Math.floor(it.framerate*1e3);if(xt>0){let Ft=xt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Ft,this._referenceFrameRate.fps_num=xt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Ft}}if(typeof it.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let xt=it.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(xt),it.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=it,fe.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(We).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},We))}_parseKeyframesIndex(ge){let Ie=[],Ae=[];for(let We=1;We<ge.times.length;We++){let it=this._timestampBase+Math.floor(ge.times[We]*1e3);Ie.push(it),Ae.push(ge.filepositions[We])}return{times:Ie,filepositions:Ae}}_parseAudioData(ge,Ie,Ae,We){if(Ae<=1){fe.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let it=this._littleEndian,Ft=new DataView(ge,Ie,Ae).getUint8(0),an=Ft>>>4;if(an!==2&&an!==10){this._onError(we.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+an);return}let Rn=0,mr=(Ft&12)>>>2;if(mr>=0&&mr<=4)Rn=this._flvSoundRateTable[mr];else{this._onError(we.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+mr);return}let or=(Ft&2)>>>1,cr=Ft&1,Xn=this._audioMetadata,br=this._audioTrack;if(Xn||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Xn=this._audioMetadata={},Xn.type="audio",Xn.id=br.id,Xn.timescale=this._timescale,Xn.duration=this._duration,Xn.audioSampleRate=Rn,Xn.channelCount=cr===0?1:2),an===10){let _r=this._parseAACAudioData(ge,Ie+1,Ae-1);if(_r==null)return;if(_r.packetType===0){Xn.config&&fe.w(this.TAG,"Found another AudioSpecificConfig!");let mn=_r.data;Xn.audioSampleRate=mn.samplingRate,Xn.channelCount=mn.channelCount,Xn.codec=mn.codec,Xn.originalCodec=mn.originalCodec,Xn.config=mn.config,Xn.refSampleDuration=1024/Xn.audioSampleRate*Xn.timescale,fe.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Xn);let $n=this._mediaInfo;$n.audioCodec=Xn.originalCodec,$n.audioSampleRate=Xn.audioSampleRate,$n.audioChannelCount=Xn.channelCount,$n.hasVideo?$n.videoCodec!=null&&($n.mimeType='video/x-flv; codecs="'+$n.videoCodec+","+$n.audioCodec+'"'):$n.mimeType='video/x-flv; codecs="'+$n.audioCodec+'"',$n.isComplete()&&this._onMediaInfo($n)}else if(_r.packetType===1){let mn=this._timestampBase+We,$n={unit:_r.data,length:_r.data.byteLength,dts:mn,pts:mn};br.samples.push($n),br.length+=_r.data.length}else fe.e(this.TAG,`Flv: Unsupported AAC data type ${_r.packetType}`)}else if(an===2){if(!Xn.codec){let Vr=this._parseMP3AudioData(ge,Ie+1,Ae-1,!0);if(Vr==null)return;Xn.audioSampleRate=Vr.samplingRate,Xn.channelCount=Vr.channelCount,Xn.codec=Vr.codec,Xn.originalCodec=Vr.originalCodec,Xn.refSampleDuration=1152/Xn.audioSampleRate*Xn.timescale,fe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Xn);let qr=this._mediaInfo;qr.audioCodec=Xn.codec,qr.audioSampleRate=Xn.audioSampleRate,qr.audioChannelCount=Xn.channelCount,qr.audioDataRate=Vr.bitRate,qr.hasVideo?qr.videoCodec!=null&&(qr.mimeType='video/x-flv; codecs="'+qr.videoCodec+","+qr.audioCodec+'"'):qr.mimeType='video/x-flv; codecs="'+qr.audioCodec+'"',qr.isComplete()&&this._onMediaInfo(qr)}let _r=this._parseMP3AudioData(ge,Ie+1,Ae-1,!1);if(_r==null)return;let mn=this._timestampBase+We,$n={unit:_r,length:_r.byteLength,dts:mn,pts:mn};br.samples.push($n),br.length+=_r.length}}_parseAACAudioData(ge,Ie,Ae){if(Ae<=1){fe.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let We={},it=new Uint8Array(ge,Ie,Ae);return We.packetType=it[0],it[0]===0?We.data=this._parseAACAudioSpecificConfig(ge,Ie+1,Ae-1):We.data=it.subarray(1),We}_parseAACAudioSpecificConfig(ge,Ie,Ae){let We=new Uint8Array(ge,Ie,Ae),it=null,xt=0,Ft=0,an=null,Rn=0,mr=null;if(xt=Ft=We[0]>>>3,Rn=(We[0]&7)<<1|We[1]>>>7,Rn<0||Rn>=this._mpegSamplingRates.length){this._onError(we.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let or=this._mpegSamplingRates[Rn],cr=(We[1]&120)>>>3;if(cr<0||cr>=8){this._onError(we.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}xt===5&&(mr=(We[1]&7)<<1|We[2]>>>7,an=(We[2]&124)>>>2);let Xn=self.navigator.userAgent.toLowerCase();return Xn.indexOf("firefox")!==-1?Rn>=6?(xt=5,it=new Array(4),mr=Rn-3):(xt=2,it=new Array(2),mr=Rn):Xn.indexOf("android")!==-1?(xt=2,it=new Array(2),mr=Rn):(xt=5,mr=Rn,it=new Array(4),Rn>=6?mr=Rn-3:cr===1&&(xt=2,it=new Array(2),mr=Rn)),it[0]=xt<<3,it[0]|=(Rn&15)>>>1,it[1]=(Rn&15)<<7,it[1]|=(cr&15)<<3,xt===5&&(it[1]|=(mr&15)>>>1,it[2]=(mr&1)<<7,it[2]|=8,it[3]=0),{config:it,samplingRate:or,channelCount:cr,codec:"mp4a.40."+xt,originalCodec:"mp4a.40."+Ft}}_parseMP3AudioData(ge,Ie,Ae,We){if(Ae<4){fe.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let it=this._littleEndian,xt=new Uint8Array(ge,Ie,Ae),Ft=null;if(We){if(xt[0]!==255)return;let an=xt[1]>>>3&3,Rn=(xt[1]&6)>>1,mr=(xt[2]&240)>>>4,or=(xt[2]&12)>>>2,Xn=(xt[3]>>>6&3)!==3?2:1,br=0,_r=0,mn=34,$n="mp3";switch(an){case 0:br=this._mpegAudioV25SampleRateTable[or];break;case 2:br=this._mpegAudioV20SampleRateTable[or];break;case 3:br=this._mpegAudioV10SampleRateTable[or];break}switch(Rn){case 1:mn=34,mr<this._mpegAudioL3BitRateTable.length&&(_r=this._mpegAudioL3BitRateTable[mr]);break;case 2:mn=33,mr<this._mpegAudioL2BitRateTable.length&&(_r=this._mpegAudioL2BitRateTable[mr]);break;case 3:mn=32,mr<this._mpegAudioL1BitRateTable.length&&(_r=this._mpegAudioL1BitRateTable[mr]);break}Ft={bitRate:_r,samplingRate:br,channelCount:Xn,codec:$n,originalCodec:$n}}else Ft=xt;return Ft}_parseVideoData(ge,Ie,Ae,We,it){if(Ae<=1){fe.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let xt=new Uint8Array(ge,Ie,Ae)[0],Ft=(xt&240)>>>4,an=xt&15;if(an!==7){this._onError(we.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${an}`);return}this._parseAVCVideoPacket(ge,Ie+1,Ae-1,We,it,Ft)}_parseAVCVideoPacket(ge,Ie,Ae,We,it,xt){if(Ae<4){fe.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Ft=this._littleEndian,an=new DataView(ge,Ie,Ae),Rn=an.getUint8(0),or=(an.getUint32(0,!Ft)&16777215)<<8>>8;if(Rn===0)this._parseAVCDecoderConfigurationRecord(ge,Ie+4,Ae-4);else if(Rn===1)this._parseAVCVideoData(ge,Ie+4,Ae-4,We,it,xt,or);else if(Rn!==2){this._onError(we.FORMAT_ERROR,`Flv: Invalid video packet type ${Rn}`);return}}_parseAVCDecoderConfigurationRecord(ge,Ie,Ae){if(Ae<7){fe.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let We=this._videoMetadata,it=this._videoTrack,xt=this._littleEndian,Ft=new DataView(ge,Ie,Ae);We?typeof We.avcc!="undefined"&&fe.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),We=this._videoMetadata={},We.type="video",We.id=it.id,We.timescale=this._timescale,We.duration=this._duration);let an=Ft.getUint8(0),Rn=Ft.getUint8(1),mr=Ft.getUint8(2),or=Ft.getUint8(3);if(an!==1||Rn===0){this._onError(we.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ft.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(we.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let cr=Ft.getUint8(5)&31;if(cr===0){this._onError(we.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else cr>1&&fe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${cr}`);let Xn=6;for(let _r=0;_r<cr;_r++){let mn=Ft.getUint16(Xn,!xt);if(Xn+=2,mn===0)continue;let $n=new Uint8Array(ge,Ie+Xn,mn);Xn+=mn;let Vr=Be.parseSPS($n);if(_r!==0)continue;We.codecWidth=Vr.codec_size.width,We.codecHeight=Vr.codec_size.height,We.presentWidth=Vr.present_size.width,We.presentHeight=Vr.present_size.height,We.profile=Vr.profile_string,We.level=Vr.level_string,We.bitDepth=Vr.bit_depth,We.chromaFormat=Vr.chroma_format,We.sarRatio=Vr.sar_ratio,We.frameRate=Vr.frame_rate,(Vr.frame_rate.fixed===!1||Vr.frame_rate.fps_num===0||Vr.frame_rate.fps_den===0)&&(We.frameRate=this._referenceFrameRate);let qr=We.frameRate.fps_den,Ir=We.frameRate.fps_num;We.refSampleDuration=We.timescale*(qr/Ir);let hi=$n.subarray(1,4),Ni="avc1.";for(let bi=0;bi<3;bi++){let ar=hi[bi].toString(16);ar.length<2&&(ar="0"+ar),Ni+=ar}We.codec=Ni;let yr=this._mediaInfo;yr.width=We.codecWidth,yr.height=We.codecHeight,yr.fps=We.frameRate.fps,yr.profile=We.profile,yr.level=We.level,yr.refFrames=Vr.ref_frames,yr.chromaFormat=Vr.chroma_format_string,yr.sarNum=We.sarRatio.width,yr.sarDen=We.sarRatio.height,yr.videoCodec=Ni,yr.hasAudio?yr.audioCodec!=null&&(yr.mimeType='video/x-flv; codecs="'+yr.videoCodec+","+yr.audioCodec+'"'):yr.mimeType='video/x-flv; codecs="'+yr.videoCodec+'"',yr.isComplete()&&this._onMediaInfo(yr)}let br=Ft.getUint8(Xn);if(br===0){this._onError(we.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else br>1&&fe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${br}`);Xn++;for(let _r=0;_r<br;_r++){let mn=Ft.getUint16(Xn,!xt);Xn+=2,mn!==0&&(Xn+=mn)}We.avcc=new Uint8Array(Ae),We.avcc.set(new Uint8Array(ge,Ie,Ae),0),fe.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",We)}_parseAVCVideoData(ge,Ie,Ae,We,it,xt,Ft){let an=this._littleEndian,Rn=new DataView(ge,Ie,Ae),mr=[],or=0,cr=0;const Xn=this._naluLengthSize;let br=this._timestampBase+We,_r=xt===1;for(;cr<Ae;){if(cr+4>=Ae){fe.w(this.TAG,`Malformed Nalu near timestamp ${br}, offset = ${cr}, dataSize = ${Ae}`);break}let mn=Rn.getUint32(cr,!an);if(Xn===3&&(mn>>>=8),mn>Ae-Xn){fe.w(this.TAG,`Malformed Nalus near timestamp ${br}, NaluSize > DataSize!`);return}let $n=Rn.getUint8(cr+Xn)&31;$n===5&&(_r=!0);let Vr=new Uint8Array(ge,Ie+cr,Xn+mn),qr={type:$n,data:Vr};mr.push(qr),or+=Vr.byteLength,cr+=Xn+mn}if(mr.length){let mn=this._videoTrack,$n={units:mr,length:or,isKeyframe:_r,dts:br,cts:Ft,pts:br+Ft};_r&&($n.fileposition=it),mn.samples.push($n),mn.length+=or}}}var Vt=$t;class wt{static init(){wt.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let Ie in wt.types)wt.types.hasOwnProperty(Ie)&&(wt.types[Ie]=[Ie.charCodeAt(0),Ie.charCodeAt(1),Ie.charCodeAt(2),Ie.charCodeAt(3)]);let ge=wt.constants={};ge.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),ge.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),ge.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),ge.STSC=ge.STCO=ge.STTS,ge.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ge.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ge.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),ge.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ge.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ge.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(ge){let Ie=8,Ae=null,We=Array.prototype.slice.call(arguments,1),it=We.length;for(let Ft=0;Ft<it;Ft++)Ie+=We[Ft].byteLength;Ae=new Uint8Array(Ie),Ae[0]=Ie>>>24&255,Ae[1]=Ie>>>16&255,Ae[2]=Ie>>>8&255,Ae[3]=Ie&255,Ae.set(ge,4);let xt=8;for(let Ft=0;Ft<it;Ft++)Ae.set(We[Ft],xt),xt+=We[Ft].byteLength;return Ae}static generateInitSegment(ge){let Ie=wt.box(wt.types.ftyp,wt.constants.FTYP),Ae=wt.moov(ge),We=new Uint8Array(Ie.byteLength+Ae.byteLength);return We.set(Ie,0),We.set(Ae,Ie.byteLength),We}static moov(ge){let Ie=wt.mvhd(ge.timescale,ge.duration),Ae=wt.trak(ge),We=wt.mvex(ge);return wt.box(wt.types.moov,Ie,Ae,We)}static mvhd(ge,Ie){return wt.box(wt.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,ge>>>24&255,ge>>>16&255,ge>>>8&255,ge&255,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(ge){return wt.box(wt.types.trak,wt.tkhd(ge),wt.mdia(ge))}static tkhd(ge){let Ie=ge.id,Ae=ge.duration,We=ge.presentWidth,it=ge.presentHeight;return wt.box(wt.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,0,0,0,0,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,We>>>8&255,We&255,0,0,it>>>8&255,it&255,0,0]))}static mdia(ge){return wt.box(wt.types.mdia,wt.mdhd(ge),wt.hdlr(ge),wt.minf(ge))}static mdhd(ge){let Ie=ge.timescale,Ae=ge.duration;return wt.box(wt.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255,85,196,0,0]))}static hdlr(ge){let Ie=null;return ge.type==="audio"?Ie=wt.constants.HDLR_AUDIO:Ie=wt.constants.HDLR_VIDEO,wt.box(wt.types.hdlr,Ie)}static minf(ge){let Ie=null;return ge.type==="audio"?Ie=wt.box(wt.types.smhd,wt.constants.SMHD):Ie=wt.box(wt.types.vmhd,wt.constants.VMHD),wt.box(wt.types.minf,Ie,wt.dinf(),wt.stbl(ge))}static dinf(){return wt.box(wt.types.dinf,wt.box(wt.types.dref,wt.constants.DREF))}static stbl(ge){return wt.box(wt.types.stbl,wt.stsd(ge),wt.box(wt.types.stts,wt.constants.STTS),wt.box(wt.types.stsc,wt.constants.STSC),wt.box(wt.types.stsz,wt.constants.STSZ),wt.box(wt.types.stco,wt.constants.STCO))}static stsd(ge){return ge.type==="audio"?ge.codec==="mp3"?wt.box(wt.types.stsd,wt.constants.STSD_PREFIX,wt.mp3(ge)):wt.box(wt.types.stsd,wt.constants.STSD_PREFIX,wt.mp4a(ge)):wt.box(wt.types.stsd,wt.constants.STSD_PREFIX,wt.avc1(ge))}static mp3(ge){let Ie=ge.channelCount,Ae=ge.audioSampleRate,We=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ie,0,16,0,0,0,0,Ae>>>8&255,Ae&255,0,0]);return wt.box(wt.types[".mp3"],We)}static mp4a(ge){let Ie=ge.channelCount,Ae=ge.audioSampleRate,We=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ie,0,16,0,0,0,0,Ae>>>8&255,Ae&255,0,0]);return wt.box(wt.types.mp4a,We,wt.esds(ge))}static esds(ge){let Ie=ge.config||[],Ae=Ie.length,We=new Uint8Array([0,0,0,0,3,23+Ae,0,1,0,4,15+Ae,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Ae]).concat(Ie).concat([6,1,2]));return wt.box(wt.types.esds,We)}static avc1(ge){let Ie=ge.avcc,Ae=ge.codecWidth,We=ge.codecHeight,it=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Ae>>>8&255,Ae&255,We>>>8&255,We&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return wt.box(wt.types.avc1,it,wt.box(wt.types.avcC,Ie))}static mvex(ge){return wt.box(wt.types.mvex,wt.trex(ge))}static trex(ge){let Ie=ge.id,Ae=new Uint8Array([0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return wt.box(wt.types.trex,Ae)}static moof(ge,Ie){return wt.box(wt.types.moof,wt.mfhd(ge.sequenceNumber),wt.traf(ge,Ie))}static mfhd(ge){let Ie=new Uint8Array([0,0,0,0,ge>>>24&255,ge>>>16&255,ge>>>8&255,ge&255]);return wt.box(wt.types.mfhd,Ie)}static traf(ge,Ie){let Ae=ge.id,We=wt.box(wt.types.tfhd,new Uint8Array([0,0,0,0,Ae>>>24&255,Ae>>>16&255,Ae>>>8&255,Ae&255])),it=wt.box(wt.types.tfdt,new Uint8Array([0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255])),xt=wt.sdtp(ge),Ft=wt.trun(ge,xt.byteLength+16+16+8+16+8+8);return wt.box(wt.types.traf,We,it,Ft,xt)}static sdtp(ge){let Ie=ge.samples||[],Ae=Ie.length,We=new Uint8Array(4+Ae);for(let it=0;it<Ae;it++){let xt=Ie[it].flags;We[it+4]=xt.isLeading<<6|xt.dependsOn<<4|xt.isDependedOn<<2|xt.hasRedundancy}return wt.box(wt.types.sdtp,We)}static trun(ge,Ie){let Ae=ge.samples||[],We=Ae.length,it=12+16*We,xt=new Uint8Array(it);Ie+=8+it,xt.set([0,0,15,1,We>>>24&255,We>>>16&255,We>>>8&255,We&255,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255],0);for(let Ft=0;Ft<We;Ft++){let an=Ae[Ft].duration,Rn=Ae[Ft].size,mr=Ae[Ft].flags,or=Ae[Ft].cts;xt.set([an>>>24&255,an>>>16&255,an>>>8&255,an&255,Rn>>>24&255,Rn>>>16&255,Rn>>>8&255,Rn&255,mr.isLeading<<2|mr.dependsOn,mr.isDependedOn<<6|mr.hasRedundancy<<4|mr.isNonSync,0,0,or>>>24&255,or>>>16&255,or>>>8&255,or&255],12+16*Ft)}return wt.box(wt.types.trun,xt)}static mdat(ge){return wt.box(wt.types.mdat,ge)}}wt.init();var on=wt;class Dt{static getSilentFrame(ge,Ie){if(ge==="mp4a.40.2"){if(Ie===1)return new Uint8Array([0,200,0,128,35,128]);if(Ie===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Ie===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Ie===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Ie===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(Ie===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(Ie===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Ie===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Ie===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var Xt=Dt;class nn{constructor(ge,Ie,Ae,We,it){this.dts=ge,this.pts=Ie,this.duration=Ae,this.originalDts=We,this.isSyncPoint=it,this.fileposition=null}}class bn{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(ge){ge.isSyncPoint=!0,this.syncPoints.push(ge)}}class en{constructor(){this._list=[]}clear(){this._list=[]}appendArray(ge){let Ie=this._list;ge.length!==0&&(Ie.length>0&&ge[0].originalDts<Ie[Ie.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Ie,ge))}getLastSyncPointBeforeDts(ge){if(this._list.length==0)return null;let Ie=this._list,Ae=0,We=Ie.length-1,it=0,xt=0,Ft=We;for(ge<Ie[0].dts&&(Ae=0,xt=Ft+1);xt<=Ft;)if(it=xt+Math.floor((Ft-xt)/2),it===We||ge>=Ie[it].dts&&ge<Ie[it+1].dts){Ae=it;break}else Ie[it].dts<ge?xt=it+1:Ft=it-1;return this._list[Ae]}}class Zn{constructor(ge){this._type=ge,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(ge){let Ie=this._list;if(Ie.length===0)return-2;let Ae=Ie.length-1,We=0,it=0,xt=Ae,Ft=0;if(ge<Ie[0].originalBeginDts)return Ft=-1,Ft;for(;it<=xt;)if(We=it+Math.floor((xt-it)/2),We===Ae||ge>Ie[We].lastSample.originalDts&&ge<Ie[We+1].originalBeginDts){Ft=We;break}else Ie[We].originalBeginDts<ge?it=We+1:xt=We-1;return Ft}_searchNearestSegmentAfter(ge){return this._searchNearestSegmentBefore(ge)+1}append(ge){let Ie=this._list,Ae=ge,We=this._lastAppendLocation,it=0;We!==-1&&We<Ie.length&&Ae.originalBeginDts>=Ie[We].lastSample.originalDts&&(We===Ie.length-1||We<Ie.length-1&&Ae.originalBeginDts<Ie[We+1].originalBeginDts)?it=We+1:Ie.length>0&&(it=this._searchNearestSegmentBefore(Ae.originalBeginDts)+1),this._lastAppendLocation=it,this._list.splice(it,0,Ae)}getLastSegmentBefore(ge){let Ie=this._searchNearestSegmentBefore(ge);return Ie>=0?this._list[Ie]:null}getLastSampleBefore(ge){let Ie=this.getLastSegmentBefore(ge);return Ie!=null?Ie.lastSample:null}getLastSyncPointBefore(ge){let Ie=this._searchNearestSegmentBefore(ge),Ae=this._list[Ie].syncPoints;for(;Ae.length===0&&Ie>0;)Ie--,Ae=this._list[Ie].syncPoints;return Ae.length>0?Ae[Ae.length-1]:null}}class Yn{constructor(ge){this.TAG="MP4Remuxer",this._config=ge,this._isLive=ge.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Zn("audio"),this._videoSegmentInfoList=new Zn("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(Fe.chrome&&(Fe.version.major<50||Fe.version.major===50&&Fe.version.build<2661)),this._fillSilentAfterSeek=Fe.msedge||Fe.msie,this._mp3UseMpegAudio=!Fe.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(ge){return ge.onDataAvailable=this.remux.bind(this),ge.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(ge){this._onInitSegment=ge}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(ge){this._onMediaSegment=ge}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(ge){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(ge,Ie){if(!this._onMediaSegment)throw new de("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(ge,Ie),this._remuxVideo(Ie),this._remuxAudio(ge)}_onTrackMetadataReceived(ge,Ie){let Ae=null,We="mp4",it=Ie.codec;if(ge==="audio")this._audioMeta=Ie,Ie.codec==="mp3"&&this._mp3UseMpegAudio?(We="mpeg",it="",Ae=new Uint8Array):Ae=on.generateInitSegment(Ie);else if(ge==="video")this._videoMeta=Ie,Ae=on.generateInitSegment(Ie);else return;if(!this._onInitSegment)throw new de("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(ge,{type:ge,data:Ae.buffer,codec:it,container:`${ge}/${We}`,mediaDuration:Ie.duration})}_calculateDtsBase(ge,Ie){this._dtsBaseInited||(ge.samples&&ge.samples.length&&(this._audioDtsBase=ge.samples[0].dts),Ie.samples&&Ie.samples.length&&(this._videoDtsBase=Ie.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let ge=this._videoStashedLastSample,Ie=this._audioStashedLastSample,Ae={type:"video",id:1,sequenceNumber:0,samples:[],length:0};ge!=null&&(Ae.samples.push(ge),Ae.length=ge.length);let We={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Ie!=null&&(We.samples.push(Ie),We.length=Ie.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Ae,!0),this._remuxAudio(We,!0)}_remuxAudio(ge,Ie){if(this._audioMeta==null)return;let Ae=ge,We=Ae.samples,it,xt=-1,Ft=-1,an=-1,Rn=this._audioMeta.refSampleDuration,mr=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,or=this._dtsBaseInited&&this._audioNextDts===void 0,cr=!1;if(!We||We.length===0||We.length===1&&!Ie)return;let Xn=0,br=null,_r=0;mr?(Xn=0,_r=Ae.length):(Xn=8,_r=8+Ae.length);let mn=null;if(We.length>1&&(mn=We.pop(),_r-=mn.length),this._audioStashedLastSample!=null){let yr=this._audioStashedLastSample;this._audioStashedLastSample=null,We.unshift(yr),_r+=yr.length}mn!=null&&(this._audioStashedLastSample=mn);let $n=We[0].dts-this._dtsBase;if(this._audioNextDts)it=$n-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())it=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(cr=!0);else{let yr=this._audioSegmentInfoList.getLastSampleBefore($n);if(yr!=null){let bi=$n-(yr.originalDts+yr.duration);bi<=3&&(bi=0);let ar=yr.dts+yr.duration+bi;it=$n-ar}else it=0}if(cr){let yr=$n-it,bi=this._videoSegmentInfoList.getLastSegmentBefore($n);if(bi!=null&&bi.beginDts<yr){let ar=Xt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(ar){let fo=bi.beginDts,qi=yr-bi.beginDts;fe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${fo}, duration: ${qi}`),We.unshift({unit:ar,dts:fo,pts:fo}),_r+=ar.byteLength}}else cr=!1}let Vr=[];for(let yr=0;yr<We.length;yr++){let bi=We[yr],ar=bi.unit,fo=bi.dts-this._dtsBase,qi=fo-it;xt===-1&&(xt=qi);let ua=0;yr!==We.length-1?ua=We[yr+1].dts-this._dtsBase-it-qi:mn!=null?ua=mn.dts-this._dtsBase-it-qi:Vr.length>=1?ua=Vr[Vr.length-1].duration:ua=Math.floor(Rn);let Jo=!1,bo=null;if(ua>Rn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!Fe.safari){Jo=!0;let oo=Math.abs(ua-Rn),na=Math.ceil(oo/Rn),Eo=qi+Rn;fe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${qi+ua} ms, expected: ${qi+Math.round(Rn)} ms, delta: ${Math.round(oo)} ms, generate: ${na} frames`);let ra=Xt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);ra==null&&(fe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),ra=ar),bo=[];for(let Ho=0;Ho<na;Ho++){let No=Math.round(Eo);if(bo.length>0){let Wa=bo[bo.length-1];Wa.duration=No-Wa.dts}let Ba={dts:No,pts:No,cts:0,unit:ra,size:ra.byteLength,duration:0,originalDts:fo,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};bo.push(Ba),_r+=Ba.size,Eo+=Rn}let ea=bo[bo.length-1];ea.duration=qi+ua-ea.dts,ua=Math.round(Rn)}Vr.push({dts:qi,pts:qi,cts:0,unit:bi.unit,size:bi.unit.byteLength,duration:ua,originalDts:fo,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Jo&&Vr.push.apply(Vr,bo)}mr?br=new Uint8Array(_r):(br=new Uint8Array(_r),br[0]=_r>>>24&255,br[1]=_r>>>16&255,br[2]=_r>>>8&255,br[3]=_r&255,br.set(on.types.mdat,4));for(let yr=0;yr<Vr.length;yr++){let bi=Vr[yr].unit;br.set(bi,Xn),Xn+=bi.byteLength}let qr=Vr[Vr.length-1];Ft=qr.dts+qr.duration,this._audioNextDts=Ft;let Ir=new bn;Ir.beginDts=xt,Ir.endDts=Ft,Ir.beginPts=xt,Ir.endPts=Ft,Ir.originalBeginDts=Vr[0].originalDts,Ir.originalEndDts=qr.originalDts+qr.duration,Ir.firstSample=new nn(Vr[0].dts,Vr[0].pts,Vr[0].duration,Vr[0].originalDts,!1),Ir.lastSample=new nn(qr.dts,qr.pts,qr.duration,qr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Ir),Ae.samples=Vr,Ae.sequenceNumber++;let hi=null;mr?hi=new Uint8Array:hi=on.moof(Ae,xt),Ae.samples=[],Ae.length=0;let Ni={type:"audio",data:this._mergeBoxes(hi,br).buffer,sampleCount:Vr.length,info:Ir};mr&&or&&(Ni.timestampOffset=xt),this._onMediaSegment("audio",Ni)}_remuxVideo(ge,Ie){if(this._videoMeta==null)return;let Ae=ge,We=Ae.samples,it,xt=-1,Ft=-1,an=-1,Rn=-1;if(!We||We.length===0||We.length===1&&!Ie)return;let mr=8,or=null,cr=8+ge.length,Xn=null;if(We.length>1&&(Xn=We.pop(),cr-=Xn.length),this._videoStashedLastSample!=null){let qr=this._videoStashedLastSample;this._videoStashedLastSample=null,We.unshift(qr),cr+=qr.length}Xn!=null&&(this._videoStashedLastSample=Xn);let br=We[0].dts-this._dtsBase;if(this._videoNextDts)it=br-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())it=0;else{let qr=this._videoSegmentInfoList.getLastSampleBefore(br);if(qr!=null){let Ir=br-(qr.originalDts+qr.duration);Ir<=3&&(Ir=0);let hi=qr.dts+qr.duration+Ir;it=br-hi}else it=0}let _r=new bn,mn=[];for(let qr=0;qr<We.length;qr++){let Ir=We[qr],hi=Ir.dts-this._dtsBase,Ni=Ir.isKeyframe,yr=hi-it,bi=Ir.cts,ar=yr+bi;xt===-1&&(xt=yr,an=ar);let fo=0;if(qr!==We.length-1?fo=We[qr+1].dts-this._dtsBase-it-yr:Xn!=null?fo=Xn.dts-this._dtsBase-it-yr:mn.length>=1?fo=mn[mn.length-1].duration:fo=Math.floor(this._videoMeta.refSampleDuration),Ni){let qi=new nn(yr,ar,fo,Ir.dts,!0);qi.fileposition=Ir.fileposition,_r.appendSyncPoint(qi)}mn.push({dts:yr,pts:ar,cts:bi,units:Ir.units,size:Ir.length,isKeyframe:Ni,duration:fo,originalDts:hi,flags:{isLeading:0,dependsOn:Ni?2:1,isDependedOn:Ni?1:0,hasRedundancy:0,isNonSync:Ni?0:1}})}or=new Uint8Array(cr),or[0]=cr>>>24&255,or[1]=cr>>>16&255,or[2]=cr>>>8&255,or[3]=cr&255,or.set(on.types.mdat,4);for(let qr=0;qr<mn.length;qr++){let Ir=mn[qr].units;for(;Ir.length;){let Ni=Ir.shift().data;or.set(Ni,mr),mr+=Ni.byteLength}}let $n=mn[mn.length-1];if(Ft=$n.dts+$n.duration,Rn=$n.pts+$n.duration,this._videoNextDts=Ft,_r.beginDts=xt,_r.endDts=Ft,_r.beginPts=an,_r.endPts=Rn,_r.originalBeginDts=mn[0].originalDts,_r.originalEndDts=$n.originalDts+$n.duration,_r.firstSample=new nn(mn[0].dts,mn[0].pts,mn[0].duration,mn[0].originalDts,mn[0].isKeyframe),_r.lastSample=new nn($n.dts,$n.pts,$n.duration,$n.originalDts,$n.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_r),Ae.samples=mn,Ae.sequenceNumber++,this._forceFirstIDR){let qr=mn[0].flags;qr.dependsOn=2,qr.isNonSync=0}let Vr=on.moof(Ae,xt);Ae.samples=[],Ae.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Vr,or).buffer,sampleCount:mn.length,info:_r})}_mergeBoxes(ge,Ie){let Ae=new Uint8Array(ge.byteLength+Ie.byteLength);return Ae.set(ge,0),Ae.set(Ie,ge.byteLength),Ae}}var pr=Yn,Pn={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Or{constructor(ge,Ie){this.TAG="TransmuxingController",this._emitter=new(Ce()),this._config=Ie,ge.segments||(ge.segments=[{duration:ge.duration,filesize:ge.filesize,url:ge.url}]),typeof ge.cors!="boolean"&&(ge.cors=!0),typeof ge.withCredentials!="boolean"&&(ge.withCredentials=!1),this._mediaDataSource=ge,this._currentSegmentIndex=0;let Ae=0;this._mediaDataSource.segments.forEach(We=>{We.timestampBase=Ae,Ae+=We.duration,We.cors=ge.cors,We.withCredentials=ge.withCredentials,Ie.referrerPolicy&&(We.referrerPolicy=Ie.referrerPolicy)}),!isNaN(Ae)&&this._mediaDataSource.duration!==Ae&&(this._mediaDataSource.duration=Ae),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(ge,Ie){this._emitter.addListener(ge,Ie)}off(ge,Ie){this._emitter.removeListener(ge,Ie)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(ge,Ie){this._currentSegmentIndex=ge;let Ae=this._mediaDataSource.segments[ge],We=this._ioctl=new tt(Ae,this._config,ge);We.onError=this._onIOException.bind(this),We.onSeeked=this._onIOSeeked.bind(this),We.onComplete=this._onIOComplete.bind(this),We.onRedirect=this._onIORedirect.bind(this),We.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Ie?this._demuxer.bindDataSource(this._ioctl):We.onDataArrival=this._onInitChunkArrival.bind(this),We.open(Ie)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(ge){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Ie=this._searchSegmentIndexContains(ge);if(Ie===this._currentSegmentIndex){let Ae=this._mediaInfo.segments[Ie];if(Ae==null)this._pendingSeekTime=ge;else{let We=Ae.getNearestKeyframe(ge);this._remuxer.seek(We.milliseconds),this._ioctl.seek(We.fileposition),this._pendingResolveSeekPoint=We.milliseconds}}else{let Ae=this._mediaInfo.segments[Ie];if(Ae==null)this._pendingSeekTime=ge,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Ie);else{let We=Ae.getNearestKeyframe(ge);this._internalAbort(),this._remuxer.seek(ge),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Ie].timestampBase,this._loadSegment(Ie,We.fileposition),this._pendingResolveSeekPoint=We.milliseconds,this._reportSegmentMediaInfo(Ie)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(ge){let Ie=this._mediaDataSource.segments,Ae=Ie.length-1;for(let We=0;We<Ie.length;We++)if(ge<Ie[We].timestampBase){Ae=We-1;break}return Ae}_onInitChunkArrival(ge,Ie){let Ae=null,We=0;if(Ie>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,We=this._demuxer.parseChunks(ge,Ie);else if((Ae=Vt.probe(ge)).match){this._demuxer=new Vt(Ae,this._config),this._remuxer||(this._remuxer=new pr(this._config));let it=this._mediaDataSource;it.duration!=null&&!isNaN(it.duration)&&(this._demuxer.overridedDuration=it.duration),typeof it.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=it.hasAudio),typeof it.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=it.hasVideo),this._demuxer.timestampBase=it.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),We=this._demuxer.parseChunks(ge,Ie)}else Ae=null,fe.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Pn.DEMUX_ERROR,we.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),We=0;return We}_onMediaInfo(ge){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},ge),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Jt.prototype));let Ie=Object.assign({},ge);Object.setPrototypeOf(Ie,Jt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Ie,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Ae=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Ae)})}_onMetaDataArrived(ge){this._emitter.emit(Pn.METADATA_ARRIVED,ge)}_onScriptDataArrived(ge){this._emitter.emit(Pn.SCRIPTDATA_ARRIVED,ge)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(ge){let Ae=ge+1;Ae<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Ae)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Pn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(ge){let Ie=this._ioctl.extraData;this._mediaDataSource.segments[Ie].redirectedURL=ge}_onIORecoveredEarlyEof(){this._emitter.emit(Pn.RECOVERED_EARLY_EOF)}_onIOException(ge,Ie){fe.e(this.TAG,`IOException: type = ${ge}, code = ${Ie.code}, msg = ${Ie.msg}`),this._emitter.emit(Pn.IO_ERROR,ge,Ie),this._disableStatisticsReporter()}_onDemuxException(ge,Ie){fe.e(this.TAG,`DemuxException: type = ${ge}, info = ${Ie}`),this._emitter.emit(Pn.DEMUX_ERROR,ge,Ie)}_onRemuxerInitSegmentArrival(ge,Ie){this._emitter.emit(Pn.INIT_SEGMENT,ge,Ie)}_onRemuxerMediaSegmentArrival(ge,Ie){if(this._pendingSeekTime==null&&(this._emitter.emit(Pn.MEDIA_SEGMENT,ge,Ie),this._pendingResolveSeekPoint!=null&&ge==="video")){let Ae=Ie.info.syncPoints,We=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,Fe.safari&&Ae.length>0&&Ae[0].originalDts===We&&(We=Ae[0].pts),this._emitter.emit(Pn.RECOMMEND_SEEKPOINT,We)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(ge){let Ie=this._mediaInfo.segments[ge],Ae=Object.assign({},Ie);Ae.duration=this._mediaInfo.duration,Ae.segmentCount=this._mediaInfo.segmentCount,delete Ae.segments,delete Ae.keyframesIndex,this._emitter.emit(Pn.MEDIA_INFO,Ae)}_reportStatisticsInfo(){let ge={};ge.url=this._ioctl.currentURL,ge.hasRedirect=this._ioctl.hasRedirect,ge.hasRedirect&&(ge.redirectedURL=this._ioctl.currentRedirectedURL),ge.speed=this._ioctl.currentSpeed,ge.loaderType=this._ioctl.loaderType,ge.currentSegmentIndex=this._currentSegmentIndex,ge.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Pn.STATISTICS_INFO,ge)}}var Br=Or,mi=function(Ot){let ge="TransmuxingWorker",Ie=null,Ae=_r.bind(this);Se.install(),Ot.addEventListener("message",function(mn){switch(mn.data.cmd){case"init":Ie=new Br(mn.data.param[0],mn.data.param[1]),Ie.on(Pn.IO_ERROR,cr.bind(this)),Ie.on(Pn.DEMUX_ERROR,Xn.bind(this)),Ie.on(Pn.INIT_SEGMENT,We.bind(this)),Ie.on(Pn.MEDIA_SEGMENT,it.bind(this)),Ie.on(Pn.LOADING_COMPLETE,xt.bind(this)),Ie.on(Pn.RECOVERED_EARLY_EOF,Ft.bind(this)),Ie.on(Pn.MEDIA_INFO,an.bind(this)),Ie.on(Pn.METADATA_ARRIVED,Rn.bind(this)),Ie.on(Pn.SCRIPTDATA_ARRIVED,mr.bind(this)),Ie.on(Pn.STATISTICS_INFO,or.bind(this)),Ie.on(Pn.RECOMMEND_SEEKPOINT,br.bind(this));break;case"destroy":Ie&&(Ie.destroy(),Ie=null),Ot.postMessage({msg:"destroyed"});break;case"start":Ie.start();break;case"stop":Ie.stop();break;case"seek":Ie.seek(mn.data.param);break;case"pause":Ie.pause();break;case"resume":Ie.resume();break;case"logging_config":{let $n=mn.data.param;Tt.applyConfig($n),$n.enableCallback===!0?Tt.addLogListener(Ae):Tt.removeLogListener(Ae);break}}});function We(mn,$n){let Vr={msg:Pn.INIT_SEGMENT,data:{type:mn,data:$n}};Ot.postMessage(Vr,[$n.data])}function it(mn,$n){let Vr={msg:Pn.MEDIA_SEGMENT,data:{type:mn,data:$n}};Ot.postMessage(Vr,[$n.data])}function xt(){let mn={msg:Pn.LOADING_COMPLETE};Ot.postMessage(mn)}function Ft(){let mn={msg:Pn.RECOVERED_EARLY_EOF};Ot.postMessage(mn)}function an(mn){let $n={msg:Pn.MEDIA_INFO,data:mn};Ot.postMessage($n)}function Rn(mn){let $n={msg:Pn.METADATA_ARRIVED,data:mn};Ot.postMessage($n)}function mr(mn){let $n={msg:Pn.SCRIPTDATA_ARRIVED,data:mn};Ot.postMessage($n)}function or(mn){let $n={msg:Pn.STATISTICS_INFO,data:mn};Ot.postMessage($n)}function cr(mn,$n){Ot.postMessage({msg:Pn.IO_ERROR,data:{type:mn,info:$n}})}function Xn(mn,$n){Ot.postMessage({msg:Pn.DEMUX_ERROR,data:{type:mn,info:$n}})}function br(mn){Ot.postMessage({msg:Pn.RECOMMEND_SEEKPOINT,data:mn})}function _r(mn,$n){Ot.postMessage({msg:"logcat_callback",data:{type:mn,logcat:$n}})}};class ci{constructor(ge,Ie){if(this.TAG="Transmuxer",this._emitter=new(Ce()),Ie.enableWorker&&typeof Worker!="undefined")try{let Ae=ee(18034);this._worker=Ae(mi),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[ge,Ie]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Tt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Tt.getConfig()})}catch(Ae){fe.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Br(ge,Ie)}else this._controller=new Br(ge,Ie);if(this._controller){let Ae=this._controller;Ae.on(Pn.IO_ERROR,this._onIOError.bind(this)),Ae.on(Pn.DEMUX_ERROR,this._onDemuxError.bind(this)),Ae.on(Pn.INIT_SEGMENT,this._onInitSegment.bind(this)),Ae.on(Pn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Ae.on(Pn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Ae.on(Pn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Ae.on(Pn.MEDIA_INFO,this._onMediaInfo.bind(this)),Ae.on(Pn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Ae.on(Pn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Ae.on(Pn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Ae.on(Pn.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Tt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(ge,Ie){this._emitter.addListener(ge,Ie)}off(ge,Ie){this._emitter.removeListener(ge,Ie)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(ge){this._worker?this._worker.postMessage({cmd:"seek",param:ge}):this._controller.seek(ge)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(ge,Ie){Promise.resolve().then(()=>{this._emitter.emit(Pn.INIT_SEGMENT,ge,Ie)})}_onMediaSegment(ge,Ie){Promise.resolve().then(()=>{this._emitter.emit(Pn.MEDIA_SEGMENT,ge,Ie)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Pn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Pn.RECOVERED_EARLY_EOF)})}_onMediaInfo(ge){Promise.resolve().then(()=>{this._emitter.emit(Pn.MEDIA_INFO,ge)})}_onMetaDataArrived(ge){Promise.resolve().then(()=>{this._emitter.emit(Pn.METADATA_ARRIVED,ge)})}_onScriptDataArrived(ge){Promise.resolve().then(()=>{this._emitter.emit(Pn.SCRIPTDATA_ARRIVED,ge)})}_onStatisticsInfo(ge){Promise.resolve().then(()=>{this._emitter.emit(Pn.STATISTICS_INFO,ge)})}_onIOError(ge,Ie){Promise.resolve().then(()=>{this._emitter.emit(Pn.IO_ERROR,ge,Ie)})}_onDemuxError(ge,Ie){Promise.resolve().then(()=>{this._emitter.emit(Pn.DEMUX_ERROR,ge,Ie)})}_onRecommendSeekpoint(ge){Promise.resolve().then(()=>{this._emitter.emit(Pn.RECOMMEND_SEEKPOINT,ge)})}_onLoggingConfigChanged(ge){this._worker&&this._worker.postMessage({cmd:"logging_config",param:ge})}_onWorkerMessage(ge){let Ie=ge.data,Ae=Ie.data;if(Ie.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Ie.msg){case Pn.INIT_SEGMENT:case Pn.MEDIA_SEGMENT:this._emitter.emit(Ie.msg,Ae.type,Ae.data);break;case Pn.LOADING_COMPLETE:case Pn.RECOVERED_EARLY_EOF:this._emitter.emit(Ie.msg);break;case Pn.MEDIA_INFO:Object.setPrototypeOf(Ae,Jt.prototype),this._emitter.emit(Ie.msg,Ae);break;case Pn.METADATA_ARRIVED:case Pn.SCRIPTDATA_ARRIVED:case Pn.STATISTICS_INFO:this._emitter.emit(Ie.msg,Ae);break;case Pn.IO_ERROR:case Pn.DEMUX_ERROR:this._emitter.emit(Ie.msg,Ae.type,Ae.info);break;case Pn.RECOMMEND_SEEKPOINT:this._emitter.emit(Ie.msg,Ae);break;case"logcat_callback":fe.emitter.emit("log",Ae.type,Ae.logcat);break;default:break}}}var Fr=ci,Fi={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class ko{constructor(ge){this.TAG="MSEController",this._config=ge,this._emitter=new(Ce()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new en}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(ge,Ie){this._emitter.addListener(ge,Ie)}off(ge,Ie){this._emitter.removeListener(ge,Ie)}attachMediaElement(ge){if(this._mediaSource)throw new de("MediaSource has been attached to an HTMLMediaElement!");let Ie=this._mediaSource=new window.MediaSource;Ie.addEventListener("sourceopen",this.e.onSourceOpen),Ie.addEventListener("sourceended",this.e.onSourceEnded),Ie.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=ge,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),ge.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let ge=this._mediaSource;for(let Ie in this._sourceBuffers){let Ae=this._pendingSegments[Ie];Ae.splice(0,Ae.length),this._pendingSegments[Ie]=null,this._pendingRemoveRanges[Ie]=null,this._lastInitSegments[Ie]=null;let We=this._sourceBuffers[Ie];if(We){if(ge.readyState!=="closed"){try{ge.removeSourceBuffer(We)}catch(it){fe.e(this.TAG,it.message)}We.removeEventListener("error",this.e.onSourceBufferError),We.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Ie]=null,this._sourceBuffers[Ie]=null}}if(ge.readyState==="open")try{ge.endOfStream()}catch(Ie){fe.e(this.TAG,Ie.message)}ge.removeEventListener("sourceopen",this.e.onSourceOpen),ge.removeEventListener("sourceended",this.e.onSourceEnded),ge.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(ge,Ie){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(ge),this._pendingSegments[ge.type].push(ge);return}let Ae=ge,We=`${Ae.container}`;Ae.codec&&Ae.codec.length>0&&(We+=`;codecs=${Ae.codec}`);let it=!1;if(fe.v(this.TAG,"Received Initialization Segment, mimeType: "+We),this._lastInitSegments[Ae.type]=Ae,We!==this._mimeTypes[Ae.type]){if(this._mimeTypes[Ae.type])fe.v(this.TAG,`Notice: ${Ae.type} mimeType changed, origin: ${this._mimeTypes[Ae.type]}, target: ${We}`);else{it=!0;try{let xt=this._sourceBuffers[Ae.type]=this._mediaSource.addSourceBuffer(We);xt.addEventListener("error",this.e.onSourceBufferError),xt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(xt){fe.e(this.TAG,xt.message),this._emitter.emit(Fi.ERROR,{code:xt.code,msg:xt.message});return}}this._mimeTypes[Ae.type]=We}Ie||this._pendingSegments[Ae.type].push(Ae),it||this._sourceBuffers[Ae.type]&&!this._sourceBuffers[Ae.type].updating&&this._doAppendSegments(),Fe.safari&&Ae.container==="audio/mpeg"&&Ae.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Ae.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(ge){let Ie=ge;this._pendingSegments[Ie.type].push(Ie),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Ae=this._sourceBuffers[Ie.type];Ae&&!Ae.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(ge){for(let Ie in this._sourceBuffers){if(!this._sourceBuffers[Ie])continue;let Ae=this._sourceBuffers[Ie];if(this._mediaSource.readyState==="open")try{Ae.abort()}catch(it){fe.e(this.TAG,it.message)}this._idrList.clear();let We=this._pendingSegments[Ie];if(We.splice(0,We.length),this._mediaSource.readyState!=="closed"){for(let it=0;it<Ae.buffered.length;it++){let xt=Ae.buffered.start(it),Ft=Ae.buffered.end(it);this._pendingRemoveRanges[Ie].push({start:xt,end:Ft})}if(Ae.updating||this._doRemoveRanges(),Fe.safari){let it=this._lastInitSegments[Ie];it&&(this._pendingSegments[Ie].push(it),Ae.updating||this._doAppendSegments())}}}}endOfStream(){let ge=this._mediaSource,Ie=this._sourceBuffers;if(!ge||ge.readyState!=="open"){ge&&ge.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Ie.video&&Ie.video.updating||Ie.audio&&Ie.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,ge.endOfStream())}getNearestKeyframe(ge){return this._idrList.getLastSyncPointBeforeDts(ge)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let ge=this._mediaElement.currentTime;for(let Ie in this._sourceBuffers){let Ae=this._sourceBuffers[Ie];if(Ae){let We=Ae.buffered;if(We.length>=1&&ge-We.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let ge=this._mediaElement.currentTime;for(let Ie in this._sourceBuffers){let Ae=this._sourceBuffers[Ie];if(Ae){let We=Ae.buffered,it=!1;for(let xt=0;xt<We.length;xt++){let Ft=We.start(xt),an=We.end(xt);if(Ft<=ge&&ge<an+3){if(ge-Ft>=this._config.autoCleanupMaxBackwardDuration){it=!0;let Rn=ge-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Ie].push({start:Ft,end:Rn})}}else an<ge&&(it=!0,this._pendingRemoveRanges[Ie].push({start:Ft,end:an}))}it&&!Ae.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let ge=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||ge.video&&ge.video.updating||ge.audio&&ge.audio.updating)return;let Ie=this._mediaSource.duration,Ae=this._pendingMediaDuration;Ae>0&&(isNaN(Ie)||Ae>Ie)&&(fe.v(this.TAG,`Update MediaSource duration from ${Ie} to ${Ae}`),this._mediaSource.duration=Ae),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let ge in this._pendingRemoveRanges){if(!this._sourceBuffers[ge]||this._sourceBuffers[ge].updating)continue;let Ie=this._sourceBuffers[ge],Ae=this._pendingRemoveRanges[ge];for(;Ae.length&&!Ie.updating;){let We=Ae.shift();Ie.remove(We.start,We.end)}}}_doAppendSegments(){let ge=this._pendingSegments;for(let Ie in ge)if(!(!this._sourceBuffers[Ie]||this._sourceBuffers[Ie].updating)&&ge[Ie].length>0){let Ae=ge[Ie].shift();if(Ae.timestampOffset){let We=this._sourceBuffers[Ie].timestampOffset,it=Ae.timestampOffset/1e3;Math.abs(We-it)>.1&&(fe.v(this.TAG,`Update MPEG audio timestampOffset from ${We} to ${it}`),this._sourceBuffers[Ie].timestampOffset=it),delete Ae.timestampOffset}if(!Ae.data||Ae.data.byteLength===0)continue;try{this._sourceBuffers[Ie].appendBuffer(Ae.data),this._isBufferFull=!1,Ie==="video"&&Ae.hasOwnProperty("info")&&this._idrList.appendArray(Ae.info.syncPoints)}catch(We){this._pendingSegments[Ie].unshift(Ae),We.code===22?(this._isBufferFull||this._emitter.emit(Fi.BUFFER_FULL),this._isBufferFull=!0):(fe.e(this.TAG,We.message),this._emitter.emit(Fi.ERROR,{code:We.code,msg:We.message}))}}}_onSourceOpen(){if(fe.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let ge=this._pendingSourceBufferInit;for(;ge.length;){let Ie=ge.shift();this.appendInitSegment(Ie,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Fi.SOURCE_OPEN)}_onSourceEnded(){fe.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){fe.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let ge=this._pendingSegments;return ge.video.length>0||ge.audio.length>0}_hasPendingRemoveRanges(){let ge=this._pendingRemoveRanges;return ge.video.length>0||ge.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Fi.UPDATE_END)}_onSourceBufferError(ge){fe.e(this.TAG,`SourceBuffer Error: ${ge}`)}}var aa=ko;const Wo={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},li={NETWORK_EXCEPTION:ye.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ye.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ye.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ye.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:we.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:we.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:we.CODEC_UNSUPPORTED};class rn{constructor(ge,Ie){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Ce()),this._config=Ut(),typeof Ie=="object"&&Object.assign(this._config,Ie),ge.type.toLowerCase()!=="flv")throw new he("FlvPlayer requires an flv MediaDataSource input!");ge.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=ge,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let Ae=Fe.chrome&&(Fe.version.major<50||Fe.version.major===50&&Fe.version.build<2661);this._alwaysSeekKeyframe=!!(Ae||Fe.msedge||Fe.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(ge,Ie){ge===yn.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yn.MEDIA_INFO,this.mediaInfo)}):ge===yn.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yn.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(ge,Ie)}off(ge,Ie){this._emitter.removeListener(ge,Ie)}attachMediaElement(ge){if(this._mediaElement=ge,ge.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),ge.addEventListener("seeking",this.e.onvSeeking),ge.addEventListener("canplay",this.e.onvCanPlay),ge.addEventListener("stalled",this.e.onvStalled),ge.addEventListener("progress",this.e.onvProgress),this._msectl=new aa(this._config),this._msectl.on(Fi.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Fi.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Fi.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Fi.ERROR,Ie=>{this._emitter.emit(yn.ERROR,Wo.MEDIA_ERROR,li.MEDIA_MSE_ERROR,Ie)}),this._msectl.attachMediaElement(ge),this._pendingSeekTime!=null)try{ge.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ie){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new de("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new de("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Fr(this._mediaDataSource,this._config),this._transmuxer.on(Pn.INIT_SEGMENT,(ge,Ie)=>{this._msectl.appendInitSegment(Ie)}),this._transmuxer.on(Pn.MEDIA_SEGMENT,(ge,Ie)=>{if(this._msectl.appendMediaSegment(Ie),this._config.lazyLoad&&!this._config.isLive){let Ae=this._mediaElement.currentTime;Ie.info.endDts>=(Ae+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(fe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Pn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yn.LOADING_COMPLETE)}),this._transmuxer.on(Pn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yn.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Pn.IO_ERROR,(ge,Ie)=>{this._emitter.emit(yn.ERROR,Wo.NETWORK_ERROR,ge,Ie)}),this._transmuxer.on(Pn.DEMUX_ERROR,(ge,Ie)=>{this._emitter.emit(yn.ERROR,Wo.MEDIA_ERROR,ge,{code:-1,msg:Ie})}),this._transmuxer.on(Pn.MEDIA_INFO,ge=>{this._mediaInfo=ge,this._emitter.emit(yn.MEDIA_INFO,Object.assign({},ge))}),this._transmuxer.on(Pn.METADATA_ARRIVED,ge=>{this._emitter.emit(yn.METADATA_ARRIVED,ge)}),this._transmuxer.on(Pn.SCRIPTDATA_ARRIVED,ge=>{this._emitter.emit(yn.SCRIPTDATA_ARRIVED,ge)}),this._transmuxer.on(Pn.STATISTICS_INFO,ge=>{this._statisticsInfo=this._fillStatisticsInfo(ge),this._emitter.emit(yn.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Pn.RECOMMEND_SEEKPOINT,ge=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=ge/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(ge){this._mediaElement.volume=ge}get muted(){return this._mediaElement.muted}set muted(ge){this._mediaElement.muted=ge}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(ge){this._mediaElement?this._internalSeek(ge):this._pendingSeekTime=ge}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(ge){if(ge.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return ge;let Ie=!0,Ae=0,We=0;if(this._mediaElement.getVideoPlaybackQuality){let it=this._mediaElement.getVideoPlaybackQuality();Ae=it.totalVideoFrames,We=it.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ae=this._mediaElement.webkitDecodedFrameCount,We=this._mediaElement.webkitDroppedFrameCount):Ie=!1;return Ie&&(ge.decodedFrames=Ae,ge.droppedFrames=We),ge}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let ge=this._mediaElement.buffered,Ie=this._mediaElement.currentTime,Ae=0,We=0;for(let it=0;it<ge.length;it++){let xt=ge.start(it),Ft=ge.end(it);if(xt<=Ie&&Ie<Ft){Ae=xt,We=Ft;break}}We>=Ie+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(fe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){fe.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let ge=this._mediaElement.currentTime,Ie=this._mediaElement.buffered,Ae=!1;for(let We=0;We<Ie.length;We++){let it=Ie.start(We),xt=Ie.end(We);if(ge>=it&&ge<xt){ge>=xt-this._config.lazyLoadRecoverDuration&&(Ae=!0);break}}Ae&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Ae&&(fe.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(ge){let Ie=this._mediaElement.buffered;for(let Ae=0;Ae<Ie.length;Ae++){let We=Ie.start(Ae),it=Ie.end(Ae);if(ge>=We&&ge<it)return!0}return!1}_internalSeek(ge){let Ie=this._isTimepointBuffered(ge),Ae=!1,We=0;if(ge<1&&this._mediaElement.buffered.length>0){let it=this._mediaElement.buffered.start(0);(it<1&&ge<it||Fe.safari)&&(Ae=!0,We=Fe.safari?.1:it)}if(Ae)this._requestSetTime=!0,this._mediaElement.currentTime=We;else if(Ie){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=ge;else{let it=this._msectl.getNearestKeyframe(Math.floor(ge*1e3));this._requestSetTime=!0,it!=null?this._mediaElement.currentTime=it.dts/1e3:this._mediaElement.currentTime=ge}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(ge),this._transmuxer.seek(Math.floor(ge*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=ge)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let ge=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(ge)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(ge),this._transmuxer.seek(Math.floor(ge*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=ge))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(ge){let Ie=this._mediaElement;if(ge||!this._receivedCanPlay||Ie.readyState<2){let Ae=Ie.buffered;Ae.length>0&&Ie.currentTime<Ae.start(0)&&(fe.w(this.TAG,`Playback seems stuck at ${Ie.currentTime}, seek to ${Ae.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Ae.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(ge){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(ge){let Ie=this._mediaElement.currentTime,Ae=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Ie<1&&Ae.length>0){let We=Ae.start(0);if(We<1&&Ie<We||Fe.safari){this._requestSetTime=!0,this._mediaElement.currentTime=Fe.safari?.1:We;return}}if(this._isTimepointBuffered(Ie)){if(this._alwaysSeekKeyframe){let We=this._msectl.getNearestKeyframe(Math.floor(Ie*1e3));We!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=We.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Ie,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(ge){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(ge){this._checkAndResumeStuckPlayback(!0)}_onvProgress(ge){this._checkAndResumeStuckPlayback()}}var nr=rn;class dr{constructor(ge,Ie){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Ce()),this._config=Ut(),typeof Ie=="object"&&Object.assign(this._config,Ie),ge.type.toLowerCase()==="flv")throw new he("NativePlayer does't support flv MediaDataSource input!");if(ge.hasOwnProperty("segments"))throw new he(`NativePlayer(${ge.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=ge,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(ge,Ie){ge===yn.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yn.MEDIA_INFO,this.mediaInfo)}):ge===yn.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yn.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(ge,Ie)}off(ge,Ie){this._emitter.removeListener(ge,Ie)}attachMediaElement(ge){if(this._mediaElement=ge,ge.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{ge.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ie){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new de("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(ge){this._mediaElement.volume=ge}get muted(){return this._mediaElement.muted}set muted(ge){this._mediaElement.muted=ge}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(ge){this._mediaElement?this._mediaElement.currentTime=ge:this._pendingSeekTime=ge}get mediaInfo(){let Ie={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Ie.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Ie.width=this._mediaElement.videoWidth,Ie.height=this._mediaElement.videoHeight)),Ie}get statisticsInfo(){let ge={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return ge;let Ie=!0,Ae=0,We=0;if(this._mediaElement.getVideoPlaybackQuality){let it=this._mediaElement.getVideoPlaybackQuality();Ae=it.totalVideoFrames,We=it.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ae=this._mediaElement.webkitDecodedFrameCount,We=this._mediaElement.webkitDroppedFrameCount):Ie=!1;return Ie&&(ge.decodedFrames=Ae,ge.droppedFrames=We),ge}_onvLoadedMetadata(ge){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(yn.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(yn.STATISTICS_INFO,this.statisticsInfo)}}var rr=dr;Se.install();function Jr(Ot,ge){let Ie=Ot;if(Ie==null||typeof Ie!="object")throw new he("MediaDataSource must be an javascript object!");if(!Ie.hasOwnProperty("type"))throw new he("MediaDataSource must has type field to indicate video file type!");switch(Ie.type){case"flv":return new nr(Ie,ge);default:return new rr(Ie,ge)}}function Ar(){return Ge.supportMSEH264Playback()}function Mr(){return Ge.getFeatureList()}let tr={};tr.createPlayer=Jr,tr.isSupported=Ar,tr.getFeatureList=Mr,tr.BaseLoader=_e,tr.LoaderStatus=se,tr.LoaderErrors=ye,tr.Events=yn,tr.ErrorTypes=Wo,tr.ErrorDetails=li,tr.FlvPlayer=nr,tr.NativePlayer=rr,tr.LoggingControl=Tt,Object.defineProperty(tr,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Zt=tr},38780:function(dn,St){"use strict";function ee(){const te=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Se=1;Se<arguments.length;Se++){const Le=Se<0||arguments.length<=Se?void 0:arguments[Se];Le&&Object.keys(Le).forEach(Ce=>{const ce=Le[Ce];ce!==void 0&&(te[Ce]=ce)})}return te}St.Z=ee},66367:function(dn,St,ee){"use strict";ee.d(St,{F:function(){return te},Z:function(){return Se}});function te(Le){return Le!=null&&Le===Le.window}function Se(Le,Ce){var ce,fe;if(typeof window=="undefined")return 0;const ae=Ce?"scrollTop":"scrollLeft";let le=0;return te(Le)?le=Le[Ce?"pageYOffset":"pageXOffset"]:Le instanceof Document?le=Le.documentElement[ae]:(Le instanceof HTMLElement||Le)&&(le=Le[ae]),Le&&!te(Le)&&typeof le!="number"&&(le=(fe=((ce=Le.ownerDocument)!==null&&ce!==void 0?ce:Le).documentElement)===null||fe===void 0?void 0:fe[ae]),le}},57838:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});var te=ee(67294);function Se(){const[,Le]=te.useReducer(Ce=>Ce+1,0);return Le}},58375:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ce}});var te=ee(96523);function Se(ce,fe,ae,le){const re=ae-fe;return ce/=le/2,ce<1?re/2*ce*ce*ce+fe:re/2*((ce-=2)*ce*ce+2)+fe}var Le=ee(66367);function Ce(ce){let fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ae=()=>window,callback:le,duration:re=450}=fe,de=ae(),he=(0,Le.Z)(de,!0),me=Date.now(),se=()=>{const _e=Date.now()-me,Me=Se(_e>re?re:_e,he,ce,re);(0,Le.F)(de)?de.scrollTo(window.pageXOffset,Me):de instanceof Document||de.constructor.name==="HTMLDocument"?de.documentElement.scrollTop=Me:de.scrollTop=Me,_e<re?(0,te.Z)(se):typeof le=="function"&&le()};(0,te.Z)(se)}},9708:function(dn,St,ee){"use strict";ee.d(St,{F:function(){return ce},Z:function(){return Ce}});var te=ee(94184),Se=ee.n(te);const Le=null;function Ce(fe,ae,le){return Se()({[`${fe}-status-success`]:ae==="success",[`${fe}-status-warning`]:ae==="warning",[`${fe}-status-error`]:ae==="error",[`${fe}-status-validating`]:ae==="validating",[`${fe}-has-feedback`]:le})}const ce=(fe,ae)=>ae||fe},84567:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Re}});var te=ee(94184),Se=ee.n(te),Le=ee(95860),Ce=ee(67294),ce=ee(53124),fe=ee(98866),ae=ee(65223),re=Ce.createContext(null),de=ee(63185),he=ee(45353),me=ee(92429),se=function(De,et){var Ye={};for(var dt in De)Object.prototype.hasOwnProperty.call(De,dt)&&et.indexOf(dt)<0&&(Ye[dt]=De[dt]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,dt=Object.getOwnPropertySymbols(De);Ke<dt.length;Ke++)et.indexOf(dt[Ke])<0&&Object.prototype.propertyIsEnumerable.call(De,dt[Ke])&&(Ye[dt[Ke]]=De[dt[Ke]]);return Ye};const ye=(De,et)=>{var Ye;const{prefixCls:dt,className:Ke,rootClassName:zt,children:pt,indeterminate:Kt=!1,style:Ze,onMouseEnter:tt,onMouseLeave:ft,skipGroup:Ut=!1,disabled:nt}=De,Ge=se(De,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:jt,direction:yn,checkbox:ln}=Ce.useContext(ce.E_),Tt=Ce.useContext(re),{isFormItemInput:Lt}=Ce.useContext(ae.aM),Jt=Ce.useContext(fe.Z),kn=(Ye=(Tt==null?void 0:Tt.disabled)||nt)!==null&&Ye!==void 0?Ye:Jt,In=Ce.useRef(Ge.value);Ce.useEffect(()=>{Tt==null||Tt.registerValue(Ge.value)},[]),Ce.useEffect(()=>{if(!Ut)return Ge.value!==In.current&&(Tt==null||Tt.cancelValue(In.current),Tt==null||Tt.registerValue(Ge.value),In.current=Ge.value),()=>Tt==null?void 0:Tt.cancelValue(Ge.value)},[Ge.value]);const Qt=jt("checkbox",dt),[Mn,Wn]=(0,de.ZP)(Qt),zn=Object.assign({},Ge);Tt&&!Ut&&(zn.onChange=function(){Ge.onChange&&Ge.onChange.apply(Ge,arguments),Tt.toggleOption&&Tt.toggleOption({label:pt,value:Ge.value})},zn.name=Tt.name,zn.checked=Tt.value.includes(Ge.value));const at=Se()(`${Qt}-wrapper`,{[`${Qt}-rtl`]:yn==="rtl",[`${Qt}-wrapper-checked`]:zn.checked,[`${Qt}-wrapper-disabled`]:kn,[`${Qt}-wrapper-in-form-item`]:Lt},ln==null?void 0:ln.className,Ke,zt,Wn),Oe=Se()({[`${Qt}-indeterminate`]:Kt},me.A,Wn),ke=Kt?"mixed":void 0;return Mn(Ce.createElement(he.Z,{component:"Checkbox",disabled:kn},Ce.createElement("label",{className:at,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),Ze),onMouseEnter:tt,onMouseLeave:ft},Ce.createElement(Le.Z,Object.assign({"aria-checked":ke},zn,{prefixCls:Qt,className:Oe,disabled:kn,ref:et})),pt!==void 0&&Ce.createElement("span",null,pt))))};var Me=Ce.forwardRef(ye),ve=ee(74902),Fe=ee(10366),$e=function(De,et){var Ye={};for(var dt in De)Object.prototype.hasOwnProperty.call(De,dt)&&et.indexOf(dt)<0&&(Ye[dt]=De[dt]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,dt=Object.getOwnPropertySymbols(De);Ke<dt.length;Ke++)et.indexOf(dt[Ke])<0&&Object.prototype.propertyIsEnumerable.call(De,dt[Ke])&&(Ye[dt[Ke]]=De[dt[Ke]]);return Ye};const Te=(De,et)=>{const{defaultValue:Ye,children:dt,options:Ke=[],prefixCls:zt,className:pt,rootClassName:Kt,style:Ze,onChange:tt}=De,ft=$e(De,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ut,direction:nt}=Ce.useContext(ce.E_),[Ge,jt]=Ce.useState(ft.value||Ye||[]),[yn,ln]=Ce.useState([]);Ce.useEffect(()=>{"value"in ft&&jt(ft.value||[])},[ft.value]);const Tt=Ce.useMemo(()=>Ke.map(Be=>typeof Be=="string"||typeof Be=="number"?{label:Be,value:Be}:Be),[Ke]),Lt=Be=>{ln(Ne=>Ne.filter(we=>we!==Be))},Jt=Be=>{ln(Ne=>[].concat((0,ve.Z)(Ne),[Be]))},kn=Be=>{const Ne=Ge.indexOf(Be.value),we=(0,ve.Z)(Ge);Ne===-1?we.push(Be.value):we.splice(Ne,1),"value"in ft||jt(we),tt==null||tt(we.filter(rt=>yn.includes(rt)).sort((rt,It)=>{const Ct=Tt.findIndex(Vt=>Vt.value===rt),$t=Tt.findIndex(Vt=>Vt.value===It);return Ct-$t}))},In=Ut("checkbox",zt),Qt=`${In}-group`,[Mn,Wn]=(0,de.ZP)(In),zn=(0,Fe.Z)(ft,["value","disabled"]),at=Ke.length?Tt.map(Be=>Ce.createElement(Me,{prefixCls:In,key:Be.value.toString(),disabled:"disabled"in Be?Be.disabled:ft.disabled,value:Be.value,checked:Ge.includes(Be.value),onChange:Be.onChange,className:`${Qt}-item`,style:Be.style,title:Be.title},Be.label)):dt,Oe={toggleOption:kn,value:Ge,disabled:ft.disabled,name:ft.name,registerValue:Jt,cancelValue:Lt},ke=Se()(Qt,{[`${Qt}-rtl`]:nt==="rtl"},pt,Kt,Wn);return Mn(Ce.createElement("div",Object.assign({className:ke,style:Ze},zn,{ref:et}),Ce.createElement(re.Provider,{value:Oe},at)))},ze=Ce.forwardRef(Te);var Ee=Ce.memo(ze);const be=Me;be.Group=Ee,be.__ANT_CHECKBOX=!0;var Re=be},63185:function(dn,St,ee){"use strict";ee.d(St,{C2:function(){return ce}});var te=ee(14747),Se=ee(45503),Le=ee(67968);const Ce=fe=>{const{checkboxCls:ae}=fe,le=`${ae}-wrapper`;return[{[`${ae}-group`]:Object.assign(Object.assign({},(0,te.Wf)(fe)),{display:"inline-flex",flexWrap:"wrap",columnGap:fe.marginXS,[`> ${fe.antCls}-row`]:{flex:1}}),[le]:Object.assign(Object.assign({},(0,te.Wf)(fe)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${le}`]:{marginInlineStart:0},[`&${le}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[ae]:Object.assign(Object.assign({},(0,te.Wf)(fe)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:fe.borderRadiusSM,alignSelf:"center",[`${ae}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${ae}-inner`]:Object.assign({},(0,te.oN)(fe))},[`${ae}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:fe.checkboxSize,height:fe.checkboxSize,direction:"ltr",backgroundColor:fe.colorBgContainer,border:`${fe.lineWidth}px ${fe.lineType} ${fe.colorBorder}`,borderRadius:fe.borderRadiusSM,borderCollapse:"separate",transition:`all ${fe.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:fe.checkboxSize/14*5,height:fe.checkboxSize/14*8,border:`${fe.lineWidthBold}px solid ${fe.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${fe.motionDurationFast} ${fe.motionEaseInBack}, opacity ${fe.motionDurationFast}`}},"& + span":{paddingInlineStart:fe.paddingXS,paddingInlineEnd:fe.paddingXS}})},{[`
|
|
|
${le}:not(${le}-disabled),
|
|
|
${ae}:not(${ae}-disabled)
|
|
|
`]:{[`&:hover ${ae}-inner`]:{borderColor:fe.colorPrimary}},[`${le}:not(${le}-disabled)`]:{[`&:hover ${ae}-checked:not(${ae}-disabled) ${ae}-inner`]:{backgroundColor:fe.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${ae}-checked:not(${ae}-disabled):after`]:{borderColor:fe.colorPrimaryHover}}},{[`${ae}-checked`]:{[`${ae}-inner`]:{backgroundColor:fe.colorPrimary,borderColor:fe.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${fe.motionDurationMid} ${fe.motionEaseOutBack} ${fe.motionDurationFast}`}}},[`
|
|
|
${le}-checked:not(${le}-disabled),
|
|
|
${ae}-checked:not(${ae}-disabled)
|
|
|
`]:{[`&:hover ${ae}-inner`]:{backgroundColor:fe.colorPrimaryHover,borderColor:"transparent"}}},{[ae]:{"&-indeterminate":{[`${ae}-inner`]:{backgroundColor:fe.colorBgContainer,borderColor:fe.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:fe.fontSizeLG/2,height:fe.fontSizeLG/2,backgroundColor:fe.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${le}-disabled`]:{cursor:"not-allowed"},[`${ae}-disabled`]:{[`&, ${ae}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${ae}-inner`]:{background:fe.colorBgContainerDisabled,borderColor:fe.colorBorder,"&:after":{borderColor:fe.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:fe.colorTextDisabled},[`&${ae}-indeterminate ${ae}-inner::after`]:{background:fe.colorTextDisabled}}}]};function ce(fe,ae){const le=(0,Se.TS)(ae,{checkboxCls:`.${fe}`,checkboxSize:ae.controlInteractiveSize});return[Ce(le)]}St.ZP=(0,Le.Z)("Checkbox",(fe,ae)=>{let{prefixCls:le}=ae;return[ce(le,fe)]})},88258:function(dn,St,ee){"use strict";var te=ee(67294),Se=ee(53124),Le=ee(32983);const Ce=ce=>{const{componentName:fe}=ce,{getPrefixCls:ae}=(0,te.useContext)(Se.E_),le=ae("empty");switch(fe){case"Table":case"List":return te.createElement(Le.Z,{image:Le.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return te.createElement(Le.Z,{image:Le.Z.PRESENTED_IMAGE_SIMPLE,className:`${le}-small`});default:return te.createElement(Le.Z,null)}};St.Z=Ce},72565:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ao}});var te=ee(94184),Se=ee.n(te),Le=ee(1413),Ce=ee(97685),ce=ee(67294),fe=ee(73935);function ae(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var le={};function re(pn,sn){}function de(pn,sn){}function he(){le={}}function me(pn,sn,Hn){!sn&&!le[Hn]&&(pn(!1,Hn),le[Hn]=!0)}function se(pn,sn){me(re,pn,sn)}function ye(pn,sn){me(de,pn,sn)}var _e=null,Me=ee(71002),ve=ee(18459);function Fe(pn,sn,Hn){var lr=ce.useRef({});return(!("value"in lr.current)||Hn(lr.current.condition,sn))&&(lr.current.value=pn(),lr.current.condition=sn),lr.current.value}function $e(pn,sn){typeof pn=="function"?pn(sn):(0,Me.Z)(pn)==="object"&&pn&&"current"in pn&&(pn.current=sn)}function Te(){for(var pn=arguments.length,sn=new Array(pn),Hn=0;Hn<pn;Hn++)sn[Hn]=arguments[Hn];var lr=sn.filter(function(Cr){return Cr});return lr.length<=1?lr[0]:function(Cr){sn.forEach(function(vi){$e(vi,Cr)})}}function ze(){for(var pn=arguments.length,sn=new Array(pn),Hn=0;Hn<pn;Hn++)sn[Hn]=arguments[Hn];return Fe(function(){return Te.apply(void 0,sn)},sn,function(lr,Cr){return lr.length===Cr.length&&lr.every(function(vi,_i){return vi===Cr[_i]})})}function Ee(pn){var sn,Hn,lr=(0,ve.isMemo)(pn)?pn.type.type:pn.type;return!(typeof lr=="function"&&!((sn=lr.prototype)!==null&&sn!==void 0&&sn.render)||typeof pn=="function"&&!((Hn=pn.prototype)!==null&&Hn!==void 0&&Hn.render))}var be=ce.createContext(null),Re=be,De=ee(74902),et=ae()?ce.useLayoutEffect:ce.useEffect,Ye=et,dt=function(sn,Hn){var lr=React.useRef(!0);et(function(){if(!lr.current)return sn()},Hn),et(function(){return lr.current=!1,function(){lr.current=!0}},[])},Ke=[];function zt(pn,sn){var Hn=ce.useState(function(){if(!ae())return null;var Bn=document.createElement("div");return Bn}),lr=(0,Ce.Z)(Hn,1),Cr=lr[0],vi=ce.useRef(!1),_i=ce.useContext(Re),ji=ce.useState(Ke),Xi=(0,Ce.Z)(ji,2),Ci=Xi[0],_o=Xi[1],To=_i||(vi.current?void 0:function(Bn){_o(function(Qn){var He=[Bn].concat((0,De.Z)(Qn));return He})});function Ko(){Cr.parentElement||document.body.appendChild(Cr),vi.current=!0}function Tn(){var Bn;(Bn=Cr.parentElement)===null||Bn===void 0||Bn.removeChild(Cr),vi.current=!1}return Ye(function(){return pn?_i?_i(Ko):Ko():Tn(),Tn},[pn]),Ye(function(){Ci.length&&(Ci.forEach(function(Bn){return Bn()}),_o(Ke))},[Ci]),[Cr,To]}function pt(pn,sn){if(!pn)return!1;if(pn.contains)return pn.contains(sn);for(var Hn=sn;Hn;){if(Hn===pn)return!0;Hn=Hn.parentNode}return!1}var Kt="data-rc-order",Ze="rc-util-key",tt=new Map;function ft(){var pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},sn=pn.mark;return sn?sn.startsWith("data-")?sn:"data-".concat(sn):Ze}function Ut(pn){if(pn.attachTo)return pn.attachTo;var sn=document.querySelector("head");return sn||document.body}function nt(pn){return pn==="queue"?"prependQueue":pn?"prepend":"append"}function Ge(pn){return Array.from((tt.get(pn)||pn).children).filter(function(sn){return sn.tagName==="STYLE"})}function jt(pn){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ae())return null;var Hn=sn.csp,lr=sn.prepend,Cr=document.createElement("style");Cr.setAttribute(Kt,nt(lr)),Hn!=null&&Hn.nonce&&(Cr.nonce=Hn==null?void 0:Hn.nonce),Cr.innerHTML=pn;var vi=Ut(sn),_i=vi.firstChild;if(lr){if(lr==="queue"){var ji=Ge(vi).filter(function(Xi){return["prepend","prependQueue"].includes(Xi.getAttribute(Kt))});if(ji.length)return vi.insertBefore(Cr,ji[ji.length-1].nextSibling),Cr}vi.insertBefore(Cr,_i)}else vi.appendChild(Cr);return Cr}function yn(pn){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Hn=Ut(sn);return Ge(Hn).find(function(lr){return lr.getAttribute(ft(sn))===pn})}function ln(pn){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Hn=yn(pn,sn);if(Hn){var lr=Ut(sn);lr.removeChild(Hn)}}function Tt(pn,sn){var Hn=tt.get(pn);if(!Hn||!pt(document,Hn)){var lr=jt("",sn),Cr=lr.parentNode;tt.set(pn,Cr),pn.removeChild(lr)}}function Lt(){tt.clear()}function Jt(pn,sn){var Hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},lr=Ut(Hn);Tt(lr,Hn);var Cr=yn(sn,Hn);if(Cr){var vi,_i;if((vi=Hn.csp)!==null&&vi!==void 0&&vi.nonce&&Cr.nonce!==((_i=Hn.csp)===null||_i===void 0?void 0:_i.nonce)){var ji;Cr.nonce=(ji=Hn.csp)===null||ji===void 0?void 0:ji.nonce}return Cr.innerHTML!==pn&&(Cr.innerHTML=pn),Cr}var Xi=jt(pn,Hn);return Xi.setAttribute(ft(Hn),sn),Xi}var kn;function In(pn){if(typeof document=="undefined")return 0;if(pn||kn===void 0){var sn=document.createElement("div");sn.style.width="100%",sn.style.height="200px";var Hn=document.createElement("div"),lr=Hn.style;lr.position="absolute",lr.top="0",lr.left="0",lr.pointerEvents="none",lr.visibility="hidden",lr.width="200px",lr.height="150px",lr.overflow="hidden",Hn.appendChild(sn),document.body.appendChild(Hn);var Cr=sn.offsetWidth;Hn.style.overflow="scroll";var vi=sn.offsetWidth;Cr===vi&&(vi=Hn.clientWidth),document.body.removeChild(Hn),kn=Cr-vi}return kn}function Qt(pn){var sn=pn.match(/^(.*)px$/),Hn=Number(sn==null?void 0:sn[1]);return Number.isNaN(Hn)?In():Hn}function Mn(pn){if(typeof document=="undefined"||!pn||!(pn instanceof Element))return{width:0,height:0};var sn=getComputedStyle(pn,"::-webkit-scrollbar"),Hn=sn.width,lr=sn.height;return{width:Qt(Hn),height:Qt(lr)}}function Wn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var zn="rc-util-locker-".concat(Date.now()),at=0;function Oe(pn){var sn=!!pn,Hn=ce.useState(function(){return at+=1,"".concat(zn,"_").concat(at)}),lr=(0,Ce.Z)(Hn,1),Cr=lr[0];Ye(function(){if(sn){var vi=Mn(document.body).width,_i=Wn();Jt(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(_i?"width: calc(100% - ".concat(vi,"px);"):"",`
|
|
|
}`),Cr)}else ln(Cr);return function(){ln(Cr)}},[sn,Cr])}var ke=!1;function Be(pn){return typeof pn=="boolean"&&(ke=pn),ke}var Ne=function(sn){return sn===!1?!1:!ae()||!sn?null:typeof sn=="string"?document.querySelector(sn):typeof sn=="function"?sn():sn},we=ce.forwardRef(function(pn,sn){var Hn=pn.open,lr=pn.autoLock,Cr=pn.getContainer,vi=pn.debug,_i=pn.autoDestroy,ji=_i===void 0?!0:_i,Xi=pn.children,Ci=ce.useState(Hn),_o=(0,Ce.Z)(Ci,2),To=_o[0],Ko=_o[1],Tn=To||Hn;ce.useEffect(function(){(ji||Hn)&&Ko(Hn)},[Hn,ji]);var Bn=ce.useState(function(){return Ne(Cr)}),Qn=(0,Ce.Z)(Bn,2),He=Qn[0],lt=Qn[1];ce.useEffect(function(){var An=Ne(Cr);lt(An!=null?An:null)});var ut=zt(Tn&&!He,vi),gt=(0,Ce.Z)(ut,2),yt=gt[0],kt=gt[1],At=He!=null?He:yt;Oe(lr&&Hn&&ae()&&(At===yt||At===document.body));var tn=null;if(Xi&&Ee(Xi)&&sn){var fn=Xi;tn=fn.ref}var jn=ze(tn,sn);if(!Tn||!ae()||He===void 0)return null;var qn=At===!1||Be(),Kn=Xi;return sn&&(Kn=ce.cloneElement(Xi,{ref:jn})),ce.createElement(Re.Provider,{value:kt},qn?Kn:(0,fe.createPortal)(Kn,At))}),rt=we,It=rt;function Ct(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var $t=Ct()?ce.useLayoutEffect:ce.useEffect,Vt=function(sn,Hn){var lr=ce.useRef(!0);$t(function(){return sn(lr.current)},Hn),$t(function(){return lr.current=!1,function(){lr.current=!0}},[])},wt=function(sn,Hn){Vt(function(lr){if(!lr)return sn()},Hn)},on=Vt,Dt=ce.createContext(null),Xt=ce.createContext({}),nn=Dt,bn=ee(4942),en=ee(87462),Zn=ee(62874),Yn={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(sn){var Hn=sn.keyCode;if(sn.altKey&&!sn.ctrlKey||sn.metaKey||Hn>=Yn.F1&&Hn<=Yn.F12)return!1;switch(Hn){case Yn.ALT:case Yn.CAPS_LOCK:case Yn.CONTEXT_MENU:case Yn.CTRL:case Yn.DOWN:case Yn.END:case Yn.ESC:case Yn.HOME:case Yn.INSERT:case Yn.LEFT:case Yn.MAC_FF_META:case Yn.META:case Yn.NUMLOCK:case Yn.NUM_CENTER:case Yn.PAGE_DOWN:case Yn.PAGE_UP:case Yn.PAUSE:case Yn.PRINT_SCREEN:case Yn.RIGHT:case Yn.SHIFT:case Yn.UP:case Yn.WIN_KEY:case Yn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(sn){if(sn>=Yn.ZERO&&sn<=Yn.NINE||sn>=Yn.NUM_ZERO&&sn<=Yn.NUM_MULTIPLY||sn>=Yn.A&&sn<=Yn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&sn===0)return!0;switch(sn){case Yn.SPACE:case Yn.QUESTION_MARK:case Yn.NUM_PLUS:case Yn.NUM_MINUS:case Yn.NUM_PERIOD:case Yn.NUM_DIVISION:case Yn.SEMICOLON:case Yn.DASH:case Yn.EQUALS:case Yn.COMMA:case Yn.PERIOD:case Yn.SLASH:case Yn.APOSTROPHE:case Yn.SINGLE_QUOTE:case Yn.OPEN_SQUARE_BRACKET:case Yn.BACKSLASH:case Yn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},pr=Yn,ti=`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`,Pn=`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`,Or="".concat(ti," ").concat(Pn).split(/[\s\n]+/),Br="aria-",Di="data-";function mi(pn,sn){return pn.indexOf(sn)===0}function ci(pn){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Hn;sn===!1?Hn={aria:!0,data:!0,attr:!0}:sn===!0?Hn={aria:!0}:Hn=(0,Le.Z)({},sn);var lr={};return Object.keys(pn).forEach(function(Cr){(Hn.aria&&(Cr==="role"||mi(Cr,Br))||Hn.data&&mi(Cr,Di)||Hn.attr&&Or.includes(Cr))&&(lr[Cr]=pn[Cr])}),lr}function Fr(pn){var sn=React.useRef();sn.current=pn;var Hn=React.useCallback(function(){for(var lr,Cr=arguments.length,vi=new Array(Cr),_i=0;_i<Cr;_i++)vi[_i]=arguments[_i];return(lr=sn.current)===null||lr===void 0?void 0:lr.call.apply(lr,[sn].concat(vi))},[]);return Hn}function zr(pn){var sn=React.useRef(!1),Hn=React.useState(pn),lr=_slicedToArray(Hn,2),Cr=lr[0],vi=lr[1];React.useEffect(function(){return sn.current=!1,function(){sn.current=!0}},[]);function _i(ji,Xi){Xi&&sn.current||vi(ji)}return[Cr,_i]}function Fi(pn){return pn!==void 0}function ko(pn,sn){var Hn=sn||{},lr=Hn.defaultValue,Cr=Hn.value,vi=Hn.onChange,_i=Hn.postState,ji=useState(function(){return Fi(Cr)?Cr:Fi(lr)?typeof lr=="function"?lr():lr:typeof pn=="function"?pn():pn}),Xi=_slicedToArray(ji,2),Ci=Xi[0],_o=Xi[1],To=Cr!==void 0?Cr:Ci,Ko=_i?_i(To):To,Tn=useEvent(vi),Bn=useState([To]),Qn=_slicedToArray(Bn,2),He=Qn[0],lt=Qn[1];useLayoutUpdateEffect(function(){var gt=He[0];Ci!==gt&&Tn(Ci,gt)},[He]),useLayoutUpdateEffect(function(){Fi(Cr)||_o(Cr)},[Cr]);var ut=useEvent(function(gt,yt){_o(gt,yt),lt([To],yt)});return[Ko,ut]}var aa=ee(33993);function Wo(pn,sn,Hn){var lr=ce.useRef({});return(!("value"in lr.current)||Hn(lr.current.condition,sn))&&(lr.current.value=pn(),lr.current.condition=sn),lr.current.value}function li(pn,sn){typeof pn=="function"?pn(sn):(0,Me.Z)(pn)==="object"&&pn&&"current"in pn&&(pn.current=sn)}function rn(){for(var pn=arguments.length,sn=new Array(pn),Hn=0;Hn<pn;Hn++)sn[Hn]=arguments[Hn];var lr=sn.filter(function(Cr){return Cr});return lr.length<=1?lr[0]:function(Cr){sn.forEach(function(vi){li(vi,Cr)})}}function nr(){for(var pn=arguments.length,sn=new Array(pn),Hn=0;Hn<pn;Hn++)sn[Hn]=arguments[Hn];return Wo(function(){return rn.apply(void 0,sn)},sn,function(lr,Cr){return lr.length!==Cr.length||lr.every(function(vi,_i){return vi!==Cr[_i]})})}function dr(pn){var sn,Hn,lr=isMemo(pn)?pn.type.type:pn.type;return!(typeof lr=="function"&&!((sn=lr.prototype)!==null&&sn!==void 0&&sn.render)||typeof pn=="function"&&!((Hn=pn.prototype)!==null&&Hn!==void 0&&Hn.render))}function rr(pn){return!isValidElement(pn)||isFragment(pn)?!1:dr(pn)}function Jr(pn,sn,Hn,lr){if(!sn.length)return Hn;var Cr=_toArray(sn),vi=Cr[0],_i=Cr.slice(1),ji;return!pn&&typeof vi=="number"?ji=[]:Array.isArray(pn)?ji=_toConsumableArray(pn):ji=_objectSpread({},pn),lr&&Hn===void 0&&_i.length===1?delete ji[vi][_i[0]]:ji[vi]=Jr(ji[vi],_i,Hn,lr),ji}function Ar(pn,sn,Hn){var lr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return sn.length&&lr&&Hn===void 0&&!get(pn,sn.slice(0,-1))?pn:Jr(pn,sn,Hn,lr)}function Mr(pn){return _typeof(pn)==="object"&&pn!==null&&Object.getPrototypeOf(pn)===Object.prototype}function tr(pn){return Array.isArray(pn)?[]:{}}var Zt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Ot(){for(var pn=arguments.length,sn=new Array(pn),Hn=0;Hn<pn;Hn++)sn[Hn]=arguments[Hn];var lr=tr(sn[0]);return sn.forEach(function(Cr){function vi(_i,ji){var Xi=new Set(ji),Ci=get(Cr,_i),_o=Array.isArray(Ci);if(_o||Mr(Ci)){if(!Xi.has(Ci)){Xi.add(Ci);var To=get(lr,_i);_o?lr=Ar(lr,_i,[]):(!To||_typeof(To)!=="object")&&(lr=Ar(lr,_i,tr(Ci))),Zt(Ci).forEach(function(Ko){vi([].concat(_toConsumableArray(_i),[Ko]),Xi)})}}else lr=Ar(lr,_i,Ci)}vi([])}),lr}var ge={},Ie=[],Ae=function(sn){Ie.push(sn)};function We(pn,sn){if(0)var Hn}function it(pn,sn){if(0)var Hn}function xt(){ge={}}function Ft(pn,sn,Hn){!sn&&!ge[Hn]&&(pn(!1,Hn),ge[Hn]=!0)}function an(pn,sn){Ft(We,pn,sn)}function Rn(pn,sn){Ft(it,pn,sn)}an.preMessage=Ae,an.resetWarned=xt,an.noteOnce=Rn;var mr=an,or=function(sn){var Hn=sn.prefixCls,lr=sn.className,Cr=sn.style,vi=sn.children,_i=sn.containerRef,ji=sn.id,Xi=sn.onMouseEnter,Ci=sn.onMouseOver,_o=sn.onMouseLeave,To=sn.onClick,Ko=sn.onKeyDown,Tn=sn.onKeyUp,Bn={onMouseEnter:Xi,onMouseOver:Ci,onMouseLeave:_o,onClick:To,onKeyDown:Ko,onKeyUp:Tn},Qn=ce.useContext(Xt),He=Qn.panel,lt=nr(He,_i);return ce.createElement(ce.Fragment,null,ce.createElement("div",(0,en.Z)({id:ji,className:Se()("".concat(Hn,"-content"),lr),style:(0,Le.Z)({},Cr),"aria-modal":"true",role:"dialog",ref:lt},Bn),vi))},cr=or;function Xn(pn){return typeof pn=="string"&&String(Number(pn))===pn?(mr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(pn)):pn}function br(pn){warning(!("wrapperClassName"in pn),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!pn.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var _r={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function mn(pn,sn){var Hn,lr,Cr,vi,_i=pn.prefixCls,ji=pn.open,Xi=pn.placement,Ci=pn.inline,_o=pn.push,To=pn.forceRender,Ko=pn.autoFocus,Tn=pn.keyboard,Bn=pn.rootClassName,Qn=pn.rootStyle,He=pn.zIndex,lt=pn.className,ut=pn.id,gt=pn.style,yt=pn.motion,kt=pn.width,At=pn.height,tn=pn.children,fn=pn.contentWrapperStyle,jn=pn.mask,qn=pn.maskClosable,Kn=pn.maskMotion,An=pn.maskClassName,Dn=pn.maskStyle,wn=pn.afterOpenChange,Un=pn.onClose,vr=pn.onMouseEnter,er=pn.onMouseOver,ir=pn.onMouseLeave,fr=pn.onClick,_t=pn.onKeyDown,vt=pn.onKeyUp,Xe=ce.useRef(),ot=ce.useRef(),Nt=ce.useRef();ce.useImperativeHandle(sn,function(){return Xe.current});var Pt=function(Wr){var ni=Wr.keyCode,Si=Wr.shiftKey;switch(ni){case pr.TAB:{if(ni===pr.TAB){if(!Si&&document.activeElement===Nt.current){var Nr;(Nr=ot.current)===null||Nr===void 0||Nr.focus({preventScroll:!0})}else if(Si&&document.activeElement===ot.current){var wi;(wi=Nt.current)===null||wi===void 0||wi.focus({preventScroll:!0})}}break}case pr.ESC:{Un&&Tn&&(Wr.stopPropagation(),Un(Wr));break}}};ce.useEffect(function(){if(ji&&Ko){var Tr;(Tr=Xe.current)===null||Tr===void 0||Tr.focus({preventScroll:!0})}},[ji]);var qt=ce.useState(!1),hn=(0,Ce.Z)(qt,2),gn=hn[0],Nn=hn[1],On=ce.useContext(nn),vn;_o===!1?vn={distance:0}:_o===!0?vn={}:vn=_o||{};var Fn=(Hn=(lr=(Cr=vn)===null||Cr===void 0?void 0:Cr.distance)!==null&&lr!==void 0?lr:On==null?void 0:On.pushDistance)!==null&&Hn!==void 0?Hn:180,Gn=ce.useMemo(function(){return{pushDistance:Fn,push:function(){Nn(!0)},pull:function(){Nn(!1)}}},[Fn]);ce.useEffect(function(){if(ji){var Tr;On==null||(Tr=On.push)===null||Tr===void 0||Tr.call(On)}else{var Wr;On==null||(Wr=On.pull)===null||Wr===void 0||Wr.call(On)}},[ji]),ce.useEffect(function(){return function(){var Tr;On==null||(Tr=On.pull)===null||Tr===void 0||Tr.call(On)}},[]);var xr=jn&&ce.createElement(Zn.Z,(0,en.Z)({key:"mask"},Kn,{visible:ji}),function(Tr,Wr){var ni=Tr.className,Si=Tr.style;return ce.createElement("div",{className:Se()("".concat(_i,"-mask"),ni,An),style:(0,Le.Z)((0,Le.Z)({},Si),Dn),onClick:qn&&ji?Un:void 0,ref:Wr})}),sr=typeof yt=="function"?yt(Xi):yt,Lr={};if(gn&&Fn)switch(Xi){case"top":Lr.transform="translateY(".concat(Fn,"px)");break;case"bottom":Lr.transform="translateY(".concat(-Fn,"px)");break;case"left":Lr.transform="translateX(".concat(Fn,"px)");break;default:Lr.transform="translateX(".concat(-Fn,"px)");break}Xi==="left"||Xi==="right"?Lr.width=Xn(kt):Lr.height=Xn(At);var Ur={onMouseEnter:vr,onMouseOver:er,onMouseLeave:ir,onClick:fr,onKeyDown:_t,onKeyUp:vt},Pr=ce.createElement(Zn.Z,(0,en.Z)({key:"panel"},sr,{visible:ji,forceRender:To,onVisibleChanged:function(Wr){wn==null||wn(Wr)},removeOnLeave:!1,leavedClassName:"".concat(_i,"-content-wrapper-hidden")}),function(Tr,Wr){var ni=Tr.className,Si=Tr.style;return ce.createElement("div",(0,en.Z)({className:Se()("".concat(_i,"-content-wrapper"),ni),style:(0,Le.Z)((0,Le.Z)((0,Le.Z)({},Lr),Si),fn)},ci(pn,{data:!0})),ce.createElement(cr,(0,en.Z)({id:ut,containerRef:Wr,prefixCls:_i,className:lt,style:gt},Ur),tn))}),Qr=(0,Le.Z)({},Qn);return He&&(Qr.zIndex=He),ce.createElement(nn.Provider,{value:Gn},ce.createElement("div",{className:Se()(_i,"".concat(_i,"-").concat(Xi),Bn,(vi={},(0,bn.Z)(vi,"".concat(_i,"-open"),ji),(0,bn.Z)(vi,"".concat(_i,"-inline"),Ci),vi)),style:Qr,tabIndex:-1,ref:Xe,onKeyDown:Pt},xr,ce.createElement("div",{tabIndex:0,ref:ot,style:_r,"aria-hidden":"true","data-sentinel":"start"}),Pr,ce.createElement("div",{tabIndex:0,ref:Nt,style:_r,"aria-hidden":"true","data-sentinel":"end"})))}var $n=ce.forwardRef(mn),Vr=$n,qr=function(sn){var Hn=sn.open,lr=Hn===void 0?!1:Hn,Cr=sn.prefixCls,vi=Cr===void 0?"rc-drawer":Cr,_i=sn.placement,ji=_i===void 0?"right":_i,Xi=sn.autoFocus,Ci=Xi===void 0?!0:Xi,_o=sn.keyboard,To=_o===void 0?!0:_o,Ko=sn.width,Tn=Ko===void 0?378:Ko,Bn=sn.mask,Qn=Bn===void 0?!0:Bn,He=sn.maskClosable,lt=He===void 0?!0:He,ut=sn.getContainer,gt=sn.forceRender,yt=sn.afterOpenChange,kt=sn.destroyOnClose,At=sn.onMouseEnter,tn=sn.onMouseOver,fn=sn.onMouseLeave,jn=sn.onClick,qn=sn.onKeyDown,Kn=sn.onKeyUp,An=sn.panelRef,Dn=ce.useState(!1),wn=(0,Ce.Z)(Dn,2),Un=wn[0],vr=wn[1],er=ce.useState(!1),ir=(0,Ce.Z)(er,2),fr=ir[0],_t=ir[1];on(function(){_t(!0)},[]);var vt=fr?lr:!1,Xe=ce.useRef(),ot=ce.useRef();on(function(){vt&&(ot.current=document.activeElement)},[vt]);var Nt=function(Nn){var On;if(vr(Nn),yt==null||yt(Nn),!Nn&&ot.current&&!((On=Xe.current)!==null&&On!==void 0&&On.contains(ot.current))){var vn;(vn=ot.current)===null||vn===void 0||vn.focus({preventScroll:!0})}},Pt=ce.useMemo(function(){return{panel:An}},[An]);if(!gt&&!Un&&!vt&&kt)return null;var qt={onMouseEnter:At,onMouseOver:tn,onMouseLeave:fn,onClick:jn,onKeyDown:qn,onKeyUp:Kn},hn=(0,Le.Z)((0,Le.Z)({},sn),{},{open:vt,prefixCls:vi,placement:ji,autoFocus:Ci,keyboard:To,width:Tn,mask:Qn,maskClosable:lt,inline:ut===!1,afterOpenChange:Nt,ref:Xe},qt);return ce.createElement(Xt.Provider,{value:Pt},ce.createElement(It,{open:vt||gt||Un,autoDestroy:!1,getContainer:ut,autoLock:Qn&&(vt||Un)},ce.createElement(Vr,hn)))},Ir=qr,hi=Ir,Ni=ee(33603),yr=ee(53124),bi=ee(65223),ar=ee(69760),qi=pn=>{const{prefixCls:sn,title:Hn,footer:lr,extra:Cr,closeIcon:vi,closable:_i,onClose:ji,headerStyle:Xi,drawerStyle:Ci,bodyStyle:_o,footerStyle:To,children:Ko}=pn,Tn=ce.useCallback(ut=>ce.createElement("button",{type:"button",onClick:ji,"aria-label":"Close",className:`${sn}-close`},ut),[ji]),[Bn,Qn]=(0,ar.Z)(_i,vi,Tn,void 0,!0),He=ce.useMemo(()=>!Hn&&!Bn?null:ce.createElement("div",{style:Xi,className:Se()(`${sn}-header`,{[`${sn}-header-close-only`]:Bn&&!Hn&&!Cr})},ce.createElement("div",{className:`${sn}-header-title`},Qn,Hn&&ce.createElement("div",{className:`${sn}-title`},Hn)),Cr&&ce.createElement("div",{className:`${sn}-extra`},Cr)),[Bn,Qn,Cr,Xi,sn,Hn]),lt=ce.useMemo(()=>{if(!lr)return null;const ut=`${sn}-footer`;return ce.createElement("div",{className:ut,style:To},lr)},[lr,To,sn]);return ce.createElement("div",{className:`${sn}-wrapper-body`,style:Ci},He,ce.createElement("div",{className:`${sn}-body`,style:_o},Ko),lt)},ua=ee(4173),Jo=ee(67968),bo=ee(45503),na=pn=>{const{componentCls:sn,motionDurationSlow:Hn}=pn,lr={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Hn}`}}};return{[sn]:{[`${sn}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Hn}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${sn}-panel-motion`]:{"&-left":[lr,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[lr,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[lr,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[lr,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Eo=pn=>{const{componentCls:sn,zIndexPopup:Hn,colorBgMask:lr,colorBgElevated:Cr,motionDurationSlow:vi,motionDurationMid:_i,padding:ji,paddingLG:Xi,fontSizeLG:Ci,lineHeightLG:_o,lineWidth:To,lineType:Ko,colorSplit:Tn,marginSM:Bn,colorIcon:Qn,colorIconHover:He,colorText:lt,fontWeightStrong:ut,footerPaddingBlock:gt,footerPaddingInline:yt}=pn,kt=`${sn}-content-wrapper`;return{[sn]:{position:"fixed",inset:0,zIndex:Hn,pointerEvents:"none","&-pure":{position:"relative",background:Cr,[`&${sn}-left`]:{boxShadow:pn.boxShadowDrawerLeft},[`&${sn}-right`]:{boxShadow:pn.boxShadowDrawerRight},[`&${sn}-top`]:{boxShadow:pn.boxShadowDrawerUp},[`&${sn}-bottom`]:{boxShadow:pn.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${sn}-mask`]:{position:"absolute",inset:0,zIndex:Hn,background:lr,pointerEvents:"auto"},[kt]:{position:"absolute",zIndex:Hn,maxWidth:"100vw",transition:`all ${vi}`,"&-hidden":{display:"none"}},[`&-left > ${kt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:pn.boxShadowDrawerLeft},[`&-right > ${kt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:pn.boxShadowDrawerRight},[`&-top > ${kt}`]:{top:0,insetInline:0,boxShadow:pn.boxShadowDrawerUp},[`&-bottom > ${kt}`]:{bottom:0,insetInline:0,boxShadow:pn.boxShadowDrawerDown},[`${sn}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Cr,pointerEvents:"auto"},[`${sn}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${sn}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ji}px ${Xi}px`,fontSize:Ci,lineHeight:_o,borderBottom:`${To}px ${Ko} ${Tn}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${sn}-extra`]:{flex:"none"},[`${sn}-close`]:{display:"inline-block",marginInlineEnd:Bn,color:Qn,fontWeight:ut,fontSize:Ci,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${_i}`,textRendering:"auto","&:focus, &:hover":{color:He,textDecoration:"none"}},[`${sn}-title`]:{flex:1,margin:0,color:lt,fontWeight:pn.fontWeightStrong,fontSize:Ci,lineHeight:_o},[`${sn}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Xi,overflow:"auto"},[`${sn}-footer`]:{flexShrink:0,padding:`${gt}px ${yt}px`,borderTop:`${To}px ${Ko} ${Tn}`},"&-rtl":{direction:"rtl"}}}};var ra=(0,Jo.Z)("Drawer",pn=>{const sn=(0,bo.TS)(pn,{});return[Eo(sn),na(sn)]},pn=>({zIndexPopup:pn.zIndexPopupBase,footerPaddingBlock:pn.paddingXS,footerPaddingInline:pn.padding})),ea=ee(16569),Ho=function(pn,sn){var Hn={};for(var lr in pn)Object.prototype.hasOwnProperty.call(pn,lr)&&sn.indexOf(lr)<0&&(Hn[lr]=pn[lr]);if(pn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Cr=0,lr=Object.getOwnPropertySymbols(pn);Cr<lr.length;Cr++)sn.indexOf(lr[Cr])<0&&Object.prototype.propertyIsEnumerable.call(pn,lr[Cr])&&(Hn[lr[Cr]]=pn[lr[Cr]]);return Hn};const No=null,Ba={distance:180},Wa=pn=>{var sn;const{rootClassName:Hn,width:lr,height:Cr,size:vi="default",mask:_i=!0,push:ji=Ba,open:Xi,afterOpenChange:Ci,onClose:_o,prefixCls:To,getContainer:Ko,style:Tn,className:Bn,visible:Qn,afterVisibleChange:He}=pn,lt=Ho(pn,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:ut,getPrefixCls:gt,direction:yt,drawer:kt}=ce.useContext(yr.E_),At=gt("drawer",To),[tn,fn]=ra(At),jn=Ko===void 0&&ut?()=>ut(document.body):Ko,qn=Se()({"no-mask":!_i,[`${At}-rtl`]:yt==="rtl"},Hn,fn),Kn=ce.useMemo(()=>lr!=null?lr:vi==="large"?736:378,[lr,vi]),An=ce.useMemo(()=>Cr!=null?Cr:vi==="large"?736:378,[Cr,vi]),Dn={motionName:(0,Ni.m)(At,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},wn=vr=>({motionName:(0,Ni.m)(At,`panel-motion-${vr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Un=(0,ea.H)();return tn(ce.createElement(ua.BR,null,ce.createElement(bi.Ux,{status:!0,override:!0},ce.createElement(hi,Object.assign({prefixCls:At,onClose:_o,maskMotion:Dn,motion:wn},lt,{open:Xi!=null?Xi:Qn,mask:_i,push:ji,width:Kn,height:An,style:Object.assign(Object.assign({},kt==null?void 0:kt.style),Tn),className:Se()(kt==null?void 0:kt.className,Bn),rootClassName:qn,getContainer:jn,afterOpenChange:Ci!=null?Ci:He,panelRef:Un}),ce.createElement(qi,Object.assign({prefixCls:At},lt,{onClose:_o}))))))},Ia=pn=>{const{prefixCls:sn,style:Hn,className:lr,placement:Cr="right"}=pn,vi=Ho(pn,["prefixCls","style","className","placement"]),{getPrefixCls:_i}=ce.useContext(yr.E_),ji=_i("drawer",sn),[Xi,Ci]=ra(ji),_o=Se()(ji,`${ji}-pure`,`${ji}-${Cr}`,Ci,lr);return Xi(ce.createElement("div",{className:_o,style:Hn},ce.createElement(qi,Object.assign({prefixCls:ji},vi))))};Wa._InternalPanelDoNotUseOrYouWillBeFired=Ia;var Ao=Wa},35874:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ne}});var te=ee(67294),Se=ee(91034),Le=ee(94184),Ce=ee.n(Le),ce=ee(87462),fe=ee(4942),ae=ee(97685),le=ee(45987),re=ee(62709),de=ee(71002),he=ee(12060);function me(we,rt,It){var Ct=React.useRef({});return(!("value"in Ct.current)||It(Ct.current.condition,rt))&&(Ct.current.value=we(),Ct.current.condition=rt),Ct.current.value}function se(we,rt){typeof we=="function"?we(rt):(0,de.Z)(we)==="object"&&we&&"current"in we&&(we.current=rt)}function ye(){for(var we=arguments.length,rt=new Array(we),It=0;It<we;It++)rt[It]=arguments[It];var Ct=rt.filter(function($t){return $t});return Ct.length<=1?Ct[0]:function($t){rt.forEach(function(Vt){se(Vt,$t)})}}function _e(){for(var we=arguments.length,rt=new Array(we),It=0;It<we;It++)rt[It]=arguments[It];return useMemo(function(){return ye.apply(void 0,rt)},rt,function(Ct,$t){return Ct.length===$t.length&&Ct.every(function(Vt,wt){return Vt===$t[wt]})})}function Me(we){var rt,It,Ct=(0,he.isMemo)(we)?we.type.type:we.type;return!(typeof Ct=="function"&&!((rt=Ct.prototype)!==null&&rt!==void 0&&rt.render)||typeof we=="function"&&!((It=we.prototype)!==null&&It!==void 0&&It.render))}var ve={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(rt){var It=rt.keyCode;if(rt.altKey&&!rt.ctrlKey||rt.metaKey||It>=ve.F1&&It<=ve.F12)return!1;switch(It){case ve.ALT:case ve.CAPS_LOCK:case ve.CONTEXT_MENU:case ve.CTRL:case ve.DOWN:case ve.END:case ve.ESC:case ve.HOME:case ve.INSERT:case ve.LEFT:case ve.MAC_FF_META:case ve.META:case ve.NUMLOCK:case ve.NUM_CENTER:case ve.PAGE_DOWN:case ve.PAGE_UP:case ve.PAUSE:case ve.PRINT_SCREEN:case ve.RIGHT:case ve.SHIFT:case ve.UP:case ve.WIN_KEY:case ve.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(rt){if(rt>=ve.ZERO&&rt<=ve.NINE||rt>=ve.NUM_ZERO&&rt<=ve.NUM_MULTIPLY||rt>=ve.A&&rt<=ve.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&rt===0)return!0;switch(rt){case ve.SPACE:case ve.QUESTION_MARK:case ve.NUM_PLUS:case ve.NUM_MINUS:case ve.NUM_PERIOD:case ve.NUM_DIVISION:case ve.SEMICOLON:case ve.DASH:case ve.EQUALS:case ve.COMMA:case ve.PERIOD:case ve.SLASH:case ve.APOSTROPHE:case ve.SINGLE_QUOTE:case ve.OPEN_SQUARE_BRACKET:case ve.BACKSLASH:case ve.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Fe=ve,$e=function(rt){return+setTimeout(rt,16)},Te=function(rt){return clearTimeout(rt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&($e=function(rt){return window.requestAnimationFrame(rt)},Te=function(rt){return window.cancelAnimationFrame(rt)});var ze=0,Ee=new Map;function be(we){Ee.delete(we)}var Re=function(rt){var It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ze+=1;var Ct=ze;function $t(Vt){if(Vt===0)be(Ct),rt();else{var wt=$e(function(){$t(Vt-1)});Ee.set(Ct,wt)}}return $t(It),Ct};Re.cancel=function(we){var rt=Ee.get(we);return be(rt),Te(rt)};var De=Re,et=Fe.ESC,Ye=Fe.TAB;function dt(we){var rt=we.visible,It=we.triggerRef,Ct=we.onVisibleChange,$t=we.autoFocus,Vt=we.overlayRef,wt=te.useRef(!1),on=function(){if(rt){var bn,en;(bn=It.current)===null||bn===void 0||(en=bn.focus)===null||en===void 0||en.call(bn),Ct==null||Ct(!1)}},Dt=function(){var bn;return(bn=Vt.current)!==null&&bn!==void 0&&bn.focus?(Vt.current.focus(),wt.current=!0,!0):!1},Xt=function(bn){switch(bn.keyCode){case et:on();break;case Ye:{var en=!1;wt.current||(en=Dt()),en?bn.preventDefault():on();break}}};te.useEffect(function(){return rt?(window.addEventListener("keydown",Xt),$t&&De(Dt,3),function(){window.removeEventListener("keydown",Xt),wt.current=!1}):function(){wt.current=!1}},[rt])}var Ke=(0,te.forwardRef)(function(we,rt){var It=we.overlay,Ct=we.arrow,$t=we.prefixCls,Vt=(0,te.useMemo)(function(){var on;return typeof It=="function"?on=It():on=It,on},[It]),wt=ye(rt,Vt==null?void 0:Vt.ref);return te.createElement(te.Fragment,null,Ct&&te.createElement("div",{className:"".concat($t,"-arrow")}),te.cloneElement(Vt,{ref:Me(Vt)?wt:void 0}))}),zt=Ke,pt={adjustX:1,adjustY:1},Kt=[0,0],Ze={topLeft:{points:["bl","tl"],overflow:pt,offset:[0,-4],targetOffset:Kt},top:{points:["bc","tc"],overflow:pt,offset:[0,-4],targetOffset:Kt},topRight:{points:["br","tr"],overflow:pt,offset:[0,-4],targetOffset:Kt},bottomLeft:{points:["tl","bl"],overflow:pt,offset:[0,4],targetOffset:Kt},bottom:{points:["tc","bc"],overflow:pt,offset:[0,4],targetOffset:Kt},bottomRight:{points:["tr","br"],overflow:pt,offset:[0,4],targetOffset:Kt}},tt=Ze,ft=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ut(we,rt){var It,Ct=we.arrow,$t=Ct===void 0?!1:Ct,Vt=we.prefixCls,wt=Vt===void 0?"rc-dropdown":Vt,on=we.transitionName,Dt=we.animation,Xt=we.align,nn=we.placement,bn=nn===void 0?"bottomLeft":nn,en=we.placements,Zn=en===void 0?tt:en,Yn=we.getPopupContainer,pr=we.showAction,ti=we.hideAction,Pn=we.overlayClassName,Or=we.overlayStyle,Br=we.visible,Di=we.trigger,mi=Di===void 0?["hover"]:Di,ci=we.autoFocus,Fr=we.overlay,zr=we.children,Fi=we.onVisibleChange,ko=(0,le.Z)(we,ft),aa=te.useState(),Wo=(0,ae.Z)(aa,2),li=Wo[0],rn=Wo[1],nr="visible"in we?Br:li,dr=te.useRef(null),rr=te.useRef(null),Jr=te.useRef(null);te.useImperativeHandle(rt,function(){return dr.current});var Ar=function(it){rn(it),Fi==null||Fi(it)};dt({visible:nr,triggerRef:Jr,onVisibleChange:Ar,autoFocus:ci,overlayRef:rr});var Mr=function(it){var xt=we.onOverlayClick;rn(!1),xt&&xt(it)},tr=function(){return te.createElement(zt,{ref:rr,overlay:Fr,prefixCls:wt,arrow:$t})},Zt=function(){return typeof Fr=="function"?tr:tr()},Ot=function(){var it=we.minOverlayWidthMatchTrigger,xt=we.alignPoint;return"minOverlayWidthMatchTrigger"in we?it:!xt},ge=function(){var it=we.openClassName;return it!==void 0?it:"".concat(wt,"-open")},Ie=te.cloneElement(zr,{className:Ce()((It=zr.props)===null||It===void 0?void 0:It.className,nr&&ge()),ref:Me(zr)?ye(Jr,zr.ref):void 0}),Ae=ti;return!Ae&&mi.indexOf("contextMenu")!==-1&&(Ae=["click"]),te.createElement(re.Z,(0,ce.Z)({builtinPlacements:Zn},ko,{prefixCls:wt,ref:dr,popupClassName:Ce()(Pn,(0,fe.Z)({},"".concat(wt,"-show-arrow"),$t)),popupStyle:Or,action:mi,showAction:pr,hideAction:Ae,popupPlacement:bn,popupAlign:Xt,popupTransitionName:on,popupAnimation:Dt,popupVisible:nr,stretch:Ot()?"minWidth":"",popup:Zt(),onPopupVisibleChange:Ar,onPopupClick:Mr,getPopupContainer:Yn}),Ie)}var nt=te.forwardRef(Ut),Ge=nt,jt=ee(60276),yn=ee(5663),ln=ee(10366),Tt=ee(80636),Lt=ee(8745),Jt=ee(96159),kn=ee(53124),In=ee(68508),Qt=ee(76529),Mn=ee(46605),Wn=ee(66748);const zn=null,at=we=>{const{menu:rt,arrow:It,prefixCls:Ct,children:$t,trigger:Vt,disabled:wt,dropdownRender:on,getPopupContainer:Dt,overlayClassName:Xt,rootClassName:nn,open:bn,onOpenChange:en,visible:Zn,onVisibleChange:Yn,mouseEnterDelay:pr=.15,mouseLeaveDelay:ti=.1,autoAdjustOverflow:Pn=!0,placement:Or="",overlay:Br,transitionName:Di}=we,{getPopupContainer:mi,getPrefixCls:ci,direction:Fr}=te.useContext(kn.E_),zr=te.useMemo(()=>{const Ie=ci();return Di!==void 0?Di:Or.includes("top")?`${Ie}-slide-down`:`${Ie}-slide-up`},[ci,Or,Di]),Fi=te.useMemo(()=>Or?Or.includes("Center")?Or.slice(0,Or.indexOf("Center")):Or:Fr==="rtl"?"bottomRight":"bottomLeft",[Or,Fr]),ko=ci("dropdown",Ct),[aa,Wo]=(0,Wn.Z)(ko),[,li]=(0,Mn.Z)(),rn=te.Children.only($t),nr=(0,Jt.Tm)(rn,{className:Ce()(`${ko}-trigger`,{[`${ko}-rtl`]:Fr==="rtl"},rn.props.className),disabled:wt}),dr=wt?[]:Vt;let rr;dr&&dr.includes("contextMenu")&&(rr=!0);const[Jr,Ar]=(0,yn.Z)(!1,{value:bn!=null?bn:Zn}),Mr=(0,jt.useEvent)(Ie=>{en==null||en(Ie),Yn==null||Yn(Ie),Ar(Ie)}),tr=Ce()(Xt,nn,Wo,{[`${ko}-rtl`]:Fr==="rtl"}),Zt=(0,Tt.Z)({arrowPointAtCenter:typeof It=="object"&&It.pointAtCenter,autoAdjustOverflow:Pn,offset:li.marginXXS,arrowWidth:It?li.sizePopupArrow:0,borderRadius:li.borderRadius}),Ot=te.useCallback(()=>{Ar(!1)},[]),ge=()=>{let Ie;return rt!=null&&rt.items?Ie=te.createElement(In.default,Object.assign({},rt)):typeof Br=="function"?Ie=Br():Ie=Br,on&&(Ie=on(Ie)),Ie=te.Children.only(typeof Ie=="string"?te.createElement("span",null,Ie):Ie),te.createElement(Qt.J,{prefixCls:`${ko}-menu`,expandIcon:te.createElement("span",{className:`${ko}-menu-submenu-arrow`},te.createElement(Se.Z,{className:`${ko}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ot,validator:Ae=>{let{mode:We}=Ae}},Ie)};return aa(te.createElement(Ge,Object.assign({alignPoint:rr},(0,ln.Z)(we,["rootClassName"]),{mouseEnterDelay:pr,mouseLeaveDelay:ti,visible:Jr,builtinPlacements:Zt,arrow:!!It,overlayClassName:tr,prefixCls:ko,getPopupContainer:Dt||mi,transitionName:zr,trigger:dr,overlay:ge,placement:Fi,onVisibleChange:Mr}),nr))};function Oe(we){return Object.assign(Object.assign({},we),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ke=(0,Lt.Z)(at,"dropdown",we=>we,Oe),Be=we=>te.createElement(ke,Object.assign({},we),te.createElement("span",null));at._InternalPanelDoNotUseOrYouWillBeFired=Be;var Ne=at},85418:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return _e}});var te=ee(35874),Se=ee(94184),Le=ee.n(Se),Ce=ee(67294),ce=ee(25877),fe=ee(71577),ae=ee(53124),le=ee(93421),re=ee(4173),de=ee(66748),he=function(Me,ve){var Fe={};for(var $e in Me)Object.prototype.hasOwnProperty.call(Me,$e)&&ve.indexOf($e)<0&&(Fe[$e]=Me[$e]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,$e=Object.getOwnPropertySymbols(Me);Te<$e.length;Te++)ve.indexOf($e[Te])<0&&Object.prototype.propertyIsEnumerable.call(Me,$e[Te])&&(Fe[$e[Te]]=Me[$e[Te]]);return Fe};const me=Me=>{const{getPopupContainer:ve,getPrefixCls:Fe,direction:$e}=Ce.useContext(ae.E_),{prefixCls:Te,type:ze="default",danger:Ee,disabled:be,loading:Re,onClick:De,htmlType:et,children:Ye,className:dt,menu:Ke,arrow:zt,autoFocus:pt,overlay:Kt,trigger:Ze,align:tt,open:ft,onOpenChange:Ut,placement:nt,getPopupContainer:Ge,href:jt,icon:yn=Ce.createElement(ce.Z,null),title:ln,buttonsRender:Tt=wt=>wt,mouseEnterDelay:Lt,mouseLeaveDelay:Jt,overlayClassName:kn,overlayStyle:In,destroyPopupOnHide:Qt,dropdownRender:Mn}=Me,Wn=he(Me,["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"]),zn=Fe("dropdown",Te),at=`${zn}-button`,[Oe,ke]=(0,de.Z)(zn),Be={menu:Ke,arrow:zt,autoFocus:pt,align:tt,disabled:be,trigger:be?[]:Ze,onOpenChange:Ut,getPopupContainer:Ge||ve,mouseEnterDelay:Lt,mouseLeaveDelay:Jt,overlayClassName:kn,overlayStyle:In,destroyPopupOnHide:Qt,dropdownRender:Mn},{compactSize:Ne,compactItemClassnames:we}=(0,re.ri)(zn,$e),rt=Le()(at,we,dt,ke);"overlay"in Me&&(Be.overlay=Kt),"open"in Me&&(Be.open=ft),"placement"in Me?Be.placement=nt:Be.placement=$e==="rtl"?"bottomLeft":"bottomRight";const It=Ce.createElement(fe.ZP,{type:ze,danger:Ee,disabled:be,loading:Re,onClick:De,htmlType:et,href:jt,title:ln},Ye),Ct=Ce.createElement(fe.ZP,{type:ze,danger:Ee,icon:yn}),[$t,Vt]=Tt([It,Ct]);return Oe(Ce.createElement(le.Z.Compact,Object.assign({className:rt,size:Ne,block:!0},Wn),$t,Ce.createElement(te.Z,Object.assign({},Be),Vt)))};me.__ANT_BUTTON=!0;var se=me;const ye=te.Z;ye.Button=se;var _e=ye},66748:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return he}});var te=ee(14747),Se=ee(67771),Le=ee(33297),Ce=ee(50438),ce=ee(97414),fe=ee(67968),ae=ee(45503),re=me=>{const{componentCls:se,menuCls:ye,colorError:_e,colorTextLightSolid:Me}=me,ve=`${ye}-item`;return{[`${se}, ${se}-menu-submenu`]:{[`${ye} ${ve}`]:{[`&${ve}-danger:not(${ve}-disabled)`]:{color:_e,"&:hover":{color:Me,backgroundColor:_e}}}}}};const de=me=>{const{componentCls:se,menuCls:ye,zIndexPopup:_e,dropdownArrowDistance:Me,sizePopupArrow:ve,antCls:Fe,iconCls:$e,motionDurationMid:Te,dropdownPaddingVertical:ze,fontSize:Ee,dropdownEdgeChildPadding:be,colorTextDisabled:Re,fontSizeIcon:De,controlPaddingHorizontal:et,colorBgElevated:Ye}=me;return[{[se]:Object.assign(Object.assign({},(0,te.Wf)(me)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:_e,display:"block","&::before":{position:"absolute",insetBlock:-Me+ve/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Fe}-btn`]:{[`& > ${$e}-down, & > ${Fe}-btn-icon > ${$e}-down`]:{fontSize:De}},[`${se}-wrap`]:{position:"relative",[`${Fe}-btn > ${$e}-down`]:{fontSize:De},[`${$e}-down::before`]:{transition:`transform ${Te}`}},[`${se}-wrap-open`]:{[`${$e}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Fe}-slide-down-enter${Fe}-slide-down-enter-active${se}-placement-bottomLeft,
|
|
|
&${Fe}-slide-down-appear${Fe}-slide-down-appear-active${se}-placement-bottomLeft,
|
|
|
&${Fe}-slide-down-enter${Fe}-slide-down-enter-active${se}-placement-bottom,
|
|
|
&${Fe}-slide-down-appear${Fe}-slide-down-appear-active${se}-placement-bottom,
|
|
|
&${Fe}-slide-down-enter${Fe}-slide-down-enter-active${se}-placement-bottomRight,
|
|
|
&${Fe}-slide-down-appear${Fe}-slide-down-appear-active${se}-placement-bottomRight`]:{animationName:Se.fJ},[`&${Fe}-slide-up-enter${Fe}-slide-up-enter-active${se}-placement-topLeft,
|
|
|
&${Fe}-slide-up-appear${Fe}-slide-up-appear-active${se}-placement-topLeft,
|
|
|
&${Fe}-slide-up-enter${Fe}-slide-up-enter-active${se}-placement-top,
|
|
|
&${Fe}-slide-up-appear${Fe}-slide-up-appear-active${se}-placement-top,
|
|
|
&${Fe}-slide-up-enter${Fe}-slide-up-enter-active${se}-placement-topRight,
|
|
|
&${Fe}-slide-up-appear${Fe}-slide-up-appear-active${se}-placement-topRight`]:{animationName:Se.Qt},[`&${Fe}-slide-down-leave${Fe}-slide-down-leave-active${se}-placement-bottomLeft,
|
|
|
&${Fe}-slide-down-leave${Fe}-slide-down-leave-active${se}-placement-bottom,
|
|
|
&${Fe}-slide-down-leave${Fe}-slide-down-leave-active${se}-placement-bottomRight`]:{animationName:Se.Uw},[`&${Fe}-slide-up-leave${Fe}-slide-up-leave-active${se}-placement-topLeft,
|
|
|
&${Fe}-slide-up-leave${Fe}-slide-up-leave-active${se}-placement-top,
|
|
|
&${Fe}-slide-up-leave${Fe}-slide-up-leave-active${se}-placement-topRight`]:{animationName:Se.ly}})},(0,ce.ZP)(me,{colorBg:Ye,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${se} ${ye}`]:{position:"relative",margin:0},[`${ye}-submenu-popup`]:{position:"absolute",zIndex:_e,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${se}, ${se}-menu-submenu`]:{[ye]:Object.assign(Object.assign({padding:be,listStyleType:"none",backgroundColor:Ye,backgroundClip:"padding-box",borderRadius:me.borderRadiusLG,outline:"none",boxShadow:me.boxShadowSecondary},(0,te.Qy)(me)),{[`${ye}-item-group-title`]:{padding:`${ze}px ${et}px`,color:me.colorTextDescription,transition:`all ${Te}`},[`${ye}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ye}-item-icon`]:{minWidth:Ee,marginInlineEnd:me.marginXS,fontSize:me.fontSizeSM},[`${ye}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Te}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ye}-item, ${ye}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ze}px ${et}px`,color:me.colorText,fontWeight:"normal",fontSize:Ee,lineHeight:me.lineHeight,cursor:"pointer",transition:`all ${Te}`,borderRadius:me.borderRadiusSM,"&:hover, &-active":{backgroundColor:me.controlItemBgHover}},(0,te.Qy)(me)),{"&-selected":{color:me.colorPrimary,backgroundColor:me.controlItemBgActive,"&:hover, &-active":{backgroundColor:me.controlItemBgActiveHover}},"&-disabled":{color:Re,cursor:"not-allowed","&:hover":{color:Re,backgroundColor:Ye,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${me.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:me.colorSplit},[`${se}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:me.paddingXS,[`${se}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:me.colorTextDescription,fontSize:De,fontStyle:"normal"}}}),[`${ye}-item-group-list`]:{margin:`0 ${me.marginXS}px`,padding:0,listStyle:"none"},[`${ye}-submenu-title`]:{paddingInlineEnd:et+me.fontSizeSM},[`${ye}-submenu-vertical`]:{position:"relative"},[`${ye}-submenu${ye}-submenu-disabled ${se}-menu-submenu-title`]:{[`&, ${se}-menu-submenu-arrow-icon`]:{color:Re,backgroundColor:Ye,cursor:"not-allowed"}},[`${ye}-submenu-selected ${se}-menu-submenu-title`]:{color:me.colorPrimary}})}},[(0,Se.oN)(me,"slide-up"),(0,Se.oN)(me,"slide-down"),(0,Le.Fm)(me,"move-up"),(0,Le.Fm)(me,"move-down"),(0,Ce._y)(me,"zoom-big")]]};var he=(0,fe.Z)("Dropdown",(me,se)=>{let{rootPrefixCls:ye}=se;const{marginXXS:_e,sizePopupArrow:Me,controlHeight:ve,fontSize:Fe,lineHeight:$e,paddingXXS:Te,componentCls:ze,borderRadiusLG:Ee}=me,be=(ve-Fe*$e)/2,{dropdownArrowOffset:Re}=(0,ce.fS)({contentRadius:Ee}),De=(0,ae.TS)(me,{menuCls:`${ze}-menu`,rootPrefixCls:ye,dropdownArrowDistance:Me/2+_e,dropdownArrowOffset:Re,dropdownPaddingVertical:be,dropdownEdgeChildPadding:Te});return[de(De),re(De)]},me=>({zIndexPopup:me.zIndexPopupBase+50}))},32983:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Te}});var te=ee(94184),Se=ee.n(te),Le=ee(67294),Ce=ee(53124),ce=ee(10110),fe=ee(84780),ae=ee(46605),re=()=>{const[,ze]=(0,ae.Z)(),be=new fe.C(ze.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Le.createElement("svg",{style:be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Le.createElement("g",{fill:"none",fillRule:"evenodd"},Le.createElement("g",{transform:"translate(24 31.67)"},Le.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Le.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"}),Le.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)"}),Le.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"}),Le.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"})),Le.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"}),Le.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Le.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Le.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},he=()=>{const[,ze]=(0,ae.Z)(),{colorFill:Ee,colorFillTertiary:be,colorFillQuaternary:Re,colorBgContainer:De}=ze,{borderColor:et,shadowColor:Ye,contentColor:dt}=(0,Le.useMemo)(()=>({borderColor:new fe.C(Ee).onBackground(De).toHexShortString(),shadowColor:new fe.C(be).onBackground(De).toHexShortString(),contentColor:new fe.C(Re).onBackground(De).toHexShortString()}),[Ee,be,Re,De]);return Le.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Le.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Le.createElement("ellipse",{fill:Ye,cx:"32",cy:"33",rx:"32",ry:"7"}),Le.createElement("g",{fillRule:"nonzero",stroke:et},Le.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"}),Le.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:dt}))))},me=ee(67968),se=ee(45503);const ye=ze=>{const{componentCls:Ee,margin:be,marginXS:Re,marginXL:De,fontSize:et,lineHeight:Ye}=ze;return{[Ee]:{marginInline:Re,fontSize:et,lineHeight:Ye,textAlign:"center",[`${Ee}-image`]:{height:ze.emptyImgHeight,marginBottom:Re,opacity:ze.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ee}-description`]:{color:ze.colorText},[`${Ee}-footer`]:{marginTop:be},"&-normal":{marginBlock:De,color:ze.colorTextDisabled,[`${Ee}-description`]:{color:ze.colorTextDisabled},[`${Ee}-image`]:{height:ze.emptyImgHeightMD}},"&-small":{marginBlock:Re,color:ze.colorTextDisabled,[`${Ee}-image`]:{height:ze.emptyImgHeightSM}}}}};var _e=(0,me.Z)("Empty",ze=>{const{componentCls:Ee,controlHeightLG:be}=ze,Re=(0,se.TS)(ze,{emptyImgCls:`${Ee}-img`,emptyImgHeight:be*2.5,emptyImgHeightMD:be,emptyImgHeightSM:be*.875});return[ye(Re)]}),Me=function(ze,Ee){var be={};for(var Re in ze)Object.prototype.hasOwnProperty.call(ze,Re)&&Ee.indexOf(Re)<0&&(be[Re]=ze[Re]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Re=Object.getOwnPropertySymbols(ze);De<Re.length;De++)Ee.indexOf(Re[De])<0&&Object.prototype.propertyIsEnumerable.call(ze,Re[De])&&(be[Re[De]]=ze[Re[De]]);return be};const ve=Le.createElement(re,null),Fe=Le.createElement(he,null),$e=ze=>{var{className:Ee,rootClassName:be,prefixCls:Re,image:De=ve,description:et,children:Ye,imageStyle:dt,style:Ke}=ze,zt=Me(ze,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:pt,direction:Kt,empty:Ze}=Le.useContext(Ce.E_),tt=pt("empty",Re),[ft,Ut]=_e(tt),[nt]=(0,ce.Z)("Empty"),Ge=typeof et!="undefined"?et:nt==null?void 0:nt.description,jt=typeof Ge=="string"?Ge:"empty";let yn=null;return typeof De=="string"?yn=Le.createElement("img",{alt:jt,src:De}):yn=De,ft(Le.createElement("div",Object.assign({className:Se()(Ut,tt,Ze==null?void 0:Ze.className,{[`${tt}-normal`]:De===Fe,[`${tt}-rtl`]:Kt==="rtl"},Ee,be),style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),Ke)},zt),Le.createElement("div",{className:`${tt}-image`,style:dt},yn),Ge&&Le.createElement("div",{className:`${tt}-description`},Ge),Ye&&Le.createElement("div",{className:`${tt}-footer`},Ye)))};$e.PRESENTED_IMAGE_DEFAULT=ve,$e.PRESENTED_IMAGE_SIMPLE=Fe;var Te=$e},22150:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Ie}});var te=ee(74902),Se=ee(94184),Le=ee.n(Se),Ce=ee(38379),ce=ee(67294),fe=ee(33603),ae=ee(65223);function le(Ae){const[We,it]=ce.useState(Ae);return ce.useEffect(()=>{const xt=setTimeout(()=>{it(Ae)},Ae.length?0:10);return()=>{clearTimeout(xt)}},[Ae]),We}var re=ee(14747),de=ee(50438),he=ee(33507),me=ee(45503),se=ee(67968),_e=Ae=>{const{componentCls:We}=Ae,it=`${We}-show-help`,xt=`${We}-show-help-item`;return{[it]:{transition:`opacity ${Ae.motionDurationSlow} ${Ae.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[xt]:{overflow:"hidden",transition:`height ${Ae.motionDurationSlow} ${Ae.motionEaseInOut},
|
|
|
opacity ${Ae.motionDurationSlow} ${Ae.motionEaseInOut},
|
|
|
transform ${Ae.motionDurationSlow} ${Ae.motionEaseInOut} !important`,[`&${xt}-appear, &${xt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${xt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Me=Ae=>({legend:{display:"block",width:"100%",marginBottom:Ae.marginLG,padding:0,color:Ae.colorTextDescription,fontSize:Ae.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`},label:{fontSize:Ae.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 ${Ae.controlOutlineWidth}px ${Ae.controlOutline}`},output:{display:"block",paddingTop:15,color:Ae.colorText,fontSize:Ae.fontSize,lineHeight:Ae.lineHeight}}),ve=(Ae,We)=>{const{formItemCls:it}=Ae;return{[it]:{[`${it}-label > label`]:{height:We},[`${it}-control-input`]:{minHeight:We}}}},Fe=Ae=>{const{componentCls:We}=Ae;return{[Ae.componentCls]:Object.assign(Object.assign(Object.assign({},(0,re.Wf)(Ae)),Me(Ae)),{[`${We}-text`]:{display:"inline-block",paddingInlineEnd:Ae.paddingSM},"&-small":Object.assign({},ve(Ae,Ae.controlHeightSM)),"&-large":Object.assign({},ve(Ae,Ae.controlHeightLG))})}},$e=Ae=>{const{formItemCls:We,iconCls:it,componentCls:xt,rootPrefixCls:Ft,labelRequiredMarkColor:an,labelColor:Rn,labelFontSize:mr,labelHeight:or,labelColonMarginInlineStart:cr,labelColonMarginInlineEnd:Xn,itemMarginBottom:br}=Ae;return{[We]:Object.assign(Object.assign({},(0,re.Wf)(Ae)),{marginBottom:br,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Ft}-row`]:{display:"none"},"&-has-warning":{[`${We}-split`]:{color:Ae.colorError}},"&-has-error":{[`${We}-split`]:{color:Ae.colorWarning}},[`${We}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ae.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:or,color:Rn,fontSize:mr,[`> ${it}`]:{fontSize:Ae.fontSize,verticalAlign:"top"},[`&${We}-required:not(${We}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ae.marginXXS,color:an,fontSize:Ae.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${xt}-hide-required-mark &`]:{display:"none"}},[`${We}-optional`]:{display:"inline-block",marginInlineStart:Ae.marginXXS,color:Ae.colorTextDescription,[`${xt}-hide-required-mark &`]:{display:"none"}},[`${We}-tooltip`]:{color:Ae.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ae.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:cr,marginInlineEnd:Xn},[`&${We}-no-colon::after`]:{content:'"\\a0"'}}},[`${We}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ft}-col-'"]):not([class*="' ${Ft}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ae.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[We]:{"&-explain, &-extra":{clear:"both",color:Ae.colorTextDescription,fontSize:Ae.fontSize,lineHeight:Ae.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ae.controlHeightSM,transition:`color ${Ae.motionDurationMid} ${Ae.motionEaseOut}`},"&-explain":{"&-error":{color:Ae.colorError},"&-warning":{color:Ae.colorWarning}}},[`&-with-help ${We}-explain`]:{height:"auto",opacity:1},[`${We}-feedback-icon`]:{fontSize:Ae.fontSize,textAlign:"center",visibility:"visible",animationName:de.kr,animationDuration:Ae.motionDurationMid,animationTimingFunction:Ae.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ae.colorSuccess},"&-error":{color:Ae.colorError},"&-warning":{color:Ae.colorWarning},"&-validating":{color:Ae.colorPrimary}}})}},Te=Ae=>{const{componentCls:We,formItemCls:it}=Ae;return{[`${We}-horizontal`]:{[`${it}-label`]:{flexGrow:0},[`${it}-control`]:{flex:"1 1 0",minWidth:0},[`${it}-label[class$='-24'], ${it}-label[class*='-24 ']`]:{[`& + ${it}-control`]:{minWidth:"unset"}}}}},ze=Ae=>{const{componentCls:We,formItemCls:it}=Ae;return{[`${We}-inline`]:{display:"flex",flexWrap:"wrap",[it]:{flex:"none",marginInlineEnd:Ae.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${it}-label,
|
|
|
> ${it}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${it}-label`]:{flex:"none"},[`${We}-text`]:{display:"inline-block"},[`${it}-has-feedback`]:{display:"inline-block"}}}}},Ee=Ae=>({padding:Ae.verticalLabelPadding,margin:Ae.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),be=Ae=>{const{componentCls:We,formItemCls:it,rootPrefixCls:xt}=Ae;return{[`${it} ${it}-label`]:Ee(Ae),[We]:{[it]:{flexWrap:"wrap",[`${it}-label, ${it}-control`]:{[`&:not([class*=" ${xt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Re=Ae=>{const{componentCls:We,formItemCls:it,rootPrefixCls:xt}=Ae;return{[`${We}-vertical`]:{[it]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${We}-item-control`]:{width:"100%"}}},[`${We}-vertical ${it}-label,
|
|
|
.${xt}-col-24${it}-label,
|
|
|
.${xt}-col-xl-24${it}-label`]:Ee(Ae),[`@media (max-width: ${Ae.screenXSMax}px)`]:[be(Ae),{[We]:{[`.${xt}-col-xs-24${it}-label`]:Ee(Ae)}}],[`@media (max-width: ${Ae.screenSMMax}px)`]:{[We]:{[`.${xt}-col-sm-24${it}-label`]:Ee(Ae)}},[`@media (max-width: ${Ae.screenMDMax}px)`]:{[We]:{[`.${xt}-col-md-24${it}-label`]:Ee(Ae)}},[`@media (max-width: ${Ae.screenLGMax}px)`]:{[We]:{[`.${xt}-col-lg-24${it}-label`]:Ee(Ae)}}}},De=(Ae,We)=>(0,me.TS)(Ae,{formItemCls:`${Ae.componentCls}-item`,rootPrefixCls:We});var et=(0,se.Z)("Form",(Ae,We)=>{let{rootPrefixCls:it}=We;const xt=De(Ae,it);return[Fe(xt),$e(xt),_e(xt),Te(xt),ze(xt),Re(xt),(0,he.Z)(xt),de.kr]},Ae=>({labelRequiredMarkColor:Ae.colorError,labelColor:Ae.colorTextHeading,labelFontSize:Ae.fontSize,labelHeight:Ae.controlHeight,labelColonMarginInlineStart:Ae.marginXXS/2,labelColonMarginInlineEnd:Ae.marginXS,itemMarginBottom:Ae.marginLG,verticalLabelPadding:`0 0 ${Ae.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ye=[];function dt(Ae,We,it){let xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ae=="string"?Ae:`${We}-${xt}`,error:Ae,errorStatus:it}}var zt=Ae=>{let{help:We,helpStatus:it,errors:xt=Ye,warnings:Ft=Ye,className:an,fieldId:Rn,onVisibleChanged:mr}=Ae;const{prefixCls:or}=ce.useContext(ae.Rk),cr=`${or}-item-explain`,[,Xn]=et(or),br=(0,ce.useMemo)(()=>(0,fe.Z)(or),[or]),_r=le(xt),mn=le(Ft),$n=ce.useMemo(()=>We!=null?[dt(We,"help",it)]:[].concat((0,te.Z)(_r.map((qr,Ir)=>dt(qr,"error","error",Ir))),(0,te.Z)(mn.map((qr,Ir)=>dt(qr,"warning","warning",Ir)))),[We,it,_r,mn]),Vr={};return Rn&&(Vr.id=`${Rn}_help`),ce.createElement(Ce.default,{motionDeadline:br.motionDeadline,motionName:`${or}-show-help`,visible:!!$n.length,onVisibleChanged:mr},qr=>{const{className:Ir,style:hi}=qr;return ce.createElement("div",Object.assign({},Vr,{className:Le()(cr,Ir,an,Xn),style:hi,role:"alert"}),ce.createElement(Ce.CSSMotionList,Object.assign({keys:$n},(0,fe.Z)(or),{motionName:`${or}-show-help-item`,component:!1}),Ni=>{const{key:yr,error:bi,errorStatus:ar,className:fo,style:qi}=Ni;return ce.createElement("div",{key:yr,className:Le()(fo,{[`${cr}-${ar}`]:ar}),style:qi},bi)}))})},pt=ee(58083),Kt=ee(53124),Ze=ee(98866),tt=ee(97647),ft=ee(98675),Ut=ee(17423);const nt=["parentNode"],Ge="form_item";function jt(Ae){return Ae===void 0||Ae===!1?[]:Array.isArray(Ae)?Ae:[Ae]}function yn(Ae,We){if(!Ae.length)return;const it=Ae.join("_");return We?`${We}_${it}`:nt.includes(it)?`${Ge}_${it}`:it}function ln(Ae,We,it,xt,Ft,an){let Rn=xt;return an!==void 0?Rn=an:it.validating?Rn="validating":Ae.length?Rn="error":We.length?Rn="warning":(it.touched||Ft&&it.validated)&&(Rn="success"),Rn}function Tt(Ae){return jt(Ae).join("_")}function Lt(Ae){const[We]=(0,pt.useForm)(),it=ce.useRef({}),xt=ce.useMemo(()=>Ae!=null?Ae:Object.assign(Object.assign({},We),{__INTERNAL__:{itemRef:Ft=>an=>{const Rn=Tt(Ft);an?it.current[Rn]=an:delete it.current[Rn]}},scrollToField:function(Ft){let an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Rn=jt(Ft),mr=yn(Rn,xt.__INTERNAL__.name),or=mr?document.getElementById(mr):null;or&&(0,Ut.Z)(or,Object.assign({scrollMode:"if-needed",block:"nearest"},an))},getFieldInstance:Ft=>{const an=Tt(Ft);return it.current[an]}}),[Ae,We]);return[xt]}var Jt=ee(37920),kn=function(Ae,We){var it={};for(var xt in Ae)Object.prototype.hasOwnProperty.call(Ae,xt)&&We.indexOf(xt)<0&&(it[xt]=Ae[xt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,xt=Object.getOwnPropertySymbols(Ae);Ft<xt.length;Ft++)We.indexOf(xt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,xt[Ft])&&(it[xt[Ft]]=Ae[xt[Ft]]);return it};const In=(Ae,We)=>{const it=ce.useContext(Ze.Z),{getPrefixCls:xt,direction:Ft,form:an}=ce.useContext(Kt.E_),{prefixCls:Rn,className:mr,rootClassName:or,size:cr,disabled:Xn=it,form:br,colon:_r,labelAlign:mn,labelWrap:$n,labelCol:Vr,wrapperCol:qr,hideRequiredMark:Ir,layout:hi="horizontal",scrollToFirstError:Ni,requiredMark:yr,onFinishFailed:bi,name:ar,style:fo,feedbackIcons:qi}=Ae,ua=kn(Ae,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Jo=(0,ft.Z)(cr),bo=ce.useContext(Jt.Z),oo=(0,ce.useMemo)(()=>yr!==void 0?yr:an&&an.requiredMark!==void 0?an.requiredMark:!Ir,[Ir,yr,an]),na=_r!=null?_r:an==null?void 0:an.colon,Eo=xt("form",Rn),[ra,ea]=et(Eo),Ho=Le()(Eo,`${Eo}-${hi}`,{[`${Eo}-hide-required-mark`]:oo===!1,[`${Eo}-rtl`]:Ft==="rtl",[`${Eo}-${Jo}`]:Jo},ea,an==null?void 0:an.className,mr,or),[No]=Lt(br),{__INTERNAL__:Ba}=No;Ba.name=ar;const Wa=(0,ce.useMemo)(()=>({name:ar,labelAlign:mn,labelCol:Vr,labelWrap:$n,wrapperCol:qr,vertical:hi==="vertical",colon:na,requiredMark:oo,itemRef:Ba.itemRef,form:No,feedbackIcons:qi}),[ar,mn,Vr,qr,hi,na,oo,No,qi]);ce.useImperativeHandle(We,()=>No);const Ia=(pn,sn)=>{if(pn){let Hn={block:"nearest"};typeof pn=="object"&&(Hn=pn),No.scrollToField(sn,Hn)}},Ao=pn=>{if(bi==null||bi(pn),pn.errorFields.length){const sn=pn.errorFields[0].name;if(Ni!==void 0){Ia(Ni,sn);return}an&&an.scrollToFirstError!==void 0&&Ia(an.scrollToFirstError,sn)}};return ra(ce.createElement(Ze.n,{disabled:Xn},ce.createElement(tt.q,{size:Jo},ce.createElement(ae.RV,Object.assign({},{validateMessages:bo}),ce.createElement(ae.q3.Provider,{value:Wa},ce.createElement(pt.default,Object.assign({id:ar},ua,{name:ar,onFinishFailed:Ao,form:No,style:Object.assign(Object.assign({},an==null?void 0:an.style),fo),className:Ho})))))))};var Mn=ce.forwardRef(In),Wn=ee(9475),zn=ee(17799),at=ee(96159),Oe=ee(37419);function ke(Ae){if(typeof Ae=="function")return Ae;const We=(0,Oe.Z)(Ae);return We.length<=1?We[0]:We}const Be=()=>{const{status:Ae,errors:We=[],warnings:it=[]}=(0,ce.useContext)(ae.aM);return{status:Ae,errors:We,warnings:it}};Be.Context=ae.aM;var Ne=Be,we=ee(96523);function rt(Ae){const[We,it]=ce.useState(Ae),xt=(0,ce.useRef)(null),Ft=(0,ce.useRef)([]),an=(0,ce.useRef)(!1);ce.useEffect(()=>(an.current=!1,()=>{an.current=!0,we.Z.cancel(xt.current),xt.current=null}),[]);function Rn(mr){an.current||(xt.current===null&&(Ft.current=[],xt.current=(0,we.Z)(()=>{xt.current=null,it(or=>{let cr=or;return Ft.current.forEach(Xn=>{cr=Xn(cr)}),cr})})),Ft.current.push(mr))}return[We,Rn]}function It(){const{itemRef:Ae}=ce.useContext(ae.q3),We=ce.useRef({});function it(xt,Ft){const an=Ft&&typeof Ft=="object"&&Ft.ref,Rn=xt.join("_");return(We.current.name!==Rn||We.current.originRef!==an)&&(We.current.name=Rn,We.current.originRef=an,We.current.ref=(0,zn.sQ)(Ae(xt),an)),We.current.ref}return it}var Ct=ee(48130),$t=ee(14075),Vt=ee(10366),wt=ee(92820),on=ee(21584);const Dt=Ae=>{const{formItemCls:We}=Ae;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${We}-control`]:{display:"flex"}}}};var Xt=(0,se.b)(["Form","item-item"],(Ae,We)=>{let{rootPrefixCls:it}=We;const xt=De(Ae,it);return[Dt(xt)]}),bn=Ae=>{const{prefixCls:We,status:it,wrapperCol:xt,children:Ft,errors:an,warnings:Rn,_internalItemRender:mr,extra:or,help:cr,fieldId:Xn,marginBottom:br,onErrorVisibleChanged:_r}=Ae,mn=`${We}-item`,$n=ce.useContext(ae.q3),Vr=xt||$n.wrapperCol||{},qr=Le()(`${mn}-control`,Vr.className),Ir=ce.useMemo(()=>Object.assign({},$n),[$n]);delete Ir.labelCol,delete Ir.wrapperCol;const hi=ce.createElement("div",{className:`${mn}-control-input`},ce.createElement("div",{className:`${mn}-control-input-content`},Ft)),Ni=ce.useMemo(()=>({prefixCls:We,status:it}),[We,it]),yr=br!==null||an.length||Rn.length?ce.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ce.createElement(ae.Rk.Provider,{value:Ni},ce.createElement(zt,{fieldId:Xn,errors:an,warnings:Rn,help:cr,helpStatus:it,className:`${mn}-explain-connected`,onVisibleChanged:_r})),!!br&&ce.createElement("div",{style:{width:0,height:br}})):null,bi={};Xn&&(bi.id=`${Xn}_extra`);const ar=or?ce.createElement("div",Object.assign({},bi,{className:`${mn}-extra`}),or):null,fo=mr&&mr.mark==="pro_table_render"&&mr.render?mr.render(Ae,{input:hi,errorList:yr,extra:ar}):ce.createElement(ce.Fragment,null,hi,yr,ar);return ce.createElement(ae.q3.Provider,{value:Ir},ce.createElement(on.Z,Object.assign({},Vr,{className:qr}),fo),ce.createElement(Xt,{prefixCls:We}))},en=ee(17663),Zn=ee(24457),Yn=ee(10110),pr=ee(83062),ti=function(Ae,We){var it={};for(var xt in Ae)Object.prototype.hasOwnProperty.call(Ae,xt)&&We.indexOf(xt)<0&&(it[xt]=Ae[xt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,xt=Object.getOwnPropertySymbols(Ae);Ft<xt.length;Ft++)We.indexOf(xt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,xt[Ft])&&(it[xt[Ft]]=Ae[xt[Ft]]);return it};function Pn(Ae){return Ae?typeof Ae=="object"&&!ce.isValidElement(Ae)?Ae:{title:Ae}:null}var Br=Ae=>{let{prefixCls:We,label:it,htmlFor:xt,labelCol:Ft,labelAlign:an,colon:Rn,required:mr,requiredMark:or,tooltip:cr}=Ae;var Xn;const[br]=(0,Yn.Z)("Form"),{vertical:_r,labelAlign:mn,labelCol:$n,labelWrap:Vr,colon:qr}=ce.useContext(ae.q3);if(!it)return null;const Ir=Ft||$n||{},hi=an||mn,Ni=`${We}-item-label`,yr=Le()(Ni,hi==="left"&&`${Ni}-left`,Ir.className,{[`${Ni}-wrap`]:!!Vr});let bi=it;const ar=Rn===!0||qr!==!1&&Rn!==!1;ar&&!_r&&typeof it=="string"&&it.trim()!==""&&(bi=it.replace(/[:|:]\s*$/,""));const qi=Pn(cr);if(qi){const{icon:oo=ce.createElement(en.Z,null)}=qi,na=ti(qi,["icon"]),Eo=ce.createElement(pr.Z,Object.assign({},na),ce.cloneElement(oo,{className:`${We}-item-tooltip`,title:""}));bi=ce.createElement(ce.Fragment,null,bi,Eo)}const ua=or==="optional",Jo=typeof or=="function";Jo?bi=or(bi,{required:!!mr}):ua&&!mr&&(bi=ce.createElement(ce.Fragment,null,bi,ce.createElement("span",{className:`${We}-item-optional`,title:""},(br==null?void 0:br.optional)||((Xn=Zn.Z.Form)===null||Xn===void 0?void 0:Xn.optional))));const bo=Le()({[`${We}-item-required`]:mr,[`${We}-item-required-mark-optional`]:ua||Jo,[`${We}-item-no-colon`]:!ar});return ce.createElement(on.Z,Object.assign({},Ir,{className:yr}),ce.createElement("label",{htmlFor:xt,className:bo,title:typeof it=="string"?it:""},bi))},Di=ee(87725),mi=ee(16646),ci=ee(87995),Fr=ee(3407);const zr={success:Di.Z,warning:ci.Z,error:mi.Z,validating:Fr.Z};function Fi(Ae){let{children:We,errors:it,warnings:xt,hasFeedback:Ft,validateStatus:an,prefixCls:Rn,meta:mr,noStyle:or}=Ae;const cr=`${Rn}-item`,{feedbackIcons:Xn}=ce.useContext(ae.q3),br=ln(it,xt,mr,null,!!Ft,an),{isFormItemInput:_r,status:mn}=ce.useContext(ae.aM),$n=ce.useMemo(()=>{var Vr;let qr;if(Ft){const Ni=Ft!==!0&&Ft.icons||Xn,yr=br&&((Vr=Ni==null?void 0:Ni({status:br,errors:it,warnings:xt}))===null||Vr===void 0?void 0:Vr[br]),bi=br&&zr[br];qr=yr!==!1&&bi?ce.createElement("span",{className:Le()(`${cr}-feedback-icon`,`${cr}-feedback-icon-${br}`)},yr||ce.createElement(bi,null)):null}let Ir=!0,hi=br||"";return or&&(Ir=_r,hi=(br!=null?br:mn)||""),{status:hi,errors:it,warnings:xt,hasFeedback:!!Ft,feedbackIcon:qr,isFormItemInput:Ir}},[br,Ft,or,_r,mn]);return ce.createElement(ae.aM.Provider,{value:$n},We)}var ko=function(Ae,We){var it={};for(var xt in Ae)Object.prototype.hasOwnProperty.call(Ae,xt)&&We.indexOf(xt)<0&&(it[xt]=Ae[xt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,xt=Object.getOwnPropertySymbols(Ae);Ft<xt.length;Ft++)We.indexOf(xt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,xt[Ft])&&(it[xt[Ft]]=Ae[xt[Ft]]);return it};function aa(Ae){const{prefixCls:We,className:it,rootClassName:xt,style:Ft,help:an,errors:Rn,warnings:mr,validateStatus:or,meta:cr,hasFeedback:Xn,hidden:br,children:_r,fieldId:mn,required:$n,isRequired:Vr,onSubItemMetaChange:qr}=Ae,Ir=ko(Ae,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),hi=`${We}-item`,{requiredMark:Ni}=ce.useContext(ae.q3),yr=ce.useRef(null),bi=le(Rn),ar=le(mr),fo=an!=null,qi=!!(fo||Rn.length||mr.length),ua=!!yr.current&&(0,Ct.Z)(yr.current),[Jo,bo]=ce.useState(null);(0,$t.Z)(()=>{if(qi&&yr.current){const ea=getComputedStyle(yr.current);bo(parseInt(ea.marginBottom,10))}},[qi,ua]);const oo=ea=>{ea||bo(null)},Eo=function(){let ea=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ho=ea?bi:cr.errors,No=ea?ar:cr.warnings;return ln(Ho,No,cr,"",!!Xn,or)}(),ra=Le()(hi,it,xt,{[`${hi}-with-help`]:fo||bi.length||ar.length,[`${hi}-has-feedback`]:Eo&&Xn,[`${hi}-has-success`]:Eo==="success",[`${hi}-has-warning`]:Eo==="warning",[`${hi}-has-error`]:Eo==="error",[`${hi}-is-validating`]:Eo==="validating",[`${hi}-hidden`]:br});return ce.createElement("div",{className:ra,style:Ft,ref:yr},ce.createElement(wt.Z,Object.assign({className:`${hi}-row`},(0,Vt.Z)(Ir,["_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"])),ce.createElement(Br,Object.assign({htmlFor:mn},Ae,{requiredMark:Ni,required:$n!=null?$n:Vr,prefixCls:We})),ce.createElement(bn,Object.assign({},Ae,cr,{errors:bi,warnings:ar,prefixCls:We,status:Eo,help:an,marginBottom:Jo,onErrorVisibleChanged:oo}),ce.createElement(ae.qI.Provider,{value:qr},ce.createElement(Fi,{prefixCls:We,meta:cr,errors:cr.errors,warnings:cr.warnings,hasFeedback:Xn,validateStatus:Eo},_r)))),!!Jo&&ce.createElement("div",{className:`${hi}-margin-offset`,style:{marginBottom:-Jo}}))}const Wo="__SPLIT__",li=null,rn=ce.memo(Ae=>{let{children:We}=Ae;return We},(Ae,We)=>Ae.value===We.value&&Ae.update===We.update&&Ae.childProps.length===We.childProps.length&&Ae.childProps.every((it,xt)=>it===We.childProps[xt]));function nr(Ae){return Ae!=null}function dr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function rr(Ae){const{name:We,noStyle:it,className:xt,dependencies:Ft,prefixCls:an,shouldUpdate:Rn,rules:mr,children:or,required:cr,label:Xn,messageVariables:br,trigger:_r="onChange",validateTrigger:mn,hidden:$n,help:Vr}=Ae,{getPrefixCls:qr}=ce.useContext(Kt.E_),{name:Ir}=ce.useContext(ae.q3),hi=ke(or),Ni=typeof hi=="function",yr=ce.useContext(ae.qI),{validateTrigger:bi}=ce.useContext(pt.FieldContext),ar=mn!==void 0?mn:bi,fo=nr(We),qi=qr("form",an),[ua,Jo]=et(qi),bo=ce.useContext(pt.ListContext),oo=ce.useRef(),[na,Eo]=rt({}),[ra,ea]=(0,Wn.Z)(()=>dr()),Ho=sn=>{const Hn=bo==null?void 0:bo.getKey(sn.name);if(ea(sn.destroy?dr():sn,!0),it&&Vr!==!1&&yr){let lr=sn.name;if(sn.destroy)lr=oo.current||lr;else if(Hn!==void 0){const[Cr,vi]=Hn;lr=[Cr].concat((0,te.Z)(vi)),oo.current=lr}yr(sn,lr)}},No=(sn,Hn)=>{Eo(lr=>{const Cr=Object.assign({},lr),_i=[].concat((0,te.Z)(sn.name.slice(0,-1)),(0,te.Z)(Hn)).join(Wo);return sn.destroy?delete Cr[_i]:Cr[_i]=sn,Cr})},[Ba,Wa]=ce.useMemo(()=>{const sn=(0,te.Z)(ra.errors),Hn=(0,te.Z)(ra.warnings);return Object.values(na).forEach(lr=>{sn.push.apply(sn,(0,te.Z)(lr.errors||[])),Hn.push.apply(Hn,(0,te.Z)(lr.warnings||[]))}),[sn,Hn]},[na,ra.errors,ra.warnings]),Ia=It();function Ao(sn,Hn,lr){return it&&!$n?ce.createElement(Fi,{prefixCls:qi,hasFeedback:Ae.hasFeedback,validateStatus:Ae.validateStatus,meta:ra,errors:Ba,warnings:Wa,noStyle:!0},sn):ce.createElement(aa,Object.assign({key:"row"},Ae,{className:Le()(xt,Jo),prefixCls:qi,fieldId:Hn,isRequired:lr,errors:Ba,warnings:Wa,meta:ra,onSubItemMetaChange:No}),sn)}if(!fo&&!Ni&&!Ft)return ua(Ao(hi));let pn={};return typeof Xn=="string"?pn.label=Xn:We&&(pn.label=String(We)),br&&(pn=Object.assign(Object.assign({},pn),br)),ua(ce.createElement(pt.Field,Object.assign({},Ae,{messageVariables:pn,trigger:_r,validateTrigger:ar,onMetaChange:Ho}),(sn,Hn,lr)=>{const Cr=jt(We).length&&Hn?Hn.name:[],vi=yn(Cr,Ir),_i=cr!==void 0?cr:!!(mr&&mr.some(Ci=>{if(Ci&&typeof Ci=="object"&&Ci.required&&!Ci.warningOnly)return!0;if(typeof Ci=="function"){const _o=Ci(lr);return _o&&_o.required&&!_o.warningOnly}return!1})),ji=Object.assign({},sn);let Xi=null;if(Array.isArray(hi)&&fo)Xi=hi;else if(!(Ni&&(!(Rn||Ft)||fo))){if(!(Ft&&!Ni&&!fo))if((0,at.l$)(hi)){const Ci=Object.assign(Object.assign({},hi.props),ji);if(Ci.id||(Ci.id=vi),Vr||Ba.length>0||Wa.length>0||Ae.extra){const Ko=[];(Vr||Ba.length>0)&&Ko.push(`${vi}_help`),Ae.extra&&Ko.push(`${vi}_extra`),Ci["aria-describedby"]=Ko.join(" ")}Ba.length>0&&(Ci["aria-invalid"]="true"),_i&&(Ci["aria-required"]="true"),(0,zn.Yr)(hi)&&(Ci.ref=Ia(Cr,hi)),new Set([].concat((0,te.Z)(jt(_r)),(0,te.Z)(jt(ar)))).forEach(Ko=>{Ci[Ko]=function(){for(var Tn,Bn,Qn,He,lt,ut=arguments.length,gt=new Array(ut),yt=0;yt<ut;yt++)gt[yt]=arguments[yt];(Qn=ji[Ko])===null||Qn===void 0||(Tn=Qn).call.apply(Tn,[ji].concat(gt)),(lt=(He=hi.props)[Ko])===null||lt===void 0||(Bn=lt).call.apply(Bn,[He].concat(gt))}});const To=[Ci["aria-required"],Ci["aria-invalid"],Ci["aria-describedby"]];Xi=ce.createElement(rn,{value:ji[Ae.valuePropName||"value"],update:hi,childProps:To},(0,at.Tm)(hi,Ci))}else Ni&&(Rn||Ft)&&!fo?Xi=hi(lr):Xi=hi}return Ao(Xi,vi,_i)}))}const Jr=rr;Jr.useStatus=Ne;var Ar=Jr,Mr=function(Ae,We){var it={};for(var xt in Ae)Object.prototype.hasOwnProperty.call(Ae,xt)&&We.indexOf(xt)<0&&(it[xt]=Ae[xt]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,xt=Object.getOwnPropertySymbols(Ae);Ft<xt.length;Ft++)We.indexOf(xt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Ae,xt[Ft])&&(it[xt[Ft]]=Ae[xt[Ft]]);return it},Zt=Ae=>{var{prefixCls:We,children:it}=Ae,xt=Mr(Ae,["prefixCls","children"]);const{getPrefixCls:Ft}=ce.useContext(Kt.E_),an=Ft("form",We),Rn=ce.useMemo(()=>({prefixCls:an,status:"error"}),[an]);return ce.createElement(pt.List,Object.assign({},xt),(mr,or,cr)=>ce.createElement(ae.Rk.Provider,{value:Rn},it(mr.map(Xn=>Object.assign(Object.assign({},Xn),{fieldKey:Xn.key})),or,{errors:cr.errors,warnings:cr.warnings})))};function Ot(){const{form:Ae}=(0,ce.useContext)(ae.q3);return Ae}const ge=Mn;ge.Item=Ar,ge.List=Zt,ge.ErrorList=zt,ge.useForm=Lt,ge.useFormInstance=Ot,ge.useWatch=pt.useWatch,ge.Provider=ae.RV,ge.create=()=>{};var Ie=ge},25378:function(dn,St,ee){"use strict";var te=ee(67294),Se=ee(14075),Le=ee(57838),Ce=ee(74443);function ce(){let fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ae=(0,te.useRef)({}),le=(0,Le.Z)(),re=(0,Ce.ZP)();return(0,Se.Z)(()=>{const de=re.subscribe(he=>{ae.current=he,fe&&le()});return()=>re.unsubscribe(de)},[]),ae.current}St.Z=ce},99398:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return fr}});var te=ee(67294),Se=ee.t(te,2),Le=ee(99569),Ce=ee(94184),ce=ee.n(Ce),fe=ee(87462),ae=ee(1413),le=ee(4942),re=ee(97685),de=ee(71002),he=ee(45987),me=/margin|padding|width|height|max|min|offset/,se={left:!0,top:!0},ye={cssFloat:1,styleFloat:1,float:1};function _e(_t){return _t.nodeType===1?_t.ownerDocument.defaultView.getComputedStyle(_t,null):{}}function Me(_t,vt,Xe){if(vt=vt.toLowerCase(),Xe==="auto"){if(vt==="height")return _t.offsetHeight;if(vt==="width")return _t.offsetWidth}return vt in se||(se[vt]=me.test(vt)),se[vt]?parseFloat(Xe)||0:Xe}function ve(_t,vt){var Xe=arguments.length,ot=_e(_t);return vt=ye[vt]?"cssFloat"in _t.style?"cssFloat":"styleFloat":vt,Xe===1?ot:Me(_t,vt,ot[vt]||_t.style[vt])}function Fe(_t,vt,Xe){var ot=arguments.length;if(vt=ye[vt]?"cssFloat"in _t.style?"cssFloat":"styleFloat":vt,ot===3)return typeof Xe=="number"&&me.test(vt)&&(Xe="".concat(Xe,"px")),_t.style[vt]=Xe,Xe;for(var Nt in vt)vt.hasOwnProperty(Nt)&&Fe(_t,Nt,vt[Nt]);return _e(_t)}function $e(_t){return _t===document.body?document.documentElement.clientWidth:_t.offsetWidth}function Te(_t){return _t===document.body?window.innerHeight||document.documentElement.clientHeight:_t.offsetHeight}function ze(){var _t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),vt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:_t,height:vt}}function Ee(){var _t=document.documentElement.clientWidth,vt=window.innerHeight||document.documentElement.clientHeight;return{width:_t,height:vt}}function be(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Re(_t){var vt=_t.getBoundingClientRect(),Xe=document.documentElement;return{left:vt.left+(window.pageXOffset||Xe.scrollLeft)-(Xe.clientLeft||document.body.clientLeft||0),top:vt.top+(window.pageYOffset||Xe.scrollTop)-(Xe.clientTop||document.body.clientTop||0)}}function De(_t){var vt=te.useRef();vt.current=_t;var Xe=te.useCallback(function(){for(var ot,Nt=arguments.length,Pt=new Array(Nt),qt=0;qt<Nt;qt++)Pt[qt]=arguments[qt];return(ot=vt.current)===null||ot===void 0?void 0:ot.call.apply(ot,[vt].concat(Pt))},[]);return Xe}function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ye=et()?te.useLayoutEffect:te.useEffect,dt=function(vt,Xe){var ot=te.useRef(!0);Ye(function(){return vt(ot.current)},Xe),Ye(function(){return ot.current=!1,function(){ot.current=!0}},[])},Ke=function(vt,Xe){dt(function(ot){if(!ot)return vt()},Xe)},zt=null;function pt(_t){var vt=te.useRef(!1),Xe=te.useState(_t),ot=(0,re.Z)(Xe,2),Nt=ot[0],Pt=ot[1];te.useEffect(function(){return vt.current=!1,function(){vt.current=!0}},[]);function qt(hn,gn){gn&&vt.current||Pt(hn)}return[Nt,qt]}function Kt(_t){return _t!==void 0}function Ze(_t,vt){var Xe=vt||{},ot=Xe.defaultValue,Nt=Xe.value,Pt=Xe.onChange,qt=Xe.postState,hn=pt(function(){return Kt(Nt)?Nt:Kt(ot)?typeof ot=="function"?ot():ot:typeof _t=="function"?_t():_t}),gn=(0,re.Z)(hn,2),Nn=gn[0],On=gn[1],vn=Nt!==void 0?Nt:Nn,Fn=qt?qt(vn):vn,Gn=De(Pt),xr=pt([vn]),sr=(0,re.Z)(xr,2),Lr=sr[0],Ur=sr[1];Ke(function(){var Qr=Lr[0];Nn!==Qr&&Gn(Nn,Qr)},[Lr]),Ke(function(){Kt(Nt)||On(Nt)},[Nt]);var Pr=De(function(Qr,Tr){On(Qr,Tr),Ur([vn],Tr)});return[Fn,Pr]}var tt=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],ft=te.createContext(null),Ut=0;function nt(_t,vt){var Xe=te.useState(function(){return Ut+=1,String(Ut)}),ot=(0,re.Z)(Xe,1),Nt=ot[0],Pt=te.useContext(ft),qt={data:vt,canPreview:_t};return te.useEffect(function(){if(Pt)return Pt.register(Nt,qt)},[]),te.useEffect(function(){Pt&&Pt.register(Nt,qt)},[_t,vt]),Nt}function Ge(_t){return new Promise(function(vt){var Xe=document.createElement("img");Xe.onerror=function(){return vt(!1)},Xe.onload=function(){return vt(!0)},Xe.src=_t})}function jt(_t){var vt=_t.src,Xe=_t.isCustomPlaceholder,ot=_t.fallback,Nt=(0,te.useState)(Xe?"loading":"normal"),Pt=(0,re.Z)(Nt,2),qt=Pt[0],hn=Pt[1],gn=(0,te.useRef)(!1),Nn=qt==="error";(0,te.useEffect)(function(){Ge(vt).then(function(Gn){Gn||hn("error")})},[vt]),(0,te.useEffect)(function(){Xe&&!gn.current?hn("loading"):Nn&&hn("normal")},[vt]);var On=function(){hn("normal")},vn=function(xr){gn.current=!1,qt==="loading"&&xr!=null&&xr.complete&&(xr.naturalWidth||xr.naturalHeight)&&(gn.current=!0,On())},Fn=Nn&&ot?{src:ot}:{onLoad:On,src:vt};return[vn,Fn,qt]}var yn=ee(2788),ln=te.createContext({});function Tt(_t,vt){if(!_t)return!1;if(_t.contains)return _t.contains(vt);for(var Xe=vt;Xe;){if(Xe===_t)return!0;Xe=Xe.parentNode}return!1}function Lt(){var _t=(0,ae.Z)({},Se);return _t.useId}var Jt=0;function kn(){}function In(_t){var vt=te.useState("ssr-id"),Xe=(0,re.Z)(vt,2),ot=Xe[0],Nt=Xe[1],Pt=Lt(),qt=Pt==null?void 0:Pt();return te.useEffect(function(){if(!Pt){var hn=Jt;Jt+=1,Nt("rc_unique_".concat(hn))}},[]),_t||qt||ot}var Qt={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(vt){var Xe=vt.keyCode;if(vt.altKey&&!vt.ctrlKey||vt.metaKey||Xe>=Qt.F1&&Xe<=Qt.F12)return!1;switch(Xe){case Qt.ALT:case Qt.CAPS_LOCK:case Qt.CONTEXT_MENU:case Qt.CTRL:case Qt.DOWN:case Qt.END:case Qt.ESC:case Qt.HOME:case Qt.INSERT:case Qt.LEFT:case Qt.MAC_FF_META:case Qt.META:case Qt.NUMLOCK:case Qt.NUM_CENTER:case Qt.PAGE_DOWN:case Qt.PAGE_UP:case Qt.PAUSE:case Qt.PRINT_SCREEN:case Qt.RIGHT:case Qt.SHIFT:case Qt.UP:case Qt.WIN_KEY:case Qt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(vt){if(vt>=Qt.ZERO&&vt<=Qt.NINE||vt>=Qt.NUM_ZERO&&vt<=Qt.NUM_MULTIPLY||vt>=Qt.A&&vt<=Qt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&vt===0)return!0;switch(vt){case Qt.SPACE:case Qt.QUESTION_MARK:case Qt.NUM_PLUS:case Qt.NUM_MINUS:case Qt.NUM_PERIOD:case Qt.NUM_DIVISION:case Qt.SEMICOLON:case Qt.DASH:case Qt.EQUALS:case Qt.COMMA:case Qt.PERIOD:case Qt.SLASH:case Qt.APOSTROPHE:case Qt.SINGLE_QUOTE:case Qt.OPEN_SQUARE_BRACKET:case Qt.BACKSLASH:case Qt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Mn=Qt,Wn=`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`,at="".concat(Wn," ").concat(zn).split(/[\s\n]+/),Oe="aria-",ke="data-";function Be(_t,vt){return _t.indexOf(vt)===0}function Ne(_t){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xe;vt===!1?Xe={aria:!0,data:!0,attr:!0}:vt===!0?Xe={aria:!0}:Xe=(0,ae.Z)({},vt);var ot={};return Object.keys(_t).forEach(function(Nt){(Xe.aria&&(Nt==="role"||Be(Nt,Oe))||Xe.data&&Be(Nt,ke)||Xe.attr&&at.includes(Nt))&&(ot[Nt]=_t[Nt])}),ot}function we(_t,vt,Xe){var ot=vt;return!ot&&Xe&&(ot="".concat(_t,"-").concat(Xe)),ot}function rt(_t,vt){var Xe=_t["page".concat(vt?"Y":"X","Offset")],ot="scroll".concat(vt?"Top":"Left");if(typeof Xe!="number"){var Nt=_t.document;Xe=Nt.documentElement[ot],typeof Xe!="number"&&(Xe=Nt.body[ot])}return Xe}function It(_t){var vt=_t.getBoundingClientRect(),Xe={left:vt.left,top:vt.top},ot=_t.ownerDocument,Nt=ot.defaultView||ot.parentWindow;return Xe.left+=rt(Nt),Xe.top+=rt(Nt,!0),Xe}var Ct=ee(62874),$t=ee(59864);function Vt(_t,vt,Xe){var ot=te.useRef({});return(!("value"in ot.current)||Xe(ot.current.condition,vt))&&(ot.current.value=_t(),ot.current.condition=vt),ot.current.value}function wt(_t,vt){typeof _t=="function"?_t(vt):(0,de.Z)(_t)==="object"&&_t&&"current"in _t&&(_t.current=vt)}function on(){for(var _t=arguments.length,vt=new Array(_t),Xe=0;Xe<_t;Xe++)vt[Xe]=arguments[Xe];var ot=vt.filter(function(Nt){return Nt});return ot.length<=1?ot[0]:function(Nt){vt.forEach(function(Pt){wt(Pt,Nt)})}}function Dt(){for(var _t=arguments.length,vt=new Array(_t),Xe=0;Xe<_t;Xe++)vt[Xe]=arguments[Xe];return Vt(function(){return on.apply(void 0,vt)},vt,function(ot,Nt){return ot.length===Nt.length&&ot.every(function(Pt,qt){return Pt===Nt[qt]})})}function Xt(_t){var vt,Xe,ot=isMemo(_t)?_t.type.type:_t.type;return!(typeof ot=="function"&&!((vt=ot.prototype)!==null&&vt!==void 0&&vt.render)||typeof _t=="function"&&!((Xe=_t.prototype)!==null&&Xe!==void 0&&Xe.render))}var nn=te.memo(function(_t){var vt=_t.children;return vt},function(_t,vt){var Xe=vt.shouldUpdate;return!Xe}),bn={width:0,height:0,overflow:"hidden",outline:"none"},en=te.forwardRef(function(_t,vt){var Xe=_t.prefixCls,ot=_t.className,Nt=_t.style,Pt=_t.title,qt=_t.ariaId,hn=_t.footer,gn=_t.closable,Nn=_t.closeIcon,On=_t.onClose,vn=_t.children,Fn=_t.bodyStyle,Gn=_t.bodyProps,xr=_t.modalRender,sr=_t.onMouseDown,Lr=_t.onMouseUp,Ur=_t.holderRef,Pr=_t.visible,Qr=_t.forceRender,Tr=_t.width,Wr=_t.height,ni=te.useContext(ln),Si=ni.panel,Nr=Dt(Ur,Si),wi=(0,te.useRef)(),gi=(0,te.useRef)();te.useImperativeHandle(vt,function(){return{focus:function(){var zi;(zi=wi.current)===null||zi===void 0||zi.focus()},changeActive:function(zi){var ai=document,ii=ai.activeElement;zi&&ii===gi.current?wi.current.focus():!zi&&ii===wi.current&&gi.current.focus()}}});var vo={};Tr!==void 0&&(vo.width=Tr),Wr!==void 0&&(vo.height=Wr);var Ji;hn&&(Ji=te.createElement("div",{className:"".concat(Xe,"-footer")},hn));var Pi;Pt&&(Pi=te.createElement("div",{className:"".concat(Xe,"-header")},te.createElement("div",{className:"".concat(Xe,"-title"),id:qt},Pt)));var Mi;gn&&(Mi=te.createElement("button",{type:"button",onClick:On,"aria-label":"Close",className:"".concat(Xe,"-close")},Nn||te.createElement("span",{className:"".concat(Xe,"-close-x")})));var Ai=te.createElement("div",{className:"".concat(Xe,"-content")},Mi,Pi,te.createElement("div",(0,fe.Z)({className:"".concat(Xe,"-body"),style:Fn},Gn),vn),Ji);return te.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":Pt?qt:null,"aria-modal":"true",ref:Nr,style:(0,ae.Z)((0,ae.Z)({},Nt),vo),className:ce()(Xe,ot),onMouseDown:sr,onMouseUp:Lr},te.createElement("div",{tabIndex:0,ref:wi,style:bn,"aria-hidden":"true"}),te.createElement(nn,{shouldUpdate:Pr||Qr},xr?xr(Ai):Ai),te.createElement("div",{tabIndex:0,ref:gi,style:bn,"aria-hidden":"true"}))}),Zn=en,Yn=te.forwardRef(function(_t,vt){var Xe=_t.prefixCls,ot=_t.title,Nt=_t.style,Pt=_t.className,qt=_t.visible,hn=_t.forceRender,gn=_t.destroyOnClose,Nn=_t.motionName,On=_t.ariaId,vn=_t.onVisibleChanged,Fn=_t.mousePosition,Gn=(0,te.useRef)(),xr=te.useState(),sr=(0,re.Z)(xr,2),Lr=sr[0],Ur=sr[1],Pr={};Lr&&(Pr.transformOrigin=Lr);function Qr(){var Tr=It(Gn.current);Ur(Fn?"".concat(Fn.x-Tr.left,"px ").concat(Fn.y-Tr.top,"px"):"")}return te.createElement(Ct.Z,{visible:qt,onVisibleChanged:vn,onAppearPrepare:Qr,onEnterPrepare:Qr,forceRender:hn,motionName:Nn,removeOnLeave:gn,ref:Gn},function(Tr,Wr){var ni=Tr.className,Si=Tr.style;return te.createElement(Zn,(0,fe.Z)({},_t,{ref:vt,title:ot,ariaId:On,prefixCls:Xe,holderRef:Wr,style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Si),Nt),Pr),className:ce()(Pt,ni)}))})});Yn.displayName="Content";var pr=Yn;function ti(_t){var vt=_t.prefixCls,Xe=_t.style,ot=_t.visible,Nt=_t.maskProps,Pt=_t.motionName;return te.createElement(Ct.Z,{key:"mask",visible:ot,motionName:Pt,leavedClassName:"".concat(vt,"-mask-hidden")},function(qt,hn){var gn=qt.className,Nn=qt.style;return te.createElement("div",(0,fe.Z)({ref:hn,style:(0,ae.Z)((0,ae.Z)({},Nn),Xe),className:ce()("".concat(vt,"-mask"),gn)},Nt))})}function Pn(_t){var vt=_t.prefixCls,Xe=vt===void 0?"rc-dialog":vt,ot=_t.zIndex,Nt=_t.visible,Pt=Nt===void 0?!1:Nt,qt=_t.keyboard,hn=qt===void 0?!0:qt,gn=_t.focusTriggerAfterClose,Nn=gn===void 0?!0:gn,On=_t.wrapStyle,vn=_t.wrapClassName,Fn=_t.wrapProps,Gn=_t.onClose,xr=_t.afterOpenChange,sr=_t.afterClose,Lr=_t.transitionName,Ur=_t.animation,Pr=_t.closable,Qr=Pr===void 0?!0:Pr,Tr=_t.mask,Wr=Tr===void 0?!0:Tr,ni=_t.maskTransitionName,Si=_t.maskAnimation,Nr=_t.maskClosable,wi=Nr===void 0?!0:Nr,gi=_t.maskStyle,vo=_t.maskProps,Ji=_t.rootClassName,Pi=(0,te.useRef)(),Mi=(0,te.useRef)(),Ai=(0,te.useRef)(),pi=te.useState(Pt),zi=(0,re.Z)(pi,2),ai=zi[0],ii=zi[1],Ui=In();function to(){Tt(Mi.current,document.activeElement)||(Pi.current=document.activeElement)}function la(){if(!Tt(Mi.current,document.activeElement)){var Ki;(Ki=Ai.current)===null||Ki===void 0||Ki.focus()}}function da(Ki){if(Ki)la();else{if(ii(!1),Wr&&Pi.current&&Nn){try{Pi.current.focus({preventScroll:!0})}catch(Io){}Pi.current=null}ai&&(sr==null||sr())}xr==null||xr(Ki)}function So(Ki){Gn==null||Gn(Ki)}var go=(0,te.useRef)(!1),Zi=(0,te.useRef)(),Ii=function(){clearTimeout(Zi.current),go.current=!0},pa=function(){Zi.current=setTimeout(function(){go.current=!1})},io=null;wi&&(io=function(Io){go.current?go.current=!1:Mi.current===Io.target&&So(Io)});function si(Ki){if(hn&&Ki.keyCode===Mn.ESC){Ki.stopPropagation(),So(Ki);return}Pt&&Ki.keyCode===Mn.TAB&&Ai.current.changeActive(!Ki.shiftKey)}return(0,te.useEffect)(function(){Pt&&(ii(!0),to())},[Pt]),(0,te.useEffect)(function(){return function(){clearTimeout(Zi.current)}},[]),te.createElement("div",(0,fe.Z)({className:ce()("".concat(Xe,"-root"),Ji)},Ne(_t,{data:!0})),te.createElement(ti,{prefixCls:Xe,visible:Wr&&Pt,motionName:we(Xe,ni,Si),style:(0,ae.Z)({zIndex:ot},gi),maskProps:vo}),te.createElement("div",(0,fe.Z)({tabIndex:-1,onKeyDown:si,className:ce()("".concat(Xe,"-wrap"),vn),ref:Mi,onClick:io,style:(0,ae.Z)((0,ae.Z)({zIndex:ot},On),{},{display:ai?null:"none"})},Fn),te.createElement(pr,(0,fe.Z)({},_t,{onMouseDown:Ii,onMouseUp:pa,ref:Ai,closable:Qr,ariaId:Ui,prefixCls:Xe,visible:Pt&&ai,onClose:So,onVisibleChanged:da,motionName:we(Xe,Lr,Ur)}))))}var Or=function(vt){var Xe=vt.visible,ot=vt.getContainer,Nt=vt.forceRender,Pt=vt.destroyOnClose,qt=Pt===void 0?!1:Pt,hn=vt.afterClose,gn=vt.panelRef,Nn=te.useState(Xe),On=(0,re.Z)(Nn,2),vn=On[0],Fn=On[1],Gn=te.useMemo(function(){return{panel:gn}},[gn]);return te.useEffect(function(){Xe&&Fn(!0)},[Xe]),!Nt&&qt&&!vn?null:te.createElement(ln.Provider,{value:Gn},te.createElement(yn.Z,{open:Xe||Nt||vn,autoDestroy:!1,getContainer:ot,autoLock:Xe||vn},te.createElement(Pn,(0,fe.Z)({},vt,{destroyOnClose:qt,afterClose:function(){hn==null||hn(),Fn(!1)}}))))};Or.displayName="Dialog";var Br=Or,Di=Br,mi=ee(73935);function ci(_t,vt,Xe,ot){var Nt=mi.unstable_batchedUpdates?function(qt){mi.unstable_batchedUpdates(Xe,qt)}:Xe;return _t!=null&&_t.addEventListener&&_t.addEventListener(vt,Nt,ot),{remove:function(){_t!=null&&_t.removeEventListener&&_t.removeEventListener(vt,Nt,ot)}}}var Fr={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(vt){var Xe=vt.keyCode;if(vt.altKey&&!vt.ctrlKey||vt.metaKey||Xe>=Fr.F1&&Xe<=Fr.F12)return!1;switch(Xe){case Fr.ALT:case Fr.CAPS_LOCK:case Fr.CONTEXT_MENU:case Fr.CTRL:case Fr.DOWN:case Fr.END:case Fr.ESC:case Fr.HOME:case Fr.INSERT:case Fr.LEFT:case Fr.MAC_FF_META:case Fr.META:case Fr.NUMLOCK:case Fr.NUM_CENTER:case Fr.PAGE_DOWN:case Fr.PAGE_UP:case Fr.PAUSE:case Fr.PRINT_SCREEN:case Fr.RIGHT:case Fr.SHIFT:case Fr.UP:case Fr.WIN_KEY:case Fr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(vt){if(vt>=Fr.ZERO&&vt<=Fr.NINE||vt>=Fr.NUM_ZERO&&vt<=Fr.NUM_MULTIPLY||vt>=Fr.A&&vt<=Fr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&vt===0)return!0;switch(vt){case Fr.SPACE:case Fr.QUESTION_MARK:case Fr.NUM_PLUS:case Fr.NUM_MINUS:case Fr.NUM_PERIOD:case Fr.NUM_DIVISION:case Fr.SEMICOLON:case Fr.DASH:case Fr.EQUALS:case Fr.COMMA:case Fr.PERIOD:case Fr.SLASH:case Fr.APOSTROPHE:case Fr.SINGLE_QUOTE:case Fr.OPEN_SQUARE_BRACKET:case Fr.BACKSLASH:case Fr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},zr=Fr,Fi={},ko=[],aa=function(vt){ko.push(vt)};function Wo(_t,vt){if(0)var Xe}function li(_t,vt){if(0)var Xe}function rn(){Fi={}}function nr(_t,vt,Xe){!vt&&!Fi[Xe]&&(_t(!1,Xe),Fi[Xe]=!0)}function dr(_t,vt){nr(Wo,_t,vt)}function rr(_t,vt){nr(li,_t,vt)}dr.preMessage=aa,dr.resetWarned=rn,dr.noteOnce=rr;var Jr=dr;function Ar(_t,vt,Xe,ot){var Nt=vt+Xe,Pt=(Xe-ot)/2;if(Xe>ot){if(vt>0)return(0,le.Z)({},_t,Pt);if(vt<0&&Nt<ot)return(0,le.Z)({},_t,-Pt)}else if(vt<0||Nt>ot)return(0,le.Z)({},_t,vt<0?Pt:-Pt);return{}}function Mr(_t,vt,Xe,ot){var Nt=Ee(),Pt=Nt.width,qt=Nt.height,hn=null;return _t<=Pt&&vt<=qt?hn={x:0,y:0}:(_t>Pt||vt>qt)&&(hn=(0,ae.Z)((0,ae.Z)({},Ar("x",Xe,_t,Pt)),Ar("y",ot,vt,qt))),hn}function tr(_t,vt){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ot=new Set;function Nt(Pt,qt){var hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,gn=ot.has(Pt);if(Jr(!gn,"Warning: There may be circular references"),gn)return!1;if(Pt===qt)return!0;if(Xe&&hn>1)return!1;ot.add(Pt);var Nn=hn+1;if(Array.isArray(Pt)){if(!Array.isArray(qt)||Pt.length!==qt.length)return!1;for(var On=0;On<Pt.length;On++)if(!Nt(Pt[On],qt[On],Nn))return!1;return!0}if(Pt&&qt&&(0,de.Z)(Pt)==="object"&&(0,de.Z)(qt)==="object"){var vn=Object.keys(Pt);return vn.length!==Object.keys(qt).length?!1:vn.every(function(Fn){return Nt(Pt[Fn],qt[Fn],Nn)})}return!1}return Nt(_t,vt)}var Zt=tr,Ot=function(vt){return+setTimeout(vt,16)},ge=function(vt){return clearTimeout(vt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ot=function(vt){return window.requestAnimationFrame(vt)},ge=function(vt){return window.cancelAnimationFrame(vt)});var Ie=0,Ae=new Map;function We(_t){Ae.delete(_t)}var it=function(vt){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ie+=1;var ot=Ie;function Nt(Pt){if(Pt===0)We(ot),vt();else{var qt=Ot(function(){Nt(Pt-1)});Ae.set(ot,qt)}}return Nt(Xe),ot};it.cancel=function(_t){var vt=Ae.get(_t);return We(vt),ge(vt)};var xt=it,Ft={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function an(_t,vt,Xe,ot){var Nt=(0,te.useRef)(null),Pt=(0,te.useRef)([]),qt=(0,te.useState)(Ft),hn=(0,re.Z)(qt,2),gn=hn[0],Nn=hn[1],On=function(xr){Nn(Ft),ot&&!Zt(Ft,gn)&&ot({transform:Ft,action:xr})},vn=function(xr,sr){Nt.current===null&&(Pt.current=[],Nt.current=xt(function(){Nn(function(Lr){var Ur=Lr;return Pt.current.forEach(function(Pr){Ur=(0,ae.Z)((0,ae.Z)({},Ur),Pr)}),Nt.current=null,ot==null||ot({transform:Ur,action:sr}),Ur})})),Pt.current.push((0,ae.Z)((0,ae.Z)({},gn),xr))},Fn=function(xr,sr,Lr,Ur){var Pr=_t.current,Qr=Pr.width,Tr=Pr.height,Wr=Pr.offsetWidth,ni=Pr.offsetHeight,Si=Pr.offsetLeft,Nr=Pr.offsetTop,wi=xr,gi=gn.scale*xr;gi>Xe?(wi=Xe/gn.scale,gi=Xe):gi<vt&&(wi=vt/gn.scale,gi=vt);var vo=Lr!=null?Lr:innerWidth/2,Ji=Ur!=null?Ur:innerHeight/2,Pi=wi-1,Mi=Pi*Qr*.5,Ai=Pi*Tr*.5,pi=Pi*(vo-gn.x-Si),zi=Pi*(Ji-gn.y-Nr),ai=gn.x-(pi-Mi),ii=gn.y-(zi-Ai);if(xr<1&&gi===1){var Ui=Wr*gi,to=ni*gi,la=Ee(),da=la.width,So=la.height;Ui<=da&&to<=So&&(ai=0,ii=0)}vn({x:ai,y:ii,scale:gi},sr)};return{transform:gn,resetTransform:On,updateTransform:vn,dispatchZoomChange:Fn}}var Rn=function(vt){var Xe=vt.visible,ot=vt.maskTransitionName,Nt=vt.getContainer,Pt=vt.prefixCls,qt=vt.rootClassName,hn=vt.icons,gn=vt.countRender,Nn=vt.showSwitch,On=vt.showProgress,vn=vt.current,Fn=vt.transform,Gn=vt.count,xr=vt.scale,sr=vt.minScale,Lr=vt.maxScale,Ur=vt.closeIcon,Pr=vt.onSwitchLeft,Qr=vt.onSwitchRight,Tr=vt.onClose,Wr=vt.onZoomIn,ni=vt.onZoomOut,Si=vt.onRotateRight,Nr=vt.onRotateLeft,wi=vt.onFlipX,gi=vt.onFlipY,vo=vt.toolbarRender,Ji=(0,te.useContext)(ft),Pi=hn.rotateLeft,Mi=hn.rotateRight,Ai=hn.zoomIn,pi=hn.zoomOut,zi=hn.close,ai=hn.left,ii=hn.right,Ui=hn.flipX,to=hn.flipY,la="".concat(Pt,"-operations-operation");te.useEffect(function(){var Zi=function(pa){pa.keyCode===zr.ESC&&Tr()};return Xe&&window.addEventListener("keydown",Zi),function(){window.removeEventListener("keydown",Zi)}},[Xe]);var da=[{icon:to,onClick:gi,type:"flipY"},{icon:Ui,onClick:wi,type:"flipX"},{icon:Pi,onClick:Nr,type:"rotateLeft"},{icon:Mi,onClick:Si,type:"rotateRight"},{icon:pi,onClick:ni,type:"zoomOut",disabled:xr===sr},{icon:Ai,onClick:Wr,type:"zoomIn",disabled:xr===Lr}],So=da.map(function(Zi){var Ii,pa=Zi.icon,io=Zi.onClick,si=Zi.type,Ki=Zi.disabled;return te.createElement("div",{className:ce()(la,(Ii={},(0,le.Z)(Ii,"".concat(Pt,"-operations-operation-").concat(si),!0),(0,le.Z)(Ii,"".concat(Pt,"-operations-operation-disabled"),!!Ki),Ii)),onClick:io,key:si},pa)}),go=te.createElement("div",{className:"".concat(Pt,"-operations")},So);return te.createElement(Ct.Z,{visible:Xe,motionName:ot},function(Zi){var Ii=Zi.className,pa=Zi.style;return te.createElement(yn.Z,{open:!0,getContainer:Nt!=null?Nt:document.body},te.createElement("div",{className:ce()("".concat(Pt,"-operations-wrapper"),Ii,qt),style:pa},Ur===null?null:te.createElement("button",{className:"".concat(Pt,"-close"),onClick:Tr},Ur||zi),Nn&&te.createElement(te.Fragment,null,te.createElement("div",{className:ce()("".concat(Pt,"-switch-left"),(0,le.Z)({},"".concat(Pt,"-switch-left-disabled"),vn===0)),onClick:Pr},ai),te.createElement("div",{className:ce()("".concat(Pt,"-switch-right"),(0,le.Z)({},"".concat(Pt,"-switch-right-disabled"),vn===Gn-1)),onClick:Qr},ii)),te.createElement("div",{className:"".concat(Pt,"-footer")},On&&te.createElement("div",{className:"".concat(Pt,"-progress")},gn?gn(vn+1,Gn):"".concat(vn+1," / ").concat(Gn)),vo?vo(go,(0,ae.Z)({icons:{flipYIcon:So[0],flipXIcon:So[1],rotateLeftIcon:So[2],rotateRightIcon:So[3],zoomOutIcon:So[4],zoomInIcon:So[5]},actions:{onFlipY:gi,onFlipX:wi,onRotateLeft:Nr,onRotateRight:Si,onZoomOut:ni,onZoomIn:Wr},transform:Fn},Ji?{current:vn,total:Gn}:{})):go)))})},mr=Rn,or=1,cr=1,Xn=["fallback","src","imgRef"],br=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],_r=function(vt){var Xe=vt.fallback,ot=vt.src,Nt=vt.imgRef,Pt=(0,he.Z)(vt,Xn),qt=jt({src:ot,fallback:Xe}),hn=(0,re.Z)(qt,2),gn=hn[0],Nn=hn[1];return te.createElement("img",(0,fe.Z)({ref:function(vn){Nt.current=vn,gn(vn)}},Pt,Nn))},mn=function(vt){var Xe=vt.prefixCls,ot=vt.src,Nt=vt.alt,Pt=vt.fallback,qt=vt.movable,hn=qt===void 0?!0:qt,gn=vt.onClose,Nn=vt.visible,On=vt.icons,vn=On===void 0?{}:On,Fn=vt.rootClassName,Gn=vt.closeIcon,xr=vt.getContainer,sr=vt.current,Lr=sr===void 0?0:sr,Ur=vt.count,Pr=Ur===void 0?1:Ur,Qr=vt.countRender,Tr=vt.scaleStep,Wr=Tr===void 0?.5:Tr,ni=vt.minScale,Si=ni===void 0?1:ni,Nr=vt.maxScale,wi=Nr===void 0?50:Nr,gi=vt.transitionName,vo=gi===void 0?"zoom":gi,Ji=vt.maskTransitionName,Pi=Ji===void 0?"fade":Ji,Mi=vt.imageRender,Ai=vt.imgCommonProps,pi=vt.toolbarRender,zi=vt.onTransform,ai=vt.onChange,ii=(0,he.Z)(vt,br),Ui=(0,te.useRef)(),to=(0,te.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),la=(0,te.useState)(!1),da=(0,re.Z)(la,2),So=da[0],go=da[1],Zi=(0,te.useContext)(ft),Ii=Zi&&Pr>1,pa=Zi&&Pr>=1,io=an(Ui,Si,wi,zi),si=io.transform,Ki=io.resetTransform,Io=io.updateTransform,Ro=io.dispatchZoomChange,qo=(0,te.useState)(!0),Qi=(0,re.Z)(qo,2),ma=Qi[0],va=Qi[1],ia=si.rotate,ca=si.scale,Ea=si.x,Ja=si.y,Ma=ce()((0,le.Z)({},"".concat(Xe,"-moving"),So));(0,te.useEffect)(function(){ma||va(!0)},[ma]);var Za=function(){Ki("close")},vs=function(){Ro(or+Wr,"zoomIn")},Es=function(){Ro(or/(or+Wr),"zoomOut")},Ls=function(){Io({rotate:ia+90},"rotateRight")},Qa=function(){Io({rotate:ia-90},"rotateLeft")},La=function(){Io({flipX:!si.flipX},"flipX")},ho=function(){Io({flipY:!si.flipY},"flipY")},Po=function(Bi){Bi==null||Bi.preventDefault(),Bi==null||Bi.stopPropagation(),Lr>0&&(va(!1),Ki("prev"),ai==null||ai(Lr-1,Lr))},_a=function(Bi){Bi==null||Bi.preventDefault(),Bi==null||Bi.stopPropagation(),Lr<Pr-1&&(va(!1),Ki("next"),ai==null||ai(Lr+1,Lr))},Da=function(){if(Nn&&So){go(!1);var Bi=to.current,Co=Bi.transformX,Qo=Bi.transformY,Ca=Ea!==Co&&Ja!==Qo;if(!Ca)return;var is=Ui.current.offsetWidth*ca,bs=Ui.current.offsetHeight*ca,bl=Ui.current.getBoundingClientRect(),rl=bl.left,$l=bl.top,ya=ia%180!==0,yi=Mr(ya?bs:is,ya?is:bs,rl,$l);yi&&Io((0,ae.Z)({},yi),"dragRebound")}},gs=function(Bi){!hn||Bi.button!==0||(Bi.preventDefault(),Bi.stopPropagation(),to.current={deltaX:Bi.pageX-si.x,deltaY:Bi.pageY-si.y,transformX:si.x,transformY:si.y},go(!0))},Rs=function(Bi){Nn&&So&&Io({x:Bi.pageX-to.current.deltaX,y:Bi.pageY-to.current.deltaY},"move")},Ws=function(Bi){if(!(!Nn||Bi.deltaY==0)){var Co=Math.abs(Bi.deltaY/100),Qo=Math.min(Co,cr),Ca=or+Qo*Wr;Bi.deltaY>0&&(Ca=or/Ca),Ro(Ca,"wheel",Bi.clientX,Bi.clientY)}},hl=function(Bi){!Nn||!Ii||(Bi.keyCode===zr.LEFT?Po():Bi.keyCode===zr.RIGHT&&_a())},ul=function(Bi){Nn&&(ca!==1?Io({x:0,y:0,scale:1},"doubleClick"):Ro(or+Wr,"doubleClick",Bi.clientX,Bi.clientY))};(0,te.useEffect)(function(){var es,Bi,Co,Qo;if(hn){Co=ci(window,"mouseup",Da,!1),Qo=ci(window,"mousemove",Rs,!1);try{window.top!==window.self&&(es=ci(window.top,"mouseup",Da,!1),Bi=ci(window.top,"mousemove",Rs,!1))}catch(Ca){Wo(!1,"[rc-image] ".concat(Ca))}}return function(){var Ca,is,bs,bl;(Ca=Co)===null||Ca===void 0||Ca.remove(),(is=Qo)===null||is===void 0||is.remove(),(bs=es)===null||bs===void 0||bs.remove(),(bl=Bi)===null||bl===void 0||bl.remove()}},[Nn,So,Ea,Ja,ia,hn]),(0,te.useEffect)(function(){var es=ci(window,"keydown",hl,!1);return function(){es.remove()}},[Nn,Ii,Lr]);var Ts=te.createElement(_r,(0,fe.Z)({},Ai,{width:vt.width,height:vt.height,imgRef:Ui,className:"".concat(Xe,"-img"),alt:Nt,style:{transform:"translate3d(".concat(si.x,"px, ").concat(si.y,"px, 0) scale3d(").concat(si.flipX?"-":"").concat(ca,", ").concat(si.flipY?"-":"").concat(ca,", 1) rotate(").concat(ia,"deg)"),transitionDuration:!ma&&"0s"},fallback:Pt,src:ot,onWheel:Ws,onMouseDown:gs,onDoubleClick:ul}));return te.createElement(te.Fragment,null,te.createElement(Di,(0,fe.Z)({transitionName:vo,maskTransitionName:Pi,closable:!1,keyboard:!0,prefixCls:Xe,onClose:gn,visible:Nn,wrapClassName:Ma,rootClassName:Fn,getContainer:xr},ii,{afterClose:Za}),te.createElement("div",{className:"".concat(Xe,"-img-wrapper")},Mi?Mi(Ts,(0,ae.Z)({transform:si},Zi?{current:Lr}:{})):Ts)),te.createElement(mr,{visible:Nn,transform:si,maskTransitionName:Pi,closeIcon:Gn,getContainer:xr,prefixCls:Xe,rootClassName:Fn,icons:vn,countRender:Qr,showSwitch:Ii,showProgress:pa,current:Lr,count:Pr,scale:ca,minScale:Si,maxScale:wi,toolbarRender:pi,onSwitchLeft:Po,onSwitchRight:_a,onZoomIn:vs,onZoomOut:Es,onRotateRight:Ls,onRotateLeft:Qa,onFlipX:La,onFlipY:ho,onClose:gn}))},$n=mn,Vr=ee(74902);function qr(_t){var vt=te.useState({}),Xe=(0,re.Z)(vt,2),ot=Xe[0],Nt=Xe[1],Pt=te.useCallback(function(hn,gn){return Nt(function(Nn){return(0,ae.Z)((0,ae.Z)({},Nn),{},(0,le.Z)({},hn,gn))}),function(){Nt(function(Nn){var On=(0,ae.Z)({},Nn);return delete On[hn],On})}},[]),qt=te.useMemo(function(){return _t?_t.map(function(hn){if(typeof hn=="string")return{data:{src:hn}};var gn={};return Object.keys(hn).forEach(function(Nn){["src"].concat((0,Vr.Z)(tt)).includes(Nn)&&(gn[Nn]=hn[Nn])}),{data:gn}}):Object.keys(ot).reduce(function(hn,gn){var Nn=ot[gn],On=Nn.canPreview,vn=Nn.data;return On&&hn.push({data:vn,id:gn}),hn},[])},[_t,ot]);return[qt,Pt]}var Ir=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],hi=["src"],Ni=function(vt){var Xe,ot=vt.previewPrefixCls,Nt=ot===void 0?"rc-image-preview":ot,Pt=vt.children,qt=vt.icons,hn=qt===void 0?{}:qt,gn=vt.items,Nn=vt.preview,On=vt.fallback,vn=(0,de.Z)(Nn)==="object"?Nn:{},Fn=vn.visible,Gn=vn.onVisibleChange,xr=vn.getContainer,sr=vn.current,Lr=vn.movable,Ur=vn.minScale,Pr=vn.maxScale,Qr=vn.countRender,Tr=vn.closeIcon,Wr=vn.onChange,ni=vn.onTransform,Si=vn.toolbarRender,Nr=vn.imageRender,wi=(0,he.Z)(vn,Ir),gi=qr(gn),vo=(0,re.Z)(gi,2),Ji=vo[0],Pi=vo[1],Mi=Ze(0,{value:sr}),Ai=(0,re.Z)(Mi,2),pi=Ai[0],zi=Ai[1],ai=(0,te.useState)(!1),ii=(0,re.Z)(ai,2),Ui=ii[0],to=ii[1],la=((Xe=Ji[pi])===null||Xe===void 0?void 0:Xe.data)||{},da=la.src,So=(0,he.Z)(la,hi),go=Ze(!!Fn,{value:Fn,onChange:function(ia,ca){Gn==null||Gn(ia,ca,pi)}}),Zi=(0,re.Z)(go,2),Ii=Zi[0],pa=Zi[1],io=(0,te.useState)(null),si=(0,re.Z)(io,2),Ki=si[0],Io=si[1],Ro=te.useCallback(function(va,ia,ca){var Ea=Ji.findIndex(function(Ja){return Ja.id===va});pa(!0),Io({x:ia,y:ca}),zi(Ea<0?0:Ea),to(!0)},[Ji]);te.useEffect(function(){Ii?Ui||zi(0):to(!1)},[Ii]);var qo=function(ia,ca){zi(ia),Wr==null||Wr(ia,ca)},Qi=function(){pa(!1),Io(null)},ma=te.useMemo(function(){return{register:Pi,onPreview:Ro}},[Pi,Ro]);return te.createElement(ft.Provider,{value:ma},Pt,te.createElement($n,(0,fe.Z)({"aria-hidden":!Ii,movable:Lr,visible:Ii,prefixCls:Nt,closeIcon:Tr,onClose:Qi,mousePosition:Ki,imgCommonProps:So,src:da,fallback:On,icons:hn,minScale:Ur,maxScale:Pr,getContainer:xr,current:pi,count:Ji.length,countRender:Qr,onTransform:ni,toolbarRender:Si,imageRender:Nr,onChange:qo},wi)))},yr=Ni,bi=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],ar=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],fo=function(vt){var Xe=vt.src,ot=vt.alt,Nt=vt.onPreviewClose,Pt=vt.prefixCls,qt=Pt===void 0?"rc-image":Pt,hn=vt.previewPrefixCls,gn=hn===void 0?"".concat(qt,"-preview"):hn,Nn=vt.placeholder,On=vt.fallback,vn=vt.width,Fn=vt.height,Gn=vt.style,xr=vt.preview,sr=xr===void 0?!0:xr,Lr=vt.className,Ur=vt.onClick,Pr=vt.onError,Qr=vt.wrapperClassName,Tr=vt.wrapperStyle,Wr=vt.rootClassName,ni=(0,he.Z)(vt,bi),Si=Nn&&Nn!==!0,Nr=(0,de.Z)(sr)==="object"?sr:{},wi=Nr.src,gi=Nr.visible,vo=gi===void 0?void 0:gi,Ji=Nr.onVisibleChange,Pi=Ji===void 0?Nt:Ji,Mi=Nr.getContainer,Ai=Mi===void 0?void 0:Mi,pi=Nr.mask,zi=Nr.maskClassName,ai=Nr.movable,ii=Nr.icons,Ui=Nr.scaleStep,to=Nr.minScale,la=Nr.maxScale,da=Nr.imageRender,So=Nr.toolbarRender,go=(0,he.Z)(Nr,ar),Zi=wi!=null?wi:Xe,Ii=Ze(!!vo,{value:vo,onChange:Pi}),pa=(0,re.Z)(Ii,2),io=pa[0],si=pa[1],Ki=jt({src:Xe,isCustomPlaceholder:Si,fallback:On}),Io=(0,re.Z)(Ki,3),Ro=Io[0],qo=Io[1],Qi=Io[2],ma=(0,te.useState)(null),va=(0,re.Z)(ma,2),ia=va[0],ca=va[1],Ea=(0,te.useContext)(ft),Ja=!!sr,Ma=function(){si(!1),ca(null)},Za=ce()(qt,Qr,Wr,(0,le.Z)({},"".concat(qt,"-error"),Qi==="error")),vs=(0,te.useMemo)(function(){var La={};return tt.forEach(function(ho){vt[ho]!==void 0&&(La[ho]=vt[ho])}),La},tt.map(function(La){return vt[La]})),Es=(0,te.useMemo)(function(){return(0,ae.Z)((0,ae.Z)({},vs),{},{src:Zi})},[Zi,vs]),Ls=nt(Ja,Es),Qa=function(ho){var Po=Re(ho.target),_a=Po.left,Da=Po.top;Ea?Ea.onPreview(Ls,_a,Da):(ca({x:_a,y:Da}),si(!0)),Ur==null||Ur(ho)};return te.createElement(te.Fragment,null,te.createElement("div",(0,fe.Z)({},ni,{className:Za,onClick:Ja?Qa:Ur,style:(0,ae.Z)({width:vn,height:Fn},Tr)}),te.createElement("img",(0,fe.Z)({},vs,{className:ce()("".concat(qt,"-img"),(0,le.Z)({},"".concat(qt,"-img-placeholder"),Nn===!0),Lr),style:(0,ae.Z)({height:Fn},Gn),ref:Ro},qo,{width:vn,height:Fn,onError:Pr})),Qi==="loading"&&te.createElement("div",{"aria-hidden":"true",className:"".concat(qt,"-placeholder")},Nn),pi&&Ja&&te.createElement("div",{className:ce()("".concat(qt,"-mask"),zi),style:{display:(Gn==null?void 0:Gn.display)==="none"?"none":void 0}},pi)),!Ea&&Ja&&te.createElement($n,(0,fe.Z)({"aria-hidden":!io,visible:io,prefixCls:gn,onClose:Ma,mousePosition:ia,src:Zi,alt:ot,fallback:On,getContainer:Ai,icons:ii,movable:ai,scaleStep:Ui,minScale:to,maxScale:la,rootClassName:Wr,imageRender:da,imgCommonProps:vs,toolbarRender:So},go)))};fo.PreviewGroup=yr,fo.displayName="Image";var qi=fo,ua=qi,Jo=ee(33603),bo=ee(53124),oo=ee(24457),na=ee(73475),Eo=ee(22751),ra=ee(91034),ea={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Ho=ea,No=ee(74643),Ba=function(vt,Xe){return te.createElement(No.Z,(0,fe.Z)({},vt,{ref:Xe,icon:Ho}))},Wa=te.forwardRef(Ba),Ia={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},Ao=Ia,pn=function(vt,Xe){return te.createElement(No.Z,(0,fe.Z)({},vt,{ref:Xe,icon:Ao}))},sn=te.forwardRef(pn),Hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},lr=Hn,Cr=function(vt,Xe){return te.createElement(No.Z,(0,fe.Z)({},vt,{ref:Xe,icon:lr}))},vi=te.forwardRef(Cr),_i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},ji=_i,Xi=function(vt,Xe){return te.createElement(No.Z,(0,fe.Z)({},vt,{ref:Xe,icon:ji}))},Ci=te.forwardRef(Xi),_o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},To=_o,Ko=function(vt,Xe){return te.createElement(No.Z,(0,fe.Z)({},vt,{ref:Xe,icon:To}))},Tn=te.forwardRef(Ko),Bn=ee(84780),Qn=ee(71194),He=ee(14747),lt=ee(50438),ut=ee(16932),gt=ee(67968),yt=ee(45503);const kt=_t=>({position:_t||"absolute",inset:0}),At=_t=>{const{iconCls:vt,motionDurationSlow:Xe,paddingXXS:ot,marginXXS:Nt,prefixCls:Pt,colorTextLightSolid:qt}=_t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:qt,background:new Bn.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Xe}`,[`.${Pt}-mask-info`]:Object.assign(Object.assign({},He.vS),{padding:`0 ${ot}px`,[vt]:{marginInlineEnd:Nt,svg:{verticalAlign:"baseline"}}})}},tn=_t=>{const{previewCls:vt,modalMaskBg:Xe,paddingSM:ot,marginXL:Nt,margin:Pt,paddingLG:qt,previewOperationColorDisabled:hn,previewOperationHoverColor:gn,motionDurationSlow:Nn,iconCls:On,colorTextLightSolid:vn}=_t,Fn=new Bn.C(Xe).setAlpha(.1),Gn=Fn.clone().setAlpha(.2);return{[`${vt}-footer`]:{position:"fixed",bottom:Nt,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:_t.previewOperationColor},[`${vt}-progress`]:{marginBottom:Pt},[`${vt}-close`]:{position:"fixed",top:Nt,right:{_skip_check_:!0,value:Nt},display:"flex",color:vn,backgroundColor:Fn.toRgbString(),borderRadius:"50%",padding:ot,outline:0,border:0,cursor:"pointer",transition:`all ${Nn}`,"&:hover":{backgroundColor:Gn.toRgbString()},[`& > ${On}`]:{fontSize:_t.previewOperationSize}},[`${vt}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${qt}px`,backgroundColor:Fn.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:ot,padding:ot,cursor:"pointer",transition:`all ${Nn}`,userSelect:"none",[`&:not(${vt}-operations-operation-disabled):hover > ${On}`]:{color:gn},"&-disabled":{color:hn,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${On}`]:{fontSize:_t.previewOperationSize}}}}},fn=_t=>{const{modalMaskBg:vt,iconCls:Xe,previewOperationColorDisabled:ot,previewCls:Nt,zIndexPopup:Pt,motionDurationSlow:qt}=_t,hn=new Bn.C(vt).setAlpha(.1),gn=hn.clone().setAlpha(.2);return{[`${Nt}-switch-left, ${Nt}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:Pt+1,display:"flex",alignItems:"center",justifyContent:"center",width:_t.imagePreviewSwitchSize,height:_t.imagePreviewSwitchSize,marginTop:-_t.imagePreviewSwitchSize/2,color:_t.previewOperationColor,background:hn.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${qt}`,userSelect:"none","&:hover":{background:gn.toRgbString()},"&-disabled":{"&, &:hover":{color:ot,background:"transparent",cursor:"not-allowed",[`> ${Xe}`]:{cursor:"not-allowed"}}},[`> ${Xe}`]:{fontSize:_t.previewOperationSize}},[`${Nt}-switch-left`]:{insetInlineStart:_t.marginSM},[`${Nt}-switch-right`]:{insetInlineEnd:_t.marginSM}}},jn=_t=>{const{motionEaseOut:vt,previewCls:Xe,motionDurationSlow:ot,componentCls:Nt}=_t;return[{[`${Nt}-preview-root`]:{[Xe]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Xe}-body`]:Object.assign(Object.assign({},kt()),{overflow:"hidden"}),[`${Xe}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${ot} ${vt} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},kt()),{transition:`transform ${ot} ${vt} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Xe}-moving`]:{[`${Xe}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Nt}-preview-root`]:{[`${Xe}-wrap`]:{zIndex:_t.zIndexPopup}}},{[`${Nt}-preview-operations-wrapper`]:{position:"fixed",zIndex:_t.zIndexPopup+1},"&":[tn(_t),fn(_t)]}]},qn=_t=>{const{componentCls:vt}=_t;return{[vt]:{position:"relative",display:"inline-block",[`${vt}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${vt}-img-placeholder`]:{backgroundColor:_t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${vt}-mask`]:Object.assign({},At(_t)),[`${vt}-mask:hover`]:{opacity:1},[`${vt}-placeholder`]:Object.assign({},kt())}}},Kn=_t=>{const{previewCls:vt}=_t;return{[`${vt}-root`]:(0,lt._y)(_t,"zoom"),"&":(0,ut.J$)(_t,!0)}};var An=(0,gt.Z)("Image",_t=>{const vt=`${_t.componentCls}-preview`,Xe=(0,yt.TS)(_t,{previewCls:vt,modalMaskBg:new Bn.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:_t.controlHeightLG});return[qn(Xe),jn(Xe),(0,Qn.QA)((0,yt.TS)(Xe,{componentCls:vt})),Kn(Xe)]},_t=>({zIndexPopup:_t.zIndexPopupBase+80,previewOperationColor:new Bn.C(_t.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Bn.C(_t.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Bn.C(_t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:_t.fontSizeIcon*1.5})),Dn=function(_t,vt){var Xe={};for(var ot in _t)Object.prototype.hasOwnProperty.call(_t,ot)&&vt.indexOf(ot)<0&&(Xe[ot]=_t[ot]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,ot=Object.getOwnPropertySymbols(_t);Nt<ot.length;Nt++)vt.indexOf(ot[Nt])<0&&Object.prototype.propertyIsEnumerable.call(_t,ot[Nt])&&(Xe[ot[Nt]]=_t[ot[Nt]]);return Xe};const wn={rotateLeft:te.createElement(Wa,null),rotateRight:te.createElement(sn,null),zoomIn:te.createElement(Ci,null),zoomOut:te.createElement(Tn,null),close:te.createElement(na.Z,null),left:te.createElement(Eo.Z,null),right:te.createElement(ra.Z,null),flipX:te.createElement(vi,null),flipY:te.createElement(vi,{rotate:90})};var vr=_t=>{var{previewPrefixCls:vt,preview:Xe}=_t,ot=Dn(_t,["previewPrefixCls","preview"]);const{getPrefixCls:Nt}=te.useContext(bo.E_),Pt=Nt("image",vt),qt=`${Pt}-preview`,hn=Nt(),[gn,Nn]=An(Pt),On=te.useMemo(()=>{var vn;if(Xe===!1)return Xe;const Fn=typeof Xe=="object"?Xe:{},Gn=ce()(Nn,(vn=Fn.rootClassName)!==null&&vn!==void 0?vn:"");return Object.assign(Object.assign({},Fn),{transitionName:(0,Jo.m)(hn,"zoom",Fn.transitionName),maskTransitionName:(0,Jo.m)(hn,"fade",Fn.maskTransitionName),rootClassName:Gn})},[Xe]);return gn(te.createElement(ua.PreviewGroup,Object.assign({preview:On,previewPrefixCls:qt,icons:wn},ot)))},er=function(_t,vt){var Xe={};for(var ot in _t)Object.prototype.hasOwnProperty.call(_t,ot)&&vt.indexOf(ot)<0&&(Xe[ot]=_t[ot]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,ot=Object.getOwnPropertySymbols(_t);Nt<ot.length;Nt++)vt.indexOf(ot[Nt])<0&&Object.prototype.propertyIsEnumerable.call(_t,ot[Nt])&&(Xe[ot[Nt]]=_t[ot[Nt]]);return Xe};const ir=_t=>{const{prefixCls:vt,preview:Xe,className:ot,rootClassName:Nt,style:Pt}=_t,qt=er(_t,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:hn,locale:gn=oo.Z,getPopupContainer:Nn,image:On}=te.useContext(bo.E_),vn=hn("image",vt),Fn=hn(),Gn=gn.Image||oo.Z.Image,[xr,sr]=An(vn),Lr=ce()(Nt,sr),Ur=ce()(ot,sr,On==null?void 0:On.className),Pr=te.useMemo(()=>{if(Xe===!1)return Xe;const Tr=typeof Xe=="object"?Xe:{},{getContainer:Wr}=Tr,ni=er(Tr,["getContainer"]);return Object.assign(Object.assign({mask:te.createElement("div",{className:`${vn}-mask-info`},te.createElement(Le.Z,null),Gn==null?void 0:Gn.preview),icons:wn},ni),{getContainer:Wr||Nn,transitionName:(0,Jo.m)(Fn,"zoom",Tr.transitionName),maskTransitionName:(0,Jo.m)(Fn,"fade",Tr.maskTransitionName)})},[Xe,Gn]),Qr=Object.assign(Object.assign({},On==null?void 0:On.style),Pt);return xr(te.createElement(ua,Object.assign({prefixCls:vn,preview:Pr,rootClassName:Lr,className:Ur,style:Qr},qt)))};ir.PreviewGroup=vr;var fr=ir},31795:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return tr}});var te=ee(42922),Se=ee(53978),Le=ee(94184),Ce=ee.n(Le),ce=ee(87462),fe=ee(4942),ae=ee(71002),le=ee(97685),re=ee(45987),de=ee(15671),he=ee(43144);function me(){return typeof BigInt=="function"}function se(Zt){return!Zt&&Zt!==0&&!Number.isNaN(Zt)||!String(Zt).trim()}function ye(Zt){var Ot=Zt.trim(),ge=Ot.startsWith("-");ge&&(Ot=Ot.slice(1)),Ot=Ot.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Ot.startsWith(".")&&(Ot="0".concat(Ot));var Ie=Ot||"0",Ae=Ie.split("."),We=Ae[0]||"0",it=Ae[1]||"0";We==="0"&&it==="0"&&(ge=!1);var xt=ge?"-":"";return{negative:ge,negativeStr:xt,trimStr:Ie,integerStr:We,decimalStr:it,fullStr:"".concat(xt).concat(Ie)}}function _e(Zt){var Ot=String(Zt);return!Number.isNaN(Number(Ot))&&Ot.includes("e")}function Me(Zt){var Ot=String(Zt);if(_e(Zt)){var ge=Number(Ot.slice(Ot.indexOf("e-")+2)),Ie=Ot.match(/\.(\d+)/);return Ie!=null&&Ie[1]&&(ge+=Ie[1].length),ge}return Ot.includes(".")&&Fe(Ot)?Ot.length-Ot.indexOf(".")-1:0}function ve(Zt){var Ot=String(Zt);if(_e(Zt)){if(Zt>Number.MAX_SAFE_INTEGER)return String(me()?BigInt(Zt).toString():Number.MAX_SAFE_INTEGER);if(Zt<Number.MIN_SAFE_INTEGER)return String(me()?BigInt(Zt).toString():Number.MIN_SAFE_INTEGER);Ot=Zt.toFixed(Me(Ot))}return ye(Ot).fullStr}function Fe(Zt){return typeof Zt=="number"?!Number.isNaN(Zt):Zt?/^\s*-?\d+(\.\d+)?\s*$/.test(Zt)||/^\s*-?\d+\.\s*$/.test(Zt)||/^\s*-?\.\d+\s*$/.test(Zt):!1}var $e=function(){function Zt(Ot){if((0,de.Z)(this,Zt),(0,fe.Z)(this,"origin",""),(0,fe.Z)(this,"negative",void 0),(0,fe.Z)(this,"integer",void 0),(0,fe.Z)(this,"decimal",void 0),(0,fe.Z)(this,"decimalLen",void 0),(0,fe.Z)(this,"empty",void 0),(0,fe.Z)(this,"nan",void 0),se(Ot)){this.empty=!0;return}if(this.origin=String(Ot),Ot==="-"||Number.isNaN(Ot)){this.nan=!0;return}var ge=Ot;if(_e(ge)&&(ge=Number(ge)),ge=typeof ge=="string"?ge:ve(ge),Fe(ge)){var Ie=ye(ge);this.negative=Ie.negative;var Ae=Ie.trimStr.split(".");this.integer=BigInt(Ae[0]);var We=Ae[1]||"0";this.decimal=BigInt(We),this.decimalLen=We.length}else this.nan=!0}return(0,he.Z)(Zt,[{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(ge){var Ie="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(ge,"0"));return BigInt(Ie)}},{key:"negate",value:function(){var ge=new Zt(this.toString());return ge.negative=!ge.negative,ge}},{key:"cal",value:function(ge,Ie,Ae){var We=Math.max(this.getDecimalStr().length,ge.getDecimalStr().length),it=this.alignDecimal(We),xt=ge.alignDecimal(We),Ft=Ie(it,xt).toString(),an=Ae(We),Rn=ye(Ft),mr=Rn.negativeStr,or=Rn.trimStr,cr="".concat(mr).concat(or.padStart(an+1,"0"));return new Zt("".concat(cr.slice(0,-an),".").concat(cr.slice(-an)))}},{key:"add",value:function(ge){if(this.isInvalidate())return new Zt(ge);var Ie=new Zt(ge);return Ie.isInvalidate()?this:this.cal(Ie,function(Ae,We){return Ae+We},function(Ae){return Ae})}},{key:"multi",value:function(ge){var Ie=new Zt(ge);return this.isInvalidate()||Ie.isInvalidate()?new Zt(NaN):this.cal(Ie,function(Ae,We){return Ae*We},function(Ae){return Ae*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(ge){return this.toString()===(ge==null?void 0:ge.toString())}},{key:"lessEquals",value:function(ge){return this.add(ge.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ge?this.isInvalidate()?"":ye("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Zt}(),Te=function(){function Zt(Ot){if((0,de.Z)(this,Zt),(0,fe.Z)(this,"origin",""),(0,fe.Z)(this,"number",void 0),(0,fe.Z)(this,"empty",void 0),se(Ot)){this.empty=!0;return}this.origin=String(Ot),this.number=Number(Ot)}return(0,he.Z)(Zt,[{key:"negate",value:function(){return new Zt(-this.toNumber())}},{key:"add",value:function(ge){if(this.isInvalidate())return new Zt(ge);var Ie=Number(ge);if(Number.isNaN(Ie))return this;var Ae=this.number+Ie;if(Ae>Number.MAX_SAFE_INTEGER)return new Zt(Number.MAX_SAFE_INTEGER);if(Ae<Number.MIN_SAFE_INTEGER)return new Zt(Number.MIN_SAFE_INTEGER);var We=Math.max(Me(this.number),Me(Ie));return new Zt(Ae.toFixed(We))}},{key:"multi",value:function(ge){var Ie=Number(ge);if(this.isInvalidate()||Number.isNaN(Ie))return new Zt(NaN);var Ae=this.number*Ie;if(Ae>Number.MAX_SAFE_INTEGER)return new Zt(Number.MAX_SAFE_INTEGER);if(Ae<Number.MIN_SAFE_INTEGER)return new Zt(Number.MIN_SAFE_INTEGER);var We=Math.max(Me(this.number),Me(Ie));return new Zt(Ae.toFixed(We))}},{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(ge){return this.toNumber()===(ge==null?void 0:ge.toNumber())}},{key:"lessEquals",value:function(ge){return this.add(ge.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ge?this.isInvalidate()?"":ve(this.number):this.origin}}]),Zt}();function ze(Zt){return me()?new $e(Zt):new Te(Zt)}function Ee(Zt,Ot,ge){var Ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Zt==="")return"";var Ae=ye(Zt),We=Ae.negativeStr,it=Ae.integerStr,xt=Ae.decimalStr,Ft="".concat(Ot).concat(xt),an="".concat(We).concat(it);if(ge>=0){var Rn=Number(xt[ge]);if(Rn>=5&&!Ie){var mr=ze(Zt).add("".concat(We,"0.").concat("0".repeat(ge)).concat(10-Rn));return Ee(mr.toString(),Ot,ge,Ie)}return ge===0?an:"".concat(an).concat(Ot).concat(xt.padEnd(ge,"0").slice(0,ge))}return Ft===".0"?an:"".concat(an).concat(Ft)}var be=ze,Re=ee(67656),De=ee(67294);function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ye=et()?De.useLayoutEffect:De.useEffect,dt=function(Ot,ge){var Ie=De.useRef(!0);Ye(function(){return Ot(Ie.current)},ge),Ye(function(){return Ie.current=!1,function(){Ie.current=!0}},[])},Ke=function(Ot,ge){dt(function(Ie){if(!Ie)return Ot()},ge)},zt=dt,pt=ee(27183);function Kt(Zt,Ot,ge){var Ie=React.useRef({});return(!("value"in Ie.current)||ge(Ie.current.condition,Ot))&&(Ie.current.value=Zt(),Ie.current.condition=Ot),Ie.current.value}function Ze(Zt,Ot){typeof Zt=="function"?Zt(Ot):(0,ae.Z)(Zt)==="object"&&Zt&&"current"in Zt&&(Zt.current=Ot)}function tt(){for(var Zt=arguments.length,Ot=new Array(Zt),ge=0;ge<Zt;ge++)Ot[ge]=arguments[ge];var Ie=Ot.filter(function(Ae){return Ae});return Ie.length<=1?Ie[0]:function(Ae){Ot.forEach(function(We){Ze(We,Ae)})}}function ft(){for(var Zt=arguments.length,Ot=new Array(Zt),ge=0;ge<Zt;ge++)Ot[ge]=arguments[ge];return useMemo(function(){return tt.apply(void 0,Ot)},Ot,function(Ie,Ae){return Ie.length!==Ae.length||Ie.every(function(We,it){return We!==Ae[it]})})}function Ut(Zt){var Ot,ge,Ie=isMemo(Zt)?Zt.type.type:Zt.type;return!(typeof Ie=="function"&&!((Ot=Ie.prototype)!==null&&Ot!==void 0&&Ot.render)||typeof Zt=="function"&&!((ge=Zt.prototype)!==null&&ge!==void 0&&ge.render))}function nt(Zt){return!isValidElement(Zt)||isFragment(Zt)?!1:Ut(Zt)}var Ge={},jt=[],yn=function(Ot){jt.push(Ot)};function ln(Zt,Ot){if(0)var ge}function Tt(Zt,Ot){if(0)var ge}function Lt(){Ge={}}function Jt(Zt,Ot,ge){!Ot&&!Ge[ge]&&(Zt(!1,ge),Ge[ge]=!0)}function kn(Zt,Ot){Jt(ln,Zt,Ot)}function In(Zt,Ot){Jt(Tt,Zt,Ot)}kn.preMessage=yn,kn.resetWarned=Lt,kn.noteOnce=In;var Qt=kn;function Mn(Zt,Ot){var ge=(0,De.useRef)(null);function Ie(){try{var We=Zt.selectionStart,it=Zt.selectionEnd,xt=Zt.value,Ft=xt.substring(0,We),an=xt.substring(it);ge.current={start:We,end:it,value:xt,beforeTxt:Ft,afterTxt:an}}catch(Rn){}}function Ae(){if(Zt&&ge.current&&Ot)try{var We=Zt.value,it=ge.current,xt=it.beforeTxt,Ft=it.afterTxt,an=it.start,Rn=We.length;if(We.endsWith(Ft))Rn=We.length-ge.current.afterTxt.length;else if(We.startsWith(xt))Rn=xt.length;else{var mr=xt[an-1],or=We.indexOf(mr,an-1);or!==-1&&(Rn=or+1)}Zt.setSelectionRange(Rn,Rn)}catch(cr){Qt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(cr.message))}}return[Ie,Ae]}var Wn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Zt=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(Zt)||/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(Zt==null?void 0:Zt.substr(0,4))},zn=function(){var Ot=(0,De.useState)(!1),ge=(0,le.Z)(Ot,2),Ie=ge[0],Ae=ge[1];return zt(function(){Ae(Wn())},[]),Ie},at=zn,Oe=function(Ot){return+setTimeout(Ot,16)},ke=function(Ot){return clearTimeout(Ot)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Oe=function(Ot){return window.requestAnimationFrame(Ot)},ke=function(Ot){return window.cancelAnimationFrame(Ot)});var Be=0,Ne=new Map;function we(Zt){Ne.delete(Zt)}var rt=function(Ot){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Be+=1;var Ie=Be;function Ae(We){if(We===0)we(Ie),Ot();else{var it=Oe(function(){Ae(We-1)});Ne.set(Ie,it)}}return Ae(ge),Ie};rt.cancel=function(Zt){var Ot=Ne.get(Zt);return we(Ot),ke(Ot)};var It=rt,Ct=200,$t=600;function Vt(Zt){var Ot=Zt.prefixCls,ge=Zt.upNode,Ie=Zt.downNode,Ae=Zt.upDisabled,We=Zt.downDisabled,it=Zt.onStep,xt=De.useRef(),Ft=De.useRef([]),an=De.useRef();an.current=it;var Rn=function(){clearTimeout(xt.current)},mr=function(Vr,qr){Vr.preventDefault(),Rn(),an.current(qr);function Ir(){an.current(qr),xt.current=setTimeout(Ir,Ct)}xt.current=setTimeout(Ir,$t)};De.useEffect(function(){return function(){Rn(),Ft.current.forEach(function($n){return It.cancel($n)})}},[]);var or=at();if(or)return null;var cr="".concat(Ot,"-handler"),Xn=Ce()(cr,"".concat(cr,"-up"),(0,fe.Z)({},"".concat(cr,"-up-disabled"),Ae)),br=Ce()(cr,"".concat(cr,"-down"),(0,fe.Z)({},"".concat(cr,"-down-disabled"),We)),_r=function(){return Ft.current.push(It(Rn))},mn={unselectable:"on",role:"button",onMouseUp:_r,onMouseLeave:_r};return De.createElement("div",{className:"".concat(cr,"-wrap")},De.createElement("span",(0,ce.Z)({},mn,{onMouseDown:function(Vr){mr(Vr,!0)},"aria-label":"Increase Value","aria-disabled":Ae,className:Xn}),ge||De.createElement("span",{unselectable:"on",className:"".concat(Ot,"-handler-up-inner")})),De.createElement("span",(0,ce.Z)({},mn,{onMouseDown:function(Vr){mr(Vr,!1)},"aria-label":"Decrease Value","aria-disabled":We,className:br}),Ie||De.createElement("span",{unselectable:"on",className:"".concat(Ot,"-handler-down-inner")})))}function wt(Zt){var Ot=typeof Zt=="number"?ve(Zt):ye(Zt).fullStr,ge=Ot.includes(".");return ge?ye(Ot.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Zt+"0"}var on=ee(87887),Dt=function(){var Zt=(0,De.useRef)(0),Ot=function(){It.cancel(Zt.current)};return(0,De.useEffect)(function(){return Ot},[]),function(ge){Ot(),Zt.current=It(function(){ge()})}},Xt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],nn=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],bn=function(Ot,ge){return Ot||ge.isEmpty()?ge.toString():ge.toNumber()},en=function(Ot){var ge=be(Ot);return ge.isInvalidate()?null:ge},Zn=De.forwardRef(function(Zt,Ot){var ge,Ie=Zt.prefixCls,Ae=Ie===void 0?"rc-input-number":Ie,We=Zt.className,it=Zt.style,xt=Zt.min,Ft=Zt.max,an=Zt.step,Rn=an===void 0?1:an,mr=Zt.defaultValue,or=Zt.value,cr=Zt.disabled,Xn=Zt.readOnly,br=Zt.upHandler,_r=Zt.downHandler,mn=Zt.keyboard,$n=Zt.controls,Vr=$n===void 0?!0:$n,qr=Zt.classNames,Ir=Zt.stringMode,hi=Zt.parser,Ni=Zt.formatter,yr=Zt.precision,bi=Zt.decimalSeparator,ar=Zt.onChange,fo=Zt.onInput,qi=Zt.onPressEnter,ua=Zt.onStep,Jo=(0,re.Z)(Zt,Xt),bo="".concat(Ae,"-input"),oo=De.useRef(null),na=De.useState(!1),Eo=(0,le.Z)(na,2),ra=Eo[0],ea=Eo[1],Ho=De.useRef(!1),No=De.useRef(!1),Ba=De.useRef(!1),Wa=De.useState(function(){return be(or!=null?or:mr)}),Ia=(0,le.Z)(Wa,2),Ao=Ia[0],pn=Ia[1];function sn(er){or===void 0&&pn(er)}var Hn=De.useCallback(function(er,ir){if(!ir)return yr>=0?yr:Math.max(Me(er),Me(Rn))},[yr,Rn]),lr=De.useCallback(function(er){var ir=String(er);if(hi)return hi(ir);var fr=ir;return bi&&(fr=fr.replace(bi,".")),fr.replace(/[^\w.-]+/g,"")},[hi,bi]),Cr=De.useRef(""),vi=De.useCallback(function(er,ir){if(Ni)return Ni(er,{userTyping:ir,input:String(Cr.current)});var fr=typeof er=="number"?ve(er):er;if(!ir){var _t=Hn(fr,ir);if(Fe(fr)&&(bi||_t>=0)){var vt=bi||".";fr=Ee(fr,vt,_t)}}return fr},[Ni,Hn,bi]),_i=De.useState(function(){var er=mr!=null?mr:or;return Ao.isInvalidate()&&["string","number"].includes((0,ae.Z)(er))?Number.isNaN(er)?"":er:vi(Ao.toString(),!1)}),ji=(0,le.Z)(_i,2),Xi=ji[0],Ci=ji[1];Cr.current=Xi;function _o(er,ir){Ci(vi(er.isInvalidate()?er.toString(!1):er.toString(!ir),ir))}var To=De.useMemo(function(){return en(Ft)},[Ft,yr]),Ko=De.useMemo(function(){return en(xt)},[xt,yr]),Tn=De.useMemo(function(){return!To||!Ao||Ao.isInvalidate()?!1:To.lessEquals(Ao)},[To,Ao]),Bn=De.useMemo(function(){return!Ko||!Ao||Ao.isInvalidate()?!1:Ao.lessEquals(Ko)},[Ko,Ao]),Qn=Mn(oo.current,ra),He=(0,le.Z)(Qn,2),lt=He[0],ut=He[1],gt=function(ir){return To&&!ir.lessEquals(To)?To:Ko&&!Ko.lessEquals(ir)?Ko:null},yt=function(ir){return!gt(ir)},kt=function(ir,fr){var _t=ir,vt=yt(_t)||_t.isEmpty();if(!_t.isEmpty()&&!fr&&(_t=gt(_t)||_t,vt=!0),!Xn&&!cr&&vt){var Xe=_t.toString(),ot=Hn(Xe,fr);return ot>=0&&(_t=be(Ee(Xe,".",ot)),yt(_t)||(_t=be(Ee(Xe,".",ot,!0)))),_t.equals(Ao)||(sn(_t),ar==null||ar(_t.isEmpty()?null:bn(Ir,_t)),or===void 0&&_o(_t,fr)),_t}return Ao},At=Dt(),tn=function er(ir){if(lt(),Cr.current=ir,Ci(ir),!No.current){var fr=lr(ir),_t=be(fr);_t.isNaN()||kt(_t,!0)}fo==null||fo(ir),At(function(){var vt=ir;hi||(vt=ir.replace(/。/g,".")),vt!==ir&&er(vt)})},fn=function(){No.current=!0},jn=function(){No.current=!1,tn(oo.current.value)},qn=function(ir){tn(ir.target.value)},Kn=function(ir){var fr;if(!(ir&&Tn||!ir&&Bn)){Ho.current=!1;var _t=be(Ba.current?wt(Rn):Rn);ir||(_t=_t.negate());var vt=(Ao||be(0)).add(_t.toString()),Xe=kt(vt,!1);ua==null||ua(bn(Ir,Xe),{offset:Ba.current?wt(Rn):Rn,type:ir?"up":"down"}),(fr=oo.current)===null||fr===void 0||fr.focus()}},An=function(ir){var fr=be(lr(Xi)),_t=fr;fr.isNaN()?_t=kt(Ao,ir):_t=kt(fr,ir),or!==void 0?_o(Ao,!1):_t.isNaN()||_o(_t,!1)},Dn=function(){Ho.current=!0},wn=function(ir){var fr=ir.key,_t=ir.shiftKey;Ho.current=!0,Ba.current=_t,fr==="Enter"&&(No.current||(Ho.current=!1),An(!1),qi==null||qi(ir)),mn!==!1&&!No.current&&["Up","ArrowUp","Down","ArrowDown"].includes(fr)&&(Kn(fr==="Up"||fr==="ArrowUp"),ir.preventDefault())},Un=function(){Ho.current=!1,Ba.current=!1},vr=function(){An(!1),ea(!1),Ho.current=!1};return Ke(function(){Ao.isInvalidate()||_o(Ao,!1)},[yr]),Ke(function(){var er=be(or);pn(er);var ir=be(lr(Xi));(!er.equals(ir)||!Ho.current||Ni)&&_o(er,Ho.current)},[or]),Ke(function(){Ni&&ut()},[Xi]),De.createElement("div",{className:Ce()(Ae,qr==null?void 0:qr.input,We,(ge={},(0,fe.Z)(ge,"".concat(Ae,"-focused"),ra),(0,fe.Z)(ge,"".concat(Ae,"-disabled"),cr),(0,fe.Z)(ge,"".concat(Ae,"-readonly"),Xn),(0,fe.Z)(ge,"".concat(Ae,"-not-a-number"),Ao.isNaN()),(0,fe.Z)(ge,"".concat(Ae,"-out-of-range"),!Ao.isInvalidate()&&!yt(Ao)),ge)),style:it,onFocus:function(){ea(!0)},onBlur:vr,onKeyDown:wn,onKeyUp:Un,onCompositionStart:fn,onCompositionEnd:jn,onBeforeInput:Dn},Vr&&De.createElement(Vt,{prefixCls:Ae,upNode:br,downNode:_r,upDisabled:Tn,downDisabled:Bn,onStep:Kn}),De.createElement("div",{className:"".concat(bo,"-wrap")},De.createElement("input",(0,ce.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":xt,"aria-valuemax":Ft,"aria-valuenow":Ao.isInvalidate()?null:Ao.toString(),step:Rn},Jo,{ref:tt(oo,Ot),className:bo,value:Xi,onChange:qn,disabled:cr,readOnly:Xn}))))}),Yn=De.forwardRef(function(Zt,Ot){var ge=Zt.disabled,Ie=Zt.style,Ae=Zt.prefixCls,We=Zt.value,it=Zt.prefix,xt=Zt.suffix,Ft=Zt.addonBefore,an=Zt.addonAfter,Rn=Zt.classes,mr=Zt.className,or=Zt.classNames,cr=(0,re.Z)(Zt,nn),Xn=De.useRef(null),br=function(mn){Xn.current&&(0,on.nH)(Xn.current,mn)};return De.createElement(Re.BaseInput,{inputElement:De.createElement(Zn,(0,ce.Z)({prefixCls:Ae,disabled:ge,classNames:or,ref:tt(Xn,Ot)},cr)),className:mr,triggerFocus:br,prefixCls:Ae,value:We,disabled:ge,style:Ie,prefix:it,suffix:xt,addonAfter:an,addonBefore:Ft,classes:Rn,classNames:or,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});Yn.displayName="InputNumber";var pr=Yn,ti=pr,Pn=ee(9708),Or=ee(53124),Br=ee(46735),Di=ee(98866),mi=ee(98675),ci=ee(65223),Fr=ee(4173),zr=ee(47673),Fi=ee(14747),ko=ee(80110),aa=ee(67968),Wo=ee(45503);const li=(Zt,Ot)=>{let{componentCls:ge,borderRadiusSM:Ie,borderRadiusLG:Ae}=Zt;const We=Ot==="lg"?Ae:Ie;return{[`&-${Ot}`]:{[`${ge}-handler-wrap`]:{borderStartEndRadius:We,borderEndEndRadius:We},[`${ge}-handler-up`]:{borderStartEndRadius:We},[`${ge}-handler-down`]:{borderEndEndRadius:We}}}},rn=Zt=>{const{componentCls:Ot,lineWidth:ge,lineType:Ie,colorBorder:Ae,borderRadius:We,fontSizeLG:it,controlHeightLG:xt,controlHeightSM:Ft,colorError:an,paddingInlineSM:Rn,colorTextDescription:mr,motionDurationMid:or,handleHoverColor:cr,paddingInline:Xn,paddingBlock:br,handleBg:_r,handleActiveBg:mn,colorTextDisabled:$n,borderRadiusSM:Vr,borderRadiusLG:qr,controlWidth:Ir,handleVisible:hi,handleBorderColor:Ni}=Zt;return[{[Ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Fi.Wf)(Zt)),(0,zr.ik)(Zt)),(0,zr.bi)(Zt,Ot)),{display:"inline-block",width:Ir,margin:0,padding:0,border:`${ge}px ${Ie} ${Ae}`,borderRadius:We,"&-rtl":{direction:"rtl",[`${Ot}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:it,borderRadius:qr,[`input${Ot}-input`]:{height:xt-2*ge}},"&-sm":{padding:0,borderRadius:Vr,[`input${Ot}-input`]:{height:Ft-2*ge,padding:`0 ${Rn}px`}},"&:hover":Object.assign({},(0,zr.pU)(Zt)),"&-focused":Object.assign({},(0,zr.M1)(Zt)),"&-out-of-range":{[`${Ot}-input-wrap`]:{input:{color:an}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Fi.Wf)(Zt)),(0,zr.s7)(Zt)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Ot}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Ot}-group-addon`]:{borderRadius:qr,fontSize:Zt.fontSizeLG}},"&-sm":{[`${Ot}-group-addon`]:{borderRadius:Vr}},[`${Ot}-wrapper-disabled > ${Ot}-group-addon`]:Object.assign({},(0,zr.Xy)(Zt))}}),[`&-disabled ${Ot}-input`]:{cursor:"not-allowed"},[Ot]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Fi.Wf)(Zt)),{width:"100%",padding:`${br}px ${Xn}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:We,outline:0,transition:`all ${or} linear`,appearance:"textfield",fontSize:"inherit"}),(0,zr.nz)(Zt.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Ot]:Object.assign(Object.assign(Object.assign({[`&:hover ${Ot}-handler-wrap, &-focused ${Ot}-handler-wrap`]:{opacity:1},[`${Ot}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Zt.handleWidth,height:"100%",background:_r,borderStartStartRadius:0,borderStartEndRadius:We,borderEndEndRadius:We,borderEndStartRadius:0,opacity:hi===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${or} linear ${or}`,[`${Ot}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${Ot}-handler-up-inner,
|
|
|
${Ot}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:Zt.handleFontSize}}},[`${Ot}-handler`]:{height:"50%",overflow:"hidden",color:mr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${ge}px ${Ie} ${Ni}`,transition:`all ${or} linear`,"&:active":{background:mn},"&:hover":{height:"60%",[`
|
|
|
${Ot}-handler-up-inner,
|
|
|
${Ot}-handler-down-inner
|
|
|
`]:{color:cr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Fi.Ro)()),{color:mr,transition:`all ${or} linear`,userSelect:"none"})},[`${Ot}-handler-up`]:{borderStartEndRadius:We},[`${Ot}-handler-down`]:{borderBlockStart:`${ge}px ${Ie} ${Ni}`,borderEndEndRadius:We}},li(Zt,"lg")),li(Zt,"sm")),{"&-disabled, &-readonly":{[`${Ot}-handler-wrap`]:{display:"none"},[`${Ot}-input`]:{color:"inherit"}},[`
|
|
|
${Ot}-handler-up-disabled,
|
|
|
${Ot}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${Ot}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${Ot}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:$n}})},{[`${Ot}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Ot}-handler-down`]:{borderBlockStartWidth:0}}}]},nr=Zt=>{const{componentCls:Ot,paddingBlock:ge,paddingInline:Ie,inputAffixPadding:Ae,controlWidth:We,borderRadiusLG:it,borderRadiusSM:xt}=Zt;return{[`${Ot}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,zr.ik)(Zt)),(0,zr.bi)(Zt,`${Ot}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:We,padding:0,paddingInlineStart:Ie,"&-lg":{borderRadius:it},"&-sm":{borderRadius:xt},[`&:not(${Ot}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,zr.pU)(Zt)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Ot}-disabled`]:{background:"transparent"},[`> div${Ot}`]:{width:"100%",border:"none",outline:"none",[`&${Ot}-focused`]:{boxShadow:"none !important"}},[`input${Ot}-input`]:{padding:`${ge}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Ot}-handler-wrap`]:{zIndex:2},[Ot]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Ae},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Ie,marginInlineStart:Ae}}})}};var dr=(0,aa.Z)("InputNumber",Zt=>{const Ot=(0,Wo.TS)(Zt,(0,zr.e5)(Zt));return[rn(Ot),nr(Ot),(0,ko.c)(Ot)]},Zt=>Object.assign(Object.assign({},(0,zr.TM)(Zt)),{controlWidth:90,handleWidth:Zt.controlHeightSM-Zt.lineWidth*2,handleFontSize:Zt.fontSize/2,handleVisible:"auto",handleActiveBg:Zt.colorFillAlter,handleBg:Zt.colorBgContainer,handleHoverColor:Zt.colorPrimary,handleBorderColor:Zt.colorBorder})),rr=function(Zt,Ot){var ge={};for(var Ie in Zt)Object.prototype.hasOwnProperty.call(Zt,Ie)&&Ot.indexOf(Ie)<0&&(ge[Ie]=Zt[Ie]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Ie=Object.getOwnPropertySymbols(Zt);Ae<Ie.length;Ae++)Ot.indexOf(Ie[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Zt,Ie[Ae])&&(ge[Ie[Ae]]=Zt[Ie[Ae]]);return ge};const Jr=De.forwardRef((Zt,Ot)=>{const{getPrefixCls:ge,direction:Ie}=De.useContext(Or.E_),Ae=De.useRef(null);De.useImperativeHandle(Ot,()=>Ae.current);const{className:We,rootClassName:it,size:xt,disabled:Ft,prefixCls:an,addonBefore:Rn,addonAfter:mr,prefix:or,bordered:cr=!0,readOnly:Xn,status:br,controls:_r}=Zt,mn=rr(Zt,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),$n=ge("input-number",an),[Vr,qr]=dr($n),{compactSize:Ir,compactItemClassnames:hi}=(0,Fr.ri)($n,Ie);let Ni=De.createElement(Se.Z,{className:`${$n}-handler-up-inner`}),yr=De.createElement(te.Z,{className:`${$n}-handler-down-inner`});const bi=typeof _r=="boolean"?_r:void 0;typeof _r=="object"&&(Ni=typeof _r.upIcon=="undefined"?Ni:De.createElement("span",{className:`${$n}-handler-up-inner`},_r.upIcon),yr=typeof _r.downIcon=="undefined"?yr:De.createElement("span",{className:`${$n}-handler-down-inner`},_r.downIcon));const{hasFeedback:ar,status:fo,isFormItemInput:qi,feedbackIcon:ua}=De.useContext(ci.aM),Jo=(0,Pn.F)(fo,br),bo=(0,mi.Z)(Ho=>{var No;return(No=xt!=null?xt:Ir)!==null&&No!==void 0?No:Ho}),oo=De.useContext(Di.Z),na=Ft!=null?Ft:oo,Eo=Ce()({[`${$n}-lg`]:bo==="large",[`${$n}-sm`]:bo==="small",[`${$n}-rtl`]:Ie==="rtl",[`${$n}-borderless`]:!cr,[`${$n}-in-form-item`]:qi},(0,Pn.Z)($n,Jo),hi,qr),ra=`${$n}-group`,ea=De.createElement(ti,Object.assign({ref:Ae,disabled:na,className:Ce()(We,it),upHandler:Ni,downHandler:yr,prefixCls:$n,readOnly:Xn,controls:bi,prefix:or,suffix:ar&&ua,addonAfter:mr&&De.createElement(Fr.BR,null,De.createElement(ci.Ux,{override:!0,status:!0},mr)),addonBefore:Rn&&De.createElement(Fr.BR,null,De.createElement(ci.Ux,{override:!0,status:!0},Rn)),classNames:{input:Eo},classes:{affixWrapper:Ce()((0,Pn.Z)(`${$n}-affix-wrapper`,Jo,ar),{[`${$n}-affix-wrapper-sm`]:bo==="small",[`${$n}-affix-wrapper-lg`]:bo==="large",[`${$n}-affix-wrapper-rtl`]:Ie==="rtl",[`${$n}-affix-wrapper-borderless`]:!cr},qr),wrapper:Ce()({[`${ra}-rtl`]:Ie==="rtl",[`${$n}-wrapper-disabled`]:na},qr),group:Ce()({[`${$n}-group-wrapper-sm`]:bo==="small",[`${$n}-group-wrapper-lg`]:bo==="large",[`${$n}-group-wrapper-rtl`]:Ie==="rtl"},(0,Pn.Z)(`${$n}-group-wrapper`,Jo,ar),qr)}},mn));return Vr(ea)}),Ar=Jr,Mr=Zt=>De.createElement(Br.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},De.createElement(Jr,Object.assign({},Zt)));Ar._InternalPanelDoNotUseOrYouWillBeFired=Mr;var tr=Ar},82586:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return $e},n:function(){return ve}});var te=ee(16646),Se=ee(94184),Le=ee.n(Se),Ce=ee(67656),ce=ee(17799),fe=ee(67294),ae=ee(9708),le=ee(53124),re=ee(98866),de=ee(98675),he=ee(65223),me=ee(4173),se=ee(72922),ye=ee(47673);function _e(Te){return!!(Te.prefix||Te.suffix||Te.allowClear)}var Me=function(Te,ze){var Ee={};for(var be in Te)Object.prototype.hasOwnProperty.call(Te,be)&&ze.indexOf(be)<0&&(Ee[be]=Te[be]);if(Te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,be=Object.getOwnPropertySymbols(Te);Re<be.length;Re++)ze.indexOf(be[Re])<0&&Object.prototype.propertyIsEnumerable.call(Te,be[Re])&&(Ee[be[Re]]=Te[be[Re]]);return Ee};function ve(Te,ze){if(!Te)return;Te.focus(ze);const{cursor:Ee}=ze||{};if(Ee){const be=Te.value.length;switch(Ee){case"start":Te.setSelectionRange(0,0);break;case"end":Te.setSelectionRange(be,be);break;default:Te.setSelectionRange(0,be);break}}}var $e=(0,fe.forwardRef)((Te,ze)=>{var Ee;const{prefixCls:be,bordered:Re=!0,status:De,size:et,disabled:Ye,onBlur:dt,onFocus:Ke,suffix:zt,allowClear:pt,addonAfter:Kt,addonBefore:Ze,className:tt,style:ft,styles:Ut,rootClassName:nt,onChange:Ge,classNames:jt}=Te,yn=Me(Te,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ln,direction:Tt,input:Lt}=fe.useContext(le.E_),Jt=ln("input",be),kn=(0,fe.useRef)(null),[In,Qt]=(0,ye.ZP)(Jt),{compactSize:Mn,compactItemClassnames:Wn}=(0,me.ri)(Jt,Tt),zn=(0,de.Z)(Xt=>{var nn;return(nn=et!=null?et:Mn)!==null&&nn!==void 0?nn:Xt}),at=fe.useContext(re.Z),Oe=Ye!=null?Ye:at,{status:ke,hasFeedback:Be,feedbackIcon:Ne}=(0,fe.useContext)(he.aM),we=(0,ae.F)(ke,De),rt=_e(Te)||!!Be,It=(0,fe.useRef)(rt);(0,fe.useEffect)(()=>{var Xt;rt&&It.current,It.current=rt},[rt]);const Ct=(0,se.Z)(kn,!0),$t=Xt=>{Ct(),dt==null||dt(Xt)},Vt=Xt=>{Ct(),Ke==null||Ke(Xt)},wt=Xt=>{Ct(),Ge==null||Ge(Xt)},on=(Be||zt)&&fe.createElement(fe.Fragment,null,zt,Be&&Ne);let Dt;return typeof pt=="object"&&(pt!=null&&pt.clearIcon)?Dt=pt:pt&&(Dt={clearIcon:fe.createElement(te.Z,null)}),In(fe.createElement(Ce.default,Object.assign({ref:(0,ce.sQ)(ze,kn),prefixCls:Jt,autoComplete:Lt==null?void 0:Lt.autoComplete},yn,{disabled:Oe,onBlur:$t,onFocus:Vt,style:Object.assign(Object.assign({},Lt==null?void 0:Lt.style),ft),styles:Object.assign(Object.assign({},Lt==null?void 0:Lt.styles),Ut),suffix:on,allowClear:Dt,className:Le()(tt,nt,Wn,Lt==null?void 0:Lt.className),onChange:wt,addonAfter:Kt&&fe.createElement(me.BR,null,fe.createElement(he.Ux,{override:!0,status:!0},Kt)),addonBefore:Ze&&fe.createElement(me.BR,null,fe.createElement(he.Ux,{override:!0,status:!0},Ze)),classNames:Object.assign(Object.assign(Object.assign({},jt),Lt==null?void 0:Lt.classNames),{input:Le()({[`${Jt}-sm`]:zn==="small",[`${Jt}-lg`]:zn==="large",[`${Jt}-rtl`]:Tt==="rtl",[`${Jt}-borderless`]:!Re},!rt&&(0,ae.Z)(Jt,we),jt==null?void 0:jt.input,(Ee=Lt==null?void 0:Lt.classNames)===null||Ee===void 0?void 0:Ee.input,Qt)}),classes:{affixWrapper:Le()({[`${Jt}-affix-wrapper-sm`]:zn==="small",[`${Jt}-affix-wrapper-lg`]:zn==="large",[`${Jt}-affix-wrapper-rtl`]:Tt==="rtl",[`${Jt}-affix-wrapper-borderless`]:!Re},(0,ae.Z)(`${Jt}-affix-wrapper`,we,Be),Qt),wrapper:Le()({[`${Jt}-group-rtl`]:Tt==="rtl"},Qt),group:Le()({[`${Jt}-group-wrapper-sm`]:zn==="small",[`${Jt}-group-wrapper-lg`]:zn==="large",[`${Jt}-group-wrapper-rtl`]:Tt==="rtl",[`${Jt}-group-wrapper-disabled`]:Oe},(0,ae.Z)(`${Jt}-group-wrapper`,we,Be),Qt)}})))})},96330:function(dn,St,ee){"use strict";var te=ee(16646),Se=ee(94184),Le=ee.n(Se),Ce=ee(64701),ce=ee(67294),fe=ee(9708),ae=ee(53124),le=ee(98866),re=ee(98675),de=ee(65223),he=ee(82586),me=ee(47673),se=function(_e,Me){var ve={};for(var Fe in _e)Object.prototype.hasOwnProperty.call(_e,Fe)&&Me.indexOf(Fe)<0&&(ve[Fe]=_e[Fe]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Fe=Object.getOwnPropertySymbols(_e);$e<Fe.length;$e++)Me.indexOf(Fe[$e])<0&&Object.prototype.propertyIsEnumerable.call(_e,Fe[$e])&&(ve[Fe[$e]]=_e[Fe[$e]]);return ve};const ye=(0,ce.forwardRef)((_e,Me)=>{const{prefixCls:ve,bordered:Fe=!0,size:$e,disabled:Te,status:ze,allowClear:Ee,showCount:be,classNames:Re,rootClassName:De,className:et}=_e,Ye=se(_e,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:dt,direction:Ke}=ce.useContext(ae.E_),zt=(0,re.Z)($e),pt=ce.useContext(le.Z),Kt=Te!=null?Te:pt,{status:Ze,hasFeedback:tt,feedbackIcon:ft}=ce.useContext(de.aM),Ut=(0,fe.F)(Ze,ze),nt=ce.useRef(null);ce.useImperativeHandle(Me,()=>{var Tt;return{resizableTextArea:(Tt=nt.current)===null||Tt===void 0?void 0:Tt.resizableTextArea,focus:Lt=>{var Jt,kn;(0,he.n)((kn=(Jt=nt.current)===null||Jt===void 0?void 0:Jt.resizableTextArea)===null||kn===void 0?void 0:kn.textArea,Lt)},blur:()=>{var Lt;return(Lt=nt.current)===null||Lt===void 0?void 0:Lt.blur()}}});const Ge=dt("input",ve);let jt;typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?jt=Ee:Ee&&(jt={clearIcon:ce.createElement(te.Z,null)});const[yn,ln]=(0,me.ZP)(Ge);return yn(ce.createElement(Ce.default,Object.assign({},Ye,{disabled:Kt,allowClear:jt,className:Le()(et,De),classes:{affixWrapper:Le()(`${Ge}-textarea-affix-wrapper`,{[`${Ge}-affix-wrapper-rtl`]:Ke==="rtl",[`${Ge}-affix-wrapper-borderless`]:!Fe,[`${Ge}-affix-wrapper-sm`]:zt==="small",[`${Ge}-affix-wrapper-lg`]:zt==="large",[`${Ge}-textarea-show-count`]:be},(0,fe.Z)(`${Ge}-affix-wrapper`,Ut),ln)},classNames:Object.assign(Object.assign({},Re),{textarea:Le()({[`${Ge}-borderless`]:!Fe,[`${Ge}-sm`]:zt==="small",[`${Ge}-lg`]:zt==="large"},(0,fe.Z)(Ge,Ut),ln,Re==null?void 0:Re.textarea)}),prefixCls:Ge,suffix:tt&&ce.createElement("span",{className:`${Ge}-textarea-suffix`},ft),showCount:be,ref:nt})))});St.Z=ye},72922:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});var te=ee(67294);function Se(Le,Ce){const ce=(0,te.useRef)([]),fe=()=>{ce.current.push(setTimeout(()=>{var ae,le,re,de;!((ae=Le.current)===null||ae===void 0)&&ae.input&&((le=Le.current)===null||le===void 0?void 0:le.input.getAttribute("type"))==="password"&&(!((re=Le.current)===null||re===void 0)&&re.input.hasAttribute("value"))&&((de=Le.current)===null||de===void 0||de.input.removeAttribute("value"))}))};return(0,te.useEffect)(()=>(Ce&&fe(),()=>ce.current.forEach(ae=>{ae&&clearTimeout(ae)})),[]),fe}},69677:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return zt}});var te=ee(94184),Se=ee.n(te),Le=ee(67294),Ce=ee(53124),ce=ee(65223),fe=ee(47673),le=pt=>{const{getPrefixCls:Kt,direction:Ze}=(0,Le.useContext)(Ce.E_),{prefixCls:tt,className:ft}=pt,Ut=Kt("input-group",tt),nt=Kt("input"),[Ge,jt]=(0,fe.ZP)(nt),yn=Se()(Ut,{[`${Ut}-lg`]:pt.size==="large",[`${Ut}-sm`]:pt.size==="small",[`${Ut}-compact`]:pt.compact,[`${Ut}-rtl`]:Ze==="rtl"},jt,ft),ln=(0,Le.useContext)(ce.aM),Tt=(0,Le.useMemo)(()=>Object.assign(Object.assign({},ln),{isFormItemInput:!1}),[ln]);return Ge(Le.createElement("span",{className:yn,style:pt.style,onMouseEnter:pt.onMouseEnter,onMouseLeave:pt.onMouseLeave,onFocus:pt.onFocus,onBlur:pt.onBlur},Le.createElement(ce.aM.Provider,{value:Tt},pt.children)))},re=ee(82586),de=ee(63237),he=ee(99569),me=ee(10366),se=ee(17799),ye=ee(72922),_e=function(pt,Kt){var Ze={};for(var tt in pt)Object.prototype.hasOwnProperty.call(pt,tt)&&Kt.indexOf(tt)<0&&(Ze[tt]=pt[tt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,tt=Object.getOwnPropertySymbols(pt);ft<tt.length;ft++)Kt.indexOf(tt[ft])<0&&Object.prototype.propertyIsEnumerable.call(pt,tt[ft])&&(Ze[tt[ft]]=pt[tt[ft]]);return Ze};const Me=pt=>pt?Le.createElement(he.Z,null):Le.createElement(de.Z,null),ve={click:"onClick",hover:"onMouseOver"};var $e=Le.forwardRef((pt,Kt)=>{const{visibilityToggle:Ze=!0}=pt,tt=typeof Ze=="object"&&Ze.visible!==void 0,[ft,Ut]=(0,Le.useState)(()=>tt?Ze.visible:!1),nt=(0,Le.useRef)(null);Le.useEffect(()=>{tt&&Ut(Ze.visible)},[tt,Ze]);const Ge=(0,ye.Z)(nt),jt=()=>{const{disabled:Oe}=pt;Oe||(ft&&Ge(),Ut(ke=>{var Be;const Ne=!ke;return typeof Ze=="object"&&((Be=Ze.onVisibleChange)===null||Be===void 0||Be.call(Ze,Ne)),Ne}))},yn=Oe=>{const{action:ke="click",iconRender:Be=Me}=pt,Ne=ve[ke]||"",we=Be(ft),rt={[Ne]:jt,className:`${Oe}-icon`,key:"passwordIcon",onMouseDown:It=>{It.preventDefault()},onMouseUp:It=>{It.preventDefault()}};return Le.cloneElement(Le.isValidElement(we)?we:Le.createElement("span",null,we),rt)},{className:ln,prefixCls:Tt,inputPrefixCls:Lt,size:Jt}=pt,kn=_e(pt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:In}=Le.useContext(Ce.E_),Qt=In("input",Lt),Mn=In("input-password",Tt),Wn=Ze&&yn(Mn),zn=Se()(Mn,ln,{[`${Mn}-${Jt}`]:!!Jt}),at=Object.assign(Object.assign({},(0,me.Z)(kn,["suffix","iconRender","visibilityToggle"])),{type:ft?"text":"password",className:zn,prefixCls:Qt,suffix:Wn});return Jt&&(at.size=Jt),Le.createElement(re.Z,Object.assign({ref:(0,se.sQ)(Kt,nt)},at))}),Te=ee(72395),ze=ee(96159),Ee=ee(71577),be=ee(98675),Re=ee(4173),De=function(pt,Kt){var Ze={};for(var tt in pt)Object.prototype.hasOwnProperty.call(pt,tt)&&Kt.indexOf(tt)<0&&(Ze[tt]=pt[tt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,tt=Object.getOwnPropertySymbols(pt);ft<tt.length;ft++)Kt.indexOf(tt[ft])<0&&Object.prototype.propertyIsEnumerable.call(pt,tt[ft])&&(Ze[tt[ft]]=pt[tt[ft]]);return Ze},Ye=Le.forwardRef((pt,Kt)=>{const{prefixCls:Ze,inputPrefixCls:tt,className:ft,size:Ut,suffix:nt,enterButton:Ge=!1,addonAfter:jt,loading:yn,disabled:ln,onSearch:Tt,onChange:Lt,onCompositionStart:Jt,onCompositionEnd:kn}=pt,In=De(pt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Qt,direction:Mn}=Le.useContext(Ce.E_),Wn=Le.useRef(!1),zn=Qt("input-search",Ze),at=Qt("input",tt),{compactSize:Oe}=(0,Re.ri)(zn,Mn),ke=(0,be.Z)(bn=>{var en;return(en=Ut!=null?Ut:Oe)!==null&&en!==void 0?en:bn}),Be=Le.useRef(null),Ne=bn=>{bn&&bn.target&&bn.type==="click"&&Tt&&Tt(bn.target.value,bn,{source:"clear"}),Lt&&Lt(bn)},we=bn=>{var en;document.activeElement===((en=Be.current)===null||en===void 0?void 0:en.input)&&bn.preventDefault()},rt=bn=>{var en,Zn;Tt&&Tt((Zn=(en=Be.current)===null||en===void 0?void 0:en.input)===null||Zn===void 0?void 0:Zn.value,bn,{source:"input"})},It=bn=>{Wn.current||yn||rt(bn)},Ct=typeof Ge=="boolean"?Le.createElement(Te.Z,null):null,$t=`${zn}-button`;let Vt;const wt=Ge||{},on=wt.type&&wt.type.__ANT_BUTTON===!0;on||wt.type==="button"?Vt=(0,ze.Tm)(wt,Object.assign({onMouseDown:we,onClick:bn=>{var en,Zn;(Zn=(en=wt==null?void 0:wt.props)===null||en===void 0?void 0:en.onClick)===null||Zn===void 0||Zn.call(en,bn),rt(bn)},key:"enterButton"},on?{className:$t,size:ke}:{})):Vt=Le.createElement(Ee.ZP,{className:$t,type:Ge?"primary":void 0,size:ke,disabled:ln,key:"enterButton",onMouseDown:we,onClick:rt,loading:yn,icon:Ct},Ge),jt&&(Vt=[Vt,(0,ze.Tm)(jt,{key:"addonAfter"})]);const Dt=Se()(zn,{[`${zn}-rtl`]:Mn==="rtl",[`${zn}-${ke}`]:!!ke,[`${zn}-with-button`]:!!Ge},ft),Xt=bn=>{Wn.current=!0,Jt==null||Jt(bn)},nn=bn=>{Wn.current=!1,kn==null||kn(bn)};return Le.createElement(re.Z,Object.assign({ref:(0,se.sQ)(Be,Kt),onPressEnter:It},In,{size:ke,onCompositionStart:Xt,onCompositionEnd:nn,prefixCls:at,addonAfter:Vt,suffix:nt,onChange:Ne,className:Dt,disabled:ln}))}),dt=ee(96330);const Ke=re.Z;Ke.Group=le,Ke.Search=Ye,Ke.TextArea=dt.Z,Ke.Password=$e;var zt=Ke},47673:function(dn,St,ee){"use strict";ee.d(St,{M1:function(){return ae},TM:function(){return ze},Xy:function(){return le},bi:function(){return he},e5:function(){return Te},ik:function(){return me},nz:function(){return ce},pU:function(){return fe},s7:function(){return se},x0:function(){return de}});var te=ee(14747),Se=ee(80110),Le=ee(45503),Ce=ee(67968);const ce=Ee=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Ee,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),fe=Ee=>({borderColor:Ee.hoverBorderColor}),ae=Ee=>({borderColor:Ee.activeBorderColor,boxShadow:Ee.activeShadow,outline:0}),le=Ee=>({color:Ee.colorTextDisabled,backgroundColor:Ee.colorBgContainerDisabled,borderColor:Ee.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},fe((0,Le.TS)(Ee,{hoverBorderColor:Ee.colorBorder})))}),re=Ee=>{const{paddingBlockLG:be,fontSizeLG:Re,lineHeightLG:De,borderRadiusLG:et,paddingInlineLG:Ye}=Ee;return{padding:`${be}px ${Ye}px`,fontSize:Re,lineHeight:De,borderRadius:et}},de=Ee=>({padding:`${Ee.paddingBlockSM}px ${Ee.paddingInlineSM}px`,borderRadius:Ee.borderRadiusSM}),he=(Ee,be)=>{const{componentCls:Re,colorError:De,colorWarning:et,errorActiveShadow:Ye,warningActiveShadow:dt,colorErrorBorderHover:Ke,colorWarningBorderHover:zt}=Ee;return{[`&-status-error:not(${be}-disabled):not(${be}-borderless)${be}`]:{borderColor:De,"&:hover":{borderColor:Ke},"&:focus, &-focused":Object.assign({},ae((0,Le.TS)(Ee,{activeBorderColor:De,activeShadow:Ye}))),[`${Re}-prefix, ${Re}-suffix`]:{color:De}},[`&-status-warning:not(${be}-disabled):not(${be}-borderless)${be}`]:{borderColor:et,"&:hover":{borderColor:zt},"&:focus, &-focused":Object.assign({},ae((0,Le.TS)(Ee,{activeBorderColor:et,activeShadow:dt}))),[`${Re}-prefix, ${Re}-suffix`]:{color:et}}}},me=Ee=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Ee.paddingBlock}px ${Ee.paddingInline}px`,color:Ee.colorText,fontSize:Ee.fontSize,lineHeight:Ee.lineHeight,backgroundColor:Ee.colorBgContainer,backgroundImage:"none",borderWidth:Ee.lineWidth,borderStyle:Ee.lineType,borderColor:Ee.colorBorder,borderRadius:Ee.borderRadius,transition:`all ${Ee.motionDurationMid}`},ce(Ee.colorTextPlaceholder)),{"&:hover":Object.assign({},fe(Ee)),"&:focus, &-focused":Object.assign({},ae(Ee)),"&-disabled, &[disabled]":Object.assign({},le(Ee)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:Ee.controlHeight,lineHeight:Ee.lineHeight,verticalAlign:"bottom",transition:`all ${Ee.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},re(Ee)),"&-sm":Object.assign({},de(Ee)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),se=Ee=>{const{componentCls:be,antCls:Re}=Ee;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:Ee.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${be}, &-lg > ${be}-group-addon`]:Object.assign({},re(Ee)),[`&-sm ${be}, &-sm > ${be}-group-addon`]:Object.assign({},de(Ee)),[`&-lg ${Re}-select-single ${Re}-select-selector`]:{height:Ee.controlHeightLG},[`&-sm ${Re}-select-single ${Re}-select-selector`]:{height:Ee.controlHeightSM},[`> ${be}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${be}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Ee.paddingInline}px`,color:Ee.colorText,fontWeight:"normal",fontSize:Ee.fontSize,textAlign:"center",backgroundColor:Ee.colorFillAlter,border:`${Ee.lineWidth}px ${Ee.lineType} ${Ee.colorBorder}`,borderRadius:Ee.borderRadius,transition:`all ${Ee.motionDurationSlow}`,lineHeight:1,[`${Re}-select`]:{margin:`-${Ee.paddingBlock+1}px -${Ee.paddingInline}px`,[`&${Re}-select-single:not(${Re}-select-customize-input)`]:{[`${Re}-select-selector`]:{backgroundColor:"inherit",border:`${Ee.lineWidth}px ${Ee.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Re}-select-selector`]:{color:Ee.colorPrimary}}},[`${Re}-cascader-picker`]:{margin:`-9px -${Ee.paddingInline}px`,backgroundColor:"transparent",[`${Re}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${be}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${be}-search-with-button &`]:{zIndex:0}}},[`> ${be}:first-child, ${be}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Re}-select ${Re}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${be}-affix-wrapper`]:{[`&:not(:first-child) ${be}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${be}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${be}:last-child, ${be}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Re}-select ${Re}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${be}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${be}-search &`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius}},[`&:not(:first-child), ${be}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${be}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,te.dF)()),{[`${be}-group-addon, ${be}-group-wrap, > ${be}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Ee.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${be}-affix-wrapper,
|
|
|
& > ${be}-number-affix-wrapper,
|
|
|
& > ${Re}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-Ee.lineWidth,borderInlineEndWidth:Ee.lineWidth},[`${be}`]:{float:"none"},[`& > ${Re}-select > ${Re}-select-selector,
|
|
|
& > ${Re}-select-auto-complete ${be},
|
|
|
& > ${Re}-cascader-picker ${be},
|
|
|
& > ${be}-group-wrapper ${be}`]:{borderInlineEndWidth:Ee.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Re}-select-focused`]:{zIndex:1},[`& > ${Re}-select > ${Re}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Re}-select:first-child > ${Re}-select-selector,
|
|
|
& > ${Re}-select-auto-complete:first-child ${be},
|
|
|
& > ${Re}-cascader-picker:first-child ${be}`]:{borderStartStartRadius:Ee.borderRadius,borderEndStartRadius:Ee.borderRadius},[`& > *:last-child,
|
|
|
& > ${Re}-select:last-child > ${Re}-select-selector,
|
|
|
& > ${Re}-cascader-picker:last-child ${be},
|
|
|
& > ${Re}-cascader-picker-focused:last-child ${be}`]:{borderInlineEndWidth:Ee.lineWidth,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius},[`& > ${Re}-select-auto-complete ${be}`]:{verticalAlign:"top"},[`${be}-group-wrapper + ${be}-group-wrapper`]:{marginInlineStart:-Ee.lineWidth,[`${be}-affix-wrapper`]:{borderRadius:0}},[`${be}-group-wrapper:not(:last-child)`]:{[`&${be}-search > ${be}-group`]:{[`& > ${be}-group-addon > ${be}-search-button`]:{borderRadius:0},[`& > ${be}`]:{borderStartStartRadius:Ee.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Ee.borderRadius}}}})}},ye=Ee=>{const{componentCls:be,controlHeightSM:Re,lineWidth:De}=Ee,Ye=(Re-De*2-16)/2;return{[be]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,te.Wf)(Ee)),me(Ee)),he(Ee,be)),{'&[type="color"]':{height:Ee.controlHeight,[`&${be}-lg`]:{height:Ee.controlHeightLG},[`&${be}-sm`]:{height:Re,paddingTop:Ye,paddingBottom:Ye}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},_e=Ee=>{const{componentCls:be}=Ee;return{[`${be}-clear-icon`]:{margin:0,color:Ee.colorTextQuaternary,fontSize:Ee.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Ee.motionDurationSlow}`,"&:hover":{color:Ee.colorTextTertiary},"&:active":{color:Ee.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Ee.inputAffixPadding}px`}}}},Me=Ee=>{const{componentCls:be,inputAffixPadding:Re,colorTextDescription:De,motionDurationSlow:et,colorIcon:Ye,colorIconHover:dt,iconCls:Ke}=Ee;return{[`${be}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},me(Ee)),{display:"inline-flex",[`&:not(${be}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},fe(Ee)),{zIndex:1,[`${be}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${be}[disabled]`]:{background:"transparent"}},[`> input${be}`]:{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"'},[`${be}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Ee.paddingXS}},"&-show-count-suffix":{color:De},"&-show-count-has-suffix":{marginInlineEnd:Ee.paddingXXS},"&-prefix":{marginInlineEnd:Re},"&-suffix":{marginInlineStart:Re}}}),_e(Ee)),{[`${Ke}${be}-password-icon`]:{color:Ye,cursor:"pointer",transition:`all ${et}`,"&:hover":{color:dt}}}),he(Ee,`${be}-affix-wrapper`))}},ve=Ee=>{const{componentCls:be,colorError:Re,colorWarning:De,borderRadiusLG:et,borderRadiusSM:Ye}=Ee;return{[`${be}-group`]:Object.assign(Object.assign(Object.assign({},(0,te.Wf)(Ee)),se(Ee)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${be}-group-addon`]:{borderRadius:et,fontSize:Ee.fontSizeLG}},"&-sm":{[`${be}-group-addon`]:{borderRadius:Ye}},"&-status-error":{[`${be}-group-addon`]:{color:Re,borderColor:Re}},"&-status-warning":{[`${be}-group-addon`]:{color:De,borderColor:De}},"&-disabled":{[`${be}-group-addon`]:Object.assign({},le(Ee))},[`&:not(${be}-compact-first-item):not(${be}-compact-last-item)${be}-compact-item`]:{[`${be}, ${be}-group-addon`]:{borderRadius:0}},[`&:not(${be}-compact-last-item)${be}-compact-first-item`]:{[`${be}, ${be}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${be}-compact-first-item)${be}-compact-last-item`]:{[`${be}, ${be}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Fe=Ee=>{const{componentCls:be,antCls:Re}=Ee,De=`${be}-search`;return{[De]:{[`${be}`]:{"&:hover, &:focus":{borderColor:Ee.colorPrimaryHover,[`+ ${be}-group-addon ${De}-button:not(${Re}-btn-primary)`]:{borderInlineStartColor:Ee.colorPrimaryHover}}},[`${be}-affix-wrapper`]:{borderRadius:0},[`${be}-lg`]:{lineHeight:Ee.lineHeightLG-2e-4},[`> ${be}-group`]:{[`> ${be}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${De}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Ee.borderRadius,borderEndEndRadius:Ee.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${De}-button:not(${Re}-btn-primary)`]:{color:Ee.colorTextDescription,"&:hover":{color:Ee.colorPrimaryHover},"&:active":{color:Ee.colorPrimaryActive},[`&${Re}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${De}-button`]:{height:Ee.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${De}-button`]:{height:Ee.controlHeightLG},[`&-small ${De}-button`]:{height:Ee.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${be}-compact-item`]:{[`&:not(${be}-compact-last-item)`]:{[`${be}-group-addon`]:{[`${be}-search-button`]:{marginInlineEnd:-Ee.lineWidth,borderRadius:0}}},[`&:not(${be}-compact-first-item)`]:{[`${be},${be}-affix-wrapper`]:{borderRadius:0}},[`> ${be}-group-addon ${be}-search-button,
|
|
|
> ${be},
|
|
|
${be}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${be}-affix-wrapper-focused`]:{zIndex:2}}}}},$e=Ee=>{const{componentCls:be,paddingLG:Re}=Ee,De=`${be}-textarea`;return{[De]:{position:"relative","&-show-count":{[`> ${be}`]:{height:"100%"},[`${be}-data-count`]:{position:"absolute",bottom:-Ee.fontSize*Ee.lineHeight,insetInlineEnd:0,color:Ee.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${be}`]:{paddingInlineEnd:Re}},[`&-affix-wrapper${De}-has-feedback`]:{[`${be}`]:{paddingInlineEnd:Re}},[`&-affix-wrapper${be}-affix-wrapper`]:{padding:0,[`> textarea${be}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${be}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${be}-clear-icon`]:{position:"absolute",insetInlineEnd:Ee.paddingXS,insetBlockStart:Ee.paddingXS},[`${De}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Ee.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Te(Ee){return(0,Le.TS)(Ee,{inputAffixPadding:Ee.paddingXXS})}const ze=Ee=>{const{controlHeight:be,fontSize:Re,lineHeight:De,lineWidth:et,controlHeightSM:Ye,controlHeightLG:dt,fontSizeLG:Ke,lineHeightLG:zt,paddingSM:pt,controlPaddingHorizontalSM:Kt,controlPaddingHorizontal:Ze,colorFillAlter:tt,colorPrimaryHover:ft,controlOutlineWidth:Ut,controlOutline:nt,colorErrorOutline:Ge,colorWarningOutline:jt}=Ee;return{paddingBlock:Math.max(Math.round((be-Re*De)/2*10)/10-et,3),paddingBlockSM:Math.max(Math.round((Ye-Re*De)/2*10)/10-et,0),paddingBlockLG:Math.ceil((dt-Ke*zt)/2*10)/10-et,paddingInline:pt-et,paddingInlineSM:Kt-et,paddingInlineLG:Ze-et,addonBg:tt,activeBorderColor:ft,hoverBorderColor:ft,activeShadow:`0 0 0 ${Ut}px ${nt}`,errorActiveShadow:`0 0 0 ${Ut}px ${Ge}`,warningActiveShadow:`0 0 0 ${Ut}px ${jt}`}};St.ZP=(0,Ce.Z)("Input",Ee=>{const be=(0,Le.TS)(Ee,Te(Ee));return[ye(be),$e(be),Me(be),ve(be),Fe(be),(0,Se.c)(be)]},ze)},71322:function(dn,St,ee){"use strict";ee.d(St,{D:function(){return $e},Z:function(){return Ee}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(Re,De){return Se.createElement(ce.Z,(0,te.Z)({},Re,{ref:De,icon:Ce}))},ae=Se.forwardRef(fe),le=ee(22751),re=ee(91034),de=ee(94184),he=ee.n(de),me=ee(10366),ye=be=>!isNaN(parseFloat(be))&&isFinite(be),_e=ee(53124),Me=ee(84321),ve=function(be,Re){var De={};for(var et in be)Object.prototype.hasOwnProperty.call(be,et)&&Re.indexOf(et)<0&&(De[et]=be[et]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ye=0,et=Object.getOwnPropertySymbols(be);Ye<et.length;Ye++)Re.indexOf(et[Ye])<0&&Object.prototype.propertyIsEnumerable.call(be,et[Ye])&&(De[et[Ye]]=be[et[Ye]]);return De};const Fe={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},$e=Se.createContext({}),Te=(()=>{let be=0;return function(){let Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return be+=1,`${Re}${be}`}})();var Ee=Se.forwardRef((be,Re)=>{const{prefixCls:De,className:et,trigger:Ye,children:dt,defaultCollapsed:Ke=!1,theme:zt="dark",style:pt={},collapsible:Kt=!1,reverseArrow:Ze=!1,width:tt=200,collapsedWidth:ft=80,zeroWidthTriggerStyle:Ut,breakpoint:nt,onCollapse:Ge,onBreakpoint:jt}=be,yn=ve(be,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:ln}=(0,Se.useContext)(Me.Gs),[Tt,Lt]=(0,Se.useState)("collapsed"in be?be.collapsed:Ke),[Jt,kn]=(0,Se.useState)(!1);(0,Se.useEffect)(()=>{"collapsed"in be&&Lt(be.collapsed)},[be.collapsed]);const In=(Oe,ke)=>{"collapsed"in be||Lt(Oe),Ge==null||Ge(Oe,ke)},Qt=(0,Se.useRef)();Qt.current=Oe=>{kn(Oe.matches),jt==null||jt(Oe.matches),Tt!==Oe.matches&&In(Oe.matches,"responsive")},(0,Se.useEffect)(()=>{function Oe(Be){return Qt.current(Be)}let ke;if(typeof window!="undefined"){const{matchMedia:Be}=window;if(Be&&nt&&nt in Fe){ke=Be(`(max-width: ${Fe[nt]})`);try{ke.addEventListener("change",Oe)}catch(Ne){ke.addListener(Oe)}Oe(ke)}}return()=>{try{ke==null||ke.removeEventListener("change",Oe)}catch(Be){ke==null||ke.removeListener(Oe)}}},[nt]),(0,Se.useEffect)(()=>{const Oe=Te("ant-sider-");return ln.addSider(Oe),()=>ln.removeSider(Oe)},[]);const Mn=()=>{In(!Tt,"clickTrigger")},{getPrefixCls:Wn}=(0,Se.useContext)(_e.E_),zn=()=>{const Oe=Wn("layout-sider",De),ke=(0,me.Z)(yn,["collapsed"]),Be=Tt?ft:tt,Ne=ye(Be)?`${Be}px`:String(Be),we=parseFloat(String(ft||0))===0?Se.createElement("span",{onClick:Mn,className:he()(`${Oe}-zero-width-trigger`,`${Oe}-zero-width-trigger-${Ze?"right":"left"}`),style:Ut},Ye||Se.createElement(ae,null)):null,Ct={expanded:Ze?Se.createElement(re.Z,null):Se.createElement(le.Z,null),collapsed:Ze?Se.createElement(le.Z,null):Se.createElement(re.Z,null)}[Tt?"collapsed":"expanded"],$t=Ye!==null?we||Se.createElement("div",{className:`${Oe}-trigger`,onClick:Mn,style:{width:Ne}},Ye||Ct):null,Vt=Object.assign(Object.assign({},pt),{flex:`0 0 ${Ne}`,maxWidth:Ne,minWidth:Ne,width:Ne}),wt=he()(Oe,`${Oe}-${zt}`,{[`${Oe}-collapsed`]:!!Tt,[`${Oe}-has-trigger`]:Kt&&Ye!==null&&!we,[`${Oe}-below`]:!!Jt,[`${Oe}-zero-width`]:parseFloat(Ne)===0},et);return Se.createElement("aside",Object.assign({className:wt},ke,{style:Vt,ref:Re}),Se.createElement("div",{className:`${Oe}-children`},dt),Kt||Jt&&we?$t:null)},at=Se.useMemo(()=>({siderCollapsed:Tt}),[Tt]);return Se.createElement($e.Provider,{value:at},zn())})},84321:function(dn,St,ee){"use strict";ee.d(St,{VY:function(){return Te},$_:function(){return $e},h4:function(){return Fe},Gs:function(){return se},ZP:function(){return ze}});var te=ee(74902),Se=ee(94184),Le=ee.n(Se),Ce=ee(10366),ce=ee(67294),fe=ee(53124),ae=ee(67968),re=Ee=>{const{componentCls:be,bodyBg:Re,lightSiderBg:De,lightTriggerBg:et,lightTriggerColor:Ye}=Ee;return{[`${be}-sider-light`]:{background:De,[`${be}-sider-trigger`]:{color:Ye,background:et},[`${be}-sider-zero-width-trigger`]:{color:Ye,background:et,border:`1px solid ${Re}`,borderInlineStart:0}}}};const de=Ee=>{const{antCls:be,componentCls:Re,colorText:De,triggerColor:et,footerBg:Ye,triggerBg:dt,headerHeight:Ke,headerPadding:zt,headerColor:pt,footerPadding:Kt,triggerHeight:Ze,zeroTriggerHeight:tt,zeroTriggerWidth:ft,motionDurationMid:Ut,motionDurationSlow:nt,fontSize:Ge,borderRadius:jt,bodyBg:yn,headerBg:ln,siderBg:Tt}=Ee;return{[Re]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:yn,"&, *":{boxSizing:"border-box"},[`&${Re}-has-sider`]:{flexDirection:"row",[`> ${Re}, > ${Re}-content`]:{width:0}},[`${Re}-header, &${Re}-footer`]:{flex:"0 0 auto"},[`${Re}-sider`]:{position:"relative",minWidth:0,background:Tt,transition:`all ${Ut}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${be}-menu${be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Ze},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Ze,color:et,lineHeight:`${Ze}px`,textAlign:"center",background:dt,cursor:"pointer",transition:`all ${Ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ke,insetInlineEnd:-ft,zIndex:1,width:ft,height:tt,color:et,fontSize:Ee.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Tt,borderStartStartRadius:0,borderStartEndRadius:jt,borderEndEndRadius:jt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${nt} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${nt}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-ft,borderStartStartRadius:jt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:jt}}}}},re(Ee)),{"&-rtl":{direction:"rtl"}}),[`${Re}-header`]:{height:Ke,padding:zt,color:pt,lineHeight:`${Ke}px`,background:ln,[`${be}-menu`]:{lineHeight:"inherit"}},[`${Re}-footer`]:{padding:Kt,color:De,fontSize:Ge,background:Ye},[`${Re}-content`]:{flex:"auto",minHeight:0}}};var he=(0,ae.Z)("Layout",Ee=>[de(Ee)],Ee=>{const{colorBgLayout:be,controlHeight:Re,controlHeightLG:De,colorText:et,controlHeightSM:Ye,marginXXS:dt,colorTextLightSolid:Ke,colorBgContainer:zt}=Ee,pt=De*1.25;return{colorBgHeader:"#001529",colorBgBody:be,colorBgTrigger:"#002140",bodyBg:be,headerBg:"#001529",headerHeight:Re*2,headerPadding:`0 ${pt}px`,headerColor:et,footerPadding:`${Ye}px ${pt}px`,footerBg:be,siderBg:"#001529",triggerHeight:De+dt*2,triggerBg:"#002140",triggerColor:Ke,zeroTriggerWidth:De,zeroTriggerHeight:De,lightSiderBg:zt,lightTriggerBg:zt,lightTriggerColor:et}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),me=function(Ee,be){var Re={};for(var De in Ee)Object.prototype.hasOwnProperty.call(Ee,De)&&be.indexOf(De)<0&&(Re[De]=Ee[De]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,De=Object.getOwnPropertySymbols(Ee);et<De.length;et++)be.indexOf(De[et])<0&&Object.prototype.propertyIsEnumerable.call(Ee,De[et])&&(Re[De[et]]=Ee[De[et]]);return Re};const se=ce.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ye(Ee){let{suffixCls:be,tagName:Re,displayName:De}=Ee;return et=>ce.forwardRef((dt,Ke)=>ce.createElement(et,Object.assign({ref:Ke,suffixCls:be,tagName:Re},dt)))}const _e=ce.forwardRef((Ee,be)=>{const{prefixCls:Re,suffixCls:De,className:et,tagName:Ye}=Ee,dt=me(Ee,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ke}=ce.useContext(fe.E_),zt=Ke("layout",Re),[pt,Kt]=he(zt),Ze=De?`${zt}-${De}`:zt;return pt(ce.createElement(Ye,Object.assign({className:Le()(Re||Ze,et,Kt),ref:be},dt)))}),Me=ce.forwardRef((Ee,be)=>{const{direction:Re}=ce.useContext(fe.E_),[De,et]=ce.useState([]),{prefixCls:Ye,className:dt,rootClassName:Ke,children:zt,hasSider:pt,tagName:Kt,style:Ze}=Ee,tt=me(Ee,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ft=(0,Ce.Z)(tt,["suffixCls"]),{getPrefixCls:Ut,layout:nt}=ce.useContext(fe.E_),Ge=Ut("layout",Ye),[jt,yn]=he(Ge),ln=Le()(Ge,{[`${Ge}-has-sider`]:typeof pt=="boolean"?pt:De.length>0,[`${Ge}-rtl`]:Re==="rtl"},nt==null?void 0:nt.className,dt,Ke,yn),Tt=ce.useMemo(()=>({siderHook:{addSider:Lt=>{et(Jt=>[].concat((0,te.Z)(Jt),[Lt]))},removeSider:Lt=>{et(Jt=>Jt.filter(kn=>kn!==Lt))}}}),[]);return jt(ce.createElement(se.Provider,{value:Tt},ce.createElement(Kt,Object.assign({ref:be,className:ln,style:Object.assign(Object.assign({},nt==null?void 0:nt.style),Ze)},ft),zt)))}),ve=ye({tagName:"div",displayName:"Layout"})(Me),Fe=ye({suffixCls:"header",tagName:"header",displayName:"Header"})(_e),$e=ye({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_e),Te=ye({suffixCls:"content",tagName:"main",displayName:"Content"})(_e);var ze=ve},76529:function(dn,St,ee){"use strict";ee.d(St,{J:function(){return fe}});var te=ee(67294),Se=ee(4173),Le=ee(60276),Ce=function(ae,le){var re={};for(var de in ae)Object.prototype.hasOwnProperty.call(ae,de)&&le.indexOf(de)<0&&(re[de]=ae[de]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,de=Object.getOwnPropertySymbols(ae);he<de.length;he++)le.indexOf(de[he])<0&&Object.prototype.propertyIsEnumerable.call(ae,de[he])&&(re[de[he]]=ae[de[he]]);return re};const ce=te.createContext(null),fe=te.forwardRef((ae,le)=>{const{children:re}=ae,de=Ce(ae,["children"]),he=te.useContext(ce),me=te.useMemo(()=>Object.assign(Object.assign({},he),de),[he,de.prefixCls,de.mode,de.selectable]);return te.createElement(ce.Provider,{value:me},te.createElement(Se.BR,null,(0,Le.supportNodeRef)(re)?te.cloneElement(re,{ref:le}):re))});St.Z=ce},68508:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Oe}});var te=ee(78595),Se=ee(67294),Le=ee(71322),Ce=ee(94184),ce=ee.n(Ce),fe=ee(53124),ae=function(ke,Be){var Ne={};for(var we in ke)Object.prototype.hasOwnProperty.call(ke,we)&&Be.indexOf(we)<0&&(Ne[we]=ke[we]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,we=Object.getOwnPropertySymbols(ke);rt<we.length;rt++)Be.indexOf(we[rt])<0&&Object.prototype.propertyIsEnumerable.call(ke,we[rt])&&(Ne[we[rt]]=ke[we[rt]]);return Ne},re=ke=>{const{prefixCls:Be,className:Ne,dashed:we}=ke,rt=ae(ke,["prefixCls","className","dashed"]),{getPrefixCls:It}=Se.useContext(fe.E_),Ct=It("menu",Be),$t=ce()({[`${Ct}-item-divider-dashed`]:!!we},Ne);return Se.createElement(te.iz,Object.assign({className:$t},rt))},de=ee(37419),he=ee(10366),me=ee(83062),se=ee(96159),_e=(0,Se.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ve=ke=>{var Be;const{className:Ne,children:we,icon:rt,title:It,danger:Ct}=ke,{prefixCls:$t,firstLevel:Vt,direction:wt,disableMenuItemTitleTooltip:on,inlineCollapsed:Dt}=Se.useContext(_e),Xt=pr=>{const ti=Se.createElement("span",{className:`${$t}-title-content`},we);return(!rt||(0,se.l$)(we)&&we.type==="span")&&we&&pr&&Vt&&typeof we=="string"?Se.createElement("div",{className:`${$t}-inline-collapsed-noicon`},we.charAt(0)):ti},{siderCollapsed:nn}=Se.useContext(Le.D);let bn=It;typeof It=="undefined"?bn=Vt?we:"":It===!1&&(bn="");const en={title:bn};!nn&&!Dt&&(en.title=null,en.open=!1);const Zn=(0,de.Z)(we).length;let Yn=Se.createElement(te.ck,Object.assign({},(0,he.Z)(ke,["title","icon","danger"]),{className:ce()({[`${$t}-item-danger`]:Ct,[`${$t}-item-only-child`]:(rt?Zn+1:Zn)===1},Ne),title:typeof It=="string"?It:void 0}),(0,se.Tm)(rt,{className:ce()((0,se.l$)(rt)?(Be=rt.props)===null||Be===void 0?void 0:Be.className:"",`${$t}-item-icon`)}),Xt(Dt));return on||(Yn=Se.createElement(me.Z,Object.assign({},en,{placement:wt==="rtl"?"left":"right",overlayClassName:`${$t}-inline-collapsed-tooltip`}),Yn)),Yn},$e=ke=>{var Be;const{popupClassName:Ne,icon:we,title:rt,theme:It}=ke,Ct=Se.useContext(_e),{prefixCls:$t,inlineCollapsed:Vt,theme:wt}=Ct,on=(0,te.Xl)();let Dt;if(!we)Dt=Vt&&!on.length&&rt&&typeof rt=="string"?Se.createElement("div",{className:`${$t}-inline-collapsed-noicon`},rt.charAt(0)):Se.createElement("span",{className:`${$t}-title-content`},rt);else{const nn=(0,se.l$)(rt)&&rt.type==="span";Dt=Se.createElement(Se.Fragment,null,(0,se.Tm)(we,{className:ce()((0,se.l$)(we)?(Be=we.props)===null||Be===void 0?void 0:Be.className:"",`${$t}-item-icon`)}),nn?rt:Se.createElement("span",{className:`${$t}-title-content`},rt))}const Xt=Se.useMemo(()=>Object.assign(Object.assign({},Ct),{firstLevel:!1}),[Ct]);return Se.createElement(_e.Provider,{value:Xt},Se.createElement(te.Wd,Object.assign({},(0,he.Z)(ke,["icon"]),{title:Dt,popupClassName:ce()($t,Ne,`${$t}-${It||wt}`)})))},Te=ee(25877),ze=ee(60276),Ee=ee(33603),be=ee(76529),Re=function(ke,Be){var Ne={};for(var we in ke)Object.prototype.hasOwnProperty.call(ke,we)&&Be.indexOf(we)<0&&(Ne[we]=ke[we]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,we=Object.getOwnPropertySymbols(ke);rt<we.length;rt++)Be.indexOf(we[rt])<0&&Object.prototype.propertyIsEnumerable.call(ke,we[rt])&&(Ne[we[rt]]=ke[we[rt]]);return Ne};function De(ke){return(ke||[]).map((Be,Ne)=>{if(Be&&typeof Be=="object"){const we=Be,{label:rt,children:It,key:Ct,type:$t}=we,Vt=Re(we,["label","children","key","type"]),wt=Ct!=null?Ct:`tmp-${Ne}`;return It||$t==="group"?$t==="group"?Se.createElement(te.BW,Object.assign({key:wt},Vt,{title:rt}),De(It)):Se.createElement($e,Object.assign({key:wt},Vt,{title:rt}),De(It)):$t==="divider"?Se.createElement(re,Object.assign({key:wt},Vt)):Se.createElement(ve,Object.assign({key:wt},Vt),rt)}return null}).filter(Be=>Be)}function et(ke){return Se.useMemo(()=>ke&&De(ke),[ke])}var Ye=ee(84780),dt=ee(14747),Ke=ee(33507),zt=ee(67771),pt=ee(50438),Kt=ee(67968),Ze=ee(45503),ft=ke=>{const{componentCls:Be,motionDurationSlow:Ne,horizontalLineHeight:we,colorSplit:rt,lineWidth:It,lineType:Ct,itemPaddingInline:$t}=ke;return{[`${Be}-horizontal`]:{lineHeight:we,border:0,borderBottom:`${It}px ${Ct} ${rt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Be}-item, ${Be}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:$t},[`> ${Be}-item:hover,
|
|
|
> ${Be}-item-active,
|
|
|
> ${Be}-submenu ${Be}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Be}-item, ${Be}-submenu-title`]:{transition:[`border-color ${Ne}`,`background ${Ne}`].join(",")},[`${Be}-submenu-arrow`]:{display:"none"}}}},nt=ke=>{let{componentCls:Be,menuArrowOffset:Ne}=ke;return{[`${Be}-rtl`]:{direction:"rtl"},[`${Be}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Be}-rtl${Be}-vertical,
|
|
|
${Be}-submenu-rtl ${Be}-vertical`]:{[`${Be}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Ne})`},"&::after":{transform:`rotate(45deg) translateY(${Ne})`}}}}};const Ge=ke=>Object.assign({},(0,dt.oN)(ke));var yn=(ke,Be)=>{const{componentCls:Ne,itemColor:we,itemSelectedColor:rt,groupTitleColor:It,itemBg:Ct,subMenuItemBg:$t,itemSelectedBg:Vt,activeBarHeight:wt,activeBarWidth:on,activeBarBorderWidth:Dt,motionDurationSlow:Xt,motionEaseInOut:nn,motionEaseOut:bn,itemPaddingInline:en,motionDurationMid:Zn,itemHoverColor:Yn,lineType:pr,colorSplit:ti,itemDisabledColor:Pn,dangerItemColor:Or,dangerItemHoverColor:Br,dangerItemSelectedColor:Di,dangerItemActiveBg:mi,dangerItemSelectedBg:ci,itemHoverBg:Fr,itemActiveBg:zr,menuSubMenuBg:Fi,horizontalItemSelectedColor:ko,horizontalItemSelectedBg:aa,horizontalItemBorderRadius:Wo,horizontalItemHoverBg:li,popupBg:rn}=ke;return{[`${Ne}-${Be}, ${Ne}-${Be} > ${Ne}`]:{color:we,background:Ct,[`&${Ne}-root:focus-visible`]:Object.assign({},Ge(ke)),[`${Ne}-item-group-title`]:{color:It},[`${Ne}-submenu-selected`]:{[`> ${Ne}-submenu-title`]:{color:rt}},[`${Ne}-item-disabled, ${Ne}-submenu-disabled`]:{color:`${Pn} !important`},[`${Ne}-item:not(${Ne}-item-selected):not(${Ne}-submenu-selected)`]:{[`&:hover, > ${Ne}-submenu-title:hover`]:{color:Yn}},[`&:not(${Ne}-horizontal)`]:{[`${Ne}-item:not(${Ne}-item-selected)`]:{"&:hover":{backgroundColor:Fr},"&:active":{backgroundColor:zr}},[`${Ne}-submenu-title`]:{"&:hover":{backgroundColor:Fr},"&:active":{backgroundColor:zr}}},[`${Ne}-item-danger`]:{color:Or,[`&${Ne}-item:hover`]:{[`&:not(${Ne}-item-selected):not(${Ne}-submenu-selected)`]:{color:Br}},[`&${Ne}-item:active`]:{background:mi}},[`${Ne}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Ne}-item-selected`]:{color:rt,[`&${Ne}-item-danger`]:{color:Di},"a, a:hover":{color:"inherit"}},[`& ${Ne}-item-selected`]:{backgroundColor:Vt,[`&${Ne}-item-danger`]:{backgroundColor:ci}},[`${Ne}-item, ${Ne}-submenu-title`]:{[`&:not(${Ne}-item-disabled):focus-visible`]:Object.assign({},Ge(ke))},[`&${Ne}-submenu > ${Ne}`]:{backgroundColor:Fi},[`&${Ne}-popup > ${Ne}`]:{backgroundColor:rn},[`&${Ne}-horizontal`]:Object.assign(Object.assign({},Be==="dark"?{borderBottom:0}:{}),{[`> ${Ne}-item, > ${Ne}-submenu`]:{top:Dt,marginTop:-Dt,marginBottom:0,borderRadius:Wo,"&::after":{position:"absolute",insetInline:en,bottom:0,borderBottom:`${wt}px solid transparent`,transition:`border-color ${Xt} ${nn}`,content:'""'},"&:hover, &-active, &-open":{background:li,"&::after":{borderBottomWidth:wt,borderBottomColor:ko}},"&-selected":{color:ko,backgroundColor:aa,"&:hover":{backgroundColor:aa},"&::after":{borderBottomWidth:wt,borderBottomColor:ko}}}}),[`&${Ne}-root`]:{[`&${Ne}-inline, &${Ne}-vertical`]:{borderInlineEnd:`${Dt}px ${pr} ${ti}`}},[`&${Ne}-inline`]:{[`${Ne}-sub${Ne}-inline`]:{background:$t},[`${Ne}-item, ${Ne}-submenu-title`]:Dt&&on?{width:`calc(100% + ${Dt}px)`}:{},[`${Ne}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${on}px solid ${rt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Zn} ${bn}`,`opacity ${Zn} ${bn}`].join(","),content:'""'},[`&${Ne}-item-danger`]:{"&::after":{borderInlineEndColor:Di}}},[`${Ne}-selected, ${Ne}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Zn} ${nn}`,`opacity ${Zn} ${nn}`].join(",")}}}}}};const ln=ke=>{const{componentCls:Be,itemHeight:Ne,itemMarginInline:we,padding:rt,menuArrowSize:It,marginXS:Ct,itemMarginBlock:$t}=ke,Vt=rt+It+Ct;return{[`${Be}-item`]:{position:"relative",overflow:"hidden"},[`${Be}-item, ${Be}-submenu-title`]:{height:Ne,lineHeight:`${Ne}px`,paddingInline:rt,overflow:"hidden",textOverflow:"ellipsis",marginInline:we,marginBlock:$t,width:`calc(100% - ${we*2}px)`},[`> ${Be}-item,
|
|
|
> ${Be}-submenu > ${Be}-submenu-title`]:{height:Ne,lineHeight:`${Ne}px`},[`${Be}-item-group-list ${Be}-submenu-title,
|
|
|
${Be}-submenu-title`]:{paddingInlineEnd:Vt}}};var Lt=ke=>{const{componentCls:Be,iconCls:Ne,itemHeight:we,colorTextLightSolid:rt,dropdownWidth:It,controlHeightLG:Ct,motionDurationMid:$t,motionEaseOut:Vt,paddingXL:wt,itemMarginInline:on,fontSizeLG:Dt,motionDurationSlow:Xt,paddingXS:nn,boxShadowSecondary:bn,collapsedWidth:en,collapsedIconSize:Zn}=ke,Yn={height:we,lineHeight:`${we}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Be]:{"&-inline, &-vertical":Object.assign({[`&${Be}-root`]:{boxShadow:"none"}},ln(ke))},[`${Be}-submenu-popup`]:{[`${Be}-vertical`]:Object.assign(Object.assign({},ln(ke)),{boxShadow:bn})}},{[`${Be}-submenu-popup ${Be}-vertical${Be}-sub`]:{minWidth:It,maxHeight:`calc(100vh - ${Ct*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Be}-inline`]:{width:"100%",[`&${Be}-root`]:{[`${Be}-item, ${Be}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Xt}`,`background ${Xt}`,`padding ${$t} ${Vt}`].join(","),[`> ${Be}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Be}-sub${Be}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Be}-submenu > ${Be}-submenu-title`]:Yn,[`& ${Be}-item-group-title`]:{paddingInlineStart:wt}},[`${Be}-item`]:Yn}},{[`${Be}-inline-collapsed`]:{width:en,[`&${Be}-root`]:{[`${Be}-item, ${Be}-submenu ${Be}-submenu-title`]:{[`> ${Be}-inline-collapsed-noicon`]:{fontSize:Dt,textAlign:"center"}}},[`> ${Be}-item,
|
|
|
> ${Be}-item-group > ${Be}-item-group-list > ${Be}-item,
|
|
|
> ${Be}-item-group > ${Be}-item-group-list > ${Be}-submenu > ${Be}-submenu-title,
|
|
|
> ${Be}-submenu > ${Be}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Dt/2}px - ${on}px)`,textOverflow:"clip",[`
|
|
|
${Be}-submenu-arrow,
|
|
|
${Be}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Be}-item-icon, ${Ne}`]:{margin:0,fontSize:Zn,lineHeight:`${we}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Be}-item-icon, ${Ne}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Be}-item-icon, ${Ne}`]:{display:"none"},"a, a:hover":{color:rt}},[`${Be}-item-group-title`]:Object.assign(Object.assign({},dt.vS),{paddingInline:nn})}}]};const Jt=ke=>{const{componentCls:Be,motionDurationSlow:Ne,motionDurationMid:we,motionEaseInOut:rt,motionEaseOut:It,iconCls:Ct,iconSize:$t,iconMarginInlineEnd:Vt}=ke;return{[`${Be}-item, ${Be}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Ne}`,`background ${Ne}`,`padding ${Ne} ${rt}`].join(","),[`${Be}-item-icon, ${Ct}`]:{minWidth:$t,fontSize:$t,transition:[`font-size ${we} ${It}`,`margin ${Ne} ${rt}`,`color ${Ne}`].join(","),"+ span":{marginInlineStart:Vt,opacity:1,transition:[`opacity ${Ne} ${rt}`,`margin ${Ne}`,`color ${Ne}`].join(",")}},[`${Be}-item-icon`]:Object.assign({},(0,dt.Ro)()),[`&${Be}-item-only-child`]:{[`> ${Ct}, > ${Be}-item-icon`]:{marginInlineEnd:0}}},[`${Be}-item-disabled, ${Be}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Be}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},kn=ke=>{const{componentCls:Be,motionDurationSlow:Ne,motionEaseInOut:we,borderRadius:rt,menuArrowSize:It,menuArrowOffset:Ct}=ke;return{[`${Be}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ke.margin,width:It,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Ne} ${we}, opacity ${Ne}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:It*.6,height:It*.15,backgroundColor:"currentcolor",borderRadius:rt,transition:[`background ${Ne} ${we}`,`transform ${Ne} ${we}`,`top ${Ne} ${we}`,`color ${Ne} ${we}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ct})`},"&::after":{transform:`rotate(-45deg) translateY(${Ct})`}}}}},In=ke=>{const{antCls:Be,componentCls:Ne,fontSize:we,motionDurationSlow:rt,motionDurationMid:It,motionEaseInOut:Ct,paddingXS:$t,padding:Vt,colorSplit:wt,lineWidth:on,zIndexPopup:Dt,borderRadiusLG:Xt,subMenuItemBorderRadius:nn,menuArrowSize:bn,menuArrowOffset:en,lineType:Zn,menuPanelMaskInset:Yn,groupTitleLineHeight:pr,groupTitleFontSize:ti}=ke;return[{"":{[`${Ne}`]:Object.assign(Object.assign({},(0,dt.dF)()),{"&-hidden":{display:"none"}})},[`${Ne}-submenu-hidden`]:{display:"none"}},{[Ne]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,dt.Wf)(ke)),(0,dt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:we,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${rt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Ne}-item`]:{flex:"none"}},[`${Ne}-item, ${Ne}-submenu, ${Ne}-submenu-title`]:{borderRadius:ke.itemBorderRadius},[`${Ne}-item-group-title`]:{padding:`${$t}px ${Vt}px`,fontSize:ti,lineHeight:pr,transition:`all ${rt}`},[`&-horizontal ${Ne}-submenu`]:{transition:[`border-color ${rt} ${Ct}`,`background ${rt} ${Ct}`].join(",")},[`${Ne}-submenu, ${Ne}-submenu-inline`]:{transition:[`border-color ${rt} ${Ct}`,`background ${rt} ${Ct}`,`padding ${It} ${Ct}`].join(",")},[`${Ne}-submenu ${Ne}-sub`]:{cursor:"initial",transition:[`background ${rt} ${Ct}`,`padding ${rt} ${Ct}`].join(",")},[`${Ne}-title-content`]:{transition:`color ${rt}`},[`${Ne}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Ne}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:wt,borderStyle:Zn,borderWidth:0,borderTopWidth:on,marginBlock:on,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Jt(ke)),{[`${Ne}-item-group`]:{[`${Ne}-item-group-list`]:{margin:0,padding:0,[`${Ne}-item, ${Ne}-submenu-title`]:{paddingInline:`${we*2}px ${Vt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Dt,borderRadius:Xt,boxShadow:"none",transformOrigin:"0 0",[`&${Ne}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Yn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Yn},"\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:ke.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ke.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ke.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ke.paddingXS},[`> ${Ne}`]:Object.assign(Object.assign(Object.assign({borderRadius:Xt},Jt(ke)),kn(ke)),{[`${Ne}-item, ${Ne}-submenu > ${Ne}-submenu-title`]:{borderRadius:nn},[`${Ne}-submenu-title::after`]:{transition:`transform ${rt} ${Ct}`}})}}),kn(ke)),{[`&-inline-collapsed ${Ne}-submenu-arrow,
|
|
|
&-inline ${Ne}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${en})`},"&::after":{transform:`rotate(45deg) translateX(-${en})`}},[`${Ne}-submenu-open${Ne}-submenu-inline > ${Ne}-submenu-title > ${Ne}-submenu-arrow`]:{transform:`translateY(-${bn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${en})`},"&::before":{transform:`rotate(45deg) translateX(${en})`}}})},{[`${Be}-layout-header`]:{[Ne]:{lineHeight:"inherit"}}}]};var Qt=(ke,Be)=>(0,Kt.Z)("Menu",we=>{if(Be===!1)return[];const{colorBgElevated:rt,colorPrimary:It,colorTextLightSolid:Ct,controlHeightLG:$t,fontSize:Vt,darkItemColor:wt,darkDangerItemColor:on,darkItemBg:Dt,darkSubMenuItemBg:Xt,darkItemSelectedColor:nn,darkItemSelectedBg:bn,darkDangerItemSelectedBg:en,darkItemHoverBg:Zn,darkGroupTitleColor:Yn,darkItemHoverColor:pr,darkItemDisabledColor:ti,darkDangerItemHoverColor:Pn,darkDangerItemSelectedColor:Or,darkDangerItemActiveBg:Br}=we,Di=Vt/7*5,mi=(0,Ze.TS)(we,{menuArrowSize:Di,menuHorizontalHeight:$t*1.15,menuArrowOffset:`${Di*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:rt}),ci=(0,Ze.TS)(mi,{itemColor:wt,itemHoverColor:pr,groupTitleColor:Yn,itemSelectedColor:nn,itemBg:Dt,popupBg:Dt,subMenuItemBg:Xt,itemActiveBg:"transparent",itemSelectedBg:bn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Zn,itemDisabledColor:ti,dangerItemColor:on,dangerItemHoverColor:Pn,dangerItemSelectedColor:Or,dangerItemActiveBg:Br,dangerItemSelectedBg:en,menuSubMenuBg:Xt,horizontalItemSelectedColor:Ct,horizontalItemSelectedBg:It});return[In(mi),ft(mi),Lt(mi),yn(mi,"light"),yn(ci,"dark"),nt(mi),(0,Ke.Z)(mi),(0,zt.oN)(mi,"slide-up"),(0,zt.oN)(mi,"slide-down"),(0,pt._y)(mi,"zoom-big")]},we=>{const{colorPrimary:rt,colorError:It,colorTextDisabled:Ct,colorErrorBg:$t,colorText:Vt,colorTextDescription:wt,colorBgContainer:on,colorFillAlter:Dt,colorFillContent:Xt,lineWidth:nn,lineWidthBold:bn,controlItemBgActive:en,colorBgTextHover:Zn,controlHeightLG:Yn,lineHeight:pr,colorBgElevated:ti,marginXXS:Pn,padding:Or,fontSize:Br,controlHeightSM:Di,fontSizeLG:mi,colorTextLightSolid:ci,colorErrorHover:Fr}=we,zr=new Ye.C(ci).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:we.zIndexPopupBase+50,radiusItem:we.borderRadiusLG,itemBorderRadius:we.borderRadiusLG,radiusSubMenuItem:we.borderRadiusSM,subMenuItemBorderRadius:we.borderRadiusSM,colorItemText:Vt,itemColor:Vt,colorItemTextHover:Vt,itemHoverColor:Vt,colorItemTextHoverHorizontal:rt,horizontalItemHoverColor:rt,colorGroupTitle:wt,groupTitleColor:wt,colorItemTextSelected:rt,itemSelectedColor:rt,colorItemTextSelectedHorizontal:rt,horizontalItemSelectedColor:rt,colorItemBg:on,itemBg:on,colorItemBgHover:Zn,itemHoverBg:Zn,colorItemBgActive:Xt,itemActiveBg:en,colorSubItemBg:Dt,subMenuItemBg:Dt,colorItemBgSelected:en,itemSelectedBg:en,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:bn,activeBarHeight:bn,colorActiveBarBorderSize:nn,activeBarBorderWidth:nn,colorItemTextDisabled:Ct,itemDisabledColor:Ct,colorDangerItemText:It,dangerItemColor:It,colorDangerItemTextHover:It,dangerItemHoverColor:It,colorDangerItemTextSelected:It,dangerItemSelectedColor:It,colorDangerItemBgActive:$t,dangerItemActiveBg:$t,colorDangerItemBgSelected:$t,dangerItemSelectedBg:$t,itemMarginInline:we.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Yn,groupTitleLineHeight:pr,collapsedWidth:Yn*2,popupBg:ti,itemMarginBlock:Pn,itemPaddingInline:Or,horizontalLineHeight:`${Yn*1.15}px`,iconSize:Br,iconMarginInlineEnd:Di-Br,collapsedIconSize:mi,groupTitleFontSize:Br,darkItemDisabledColor:new Ye.C(ci).setAlpha(.25).toRgbString(),darkItemColor:zr,darkDangerItemColor:It,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:ci,darkItemSelectedBg:rt,darkDangerItemSelectedBg:It,darkItemHoverBg:"transparent",darkGroupTitleColor:zr,darkItemHoverColor:ci,darkDangerItemHoverColor:Fr,darkDangerItemSelectedColor:ci,darkDangerItemActiveBg:It}},{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"]]})(ke),Mn=function(ke,Be){var Ne={};for(var we in ke)Object.prototype.hasOwnProperty.call(ke,we)&&Be.indexOf(we)<0&&(Ne[we]=ke[we]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,we=Object.getOwnPropertySymbols(ke);rt<we.length;rt++)Be.indexOf(we[rt])<0&&Object.prototype.propertyIsEnumerable.call(ke,we[rt])&&(Ne[we[rt]]=ke[we[rt]]);return Ne},zn=(0,Se.forwardRef)((ke,Be)=>{var Ne,we;const rt=Se.useContext(be.Z),It=rt||{},{getPrefixCls:Ct,getPopupContainer:$t,direction:Vt,menu:wt}=Se.useContext(fe.E_),on=Ct(),{prefixCls:Dt,className:Xt,style:nn,theme:bn="light",expandIcon:en,_internalDisableMenuItemTitleTooltip:Zn,inlineCollapsed:Yn,siderCollapsed:pr,items:ti,children:Pn,rootClassName:Or,mode:Br,selectable:Di,onClick:mi,overflowedIndicatorPopupClassName:ci}=ke,Fr=Mn(ke,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),zr=(0,he.Z)(Fr,["collapsedWidth"]),Fi=et(ti)||Pn;(Ne=It.validator)===null||Ne===void 0||Ne.call(It,{mode:Br});const ko=(0,ze.useEvent)(function(){var tr;mi==null||mi.apply(void 0,arguments),(tr=It.onClick)===null||tr===void 0||tr.call(It)}),aa=It.mode||Br,Wo=Di!=null?Di:It.selectable,li=Se.useMemo(()=>pr!==void 0?pr:Yn,[Yn,pr]),rn={horizontal:{motionName:`${on}-slide-up`},inline:(0,Ee.Z)(on),other:{motionName:`${on}-zoom-big`}},nr=Ct("menu",Dt||It.prefixCls),[dr,rr]=Qt(nr,!rt),Jr=ce()(`${nr}-${bn}`,wt==null?void 0:wt.className,Xt);let Ar;if(typeof en=="function")Ar=en;else if(en===null||en===!1)Ar=null;else if(It.expandIcon===null||It.expandIcon===!1)Ar=null;else{const tr=en!=null?en:It.expandIcon;Ar=(0,se.Tm)(tr,{className:ce()(`${nr}-submenu-expand-icon`,(0,se.l$)(tr)?(we=tr.props)===null||we===void 0?void 0:we.className:"")})}const Mr=Se.useMemo(()=>({prefixCls:nr,inlineCollapsed:li||!1,direction:Vt,firstLevel:!0,theme:bn,mode:aa,disableMenuItemTitleTooltip:Zn}),[nr,li,Vt,Zn,bn]);return dr(Se.createElement(be.Z.Provider,{value:null},Se.createElement(_e.Provider,{value:Mr},Se.createElement(te.ZP,Object.assign({getPopupContainer:$t,overflowedIndicator:Se.createElement(Te.Z,null),overflowedIndicatorPopupClassName:ce()(nr,`${nr}-${bn}`,ci),mode:aa,selectable:Wo,onClick:ko},zr,{inlineCollapsed:li,style:Object.assign(Object.assign({},wt==null?void 0:wt.style),nn),className:Jr,prefixCls:nr,direction:Vt,defaultMotions:rn,expandIcon:Ar,ref:Be,rootClassName:ce()(Or,rr)}),Fi))))});const at=(0,Se.forwardRef)((ke,Be)=>{const Ne=(0,Se.useRef)(null),we=Se.useContext(Le.D);return(0,Se.useImperativeHandle)(Be,()=>({menu:Ne.current,focus:rt=>{var It;(It=Ne.current)===null||It===void 0||It.focus(rt)}})),Se.createElement(zn,Object.assign({ref:Ne},ke,we))});at.Item=ve,at.SubMenu=$e,at.Divider=re,at.ItemGroup=te.BW;var Oe=at},28452:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return on}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(Xt,nn){return Se.createElement(ce.Z,(0,te.Z)({},Xt,{ref:nn,icon:Ce}))},ae=Se.forwardRef(fe),le=ee(81893),re=ee(22751),de=ee(91034),he=ee(94184),me=ee.n(he),se=ee(4942),ye=ee(1413),_e=ee(15671),Me=ee(43144),ve=ee(60136),Fe=ee(51630),$e=`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`,Te=`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`,ze="".concat($e," ").concat(Te).split(/[\s\n]+/),Ee="aria-",be="data-";function Re(Dt,Xt){return Dt.indexOf(Xt)===0}function De(Dt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn;Xt===!1?nn={aria:!0,data:!0,attr:!0}:Xt===!0?nn={aria:!0}:nn=(0,ye.Z)({},Xt);var bn={};return Object.keys(Dt).forEach(function(en){(nn.aria&&(en==="role"||Re(en,Ee))||nn.data&&Re(en,be)||nn.attr&&ze.includes(en))&&(bn[en]=Dt[en])}),bn}var et={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Ye=et,dt=ee(81626),Ke=function(Dt){(0,ve.Z)(nn,Dt);var Xt=(0,Fe.Z)(nn);function nn(){var bn;(0,_e.Z)(this,nn);for(var en=arguments.length,Zn=new Array(en),Yn=0;Yn<en;Yn++)Zn[Yn]=arguments[Yn];return bn=Xt.call.apply(Xt,[this].concat(Zn)),bn.state={goInputText:""},bn.getValidValue=function(){var pr=bn.state.goInputText;return!pr||Number.isNaN(pr)?void 0:Number(pr)},bn.buildOptionText=function(pr){return"".concat(pr," ").concat(bn.props.locale.items_per_page)},bn.changeSize=function(pr){bn.props.changeSize(Number(pr))},bn.handleChange=function(pr){bn.setState({goInputText:pr.target.value})},bn.handleBlur=function(pr){var ti=bn.props,Pn=ti.goButton,Or=ti.quickGo,Br=ti.rootPrefixCls,Di=bn.state.goInputText;Pn||Di===""||(bn.setState({goInputText:""}),!(pr.relatedTarget&&(pr.relatedTarget.className.indexOf("".concat(Br,"-item-link"))>=0||pr.relatedTarget.className.indexOf("".concat(Br,"-item"))>=0))&&Or(bn.getValidValue()))},bn.go=function(pr){var ti=bn.state.goInputText;ti!==""&&(pr.keyCode===Ye.ENTER||pr.type==="click")&&(bn.setState({goInputText:""}),bn.props.quickGo(bn.getValidValue()))},bn}return(0,Me.Z)(nn,[{key:"getPageSizeOptions",value:function(){var en=this.props,Zn=en.pageSize,Yn=en.pageSizeOptions;return Yn.some(function(pr){return pr.toString()===Zn.toString()})?Yn:Yn.concat([Zn.toString()]).sort(function(pr,ti){var Pn=Number.isNaN(Number(pr))?0:Number(pr),Or=Number.isNaN(Number(ti))?0:Number(ti);return Pn-Or})}},{key:"render",value:function(){var en=this,Zn=this.props,Yn=Zn.pageSize,pr=Zn.locale,ti=Zn.rootPrefixCls,Pn=Zn.changeSize,Or=Zn.quickGo,Br=Zn.goButton,Di=Zn.selectComponentClass,mi=Zn.buildOptionText,ci=Zn.selectPrefixCls,Fr=Zn.disabled,zr=this.state.goInputText,Fi="".concat(ti,"-options"),ko=Di,aa=null,Wo=null,li=null;if(!Pn&&!Or)return null;var rn=this.getPageSizeOptions();if(Pn&&ko){var nr=rn.map(function(dr,rr){return Se.createElement(ko.Option,{key:rr,value:dr.toString()},(mi||en.buildOptionText)(dr))});aa=Se.createElement(ko,{disabled:Fr,prefixCls:ci,showSearch:!1,className:"".concat(Fi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Yn||rn[0]).toString(),onChange:this.changeSize,getPopupContainer:function(rr){return rr.parentNode},"aria-label":pr.page_size,defaultOpen:!1},nr)}return Or&&(Br&&(li=typeof Br=="boolean"?Se.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Fr,className:"".concat(Fi,"-quick-jumper-button")},pr.jump_to_confirm):Se.createElement("span",{onClick:this.go,onKeyUp:this.go},Br)),Wo=Se.createElement("div",{className:"".concat(Fi,"-quick-jumper")},pr.jump_to,Se.createElement("input",{disabled:Fr,type:"text",value:zr,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":pr.page}),pr.page,li)),Se.createElement("li",{className:"".concat(Fi)},aa,Wo)}}]),nn}(Se.Component);Ke.defaultProps={pageSizeOptions:["10","20","50","100"]};var zt=Ke,pt=function(Xt){var nn,bn=Xt.rootPrefixCls,en=Xt.page,Zn=Xt.active,Yn=Xt.className,pr=Xt.showTitle,ti=Xt.onClick,Pn=Xt.onKeyPress,Or=Xt.itemRender,Br="".concat(bn,"-item"),Di=me()(Br,"".concat(Br,"-").concat(en),(nn={},(0,se.Z)(nn,"".concat(Br,"-active"),Zn),(0,se.Z)(nn,"".concat(Br,"-disabled"),!en),(0,se.Z)(nn,Xt.className,Yn),nn)),mi=function(){ti(en)},ci=function(Fi){Pn(Fi,ti,en)},Fr=Or(en,"page",Se.createElement("a",{rel:"nofollow"},en));return Fr?Se.createElement("li",{title:pr?en.toString():null,className:Di,onClick:mi,onKeyPress:ci,tabIndex:0},Fr):null},Kt=pt;function Ze(){}function tt(Dt){var Xt=Number(Dt);return typeof Xt=="number"&&!Number.isNaN(Xt)&&isFinite(Xt)&&Math.floor(Xt)===Xt}var ft=function(Xt,nn,bn){return bn};function Ut(Dt,Xt,nn){var bn=typeof Dt=="undefined"?Xt.pageSize:Dt;return Math.floor((nn.total-1)/bn)+1}var nt=function(Dt){(0,ve.Z)(nn,Dt);var Xt=(0,Fe.Z)(nn);function nn(bn){var en;(0,_e.Z)(this,nn),en=Xt.call(this,bn),en.paginationNode=Se.createRef(),en.getJumpPrevPage=function(){return Math.max(1,en.state.current-(en.props.showLessItems?3:5))},en.getJumpNextPage=function(){return Math.min(Ut(void 0,en.state,en.props),en.state.current+(en.props.showLessItems?3:5))},en.getItemIcon=function(Pn,Or){var Br=en.props.prefixCls,Di=Pn||Se.createElement("button",{type:"button","aria-label":Or,className:"".concat(Br,"-item-link")});return typeof Pn=="function"&&(Di=Se.createElement(Pn,(0,ye.Z)({},en.props))),Di},en.isValid=function(Pn){var Or=en.props.total;return tt(Pn)&&Pn!==en.state.current&&tt(Or)&&Or>0},en.shouldDisplayQuickJumper=function(){var Pn=en.props,Or=Pn.showQuickJumper,Br=Pn.total,Di=en.state.pageSize;return Br<=Di?!1:Or},en.handleKeyDown=function(Pn){(Pn.keyCode===Ye.ARROW_UP||Pn.keyCode===Ye.ARROW_DOWN)&&Pn.preventDefault()},en.handleKeyUp=function(Pn){var Or=en.getValidValue(Pn),Br=en.state.currentInputValue;Or!==Br&&en.setState({currentInputValue:Or}),Pn.keyCode===Ye.ENTER?en.handleChange(Or):Pn.keyCode===Ye.ARROW_UP?en.handleChange(Or-1):Pn.keyCode===Ye.ARROW_DOWN&&en.handleChange(Or+1)},en.handleBlur=function(Pn){var Or=en.getValidValue(Pn);en.handleChange(Or)},en.changePageSize=function(Pn){var Or=en.state.current,Br=Ut(Pn,en.state,en.props);Or=Or>Br?Br:Or,Br===0&&(Or=en.state.current),typeof Pn=="number"&&("pageSize"in en.props||en.setState({pageSize:Pn}),"current"in en.props||en.setState({current:Or,currentInputValue:Or})),en.props.onShowSizeChange(Or,Pn),"onChange"in en.props&&en.props.onChange&&en.props.onChange(Or,Pn)},en.handleChange=function(Pn){var Or=en.props,Br=Or.disabled,Di=Or.onChange,mi=en.state,ci=mi.pageSize,Fr=mi.current,zr=mi.currentInputValue;if(en.isValid(Pn)&&!Br){var Fi=Ut(void 0,en.state,en.props),ko=Pn;return Pn>Fi?ko=Fi:Pn<1&&(ko=1),"current"in en.props||en.setState({current:ko}),ko!==zr&&en.setState({currentInputValue:ko}),Di(ko,ci),ko}return Fr},en.prev=function(){en.hasPrev()&&en.handleChange(en.state.current-1)},en.next=function(){en.hasNext()&&en.handleChange(en.state.current+1)},en.jumpPrev=function(){en.handleChange(en.getJumpPrevPage())},en.jumpNext=function(){en.handleChange(en.getJumpNextPage())},en.hasPrev=function(){return en.state.current>1},en.hasNext=function(){return en.state.current<Ut(void 0,en.state,en.props)},en.runIfEnter=function(Pn,Or){if(Pn.key==="Enter"||Pn.charCode===13){for(var Br=arguments.length,Di=new Array(Br>2?Br-2:0),mi=2;mi<Br;mi++)Di[mi-2]=arguments[mi];Or.apply(void 0,Di)}},en.runIfEnterPrev=function(Pn){en.runIfEnter(Pn,en.prev)},en.runIfEnterNext=function(Pn){en.runIfEnter(Pn,en.next)},en.runIfEnterJumpPrev=function(Pn){en.runIfEnter(Pn,en.jumpPrev)},en.runIfEnterJumpNext=function(Pn){en.runIfEnter(Pn,en.jumpNext)},en.handleGoTO=function(Pn){(Pn.keyCode===Ye.ENTER||Pn.type==="click")&&en.handleChange(en.state.currentInputValue)},en.renderPrev=function(Pn){var Or=en.props,Br=Or.prevIcon,Di=Or.itemRender,mi=Di(Pn,"prev",en.getItemIcon(Br,"prev page")),ci=!en.hasPrev();return(0,Se.isValidElement)(mi)?(0,Se.cloneElement)(mi,{disabled:ci}):mi},en.renderNext=function(Pn){var Or=en.props,Br=Or.nextIcon,Di=Or.itemRender,mi=Di(Pn,"next",en.getItemIcon(Br,"next page")),ci=!en.hasNext();return(0,Se.isValidElement)(mi)?(0,Se.cloneElement)(mi,{disabled:ci}):mi};var Zn=bn.onChange!==Ze,Yn="current"in bn;Yn&&!Zn&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var pr=bn.defaultCurrent;"current"in bn&&(pr=bn.current);var ti=bn.defaultPageSize;return"pageSize"in bn&&(ti=bn.pageSize),pr=Math.min(pr,Ut(ti,void 0,bn)),en.state={current:pr,currentInputValue:pr,pageSize:ti},en}return(0,Me.Z)(nn,[{key:"componentDidUpdate",value:function(en,Zn){var Yn=this.props.prefixCls;if(Zn.current!==this.state.current&&this.paginationNode.current){var pr=this.paginationNode.current.querySelector(".".concat(Yn,"-item-").concat(Zn.current));if(pr&&document.activeElement===pr){var ti;pr==null||(ti=pr.blur)===null||ti===void 0||ti.call(pr)}}}},{key:"getValidValue",value:function(en){var Zn=en.target.value,Yn=Ut(void 0,this.state,this.props),pr=this.state.currentInputValue,ti;return Zn===""?ti=Zn:Number.isNaN(Number(Zn))?ti=pr:Zn>=Yn?ti=Yn:ti=Number(Zn),ti}},{key:"getShowSizeChanger",value:function(){var en=this.props,Zn=en.showSizeChanger,Yn=en.total,pr=en.totalBoundaryShowSizeChanger;return typeof Zn!="undefined"?Zn:Yn>pr}},{key:"render",value:function(){var en=this.props,Zn=en.prefixCls,Yn=en.className,pr=en.style,ti=en.disabled,Pn=en.hideOnSinglePage,Or=en.total,Br=en.locale,Di=en.showQuickJumper,mi=en.showLessItems,ci=en.showTitle,Fr=en.showTotal,zr=en.simple,Fi=en.itemRender,ko=en.showPrevNextJumpers,aa=en.jumpPrevIcon,Wo=en.jumpNextIcon,li=en.selectComponentClass,rn=en.selectPrefixCls,nr=en.pageSizeOptions,dr=this.state,rr=dr.current,Jr=dr.pageSize,Ar=dr.currentInputValue;if(Pn===!0&&Or<=Jr)return null;var Mr=Ut(void 0,this.state,this.props),tr=[],Zt=null,Ot=null,ge=null,Ie=null,Ae=null,We=Di&&Di.goButton,it=mi?1:2,xt=rr-1>0?rr-1:0,Ft=rr+1<Mr?rr+1:Mr,an=De(this.props,{aria:!0,data:!0}),Rn=Fr&&Se.createElement("li",{className:"".concat(Zn,"-total-text")},Fr(Or,[Or===0?0:(rr-1)*Jr+1,rr*Jr>Or?Or:rr*Jr]));if(zr){We&&(typeof We=="boolean"?Ae=Se.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Br.jump_to_confirm):Ae=Se.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},We),Ae=Se.createElement("li",{title:ci?"".concat(Br.jump_to).concat(rr,"/").concat(Mr):null,className:"".concat(Zn,"-simple-pager")},Ae));var mr=this.renderPrev(xt);return Se.createElement("ul",(0,te.Z)({className:me()(Zn,"".concat(Zn,"-simple"),(0,se.Z)({},"".concat(Zn,"-disabled"),ti),Yn),style:pr,ref:this.paginationNode},an),Rn,mr?Se.createElement("li",{title:ci?Br.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:me()("".concat(Zn,"-prev"),(0,se.Z)({},"".concat(Zn,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},mr):null,Se.createElement("li",{title:ci?"".concat(rr,"/").concat(Mr):null,className:"".concat(Zn,"-simple-pager")},Se.createElement("input",{type:"text",value:Ar,disabled:ti,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Se.createElement("span",{className:"".concat(Zn,"-slash")},"/"),Mr),Se.createElement("li",{title:ci?Br.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:me()("".concat(Zn,"-next"),(0,se.Z)({},"".concat(Zn,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ft)),Ae)}if(Mr<=3+it*2){var or={locale:Br,rootPrefixCls:Zn,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:ci,itemRender:Fi};Mr||tr.push(Se.createElement(Kt,(0,te.Z)({},or,{key:"noPager",page:1,className:"".concat(Zn,"-item-disabled")})));for(var cr=1;cr<=Mr;cr+=1){var Xn=rr===cr;tr.push(Se.createElement(Kt,(0,te.Z)({},or,{key:cr,page:cr,active:Xn})))}}else{var br=mi?Br.prev_3:Br.prev_5,_r=mi?Br.next_3:Br.next_5,mn=Fi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(aa,"prev page")),$n=Fi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Wo,"next page"));ko&&(Zt=mn?Se.createElement("li",{title:ci?br:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:me()("".concat(Zn,"-jump-prev"),(0,se.Z)({},"".concat(Zn,"-jump-prev-custom-icon"),!!aa))},mn):null,Ot=$n?Se.createElement("li",{title:ci?_r:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:me()("".concat(Zn,"-jump-next"),(0,se.Z)({},"".concat(Zn,"-jump-next-custom-icon"),!!Wo))},$n):null),Ie=Se.createElement(Kt,{locale:Br,last:!0,rootPrefixCls:Zn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Mr,page:Mr,active:!1,showTitle:ci,itemRender:Fi}),ge=Se.createElement(Kt,{locale:Br,rootPrefixCls:Zn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:ci,itemRender:Fi});var Vr=Math.max(1,rr-it),qr=Math.min(rr+it,Mr);rr-1<=it&&(qr=1+it*2),Mr-rr<=it&&(Vr=Mr-it*2);for(var Ir=Vr;Ir<=qr;Ir+=1){var hi=rr===Ir;tr.push(Se.createElement(Kt,{locale:Br,rootPrefixCls:Zn,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ir,page:Ir,active:hi,showTitle:ci,itemRender:Fi}))}rr-1>=it*2&&rr!==3&&(tr[0]=(0,Se.cloneElement)(tr[0],{className:"".concat(Zn,"-item-after-jump-prev")}),tr.unshift(Zt)),Mr-rr>=it*2&&rr!==Mr-2&&(tr[tr.length-1]=(0,Se.cloneElement)(tr[tr.length-1],{className:"".concat(Zn,"-item-before-jump-next")}),tr.push(Ot)),Vr!==1&&tr.unshift(ge),qr!==Mr&&tr.push(Ie)}var Ni=!this.hasPrev()||!Mr,yr=!this.hasNext()||!Mr,bi=this.renderPrev(xt),ar=this.renderNext(Ft);return Se.createElement("ul",(0,te.Z)({className:me()(Zn,Yn,(0,se.Z)({},"".concat(Zn,"-disabled"),ti)),style:pr,ref:this.paginationNode},an),Rn,bi?Se.createElement("li",{title:ci?Br.prev_page:null,onClick:this.prev,tabIndex:Ni?null:0,onKeyPress:this.runIfEnterPrev,className:me()("".concat(Zn,"-prev"),(0,se.Z)({},"".concat(Zn,"-disabled"),Ni)),"aria-disabled":Ni},bi):null,tr,ar?Se.createElement("li",{title:ci?Br.next_page:null,onClick:this.next,tabIndex:yr?null:0,onKeyPress:this.runIfEnterNext,className:me()("".concat(Zn,"-next"),(0,se.Z)({},"".concat(Zn,"-disabled"),yr)),"aria-disabled":yr},ar):null,Se.createElement(zt,{disabled:ti,locale:Br,rootPrefixCls:Zn,selectComponentClass:li,selectPrefixCls:rn,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:rr,pageSize:Jr,pageSizeOptions:nr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:We}))}}],[{key:"getDerivedStateFromProps",value:function(en,Zn){var Yn={};if("current"in en&&(Yn.current=en.current,en.current!==Zn.current&&(Yn.currentInputValue=Yn.current)),"pageSize"in en&&en.pageSize!==Zn.pageSize){var pr=Zn.current,ti=Ut(en.pageSize,Zn,en);pr=pr>ti?ti:pr,"current"in en||(Yn.current=pr,Yn.currentInputValue=pr),Yn.pageSize=en.pageSize}return Yn}}]),nn}(Se.Component);nt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Ze,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Ze,locale:dt.Z,style:{},itemRender:ft,totalBoundaryShowSizeChanger:50};var Ge=nt,jt=ee(62906),yn=ee(53124),ln=ee(98675),Tt=ee(25378),Lt=ee(10110),Jt=ee(11713);const kn=Dt=>Se.createElement(Jt.default,Object.assign({},Dt,{showSearch:!0,size:"small"})),In=Dt=>Se.createElement(Jt.default,Object.assign({},Dt,{showSearch:!0,size:"middle"}));kn.Option=Jt.default.Option,In.Option=Jt.default.Option;var Qt=ee(47673),Mn=ee(14747),Wn=ee(67968),zn=ee(45503);const at=Dt=>{const{componentCls:Xt}=Dt;return{[`${Xt}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Xt}-item-link`]:{color:Dt.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Xt}-item-link`]:{color:Dt.colorTextDisabled,cursor:"not-allowed"}}},[`&${Xt}-disabled`]:{cursor:"not-allowed",[`${Xt}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Dt.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Dt.colorBorder,backgroundColor:Dt.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Dt.itemActiveBgDisabled},a:{color:Dt.itemActiveColorDisabled}}},[`${Xt}-item-link`]:{color:Dt.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Xt}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Xt}-simple-pager`]:{color:Dt.colorTextDisabled},[`${Xt}-jump-prev, ${Xt}-jump-next`]:{[`${Xt}-item-link-icon`]:{opacity:0},[`${Xt}-item-ellipsis`]:{opacity:1}}},[`&${Xt}-simple`]:{[`${Xt}-prev, ${Xt}-next`]:{[`&${Xt}-disabled ${Xt}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Oe=Dt=>{const{componentCls:Xt}=Dt;return{[`&${Xt}-mini ${Xt}-total-text, &${Xt}-mini ${Xt}-simple-pager`]:{height:Dt.itemSizeSM,lineHeight:`${Dt.itemSizeSM}px`},[`&${Xt}-mini ${Xt}-item`]:{minWidth:Dt.itemSizeSM,height:Dt.itemSizeSM,margin:0,lineHeight:`${Dt.itemSizeSM-2}px`},[`&${Xt}-mini:not(${Xt}-disabled) ${Xt}-item:not(${Xt}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Dt.colorBgTextHover},"&:active":{backgroundColor:Dt.colorBgTextActive}},[`&${Xt}-mini ${Xt}-prev, &${Xt}-mini ${Xt}-next`]:{minWidth:Dt.itemSizeSM,height:Dt.itemSizeSM,margin:0,lineHeight:`${Dt.itemSizeSM}px`},[`&${Xt}-mini:not(${Xt}-disabled)`]:{[`${Xt}-prev, ${Xt}-next`]:{[`&:hover ${Xt}-item-link`]:{backgroundColor:Dt.colorBgTextHover},[`&:active ${Xt}-item-link`]:{backgroundColor:Dt.colorBgTextActive},[`&${Xt}-disabled:hover ${Xt}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Xt}-mini ${Xt}-prev ${Xt}-item-link,
|
|
|
&${Xt}-mini ${Xt}-next ${Xt}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Dt.itemSizeSM,lineHeight:`${Dt.itemSizeSM}px`}},[`&${Xt}-mini ${Xt}-jump-prev, &${Xt}-mini ${Xt}-jump-next`]:{height:Dt.itemSizeSM,marginInlineEnd:0,lineHeight:`${Dt.itemSizeSM}px`},[`&${Xt}-mini ${Xt}-options`]:{marginInlineStart:Dt.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Dt.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Dt.itemSizeSM,lineHeight:`${Dt.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Qt.x0)(Dt)),{width:Dt.paginationMiniQuickJumperInputWidth,height:Dt.controlHeightSM})}}}},ke=Dt=>{const{componentCls:Xt}=Dt;return{[`
|
|
|
&${Xt}-simple ${Xt}-prev,
|
|
|
&${Xt}-simple ${Xt}-next
|
|
|
`]:{height:Dt.itemSizeSM,lineHeight:`${Dt.itemSizeSM}px`,verticalAlign:"top",[`${Xt}-item-link`]:{height:Dt.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Dt.colorBgTextHover},"&:active":{backgroundColor:Dt.colorBgTextActive},"&::after":{height:Dt.itemSizeSM,lineHeight:`${Dt.itemSizeSM}px`}}},[`&${Xt}-simple ${Xt}-simple-pager`]:{display:"inline-block",height:Dt.itemSizeSM,marginInlineEnd:Dt.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Dt.marginXS,padding:`0 ${Dt.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Dt.itemInputBg,border:`${Dt.lineWidth}px ${Dt.lineType} ${Dt.colorBorder}`,borderRadius:Dt.borderRadius,outline:"none",transition:`border-color ${Dt.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Dt.colorPrimary},"&:focus":{borderColor:Dt.colorPrimaryHover,boxShadow:`${Dt.inputOutlineOffset}px 0 ${Dt.controlOutlineWidth}px ${Dt.controlOutline}`},"&[disabled]":{color:Dt.colorTextDisabled,backgroundColor:Dt.colorBgContainerDisabled,borderColor:Dt.colorBorder,cursor:"not-allowed"}}}}},Be=Dt=>{const{componentCls:Xt}=Dt;return{[`${Xt}-jump-prev, ${Xt}-jump-next`]:{outline:0,[`${Xt}-item-container`]:{position:"relative",[`${Xt}-item-link-icon`]:{color:Dt.colorPrimary,fontSize:Dt.fontSizeSM,opacity:0,transition:`all ${Dt.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Xt}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Dt.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Dt.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Dt.paginationEllipsisTextIndent,opacity:1,transition:`all ${Dt.motionDurationMid}`}},"&:hover":{[`${Xt}-item-link-icon`]:{opacity:1},[`${Xt}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Xt}-prev,
|
|
|
${Xt}-jump-prev,
|
|
|
${Xt}-jump-next
|
|
|
`]:{marginInlineEnd:Dt.marginXS},[`
|
|
|
${Xt}-prev,
|
|
|
${Xt}-next,
|
|
|
${Xt}-jump-prev,
|
|
|
${Xt}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:Dt.itemSize,height:Dt.itemSize,color:Dt.colorText,fontFamily:Dt.fontFamily,lineHeight:`${Dt.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Dt.borderRadius,cursor:"pointer",transition:`all ${Dt.motionDurationMid}`},[`${Xt}-prev, ${Xt}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Dt.colorText,cursor:"pointer",userSelect:"none"},[`${Xt}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Dt.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Dt.lineWidth}px ${Dt.lineType} transparent`,borderRadius:Dt.borderRadius,outline:"none",transition:`all ${Dt.motionDurationMid}`},[`&:hover ${Xt}-item-link`]:{backgroundColor:Dt.colorBgTextHover},[`&:active ${Xt}-item-link`]:{backgroundColor:Dt.colorBgTextActive},[`&${Xt}-disabled:hover`]:{[`${Xt}-item-link`]:{backgroundColor:"transparent"}}},[`${Xt}-slash`]:{marginInlineEnd:Dt.paginationSlashMarginInlineEnd,marginInlineStart:Dt.paginationSlashMarginInlineStart},[`${Xt}-options`]:{display:"inline-block",marginInlineStart:Dt.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Dt.controlHeight,marginInlineStart:Dt.marginXS,lineHeight:`${Dt.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Qt.ik)(Dt)),{width:Dt.controlHeightLG*1.25,height:Dt.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Dt.marginXS,marginInlineEnd:Dt.marginXS})}}}},Ne=Dt=>{const{componentCls:Xt}=Dt;return{[`${Xt}-item`]:{display:"inline-block",minWidth:Dt.itemSize,height:Dt.itemSize,marginInlineEnd:Dt.marginXS,fontFamily:Dt.fontFamily,lineHeight:`${Dt.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Dt.lineWidth}px ${Dt.lineType} transparent`,borderRadius:Dt.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Dt.paginationItemPaddingInline}px`,color:Dt.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Xt}-item-active)`]:{"&:hover":{transition:`all ${Dt.motionDurationMid}`,backgroundColor:Dt.colorBgTextHover},"&:active":{backgroundColor:Dt.colorBgTextActive}},"&-active":{fontWeight:Dt.fontWeightStrong,backgroundColor:Dt.itemActiveBg,borderColor:Dt.colorPrimary,a:{color:Dt.colorPrimary},"&:hover":{borderColor:Dt.colorPrimaryHover},"&:hover a":{color:Dt.colorPrimaryHover}}}}},we=Dt=>{const{componentCls:Xt}=Dt;return{[Xt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Mn.Wf)(Dt)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Xt}-total-text`]:{display:"inline-block",height:Dt.itemSize,marginInlineEnd:Dt.marginXS,lineHeight:`${Dt.itemSize-2}px`,verticalAlign:"middle"}}),Ne(Dt)),Be(Dt)),ke(Dt)),Oe(Dt)),at(Dt)),{[`@media only screen and (max-width: ${Dt.screenLG}px)`]:{[`${Xt}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Dt.screenSM}px)`]:{[`${Xt}-options`]:{display:"none"}}}),[`&${Dt.componentCls}-rtl`]:{direction:"rtl"}}},rt=Dt=>{const{componentCls:Xt}=Dt;return{[`${Xt}${Xt}-disabled:not(${Xt}-mini)`]:{"&, &:hover":{[`${Xt}-item-link`]:{borderColor:Dt.colorBorder}},"&:focus-visible":{[`${Xt}-item-link`]:{borderColor:Dt.colorBorder}},[`${Xt}-item, ${Xt}-item-link`]:{backgroundColor:Dt.colorBgContainerDisabled,borderColor:Dt.colorBorder,[`&:hover:not(${Xt}-item-active)`]:{backgroundColor:Dt.colorBgContainerDisabled,borderColor:Dt.colorBorder,a:{color:Dt.colorTextDisabled}},[`&${Xt}-item-active`]:{backgroundColor:Dt.itemActiveBgDisabled}},[`${Xt}-prev, ${Xt}-next`]:{"&:hover button":{backgroundColor:Dt.colorBgContainerDisabled,borderColor:Dt.colorBorder,color:Dt.colorTextDisabled},[`${Xt}-item-link`]:{backgroundColor:Dt.colorBgContainerDisabled,borderColor:Dt.colorBorder}}},[`${Xt}:not(${Xt}-mini)`]:{[`${Xt}-prev, ${Xt}-next`]:{"&:hover button":{borderColor:Dt.colorPrimaryHover,backgroundColor:Dt.itemBg},[`${Xt}-item-link`]:{backgroundColor:Dt.itemLinkBg,borderColor:Dt.colorBorder},[`&:hover ${Xt}-item-link`]:{borderColor:Dt.colorPrimary,backgroundColor:Dt.itemBg,color:Dt.colorPrimary},[`&${Xt}-disabled`]:{[`${Xt}-item-link`]:{borderColor:Dt.colorBorder,color:Dt.colorTextDisabled}}},[`${Xt}-item`]:{backgroundColor:Dt.itemBg,border:`${Dt.lineWidth}px ${Dt.lineType} ${Dt.colorBorder}`,[`&:hover:not(${Xt}-item-active)`]:{borderColor:Dt.colorPrimary,backgroundColor:Dt.itemBg,a:{color:Dt.colorPrimary}},"&-active":{borderColor:Dt.colorPrimary}}}}},It=Dt=>{const{componentCls:Xt}=Dt;return{[`${Xt}:not(${Xt}-disabled)`]:{[`${Xt}-item`]:Object.assign({},(0,Mn.Qy)(Dt)),[`${Xt}-jump-prev, ${Xt}-jump-next`]:{"&:focus-visible":Object.assign({[`${Xt}-item-link-icon`]:{opacity:1},[`${Xt}-item-ellipsis`]:{opacity:0}},(0,Mn.oN)(Dt))},[`${Xt}-prev, ${Xt}-next`]:{[`&:focus-visible ${Xt}-item-link`]:Object.assign({},(0,Mn.oN)(Dt))}}}};var Ct=(0,Wn.Z)("Pagination",Dt=>{const Xt=(0,zn.TS)(Dt,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Dt.marginXXS/2,paginationMiniQuickJumperInputWidth:Dt.controlHeightLG*1.1,paginationItemPaddingInline:Dt.marginXXS*1.5,paginationEllipsisLetterSpacing:Dt.marginXXS/2,paginationSlashMarginInlineStart:Dt.marginXXS,paginationSlashMarginInlineEnd:Dt.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Qt.e5)(Dt),(0,Qt.TM)(Dt));return[we(Xt),It(Xt),Dt.wireframe&&rt(Xt)]},Dt=>({itemBg:Dt.colorBgContainer,itemSize:Dt.controlHeight,itemSizeSM:Dt.controlHeightSM,itemActiveBg:Dt.colorBgContainer,itemLinkBg:Dt.colorBgContainer,itemActiveColorDisabled:Dt.colorTextDisabled,itemActiveBgDisabled:Dt.controlItemBgActiveDisabled,itemInputBg:Dt.colorBgContainer,miniOptionsSizeChangerTop:0})),$t=function(Dt,Xt){var nn={};for(var bn in Dt)Object.prototype.hasOwnProperty.call(Dt,bn)&&Xt.indexOf(bn)<0&&(nn[bn]=Dt[bn]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,bn=Object.getOwnPropertySymbols(Dt);en<bn.length;en++)Xt.indexOf(bn[en])<0&&Object.prototype.propertyIsEnumerable.call(Dt,bn[en])&&(nn[bn[en]]=Dt[bn[en]]);return nn},wt=Dt=>{const{prefixCls:Xt,selectPrefixCls:nn,className:bn,rootClassName:en,style:Zn,size:Yn,locale:pr,selectComponentClass:ti,responsive:Pn,showSizeChanger:Or}=Dt,Br=$t(Dt,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Di}=(0,Tt.Z)(Pn),{getPrefixCls:mi,direction:ci,pagination:Fr={}}=Se.useContext(yn.E_),zr=mi("pagination",Xt),[Fi,ko]=Ct(zr),aa=Or!=null?Or:Fr.showSizeChanger,Wo=Se.useMemo(()=>{const Mr=Se.createElement("span",{className:`${zr}-item-ellipsis`},"\u2022\u2022\u2022"),tr=Se.createElement("button",{className:`${zr}-item-link`,type:"button",tabIndex:-1},ci==="rtl"?Se.createElement(de.Z,null):Se.createElement(re.Z,null)),Zt=Se.createElement("button",{className:`${zr}-item-link`,type:"button",tabIndex:-1},ci==="rtl"?Se.createElement(re.Z,null):Se.createElement(de.Z,null)),Ot=Se.createElement("a",{className:`${zr}-item-link`},Se.createElement("div",{className:`${zr}-item-container`},ci==="rtl"?Se.createElement(le.Z,{className:`${zr}-item-link-icon`}):Se.createElement(ae,{className:`${zr}-item-link-icon`}),Mr)),ge=Se.createElement("a",{className:`${zr}-item-link`},Se.createElement("div",{className:`${zr}-item-container`},ci==="rtl"?Se.createElement(ae,{className:`${zr}-item-link-icon`}):Se.createElement(le.Z,{className:`${zr}-item-link-icon`}),Mr));return{prevIcon:tr,nextIcon:Zt,jumpPrevIcon:Ot,jumpNextIcon:ge}},[ci,zr]),[li]=(0,Lt.Z)("Pagination",jt.Z),rn=Object.assign(Object.assign({},li),pr),nr=(0,ln.Z)(Yn),dr=nr==="small"||!!(Di&&!nr&&Pn),rr=mi("select",nn),Jr=me()({[`${zr}-mini`]:dr,[`${zr}-rtl`]:ci==="rtl"},Fr==null?void 0:Fr.className,bn,en,ko),Ar=Object.assign(Object.assign({},Fr==null?void 0:Fr.style),Zn);return Fi(Se.createElement(Ge,Object.assign({},Wo,Br,{style:Ar,prefixCls:zr,selectPrefixCls:rr,className:Jr,selectComponentClass:ti||(dr?kn:In),locale:rn,showSizeChanger:aa})))},on=wt},78045:function(dn,St,ee){"use strict";ee.d(St,{ZP:function(){return nt}});var te=ee(94184),Se=ee.n(te),Le=ee(5663),Ce=ee(1337),ce=ee(67294),fe=ee(53124),ae=ee(98675);const le=ce.createContext(null),re=le.Provider;var de=le;const he=ce.createContext(null),me=he.Provider;var se=ee(95860),ye=ee(17799),_e=ee(98866),Me=ee(65223),ve=ee(14747),Fe=ee(67968),$e=ee(45503);const Te=Ge=>{const{componentCls:jt,antCls:yn}=Ge,ln=`${jt}-group`;return{[ln]:Object.assign(Object.assign({},(0,ve.Wf)(Ge)),{display:"inline-block",fontSize:0,[`&${ln}-rtl`]:{direction:"rtl"},[`${yn}-badge ${yn}-badge-count`]:{zIndex:1},[`> ${yn}-badge:not(:first-child) > ${yn}-button-wrapper`]:{borderInlineStart:"none"}})}},ze=Ge=>{const{componentCls:jt,wrapperMarginInlineEnd:yn,colorPrimary:ln,radioSize:Tt,motionDurationSlow:Lt,motionDurationMid:Jt,motionEaseInOutCirc:kn,colorBgContainer:In,colorBorder:Qt,lineWidth:Mn,dotSize:Wn,colorBgContainerDisabled:zn,colorTextDisabled:at,paddingXS:Oe,dotColorDisabled:ke,lineType:Be,radioDotDisabledSize:Ne,wireframe:we,colorWhite:rt}=Ge,It=`${jt}-inner`;return{[`${jt}-wrapper`]:Object.assign(Object.assign({},(0,ve.Wf)(Ge)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:yn,cursor:"pointer",[`&${jt}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ge.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${jt}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Mn}px ${Be} ${ln}`,borderRadius:"50%",visibility:"hidden",content:'""'},[jt]:Object.assign(Object.assign({},(0,ve.Wf)(Ge)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${jt}-wrapper:hover &,
|
|
|
&:hover ${It}`]:{borderColor:ln},[`${jt}-input:focus-visible + ${It}`]:Object.assign({},(0,ve.oN)(Ge)),[`${jt}:hover::after, ${jt}-wrapper:hover &::after`]:{visibility:"visible"},[`${jt}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Tt,height:Tt,marginBlockStart:Tt/-2,marginInlineStart:Tt/-2,backgroundColor:we?ln:rt,borderBlockStart:0,borderInlineStart:0,borderRadius:Tt,transform:"scale(0)",opacity:0,transition:`all ${Lt} ${kn}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Tt,height:Tt,backgroundColor:In,borderColor:Qt,borderStyle:"solid",borderWidth:Mn,borderRadius:"50%",transition:`all ${Jt}`},[`${jt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${jt}-checked`]:{[It]:{borderColor:ln,backgroundColor:we?In:ln,"&::after":{transform:`scale(${Wn/Tt})`,opacity:1,transition:`all ${Lt} ${kn}`}}},[`${jt}-disabled`]:{cursor:"not-allowed",[It]:{backgroundColor:zn,borderColor:Qt,cursor:"not-allowed","&::after":{backgroundColor:ke}},[`${jt}-input`]:{cursor:"not-allowed"},[`${jt}-disabled + span`]:{color:at,cursor:"not-allowed"},[`&${jt}-checked`]:{[It]:{"&::after":{transform:`scale(${Ne/Tt})`}}}},[`span${jt} + *`]:{paddingInlineStart:Oe,paddingInlineEnd:Oe}})}},Ee=Ge=>{const{buttonColor:jt,controlHeight:yn,componentCls:ln,lineWidth:Tt,lineType:Lt,colorBorder:Jt,motionDurationSlow:kn,motionDurationMid:In,buttonPaddingInline:Qt,fontSize:Mn,buttonBg:Wn,fontSizeLG:zn,controlHeightLG:at,controlHeightSM:Oe,paddingXS:ke,borderRadius:Be,borderRadiusSM:Ne,borderRadiusLG:we,buttonCheckedBg:rt,buttonSolidCheckedColor:It,colorTextDisabled:Ct,colorBgContainerDisabled:$t,buttonCheckedBgDisabled:Vt,buttonCheckedColorDisabled:wt,colorPrimary:on,colorPrimaryHover:Dt,colorPrimaryActive:Xt,buttonSolidCheckedBg:nn,buttonSolidCheckedHoverBg:bn,buttonSolidCheckedActiveBg:en}=Ge;return{[`${ln}-button-wrapper`]:{position:"relative",display:"inline-block",height:yn,margin:0,paddingInline:Qt,paddingBlock:0,color:jt,fontSize:Mn,lineHeight:`${yn-Tt*2}px`,background:Wn,border:`${Tt}px ${Lt} ${Jt}`,borderBlockStartWidth:Tt+.02,borderInlineStartWidth:0,borderInlineEndWidth:Tt,cursor:"pointer",transition:[`color ${In}`,`background ${In}`,`box-shadow ${In}`].join(","),a:{color:jt},[`> ${ln}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Tt,insetInlineStart:-Tt,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Tt,paddingInline:0,backgroundColor:Jt,transition:`background-color ${kn}`,content:'""'}},"&:first-child":{borderInlineStart:`${Tt}px ${Lt} ${Jt}`,borderStartStartRadius:Be,borderEndStartRadius:Be},"&:last-child":{borderStartEndRadius:Be,borderEndEndRadius:Be},"&:first-child:last-child":{borderRadius:Be},[`${ln}-group-large &`]:{height:at,fontSize:zn,lineHeight:`${at-Tt*2}px`,"&:first-child":{borderStartStartRadius:we,borderEndStartRadius:we},"&:last-child":{borderStartEndRadius:we,borderEndEndRadius:we}},[`${ln}-group-small &`]:{height:Oe,paddingInline:ke-Tt,paddingBlock:0,lineHeight:`${Oe-Tt*2}px`,"&:first-child":{borderStartStartRadius:Ne,borderEndStartRadius:Ne},"&:last-child":{borderStartEndRadius:Ne,borderEndEndRadius:Ne}},"&:hover":{position:"relative",color:on},"&:has(:focus-visible)":Object.assign({},(0,ve.oN)(Ge)),[`${ln}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${ln}-button-wrapper-disabled)`]:{zIndex:1,color:on,background:rt,borderColor:on,"&::before":{backgroundColor:on},"&:first-child":{borderColor:on},"&:hover":{color:Dt,borderColor:Dt,"&::before":{backgroundColor:Dt}},"&:active":{color:Xt,borderColor:Xt,"&::before":{backgroundColor:Xt}}},[`${ln}-group-solid &-checked:not(${ln}-button-wrapper-disabled)`]:{color:It,background:nn,borderColor:nn,"&:hover":{color:It,background:bn,borderColor:bn},"&:active":{color:It,background:en,borderColor:en}},"&-disabled":{color:Ct,backgroundColor:$t,borderColor:Jt,cursor:"not-allowed","&:first-child, &:hover":{color:Ct,backgroundColor:$t,borderColor:Jt}},[`&-disabled${ln}-button-wrapper-checked`]:{color:wt,backgroundColor:Vt,borderColor:Jt,boxShadow:"none"}}}},be=Ge=>Ge-4*2;var Re=(0,Fe.Z)("Radio",Ge=>{const{controlOutline:jt,controlOutlineWidth:yn,radioSize:ln}=Ge,Tt=`0 0 0 ${yn}px ${jt}`,Lt=Tt,Jt=be(ln),kn=(0,$e.TS)(Ge,{radioDotDisabledSize:Jt,radioFocusShadow:Tt,radioButtonFocusShadow:Lt});return[Te(kn),ze(kn),Ee(kn)]},Ge=>{const{wireframe:jt,padding:yn,marginXS:ln,lineWidth:Tt,fontSizeLG:Lt,colorText:Jt,colorBgContainer:kn,colorTextDisabled:In,controlItemBgActiveDisabled:Qt,colorTextLightSolid:Mn,colorPrimary:Wn,colorPrimaryHover:zn,colorPrimaryActive:at}=Ge,Oe=4,ke=Lt,Be=jt?be(ke):ke-(Oe+Tt)*2;return{radioSize:ke,dotSize:Be,dotColorDisabled:In,buttonSolidCheckedColor:Mn,buttonSolidCheckedBg:Wn,buttonSolidCheckedHoverBg:zn,buttonSolidCheckedActiveBg:at,buttonBg:kn,buttonCheckedBg:kn,buttonColor:Jt,buttonCheckedBgDisabled:Qt,buttonCheckedColorDisabled:In,buttonPaddingInline:yn-Tt,wrapperMarginInlineEnd:ln}}),De=ee(45353),et=ee(92429),Ye=function(Ge,jt){var yn={};for(var ln in Ge)Object.prototype.hasOwnProperty.call(Ge,ln)&&jt.indexOf(ln)<0&&(yn[ln]=Ge[ln]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,ln=Object.getOwnPropertySymbols(Ge);Tt<ln.length;Tt++)jt.indexOf(ln[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,ln[Tt])&&(yn[ln[Tt]]=Ge[ln[Tt]]);return yn};const dt=(Ge,jt)=>{var yn,ln;const Tt=ce.useContext(de),Lt=ce.useContext(he),{getPrefixCls:Jt,direction:kn,radio:In}=ce.useContext(fe.E_),Qt=ce.useRef(null),Mn=(0,ye.sQ)(jt,Qt),{isFormItemInput:Wn}=ce.useContext(Me.aM),zn=Xt=>{var nn,bn;(nn=Ge.onChange)===null||nn===void 0||nn.call(Ge,Xt),(bn=Tt==null?void 0:Tt.onChange)===null||bn===void 0||bn.call(Tt,Xt)},{prefixCls:at,className:Oe,rootClassName:ke,children:Be,style:Ne}=Ge,we=Ye(Ge,["prefixCls","className","rootClassName","children","style"]),rt=Jt("radio",at),It=((Tt==null?void 0:Tt.optionType)||Lt)==="button",Ct=It?`${rt}-button`:rt,[$t,Vt]=Re(rt),wt=Object.assign({},we),on=ce.useContext(_e.Z);Tt&&(wt.name=Tt.name,wt.onChange=zn,wt.checked=Ge.value===Tt.value,wt.disabled=(yn=wt.disabled)!==null&&yn!==void 0?yn:Tt.disabled),wt.disabled=(ln=wt.disabled)!==null&&ln!==void 0?ln:on;const Dt=Se()(`${Ct}-wrapper`,{[`${Ct}-wrapper-checked`]:wt.checked,[`${Ct}-wrapper-disabled`]:wt.disabled,[`${Ct}-wrapper-rtl`]:kn==="rtl",[`${Ct}-wrapper-in-form-item`]:Wn},In==null?void 0:In.className,Oe,ke,Vt);return $t(ce.createElement(De.Z,{component:"Radio",disabled:wt.disabled},ce.createElement("label",{className:Dt,style:Object.assign(Object.assign({},In==null?void 0:In.style),Ne),onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave},ce.createElement(se.Z,Object.assign({},wt,{className:Se()(wt.className,!It&&et.A),type:"radio",prefixCls:Ct,ref:Mn})),Be!==void 0?ce.createElement("span",null,Be):null)))};var zt=ce.forwardRef(dt);const pt=ce.forwardRef((Ge,jt)=>{const{getPrefixCls:yn,direction:ln}=ce.useContext(fe.E_),[Tt,Lt]=(0,Le.Z)(Ge.defaultValue,{value:Ge.value}),Jt=nn=>{const bn=Tt,en=nn.target.value;"value"in Ge||Lt(en);const{onChange:Zn}=Ge;Zn&&en!==bn&&Zn(nn)},{prefixCls:kn,className:In,rootClassName:Qt,options:Mn,buttonStyle:Wn="outline",disabled:zn,children:at,size:Oe,style:ke,id:Be,onMouseEnter:Ne,onMouseLeave:we,onFocus:rt,onBlur:It}=Ge,Ct=yn("radio",kn),$t=`${Ct}-group`,[Vt,wt]=Re(Ct);let on=at;Mn&&Mn.length>0&&(on=Mn.map(nn=>typeof nn=="string"||typeof nn=="number"?ce.createElement(zt,{key:nn.toString(),prefixCls:Ct,disabled:zn,value:nn,checked:Tt===nn},nn):ce.createElement(zt,{key:`radio-group-value-options-${nn.value}`,prefixCls:Ct,disabled:nn.disabled||zn,value:nn.value,checked:Tt===nn.value,title:nn.title,style:nn.style},nn.label)));const Dt=(0,ae.Z)(Oe),Xt=Se()($t,`${$t}-${Wn}`,{[`${$t}-${Dt}`]:Dt,[`${$t}-rtl`]:ln==="rtl"},In,Qt,wt);return Vt(ce.createElement("div",Object.assign({},(0,Ce.Z)(Ge,{aria:!0,data:!0}),{className:Xt,style:ke,onMouseEnter:Ne,onMouseLeave:we,onFocus:rt,onBlur:It,id:Be,ref:jt}),ce.createElement(re,{value:{onChange:Jt,value:Tt,disabled:Ge.disabled,name:Ge.name,optionType:Ge.optionType}},on)))});var Kt=ce.memo(pt),Ze=function(Ge,jt){var yn={};for(var ln in Ge)Object.prototype.hasOwnProperty.call(Ge,ln)&&jt.indexOf(ln)<0&&(yn[ln]=Ge[ln]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,ln=Object.getOwnPropertySymbols(Ge);Tt<ln.length;Tt++)jt.indexOf(ln[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,ln[Tt])&&(yn[ln[Tt]]=Ge[ln[Tt]]);return yn};const tt=(Ge,jt)=>{const{getPrefixCls:yn}=ce.useContext(fe.E_),{prefixCls:ln}=Ge,Tt=Ze(Ge,["prefixCls"]),Lt=yn("radio",ln);return ce.createElement(me,{value:"button"},ce.createElement(zt,Object.assign({prefixCls:Lt},Tt,{type:"radio",ref:jt})))};var ft=ce.forwardRef(tt);const Ut=zt;Ut.Button=ft,Ut.Group=Kt,Ut.__ANT_RADIO=!0;var nt=Ut},11713:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return vt}});var te=ee(94184),Se=ee.n(te),Le=ee(87462),Ce=ee(74902),ce=ee(4942),fe=ee(1413),ae=ee(97685),le=ee(45987),re=ee(71002),de=ee(67294);function he(Xe){var ot=de.useRef();ot.current=Xe;var Nt=de.useCallback(function(){for(var Pt,qt=arguments.length,hn=new Array(qt),gn=0;gn<qt;gn++)hn[gn]=arguments[gn];return(Pt=ot.current)===null||Pt===void 0?void 0:Pt.call.apply(Pt,[ot].concat(hn))},[]);return Nt}function me(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var se=me()?de.useLayoutEffect:de.useEffect,ye=se,_e=function(ot,Nt){var Pt=de.useRef(!0);se(function(){if(!Pt.current)return ot()},Nt),se(function(){return Pt.current=!1,function(){Pt.current=!0}},[])};function Me(Xe){var ot=de.useRef(!1),Nt=de.useState(Xe),Pt=(0,ae.Z)(Nt,2),qt=Pt[0],hn=Pt[1];de.useEffect(function(){return ot.current=!1,function(){ot.current=!0}},[]);function gn(Nn,On){On&&ot.current||hn(Nn)}return[qt,gn]}function ve(Xe){return Xe!==void 0}function Fe(Xe,ot){var Nt=ot||{},Pt=Nt.defaultValue,qt=Nt.value,hn=Nt.onChange,gn=Nt.postState,Nn=Me(function(){return ve(qt)?qt:ve(Pt)?typeof Pt=="function"?Pt():Pt:typeof Xe=="function"?Xe():Xe}),On=(0,ae.Z)(Nn,2),vn=On[0],Fn=On[1],Gn=qt!==void 0?qt:vn,xr=gn?gn(Gn):Gn,sr=he(hn),Lr=Me([Gn]),Ur=(0,ae.Z)(Lr,2),Pr=Ur[0],Qr=Ur[1];_e(function(){var Wr=Pr[0];vn!==Wr&&sr(vn,Wr)},[Pr]),_e(function(){ve(qt)||Fn(qt)},[qt]);var Tr=he(function(Wr,ni){Fn(Wr,ni),Qr([Gn],ni)});return[xr,Tr]}var $e={};function Te(Xe,ot){}function ze(Xe,ot){}function Ee(){$e={}}function be(Xe,ot,Nt){!ot&&!$e[Nt]&&(Xe(!1,Nt),$e[Nt]=!0)}function Re(Xe,ot){be(Te,Xe,ot)}function De(Xe,ot){be(ze,Xe,ot)}var et=Re,Ye=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Xe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Xe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Xe==null?void 0:Xe.substr(0,4))},dt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ot){var Nt=ot.keyCode;if(ot.altKey&&!ot.ctrlKey||ot.metaKey||Nt>=dt.F1&&Nt<=dt.F12)return!1;switch(Nt){case dt.ALT:case dt.CAPS_LOCK:case dt.CONTEXT_MENU:case dt.CTRL:case dt.DOWN:case dt.END:case dt.ESC:case dt.HOME:case dt.INSERT:case dt.LEFT:case dt.MAC_FF_META:case dt.META:case dt.NUMLOCK:case dt.NUM_CENTER:case dt.PAGE_DOWN:case dt.PAGE_UP:case dt.PAUSE:case dt.PRINT_SCREEN:case dt.RIGHT:case dt.SHIFT:case dt.UP:case dt.WIN_KEY:case dt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ot){if(ot>=dt.ZERO&&ot<=dt.NINE||ot>=dt.NUM_ZERO&&ot<=dt.NUM_MULTIPLY||ot>=dt.A&&ot<=dt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ot===0)return!0;switch(ot){case dt.SPACE:case dt.QUESTION_MARK:case dt.NUM_PLUS:case dt.NUM_MINUS:case dt.NUM_PERIOD:case dt.NUM_DIVISION:case dt.SEMICOLON:case dt.DASH:case dt.EQUALS:case dt.COMMA:case dt.PERIOD:case dt.SLASH:case dt.APOSTROPHE:case dt.SINGLE_QUOTE:case dt.OPEN_SQUARE_BRACKET:case dt.BACKSLASH:case dt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ke=dt,zt=ee(47655);function pt(Xe,ot,Nt){var Pt=de.useRef({});return(!("value"in Pt.current)||Nt(Pt.current.condition,ot))&&(Pt.current.value=Xe(),Pt.current.condition=ot),Pt.current.value}function Kt(Xe,ot){typeof Xe=="function"?Xe(ot):(0,re.Z)(Xe)==="object"&&Xe&&"current"in Xe&&(Xe.current=ot)}function Ze(){for(var Xe=arguments.length,ot=new Array(Xe),Nt=0;Nt<Xe;Nt++)ot[Nt]=arguments[Nt];var Pt=ot.filter(function(qt){return qt});return Pt.length<=1?Pt[0]:function(qt){ot.forEach(function(hn){Kt(hn,qt)})}}function tt(){for(var Xe=arguments.length,ot=new Array(Xe),Nt=0;Nt<Xe;Nt++)ot[Nt]=arguments[Nt];return pt(function(){return Ze.apply(void 0,ot)},ot,function(Pt,qt){return Pt.length===qt.length&&Pt.every(function(hn,gn){return hn===qt[gn]})})}function ft(Xe){var ot,Nt,Pt=isMemo(Xe)?Xe.type.type:Xe.type;return!(typeof Pt=="function"&&!((ot=Pt.prototype)!==null&&ot!==void 0&&ot.render)||typeof Xe=="function"&&!((Nt=Xe.prototype)!==null&&Nt!==void 0&&Nt.render))}var Ut=function(ot){var Nt=ot.className,Pt=ot.customizeIcon,qt=ot.customizeIconProps,hn=ot.onMouseDown,gn=ot.onClick,Nn=ot.children,On;return typeof Pt=="function"?On=Pt(qt):On=Pt,de.createElement("span",{className:Nt,onMouseDown:function(Fn){Fn.preventDefault(),hn&&hn(Fn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:gn,"aria-hidden":!0},On!==void 0?On:de.createElement("span",{className:Se()(Nt.split(/\s+/).map(function(vn){return"".concat(vn,"-icon")}))},Nn))},nt=Ut;function Ge(Xe,ot,Nt,Pt,qt){var hn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,gn=arguments.length>6?arguments[6]:void 0,Nn=arguments.length>7?arguments[7]:void 0,On=de.useMemo(function(){if((0,re.Z)(Pt)==="object")return Pt.clearIcon;if(qt)return qt},[Pt,qt]),vn=de.useMemo(function(){return!!(!hn&&Pt&&(Nt.length||gn)&&!(Nn==="combobox"&&gn===""))},[Pt,hn,Nt.length,gn,Nn]);return{allowClear:vn,clearIcon:de.createElement(nt,{className:"".concat(Xe,"-clear"),onMouseDown:ot,customizeIcon:On},"\xD7")}}var jt=de.createContext(null);function yn(){return de.useContext(jt)}function ln(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ot=de.useState(!1),Nt=(0,ae.Z)(ot,2),Pt=Nt[0],qt=Nt[1],hn=de.useRef(null),gn=function(){window.clearTimeout(hn.current)};de.useEffect(function(){return gn},[]);var Nn=function(vn,Fn){gn(),hn.current=window.setTimeout(function(){qt(vn),Fn&&Fn()},Xe)};return[Pt,Nn,gn]}function Tt(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ot=de.useRef(null),Nt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Nt.current)}},[]);function Pt(qt){(qt||ot.current===null)&&(ot.current=qt),window.clearTimeout(Nt.current),Nt.current=window.setTimeout(function(){ot.current=null},Xe)}return[function(){return ot.current},Pt]}function Lt(Xe,ot,Nt,Pt){var qt=de.useRef(null);qt.current={open:ot,triggerOpen:Nt,customizedTrigger:Pt},de.useEffect(function(){function hn(gn){var Nn;if(!((Nn=qt.current)!==null&&Nn!==void 0&&Nn.customizedTrigger)){var On=gn.target;On.shadowRoot&&gn.composed&&(On=gn.composedPath()[0]||On),qt.current.open&&Xe().filter(function(vn){return vn}).every(function(vn){return!vn.contains(On)&&vn!==On})&&qt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",hn),function(){return window.removeEventListener("mousedown",hn)}},[])}var Jt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,kn=`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`,In="".concat(Jt," ").concat(kn).split(/[\s\n]+/),Qt="aria-",Mn="data-";function Wn(Xe,ot){return Xe.indexOf(ot)===0}function zn(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt;ot===!1?Nt={aria:!0,data:!0,attr:!0}:ot===!0?Nt={aria:!0}:Nt=(0,fe.Z)({},ot);var Pt={};return Object.keys(Xe).forEach(function(qt){(Nt.aria&&(qt==="role"||Wn(qt,Qt))||Nt.data&&Wn(qt,Mn)||Nt.attr&&In.includes(qt))&&(Pt[qt]=Xe[qt])}),Pt}var at=ee(48555),Oe=ee(14075),ke=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Be=void 0;function Ne(Xe,ot){var Nt=Xe.prefixCls,Pt=Xe.invalidate,qt=Xe.item,hn=Xe.renderItem,gn=Xe.responsive,Nn=Xe.responsiveDisabled,On=Xe.registerSize,vn=Xe.itemKey,Fn=Xe.className,Gn=Xe.style,xr=Xe.children,sr=Xe.display,Lr=Xe.order,Ur=Xe.component,Pr=Ur===void 0?"div":Ur,Qr=(0,le.Z)(Xe,ke),Tr=gn&&!sr;function Wr(gi){On(vn,gi)}de.useEffect(function(){return function(){Wr(null)}},[]);var ni=hn&&qt!==Be?hn(qt):xr,Si;Pt||(Si={opacity:Tr?0:1,height:Tr?0:Be,overflowY:Tr?"hidden":Be,order:gn?Lr:Be,pointerEvents:Tr?"none":Be,position:Tr?"absolute":Be});var Nr={};Tr&&(Nr["aria-hidden"]=!0);var wi=de.createElement(Pr,(0,Le.Z)({className:Se()(!Pt&&Nt,Fn),style:(0,fe.Z)((0,fe.Z)({},Si),Gn)},Nr,Qr,{ref:ot}),ni);return gn&&(wi=de.createElement(at.Z,{onResize:function(vo){var Ji=vo.offsetWidth;Wr(Ji)},disabled:Nn},wi)),wi}var we=de.forwardRef(Ne);we.displayName="Item";var rt=we,It=ee(77527),Ct=ee(73935),$t=ee(96523);function Vt(Xe){if(typeof MessageChannel=="undefined")(0,$t.Z)(Xe);else{var ot=new MessageChannel;ot.port1.onmessage=function(){return Xe()},ot.port2.postMessage(void 0)}}function wt(){var Xe=de.useRef(null),ot=function(Pt){Xe.current||(Xe.current=[],Vt(function(){(0,Ct.unstable_batchedUpdates)(function(){Xe.current.forEach(function(qt){qt()}),Xe.current=null})})),Xe.current.push(Pt)};return ot}function on(Xe,ot){var Nt=de.useState(ot),Pt=(0,ae.Z)(Nt,2),qt=Pt[0],hn=Pt[1],gn=(0,It.Z)(function(Nn){Xe(function(){hn(Nn)})});return[qt,gn]}var Dt=de.createContext(null),Xt=["component"],nn=["className"],bn=["className"],en=function(ot,Nt){var Pt=de.useContext(Dt);if(!Pt){var qt=ot.component,hn=qt===void 0?"div":qt,gn=(0,le.Z)(ot,Xt);return de.createElement(hn,(0,Le.Z)({},gn,{ref:Nt}))}var Nn=Pt.className,On=(0,le.Z)(Pt,nn),vn=ot.className,Fn=(0,le.Z)(ot,bn);return de.createElement(Dt.Provider,{value:null},de.createElement(rt,(0,Le.Z)({ref:Nt,className:Se()(Nn,vn)},On,Fn)))},Zn=de.forwardRef(en);Zn.displayName="RawItem";var Yn=Zn,pr=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ti="responsive",Pn="invalidate";function Or(Xe){return"+ ".concat(Xe.length," ...")}function Br(Xe,ot){var Nt=Xe.prefixCls,Pt=Nt===void 0?"rc-overflow":Nt,qt=Xe.data,hn=qt===void 0?[]:qt,gn=Xe.renderItem,Nn=Xe.renderRawItem,On=Xe.itemKey,vn=Xe.itemWidth,Fn=vn===void 0?10:vn,Gn=Xe.ssr,xr=Xe.style,sr=Xe.className,Lr=Xe.maxCount,Ur=Xe.renderRest,Pr=Xe.renderRawRest,Qr=Xe.suffix,Tr=Xe.component,Wr=Tr===void 0?"div":Tr,ni=Xe.itemComponent,Si=Xe.onVisibleChange,Nr=(0,le.Z)(Xe,pr),wi=Gn==="full",gi=wt(),vo=on(gi,null),Ji=(0,ae.Z)(vo,2),Pi=Ji[0],Mi=Ji[1],Ai=Pi||0,pi=on(gi,new Map),zi=(0,ae.Z)(pi,2),ai=zi[0],ii=zi[1],Ui=on(gi,0),to=(0,ae.Z)(Ui,2),la=to[0],da=to[1],So=on(gi,0),go=(0,ae.Z)(So,2),Zi=go[0],Ii=go[1],pa=on(gi,0),io=(0,ae.Z)(pa,2),si=io[0],Ki=io[1],Io=(0,de.useState)(null),Ro=(0,ae.Z)(Io,2),qo=Ro[0],Qi=Ro[1],ma=(0,de.useState)(null),va=(0,ae.Z)(ma,2),ia=va[0],ca=va[1],Ea=de.useMemo(function(){return ia===null&&wi?Number.MAX_SAFE_INTEGER:ia||0},[ia,Pi]),Ja=(0,de.useState)(!1),Ma=(0,ae.Z)(Ja,2),Za=Ma[0],vs=Ma[1],Es="".concat(Pt,"-item"),Ls=Math.max(la,Zi),Qa=Lr===ti,La=hn.length&&Qa,ho=Lr===Pn,Po=La||typeof Lr=="number"&&hn.length>Lr,_a=(0,de.useMemo)(function(){var ya=hn;return La?Pi===null&&wi?ya=hn:ya=hn.slice(0,Math.min(hn.length,Ai/Fn)):typeof Lr=="number"&&(ya=hn.slice(0,Lr)),ya},[hn,Fn,Pi,Lr,La]),Da=(0,de.useMemo)(function(){return La?hn.slice(Ea+1):hn.slice(_a.length)},[hn,_a,La,Ea]),gs=(0,de.useCallback)(function(ya,yi){var Mo;return typeof On=="function"?On(ya):(Mo=On&&(ya==null?void 0:ya[On]))!==null&&Mo!==void 0?Mo:yi},[On]),Rs=(0,de.useCallback)(gn||function(ya){return ya},[gn]);function Ws(ya,yi,Mo){ia===ya&&(yi===void 0||yi===qo)||(ca(ya),Mo||(vs(ya<hn.length-1),Si==null||Si(ya)),yi!==void 0&&Qi(yi))}function hl(ya,yi){Mi(yi.clientWidth)}function ul(ya,yi){ii(function(Mo){var Do=new Map(Mo);return yi===null?Do.delete(ya):Do.set(ya,yi),Do})}function Ts(ya,yi){Ii(yi),da(Zi)}function es(ya,yi){Ki(yi)}function Bi(ya){return ai.get(gs(_a[ya],ya))}(0,Oe.Z)(function(){if(Ai&&typeof Ls=="number"&&_a){var ya=si,yi=_a.length,Mo=yi-1;if(!yi){Ws(0,null);return}for(var Do=0;Do<yi;Do+=1){var Uo=Bi(Do);if(wi&&(Uo=Uo||0),Uo===void 0){Ws(Do-1,void 0,!0);break}if(ya+=Uo,Mo===0&&ya<=Ai||Do===Mo-1&&ya+Bi(Mo)<=Ai){Ws(Mo,null);break}else if(ya+Ls>Ai){Ws(Do-1,ya-Uo-si+Zi);break}}Qr&&Bi(0)+si>Ai&&Qi(null)}},[Ai,ai,Zi,si,gs,_a]);var Co=Za&&!!Da.length,Qo={};qo!==null&&La&&(Qo={position:"absolute",left:qo,top:0});var Ca={prefixCls:Es,responsive:La,component:ni,invalidate:ho},is=Nn?function(ya,yi){var Mo=gs(ya,yi);return de.createElement(Dt.Provider,{key:Mo,value:(0,fe.Z)((0,fe.Z)({},Ca),{},{order:yi,item:ya,itemKey:Mo,registerSize:ul,display:yi<=Ea})},Nn(ya,yi))}:function(ya,yi){var Mo=gs(ya,yi);return de.createElement(rt,(0,Le.Z)({},Ca,{order:yi,key:Mo,item:ya,renderItem:Rs,itemKey:Mo,registerSize:ul,display:yi<=Ea}))},bs,bl={order:Co?Ea:Number.MAX_SAFE_INTEGER,className:"".concat(Es,"-rest"),registerSize:Ts,display:Co};if(Pr)Pr&&(bs=de.createElement(Dt.Provider,{value:(0,fe.Z)((0,fe.Z)({},Ca),bl)},Pr(Da)));else{var rl=Ur||Or;bs=de.createElement(rt,(0,Le.Z)({},Ca,bl),typeof rl=="function"?rl(Da):rl)}var $l=de.createElement(Wr,(0,Le.Z)({className:Se()(!ho&&Pt,sr),style:xr,ref:ot},Nr),_a.map(is),Po?bs:null,Qr&&de.createElement(rt,(0,Le.Z)({},Ca,{responsive:Qa,responsiveDisabled:!La,order:Ea,className:"".concat(Es,"-suffix"),registerSize:es,display:!0,style:Qo}),Qr));return Qa&&($l=de.createElement(at.Z,{onResize:hl,disabled:!La},$l)),$l}var Di=de.forwardRef(Br);Di.displayName="Overflow",Di.Item=Yn,Di.RESPONSIVE=ti,Di.INVALIDATE=Pn;var mi=Di,ci=mi,Fr=function(ot,Nt){var Pt,qt,hn=ot.prefixCls,gn=ot.id,Nn=ot.inputElement,On=ot.disabled,vn=ot.tabIndex,Fn=ot.autoFocus,Gn=ot.autoComplete,xr=ot.editable,sr=ot.activeDescendantId,Lr=ot.value,Ur=ot.maxLength,Pr=ot.onKeyDown,Qr=ot.onMouseDown,Tr=ot.onChange,Wr=ot.onPaste,ni=ot.onCompositionStart,Si=ot.onCompositionEnd,Nr=ot.open,wi=ot.attrs,gi=Nn||de.createElement("input",null),vo=gi,Ji=vo.ref,Pi=vo.props,Mi=Pi.onKeyDown,Ai=Pi.onChange,pi=Pi.onMouseDown,zi=Pi.onCompositionStart,ai=Pi.onCompositionEnd,ii=Pi.style;return"maxLength"in gi.props,gi=de.cloneElement(gi,(0,fe.Z)((0,fe.Z)((0,fe.Z)({type:"search"},Pi),{},{id:gn,ref:Ze(Nt,Ji),disabled:On,tabIndex:vn,autoComplete:Gn||"off",autoFocus:Fn,className:Se()("".concat(hn,"-selection-search-input"),(Pt=gi)===null||Pt===void 0||(qt=Pt.props)===null||qt===void 0?void 0:qt.className),role:"combobox","aria-label":"Search","aria-expanded":Nr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(gn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(gn,"_list"),"aria-activedescendant":Nr?sr:void 0},wi),{},{value:xr?Lr:"",maxLength:Ur,readOnly:!xr,unselectable:xr?null:"on",style:(0,fe.Z)((0,fe.Z)({},ii),{},{opacity:xr?null:0}),onKeyDown:function(to){Pr(to),Mi&&Mi(to)},onMouseDown:function(to){Qr(to),pi&&pi(to)},onChange:function(to){Tr(to),Ai&&Ai(to)},onCompositionStart:function(to){ni(to),zi&&zi(to)},onCompositionEnd:function(to){Si(to),ai&&ai(to)},onPaste:Wr})),gi},zr=de.forwardRef(Fr);zr.displayName="Input";var Fi=zr;function ko(Xe){return Array.isArray(Xe)?Xe:Xe!==void 0?[Xe]:[]}var aa=typeof window!="undefined"&&window.document&&window.document.documentElement,Wo=aa;function li(Xe){return Xe!=null}function rn(Xe){return!Xe&&Xe!==0}function nr(Xe){return["string","number"].includes((0,re.Z)(Xe))}function dr(Xe){var ot=void 0;return Xe&&(nr(Xe.title)?ot=Xe.title.toString():nr(Xe.label)&&(ot=Xe.label.toString())),ot}function rr(Xe,ot){Wo?de.useLayoutEffect(Xe,ot):de.useEffect(Xe,ot)}function Jr(Xe){var ot;return(ot=Xe.key)!==null&&ot!==void 0?ot:Xe.value}var Ar=function(ot){ot.preventDefault(),ot.stopPropagation()},Mr=function(ot){var Nt=ot.id,Pt=ot.prefixCls,qt=ot.values,hn=ot.open,gn=ot.searchValue,Nn=ot.autoClearSearchValue,On=ot.inputRef,vn=ot.placeholder,Fn=ot.disabled,Gn=ot.mode,xr=ot.showSearch,sr=ot.autoFocus,Lr=ot.autoComplete,Ur=ot.activeDescendantId,Pr=ot.tabIndex,Qr=ot.removeIcon,Tr=ot.maxTagCount,Wr=ot.maxTagTextLength,ni=ot.maxTagPlaceholder,Si=ni===void 0?function(Qi){return"+ ".concat(Qi.length," ...")}:ni,Nr=ot.tagRender,wi=ot.onToggleOpen,gi=ot.onRemove,vo=ot.onInputChange,Ji=ot.onInputPaste,Pi=ot.onInputKeyDown,Mi=ot.onInputMouseDown,Ai=ot.onInputCompositionStart,pi=ot.onInputCompositionEnd,zi=de.useRef(null),ai=(0,de.useState)(0),ii=(0,ae.Z)(ai,2),Ui=ii[0],to=ii[1],la=(0,de.useState)(!1),da=(0,ae.Z)(la,2),So=da[0],go=da[1],Zi="".concat(Pt,"-selection"),Ii=hn||Gn==="multiple"&&Nn===!1||Gn==="tags"?gn:"",pa=Gn==="tags"||Gn==="multiple"&&Nn===!1||xr&&(hn||So);rr(function(){to(zi.current.scrollWidth)},[Ii]);function io(Qi,ma,va,ia,ca){return de.createElement("span",{className:Se()("".concat(Zi,"-item"),(0,ce.Z)({},"".concat(Zi,"-item-disabled"),va)),title:dr(Qi)},de.createElement("span",{className:"".concat(Zi,"-item-content")},ma),ia&&de.createElement(nt,{className:"".concat(Zi,"-item-remove"),onMouseDown:Ar,onClick:ca,customizeIcon:Qr},"\xD7"))}function si(Qi,ma,va,ia,ca){var Ea=function(Ma){Ar(Ma),wi(!hn)};return de.createElement("span",{onMouseDown:Ea},Nr({label:ma,value:Qi,disabled:va,closable:ia,onClose:ca}))}function Ki(Qi){var ma=Qi.disabled,va=Qi.label,ia=Qi.value,ca=!Fn&&!ma,Ea=va;if(typeof Wr=="number"&&(typeof va=="string"||typeof va=="number")){var Ja=String(Ea);Ja.length>Wr&&(Ea="".concat(Ja.slice(0,Wr),"..."))}var Ma=function(vs){vs&&vs.stopPropagation(),gi(Qi)};return typeof Nr=="function"?si(ia,Ea,ma,ca,Ma):io(Qi,Ea,ma,ca,Ma)}function Io(Qi){var ma=typeof Si=="function"?Si(Qi):Si;return io({title:ma},ma,!1)}var Ro=de.createElement("div",{className:"".concat(Zi,"-search"),style:{width:Ui},onFocus:function(){go(!0)},onBlur:function(){go(!1)}},de.createElement(Fi,{ref:On,open:hn,prefixCls:Pt,id:Nt,inputElement:null,disabled:Fn,autoFocus:sr,autoComplete:Lr,editable:pa,activeDescendantId:Ur,value:Ii,onKeyDown:Pi,onMouseDown:Mi,onChange:vo,onPaste:Ji,onCompositionStart:Ai,onCompositionEnd:pi,tabIndex:Pr,attrs:zn(ot,!0)}),de.createElement("span",{ref:zi,className:"".concat(Zi,"-search-mirror"),"aria-hidden":!0},Ii,"\xA0")),qo=de.createElement(ci,{prefixCls:"".concat(Zi,"-overflow"),data:qt,renderItem:Ki,renderRest:Io,suffix:Ro,itemKey:Jr,maxCount:Tr});return de.createElement(de.Fragment,null,qo,!qt.length&&!Ii&&de.createElement("span",{className:"".concat(Zi,"-placeholder")},vn))},tr=Mr,Zt=function(ot){var Nt=ot.inputElement,Pt=ot.prefixCls,qt=ot.id,hn=ot.inputRef,gn=ot.disabled,Nn=ot.autoFocus,On=ot.autoComplete,vn=ot.activeDescendantId,Fn=ot.mode,Gn=ot.open,xr=ot.values,sr=ot.placeholder,Lr=ot.tabIndex,Ur=ot.showSearch,Pr=ot.searchValue,Qr=ot.activeValue,Tr=ot.maxLength,Wr=ot.onInputKeyDown,ni=ot.onInputMouseDown,Si=ot.onInputChange,Nr=ot.onInputPaste,wi=ot.onInputCompositionStart,gi=ot.onInputCompositionEnd,vo=ot.title,Ji=de.useState(!1),Pi=(0,ae.Z)(Ji,2),Mi=Pi[0],Ai=Pi[1],pi=Fn==="combobox",zi=pi||Ur,ai=xr[0],ii=Pr||"";pi&&Qr&&!Mi&&(ii=Qr),de.useEffect(function(){pi&&Ai(!1)},[pi,Qr]);var Ui=Fn!=="combobox"&&!Gn&&!Ur?!1:!!ii,to=vo===void 0?dr(ai):vo,la=function(){if(ai)return null;var So=Ui?{visibility:"hidden"}:void 0;return de.createElement("span",{className:"".concat(Pt,"-selection-placeholder"),style:So},sr)};return de.createElement(de.Fragment,null,de.createElement("span",{className:"".concat(Pt,"-selection-search")},de.createElement(Fi,{ref:hn,prefixCls:Pt,id:qt,open:Gn,inputElement:Nt,disabled:gn,autoFocus:Nn,autoComplete:On,editable:zi,activeDescendantId:vn,value:ii,onKeyDown:Wr,onMouseDown:ni,onChange:function(So){Ai(!0),Si(So)},onPaste:Nr,onCompositionStart:wi,onCompositionEnd:gi,tabIndex:Lr,attrs:zn(ot,!0),maxLength:pi?Tr:void 0})),!pi&&ai?de.createElement("span",{className:"".concat(Pt,"-selection-item"),title:to,style:Ui?{visibility:"hidden"}:void 0},ai.label):null,la())},Ot=Zt;function ge(Xe){return![Ke.ESC,Ke.SHIFT,Ke.BACKSPACE,Ke.TAB,Ke.WIN_KEY,Ke.ALT,Ke.META,Ke.WIN_KEY_RIGHT,Ke.CTRL,Ke.SEMICOLON,Ke.EQUALS,Ke.CAPS_LOCK,Ke.CONTEXT_MENU,Ke.F1,Ke.F2,Ke.F3,Ke.F4,Ke.F5,Ke.F6,Ke.F7,Ke.F8,Ke.F9,Ke.F10,Ke.F11,Ke.F12].includes(Xe)}var Ie=function(ot,Nt){var Pt=(0,de.useRef)(null),qt=(0,de.useRef)(!1),hn=ot.prefixCls,gn=ot.open,Nn=ot.mode,On=ot.showSearch,vn=ot.tokenWithEnter,Fn=ot.autoClearSearchValue,Gn=ot.onSearch,xr=ot.onSearchSubmit,sr=ot.onToggleOpen,Lr=ot.onInputKeyDown,Ur=ot.domRef;de.useImperativeHandle(Nt,function(){return{focus:function(){Pt.current.focus()},blur:function(){Pt.current.blur()}}});var Pr=Tt(0),Qr=(0,ae.Z)(Pr,2),Tr=Qr[0],Wr=Qr[1],ni=function(ii){var Ui=ii.which;(Ui===Ke.UP||Ui===Ke.DOWN)&&ii.preventDefault(),Lr&&Lr(ii),Ui===Ke.ENTER&&Nn==="tags"&&!qt.current&&!gn&&(xr==null||xr(ii.target.value)),ge(Ui)&&sr(!0)},Si=function(){Wr(!0)},Nr=(0,de.useRef)(null),wi=function(ii){Gn(ii,!0,qt.current)!==!1&&sr(!0)},gi=function(){qt.current=!0},vo=function(ii){qt.current=!1,Nn!=="combobox"&&wi(ii.target.value)},Ji=function(ii){var Ui=ii.target.value;if(vn&&Nr.current&&/[\r\n]/.test(Nr.current)){var to=Nr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ui=Ui.replace(to,Nr.current)}Nr.current=null,wi(Ui)},Pi=function(ii){var Ui=ii.clipboardData,to=Ui.getData("text");Nr.current=to},Mi=function(ii){var Ui=ii.target;if(Ui!==Pt.current){var to=document.body.style.msTouchAction!==void 0;to?setTimeout(function(){Pt.current.focus()}):Pt.current.focus()}},Ai=function(ii){var Ui=Tr();ii.target!==Pt.current&&!Ui&&Nn!=="combobox"&&ii.preventDefault(),(Nn!=="combobox"&&(!On||!Ui)||!gn)&&(gn&&Fn!==!1&&Gn("",!0,!1),sr())},pi={inputRef:Pt,onInputKeyDown:ni,onInputMouseDown:Si,onInputChange:Ji,onInputPaste:Pi,onInputCompositionStart:gi,onInputCompositionEnd:vo},zi=Nn==="multiple"||Nn==="tags"?de.createElement(tr,(0,Le.Z)({},ot,pi)):de.createElement(Ot,(0,Le.Z)({},ot,pi));return de.createElement("div",{ref:Ur,className:"".concat(hn,"-selector"),onClick:Mi,onMouseDown:Ai},zi)},Ae=de.forwardRef(Ie);Ae.displayName="Selector";var We=Ae,it=ee(62709),xt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ft=function(ot){var Nt=ot===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"}}},an=function(ot,Nt){var Pt=ot.prefixCls,qt=ot.disabled,hn=ot.visible,gn=ot.children,Nn=ot.popupElement,On=ot.animation,vn=ot.transitionName,Fn=ot.dropdownStyle,Gn=ot.dropdownClassName,xr=ot.direction,sr=xr===void 0?"ltr":xr,Lr=ot.placement,Ur=ot.builtinPlacements,Pr=ot.dropdownMatchSelectWidth,Qr=ot.dropdownRender,Tr=ot.dropdownAlign,Wr=ot.getPopupContainer,ni=ot.empty,Si=ot.getTriggerDOMNode,Nr=ot.onPopupVisibleChange,wi=ot.onPopupMouseEnter,gi=(0,le.Z)(ot,xt),vo="".concat(Pt,"-dropdown"),Ji=Nn;Qr&&(Ji=Qr(Nn));var Pi=de.useMemo(function(){return Ur||Ft(Pr)},[Ur,Pr]),Mi=On?"".concat(vo,"-").concat(On):vn,Ai=typeof Pr=="number",pi=de.useMemo(function(){return Ai?null:Pr===!1?"minWidth":"width"},[Pr,Ai]),zi=Fn;Ai&&(zi=(0,fe.Z)((0,fe.Z)({},zi),{},{width:Pr}));var ai=de.useRef(null);return de.useImperativeHandle(Nt,function(){return{getPopupElement:function(){return ai.current}}}),de.createElement(it.Z,(0,Le.Z)({},gi,{showAction:Nr?["click"]:[],hideAction:Nr?["click"]:[],popupPlacement:Lr||(sr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Pi,prefixCls:vo,popupTransitionName:Mi,popup:de.createElement("div",{ref:ai,onMouseEnter:wi},Ji),stretch:pi,popupAlign:Tr,popupVisible:hn,getPopupContainer:Wr,popupClassName:Se()(Gn,(0,ce.Z)({},"".concat(vo,"-empty"),ni)),popupStyle:zi,getTriggerDOMNode:Si,onPopupVisibleChange:Nr}),gn)},Rn=de.forwardRef(an);Rn.displayName="SelectTrigger";var mr=Rn,or=ee(84506);function cr(Xe,ot){var Nt=Xe.key,Pt;return"value"in Xe&&(Pt=Xe.value),Nt!=null?Nt:Pt!==void 0?Pt:"rc-index-key-".concat(ot)}function Xn(Xe,ot){var Nt=Xe||{},Pt=Nt.label,qt=Nt.value,hn=Nt.options,gn=Nt.groupLabel,Nn=Pt||(ot?"children":"label");return{label:Nn,value:qt||"value",options:hn||"options",groupLabel:gn||Nn}}function br(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=ot.fieldNames,Pt=ot.childrenAsData,qt=[],hn=Xn(Nt,!1),gn=hn.label,Nn=hn.value,On=hn.options,vn=hn.groupLabel;function Fn(Gn,xr){Gn.forEach(function(sr){if(xr||!(On in sr)){var Lr=sr[Nn];qt.push({key:cr(sr,qt.length),groupOption:xr,data:sr,label:sr[gn],value:Lr})}else{var Ur=sr[vn];Ur===void 0&&Pt&&(Ur=sr.label),qt.push({key:cr(sr,qt.length),group:!0,data:sr,label:Ur}),Fn(sr[On],!0)}})}return Fn(Xe,!1),qt}function _r(Xe){var ot=(0,fe.Z)({},Xe);return"props"in ot||Object.defineProperty(ot,"props",{get:function(){return et(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ot}}),ot}function mn(Xe,ot){if(!ot||!ot.length)return null;var Nt=!1;function Pt(hn,gn){var Nn=(0,or.Z)(gn),On=Nn[0],vn=Nn.slice(1);if(!On)return[hn];var Fn=hn.split(On);return Nt=Nt||Fn.length>1,Fn.reduce(function(Gn,xr){return[].concat((0,Ce.Z)(Gn),(0,Ce.Z)(Pt(xr,vn)))},[]).filter(function(Gn){return Gn})}var qt=Pt(Xe,ot);return Nt?qt:null}var $n=["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"],Vr=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function qr(Xe){return Xe==="tags"||Xe==="multiple"}var Ir=de.forwardRef(function(Xe,ot){var Nt,Pt,qt=Xe.id,hn=Xe.prefixCls,gn=Xe.className,Nn=Xe.showSearch,On=Xe.tagRender,vn=Xe.direction,Fn=Xe.omitDomProps,Gn=Xe.displayValues,xr=Xe.onDisplayValuesChange,sr=Xe.emptyOptions,Lr=Xe.notFoundContent,Ur=Lr===void 0?"Not Found":Lr,Pr=Xe.onClear,Qr=Xe.mode,Tr=Xe.disabled,Wr=Xe.loading,ni=Xe.getInputElement,Si=Xe.getRawInputElement,Nr=Xe.open,wi=Xe.defaultOpen,gi=Xe.onDropdownVisibleChange,vo=Xe.activeValue,Ji=Xe.onActiveValueChange,Pi=Xe.activeDescendantId,Mi=Xe.searchValue,Ai=Xe.autoClearSearchValue,pi=Xe.onSearch,zi=Xe.onSearchSplit,ai=Xe.tokenSeparators,ii=Xe.allowClear,Ui=Xe.suffixIcon,to=Xe.clearIcon,la=Xe.OptionList,da=Xe.animation,So=Xe.transitionName,go=Xe.dropdownStyle,Zi=Xe.dropdownClassName,Ii=Xe.dropdownMatchSelectWidth,pa=Xe.dropdownRender,io=Xe.dropdownAlign,si=Xe.placement,Ki=Xe.builtinPlacements,Io=Xe.getPopupContainer,Ro=Xe.showAction,qo=Ro===void 0?[]:Ro,Qi=Xe.onFocus,ma=Xe.onBlur,va=Xe.onKeyUp,ia=Xe.onKeyDown,ca=Xe.onMouseDown,Ea=(0,le.Z)(Xe,$n),Ja=qr(Qr),Ma=(Nn!==void 0?Nn:Ja)||Qr==="combobox",Za=(0,fe.Z)({},Ea);Vr.forEach(function(os){delete Za[os]}),Fn==null||Fn.forEach(function(os){delete Za[os]});var vs=de.useState(!1),Es=(0,ae.Z)(vs,2),Ls=Es[0],Qa=Es[1];de.useEffect(function(){Qa(Ye())},[]);var La=de.useRef(null),ho=de.useRef(null),Po=de.useRef(null),_a=de.useRef(null),Da=de.useRef(null),gs=ln(),Rs=(0,ae.Z)(gs,3),Ws=Rs[0],hl=Rs[1],ul=Rs[2];de.useImperativeHandle(ot,function(){var os,Ka;return{focus:(os=_a.current)===null||os===void 0?void 0:os.focus,blur:(Ka=_a.current)===null||Ka===void 0?void 0:Ka.blur,scrollTo:function(Vl){var mt;return(mt=Da.current)===null||mt===void 0?void 0:mt.scrollTo(Vl)}}});var Ts=de.useMemo(function(){var os;if(Qr!=="combobox")return Mi;var Ka=(os=Gn[0])===null||os===void 0?void 0:os.value;return typeof Ka=="string"||typeof Ka=="number"?String(Ka):""},[Mi,Qr,Gn]),es=Qr==="combobox"&&typeof ni=="function"&&ni()||null,Bi=typeof Si=="function"&&Si(),Co=tt(ho,Bi==null||(Nt=Bi.props)===null||Nt===void 0?void 0:Nt.ref),Qo=de.useState(!1),Ca=(0,ae.Z)(Qo,2),is=Ca[0],bs=Ca[1];ye(function(){bs(!0)},[]);var bl=Fe(!1,{defaultValue:wi,value:Nr}),rl=(0,ae.Z)(bl,2),$l=rl[0],ya=rl[1],yi=is?$l:!1,Mo=!Ur&&sr;(Tr||Mo&&yi&&Qr==="combobox")&&(yi=!1);var Do=Mo?!1:yi,Uo=de.useCallback(function(os){var Ka=os!==void 0?os:!yi;Tr||(ya(Ka),yi!==Ka&&(gi==null||gi(Ka)))},[Tr,yi,ya,gi]),Ss=de.useMemo(function(){return(ai||[]).some(function(os){return[`
|
|
|
`,`\r
|
|
|
`].includes(os)})},[ai]),ls=function(Ka,xl,Vl){var mt=!0,Bt=Ka;Ji==null||Ji(null);var Wt=Vl?null:mn(Ka,ai);return Qr!=="combobox"&&Wt&&(Bt="",zi==null||zi(Wt),Uo(!1),mt=!1),pi&&Ts!==Bt&&pi(Bt,{source:xl?"typing":"effect"}),mt},Sl=function(Ka){!Ka||!Ka.trim()||pi(Ka,{source:"submit"})};de.useEffect(function(){!yi&&!Ja&&Qr!=="combobox"&&ls("",!1,!1)},[yi]),de.useEffect(function(){$l&&Tr&&ya(!1),Tr&&hl(!1)},[Tr]);var pl=Tt(),rc=(0,ae.Z)(pl,2),Xa=rc[0],wl=rc[1],ic=function(Ka){var xl=Xa(),Vl=Ka.which;if(Vl===Ke.ENTER&&(Qr!=="combobox"&&Ka.preventDefault(),yi||Uo(!0)),wl(!!Ts),Vl===Ke.BACKSPACE&&!xl&&Ja&&!Ts&&Gn.length){for(var mt=(0,Ce.Z)(Gn),Bt=null,Wt=mt.length-1;Wt>=0;Wt-=1){var di=mt[Wt];if(!di.disabled){mt.splice(Wt,1),Bt=di;break}}Bt&&xr(mt,{type:"remove",values:[Bt]})}for(var jr=arguments.length,Rr=new Array(jr>1?jr-1:0),Kr=1;Kr<jr;Kr++)Rr[Kr-1]=arguments[Kr];if(yi&&Da.current){var kr;(kr=Da.current).onKeyDown.apply(kr,[Ka].concat(Rr))}ia==null||ia.apply(void 0,[Ka].concat(Rr))},Vc=function(Ka){for(var xl=arguments.length,Vl=new Array(xl>1?xl-1:0),mt=1;mt<xl;mt++)Vl[mt-1]=arguments[mt];if(yi&&Da.current){var Bt;(Bt=Da.current).onKeyUp.apply(Bt,[Ka].concat(Vl))}va==null||va.apply(void 0,[Ka].concat(Vl))},xc=function(Ka){var xl=Gn.filter(function(Vl){return Vl!==Ka});xr(xl,{type:"remove",values:[Ka]})},Ql=de.useRef(!1),Al=function(){hl(!0),Tr||(Qi&&!Ql.current&&Qi.apply(void 0,arguments),qo.includes("focus")&&Uo(!0)),Ql.current=!0},Ec=function(){hl(!1,function(){Ql.current=!1,Uo(!1)}),!Tr&&(Ts&&(Qr==="tags"?pi(Ts,{source:"submit"}):Qr==="multiple"&&pi("",{source:"blur"})),ma&&ma.apply(void 0,arguments))},Hl=[];de.useEffect(function(){return function(){Hl.forEach(function(os){return clearTimeout(os)}),Hl.splice(0,Hl.length)}},[]);var Fo=function(Ka){var xl,Vl=Ka.target,mt=(xl=Po.current)===null||xl===void 0?void 0:xl.getPopupElement();if(mt&&mt.contains(Vl)){var Bt=setTimeout(function(){var Rr=Hl.indexOf(Bt);if(Rr!==-1&&Hl.splice(Rr,1),ul(),!Ls&&!mt.contains(document.activeElement)){var Kr;(Kr=_a.current)===null||Kr===void 0||Kr.focus()}});Hl.push(Bt)}for(var Wt=arguments.length,di=new Array(Wt>1?Wt-1:0),jr=1;jr<Wt;jr++)di[jr-1]=arguments[jr];ca==null||ca.apply(void 0,[Ka].concat(di))},Bs=de.useState({}),ts=(0,ae.Z)(Bs,2),Os=ts[1];function $s(){Os({})}var il;Bi&&(il=function(Ka){Uo(Ka)}),Lt(function(){var os;return[La.current,(os=Po.current)===null||os===void 0?void 0:os.getPopupElement()]},Do,Uo,!!Bi);var El=de.useMemo(function(){return(0,fe.Z)((0,fe.Z)({},Xe),{},{notFoundContent:Ur,open:yi,triggerOpen:Do,id:qt,showSearch:Ma,multiple:Ja,toggleOpen:Uo})},[Xe,Ur,Do,yi,qt,Ma,Ja,Uo]),ol=!!Ui||Wr,ns;ol&&(ns=de.createElement(nt,{className:Se()("".concat(hn,"-arrow"),(0,ce.Z)({},"".concat(hn,"-arrow-loading"),Wr)),customizeIcon:Ui,customizeIconProps:{loading:Wr,searchValue:Ts,open:yi,focused:Ws,showSearch:Ma}}));var qs=function(){var Ka;Pr==null||Pr(),(Ka=_a.current)===null||Ka===void 0||Ka.focus(),xr([],{type:"clear",values:Gn}),ls("",!1,!1)},Hc=Ge(hn,qs,Gn,ii,to,Tr,Ts,Qr),Tl=Hc.allowClear,au=Hc.clearIcon,Mc=de.createElement(la,{ref:Da}),Lc=Se()(hn,gn,(Pt={},(0,ce.Z)(Pt,"".concat(hn,"-focused"),Ws),(0,ce.Z)(Pt,"".concat(hn,"-multiple"),Ja),(0,ce.Z)(Pt,"".concat(hn,"-single"),!Ja),(0,ce.Z)(Pt,"".concat(hn,"-allow-clear"),ii),(0,ce.Z)(Pt,"".concat(hn,"-show-arrow"),ol),(0,ce.Z)(Pt,"".concat(hn,"-disabled"),Tr),(0,ce.Z)(Pt,"".concat(hn,"-loading"),Wr),(0,ce.Z)(Pt,"".concat(hn,"-open"),yi),(0,ce.Z)(Pt,"".concat(hn,"-customize-input"),es),(0,ce.Z)(Pt,"".concat(hn,"-show-search"),Ma),Pt)),Nc=de.createElement(mr,{ref:Po,disabled:Tr,prefixCls:hn,visible:Do,popupElement:Mc,animation:da,transitionName:So,dropdownStyle:go,dropdownClassName:Zi,direction:vn,dropdownMatchSelectWidth:Ii,dropdownRender:pa,dropdownAlign:io,placement:si,builtinPlacements:Ki,getPopupContainer:Io,empty:sr,getTriggerDOMNode:function(){return ho.current},onPopupVisibleChange:il,onPopupMouseEnter:$s},Bi?de.cloneElement(Bi,{ref:Co}):de.createElement(We,(0,Le.Z)({},Xe,{domRef:ho,prefixCls:hn,inputElement:es,ref:_a,id:qt,showSearch:Ma,autoClearSearchValue:Ai,mode:Qr,activeDescendantId:Pi,tagRender:On,values:Gn,open:yi,onToggleOpen:Uo,activeValue:vo,searchValue:Ts,onSearch:ls,onSearchSubmit:Sl,onRemove:xc,tokenWithEnter:Ss}))),Jc;return Bi?Jc=Nc:Jc=de.createElement("div",(0,Le.Z)({className:Lc},Za,{ref:La,onMouseDown:Fo,onKeyDown:ic,onKeyUp:Vc,onFocus:Al,onBlur:Ec}),Ws&&!yi&&de.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Gn.map(function(os){var Ka=os.label,xl=os.value;return["number","string"].includes((0,re.Z)(Ka))?Ka:xl}).join(", "))),Nc,ns,Tl&&au),de.createElement(jt.Provider,{value:El},Jc)}),hi=Ir,Ni=function(Xe,ot){var Nt=de.useRef({values:new Map,options:new Map}),Pt=de.useMemo(function(){var hn=Nt.current,gn=hn.values,Nn=hn.options,On=Xe.map(function(Gn){if(Gn.label===void 0){var xr;return(0,fe.Z)((0,fe.Z)({},Gn),{},{label:(xr=gn.get(Gn.value))===null||xr===void 0?void 0:xr.label})}return Gn}),vn=new Map,Fn=new Map;return On.forEach(function(Gn){vn.set(Gn.value,Gn),Fn.set(Gn.value,ot.get(Gn.value)||Nn.get(Gn.value))}),Nt.current.values=vn,Nt.current.options=Fn,On},[Xe,ot]),qt=de.useCallback(function(hn){return ot.get(hn)||Nt.current.options.get(hn)},[ot]);return[Pt,qt]};function yr(Xe,ot){return ko(Xe).join("").toUpperCase().includes(ot)}var bi=function(Xe,ot,Nt,Pt,qt){return de.useMemo(function(){if(!Nt||Pt===!1)return Xe;var hn=ot.options,gn=ot.label,Nn=ot.value,On=[],vn=typeof Pt=="function",Fn=Nt.toUpperCase(),Gn=vn?Pt:function(sr,Lr){return qt?yr(Lr[qt],Fn):Lr[hn]?yr(Lr[gn!=="children"?gn:"label"],Fn):yr(Lr[Nn],Fn)},xr=vn?function(sr){return _r(sr)}:function(sr){return sr};return Xe.forEach(function(sr){if(sr[hn]){var Lr=Gn(Nt,xr(sr));if(Lr)On.push(sr);else{var Ur=sr[hn].filter(function(Pr){return Gn(Nt,xr(Pr))});Ur.length&&On.push((0,fe.Z)((0,fe.Z)({},sr),{},(0,ce.Z)({},hn,Ur)))}return}Gn(Nt,xr(sr))&&On.push(sr)}),On},[Xe,Pt,qt,Nt,ot])},ar=0,fo=me();function qi(){var Xe;return fo?(Xe=ar,ar+=1):Xe="TEST_OR_SSR",Xe}function ua(Xe){var ot=de.useState(),Nt=(0,ae.Z)(ot,2),Pt=Nt[0],qt=Nt[1];return de.useEffect(function(){qt("rc_select_".concat(qi()))},[]),Xe||Pt}function Jo(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=[];return de.Children.forEach(Xe,function(Pt){Pt==null&&!ot.keepEmpty||(Array.isArray(Pt)?Nt=Nt.concat(Jo(Pt)):(0,zt.isFragment)(Pt)&&Pt.props?Nt=Nt.concat(Jo(Pt.props.children,ot)):Nt.push(Pt))}),Nt}var bo=["children","value"],oo=["children"];function na(Xe){var ot=Xe,Nt=ot.key,Pt=ot.props,qt=Pt.children,hn=Pt.value,gn=(0,le.Z)(Pt,bo);return(0,fe.Z)({key:Nt,value:hn!==void 0?hn:Nt,children:qt},gn)}function Eo(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Jo(Xe).map(function(Nt,Pt){if(!de.isValidElement(Nt)||!Nt.type)return null;var qt=Nt,hn=qt.type.isSelectOptGroup,gn=qt.key,Nn=qt.props,On=Nn.children,vn=(0,le.Z)(Nn,oo);return ot||!hn?na(Nt):(0,fe.Z)((0,fe.Z)({key:"__RC_SELECT_GRP__".concat(gn===null?Pt:gn,"__"),label:gn},vn),{},{options:Eo(On)})}).filter(function(Nt){return Nt})}function ra(Xe,ot,Nt,Pt,qt){return de.useMemo(function(){var hn=Xe,gn=!Xe;gn&&(hn=Eo(ot));var Nn=new Map,On=new Map,vn=function(xr,sr,Lr){Lr&&typeof Lr=="string"&&xr.set(sr[Lr],sr)};function Fn(Gn){for(var xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,sr=0;sr<Gn.length;sr+=1){var Lr=Gn[sr];!Lr[Nt.options]||xr?(Nn.set(Lr[Nt.value],Lr),vn(On,Lr,Nt.label),vn(On,Lr,Pt),vn(On,Lr,qt)):Fn(Lr[Nt.options],!0)}}return Fn(hn),{options:hn,valueOptions:Nn,labelOptions:On}},[Xe,ot,Nt,Pt,qt])}function ea(Xe){var ot=de.useRef();ot.current=Xe;var Nt=de.useCallback(function(){return ot.current.apply(ot,arguments)},[]);return Nt}var Ho=function(){return null};Ho.isSelectOptGroup=!0;var No=Ho,Ba=function(){return null};Ba.isSelectOption=!0;var Wa=Ba;function Ia(Xe,ot){var Nt=(0,fe.Z)({},Xe);return Array.isArray(ot)&&ot.forEach(function(Pt){delete Nt[Pt]}),Nt}var Ao=ee(73299),pn=de.createContext(null),sn=pn;function Hn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var lr=["disabled","title","children","style","className"];function Cr(Xe){return typeof Xe=="string"||typeof Xe=="number"}var vi=function(ot,Nt){var Pt=yn(),qt=Pt.prefixCls,hn=Pt.id,gn=Pt.open,Nn=Pt.multiple,On=Pt.mode,vn=Pt.searchValue,Fn=Pt.toggleOpen,Gn=Pt.notFoundContent,xr=Pt.onPopupScroll,sr=de.useContext(sn),Lr=sr.flattenOptions,Ur=sr.onActiveValue,Pr=sr.defaultActiveFirstOption,Qr=sr.onSelect,Tr=sr.menuItemSelectedIcon,Wr=sr.rawValues,ni=sr.fieldNames,Si=sr.virtual,Nr=sr.direction,wi=sr.listHeight,gi=sr.listItemHeight,vo="".concat(qt,"-item"),Ji=pt(function(){return Lr},[gn,Lr],function(io,si){return si[0]&&io[1]!==si[1]}),Pi=de.useRef(null),Mi=function(si){si.preventDefault()},Ai=function(si){Pi.current&&Pi.current.scrollTo(typeof si=="number"?{index:si}:si)},pi=function(si){for(var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Io=Ji.length,Ro=0;Ro<Io;Ro+=1){var qo=(si+Ro*Ki+Io)%Io,Qi=Ji[qo],ma=Qi.group,va=Qi.data;if(!ma&&!va.disabled)return qo}return-1},zi=de.useState(function(){return pi(0)}),ai=(0,ae.Z)(zi,2),ii=ai[0],Ui=ai[1],to=function(si){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ui(si);var Io={source:Ki?"keyboard":"mouse"},Ro=Ji[si];if(!Ro){Ur(null,-1,Io);return}Ur(Ro.value,si,Io)};(0,de.useEffect)(function(){to(Pr!==!1?pi(0):-1)},[Ji.length,vn]);var la=de.useCallback(function(io){return Wr.has(io)&&On!=="combobox"},[On,(0,Ce.Z)(Wr).toString(),Wr.size]);(0,de.useEffect)(function(){var io=setTimeout(function(){if(!Nn&&gn&&Wr.size===1){var Ki=Array.from(Wr)[0],Io=Ji.findIndex(function(Ro){var qo=Ro.data;return qo.value===Ki});Io!==-1&&(to(Io),Ai(Io))}});if(gn){var si;(si=Pi.current)===null||si===void 0||si.scrollTo(void 0)}return function(){return clearTimeout(io)}},[gn,vn,Lr.length]);var da=function(si){si!==void 0&&Qr(si,{selected:!Wr.has(si)}),Nn||Fn(!1)};if(de.useImperativeHandle(Nt,function(){return{onKeyDown:function(si){var Ki=si.which,Io=si.ctrlKey;switch(Ki){case Ke.N:case Ke.P:case Ke.UP:case Ke.DOWN:{var Ro=0;if(Ki===Ke.UP?Ro=-1:Ki===Ke.DOWN?Ro=1:Hn()&&Io&&(Ki===Ke.N?Ro=1:Ki===Ke.P&&(Ro=-1)),Ro!==0){var qo=pi(ii+Ro,Ro);Ai(qo),to(qo,!0)}break}case Ke.ENTER:{var Qi=Ji[ii];Qi&&!Qi.data.disabled?da(Qi.value):da(void 0),gn&&si.preventDefault();break}case Ke.ESC:Fn(!1),gn&&si.stopPropagation()}},onKeyUp:function(){},scrollTo:function(si){Ai(si)}}}),Ji.length===0)return de.createElement("div",{role:"listbox",id:"".concat(hn,"_list"),className:"".concat(vo,"-empty"),onMouseDown:Mi},Gn);var So=Object.keys(ni).map(function(io){return ni[io]}),go=function(si){return si.label};function Zi(io,si){var Ki=io.group;return{role:Ki?"presentation":"option",id:"".concat(hn,"_list_").concat(si)}}var Ii=function(si){var Ki=Ji[si];if(!Ki)return null;var Io=Ki.data||{},Ro=Io.value,qo=Ki.group,Qi=zn(Io,!0),ma=go(Ki);return Ki?de.createElement("div",(0,Le.Z)({"aria-label":typeof ma=="string"&&!qo?ma:null},Qi,{key:si},Zi(Ki,si),{"aria-selected":la(Ro)}),Ro):null},pa={role:"listbox",id:"".concat(hn,"_list")};return de.createElement(de.Fragment,null,Si&&de.createElement("div",(0,Le.Z)({},pa,{style:{height:0,width:0,overflow:"hidden"}}),Ii(ii-1),Ii(ii),Ii(ii+1)),de.createElement(Ao.Z,{itemKey:"key",ref:Pi,data:Ji,height:wi,itemHeight:gi,fullHeight:!1,onMouseDown:Mi,onScroll:xr,virtual:Si,direction:Nr,innerProps:Si?null:pa},function(io,si){var Ki,Io=io.group,Ro=io.groupOption,qo=io.data,Qi=io.label,ma=io.value,va=qo.key;if(Io){var ia,ca=(ia=qo.title)!==null&&ia!==void 0?ia:Cr(Qi)?Qi.toString():void 0;return de.createElement("div",{className:Se()(vo,"".concat(vo,"-group")),title:ca},Qi!==void 0?Qi:va)}var Ea=qo.disabled,Ja=qo.title,Ma=qo.children,Za=qo.style,vs=qo.className,Es=(0,le.Z)(qo,lr),Ls=Ia(Es,So),Qa=la(ma),La="".concat(vo,"-option"),ho=Se()(vo,La,vs,(Ki={},(0,ce.Z)(Ki,"".concat(La,"-grouped"),Ro),(0,ce.Z)(Ki,"".concat(La,"-active"),ii===si&&!Ea),(0,ce.Z)(Ki,"".concat(La,"-disabled"),Ea),(0,ce.Z)(Ki,"".concat(La,"-selected"),Qa),Ki)),Po=go(io),_a=!Tr||typeof Tr=="function"||Qa,Da=typeof Po=="number"?Po:Po||ma,gs=Cr(Da)?Da.toString():void 0;return Ja!==void 0&&(gs=Ja),de.createElement("div",(0,Le.Z)({},zn(Ls),Si?{}:Zi(io,si),{"aria-selected":Qa,className:ho,title:gs,onMouseMove:function(){ii===si||Ea||to(si)},onClick:function(){Ea||da(ma)},style:Za}),de.createElement("div",{className:"".concat(La,"-content")},Da),de.isValidElement(Tr)||Qa,_a&&de.createElement(nt,{className:"".concat(vo,"-option-state"),customizeIcon:Tr,customizeIconProps:{isSelected:Qa}},Qa?"\u2713":null))}))},_i=de.forwardRef(vi);_i.displayName="OptionList";var ji=_i;function Xi(Xe){var ot=Xe.mode,Nt=Xe.options,Pt=Xe.children,qt=Xe.backfill,hn=Xe.allowClear,gn=Xe.placeholder,Nn=Xe.getInputElement,On=Xe.showSearch,vn=Xe.onSearch,Fn=Xe.defaultOpen,Gn=Xe.autoFocus,xr=Xe.labelInValue,sr=Xe.value,Lr=Xe.inputValue,Ur=Xe.optionLabelProp,Pr=isMultiple(ot),Qr=On!==void 0?On:Pr||ot==="combobox",Tr=Nt||convertChildrenToData(Pt);if(warning(ot!=="tags"||Tr.every(function(Nr){return!Nr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ot==="tags"||ot==="combobox"){var Wr=Tr.some(function(Nr){return Nr.options?Nr.options.some(function(wi){return typeof("value"in wi?wi.value:wi.key)=="number"}):typeof("value"in Nr?Nr.value:Nr.key)=="number"});warning(!Wr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ot!=="combobox"||!Ur,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ot==="combobox"||!qt,"`backfill` only works with `combobox` mode."),warning(ot==="combobox"||!Nn,"`getInputElement` only work with `combobox` mode."),noteOnce(ot!=="combobox"||!Nn||!hn||!gn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),vn&&!Qr&&ot!=="combobox"&&ot!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Fn||Gn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),sr!=null){var ni=toArray(sr);warning(!xr||ni.every(function(Nr){return _typeof(Nr)==="object"&&("key"in Nr||"value"in Nr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Pr||Array.isArray(sr),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pt){var Si=null;toNodeArray(Pt).some(function(Nr){if(!React.isValidElement(Nr)||!Nr.type)return!1;var wi=Nr,gi=wi.type;if(gi.isSelectOption)return!1;if(gi.isSelectOptGroup){var vo=toNodeArray(Nr.props.children).every(function(Ji){return!React.isValidElement(Ji)||!Nr.type||Ji.type.isSelectOption?!0:(Si=Ji.type,!1)});return!vo}return Si=gi,!0}),Si&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Si.displayName||Si.name||Si,"`.")),warning(Lr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ci(Xe,ot){if(Xe){var Nt=function Pt(qt){for(var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gn=0;gn<qt.length;gn++){var Nn=qt[gn];if(Nn[ot==null?void 0:ot.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!hn&&Array.isArray(Nn[ot==null?void 0:ot.options])&&Pt(Nn[ot==null?void 0:ot.options],!0))break}};Nt(Xe)}}var _o=null,To=["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"],Ko=["inputValue"];function Tn(Xe){return!Xe||(0,re.Z)(Xe)!=="object"}var Bn=de.forwardRef(function(Xe,ot){var Nt=Xe.id,Pt=Xe.mode,qt=Xe.prefixCls,hn=qt===void 0?"rc-select":qt,gn=Xe.backfill,Nn=Xe.fieldNames,On=Xe.inputValue,vn=Xe.searchValue,Fn=Xe.onSearch,Gn=Xe.autoClearSearchValue,xr=Gn===void 0?!0:Gn,sr=Xe.onSelect,Lr=Xe.onDeselect,Ur=Xe.dropdownMatchSelectWidth,Pr=Ur===void 0?!0:Ur,Qr=Xe.filterOption,Tr=Xe.filterSort,Wr=Xe.optionFilterProp,ni=Xe.optionLabelProp,Si=Xe.options,Nr=Xe.children,wi=Xe.defaultActiveFirstOption,gi=Xe.menuItemSelectedIcon,vo=Xe.virtual,Ji=Xe.direction,Pi=Xe.listHeight,Mi=Pi===void 0?200:Pi,Ai=Xe.listItemHeight,pi=Ai===void 0?20:Ai,zi=Xe.value,ai=Xe.defaultValue,ii=Xe.labelInValue,Ui=Xe.onChange,to=(0,le.Z)(Xe,To),la=ua(Nt),da=qr(Pt),So=!!(!Si&&Nr),go=de.useMemo(function(){return Qr===void 0&&Pt==="combobox"?!1:Qr},[Qr,Pt]),Zi=de.useMemo(function(){return Xn(Nn,So)},[JSON.stringify(Nn),So]),Ii=Fe("",{value:vn!==void 0?vn:On,postState:function(Mo){return Mo||""}}),pa=(0,ae.Z)(Ii,2),io=pa[0],si=pa[1],Ki=ra(Si,Nr,Zi,Wr,ni),Io=Ki.valueOptions,Ro=Ki.labelOptions,qo=Ki.options,Qi=de.useCallback(function(yi){var Mo=ko(yi);return Mo.map(function(Do){var Uo,Ss,ls,Sl,pl;if(Tn(Do))Uo=Do;else{var rc;ls=Do.key,Ss=Do.label,Uo=(rc=Do.value)!==null&&rc!==void 0?rc:ls}var Xa=Io.get(Uo);if(Xa){var wl;if(Ss===void 0&&(Ss=Xa==null?void 0:Xa[ni||Zi.label]),ls===void 0&&(ls=(wl=Xa==null?void 0:Xa.key)!==null&&wl!==void 0?wl:Uo),Sl=Xa==null?void 0:Xa.disabled,pl=Xa==null?void 0:Xa.title,0)var ic}return{label:Ss,value:Uo,key:ls,disabled:Sl,title:pl}})},[Zi,ni,Io]),ma=Fe(ai,{value:zi}),va=(0,ae.Z)(ma,2),ia=va[0],ca=va[1],Ea=de.useMemo(function(){var yi,Mo=Qi(ia);return Pt==="combobox"&&rn((yi=Mo[0])===null||yi===void 0?void 0:yi.value)?[]:Mo},[ia,Qi,Pt]),Ja=Ni(Ea,Io),Ma=(0,ae.Z)(Ja,2),Za=Ma[0],vs=Ma[1],Es=de.useMemo(function(){if(!Pt&&Za.length===1){var yi=Za[0];if(yi.value===null&&(yi.label===null||yi.label===void 0))return[]}return Za.map(function(Mo){var Do;return(0,fe.Z)((0,fe.Z)({},Mo),{},{label:(Do=Mo.label)!==null&&Do!==void 0?Do:Mo.value})})},[Pt,Za]),Ls=de.useMemo(function(){return new Set(Za.map(function(yi){return yi.value}))},[Za]);de.useEffect(function(){if(Pt==="combobox"){var yi,Mo=(yi=Za[0])===null||yi===void 0?void 0:yi.value;si(li(Mo)?String(Mo):"")}},[Za]);var Qa=ea(function(yi,Mo){var Do,Uo=Mo!=null?Mo:yi;return Do={},(0,ce.Z)(Do,Zi.value,yi),(0,ce.Z)(Do,Zi.label,Uo),Do}),La=de.useMemo(function(){if(Pt!=="tags")return qo;var yi=(0,Ce.Z)(qo),Mo=function(Uo){return Io.has(Uo)};return(0,Ce.Z)(Za).sort(function(Do,Uo){return Do.value<Uo.value?-1:1}).forEach(function(Do){var Uo=Do.value;Mo(Uo)||yi.push(Qa(Uo,Do.label))}),yi},[Qa,qo,Io,Za,Pt]),ho=bi(La,Zi,io,go,Wr),Po=de.useMemo(function(){return Pt!=="tags"||!io||ho.some(function(yi){return yi[Wr||"value"]===io})||ho.some(function(yi){return yi[Zi.value]===io})?ho:[Qa(io)].concat((0,Ce.Z)(ho))},[Qa,Wr,Pt,ho,io,Zi]),_a=de.useMemo(function(){return Tr?(0,Ce.Z)(Po).sort(function(yi,Mo){return Tr(yi,Mo)}):Po},[Po,Tr]),Da=de.useMemo(function(){return br(_a,{fieldNames:Zi,childrenAsData:So})},[_a,Zi,So]),gs=function(Mo){var Do=Qi(Mo);if(ca(Do),Ui&&(Do.length!==Za.length||Do.some(function(ls,Sl){var pl;return((pl=Za[Sl])===null||pl===void 0?void 0:pl.value)!==(ls==null?void 0:ls.value)}))){var Uo=ii?Do:Do.map(function(ls){return ls.value}),Ss=Do.map(function(ls){return _r(vs(ls.value))});Ui(da?Uo:Uo[0],da?Ss:Ss[0])}},Rs=de.useState(null),Ws=(0,ae.Z)(Rs,2),hl=Ws[0],ul=Ws[1],Ts=de.useState(0),es=(0,ae.Z)(Ts,2),Bi=es[0],Co=es[1],Qo=wi!==void 0?wi:Pt!=="combobox",Ca=de.useCallback(function(yi,Mo){var Do=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Uo=Do.source,Ss=Uo===void 0?"keyboard":Uo;Co(Mo),gn&&Pt==="combobox"&&yi!==null&&Ss==="keyboard"&&ul(String(yi))},[gn,Pt]),is=function(Mo,Do,Uo){var Ss=function(){var Ql,Al=vs(Mo);return[ii?{label:Al==null?void 0:Al[Zi.label],value:Mo,key:(Ql=Al==null?void 0:Al.key)!==null&&Ql!==void 0?Ql:Mo}:Mo,_r(Al)]};if(Do&&sr){var ls=Ss(),Sl=(0,ae.Z)(ls,2),pl=Sl[0],rc=Sl[1];sr(pl,rc)}else if(!Do&&Lr&&Uo!=="clear"){var Xa=Ss(),wl=(0,ae.Z)(Xa,2),ic=wl[0],Vc=wl[1];Lr(ic,Vc)}},bs=ea(function(yi,Mo){var Do,Uo=da?Mo.selected:!0;Uo?Do=da?[].concat((0,Ce.Z)(Za),[yi]):[yi]:Do=Za.filter(function(Ss){return Ss.value!==yi}),gs(Do),is(yi,Uo),Pt==="combobox"?ul(""):(!qr||xr)&&(si(""),ul(""))}),bl=function(Mo,Do){gs(Mo);var Uo=Do.type,Ss=Do.values;(Uo==="remove"||Uo==="clear")&&Ss.forEach(function(ls){is(ls.value,!1,Uo)})},rl=function(Mo,Do){if(si(Mo),ul(null),Do.source==="submit"){var Uo=(Mo||"").trim();if(Uo){var Ss=Array.from(new Set([].concat((0,Ce.Z)(Ls),[Uo])));gs(Ss),is(Uo,!0),si("")}return}Do.source!=="blur"&&(Pt==="combobox"&&gs(Mo),Fn==null||Fn(Mo))},$l=function(Mo){var Do=Mo;Pt!=="tags"&&(Do=Mo.map(function(Ss){var ls=Ro.get(Ss);return ls==null?void 0:ls.value}).filter(function(Ss){return Ss!==void 0}));var Uo=Array.from(new Set([].concat((0,Ce.Z)(Ls),(0,Ce.Z)(Do))));gs(Uo),Uo.forEach(function(Ss){is(Ss,!0)})},ya=de.useMemo(function(){var yi=vo!==!1&&Pr!==!1;return(0,fe.Z)((0,fe.Z)({},Ki),{},{flattenOptions:Da,onActiveValue:Ca,defaultActiveFirstOption:Qo,onSelect:bs,menuItemSelectedIcon:gi,rawValues:Ls,fieldNames:Zi,virtual:yi,direction:Ji,listHeight:Mi,listItemHeight:pi,childrenAsData:So})},[Ki,Da,Ca,Qo,bs,gi,Ls,Zi,vo,Pr,Mi,pi,So]);return de.createElement(sn.Provider,{value:ya},de.createElement(hi,(0,Le.Z)({},to,{id:la,prefixCls:hn,ref:ot,omitDomProps:Ko,mode:Pt,displayValues:Es,onDisplayValuesChange:bl,direction:Ji,searchValue:io,onSearch:rl,autoClearSearchValue:xr,onSearchSplit:$l,dropdownMatchSelectWidth:Pr,OptionList:ji,emptyOptions:!Da.length,activeValue:hl,activeDescendantId:"".concat(la,"_list_").concat(Bi)})))}),Qn=Bn;Qn.Option=Wa,Qn.OptGroup=No;var He=Qn,lt=He,ut=ee(10366),gt=ee(8745),yt=ee(33603),kt=ee(9708),At=ee(53124),tn=ee(98866),fn=ee(88258),jn=ee(98675),qn=ee(65223),Kn=ee(4173),An=ee(87244),Dn=ee(13458),wn=ee(78642),Un=ee(46163),vr=function(Xe,ot){var Nt={};for(var Pt in Xe)Object.prototype.hasOwnProperty.call(Xe,Pt)&&ot.indexOf(Pt)<0&&(Nt[Pt]=Xe[Pt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,Pt=Object.getOwnPropertySymbols(Xe);qt<Pt.length;qt++)ot.indexOf(Pt[qt])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Pt[qt])&&(Nt[Pt[qt]]=Xe[Pt[qt]]);return Nt};const er="SECRET_COMBOBOX_MODE_DO_NOT_USE",ir=(Xe,ot)=>{var Nt,{prefixCls:Pt,bordered:qt=!0,className:hn,rootClassName:gn,getPopupContainer:Nn,popupClassName:On,dropdownClassName:vn,listHeight:Fn=256,placement:Gn,listItemHeight:xr=24,size:sr,disabled:Lr,notFoundContent:Ur,status:Pr,builtinPlacements:Qr,dropdownMatchSelectWidth:Tr,popupMatchSelectWidth:Wr,direction:ni,style:Si,allowClear:Nr}=Xe,wi=vr(Xe,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:gi,getPrefixCls:vo,renderEmpty:Ji,direction:Pi,virtual:Mi,popupMatchSelectWidth:Ai,popupOverflow:pi,select:zi}=de.useContext(At.E_),ai=vo("select",Pt),ii=vo(),Ui=ni!=null?ni:Pi,{compactSize:to,compactItemClassnames:la}=(0,Kn.ri)(ai,Ui),[da,So]=(0,An.Z)(ai),go=de.useMemo(()=>{const{mode:La}=wi;if(La!=="combobox")return La===er?"combobox":La},[wi.mode]),Zi=go==="multiple"||go==="tags",Ii=(0,wn.Z)(wi.suffixIcon,wi.showArrow),pa=(Nt=Wr!=null?Wr:Tr)!==null&&Nt!==void 0?Nt:Ai,{status:io,hasFeedback:si,isFormItemInput:Ki,feedbackIcon:Io}=de.useContext(qn.aM),Ro=(0,kt.F)(io,Pr);let qo;Ur!==void 0?qo=Ur:go==="combobox"?qo=null:qo=(Ji==null?void 0:Ji("Select"))||de.createElement(fn.Z,{componentName:"Select"});const{suffixIcon:Qi,itemIcon:ma,removeIcon:va,clearIcon:ia}=(0,Un.Z)(Object.assign(Object.assign({},wi),{multiple:Zi,hasFeedback:si,feedbackIcon:Io,showSuffixIcon:Ii,prefixCls:ai,showArrow:wi.showArrow,componentName:"Select"})),ca=Nr===!0?{clearIcon:ia}:Nr,Ea=(0,ut.Z)(wi,["suffixIcon","itemIcon"]),Ja=Se()(On||vn,{[`${ai}-dropdown-${Ui}`]:Ui==="rtl"},gn,So),Ma=(0,jn.Z)(La=>{var ho;return(ho=sr!=null?sr:to)!==null&&ho!==void 0?ho:La}),Za=de.useContext(tn.Z),vs=Lr!=null?Lr:Za,Es=Se()({[`${ai}-lg`]:Ma==="large",[`${ai}-sm`]:Ma==="small",[`${ai}-rtl`]:Ui==="rtl",[`${ai}-borderless`]:!qt,[`${ai}-in-form-item`]:Ki},(0,kt.Z)(ai,Ro,si),la,zi==null?void 0:zi.className,hn,gn,So),Ls=de.useMemo(()=>Gn!==void 0?Gn:Ui==="rtl"?"bottomRight":"bottomLeft",[Gn,Ui]),Qa=(0,Dn.Z)(Qr,pi);return da(de.createElement(lt,Object.assign({ref:ot,virtual:Mi,showSearch:zi==null?void 0:zi.showSearch},Ea,{style:Object.assign(Object.assign({},zi==null?void 0:zi.style),Si),dropdownMatchSelectWidth:pa,builtinPlacements:Qa,transitionName:(0,yt.m)(ii,"slide-up",wi.transitionName),listHeight:Fn,listItemHeight:xr,mode:go,prefixCls:ai,placement:Ls,direction:Ui,suffixIcon:Qi,menuItemSelectedIcon:ma,removeIcon:va,allowClear:ca,notFoundContent:qo,className:Es,getPopupContainer:Nn||gi,dropdownClassName:Ja,disabled:vs})))},fr=de.forwardRef(ir),_t=(0,gt.Z)(fr);fr.SECRET_COMBOBOX_MODE_DO_NOT_USE=er,fr.Option=Wa,fr.OptGroup=No,fr._InternalPanelDoNotUseOrYouWillBeFired=_t;var vt=fr},87244:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Ee}});var te=ee(14747),Se=ee(80110),Le=ee(45503),Ce=ee(67968),ce=ee(67771),fe=ee(33297);const ae=be=>{const{optionHeight:Re,optionFontSize:De,optionLineHeight:et,optionPadding:Ye}=be;return{position:"relative",display:"block",minHeight:Re,padding:Ye,color:be.colorText,fontWeight:"normal",fontSize:De,lineHeight:et,boxSizing:"border-box"}};var re=be=>{const{antCls:Re,componentCls:De}=be,et=`${De}-item`,Ye=`&${Re}-slide-up-enter${Re}-slide-up-enter-active`,dt=`&${Re}-slide-up-appear${Re}-slide-up-appear-active`,Ke=`&${Re}-slide-up-leave${Re}-slide-up-leave-active`,zt=`${De}-dropdown-placement-`;return[{[`${De}-dropdown`]:Object.assign(Object.assign({},(0,te.Wf)(be)),{position:"absolute",top:-9999,zIndex:be.zIndexPopup,boxSizing:"border-box",padding:be.paddingXXS,overflow:"hidden",fontSize:be.fontSize,fontVariant:"initial",backgroundColor:be.colorBgElevated,borderRadius:be.borderRadiusLG,outline:"none",boxShadow:be.boxShadowSecondary,[`
|
|
|
${Ye}${zt}bottomLeft,
|
|
|
${dt}${zt}bottomLeft
|
|
|
`]:{animationName:ce.fJ},[`
|
|
|
${Ye}${zt}topLeft,
|
|
|
${dt}${zt}topLeft,
|
|
|
${Ye}${zt}topRight,
|
|
|
${dt}${zt}topRight
|
|
|
`]:{animationName:ce.Qt},[`${Ke}${zt}bottomLeft`]:{animationName:ce.Uw},[`
|
|
|
${Ke}${zt}topLeft,
|
|
|
${Ke}${zt}topRight
|
|
|
`]:{animationName:ce.ly},"&-hidden":{display:"none"},[`${et}`]:Object.assign(Object.assign({},ae(be)),{cursor:"pointer",transition:`background ${be.motionDurationSlow} ease`,borderRadius:be.borderRadiusSM,"&-group":{color:be.colorTextDescription,fontSize:be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},te.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${et}-option-disabled)`]:{backgroundColor:be.optionActiveBg},[`&-selected:not(${et}-option-disabled)`]:{color:be.optionSelectedColor,fontWeight:be.optionSelectedFontWeight,backgroundColor:be.optionSelectedBg,[`${et}-option-state`]:{color:be.colorPrimary}},"&-disabled":{[`&${et}-option-selected`]:{backgroundColor:be.colorBgContainerDisabled},color:be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ce.oN)(be,"slide-up"),(0,ce.oN)(be,"slide-down"),(0,fe.Fm)(be,"move-up"),(0,fe.Fm)(be,"move-down")]};const de=2,he=be=>{let{controlHeightSM:Re,controlHeight:De,lineWidth:et}=be;const Ye=(De-Re)/2-et,dt=Math.ceil(Ye/2);return[Ye,dt]};function me(be,Re){const{componentCls:De,iconCls:et}=be,Ye=`${De}-selection-overflow`,dt=be.multipleSelectItemHeight,[Ke]=he(be),zt=Re?`${De}-${Re}`:"";return{[`${De}-multiple${zt}`]:{fontSize:be.fontSize,[Ye]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${De}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ke-de}px ${de*2}px`,borderRadius:be.borderRadius,[`${De}-show-search&`]:{cursor:"text"},[`${De}-disabled&`]:{background:be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${de}px 0`,lineHeight:`${dt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${De}-show-arrow ${De}-selector,
|
|
|
&${De}-allow-clear ${De}-selector
|
|
|
`]:{paddingInlineEnd:be.fontSizeIcon+be.controlPaddingHorizontal},[`${De}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:dt,marginTop:de,marginBottom:de,lineHeight:`${dt-be.lineWidth*2}px`,background:be.multipleItemBg,border:`${be.lineWidth}px ${be.lineType} ${be.multipleItemBorderColor}`,borderRadius:be.borderRadiusSM,cursor:"default",transition:`font-size ${be.motionDurationSlow}, line-height ${be.motionDurationSlow}, height ${be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:de*2,paddingInlineStart:be.paddingXS,paddingInlineEnd:be.paddingXS/2,[`${De}-disabled&`]:{color:be.multipleItemColorDisabled,borderColor:be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,te.Ro)()),{display:"inline-flex",alignItems:"center",color:be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${et}`]:{verticalAlign:"-0.2em"},"&:hover":{color:be.colorIconHover}})},[`${Ye}-item + ${Ye}-item`]:{[`${De}-selection-search`]:{marginInlineStart:0}},[`${De}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:be.inputPaddingHorizontalBase-Ke,"\n &-input,\n &-mirror\n ":{height:dt,fontFamily:be.fontFamily,lineHeight:`${dt}px`,transition:`all ${be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${De}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:be.inputPaddingHorizontalBase,insetInlineEnd:be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${be.motionDurationSlow}`}}}}var ye=be=>{const{componentCls:Re}=be,De=(0,Le.TS)(be,{controlHeight:be.controlHeightSM,multipleSelectItemHeight:be.controlHeightXS,borderRadius:be.borderRadiusSM,borderRadiusSM:be.borderRadiusXS}),et=(0,Le.TS)(be,{fontSize:be.fontSizeLG,controlHeight:be.controlHeightLG,multipleSelectItemHeight:be.multipleItemHeightLG,borderRadius:be.borderRadiusLG,borderRadiusSM:be.borderRadius}),[,Ye]=he(be);return[me(be),me(De,"sm"),{[`${Re}-multiple${Re}-sm`]:{[`${Re}-selection-placeholder`]:{insetInline:be.controlPaddingHorizontalSM-be.lineWidth},[`${Re}-selection-search`]:{marginInlineStart:Ye}}},me(et,"lg")]};function _e(be,Re){const{componentCls:De,inputPaddingHorizontalBase:et,borderRadius:Ye}=be,dt=be.controlHeight-be.lineWidth*2,Ke=Math.ceil(be.fontSize*1.25),zt=Re?`${De}-${Re}`:"";return{[`${De}-single${zt}`]:{fontSize:be.fontSize,[`${De}-selector`]:Object.assign(Object.assign({},(0,te.Wf)(be)),{display:"flex",borderRadius:Ye,[`${De}-selection-search`]:{position:"absolute",top:0,insetInlineStart:et,insetInlineEnd:et,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${De}-selection-item,
|
|
|
${De}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${dt}px`,transition:`all ${be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${dt}px`}},[`${De}-selection-item`]:{position:"relative",userSelect:"none"},[`${De}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${De}-selection-item:after`,`${De}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${De}-show-arrow ${De}-selection-item,
|
|
|
&${De}-show-arrow ${De}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ke},[`&${De}-open ${De}-selection-item`]:{color:be.colorTextPlaceholder},[`&:not(${De}-customize-input)`]:{[`${De}-selector`]:{width:"100%",height:be.controlHeight,padding:`0 ${et}px`,[`${De}-selection-search-input`]:{height:dt},"&:after":{lineHeight:`${dt}px`}}},[`&${De}-customize-input`]:{[`${De}-selector`]:{"&:after":{display:"none"},[`${De}-selection-search`]:{position:"static",width:"100%"},[`${De}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${et}px`,"&:after":{display:"none"}}}}}}}function Me(be){const{componentCls:Re}=be,De=be.controlPaddingHorizontalSM-be.lineWidth;return[_e(be),_e((0,Le.TS)(be,{controlHeight:be.controlHeightSM,borderRadius:be.borderRadiusSM}),"sm"),{[`${Re}-single${Re}-sm`]:{[`&:not(${Re}-customize-input)`]:{[`${Re}-selection-search`]:{insetInlineStart:De,insetInlineEnd:De},[`${Re}-selector`]:{padding:`0 ${De}px`},[`&${Re}-show-arrow ${Re}-selection-search`]:{insetInlineEnd:De+be.fontSize*1.5},[`
|
|
|
&${Re}-show-arrow ${Re}-selection-item,
|
|
|
&${Re}-show-arrow ${Re}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:be.fontSize*1.5}}}},_e((0,Le.TS)(be,{controlHeight:be.singleItemHeightLG,fontSize:be.fontSizeLG,borderRadius:be.borderRadiusLG}),"lg")]}const ve=be=>{const{componentCls:Re,selectorBg:De}=be;return{position:"relative",backgroundColor:De,border:`${be.lineWidth}px ${be.lineType} ${be.colorBorder}`,transition:`all ${be.motionDurationMid} ${be.motionEaseInOut}`,input:{cursor:"pointer"},[`${Re}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Re}-disabled&`]:{color:be.colorTextDisabled,background:be.colorBgContainerDisabled,cursor:"not-allowed",[`${Re}-multiple&`]:{background:be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Fe=function(be,Re){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:et,borderHoverColor:Ye,outlineColor:dt,antCls:Ke}=Re,zt=De?{[`${et}-selector`]:{borderColor:Ye}}:{};return{[be]:{[`&:not(${et}-disabled):not(${et}-customize-input):not(${Ke}-pagination-size-changer)`]:Object.assign(Object.assign({},zt),{[`${et}-focused& ${et}-selector`]:{borderColor:Ye,boxShadow:`0 0 0 ${Re.controlOutlineWidth}px ${dt}`,outline:0},[`&:hover ${et}-selector`]:{borderColor:Ye}})}}},$e=be=>{const{componentCls:Re}=be;return{[`${Re}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Te=be=>{const{componentCls:Re,inputPaddingHorizontalBase:De,iconCls:et}=be;return{[Re]:Object.assign(Object.assign({},(0,te.Wf)(be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Re}-customize-input) ${Re}-selector`]:Object.assign(Object.assign({},ve(be)),$e(be)),[`${Re}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},te.vS),[`${Re}-selection-placeholder`]:Object.assign(Object.assign({},te.vS),{flex:1,color:be.colorTextPlaceholder,pointerEvents:"none"}),[`${Re}-arrow`]:Object.assign(Object.assign({},(0,te.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[et]:{verticalAlign:"top",transition:`transform ${be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Re}-suffix)`]:{pointerEvents:"auto"}},[`${Re}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Re}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,zIndex:1,display:"inline-block",width:be.fontSizeIcon,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:be.clearBg,cursor:"pointer",opacity:0,transition:`color ${be.motionDurationMid} ease, opacity ${be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:be.colorTextTertiary}},"&:hover":{[`${Re}-clear`]:{opacity:1}}}),[`${Re}-has-feedback`]:{[`${Re}-clear`]:{insetInlineEnd:De+be.fontSize+be.paddingXS}}}},ze=be=>{const{componentCls:Re}=be;return[{[Re]:{[`&-borderless ${Re}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Re}-in-form-item`]:{width:"100%"}}},Te(be),Me(be),ye(be),re(be),{[`${Re}-rtl`]:{direction:"rtl"}},Fe(Re,(0,Le.TS)(be,{borderHoverColor:be.colorPrimaryHover,outlineColor:be.controlOutline})),Fe(`${Re}-status-error`,(0,Le.TS)(be,{borderHoverColor:be.colorErrorHover,outlineColor:be.colorErrorOutline}),!0),Fe(`${Re}-status-warning`,(0,Le.TS)(be,{borderHoverColor:be.colorWarningHover,outlineColor:be.colorWarningOutline}),!0),(0,Se.c)(be,{borderElCls:`${Re}-selector`,focusElCls:`${Re}-focused`})]};var Ee=(0,Ce.Z)("Select",(be,Re)=>{let{rootPrefixCls:De}=Re;const et=(0,Le.TS)(be,{rootPrefixCls:De,inputPaddingHorizontalBase:be.paddingSM-1,multipleSelectItemHeight:be.multipleItemHeight});return[ze(et)]},be=>{const{fontSize:Re,lineHeight:De,controlHeight:et,controlPaddingHorizontal:Ye,zIndexPopupBase:dt,colorText:Ke,fontWeightStrong:zt,controlItemBgActive:pt,controlItemBgHover:Kt,colorBgContainer:Ze,colorFillSecondary:tt,controlHeightLG:ft,controlHeightSM:Ut,colorBgContainerDisabled:nt,colorTextDisabled:Ge}=be;return{zIndexPopup:dt+50,optionSelectedColor:Ke,optionSelectedFontWeight:zt,optionSelectedBg:pt,optionActiveBg:Kt,optionPadding:`${(et-Re*De)/2}px ${Ye}px`,optionFontSize:Re,optionLineHeight:De,optionHeight:et,selectorBg:Ze,clearBg:Ze,singleItemHeightLG:ft,multipleItemBg:tt,multipleItemBorderColor:"transparent",multipleItemHeight:Ut,multipleItemHeightLG:et,multipleSelectorBgDisabled:nt,multipleItemColorDisabled:Ge,multipleItemBorderColorDisabled:"transparent"}})},13458:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});const te=Le=>{const ce={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Le==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ce),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ce),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ce),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ce),{points:["br","tr"],offset:[0,-4]})}};function Se(Le,Ce){return Le||te(Ce)}},78642:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return te}});function te(Se,Le){return Le!==void 0?Le:Se!==null}},46163:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return le}});var te=ee(18299),Se=ee(16646),Le=ee(73475),Ce=ee(42922),ce=ee(3407),fe=ee(72395),ae=ee(67294);function le(re){let{suffixIcon:de,clearIcon:he,menuItemSelectedIcon:me,removeIcon:se,loading:ye,multiple:_e,hasFeedback:Me,prefixCls:ve,showSuffixIcon:Fe,feedbackIcon:$e,showArrow:Te,componentName:ze}=re;const Ee=he!=null?he:ae.createElement(Se.Z,null),be=Ye=>de===null&&!Me&&!Te?null:ae.createElement(ae.Fragment,null,Fe!==!1&&Ye,Me&&$e);let Re=null;if(de!==void 0)Re=be(de);else if(ye)Re=be(ae.createElement(ce.Z,{spin:!0}));else{const Ye=`${ve}-suffix`;Re=dt=>{let{open:Ke,showSearch:zt}=dt;return be(Ke&&zt?ae.createElement(fe.Z,{className:Ye}):ae.createElement(Ce.Z,{className:Ye}))}}let De=null;me!==void 0?De=me:_e?De=ae.createElement(te.Z,null):De=null;let et=null;return se!==void 0?et=se:et=ae.createElement(Le.Z,null),{clearIcon:Ee,suffixIcon:Re,itemIcon:De,removeIcon:et}}},46303:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return ke}});var te=ee(94184),Se=ee.n(te),Le=ee(67294),Ce=ee(53124),ce=ee(10366),ae=Be=>{const{prefixCls:Ne,className:we,style:rt,size:It,shape:Ct}=Be,$t=Se()({[`${Ne}-lg`]:It==="large",[`${Ne}-sm`]:It==="small"}),Vt=Se()({[`${Ne}-circle`]:Ct==="circle",[`${Ne}-square`]:Ct==="square",[`${Ne}-round`]:Ct==="round"}),wt=Le.useMemo(()=>typeof It=="number"?{width:It,height:It,lineHeight:`${It}px`}:{},[It]);return Le.createElement("span",{className:Se()(Ne,$t,Vt,we),style:Object.assign(Object.assign({},wt),rt)})},le=ee(45930),re=ee(67968),de=ee(45503);const he=new le.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),me=Be=>({height:Be,lineHeight:`${Be}px`}),se=Be=>Object.assign({width:Be},me(Be)),ye=Be=>({background:Be.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:he,animationDuration:Be.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),_e=Be=>Object.assign({width:Be*5,minWidth:Be*5},me(Be)),Me=Be=>{const{skeletonAvatarCls:Ne,gradientFromColor:we,controlHeight:rt,controlHeightLG:It,controlHeightSM:Ct}=Be;return{[`${Ne}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:we},se(rt)),[`${Ne}${Ne}-circle`]:{borderRadius:"50%"},[`${Ne}${Ne}-lg`]:Object.assign({},se(It)),[`${Ne}${Ne}-sm`]:Object.assign({},se(Ct))}},ve=Be=>{const{controlHeight:Ne,borderRadiusSM:we,skeletonInputCls:rt,controlHeightLG:It,controlHeightSM:Ct,gradientFromColor:$t}=Be;return{[`${rt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:$t,borderRadius:we},_e(Ne)),[`${rt}-lg`]:Object.assign({},_e(It)),[`${rt}-sm`]:Object.assign({},_e(Ct))}},Fe=Be=>Object.assign({width:Be},me(Be)),$e=Be=>{const{skeletonImageCls:Ne,imageSizeBase:we,gradientFromColor:rt,borderRadiusSM:It}=Be;return{[`${Ne}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:rt,borderRadius:It},Fe(we*2)),{[`${Ne}-path`]:{fill:"#bfbfbf"},[`${Ne}-svg`]:Object.assign(Object.assign({},Fe(we)),{maxWidth:we*4,maxHeight:we*4}),[`${Ne}-svg${Ne}-svg-circle`]:{borderRadius:"50%"}}),[`${Ne}${Ne}-circle`]:{borderRadius:"50%"}}},Te=(Be,Ne,we)=>{const{skeletonButtonCls:rt}=Be;return{[`${we}${rt}-circle`]:{width:Ne,minWidth:Ne,borderRadius:"50%"},[`${we}${rt}-round`]:{borderRadius:Ne}}},ze=Be=>Object.assign({width:Be*2,minWidth:Be*2},me(Be)),Ee=Be=>{const{borderRadiusSM:Ne,skeletonButtonCls:we,controlHeight:rt,controlHeightLG:It,controlHeightSM:Ct,gradientFromColor:$t}=Be;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${we}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:$t,borderRadius:Ne,width:rt*2,minWidth:rt*2},ze(rt))},Te(Be,rt,we)),{[`${we}-lg`]:Object.assign({},ze(It))}),Te(Be,It,`${we}-lg`)),{[`${we}-sm`]:Object.assign({},ze(Ct))}),Te(Be,Ct,`${we}-sm`))},be=Be=>{const{componentCls:Ne,skeletonAvatarCls:we,skeletonTitleCls:rt,skeletonParagraphCls:It,skeletonButtonCls:Ct,skeletonInputCls:$t,skeletonImageCls:Vt,controlHeight:wt,controlHeightLG:on,controlHeightSM:Dt,gradientFromColor:Xt,padding:nn,marginSM:bn,borderRadius:en,titleHeight:Zn,blockRadius:Yn,paragraphLiHeight:pr,controlHeightXS:ti,paragraphMarginTop:Pn}=Be;return{[`${Ne}`]:{display:"table",width:"100%",[`${Ne}-header`]:{display:"table-cell",paddingInlineEnd:nn,verticalAlign:"top",[`${we}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xt},se(wt)),[`${we}-circle`]:{borderRadius:"50%"},[`${we}-lg`]:Object.assign({},se(on)),[`${we}-sm`]:Object.assign({},se(Dt))},[`${Ne}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${rt}`]:{width:"100%",height:Zn,background:Xt,borderRadius:Yn,[`+ ${It}`]:{marginBlockStart:Dt}},[`${It}`]:{padding:0,"> li":{width:"100%",height:pr,listStyle:"none",background:Xt,borderRadius:Yn,"+ li":{marginBlockStart:ti}}},[`${It}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ne}-content`]:{[`${rt}, ${It} > li`]:{borderRadius:en}}},[`${Ne}-with-avatar ${Ne}-content`]:{[`${rt}`]:{marginBlockStart:bn,[`+ ${It}`]:{marginBlockStart:Pn}}},[`${Ne}${Ne}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Ee(Be)),Me(Be)),ve(Be)),$e(Be)),[`${Ne}${Ne}-block`]:{width:"100%",[`${Ct}`]:{width:"100%"},[`${$t}`]:{width:"100%"}},[`${Ne}${Ne}-active`]:{[`
|
|
|
${rt},
|
|
|
${It} > li,
|
|
|
${we},
|
|
|
${Ct},
|
|
|
${$t},
|
|
|
${Vt}
|
|
|
`]:Object.assign({},ye(Be))}}};var Re=(0,re.Z)("Skeleton",Be=>{const{componentCls:Ne}=Be,we=(0,de.TS)(Be,{skeletonAvatarCls:`${Ne}-avatar`,skeletonTitleCls:`${Ne}-title`,skeletonParagraphCls:`${Ne}-paragraph`,skeletonButtonCls:`${Ne}-button`,skeletonInputCls:`${Ne}-input`,skeletonImageCls:`${Ne}-image`,imageSizeBase:Be.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Be.gradientFromColor} 25%, ${Be.gradientToColor} 37%, ${Be.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[be(we)]},Be=>{const{colorFillContent:Ne,colorFill:we}=Be,rt=Ne,It=we;return{color:rt,colorGradientEnd:It,gradientFromColor:rt,gradientToColor:It,titleHeight:Be.controlHeight/2,blockRadius:Be.borderRadiusSM,paragraphMarginTop:Be.marginLG+Be.marginXXS,paragraphLiHeight:Be.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),et=Be=>{const{prefixCls:Ne,className:we,rootClassName:rt,active:It,shape:Ct="circle",size:$t="default"}=Be,{getPrefixCls:Vt}=Le.useContext(Ce.E_),wt=Vt("skeleton",Ne),[on,Dt]=Re(wt),Xt=(0,ce.Z)(Be,["prefixCls","className"]),nn=Se()(wt,`${wt}-element`,{[`${wt}-active`]:It},we,rt,Dt);return on(Le.createElement("div",{className:nn},Le.createElement(ae,Object.assign({prefixCls:`${wt}-avatar`,shape:Ct,size:$t},Xt))))},dt=Be=>{const{prefixCls:Ne,className:we,rootClassName:rt,active:It,block:Ct=!1,size:$t="default"}=Be,{getPrefixCls:Vt}=Le.useContext(Ce.E_),wt=Vt("skeleton",Ne),[on,Dt]=Re(wt),Xt=(0,ce.Z)(Be,["prefixCls"]),nn=Se()(wt,`${wt}-element`,{[`${wt}-active`]:It,[`${wt}-block`]:Ct},we,rt,Dt);return on(Le.createElement("div",{className:nn},Le.createElement(ae,Object.assign({prefixCls:`${wt}-button`,size:$t},Xt))))};const Ke="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var pt=Be=>{const{prefixCls:Ne,className:we,rootClassName:rt,style:It,active:Ct}=Be,{getPrefixCls:$t}=Le.useContext(Ce.E_),Vt=$t("skeleton",Ne),[wt,on]=Re(Vt),Dt=Se()(Vt,`${Vt}-element`,{[`${Vt}-active`]:Ct},we,rt,on);return wt(Le.createElement("div",{className:Dt},Le.createElement("div",{className:Se()(`${Vt}-image`,we),style:It},Le.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Vt}-image-svg`},Le.createElement("path",{d:Ke,className:`${Vt}-image-path`})))))},Ze=Be=>{const{prefixCls:Ne,className:we,rootClassName:rt,active:It,block:Ct,size:$t="default"}=Be,{getPrefixCls:Vt}=Le.useContext(Ce.E_),wt=Vt("skeleton",Ne),[on,Dt]=Re(wt),Xt=(0,ce.Z)(Be,["prefixCls"]),nn=Se()(wt,`${wt}-element`,{[`${wt}-active`]:It,[`${wt}-block`]:Ct},we,rt,Dt);return on(Le.createElement("div",{className:nn},Le.createElement(ae,Object.assign({prefixCls:`${wt}-input`,size:$t},Xt))))},tt=ee(87462),ft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},Ut=ft,nt=ee(74643),Ge=function(Ne,we){return Le.createElement(nt.Z,(0,tt.Z)({},Ne,{ref:we,icon:Ut}))},jt=Le.forwardRef(Ge),ln=Be=>{const{prefixCls:Ne,className:we,rootClassName:rt,style:It,active:Ct,children:$t}=Be,{getPrefixCls:Vt}=Le.useContext(Ce.E_),wt=Vt("skeleton",Ne),[on,Dt]=Re(wt),Xt=Se()(wt,`${wt}-element`,{[`${wt}-active`]:Ct},Dt,we,rt),nn=$t!=null?$t:Le.createElement(jt,null);return on(Le.createElement("div",{className:Xt},Le.createElement("div",{className:Se()(`${wt}-image`,we),style:It},nn)))},Tt=ee(74902),Jt=Be=>{const Ne=Vt=>{const{width:wt,rows:on=2}=Be;if(Array.isArray(wt))return wt[Vt];if(on-1===Vt)return wt},{prefixCls:we,className:rt,style:It,rows:Ct}=Be,$t=(0,Tt.Z)(Array(Ct)).map((Vt,wt)=>Le.createElement("li",{key:wt,style:{width:Ne(wt)}}));return Le.createElement("ul",{className:Se()(we,rt),style:It},$t)},In=Be=>{let{prefixCls:Ne,className:we,width:rt,style:It}=Be;return Le.createElement("h3",{className:Se()(Ne,we),style:Object.assign({width:rt},It)})};function Qt(Be){return Be&&typeof Be=="object"?Be:{}}function Mn(Be,Ne){return Be&&!Ne?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Wn(Be,Ne){return!Be&&Ne?{width:"38%"}:Be&&Ne?{width:"50%"}:{}}function zn(Be,Ne){const we={};return(!Be||!Ne)&&(we.width="61%"),!Be&&Ne?we.rows=3:we.rows=2,we}const at=Be=>{const{prefixCls:Ne,loading:we,className:rt,rootClassName:It,style:Ct,children:$t,avatar:Vt=!1,title:wt=!0,paragraph:on=!0,active:Dt,round:Xt}=Be,{getPrefixCls:nn,direction:bn,skeleton:en}=Le.useContext(Ce.E_),Zn=nn("skeleton",Ne),[Yn,pr]=Re(Zn);if(we||!("loading"in Be)){const ti=!!Vt,Pn=!!wt,Or=!!on;let Br;if(ti){const ci=Object.assign(Object.assign({prefixCls:`${Zn}-avatar`},Mn(Pn,Or)),Qt(Vt));Br=Le.createElement("div",{className:`${Zn}-header`},Le.createElement(ae,Object.assign({},ci)))}let Di;if(Pn||Or){let ci;if(Pn){const zr=Object.assign(Object.assign({prefixCls:`${Zn}-title`},Wn(ti,Or)),Qt(wt));ci=Le.createElement(In,Object.assign({},zr))}let Fr;if(Or){const zr=Object.assign(Object.assign({prefixCls:`${Zn}-paragraph`},zn(ti,Pn)),Qt(on));Fr=Le.createElement(Jt,Object.assign({},zr))}Di=Le.createElement("div",{className:`${Zn}-content`},ci,Fr)}const mi=Se()(Zn,{[`${Zn}-with-avatar`]:ti,[`${Zn}-active`]:Dt,[`${Zn}-rtl`]:bn==="rtl",[`${Zn}-round`]:Xt},en==null?void 0:en.className,rt,It,pr);return Yn(Le.createElement("div",{className:mi,style:Object.assign(Object.assign({},en==null?void 0:en.style),Ct)},Br,Di))}return typeof $t!="undefined"?$t:null};at.Button=dt,at.Avatar=et,at.Input=Ze,at.Image=pt,at.Node=ln;var Oe=at,ke=Oe},55054:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Re}});var te=ee(67294),Se=ee(57838),Le=ee(96159),Ce=ee(94184),ce=ee.n(Ce),fe=ee(53124),ae=ee(46303),re=De=>{const{value:et,formatter:Ye,precision:dt,decimalSeparator:Ke,groupSeparator:zt="",prefixCls:pt}=De;let Kt;if(typeof Ye=="function")Kt=Ye(et);else{const Ze=String(et),tt=Ze.match(/^(-?)(\d*)(\.(\d+))?$/);if(!tt||Ze==="-")Kt=Ze;else{const ft=tt[1];let Ut=tt[2]||"0",nt=tt[4]||"";Ut=Ut.replace(/\B(?=(\d{3})+(?!\d))/g,zt),typeof dt=="number"&&(nt=nt.padEnd(dt,"0").slice(0,dt>0?dt:0)),nt&&(nt=`${Ke}${nt}`),Kt=[te.createElement("span",{key:"int",className:`${pt}-content-value-int`},ft,Ut),nt&&te.createElement("span",{key:"decimal",className:`${pt}-content-value-decimal`},nt)]}}return te.createElement("span",{className:`${pt}-content-value`},Kt)},de=ee(14747),he=ee(67968),me=ee(45503);const se=De=>{const{componentCls:et,marginXXS:Ye,padding:dt,colorTextDescription:Ke,titleFontSize:zt,colorTextHeading:pt,contentFontSize:Kt,fontFamily:Ze}=De;return{[`${et}`]:Object.assign(Object.assign({},(0,de.Wf)(De)),{[`${et}-title`]:{marginBottom:Ye,color:Ke,fontSize:zt},[`${et}-skeleton`]:{paddingTop:dt},[`${et}-content`]:{color:pt,fontSize:Kt,fontFamily:Ze,[`${et}-content-value`]:{display:"inline-block",direction:"ltr"},[`${et}-content-prefix, ${et}-content-suffix`]:{display:"inline-block"},[`${et}-content-prefix`]:{marginInlineEnd:Ye},[`${et}-content-suffix`]:{marginInlineStart:Ye}}})}};var ye=(0,he.Z)("Statistic",De=>{const et=(0,me.TS)(De,{});return[se(et)]},De=>{const{fontSizeHeading3:et,fontSize:Ye}=De;return{titleFontSize:Ye,contentFontSize:et}}),Me=De=>{const{prefixCls:et,className:Ye,rootClassName:dt,style:Ke,valueStyle:zt,value:pt=0,title:Kt,valueRender:Ze,prefix:tt,suffix:ft,loading:Ut=!1,onMouseEnter:nt,onMouseLeave:Ge,decimalSeparator:jt=".",groupSeparator:yn=","}=De,{getPrefixCls:ln,direction:Tt,statistic:Lt}=te.useContext(fe.E_),Jt=ln("statistic",et),[kn,In]=ye(Jt),Qt=te.createElement(re,Object.assign({decimalSeparator:jt,groupSeparator:yn,prefixCls:Jt},De,{value:pt})),Mn=ce()(Jt,{[`${Jt}-rtl`]:Tt==="rtl"},Lt==null?void 0:Lt.className,Ye,dt,In);return kn(te.createElement("div",{className:Mn,style:Object.assign(Object.assign({},Lt==null?void 0:Lt.style),Ke),onMouseEnter:nt,onMouseLeave:Ge},Kt&&te.createElement("div",{className:`${Jt}-title`},Kt),te.createElement(ae.Z,{paragraph:!1,loading:Ut,className:`${Jt}-skeleton`},te.createElement("div",{style:zt,className:`${Jt}-content`},tt&&te.createElement("span",{className:`${Jt}-content-prefix`},tt),Ze?Ze(Qt):Qt,ft&&te.createElement("span",{className:`${Jt}-content-suffix`},ft)))))};const ve=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Fe(De,et){let Ye=De;const dt=/\[[^\]]*]/g,Ke=(et.match(dt)||[]).map(Ze=>Ze.slice(1,-1)),zt=et.replace(dt,"[]"),pt=ve.reduce((Ze,tt)=>{let[ft,Ut]=tt;if(Ze.includes(ft)){const nt=Math.floor(Ye/Ut);return Ye-=nt*Ut,Ze.replace(new RegExp(`${ft}+`,"g"),Ge=>{const jt=Ge.length;return nt.toString().padStart(jt,"0")})}return Ze},zt);let Kt=0;return pt.replace(dt,()=>{const Ze=Ke[Kt];return Kt+=1,Ze})}function $e(De,et){const{format:Ye=""}=et,dt=new Date(De).getTime(),Ke=Date.now(),zt=Math.max(dt-Ke,0);return Fe(zt,Ye)}const Te=1e3/30;function ze(De){return new Date(De).getTime()}const Ee=De=>{const{value:et,format:Ye="HH:mm:ss",onChange:dt,onFinish:Ke}=De,zt=(0,Se.Z)(),pt=te.useRef(null),Kt=()=>{Ke==null||Ke(),pt.current&&(clearInterval(pt.current),pt.current=null)},Ze=()=>{const Ut=ze(et);Ut>=Date.now()&&(pt.current=setInterval(()=>{zt(),dt==null||dt(Ut-Date.now()),Ut<Date.now()&&Kt()},Te))};te.useEffect(()=>(Ze(),()=>{pt.current&&(clearInterval(pt.current),pt.current=null)}),[et]);const tt=(Ut,nt)=>$e(Ut,Object.assign(Object.assign({},nt),{format:Ye})),ft=Ut=>(0,Le.Tm)(Ut,{title:void 0});return te.createElement(Me,Object.assign({},De,{valueRender:ft,formatter:tt}))};var be=te.memo(Ee);Me.Countdown=be;var Re=Me},33507:function(dn,St){"use strict";const ee=te=>({[te.componentCls]:{[`${te.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${te.motionDurationMid} ${te.motionEaseInOut},
|
|
|
opacity ${te.motionDurationMid} ${te.motionEaseInOut} !important`}},[`${te.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${te.motionDurationMid} ${te.motionEaseInOut},
|
|
|
opacity ${te.motionDurationMid} ${te.motionEaseInOut} !important`}}});St.Z=ee},33297:function(dn,St,ee){"use strict";ee.d(St,{Fm:function(){return me}});var te=ee(45930),Se=ee(93590);const Le=new te.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ce=new te.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ce=new te.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),fe=new te.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ae=new te.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),le=new te.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),re=new te.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),de=new te.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),he={"move-up":{inKeyframes:re,outKeyframes:de},"move-down":{inKeyframes:Le,outKeyframes:Ce},"move-left":{inKeyframes:ce,outKeyframes:fe},"move-right":{inKeyframes:ae,outKeyframes:le}},me=(se,ye)=>{const{antCls:_e}=se,Me=`${_e}-${ye}`,{inKeyframes:ve,outKeyframes:Fe}=he[ye];return[(0,Se.R)(Me,ve,Fe,se.motionDurationMid),{[`
|
|
|
${Me}-enter,
|
|
|
${Me}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:se.motionEaseOutCirc},[`${Me}-leave`]:{animationTimingFunction:se.motionEaseInOutCirc}}]}},67771:function(dn,St,ee){"use strict";ee.d(St,{Qt:function(){return ce},Uw:function(){return Ce},fJ:function(){return Le},ly:function(){return fe},oN:function(){return me}});var te=ee(45930),Se=ee(93590);const Le=new te.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ce=new te.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ce=new te.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),fe=new te.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ae=new te.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),le=new te.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),re=new te.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),de=new te.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),he={"slide-up":{inKeyframes:Le,outKeyframes:Ce},"slide-down":{inKeyframes:ce,outKeyframes:fe},"slide-left":{inKeyframes:ae,outKeyframes:le},"slide-right":{inKeyframes:re,outKeyframes:de}},me=(se,ye)=>{const{antCls:_e}=se,Me=`${_e}-${ye}`,{inKeyframes:ve,outKeyframes:Fe}=he[ye];return[(0,Se.R)(Me,ve,Fe,se.motionDurationMid),{[`
|
|
|
${Me}-enter,
|
|
|
${Me}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:se.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Me}-leave`]:{animationTimingFunction:se.motionEaseInQuint}}]}},49867:function(dn,St,ee){"use strict";ee.d(St,{N:function(){return te}});const te=Se=>({color:Se.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Se.motionDurationSlow}`,"&:focus, &:hover":{color:Se.colorLinkHover},"&:active":{color:Se.colorLinkActive}})},47897:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Be}});var te=ee(3407),Se=ee(94184),Le=ee.n(Se);function Ce(){return Ce=Object.assign?Object.assign.bind():function(Ne){for(var we=1;we<arguments.length;we++){var rt=arguments[we];for(var It in rt)Object.prototype.hasOwnProperty.call(rt,It)&&(Ne[It]=rt[It])}return Ne},Ce.apply(this,arguments)}function ce(Ne){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(we){return typeof we}:function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},ce(Ne)}function fe(Ne,we){if(ce(Ne)!=="object"||Ne===null)return Ne;var rt=Ne[Symbol.toPrimitive];if(rt!==void 0){var It=rt.call(Ne,we||"default");if(ce(It)!=="object")return It;throw new TypeError("@@toPrimitive must return a primitive value.")}return(we==="string"?String:Number)(Ne)}function ae(Ne){var we=fe(Ne,"string");return ce(we)==="symbol"?we:String(we)}function le(Ne,we,rt){return we=ae(we),we in Ne?Object.defineProperty(Ne,we,{value:rt,enumerable:!0,configurable:!0,writable:!0}):Ne[we]=rt,Ne}function re(Ne){if(Array.isArray(Ne))return Ne}function de(Ne,we){var rt=Ne==null?null:typeof Symbol!="undefined"&&Ne[Symbol.iterator]||Ne["@@iterator"];if(rt!=null){var It,Ct,$t,Vt,wt=[],on=!0,Dt=!1;try{if($t=(rt=rt.call(Ne)).next,we===0){if(Object(rt)!==rt)return;on=!1}else for(;!(on=(It=$t.call(rt)).done)&&(wt.push(It.value),wt.length!==we);on=!0);}catch(Xt){Dt=!0,Ct=Xt}finally{try{if(!on&&rt.return!=null&&(Vt=rt.return(),Object(Vt)!==Vt))return}finally{if(Dt)throw Ct}}return wt}}function he(Ne,we){(we==null||we>Ne.length)&&(we=Ne.length);for(var rt=0,It=new Array(we);rt<we;rt++)It[rt]=Ne[rt];return It}function me(Ne,we){if(Ne){if(typeof Ne=="string")return he(Ne,we);var rt=Object.prototype.toString.call(Ne).slice(8,-1);if(rt==="Object"&&Ne.constructor&&(rt=Ne.constructor.name),rt==="Map"||rt==="Set")return Array.from(Ne);if(rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return he(Ne,we)}}function se(){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 ye(Ne,we){return re(Ne)||de(Ne,we)||me(Ne,we)||se()}function _e(Ne,we){if(Ne==null)return{};var rt={},It=Object.keys(Ne),Ct,$t;for($t=0;$t<It.length;$t++)Ct=It[$t],!(we.indexOf(Ct)>=0)&&(rt[Ct]=Ne[Ct]);return rt}function Me(Ne,we){if(Ne==null)return{};var rt=_e(Ne,we),It,Ct;if(Object.getOwnPropertySymbols){var $t=Object.getOwnPropertySymbols(Ne);for(Ct=0;Ct<$t.length;Ct++)It=$t[Ct],!(we.indexOf(It)>=0)&&Object.prototype.propertyIsEnumerable.call(Ne,It)&&(rt[It]=Ne[It])}return rt}var ve=ee(67294);function Fe(Ne){if(Array.isArray(Ne))return Ne}function $e(Ne,we){var rt=Ne==null?null:typeof Symbol!="undefined"&&Ne[Symbol.iterator]||Ne["@@iterator"];if(rt!=null){var It,Ct,$t,Vt,wt=[],on=!0,Dt=!1;try{if($t=(rt=rt.call(Ne)).next,we===0){if(Object(rt)!==rt)return;on=!1}else for(;!(on=(It=$t.call(rt)).done)&&(wt.push(It.value),wt.length!==we);on=!0);}catch(Xt){Dt=!0,Ct=Xt}finally{try{if(!on&&rt.return!=null&&(Vt=rt.return(),Object(Vt)!==Vt))return}finally{if(Dt)throw Ct}}return wt}}function Te(Ne,we){(we==null||we>Ne.length)&&(we=Ne.length);for(var rt=0,It=new Array(we);rt<we;rt++)It[rt]=Ne[rt];return It}function ze(Ne,we){if(Ne){if(typeof Ne=="string")return Te(Ne,we);var rt=Object.prototype.toString.call(Ne).slice(8,-1);if(rt==="Object"&&Ne.constructor&&(rt=Ne.constructor.name),rt==="Map"||rt==="Set")return Array.from(Ne);if(rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return Te(Ne,we)}}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(Ne,we){return Fe(Ne)||$e(Ne,we)||ze(Ne,we)||Ee()}function Re(Ne){var we=ve.useRef();we.current=Ne;var rt=ve.useCallback(function(){for(var It,Ct=arguments.length,$t=new Array(Ct),Vt=0;Vt<Ct;Vt++)$t[Vt]=arguments[Vt];return(It=we.current)===null||It===void 0?void 0:It.call.apply(It,[we].concat($t))},[]);return rt}function De(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var et=De()?ve.useLayoutEffect:ve.useEffect,Ye=function(we,rt){var It=ve.useRef(!0);et(function(){return we(It.current)},rt),et(function(){return It.current=!1,function(){It.current=!0}},[])},dt=function(we,rt){Ye(function(It){if(!It)return we()},rt)},Ke=null;function zt(Ne){var we=ve.useRef(!1),rt=ve.useState(Ne),It=be(rt,2),Ct=It[0],$t=It[1];ve.useEffect(function(){return we.current=!1,function(){we.current=!0}},[]);function Vt(wt,on){on&&we.current||$t(wt)}return[Ct,Vt]}function pt(Ne){return Ne!==void 0}function Kt(Ne,we){var rt=we||{},It=rt.defaultValue,Ct=rt.value,$t=rt.onChange,Vt=rt.postState,wt=zt(function(){return pt(Ct)?Ct:pt(It)?typeof It=="function"?It():It:typeof Ne=="function"?Ne():Ne}),on=be(wt,2),Dt=on[0],Xt=on[1],nn=Ct!==void 0?Ct:Dt,bn=Vt?Vt(nn):nn,en=Re($t),Zn=zt([nn]),Yn=be(Zn,2),pr=Yn[0],ti=Yn[1];dt(function(){var Or=pr[0];Dt!==Or&&en(Dt,Or)},[pr]),dt(function(){pt(Ct)||Xt(Ct)},[Ct]);var Pn=Re(function(Or,Br){Xt(Or,Br),ti([nn],Br)});return[bn,Pn]}var Ze={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(we){var rt=we.keyCode;if(we.altKey&&!we.ctrlKey||we.metaKey||rt>=Ze.F1&&rt<=Ze.F12)return!1;switch(rt){case Ze.ALT:case Ze.CAPS_LOCK:case Ze.CONTEXT_MENU:case Ze.CTRL:case Ze.DOWN:case Ze.END:case Ze.ESC:case Ze.HOME:case Ze.INSERT:case Ze.LEFT:case Ze.MAC_FF_META:case Ze.META:case Ze.NUMLOCK:case Ze.NUM_CENTER:case Ze.PAGE_DOWN:case Ze.PAGE_UP:case Ze.PAUSE:case Ze.PRINT_SCREEN:case Ze.RIGHT:case Ze.SHIFT:case Ze.UP:case Ze.WIN_KEY:case Ze.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(we){if(we>=Ze.ZERO&&we<=Ze.NINE||we>=Ze.NUM_ZERO&&we<=Ze.NUM_MULTIPLY||we>=Ze.A&&we<=Ze.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&we===0)return!0;switch(we){case Ze.SPACE:case Ze.QUESTION_MARK:case Ze.NUM_PLUS:case Ze.NUM_MINUS:case Ze.NUM_PERIOD:case Ze.NUM_DIVISION:case Ze.SEMICOLON:case Ze.DASH:case Ze.EQUALS:case Ze.COMMA:case Ze.PERIOD:case Ze.SLASH:case Ze.APOSTROPHE:case Ze.SINGLE_QUOTE:case Ze.OPEN_SQUARE_BRACKET:case Ze.BACKSLASH:case Ze.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},tt=Ze,ft=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ut=ve.forwardRef(function(Ne,we){var rt,It=Ne.prefixCls,Ct=It===void 0?"rc-switch":It,$t=Ne.className,Vt=Ne.checked,wt=Ne.defaultChecked,on=Ne.disabled,Dt=Ne.loadingIcon,Xt=Ne.checkedChildren,nn=Ne.unCheckedChildren,bn=Ne.onClick,en=Ne.onChange,Zn=Ne.onKeyDown,Yn=Me(Ne,ft),pr=Kt(!1,{value:Vt,defaultValue:wt}),ti=ye(pr,2),Pn=ti[0],Or=ti[1];function Br(Fr,zr){var Fi=Pn;return on||(Fi=Fr,Or(Fi),en==null||en(Fi,zr)),Fi}function Di(Fr){Fr.which===tt.LEFT?Br(!1,Fr):Fr.which===tt.RIGHT&&Br(!0,Fr),Zn==null||Zn(Fr)}function mi(Fr){var zr=Br(!Pn,Fr);bn==null||bn(zr,Fr)}var ci=Le()(Ct,$t,(rt={},le(rt,"".concat(Ct,"-checked"),Pn),le(rt,"".concat(Ct,"-disabled"),on),rt));return ve.createElement("button",Ce({},Yn,{type:"button",role:"switch","aria-checked":Pn,disabled:on,className:ci,ref:we,onKeyDown:Di,onClick:mi}),Dt,ve.createElement("span",{className:"".concat(Ct,"-inner")},ve.createElement("span",{className:"".concat(Ct,"-inner-checked")},Xt),ve.createElement("span",{className:"".concat(Ct,"-inner-unchecked")},nn)))});Ut.displayName="Switch";var nt=Ut,Ge=ee(45353),jt=ee(53124),yn=ee(98866),ln=ee(98675),Tt=ee(84780),Lt=ee(14747),Jt=ee(67968),kn=ee(45503);const In=Ne=>{const{componentCls:we,trackHeightSM:rt,trackPadding:It,trackMinWidthSM:Ct,innerMinMarginSM:$t,innerMaxMarginSM:Vt,handleSizeSM:wt}=Ne,on=`${we}-inner`;return{[we]:{[`&${we}-small`]:{minWidth:Ct,height:rt,lineHeight:`${rt}px`,[`${we}-inner`]:{paddingInlineStart:Vt,paddingInlineEnd:$t,[`${on}-checked`]:{marginInlineStart:`calc(-100% + ${wt+It*2}px - ${Vt*2}px)`,marginInlineEnd:`calc(100% - ${wt+It*2}px + ${Vt*2}px)`},[`${on}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`${we}-handle`]:{width:wt,height:wt},[`${we}-loading-icon`]:{top:(wt-Ne.switchLoadingIconSize)/2,fontSize:Ne.switchLoadingIconSize},[`&${we}-checked`]:{[`${we}-inner`]:{paddingInlineStart:$t,paddingInlineEnd:Vt,[`${on}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${on}-unchecked`]:{marginInlineStart:`calc(100% - ${wt+It*2}px + ${Vt*2}px)`,marginInlineEnd:`calc(-100% + ${wt+It*2}px - ${Vt*2}px)`}},[`${we}-handle`]:{insetInlineStart:`calc(100% - ${wt+It}px)`}},[`&:not(${we}-disabled):active`]:{[`&:not(${we}-checked) ${on}`]:{[`${on}-unchecked`]:{marginInlineStart:Ne.marginXXS/2,marginInlineEnd:-Ne.marginXXS/2}},[`&${we}-checked ${on}`]:{[`${on}-checked`]:{marginInlineStart:-Ne.marginXXS/2,marginInlineEnd:Ne.marginXXS/2}}}}}}},Qt=Ne=>{const{componentCls:we,handleSize:rt}=Ne;return{[we]:{[`${we}-loading-icon${Ne.iconCls}`]:{position:"relative",top:(rt-Ne.fontSize)/2,color:Ne.switchLoadingIconColor,verticalAlign:"top"},[`&${we}-checked ${we}-loading-icon`]:{color:Ne.switchColor}}}},Mn=Ne=>{const{componentCls:we,motion:rt,trackPadding:It,handleBg:Ct,handleShadow:$t,handleSize:Vt}=Ne,wt=`${we}-handle`;return{[we]:{[wt]:{position:"absolute",top:It,insetInlineStart:It,width:Vt,height:Vt,transition:`all ${Ne.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Ct,borderRadius:Vt/2,boxShadow:$t,transition:`all ${Ne.switchDuration} ease-in-out`,content:'""'}},[`&${we}-checked ${wt}`]:{insetInlineStart:`calc(100% - ${Vt+It}px)`},[`&:not(${we}-disabled):active`]:rt?{[`${wt}::before`]:{insetInlineEnd:Ne.switchHandleActiveInset,insetInlineStart:0},[`&${we}-checked ${wt}::before`]:{insetInlineEnd:0,insetInlineStart:Ne.switchHandleActiveInset}}:{}}}},Wn=Ne=>{const{componentCls:we,trackHeight:rt,trackPadding:It,innerMinMargin:Ct,innerMaxMargin:$t,handleSize:Vt}=Ne,wt=`${we}-inner`;return{[we]:{[wt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:$t,paddingInlineEnd:Ct,transition:`padding-inline-start ${Ne.switchDuration} ease-in-out, padding-inline-end ${Ne.switchDuration} ease-in-out`,[`${wt}-checked, ${wt}-unchecked`]:{display:"block",color:Ne.colorTextLightSolid,fontSize:Ne.fontSizeSM,transition:`margin-inline-start ${Ne.switchDuration} ease-in-out, margin-inline-end ${Ne.switchDuration} ease-in-out`,pointerEvents:"none"},[`${wt}-checked`]:{marginInlineStart:`calc(-100% + ${Vt+It*2}px - ${$t*2}px)`,marginInlineEnd:`calc(100% - ${Vt+It*2}px + ${$t*2}px)`},[`${wt}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`&${we}-checked ${wt}`]:{paddingInlineStart:Ct,paddingInlineEnd:$t,[`${wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${wt}-unchecked`]:{marginInlineStart:`calc(100% - ${Vt+It*2}px + ${$t*2}px)`,marginInlineEnd:`calc(-100% + ${Vt+It*2}px - ${$t*2}px)`}},[`&:not(${we}-disabled):active`]:{[`&:not(${we}-checked) ${wt}`]:{[`${wt}-unchecked`]:{marginInlineStart:It*2,marginInlineEnd:-It*2}},[`&${we}-checked ${wt}`]:{[`${wt}-checked`]:{marginInlineStart:-It*2,marginInlineEnd:It*2}}}}}},zn=Ne=>{const{componentCls:we,trackHeight:rt,trackMinWidth:It}=Ne;return{[we]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Lt.Wf)(Ne)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:It,height:rt,lineHeight:`${rt}px`,verticalAlign:"middle",background:Ne.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Ne.motionDurationMid}`,userSelect:"none",[`&:hover:not(${we}-disabled)`]:{background:Ne.colorTextTertiary}}),(0,Lt.Qy)(Ne)),{[`&${we}-checked`]:{background:Ne.switchColor,[`&:hover:not(${we}-disabled)`]:{background:Ne.colorPrimaryHover}},[`&${we}-loading, &${we}-disabled`]:{cursor:"not-allowed",opacity:Ne.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${we}-rtl`]:{direction:"rtl"}})}};var at=(0,Jt.Z)("Switch",Ne=>{const we=(0,kn.TS)(Ne,{switchDuration:Ne.motionDurationMid,switchColor:Ne.colorPrimary,switchDisabledOpacity:Ne.opacityLoading,switchLoadingIconSize:Ne.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${Ne.opacityLoading})`,switchHandleActiveInset:"-30%"});return[zn(we),Wn(we),Mn(we),Qt(we),In(we)]},Ne=>{const{fontSize:we,lineHeight:rt,controlHeight:It,colorWhite:Ct}=Ne,$t=we*rt,Vt=It/2,wt=2,on=$t-wt*2,Dt=Vt-wt*2;return{trackHeight:$t,trackHeightSM:Vt,trackMinWidth:on*2+wt*4,trackMinWidthSM:Dt*2+wt*2,trackPadding:wt,handleBg:Ct,handleSize:on,handleSizeSM:Dt,handleShadow:`0 2px 4px 0 ${new Tt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:on/2,innerMaxMargin:on+wt+wt*2,innerMinMarginSM:Dt/2,innerMaxMarginSM:Dt+wt+wt*2}}),Oe=function(Ne,we){var rt={};for(var It in Ne)Object.prototype.hasOwnProperty.call(Ne,It)&&we.indexOf(It)<0&&(rt[It]=Ne[It]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,It=Object.getOwnPropertySymbols(Ne);Ct<It.length;Ct++)we.indexOf(It[Ct])<0&&Object.prototype.propertyIsEnumerable.call(Ne,It[Ct])&&(rt[It[Ct]]=Ne[It[Ct]]);return rt};const ke=ve.forwardRef((Ne,we)=>{const{prefixCls:rt,size:It,disabled:Ct,loading:$t,className:Vt,rootClassName:wt,style:on}=Ne,Dt=Oe(Ne,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Xt,direction:nn,switch:bn}=ve.useContext(jt.E_),en=ve.useContext(yn.Z),Zn=(Ct!=null?Ct:en)||$t,Yn=Xt("switch",rt),pr=ve.createElement("div",{className:`${Yn}-handle`},$t&&ve.createElement(te.Z,{className:`${Yn}-loading-icon`})),[ti,Pn]=at(Yn),Or=(0,ln.Z)(It),Br=Le()(bn==null?void 0:bn.className,{[`${Yn}-small`]:Or==="small",[`${Yn}-loading`]:$t,[`${Yn}-rtl`]:nn==="rtl"},Vt,wt,Pn),Di=Object.assign(Object.assign({},bn==null?void 0:bn.style),on);return ti(ve.createElement(Ge.Z,{component:"Switch"},ve.createElement(nt,Object.assign({},Dt,{prefixCls:Yn,className:Br,style:Di,disabled:Zn,ref:we,loadingIcon:pr}))))});ke.__ANT_SWITCH=!0;var Be=ke},9430:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return al}});var te={},Se="rc-table-internal-hook",Le=ee(97685),Ce=ee(66680),ce=ee(8410),fe=ee(91881),ae=ee(67294),le=ee(73935);function re(Ve){var Qe=ae.createContext(void 0),bt=function(Ht){var Yt=Ht.value,xn=Ht.children,Ln=ae.useRef(Yt);Ln.current=Yt;var _n=ae.useState(function(){return{getValue:function(){return Ln.current},listeners:new Set}}),Vn=(0,Le.Z)(_n,1),hr=Vn[0];return(0,ce.Z)(function(){(0,le.unstable_batchedUpdates)(function(){hr.listeners.forEach(function(Sn){Sn(Yt)})})},[Yt]),ae.createElement(Qe.Provider,{value:hr},xn)};return{Context:Qe,Provider:bt,defaultValue:Ve}}function de(Ve,Qe){var bt=(0,Ce.Z)(typeof Qe=="function"?Qe:function(Sn){if(Qe===void 0)return Sn;if(!Array.isArray(Qe))return Sn[Qe];var Er={};return Qe.forEach(function(Dr){Er[Dr]=Sn[Dr]}),Er}),Rt=ae.useContext(Ve==null?void 0:Ve.Context),Ht=Rt||{},Yt=Ht.listeners,xn=Ht.getValue,Ln=ae.useRef();Ln.current=bt(Rt?xn():Ve==null?void 0:Ve.defaultValue);var _n=ae.useState({}),Vn=(0,Le.Z)(_n,2),hr=Vn[1];return(0,ce.Z)(function(){if(!Rt)return;function Sn(Er){var Dr=bt(Er);(0,fe.Z)(Ln.current,Dr,!0)||hr({})}return Yt.add(Sn),function(){Yt.delete(Sn)}},[Rt]),Ln.current}var he=ee(87462),me=ee(42550);function se(){var Ve=ae.createContext(null);function Qe(){return ae.useContext(Ve)}function bt(Ht,Yt){var xn=(0,me.Yr)(Ht),Ln=function(Vn,hr){var Sn=xn?{ref:hr}:{},Er=ae.useRef(0),Dr=ae.useRef(Vn),$r=Qe();return $r!==null?ae.createElement(Ht,(0,he.Z)({},Vn,Sn)):((!Yt||Yt(Dr.current,Vn))&&(Er.current+=1),Dr.current=Vn,ae.createElement(Ve.Provider,{value:Er.current},ae.createElement(Ht,(0,he.Z)({},Vn,Sn))))};return xn?ae.forwardRef(Ln):Ln}function Rt(Ht,Yt){var xn=(0,me.Yr)(Ht),Ln=function(Vn,hr){var Sn=xn?{ref:hr}:{};return Qe(),ae.createElement(Ht,(0,he.Z)({},Vn,Sn))};return xn?ae.memo(ae.forwardRef(Ln),Yt):ae.memo(Ln,Yt)}return{makeImmutable:bt,responseImmutable:Rt,useImmutableMark:Qe}}var ye=se(),_e=ye.makeImmutable,Me=ye.responseImmutable,ve=ye.useImmutableMark,Fe=se(),$e=Fe.makeImmutable,Te=Fe.responseImmutable,ze=Fe.useImmutableMark,Ee=re(),be=Ee;function Re(Ve,Qe){var bt=ae.useRef(0);bt.current+=1;var Rt=ae.useRef(Ve),Ht=[];Object.keys(Ve||{}).map(function(xn){var Ln;(Ve==null?void 0:Ve[xn])!==((Ln=Rt.current)===null||Ln===void 0?void 0:Ln[xn])&&Ht.push(xn)}),Rt.current=Ve;var Yt=ae.useRef([]);return Ht.length&&(Yt.current=Ht),ae.useDebugValue(bt.current),ae.useDebugValue(Yt.current.join(", ")),Qe&&console.log("".concat(Qe,":"),bt.current,Yt.current),bt.current}var De=null,et=ae.memo(function(){var Ve=Re();return ae.createElement("h1",null,"Render Times: ",Ve)});et.displayName="RenderBlock";var Ye=ee(71002),dt=ee(1413),Ke=ee(4942),zt=ee(94184),pt=ee.n(zt);function Kt(Ve,Qe,bt){var Rt=ae.useRef({});return(!("value"in Rt.current)||bt(Rt.current.condition,Qe))&&(Rt.current.value=Ve(),Rt.current.condition=Qe),Rt.current.value}var Ze={},tt=[],ft=function(Qe){tt.push(Qe)};function Ut(Ve,Qe){if(0)var bt}function nt(Ve,Qe){if(0)var bt}function Ge(){Ze={}}function jt(Ve,Qe,bt){!Qe&&!Ze[bt]&&(Ve(!1,bt),Ze[bt]=!0)}function yn(Ve,Qe){jt(Ut,Ve,Qe)}function ln(Ve,Qe){jt(nt,Ve,Qe)}yn.preMessage=ft,yn.resetWarned=Ge,yn.noteOnce=ln;var Tt=yn;function Lt(Ve,Qe){var bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Rt=new Set;function Ht(Yt,xn){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_n=Rt.has(Yt);if(Tt(!_n,"Warning: There may be circular references"),_n)return!1;if(Yt===xn)return!0;if(bt&&Ln>1)return!1;Rt.add(Yt);var Vn=Ln+1;if(Array.isArray(Yt)){if(!Array.isArray(xn)||Yt.length!==xn.length)return!1;for(var hr=0;hr<Yt.length;hr++)if(!Ht(Yt[hr],xn[hr],Vn))return!1;return!0}if(Yt&&xn&&(0,Ye.Z)(Yt)==="object"&&(0,Ye.Z)(xn)==="object"){var Sn=Object.keys(Yt);return Sn.length!==Object.keys(xn).length?!1:Sn.every(function(Er){return Ht(Yt[Er],xn[Er],Vn)})}return!1}return Ht(Ve,Qe)}var Jt=Lt;function kn(Ve,Qe){for(var bt=Ve,Rt=0;Rt<Qe.length;Rt+=1){if(bt==null)return;bt=bt[Qe[Rt]]}return bt}var In=ae.createContext({renderWithProps:!1}),Qt=In,Mn="RC_TABLE_KEY";function Wn(Ve){return Ve==null?[]:Array.isArray(Ve)?Ve:[Ve]}function zn(Ve){var Qe=[],bt={};return Ve.forEach(function(Rt){for(var Ht=Rt||{},Yt=Ht.key,xn=Ht.dataIndex,Ln=Yt||Wn(xn).join("-")||Mn;bt[Ln];)Ln="".concat(Ln,"_next");bt[Ln]=!0,Qe.push(Ln)}),Qe}function at(Ve){return Ve!=null}function Oe(Ve){return Ve&&(0,Ye.Z)(Ve)==="object"&&!Array.isArray(Ve)&&!ae.isValidElement(Ve)}function ke(Ve,Qe,bt,Rt,Ht,Yt){var xn=ae.useContext(Qt),Ln=ze(),_n=Kt(function(){if(at(Rt))return[Rt];var Vn=Qe==null||Qe===""?[]:Array.isArray(Qe)?Qe:[Qe],hr=kn(Ve,Vn),Sn=hr,Er=void 0;if(Ht){var Dr=Ht(hr,Ve,bt);Oe(Dr)?(Sn=Dr.children,Er=Dr.props,xn.renderWithProps=!0):Sn=Dr}return[Sn,Er]},[Ln,Ve,Rt,Qe,Ht,bt],function(Vn,hr){if(Yt){var Sn=(0,Le.Z)(Vn,2),Er=Sn[1],Dr=(0,Le.Z)(hr,2),$r=Dr[1];return Yt($r,Er)}return xn.renderWithProps?!0:!Jt(Vn,hr,!0)});return _n}function Be(Ve,Qe,bt,Rt){var Ht=Ve+Qe-1;return Ve<=Rt&&Ht>=bt}function Ne(Ve,Qe){return de(be,function(bt){var Rt=Be(Ve,Qe||1,bt.hoverStartRow,bt.hoverEndRow);return[Rt,bt.onHover]})}var we=function(Qe){var bt=Qe.ellipsis,Rt=Qe.rowType,Ht=Qe.children,Yt,xn=bt===!0?{showTitle:!0}:bt;return xn&&(xn.showTitle||Rt==="header")&&(typeof Ht=="string"||typeof Ht=="number"?Yt=Ht.toString():ae.isValidElement(Ht)&&typeof Ht.props.children=="string"&&(Yt=Ht.props.children)),Yt};function rt(Ve){var Qe,bt,Rt,Ht,Yt,xn,Ln,_n,Vn=Ve.component,hr=Ve.children,Sn=Ve.ellipsis,Er=Ve.scope,Dr=Ve.prefixCls,$r=Ve.className,ei=Ve.align,Zr=Ve.record,Ei=Ve.render,fi=Ve.dataIndex,$i=Ve.renderIndex,mo=Ve.shouldCellUpdate,ao=Ve.index,po=Ve.rowType,Vo=Ve.colSpan,wa=Ve.rowSpan,eo=Ve.fixLeft,so=Ve.fixRight,no=Ve.firstFixLeft,ki=Ve.lastFixLeft,co=Ve.firstFixRight,Go=Ve.lastFixRight,$a=Ve.appendNode,ha=Ve.additionalProps,Yo=ha===void 0?{}:ha,Ua=Ve.isSticky,Ha="".concat(Dr,"-cell"),Ms=de(be,["supportSticky","allColumnsFixedLeft"]),Ga=Ms.supportSticky,js=Ms.allColumnsFixedLeft,Ks=ke(Zr,fi,$i,hr,Ei,mo),ka=(0,Le.Z)(Ks,2),ml=ka[0],hs=ka[1],ks={},xs=typeof eo=="number"&&Ga,ga=typeof so=="number"&&Ga;xs&&(ks.position="sticky",ks.left=eo),ga&&(ks.position="sticky",ks.right=so);var Vi=(Qe=(bt=(Rt=hs==null?void 0:hs.colSpan)!==null&&Rt!==void 0?Rt:Yo.colSpan)!==null&&bt!==void 0?bt:Vo)!==null&&Qe!==void 0?Qe:1,Oo=(Ht=(Yt=(xn=hs==null?void 0:hs.rowSpan)!==null&&xn!==void 0?xn:Yo.rowSpan)!==null&&Yt!==void 0?Yt:wa)!==null&&Ht!==void 0?Ht:1,Xo=Ne(ao,Oo),lo=(0,Le.Z)(Xo,2),ps=lo[0],Wi=lo[1],xa=function(sl){var ec;Zr&&Wi(ao,ao+Oo-1),Yo==null||(ec=Yo.onMouseEnter)===null||ec===void 0||ec.call(Yo,sl)},ds=function(sl){var ec;Zr&&Wi(-1,-1),Yo==null||(ec=Yo.onMouseLeave)===null||ec===void 0||ec.call(Yo,sl)};if(Vi===0||Oo===0)return null;var ss=(Ln=Yo.title)!==null&&Ln!==void 0?Ln:we({rowType:po,ellipsis:Sn,children:ml}),Yl=pt()(Ha,$r,(_n={},(0,Ke.Z)(_n,"".concat(Ha,"-fix-left"),xs&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-left-first"),no&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-left-last"),ki&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-left-all"),ki&&js&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-right"),ga&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-right-first"),co&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-fix-right-last"),Go&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-ellipsis"),Sn),(0,Ke.Z)(_n,"".concat(Ha,"-with-append"),$a),(0,Ke.Z)(_n,"".concat(Ha,"-fix-sticky"),(xs||ga)&&Ua&&Ga),(0,Ke.Z)(_n,"".concat(Ha,"-row-hover"),!hs&&ps),_n),Yo.className,hs==null?void 0:hs.className),vl={};ei&&(vl.textAlign=ei);var cc=(0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)({},ks),Yo.style),vl),hs==null?void 0:hs.style),Xr=ml;return(0,Ye.Z)(Xr)==="object"&&!Array.isArray(Xr)&&!ae.isValidElement(Xr)&&(Xr=null),Sn&&(ki||co)&&(Xr=ae.createElement("span",{className:"".concat(Ha,"-content")},Xr)),ae.createElement(Vn,(0,he.Z)({},hs,Yo,{className:Yl,style:cc,title:ss,scope:Er,onMouseEnter:xa,onMouseLeave:ds,colSpan:Vi!==1?Vi:null,rowSpan:Oo!==1?Oo:null}),$a,Xr)}var It=ae.memo(rt);function Ct(Ve,Qe,bt,Rt,Ht,Yt){var xn=bt[Ve]||{},Ln=bt[Qe]||{},_n,Vn;xn.fixed==="left"?_n=Rt.left[Ht==="rtl"?Qe:Ve]:Ln.fixed==="right"&&(Vn=Rt.right[Ht==="rtl"?Ve:Qe]);var hr=!1,Sn=!1,Er=!1,Dr=!1,$r=bt[Qe+1],ei=bt[Ve-1],Zr=!(Yt!=null&&Yt.children);if(Ht==="rtl"){if(_n!==void 0){var Ei=ei&&ei.fixed==="left";Dr=!Ei&&Zr}else if(Vn!==void 0){var fi=$r&&$r.fixed==="right";Er=!fi&&Zr}}else if(_n!==void 0){var $i=$r&&$r.fixed==="left";hr=!$i&&Zr}else if(Vn!==void 0){var mo=ei&&ei.fixed==="right";Sn=!mo&&Zr}return{fixLeft:_n,fixRight:Vn,lastFixLeft:hr,firstFixRight:Sn,lastFixRight:Er,firstFixLeft:Dr,isSticky:Rt.isSticky}}var $t=ae.createContext({}),Vt=$t;function wt(Ve){var Qe=Ve.className,bt=Ve.index,Rt=Ve.children,Ht=Ve.colSpan,Yt=Ht===void 0?1:Ht,xn=Ve.rowSpan,Ln=Ve.align,_n=de(be,["prefixCls","direction"]),Vn=_n.prefixCls,hr=_n.direction,Sn=ae.useContext(Vt),Er=Sn.scrollColumnIndex,Dr=Sn.stickyOffsets,$r=Sn.flattenColumns,ei=Sn.columns,Zr=bt+Yt-1,Ei=Zr+1===Er?Yt+1:Yt,fi=Ct(bt,bt+Ei-1,$r,Dr,hr,ei==null?void 0:ei[bt]);return ae.createElement(It,(0,he.Z)({className:Qe,index:bt,component:"td",prefixCls:Vn,record:null,dataIndex:null,align:Ln,colSpan:Ei,rowSpan:xn,render:function(){return Rt}},fi))}var on=ee(45987),Dt=["children"];function Xt(Ve){var Qe=Ve.children,bt=(0,on.Z)(Ve,Dt);return ae.createElement("tr",bt,Qe)}function nn(Ve){var Qe=Ve.children;return Qe}nn.Row=Xt,nn.Cell=wt;var bn=nn;function en(Ve){var Qe=Ve.children,bt=Ve.stickyOffsets,Rt=Ve.flattenColumns,Ht=Ve.columns,Yt=de(be,"prefixCls"),xn=Rt.length-1,Ln=Rt[xn],_n=ae.useMemo(function(){return{stickyOffsets:bt,flattenColumns:Rt,scrollColumnIndex:Ln!=null&&Ln.scrollbar?xn:null,columns:Ht}},[Ln,Rt,xn,bt,Ht]);return ae.createElement(Vt.Provider,{value:_n},ae.createElement("tfoot",{className:"".concat(Yt,"-summary")},Qe))}var Zn=Te(en),Yn=bn;function pr(Ve){var Qe=ae.useRef();Qe.current=Ve;var bt=ae.useCallback(function(){for(var Rt,Ht=arguments.length,Yt=new Array(Ht),xn=0;xn<Ht;xn++)Yt[xn]=arguments[xn];return(Rt=Qe.current)===null||Rt===void 0?void 0:Rt.call.apply(Rt,[Qe].concat(Yt))},[]);return bt}function ti(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Pn=ti()?ae.useLayoutEffect:ae.useEffect,Or=function(Qe,bt){var Rt=React.useRef(!0);Pn(function(){return Qe(Rt.current)},bt),Pn(function(){return Rt.current=!1,function(){Rt.current=!0}},[])},Br=function(Qe,bt){Or(function(Rt){if(!Rt)return Qe()},bt)},Di=null;function mi(Ve){var Qe=React.useRef(!1),bt=React.useState(Ve),Rt=_slicedToArray(bt,2),Ht=Rt[0],Yt=Rt[1];React.useEffect(function(){return Qe.current=!1,function(){Qe.current=!0}},[]);function xn(Ln,_n){_n&&Qe.current||Yt(Ln)}return[Ht,xn]}function ci(Ve){return Ve!==void 0}function Fr(Ve,Qe){var bt=Qe||{},Rt=bt.defaultValue,Ht=bt.value,Yt=bt.onChange,xn=bt.postState,Ln=useState(function(){return ci(Ht)?Ht:ci(Rt)?typeof Rt=="function"?Rt():Rt:typeof Ve=="function"?Ve():Ve}),_n=_slicedToArray(Ln,2),Vn=_n[0],hr=_n[1],Sn=Ht!==void 0?Ht:Vn,Er=xn?xn(Sn):Sn,Dr=useEvent(Yt),$r=useState([Sn]),ei=_slicedToArray($r,2),Zr=ei[0],Ei=ei[1];useLayoutUpdateEffect(function(){var $i=Zr[0];Vn!==$i&&Dr(Vn,$i)},[Zr]),useLayoutUpdateEffect(function(){ci(Ht)||hr(Ht)},[Ht]);var fi=useEvent(function($i,mo){hr($i,mo),Ei([Sn],mo)});return[Er,fi]}var zr=ee(35110);function Fi(Ve,Qe){typeof Ve=="function"?Ve(Qe):(0,Ye.Z)(Ve)==="object"&&Ve&&"current"in Ve&&(Ve.current=Qe)}function ko(){for(var Ve=arguments.length,Qe=new Array(Ve),bt=0;bt<Ve;bt++)Qe[bt]=arguments[bt];var Rt=Qe.filter(function(Ht){return Ht});return Rt.length<=1?Rt[0]:function(Ht){Qe.forEach(function(Yt){Fi(Yt,Ht)})}}function aa(){for(var Ve=arguments.length,Qe=new Array(Ve),bt=0;bt<Ve;bt++)Qe[bt]=arguments[bt];return useMemo(function(){return ko.apply(void 0,Qe)},Qe,function(Rt,Ht){return Rt.length!==Ht.length||Rt.every(function(Yt,xn){return Yt!==Ht[xn]})})}function Wo(Ve){var Qe,bt,Rt=isMemo(Ve)?Ve.type.type:Ve.type;return!(typeof Rt=="function"&&!((Qe=Rt.prototype)!==null&&Qe!==void 0&&Qe.render)||typeof Ve=="function"&&!((bt=Ve.prototype)!==null&&bt!==void 0&&bt.render))}function li(Ve){return!isValidElement(Ve)||isFragment(Ve)?!1:Wo(Ve)}function rn(Ve,Qe,bt,Rt){if(!Qe.length)return bt;var Ht=_toArray(Qe),Yt=Ht[0],xn=Ht.slice(1),Ln;return!Ve&&typeof Yt=="number"?Ln=[]:Array.isArray(Ve)?Ln=_toConsumableArray(Ve):Ln=_objectSpread({},Ve),Rt&&bt===void 0&&xn.length===1?delete Ln[Yt][xn[0]]:Ln[Yt]=rn(Ln[Yt],xn,bt,Rt),Ln}function nr(Ve,Qe,bt){var Rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Qe.length&&Rt&&bt===void 0&&!get(Ve,Qe.slice(0,-1))?Ve:rn(Ve,Qe,bt,Rt)}function dr(Ve){return _typeof(Ve)==="object"&&Ve!==null&&Object.getPrototypeOf(Ve)===Object.prototype}function rr(Ve){return Array.isArray(Ve)?[]:{}}var Jr=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Ar(){for(var Ve=arguments.length,Qe=new Array(Ve),bt=0;bt<Ve;bt++)Qe[bt]=arguments[bt];var Rt=rr(Qe[0]);return Qe.forEach(function(Ht){function Yt(xn,Ln){var _n=new Set(Ln),Vn=get(Ht,xn),hr=Array.isArray(Vn);if(hr||dr(Vn)){if(!_n.has(Vn)){_n.add(Vn);var Sn=get(Rt,xn);hr?Rt=nr(Rt,xn,[]):(!Sn||_typeof(Sn)!=="object")&&(Rt=nr(Rt,xn,rr(Vn))),Jr(Vn).forEach(function(Er){Yt([].concat(_toConsumableArray(xn),[Er]),_n)})}}else Rt=nr(Rt,xn,Vn)}Yt([])}),Rt}var Mr=ee(48555),tr=function(Ve){if(!Ve)return!1;if(Ve instanceof Element){if(Ve.offsetParent)return!0;if(Ve.getBBox){var Qe=Ve.getBBox(),bt=Qe.width,Rt=Qe.height;if(bt||Rt)return!0}if(Ve.getBoundingClientRect){var Ht=Ve.getBoundingClientRect(),Yt=Ht.width,xn=Ht.height;if(Yt||xn)return!0}}return!1},Zt=function(Qe){if(ti()&&window.document.documentElement){var bt=Array.isArray(Qe)?Qe:[Qe],Rt=window.document.documentElement;return bt.some(function(Ht){return Ht in Rt.style})}return!1},Ot=function(Qe,bt){if(!Zt(Qe))return!1;var Rt=document.createElement("div"),Ht=Rt.style[Qe];return Rt.style[Qe]=bt,Rt.style[Qe]!==Ht};function ge(Ve,Qe){return!Array.isArray(Ve)&&Qe!==void 0?Ot(Ve,Qe):Zt(Ve)}var Ie;function Ae(Ve){if(typeof document=="undefined")return 0;if(Ve||Ie===void 0){var Qe=document.createElement("div");Qe.style.width="100%",Qe.style.height="200px";var bt=document.createElement("div"),Rt=bt.style;Rt.position="absolute",Rt.top="0",Rt.left="0",Rt.pointerEvents="none",Rt.visibility="hidden",Rt.width="200px",Rt.height="150px",Rt.overflow="hidden",bt.appendChild(Qe),document.body.appendChild(bt);var Ht=Qe.offsetWidth;bt.style.overflow="scroll";var Yt=Qe.offsetWidth;Ht===Yt&&(Yt=bt.clientWidth),document.body.removeChild(bt),Ie=Ht-Yt}return Ie}function We(Ve){var Qe=Ve.match(/^(.*)px$/),bt=Number(Qe==null?void 0:Qe[1]);return Number.isNaN(bt)?Ae():bt}function it(Ve){if(typeof document=="undefined"||!Ve||!(Ve instanceof Element))return{width:0,height:0};var Qe=getComputedStyle(Ve,"::-webkit-scrollbar"),bt=Qe.width,Rt=Qe.height;return{width:We(bt),height:We(Rt)}}var xt=`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`,Ft=`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`,an="".concat(xt," ").concat(Ft).split(/[\s\n]+/),Rn="aria-",mr="data-";function or(Ve,Qe){return Ve.indexOf(Qe)===0}function cr(Ve){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bt;Qe===!1?bt={aria:!0,data:!0,attr:!0}:Qe===!0?bt={aria:!0}:bt=(0,dt.Z)({},Qe);var Rt={};return Object.keys(Ve).forEach(function(Ht){(bt.aria&&(Ht==="role"||or(Ht,Rn))||bt.data&&or(Ht,mr)||bt.attr&&an.includes(Ht))&&(Rt[Ht]=Ve[Ht])}),Rt}function Xn(Ve,Qe,bt,Rt,Ht,Yt,xn){Ve.push({record:Qe,indent:bt,index:xn});var Ln=Yt(Qe),_n=Ht==null?void 0:Ht.has(Ln);if(Qe&&Array.isArray(Qe[Rt])&&_n)for(var Vn=0;Vn<Qe[Rt].length;Vn+=1)Xn(Ve,Qe[Rt][Vn],bt+1,Rt,Ht,Yt,Vn)}function br(Ve,Qe,bt,Rt){var Ht=ae.useMemo(function(){if(bt!=null&&bt.size){for(var Yt=[],xn=0;xn<(Ve==null?void 0:Ve.length);xn+=1){var Ln=Ve[xn];Xn(Yt,Ln,0,Qe,bt,Rt,xn)}return Yt}return Ve==null?void 0:Ve.map(function(_n,Vn){return{record:_n,indent:0,index:Vn}})},[Ve,Qe,bt,Rt]);return Ht}function _r(Ve){var Qe=Ve.prefixCls,bt=Ve.children,Rt=Ve.component,Ht=Ve.cellComponent,Yt=Ve.className,xn=Ve.expanded,Ln=Ve.colSpan,_n=Ve.isEmpty,Vn=de(be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),hr=Vn.scrollbarSize,Sn=Vn.fixHeader,Er=Vn.fixColumn,Dr=Vn.componentWidth,$r=Vn.horizonScroll,ei=bt;return(_n?$r&&Dr:Er)&&(ei=ae.createElement("div",{style:{width:Dr-(Sn?hr:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Qe,"-expanded-row-fixed")},ei)),ae.createElement(Rt,{className:Yt,style:{display:xn?null:"none"}},ae.createElement(It,{component:Ht,prefixCls:Qe,colSpan:Ln},ei))}var mn=_r;function $n(Ve,Qe,bt,Rt){var Ht=de(be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Yt=Ht.flattenColumns,xn=Ht.expandableType,Ln=Ht.expandedKeys,_n=Ht.childrenColumnName,Vn=Ht.onTriggerExpand,hr=Ht.rowExpandable,Sn=Ht.onRow,Er=Ht.expandRowByClick,Dr=Ht.rowClassName,$r=xn==="nest",ei=xn==="row"&&(!hr||hr(Ve)),Zr=ei||$r,Ei=Ln&&Ln.has(Qe),fi=_n&&Ve&&Ve[_n],$i=pr(Vn),mo=Sn==null?void 0:Sn(Ve,bt),ao=mo==null?void 0:mo.onClick,po=function(so){Er&&Zr&&Vn(Ve,so);for(var no=arguments.length,ki=new Array(no>1?no-1:0),co=1;co<no;co++)ki[co-1]=arguments[co];ao==null||ao.apply(void 0,[so].concat(ki))},Vo;typeof Dr=="string"?Vo=Dr:typeof Dr=="function"&&(Vo=Dr(Ve,bt,Rt));var wa=zn(Yt);return(0,dt.Z)((0,dt.Z)({},Ht),{},{columnsKey:wa,nestExpandable:$r,expanded:Ei,hasNestChildren:fi,record:Ve,onTriggerExpand:$i,rowSupportExpand:ei,expandable:Zr,rowProps:(0,dt.Z)((0,dt.Z)({},mo),{},{className:pt()(Vo,mo==null?void 0:mo.className),onClick:po})})}function Vr(Ve,Qe,bt,Rt,Ht){var Yt=Ve.record,xn=Ve.prefixCls,Ln=Ve.columnsKey,_n=Ve.fixedInfoList,Vn=Ve.expandIconColumnIndex,hr=Ve.nestExpandable,Sn=Ve.indentSize,Er=Ve.expandIcon,Dr=Ve.expanded,$r=Ve.hasNestChildren,ei=Ve.onTriggerExpand,Zr=Ln[bt],Ei=_n[bt],fi;bt===(Vn||0)&&hr&&(fi=ae.createElement(ae.Fragment,null,ae.createElement("span",{style:{paddingLeft:"".concat(Sn*Rt,"px")},className:"".concat(xn,"-row-indent indent-level-").concat(Rt)}),Er({prefixCls:xn,expanded:Dr,expandable:$r,record:Yt,onExpand:ei})));var $i;return Qe.onCell&&($i=Qe.onCell(Yt,Ht)),{key:Zr,fixedInfo:Ei,appendCellNode:fi,additionalCellProps:$i||{}}}function qr(Ve){var Qe=Ve.className,bt=Ve.style,Rt=Ve.record,Ht=Ve.index,Yt=Ve.renderIndex,xn=Ve.rowKey,Ln=Ve.indent,_n=Ln===void 0?0:Ln,Vn=Ve.rowComponent,hr=Ve.cellComponent,Sn=Ve.scopeCellComponent,Er=$n(Rt,xn,Ht,_n),Dr=Er.prefixCls,$r=Er.flattenColumns,ei=Er.expandedRowClassName,Zr=Er.expandedRowRender,Ei=Er.rowProps,fi=Er.expanded,$i=Er.rowSupportExpand,mo=ae.useState(!1),ao=(0,Le.Z)(mo,2),po=ao[0],Vo=ao[1];ae.useEffect(function(){fi&&Vo(!0)},[fi]);var wa=ae.createElement(Vn,(0,he.Z)({},Ei,{"data-row-key":xn,className:pt()(Qe,"".concat(Dr,"-row"),"".concat(Dr,"-row-level-").concat(_n),Ei==null?void 0:Ei.className),style:(0,dt.Z)((0,dt.Z)({},bt),Ei==null?void 0:Ei.style)}),$r.map(function(ki,co){var Go=ki.render,$a=ki.dataIndex,ha=ki.className,Yo=Vr(Er,ki,co,_n,Ht),Ua=Yo.key,Ha=Yo.fixedInfo,Ms=Yo.appendCellNode,Ga=Yo.additionalCellProps;return ae.createElement(It,(0,he.Z)({className:ha,ellipsis:ki.ellipsis,align:ki.align,scope:ki.rowScope,component:ki.rowScope?Sn:hr,prefixCls:Dr,key:Ua,record:Rt,index:Ht,renderIndex:Yt,dataIndex:$a,render:Go,shouldCellUpdate:ki.shouldCellUpdate},Ha,{appendNode:Ms,additionalProps:Ga}))})),eo;if($i&&(po||fi)){var so=Zr(Rt,Ht,_n+1,fi),no=ei&&ei(Rt,Ht,_n);eo=ae.createElement(mn,{expanded:fi,className:pt()("".concat(Dr,"-expanded-row"),"".concat(Dr,"-expanded-row-level-").concat(_n+1),no),prefixCls:Dr,component:Vn,cellComponent:hr,colSpan:$r.length,isEmpty:!1},so)}return ae.createElement(ae.Fragment,null,wa,eo)}qr.displayName="BodyRow";var Ir=Te(qr);function hi(Ve){var Qe=Ve.columnKey,bt=Ve.onColumnResize,Rt=ae.useRef();return ae.useEffect(function(){Rt.current&&bt(Qe,Rt.current.offsetWidth)},[]),ae.createElement(Mr.Z,{data:Qe},ae.createElement("td",{ref:Rt,style:{padding:0,border:0,height:0}},ae.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Ni(Ve){var Qe=Ve.prefixCls,bt=Ve.columnsKey,Rt=Ve.onColumnResize;return ae.createElement("tr",{"aria-hidden":"true",className:"".concat(Qe,"-measure-row"),style:{height:0,fontSize:0}},ae.createElement(Mr.Z.Collection,{onBatchResize:function(Yt){Yt.forEach(function(xn){var Ln=xn.data,_n=xn.size;Rt(Ln,_n.offsetWidth)})}},bt.map(function(Ht){return ae.createElement(hi,{key:Ht,columnKey:Ht,onColumnResize:Rt})})))}function yr(Ve){var Qe=Ve.data,bt=Ve.measureColumnWidth,Rt=de(be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ht=Rt.prefixCls,Yt=Rt.getComponent,xn=Rt.onColumnResize,Ln=Rt.flattenColumns,_n=Rt.getRowKey,Vn=Rt.expandedKeys,hr=Rt.childrenColumnName,Sn=Rt.emptyNode,Er=br(Qe,hr,Vn,_n),Dr=ae.useRef({renderWithProps:!1}),$r=Yt(["body","wrapper"],"tbody"),ei=Yt(["body","row"],"tr"),Zr=Yt(["body","cell"],"td"),Ei=Yt(["body","cell"],"th"),fi;Qe.length?fi=Er.map(function(mo,ao){var po=mo.record,Vo=mo.indent,wa=mo.index,eo=_n(po,ao);return ae.createElement(Ir,{key:eo,rowKey:eo,record:po,index:ao,renderIndex:wa,rowComponent:ei,cellComponent:Zr,scopeCellComponent:Ei,getRowKey:_n,indent:Vo})}):fi=ae.createElement(mn,{expanded:!0,className:"".concat(Ht,"-placeholder"),prefixCls:Ht,component:ei,cellComponent:Zr,colSpan:Ln.length,isEmpty:!0},Sn);var $i=zn(Ln);return ae.createElement(Qt.Provider,{value:Dr.current},ae.createElement($r,{className:"".concat(Ht,"-tbody")},bt&&ae.createElement(Ni,{prefixCls:Ht,columnsKey:$i,onColumnResize:xn}),fi))}yr.displayName="Body";var bi=Te(yr),ar=["expandable"],fo="RC_TABLE_INTERNAL_COL_DEFINE";function qi(Ve){var Qe=Ve.expandable,bt=(0,on.Z)(Ve,ar),Rt;return"expandable"in Ve?Rt=(0,dt.Z)((0,dt.Z)({},bt),Qe):Rt=bt,Rt.showExpandColumn===!1&&(Rt.expandIconColumnIndex=-1),Rt}var ua=["columnType"];function Jo(Ve){for(var Qe=Ve.colWidths,bt=Ve.columns,Rt=Ve.columCount,Ht=[],Yt=Rt||bt.length,xn=!1,Ln=Yt-1;Ln>=0;Ln-=1){var _n=Qe[Ln],Vn=bt&&bt[Ln],hr=Vn&&Vn[fo];if(_n||hr||xn){var Sn=hr||{},Er=Sn.columnType,Dr=(0,on.Z)(Sn,ua);Ht.unshift(ae.createElement("col",(0,he.Z)({key:Ln,style:{width:_n}},Dr))),xn=!0}}return ae.createElement("colgroup",null,Ht)}var bo=Jo,oo=ee(74902),na=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Eo(Ve,Qe){return(0,ae.useMemo)(function(){for(var bt=[],Rt=0;Rt<Qe;Rt+=1){var Ht=Ve[Rt];if(Ht!==void 0)bt[Rt]=Ht;else return null}return bt},[Ve.join("_"),Qe])}var ra=ae.forwardRef(function(Ve,Qe){var bt=Ve.className,Rt=Ve.noData,Ht=Ve.columns,Yt=Ve.flattenColumns,xn=Ve.colWidths,Ln=Ve.columCount,_n=Ve.stickyOffsets,Vn=Ve.direction,hr=Ve.fixHeader,Sn=Ve.stickyTopOffset,Er=Ve.stickyBottomOffset,Dr=Ve.stickyClassName,$r=Ve.onScroll,ei=Ve.maxContentScroll,Zr=Ve.children,Ei=(0,on.Z)(Ve,na),fi=de(be,["prefixCls","scrollbarSize","isSticky"]),$i=fi.prefixCls,mo=fi.scrollbarSize,ao=fi.isSticky,po=ao&&!hr?0:mo,Vo=ae.useRef(null),wa=ae.useCallback(function(ha){Fi(Qe,ha),Fi(Vo,ha)},[]);ae.useEffect(function(){var ha;function Yo(Ua){var Ha=Ua,Ms=Ha.currentTarget,Ga=Ha.deltaX;Ga&&($r({currentTarget:Ms,scrollLeft:Ms.scrollLeft+Ga}),Ua.preventDefault())}return(ha=Vo.current)===null||ha===void 0||ha.addEventListener("wheel",Yo),function(){var Ua;(Ua=Vo.current)===null||Ua===void 0||Ua.removeEventListener("wheel",Yo)}},[]);var eo=ae.useMemo(function(){return Yt.every(function(ha){return ha.width})},[Yt]),so=Yt[Yt.length-1],no={fixed:so?so.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat($i,"-cell-scrollbar")}}},ki=(0,ae.useMemo)(function(){return po?[].concat((0,oo.Z)(Ht),[no]):Ht},[po,Ht]),co=(0,ae.useMemo)(function(){return po?[].concat((0,oo.Z)(Yt),[no]):Yt},[po,Yt]),Go=(0,ae.useMemo)(function(){var ha=_n.right,Yo=_n.left;return(0,dt.Z)((0,dt.Z)({},_n),{},{left:Vn==="rtl"?[].concat((0,oo.Z)(Yo.map(function(Ua){return Ua+po})),[0]):Yo,right:Vn==="rtl"?ha:[].concat((0,oo.Z)(ha.map(function(Ua){return Ua+po})),[0]),isSticky:ao})},[po,_n,ao]),$a=Eo(xn,Ln);return ae.createElement("div",{style:(0,dt.Z)({overflow:"hidden"},ao?{top:Sn,bottom:Er}:{}),ref:wa,className:pt()(bt,(0,Ke.Z)({},Dr,!!Dr))},ae.createElement("table",{style:{tableLayout:"fixed",visibility:Rt||$a?null:"hidden"}},(!Rt||!ei||eo)&&ae.createElement(bo,{colWidths:$a?[].concat((0,oo.Z)($a),[po]):[],columCount:Ln+1,columns:co}),Zr((0,dt.Z)((0,dt.Z)({},Ei),{},{stickyOffsets:Go,columns:ki,flattenColumns:co}))))});ra.displayName="FixedHolder";var ea=ae.memo(ra);function Ho(Ve){var Qe=Ve.cells,bt=Ve.stickyOffsets,Rt=Ve.flattenColumns,Ht=Ve.rowComponent,Yt=Ve.cellComponent,xn=Ve.tdCellComponent,Ln=Ve.onHeaderRow,_n=Ve.index,Vn=de(be,["prefixCls","direction"]),hr=Vn.prefixCls,Sn=Vn.direction,Er;Ln&&(Er=Ln(Qe.map(function($r){return $r.column}),_n));var Dr=zn(Qe.map(function($r){return $r.column}));return ae.createElement(Ht,Er,Qe.map(function($r,ei){var Zr=$r.column,Ei=Ct($r.colStart,$r.colEnd,Rt,bt,Sn,Zr),fi;return Zr&&Zr.onHeaderCell&&(fi=$r.column.onHeaderCell(Zr)),ae.createElement(It,(0,he.Z)({},$r,{scope:Zr.title?$r.colSpan>1?"colgroup":"col":null,ellipsis:Zr.ellipsis,align:Zr.align,component:Zr.title?Yt:xn,prefixCls:hr,key:Dr[ei]},Ei,{additionalProps:fi,rowType:"header"}))}))}Ho.displayName="HeaderRow";var No=Ho;function Ba(Ve){var Qe=[];function bt(xn,Ln){var _n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Qe[_n]=Qe[_n]||[];var Vn=Ln,hr=xn.filter(Boolean).map(function(Sn){var Er={key:Sn.key,className:Sn.className||"",children:Sn.title,column:Sn,colStart:Vn},Dr=1,$r=Sn.children;return $r&&$r.length>0&&(Dr=bt($r,Vn,_n+1).reduce(function(ei,Zr){return ei+Zr},0),Er.hasSubColumns=!0),"colSpan"in Sn&&(Dr=Sn.colSpan),"rowSpan"in Sn&&(Er.rowSpan=Sn.rowSpan),Er.colSpan=Dr,Er.colEnd=Er.colStart+Dr-1,Qe[_n].push(Er),Vn+=Dr,Dr});return hr}bt(Ve,0);for(var Rt=Qe.length,Ht=function(Ln){Qe[Ln].forEach(function(_n){!("rowSpan"in _n)&&!_n.hasSubColumns&&(_n.rowSpan=Rt-Ln)})},Yt=0;Yt<Rt;Yt+=1)Ht(Yt);return Qe}function Wa(Ve){var Qe=Ve.stickyOffsets,bt=Ve.columns,Rt=Ve.flattenColumns,Ht=Ve.onHeaderRow,Yt=de(be,["prefixCls","getComponent"]),xn=Yt.prefixCls,Ln=Yt.getComponent,_n=ae.useMemo(function(){return Ba(bt)},[bt]),Vn=Ln(["header","wrapper"],"thead"),hr=Ln(["header","row"],"tr"),Sn=Ln(["header","cell"],"th"),Er=Ln(["header","cell"],"td");return ae.createElement(Vn,{className:"".concat(xn,"-thead")},_n.map(function(Dr,$r){var ei=ae.createElement(No,{key:$r,flattenColumns:Rt,cells:Dr,stickyOffsets:Qe,rowComponent:hr,cellComponent:Sn,tdCellComponent:Er,onHeaderRow:Ht,index:$r});return ei}))}var Ia=Te(Wa);function Ao(Ve){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},bt=[];return ae.Children.forEach(Ve,function(Rt){Rt==null&&!Qe.keepEmpty||(Array.isArray(Rt)?bt=bt.concat(Ao(Rt)):(0,zr.isFragment)(Rt)&&Rt.props?bt=bt.concat(Ao(Rt.props.children,Qe)):bt.push(Rt))}),bt}function pn(Ve){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Qe=="number"?Qe:Qe.endsWith("%")?Ve*parseFloat(Qe)/100:null}function sn(Ve,Qe){return ae.useMemo(function(){if(Qe&&Qe>0){var bt=0,Rt=0;Ve.forEach(function(Vn){var hr=pn(Qe,Vn.width);hr?bt+=hr:Rt+=1});var Ht=Qe-bt,Yt=Rt,xn=Ht/Rt,Ln=0,_n=Ve.map(function(Vn){var hr=(0,dt.Z)({},Vn),Sn=pn(Qe,hr.width);if(Sn)hr.width=Sn;else{var Er=Math.floor(xn);hr.width=Yt===1?Ht:Er,Ht-=Er,Yt-=1}return Ln+=hr.width,hr});return[_n,Ln]}return[Ve,Qe]},[Ve,Qe])}var Hn=["children"],lr=["fixed"];function Cr(Ve){return Ao(Ve).filter(function(Qe){return ae.isValidElement(Qe)}).map(function(Qe){var bt=Qe.key,Rt=Qe.props,Ht=Rt.children,Yt=(0,on.Z)(Rt,Hn),xn=(0,dt.Z)({key:bt},Yt);return Ht&&(xn.children=Cr(Ht)),xn})}function vi(Ve){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ve.filter(function(bt){return bt&&(0,Ye.Z)(bt)==="object"}).reduce(function(bt,Rt,Ht){var Yt=Rt.fixed,xn=Yt===!0?"left":Yt,Ln="".concat(Qe,"-").concat(Ht),_n=Rt.children;return _n&&_n.length>0?[].concat((0,oo.Z)(bt),(0,oo.Z)(vi(_n,Ln).map(function(Vn){return(0,dt.Z)({fixed:xn},Vn)}))):[].concat((0,oo.Z)(bt),[(0,dt.Z)((0,dt.Z)({key:Ln},Rt),{},{fixed:xn})])},[])}function _i(Ve){for(var Qe=!0,bt=0;bt<Ve.length;bt+=1){var Rt=Ve[bt];if(Qe&&Rt.fixed!=="left")Qe=!1;else if(!Qe&&Rt.fixed==="left"){warning(!1,"Index ".concat(bt-1," of `columns` missing `fixed='left'` prop."));break}}for(var Ht=!0,Yt=Ve.length-1;Yt>=0;Yt-=1){var xn=Ve[Yt];if(Ht&&xn.fixed!=="right")Ht=!1;else if(!Ht&&xn.fixed==="right"){warning(!1,"Index ".concat(Yt+1," of `columns` missing `fixed='right'` prop."));break}}}function ji(Ve){return Ve.map(function(Qe){var bt=Qe.fixed,Rt=(0,on.Z)(Qe,lr),Ht=bt;return bt==="left"?Ht="right":bt==="right"&&(Ht="left"),(0,dt.Z)({fixed:Ht},Rt)})}function Xi(Ve,Qe){var bt=Ve.prefixCls,Rt=Ve.columns,Ht=Ve.children,Yt=Ve.expandable,xn=Ve.expandedKeys,Ln=Ve.columnTitle,_n=Ve.getRowKey,Vn=Ve.onTriggerExpand,hr=Ve.expandIcon,Sn=Ve.rowExpandable,Er=Ve.expandIconColumnIndex,Dr=Ve.direction,$r=Ve.expandRowByClick,ei=Ve.columnWidth,Zr=Ve.fixed,Ei=Ve.scrollWidth,fi=ae.useMemo(function(){return Rt||Cr(Ht)},[Rt,Ht]),$i=ae.useMemo(function(){if(Yt){var so,no=fi.slice();if(!no.includes(te)){var ki=Er||0;ki>=0&&no.splice(ki,0,te)}var co=no.indexOf(te);no=no.filter(function(Yo,Ua){return Yo!==te||Ua===co});var Go=fi[co],$a;(Zr==="left"||Zr)&&!Er?$a="left":(Zr==="right"||Zr)&&Er===fi.length?$a="right":$a=Go?Go.fixed:null;var ha=(so={},(0,Ke.Z)(so,fo,{className:"".concat(bt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ke.Z)(so,"title",Ln),(0,Ke.Z)(so,"fixed",$a),(0,Ke.Z)(so,"className","".concat(bt,"-row-expand-icon-cell")),(0,Ke.Z)(so,"width",ei),(0,Ke.Z)(so,"render",function(Ua,Ha,Ms){var Ga=_n(Ha,Ms),js=xn.has(Ga),Ks=Sn?Sn(Ha):!0,ka=hr({prefixCls:bt,expanded:js,expandable:Ks,record:Ha,onExpand:Vn});return $r?ae.createElement("span",{onClick:function(hs){return hs.stopPropagation()}},ka):ka}),so);return no.map(function(Yo){return Yo===te?ha:Yo})}return fi.filter(function(Yo){return Yo!==te})},[Yt,fi,_n,xn,hr,Dr]),mo=ae.useMemo(function(){var so=$i;return Qe&&(so=Qe(so)),so.length||(so=[{render:function(){return null}}]),so},[Qe,$i,Dr]),ao=ae.useMemo(function(){return Dr==="rtl"?ji(vi(mo)):vi(mo)},[mo,Dr,Ei]),po=sn(ao,Ei),Vo=(0,Le.Z)(po,2),wa=Vo[0],eo=Vo[1];return[mo,wa,eo]}var Ci=Xi;function _o(Ve){var Qe,bt=Ve.prefixCls,Rt=Ve.record,Ht=Ve.onExpand,Yt=Ve.expanded,xn=Ve.expandable,Ln="".concat(bt,"-row-expand-icon");if(!xn)return ae.createElement("span",{className:pt()(Ln,"".concat(bt,"-row-spaced"))});var _n=function(hr){Ht(Rt,hr),hr.stopPropagation()};return ae.createElement("span",{className:pt()(Ln,(Qe={},(0,Ke.Z)(Qe,"".concat(bt,"-row-expanded"),Yt),(0,Ke.Z)(Qe,"".concat(bt,"-row-collapsed"),!Yt),Qe)),onClick:_n})}function To(Ve,Qe,bt){var Rt=[];function Ht(Yt){(Yt||[]).forEach(function(xn,Ln){Rt.push(Qe(xn,Ln)),Ht(xn[bt])})}return Ht(Ve),Rt}function Ko(Ve,Qe,bt){var Rt=qi(Ve),Ht=Rt.expandIcon,Yt=Rt.expandedRowKeys,xn=Rt.defaultExpandedRowKeys,Ln=Rt.defaultExpandAllRows,_n=Rt.expandedRowRender,Vn=Rt.onExpand,hr=Rt.onExpandedRowsChange,Sn=Rt.childrenColumnName,Er=Ht||_o,Dr=Sn||"children",$r=ae.useMemo(function(){return _n?"row":Ve.expandable&&Ve.internalHooks===Se&&Ve.expandable.__PARENT_RENDER_ICON__||Qe.some(function(ao){return ao&&(0,Ye.Z)(ao)==="object"&&ao[Dr]})?"nest":!1},[!!_n,Qe]),ei=ae.useState(function(){return xn||(Ln?To(Qe,bt,Dr):[])}),Zr=(0,Le.Z)(ei,2),Ei=Zr[0],fi=Zr[1],$i=ae.useMemo(function(){return new Set(Yt||Ei||[])},[Yt,Ei]),mo=ae.useCallback(function(ao){var po=bt(ao,Qe.indexOf(ao)),Vo,wa=$i.has(po);wa?($i.delete(po),Vo=(0,oo.Z)($i)):Vo=[].concat((0,oo.Z)($i),[po]),fi(Vo),Vn&&Vn(!wa,ao),hr&&hr(Vo)},[bt,$i,Qe,Vn,hr]);return[Rt,$r,$i,Er,Dr,mo]}function Tn(Ve,Qe,bt,Rt){var Ht=Ve.map(function(Yt,xn){return Ct(xn,xn,Ve,Qe,bt,Rt==null?void 0:Rt[xn])});return Kt(function(){return Ht},[Ht],function(Yt,xn){return!Jt(Yt,xn)})}function Bn(Ve){var Qe=(0,ae.useRef)(Ve),bt=(0,ae.useState)({}),Rt=(0,Le.Z)(bt,2),Ht=Rt[1],Yt=(0,ae.useRef)(null),xn=(0,ae.useRef)([]);function Ln(_n){xn.current.push(_n);var Vn=Promise.resolve();Yt.current=Vn,Vn.then(function(){if(Yt.current===Vn){var hr=xn.current,Sn=Qe.current;xn.current=[],hr.forEach(function(Er){Qe.current=Er(Qe.current)}),Yt.current=null,Sn!==Qe.current&&Ht({})}})}return(0,ae.useEffect)(function(){return function(){Yt.current=null}},[]),[Qe.current,Ln]}function Qn(Ve){var Qe=(0,ae.useRef)(Ve||null),bt=(0,ae.useRef)();function Rt(){window.clearTimeout(bt.current)}function Ht(xn){Qe.current=xn,Rt(),bt.current=window.setTimeout(function(){Qe.current=null,bt.current=void 0},100)}function Yt(){return Qe.current}return(0,ae.useEffect)(function(){return Rt},[]),[Ht,Yt]}function He(){var Ve=ae.useState(-1),Qe=(0,Le.Z)(Ve,2),bt=Qe[0],Rt=Qe[1],Ht=ae.useState(-1),Yt=(0,Le.Z)(Ht,2),xn=Yt[0],Ln=Yt[1],_n=ae.useCallback(function(Vn,hr){Rt(Vn),Ln(hr)},[]);return[bt,xn,_n]}var lt=ti()?window:null;function ut(Ve,Qe){var bt=(0,Ye.Z)(Ve)==="object"?Ve:{},Rt=bt.offsetHeader,Ht=Rt===void 0?0:Rt,Yt=bt.offsetSummary,xn=Yt===void 0?0:Yt,Ln=bt.offsetScroll,_n=Ln===void 0?0:Ln,Vn=bt.getContainer,hr=Vn===void 0?function(){return lt}:Vn,Sn=hr()||lt;return ae.useMemo(function(){var Er=!!Ve;return{isSticky:Er,stickyClassName:Er?"".concat(Qe,"-sticky-holder"):"",offsetHeader:Ht,offsetSummary:xn,offsetScroll:_n,container:Sn}},[_n,Ht,xn,Qe,Sn])}function gt(Ve,Qe,bt){var Rt=(0,ae.useMemo)(function(){for(var Ht=[],Yt=[],xn=0,Ln=0,_n=0;_n<Qe;_n+=1)if(bt==="rtl"){Yt[_n]=Ln,Ln+=Ve[_n]||0;var Vn=Qe-_n-1;Ht[Vn]=xn,xn+=Ve[Vn]||0}else{Ht[_n]=xn,xn+=Ve[_n]||0;var hr=Qe-_n-1;Yt[hr]=Ln,Ln+=Ve[hr]||0}return{left:Ht,right:Yt}},[Ve,Qe,bt]);return Rt}var yt=gt;function kt(Ve){var Qe=Ve.className,bt=Ve.children;return ae.createElement("div",{className:Qe},bt)}var At=kt;function tn(Ve,Qe,bt,Rt){var Ht=le.unstable_batchedUpdates?function(xn){le.unstable_batchedUpdates(bt,xn)}:bt;return Ve!=null&&Ve.addEventListener&&Ve.addEventListener(Qe,Ht,Rt),{remove:function(){Ve!=null&&Ve.removeEventListener&&Ve.removeEventListener(Qe,Ht,Rt)}}}var fn=/margin|padding|width|height|max|min|offset/,jn={left:!0,top:!0},qn={cssFloat:1,styleFloat:1,float:1};function Kn(Ve){return Ve.nodeType===1?Ve.ownerDocument.defaultView.getComputedStyle(Ve,null):{}}function An(Ve,Qe,bt){if(Qe=Qe.toLowerCase(),bt==="auto"){if(Qe==="height")return Ve.offsetHeight;if(Qe==="width")return Ve.offsetWidth}return Qe in jn||(jn[Qe]=fn.test(Qe)),jn[Qe]?parseFloat(bt)||0:bt}function Dn(Ve,Qe){var bt=arguments.length,Rt=Kn(Ve);return Qe=qn[Qe]?"cssFloat"in Ve.style?"cssFloat":"styleFloat":Qe,bt===1?Rt:An(Ve,Qe,Rt[Qe]||Ve.style[Qe])}function wn(Ve,Qe,bt){var Rt=arguments.length;if(Qe=qn[Qe]?"cssFloat"in Ve.style?"cssFloat":"styleFloat":Qe,Rt===3)return typeof bt=="number"&&fn.test(Qe)&&(bt="".concat(bt,"px")),Ve.style[Qe]=bt,bt;for(var Ht in Qe)Qe.hasOwnProperty(Ht)&&wn(Ve,Ht,Qe[Ht]);return Kn(Ve)}function Un(Ve){return Ve===document.body?document.documentElement.clientWidth:Ve.offsetWidth}function vr(Ve){return Ve===document.body?window.innerHeight||document.documentElement.clientHeight:Ve.offsetHeight}function er(){var Ve=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),Qe=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ve,height:Qe}}function ir(){var Ve=document.documentElement.clientWidth,Qe=window.innerHeight||document.documentElement.clientHeight;return{width:Ve,height:Qe}}function fr(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function _t(Ve){var Qe=Ve.getBoundingClientRect(),bt=document.documentElement;return{left:Qe.left+(window.pageXOffset||bt.scrollLeft)-(bt.clientLeft||document.body.clientLeft||0),top:Qe.top+(window.pageYOffset||bt.scrollTop)-(bt.clientTop||document.body.clientTop||0)}}var vt=function(Qe,bt){var Rt,Ht,Yt=Qe.scrollBodyRef,xn=Qe.onScroll,Ln=Qe.offsetScroll,_n=Qe.container,Vn=de(be,"prefixCls"),hr=((Rt=Yt.current)===null||Rt===void 0?void 0:Rt.scrollWidth)||0,Sn=((Ht=Yt.current)===null||Ht===void 0?void 0:Ht.clientWidth)||0,Er=hr&&Sn*(Sn/hr),Dr=ae.useRef(),$r=Bn({scrollLeft:0,isHiddenScrollBar:!1}),ei=(0,Le.Z)($r,2),Zr=ei[0],Ei=ei[1],fi=ae.useRef({delta:0,x:0}),$i=ae.useState(!1),mo=(0,Le.Z)($i,2),ao=mo[0],po=mo[1],Vo=function(){po(!1)},wa=function(co){co.persist(),fi.current.delta=co.pageX-Zr.scrollLeft,fi.current.x=0,po(!0),co.preventDefault()},eo=function(co){var Go,$a=co||((Go=window)===null||Go===void 0?void 0:Go.event),ha=$a.buttons;if(!ao||ha===0){ao&&po(!1);return}var Yo=fi.current.x+co.pageX-fi.current.x-fi.current.delta;Yo<=0&&(Yo=0),Yo+Er>=Sn&&(Yo=Sn-Er),xn({scrollLeft:Yo/Sn*(hr+2)}),fi.current.x=co.pageX},so=function(){if(Yt.current){var co=_t(Yt.current).top,Go=co+Yt.current.offsetHeight,$a=_n===window?document.documentElement.scrollTop+window.innerHeight:_t(_n).top+_n.clientHeight;Go-Ae()<=$a||co>=$a-Ln?Ei(function(ha){return(0,dt.Z)((0,dt.Z)({},ha),{},{isHiddenScrollBar:!0})}):Ei(function(ha){return(0,dt.Z)((0,dt.Z)({},ha),{},{isHiddenScrollBar:!1})})}},no=function(co){Ei(function(Go){return(0,dt.Z)((0,dt.Z)({},Go),{},{scrollLeft:co/hr*Sn||0})})};return ae.useImperativeHandle(bt,function(){return{setScrollLeft:no}}),ae.useEffect(function(){var ki=tn(document.body,"mouseup",Vo,!1),co=tn(document.body,"mousemove",eo,!1);return so(),function(){ki.remove(),co.remove()}},[Er,ao]),ae.useEffect(function(){var ki=tn(_n,"scroll",so,!1),co=tn(window,"resize",so,!1);return function(){ki.remove(),co.remove()}},[_n]),ae.useEffect(function(){Zr.isHiddenScrollBar||Ei(function(ki){var co=Yt.current;return co?(0,dt.Z)((0,dt.Z)({},ki),{},{scrollLeft:co.scrollLeft/co.scrollWidth*co.clientWidth}):ki})},[Zr.isHiddenScrollBar]),hr<=Sn||!Er||Zr.isHiddenScrollBar?null:ae.createElement("div",{style:{height:Ae(),width:Sn,bottom:Ln},className:"".concat(Vn,"-sticky-scroll")},ae.createElement("div",{onMouseDown:wa,ref:Dr,className:pt()("".concat(Vn,"-sticky-scroll-bar"),(0,Ke.Z)({},"".concat(Vn,"-sticky-scroll-bar-active"),ao)),style:{width:"".concat(Er,"px"),transform:"translate3d(".concat(Zr.scrollLeft,"px, 0, 0)")}}))},Xe=ae.forwardRef(vt);function ot(Ve){return null}var Nt=ot;function Pt(Ve){return null}var qt=Pt,hn="rc-table",gn=[],Nn={};function On(){return"No Data"}function vn(Ve){var Qe,bt=(0,dt.Z)({rowKey:"key",prefixCls:hn,emptyText:On},Ve),Rt=bt.prefixCls,Ht=bt.className,Yt=bt.rowClassName,xn=bt.style,Ln=bt.data,_n=bt.rowKey,Vn=bt.scroll,hr=bt.tableLayout,Sn=bt.direction,Er=bt.title,Dr=bt.footer,$r=bt.summary,ei=bt.caption,Zr=bt.id,Ei=bt.showHeader,fi=bt.components,$i=bt.emptyText,mo=bt.onRow,ao=bt.onHeaderRow,po=bt.internalHooks,Vo=bt.transformColumns,wa=bt.internalRefs,eo=bt.tailor,so=bt.sticky,no=Ln||gn,ki=!!no.length,co=po===Se,Go=ae.useCallback(function(_s,Zs){return kn(fi,_s)||Zs},[fi]),$a=ae.useMemo(function(){return typeof _n=="function"?_n:function(_s){var Zs=_s&&_s[_n];return Zs}},[_n]),ha=Go(["body"]),Yo=He(),Ua=(0,Le.Z)(Yo,3),Ha=Ua[0],Ms=Ua[1],Ga=Ua[2],js=Ko(bt,no,$a),Ks=(0,Le.Z)(js,6),ka=Ks[0],ml=Ks[1],hs=Ks[2],ks=Ks[3],xs=Ks[4],ga=Ks[5],Vi=Vn==null?void 0:Vn.x,Oo=ae.useState(0),Xo=(0,Le.Z)(Oo,2),lo=Xo[0],ps=Xo[1],Wi=Ci((0,dt.Z)((0,dt.Z)((0,dt.Z)({},bt),ka),{},{expandable:!!ka.expandedRowRender,columnTitle:ka.columnTitle,expandedKeys:hs,getRowKey:$a,onTriggerExpand:ga,expandIcon:ks,expandIconColumnIndex:ka.expandIconColumnIndex,direction:Sn,scrollWidth:co&&eo&&typeof Vi=="number"?Vi:null}),co?Vo:null),xa=(0,Le.Z)(Wi,3),ds=xa[0],ss=xa[1],Yl=xa[2],vl=Yl!=null?Yl:Vi,cc=ae.useMemo(function(){return{columns:ds,flattenColumns:ss}},[ds,ss]),Xr=ae.useRef(),wc=ae.useRef(),sl=ae.useRef(),ec=ae.useRef(),ac=ae.useRef(),fs=ae.useState(!1),ys=(0,Le.Z)(fs,2),Us=ys[0],Pa=ys[1],Ml=ae.useState(!1),Ya=(0,Le.Z)(Ml,2),gl=Ya[0],Dl=Ya[1],Il=Bn(new Map),uc=(0,Le.Z)(Il,2),ll=uc[0],dc=uc[1],cl=zn(ss),Rl=cl.map(function(_s){return ll.get(_s)}),Ol=ae.useMemo(function(){return Rl},[Rl.join("_")]),dl=yt(Ol,ss.length,Sn),Js=Vn&&at(Vn.y),Vs=Vn&&at(vl)||!!ka.fixed,Bc=Vs&&ss.some(function(_s){var Zs=_s.fixed;return Zs}),su=ae.useRef(),Ys=ut(so,Rt),Xl=Ys.isSticky,Yu=Ys.offsetHeader,lu=Ys.offsetSummary,rs=Ys.offsetScroll,$o=Ys.stickyClassName,_l=Ys.container,As=ae.useMemo(function(){return $r==null?void 0:$r(no)},[$r,no]),Nl=(Js||Xl)&&ae.isValidElement(As)&&As.type===bn&&As.props.fixed,wr,fc,Gc;Js&&(fc={overflowY:"scroll",maxHeight:Vn.y}),Vs&&(wr={overflowX:"auto"},Js||(fc={overflowY:"hidden"}),Gc={width:vl===!0?"auto":vl,minWidth:"100%"});var Xu=ae.useCallback(function(_s,Zs){tr(Xr.current)&&dc(function(yc){if(yc.get(_s)!==Zs){var tu=new Map(yc);return tu.set(_s,Zs),tu}return yc})},[]),ud=Qn(null),Yc=(0,Le.Z)(ud,2),Pu=Yc[0],Dd=Yc[1];function Pl(_s,Zs){Zs&&(typeof Zs=="function"?Zs(_s):Zs.scrollLeft!==_s&&(Zs.scrollLeft=_s,Zs.scrollLeft!==_s&&setTimeout(function(){Zs.scrollLeft=_s},0)))}var Dc=pr(function(_s){var Zs=_s.currentTarget,yc=_s.scrollLeft,tu=Sn==="rtl",Cs=typeof yc=="number"?yc:Zs.scrollLeft,pd=Zs||Nn;if(!Dd()||Dd()===pd){var md;Pu(pd),Pl(Cs,wc.current),Pl(Cs,sl.current),Pl(Cs,ac.current),Pl(Cs,(md=su.current)===null||md===void 0?void 0:md.setScrollLeft)}var uu=Zs||wc.current;if(uu){var vd=uu.scrollWidth,_u=uu.clientWidth;if(vd===_u){Pa(!1),Dl(!1);return}tu?(Pa(-Cs<vd-_u),Dl(-Cs>0)):(Pa(Cs>0),Dl(Cs<vd-_u))}}),Bu=function(){Vs&&sl.current?Dc({currentTarget:sl.current}):(Pa(!1),Dl(!1))},qu=function(Zs){var yc=Zs.width;yc!==lo&&(Bu(),ps(Xr.current?Xr.current.offsetWidth:yc))},Id=ae.useRef(!1);ae.useEffect(function(){Id.current&&Bu()},[Vs,Ln,ds.length]),ae.useEffect(function(){Id.current=!0},[]);var Rd=ae.useState(0),Ju=(0,Le.Z)(Rd,2),Fu=Ju[0],xu=Ju[1],sc=ae.useState(!0),Qc=(0,Le.Z)(sc,2),dd=Qc[0],fd=Qc[1];ae.useEffect(function(){(!eo||!co)&&(sl.current instanceof Element?xu(it(sl.current).width):xu(it(ec.current).width)),fd(ge("position","sticky"))},[]),ae.useEffect(function(){co&&wa&&(wa.body.current=sl.current)});var cu=ae.useCallback(function(_s){return ae.createElement(ae.Fragment,null,ae.createElement(Ia,_s),Nl==="top"&&ae.createElement(Zn,_s,As))},[Nl,As]),Od=ae.useCallback(function(_s){return ae.createElement(Zn,_s,As)},[As]),zu=Go(["table"],"table"),Qu=ae.useMemo(function(){return hr||(Bc?vl==="max-content"?"auto":"fixed":Js||Xl||ss.some(function(_s){var Zs=_s.ellipsis;return Zs})?"fixed":"auto")},[Js,Bc,ss,hr,Xl]),hd,ed={colWidths:Ol,columCount:ss.length,stickyOffsets:dl,onHeaderRow:ao,fixHeader:Js,scroll:Vn},Aa=ae.useMemo(function(){return ki?null:typeof $i=="function"?$i():$i},[ki,$i]),Nd=ae.createElement(bi,{data:no,measureColumnWidth:Js||Vs||Xl}),td=ae.createElement(bo,{colWidths:ss.map(function(_s){var Zs=_s.width;return Zs}),columns:ss}),Fc=ei!=null?ae.createElement("caption",{className:"".concat(Rt,"-caption")},ei):void 0,Uc=cr(bt,{data:!0}),eu=cr(bt,{aria:!0});if(Js||Xl){var $u;typeof ha=="function"?($u=ha(no,{scrollbarSize:Fu,ref:sl,onScroll:Dc}),ed.colWidths=ss.map(function(_s,Zs){var yc=_s.width,tu=Zs===ss.length-1?yc-Fu:yc;return typeof tu=="number"&&!Number.isNaN(tu)?tu:0})):$u=ae.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},wr),fc),onScroll:Dc,ref:sl,className:pt()("".concat(Rt,"-body"))},ae.createElement(zu,(0,he.Z)({style:(0,dt.Z)((0,dt.Z)({},Gc),{},{tableLayout:Qu})},eu),Fc,td,Nd,!Nl&&As&&ae.createElement(Zn,{stickyOffsets:dl,flattenColumns:ss,columns:ds},As)));var nd=(0,dt.Z)((0,dt.Z)((0,dt.Z)({noData:!no.length,maxContentScroll:Vs&&vl==="max-content"},ed),cc),{},{direction:Sn,stickyClassName:$o,onScroll:Dc});hd=ae.createElement(ae.Fragment,null,Ei!==!1&&ae.createElement(ea,(0,he.Z)({},nd,{stickyTopOffset:Yu,className:"".concat(Rt,"-header"),ref:wc}),cu),$u,Nl&&Nl!=="top"&&ae.createElement(ea,(0,he.Z)({},nd,{stickyBottomOffset:lu,className:"".concat(Rt,"-summary"),ref:ac}),Od),Xl&&ae.createElement(Xe,{ref:su,offsetScroll:rs,scrollBodyRef:sl,onScroll:Dc,container:_l}))}else hd=ae.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},wr),fc),className:pt()("".concat(Rt,"-content")),onScroll:Dc,ref:sl},ae.createElement(zu,(0,he.Z)({style:(0,dt.Z)((0,dt.Z)({},Gc),{},{tableLayout:Qu})},eu),Fc,td,Ei!==!1&&ae.createElement(Ia,(0,he.Z)({},ed,cc)),Nd,As&&ae.createElement(Zn,{stickyOffsets:dl,flattenColumns:ss,columns:ds},As)));var Hu=ae.createElement("div",(0,he.Z)({className:pt()(Rt,Ht,(Qe={},(0,Ke.Z)(Qe,"".concat(Rt,"-rtl"),Sn==="rtl"),(0,Ke.Z)(Qe,"".concat(Rt,"-ping-left"),Us),(0,Ke.Z)(Qe,"".concat(Rt,"-ping-right"),gl),(0,Ke.Z)(Qe,"".concat(Rt,"-layout-fixed"),hr==="fixed"),(0,Ke.Z)(Qe,"".concat(Rt,"-fixed-header"),Js),(0,Ke.Z)(Qe,"".concat(Rt,"-fixed-column"),Bc),(0,Ke.Z)(Qe,"".concat(Rt,"-scroll-horizontal"),Vs),(0,Ke.Z)(Qe,"".concat(Rt,"-has-fix-left"),ss[0]&&ss[0].fixed),(0,Ke.Z)(Qe,"".concat(Rt,"-has-fix-right"),ss[ss.length-1]&&ss[ss.length-1].fixed==="right"),Qe)),style:xn,id:Zr,ref:Xr},Uc),Er&&ae.createElement(At,{className:"".concat(Rt,"-title")},Er(no)),ae.createElement("div",{ref:ec,className:"".concat(Rt,"-container")},hd),Dr&&ae.createElement(At,{className:"".concat(Rt,"-footer")},Dr(no)));Vs&&(Hu=ae.createElement(Mr.Z,{onResize:qu},Hu));var vu=Tn(ss,dl,Sn,ds),Pd=ae.useMemo(function(){return{scrollX:vl,prefixCls:Rt,getComponent:Go,scrollbarSize:Fu,direction:Sn,fixedInfoList:vu,isSticky:Xl,supportSticky:dd,componentWidth:lo,fixHeader:Js,fixColumn:Bc,horizonScroll:Vs,tableLayout:Qu,rowClassName:Yt,expandedRowClassName:ka.expandedRowClassName,expandIcon:ks,expandableType:ml,expandRowByClick:ka.expandRowByClick,expandedRowRender:ka.expandedRowRender,onTriggerExpand:ga,expandIconColumnIndex:ka.expandIconColumnIndex,indentSize:ka.indentSize,allColumnsFixedLeft:ss.every(function(_s){return _s.fixed==="left"}),emptyNode:Aa,columns:ds,flattenColumns:ss,onColumnResize:Xu,hoverStartRow:Ha,hoverEndRow:Ms,onHover:Ga,rowExpandable:ka.rowExpandable,onRow:mo,getRowKey:$a,expandedKeys:hs,childrenColumnName:xs}},[vl,Rt,Go,Fu,Sn,vu,Xl,dd,lo,Js,Bc,Vs,Qu,Yt,ka.expandedRowClassName,ks,ml,ka.expandRowByClick,ka.expandedRowRender,ga,ka.expandIconColumnIndex,ka.indentSize,Aa,ds,ss,Xu,Ha,Ms,Ga,ka.rowExpandable,mo,$a,hs,xs]);return ae.createElement(be.Provider,{value:Pd},Hu)}function Fn(Ve){return $e(vn,Ve)}var Gn=Fn();Gn.EXPAND_COLUMN=te,Gn.INTERNAL_HOOKS=Se,Gn.Column=Nt,Gn.ColumnGroup=qt,Gn.Summary=Yn;var xr=Gn,sr=ee(73299),Lr=re(null),Ur=re(null);function Pr(Ve,Qe,bt){var Rt=Qe||1;return bt[Ve+Rt]-(bt[Ve]||0)}function Qr(Ve){var Qe=Ve.rowInfo,bt=Ve.column,Rt=Ve.colIndex,Ht=Ve.indent,Yt=Ve.index,xn=Ve.renderIndex,Ln=Ve.record,_n=Ve.style,Vn=Ve.className,hr=Ve.inverse,Sn=Ve.getHeight,Er=bt.render,Dr=bt.dataIndex,$r=bt.className,ei=bt.width,Zr=de(Ur,["columnsOffset"]),Ei=Zr.columnsOffset,fi=Vr(Qe,bt,Rt,Ht,Yt),$i=fi.key,mo=fi.fixedInfo,ao=fi.appendCellNode,po=fi.additionalCellProps,Vo=po.style,wa=po.colSpan,eo=wa===void 0?1:wa,so=po.rowSpan,no=so===void 0?1:so,ki=Rt-1,co=Pr(ki,eo,Ei),Go=eo>1?ei-co:0,$a=(0,dt.Z)((0,dt.Z)((0,dt.Z)({},Vo),_n),{},{flex:"0 0 ".concat(co,"px"),width:"".concat(co,"px"),marginRight:Go,pointerEvents:"auto"}),ha=ae.useMemo(function(){return hr?no<=1:eo===0||no===0||no>1},[no,eo,hr]);ha?$a.visibility="hidden":hr&&($a.height=Sn==null?void 0:Sn(no));var Yo=ha?function(){return null}:Er,Ua={};return(no===0||eo===0)&&(Ua.rowSpan=1,Ua.colSpan=1),ae.createElement(It,(0,he.Z)({className:pt()($r,Vn),ellipsis:bt.ellipsis,align:bt.align,scope:bt.rowScope,component:"div",prefixCls:Qe.prefixCls,key:$i,record:Ln,index:Yt,renderIndex:xn,dataIndex:Dr,render:Yo,shouldCellUpdate:bt.shouldCellUpdate},mo,{appendNode:ao,additionalProps:(0,dt.Z)((0,dt.Z)({},po),{},{style:$a},Ua)}))}var Tr=Qr,Wr=["data","index","className","rowKey","style","extra","getHeight"],ni=ae.forwardRef(function(Ve,Qe){var bt=Ve.data,Rt=Ve.index,Ht=Ve.className,Yt=Ve.rowKey,xn=Ve.style,Ln=Ve.extra,_n=Ve.getHeight,Vn=(0,on.Z)(Ve,Wr),hr=bt.record,Sn=bt.indent,Er=bt.index,Dr=de(be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),$r=Dr.scrollX,ei=Dr.flattenColumns,Zr=Dr.prefixCls,Ei=Dr.fixColumn,fi=Dr.componentWidth,$i=$n(hr,Yt,Rt,Sn),mo=$i.rowSupportExpand,ao=$i.expanded,po=$i.rowProps,Vo=$i.expandedRowRender,wa=$i.expandedRowClassName,eo;if(mo&&ao){var so=Vo(hr,Rt,Sn+1,ao),no=wa==null?void 0:wa(hr,Rt,Sn),ki={};Ei&&(ki={style:(0,Ke.Z)({},"--virtual-width","".concat(fi,"px"))});var co="".concat(Zr,"-expanded-row-cell");eo=ae.createElement("div",{className:pt()("".concat(Zr,"-expanded-row"),"".concat(Zr,"-expanded-row-level-").concat(Sn+1),no)},ae.createElement(It,{component:"div",prefixCls:Zr,className:pt()(co,(0,Ke.Z)({},"".concat(co,"-fixed"),Ei)),additionalProps:ki},so))}var Go=(0,dt.Z)((0,dt.Z)({},xn),{},{width:$r});Ln&&(Go.position="absolute",Go.pointerEvents="none");var $a=ae.createElement("div",(0,he.Z)({},po,Vn,{ref:mo?null:Qe,className:pt()(Ht,"".concat(Zr,"-row"),po==null?void 0:po.className,(0,Ke.Z)({},"".concat(Zr,"-row-extra"),Ln)),style:(0,dt.Z)((0,dt.Z)({},Go),po==null?void 0:po.style)}),ei.map(function(ha,Yo){return ae.createElement(Tr,{key:Yo,rowInfo:$i,column:ha,colIndex:Yo,indent:Sn,index:Rt,renderIndex:Er,record:hr,inverse:Ln,getHeight:_n})}));return mo?ae.createElement("div",{ref:Qe},$a,eo):$a}),Si=Te(ni),Nr=Si,wi=ae.forwardRef(function(Ve,Qe){var bt=Ve.data,Rt=Ve.onScroll,Ht=de(be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Yt=Ht.flattenColumns,xn=Ht.onColumnResize,Ln=Ht.getRowKey,_n=Ht.expandedKeys,Vn=Ht.prefixCls,hr=Ht.childrenColumnName,Sn=Ht.emptyNode,Er=Ht.scrollX,Dr=de(Lr),$r=Dr.scrollY,ei=Dr.listItemHeight,Zr=ae.useRef(),Ei=br(bt,hr,_n,Ln),fi=ae.useMemo(function(){var eo=0;return Yt.map(function(so){var no=so.width,ki=so.key;return eo+=no,[ki,no,eo]})},[Yt]),$i=ae.useMemo(function(){return fi.map(function(eo){return eo[2]})},[fi]);ae.useEffect(function(){fi.forEach(function(eo){var so=(0,Le.Z)(eo,2),no=so[0],ki=so[1];xn(no,ki)})},[fi]),ae.useImperativeHandle(Qe,function(){var eo={};return Object.defineProperty(eo,"scrollLeft",{get:function(){var no;return((no=Zr.current)===null||no===void 0?void 0:no.getScrollInfo().x)||0},set:function(no){var ki;(ki=Zr.current)===null||ki===void 0||ki.scrollTo({left:no})}}),eo});var mo=function(so,no){var ki,co=(ki=Ei[no])===null||ki===void 0?void 0:ki.record,Go=so.onCell;if(Go){var $a,ha=Go(co,no);return($a=ha==null?void 0:ha.rowSpan)!==null&&$a!==void 0?$a:1}return 1},ao=function(so){var no=so.start,ki=so.end,co=so.getSize,Go=so.offsetY;if(ki<0)return null;for(var $a=Yt.filter(function(Vi){return mo(Vi,no)===0}),ha=no,Yo=function(Oo){if($a=$a.filter(function(Xo){return mo(Xo,Oo)===0}),!$a.length)return ha=Oo,"break"},Ua=no;Ua>=0;Ua-=1){var Ha=Yo(Ua);if(Ha==="break")break}for(var Ms=Yt.filter(function(Vi){return mo(Vi,ki)!==1}),Ga=ki,js=function(Oo){if(Ms=Ms.filter(function(Xo){return mo(Xo,Oo)!==1}),!Ms.length)return Ga=Math.max(Oo-1,ki),"break"},Ks=ki;Ks<Ei.length;Ks+=1){var ka=js(Ks);if(ka==="break")break}for(var ml=[],hs=function(Oo){var Xo=Ei[Oo];if(!Xo)return"continue";Yt.some(function(lo){return mo(lo,Oo)>1})&&ml.push(Oo)},ks=ha;ks<=Ga;ks+=1)var xs=hs(ks);var ga=ml.map(function(Vi){var Oo=Ei[Vi],Xo=Ln(Oo.record,Vi),lo=function(xa){var ds=Vi+xa-1,ss=Ln(Ei[ds].record,ds),Yl=co(Xo,ss);return Yl.bottom-Yl.top},ps=co(Xo);return ae.createElement(Nr,{key:Vi,data:Oo,rowKey:Xo,index:Vi,style:{top:-Go+ps.top},extra:!0,getHeight:lo})});return ga},po=ae.useMemo(function(){return{columnsOffset:$i}},[$i]),Vo="".concat(Vn,"-tbody"),wa;return Ei.length?wa=ae.createElement(sr.Z,{fullHeight:!1,ref:Zr,className:pt()(Vo,"".concat(Vo,"-virtual")),height:$r,itemHeight:ei||24,data:Ei,itemKey:function(so){return Ln(so.record)},scrollWidth:Er,onVirtualScroll:function(so){var no=so.x;Rt({scrollLeft:no})},extraRender:ao},function(eo,so,no){var ki=Ln(eo.record,so);return ae.createElement(Nr,(0,he.Z)({data:eo,rowKey:ki,index:so},no))}):wa=ae.createElement("div",{className:pt()("".concat(Vn,"-placeholder"))},ae.createElement(It,{component:"div",prefixCls:Vn},Sn)),ae.createElement(Ur.Provider,{value:po},wa)}),gi=Te(wi),vo=gi,Ji=function(Qe,bt){var Rt=bt.ref,Ht=bt.onScroll;return ae.createElement(vo,{ref:Rt,data:Qe,onScroll:Ht})},Pi=100;function Mi(Ve){var Qe=Ve.columns,bt=Ve.scroll,Rt=Ve.prefixCls,Ht=Rt===void 0?hn:Rt,Yt=Ve.className,xn=Ve.listItemHeight,Ln=bt||{},_n=Ln.x,Vn=Ln.y;typeof _n!="number"&&(_n=((Qe||[]).length+1)*Pi),typeof Vn!="number"&&(Vn=500);var hr=ae.useMemo(function(){return{scrollY:Vn,listItemHeight:xn}},[Vn,xn]);return ae.createElement(Lr.Provider,{value:hr},ae.createElement(xr,(0,he.Z)({},Ve,{className:pt()(Yt,"".concat(Ht,"-virtual")),scroll:(0,dt.Z)((0,dt.Z)({},bt),{},{x:_n}),components:{body:Ji},columns:Qe,internalHooks:Se,tailor:!0})))}function Ai(Ve){return $e(Mi,Ve)}var pi=Ai(),zi=null;function ai(Ve){return null}var ii=ai;function Ui(Ve){return null}var to=Ui,la=ee(10366),da=ee(58375),So=ee(53124),go=ee(88258),Zi=ee(98675),Ii=ee(25378),pa=ee(24457),io=ee(28452),si=ee(57953),Ki=ee(46605);function Io(Ve){return function(bt){let{prefixCls:Rt,onExpand:Ht,record:Yt,expanded:xn,expandable:Ln}=bt;const _n=`${Rt}-row-expand-icon`;return ae.createElement("button",{type:"button",onClick:Vn=>{Ht(Yt,Vn),Vn.stopPropagation()},className:pt()(_n,{[`${_n}-spaced`]:!Ln,[`${_n}-expanded`]:Ln&&xn,[`${_n}-collapsed`]:Ln&&!xn}),"aria-label":xn?Ve.collapse:Ve.expand,"aria-expanded":xn})}}var Ro=Io;function qo(Ve,Qe){return"key"in Ve&&Ve.key!==void 0&&Ve.key!==null?Ve.key:Ve.dataIndex?Array.isArray(Ve.dataIndex)?Ve.dataIndex.join("."):Ve.dataIndex:Qe}function Qi(Ve,Qe){return Qe?`${Qe}-${Ve}`:`${Ve}`}function ma(Ve,Qe){return typeof Ve=="function"?Ve(Qe):Ve}function va(Ve,Qe){const bt=ma(Ve,Qe);return Object.prototype.toString.call(bt)==="[object Object]"?"":bt}var ia={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"},ca=ia,Ea=ee(74643),Ja=function(Qe,bt){return ae.createElement(Ea.Z,(0,he.Z)({},Qe,{ref:bt,icon:ca}))},Ma=ae.forwardRef(Ja),Za=ee(7699),vs=ee(57838);function Es(Ve){const Qe=ae.useRef(Ve),bt=(0,vs.Z)();return[()=>Qe.current,Rt=>{Qe.current=Rt,bt()}]}var Ls=ee(71577),Qa=ee(84567),La=ee(85418),ho=ee(32983),Po=ee(68508),_a=ee(76529),Da=ee(78045),gs=ee(79870),Rs=ee(72395),Ws=ee(69677);function hl(Ve){let{value:Qe,onChange:bt,filterSearch:Rt,tablePrefixCls:Ht,locale:Yt}=Ve;return Rt?ae.createElement("div",{className:`${Ht}-filter-dropdown-search`},ae.createElement(Ws.default,{prefix:ae.createElement(Rs.Z,null),placeholder:Yt.filterSearchPlaceholder,onChange:bt,value:Qe,htmlSize:1,className:`${Ht}-filter-dropdown-search-input`})):null}var ul=hl,Ts=ee(92389);const es=Ve=>{const{keyCode:Qe}=Ve;Qe===Ts.Z.ENTER&&Ve.stopPropagation()};var Co=ae.forwardRef((Ve,Qe)=>ae.createElement("div",{className:Ve.className,onClick:bt=>bt.stopPropagation(),onKeyDown:es,ref:Qe},Ve.children));function Qo(Ve){let Qe=[];return(Ve||[]).forEach(bt=>{let{value:Rt,children:Ht}=bt;Qe.push(Rt),Ht&&(Qe=[].concat((0,oo.Z)(Qe),(0,oo.Z)(Qo(Ht))))}),Qe}function Ca(Ve){return Ve.some(Qe=>{let{children:bt}=Qe;return bt})}function is(Ve,Qe){return typeof Qe=="string"||typeof Qe=="number"?Qe==null?void 0:Qe.toString().toLowerCase().includes(Ve.trim().toLowerCase()):!1}function bs(Ve){let{filters:Qe,prefixCls:bt,filteredKeys:Rt,filterMultiple:Ht,searchValue:Yt,filterSearch:xn}=Ve;return Qe.map((Ln,_n)=>{const Vn=String(Ln.value);if(Ln.children)return{key:Vn||_n,label:Ln.text,popupClassName:`${bt}-dropdown-submenu`,children:bs({filters:Ln.children,prefixCls:bt,filteredKeys:Rt,filterMultiple:Ht,searchValue:Yt,filterSearch:xn})};const hr=Ht?Qa.default:Da.ZP,Sn={key:Ln.value!==void 0?Vn:_n,label:ae.createElement(ae.Fragment,null,ae.createElement(hr,{checked:Rt.includes(Vn)}),ae.createElement("span",null,Ln.text))};return Yt.trim()?typeof xn=="function"?xn(Yt,Ln)?Sn:null:is(Yt,Ln.text)?Sn:null:Sn})}function bl(Ve){var Qe,bt;const{tablePrefixCls:Rt,prefixCls:Ht,column:Yt,dropdownPrefixCls:xn,columnKey:Ln,filterMultiple:_n,filterMode:Vn="menu",filterSearch:hr=!1,filterState:Sn,triggerFilter:Er,locale:Dr,children:$r,getPopupContainer:ei}=Ve,{filterDropdownOpen:Zr,onFilterDropdownOpenChange:Ei,filterResetToDefaultFilteredValue:fi,defaultFilteredValue:$i,filterDropdownVisible:mo,onFilterDropdownVisibleChange:ao}=Yt,[po,Vo]=ae.useState(!1),wa=!!(Sn&&(!((Qe=Sn.filteredKeys)===null||Qe===void 0)&&Qe.length||Sn.forceFiltered)),eo=Wi=>{Vo(Wi),Ei==null||Ei(Wi),ao==null||ao(Wi)},so=(bt=Zr!=null?Zr:mo)!==null&&bt!==void 0?bt:po,no=Sn==null?void 0:Sn.filteredKeys,[ki,co]=Es(no||[]),Go=Wi=>{let{selectedKeys:xa}=Wi;co(xa)},$a=(Wi,xa)=>{let{node:ds,checked:ss}=xa;Go(_n?{selectedKeys:Wi}:{selectedKeys:ss&&ds.key?[ds.key]:[]})};ae.useEffect(()=>{po&&Go({selectedKeys:no||[]})},[no]);const[ha,Yo]=ae.useState([]),Ua=Wi=>{Yo(Wi)},[Ha,Ms]=ae.useState(""),Ga=Wi=>{const{value:xa}=Wi.target;Ms(xa)};ae.useEffect(()=>{po||Ms("")},[po]);const js=Wi=>{const xa=Wi&&Wi.length?Wi:null;if(xa===null&&(!Sn||!Sn.filteredKeys)||(0,Za.Z)(xa,Sn==null?void 0:Sn.filteredKeys,!0))return null;Er({column:Yt,key:Ln,filteredKeys:xa})},Ks=()=>{eo(!1),js(ki())},ka=function(){let{confirm:Wi,closeDropdown:xa}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Wi&&js([]),xa&&eo(!1),Ms(""),co(fi?($i||[]).map(ds=>String(ds)):[])},ml=function(){let{closeDropdown:Wi}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Wi&&eo(!1),js(ki())},hs=Wi=>{Wi&&no!==void 0&&co(no||[]),eo(Wi),!Wi&&!Yt.filterDropdown&&Ks()},ks=pt()({[`${xn}-menu-without-submenu`]:!Ca(Yt.filters||[])}),xs=Wi=>{if(Wi.target.checked){const xa=Qo(Yt==null?void 0:Yt.filters).map(ds=>String(ds));co(xa)}else co([])},ga=Wi=>{let{filters:xa}=Wi;return(xa||[]).map((ds,ss)=>{const Yl=String(ds.value),vl={title:ds.text,key:ds.value!==void 0?Yl:ss};return ds.children&&(vl.children=ga({filters:ds.children})),vl})},Vi=Wi=>{var xa;return Object.assign(Object.assign({},Wi),{text:Wi.title,value:Wi.key,children:((xa=Wi.children)===null||xa===void 0?void 0:xa.map(ds=>Vi(ds)))||[]})};let Oo;if(typeof Yt.filterDropdown=="function")Oo=Yt.filterDropdown({prefixCls:`${xn}-custom`,setSelectedKeys:Wi=>Go({selectedKeys:Wi}),selectedKeys:ki(),confirm:ml,clearFilters:ka,filters:Yt.filters,visible:so,close:()=>{eo(!1)}});else if(Yt.filterDropdown)Oo=Yt.filterDropdown;else{const Wi=ki()||[],xa=()=>(Yt.filters||[]).length===0?ae.createElement(ho.Z,{image:ho.Z.PRESENTED_IMAGE_SIMPLE,description:Dr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Vn==="tree"?ae.createElement(ae.Fragment,null,ae.createElement(ul,{filterSearch:hr,value:Ha,onChange:Ga,tablePrefixCls:Rt,locale:Dr}),ae.createElement("div",{className:`${Rt}-filter-dropdown-tree`},_n?ae.createElement(Qa.default,{checked:Wi.length===Qo(Yt.filters).length,indeterminate:Wi.length>0&&Wi.length<Qo(Yt.filters).length,className:`${Rt}-filter-dropdown-checkall`,onChange:xs},Dr.filterCheckall):null,ae.createElement(gs.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:_n,checkStrictly:!_n,className:`${xn}-menu`,onCheck:$a,checkedKeys:Wi,selectedKeys:Wi,showIcon:!1,treeData:ga({filters:Yt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ha.trim()?ss=>typeof hr=="function"?hr(Ha,Vi(ss)):is(Ha,ss.title):void 0}))):ae.createElement(ae.Fragment,null,ae.createElement(ul,{filterSearch:hr,value:Ha,onChange:Ga,tablePrefixCls:Rt,locale:Dr}),ae.createElement(Po.default,{selectable:!0,multiple:_n,prefixCls:`${xn}-menu`,className:ks,onSelect:Go,onDeselect:Go,selectedKeys:Wi,getPopupContainer:ei,openKeys:ha,onOpenChange:Ua,items:bs({filters:Yt.filters||[],filterSearch:hr,prefixCls:Ht,filteredKeys:ki(),filterMultiple:_n,searchValue:Ha})})),ds=()=>fi?(0,Za.Z)(($i||[]).map(ss=>String(ss)),Wi,!0):Wi.length===0;Oo=ae.createElement(ae.Fragment,null,xa(),ae.createElement("div",{className:`${Ht}-dropdown-btns`},ae.createElement(Ls.ZP,{type:"link",size:"small",disabled:ds(),onClick:()=>ka()},Dr.filterReset),ae.createElement(Ls.ZP,{type:"primary",size:"small",onClick:Ks},Dr.filterConfirm)))}Yt.filterDropdown&&(Oo=ae.createElement(_a.J,{selectable:void 0},Oo));const Xo=()=>ae.createElement(Co,{className:`${Ht}-dropdown`},Oo);let lo;typeof Yt.filterIcon=="function"?lo=Yt.filterIcon(wa):Yt.filterIcon?lo=Yt.filterIcon:lo=ae.createElement(Ma,null);const{direction:ps}=ae.useContext(So.E_);return ae.createElement("div",{className:`${Ht}-column`},ae.createElement("span",{className:`${Rt}-column-title`},$r),ae.createElement(La.Z,{dropdownRender:Xo,trigger:["click"],open:so,onOpenChange:hs,getPopupContainer:ei,placement:ps==="rtl"?"bottomLeft":"bottomRight"},ae.createElement("span",{role:"button",tabIndex:-1,className:pt()(`${Ht}-trigger`,{active:wa}),onClick:Wi=>{Wi.stopPropagation()}},lo)))}var rl=bl;function $l(Ve,Qe,bt){let Rt=[];return(Ve||[]).forEach((Ht,Yt)=>{var xn;const Ln=Qi(Yt,bt);if(Ht.filters||"filterDropdown"in Ht||"onFilter"in Ht)if("filteredValue"in Ht){let _n=Ht.filteredValue;"filterDropdown"in Ht||(_n=(xn=_n==null?void 0:_n.map(String))!==null&&xn!==void 0?xn:_n),Rt.push({column:Ht,key:qo(Ht,Ln),filteredKeys:_n,forceFiltered:Ht.filtered})}else Rt.push({column:Ht,key:qo(Ht,Ln),filteredKeys:Qe&&Ht.defaultFilteredValue?Ht.defaultFilteredValue:void 0,forceFiltered:Ht.filtered});"children"in Ht&&(Rt=[].concat((0,oo.Z)(Rt),(0,oo.Z)($l(Ht.children,Qe,Ln))))}),Rt}function ya(Ve,Qe,bt,Rt,Ht,Yt,xn,Ln){return bt.map((_n,Vn)=>{const hr=Qi(Vn,Ln),{filterMultiple:Sn=!0,filterMode:Er,filterSearch:Dr}=_n;let $r=_n;if($r.filters||$r.filterDropdown){const ei=qo($r,hr),Zr=Rt.find(Ei=>{let{key:fi}=Ei;return ei===fi});$r=Object.assign(Object.assign({},$r),{title:Ei=>ae.createElement(rl,{tablePrefixCls:Ve,prefixCls:`${Ve}-filter`,dropdownPrefixCls:Qe,column:$r,columnKey:ei,filterState:Zr,filterMultiple:Sn,filterMode:Er,filterSearch:Dr,triggerFilter:Yt,locale:Ht,getPopupContainer:xn},ma(_n.title,Ei))})}return"children"in $r&&($r=Object.assign(Object.assign({},$r),{children:ya(Ve,Qe,$r.children,Rt,Ht,Yt,xn,hr)})),$r})}function yi(Ve){const Qe={};return Ve.forEach(bt=>{let{key:Rt,filteredKeys:Ht,column:Yt}=bt;const{filters:xn,filterDropdown:Ln}=Yt;if(Ln)Qe[Rt]=Ht||null;else if(Array.isArray(Ht)){const _n=Qo(xn);Qe[Rt]=_n.filter(Vn=>Ht.includes(String(Vn)))}else Qe[Rt]=null}),Qe}function Mo(Ve,Qe){return Qe.reduce((bt,Rt)=>{const{column:{onFilter:Ht,filters:Yt},filteredKeys:xn}=Rt;return Ht&&xn&&xn.length?bt.filter(Ln=>xn.some(_n=>{const Vn=Qo(Yt),hr=Vn.findIndex(Er=>String(Er)===String(_n)),Sn=hr!==-1?Vn[hr]:_n;return Ht(Sn,Ln)})):bt},Ve)}const Do=Ve=>Ve.flatMap(Qe=>"children"in Qe?[Qe].concat((0,oo.Z)(Do(Qe.children||[]))):[Qe]);function Uo(Ve){let{prefixCls:Qe,dropdownPrefixCls:bt,mergedColumns:Rt,onFilterChange:Ht,getPopupContainer:Yt,locale:xn}=Ve;const Ln=ae.useMemo(()=>Do(Rt||[]),[Rt]),[_n,Vn]=ae.useState(()=>$l(Ln,!0)),hr=ae.useMemo(()=>{const $r=$l(Ln,!1);if($r.length===0)return $r;let ei=!0,Zr=!0;if($r.forEach(Ei=>{let{filteredKeys:fi}=Ei;fi!==void 0?ei=!1:Zr=!1}),ei){const Ei=(Ln||[]).map((fi,$i)=>qo(fi,Qi($i)));return _n.filter(fi=>{let{key:$i}=fi;return Ei.includes($i)}).map(fi=>{const $i=Ln[Ei.findIndex(mo=>mo===fi.key)];return Object.assign(Object.assign({},fi),{column:Object.assign(Object.assign({},fi.column),$i),forceFiltered:$i.filtered})})}return $r},[Ln,_n]),Sn=ae.useMemo(()=>yi(hr),[hr]),Er=$r=>{const ei=hr.filter(Zr=>{let{key:Ei}=Zr;return Ei!==$r.key});ei.push($r),Vn(ei),Ht(yi(ei),ei)};return[$r=>ya(Qe,bt,$r,hr,xn,Er,Yt),hr,Sn]}var Ss=Uo;function ls(Ve,Qe,bt){const Rt=ae.useRef({});function Ht(Yt){if(!Rt.current||Rt.current.data!==Ve||Rt.current.childrenColumnName!==Qe||Rt.current.getRowKey!==bt){let Ln=function(_n){_n.forEach((Vn,hr)=>{const Sn=bt(Vn,hr);xn.set(Sn,Vn),Vn&&typeof Vn=="object"&&Qe in Vn&&Ln(Vn[Qe]||[])})};const xn=new Map;Ln(Ve),Rt.current={data:Ve,childrenColumnName:Qe,kvMap:xn,getRowKey:bt}}return Rt.current.kvMap.get(Yt)}return[Ht]}var Sl=ee(38780),pl=function(Ve,Qe){var bt={};for(var Rt in Ve)Object.prototype.hasOwnProperty.call(Ve,Rt)&&Qe.indexOf(Rt)<0&&(bt[Rt]=Ve[Rt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ht=0,Rt=Object.getOwnPropertySymbols(Ve);Ht<Rt.length;Ht++)Qe.indexOf(Rt[Ht])<0&&Object.prototype.propertyIsEnumerable.call(Ve,Rt[Ht])&&(bt[Rt[Ht]]=Ve[Rt[Ht]]);return bt};const rc=10;function Xa(Ve,Qe){const bt={current:Ve.current,pageSize:Ve.pageSize};return Object.keys(Qe&&typeof Qe=="object"?Qe:{}).forEach(Ht=>{const Yt=Ve[Ht];typeof Yt!="function"&&(bt[Ht]=Yt)}),bt}function wl(Ve,Qe,bt){const Rt=bt&&typeof bt=="object"?bt:{},{total:Ht=0}=Rt,Yt=pl(Rt,["total"]),[xn,Ln]=(0,ae.useState)(()=>({current:"defaultCurrent"in Yt?Yt.defaultCurrent:1,pageSize:"defaultPageSize"in Yt?Yt.defaultPageSize:rc})),_n=(0,Sl.Z)(xn,Yt,{total:Ht>0?Ht:Ve}),Vn=Math.ceil((Ht||Ve)/_n.pageSize);_n.current>Vn&&(_n.current=Vn||1);const hr=(Er,Dr)=>{Ln({current:Er!=null?Er:1,pageSize:Dr||_n.pageSize})},Sn=(Er,Dr)=>{var $r;bt&&(($r=bt.onChange)===null||$r===void 0||$r.call(bt,Er,Dr)),hr(Er,Dr),Qe(Er,Dr||(_n==null?void 0:_n.pageSize))};return bt===!1?[{},()=>{}]:[Object.assign(Object.assign({},_n),{onChange:Sn}),hr]}var ic=wl,Vc=ee(42922),xc=ee(29873),Ql=ee(97153),Al=ee(83898),Ec=ee(5663);const Hl={},Fo="SELECT_ALL",Bs="SELECT_INVERT",ts="SELECT_NONE",Os=[],$s=(Ve,Qe)=>{let bt=[];return(Qe||[]).forEach(Rt=>{bt.push(Rt),Rt&&typeof Rt=="object"&&Ve in Rt&&(bt=[].concat((0,oo.Z)(bt),(0,oo.Z)($s(Ve,Rt[Ve]))))}),bt};var El=(Ve,Qe)=>{const{preserveSelectedRowKeys:bt,selectedRowKeys:Rt,defaultSelectedRowKeys:Ht,getCheckboxProps:Yt,onChange:xn,onSelect:Ln,onSelectAll:_n,onSelectInvert:Vn,onSelectNone:hr,onSelectMultiple:Sn,columnWidth:Er,type:Dr,selections:$r,fixed:ei,renderCell:Zr,hideSelectAll:Ei,checkStrictly:fi=!0}=Qe||{},{prefixCls:$i,data:mo,pageData:ao,getRecordByKey:po,getRowKey:Vo,expandType:wa,childrenColumnName:eo,locale:so,getPopupContainer:no}=Ve,[ki,co]=(0,Ec.Z)(Rt||Ht||Os,{value:Rt}),Go=ae.useRef(new Map),$a=(0,ae.useCallback)(Vi=>{if(bt){const Oo=new Map;Vi.forEach(Xo=>{let lo=po(Xo);!lo&&Go.current.has(Xo)&&(lo=Go.current.get(Xo)),Oo.set(Xo,lo)}),Go.current=Oo}},[po,bt]);ae.useEffect(()=>{$a(ki)},[ki]);const{keyEntities:ha}=(0,ae.useMemo)(()=>{if(fi)return{keyEntities:null};let Vi=mo;if(bt){const Oo=new Set(mo.map((lo,ps)=>Vo(lo,ps))),Xo=Array.from(Go.current).reduce((lo,ps)=>{let[Wi,xa]=ps;return Oo.has(Wi)?lo:lo.concat(xa)},[]);Vi=[].concat((0,oo.Z)(Vi),(0,oo.Z)(Xo))}return(0,Al.I8)(Vi,{externalGetKey:Vo,childrenPropName:eo})},[mo,Vo,fi,eo,bt]),Yo=(0,ae.useMemo)(()=>$s(eo,ao),[eo,ao]),Ua=(0,ae.useMemo)(()=>{const Vi=new Map;return Yo.forEach((Oo,Xo)=>{const lo=Vo(Oo,Xo),ps=(Yt?Yt(Oo):null)||{};Vi.set(lo,ps)}),Vi},[Yo,Vo,Yt]),Ha=(0,ae.useCallback)(Vi=>{var Oo;return!!(!((Oo=Ua.get(Vo(Vi)))===null||Oo===void 0)&&Oo.disabled)},[Ua,Vo]),[Ms,Ga]=(0,ae.useMemo)(()=>{if(fi)return[ki||[],[]];const{checkedKeys:Vi,halfCheckedKeys:Oo}=(0,Ql.S)(ki,!0,ha,Ha);return[Vi||[],Oo]},[ki,fi,ha,Ha]),js=(0,ae.useMemo)(()=>{const Vi=Dr==="radio"?Ms.slice(0,1):Ms;return new Set(Vi)},[Ms,Dr]),Ks=(0,ae.useMemo)(()=>Dr==="radio"?new Set:new Set(Ga),[Ga,Dr]),[ka,ml]=(0,ae.useState)(null);ae.useEffect(()=>{Qe||co(Os)},[!!Qe]);const hs=(0,ae.useCallback)((Vi,Oo)=>{let Xo,lo;$a(Vi),bt?(Xo=Vi,lo=Vi.map(ps=>Go.current.get(ps))):(Xo=[],lo=[],Vi.forEach(ps=>{const Wi=po(ps);Wi!==void 0&&(Xo.push(ps),lo.push(Wi))})),co(Xo),xn==null||xn(Xo,lo,{type:Oo})},[co,po,xn,bt]),ks=(0,ae.useCallback)((Vi,Oo,Xo,lo)=>{if(Ln){const ps=Xo.map(Wi=>po(Wi));Ln(po(Vi),Oo,ps,lo)}hs(Xo,"single")},[Ln,po,hs]),xs=(0,ae.useMemo)(()=>!$r||Ei?null:($r===!0?[Fo,Bs,ts]:$r).map(Oo=>Oo===Fo?{key:"all",text:so.selectionAll,onSelect(){hs(mo.map((Xo,lo)=>Vo(Xo,lo)).filter(Xo=>{const lo=Ua.get(Xo);return!(lo!=null&&lo.disabled)||js.has(Xo)}),"all")}}:Oo===Bs?{key:"invert",text:so.selectInvert,onSelect(){const Xo=new Set(js);ao.forEach((ps,Wi)=>{const xa=Vo(ps,Wi),ds=Ua.get(xa);ds!=null&&ds.disabled||(Xo.has(xa)?Xo.delete(xa):Xo.add(xa))});const lo=Array.from(Xo);Vn&&Vn(lo),hs(lo,"invert")}}:Oo===ts?{key:"none",text:so.selectNone,onSelect(){hr==null||hr(),hs(Array.from(js).filter(Xo=>{const lo=Ua.get(Xo);return lo==null?void 0:lo.disabled}),"none")}}:Oo).map(Oo=>Object.assign(Object.assign({},Oo),{onSelect:function(){for(var Xo,lo,ps=arguments.length,Wi=new Array(ps),xa=0;xa<ps;xa++)Wi[xa]=arguments[xa];(lo=Oo.onSelect)===null||lo===void 0||(Xo=lo).call.apply(Xo,[Oo].concat(Wi)),ml(null)}})),[$r,js,ao,Vo,Vn,hs]);return[(0,ae.useCallback)(Vi=>{var Oo;if(!Qe)return Vi.filter(fs=>fs!==Hl);let Xo=(0,oo.Z)(Vi);const lo=new Set(js),ps=Yo.map(Vo).filter(fs=>!Ua.get(fs).disabled),Wi=ps.every(fs=>lo.has(fs)),xa=ps.some(fs=>lo.has(fs)),ds=()=>{const fs=[];Wi?ps.forEach(Us=>{lo.delete(Us),fs.push(Us)}):ps.forEach(Us=>{lo.has(Us)||(lo.add(Us),fs.push(Us))});const ys=Array.from(lo);_n==null||_n(!Wi,ys.map(Us=>po(Us)),fs.map(Us=>po(Us))),hs(ys,"all"),ml(null)};let ss;if(Dr!=="radio"){let fs;if(xs){const Ya={getPopupContainer:no,items:xs.map((gl,Dl)=>{const{key:Il,text:uc,onSelect:ll}=gl;return{key:Il!=null?Il:Dl,onClick:()=>{ll==null||ll(ps)},label:uc}})};fs=ae.createElement("div",{className:`${$i}-selection-extra`},ae.createElement(La.Z,{menu:Ya,getPopupContainer:no},ae.createElement("span",null,ae.createElement(Vc.Z,null))))}const ys=Yo.map((Ya,gl)=>{const Dl=Vo(Ya,gl),Il=Ua.get(Dl)||{};return Object.assign({checked:lo.has(Dl)},Il)}).filter(Ya=>{let{disabled:gl}=Ya;return gl}),Us=!!ys.length&&ys.length===Yo.length,Pa=Us&&ys.every(Ya=>{let{checked:gl}=Ya;return gl}),Ml=Us&&ys.some(Ya=>{let{checked:gl}=Ya;return gl});ss=!Ei&&ae.createElement("div",{className:`${$i}-selection`},ae.createElement(Qa.default,{checked:Us?Pa:!!Yo.length&&Wi,indeterminate:Us?!Pa&&Ml:!Wi&&xa,onChange:ds,disabled:Yo.length===0||Us,"aria-label":fs?"Custom selection":"Select all",skipGroup:!0}),fs)}let Yl;Dr==="radio"?Yl=(fs,ys,Us)=>{const Pa=Vo(ys,Us),Ml=lo.has(Pa);return{node:ae.createElement(Da.ZP,Object.assign({},Ua.get(Pa),{checked:Ml,onClick:Ya=>Ya.stopPropagation(),onChange:Ya=>{lo.has(Pa)||ks(Pa,!0,[Pa],Ya.nativeEvent)}})),checked:Ml}}:Yl=(fs,ys,Us)=>{var Pa;const Ml=Vo(ys,Us),Ya=lo.has(Ml),gl=Ks.has(Ml),Dl=Ua.get(Ml);let Il;return wa==="nest"?Il=gl:Il=(Pa=Dl==null?void 0:Dl.indeterminate)!==null&&Pa!==void 0?Pa:gl,{node:ae.createElement(Qa.default,Object.assign({},Dl,{indeterminate:Il,checked:Ya,skipGroup:!0,onClick:uc=>uc.stopPropagation(),onChange:uc=>{let{nativeEvent:ll}=uc;const{shiftKey:dc}=ll;let cl=-1,Rl=-1;if(dc&&fi){const Ol=new Set([ka,Ml]);ps.some((dl,Js)=>{if(Ol.has(dl))if(cl===-1)cl=Js;else return Rl=Js,!0;return!1})}if(Rl!==-1&&cl!==Rl&&fi){const Ol=ps.slice(cl,Rl+1),dl=[];Ya?Ol.forEach(Vs=>{lo.has(Vs)&&(dl.push(Vs),lo.delete(Vs))}):Ol.forEach(Vs=>{lo.has(Vs)||(dl.push(Vs),lo.add(Vs))});const Js=Array.from(lo);Sn==null||Sn(!Ya,Js.map(Vs=>po(Vs)),dl.map(Vs=>po(Vs))),hs(Js,"multiple")}else{const Ol=Ms;if(fi){const dl=Ya?(0,xc._5)(Ol,Ml):(0,xc.L0)(Ol,Ml);ks(Ml,!Ya,dl,ll)}else{const dl=(0,Ql.S)([].concat((0,oo.Z)(Ol),[Ml]),!0,ha,Ha),{checkedKeys:Js,halfCheckedKeys:Vs}=dl;let Bc=Js;if(Ya){const su=new Set(Js);su.delete(Ml),Bc=(0,Ql.S)(Array.from(su),{checked:!1,halfCheckedKeys:Vs},ha,Ha).checkedKeys}ks(Ml,!Ya,Bc,ll)}}ml(Ya?null:Ml)}})),checked:Ya}};const vl=(fs,ys,Us)=>{const{node:Pa,checked:Ml}=Yl(fs,ys,Us);return Zr?Zr(Ml,ys,Us,Pa):Pa};if(!Xo.includes(Hl))if(Xo.findIndex(fs=>{var ys;return((ys=fs[fo])===null||ys===void 0?void 0:ys.columnType)==="EXPAND_COLUMN"})===0){const[fs,...ys]=Xo;Xo=[fs,Hl].concat((0,oo.Z)(ys))}else Xo=[Hl].concat((0,oo.Z)(Xo));const cc=Xo.indexOf(Hl);Xo=Xo.filter((fs,ys)=>fs!==Hl||ys===cc);const Xr=Xo[cc-1],wc=Xo[cc+1];let sl=ei;sl===void 0&&((wc==null?void 0:wc.fixed)!==void 0?sl=wc.fixed:(Xr==null?void 0:Xr.fixed)!==void 0&&(sl=Xr.fixed)),sl&&Xr&&((Oo=Xr[fo])===null||Oo===void 0?void 0:Oo.columnType)==="EXPAND_COLUMN"&&Xr.fixed===void 0&&(Xr.fixed=sl);const ec=pt()(`${$i}-selection-col`,{[`${$i}-selection-col-with-dropdown`]:$r&&Dr==="checkbox"}),ac={fixed:sl,width:Er,className:`${$i}-selection-column`,title:Qe.columnTitle||ss,render:vl,onCell:Qe.onCell,[fo]:{className:ec}};return Xo.map(fs=>fs===Hl?ac:fs)},[Vo,Yo,Qe,Ms,js,Ks,Er,xs,wa,ka,Ua,Sn,ks,Ha]),js]},ol=ee(33463),ns=ee(28575),qs=ee(83062);const Hc="ascend",Tl="descend";function au(Ve){return typeof Ve.sorter=="object"&&typeof Ve.sorter.multiple=="number"?Ve.sorter.multiple:!1}function Mc(Ve){return typeof Ve=="function"?Ve:Ve&&typeof Ve=="object"&&Ve.compare?Ve.compare:!1}function Lc(Ve,Qe){return Qe?Ve[Ve.indexOf(Qe)+1]:Ve[0]}function Nc(Ve,Qe,bt){let Rt=[];function Ht(Yt,xn){Rt.push({column:Yt,key:qo(Yt,xn),multiplePriority:au(Yt),sortOrder:Yt.sortOrder})}return(Ve||[]).forEach((Yt,xn)=>{const Ln=Qi(xn,bt);Yt.children?("sortOrder"in Yt&&Ht(Yt,Ln),Rt=[].concat((0,oo.Z)(Rt),(0,oo.Z)(Nc(Yt.children,Qe,Ln)))):Yt.sorter&&("sortOrder"in Yt?Ht(Yt,Ln):Qe&&Yt.defaultSortOrder&&Rt.push({column:Yt,key:qo(Yt,Ln),multiplePriority:au(Yt),sortOrder:Yt.defaultSortOrder}))}),Rt}function Jc(Ve,Qe,bt,Rt,Ht,Yt,xn,Ln){return(Qe||[]).map((_n,Vn)=>{const hr=Qi(Vn,Ln);let Sn=_n;if(Sn.sorter){const Er=Sn.sortDirections||Ht,Dr=Sn.showSorterTooltip===void 0?xn:Sn.showSorterTooltip,$r=qo(Sn,hr),ei=bt.find(wa=>{let{key:eo}=wa;return eo===$r}),Zr=ei?ei.sortOrder:null,Ei=Lc(Er,Zr);let fi;if(_n.sortIcon)fi=_n.sortIcon({sortOrder:Zr});else{const wa=Er.includes(Hc)&&ae.createElement(ns.Z,{className:pt()(`${Ve}-column-sorter-up`,{active:Zr===Hc})}),eo=Er.includes(Tl)&&ae.createElement(ol.Z,{className:pt()(`${Ve}-column-sorter-down`,{active:Zr===Tl})});fi=ae.createElement("span",{className:pt()(`${Ve}-column-sorter`,{[`${Ve}-column-sorter-full`]:!!(wa&&eo)})},ae.createElement("span",{className:`${Ve}-column-sorter-inner`,"aria-hidden":"true"},wa,eo))}const{cancelSort:$i,triggerAsc:mo,triggerDesc:ao}=Yt||{};let po=$i;Ei===Tl?po=ao:Ei===Hc&&(po=mo);const Vo=typeof Dr=="object"?Dr:{title:po};Sn=Object.assign(Object.assign({},Sn),{className:pt()(Sn.className,{[`${Ve}-column-sort`]:Zr}),title:wa=>{const eo=ae.createElement("div",{className:`${Ve}-column-sorters`},ae.createElement("span",{className:`${Ve}-column-title`},ma(_n.title,wa)),fi);return Dr?ae.createElement(qs.Z,Object.assign({},Vo),eo):eo},onHeaderCell:wa=>{const eo=_n.onHeaderCell&&_n.onHeaderCell(wa)||{},so=eo.onClick,no=eo.onKeyDown;eo.onClick=Go=>{Rt({column:_n,key:$r,sortOrder:Ei,multiplePriority:au(_n)}),so==null||so(Go)},eo.onKeyDown=Go=>{Go.keyCode===Ts.Z.ENTER&&(Rt({column:_n,key:$r,sortOrder:Ei,multiplePriority:au(_n)}),no==null||no(Go))};const ki=va(_n.title,{}),co=ki==null?void 0:ki.toString();return Zr?eo["aria-sort"]=Zr==="ascend"?"ascending":"descending":eo["aria-label"]=co||"",eo.className=pt()(eo.className,`${Ve}-column-has-sorters`),eo.tabIndex=0,_n.ellipsis&&(eo.title=(ki!=null?ki:"").toString()),eo}})}return"children"in Sn&&(Sn=Object.assign(Object.assign({},Sn),{children:Jc(Ve,Sn.children,bt,Rt,Ht,Yt,xn,hr)})),Sn})}function os(Ve){const{column:Qe,sortOrder:bt}=Ve;return{column:Qe,order:bt,field:Qe.dataIndex,columnKey:Qe.key}}function Ka(Ve){const Qe=Ve.filter(bt=>{let{sortOrder:Rt}=bt;return Rt}).map(os);return Qe.length===0&&Ve.length?Object.assign(Object.assign({},os(Ve[Ve.length-1])),{column:void 0}):Qe.length<=1?Qe[0]||{}:Qe}function xl(Ve,Qe,bt){const Rt=Qe.slice().sort((xn,Ln)=>Ln.multiplePriority-xn.multiplePriority),Ht=Ve.slice(),Yt=Rt.filter(xn=>{let{column:{sorter:Ln},sortOrder:_n}=xn;return Mc(Ln)&&_n});return Yt.length?Ht.sort((xn,Ln)=>{for(let _n=0;_n<Yt.length;_n+=1){const Vn=Yt[_n],{column:{sorter:hr},sortOrder:Sn}=Vn,Er=Mc(hr);if(Er&&Sn){const Dr=Er(xn,Ln,Sn);if(Dr!==0)return Sn===Hc?Dr:-Dr}}return 0}).map(xn=>{const Ln=xn[bt];return Ln?Object.assign(Object.assign({},xn),{[bt]:xl(Ln,Qe,bt)}):xn}):Ht}function Vl(Ve){let{prefixCls:Qe,mergedColumns:bt,onSorterChange:Rt,sortDirections:Ht,tableLocale:Yt,showSorterTooltip:xn}=Ve;const[Ln,_n]=ae.useState(Nc(bt,!0)),Vn=ae.useMemo(()=>{let $r=!0;const ei=Nc(bt,!1);if(!ei.length)return Ln;const Zr=[];function Ei($i){$r?Zr.push($i):Zr.push(Object.assign(Object.assign({},$i),{sortOrder:null}))}let fi=null;return ei.forEach($i=>{fi===null?(Ei($i),$i.sortOrder&&($i.multiplePriority===!1?$r=!1:fi=!0)):(fi&&$i.multiplePriority!==!1||($r=!1),Ei($i))}),Zr},[bt,Ln]),hr=ae.useMemo(()=>{const $r=Vn.map(ei=>{let{column:Zr,sortOrder:Ei}=ei;return{column:Zr,order:Ei}});return{sortColumns:$r,sortColumn:$r[0]&&$r[0].column,sortOrder:$r[0]&&$r[0].order}},[Vn]);function Sn($r){let ei;$r.multiplePriority===!1||!Vn.length||Vn[0].multiplePriority===!1?ei=[$r]:ei=[].concat((0,oo.Z)(Vn.filter(Zr=>{let{key:Ei}=Zr;return Ei!==$r.key})),[$r]),_n(ei),Rt(Ka(ei),ei)}return[$r=>Jc(Qe,$r,Vn,Sn,Ht,Yt,xn),Vn,hr,()=>Ka(Vn)]}function mt(Ve,Qe){return Ve.map(bt=>{const Rt=Object.assign({},bt);return Rt.title=ma(bt.title,Qe),"children"in Rt&&(Rt.children=mt(Rt.children,Qe)),Rt})}function Bt(Ve){return[ae.useCallback(bt=>mt(bt,Ve),[Ve])]}var Wt=Fn((Ve,Qe)=>{const{_renderTimes:bt}=Ve,{_renderTimes:Rt}=Qe;return bt!==Rt}),di=Ai((Ve,Qe)=>{const{_renderTimes:bt}=Ve,{_renderTimes:Rt}=Qe;return bt!==Rt}),jr=ee(84780),Rr=ee(14747),Kr=ee(67968),kr=ee(45503),Li=Ve=>{const{componentCls:Qe}=Ve,bt=`${Ve.lineWidth}px ${Ve.lineType} ${Ve.tableBorderColor}`,Rt=(Ht,Yt,xn)=>({[`&${Qe}-${Ht}`]:{[`> ${Qe}-container`]:{[`> ${Qe}-content, > ${Qe}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Qe}-expanded-row-fixed`]:{margin:`-${Yt}px -${xn+Ve.lineWidth}px`}}}}}});return{[`${Qe}-wrapper`]:{[`${Qe}${Qe}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Qe}-title`]:{border:bt,borderBottom:0},[`> ${Qe}-container`]:{borderInlineStart:bt,borderTop:bt,[`
|
|
|
> ${Qe}-content,
|
|
|
> ${Qe}-header,
|
|
|
> ${Qe}-body,
|
|
|
> ${Qe}-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:bt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:bt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Qe}-cell-fix-right-first::after`]:{borderInlineEnd:bt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Qe}-expanded-row-fixed`]:{margin:`-${Ve.tablePaddingVertical}px -${Ve.tablePaddingHorizontal+Ve.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Ve.lineWidth,bottom:0,borderInlineEnd:bt,content:'""'}}}}}},[`&${Qe}-scroll-horizontal`]:{[`> ${Qe}-container > ${Qe}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Qe}-expanded-row,
|
|
|
> tr${Qe}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Rt("middle",Ve.tablePaddingVerticalMiddle,Ve.tablePaddingHorizontalMiddle)),Rt("small",Ve.tablePaddingVerticalSmall,Ve.tablePaddingHorizontalSmall)),{[`> ${Qe}-footer`]:{border:bt,borderTop:0}}),[`${Qe}-cell`]:{[`${Qe}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Ve.lineWidth}px 0 ${Ve.lineWidth}px ${Ve.tableHeaderBg}`}},[`${Qe}-bordered ${Qe}-cell-scrollbar`]:{borderInlineEnd:bt}}}},zo=Ve=>{const{componentCls:Qe}=Ve;return{[`${Qe}-wrapper`]:{[`${Qe}-cell-ellipsis`]:Object.assign(Object.assign({},Rr.vS),{wordBreak:"keep-all",[`
|
|
|
&${Qe}-cell-fix-left-last,
|
|
|
&${Qe}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Qe}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Qe}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Lo=Ve=>{const{componentCls:Qe}=Ve;return{[`${Qe}-wrapper`]:{[`${Qe}-tbody > tr${Qe}-placeholder`]:{textAlign:"center",color:Ve.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Ve.colorBgContainer}}}}},Ra=ee(49867),Ns=Ve=>{const{componentCls:Qe,antCls:bt,controlInteractiveSize:Rt,motionDurationSlow:Ht,lineWidth:Yt,paddingXS:xn,lineType:Ln,tableBorderColor:_n,tableExpandIconBg:Vn,tableExpandColumnWidth:hr,borderRadius:Sn,fontSize:Er,fontSizeSM:Dr,lineHeight:$r,tablePaddingVertical:ei,tablePaddingHorizontal:Zr,tableExpandedRowBg:Ei,paddingXXS:fi}=Ve,$i=Rt/2-Yt,mo=$i*2+Yt*3,ao=`${Yt}px ${Ln} ${_n}`,po=fi-Yt;return{[`${Qe}-wrapper`]:{[`${Qe}-expand-icon-col`]:{width:hr},[`${Qe}-row-expand-icon-cell`]:{textAlign:"center",[`${Qe}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Qe}-row-indent`]:{height:1,float:"left"},[`${Qe}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ra.N)(Ve)),{position:"relative",float:"left",boxSizing:"border-box",width:mo,height:mo,padding:0,color:"inherit",lineHeight:`${mo}px`,background:Vn,border:ao,borderRadius:Sn,transform:`scale(${Rt/mo})`,transition:`all ${Ht}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Ht} ease-out`,content:'""'},"&::before":{top:$i,insetInlineEnd:po,insetInlineStart:po,height:Yt},"&::after":{top:po,bottom:po,insetInlineStart:$i,width:Yt,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"}}),[`${Qe}-row-indent + ${Qe}-row-expand-icon`]:{marginTop:(Er*$r-Yt*3)/2-Math.ceil((Dr*1.4-Yt*3)/2),marginInlineEnd:xn},[`tr${Qe}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Ei}},[`${bt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Qe}-expanded-row-fixed`]:{position:"relative",margin:`-${ei}px -${Zr}px`,padding:`${ei}px ${Zr}px`}}}},qa=Ve=>{const{componentCls:Qe,antCls:bt,iconCls:Rt,tableFilterDropdownWidth:Ht,tableFilterDropdownSearchWidth:Yt,paddingXXS:xn,paddingXS:Ln,colorText:_n,lineWidth:Vn,lineType:hr,tableBorderColor:Sn,tableHeaderIconColor:Er,fontSizeSM:Dr,tablePaddingHorizontal:$r,borderRadius:ei,motionDurationSlow:Zr,colorTextDescription:Ei,colorPrimary:fi,tableHeaderFilterActiveBg:$i,colorTextDisabled:mo,tableFilterDropdownBg:ao,tableFilterDropdownHeight:po,controlItemBgHover:Vo,controlItemBgActive:wa,boxShadowSecondary:eo,filterDropdownMenuBg:so}=Ve,no=`${bt}-dropdown`,ki=`${Qe}-filter-dropdown`,co=`${bt}-tree`,Go=`${Vn}px ${hr} ${Sn}`;return[{[`${Qe}-wrapper`]:{[`${Qe}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Qe}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-xn,marginInline:`${xn}px ${-$r/2}px`,padding:`0 ${xn}px`,color:Er,fontSize:Dr,borderRadius:ei,cursor:"pointer",transition:`all ${Zr}`,"&:hover":{color:Ei,background:$i},"&.active":{color:fi}}}},{[`${bt}-dropdown`]:{[ki]:Object.assign(Object.assign({},(0,Rr.Wf)(Ve)),{minWidth:Ht,backgroundColor:ao,borderRadius:ei,boxShadow:eo,overflow:"hidden",[`${no}-menu`]:{maxHeight:po,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:so,"&:empty::after":{display:"block",padding:`${Ln}px 0`,color:mo,fontSize:Dr,textAlign:"center",content:'"Not Found"'}},[`${ki}-tree`]:{paddingBlock:`${Ln}px 0`,paddingInline:Ln,[co]:{padding:0},[`${co}-treenode ${co}-node-content-wrapper:hover`]:{backgroundColor:Vo},[`${co}-treenode-checkbox-checked ${co}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:wa}}},[`${ki}-search`]:{padding:Ln,borderBottom:Go,"&-input":{input:{minWidth:Yt},[Rt]:{color:mo}}},[`${ki}-checkall`]:{width:"100%",marginBottom:xn,marginInlineStart:xn},[`${ki}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Ln-Vn}px ${Ln}px`,overflow:"hidden",borderTop:Go}})}},{[`${bt}-dropdown ${ki}, ${ki}-submenu`]:{[`${bt}-checkbox-wrapper + span`]:{paddingInlineStart:Ln,color:_n},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ba=Ve=>{const{componentCls:Qe,lineWidth:bt,colorSplit:Rt,motionDurationSlow:Ht,zIndexTableFixed:Yt,tableBg:xn,zIndexTableSticky:Ln}=Ve,_n=Rt;return{[`${Qe}-wrapper`]:{[`
|
|
|
${Qe}-cell-fix-left,
|
|
|
${Qe}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Yt,background:xn},[`
|
|
|
${Qe}-cell-fix-left-first::after,
|
|
|
${Qe}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-bt,width:30,transform:"translateX(100%)",transition:`box-shadow ${Ht}`,content:'""',pointerEvents:"none"},[`${Qe}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Qe}-cell-fix-right-first::after,
|
|
|
${Qe}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-bt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Ht}`,content:'""',pointerEvents:"none"},[`${Qe}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Ln+1,width:30,transition:`box-shadow ${Ht}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Qe}-ping-left`]:{[`&:not(${Qe}-has-fix-left) ${Qe}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${_n}`}},[`
|
|
|
${Qe}-cell-fix-left-first::after,
|
|
|
${Qe}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${_n}`},[`${Qe}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Qe}-ping-right`]:{[`&:not(${Qe}-has-fix-right) ${Qe}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${_n}`}},[`
|
|
|
${Qe}-cell-fix-right-first::after,
|
|
|
${Qe}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${_n}`}}}}},Ri=Ve=>{const{componentCls:Qe,antCls:bt}=Ve;return{[`${Qe}-wrapper`]:{[`${Qe}-pagination${bt}-pagination`]:{margin:`${Ve.margin}px 0`},[`${Qe}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Ve.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},za=Ve=>{const{componentCls:Qe,tableRadius:bt}=Ve;return{[`${Qe}-wrapper`]:{[Qe]:{[`${Qe}-title, ${Qe}-header`]:{borderRadius:`${bt}px ${bt}px 0 0`},[`${Qe}-title + ${Qe}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Qe}-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:bt,borderStartEndRadius:bt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:bt},"> *:last-child":{borderStartEndRadius:bt}}},"&-footer":{borderRadius:`0 0 ${bt}px ${bt}px`}}}}},Gl=Ve=>{const{componentCls:Qe}=Ve;return{[`${Qe}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Qe}-pagination-left`]:{justifyContent:"flex-end"},[`${Qe}-pagination-right`]:{justifyContent:"flex-start"},[`${Qe}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Qe}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Qe}-row-indent`]:{float:"right"}}}}},oa=Ve=>{const{componentCls:Qe,antCls:bt,iconCls:Rt,fontSizeIcon:Ht,padding:Yt,paddingXS:xn,tableHeaderIconColor:Ln,tableHeaderIconColorHover:_n,tableSelectionColumnWidth:Vn}=Ve;return{[`${Qe}-wrapper`]:{[`${Qe}-selection-col`]:{width:Vn,[`&${Qe}-selection-col-with-dropdown`]:{width:Vn+Ht+Yt/4}},[`${Qe}-bordered ${Qe}-selection-col`]:{width:Vn+xn*2,[`&${Qe}-selection-col-with-dropdown`]:{width:Vn+Ht+Yt/4+xn*2}},[`
|
|
|
table tr th${Qe}-selection-column,
|
|
|
table tr td${Qe}-selection-column
|
|
|
`]:{paddingInlineEnd:Ve.paddingXS,paddingInlineStart:Ve.paddingXS,textAlign:"center",[`${bt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Qe}-selection-column${Qe}-cell-fix-left`]:{zIndex:Ve.zIndexTableFixed+1},[`table tr th${Qe}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Qe}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Qe}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Ve.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Ve.tablePaddingHorizontal/4}px`,[Rt]:{color:Ln,fontSize:Ht,verticalAlign:"baseline","&:hover":{color:_n}}}}}},uo=Ve=>{const{componentCls:Qe}=Ve,bt=(Rt,Ht,Yt,xn)=>({[`${Qe}${Qe}-${Rt}`]:{fontSize:xn,[`
|
|
|
${Qe}-title,
|
|
|
${Qe}-footer,
|
|
|
${Qe}-cell,
|
|
|
${Qe}-thead > tr > th,
|
|
|
${Qe}-tbody > tr > th,
|
|
|
${Qe}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Ht}px ${Yt}px`},[`${Qe}-filter-trigger`]:{marginInlineEnd:`-${Yt/2}px`},[`${Qe}-expanded-row-fixed`]:{margin:`-${Ht}px -${Yt}px`},[`${Qe}-tbody`]:{[`${Qe}-wrapper:only-child ${Qe}`]:{marginBlock:`-${Ht}px`,marginInline:`${Ve.tableExpandColumnWidth-Yt}px -${Yt}px`}},[`${Qe}-selection-column`]:{paddingInlineStart:`${Yt/4}px`}}});return{[`${Qe}-wrapper`]:Object.assign(Object.assign({},bt("middle",Ve.tablePaddingVerticalMiddle,Ve.tablePaddingHorizontalMiddle,Ve.tableFontSizeMiddle)),bt("small",Ve.tablePaddingVerticalSmall,Ve.tablePaddingHorizontalSmall,Ve.tableFontSizeSmall))}},cs=Ve=>{const{componentCls:Qe,marginXXS:bt,fontSizeIcon:Rt,tableHeaderIconColor:Ht,tableHeaderIconColorHover:Yt}=Ve;return{[`${Qe}-wrapper`]:{[`${Qe}-thead th${Qe}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Ve.motionDurationSlow}`,"&:hover":{background:Ve.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Ve.colorPrimary},[`
|
|
|
&${Qe}-cell-fix-left:hover,
|
|
|
&${Qe}-cell-fix-right:hover
|
|
|
`]:{background:Ve.tableFixedHeaderSortActiveBg}},[`${Qe}-thead th${Qe}-column-sort`]:{background:Ve.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Qe}-column-sort`]:{background:Ve.tableBodySortBg},[`${Qe}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Qe}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Qe}-column-sorter`]:{marginInlineStart:bt,color:Ht,fontSize:0,transition:`color ${Ve.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Rt,"&.active":{color:Ve.colorPrimary}},[`${Qe}-column-sorter-up + ${Qe}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Qe}-column-sorters:hover ${Qe}-column-sorter`]:{color:Yt}}}},kc=Ve=>{const{componentCls:Qe,opacityLoading:bt,tableScrollThumbBg:Rt,tableScrollThumbBgHover:Ht,tableScrollThumbSize:Yt,tableScrollBg:xn,zIndexTableSticky:Ln,stickyScrollBarBorderRadius:_n}=Ve,Vn=`${Ve.lineWidth}px ${Ve.lineType} ${Ve.tableBorderColor}`;return{[`${Qe}-wrapper`]:{[`${Qe}-sticky`]:{"&-holder":{position:"sticky",zIndex:Ln,background:Ve.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Yt}px !important`,zIndex:Ln,display:"flex",alignItems:"center",background:xn,borderTop:Vn,opacity:bt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Yt,backgroundColor:Rt,borderRadius:_n,transition:`all ${Ve.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Ht}}}}}}},Ac=Ve=>{const{componentCls:Qe,lineWidth:bt,tableBorderColor:Rt}=Ve,Ht=`${bt}px ${Ve.lineType} ${Rt}`;return{[`${Qe}-wrapper`]:{[`${Qe}-summary`]:{position:"relative",zIndex:Ve.zIndexTableFixed,background:Ve.tableBg,"> tr":{"> th, > td":{borderBottom:Ht}}},[`div${Qe}-summary`]:{boxShadow:`0 -${bt}px 0 ${Rt}`}}}},_c=Ve=>{const{componentCls:Qe}=Ve,bt=`${Ve.lineWidth}px ${Ve.lineType} ${Ve.tableBorderColor}`,Rt=`${Qe}-expanded-row-cell`;return{[`${Qe}-wrapper`]:{[`${Qe}-tbody-virtual`]:{[`${Qe}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Qe}-cell`]:{borderBottom:bt},[`${Qe}-expanded-row`]:{[`${Rt}${Rt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Ve.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Qe}-bordered`]:{[`${Qe}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:bt,position:"absolute"},[`${Qe}-cell`]:{borderInlineEnd:bt,[`&${Qe}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Ve.lineWidth,borderInlineStart:bt}}}}}}};const Kc=Ve=>{const{componentCls:Qe,fontWeightStrong:bt,tablePaddingVertical:Rt,tablePaddingHorizontal:Ht,lineWidth:Yt,lineType:xn,tableBorderColor:Ln,tableFontSize:_n,tableBg:Vn,tableRadius:hr,tableHeaderTextColor:Sn,motionDurationMid:Er,tableHeaderBg:Dr,tableHeaderCellSplitColor:$r,tableRowHoverBg:ei,tableSelectedRowBg:Zr,tableSelectedRowHoverBg:Ei,tableFooterTextColor:fi,tableFooterBg:$i,paddingContentVerticalLG:mo}=Ve,ao=`${Yt}px ${xn} ${Ln}`;return{[`${Qe}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Rr.dF)()),{[Qe]:Object.assign(Object.assign({},(0,Rr.Wf)(Ve)),{fontSize:_n,background:Vn,borderRadius:`${hr}px ${hr}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${hr}px ${hr}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Qe}-cell,
|
|
|
${Qe}-thead > tr > th,
|
|
|
${Qe}-tbody > tr > th,
|
|
|
${Qe}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${mo}px ${Ht}px`,overflowWrap:"break-word"},[`${Qe}-title`]:{padding:`${Rt}px ${Ht}px`},[`${Qe}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Sn,fontWeight:bt,textAlign:"start",background:Dr,borderBottom:ao,transition:`background ${Er} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Qe}-selection-column):not(${Qe}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:$r,transform:"translateY(-50%)",transition:`background-color ${Er}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Qe}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${Er}, border-color ${Er}`,borderBottom:ao,[`
|
|
|
> ${Qe}-wrapper:only-child,
|
|
|
> ${Qe}-expanded-row-fixed > ${Qe}-wrapper:only-child
|
|
|
`]:{[Qe]:{marginBlock:`-${Rt}px`,marginInline:`${Ve.tableExpandColumnWidth-Ht}px -${Ht}px`,[`${Qe}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Sn,fontWeight:bt,textAlign:"start",background:Dr,borderBottom:ao,transition:`background ${Er} ease`},[`
|
|
|
&${Qe}-row:hover > th,
|
|
|
&${Qe}-row:hover > td,
|
|
|
> th${Qe}-cell-row-hover,
|
|
|
> td${Qe}-cell-row-hover
|
|
|
`]:{background:ei},[`&${Qe}-row-selected`]:{"> th, > td":{background:Zr},"&:hover > th, &:hover > td":{background:Ei}}}},[`${Qe}-footer`]:{padding:`${Rt}px ${Ht}px`,color:fi,background:$i}})}};var Bo=(0,Kr.Z)("Table",Ve=>{const{colorTextHeading:Qe,colorSplit:bt,colorIcon:Rt,colorIconHover:Ht,opacityLoading:Yt,colorBgContainer:xn,controlInteractiveSize:Ln,headerBg:_n,headerColor:Vn,headerSortActiveBg:hr,headerSortHoverBg:Sn,bodySortBg:Er,rowHoverBg:Dr,rowSelectedBg:$r,rowSelectedHoverBg:ei,rowExpandedBg:Zr,cellPaddingBlock:Ei,cellPaddingInline:fi,cellPaddingBlockMD:$i,cellPaddingInlineMD:mo,cellPaddingBlockSM:ao,cellPaddingInlineSM:po,borderColor:Vo,footerBg:wa,footerColor:eo,headerBorderRadius:so,cellFontSize:no,cellFontSizeMD:ki,cellFontSizeSM:co,headerSplitColor:Go,fixedHeaderSortActiveBg:$a,headerFilterHoverBg:ha,filterDropdownBg:Yo,expandIconBg:Ua,selectionColumnWidth:Ha,stickyScrollBarBg:Ms}=Ve,Ga=new jr.C(Rt),js=new jr.C(Ht),Ks=2,ka=(0,kr.TS)(Ve,{tableFontSize:no,tableBg:xn,tableRadius:so,tablePaddingVertical:Ei,tablePaddingHorizontal:fi,tablePaddingVerticalMiddle:$i,tablePaddingHorizontalMiddle:mo,tablePaddingVerticalSmall:ao,tablePaddingHorizontalSmall:po,tableBorderColor:Vo,tableHeaderTextColor:Vn,tableHeaderBg:_n,tableFooterTextColor:eo,tableFooterBg:wa,tableHeaderCellSplitColor:Go,tableHeaderSortBg:hr,tableHeaderSortHoverBg:Sn,tableHeaderIconColor:Ga.clone().setAlpha(Ga.getAlpha()*Yt).toRgbString(),tableHeaderIconColorHover:js.clone().setAlpha(js.getAlpha()*Yt).toRgbString(),tableBodySortBg:Er,tableFixedHeaderSortActiveBg:$a,tableHeaderFilterActiveBg:ha,tableFilterDropdownBg:Yo,tableRowHoverBg:Dr,tableSelectedRowBg:$r,tableSelectedRowHoverBg:ei,zIndexTableFixed:Ks,zIndexTableSticky:Ks+1,tableFontSizeMiddle:ki,tableFontSizeSmall:co,tableSelectionColumnWidth:Ha,tableExpandIconBg:Ua,tableExpandColumnWidth:Ln+2*Ve.padding,tableExpandedRowBg:Zr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ms,tableScrollThumbBgHover:Qe,tableScrollBg:bt});return[Kc(ka),Ri(ka),Ac(ka),cs(ka),qa(ka),Li(ka),za(ka),Ns(ka),Ac(ka),Lo(ka),oa(ka),ba(ka),kc(ka),zo(ka),uo(ka),Gl(ka),_c(ka)]},Ve=>{const{colorFillAlter:Qe,colorBgContainer:bt,colorTextHeading:Rt,colorFillSecondary:Ht,colorFillContent:Yt,controlItemBgActive:xn,controlItemBgActiveHover:Ln,padding:_n,paddingSM:Vn,paddingXS:hr,colorBorderSecondary:Sn,borderRadiusLG:Er,fontSize:Dr,controlHeight:$r,colorTextPlaceholder:ei}=Ve,Zr=new jr.C(Ht).onBackground(bt).toHexShortString(),Ei=new jr.C(Yt).onBackground(bt).toHexShortString(),fi=new jr.C(Qe).onBackground(bt).toHexShortString();return{headerBg:fi,headerColor:Rt,headerSortActiveBg:Zr,headerSortHoverBg:Ei,bodySortBg:fi,rowHoverBg:fi,rowSelectedBg:xn,rowSelectedHoverBg:Ln,rowExpandedBg:Qe,cellPaddingBlock:_n,cellPaddingInline:_n,cellPaddingBlockMD:Vn,cellPaddingInlineMD:hr,cellPaddingBlockSM:hr,cellPaddingInlineSM:hr,borderColor:Sn,headerBorderRadius:Er,footerBg:fi,footerColor:Rt,cellFontSize:Dr,cellFontSizeMD:Dr,cellFontSizeSM:Dr,headerSplitColor:Sn,fixedHeaderSortActiveBg:Zr,headerFilterHoverBg:Yt,filterDropdownMenuBg:bt,filterDropdownBg:bt,expandIconBg:bt,selectionColumnWidth:$r,stickyScrollBarBg:ei,stickyScrollBarBorderRadius:100}});const Ps=[],jl=(Ve,Qe)=>{const{prefixCls:bt,className:Rt,rootClassName:Ht,style:Yt,size:xn,bordered:Ln,dropdownPrefixCls:_n,dataSource:Vn,pagination:hr,rowSelection:Sn,rowKey:Er="key",rowClassName:Dr,columns:$r,children:ei,childrenColumnName:Zr,onChange:Ei,getPopupContainer:fi,loading:$i,expandIcon:mo,expandable:ao,expandedRowRender:po,expandIconColumnIndex:Vo,indentSize:wa,scroll:eo,sortDirections:so,locale:no,showSorterTooltip:ki=!0,virtual:co}=Ve,Go=ae.useMemo(()=>$r||Cr(ei),[$r,ei]),$a=ae.useMemo(()=>Go.some(rs=>rs.responsive),[Go]),ha=(0,Ii.Z)($a),Yo=ae.useMemo(()=>{const rs=new Set(Object.keys(ha).filter($o=>ha[$o]));return Go.filter($o=>!$o.responsive||$o.responsive.some(_l=>rs.has(_l)))},[Go,ha]),Ua=(0,la.Z)(Ve,["className","style","columns"]),{locale:Ha=pa.Z,direction:Ms,table:Ga,renderEmpty:js,getPrefixCls:Ks,getPopupContainer:ka}=ae.useContext(So.E_),ml=(0,Zi.Z)(xn),hs=Object.assign(Object.assign({},Ha.Table),no),ks=Vn||Ps,xs=Ks("table",bt),ga=Ks("dropdown",_n),Vi=Object.assign({childrenColumnName:Zr,expandIconColumnIndex:Vo},ao),{childrenColumnName:Oo="children"}=Vi,Xo=ae.useMemo(()=>ks.some(rs=>rs==null?void 0:rs[Oo])?"nest":po||ao&&ao.expandedRowRender?"row":null,[ks]),lo={body:ae.useRef()},ps=ae.useMemo(()=>typeof Er=="function"?Er:rs=>rs==null?void 0:rs[Er],[Er]),[Wi]=ls(ks,Oo,ps),xa={},ds=function(rs,$o){let _l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var As,Nl,wr;const fc=Object.assign(Object.assign({},xa),rs);_l&&((As=xa.resetPagination)===null||As===void 0||As.call(xa),!((Nl=fc.pagination)===null||Nl===void 0)&&Nl.current&&(fc.pagination.current=1),hr&&hr.onChange&&hr.onChange(1,(wr=fc.pagination)===null||wr===void 0?void 0:wr.pageSize)),eo&&eo.scrollToFirstRowOnChange!==!1&&lo.body.current&&(0,da.Z)(0,{getContainer:()=>lo.body.current}),Ei==null||Ei(fc.pagination,fc.filters,fc.sorter,{currentDataSource:Mo(xl(ks,fc.sorterStates,Oo),fc.filterStates),action:$o})},ss=(rs,$o)=>{ds({sorter:rs,sorterStates:$o},"sort",!1)},[Yl,vl,cc,Xr]=Vl({prefixCls:xs,mergedColumns:Yo,onSorterChange:ss,sortDirections:so||["ascend","descend"],tableLocale:hs,showSorterTooltip:ki}),wc=ae.useMemo(()=>xl(ks,vl,Oo),[ks,vl]);xa.sorter=Xr(),xa.sorterStates=vl;const sl=(rs,$o)=>{ds({filters:rs,filterStates:$o},"filter",!0)},[ec,ac,fs]=Ss({prefixCls:xs,locale:hs,dropdownPrefixCls:ga,mergedColumns:Yo,onFilterChange:sl,getPopupContainer:fi||ka}),ys=Mo(wc,ac);xa.filters=fs,xa.filterStates=ac;const Us=ae.useMemo(()=>{const rs={};return Object.keys(fs).forEach($o=>{fs[$o]!==null&&(rs[$o]=fs[$o])}),Object.assign(Object.assign({},cc),{filters:rs})},[cc,fs]),[Pa]=Bt(Us),Ml=(rs,$o)=>{ds({pagination:Object.assign(Object.assign({},xa.pagination),{current:rs,pageSize:$o})},"paginate")},[Ya,gl]=ic(ys.length,Ml,hr);xa.pagination=hr===!1?{}:Xa(Ya,hr),xa.resetPagination=gl;const Dl=ae.useMemo(()=>{if(hr===!1||!Ya.pageSize)return ys;const{current:rs=1,total:$o,pageSize:_l=rc}=Ya;return ys.length<$o?ys.length>_l?ys.slice((rs-1)*_l,rs*_l):ys:ys.slice((rs-1)*_l,rs*_l)},[!!hr,ys,Ya&&Ya.current,Ya&&Ya.pageSize,Ya&&Ya.total]),[Il,uc]=El({prefixCls:xs,data:ys,pageData:Dl,getRowKey:ps,getRecordByKey:Wi,expandType:Xo,childrenColumnName:Oo,locale:hs,getPopupContainer:fi||ka},Sn),ll=(rs,$o,_l)=>{let As;return typeof Dr=="function"?As=pt()(Dr(rs,$o,_l)):As=pt()(Dr),pt()({[`${xs}-row-selected`]:uc.has(ps(rs,$o))},As)};Vi.__PARENT_RENDER_ICON__=Vi.expandIcon,Vi.expandIcon=Vi.expandIcon||mo||Ro(hs),Xo==="nest"&&Vi.expandIconColumnIndex===void 0?Vi.expandIconColumnIndex=Sn?1:0:Vi.expandIconColumnIndex>0&&Sn&&(Vi.expandIconColumnIndex-=1),typeof Vi.indentSize!="number"&&(Vi.indentSize=typeof wa=="number"?wa:15);const dc=ae.useCallback(rs=>Pa(Il(ec(Yl(rs)))),[Yl,ec,Il]);let cl,Rl;if(hr!==!1&&(Ya!=null&&Ya.total)){let rs;Ya.size?rs=Ya.size:rs=ml==="small"||ml==="middle"?"small":void 0;const $o=Nl=>ae.createElement(io.Z,Object.assign({},Ya,{className:pt()(`${xs}-pagination ${xs}-pagination-${Nl}`,Ya.className),size:rs})),_l=Ms==="rtl"?"left":"right",{position:As}=Ya;if(As!==null&&Array.isArray(As)){const Nl=As.find(Gc=>Gc.includes("top")),wr=As.find(Gc=>Gc.includes("bottom")),fc=As.every(Gc=>`${Gc}`=="none");!Nl&&!wr&&!fc&&(Rl=$o(_l)),Nl&&(cl=$o(Nl.toLowerCase().replace("top",""))),wr&&(Rl=$o(wr.toLowerCase().replace("bottom","")))}else Rl=$o(_l)}let Ol;typeof $i=="boolean"?Ol={spinning:$i}:typeof $i=="object"&&(Ol=Object.assign({spinning:!0},$i));const[dl,Js]=Bo(xs),[,Vs]=(0,Ki.Z)(),Bc=pt()(`${xs}-wrapper`,Ga==null?void 0:Ga.className,{[`${xs}-wrapper-rtl`]:Ms==="rtl"},Rt,Ht,Js),su=Object.assign(Object.assign({},Ga==null?void 0:Ga.style),Yt),Ys=no&&no.emptyText||(js==null?void 0:js("Table"))||ae.createElement(go.Z,{componentName:"Table"}),Xl=co?di:Wt,Yu={},lu=ae.useMemo(()=>{const{fontSize:rs,lineHeight:$o,padding:_l,paddingXS:As,paddingSM:Nl}=Vs,wr=Math.floor(rs*$o);switch(ml){case"large":return _l*2+wr;case"small":return As*2+wr;default:return Nl*2+wr}},[Vs,ml]);return co&&(Yu.listItemHeight=lu),dl(ae.createElement("div",{ref:Qe,className:Bc,style:su},ae.createElement(si.Z,Object.assign({spinning:!1},Ol),cl,ae.createElement(Xl,Object.assign({},Yu,Ua,{columns:Yo,direction:Ms,expandable:Vi,prefixCls:xs,className:pt()({[`${xs}-middle`]:ml==="middle",[`${xs}-small`]:ml==="small",[`${xs}-bordered`]:Ln,[`${xs}-empty`]:ks.length===0}),data:Dl,rowKey:ps,rowClassName:ll,emptyText:Ys,internalHooks:Se,internalRefs:lo,transformColumns:dc})),Rl)))};var Pc=ae.forwardRef(jl);const Kl=(Ve,Qe)=>{const bt=ae.useRef(0);return bt.current+=1,ae.createElement(Pc,Object.assign({},Ve,{ref:Qe,_renderTimes:bt.current}))},oc=ae.forwardRef(Kl);oc.SELECTION_COLUMN=Hl,oc.EXPAND_COLUMN=te,oc.SELECTION_ALL=Fo,oc.SELECTION_INVERT=Bs,oc.SELECTION_NONE=ts,oc.Column=ii,oc.ColumnGroup=to,oc.Summary=Yn;var Cc=oc,al=Cc},66368:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Qn}});var te=ee(73475),Se=ee(25877),Le=ee(38308),Ce=ee(94184),ce=ee.n(Ce),fe=ee(87462),ae=ee(4942),le=ee(1413),re=ee(97685),de=ee(71002),he=ee(45987),me=ee(67294),se=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 ye(He){var lt=me.useRef();lt.current=He;var ut=me.useCallback(function(){for(var gt,yt=arguments.length,kt=new Array(yt),At=0;At<yt;At++)kt[At]=arguments[At];return(gt=lt.current)===null||gt===void 0?void 0:gt.call.apply(gt,[lt].concat(kt))},[]);return ut}function _e(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Me=_e()?me.useLayoutEffect:me.useEffect,ve=function(lt,ut){var gt=me.useRef(!0);Me(function(){return lt(gt.current)},ut),Me(function(){return gt.current=!1,function(){gt.current=!0}},[])},Fe=function(lt,ut){ve(function(gt){if(!gt)return lt()},ut)},$e=null;function Te(He){var lt=me.useRef(!1),ut=me.useState(He),gt=(0,re.Z)(ut,2),yt=gt[0],kt=gt[1];me.useEffect(function(){return lt.current=!1,function(){lt.current=!0}},[]);function At(tn,fn){fn&<.current||kt(tn)}return[yt,At]}function ze(He){return He!==void 0}function Ee(He,lt){var ut=lt||{},gt=ut.defaultValue,yt=ut.value,kt=ut.onChange,At=ut.postState,tn=Te(function(){return ze(yt)?yt:ze(gt)?typeof gt=="function"?gt():gt:typeof He=="function"?He():He}),fn=(0,re.Z)(tn,2),jn=fn[0],qn=fn[1],Kn=yt!==void 0?yt:jn,An=At?At(Kn):Kn,Dn=ye(kt),wn=Te([Kn]),Un=(0,re.Z)(wn,2),vr=Un[0],er=Un[1];Fe(function(){var fr=vr[0];jn!==fr&&Dn(jn,fr)},[vr]),Fe(function(){ze(yt)||qn(yt)},[yt]);var ir=ye(function(fr,_t){qn(fr,_t),er([Kn],_t)});return[An,ir]}var be=ee(62874),Re=(0,me.createContext)(null),De=me.forwardRef(function(He,lt){var ut=He.prefixCls,gt=He.className,yt=He.style,kt=He.id,At=He.active,tn=He.tabKey,fn=He.children;return me.createElement("div",{id:kt&&"".concat(kt,"-panel-").concat(tn),role:"tabpanel",tabIndex:At?0:-1,"aria-labelledby":kt&&"".concat(kt,"-tab-").concat(tn),"aria-hidden":!At,style:yt,className:ce()(ut,At&&"".concat(ut,"-active"),gt),ref:lt},fn)}),et=De,Ye=["key","forceRender","style","className"];function dt(He){var lt=He.id,ut=He.activeKey,gt=He.animated,yt=He.tabPosition,kt=He.destroyInactiveTabPane,At=me.useContext(Re),tn=At.prefixCls,fn=At.tabs,jn=gt.tabPane,qn="".concat(tn,"-tabpane");return me.createElement("div",{className:ce()("".concat(tn,"-content-holder"))},me.createElement("div",{className:ce()("".concat(tn,"-content"),"".concat(tn,"-content-").concat(yt),(0,ae.Z)({},"".concat(tn,"-content-animated"),jn))},fn.map(function(Kn){var An=Kn.key,Dn=Kn.forceRender,wn=Kn.style,Un=Kn.className,vr=(0,he.Z)(Kn,Ye),er=An===ut;return me.createElement(be.Z,(0,fe.Z)({key:An,visible:er,forceRender:Dn,removeOnLeave:!!kt,leavedClassName:"".concat(qn,"-hidden")},gt.tabPaneMotion),function(ir,fr){var _t=ir.style,vt=ir.className;return me.createElement(et,(0,fe.Z)({},vr,{prefixCls:qn,id:lt,tabKey:An,animated:jn,active:er,style:(0,le.Z)((0,le.Z)({},wn),_t),className:ce()(Un,vt),ref:fr}))})})))}var Ke=ee(74902),zt=ee(48555),pt=ee(59864);function Kt(He,lt,ut){var gt=me.useRef({});return(!("value"in gt.current)||ut(gt.current.condition,lt))&&(gt.current.value=He(),gt.current.condition=lt),gt.current.value}function Ze(He,lt){typeof He=="function"?He(lt):(0,de.Z)(He)==="object"&&He&&"current"in He&&(He.current=lt)}function tt(){for(var He=arguments.length,lt=new Array(He),ut=0;ut<He;ut++)lt[ut]=arguments[ut];var gt=lt.filter(function(yt){return yt});return gt.length<=1?gt[0]:function(yt){lt.forEach(function(kt){Ze(kt,yt)})}}function ft(){for(var He=arguments.length,lt=new Array(He),ut=0;ut<He;ut++)lt[ut]=arguments[ut];return Kt(function(){return tt.apply(void 0,lt)},lt,function(gt,yt){return gt.length===yt.length&>.every(function(kt,At){return kt===yt[At]})})}function Ut(He){var lt,ut,gt=isMemo(He)?He.type.type:He.type;return!(typeof gt=="function"&&!((lt=gt.prototype)!==null&<!==void 0&<.render)||typeof He=="function"&&!((ut=He.prototype)!==null&&ut!==void 0&&ut.render))}var nt={width:0,height:0,left:0,top:0};function Ge(He,lt,ut){return(0,me.useMemo)(function(){for(var gt,yt=new Map,kt=lt.get((gt=He[0])===null||gt===void 0?void 0:gt.key)||nt,At=kt.left+kt.width,tn=0;tn<He.length;tn+=1){var fn=He[tn].key,jn=lt.get(fn);if(!jn){var qn;jn=lt.get((qn=He[tn-1])===null||qn===void 0?void 0:qn.key)||nt}var Kn=yt.get(fn)||(0,le.Z)({},jn);Kn.right=At-Kn.left-Kn.width,yt.set(fn,Kn)}return yt},[He.map(function(gt){return gt.key}).join("_"),lt,ut])}function jt(He,lt){var ut=me.useRef(He),gt=me.useState({}),yt=(0,re.Z)(gt,2),kt=yt[1];function At(tn){var fn=typeof tn=="function"?tn(ut.current):tn;fn!==ut.current&<(fn,ut.current),ut.current=fn,kt({})}return[ut.current,At]}var yn=.1,ln=.01,Tt=20,Lt=Math.pow(.995,Tt);function Jt(He,lt){var ut=(0,me.useState)(),gt=(0,re.Z)(ut,2),yt=gt[0],kt=gt[1],At=(0,me.useState)(0),tn=(0,re.Z)(At,2),fn=tn[0],jn=tn[1],qn=(0,me.useState)(0),Kn=(0,re.Z)(qn,2),An=Kn[0],Dn=Kn[1],wn=(0,me.useState)(),Un=(0,re.Z)(wn,2),vr=Un[0],er=Un[1],ir=(0,me.useRef)();function fr(Pt){var qt=Pt.touches[0],hn=qt.screenX,gn=qt.screenY;kt({x:hn,y:gn}),window.clearInterval(ir.current)}function _t(Pt){if(yt){Pt.preventDefault();var qt=Pt.touches[0],hn=qt.screenX,gn=qt.screenY;kt({x:hn,y:gn});var Nn=hn-yt.x,On=gn-yt.y;lt(Nn,On);var vn=Date.now();jn(vn),Dn(vn-fn),er({x:Nn,y:On})}}function vt(){if(yt&&(kt(null),er(null),vr)){var Pt=vr.x/An,qt=vr.y/An,hn=Math.abs(Pt),gn=Math.abs(qt);if(Math.max(hn,gn)<yn)return;var Nn=Pt,On=qt;ir.current=window.setInterval(function(){if(Math.abs(Nn)<ln&&Math.abs(On)<ln){window.clearInterval(ir.current);return}Nn*=Lt,On*=Lt,lt(Nn*Tt,On*Tt)},Tt)}}var Xe=(0,me.useRef)();function ot(Pt){var qt=Pt.deltaX,hn=Pt.deltaY,gn=0,Nn=Math.abs(qt),On=Math.abs(hn);Nn===On?gn=Xe.current==="x"?qt:hn:Nn>On?(gn=qt,Xe.current="x"):(gn=hn,Xe.current="y"),lt(-gn,-gn)&&Pt.preventDefault()}var Nt=(0,me.useRef)(null);Nt.current={onTouchStart:fr,onTouchMove:_t,onTouchEnd:vt,onWheel:ot},me.useEffect(function(){function Pt(Nn){Nt.current.onTouchStart(Nn)}function qt(Nn){Nt.current.onTouchMove(Nn)}function hn(Nn){Nt.current.onTouchEnd(Nn)}function gn(Nn){Nt.current.onWheel(Nn)}return document.addEventListener("touchmove",qt,{passive:!1}),document.addEventListener("touchend",hn,{passive:!1}),He.current.addEventListener("touchstart",Pt,{passive:!1}),He.current.addEventListener("wheel",gn),function(){document.removeEventListener("touchmove",qt),document.removeEventListener("touchend",hn)}},[])}function kn(He){var lt=(0,me.useState)(0),ut=(0,re.Z)(lt,2),gt=ut[0],yt=ut[1],kt=(0,me.useRef)(0),At=(0,me.useRef)();return At.current=He,Fe(function(){var tn;(tn=At.current)===null||tn===void 0||tn.call(At)},[gt]),function(){kt.current===gt&&(kt.current+=1,yt(kt.current))}}function In(He){var lt=(0,me.useRef)([]),ut=(0,me.useState)({}),gt=(0,re.Z)(ut,2),yt=gt[1],kt=(0,me.useRef)(typeof He=="function"?He():He),At=kn(function(){var fn=kt.current;lt.current.forEach(function(jn){fn=jn(fn)}),lt.current=[],kt.current=fn,yt({})});function tn(fn){lt.current.push(fn),At()}return[kt.current,tn]}var Qt={width:0,height:0,left:0,top:0,right:0};function Mn(He,lt,ut,gt,yt,kt,At){var tn=At.tabs,fn=At.tabPosition,jn=At.rtl,qn,Kn,An;return["top","bottom"].includes(fn)?(qn="width",Kn=jn?"right":"left",An=Math.abs(ut)):(qn="height",Kn="top",An=-ut),(0,me.useMemo)(function(){if(!tn.length)return[0,0];for(var Dn=tn.length,wn=Dn,Un=0;Un<Dn;Un+=1){var vr=He.get(tn[Un].key)||Qt;if(vr[Kn]+vr[qn]>An+lt){wn=Un-1;break}}for(var er=0,ir=Dn-1;ir>=0;ir-=1){var fr=He.get(tn[ir].key)||Qt;if(fr[Kn]<An){er=ir+1;break}}return er>=wn?[0,0]:[er,wn]},[He,lt,gt,yt,kt,An,fn,tn.map(function(Dn){return Dn.key}).join("_"),jn])}function Wn(He){var lt;return He instanceof Map?(lt={},He.forEach(function(ut,gt){lt[gt]=ut})):lt=He,JSON.stringify(lt)}var zn="TABS_DQ";function at(He){return String(He).replace(/"/g,zn)}function Oe(He,lt,ut,gt){return!(!ut||gt||He===!1||He===void 0&&(lt===!1||lt===null))}function ke(He,lt){var ut=He.prefixCls,gt=He.editable,yt=He.locale,kt=He.style;return!gt||gt.showAdd===!1?null:me.createElement("button",{ref:lt,type:"button",className:"".concat(ut,"-nav-add"),style:kt,"aria-label":(yt==null?void 0:yt.addAriaLabel)||"Add tab",onClick:function(tn){gt.onEdit("add",{event:tn})}},gt.addIcon||"+")}var Be=me.forwardRef(ke),Ne=me.forwardRef(function(He,lt){var ut=He.position,gt=He.prefixCls,yt=He.extra;if(!yt)return null;var kt,At={};return(0,de.Z)(yt)==="object"&&!me.isValidElement(yt)?At=yt:At.right=yt,ut==="right"&&(kt=At.right),ut==="left"&&(kt=At.left),kt?me.createElement("div",{className:"".concat(gt,"-extra-content"),ref:lt},kt):null}),we=Ne,rt=ee(62709);function It(He,lt,ut){var gt=React.useRef({});return(!("value"in gt.current)||ut(gt.current.condition,lt))&&(gt.current.value=He(),gt.current.condition=lt),gt.current.value}function Ct(He,lt){typeof He=="function"?He(lt):(0,de.Z)(He)==="object"&&He&&"current"in He&&(He.current=lt)}function $t(){for(var He=arguments.length,lt=new Array(He),ut=0;ut<He;ut++)lt[ut]=arguments[ut];var gt=lt.filter(function(yt){return yt});return gt.length<=1?gt[0]:function(yt){lt.forEach(function(kt){Ct(kt,yt)})}}function Vt(){for(var He=arguments.length,lt=new Array(He),ut=0;ut<He;ut++)lt[ut]=arguments[ut];return useMemo(function(){return $t.apply(void 0,lt)},lt,function(gt,yt){return gt.length===yt.length&>.every(function(kt,At){return kt===yt[At]})})}function wt(He){var lt,ut,gt=(0,pt.isMemo)(He)?He.type.type:He.type;return!(typeof gt=="function"&&!((lt=gt.prototype)!==null&<!==void 0&<.render)||typeof He=="function"&&!((ut=He.prototype)!==null&&ut!==void 0&&ut.render))}var on={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(lt){var ut=lt.keyCode;if(lt.altKey&&!lt.ctrlKey||lt.metaKey||ut>=on.F1&&ut<=on.F12)return!1;switch(ut){case on.ALT:case on.CAPS_LOCK:case on.CONTEXT_MENU:case on.CTRL:case on.DOWN:case on.END:case on.ESC:case on.HOME:case on.INSERT:case on.LEFT:case on.MAC_FF_META:case on.META:case on.NUMLOCK:case on.NUM_CENTER:case on.PAGE_DOWN:case on.PAGE_UP:case on.PAUSE:case on.PRINT_SCREEN:case on.RIGHT:case on.SHIFT:case on.UP:case on.WIN_KEY:case on.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(lt){if(lt>=on.ZERO&<<=on.NINE||lt>=on.NUM_ZERO&<<=on.NUM_MULTIPLY||lt>=on.A&<<=on.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&<===0)return!0;switch(lt){case on.SPACE:case on.QUESTION_MARK:case on.NUM_PLUS:case on.NUM_MINUS:case on.NUM_PERIOD:case on.NUM_DIVISION:case on.SEMICOLON:case on.DASH:case on.EQUALS:case on.COMMA:case on.PERIOD:case on.SLASH:case on.APOSTROPHE:case on.SINGLE_QUOTE:case on.OPEN_SQUARE_BRACKET:case on.BACKSLASH:case on.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Dt=on,Xt=function(lt){return+setTimeout(lt,16)},nn=function(lt){return clearTimeout(lt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Xt=function(lt){return window.requestAnimationFrame(lt)},nn=function(lt){return window.cancelAnimationFrame(lt)});var bn=0,en=new Map;function Zn(He){en.delete(He)}var Yn=function(lt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;bn+=1;var gt=bn;function yt(kt){if(kt===0)Zn(gt),lt();else{var At=Xt(function(){yt(kt-1)});en.set(gt,At)}}return yt(ut),gt};Yn.cancel=function(He){var lt=en.get(He);return Zn(lt),nn(lt)};var pr=Yn,ti=Dt.ESC,Pn=Dt.TAB;function Or(He){var lt=He.visible,ut=He.triggerRef,gt=He.onVisibleChange,yt=He.autoFocus,kt=He.overlayRef,At=me.useRef(!1),tn=function(){if(lt){var Kn,An;(Kn=ut.current)===null||Kn===void 0||(An=Kn.focus)===null||An===void 0||An.call(Kn),gt==null||gt(!1)}},fn=function(){var Kn;return(Kn=kt.current)!==null&&Kn!==void 0&&Kn.focus?(kt.current.focus(),At.current=!0,!0):!1},jn=function(Kn){switch(Kn.keyCode){case ti:tn();break;case Pn:{var An=!1;At.current||(An=fn()),An?Kn.preventDefault():tn();break}}};me.useEffect(function(){return lt?(window.addEventListener("keydown",jn),yt&&pr(fn,3),function(){window.removeEventListener("keydown",jn),At.current=!1}):function(){At.current=!1}},[lt])}var Br=(0,me.forwardRef)(function(He,lt){var ut=He.overlay,gt=He.arrow,yt=He.prefixCls,kt=(0,me.useMemo)(function(){var tn;return typeof ut=="function"?tn=ut():tn=ut,tn},[ut]),At=$t(lt,kt==null?void 0:kt.ref);return me.createElement(me.Fragment,null,gt&&me.createElement("div",{className:"".concat(yt,"-arrow")}),me.cloneElement(kt,{ref:wt(kt)?At:void 0}))}),Di=Br,mi={adjustX:1,adjustY:1},ci=[0,0],Fr={topLeft:{points:["bl","tl"],overflow:mi,offset:[0,-4],targetOffset:ci},top:{points:["bc","tc"],overflow:mi,offset:[0,-4],targetOffset:ci},topRight:{points:["br","tr"],overflow:mi,offset:[0,-4],targetOffset:ci},bottomLeft:{points:["tl","bl"],overflow:mi,offset:[0,4],targetOffset:ci},bottom:{points:["tc","bc"],overflow:mi,offset:[0,4],targetOffset:ci},bottomRight:{points:["tr","br"],overflow:mi,offset:[0,4],targetOffset:ci}},zr=Fr,Fi=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ko(He,lt){var ut,gt=He.arrow,yt=gt===void 0?!1:gt,kt=He.prefixCls,At=kt===void 0?"rc-dropdown":kt,tn=He.transitionName,fn=He.animation,jn=He.align,qn=He.placement,Kn=qn===void 0?"bottomLeft":qn,An=He.placements,Dn=An===void 0?zr:An,wn=He.getPopupContainer,Un=He.showAction,vr=He.hideAction,er=He.overlayClassName,ir=He.overlayStyle,fr=He.visible,_t=He.trigger,vt=_t===void 0?["hover"]:_t,Xe=He.autoFocus,ot=He.overlay,Nt=He.children,Pt=He.onVisibleChange,qt=(0,he.Z)(He,Fi),hn=me.useState(),gn=(0,re.Z)(hn,2),Nn=gn[0],On=gn[1],vn="visible"in He?fr:Nn,Fn=me.useRef(null),Gn=me.useRef(null),xr=me.useRef(null);me.useImperativeHandle(lt,function(){return Fn.current});var sr=function(Nr){On(Nr),Pt==null||Pt(Nr)};Or({visible:vn,triggerRef:xr,onVisibleChange:sr,autoFocus:Xe,overlayRef:Gn});var Lr=function(Nr){var wi=He.onOverlayClick;On(!1),wi&&wi(Nr)},Ur=function(){return me.createElement(Di,{ref:Gn,overlay:ot,prefixCls:At,arrow:yt})},Pr=function(){return typeof ot=="function"?Ur:Ur()},Qr=function(){var Nr=He.minOverlayWidthMatchTrigger,wi=He.alignPoint;return"minOverlayWidthMatchTrigger"in He?Nr:!wi},Tr=function(){var Nr=He.openClassName;return Nr!==void 0?Nr:"".concat(At,"-open")},Wr=me.cloneElement(Nt,{className:ce()((ut=Nt.props)===null||ut===void 0?void 0:ut.className,vn&&Tr()),ref:wt(Nt)?$t(xr,Nt.ref):void 0}),ni=vr;return!ni&&vt.indexOf("contextMenu")!==-1&&(ni=["click"]),me.createElement(rt.Z,(0,fe.Z)({builtinPlacements:Dn},qt,{prefixCls:At,ref:Fn,popupClassName:ce()(er,(0,ae.Z)({},"".concat(At,"-show-arrow"),yt)),popupStyle:ir,action:vt,showAction:Un,hideAction:ni,popupPlacement:Kn,popupAlign:jn,popupTransitionName:tn,popupAnimation:fn,popupVisible:vn,stretch:Qr()?"minWidth":"",popup:Pr(),onPopupVisibleChange:sr,onPopupClick:Lr,getPopupContainer:wn}),Wr)}var aa=me.forwardRef(ko),Wo=aa,li=ee(78595),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(lt){var ut=lt.keyCode;if(lt.altKey&&!lt.ctrlKey||lt.metaKey||ut>=rn.F1&&ut<=rn.F12)return!1;switch(ut){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(lt){if(lt>=rn.ZERO&<<=rn.NINE||lt>=rn.NUM_ZERO&<<=rn.NUM_MULTIPLY||lt>=rn.A&<<=rn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&<===0)return!0;switch(lt){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}}},nr=rn;function dr(He,lt){var ut=He.prefixCls,gt=He.id,yt=He.tabs,kt=He.locale,At=He.mobile,tn=He.moreIcon,fn=tn===void 0?"More":tn,jn=He.moreTransitionName,qn=He.style,Kn=He.className,An=He.editable,Dn=He.tabBarGutter,wn=He.rtl,Un=He.removeAriaLabel,vr=He.onTabClick,er=He.getPopupContainer,ir=He.popupClassName,fr=(0,me.useState)(!1),_t=(0,re.Z)(fr,2),vt=_t[0],Xe=_t[1],ot=(0,me.useState)(null),Nt=(0,re.Z)(ot,2),Pt=Nt[0],qt=Nt[1],hn="".concat(gt,"-more-popup"),gn="".concat(ut,"-dropdown"),Nn=Pt!==null?"".concat(hn,"-").concat(Pt):null,On=kt==null?void 0:kt.dropdownAriaLabel;function vn(Pr,Qr){Pr.preventDefault(),Pr.stopPropagation(),An.onEdit("remove",{key:Qr,event:Pr})}var Fn=me.createElement(li.ZP,{onClick:function(Qr){var Tr=Qr.key,Wr=Qr.domEvent;vr(Tr,Wr),Xe(!1)},prefixCls:"".concat(gn,"-menu"),id:hn,tabIndex:-1,role:"listbox","aria-activedescendant":Nn,selectedKeys:[Pt],"aria-label":On!==void 0?On:"expanded dropdown"},yt.map(function(Pr){var Qr=Pr.closable,Tr=Pr.disabled,Wr=Pr.closeIcon,ni=Pr.key,Si=Pr.label,Nr=Oe(Qr,Wr,An,Tr);return me.createElement(li.sN,{key:ni,id:"".concat(hn,"-").concat(ni),role:"option","aria-controls":gt&&"".concat(gt,"-panel-").concat(ni),disabled:Tr},me.createElement("span",null,Si),Nr&&me.createElement("button",{type:"button","aria-label":Un||"remove",tabIndex:0,className:"".concat(gn,"-menu-item-remove"),onClick:function(gi){gi.stopPropagation(),vn(gi,ni)}},Wr||An.removeIcon||"\xD7"))}));function Gn(Pr){for(var Qr=yt.filter(function(Nr){return!Nr.disabled}),Tr=Qr.findIndex(function(Nr){return Nr.key===Pt})||0,Wr=Qr.length,ni=0;ni<Wr;ni+=1){Tr=(Tr+Pr+Wr)%Wr;var Si=Qr[Tr];if(!Si.disabled){qt(Si.key);return}}}function xr(Pr){var Qr=Pr.which;if(!vt){[nr.DOWN,nr.SPACE,nr.ENTER].includes(Qr)&&(Xe(!0),Pr.preventDefault());return}switch(Qr){case nr.UP:Gn(-1),Pr.preventDefault();break;case nr.DOWN:Gn(1),Pr.preventDefault();break;case nr.ESC:Xe(!1);break;case nr.SPACE:case nr.ENTER:Pt!==null&&vr(Pt,Pr);break}}(0,me.useEffect)(function(){var Pr=document.getElementById(Nn);Pr&&Pr.scrollIntoView&&Pr.scrollIntoView(!1)},[Pt]),(0,me.useEffect)(function(){vt||qt(null)},[vt]);var sr=(0,ae.Z)({},wn?"marginRight":"marginLeft",Dn);yt.length||(sr.visibility="hidden",sr.order=1);var Lr=ce()((0,ae.Z)({},"".concat(gn,"-rtl"),wn)),Ur=At?null:me.createElement(Wo,{prefixCls:gn,overlay:Fn,trigger:["hover"],visible:yt.length?vt:!1,transitionName:jn,onVisibleChange:Xe,overlayClassName:ce()(Lr,ir),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:er},me.createElement("button",{type:"button",className:"".concat(ut,"-nav-more"),style:sr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":hn,id:"".concat(gt,"-more"),"aria-expanded":vt,onKeyDown:xr},fn));return me.createElement("div",{className:ce()("".concat(ut,"-nav-operations"),Kn),style:qn,ref:lt},Ur,me.createElement(Be,{prefixCls:ut,locale:kt,editable:An}))}var rr=me.memo(me.forwardRef(dr),function(He,lt){return lt.tabMoving});function Jr(He){var lt,ut=He.prefixCls,gt=He.id,yt=He.active,kt=He.tab,At=kt.key,tn=kt.label,fn=kt.disabled,jn=kt.closeIcon,qn=He.closable,Kn=He.renderWrapper,An=He.removeAriaLabel,Dn=He.editable,wn=He.onClick,Un=He.onFocus,vr=He.style,er="".concat(ut,"-tab"),ir=Oe(qn,jn,Dn,fn);function fr(Xe){fn||wn(Xe)}function _t(Xe){Xe.preventDefault(),Xe.stopPropagation(),Dn.onEdit("remove",{key:At,event:Xe})}var vt=me.createElement("div",{key:At,"data-node-key":at(At),className:ce()(er,(lt={},(0,ae.Z)(lt,"".concat(er,"-with-remove"),ir),(0,ae.Z)(lt,"".concat(er,"-active"),yt),(0,ae.Z)(lt,"".concat(er,"-disabled"),fn),lt)),style:vr,onClick:fr},me.createElement("div",{role:"tab","aria-selected":yt,id:gt&&"".concat(gt,"-tab-").concat(At),className:"".concat(er,"-btn"),"aria-controls":gt&&"".concat(gt,"-panel-").concat(At),"aria-disabled":fn,tabIndex:fn?null:0,onClick:function(ot){ot.stopPropagation(),fr(ot)},onKeyDown:function(ot){[nr.SPACE,nr.ENTER].includes(ot.which)&&(ot.preventDefault(),fr(ot))},onFocus:Un},tn),ir&&me.createElement("button",{type:"button","aria-label":An||"remove",tabIndex:0,className:"".concat(er,"-remove"),onClick:function(ot){ot.stopPropagation(),_t(ot)}},jn||Dn.removeIcon||"\xD7"));return Kn?Kn(vt):vt}var Ar=Jr,Mr=function(lt){return+setTimeout(lt,16)},tr=function(lt){return clearTimeout(lt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Mr=function(lt){return window.requestAnimationFrame(lt)},tr=function(lt){return window.cancelAnimationFrame(lt)});var Zt=0,Ot=new Map;function ge(He){Ot.delete(He)}var Ie=function(lt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Zt+=1;var gt=Zt;function yt(kt){if(kt===0)ge(gt),lt();else{var At=Mr(function(){yt(kt-1)});Ot.set(gt,At)}}return yt(ut),gt};Ie.cancel=function(He){var lt=Ot.get(He);return ge(lt),tr(lt)};var Ae=Ie,We=function(lt){var ut=lt.activeTabOffset,gt=lt.horizontal,yt=lt.rtl,kt=lt.indicatorSize,At=(0,me.useState)(),tn=(0,re.Z)(At,2),fn=tn[0],jn=tn[1],qn=(0,me.useRef)(),Kn=function(wn){return typeof kt=="function"?kt(wn):typeof kt=="number"?kt:wn};function An(){Ae.cancel(qn.current)}return(0,me.useEffect)(function(){var Dn={};return ut&&(gt?(yt?(Dn.right=ut.right+ut.width/2,Dn.transform="translateX(50%)"):(Dn.left=ut.left+ut.width/2,Dn.transform="translateX(-50%)"),Dn.width=Kn(ut.width)):(Dn.top=ut.top+ut.height/2,Dn.transform="translateY(-50%)",Dn.height=Kn(ut.height))),An(),qn.current=Ae(function(){jn(Dn)}),An},[ut,gt,yt,kt]),{style:fn}},it=We,xt=function(lt){var ut=lt.current||{},gt=ut.offsetWidth,yt=gt===void 0?0:gt,kt=ut.offsetHeight,At=kt===void 0?0:kt;return[yt,At]},Ft=function(lt,ut){return lt[ut?0:1]};function an(He,lt){var ut,gt=me.useContext(Re),yt=gt.prefixCls,kt=gt.tabs,At=He.className,tn=He.style,fn=He.id,jn=He.animated,qn=He.activeKey,Kn=He.rtl,An=He.extra,Dn=He.editable,wn=He.locale,Un=He.tabPosition,vr=He.tabBarGutter,er=He.children,ir=He.onTabClick,fr=He.onTabScroll,_t=He.indicatorSize,vt=(0,me.useRef)(),Xe=(0,me.useRef)(),ot=(0,me.useRef)(),Nt=(0,me.useRef)(),Pt=(0,me.useRef)(),qt=(0,me.useRef)(),hn=(0,me.useRef)(),gn=Un==="top"||Un==="bottom",Nn=jt(0,function(Bi,Co){gn&&fr&&fr({direction:Bi>Co?"left":"right"})}),On=(0,re.Z)(Nn,2),vn=On[0],Fn=On[1],Gn=jt(0,function(Bi,Co){!gn&&fr&&fr({direction:Bi>Co?"top":"bottom"})}),xr=(0,re.Z)(Gn,2),sr=xr[0],Lr=xr[1],Ur=(0,me.useState)([0,0]),Pr=(0,re.Z)(Ur,2),Qr=Pr[0],Tr=Pr[1],Wr=(0,me.useState)([0,0]),ni=(0,re.Z)(Wr,2),Si=ni[0],Nr=ni[1],wi=(0,me.useState)([0,0]),gi=(0,re.Z)(wi,2),vo=gi[0],Ji=gi[1],Pi=(0,me.useState)([0,0]),Mi=(0,re.Z)(Pi,2),Ai=Mi[0],pi=Mi[1],zi=In(new Map),ai=(0,re.Z)(zi,2),ii=ai[0],Ui=ai[1],to=Ge(kt,ii,Si[0]),la=Ft(Qr,gn),da=Ft(Si,gn),So=Ft(vo,gn),go=Ft(Ai,gn),Zi=la<da+So,Ii=Zi?la-go:la-So,pa="".concat(yt,"-nav-operations-hidden"),io=0,si=0;gn&&Kn?(io=0,si=Math.max(0,da-Ii)):(io=Math.min(0,Ii-da),si=0);function Ki(Bi){return Bi<io?io:Bi>si?si:Bi}var Io=(0,me.useRef)(),Ro=(0,me.useState)(),qo=(0,re.Z)(Ro,2),Qi=qo[0],ma=qo[1];function va(){ma(Date.now())}function ia(){window.clearTimeout(Io.current)}Jt(Nt,function(Bi,Co){function Qo(Ca,is){Ca(function(bs){var bl=Ki(bs+is);return bl})}return Zi?(gn?Qo(Fn,Bi):Qo(Lr,Co),ia(),va(),!0):!1}),(0,me.useEffect)(function(){return ia(),Qi&&(Io.current=window.setTimeout(function(){ma(0)},100)),ia},[Qi]);var ca=Mn(to,Ii,gn?vn:sr,da,So,go,(0,le.Z)((0,le.Z)({},He),{},{tabs:kt})),Ea=(0,re.Z)(ca,2),Ja=Ea[0],Ma=Ea[1],Za=ye(function(){var Bi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qn,Co=to.get(Bi)||{width:0,height:0,left:0,right:0,top:0};if(gn){var Qo=vn;Kn?Co.right<vn?Qo=Co.right:Co.right+Co.width>vn+Ii&&(Qo=Co.right+Co.width-Ii):Co.left<-vn?Qo=-Co.left:Co.left+Co.width>-vn+Ii&&(Qo=-(Co.left+Co.width-Ii)),Lr(0),Fn(Ki(Qo))}else{var Ca=sr;Co.top<-sr?Ca=-Co.top:Co.top+Co.height>-sr+Ii&&(Ca=-(Co.top+Co.height-Ii)),Fn(0),Lr(Ki(Ca))}}),vs={};Un==="top"||Un==="bottom"?vs[Kn?"marginRight":"marginLeft"]=vr:vs.marginTop=vr;var Es=kt.map(function(Bi,Co){var Qo=Bi.key;return me.createElement(Ar,{id:fn,prefixCls:yt,key:Qo,tab:Bi,style:Co===0?void 0:vs,closable:Bi.closable,editable:Dn,active:Qo===qn,renderWrapper:er,removeAriaLabel:wn==null?void 0:wn.removeAriaLabel,onClick:function(is){ir(Qo,is)},onFocus:function(){Za(Qo),va(),Nt.current&&(Kn||(Nt.current.scrollLeft=0),Nt.current.scrollTop=0)}})}),Ls=function(){return Ui(function(){var Co=new Map;return kt.forEach(function(Qo){var Ca,is=Qo.key,bs=(Ca=Pt.current)===null||Ca===void 0?void 0:Ca.querySelector('[data-node-key="'.concat(at(is),'"]'));bs&&Co.set(is,{width:bs.offsetWidth,height:bs.offsetHeight,left:bs.offsetLeft,top:bs.offsetTop})}),Co})};(0,me.useEffect)(function(){Ls()},[kt.map(function(Bi){return Bi.key}).join("_")]);var Qa=kn(function(){var Bi=xt(vt),Co=xt(Xe),Qo=xt(ot);Tr([Bi[0]-Co[0]-Qo[0],Bi[1]-Co[1]-Qo[1]]);var Ca=xt(hn);Ji(Ca);var is=xt(qt);pi(is);var bs=xt(Pt);Nr([bs[0]-Ca[0],bs[1]-Ca[1]]),Ls()}),La=kt.slice(0,Ja),ho=kt.slice(Ma+1),Po=[].concat((0,Ke.Z)(La),(0,Ke.Z)(ho)),_a=to.get(qn),Da=it({activeTabOffset:_a,horizontal:gn,rtl:Kn,indicatorSize:_t}),gs=Da.style;(0,me.useEffect)(function(){Za()},[qn,io,si,Wn(_a),Wn(to),gn]),(0,me.useEffect)(function(){Qa()},[Kn]);var Rs=!!Po.length,Ws="".concat(yt,"-nav-wrap"),hl,ul,Ts,es;return gn?Kn?(ul=vn>0,hl=vn!==si):(hl=vn<0,ul=vn!==io):(Ts=sr<0,es=sr!==io),me.createElement(zt.Z,{onResize:Qa},me.createElement("div",{ref:ft(lt,vt),role:"tablist",className:ce()("".concat(yt,"-nav"),At),style:tn,onKeyDown:function(){va()}},me.createElement(we,{ref:Xe,position:"left",extra:An,prefixCls:yt}),me.createElement(zt.Z,{onResize:Qa},me.createElement("div",{className:ce()(Ws,(ut={},(0,ae.Z)(ut,"".concat(Ws,"-ping-left"),hl),(0,ae.Z)(ut,"".concat(Ws,"-ping-right"),ul),(0,ae.Z)(ut,"".concat(Ws,"-ping-top"),Ts),(0,ae.Z)(ut,"".concat(Ws,"-ping-bottom"),es),ut)),ref:Nt},me.createElement(zt.Z,{onResize:Qa},me.createElement("div",{ref:Pt,className:"".concat(yt,"-nav-list"),style:{transform:"translate(".concat(vn,"px, ").concat(sr,"px)"),transition:Qi?"none":void 0}},Es,me.createElement(Be,{ref:hn,prefixCls:yt,locale:wn,editable:Dn,style:(0,le.Z)((0,le.Z)({},Es.length===0?void 0:vs),{},{visibility:Rs?"hidden":null})}),me.createElement("div",{className:ce()("".concat(yt,"-ink-bar"),(0,ae.Z)({},"".concat(yt,"-ink-bar-animated"),jn.inkBar)),style:gs}))))),me.createElement(rr,(0,fe.Z)({},He,{removeAriaLabel:wn==null?void 0:wn.removeAriaLabel,ref:qt,prefixCls:yt,tabs:Po,className:!Rs&&pa,tabMoving:!!Qi})),me.createElement(we,{ref:ot,position:"right",extra:An,prefixCls:yt})))}var Rn=me.forwardRef(an),mr=["renderTabBar"],or=["label","key"];function cr(He){var lt=He.renderTabBar,ut=(0,he.Z)(He,mr),gt=me.useContext(Re),yt=gt.tabs;if(lt){var kt=(0,le.Z)((0,le.Z)({},ut),{},{panes:yt.map(function(At){var tn=At.label,fn=At.key,jn=(0,he.Z)(At,or);return me.createElement(et,(0,fe.Z)({tab:tn,key:fn,tabKey:fn},jn))})});return lt(kt,Rn)}return me.createElement(Rn,ut)}var Xn={},br=[],_r=function(lt){br.push(lt)};function mn(He,lt){if(0)var ut}function $n(He,lt){if(0)var ut}function Vr(){Xn={}}function qr(He,lt,ut){!lt&&!Xn[ut]&&(He(!1,ut),Xn[ut]=!0)}function Ir(He,lt){qr(mn,He,lt)}function hi(He,lt){qr($n,He,lt)}Ir.preMessage=_r,Ir.resetWarned=Vr,Ir.noteOnce=hi;var Ni=null;function yr(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},lt;return He===!1?lt={inkBar:!1,tabPane:!1}:He===!0?lt={inkBar:!0,tabPane:!1}:lt=(0,le.Z)({inkBar:!0},(0,de.Z)(He)==="object"?He:{}),lt.tabPaneMotion&<.tabPane===void 0&&(lt.tabPane=!0),!lt.tabPaneMotion&<.tabPane&&(lt.tabPane=!1),lt}var bi=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],ar=0;function fo(He,lt){var ut,gt=He.id,yt=He.prefixCls,kt=yt===void 0?"rc-tabs":yt,At=He.className,tn=He.items,fn=He.direction,jn=He.activeKey,qn=He.defaultActiveKey,Kn=He.editable,An=He.animated,Dn=He.tabPosition,wn=Dn===void 0?"top":Dn,Un=He.tabBarGutter,vr=He.tabBarStyle,er=He.tabBarExtraContent,ir=He.locale,fr=He.moreIcon,_t=He.moreTransitionName,vt=He.destroyInactiveTabPane,Xe=He.renderTabBar,ot=He.onChange,Nt=He.onTabClick,Pt=He.onTabScroll,qt=He.getPopupContainer,hn=He.popupClassName,gn=He.indicatorSize,Nn=(0,he.Z)(He,bi),On=me.useMemo(function(){return(tn||[]).filter(function(pi){return pi&&(0,de.Z)(pi)==="object"&&"key"in pi})},[tn]),vn=fn==="rtl",Fn=yr(An),Gn=(0,me.useState)(!1),xr=(0,re.Z)(Gn,2),sr=xr[0],Lr=xr[1];(0,me.useEffect)(function(){Lr(se())},[]);var Ur=Ee(function(){var pi;return(pi=On[0])===null||pi===void 0?void 0:pi.key},{value:jn,defaultValue:qn}),Pr=(0,re.Z)(Ur,2),Qr=Pr[0],Tr=Pr[1],Wr=(0,me.useState)(function(){return On.findIndex(function(pi){return pi.key===Qr})}),ni=(0,re.Z)(Wr,2),Si=ni[0],Nr=ni[1];(0,me.useEffect)(function(){var pi=On.findIndex(function(ai){return ai.key===Qr});if(pi===-1){var zi;pi=Math.max(0,Math.min(Si,On.length-1)),Tr((zi=On[pi])===null||zi===void 0?void 0:zi.key)}Nr(pi)},[On.map(function(pi){return pi.key}).join("_"),Qr,Si]);var wi=Ee(null,{value:gt}),gi=(0,re.Z)(wi,2),vo=gi[0],Ji=gi[1];(0,me.useEffect)(function(){gt||(Ji("rc-tabs-".concat(ar)),ar+=1)},[]);function Pi(pi,zi){Nt==null||Nt(pi,zi);var ai=pi!==Qr;Tr(pi),ai&&(ot==null||ot(pi))}var Mi={id:vo,activeKey:Qr,animated:Fn,tabPosition:wn,rtl:vn,mobile:sr},Ai=(0,le.Z)((0,le.Z)({},Mi),{},{editable:Kn,locale:ir,moreIcon:fr,moreTransitionName:_t,tabBarGutter:Un,onTabClick:Pi,onTabScroll:Pt,extra:er,style:vr,panes:null,getPopupContainer:qt,popupClassName:hn,indicatorSize:gn});return me.createElement(Re.Provider,{value:{tabs:On,prefixCls:kt}},me.createElement("div",(0,fe.Z)({ref:lt,id:gt,className:ce()(kt,"".concat(kt,"-").concat(wn),(ut={},(0,ae.Z)(ut,"".concat(kt,"-mobile"),sr),(0,ae.Z)(ut,"".concat(kt,"-editable"),Kn),(0,ae.Z)(ut,"".concat(kt,"-rtl"),vn),ut),At)},Nn),me.createElement(cr,(0,fe.Z)({},Ai,{renderTabBar:Xe})),me.createElement(dt,(0,fe.Z)({destroyInactiveTabPane:vt},Mi,{animated:Fn}))))}var qi=me.forwardRef(fo),ua=qi,Jo=ua,bo=ee(53124),oo=ee(98675),Eo=()=>null,ra=ee(33603);const ea={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Ho(He){let lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},ut;return lt===!1?ut={inkBar:!1,tabPane:!1}:lt===!0?ut={inkBar:!0,tabPane:!0}:ut=Object.assign({inkBar:!0},typeof lt=="object"?lt:{}),ut.tabPane&&(ut.tabPaneMotion=Object.assign(Object.assign({},ea),{motionName:(0,ra.m)(He,"switch")})),ut}var No=ee(37419),Ba=function(He,lt){var ut={};for(var gt in He)Object.prototype.hasOwnProperty.call(He,gt)&<.indexOf(gt)<0&&(ut[gt]=He[gt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,gt=Object.getOwnPropertySymbols(He);yt<gt.length;yt++)lt.indexOf(gt[yt])<0&&Object.prototype.propertyIsEnumerable.call(He,gt[yt])&&(ut[gt[yt]]=He[gt[yt]]);return ut};function Wa(He){return He.filter(lt=>lt)}function Ia(He,lt){if(He)return He;const ut=(0,No.Z)(lt).map(gt=>{if(me.isValidElement(gt)){const{key:yt,props:kt}=gt,At=kt||{},{tab:tn}=At,fn=Ba(At,["tab"]);return Object.assign(Object.assign({key:String(yt)},fn),{label:tn})}return null});return Wa(ut)}var Ao=ee(14747),pn=ee(67968),sn=ee(45503),Hn=ee(67771),Cr=He=>{const{componentCls:lt,motionDurationSlow:ut}=He;return[{[lt]:{[`${lt}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${ut}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${ut}`}}}}},[(0,Hn.oN)(He,"slide-up"),(0,Hn.oN)(He,"slide-down")]]};const vi=He=>{const{componentCls:lt,tabsCardPadding:ut,cardBg:gt,cardGutter:yt,colorBorderSecondary:kt,itemSelectedColor:At}=He;return{[`${lt}-card`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab`]:{margin:0,padding:ut,background:gt,border:`${He.lineWidth}px ${He.lineType} ${kt}`,transition:`all ${He.motionDurationSlow} ${He.motionEaseInOut}`},[`${lt}-tab-active`]:{color:At,background:He.colorBgContainer},[`${lt}-ink-bar`]:{visibility:"hidden"}},[`&${lt}-top, &${lt}-bottom`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab + ${lt}-tab`]:{marginLeft:{_skip_check_:!0,value:`${yt}px`}}}},[`&${lt}-top`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab`]:{borderRadius:`${He.borderRadiusLG}px ${He.borderRadiusLG}px 0 0`},[`${lt}-tab-active`]:{borderBottomColor:He.colorBgContainer}}},[`&${lt}-bottom`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab`]:{borderRadius:`0 0 ${He.borderRadiusLG}px ${He.borderRadiusLG}px`},[`${lt}-tab-active`]:{borderTopColor:He.colorBgContainer}}},[`&${lt}-left, &${lt}-right`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab + ${lt}-tab`]:{marginTop:`${yt}px`}}},[`&${lt}-left`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab`]:{borderRadius:{_skip_check_:!0,value:`${He.borderRadiusLG}px 0 0 ${He.borderRadiusLG}px`}},[`${lt}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:He.colorBgContainer}}}},[`&${lt}-right`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${He.borderRadiusLG}px ${He.borderRadiusLG}px 0`}},[`${lt}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:He.colorBgContainer}}}}}}},_i=He=>{const{componentCls:lt,itemHoverColor:ut,dropdownEdgeChildVerticalPadding:gt}=He;return{[`${lt}-dropdown`]:Object.assign(Object.assign({},(0,Ao.Wf)(He)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:He.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${lt}-dropdown-menu`]:{maxHeight:He.tabsDropdownHeight,margin:0,padding:`${gt}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({},Ao.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:ut}},"&:hover":{background:He.controlItemBgHover},"&-disabled":{"&, &:hover":{color:He.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},ji=He=>{const{componentCls:lt,margin:ut,colorBorderSecondary:gt,horizontalMargin:yt,verticalItemPadding:kt,verticalItemMargin:At}=He;return{[`${lt}-top, ${lt}-bottom`]:{flexDirection:"column",[`> ${lt}-nav, > div > ${lt}-nav`]:{margin:yt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${He.lineWidth}px ${He.lineType} ${gt}`,content:"''"},[`${lt}-ink-bar`]:{height:He.lineWidthBold,"&-animated":{transition:`width ${He.motionDurationSlow}, left ${He.motionDurationSlow},
|
|
|
right ${He.motionDurationSlow}`}},[`${lt}-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},[`&${lt}-nav-wrap-ping-left::before`]:{opacity:1},[`&${lt}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${lt}-top`]:{[`> ${lt}-nav,
|
|
|
> div > ${lt}-nav`]:{"&::before":{bottom:0},[`${lt}-ink-bar`]:{bottom:0}}},[`${lt}-bottom`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{order:1,marginTop:`${ut}px`,marginBottom:0,"&::before":{top:0},[`${lt}-ink-bar`]:{top:0}},[`> ${lt}-content-holder, > div > ${lt}-content-holder`]:{order:0}},[`${lt}-left, ${lt}-right`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{flexDirection:"column",minWidth:He.controlHeight*1.25,[`${lt}-tab`]:{padding:kt,textAlign:"center"},[`${lt}-tab + ${lt}-tab`]:{margin:At},[`${lt}-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},[`&${lt}-nav-wrap-ping-top::before`]:{opacity:1},[`&${lt}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${lt}-ink-bar`]:{width:He.lineWidthBold,"&-animated":{transition:`height ${He.motionDurationSlow}, top ${He.motionDurationSlow}`}},[`${lt}-nav-list, ${lt}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${lt}-left`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${lt}-content-holder, > div > ${lt}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${He.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`},[`> ${lt}-content > ${lt}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:He.paddingLG}}}},[`${lt}-right`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{order:1,[`${lt}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${lt}-content-holder, > div > ${lt}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-He.lineWidth},borderRight:{_skip_check_:!0,value:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`},[`> ${lt}-content > ${lt}-tabpane`]:{paddingRight:{_skip_check_:!0,value:He.paddingLG}}}}}},Xi=He=>{const{componentCls:lt,cardPaddingSM:ut,cardPaddingLG:gt,horizontalItemPaddingSM:yt,horizontalItemPaddingLG:kt}=He;return{[lt]:{"&-small":{[`> ${lt}-nav`]:{[`${lt}-tab`]:{padding:yt,fontSize:He.titleFontSizeSM}}},"&-large":{[`> ${lt}-nav`]:{[`${lt}-tab`]:{padding:kt,fontSize:He.titleFontSizeLG}}}},[`${lt}-card`]:{[`&${lt}-small`]:{[`> ${lt}-nav`]:{[`${lt}-tab`]:{padding:ut}},[`&${lt}-bottom`]:{[`> ${lt}-nav ${lt}-tab`]:{borderRadius:`0 0 ${He.borderRadius}px ${He.borderRadius}px`}},[`&${lt}-top`]:{[`> ${lt}-nav ${lt}-tab`]:{borderRadius:`${He.borderRadius}px ${He.borderRadius}px 0 0`}},[`&${lt}-right`]:{[`> ${lt}-nav ${lt}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${He.borderRadius}px ${He.borderRadius}px 0`}}},[`&${lt}-left`]:{[`> ${lt}-nav ${lt}-tab`]:{borderRadius:{_skip_check_:!0,value:`${He.borderRadius}px 0 0 ${He.borderRadius}px`}}}},[`&${lt}-large`]:{[`> ${lt}-nav`]:{[`${lt}-tab`]:{padding:gt}}}}}},Ci=He=>{const{componentCls:lt,itemActiveColor:ut,itemHoverColor:gt,iconCls:yt,tabsHorizontalItemMargin:kt,horizontalItemPadding:At,itemSelectedColor:tn,itemColor:fn}=He,jn=`${lt}-tab`;return{[jn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:At,fontSize:He.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:fn,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:ut}},(0,Ao.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:gt},[`&${jn}-active ${jn}-btn`]:{color:tn,textShadow:He.tabsActiveTextShadow},[`&${jn}-disabled`]:{color:He.colorTextDisabled,cursor:"not-allowed"},[`&${jn}-disabled ${jn}-btn, &${jn}-disabled ${lt}-remove`]:{"&:focus, &:active":{color:He.colorTextDisabled}},[`& ${jn}-remove ${yt}`]:{margin:0},[yt]:{marginRight:{_skip_check_:!0,value:He.marginSM}}},[`${jn} + ${jn}`]:{margin:{_skip_check_:!0,value:kt}}}},_o=He=>{const{componentCls:lt,tabsHorizontalItemMarginRTL:ut,iconCls:gt,cardGutter:yt}=He;return{[`${lt}-rtl`]:{direction:"rtl",[`${lt}-nav`]:{[`${lt}-tab`]:{margin:{_skip_check_:!0,value:ut},[`${lt}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[gt]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${He.marginSM}px`}},[`${lt}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${He.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${He.marginXXS}px`},[gt]:{margin:0}}}},[`&${lt}-left`]:{[`> ${lt}-nav`]:{order:1},[`> ${lt}-content-holder`]:{order:0}},[`&${lt}-right`]:{[`> ${lt}-nav`]:{order:0},[`> ${lt}-content-holder`]:{order:1}},[`&${lt}-card${lt}-top, &${lt}-card${lt}-bottom`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-tab + ${lt}-tab`]:{marginRight:{_skip_check_:!0,value:yt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${lt}-dropdown-rtl`]:{direction:"rtl"},[`${lt}-menu-item`]:{[`${lt}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},To=He=>{const{componentCls:lt,tabsCardPadding:ut,cardHeight:gt,cardGutter:yt,itemHoverColor:kt,itemActiveColor:At,colorBorderSecondary:tn}=He;return{[lt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ao.Wf)(He)),{display:"flex",[`> ${lt}-nav, > div > ${lt}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${lt}-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"}},[`${lt}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${He.motionDurationSlow}`},[`${lt}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${lt}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${lt}-nav-more`]:{position:"relative",padding:ut,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:"''"}},[`${lt}-nav-add`]:Object.assign({minWidth:gt,marginLeft:{_skip_check_:!0,value:yt},padding:`0 ${He.paddingXS}px`,background:"transparent",border:`${He.lineWidth}px ${He.lineType} ${tn}`,borderRadius:`${He.borderRadiusLG}px ${He.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:He.colorText,transition:`all ${He.motionDurationSlow} ${He.motionEaseInOut}`,"&:hover":{color:kt},"&:active, &:focus:not(:focus-visible)":{color:At}},(0,Ao.Qy)(He))},[`${lt}-extra-content`]:{flex:"none"},[`${lt}-ink-bar`]:{position:"absolute",background:He.inkBarColor,pointerEvents:"none"}}),Ci(He)),{[`${lt}-content`]:{position:"relative",width:"100%"},[`${lt}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${lt}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${lt}-centered`]:{[`> ${lt}-nav, > div > ${lt}-nav`]:{[`${lt}-nav-wrap`]:{[`&:not([class*='${lt}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Ko=(0,pn.Z)("Tabs",He=>{const lt=(0,sn.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[Xi(lt),_o(lt),ji(lt),_i(lt),vi(lt),To(lt),Cr(lt)]},He=>{const lt=He.controlHeightLG;return{zIndexPopup:He.zIndexPopupBase+50,cardBg:He.colorFillAlter,cardHeight:lt,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}}),Tn=function(He,lt){var ut={};for(var gt in He)Object.prototype.hasOwnProperty.call(He,gt)&<.indexOf(gt)<0&&(ut[gt]=He[gt]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yt=0,gt=Object.getOwnPropertySymbols(He);yt<gt.length;yt++)lt.indexOf(gt[yt])<0&&Object.prototype.propertyIsEnumerable.call(He,gt[yt])&&(ut[gt[yt]]=He[gt[yt]]);return ut};const Bn=He=>{const{type:lt,className:ut,rootClassName:gt,size:yt,onEdit:kt,hideAdd:At,centered:tn,addIcon:fn,popupClassName:jn,children:qn,items:Kn,animated:An,style:Dn,indicatorSize:wn}=He,Un=Tn(He,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:vr,moreIcon:er=me.createElement(Se.Z,null)}=Un,{direction:ir,tabs:fr,getPrefixCls:_t,getPopupContainer:vt}=me.useContext(bo.E_),Xe=_t("tabs",vr),[ot,Nt]=Ko(Xe);let Pt;lt==="editable-card"&&(Pt={onEdit:(vn,Fn)=>{let{key:Gn,event:xr}=Fn;kt==null||kt(vn==="add"?xr:Gn,vn)},removeIcon:me.createElement(te.Z,null),addIcon:fn||me.createElement(Le.Z,null),showAdd:At!==!0});const qt=_t(),hn=Ia(Kn,qn),gn=Ho(Xe,An),Nn=(0,oo.Z)(yt),On=Object.assign(Object.assign({},fr==null?void 0:fr.style),Dn);return ot(me.createElement(Jo,Object.assign({direction:ir,getPopupContainer:vt,moreTransitionName:`${qt}-slide-up`},Un,{items:hn,className:ce()({[`${Xe}-${Nn}`]:Nn,[`${Xe}-card`]:["card","editable-card"].includes(lt),[`${Xe}-editable-card`]:lt==="editable-card",[`${Xe}-centered`]:tn},fr==null?void 0:fr.className,ut,gt,Nt),popupClassName:ce()(jn,Nt),style:On,editable:Pt,moreIcon:er,prefixCls:Xe,animated:gn,indicatorSize:wn!=null?wn:fr==null?void 0:fr.indicatorSize})))};Bn.TabPane=Eo;var Qn=Bn},66309:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return dt}});var te=ee(67294),Se=ee(73475),Le=ee(94184),Ce=ee.n(Le),ce=ee(98787),fe=ee(69760),ae=ee(45353),le=ee(53124),re=ee(14747),de=ee(45503),he=ee(67968);const me=Ke=>{const{paddingXXS:zt,lineWidth:pt,tagPaddingHorizontal:Kt,componentCls:Ze}=Ke,tt=Kt-pt,ft=zt-pt;return{[Ze]:Object.assign(Object.assign({},(0,re.Wf)(Ke)),{display:"inline-block",height:"auto",marginInlineEnd:Ke.marginXS,paddingInline:tt,fontSize:Ke.tagFontSize,lineHeight:Ke.tagLineHeight,whiteSpace:"nowrap",background:Ke.defaultBg,border:`${Ke.lineWidth}px ${Ke.lineType} ${Ke.colorBorder}`,borderRadius:Ke.borderRadiusSM,opacity:1,transition:`all ${Ke.motionDurationMid}`,textAlign:"start",position:"relative",[`&${Ze}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ke.defaultColor},[`${Ze}-close-icon`]:{marginInlineStart:ft,color:Ke.colorTextDescription,fontSize:Ke.tagIconSize,cursor:"pointer",transition:`all ${Ke.motionDurationMid}`,"&:hover":{color:Ke.colorTextHeading}},[`&${Ze}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ke.iconCls}-close, ${Ke.iconCls}-close:hover`]:{color:Ke.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${Ze}-checkable-checked):hover`]:{color:Ke.colorPrimary,backgroundColor:Ke.colorFillSecondary},"&:active, &-checked":{color:Ke.colorTextLightSolid},"&-checked":{backgroundColor:Ke.colorPrimary,"&:hover":{backgroundColor:Ke.colorPrimaryHover}},"&:active":{backgroundColor:Ke.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ke.iconCls} + span, > span + ${Ke.iconCls}`]:{marginInlineStart:tt}}),[`${Ze}-borderless`]:{borderColor:"transparent",background:Ke.tagBorderlessBg}}},se=Ke=>{const{lineWidth:zt,fontSizeIcon:pt}=Ke,Kt=Ke.fontSizeSM,Ze=`${Ke.lineHeightSM*Kt}px`;return(0,de.TS)(Ke,{tagFontSize:Kt,tagLineHeight:Ze,tagIconSize:pt-2*zt,tagPaddingHorizontal:8,tagBorderlessBg:Ke.colorFillTertiary})},ye=Ke=>({defaultBg:Ke.colorFillQuaternary,defaultColor:Ke.colorText});var _e=(0,he.Z)("Tag",Ke=>{const zt=se(Ke);return me(zt)},ye),Me=function(Ke,zt){var pt={};for(var Kt in Ke)Object.prototype.hasOwnProperty.call(Ke,Kt)&&zt.indexOf(Kt)<0&&(pt[Kt]=Ke[Kt]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Kt=Object.getOwnPropertySymbols(Ke);Ze<Kt.length;Ze++)zt.indexOf(Kt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Kt[Ze])&&(pt[Kt[Ze]]=Ke[Kt[Ze]]);return pt},Fe=Ke=>{const{prefixCls:zt,style:pt,className:Kt,checked:Ze,onChange:tt,onClick:ft}=Ke,Ut=Me(Ke,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:nt,tag:Ge}=te.useContext(le.E_),jt=Jt=>{tt==null||tt(!Ze),ft==null||ft(Jt)},yn=nt("tag",zt),[ln,Tt]=_e(yn),Lt=Ce()(yn,`${yn}-checkable`,{[`${yn}-checkable-checked`]:Ze},Ge==null?void 0:Ge.className,Kt,Tt);return ln(te.createElement("span",Object.assign({},Ut,{style:Object.assign(Object.assign({},pt),Ge==null?void 0:Ge.style),className:Lt,onClick:jt})))},$e=ee(98719);const Te=Ke=>(0,$e.Z)(Ke,(zt,pt)=>{let{textColor:Kt,lightBorderColor:Ze,lightColor:tt,darkColor:ft}=pt;return{[`${Ke.componentCls}-${zt}`]:{color:Kt,background:tt,borderColor:Ze,"&-inverse":{color:Ke.colorTextLightSolid,background:ft,borderColor:ft},[`&${Ke.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ze=(0,he.b)(["Tag","preset"],Ke=>{const zt=se(Ke);return Te(zt)},ye);function Ee(Ke){return typeof Ke!="string"?Ke:Ke.charAt(0).toUpperCase()+Ke.slice(1)}const be=(Ke,zt,pt)=>{const Kt=Ee(pt);return{[`${Ke.componentCls}-${zt}`]:{color:Ke[`color${pt}`],background:Ke[`color${Kt}Bg`],borderColor:Ke[`color${Kt}Border`],[`&${Ke.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Re=(0,he.b)(["Tag","status"],Ke=>{const zt=se(Ke);return[be(zt,"success","Success"),be(zt,"processing","Info"),be(zt,"error","Error"),be(zt,"warning","Warning")]},ye),De=function(Ke,zt){var pt={};for(var Kt in Ke)Object.prototype.hasOwnProperty.call(Ke,Kt)&&zt.indexOf(Kt)<0&&(pt[Kt]=Ke[Kt]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Kt=Object.getOwnPropertySymbols(Ke);Ze<Kt.length;Ze++)zt.indexOf(Kt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Kt[Ze])&&(pt[Kt[Ze]]=Ke[Kt[Ze]]);return pt};const et=(Ke,zt)=>{const{prefixCls:pt,className:Kt,rootClassName:Ze,style:tt,children:ft,icon:Ut,color:nt,onClose:Ge,closeIcon:jt,closable:yn,bordered:ln=!0}=Ke,Tt=De(Ke,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Lt,direction:Jt,tag:kn}=te.useContext(le.E_),[In,Qt]=te.useState(!0);te.useEffect(()=>{"visible"in Tt&&Qt(Tt.visible)},[Tt.visible]);const Mn=(0,ce.o2)(nt),Wn=(0,ce.yT)(nt),zn=Mn||Wn,at=Object.assign(Object.assign({backgroundColor:nt&&!zn?nt:void 0},kn==null?void 0:kn.style),tt),Oe=Lt("tag",pt),[ke,Be]=_e(Oe),Ne=Ce()(Oe,kn==null?void 0:kn.className,{[`${Oe}-${nt}`]:zn,[`${Oe}-has-color`]:nt&&!zn,[`${Oe}-hidden`]:!In,[`${Oe}-rtl`]:Jt==="rtl",[`${Oe}-borderless`]:!ln},Kt,Ze,Be),we=wt=>{wt.stopPropagation(),Ge==null||Ge(wt),!wt.defaultPrevented&&Qt(!1)},[,rt]=(0,fe.Z)(yn,jt,wt=>wt===null?te.createElement(Se.Z,{className:`${Oe}-close-icon`,onClick:we}):te.createElement("span",{className:`${Oe}-close-icon`,onClick:we},wt),null,!1),It=typeof Tt.onClick=="function"||ft&&ft.type==="a",Ct=Ut||null,$t=Ct?te.createElement(te.Fragment,null,Ct,ft&&te.createElement("span",null,ft)):ft,Vt=te.createElement("span",Object.assign({},Tt,{ref:zt,className:Ne,style:at}),$t,rt,Mn&&te.createElement(ze,{key:"preset",prefixCls:Oe}),Wn&&te.createElement(Re,{key:"status",prefixCls:Oe}));return ke(It?te.createElement(ae.Z,{component:"Tag"},Vt):Vt)},Ye=te.forwardRef(et);Ye.CheckableTag=Fe;var dt=Ye},79870:function(dn,St,ee){"use strict";ee.d(St,{default:function(){return Ko}});var te=ee(87462),Se=ee(4942),Le=ee(71002),Ce=ee(1413),ce=ee(74902),fe=ee(15671),ae=ee(43144),le=ee(97326),re=ee(60136),de=ee(51630),he=ee(94184),me=ee.n(he),se={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 Qn=Bn.keyCode;if(Bn.altKey&&!Bn.ctrlKey||Bn.metaKey||Qn>=se.F1&&Qn<=se.F12)return!1;switch(Qn){case se.ALT:case se.CAPS_LOCK:case se.CONTEXT_MENU:case se.CTRL:case se.DOWN:case se.END:case se.ESC:case se.HOME:case se.INSERT:case se.LEFT:case se.MAC_FF_META:case se.META:case se.NUMLOCK:case se.NUM_CENTER:case se.PAGE_DOWN:case se.PAGE_UP:case se.PAUSE:case se.PRINT_SCREEN:case se.RIGHT:case se.SHIFT:case se.UP:case se.WIN_KEY:case se.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Bn){if(Bn>=se.ZERO&&Bn<=se.NINE||Bn>=se.NUM_ZERO&&Bn<=se.NUM_MULTIPLY||Bn>=se.A&&Bn<=se.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Bn===0)return!0;switch(Bn){case se.SPACE:case se.QUESTION_MARK:case se.NUM_PLUS:case se.NUM_MINUS:case se.NUM_PERIOD:case se.NUM_DIVISION:case se.SEMICOLON:case se.DASH:case se.EQUALS:case se.COMMA:case se.PERIOD:case se.SLASH:case se.APOSTROPHE:case se.SINGLE_QUOTE:case se.OPEN_SQUARE_BRACKET:case se.BACKSLASH:case se.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ye=se,_e=ee(34952),Me=ee(72978),ve=ee(67294),Fe=ee(69610);function $e(Tn){var Bn=Tn.dropPosition,Qn=Tn.dropLevelOffset,He=Tn.indent,lt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bn){case-1:lt.top=0,lt.left=-Qn*He;break;case 1:lt.bottom=0,lt.left=-Qn*He;break;case 0:lt.bottom=0,lt.left=He;break}return ve.createElement("div",{style:lt})}var Te=ee(36459),ze=ee(97685),Ee=ee(45987);function be(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Re=be()?ve.useLayoutEffect:ve.useEffect,De=Re,et=function(Bn,Qn){var He=React.useRef(!0);Re(function(){if(!He.current)return Bn()},Qn),Re(function(){return He.current=!1,function(){He.current=!0}},[])},Ye=ee(73299),dt=ee(73935);function Ke(Tn){return Tn instanceof HTMLElement||Tn instanceof SVGElement}function zt(Tn){return Ke(Tn)?Tn:Tn instanceof ve.Component?dt.findDOMNode(Tn):null}var pt=ee(28580);function Kt(Tn,Bn,Qn){var He=React.useRef({});return(!("value"in He.current)||Qn(He.current.condition,Bn))&&(He.current.value=Tn(),He.current.condition=Bn),He.current.value}function Ze(Tn,Bn){typeof Tn=="function"?Tn(Bn):(0,Le.Z)(Tn)==="object"&&Tn&&"current"in Tn&&(Tn.current=Bn)}function tt(){for(var Tn=arguments.length,Bn=new Array(Tn),Qn=0;Qn<Tn;Qn++)Bn[Qn]=arguments[Qn];var He=Bn.filter(function(lt){return lt});return He.length<=1?He[0]:function(lt){Bn.forEach(function(ut){Ze(ut,lt)})}}function ft(){for(var Tn=arguments.length,Bn=new Array(Tn),Qn=0;Qn<Tn;Qn++)Bn[Qn]=arguments[Qn];return useMemo(function(){return tt.apply(void 0,Bn)},Bn,function(He,lt){return He.length===lt.length&&He.every(function(ut,gt){return ut===lt[gt]})})}function Ut(Tn){var Bn,Qn,He=(0,pt.isMemo)(Tn)?Tn.type.type:Tn.type;return!(typeof He=="function"&&!((Bn=He.prototype)!==null&&Bn!==void 0&&Bn.render)||typeof Tn=="function"&&!((Qn=Tn.prototype)!==null&&Qn!==void 0&&Qn.render))}function nt(Tn,Bn){var Qn={};return Qn[Tn.toLowerCase()]=Bn.toLowerCase(),Qn["Webkit".concat(Tn)]="webkit".concat(Bn),Qn["Moz".concat(Tn)]="moz".concat(Bn),Qn["ms".concat(Tn)]="MS".concat(Bn),Qn["O".concat(Tn)]="o".concat(Bn.toLowerCase()),Qn}function Ge(Tn,Bn){var Qn={animationend:nt("Animation","AnimationEnd"),transitionend:nt("Transition","TransitionEnd")};return Tn&&("AnimationEvent"in Bn||delete Qn.animationend.animation,"TransitionEvent"in Bn||delete Qn.transitionend.transition),Qn}var jt=Ge(be(),typeof window!="undefined"?window:{}),yn={};if(be()){var ln=document.createElement("div");yn=ln.style}var Tt={};function Lt(Tn){if(Tt[Tn])return Tt[Tn];var Bn=jt[Tn];if(Bn)for(var Qn=Object.keys(Bn),He=Qn.length,lt=0;lt<He;lt+=1){var ut=Qn[lt];if(Object.prototype.hasOwnProperty.call(Bn,ut)&&ut in yn)return Tt[Tn]=Bn[ut],Tt[Tn]}return""}var Jt=Lt("animationend"),kn=Lt("transitionend"),In=!!(Jt&&kn),Qt=Jt||"animationend",Mn=kn||"transitionend";function Wn(Tn,Bn){if(!Tn)return null;if((0,Le.Z)(Tn)==="object"){var Qn=Bn.replace(/-\w/g,function(He){return He[1].toUpperCase()});return Tn[Qn]}return"".concat(Tn,"-").concat(Bn)}var zn="none",at="appear",Oe="enter",ke="leave",Be="none",Ne="prepare",we="start",rt="active",It="end";function Ct(Tn){var Bn=ve.useRef(!1),Qn=ve.useState(Tn),He=(0,ze.Z)(Qn,2),lt=He[0],ut=He[1];ve.useEffect(function(){return Bn.current=!1,function(){Bn.current=!0}},[]);function gt(yt,kt){kt&&Bn.current||ut(yt)}return[lt,gt]}var $t=function(Bn){return+setTimeout(Bn,16)},Vt=function(Bn){return clearTimeout(Bn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&($t=function(Bn){return window.requestAnimationFrame(Bn)},Vt=function(Bn){return window.cancelAnimationFrame(Bn)});var wt=0,on=new Map;function Dt(Tn){on.delete(Tn)}var Xt=function(Bn){var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;wt+=1;var He=wt;function lt(ut){if(ut===0)Dt(He),Bn();else{var gt=$t(function(){lt(ut-1)});on.set(He,gt)}}return lt(Qn),He};Xt.cancel=function(Tn){var Bn=on.get(Tn);return Dt(Bn),Vt(Bn)};var nn=Xt,bn=function(){var Tn=ve.useRef(null);function Bn(){nn.cancel(Tn.current)}function Qn(He){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Bn();var ut=nn(function(){lt<=1?He({isCanceled:function(){return ut!==Tn.current}}):Qn(He,lt-1)});Tn.current=ut}return ve.useEffect(function(){return function(){Bn()}},[]),[Qn,Bn]},en=be()?ve.useLayoutEffect:ve.useEffect,Zn=en,Yn=[Ne,we,rt,It],pr=!1,ti=!0;function Pn(Tn){return Tn===rt||Tn===It}var Or=function(Tn,Bn){var Qn=Ct(Be),He=(0,ze.Z)(Qn,2),lt=He[0],ut=He[1],gt=bn(),yt=(0,ze.Z)(gt,2),kt=yt[0],At=yt[1];function tn(){ut(Ne,!0)}return Zn(function(){if(lt!==Be&<!==It){var fn=Yn.indexOf(lt),jn=Yn[fn+1],qn=Bn(lt);qn===pr?ut(jn,!0):kt(function(Kn){function An(){Kn.isCanceled()||ut(jn,!0)}qn===!0?An():Promise.resolve(qn).then(An)})}},[Tn,lt]),ve.useEffect(function(){return function(){At()}},[]),[tn,lt]},Br=function(Tn){var Bn=(0,ve.useRef)(),Qn=(0,ve.useRef)(Tn);Qn.current=Tn;var He=ve.useCallback(function(gt){Qn.current(gt)},[]);function lt(gt){gt&&(gt.removeEventListener(Mn,He),gt.removeEventListener(Qt,He))}function ut(gt){Bn.current&&Bn.current!==gt&<(Bn.current),gt&>!==Bn.current&&(gt.addEventListener(Mn,He),gt.addEventListener(Qt,He),Bn.current=gt)}return ve.useEffect(function(){return function(){lt(Bn.current)}},[]),[ut,lt]};function Di(Tn,Bn,Qn,He){var lt=He.motionEnter,ut=lt===void 0?!0:lt,gt=He.motionAppear,yt=gt===void 0?!0:gt,kt=He.motionLeave,At=kt===void 0?!0:kt,tn=He.motionDeadline,fn=He.motionLeaveImmediately,jn=He.onAppearPrepare,qn=He.onEnterPrepare,Kn=He.onLeavePrepare,An=He.onAppearStart,Dn=He.onEnterStart,wn=He.onLeaveStart,Un=He.onAppearActive,vr=He.onEnterActive,er=He.onLeaveActive,ir=He.onAppearEnd,fr=He.onEnterEnd,_t=He.onLeaveEnd,vt=He.onVisibleChanged,Xe=Ct(),ot=(0,ze.Z)(Xe,2),Nt=ot[0],Pt=ot[1],qt=Ct(zn),hn=(0,ze.Z)(qt,2),gn=hn[0],Nn=hn[1],On=Ct(null),vn=(0,ze.Z)(On,2),Fn=vn[0],Gn=vn[1],xr=(0,ve.useRef)(!1),sr=(0,ve.useRef)(null);function Lr(){return Qn()}var Ur=(0,ve.useRef)(!1);function Pr(Mi){var Ai=Lr();if(!(Mi&&!Mi.deadline&&Mi.target!==Ai)){var pi=Ur.current,zi;gn===at&&pi?zi=ir==null?void 0:ir(Ai,Mi):gn===Oe&&pi?zi=fr==null?void 0:fr(Ai,Mi):gn===ke&&pi&&(zi=_t==null?void 0:_t(Ai,Mi)),gn!==zn&&pi&&zi!==!1&&(Nn(zn,!0),Gn(null,!0))}}var Qr=Br(Pr),Tr=(0,ze.Z)(Qr,1),Wr=Tr[0],ni=ve.useMemo(function(){var Mi,Ai,pi;switch(gn){case at:return Mi={},(0,Se.Z)(Mi,Ne,jn),(0,Se.Z)(Mi,we,An),(0,Se.Z)(Mi,rt,Un),Mi;case Oe:return Ai={},(0,Se.Z)(Ai,Ne,qn),(0,Se.Z)(Ai,we,Dn),(0,Se.Z)(Ai,rt,vr),Ai;case ke:return pi={},(0,Se.Z)(pi,Ne,Kn),(0,Se.Z)(pi,we,wn),(0,Se.Z)(pi,rt,er),pi;default:return{}}},[gn]),Si=Or(gn,function(Mi){if(Mi===Ne){var Ai=ni[Ne];return Ai?Ai(Lr()):pr}if(gi in ni){var pi;Gn(((pi=ni[gi])===null||pi===void 0?void 0:pi.call(ni,Lr(),null))||null)}return gi===rt&&(Wr(Lr()),tn>0&&(clearTimeout(sr.current),sr.current=setTimeout(function(){Pr({deadline:!0})},tn))),ti}),Nr=(0,ze.Z)(Si,2),wi=Nr[0],gi=Nr[1],vo=Pn(gi);Ur.current=vo,Zn(function(){Pt(Bn);var Mi=xr.current;if(xr.current=!0,!!Tn){var Ai;!Mi&&Bn&&yt&&(Ai=at),Mi&&Bn&&ut&&(Ai=Oe),(Mi&&!Bn&&At||!Mi&&fn&&!Bn&&At)&&(Ai=ke),Ai&&(Nn(Ai),wi())}},[Bn]),(0,ve.useEffect)(function(){(gn===at&&!yt||gn===Oe&&!ut||gn===ke&&!At)&&Nn(zn)},[yt,ut,At]),(0,ve.useEffect)(function(){return function(){xr.current=!1,clearTimeout(sr.current)}},[]);var Ji=ve.useRef(!1);(0,ve.useEffect)(function(){Nt&&(Ji.current=!0),Nt!==void 0&&gn===zn&&((Ji.current||Nt)&&(vt==null||vt(Nt)),Ji.current=!0)},[Nt,gn]);var Pi=Fn;return ni[Ne]&&gi===we&&(Pi=(0,Ce.Z)({transition:"none"},Pi)),[gn,gi,Pi,Nt!=null?Nt:Bn]}var mi=function(Tn){(0,re.Z)(Qn,Tn);var Bn=(0,de.Z)(Qn);function Qn(){return(0,fe.Z)(this,Qn),Bn.apply(this,arguments)}return(0,ae.Z)(Qn,[{key:"render",value:function(){return this.props.children}}]),Qn}(ve.Component),ci=mi;function Fr(Tn){var Bn=Tn;(0,Le.Z)(Tn)==="object"&&(Bn=Tn.transitionSupport);function Qn(lt){return!!(lt.motionName&&Bn)}var He=ve.forwardRef(function(lt,ut){var gt=lt.visible,yt=gt===void 0?!0:gt,kt=lt.removeOnLeave,At=kt===void 0?!0:kt,tn=lt.forceRender,fn=lt.children,jn=lt.motionName,qn=lt.leavedClassName,Kn=lt.eventProps,An=Qn(lt),Dn=(0,ve.useRef)(),wn=(0,ve.useRef)();function Un(){try{return Dn.current instanceof HTMLElement?Dn.current:zt(wn.current)}catch(On){return null}}var vr=Di(An,yt,Un,lt),er=(0,ze.Z)(vr,4),ir=er[0],fr=er[1],_t=er[2],vt=er[3],Xe=ve.useRef(vt);vt&&(Xe.current=!0);var ot=ve.useCallback(function(On){Dn.current=On,Ze(ut,On)},[ut]),Nt,Pt=(0,Ce.Z)((0,Ce.Z)({},Kn),{},{visible:yt});if(!fn)Nt=null;else if(ir===zn||!Qn(lt))vt?Nt=fn((0,Ce.Z)({},Pt),ot):!At&&Xe.current&&qn?Nt=fn((0,Ce.Z)((0,Ce.Z)({},Pt),{},{className:qn}),ot):tn||!At&&!qn?Nt=fn((0,Ce.Z)((0,Ce.Z)({},Pt),{},{style:{display:"none"}}),ot):Nt=null;else{var qt,hn;fr===Ne?hn="prepare":Pn(fr)?hn="active":fr===we&&(hn="start"),Nt=fn((0,Ce.Z)((0,Ce.Z)({},Pt),{},{className:me()(Wn(jn,ir),(qt={},(0,Se.Z)(qt,Wn(jn,"".concat(ir,"-").concat(hn)),hn),(0,Se.Z)(qt,jn,typeof jn=="string"),qt)),style:_t}),ot)}if(ve.isValidElement(Nt)&&Ut(Nt)){var gn=Nt,Nn=gn.ref;Nn||(Nt=ve.cloneElement(Nt,{ref:ot}))}return ve.createElement(ci,{ref:wn},Nt)});return He.displayName="CSSMotion",He}var zr=Fr(In),Fi="add",ko="keep",aa="remove",Wo="removed";function li(Tn){var Bn;return Tn&&(0,Le.Z)(Tn)==="object"&&"key"in Tn?Bn=Tn:Bn={key:Tn},(0,Ce.Z)((0,Ce.Z)({},Bn),{},{key:String(Bn.key)})}function rn(){var Tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Tn.map(li)}function nr(){var Tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Qn=[],He=0,lt=Bn.length,ut=rn(Tn),gt=rn(Bn);ut.forEach(function(At){for(var tn=!1,fn=He;fn<lt;fn+=1){var jn=gt[fn];if(jn.key===At.key){He<fn&&(Qn=Qn.concat(gt.slice(He,fn).map(function(qn){return(0,Ce.Z)((0,Ce.Z)({},qn),{},{status:Fi})})),He=fn),Qn.push((0,Ce.Z)((0,Ce.Z)({},jn),{},{status:ko})),He+=1,tn=!0;break}}tn||Qn.push((0,Ce.Z)((0,Ce.Z)({},At),{},{status:aa}))}),He<lt&&(Qn=Qn.concat(gt.slice(He).map(function(At){return(0,Ce.Z)((0,Ce.Z)({},At),{},{status:Fi})})));var yt={};Qn.forEach(function(At){var tn=At.key;yt[tn]=(yt[tn]||0)+1});var kt=Object.keys(yt).filter(function(At){return yt[At]>1});return kt.forEach(function(At){Qn=Qn.filter(function(tn){var fn=tn.key,jn=tn.status;return fn!==At||jn!==aa}),Qn.forEach(function(tn){tn.key===At&&(tn.status=ko)})}),Qn}var dr=["component","children","onVisibleChanged","onAllRemoved"],rr=["status"],Jr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ar(Tn){var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zr,Qn=function(He){(0,re.Z)(ut,He);var lt=(0,de.Z)(ut);function ut(){var gt;(0,fe.Z)(this,ut);for(var yt=arguments.length,kt=new Array(yt),At=0;At<yt;At++)kt[At]=arguments[At];return gt=lt.call.apply(lt,[this].concat(kt)),(0,Se.Z)((0,le.Z)(gt),"state",{keyEntities:[]}),(0,Se.Z)((0,le.Z)(gt),"removeKey",function(tn){var fn=gt.state.keyEntities,jn=fn.map(function(qn){return qn.key!==tn?qn:(0,Ce.Z)((0,Ce.Z)({},qn),{},{status:Wo})});return gt.setState({keyEntities:jn}),jn.filter(function(qn){var Kn=qn.status;return Kn!==Wo}).length}),gt}return(0,ae.Z)(ut,[{key:"render",value:function(){var yt=this,kt=this.state.keyEntities,At=this.props,tn=At.component,fn=At.children,jn=At.onVisibleChanged,qn=At.onAllRemoved,Kn=(0,Ee.Z)(At,dr),An=tn||ve.Fragment,Dn={};return Jr.forEach(function(wn){Dn[wn]=Kn[wn],delete Kn[wn]}),delete Kn.keys,ve.createElement(An,Kn,kt.map(function(wn){var Un=wn.status,vr=(0,Ee.Z)(wn,rr),er=Un===Fi||Un===ko;return ve.createElement(Bn,(0,te.Z)({},Dn,{key:vr.key,visible:er,eventProps:vr,onVisibleChanged:function(fr){if(jn==null||jn(fr,{key:vr.key}),!fr){var _t=yt.removeKey(vr.key);_t===0&&qn&&qn()}}}),fn)}))}}],[{key:"getDerivedStateFromProps",value:function(yt,kt){var At=yt.keys,tn=kt.keyEntities,fn=rn(At),jn=nr(tn,fn);return{keyEntities:jn.filter(function(qn){var Kn=tn.find(function(An){var Dn=An.key;return qn.key===Dn});return!(Kn&&Kn.status===Wo&&qn.status===aa)})}}}]),ut}(ve.Component);return(0,Se.Z)(Qn,"defaultProps",{component:"div"}),Qn}var Mr=Ar(In),tr=zr,Zt=ee(56261);function Ot(Tn,Bn){var Qn=ve.useState(!1),He=(0,ze.Z)(Qn,2),lt=He[0],ut=He[1];ve.useLayoutEffect(function(){if(lt)return Tn(),function(){Bn()}},[lt]),ve.useLayoutEffect(function(){return ut(!0),function(){ut(!1)}},[])}var ge=ee(83898),Ie=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ae=function(Bn,Qn){var He=Bn.className,lt=Bn.style,ut=Bn.motion,gt=Bn.motionNodes,yt=Bn.motionType,kt=Bn.onMotionStart,At=Bn.onMotionEnd,tn=Bn.active,fn=Bn.treeNodeRequiredProps,jn=(0,Ee.Z)(Bn,Ie),qn=ve.useState(!0),Kn=(0,ze.Z)(qn,2),An=Kn[0],Dn=Kn[1],wn=ve.useContext(Fe.k),Un=wn.prefixCls,vr=gt&&yt!=="hide";De(function(){gt&&vr!==An&&Dn(vr)},[gt]);var er=function(){gt&&kt()},ir=ve.useRef(!1),fr=function(){gt&&!ir.current&&(ir.current=!0,At())};Ot(er,fr);var _t=function(Xe){vr===Xe&&fr()};return gt?ve.createElement(tr,(0,te.Z)({ref:Qn,visible:An},ut,{motionAppear:yt==="show",onVisibleChanged:_t}),function(vt,Xe){var ot=vt.className,Nt=vt.style;return ve.createElement("div",{ref:Xe,className:me()("".concat(Un,"-treenode-motion"),ot),style:Nt},gt.map(function(Pt){var qt=(0,te.Z)({},((0,Te.Z)(Pt.data),Pt.data)),hn=Pt.title,gn=Pt.key,Nn=Pt.isStart,On=Pt.isEnd;delete qt.children;var vn=(0,ge.H8)(gn,fn);return ve.createElement(Zt.Z,(0,te.Z)({},qt,vn,{title:hn,active:tn,data:Pt.data,key:gn,isStart:Nn,isEnd:On}))}))}):ve.createElement(Zt.Z,(0,te.Z)({domRef:Qn,className:He,style:lt},jn,{active:tn}))};Ae.displayName="MotionTreeNode";var We=ve.forwardRef(Ae),it=We;function xt(){var Tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Qn=Tn.length,He=Bn.length;if(Math.abs(Qn-He)!==1)return{add:!1,key:null};function lt(ut,gt){var yt=new Map;ut.forEach(function(At){yt.set(At,!0)});var kt=gt.filter(function(At){return!yt.has(At)});return kt.length===1?kt[0]:null}return Qn<He?{add:!0,key:lt(Tn,Bn)}:{add:!1,key:lt(Bn,Tn)}}function Ft(Tn,Bn,Qn){var He=Tn.findIndex(function(yt){return yt.key===Qn}),lt=Tn[He+1],ut=Bn.findIndex(function(yt){return yt.key===Qn});if(lt){var gt=Bn.findIndex(function(yt){return yt.key===lt.key});return Bn.slice(ut+1,gt)}return Bn.slice(ut+1)}var an=["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"],Rn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},mr=function(){},or="RC_TREE_MOTION_".concat(Math.random()),cr={key:or},Xn={key:or,level:0,index:0,pos:"0",node:cr,nodes:[cr]},br={parent:null,children:[],pos:Xn.pos,data:cr,title:null,key:or,isStart:[],isEnd:[]};function _r(Tn,Bn,Qn,He){return Bn===!1||!Qn?Tn:Tn.slice(0,Math.ceil(Qn/He)+1)}function mn(Tn){var Bn=Tn.key,Qn=Tn.pos;return(0,ge.km)(Bn,Qn)}function $n(Tn){for(var Bn=String(Tn.data.key),Qn=Tn;Qn.parent;)Qn=Qn.parent,Bn="".concat(Qn.data.key," > ").concat(Bn);return Bn}var Vr=ve.forwardRef(function(Tn,Bn){var Qn=Tn.prefixCls,He=Tn.data,lt=Tn.selectable,ut=Tn.checkable,gt=Tn.expandedKeys,yt=Tn.selectedKeys,kt=Tn.checkedKeys,At=Tn.loadedKeys,tn=Tn.loadingKeys,fn=Tn.halfCheckedKeys,jn=Tn.keyEntities,qn=Tn.disabled,Kn=Tn.dragging,An=Tn.dragOverNodeKey,Dn=Tn.dropPosition,wn=Tn.motion,Un=Tn.height,vr=Tn.itemHeight,er=Tn.virtual,ir=Tn.focusable,fr=Tn.activeItem,_t=Tn.focused,vt=Tn.tabIndex,Xe=Tn.onKeyDown,ot=Tn.onFocus,Nt=Tn.onBlur,Pt=Tn.onActiveChange,qt=Tn.onListChangeStart,hn=Tn.onListChangeEnd,gn=(0,Ee.Z)(Tn,an),Nn=ve.useRef(null),On=ve.useRef(null);ve.useImperativeHandle(Bn,function(){return{scrollTo:function(Ui){Nn.current.scrollTo(Ui)},getIndentWidth:function(){return On.current.offsetWidth}}});var vn=ve.useState(gt),Fn=(0,ze.Z)(vn,2),Gn=Fn[0],xr=Fn[1],sr=ve.useState(He),Lr=(0,ze.Z)(sr,2),Ur=Lr[0],Pr=Lr[1],Qr=ve.useState(He),Tr=(0,ze.Z)(Qr,2),Wr=Tr[0],ni=Tr[1],Si=ve.useState([]),Nr=(0,ze.Z)(Si,2),wi=Nr[0],gi=Nr[1],vo=ve.useState(null),Ji=(0,ze.Z)(vo,2),Pi=Ji[0],Mi=Ji[1],Ai=ve.useRef(He);Ai.current=He;function pi(){var ii=Ai.current;Pr(ii),ni(ii),gi([]),Mi(null),hn()}De(function(){xr(gt);var ii=xt(Gn,gt);if(ii.key!==null)if(ii.add){var Ui=Ur.findIndex(function(Zi){var Ii=Zi.key;return Ii===ii.key}),to=_r(Ft(Ur,He,ii.key),er,Un,vr),la=Ur.slice();la.splice(Ui+1,0,br),ni(la),gi(to),Mi("show")}else{var da=He.findIndex(function(Zi){var Ii=Zi.key;return Ii===ii.key}),So=_r(Ft(He,Ur,ii.key),er,Un,vr),go=He.slice();go.splice(da+1,0,br),ni(go),gi(So),Mi("hide")}else Ur!==He&&(Pr(He),ni(He))},[gt,He]),ve.useEffect(function(){Kn||pi()},[Kn]);var zi=wn?Wr:He,ai={expandedKeys:gt,selectedKeys:yt,loadedKeys:At,loadingKeys:tn,checkedKeys:kt,halfCheckedKeys:fn,dragOverNodeKey:An,dropPosition:Dn,keyEntities:jn};return ve.createElement(ve.Fragment,null,_t&&fr&&ve.createElement("span",{style:Rn,"aria-live":"assertive"},$n(fr)),ve.createElement("div",null,ve.createElement("input",{style:Rn,disabled:ir===!1||qn,tabIndex:ir!==!1?vt:null,onKeyDown:Xe,onFocus:ot,onBlur:Nt,value:"",onChange:mr,"aria-label":"for screen reader"})),ve.createElement("div",{className:"".concat(Qn,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ve.createElement("div",{className:"".concat(Qn,"-indent")},ve.createElement("div",{ref:On,className:"".concat(Qn,"-indent-unit")}))),ve.createElement(Ye.Z,(0,te.Z)({},gn,{data:zi,itemKey:mn,height:Un,fullHeight:!1,virtual:er,itemHeight:vr,prefixCls:"".concat(Qn,"-list"),ref:Nn,onVisibleChange:function(Ui,to){var la=new Set(Ui),da=to.filter(function(So){return!la.has(So)});da.some(function(So){return mn(So)===or})&&pi()}}),function(ii){var Ui=ii.pos,to=(0,te.Z)({},((0,Te.Z)(ii.data),ii.data)),la=ii.title,da=ii.key,So=ii.isStart,go=ii.isEnd,Zi=(0,ge.km)(da,Ui);delete to.key,delete to.children;var Ii=(0,ge.H8)(Zi,ai);return ve.createElement(it,(0,te.Z)({},to,Ii,{title:la,active:!!fr&&da===fr.key,pos:Ui,data:ii.data,isStart:So,isEnd:go,motion:wn,motionNodes:da===or?wi:null,motionType:Pi,onMotionStart:qt,onMotionEnd:pi,treeNodeRequiredProps:ai,onMouseMove:function(){Pt(null)}}))}))});Vr.displayName="NodeList";var qr=Vr,Ir=ee(29873),hi=ee(97153),Ni=ee(3596),yr=10,bi=function(Tn){(0,re.Z)(Qn,Tn);var Bn=(0,de.Z)(Qn);function Qn(){var He;(0,fe.Z)(this,Qn);for(var lt=arguments.length,ut=new Array(lt),gt=0;gt<lt;gt++)ut[gt]=arguments[gt];return He=Bn.call.apply(Bn,[this].concat(ut)),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,ge.w$)()},He.dragStartMousePosition=null,He.dragNode=void 0,He.currentMouseOverDroppableNodeKey=null,He.listRef=ve.createRef(),He.onNodeDragStart=function(yt,kt){var At=He.state,tn=At.expandedKeys,fn=At.keyEntities,jn=He.props.onDragStart,qn=kt.props.eventKey;He.dragNode=kt,He.dragStartMousePosition={x:yt.clientX,y:yt.clientY};var Kn=(0,Ir._5)(tn,qn);He.setState({draggingNodeKey:qn,dragChildrenKeys:(0,Ir.wA)(qn,fn),indent:He.listRef.current.getIndentWidth()}),He.setExpandedKeys(Kn),window.addEventListener("dragend",He.onWindowDragEnd),jn==null||jn({event:yt,node:(0,ge.F)(kt.props)})},He.onNodeDragEnter=function(yt,kt){var At=He.state,tn=At.expandedKeys,fn=At.keyEntities,jn=At.dragChildrenKeys,qn=At.flattenNodes,Kn=At.indent,An=He.props,Dn=An.onDragEnter,wn=An.onExpand,Un=An.allowDrop,vr=An.direction,er=kt.props,ir=er.pos,fr=er.eventKey,_t=(0,le.Z)(He),vt=_t.dragNode;if(He.currentMouseOverDroppableNodeKey!==fr&&(He.currentMouseOverDroppableNodeKey=fr),!vt){He.resetDragState();return}var Xe=(0,Ir.OM)(yt,vt,kt,Kn,He.dragStartMousePosition,Un,qn,fn,tn,vr),ot=Xe.dropPosition,Nt=Xe.dropLevelOffset,Pt=Xe.dropTargetKey,qt=Xe.dropContainerKey,hn=Xe.dropTargetPos,gn=Xe.dropAllowed,Nn=Xe.dragOverNodeKey;if(jn.indexOf(Pt)!==-1||!gn){He.resetDragState();return}if(He.delayedDragEnterLogic||(He.delayedDragEnterLogic={}),Object.keys(He.delayedDragEnterLogic).forEach(function(On){clearTimeout(He.delayedDragEnterLogic[On])}),vt.props.eventKey!==kt.props.eventKey&&(yt.persist(),He.delayedDragEnterLogic[ir]=window.setTimeout(function(){if(He.state.draggingNodeKey!==null){var On=(0,ce.Z)(tn),vn=(0,Ni.Z)(fn,kt.props.eventKey);vn&&(vn.children||[]).length&&(On=(0,Ir.L0)(tn,kt.props.eventKey)),"expandedKeys"in He.props||He.setExpandedKeys(On),wn==null||wn(On,{node:(0,ge.F)(kt.props),expanded:!0,nativeEvent:yt.nativeEvent})}},800)),vt.props.eventKey===Pt&&Nt===0){He.resetDragState();return}He.setState({dragOverNodeKey:Nn,dropPosition:ot,dropLevelOffset:Nt,dropTargetKey:Pt,dropContainerKey:qt,dropTargetPos:hn,dropAllowed:gn}),Dn==null||Dn({event:yt,node:(0,ge.F)(kt.props),expandedKeys:tn})},He.onNodeDragOver=function(yt,kt){var At=He.state,tn=At.dragChildrenKeys,fn=At.flattenNodes,jn=At.keyEntities,qn=At.expandedKeys,Kn=At.indent,An=He.props,Dn=An.onDragOver,wn=An.allowDrop,Un=An.direction,vr=(0,le.Z)(He),er=vr.dragNode;if(er){var ir=(0,Ir.OM)(yt,er,kt,Kn,He.dragStartMousePosition,wn,fn,jn,qn,Un),fr=ir.dropPosition,_t=ir.dropLevelOffset,vt=ir.dropTargetKey,Xe=ir.dropContainerKey,ot=ir.dropAllowed,Nt=ir.dropTargetPos,Pt=ir.dragOverNodeKey;tn.indexOf(vt)!==-1||!ot||(er.props.eventKey===vt&&_t===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():fr===He.state.dropPosition&&_t===He.state.dropLevelOffset&&vt===He.state.dropTargetKey&&Xe===He.state.dropContainerKey&&Nt===He.state.dropTargetPos&&ot===He.state.dropAllowed&&Pt===He.state.dragOverNodeKey||He.setState({dropPosition:fr,dropLevelOffset:_t,dropTargetKey:vt,dropContainerKey:Xe,dropTargetPos:Nt,dropAllowed:ot,dragOverNodeKey:Pt}),Dn==null||Dn({event:yt,node:(0,ge.F)(kt.props)}))}},He.onNodeDragLeave=function(yt,kt){He.currentMouseOverDroppableNodeKey===kt.props.eventKey&&!yt.currentTarget.contains(yt.relatedTarget)&&(He.resetDragState(),He.currentMouseOverDroppableNodeKey=null);var At=He.props.onDragLeave;At==null||At({event:yt,node:(0,ge.F)(kt.props)})},He.onWindowDragEnd=function(yt){He.onNodeDragEnd(yt,null,!0),window.removeEventListener("dragend",He.onWindowDragEnd)},He.onNodeDragEnd=function(yt,kt){var At=He.props.onDragEnd;He.setState({dragOverNodeKey:null}),He.cleanDragState(),At==null||At({event:yt,node:(0,ge.F)(kt.props)}),He.dragNode=null,window.removeEventListener("dragend",He.onWindowDragEnd)},He.onNodeDrop=function(yt,kt){var At,tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,fn=He.state,jn=fn.dragChildrenKeys,qn=fn.dropPosition,Kn=fn.dropTargetKey,An=fn.dropTargetPos,Dn=fn.dropAllowed;if(Dn){var wn=He.props.onDrop;if(He.setState({dragOverNodeKey:null}),He.cleanDragState(),Kn!==null){var Un=(0,Ce.Z)((0,Ce.Z)({},(0,ge.H8)(Kn,He.getTreeNodeRequiredProps())),{},{active:((At=He.getActiveItem())===null||At===void 0?void 0:At.key)===Kn,data:(0,Ni.Z)(He.state.keyEntities,Kn).node}),vr=jn.indexOf(Kn)!==-1;(0,Me.ZP)(!vr,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var er=(0,Ir.yx)(An),ir={event:yt,node:(0,ge.F)(Un),dragNode:He.dragNode?(0,ge.F)(He.dragNode.props):null,dragNodesKeys:[He.dragNode.props.eventKey].concat(jn),dropToGap:qn!==0,dropPosition:qn+Number(er[er.length-1])};tn||wn==null||wn(ir),He.dragNode=null}}},He.cleanDragState=function(){var yt=He.state.draggingNodeKey;yt!==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(yt,kt){var At=He.state,tn=At.expandedKeys,fn=At.flattenNodes,jn=kt.expanded,qn=kt.key,Kn=kt.isLeaf;if(!(Kn||yt.shiftKey||yt.metaKey||yt.ctrlKey)){var An=fn.filter(function(wn){return wn.key===qn})[0],Dn=(0,ge.F)((0,Ce.Z)((0,Ce.Z)({},(0,ge.H8)(qn,He.getTreeNodeRequiredProps())),{},{data:An.data}));He.setExpandedKeys(jn?(0,Ir._5)(tn,qn):(0,Ir.L0)(tn,qn)),He.onNodeExpand(yt,Dn)}},He.onNodeClick=function(yt,kt){var At=He.props,tn=At.onClick,fn=At.expandAction;fn==="click"&&He.triggerExpandActionExpand(yt,kt),tn==null||tn(yt,kt)},He.onNodeDoubleClick=function(yt,kt){var At=He.props,tn=At.onDoubleClick,fn=At.expandAction;fn==="doubleClick"&&He.triggerExpandActionExpand(yt,kt),tn==null||tn(yt,kt)},He.onNodeSelect=function(yt,kt){var At=He.state.selectedKeys,tn=He.state,fn=tn.keyEntities,jn=tn.fieldNames,qn=He.props,Kn=qn.onSelect,An=qn.multiple,Dn=kt.selected,wn=kt[jn.key],Un=!Dn;Un?An?At=(0,Ir.L0)(At,wn):At=[wn]:At=(0,Ir._5)(At,wn);var vr=At.map(function(er){var ir=(0,Ni.Z)(fn,er);return ir?ir.node:null}).filter(function(er){return er});He.setUncontrolledState({selectedKeys:At}),Kn==null||Kn(At,{event:"select",selected:Un,node:kt,selectedNodes:vr,nativeEvent:yt.nativeEvent})},He.onNodeCheck=function(yt,kt,At){var tn=He.state,fn=tn.keyEntities,jn=tn.checkedKeys,qn=tn.halfCheckedKeys,Kn=He.props,An=Kn.checkStrictly,Dn=Kn.onCheck,wn=kt.key,Un,vr={event:"check",node:kt,checked:At,nativeEvent:yt.nativeEvent};if(An){var er=At?(0,Ir.L0)(jn,wn):(0,Ir._5)(jn,wn),ir=(0,Ir._5)(qn,wn);Un={checked:er,halfChecked:ir},vr.checkedNodes=er.map(function(Nt){return(0,Ni.Z)(fn,Nt)}).filter(function(Nt){return Nt}).map(function(Nt){return Nt.node}),He.setUncontrolledState({checkedKeys:er})}else{var fr=(0,hi.S)([].concat((0,ce.Z)(jn),[wn]),!0,fn),_t=fr.checkedKeys,vt=fr.halfCheckedKeys;if(!At){var Xe=new Set(_t);Xe.delete(wn);var ot=(0,hi.S)(Array.from(Xe),{checked:!1,halfCheckedKeys:vt},fn);_t=ot.checkedKeys,vt=ot.halfCheckedKeys}Un=_t,vr.checkedNodes=[],vr.checkedNodesPositions=[],vr.halfCheckedKeys=vt,_t.forEach(function(Nt){var Pt=(0,Ni.Z)(fn,Nt);if(Pt){var qt=Pt.node,hn=Pt.pos;vr.checkedNodes.push(qt),vr.checkedNodesPositions.push({node:qt,pos:hn})}}),He.setUncontrolledState({checkedKeys:_t},!1,{halfCheckedKeys:vt})}Dn==null||Dn(Un,vr)},He.onNodeLoad=function(yt){var kt=yt.key,At=new Promise(function(tn,fn){He.setState(function(jn){var qn=jn.loadedKeys,Kn=qn===void 0?[]:qn,An=jn.loadingKeys,Dn=An===void 0?[]:An,wn=He.props,Un=wn.loadData,vr=wn.onLoad;if(!Un||Kn.indexOf(kt)!==-1||Dn.indexOf(kt)!==-1)return null;var er=Un(yt);return er.then(function(){var ir=He.state.loadedKeys,fr=(0,Ir.L0)(ir,kt);vr==null||vr(fr,{event:"load",node:yt}),He.setUncontrolledState({loadedKeys:fr}),He.setState(function(_t){return{loadingKeys:(0,Ir._5)(_t.loadingKeys,kt)}}),tn()}).catch(function(ir){if(He.setState(function(_t){return{loadingKeys:(0,Ir._5)(_t.loadingKeys,kt)}}),He.loadingRetryTimes[kt]=(He.loadingRetryTimes[kt]||0)+1,He.loadingRetryTimes[kt]>=yr){var fr=He.state.loadedKeys;(0,Me.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),He.setUncontrolledState({loadedKeys:(0,Ir.L0)(fr,kt)}),tn()}fn(ir)}),{loadingKeys:(0,Ir.L0)(Dn,kt)}})});return At.catch(function(){}),At},He.onNodeMouseEnter=function(yt,kt){var At=He.props.onMouseEnter;At==null||At({event:yt,node:kt})},He.onNodeMouseLeave=function(yt,kt){var At=He.props.onMouseLeave;At==null||At({event:yt,node:kt})},He.onNodeContextMenu=function(yt,kt){var At=He.props.onRightClick;At&&(yt.preventDefault(),At({event:yt,node:kt}))},He.onFocus=function(){var yt=He.props.onFocus;He.setState({focused:!0});for(var kt=arguments.length,At=new Array(kt),tn=0;tn<kt;tn++)At[tn]=arguments[tn];yt==null||yt.apply(void 0,At)},He.onBlur=function(){var yt=He.props.onBlur;He.setState({focused:!1}),He.onActiveChange(null);for(var kt=arguments.length,At=new Array(kt),tn=0;tn<kt;tn++)At[tn]=arguments[tn];yt==null||yt.apply(void 0,At)},He.getTreeNodeRequiredProps=function(){var yt=He.state,kt=yt.expandedKeys,At=yt.selectedKeys,tn=yt.loadedKeys,fn=yt.loadingKeys,jn=yt.checkedKeys,qn=yt.halfCheckedKeys,Kn=yt.dragOverNodeKey,An=yt.dropPosition,Dn=yt.keyEntities;return{expandedKeys:kt||[],selectedKeys:At||[],loadedKeys:tn||[],loadingKeys:fn||[],checkedKeys:jn||[],halfCheckedKeys:qn||[],dragOverNodeKey:Kn,dropPosition:An,keyEntities:Dn}},He.setExpandedKeys=function(yt){var kt=He.state,At=kt.treeData,tn=kt.fieldNames,fn=(0,ge.oH)(At,yt,tn);He.setUncontrolledState({expandedKeys:yt,flattenNodes:fn},!0)},He.onNodeExpand=function(yt,kt){var At=He.state.expandedKeys,tn=He.state,fn=tn.listChanging,jn=tn.fieldNames,qn=He.props,Kn=qn.onExpand,An=qn.loadData,Dn=kt.expanded,wn=kt[jn.key];if(!fn){var Un=At.indexOf(wn),vr=!Dn;if((0,Me.ZP)(Dn&&Un!==-1||!Dn&&Un===-1,"Expand state not sync with index check"),vr?At=(0,Ir.L0)(At,wn):At=(0,Ir._5)(At,wn),He.setExpandedKeys(At),Kn==null||Kn(At,{node:kt,expanded:vr,nativeEvent:yt.nativeEvent}),vr&&An){var er=He.onNodeLoad(kt);er&&er.then(function(){var ir=(0,ge.oH)(He.state.treeData,At,jn);He.setUncontrolledState({flattenNodes:ir})}).catch(function(){var ir=He.state.expandedKeys,fr=(0,Ir._5)(ir,wn);He.setExpandedKeys(fr)})}}},He.onListChangeStart=function(){He.setUncontrolledState({listChanging:!0})},He.onListChangeEnd=function(){setTimeout(function(){He.setUncontrolledState({listChanging:!1})})},He.onActiveChange=function(yt){var kt=He.state.activeKey,At=He.props.onActiveChange;kt!==yt&&(He.setState({activeKey:yt}),yt!==null&&He.scrollTo({key:yt}),At==null||At(yt))},He.getActiveItem=function(){var yt=He.state,kt=yt.activeKey,At=yt.flattenNodes;return kt===null?null:At.find(function(tn){var fn=tn.key;return fn===kt})||null},He.offsetActiveKey=function(yt){var kt=He.state,At=kt.flattenNodes,tn=kt.activeKey,fn=At.findIndex(function(Kn){var An=Kn.key;return An===tn});fn===-1&&yt<0&&(fn=At.length),fn=(fn+yt+At.length)%At.length;var jn=At[fn];if(jn){var qn=jn.key;He.onActiveChange(qn)}else He.onActiveChange(null)},He.onKeyDown=function(yt){var kt=He.state,At=kt.activeKey,tn=kt.expandedKeys,fn=kt.checkedKeys,jn=kt.fieldNames,qn=He.props,Kn=qn.onKeyDown,An=qn.checkable,Dn=qn.selectable;switch(yt.which){case ye.UP:{He.offsetActiveKey(-1),yt.preventDefault();break}case ye.DOWN:{He.offsetActiveKey(1),yt.preventDefault();break}}var wn=He.getActiveItem();if(wn&&wn.data){var Un=He.getTreeNodeRequiredProps(),vr=wn.data.isLeaf===!1||!!(wn.data[jn.children]||[]).length,er=(0,ge.F)((0,Ce.Z)((0,Ce.Z)({},(0,ge.H8)(At,Un)),{},{data:wn.data,active:!0}));switch(yt.which){case ye.LEFT:{vr&&tn.includes(At)?He.onNodeExpand({},er):wn.parent&&He.onActiveChange(wn.parent.key),yt.preventDefault();break}case ye.RIGHT:{vr&&!tn.includes(At)?He.onNodeExpand({},er):wn.children&&wn.children.length&&He.onActiveChange(wn.children[0].key),yt.preventDefault();break}case ye.ENTER:case ye.SPACE:{An&&!er.disabled&&er.checkable!==!1&&!er.disableCheckbox?He.onNodeCheck({},er,!fn.includes(At)):!An&&Dn&&!er.disabled&&er.selectable!==!1&&He.onNodeSelect({},er);break}}}Kn==null||Kn(yt)},He.setUncontrolledState=function(yt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!He.destroyed){var tn=!1,fn=!0,jn={};Object.keys(yt).forEach(function(qn){if(qn in He.props){fn=!1;return}tn=!0,jn[qn]=yt[qn]}),tn&&(!kt||fn)&&He.setState((0,Ce.Z)((0,Ce.Z)({},jn),At))}},He.scrollTo=function(yt){He.listRef.current.scrollTo(yt)},He}return(0,ae.Z)(Qn,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var lt=this.props.activeKey;lt!==void 0&<!==this.state.activeKey&&(this.setState({activeKey:lt}),lt!==null&&this.scrollTo({key:lt}))}},{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 lt,ut=this.state,gt=ut.focused,yt=ut.flattenNodes,kt=ut.keyEntities,At=ut.draggingNodeKey,tn=ut.activeKey,fn=ut.dropLevelOffset,jn=ut.dropContainerKey,qn=ut.dropTargetKey,Kn=ut.dropPosition,An=ut.dragOverNodeKey,Dn=ut.indent,wn=this.props,Un=wn.prefixCls,vr=wn.className,er=wn.style,ir=wn.showLine,fr=wn.focusable,_t=wn.tabIndex,vt=_t===void 0?0:_t,Xe=wn.selectable,ot=wn.showIcon,Nt=wn.icon,Pt=wn.switcherIcon,qt=wn.draggable,hn=wn.checkable,gn=wn.checkStrictly,Nn=wn.disabled,On=wn.motion,vn=wn.loadData,Fn=wn.filterTreeNode,Gn=wn.height,xr=wn.itemHeight,sr=wn.virtual,Lr=wn.titleRender,Ur=wn.dropIndicatorRender,Pr=wn.onContextMenu,Qr=wn.onScroll,Tr=wn.direction,Wr=wn.rootClassName,ni=wn.rootStyle,Si=(0,_e.Z)(this.props,{aria:!0,data:!0}),Nr;return qt&&((0,Le.Z)(qt)==="object"?Nr=qt:typeof qt=="function"?Nr={nodeDraggable:qt}:Nr={}),ve.createElement(Fe.k.Provider,{value:{prefixCls:Un,selectable:Xe,showIcon:ot,icon:Nt,switcherIcon:Pt,draggable:Nr,draggingNodeKey:At,checkable:hn,checkStrictly:gn,disabled:Nn,keyEntities:kt,dropLevelOffset:fn,dropContainerKey:jn,dropTargetKey:qn,dropPosition:Kn,dragOverNodeKey:An,indent:Dn,direction:Tr,dropIndicatorRender:Ur,loadData:vn,filterTreeNode:Fn,titleRender:Lr,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}},ve.createElement("div",{role:"tree",className:me()(Un,vr,Wr,(lt={},(0,Se.Z)(lt,"".concat(Un,"-show-line"),ir),(0,Se.Z)(lt,"".concat(Un,"-focused"),gt),(0,Se.Z)(lt,"".concat(Un,"-active-focused"),tn!==null),lt)),style:ni},ve.createElement(qr,(0,te.Z)({ref:this.listRef,prefixCls:Un,style:er,data:yt,disabled:Nn,selectable:Xe,checkable:!!hn,motion:On,dragging:At!==null,height:Gn,itemHeight:xr,virtual:sr,focusable:fr,focused:gt,tabIndex:vt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Pr,onScroll:Qr},this.getTreeNodeRequiredProps(),Si))))}}],[{key:"getDerivedStateFromProps",value:function(lt,ut){var gt=ut.prevProps,yt={prevProps:lt};function kt(fr){return!gt&&fr in lt||gt&>[fr]!==lt[fr]}var At,tn=ut.fieldNames;if(kt("fieldNames")&&(tn=(0,ge.w$)(lt.fieldNames),yt.fieldNames=tn),kt("treeData")?At=lt.treeData:kt("children")&&((0,Me.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),At=(0,ge.zn)(lt.children)),At){yt.treeData=At;var fn=(0,ge.I8)(At,{fieldNames:tn});yt.keyEntities=(0,Ce.Z)((0,Se.Z)({},or,Xn),fn.keyEntities)}var jn=yt.keyEntities||ut.keyEntities;if(kt("expandedKeys")||gt&&kt("autoExpandParent"))yt.expandedKeys=lt.autoExpandParent||!gt&<.defaultExpandParent?(0,Ir.r7)(lt.expandedKeys,jn):lt.expandedKeys;else if(!gt&<.defaultExpandAll){var qn=(0,Ce.Z)({},jn);delete qn[or],yt.expandedKeys=Object.keys(qn).map(function(fr){return qn[fr].key})}else!gt&<.defaultExpandedKeys&&(yt.expandedKeys=lt.autoExpandParent||lt.defaultExpandParent?(0,Ir.r7)(lt.defaultExpandedKeys,jn):lt.defaultExpandedKeys);if(yt.expandedKeys||delete yt.expandedKeys,At||yt.expandedKeys){var Kn=(0,ge.oH)(At||ut.treeData,yt.expandedKeys||ut.expandedKeys,tn);yt.flattenNodes=Kn}if(lt.selectable&&(kt("selectedKeys")?yt.selectedKeys=(0,Ir.BT)(lt.selectedKeys,lt):!gt&<.defaultSelectedKeys&&(yt.selectedKeys=(0,Ir.BT)(lt.defaultSelectedKeys,lt))),lt.checkable){var An;if(kt("checkedKeys")?An=(0,Ir.E6)(lt.checkedKeys)||{}:!gt&<.defaultCheckedKeys?An=(0,Ir.E6)(lt.defaultCheckedKeys)||{}:At&&(An=(0,Ir.E6)(lt.checkedKeys)||{checkedKeys:ut.checkedKeys,halfCheckedKeys:ut.halfCheckedKeys}),An){var Dn=An,wn=Dn.checkedKeys,Un=wn===void 0?[]:wn,vr=Dn.halfCheckedKeys,er=vr===void 0?[]:vr;if(!lt.checkStrictly){var ir=(0,hi.S)(Un,!0,jn);Un=ir.checkedKeys,er=ir.halfCheckedKeys}yt.checkedKeys=Un,yt.halfCheckedKeys=er}}return kt("loadedKeys")&&(yt.loadedKeys=lt.loadedKeys),yt}}]),Qn}(ve.Component);bi.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:$e,allowDrop:function(){return!0},expandAction:!1},bi.TreeNode=Zt.Z;var ar=bi,fo=ar,qi=ee(73148),ua=ee(56747),Jo={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"},bo=Jo,oo=ee(74643),na=function(Bn,Qn){return ve.createElement(oo.Z,(0,te.Z)({},Bn,{ref:Qn,icon:bo}))},Eo=ve.forwardRef(na),ra=ee(53124),ea=ee(50881),Ho=ee(33603),No=ee(32157);const Ba=4;function Wa(Tn){const{dropPosition:Bn,dropLevelOffset:Qn,prefixCls:He,indent:lt,direction:ut="ltr"}=Tn,gt=ut==="ltr"?"left":"right",yt=ut==="ltr"?"right":"left",kt={[gt]:-Qn*lt+Ba,[yt]:0};switch(Bn){case-1:kt.top=-3;break;case 1:kt.bottom=-3;break;default:kt.bottom=-3,kt[gt]=lt+Ba;break}return ve.createElement("div",{style:kt,className:`${He}-drop-indicator`})}var Ia=ee(99184),pn=ve.forwardRef((Tn,Bn)=>{const{getPrefixCls:Qn,direction:He,virtual:lt,tree:ut}=ve.useContext(ra.E_),{prefixCls:gt,className:yt,showIcon:kt=!1,showLine:At,switcherIcon:tn,blockNode:fn=!1,children:jn,checkable:qn=!1,selectable:Kn=!0,draggable:An,motion:Dn,style:wn}=Tn,Un=Qn("tree",gt),vr=Qn(),er=Dn!=null?Dn:Object.assign(Object.assign({},(0,Ho.Z)(vr)),{motionAppear:!1}),ir=Object.assign(Object.assign({},Tn),{checkable:qn,selectable:Kn,showIcon:kt,motion:er,blockNode:fn,showLine:!!At,dropIndicatorRender:Wa}),[fr,_t]=(0,No.ZP)(Un),vt=ve.useMemo(()=>{if(!An)return!1;let ot={};switch(typeof An){case"function":ot.nodeDraggable=An;break;case"object":ot=Object.assign({},An);break;default:break}return ot.icon!==!1&&(ot.icon=ot.icon||ve.createElement(ea.Z,null)),ot},[An]),Xe=ot=>ve.createElement(Ia.Z,{prefixCls:Un,switcherIcon:tn,treeNodeProps:ot,showLine:At});return fr(ve.createElement(fo,Object.assign({itemHeight:20,ref:Bn,virtual:lt},ir,{style:Object.assign(Object.assign({},ut==null?void 0:ut.style),wn),prefixCls:Un,className:me()({[`${Un}-icon-hide`]:!kt,[`${Un}-block-node`]:fn,[`${Un}-unselectable`]:!Kn,[`${Un}-rtl`]:He==="rtl"},ut==null?void 0:ut.className,yt,_t),direction:He,checkable:qn&&ve.createElement("span",{className:`${Un}-checkbox-inner`}),selectable:Kn,switcherIcon:Xe,draggable:vt}),jn))}),sn;(function(Tn){Tn[Tn.None=0]="None",Tn[Tn.Start=1]="Start",Tn[Tn.End=2]="End"})(sn||(sn={}));function Hn(Tn,Bn){function Qn(He){const{key:lt,children:ut}=He;Bn(lt,He)!==!1&&Hn(ut||[],Bn)}Tn.forEach(Qn)}function lr(Tn){let{treeData:Bn,expandedKeys:Qn,startKey:He,endKey:lt}=Tn;const ut=[];let gt=sn.None;if(He&&He===lt)return[He];if(!He||!lt)return[];function yt(kt){return kt===He||kt===lt}return Hn(Bn,kt=>{if(gt===sn.End)return!1;if(yt(kt)){if(ut.push(kt),gt===sn.None)gt=sn.Start;else if(gt===sn.Start)return gt=sn.End,!1}else gt===sn.Start&&ut.push(kt);return Qn.includes(kt)}),ut}function Cr(Tn,Bn){const Qn=(0,ce.Z)(Bn),He=[];return Hn(Tn,(lt,ut)=>{const gt=Qn.indexOf(lt);return gt!==-1&&(He.push(ut),Qn.splice(gt,1)),!!Qn.length}),He}var vi=function(Tn,Bn){var Qn={};for(var He in Tn)Object.prototype.hasOwnProperty.call(Tn,He)&&Bn.indexOf(He)<0&&(Qn[He]=Tn[He]);if(Tn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,He=Object.getOwnPropertySymbols(Tn);lt<He.length;lt++)Bn.indexOf(He[lt])<0&&Object.prototype.propertyIsEnumerable.call(Tn,He[lt])&&(Qn[He[lt]]=Tn[He[lt]]);return Qn};function _i(Tn){const{isLeaf:Bn,expanded:Qn}=Tn;return Bn?ve.createElement(qi.Z,null):Qn?ve.createElement(ua.Z,null):ve.createElement(Eo,null)}function ji(Tn){let{treeData:Bn,children:Qn}=Tn;return Bn||(0,ge.zn)(Qn)}const Xi=(Tn,Bn)=>{var{defaultExpandAll:Qn,defaultExpandParent:He,defaultExpandedKeys:lt}=Tn,ut=vi(Tn,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const gt=ve.useRef(),yt=ve.useRef(),kt=()=>{const{keyEntities:vt}=(0,ge.I8)(ji(ut));let Xe;return Qn?Xe=Object.keys(vt):He?Xe=(0,Ir.r7)(ut.expandedKeys||lt||[],vt):Xe=ut.expandedKeys||lt,Xe},[At,tn]=ve.useState(ut.selectedKeys||ut.defaultSelectedKeys||[]),[fn,jn]=ve.useState(()=>kt());ve.useEffect(()=>{"selectedKeys"in ut&&tn(ut.selectedKeys)},[ut.selectedKeys]),ve.useEffect(()=>{"expandedKeys"in ut&&jn(ut.expandedKeys)},[ut.expandedKeys]);const qn=(vt,Xe)=>{var ot;return"expandedKeys"in ut||jn(vt),(ot=ut.onExpand)===null||ot===void 0?void 0:ot.call(ut,vt,Xe)},Kn=(vt,Xe)=>{var ot;const{multiple:Nt}=ut,{node:Pt,nativeEvent:qt}=Xe,{key:hn=""}=Pt,gn=ji(ut),Nn=Object.assign(Object.assign({},Xe),{selected:!0}),On=(qt==null?void 0:qt.ctrlKey)||(qt==null?void 0:qt.metaKey),vn=qt==null?void 0:qt.shiftKey;let Fn;Nt&&On?(Fn=vt,gt.current=hn,yt.current=Fn,Nn.selectedNodes=Cr(gn,Fn)):Nt&&vn?(Fn=Array.from(new Set([].concat((0,ce.Z)(yt.current||[]),(0,ce.Z)(lr({treeData:gn,expandedKeys:fn,startKey:hn,endKey:gt.current}))))),Nn.selectedNodes=Cr(gn,Fn)):(Fn=[hn],gt.current=hn,yt.current=Fn,Nn.selectedNodes=Cr(gn,Fn)),(ot=ut.onSelect)===null||ot===void 0||ot.call(ut,Fn,Nn),"selectedKeys"in ut||tn(Fn)},{getPrefixCls:An,direction:Dn}=ve.useContext(ra.E_),{prefixCls:wn,className:Un,showIcon:vr=!0,expandAction:er="click"}=ut,ir=vi(ut,["prefixCls","className","showIcon","expandAction"]),fr=An("tree",wn),_t=me()(`${fr}-directory`,{[`${fr}-directory-rtl`]:Dn==="rtl"},Un);return ve.createElement(pn,Object.assign({icon:_i,ref:Bn,blockNode:!0},ir,{showIcon:vr,expandAction:er,prefixCls:fr,className:_t,expandedKeys:fn,selectedKeys:At,onSelect:Kn,onExpand:qn}))};var _o=ve.forwardRef(Xi);const To=pn;To.DirectoryTree=_o,To.TreeNode=Zt.Z;var Ko=To},32157:function(dn,St,ee){"use strict";ee.d(St,{TM:function(){return se},Yk:function(){return me}});var te=ee(45930),Se=ee(63185),Le=ee(14747),Ce=ee(33507),ce=ee(45503),fe=ee(67968);const ae=new te.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),le=(ye,_e)=>({[`.${ye}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${_e.motionDurationSlow}`}}}),re=(ye,_e)=>({[`.${ye}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:_e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${_e.lineWidthBold}px solid ${_e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),de=(ye,_e)=>{const{treeCls:Me,treeNodeCls:ve,treeNodePadding:Fe,titleHeight:$e,nodeSelectedBg:Te,nodeHoverBg:ze}=_e,Ee=_e.paddingXS;return{[Me]:Object.assign(Object.assign({},(0,Le.Wf)(_e)),{background:_e.colorBgContainer,borderRadius:_e.borderRadius,transition:`background-color ${_e.motionDurationSlow}`,[`&${Me}-rtl`]:{[`${Me}-switcher`]:{"&_close":{[`${Me}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${Me}-active-focused)`]:Object.assign({},(0,Le.oN)(_e)),[`${Me}-list-holder-inner`]:{alignItems:"flex-start"},[`&${Me}-block-node`]:{[`${Me}-list-holder-inner`]:{alignItems:"stretch",[`${Me}-node-content-wrapper`]:{flex:"auto"},[`${ve}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:Fe,insetInlineStart:0,border:`1px solid ${_e.colorPrimary}`,opacity:0,animationName:ae,animationDuration:_e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ve}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${Fe}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${Me}-node-content-wrapper`]:{color:_e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${Me}-node-content-wrapper`]:Object.assign({},(0,Le.oN)(_e)),[`&:not(${ve}-disabled).filter-node ${Me}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${Me}-draggable-icon`]:{flexShrink:0,width:$e,lineHeight:`${$e}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${_e.motionDurationSlow}`,[`${ve}:hover &`]:{opacity:.45}},[`&${ve}-disabled`]:{[`${Me}-draggable-icon`]:{visibility:"hidden"}}}},[`${Me}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:$e}},[`${Me}-draggable-icon`]:{visibility:"hidden"},[`${Me}-switcher`]:Object.assign(Object.assign({},le(ye,_e)),{position:"relative",flex:"none",alignSelf:"stretch",width:$e,margin:0,lineHeight:`${$e}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${Me}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:_e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:$e/2,bottom:-Fe,marginInlineStart:-1,borderInlineEnd:`1px solid ${_e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:$e/2*.8,height:$e/2,borderBottom:`1px solid ${_e.colorBorder}`,content:'""'}}}),[`${Me}-checkbox`]:{top:"initial",marginInlineEnd:Ee},[`${Me}-node-content-wrapper, ${Me}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:$e,margin:0,padding:`0 ${_e.paddingXS/2}px`,color:"inherit",lineHeight:`${$e}px`,background:"transparent",borderRadius:_e.borderRadius,cursor:"pointer",transition:`all ${_e.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:ze},[`&${Me}-node-selected`]:{backgroundColor:Te},[`${Me}-iconEle`]:{display:"inline-block",width:$e,height:$e,lineHeight:`${$e}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${Me}-unselectable ${Me}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${Me}-node-content-wrapper`]:Object.assign({lineHeight:`${$e}px`,userSelect:"none"},re(ye,_e)),[`${ve}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${_e.colorPrimary}`}},"&-show-line":{[`${Me}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:$e/2,bottom:-Fe,borderInlineEnd:`1px solid ${_e.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${Me}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ve}-leaf-last`]:{[`${Me}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${$e/2}px !important`}}}}})}},he=ye=>{const{treeCls:_e,treeNodeCls:Me,treeNodePadding:ve,directoryNodeSelectedBg:Fe,directoryNodeSelectedColor:$e}=ye;return{[`${_e}${_e}-directory`]:{[Me]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ve,insetInlineStart:0,transition:`background-color ${ye.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ye.controlItemBgHover}},"> *":{zIndex:1},[`${_e}-switcher`]:{transition:`color ${ye.motionDurationMid}`},[`${_e}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${_e}-node-selected`]:{color:$e,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:Fe},[`${_e}-switcher`]:{color:$e},[`${_e}-node-content-wrapper`]:{color:$e,background:"transparent"}}}}}},me=(ye,_e)=>{const Me=`.${ye}`,ve=`${Me}-treenode`,Fe=_e.paddingXS/2,$e=(0,ce.TS)(_e,{treeCls:Me,treeNodeCls:ve,treeNodePadding:Fe});return[de(ye,$e),he($e)]},se=ye=>{const{controlHeightSM:_e}=ye;return{titleHeight:_e,nodeHoverBg:ye.controlItemBgHover,nodeSelectedBg:ye.controlItemBgActive}};St.ZP=(0,fe.Z)("Tree",(ye,_e)=>{let{prefixCls:Me}=_e;return[{[ye.componentCls]:(0,Se.C2)(`${Me}-checkbox`,ye)},me(Me,ye),(0,Ce.Z)(ye)]},ye=>{const{colorTextLightSolid:_e,colorPrimary:Me}=ye;return Object.assign(Object.assign({},se(ye)),{directoryNodeSelectedColor:_e,directoryNodeSelectedBg:Me})})},99184:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Me}});var te=ee(87462),Se=ee(67294),Le={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"},Ce=Le,ce=ee(74643),fe=function(Fe,$e){return Se.createElement(ce.Z,(0,te.Z)({},Fe,{ref:$e,icon:Ce}))},ae=Se.forwardRef(fe),le=ee(73148),re=ee(3407),de=ee(34182),he=ee(74664),me=ee(94184),se=ee.n(me),ye=ee(96159),Me=ve=>{const{prefixCls:Fe,switcherIcon:$e,treeNodeProps:Te,showLine:ze}=ve,{isLeaf:Ee,expanded:be,loading:Re}=Te;if(Re)return Se.createElement(re.Z,{className:`${Fe}-switcher-loading-icon`});let De;if(ze&&typeof ze=="object"&&(De=ze.showLeafIcon),Ee){if(!ze)return null;if(typeof De!="boolean"&&De){const dt=typeof De=="function"?De(Te):De,Ke=`${Fe}-switcher-line-custom-icon`;return(0,ye.l$)(dt)?(0,ye.Tm)(dt,{className:se()(dt.props.className||"",Ke)}):dt}return De?Se.createElement(le.Z,{className:`${Fe}-switcher-line-icon`}):Se.createElement("span",{className:`${Fe}-switcher-leaf-line`})}const et=`${Fe}-switcher-icon`,Ye=typeof $e=="function"?$e(Te):$e;return(0,ye.l$)(Ye)?(0,ye.Tm)(Ye,{className:se()(Ye.props.className||"",et)}):Ye!==void 0?Ye:ze?be?Se.createElement(de.Z,{className:`${Fe}-switcher-line-icon`}):Se.createElement(he.Z,{className:`${Fe}-switcher-line-icon`}):Se.createElement(ae,{className:et})}},72665:function(dn,St){"use strict";var ee;var te=typeof Symbol=="function"&&Symbol.for,Se=te?Symbol.for("react.element"):60103,Le=te?Symbol.for("react.portal"):60106,Ce=te?Symbol.for("react.fragment"):60107,ce=te?Symbol.for("react.strict_mode"):60108,fe=te?Symbol.for("react.profiler"):60114,ae=te?Symbol.for("react.provider"):60109,le=te?Symbol.for("react.context"):60110,re=te?Symbol.for("react.async_mode"):60111,de=te?Symbol.for("react.concurrent_mode"):60111,he=te?Symbol.for("react.forward_ref"):60112,me=te?Symbol.for("react.suspense"):60113,se=te?Symbol.for("react.suspense_list"):60120,ye=te?Symbol.for("react.memo"):60115,_e=te?Symbol.for("react.lazy"):60116,Me=te?Symbol.for("react.block"):60121,ve=te?Symbol.for("react.fundamental"):60117,Fe=te?Symbol.for("react.responder"):60118,$e=te?Symbol.for("react.scope"):60119;function Te(Ee){if(typeof Ee=="object"&&Ee!==null){var be=Ee.$$typeof;switch(be){case Se:switch(Ee=Ee.type,Ee){case re:case de:case Ce:case fe:case ce:case me:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case le:case he:case _e:case ye:case ae:return Ee;default:return be}}case Le:return be}}}function ze(Ee){return Te(Ee)===de}ee=re,ee=de,ee=le,ee=ae,ee=Se,ee=he,ee=Ce,ee=_e,ee=ye,ee=Le,ee=fe,ee=ce,ee=me,ee=function(Ee){return ze(Ee)||Te(Ee)===re},ee=ze,ee=function(Ee){return Te(Ee)===le},ee=function(Ee){return Te(Ee)===ae},ee=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Se},ee=function(Ee){return Te(Ee)===he},ee=function(Ee){return Te(Ee)===Ce},ee=function(Ee){return Te(Ee)===_e},St.isMemo=function(Ee){return Te(Ee)===ye},ee=function(Ee){return Te(Ee)===Le},ee=function(Ee){return Te(Ee)===fe},ee=function(Ee){return Te(Ee)===ce},ee=function(Ee){return Te(Ee)===me},ee=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ce||Ee===de||Ee===fe||Ee===ce||Ee===me||Ee===se||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===_e||Ee.$$typeof===ye||Ee.$$typeof===ae||Ee.$$typeof===le||Ee.$$typeof===he||Ee.$$typeof===ve||Ee.$$typeof===Fe||Ee.$$typeof===$e||Ee.$$typeof===Me)},ee=Te},12060:function(dn,St,ee){"use strict";dn.exports=ee(72665)},41771:function(dn,St){"use strict";var ee;var te=typeof Symbol=="function"&&Symbol.for,Se=te?Symbol.for("react.element"):60103,Le=te?Symbol.for("react.portal"):60106,Ce=te?Symbol.for("react.fragment"):60107,ce=te?Symbol.for("react.strict_mode"):60108,fe=te?Symbol.for("react.profiler"):60114,ae=te?Symbol.for("react.provider"):60109,le=te?Symbol.for("react.context"):60110,re=te?Symbol.for("react.async_mode"):60111,de=te?Symbol.for("react.concurrent_mode"):60111,he=te?Symbol.for("react.forward_ref"):60112,me=te?Symbol.for("react.suspense"):60113,se=te?Symbol.for("react.suspense_list"):60120,ye=te?Symbol.for("react.memo"):60115,_e=te?Symbol.for("react.lazy"):60116,Me=te?Symbol.for("react.block"):60121,ve=te?Symbol.for("react.fundamental"):60117,Fe=te?Symbol.for("react.responder"):60118,$e=te?Symbol.for("react.scope"):60119;function Te(Ee){if(typeof Ee=="object"&&Ee!==null){var be=Ee.$$typeof;switch(be){case Se:switch(Ee=Ee.type,Ee){case re:case de:case Ce:case fe:case ce:case me:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case le:case he:case _e:case ye:case ae:return Ee;default:return be}}case Le:return be}}}function ze(Ee){return Te(Ee)===de}ee=re,ee=de,ee=le,ee=ae,ee=Se,ee=he,ee=Ce,ee=_e,ee=ye,ee=Le,ee=fe,ee=ce,ee=me,ee=function(Ee){return ze(Ee)||Te(Ee)===re},ee=ze,ee=function(Ee){return Te(Ee)===le},ee=function(Ee){return Te(Ee)===ae},ee=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Se},ee=function(Ee){return Te(Ee)===he},St.isFragment=function(Ee){return Te(Ee)===Ce},ee=function(Ee){return Te(Ee)===_e},ee=function(Ee){return Te(Ee)===ye},ee=function(Ee){return Te(Ee)===Le},ee=function(Ee){return Te(Ee)===fe},ee=function(Ee){return Te(Ee)===ce},ee=function(Ee){return Te(Ee)===me},ee=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ce||Ee===de||Ee===fe||Ee===ce||Ee===me||Ee===se||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===_e||Ee.$$typeof===ye||Ee.$$typeof===ae||Ee.$$typeof===le||Ee.$$typeof===he||Ee.$$typeof===ve||Ee.$$typeof===Fe||Ee.$$typeof===$e||Ee.$$typeof===Me)},ee=Te},47655:function(dn,St,ee){"use strict";dn.exports=ee(41771)},64701:function(dn,St,ee){"use strict";ee.r(St),ee.d(St,{ResizableTextArea:function(){return yn},default:function(){return In}});var te=ee(87462),Se=ee(1413),Le=ee(4942),Ce=ee(71002),ce=ee(97685),fe=ee(45987),ae=ee(74902),le=ee(94184),re=ee.n(le),de=ee(67656),he=ee(87887),me=ee(67294);function se(Qt){var Mn=me.useRef();Mn.current=Qt;var Wn=me.useCallback(function(){for(var zn,at=arguments.length,Oe=new Array(at),ke=0;ke<at;ke++)Oe[ke]=arguments[ke];return(zn=Mn.current)===null||zn===void 0?void 0:zn.call.apply(zn,[Mn].concat(Oe))},[]);return Wn}function ye(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var _e=ye()?me.useLayoutEffect:me.useEffect,Me=_e,ve=function(Mn,Wn){var zn=me.useRef(!0);_e(function(){if(!zn.current)return Mn()},Wn),_e(function(){return zn.current=!1,function(){zn.current=!0}},[])};function Fe(Qt){var Mn=me.useRef(!1),Wn=me.useState(Qt),zn=(0,ce.Z)(Wn,2),at=zn[0],Oe=zn[1];me.useEffect(function(){return Mn.current=!1,function(){Mn.current=!0}},[]);function ke(Be,Ne){Ne&&Mn.current||Oe(Be)}return[at,ke]}function $e(Qt){return Qt!==void 0}function Te(Qt,Mn){var Wn=Mn||{},zn=Wn.defaultValue,at=Wn.value,Oe=Wn.onChange,ke=Wn.postState,Be=Fe(function(){return $e(at)?at:$e(zn)?typeof zn=="function"?zn():zn:typeof Qt=="function"?Qt():Qt}),Ne=(0,ce.Z)(Be,2),we=Ne[0],rt=Ne[1],It=at!==void 0?at:we,Ct=ke?ke(It):It,$t=se(Oe),Vt=Fe([It]),wt=(0,ce.Z)(Vt,2),on=wt[0],Dt=wt[1];ve(function(){var nn=on[0];we!==nn&&$t(we,nn)},[on]),ve(function(){$e(at)||rt(at)},[at]);var Xt=se(function(nn,bn){rt(nn,bn),Dt([It],bn)});return[Ct,Xt]}var ze=ee(48555),Ee=function(Mn){return+setTimeout(Mn,16)},be=function(Mn){return clearTimeout(Mn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ee=function(Mn){return window.requestAnimationFrame(Mn)},be=function(Mn){return window.cancelAnimationFrame(Mn)});var Re=0,De=new Map;function et(Qt){De.delete(Qt)}var Ye=function(Mn){var Wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Re+=1;var zn=Re;function at(Oe){if(Oe===0)et(zn),Mn();else{var ke=Ee(function(){at(Oe-1)});De.set(zn,ke)}}return at(Wn),zn};Ye.cancel=function(Qt){var Mn=De.get(Qt);return et(Mn),be(Mn)};var dt=Ye,Ke=`
|
|
|
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;
|
|
|
`,zt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],pt={},Kt;function Ze(Qt){var Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wn=Qt.getAttribute("id")||Qt.getAttribute("data-reactid")||Qt.getAttribute("name");if(Mn&&pt[Wn])return pt[Wn];var zn=window.getComputedStyle(Qt),at=zn.getPropertyValue("box-sizing")||zn.getPropertyValue("-moz-box-sizing")||zn.getPropertyValue("-webkit-box-sizing"),Oe=parseFloat(zn.getPropertyValue("padding-bottom"))+parseFloat(zn.getPropertyValue("padding-top")),ke=parseFloat(zn.getPropertyValue("border-bottom-width"))+parseFloat(zn.getPropertyValue("border-top-width")),Be=zt.map(function(we){return"".concat(we,":").concat(zn.getPropertyValue(we))}).join(";"),Ne={sizingStyle:Be,paddingSize:Oe,borderSize:ke,boxSizing:at};return Mn&&Wn&&(pt[Wn]=Ne),Ne}function tt(Qt){var Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,zn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Kt||(Kt=document.createElement("textarea"),Kt.setAttribute("tab-index","-1"),Kt.setAttribute("aria-hidden","true"),document.body.appendChild(Kt)),Qt.getAttribute("wrap")?Kt.setAttribute("wrap",Qt.getAttribute("wrap")):Kt.removeAttribute("wrap");var at=Ze(Qt,Mn),Oe=at.paddingSize,ke=at.borderSize,Be=at.boxSizing,Ne=at.sizingStyle;Kt.setAttribute("style","".concat(Ne,";").concat(Ke)),Kt.value=Qt.value||Qt.placeholder||"";var we=void 0,rt=void 0,It,Ct=Kt.scrollHeight;if(Be==="border-box"?Ct+=ke:Be==="content-box"&&(Ct-=Oe),Wn!==null||zn!==null){Kt.value=" ";var $t=Kt.scrollHeight-Oe;Wn!==null&&(we=$t*Wn,Be==="border-box"&&(we=we+Oe+ke),Ct=Math.max(we,Ct)),zn!==null&&(rt=$t*zn,Be==="border-box"&&(rt=rt+Oe+ke),It=Ct>rt?"":"hidden",Ct=Math.min(rt,Ct))}var Vt={height:Ct,overflowY:It,resize:"none"};return we&&(Vt.minHeight=we),rt&&(Vt.maxHeight=rt),Vt}var ft=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ut=0,nt=1,Ge=2,jt=me.forwardRef(function(Qt,Mn){var Wn=Qt,zn=Wn.prefixCls,at=Wn.onPressEnter,Oe=Wn.defaultValue,ke=Wn.value,Be=Wn.autoSize,Ne=Wn.onResize,we=Wn.className,rt=Wn.style,It=Wn.disabled,Ct=Wn.onChange,$t=Wn.onInternalAutoSize,Vt=(0,fe.Z)(Wn,ft),wt=Te(Oe,{value:ke,postState:function(rr){return rr!=null?rr:""}}),on=(0,ce.Z)(wt,2),Dt=on[0],Xt=on[1],nn=function(rr){Xt(rr.target.value),Ct==null||Ct(rr)},bn=me.useRef();me.useImperativeHandle(Mn,function(){return{textArea:bn.current}});var en=me.useMemo(function(){return Be&&(0,Ce.Z)(Be)==="object"?[Be.minRows,Be.maxRows]:[]},[Be]),Zn=(0,ce.Z)(en,2),Yn=Zn[0],pr=Zn[1],ti=!!Be,Pn=function(){try{if(document.activeElement===bn.current){var rr=bn.current,Jr=rr.selectionStart,Ar=rr.selectionEnd,Mr=rr.scrollTop;bn.current.setSelectionRange(Jr,Ar),bn.current.scrollTop=Mr}}catch(tr){}},Or=me.useState(Ge),Br=(0,ce.Z)(Or,2),Di=Br[0],mi=Br[1],ci=me.useState(),Fr=(0,ce.Z)(ci,2),zr=Fr[0],Fi=Fr[1],ko=function(){mi(Ut)};Me(function(){ti&&ko()},[ke,Yn,pr,ti]),Me(function(){if(Di===Ut)mi(nt);else if(Di===nt){var dr=tt(bn.current,!1,Yn,pr);mi(Ge),Fi(dr)}else Pn()},[Di]);var aa=me.useRef(),Wo=function(){dt.cancel(aa.current)},li=function(rr){Di===Ge&&(Ne==null||Ne(rr),Be&&(Wo(),aa.current=dt(function(){ko()})))};me.useEffect(function(){return Wo},[]);var rn=ti?zr:null,nr=(0,Se.Z)((0,Se.Z)({},rt),rn);return(Di===Ut||Di===nt)&&(nr.overflowY="hidden",nr.overflowX="hidden"),me.createElement(ze.Z,{onResize:li,disabled:!(Be||Ne)},me.createElement("textarea",(0,te.Z)({},Vt,{ref:bn,style:nr,className:re()(zn,we,(0,Le.Z)({},"".concat(zn,"-disabled"),It)),disabled:It,value:Dt,onChange:nn})))}),yn=jt,ln=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Tt(Qt,Mn){return(0,ae.Z)(Qt||"").slice(0,Mn).join("")}function Lt(Qt,Mn,Wn,zn){var at=Wn;return Qt?at=Tt(Wn,zn):(0,ae.Z)(Mn||"").length<Wn.length&&(0,ae.Z)(Wn||"").length>zn&&(at=Mn),at}var Jt=me.forwardRef(function(Qt,Mn){var Wn,zn=Qt.defaultValue,at=Qt.value,Oe=Qt.onFocus,ke=Qt.onBlur,Be=Qt.onChange,Ne=Qt.allowClear,we=Qt.maxLength,rt=Qt.onCompositionStart,It=Qt.onCompositionEnd,Ct=Qt.suffix,$t=Qt.prefixCls,Vt=$t===void 0?"rc-textarea":$t,wt=Qt.classes,on=Qt.showCount,Dt=Qt.className,Xt=Qt.style,nn=Qt.disabled,bn=Qt.hidden,en=Qt.classNames,Zn=Qt.styles,Yn=Qt.onResize,pr=(0,fe.Z)(Qt,ln),ti=Te(zn,{value:at,defaultValue:zn}),Pn=(0,ce.Z)(ti,2),Or=Pn[0],Br=Pn[1],Di=(0,me.useRef)(null),mi=me.useState(!1),ci=(0,ce.Z)(mi,2),Fr=ci[0],zr=ci[1],Fi=me.useState(!1),ko=(0,ce.Z)(Fi,2),aa=ko[0],Wo=ko[1],li=me.useRef(),rn=me.useRef(0),nr=me.useState(null),dr=(0,ce.Z)(nr,2),rr=dr[0],Jr=dr[1],Ar=function(){var Xn;(Xn=Di.current)===null||Xn===void 0||Xn.textArea.focus()};(0,me.useImperativeHandle)(Mn,function(){return{resizableTextArea:Di.current,focus:Ar,blur:function(){var Xn;(Xn=Di.current)===null||Xn===void 0||Xn.textArea.blur()}}}),(0,me.useEffect)(function(){zr(function(cr){return!nn&&cr})},[nn]);var Mr=Number(we)>0,tr=function(Xn){Wo(!0),li.current=Or,rn.current=Xn.currentTarget.selectionStart,rt==null||rt(Xn)},Zt=function(Xn){Wo(!1);var br=Xn.currentTarget.value;if(Mr){var _r,mn=rn.current>=we+1||rn.current===((_r=li.current)===null||_r===void 0?void 0:_r.length);br=Lt(mn,li.current,br,we)}br!==Or&&(Br(br),(0,he.rJ)(Xn.currentTarget,Xn,Be,br)),It==null||It(Xn)},Ot=function(Xn){var br=Xn.target.value;if(!aa&&Mr){var _r=Xn.target.selectionStart>=we+1||Xn.target.selectionStart===br.length||!Xn.target.selectionStart;br=Lt(_r,Or,br,we)}Br(br),(0,he.rJ)(Xn.currentTarget,Xn,Be,br)},ge=function(Xn){var br=pr.onPressEnter,_r=pr.onKeyDown;Xn.key==="Enter"&&br&&br(Xn),_r==null||_r(Xn)},Ie=function(Xn){zr(!0),Oe==null||Oe(Xn)},Ae=function(Xn){zr(!1),ke==null||ke(Xn)},We=function(Xn){var br;Br(""),Ar(),(0,he.rJ)((br=Di.current)===null||br===void 0?void 0:br.textArea,Xn,Be)},it=(0,he.D7)(Or);!aa&&Mr&&at==null&&(it=Tt(it,we));var xt=Ct,Ft;if(on){var an=(0,ae.Z)(it).length;(0,Ce.Z)(on)==="object"?Ft=on.formatter({value:it,count:an,maxLength:we}):Ft="".concat(an).concat(Mr?" / ".concat(we):""),xt=me.createElement(me.Fragment,null,xt,me.createElement("span",{className:re()("".concat(Vt,"-data-count"),en==null?void 0:en.count),style:Zn==null?void 0:Zn.count},Ft))}var Rn=function(Xn){var br;Yn==null||Yn(Xn),(br=Di.current)!==null&&br!==void 0&&br.textArea.style.height&&Jr(!0)},mr=!pr.autoSize&&!on&&!Ne,or=me.createElement(de.BaseInput,{value:it,allowClear:Ne,handleReset:We,suffix:xt,prefixCls:Vt,classes:{affixWrapper:re()(wt==null?void 0:wt.affixWrapper,(Wn={},(0,Le.Z)(Wn,"".concat(Vt,"-show-count"),on),(0,Le.Z)(Wn,"".concat(Vt,"-textarea-allow-clear"),Ne),Wn))},disabled:nn,focused:Fr,className:Dt,style:(0,Se.Z)((0,Se.Z)({},Xt),rr&&!mr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ft=="string"?Ft:void 0}},hidden:bn,inputElement:me.createElement(yn,(0,te.Z)({},pr,{onKeyDown:ge,onChange:Ot,onFocus:Ie,onBlur:Ae,onCompositionStart:tr,onCompositionEnd:Zt,className:en==null?void 0:en.textarea,style:(0,Se.Z)((0,Se.Z)({},Zn==null?void 0:Zn.textarea),{},{resize:Xt==null?void 0:Xt.resize}),disabled:nn,prefixCls:Vt,onResize:Rn,ref:Di}))});return or}),kn=Jt,In=kn},56261:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return De}});var te=ee(87462),Se=ee(4942),Le=ee(45987),Ce=ee(1413),ce=ee(15671),fe=ee(43144),ae=ee(97326),le=ee(60136),re=ee(51630),de=ee(94184),he=ee.n(de),me=ee(34952),se=ee(67294),ye=ee(69610),_e=function(Ye){for(var dt=Ye.prefixCls,Ke=Ye.level,zt=Ye.isStart,pt=Ye.isEnd,Kt="".concat(dt,"-indent-unit"),Ze=[],tt=0;tt<Ke;tt+=1){var ft;Ze.push(se.createElement("span",{key:tt,className:he()(Kt,(ft={},(0,Se.Z)(ft,"".concat(Kt,"-start"),zt[tt]),(0,Se.Z)(ft,"".concat(Kt,"-end"),pt[tt]),ft))}))}return se.createElement("span",{"aria-hidden":"true",className:"".concat(dt,"-indent")},Ze)},Me=se.memo(_e),ve=ee(3596),Fe=ee(83898),$e=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Te="open",ze="close",Ee="---",be=function(et){(0,le.Z)(dt,et);var Ye=(0,re.Z)(dt);function dt(){var Ke;(0,ce.Z)(this,dt);for(var zt=arguments.length,pt=new Array(zt),Kt=0;Kt<zt;Kt++)pt[Kt]=arguments[Kt];return Ke=Ye.call.apply(Ye,[this].concat(pt)),Ke.state={dragNodeHighlight:!1},Ke.selectHandle=void 0,Ke.cacheIndent=void 0,Ke.onSelectorClick=function(Ze){var tt=Ke.props.context.onNodeClick;tt(Ze,(0,Fe.F)(Ke.props)),Ke.isSelectable()?Ke.onSelect(Ze):Ke.onCheck(Ze)},Ke.onSelectorDoubleClick=function(Ze){var tt=Ke.props.context.onNodeDoubleClick;tt(Ze,(0,Fe.F)(Ke.props))},Ke.onSelect=function(Ze){if(!Ke.isDisabled()){var tt=Ke.props.context.onNodeSelect;tt(Ze,(0,Fe.F)(Ke.props))}},Ke.onCheck=function(Ze){if(!Ke.isDisabled()){var tt=Ke.props,ft=tt.disableCheckbox,Ut=tt.checked,nt=Ke.props.context.onNodeCheck;if(!(!Ke.isCheckable()||ft)){var Ge=!Ut;nt(Ze,(0,Fe.F)(Ke.props),Ge)}}},Ke.onMouseEnter=function(Ze){var tt=Ke.props.context.onNodeMouseEnter;tt(Ze,(0,Fe.F)(Ke.props))},Ke.onMouseLeave=function(Ze){var tt=Ke.props.context.onNodeMouseLeave;tt(Ze,(0,Fe.F)(Ke.props))},Ke.onContextMenu=function(Ze){var tt=Ke.props.context.onNodeContextMenu;tt(Ze,(0,Fe.F)(Ke.props))},Ke.onDragStart=function(Ze){var tt=Ke.props.context.onNodeDragStart;Ze.stopPropagation(),Ke.setState({dragNodeHighlight:!0}),tt(Ze,(0,ae.Z)(Ke));try{Ze.dataTransfer.setData("text/plain","")}catch(ft){}},Ke.onDragEnter=function(Ze){var tt=Ke.props.context.onNodeDragEnter;Ze.preventDefault(),Ze.stopPropagation(),tt(Ze,(0,ae.Z)(Ke))},Ke.onDragOver=function(Ze){var tt=Ke.props.context.onNodeDragOver;Ze.preventDefault(),Ze.stopPropagation(),tt(Ze,(0,ae.Z)(Ke))},Ke.onDragLeave=function(Ze){var tt=Ke.props.context.onNodeDragLeave;Ze.stopPropagation(),tt(Ze,(0,ae.Z)(Ke))},Ke.onDragEnd=function(Ze){var tt=Ke.props.context.onNodeDragEnd;Ze.stopPropagation(),Ke.setState({dragNodeHighlight:!1}),tt(Ze,(0,ae.Z)(Ke))},Ke.onDrop=function(Ze){var tt=Ke.props.context.onNodeDrop;Ze.preventDefault(),Ze.stopPropagation(),Ke.setState({dragNodeHighlight:!1}),tt(Ze,(0,ae.Z)(Ke))},Ke.onExpand=function(Ze){var tt=Ke.props,ft=tt.loading,Ut=tt.context.onNodeExpand;ft||Ut(Ze,(0,Fe.F)(Ke.props))},Ke.setSelectHandle=function(Ze){Ke.selectHandle=Ze},Ke.getNodeState=function(){var Ze=Ke.props.expanded;return Ke.isLeaf()?null:Ze?Te:ze},Ke.hasChildren=function(){var Ze=Ke.props.eventKey,tt=Ke.props.context.keyEntities,ft=(0,ve.Z)(tt,Ze)||{},Ut=ft.children;return!!(Ut||[]).length},Ke.isLeaf=function(){var Ze=Ke.props,tt=Ze.isLeaf,ft=Ze.loaded,Ut=Ke.props.context.loadData,nt=Ke.hasChildren();return tt===!1?!1:tt||!Ut&&!nt||Ut&&ft&&!nt},Ke.isDisabled=function(){var Ze=Ke.props.disabled,tt=Ke.props.context.disabled;return!!(tt||Ze)},Ke.isCheckable=function(){var Ze=Ke.props.checkable,tt=Ke.props.context.checkable;return!tt||Ze===!1?!1:tt},Ke.syncLoadData=function(Ze){var tt=Ze.expanded,ft=Ze.loading,Ut=Ze.loaded,nt=Ke.props.context,Ge=nt.loadData,jt=nt.onNodeLoad;ft||Ge&&tt&&!Ke.isLeaf()&&!Ke.hasChildren()&&!Ut&&jt((0,Fe.F)(Ke.props))},Ke.isDraggable=function(){var Ze=Ke.props,tt=Ze.data,ft=Ze.context.draggable;return!!(ft&&(!ft.nodeDraggable||ft.nodeDraggable(tt)))},Ke.renderDragHandler=function(){var Ze=Ke.props.context,tt=Ze.draggable,ft=Ze.prefixCls;return tt!=null&&tt.icon?se.createElement("span",{className:"".concat(ft,"-draggable-icon")},tt.icon):null},Ke.renderSwitcherIconDom=function(Ze){var tt=Ke.props.switcherIcon,ft=Ke.props.context.switcherIcon,Ut=tt||ft;return typeof Ut=="function"?Ut((0,Ce.Z)((0,Ce.Z)({},Ke.props),{},{isLeaf:Ze})):Ut},Ke.renderSwitcher=function(){var Ze=Ke.props.expanded,tt=Ke.props.context.prefixCls;if(Ke.isLeaf()){var ft=Ke.renderSwitcherIconDom(!0);return ft!==!1?se.createElement("span",{className:he()("".concat(tt,"-switcher"),"".concat(tt,"-switcher-noop"))},ft):null}var Ut=he()("".concat(tt,"-switcher"),"".concat(tt,"-switcher_").concat(Ze?Te:ze)),nt=Ke.renderSwitcherIconDom(!1);return nt!==!1?se.createElement("span",{onClick:Ke.onExpand,className:Ut},nt):null},Ke.renderCheckbox=function(){var Ze=Ke.props,tt=Ze.checked,ft=Ze.halfChecked,Ut=Ze.disableCheckbox,nt=Ke.props.context.prefixCls,Ge=Ke.isDisabled(),jt=Ke.isCheckable();if(!jt)return null;var yn=typeof jt!="boolean"?jt:null;return se.createElement("span",{className:he()("".concat(nt,"-checkbox"),tt&&"".concat(nt,"-checkbox-checked"),!tt&&ft&&"".concat(nt,"-checkbox-indeterminate"),(Ge||Ut)&&"".concat(nt,"-checkbox-disabled")),onClick:Ke.onCheck},yn)},Ke.renderIcon=function(){var Ze=Ke.props.loading,tt=Ke.props.context.prefixCls;return se.createElement("span",{className:he()("".concat(tt,"-iconEle"),"".concat(tt,"-icon__").concat(Ke.getNodeState()||"docu"),Ze&&"".concat(tt,"-icon_loading"))})},Ke.renderSelector=function(){var Ze=Ke.state.dragNodeHighlight,tt=Ke.props,ft=tt.title,Ut=ft===void 0?Ee:ft,nt=tt.selected,Ge=tt.icon,jt=tt.loading,yn=tt.data,ln=Ke.props.context,Tt=ln.prefixCls,Lt=ln.showIcon,Jt=ln.icon,kn=ln.loadData,In=ln.titleRender,Qt=Ke.isDisabled(),Mn="".concat(Tt,"-node-content-wrapper"),Wn;if(Lt){var zn=Ge||Jt;Wn=zn?se.createElement("span",{className:he()("".concat(Tt,"-iconEle"),"".concat(Tt,"-icon__customize"))},typeof zn=="function"?zn(Ke.props):zn):Ke.renderIcon()}else kn&&jt&&(Wn=Ke.renderIcon());var at;typeof Ut=="function"?at=Ut(yn):In?at=In(yn):at=Ut;var Oe=se.createElement("span",{className:"".concat(Tt,"-title")},at);return se.createElement("span",{ref:Ke.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:he()("".concat(Mn),"".concat(Mn,"-").concat(Ke.getNodeState()||"normal"),!Qt&&(nt||Ze)&&"".concat(Tt,"-node-selected")),onMouseEnter:Ke.onMouseEnter,onMouseLeave:Ke.onMouseLeave,onContextMenu:Ke.onContextMenu,onClick:Ke.onSelectorClick,onDoubleClick:Ke.onSelectorDoubleClick},Wn,Oe,Ke.renderDropIndicator())},Ke.renderDropIndicator=function(){var Ze=Ke.props,tt=Ze.disabled,ft=Ze.eventKey,Ut=Ke.props.context,nt=Ut.draggable,Ge=Ut.dropLevelOffset,jt=Ut.dropPosition,yn=Ut.prefixCls,ln=Ut.indent,Tt=Ut.dropIndicatorRender,Lt=Ut.dragOverNodeKey,Jt=Ut.direction,kn=!!nt,In=!tt&&kn&&Lt===ft,Qt=ln!=null?ln:Ke.cacheIndent;return Ke.cacheIndent=ln,In?Tt({dropPosition:jt,dropLevelOffset:Ge,indent:Qt,prefixCls:yn,direction:Jt}):null},Ke}return(0,fe.Z)(dt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var zt=this.props.selectable,pt=this.props.context.selectable;return typeof zt=="boolean"?zt:pt}},{key:"render",value:function(){var zt,pt=this.props,Kt=pt.eventKey,Ze=pt.className,tt=pt.style,ft=pt.dragOver,Ut=pt.dragOverGapTop,nt=pt.dragOverGapBottom,Ge=pt.isLeaf,jt=pt.isStart,yn=pt.isEnd,ln=pt.expanded,Tt=pt.selected,Lt=pt.checked,Jt=pt.halfChecked,kn=pt.loading,In=pt.domRef,Qt=pt.active,Mn=pt.data,Wn=pt.onMouseMove,zn=pt.selectable,at=(0,Le.Z)(pt,$e),Oe=this.props.context,ke=Oe.prefixCls,Be=Oe.filterTreeNode,Ne=Oe.keyEntities,we=Oe.dropContainerKey,rt=Oe.dropTargetKey,It=Oe.draggingNodeKey,Ct=this.isDisabled(),$t=(0,me.Z)(at,{aria:!0,data:!0}),Vt=(0,ve.Z)(Ne,Kt)||{},wt=Vt.level,on=yn[yn.length-1],Dt=this.isDraggable(),Xt=!Ct&&Dt,nn=It===Kt,bn=zn!==void 0?{"aria-selected":!!zn}:void 0;return se.createElement("div",(0,te.Z)({ref:In,className:he()(Ze,"".concat(ke,"-treenode"),(zt={},(0,Se.Z)(zt,"".concat(ke,"-treenode-disabled"),Ct),(0,Se.Z)(zt,"".concat(ke,"-treenode-switcher-").concat(ln?"open":"close"),!Ge),(0,Se.Z)(zt,"".concat(ke,"-treenode-checkbox-checked"),Lt),(0,Se.Z)(zt,"".concat(ke,"-treenode-checkbox-indeterminate"),Jt),(0,Se.Z)(zt,"".concat(ke,"-treenode-selected"),Tt),(0,Se.Z)(zt,"".concat(ke,"-treenode-loading"),kn),(0,Se.Z)(zt,"".concat(ke,"-treenode-active"),Qt),(0,Se.Z)(zt,"".concat(ke,"-treenode-leaf-last"),on),(0,Se.Z)(zt,"".concat(ke,"-treenode-draggable"),Dt),(0,Se.Z)(zt,"dragging",nn),(0,Se.Z)(zt,"drop-target",rt===Kt),(0,Se.Z)(zt,"drop-container",we===Kt),(0,Se.Z)(zt,"drag-over",!Ct&&ft),(0,Se.Z)(zt,"drag-over-gap-top",!Ct&&Ut),(0,Se.Z)(zt,"drag-over-gap-bottom",!Ct&&nt),(0,Se.Z)(zt,"filter-node",Be&&Be((0,Fe.F)(this.props))),zt)),style:tt,draggable:Xt,"aria-grabbed":nn,onDragStart:Xt?this.onDragStart:void 0,onDragEnter:Dt?this.onDragEnter:void 0,onDragOver:Dt?this.onDragOver:void 0,onDragLeave:Dt?this.onDragLeave:void 0,onDrop:Dt?this.onDrop:void 0,onDragEnd:Dt?this.onDragEnd:void 0,onMouseMove:Wn},bn,$t),se.createElement(Me,{prefixCls:ke,level:wt,isStart:jt,isEnd:yn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),dt}(se.Component),Re=function(Ye){return se.createElement(ye.k.Consumer,null,function(dt){return se.createElement(be,(0,te.Z)({},Ye,{context:dt}))})};Re.displayName="TreeNode",Re.isTreeNode=1;var De=Re},69610:function(dn,St,ee){"use strict";ee.d(St,{k:function(){return Se}});var te=ee(67294),Se=te.createContext(null)},29873:function(dn,St,ee){"use strict";ee.d(St,{BT:function(){return Me},E6:function(){return $e},L0:function(){return de},OM:function(){return _e},_5:function(){return re},r7:function(){return Te},wA:function(){return me},yx:function(){return he}});var te=ee(74902),Se=ee(71002),Le=ee(72978),Ce=ee(67294),ce=ee(56261),fe=ee(3596),ae=ee(83898),le=null;function re(ze,Ee){if(!ze)return[];var be=ze.slice(),Re=be.indexOf(Ee);return Re>=0&&be.splice(Re,1),be}function de(ze,Ee){var be=(ze||[]).slice();return be.indexOf(Ee)===-1&&be.push(Ee),be}function he(ze){return ze.split("-")}function me(ze,Ee){var be=[],Re=(0,fe.Z)(Ee,ze);function De(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];et.forEach(function(Ye){var dt=Ye.key,Ke=Ye.children;be.push(dt),De(Ke)})}return De(Re.children),be}function se(ze){if(ze.parent){var Ee=he(ze.pos);return Number(Ee[Ee.length-1])===ze.parent.children.length-1}return!1}function ye(ze){var Ee=he(ze.pos);return Number(Ee[Ee.length-1])===0}function _e(ze,Ee,be,Re,De,et,Ye,dt,Ke,zt){var pt,Kt=ze.clientX,Ze=ze.clientY,tt=ze.target.getBoundingClientRect(),ft=tt.top,Ut=tt.height,nt=(zt==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-Kt),Ge=(nt-12)/Re,jt=(0,fe.Z)(dt,be.props.eventKey);if(Ze<ft+Ut/2){var yn=Ye.findIndex(function(Oe){return Oe.key===jt.key}),ln=yn<=0?0:yn-1,Tt=Ye[ln].key;jt=(0,fe.Z)(dt,Tt)}var Lt=jt.key,Jt=jt,kn=jt.key,In=0,Qt=0;if(!Ke.includes(Lt))for(var Mn=0;Mn<Ge&&se(jt);Mn+=1)jt=jt.parent,Qt+=1;var Wn=Ee.props.data,zn=jt.node,at=!0;return ye(jt)&&jt.level===0&&Ze<ft+Ut/2&&et({dragNode:Wn,dropNode:zn,dropPosition:-1})&&jt.key===be.props.eventKey?In=-1:(Jt.children||[]).length&&Ke.includes(kn)?et({dragNode:Wn,dropNode:zn,dropPosition:0})?In=0:at=!1:Qt===0?Ge>-1.5?et({dragNode:Wn,dropNode:zn,dropPosition:1})?In=1:at=!1:et({dragNode:Wn,dropNode:zn,dropPosition:0})?In=0:et({dragNode:Wn,dropNode:zn,dropPosition:1})?In=1:at=!1:et({dragNode:Wn,dropNode:zn,dropPosition:1})?In=1:at=!1,{dropPosition:In,dropLevelOffset:Qt,dropTargetKey:jt.key,dropTargetPos:jt.pos,dragOverNodeKey:kn,dropContainerKey:In===0?null:((pt=jt.parent)===null||pt===void 0?void 0:pt.key)||null,dropAllowed:at}}function Me(ze,Ee){if(ze){var be=Ee.multiple;return be?ze.slice():ze.length?[ze[0]]:ze}}var ve=function(Ee){return Ee};function Fe(ze,Ee){if(!ze)return[];var be=Ee||{},Re=be.processProps,De=Re===void 0?ve:Re,et=Array.isArray(ze)?ze:[ze];return et.map(function(Ye){var dt=Ye.children,Ke=_objectWithoutProperties(Ye,le),zt=Fe(dt,Ee);return React.createElement(TreeNode,_extends({key:Ke.key},De(Ke)),zt)})}function $e(ze){if(!ze)return null;var Ee;if(Array.isArray(ze))Ee={checkedKeys:ze,halfCheckedKeys:void 0};else if((0,Se.Z)(ze)==="object")Ee={checkedKeys:ze.checked||void 0,halfCheckedKeys:ze.halfChecked||void 0};else return(0,Le.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ee}function Te(ze,Ee){var be=new Set;function Re(De){if(!be.has(De)){var et=(0,fe.Z)(Ee,De);if(et){be.add(De);var Ye=et.parent,dt=et.node;dt.disabled||Ye&&Re(Ye.key)}}}return(ze||[]).forEach(function(De){Re(De)}),(0,te.Z)(be)}},97153:function(dn,St,ee){"use strict";ee.d(St,{S:function(){return ae}});var te=ee(72978),Se=ee(3596);function Le(le,re){var de=new Set;return le.forEach(function(he){re.has(he)||de.add(he)}),de}function Ce(le){var re=le||{},de=re.disabled,he=re.disableCheckbox,me=re.checkable;return!!(de||he)||me===!1}function ce(le,re,de,he){for(var me=new Set(le),se=new Set,ye=0;ye<=de;ye+=1){var _e=re.get(ye)||new Set;_e.forEach(function($e){var Te=$e.key,ze=$e.node,Ee=$e.children,be=Ee===void 0?[]:Ee;me.has(Te)&&!he(ze)&&be.filter(function(Re){return!he(Re.node)}).forEach(function(Re){me.add(Re.key)})})}for(var Me=new Set,ve=de;ve>=0;ve-=1){var Fe=re.get(ve)||new Set;Fe.forEach(function($e){var Te=$e.parent,ze=$e.node;if(!(he(ze)||!$e.parent||Me.has($e.parent.key))){if(he($e.parent.node)){Me.add(Te.key);return}var Ee=!0,be=!1;(Te.children||[]).filter(function(Re){return!he(Re.node)}).forEach(function(Re){var De=Re.key,et=me.has(De);Ee&&!et&&(Ee=!1),!be&&(et||se.has(De))&&(be=!0)}),Ee&&me.add(Te.key),be&&se.add(Te.key),Me.add(Te.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(Le(se,me))}}function fe(le,re,de,he,me){for(var se=new Set(le),ye=new Set(re),_e=0;_e<=he;_e+=1){var Me=de.get(_e)||new Set;Me.forEach(function(Te){var ze=Te.key,Ee=Te.node,be=Te.children,Re=be===void 0?[]:be;!se.has(ze)&&!ye.has(ze)&&!me(Ee)&&Re.filter(function(De){return!me(De.node)}).forEach(function(De){se.delete(De.key)})})}ye=new Set;for(var ve=new Set,Fe=he;Fe>=0;Fe-=1){var $e=de.get(Fe)||new Set;$e.forEach(function(Te){var ze=Te.parent,Ee=Te.node;if(!(me(Ee)||!Te.parent||ve.has(Te.parent.key))){if(me(Te.parent.node)){ve.add(ze.key);return}var be=!0,Re=!1;(ze.children||[]).filter(function(De){return!me(De.node)}).forEach(function(De){var et=De.key,Ye=se.has(et);be&&!Ye&&(be=!1),!Re&&(Ye||ye.has(et))&&(Re=!0)}),be||se.delete(ze.key),Re&&ye.add(ze.key),ve.add(ze.key)}})}return{checkedKeys:Array.from(se),halfCheckedKeys:Array.from(Le(ye,se))}}function ae(le,re,de,he){var me=[],se;he?se=he:se=Ce;var ye=new Set(le.filter(function(Fe){var $e=!!(0,Se.Z)(de,Fe);return $e||me.push(Fe),$e})),_e=new Map,Me=0;Object.keys(de).forEach(function(Fe){var $e=de[Fe],Te=$e.level,ze=_e.get(Te);ze||(ze=new Set,_e.set(Te,ze)),ze.add($e),Me=Math.max(Me,Te)}),(0,te.ZP)(!me.length,"Tree missing follow keys: ".concat(me.slice(0,100).map(function(Fe){return"'".concat(Fe,"'")}).join(", ")));var ve;return re===!0?ve=ce(ye,_e,Me,se):ve=fe(ye,re.halfCheckedKeys,_e,Me,se),ve}},3596:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return te}});function te(Se,Le){return Se[Le]}},83898:function(dn,St,ee){"use strict";ee.d(St,{I8:function(){return Te},F:function(){return Ee},zn:function(){return ve},w$:function(){return _e},oH:function(){return Fe},km:function(){return ye},H8:function(){return ze}});var te=ee(71002),Se=ee(74902),Le=ee(1413),Ce=ee(45987),ce=ee(67294),fe=ee(28580);function ae(be){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=[];return ce.Children.forEach(be,function(et){et==null&&!Re.keepEmpty||(Array.isArray(et)?De=De.concat(ae(et)):(0,fe.isFragment)(et)&&et.props?De=De.concat(ae(et.props.children,Re)):De.push(et))}),De}function le(be,Re){var De=(0,Le.Z)({},be);return Array.isArray(Re)&&Re.forEach(function(et){delete De[et]}),De}var re=ee(72978),de=ee(3596),he=["children"];function me(be,Re){return"".concat(be,"-").concat(Re)}function se(be){return be&&be.type&&be.type.isTreeNode}function ye(be,Re){return be!=null?be:Re}function _e(be){var Re=be||{},De=Re.title,et=Re._title,Ye=Re.key,dt=Re.children,Ke=De||"title";return{title:Ke,_title:et||[Ke],key:Ye||"key",children:dt||"children"}}function Me(be,Re){var De=new Map;function et(Ye){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ye||[]).forEach(function(Ke){var zt=Ke[Re.key],pt=Ke[Re.children];warning(zt!=null,"Tree node must have a certain key: [".concat(dt).concat(zt,"]"));var Kt=String(zt);warning(!De.has(Kt)||zt===null||zt===void 0,"Same 'key' exist in the Tree: ".concat(Kt)),De.set(Kt,!0),et(pt,"".concat(dt).concat(Kt," > "))})}et(be)}function ve(be){function Re(De){var et=ae(De);return et.map(function(Ye){if(!se(Ye))return(0,re.ZP)(!Ye,"Tree/TreeNode can only accept TreeNode as children."),null;var dt=Ye.key,Ke=Ye.props,zt=Ke.children,pt=(0,Ce.Z)(Ke,he),Kt=(0,Le.Z)({key:dt},pt),Ze=Re(zt);return Ze.length&&(Kt.children=Ze),Kt}).filter(function(Ye){return Ye})}return Re(be)}function Fe(be,Re,De){var et=_e(De),Ye=et._title,dt=et.key,Ke=et.children,zt=new Set(Re===!0?[]:Re),pt=[];function Kt(Ze){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ze.map(function(ft,Ut){for(var nt=me(tt?tt.pos:"0",Ut),Ge=ye(ft[dt],nt),jt,yn=0;yn<Ye.length;yn+=1){var ln=Ye[yn];if(ft[ln]!==void 0){jt=ft[ln];break}}var Tt=(0,Le.Z)((0,Le.Z)({},le(ft,[].concat((0,Se.Z)(Ye),[dt,Ke]))),{},{title:jt,key:Ge,parent:tt,pos:nt,children:null,data:ft,isStart:[].concat((0,Se.Z)(tt?tt.isStart:[]),[Ut===0]),isEnd:[].concat((0,Se.Z)(tt?tt.isEnd:[]),[Ut===Ze.length-1])});return pt.push(Tt),Re===!0||zt.has(Ge)?Tt.children=Kt(ft[Ke]||[],Tt):Tt.children=[],Tt})}return Kt(be),pt}function $e(be,Re,De){var et={};(0,te.Z)(De)==="object"?et=De:et={externalGetKey:De},et=et||{};var Ye=et,dt=Ye.childrenPropName,Ke=Ye.externalGetKey,zt=Ye.fieldNames,pt=_e(zt),Kt=pt.key,Ze=pt.children,tt=dt||Ze,ft;Ke?typeof Ke=="string"?ft=function(Ge){return Ge[Ke]}:typeof Ke=="function"&&(ft=function(Ge){return Ke(Ge)}):ft=function(Ge,jt){return ye(Ge[Kt],jt)};function Ut(nt,Ge,jt,yn){var ln=nt?nt[tt]:be,Tt=nt?me(jt.pos,Ge):"0",Lt=nt?[].concat((0,Se.Z)(yn),[nt]):[];if(nt){var Jt=ft(nt,Tt),kn={node:nt,index:Ge,pos:Tt,key:Jt,parentPos:jt.node?jt.pos:null,level:jt.level+1,nodes:Lt};Re(kn)}ln&&ln.forEach(function(In,Qt){Ut(In,Qt,{node:nt,pos:Tt,level:jt?jt.level+1:-1},Lt)})}Ut(null)}function Te(be){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=Re.initWrapper,et=Re.processEntity,Ye=Re.onProcessFinished,dt=Re.externalGetKey,Ke=Re.childrenPropName,zt=Re.fieldNames,pt=arguments.length>2?arguments[2]:void 0,Kt=dt||pt,Ze={},tt={},ft={posEntities:Ze,keyEntities:tt};return De&&(ft=De(ft)||ft),$e(be,function(Ut){var nt=Ut.node,Ge=Ut.index,jt=Ut.pos,yn=Ut.key,ln=Ut.parentPos,Tt=Ut.level,Lt=Ut.nodes,Jt={node:nt,nodes:Lt,index:Ge,key:yn,pos:jt,level:Tt},kn=ye(yn,jt);Ze[jt]=Jt,tt[kn]=Jt,Jt.parent=Ze[ln],Jt.parent&&(Jt.parent.children=Jt.parent.children||[],Jt.parent.children.push(Jt)),et&&et(Jt,ft)},{externalGetKey:Kt,childrenPropName:Ke,fieldNames:zt}),Ye&&Ye(ft),ft}function ze(be,Re){var De=Re.expandedKeys,et=Re.selectedKeys,Ye=Re.loadedKeys,dt=Re.loadingKeys,Ke=Re.checkedKeys,zt=Re.halfCheckedKeys,pt=Re.dragOverNodeKey,Kt=Re.dropPosition,Ze=Re.keyEntities,tt=(0,de.Z)(Ze,be),ft={eventKey:be,expanded:De.indexOf(be)!==-1,selected:et.indexOf(be)!==-1,loaded:Ye.indexOf(be)!==-1,loading:dt.indexOf(be)!==-1,checked:Ke.indexOf(be)!==-1,halfChecked:zt.indexOf(be)!==-1,pos:String(tt?tt.pos:""),dragOver:pt===be&&Kt===0,dragOverGapTop:pt===be&&Kt===-1,dragOverGapBottom:pt===be&&Kt===1};return ft}function Ee(be){var Re=be.data,De=be.expanded,et=be.selected,Ye=be.checked,dt=be.loaded,Ke=be.loading,zt=be.halfChecked,pt=be.dragOver,Kt=be.dragOverGapTop,Ze=be.dragOverGapBottom,tt=be.pos,ft=be.active,Ut=be.eventKey,nt=(0,Le.Z)((0,Le.Z)({},Re),{},{expanded:De,selected:et,checked:Ye,loaded:dt,loading:Ke,halfChecked:zt,dragOver:pt,dragOverGapTop:Kt,dragOverGapBottom:Ze,pos:tt,active:ft,key:Ut});return"props"in nt||Object.defineProperty(nt,"props",{get:function(){return(0,re.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),be}}),nt}},34952:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return le}});var te=ee(1413),Se=`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`,Le=`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`,Ce="".concat(Se," ").concat(Le).split(/[\s\n]+/),ce="aria-",fe="data-";function ae(re,de){return re.indexOf(de)===0}function le(re){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he;de===!1?he={aria:!0,data:!0,attr:!0}:de===!0?he={aria:!0}:he=(0,te.Z)({},de);var me={};return Object.keys(re).forEach(function(se){(he.aria&&(se==="role"||ae(se,ce))||he.data&&ae(se,fe)||he.attr&&Ce.includes(se))&&(me[se]=re[se])}),me}},72978:function(dn,St,ee){"use strict";var te={};function Se(le,re){}function Le(le,re){}function Ce(){te={}}function ce(le,re,de){!re&&!te[de]&&(le(!1,de),te[de]=!0)}function fe(le,re){ce(Se,le,re)}function ae(le,re){ce(Le,le,re)}St.ZP=fe},81533:function(dn,St){"use strict";var ee;var te=typeof Symbol=="function"&&Symbol.for,Se=te?Symbol.for("react.element"):60103,Le=te?Symbol.for("react.portal"):60106,Ce=te?Symbol.for("react.fragment"):60107,ce=te?Symbol.for("react.strict_mode"):60108,fe=te?Symbol.for("react.profiler"):60114,ae=te?Symbol.for("react.provider"):60109,le=te?Symbol.for("react.context"):60110,re=te?Symbol.for("react.async_mode"):60111,de=te?Symbol.for("react.concurrent_mode"):60111,he=te?Symbol.for("react.forward_ref"):60112,me=te?Symbol.for("react.suspense"):60113,se=te?Symbol.for("react.suspense_list"):60120,ye=te?Symbol.for("react.memo"):60115,_e=te?Symbol.for("react.lazy"):60116,Me=te?Symbol.for("react.block"):60121,ve=te?Symbol.for("react.fundamental"):60117,Fe=te?Symbol.for("react.responder"):60118,$e=te?Symbol.for("react.scope"):60119;function Te(Ee){if(typeof Ee=="object"&&Ee!==null){var be=Ee.$$typeof;switch(be){case Se:switch(Ee=Ee.type,Ee){case re:case de:case Ce:case fe:case ce:case me:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case le:case he:case _e:case ye:case ae:return Ee;default:return be}}case Le:return be}}}function ze(Ee){return Te(Ee)===de}ee=re,ee=de,ee=le,ee=ae,ee=Se,ee=he,ee=Ce,ee=_e,ee=ye,ee=Le,ee=fe,ee=ce,ee=me,ee=function(Ee){return ze(Ee)||Te(Ee)===re},ee=ze,ee=function(Ee){return Te(Ee)===le},ee=function(Ee){return Te(Ee)===ae},ee=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Se},ee=function(Ee){return Te(Ee)===he},St.isFragment=function(Ee){return Te(Ee)===Ce},ee=function(Ee){return Te(Ee)===_e},St.isMemo=function(Ee){return Te(Ee)===ye},ee=function(Ee){return Te(Ee)===Le},ee=function(Ee){return Te(Ee)===fe},ee=function(Ee){return Te(Ee)===ce},ee=function(Ee){return Te(Ee)===me},ee=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ce||Ee===de||Ee===fe||Ee===ce||Ee===me||Ee===se||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===_e||Ee.$$typeof===ye||Ee.$$typeof===ae||Ee.$$typeof===le||Ee.$$typeof===he||Ee.$$typeof===ve||Ee.$$typeof===Fe||Ee.$$typeof===$e||Ee.$$typeof===Me)},ee=Te},28580:function(dn,St,ee){"use strict";dn.exports=ee(81533)},92389:function(dn,St){"use strict";var ee={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 Le=Se.keyCode;if(Se.altKey&&!Se.ctrlKey||Se.metaKey||Le>=ee.F1&&Le<=ee.F12)return!1;switch(Le){case ee.ALT:case ee.CAPS_LOCK:case ee.CONTEXT_MENU:case ee.CTRL:case ee.DOWN:case ee.END:case ee.ESC:case ee.HOME:case ee.INSERT:case ee.LEFT:case ee.MAC_FF_META:case ee.META:case ee.NUMLOCK:case ee.NUM_CENTER:case ee.PAGE_DOWN:case ee.PAGE_UP:case ee.PAUSE:case ee.PRINT_SCREEN:case ee.RIGHT:case ee.SHIFT:case ee.UP:case ee.WIN_KEY:case ee.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Se){if(Se>=ee.ZERO&&Se<=ee.NINE||Se>=ee.NUM_ZERO&&Se<=ee.NUM_MULTIPLY||Se>=ee.A&&Se<=ee.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Se===0)return!0;switch(Se){case ee.SPACE:case ee.QUESTION_MARK:case ee.NUM_PLUS:case ee.NUM_MINUS:case ee.NUM_PERIOD:case ee.NUM_DIVISION:case ee.SEMICOLON:case ee.DASH:case ee.EQUALS:case ee.COMMA:case ee.PERIOD:case ee.SLASH:case ee.APOSTROPHE:case ee.SINGLE_QUOTE:case ee.OPEN_SQUARE_BRACKET:case ee.BACKSLASH:case ee.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};St.Z=ee},1337:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return le}});var te=ee(1413),Se=`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`,Le=`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`,Ce="".concat(Se," ").concat(Le).split(/[\s\n]+/),ce="aria-",fe="data-";function ae(re,de){return re.indexOf(de)===0}function le(re){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he;de===!1?he={aria:!0,data:!0,attr:!0}:de===!0?he={aria:!0}:he=(0,te.Z)({},de);var me={};return Object.keys(re).forEach(function(se){(he.aria&&(se==="role"||ae(se,ce))||he.data&&ae(se,fe)||he.attr&&Ce.includes(se))&&(me[se]=re[se])}),me}},88386:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){te.defineOption("placeholder","",function(le,re,de){var he=de&&de!=te.Init;if(re&&!he)le.on("blur",ce),le.on("change",fe),le.on("swapDoc",fe),te.on(le.getInputField(),"compositionupdate",le.state.placeholderCompose=function(){Ce(le)}),fe(le);else if(!re&&he){le.off("blur",ce),le.off("change",fe),le.off("swapDoc",fe),te.off(le.getInputField(),"compositionupdate",le.state.placeholderCompose),Se(le);var me=le.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}re&&!le.hasFocus()&&ce(le)});function Se(le){le.state.placeholder&&(le.state.placeholder.parentNode.removeChild(le.state.placeholder),le.state.placeholder=null)}function Le(le){Se(le);var re=le.state.placeholder=document.createElement("pre");re.style.cssText="height: 0; overflow: visible",re.style.direction=le.getOption("direction"),re.className="CodeMirror-placeholder CodeMirror-line-like";var de=le.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),re.appendChild(de),le.display.lineSpace.insertBefore(re,le.display.lineSpace.firstChild)}function Ce(le){setTimeout(function(){var re=!1,de=le.getInputField();de.nodeName=="TEXTAREA"?re=!de.value:le.lineCount()==1&&(re=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),re?Le(le):Se(le)},20)}function ce(le){ae(le)&&Le(le)}function fe(le){var re=le.getWrapperElement(),de=ae(le);re.className=re.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Le(le):Se(le)}function ae(le){return le.lineCount()===1&&le.getLine(0)===""}})},82801:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){var Se={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Le=te.Pos;te.defineOption("autoCloseBrackets",!1,function(_e,Me,ve){ve&&ve!=te.Init&&(_e.removeKeyMap(ce),_e.state.closeBrackets=null),Me&&(fe(Ce(Me,"pairs")),_e.state.closeBrackets=Me,_e.addKeyMap(ce))});function Ce(_e,Me){return Me=="pairs"&&typeof _e=="string"?_e:typeof _e=="object"&&_e[Me]!=null?_e[Me]:Se[Me]}var ce={Backspace:re,Enter:de};function fe(_e){for(var Me=0;Me<_e.length;Me++){var ve=_e.charAt(Me),Fe="'"+ve+"'";ce[Fe]||(ce[Fe]=ae(ve))}}fe(Se.pairs+"`");function ae(_e){return function(Me){return me(Me,_e)}}function le(_e){var Me=_e.state.closeBrackets;if(!Me||Me.override)return Me;var ve=_e.getModeAt(_e.getCursor());return ve.closeBrackets||Me}function re(_e){var Me=le(_e);if(!Me||_e.getOption("disableInput"))return te.Pass;for(var ve=Ce(Me,"pairs"),Fe=_e.listSelections(),$e=0;$e<Fe.length;$e++){if(!Fe[$e].empty())return te.Pass;var Te=se(_e,Fe[$e].head);if(!Te||ve.indexOf(Te)%2!=0)return te.Pass}for(var $e=Fe.length-1;$e>=0;$e--){var ze=Fe[$e].head;_e.replaceRange("",Le(ze.line,ze.ch-1),Le(ze.line,ze.ch+1),"+delete")}}function de(_e){var Me=le(_e),ve=Me&&Ce(Me,"explode");if(!ve||_e.getOption("disableInput"))return te.Pass;for(var Fe=_e.listSelections(),$e=0;$e<Fe.length;$e++){if(!Fe[$e].empty())return te.Pass;var Te=se(_e,Fe[$e].head);if(!Te||ve.indexOf(Te)%2!=0)return te.Pass}_e.operation(function(){var ze=_e.lineSeparator()||`
|
|
|
`;_e.replaceSelection(ze+ze,null),_e.execCommand("goCharLeft"),Fe=_e.listSelections();for(var Ee=0;Ee<Fe.length;Ee++){var be=Fe[Ee].head.line;_e.indentLine(be,null,!0),_e.indentLine(be+1,null,!0)}})}function he(_e){var Me=te.cmpPos(_e.anchor,_e.head)>0;return{anchor:new Le(_e.anchor.line,_e.anchor.ch+(Me?-1:1)),head:new Le(_e.head.line,_e.head.ch+(Me?1:-1))}}function me(_e,Me){var ve=le(_e);if(!ve||_e.getOption("disableInput"))return te.Pass;var Fe=Ce(ve,"pairs"),$e=Fe.indexOf(Me);if($e==-1)return te.Pass;for(var Te=Ce(ve,"closeBefore"),ze=Ce(ve,"triples"),Ee=Fe.charAt($e+1)==Me,be=_e.listSelections(),Re=$e%2==0,De,et=0;et<be.length;et++){var Ye=be[et],dt=Ye.head,Ke,zt=_e.getRange(dt,Le(dt.line,dt.ch+1));if(Re&&!Ye.empty())Ke="surround";else if((Ee||!Re)&&zt==Me)Ee&&ye(_e,dt)?Ke="both":ze.indexOf(Me)>=0&&_e.getRange(dt,Le(dt.line,dt.ch+3))==Me+Me+Me?Ke="skipThree":Ke="skip";else if(Ee&&dt.ch>1&&ze.indexOf(Me)>=0&&_e.getRange(Le(dt.line,dt.ch-2),dt)==Me+Me){if(dt.ch>2&&/\bstring/.test(_e.getTokenTypeAt(Le(dt.line,dt.ch-2))))return te.Pass;Ke="addFour"}else if(Ee){var pt=dt.ch==0?" ":_e.getRange(Le(dt.line,dt.ch-1),dt);if(!te.isWordChar(zt)&&pt!=Me&&!te.isWordChar(pt))Ke="both";else return te.Pass}else if(Re&&(zt.length===0||/\s/.test(zt)||Te.indexOf(zt)>-1))Ke="both";else return te.Pass;if(!De)De=Ke;else if(De!=Ke)return te.Pass}var Kt=$e%2?Fe.charAt($e-1):Me,Ze=$e%2?Me:Fe.charAt($e+1);_e.operation(function(){if(De=="skip")_e.execCommand("goCharRight");else if(De=="skipThree")for(var tt=0;tt<3;tt++)_e.execCommand("goCharRight");else if(De=="surround"){for(var ft=_e.getSelections(),tt=0;tt<ft.length;tt++)ft[tt]=Kt+ft[tt]+Ze;_e.replaceSelections(ft,"around"),ft=_e.listSelections().slice();for(var tt=0;tt<ft.length;tt++)ft[tt]=he(ft[tt]);_e.setSelections(ft)}else De=="both"?(_e.replaceSelection(Kt+Ze,null),_e.triggerElectric(Kt+Ze),_e.execCommand("goCharLeft")):De=="addFour"&&(_e.replaceSelection(Kt+Kt+Kt+Kt,"before"),_e.execCommand("goCharRight"))})}function se(_e,Me){var ve=_e.getRange(Le(Me.line,Me.ch-1),Le(Me.line,Me.ch+1));return ve.length==2?ve:null}function ye(_e,Me){var ve=_e.getTokenAt(Le(Me.line,Me.ch+1));return/\bstring/.test(ve.type)&&ve.start==Me.ch&&(Me.ch==0||!/\bstring/.test(_e.getTokenTypeAt(Me)))}})},57341:function(dn,St,ee){(function(te){te(ee(4631),ee(4786))})(function(te){te.defineOption("autoCloseTags",!1,function(re,de,he){if(he!=te.Init&&he&&re.removeKeyMap("autoCloseTags"),!!de){var me={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(me["'/'"]=function(se){return fe(se)}),(typeof de!="object"||de.whenOpening!==!1)&&(me["'>'"]=function(se){return Ce(se)}),re.addKeyMap(me)}});var Se=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Le=["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 Ce(re){if(re.getOption("disableInput"))return te.Pass;for(var de=re.listSelections(),he=[],me=re.getOption("autoCloseTags"),se=0;se<de.length;se++){if(!de[se].empty())return te.Pass;var ye=de[se].head,_e=re.getTokenAt(ye),Me=te.innerMode(re.getMode(),_e.state),ve=Me.state,Fe=Me.mode.xmlCurrentTag&&Me.mode.xmlCurrentTag(ve),$e=Fe&&Fe.name;if(!$e)return te.Pass;var Te=Me.mode.configuration=="html",ze=typeof me=="object"&&me.dontCloseTags||Te&&Se,Ee=typeof me=="object"&&me.indentTags||Te&&Le;_e.end>ye.ch&&($e=$e.slice(0,$e.length-_e.end+ye.ch));var be=$e.toLowerCase();if(!$e||_e.type=="string"&&(_e.end!=ye.ch||!/[\"\']/.test(_e.string.charAt(_e.string.length-1))||_e.string.length==1)||_e.type=="tag"&&Fe.close||_e.string.indexOf("/")==ye.ch-_e.start-1||ze&&ae(ze,be)>-1||le(re,Me.mode.xmlCurrentContext&&Me.mode.xmlCurrentContext(ve)||[],$e,ye,!0))return te.Pass;var Re=typeof me=="object"&&me.emptyTags;if(Re&&ae(Re,$e)>-1){he[se]={text:"/>",newPos:te.Pos(ye.line,ye.ch+2)};continue}var De=Ee&&ae(Ee,be)>-1;he[se]={indent:De,text:">"+(De?`
|
|
|
|
|
|
`:"")+"</"+$e+">",newPos:De?te.Pos(ye.line+1,0):te.Pos(ye.line,ye.ch+1)}}for(var et=typeof me=="object"&&me.dontIndentOnAutoClose,se=de.length-1;se>=0;se--){var Ye=he[se];re.replaceRange(Ye.text,de[se].head,de[se].anchor,"+insert");var dt=re.listSelections().slice(0);dt[se]={head:Ye.newPos,anchor:Ye.newPos},re.setSelections(dt),!et&&Ye.indent&&(re.indentLine(Ye.newPos.line,null,!0),re.indentLine(Ye.newPos.line+1,null,!0))}}function ce(re,de){for(var he=re.listSelections(),me=[],se=de?"/":"</",ye=re.getOption("autoCloseTags"),_e=typeof ye=="object"&&ye.dontIndentOnSlash,Me=0;Me<he.length;Me++){if(!he[Me].empty())return te.Pass;var ve=he[Me].head,Fe=re.getTokenAt(ve),$e=te.innerMode(re.getMode(),Fe.state),Te=$e.state;if(de&&(Fe.type=="string"||Fe.string.charAt(0)!="<"||Fe.start!=ve.ch-1))return te.Pass;var ze,Ee=$e.mode.name!="xml"&&re.getMode().name=="htmlmixed";if(Ee&&$e.mode.name=="javascript")ze=se+"script";else if(Ee&&$e.mode.name=="css")ze=se+"style";else{var be=$e.mode.xmlCurrentContext&&$e.mode.xmlCurrentContext(Te);if(!be||be.length&&le(re,be,be[be.length-1],ve))return te.Pass;ze=se+be[be.length-1]}re.getLine(ve.line).charAt(Fe.end)!=">"&&(ze+=">"),me[Me]=ze}if(re.replaceSelections(me),he=re.listSelections(),!_e)for(var Me=0;Me<he.length;Me++)(Me==he.length-1||he[Me].head.line<he[Me+1].head.line)&&re.indentLine(he[Me].head.line)}function fe(re){return re.getOption("disableInput")?te.Pass:ce(re,!0)}te.commands.closeTag=function(re){return ce(re)};function ae(re,de){if(re.indexOf)return re.indexOf(de);for(var he=0,me=re.length;he<me;++he)if(re[he]==de)return he;return-1}function le(re,de,he,me,se){if(!te.scanForClosingTag)return!1;var ye=Math.min(re.lastLine()+1,me.line+500),_e=te.scanForClosingTag(re,me,null,ye);if(!_e||_e.tag!=he)return!1;for(var Me=se?1:0,ve=de.length-1;ve>=0&&de[ve]==he;ve--)++Me;me=_e.to;for(var ve=1;ve<Me;ve++){var Fe=te.scanForClosingTag(re,me,null,ye);if(!Fe||Fe.tag!=he)return!1;me=Fe.to}return!0}})},4786:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){"use strict";var Se=te.Pos;function Le(ve,Fe){return ve.line-Fe.line||ve.ch-Fe.ch}var Ce="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",ce=Ce+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+Ce+"]["+ce+"]*)","g");function ae(ve,Fe,$e,Te){this.line=Fe,this.ch=$e,this.cm=ve,this.text=ve.getLine(Fe),this.min=Te?Math.max(Te.from,ve.firstLine()):ve.firstLine(),this.max=Te?Math.min(Te.to-1,ve.lastLine()):ve.lastLine()}function le(ve,Fe){var $e=ve.cm.getTokenTypeAt(Se(ve.line,Fe));return $e&&/\btag\b/.test($e)}function re(ve){if(!(ve.line>=ve.max))return ve.ch=0,ve.text=ve.cm.getLine(++ve.line),!0}function de(ve){if(!(ve.line<=ve.min))return ve.text=ve.cm.getLine(--ve.line),ve.ch=ve.text.length,!0}function he(ve){for(;;){var Fe=ve.text.indexOf(">",ve.ch);if(Fe==-1){if(re(ve))continue;return}if(!le(ve,Fe+1)){ve.ch=Fe+1;continue}var $e=ve.text.lastIndexOf("/",Fe),Te=$e>-1&&!/\S/.test(ve.text.slice($e+1,Fe));return ve.ch=Fe+1,Te?"selfClose":"regular"}}function me(ve){for(;;){var Fe=ve.ch?ve.text.lastIndexOf("<",ve.ch-1):-1;if(Fe==-1){if(de(ve))continue;return}if(!le(ve,Fe+1)){ve.ch=Fe;continue}fe.lastIndex=Fe,ve.ch=Fe;var $e=fe.exec(ve.text);if($e&&$e.index==Fe)return $e}}function se(ve){for(;;){fe.lastIndex=ve.ch;var Fe=fe.exec(ve.text);if(!Fe){if(re(ve))continue;return}if(!le(ve,Fe.index+1)){ve.ch=Fe.index+1;continue}return ve.ch=Fe.index+Fe[0].length,Fe}}function ye(ve){for(;;){var Fe=ve.ch?ve.text.lastIndexOf(">",ve.ch-1):-1;if(Fe==-1){if(de(ve))continue;return}if(!le(ve,Fe+1)){ve.ch=Fe;continue}var $e=ve.text.lastIndexOf("/",Fe),Te=$e>-1&&!/\S/.test(ve.text.slice($e+1,Fe));return ve.ch=Fe+1,Te?"selfClose":"regular"}}function _e(ve,Fe){for(var $e=[];;){var Te=se(ve),ze,Ee=ve.line,be=ve.ch-(Te?Te[0].length:0);if(!Te||!(ze=he(ve)))return;if(ze!="selfClose")if(Te[1]){for(var Re=$e.length-1;Re>=0;--Re)if($e[Re]==Te[2]){$e.length=Re;break}if(Re<0&&(!Fe||Fe==Te[2]))return{tag:Te[2],from:Se(Ee,be),to:Se(ve.line,ve.ch)}}else $e.push(Te[2])}}function Me(ve,Fe){for(var $e=[];;){var Te=ye(ve);if(!Te)return;if(Te=="selfClose"){me(ve);continue}var ze=ve.line,Ee=ve.ch,be=me(ve);if(!be)return;if(be[1])$e.push(be[2]);else{for(var Re=$e.length-1;Re>=0;--Re)if($e[Re]==be[2]){$e.length=Re;break}if(Re<0&&(!Fe||Fe==be[2]))return{tag:be[2],from:Se(ve.line,ve.ch),to:Se(ze,Ee)}}}}te.registerHelper("fold","xml",function(ve,Fe){for(var $e=new ae(ve,Fe.line,0);;){var Te=se($e);if(!Te||$e.line!=Fe.line)return;var ze=he($e);if(!ze)return;if(!Te[1]&&ze!="selfClose"){var Ee=Se($e.line,$e.ch),be=_e($e,Te[2]);return be&&Le(be.from,Ee)>0?{from:Ee,to:be.from}:null}}}),te.findMatchingTag=function(ve,Fe,$e){var Te=new ae(ve,Fe.line,Fe.ch,$e);if(!(Te.text.indexOf(">")==-1&&Te.text.indexOf("<")==-1)){var ze=he(Te),Ee=ze&&Se(Te.line,Te.ch),be=ze&&me(Te);if(!(!ze||!be||Le(Te,Fe)>0)){var Re={from:Se(Te.line,Te.ch),to:Ee,tag:be[2]};return ze=="selfClose"?{open:Re,close:null,at:"open"}:be[1]?{open:Me(Te,be[2]),close:Re,at:"close"}:(Te=new ae(ve,Ee.line,Ee.ch,$e),{open:Re,close:_e(Te,be[2]),at:"open"})}}},te.findEnclosingTag=function(ve,Fe,$e,Te){for(var ze=new ae(ve,Fe.line,Fe.ch,$e);;){var Ee=Me(ze,Te);if(!Ee)break;var be=new ae(ve,Fe.line,Fe.ch,$e),Re=_e(be,Ee.tag);if(Re)return{open:Ee,close:Re}}},te.scanForClosingTag=function(ve,Fe,$e,Te){var ze=new ae(ve,Fe.line,Fe.ch,Te?{from:0,to:Te}:null);return _e(ze,$e)}})},4631:function(dn){(function(St,ee){dn.exports=ee()})(this,function(){"use strict";var St=navigator.userAgent,ee=navigator.platform,te=/gecko\/\d/i.test(St),Se=/MSIE \d/.test(St),Le=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(St),Ce=/Edge\/(\d+)/.exec(St),ce=Se||Le||Ce,fe=ce&&(Se?document.documentMode||6:+(Ce||Le)[1]),ae=!Ce&&/WebKit\//.test(St),le=ae&&/Qt\/\d+\.\d+/.test(St),re=!Ce&&/Chrome\//.test(St),de=/Opera\//.test(St),he=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(St),se=/PhantomJS/.test(St),ye=!Ce&&/AppleWebKit/.test(St)&&/Mobile\/\w+/.test(St),_e=/Android/.test(St),Me=ye||_e||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(St),ve=ye||/Mac/.test(ee),Fe=/\bCrOS\b/.test(St),$e=/win/i.test(ee),Te=de&&St.match(/Version\/(\d*\.\d*)/);Te&&(Te=Number(Te[1])),Te&&Te>=15&&(de=!1,ae=!0);var ze=ve&&(le||de&&(Te==null||Te<12.11)),Ee=te||ce&&fe>=9;function be(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Re=function(x,z){var oe=x.className,ie=be(z).exec(oe);if(ie){var pe=oe.slice(ie.index+ie[0].length);x.className=oe.slice(0,ie.index)+(pe?ie[1]+pe:"")}};function De(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function et(x,z){return De(x).appendChild(z)}function Ye(x,z,oe,ie){var pe=document.createElement(x);if(oe&&(pe.className=oe),ie&&(pe.style.cssText=ie),typeof z=="string")pe.appendChild(document.createTextNode(z));else if(z)for(var Pe=0;Pe<z.length;++Pe)pe.appendChild(z[Pe]);return pe}function dt(x,z,oe,ie){var pe=Ye(x,z,oe,ie);return pe.setAttribute("role","presentation"),pe}var Ke;document.createRange?Ke=function(x,z,oe,ie){var pe=document.createRange();return pe.setEnd(ie||x,oe),pe.setStart(x,z),pe}:Ke=function(x,z,oe){var ie=document.body.createTextRange();try{ie.moveToElementText(x.parentNode)}catch(pe){return ie}return ie.collapse(!0),ie.moveEnd("character",oe),ie.moveStart("character",z),ie};function zt(x,z){if(z.nodeType==3&&(z=z.parentNode),x.contains)return x.contains(z);do if(z.nodeType==11&&(z=z.host),z==x)return!0;while(z=z.parentNode)}function pt(){var x;try{x=document.activeElement}catch(z){x=document.body||null}for(;x&&x.shadowRoot&&x.shadowRoot.activeElement;)x=x.shadowRoot.activeElement;return x}function Kt(x,z){var oe=x.className;be(z).test(oe)||(x.className+=(oe?" ":"")+z)}function Ze(x,z){for(var oe=x.split(" "),ie=0;ie<oe.length;ie++)oe[ie]&&!be(oe[ie]).test(z)&&(z+=" "+oe[ie]);return z}var tt=function(x){x.select()};ye?tt=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ce&&(tt=function(x){try{x.select()}catch(z){}});function ft(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function Ut(x,z,oe){z||(z={});for(var ie in x)x.hasOwnProperty(ie)&&(oe!==!1||!z.hasOwnProperty(ie))&&(z[ie]=x[ie]);return z}function nt(x,z,oe,ie,pe){z==null&&(z=x.search(/[^\s\u00a0]/),z==-1&&(z=x.length));for(var Pe=ie||0,qe=pe||0;;){var ct=x.indexOf(" ",Pe);if(ct<0||ct>=z)return qe+(z-Pe);qe+=ct-Pe,qe+=oe-qe%oe,Pe=ct+1}}var Ge=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};Ge.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Ge.prototype.set=function(x,z){this.f=z;var oe=+new Date+x;(!this.id||oe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=oe)};function jt(x,z){for(var oe=0;oe<x.length;++oe)if(x[oe]==z)return oe;return-1}var yn=50,ln={toString:function(){return"CodeMirror.Pass"}},Tt={scroll:!1},Lt={origin:"*mouse"},Jt={origin:"+move"};function kn(x,z,oe){for(var ie=0,pe=0;;){var Pe=x.indexOf(" ",ie);Pe==-1&&(Pe=x.length);var qe=Pe-ie;if(Pe==x.length||pe+qe>=z)return ie+Math.min(qe,z-pe);if(pe+=Pe-ie,pe+=oe-pe%oe,ie=Pe+1,pe>=z)return ie}}var In=[""];function Qt(x){for(;In.length<=x;)In.push(Mn(In)+" ");return In[x]}function Mn(x){return x[x.length-1]}function Wn(x,z){for(var oe=[],ie=0;ie<x.length;ie++)oe[ie]=z(x[ie],ie);return oe}function zn(x,z,oe){for(var ie=0,pe=oe(z);ie<x.length&&oe(x[ie])<=pe;)ie++;x.splice(ie,0,z)}function at(){}function Oe(x,z){var oe;return Object.create?oe=Object.create(x):(at.prototype=x,oe=new at),z&&Ut(z,oe),oe}var ke=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Be(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||ke.test(x))}function Ne(x,z){return z?z.source.indexOf("\\w")>-1&&Be(x)?!0:z.test(x):Be(x)}function we(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var rt=/[\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 It(x){return x.charCodeAt(0)>=768&&rt.test(x)}function Ct(x,z,oe){for(;(oe<0?z>0:z<x.length)&&It(x.charAt(z));)z+=oe;return z}function $t(x,z,oe){for(var ie=z>oe?-1:1;;){if(z==oe)return z;var pe=(z+oe)/2,Pe=ie<0?Math.ceil(pe):Math.floor(pe);if(Pe==z)return x(Pe)?z:oe;x(Pe)?oe=Pe:z=Pe+ie}}function Vt(x,z,oe,ie){if(!x)return ie(z,oe,"ltr",0);for(var pe=!1,Pe=0;Pe<x.length;++Pe){var qe=x[Pe];(qe.from<oe&&qe.to>z||z==oe&&qe.to==z)&&(ie(Math.max(qe.from,z),Math.min(qe.to,oe),qe.level==1?"rtl":"ltr",Pe),pe=!0)}pe||ie(z,oe,"ltr")}var wt=null;function on(x,z,oe){var ie;wt=null;for(var pe=0;pe<x.length;++pe){var Pe=x[pe];if(Pe.from<z&&Pe.to>z)return pe;Pe.to==z&&(Pe.from!=Pe.to&&oe=="before"?ie=pe:wt=pe),Pe.from==z&&(Pe.from!=Pe.to&&oe!="before"?ie=pe:wt=pe)}return ie!=null?ie:wt}var Dt=function(){var x="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",z="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function oe(Et){return Et<=247?x.charAt(Et):1424<=Et&&Et<=1524?"R":1536<=Et&&Et<=1785?z.charAt(Et-1536):1774<=Et&&Et<=2220?"r":8192<=Et&&Et<=8203?"w":Et==8204?"b":"L"}var ie=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pe=/[stwN]/,Pe=/[LRr]/,qe=/[Lb1n]/,ct=/[1n]/;function ht(Et,cn,En){this.level=Et,this.from=cn,this.to=En}return function(Et,cn){var En=cn=="ltr"?"L":"R";if(Et.length==0||cn=="ltr"&&!ie.test(Et))return!1;for(var ur=Et.length,Jn=[],Hr=0;Hr<ur;++Hr)Jn.push(oe(Et.charCodeAt(Hr)));for(var oi=0,Oi=En;oi<ur;++oi){var ro=Jn[oi];ro=="m"?Jn[oi]=Oi:Oi=ro}for(var yo=0,Gi=En;yo<ur;++yo){var xo=Jn[yo];xo=="1"&&Gi=="r"?Jn[yo]="n":Pe.test(xo)&&(Gi=xo,xo=="r"&&(Jn[yo]="R"))}for(var sa=1,fa=Jn[0];sa<ur-1;++sa){var us=Jn[sa];us=="+"&&fa=="1"&&Jn[sa+1]=="1"?Jn[sa]="1":us==","&&fa==Jn[sa+1]&&(fa=="1"||fa=="n")&&(Jn[sa]=fa),fa=us}for(var el=0;el<ur;++el){var lc=Jn[el];if(lc==",")Jn[el]="N";else if(lc=="%"){var Ll=void 0;for(Ll=el+1;Ll<ur&&Jn[Ll]=="%";++Ll);for(var Ic=el&&Jn[el-1]=="!"||Ll<ur&&Jn[Ll]=="1"?"1":"N",Rc=el;Rc<Ll;++Rc)Jn[Rc]=Ic;el=Ll-1}}for(var ql=0,Oc=En;ql<ur;++ql){var ja=Jn[ql];Oc=="L"&&ja=="1"?Jn[ql]="L":Pe.test(ja)&&(Oc=ja)}for(var Bl=0;Bl<ur;++Bl)if(pe.test(Jn[Bl])){var kl=void 0;for(kl=Bl+1;kl<ur&&pe.test(Jn[kl]);++kl);for(var Fl=(Bl?Jn[Bl-1]:En)=="L",Ul=(kl<ur?Jn[kl]:En)=="L",Ku=Fl==Ul?Fl?"L":"R":En,zc=Bl;zc<kl;++zc)Jn[zc]=Ku;Bl=kl-1}for(var hc=[],Fs,tc=0;tc<ur;)if(qe.test(Jn[tc])){var Bd=tc;for(++tc;tc<ur&&qe.test(Jn[tc]);++tc);hc.push(new ht(0,Bd,tc))}else{var yu=tc,Cu=hc.length,du=cn=="rtl"?1:0;for(++tc;tc<ur&&Jn[tc]!="L";++tc);for(var Jl=yu;Jl<tc;)if(ct.test(Jn[Jl])){yu<Jl&&(hc.splice(Cu,0,new ht(1,yu,Jl)),Cu+=du);var Uu=Jl;for(++Jl;Jl<tc&&ct.test(Jn[Jl]);++Jl);hc.splice(Cu,0,new ht(2,Uu,Jl)),Cu+=du,yu=Jl}else++Jl;yu<tc&&hc.splice(Cu,0,new ht(1,yu,tc))}return cn=="ltr"&&(hc[0].level==1&&(Fs=Et.match(/^\s+/))&&(hc[0].from=Fs[0].length,hc.unshift(new ht(0,0,Fs[0].length))),Mn(hc).level==1&&(Fs=Et.match(/\s+$/))&&(Mn(hc).to-=Fs[0].length,hc.push(new ht(0,ur-Fs[0].length,ur)))),cn=="rtl"?hc.reverse():hc}}();function Xt(x,z){var oe=x.order;return oe==null&&(oe=x.order=Dt(x.text,z)),oe}var nn=[],bn=function(x,z,oe){if(x.addEventListener)x.addEventListener(z,oe,!1);else if(x.attachEvent)x.attachEvent("on"+z,oe);else{var ie=x._handlers||(x._handlers={});ie[z]=(ie[z]||nn).concat(oe)}};function en(x,z){return x._handlers&&x._handlers[z]||nn}function Zn(x,z,oe){if(x.removeEventListener)x.removeEventListener(z,oe,!1);else if(x.detachEvent)x.detachEvent("on"+z,oe);else{var ie=x._handlers,pe=ie&&ie[z];if(pe){var Pe=jt(pe,oe);Pe>-1&&(ie[z]=pe.slice(0,Pe).concat(pe.slice(Pe+1)))}}}function Yn(x,z){var oe=en(x,z);if(oe.length)for(var ie=Array.prototype.slice.call(arguments,2),pe=0;pe<oe.length;++pe)oe[pe].apply(null,ie)}function pr(x,z,oe){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),Yn(x,oe||z.type,x,z),mi(z)||z.codemirrorIgnore}function ti(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var oe=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),ie=0;ie<z.length;++ie)jt(oe,z[ie])==-1&&oe.push(z[ie])}function Pn(x,z){return en(x,z).length>0}function Or(x){x.prototype.on=function(z,oe){bn(this,z,oe)},x.prototype.off=function(z,oe){Zn(this,z,oe)}}function Br(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Di(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function mi(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function ci(x){Br(x),Di(x)}function Fr(x){return x.target||x.srcElement}function zr(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),ve&&x.ctrlKey&&z==1&&(z=3),z}var Fi=function(){if(ce&&fe<9)return!1;var x=Ye("div");return"draggable"in x||"dragDrop"in x}(),ko;function aa(x){if(ko==null){var z=Ye("span","\u200B");et(x,Ye("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(ko=z.offsetWidth<=1&&z.offsetHeight>2&&!(ce&&fe<8))}var oe=ko?Ye("span","\u200B"):Ye("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return oe.setAttribute("cm-text",""),oe}var Wo;function li(x){if(Wo!=null)return Wo;var z=et(x,document.createTextNode("A\u062EA")),oe=Ke(z,0,1).getBoundingClientRect(),ie=Ke(z,1,2).getBoundingClientRect();return De(x),!oe||oe.left==oe.right?!1:Wo=ie.right-oe.right<3}var rn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(x){for(var z=0,oe=[],ie=x.length;z<=ie;){var pe=x.indexOf(`
|
|
|
`,z);pe==-1&&(pe=x.length);var Pe=x.slice(z,x.charAt(pe-1)=="\r"?pe-1:pe),qe=Pe.indexOf("\r");qe!=-1?(oe.push(Pe.slice(0,qe)),z+=qe+1):(oe.push(Pe),z=pe+1)}return oe}:function(x){return x.split(/\r\n?|\n/)},nr=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(oe){}return!z||z.parentElement()!=x?!1:z.compareEndPoints("StartToEnd",z)!=0},dr=function(){var x=Ye("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),rr=null;function Jr(x){if(rr!=null)return rr;var z=et(x,Ye("span","x")),oe=z.getBoundingClientRect(),ie=Ke(z,0,1).getBoundingClientRect();return rr=Math.abs(oe.left-ie.left)>1}var Ar={},Mr={};function tr(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),Ar[x]=z}function Zt(x,z){Mr[x]=z}function Ot(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=Oe(z,x),x.name=z.name}else{if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(x))return Ot("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return Ot("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function ge(x,z){z=Ot(z);var oe=Ar[z.name];if(!oe)return ge(x,"text/plain");var ie=oe(x,z);if(Ie.hasOwnProperty(z.name)){var pe=Ie[z.name];for(var Pe in pe)pe.hasOwnProperty(Pe)&&(ie.hasOwnProperty(Pe)&&(ie["_"+Pe]=ie[Pe]),ie[Pe]=pe[Pe])}if(ie.name=z.name,z.helperType&&(ie.helperType=z.helperType),z.modeProps)for(var qe in z.modeProps)ie[qe]=z.modeProps[qe];return ie}var Ie={};function Ae(x,z){var oe=Ie.hasOwnProperty(x)?Ie[x]:Ie[x]={};Ut(z,oe)}function We(x,z){if(z===!0)return z;if(x.copyState)return x.copyState(z);var oe={};for(var ie in z){var pe=z[ie];pe instanceof Array&&(pe=pe.concat([])),oe[ie]=pe}return oe}function it(x,z){for(var oe;x.innerMode&&(oe=x.innerMode(z),!(!oe||oe.mode==x));)z=oe.state,x=oe.mode;return oe||{mode:x,state:z}}function xt(x,z,oe){return x.startState?x.startState(z,oe):!0}var Ft=function(x,z,oe){this.pos=this.start=0,this.string=x,this.tabSize=z||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=oe};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ft.prototype.eat=function(x){var z=this.string.charAt(this.pos),oe;if(typeof x=="string"?oe=z==x:oe=z&&(x.test?x.test(z):x(z)),oe)return++this.pos,z},Ft.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},Ft.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},Ft.prototype.backUp=function(x){this.pos-=x},Ft.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=nt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?nt(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.indentation=function(){return nt(this.string,null,this.tabSize)-(this.lineStart?nt(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.match=function(x,z,oe){if(typeof x=="string"){var ie=function(qe){return oe?qe.toLowerCase():qe},pe=this.string.substr(this.pos,x.length);if(ie(pe)==ie(x))return z!==!1&&(this.pos+=x.length),!0}else{var Pe=this.string.slice(this.pos).match(x);return Pe&&Pe.index>0?null:(Pe&&z!==!1&&(this.pos+=Pe[0].length),Pe)}},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},Ft.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},Ft.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function an(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 oe=x;!oe.lines;)for(var ie=0;;++ie){var pe=oe.children[ie],Pe=pe.chunkSize();if(z<Pe){oe=pe;break}z-=Pe}return oe.lines[z]}function Rn(x,z,oe){var ie=[],pe=z.line;return x.iter(z.line,oe.line+1,function(Pe){var qe=Pe.text;pe==oe.line&&(qe=qe.slice(0,oe.ch)),pe==z.line&&(qe=qe.slice(z.ch)),ie.push(qe),++pe}),ie}function mr(x,z,oe){var ie=[];return x.iter(z,oe,function(pe){ie.push(pe.text)}),ie}function or(x,z){var oe=z-x.height;if(oe)for(var ie=x;ie;ie=ie.parent)ie.height+=oe}function cr(x){if(x.parent==null)return null;for(var z=x.parent,oe=jt(z.lines,x),ie=z.parent;ie;z=ie,ie=ie.parent)for(var pe=0;ie.children[pe]!=z;++pe)oe+=ie.children[pe].chunkSize();return oe+z.first}function Xn(x,z){var oe=x.first;e:do{for(var ie=0;ie<x.children.length;++ie){var pe=x.children[ie],Pe=pe.height;if(z<Pe){x=pe;continue e}z-=Pe,oe+=pe.chunkSize()}return oe}while(!x.lines);for(var qe=0;qe<x.lines.length;++qe){var ct=x.lines[qe],ht=ct.height;if(z<ht)break;z-=ht}return oe+qe}function br(x,z){return z>=x.first&&z<x.first+x.size}function _r(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function mn(x,z,oe){if(oe===void 0&&(oe=null),!(this instanceof mn))return new mn(x,z,oe);this.line=x,this.ch=z,this.sticky=oe}function $n(x,z){return x.line-z.line||x.ch-z.ch}function Vr(x,z){return x.sticky==z.sticky&&$n(x,z)==0}function qr(x){return mn(x.line,x.ch)}function Ir(x,z){return $n(x,z)<0?z:x}function hi(x,z){return $n(x,z)<0?x:z}function Ni(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function yr(x,z){if(z.line<x.first)return mn(x.first,0);var oe=x.first+x.size-1;return z.line>oe?mn(oe,an(x,oe).text.length):bi(z,an(x,z.line).text.length)}function bi(x,z){var oe=x.ch;return oe==null||oe>z?mn(x.line,z):oe<0?mn(x.line,0):x}function ar(x,z){for(var oe=[],ie=0;ie<z.length;ie++)oe[ie]=yr(x,z[ie]);return oe}var fo=function(x,z){this.state=x,this.lookAhead=z},qi=function(x,z,oe,ie){this.state=z,this.doc=x,this.line=oe,this.maxLookAhead=ie||0,this.baseTokens=null,this.baseTokenPos=1};qi.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},qi.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}},qi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qi.fromSaved=function(x,z,oe){return z instanceof fo?new qi(x,We(x.mode,z.state),oe,z.lookAhead):new qi(x,We(x.mode,z),oe)},qi.prototype.save=function(x){var z=x!==!1?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fo(z,this.maxLookAhead):z};function ua(x,z,oe,ie){var pe=[x.state.modeGen],Pe={};No(x,z.text,x.doc.mode,oe,function(Et,cn){return pe.push(Et,cn)},Pe,ie);for(var qe=oe.state,ct=function(Et){oe.baseTokens=pe;var cn=x.state.overlays[Et],En=1,ur=0;oe.state=!0,No(x,z.text,cn.mode,oe,function(Jn,Hr){for(var oi=En;ur<Jn;){var Oi=pe[En];Oi>Jn&&pe.splice(En,1,Jn,pe[En+1],Oi),En+=2,ur=Math.min(Jn,Oi)}if(Hr)if(cn.opaque)pe.splice(oi,En-oi,Jn,"overlay "+Hr),En=oi+2;else for(;oi<En;oi+=2){var ro=pe[oi+1];pe[oi+1]=(ro?ro+" ":"")+"overlay "+Hr}},Pe),oe.state=qe,oe.baseTokens=null,oe.baseTokenPos=1},ht=0;ht<x.state.overlays.length;++ht)ct(ht);return{styles:pe,classes:Pe.bgClass||Pe.textClass?Pe:null}}function Jo(x,z,oe){if(!z.styles||z.styles[0]!=x.state.modeGen){var ie=bo(x,cr(z)),pe=z.text.length>x.options.maxHighlightLength&&We(x.doc.mode,ie.state),Pe=ua(x,z,ie);pe&&(ie.state=pe),z.stateAfter=ie.save(!pe),z.styles=Pe.styles,Pe.classes?z.styleClasses=Pe.classes:z.styleClasses&&(z.styleClasses=null),oe===x.doc.highlightFrontier&&(x.doc.modeFrontier=Math.max(x.doc.modeFrontier,++x.doc.highlightFrontier))}return z.styles}function bo(x,z,oe){var ie=x.doc,pe=x.display;if(!ie.mode.startState)return new qi(ie,!0,z);var Pe=Ba(x,z,oe),qe=Pe>ie.first&&an(ie,Pe-1).stateAfter,ct=qe?qi.fromSaved(ie,qe,Pe):new qi(ie,xt(ie.mode),Pe);return ie.iter(Pe,z,function(ht){oo(x,ht.text,ct);var Et=ct.line;ht.stateAfter=Et==z-1||Et%5==0||Et>=pe.viewFrom&&Et<pe.viewTo?ct.save():null,ct.nextLine()}),oe&&(ie.modeFrontier=ct.line),ct}function oo(x,z,oe,ie){var pe=x.doc.mode,Pe=new Ft(z,x.options.tabSize,oe);for(Pe.start=Pe.pos=ie||0,z==""&&na(pe,oe.state);!Pe.eol();)Eo(pe,Pe,oe.state),Pe.start=Pe.pos}function na(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var oe=it(x,z);if(oe.mode.blankLine)return oe.mode.blankLine(oe.state)}}function Eo(x,z,oe,ie){for(var pe=0;pe<10;pe++){ie&&(ie[0]=it(x,oe).mode);var Pe=x.token(z,oe);if(z.pos>z.start)return Pe}throw new Error("Mode "+x.name+" failed to advance stream.")}var ra=function(x,z,oe){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=oe};function ea(x,z,oe,ie){var pe=x.doc,Pe=pe.mode,qe;z=yr(pe,z);var ct=an(pe,z.line),ht=bo(x,z.line,oe),Et=new Ft(ct.text,x.options.tabSize,ht),cn;for(ie&&(cn=[]);(ie||Et.pos<z.ch)&&!Et.eol();)Et.start=Et.pos,qe=Eo(Pe,Et,ht.state),ie&&cn.push(new ra(Et,qe,We(pe.mode,ht.state)));return ie?cn:new ra(Et,qe,ht.state)}function Ho(x,z){if(x)for(;;){var oe=x.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!oe)break;x=x.slice(0,oe.index)+x.slice(oe.index+oe[0].length);var ie=oe[1]?"bgClass":"textClass";z[ie]==null?z[ie]=oe[2]:new RegExp("(?:^|\\s)"+oe[2]+"(?:$|\\s)").test(z[ie])||(z[ie]+=" "+oe[2])}return x}function No(x,z,oe,ie,pe,Pe,qe){var ct=oe.flattenSpans;ct==null&&(ct=x.options.flattenSpans);var ht=0,Et=null,cn=new Ft(z,x.options.tabSize,ie),En,ur=x.options.addModeClass&&[null];for(z==""&&Ho(na(oe,ie.state),Pe);!cn.eol();){if(cn.pos>x.options.maxHighlightLength?(ct=!1,qe&&oo(x,z,ie,cn.pos),cn.pos=z.length,En=null):En=Ho(Eo(oe,cn,ie.state,ur),Pe),ur){var Jn=ur[0].name;Jn&&(En="m-"+(En?Jn+" "+En:Jn))}if(!ct||Et!=En){for(;ht<cn.start;)ht=Math.min(cn.start,ht+5e3),pe(ht,Et);Et=En}cn.start=cn.pos}for(;ht<cn.pos;){var Hr=Math.min(cn.pos,ht+5e3);pe(Hr,Et),ht=Hr}}function Ba(x,z,oe){for(var ie,pe,Pe=x.doc,qe=oe?-1:z-(x.doc.mode.innerMode?1e3:100),ct=z;ct>qe;--ct){if(ct<=Pe.first)return Pe.first;var ht=an(Pe,ct-1),Et=ht.stateAfter;if(Et&&(!oe||ct+(Et instanceof fo?Et.lookAhead:0)<=Pe.modeFrontier))return ct;var cn=nt(ht.text,null,x.options.tabSize);(pe==null||ie>cn)&&(pe=ct-1,ie=cn)}return pe}function Wa(x,z){if(x.modeFrontier=Math.min(x.modeFrontier,z),!(x.highlightFrontier<z-10)){for(var oe=x.first,ie=z-1;ie>oe;ie--){var pe=an(x,ie).stateAfter;if(pe&&(!(pe instanceof fo)||ie+pe.lookAhead<z)){oe=ie+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,oe)}}var Ia=!1,Ao=!1;function pn(){Ia=!0}function sn(){Ao=!0}function Hn(x,z,oe){this.marker=x,this.from=z,this.to=oe}function lr(x,z){if(x)for(var oe=0;oe<x.length;++oe){var ie=x[oe];if(ie.marker==z)return ie}}function Cr(x,z){for(var oe,ie=0;ie<x.length;++ie)x[ie]!=z&&(oe||(oe=[])).push(x[ie]);return oe}function vi(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function _i(x,z,oe){var ie;if(x)for(var pe=0;pe<x.length;++pe){var Pe=x[pe],qe=Pe.marker,ct=Pe.from==null||(qe.inclusiveLeft?Pe.from<=z:Pe.from<z);if(ct||Pe.from==z&&qe.type=="bookmark"&&(!oe||!Pe.marker.insertLeft)){var ht=Pe.to==null||(qe.inclusiveRight?Pe.to>=z:Pe.to>z);(ie||(ie=[])).push(new Hn(qe,Pe.from,ht?null:Pe.to))}}return ie}function ji(x,z,oe){var ie;if(x)for(var pe=0;pe<x.length;++pe){var Pe=x[pe],qe=Pe.marker,ct=Pe.to==null||(qe.inclusiveRight?Pe.to>=z:Pe.to>z);if(ct||Pe.from==z&&qe.type=="bookmark"&&(!oe||Pe.marker.insertLeft)){var ht=Pe.from==null||(qe.inclusiveLeft?Pe.from<=z:Pe.from<z);(ie||(ie=[])).push(new Hn(qe,ht?null:Pe.from-z,Pe.to==null?null:Pe.to-z))}}return ie}function Xi(x,z){if(z.full)return null;var oe=br(x,z.from.line)&&an(x,z.from.line).markedSpans,ie=br(x,z.to.line)&&an(x,z.to.line).markedSpans;if(!oe&&!ie)return null;var pe=z.from.ch,Pe=z.to.ch,qe=$n(z.from,z.to)==0,ct=_i(oe,pe,qe),ht=ji(ie,Pe,qe),Et=z.text.length==1,cn=Mn(z.text).length+(Et?pe:0);if(ct)for(var En=0;En<ct.length;++En){var ur=ct[En];if(ur.to==null){var Jn=lr(ht,ur.marker);Jn?Et&&(ur.to=Jn.to==null?null:Jn.to+cn):ur.to=pe}}if(ht)for(var Hr=0;Hr<ht.length;++Hr){var oi=ht[Hr];if(oi.to!=null&&(oi.to+=cn),oi.from==null){var Oi=lr(ct,oi.marker);Oi||(oi.from=cn,Et&&(ct||(ct=[])).push(oi))}else oi.from+=cn,Et&&(ct||(ct=[])).push(oi)}ct&&(ct=Ci(ct)),ht&&ht!=ct&&(ht=Ci(ht));var ro=[ct];if(!Et){var yo=z.text.length-2,Gi;if(yo>0&&ct)for(var xo=0;xo<ct.length;++xo)ct[xo].to==null&&(Gi||(Gi=[])).push(new Hn(ct[xo].marker,null,null));for(var sa=0;sa<yo;++sa)ro.push(Gi);ro.push(ht)}return ro}function Ci(x){for(var z=0;z<x.length;++z){var oe=x[z];oe.from!=null&&oe.from==oe.to&&oe.marker.clearWhenEmpty!==!1&&x.splice(z--,1)}return x.length?x:null}function _o(x,z,oe){var ie=null;if(x.iter(z.line,oe.line+1,function(Jn){if(Jn.markedSpans)for(var Hr=0;Hr<Jn.markedSpans.length;++Hr){var oi=Jn.markedSpans[Hr].marker;oi.readOnly&&(!ie||jt(ie,oi)==-1)&&(ie||(ie=[])).push(oi)}}),!ie)return null;for(var pe=[{from:z,to:oe}],Pe=0;Pe<ie.length;++Pe)for(var qe=ie[Pe],ct=qe.find(0),ht=0;ht<pe.length;++ht){var Et=pe[ht];if(!($n(Et.to,ct.from)<0||$n(Et.from,ct.to)>0)){var cn=[ht,1],En=$n(Et.from,ct.from),ur=$n(Et.to,ct.to);(En<0||!qe.inclusiveLeft&&!En)&&cn.push({from:Et.from,to:ct.from}),(ur>0||!qe.inclusiveRight&&!ur)&&cn.push({from:ct.to,to:Et.to}),pe.splice.apply(pe,cn),ht+=cn.length-3}}return pe}function To(x){var z=x.markedSpans;if(z){for(var oe=0;oe<z.length;++oe)z[oe].marker.detachLine(x);x.markedSpans=null}}function Ko(x,z){if(z){for(var oe=0;oe<z.length;++oe)z[oe].marker.attachLine(x);x.markedSpans=z}}function Tn(x){return x.inclusiveLeft?-1:0}function Bn(x){return x.inclusiveRight?1:0}function Qn(x,z){var oe=x.lines.length-z.lines.length;if(oe!=0)return oe;var ie=x.find(),pe=z.find(),Pe=$n(ie.from,pe.from)||Tn(x)-Tn(z);if(Pe)return-Pe;var qe=$n(ie.to,pe.to)||Bn(x)-Bn(z);return qe||z.id-x.id}function He(x,z){var oe=Ao&&x.markedSpans,ie;if(oe)for(var pe=void 0,Pe=0;Pe<oe.length;++Pe)pe=oe[Pe],pe.marker.collapsed&&(z?pe.from:pe.to)==null&&(!ie||Qn(ie,pe.marker)<0)&&(ie=pe.marker);return ie}function lt(x){return He(x,!0)}function ut(x){return He(x,!1)}function gt(x,z){var oe=Ao&&x.markedSpans,ie;if(oe)for(var pe=0;pe<oe.length;++pe){var Pe=oe[pe];Pe.marker.collapsed&&(Pe.from==null||Pe.from<z)&&(Pe.to==null||Pe.to>z)&&(!ie||Qn(ie,Pe.marker)<0)&&(ie=Pe.marker)}return ie}function yt(x,z,oe,ie,pe){var Pe=an(x,z),qe=Ao&&Pe.markedSpans;if(qe)for(var ct=0;ct<qe.length;++ct){var ht=qe[ct];if(ht.marker.collapsed){var Et=ht.marker.find(0),cn=$n(Et.from,oe)||Tn(ht.marker)-Tn(pe),En=$n(Et.to,ie)||Bn(ht.marker)-Bn(pe);if(!(cn>=0&&En<=0||cn<=0&&En>=0)&&(cn<=0&&(ht.marker.inclusiveRight&&pe.inclusiveLeft?$n(Et.to,oe)>=0:$n(Et.to,oe)>0)||cn>=0&&(ht.marker.inclusiveRight&&pe.inclusiveLeft?$n(Et.from,ie)<=0:$n(Et.from,ie)<0)))return!0}}}function kt(x){for(var z;z=lt(x);)x=z.find(-1,!0).line;return x}function At(x){for(var z;z=ut(x);)x=z.find(1,!0).line;return x}function tn(x){for(var z,oe;z=ut(x);)x=z.find(1,!0).line,(oe||(oe=[])).push(x);return oe}function fn(x,z){var oe=an(x,z),ie=kt(oe);return oe==ie?z:cr(ie)}function jn(x,z){if(z>x.lastLine())return z;var oe=an(x,z),ie;if(!qn(x,oe))return z;for(;ie=ut(oe);)oe=ie.find(1,!0).line;return cr(oe)+1}function qn(x,z){var oe=Ao&&z.markedSpans;if(oe){for(var ie=void 0,pe=0;pe<oe.length;++pe)if(ie=oe[pe],!!ie.marker.collapsed){if(ie.from==null)return!0;if(!ie.marker.widgetNode&&ie.from==0&&ie.marker.inclusiveLeft&&Kn(x,z,ie))return!0}}}function Kn(x,z,oe){if(oe.to==null){var ie=oe.marker.find(1,!0);return Kn(x,ie.line,lr(ie.line.markedSpans,oe.marker))}if(oe.marker.inclusiveRight&&oe.to==z.text.length)return!0;for(var pe=void 0,Pe=0;Pe<z.markedSpans.length;++Pe)if(pe=z.markedSpans[Pe],pe.marker.collapsed&&!pe.marker.widgetNode&&pe.from==oe.to&&(pe.to==null||pe.to!=oe.from)&&(pe.marker.inclusiveLeft||oe.marker.inclusiveRight)&&Kn(x,z,pe))return!0}function An(x){x=kt(x);for(var z=0,oe=x.parent,ie=0;ie<oe.lines.length;++ie){var pe=oe.lines[ie];if(pe==x)break;z+=pe.height}for(var Pe=oe.parent;Pe;oe=Pe,Pe=oe.parent)for(var qe=0;qe<Pe.children.length;++qe){var ct=Pe.children[qe];if(ct==oe)break;z+=ct.height}return z}function Dn(x){if(x.height==0)return 0;for(var z=x.text.length,oe,ie=x;oe=lt(ie);){var pe=oe.find(0,!0);ie=pe.from.line,z+=pe.from.ch-pe.to.ch}for(ie=x;oe=ut(ie);){var Pe=oe.find(0,!0);z-=ie.text.length-Pe.from.ch,ie=Pe.to.line,z+=ie.text.length-Pe.to.ch}return z}function wn(x){var z=x.display,oe=x.doc;z.maxLine=an(oe,oe.first),z.maxLineLength=Dn(z.maxLine),z.maxLineChanged=!0,oe.iter(function(ie){var pe=Dn(ie);pe>z.maxLineLength&&(z.maxLineLength=pe,z.maxLine=ie)})}var Un=function(x,z,oe){this.text=x,Ko(this,z),this.height=oe?oe(this):1};Un.prototype.lineNo=function(){return cr(this)},Or(Un);function vr(x,z,oe,ie){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),To(x),Ko(x,oe);var pe=ie?ie(x):1;pe!=x.height&&or(x,pe)}function er(x){x.parent=null,To(x)}var ir={},fr={};function _t(x,z){if(!x||/^\s*$/.test(x))return null;var oe=z.addModeClass?fr:ir;return oe[x]||(oe[x]=x.replace(/\S+/g,"cm-$&"))}function vt(x,z){var oe=dt("span",null,null,ae?"padding-right: .1px":null),ie={pre:dt("pre",[oe],"CodeMirror-line"),content:oe,col:0,pos:0,cm:x,trailingSpace:!1,splitSpaces:x.getOption("lineWrapping")};z.measure={};for(var pe=0;pe<=(z.rest?z.rest.length:0);pe++){var Pe=pe?z.rest[pe-1]:z.line,qe=void 0;ie.pos=0,ie.addToken=ot,li(x.display.measure)&&(qe=Xt(Pe,x.doc.direction))&&(ie.addToken=Pt(ie.addToken,qe)),ie.map=[];var ct=z!=x.display.externalMeasured&&cr(Pe);hn(Pe,ie,Jo(x,Pe,ct)),Pe.styleClasses&&(Pe.styleClasses.bgClass&&(ie.bgClass=Ze(Pe.styleClasses.bgClass,ie.bgClass||"")),Pe.styleClasses.textClass&&(ie.textClass=Ze(Pe.styleClasses.textClass,ie.textClass||""))),ie.map.length==0&&ie.map.push(0,0,ie.content.appendChild(aa(x.display.measure))),pe==0?(z.measure.map=ie.map,z.measure.cache={}):((z.measure.maps||(z.measure.maps=[])).push(ie.map),(z.measure.caches||(z.measure.caches=[])).push({}))}if(ae){var ht=ie.content.lastChild;(/\bcm-tab\b/.test(ht.className)||ht.querySelector&&ht.querySelector(".cm-tab"))&&(ie.content.className="cm-tab-wrap-hack")}return Yn(x,"renderLine",x,z.line,ie.pre),ie.pre.className&&(ie.textClass=Ze(ie.pre.className,ie.textClass||"")),ie}function Xe(x){var z=Ye("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function ot(x,z,oe,ie,pe,Pe,qe){if(z){var ct=x.splitSpaces?Nt(z,x.trailingSpace):z,ht=x.cm.state.specialChars,Et=!1,cn;if(!ht.test(z))x.col+=z.length,cn=document.createTextNode(ct),x.map.push(x.pos,x.pos+z.length,cn),ce&&fe<9&&(Et=!0),x.pos+=z.length;else{cn=document.createDocumentFragment();for(var En=0;;){ht.lastIndex=En;var ur=ht.exec(z),Jn=ur?ur.index-En:z.length-En;if(Jn){var Hr=document.createTextNode(ct.slice(En,En+Jn));ce&&fe<9?cn.appendChild(Ye("span",[Hr])):cn.appendChild(Hr),x.map.push(x.pos,x.pos+Jn,Hr),x.col+=Jn,x.pos+=Jn}if(!ur)break;En+=Jn+1;var oi=void 0;if(ur[0]==" "){var Oi=x.cm.options.tabSize,ro=Oi-x.col%Oi;oi=cn.appendChild(Ye("span",Qt(ro),"cm-tab")),oi.setAttribute("role","presentation"),oi.setAttribute("cm-text"," "),x.col+=ro}else ur[0]=="\r"||ur[0]==`
|
|
|
`?(oi=cn.appendChild(Ye("span",ur[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oi.setAttribute("cm-text",ur[0]),x.col+=1):(oi=x.cm.options.specialCharPlaceholder(ur[0]),oi.setAttribute("cm-text",ur[0]),ce&&fe<9?cn.appendChild(Ye("span",[oi])):cn.appendChild(oi),x.col+=1);x.map.push(x.pos,x.pos+1,oi),x.pos++}}if(x.trailingSpace=ct.charCodeAt(z.length-1)==32,oe||ie||pe||Et||Pe||qe){var yo=oe||"";ie&&(yo+=ie),pe&&(yo+=pe);var Gi=Ye("span",[cn],yo,Pe);if(qe)for(var xo in qe)qe.hasOwnProperty(xo)&&xo!="style"&&xo!="class"&&Gi.setAttribute(xo,qe[xo]);return x.content.appendChild(Gi)}x.content.appendChild(cn)}}function Nt(x,z){if(x.length>1&&!/ /.test(x))return x;for(var oe=z,ie="",pe=0;pe<x.length;pe++){var Pe=x.charAt(pe);Pe==" "&&oe&&(pe==x.length-1||x.charCodeAt(pe+1)==32)&&(Pe="\xA0"),ie+=Pe,oe=Pe==" "}return ie}function Pt(x,z){return function(oe,ie,pe,Pe,qe,ct,ht){pe=pe?pe+" cm-force-border":"cm-force-border";for(var Et=oe.pos,cn=Et+ie.length;;){for(var En=void 0,ur=0;ur<z.length&&(En=z[ur],!(En.to>Et&&En.from<=Et));ur++);if(En.to>=cn)return x(oe,ie,pe,Pe,qe,ct,ht);x(oe,ie.slice(0,En.to-Et),pe,Pe,null,ct,ht),Pe=null,ie=ie.slice(En.to-Et),Et=En.to}}}function qt(x,z,oe,ie){var pe=!ie&&oe.widgetNode;pe&&x.map.push(x.pos,x.pos+z,pe),!ie&&x.cm.display.input.needsContentAttribute&&(pe||(pe=x.content.appendChild(document.createElement("span"))),pe.setAttribute("cm-marker",oe.id)),pe&&(x.cm.display.input.setUneditable(pe),x.content.appendChild(pe)),x.pos+=z,x.trailingSpace=!1}function hn(x,z,oe){var ie=x.markedSpans,pe=x.text,Pe=0;if(!ie){for(var qe=1;qe<oe.length;qe+=2)z.addToken(z,pe.slice(Pe,Pe=oe[qe]),_t(oe[qe+1],z.cm.options));return}for(var ct=pe.length,ht=0,Et=1,cn="",En,ur,Jn=0,Hr,oi,Oi,ro,yo;;){if(Jn==ht){Hr=oi=Oi=ur="",yo=null,ro=null,Jn=1/0;for(var Gi=[],xo=void 0,sa=0;sa<ie.length;++sa){var fa=ie[sa],us=fa.marker;if(us.type=="bookmark"&&fa.from==ht&&us.widgetNode)Gi.push(us);else if(fa.from<=ht&&(fa.to==null||fa.to>ht||us.collapsed&&fa.to==ht&&fa.from==ht)){if(fa.to!=null&&fa.to!=ht&&Jn>fa.to&&(Jn=fa.to,oi=""),us.className&&(Hr+=" "+us.className),us.css&&(ur=(ur?ur+";":"")+us.css),us.startStyle&&fa.from==ht&&(Oi+=" "+us.startStyle),us.endStyle&&fa.to==Jn&&(xo||(xo=[])).push(us.endStyle,fa.to),us.title&&((yo||(yo={})).title=us.title),us.attributes)for(var el in us.attributes)(yo||(yo={}))[el]=us.attributes[el];us.collapsed&&(!ro||Qn(ro.marker,us)<0)&&(ro=fa)}else fa.from>ht&&Jn>fa.from&&(Jn=fa.from)}if(xo)for(var lc=0;lc<xo.length;lc+=2)xo[lc+1]==Jn&&(oi+=" "+xo[lc]);if(!ro||ro.from==ht)for(var Ll=0;Ll<Gi.length;++Ll)qt(z,0,Gi[Ll]);if(ro&&(ro.from||0)==ht){if(qt(z,(ro.to==null?ct+1:ro.to)-ht,ro.marker,ro.from==null),ro.to==null)return;ro.to==ht&&(ro=!1)}}if(ht>=ct)break;for(var Ic=Math.min(ct,Jn);;){if(cn){var Rc=ht+cn.length;if(!ro){var ql=Rc>Ic?cn.slice(0,Ic-ht):cn;z.addToken(z,ql,En?En+Hr:Hr,Oi,ht+ql.length==Jn?oi:"",ur,yo)}if(Rc>=Ic){cn=cn.slice(Ic-ht),ht=Ic;break}ht=Rc,Oi=""}cn=pe.slice(Pe,Pe=oe[Et++]),En=_t(oe[Et++],z.cm.options)}}}function gn(x,z,oe){this.line=z,this.rest=tn(z),this.size=this.rest?cr(Mn(this.rest))-oe+1:1,this.node=this.text=null,this.hidden=qn(x,z)}function Nn(x,z,oe){for(var ie=[],pe,Pe=z;Pe<oe;Pe=pe){var qe=new gn(x.doc,an(x.doc,Pe),Pe);pe=Pe+qe.size,ie.push(qe)}return ie}var On=null;function vn(x){On?On.ops.push(x):x.ownsGroup=On={ops:[x],delayedCallbacks:[]}}function Fn(x){var z=x.delayedCallbacks,oe=0;do{for(;oe<z.length;oe++)z[oe].call(null);for(var ie=0;ie<x.ops.length;ie++){var pe=x.ops[ie];if(pe.cursorActivityHandlers)for(;pe.cursorActivityCalled<pe.cursorActivityHandlers.length;)pe.cursorActivityHandlers[pe.cursorActivityCalled++].call(null,pe.cm)}}while(oe<z.length)}function Gn(x,z){var oe=x.ownsGroup;if(oe)try{Fn(oe)}finally{On=null,z(oe)}}var xr=null;function sr(x,z){var oe=en(x,z);if(oe.length){var ie=Array.prototype.slice.call(arguments,2),pe;On?pe=On.delayedCallbacks:xr?pe=xr:(pe=xr=[],setTimeout(Lr,0));for(var Pe=function(ct){pe.push(function(){return oe[ct].apply(null,ie)})},qe=0;qe<oe.length;++qe)Pe(qe)}}function Lr(){var x=xr;xr=null;for(var z=0;z<x.length;++z)x[z]()}function Ur(x,z,oe,ie){for(var pe=0;pe<z.changes.length;pe++){var Pe=z.changes[pe];Pe=="text"?Wr(x,z):Pe=="gutter"?Si(x,z,oe,ie):Pe=="class"?ni(x,z):Pe=="widget"&&Nr(x,z,ie)}z.changes=null}function Pr(x){return x.node==x.text&&(x.node=Ye("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ce&&fe<8&&(x.node.style.zIndex=2)),x.node}function Qr(x,z){var oe=z.bgClass?z.bgClass+" "+(z.line.bgClass||""):z.line.bgClass;if(oe&&(oe+=" CodeMirror-linebackground"),z.background)oe?z.background.className=oe:(z.background.parentNode.removeChild(z.background),z.background=null);else if(oe){var ie=Pr(z);z.background=ie.insertBefore(Ye("div",null,oe),ie.firstChild),x.display.input.setUneditable(z.background)}}function Tr(x,z){var oe=x.display.externalMeasured;return oe&&oe.line==z.line?(x.display.externalMeasured=null,z.measure=oe.measure,oe.built):vt(x,z)}function Wr(x,z){var oe=z.text.className,ie=Tr(x,z);z.text==z.node&&(z.node=ie.pre),z.text.parentNode.replaceChild(ie.pre,z.text),z.text=ie.pre,ie.bgClass!=z.bgClass||ie.textClass!=z.textClass?(z.bgClass=ie.bgClass,z.textClass=ie.textClass,ni(x,z)):oe&&(z.text.className=oe)}function ni(x,z){Qr(x,z),z.line.wrapClass?Pr(z).className=z.line.wrapClass:z.node!=z.text&&(z.node.className="");var oe=z.textClass?z.textClass+" "+(z.line.textClass||""):z.line.textClass;z.text.className=oe||""}function Si(x,z,oe,ie){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 pe=Pr(z);z.gutterBackground=Ye("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?ie.fixedPos:-ie.gutterTotalWidth)+"px; width: "+ie.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),pe.insertBefore(z.gutterBackground,z.text)}var Pe=z.line.gutterMarkers;if(x.options.lineNumbers||Pe){var qe=Pr(z),ct=z.gutter=Ye("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?ie.fixedPos:-ie.gutterTotalWidth)+"px");if(x.display.input.setUneditable(ct),qe.insertBefore(ct,z.text),z.line.gutterClass&&(ct.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!Pe||!Pe["CodeMirror-linenumbers"])&&(z.lineNumber=ct.appendChild(Ye("div",_r(x.options,oe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ie.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),Pe)for(var ht=0;ht<x.display.gutterSpecs.length;++ht){var Et=x.display.gutterSpecs[ht].className,cn=Pe.hasOwnProperty(Et)&&Pe[Et];cn&&ct.appendChild(Ye("div",[cn],"CodeMirror-gutter-elt","left: "+ie.gutterLeft[Et]+"px; width: "+ie.gutterWidth[Et]+"px"))}}}function Nr(x,z,oe){z.alignable&&(z.alignable=null);for(var ie=be("CodeMirror-linewidget"),pe=z.node.firstChild,Pe=void 0;pe;pe=Pe)Pe=pe.nextSibling,ie.test(pe.className)&&z.node.removeChild(pe);gi(x,z,oe)}function wi(x,z,oe,ie){var pe=Tr(x,z);return z.text=z.node=pe.pre,pe.bgClass&&(z.bgClass=pe.bgClass),pe.textClass&&(z.textClass=pe.textClass),ni(x,z),Si(x,z,oe,ie),gi(x,z,ie),z.node}function gi(x,z,oe){if(vo(x,z.line,z,oe,!0),z.rest)for(var ie=0;ie<z.rest.length;ie++)vo(x,z.rest[ie],z,oe,!1)}function vo(x,z,oe,ie,pe){if(z.widgets)for(var Pe=Pr(oe),qe=0,ct=z.widgets;qe<ct.length;++qe){var ht=ct[qe],Et=Ye("div",[ht.node],"CodeMirror-linewidget"+(ht.className?" "+ht.className:""));ht.handleMouseEvents||Et.setAttribute("cm-ignore-events","true"),Ji(ht,Et,oe,ie),x.display.input.setUneditable(Et),pe&&ht.above?Pe.insertBefore(Et,oe.gutter||oe.text):Pe.appendChild(Et),sr(ht,"redraw")}}function Ji(x,z,oe,ie){if(x.noHScroll){(oe.alignable||(oe.alignable=[])).push(z);var pe=ie.wrapperWidth;z.style.left=ie.fixedPos+"px",x.coverGutter||(pe-=ie.gutterTotalWidth,z.style.paddingLeft=ie.gutterTotalWidth+"px"),z.style.width=pe+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-ie.gutterTotalWidth+"px"))}function Pi(x){if(x.height!=null)return x.height;var z=x.doc.cm;if(!z)return 0;if(!zt(document.body,x.node)){var oe="position: relative;";x.coverGutter&&(oe+="margin-left: -"+z.display.gutters.offsetWidth+"px;"),x.noHScroll&&(oe+="width: "+z.display.wrapper.clientWidth+"px;"),et(z.display.measure,Ye("div",[x.node],null,oe))}return x.height=x.node.parentNode.offsetHeight}function Mi(x,z){for(var oe=Fr(z);oe!=x.wrapper;oe=oe.parentNode)if(!oe||oe.nodeType==1&&oe.getAttribute("cm-ignore-events")=="true"||oe.parentNode==x.sizer&&oe!=x.mover)return!0}function Ai(x){return x.lineSpace.offsetTop}function pi(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function zi(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=et(x.measure,Ye("pre","x","CodeMirror-line-like")),oe=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,ie={left:parseInt(oe.paddingLeft),right:parseInt(oe.paddingRight)};return!isNaN(ie.left)&&!isNaN(ie.right)&&(x.cachedPaddingH=ie),ie}function ai(x){return yn-x.display.nativeBarWidth}function ii(x){return x.display.scroller.clientWidth-ai(x)-x.display.barWidth}function Ui(x){return x.display.scroller.clientHeight-ai(x)-x.display.barHeight}function to(x,z,oe){var ie=x.options.lineWrapping,pe=ie&&ii(x);if(!z.measure.heights||ie&&z.measure.width!=pe){var Pe=z.measure.heights=[];if(ie){z.measure.width=pe;for(var qe=z.text.firstChild.getClientRects(),ct=0;ct<qe.length-1;ct++){var ht=qe[ct],Et=qe[ct+1];Math.abs(ht.bottom-Et.bottom)>2&&Pe.push((ht.bottom+Et.top)/2-oe.top)}}Pe.push(oe.bottom-oe.top)}}function la(x,z,oe){if(x.line==z)return{map:x.measure.map,cache:x.measure.cache};for(var ie=0;ie<x.rest.length;ie++)if(x.rest[ie]==z)return{map:x.measure.maps[ie],cache:x.measure.caches[ie]};for(var pe=0;pe<x.rest.length;pe++)if(cr(x.rest[pe])>oe)return{map:x.measure.maps[pe],cache:x.measure.caches[pe],before:!0}}function da(x,z){z=kt(z);var oe=cr(z),ie=x.display.externalMeasured=new gn(x.doc,z,oe);ie.lineN=oe;var pe=ie.built=vt(x,ie);return ie.text=pe.pre,et(x.display.lineMeasure,pe.pre),ie}function So(x,z,oe,ie){return Ii(x,Zi(x,z),oe,ie)}function go(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[Bi(x,z)];var oe=x.display.externalMeasured;if(oe&&z>=oe.lineN&&z<oe.lineN+oe.size)return oe}function Zi(x,z){var oe=cr(z),ie=go(x,oe);ie&&!ie.text?ie=null:ie&&ie.changes&&(Ur(x,ie,oe,Ws(x)),x.curOp.forceUpdate=!0),ie||(ie=da(x,z));var pe=la(ie,z,oe);return{line:z,view:ie,rect:null,map:pe.map,cache:pe.cache,before:pe.before,hasHeights:!1}}function Ii(x,z,oe,ie,pe){z.before&&(oe=-1);var Pe=oe+(ie||""),qe;return z.cache.hasOwnProperty(Pe)?qe=z.cache[Pe]:(z.rect||(z.rect=z.view.text.getBoundingClientRect()),z.hasHeights||(to(x,z.view,z.rect),z.hasHeights=!0),qe=Ki(x,z,oe,ie),qe.bogus||(z.cache[Pe]=qe)),{left:qe.left,right:qe.right,top:pe?qe.rtop:qe.top,bottom:pe?qe.rbottom:qe.bottom}}var pa={left:0,right:0,top:0,bottom:0};function io(x,z,oe){for(var ie,pe,Pe,qe,ct,ht,Et=0;Et<x.length;Et+=3)if(ct=x[Et],ht=x[Et+1],z<ct?(pe=0,Pe=1,qe="left"):z<ht?(pe=z-ct,Pe=pe+1):(Et==x.length-3||z==ht&&x[Et+3]>z)&&(Pe=ht-ct,pe=Pe-1,z>=ht&&(qe="right")),pe!=null){if(ie=x[Et+2],ct==ht&&oe==(ie.insertLeft?"left":"right")&&(qe=oe),oe=="left"&&pe==0)for(;Et&&x[Et-2]==x[Et-3]&&x[Et-1].insertLeft;)ie=x[(Et-=3)+2],qe="left";if(oe=="right"&&pe==ht-ct)for(;Et<x.length-3&&x[Et+3]==x[Et+4]&&!x[Et+5].insertLeft;)ie=x[(Et+=3)+2],qe="right";break}return{node:ie,start:pe,end:Pe,collapse:qe,coverStart:ct,coverEnd:ht}}function si(x,z){var oe=pa;if(z=="left")for(var ie=0;ie<x.length&&(oe=x[ie]).left==oe.right;ie++);else for(var pe=x.length-1;pe>=0&&(oe=x[pe]).left==oe.right;pe--);return oe}function Ki(x,z,oe,ie){var pe=io(z.map,oe,ie),Pe=pe.node,qe=pe.start,ct=pe.end,ht=pe.collapse,Et;if(Pe.nodeType==3){for(var cn=0;cn<4;cn++){for(;qe&&It(z.line.text.charAt(pe.coverStart+qe));)--qe;for(;pe.coverStart+ct<pe.coverEnd&&It(z.line.text.charAt(pe.coverStart+ct));)++ct;if(ce&&fe<9&&qe==0&&ct==pe.coverEnd-pe.coverStart?Et=Pe.parentNode.getBoundingClientRect():Et=si(Ke(Pe,qe,ct).getClientRects(),ie),Et.left||Et.right||qe==0)break;ct=qe,qe=qe-1,ht="right"}ce&&fe<11&&(Et=Io(x.display.measure,Et))}else{qe>0&&(ht=ie="right");var En;x.options.lineWrapping&&(En=Pe.getClientRects()).length>1?Et=En[ie=="right"?En.length-1:0]:Et=Pe.getBoundingClientRect()}if(ce&&fe<9&&!qe&&(!Et||!Et.left&&!Et.right)){var ur=Pe.parentNode.getClientRects()[0];ur?Et={left:ur.left,right:ur.left+Rs(x.display),top:ur.top,bottom:ur.bottom}:Et=pa}for(var Jn=Et.top-z.rect.top,Hr=Et.bottom-z.rect.top,oi=(Jn+Hr)/2,Oi=z.view.measure.heights,ro=0;ro<Oi.length-1&&!(oi<Oi[ro]);ro++);var yo=ro?Oi[ro-1]:0,Gi=Oi[ro],xo={left:(ht=="right"?Et.right:Et.left)-z.rect.left,right:(ht=="left"?Et.left:Et.right)-z.rect.left,top:yo,bottom:Gi};return!Et.left&&!Et.right&&(xo.bogus=!0),x.options.singleCursorHeightPerLine||(xo.rtop=Jn,xo.rbottom=Hr),xo}function Io(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jr(x))return z;var oe=screen.logicalXDPI/screen.deviceXDPI,ie=screen.logicalYDPI/screen.deviceYDPI;return{left:z.left*oe,right:z.right*oe,top:z.top*ie,bottom:z.bottom*ie}}function Ro(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 qo(x){x.display.externalMeasure=null,De(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Ro(x.display.view[z])}function Qi(x){qo(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function ma(){return re&&_e?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function va(){return re&&_e?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ia(x){var z=0;if(x.widgets)for(var oe=0;oe<x.widgets.length;++oe)x.widgets[oe].above&&(z+=Pi(x.widgets[oe]));return z}function ca(x,z,oe,ie,pe){if(!pe){var Pe=ia(z);oe.top+=Pe,oe.bottom+=Pe}if(ie=="line")return oe;ie||(ie="local");var qe=An(z);if(ie=="local"?qe+=Ai(x.display):qe-=x.display.viewOffset,ie=="page"||ie=="window"){var ct=x.display.lineSpace.getBoundingClientRect();qe+=ct.top+(ie=="window"?0:va());var ht=ct.left+(ie=="window"?0:ma());oe.left+=ht,oe.right+=ht}return oe.top+=qe,oe.bottom+=qe,oe}function Ea(x,z,oe){if(oe=="div")return z;var ie=z.left,pe=z.top;if(oe=="page")ie-=ma(),pe-=va();else if(oe=="local"||!oe){var Pe=x.display.sizer.getBoundingClientRect();ie+=Pe.left,pe+=Pe.top}var qe=x.display.lineSpace.getBoundingClientRect();return{left:ie-qe.left,top:pe-qe.top}}function Ja(x,z,oe,ie,pe){return ie||(ie=an(x.doc,z.line)),ca(x,ie,So(x,ie,z.ch,pe),oe)}function Ma(x,z,oe,ie,pe,Pe){ie=ie||an(x.doc,z.line),pe||(pe=Zi(x,ie));function qe(Hr,oi){var Oi=Ii(x,pe,Hr,oi?"right":"left",Pe);return oi?Oi.left=Oi.right:Oi.right=Oi.left,ca(x,ie,Oi,oe)}var ct=Xt(ie,x.doc.direction),ht=z.ch,Et=z.sticky;if(ht>=ie.text.length?(ht=ie.text.length,Et="before"):ht<=0&&(ht=0,Et="after"),!ct)return qe(Et=="before"?ht-1:ht,Et=="before");function cn(Hr,oi,Oi){var ro=ct[oi],yo=ro.level==1;return qe(Oi?Hr-1:Hr,yo!=Oi)}var En=on(ct,ht,Et),ur=wt,Jn=cn(ht,En,Et=="before");return ur!=null&&(Jn.other=cn(ht,ur,Et!="before")),Jn}function Za(x,z){var oe=0;z=yr(x.doc,z),x.options.lineWrapping||(oe=Rs(x.display)*z.ch);var ie=an(x.doc,z.line),pe=An(ie)+Ai(x.display);return{left:oe,right:oe,top:pe,bottom:pe+ie.height}}function vs(x,z,oe,ie,pe){var Pe=mn(x,z,oe);return Pe.xRel=pe,ie&&(Pe.outside=ie),Pe}function Es(x,z,oe){var ie=x.doc;if(oe+=x.display.viewOffset,oe<0)return vs(ie.first,0,null,-1,-1);var pe=Xn(ie,oe),Pe=ie.first+ie.size-1;if(pe>Pe)return vs(ie.first+ie.size-1,an(ie,Pe).text.length,null,1,1);z<0&&(z=0);for(var qe=an(ie,pe);;){var ct=ho(x,qe,pe,z,oe),ht=gt(qe,ct.ch+(ct.xRel>0||ct.outside>0?1:0));if(!ht)return ct;var Et=ht.find(1);if(Et.line==pe)return Et;qe=an(ie,pe=Et.line)}}function Ls(x,z,oe,ie){ie-=ia(z);var pe=z.text.length,Pe=$t(function(qe){return Ii(x,oe,qe-1).bottom<=ie},pe,0);return pe=$t(function(qe){return Ii(x,oe,qe).top>ie},Pe,pe),{begin:Pe,end:pe}}function Qa(x,z,oe,ie){oe||(oe=Zi(x,z));var pe=ca(x,z,Ii(x,oe,ie),"line").top;return Ls(x,z,oe,pe)}function La(x,z,oe,ie){return x.bottom<=oe?!1:x.top>oe?!0:(ie?x.left:x.right)>z}function ho(x,z,oe,ie,pe){pe-=An(z);var Pe=Zi(x,z),qe=ia(z),ct=0,ht=z.text.length,Et=!0,cn=Xt(z,x.doc.direction);if(cn){var En=(x.options.lineWrapping?_a:Po)(x,z,oe,Pe,cn,ie,pe);Et=En.level!=1,ct=Et?En.from:En.to-1,ht=Et?En.to:En.from-1}var ur=null,Jn=null,Hr=$t(function(sa){var fa=Ii(x,Pe,sa);return fa.top+=qe,fa.bottom+=qe,La(fa,ie,pe,!1)?(fa.top<=pe&&fa.left<=ie&&(ur=sa,Jn=fa),!0):!1},ct,ht),oi,Oi,ro=!1;if(Jn){var yo=ie-Jn.left<Jn.right-ie,Gi=yo==Et;Hr=ur+(Gi?0:1),Oi=Gi?"after":"before",oi=yo?Jn.left:Jn.right}else{!Et&&(Hr==ht||Hr==ct)&&Hr++,Oi=Hr==0?"after":Hr==z.text.length?"before":Ii(x,Pe,Hr-(Et?1:0)).bottom+qe<=pe==Et?"after":"before";var xo=Ma(x,mn(oe,Hr,Oi),"line",z,Pe);oi=xo.left,ro=pe<xo.top?-1:pe>=xo.bottom?1:0}return Hr=Ct(z.text,Hr,1),vs(oe,Hr,Oi,ro,ie-oi)}function Po(x,z,oe,ie,pe,Pe,qe){var ct=$t(function(En){var ur=pe[En],Jn=ur.level!=1;return La(Ma(x,mn(oe,Jn?ur.to:ur.from,Jn?"before":"after"),"line",z,ie),Pe,qe,!0)},0,pe.length-1),ht=pe[ct];if(ct>0){var Et=ht.level!=1,cn=Ma(x,mn(oe,Et?ht.from:ht.to,Et?"after":"before"),"line",z,ie);La(cn,Pe,qe,!0)&&cn.top>qe&&(ht=pe[ct-1])}return ht}function _a(x,z,oe,ie,pe,Pe,qe){var ct=Ls(x,z,ie,qe),ht=ct.begin,Et=ct.end;/\s/.test(z.text.charAt(Et-1))&&Et--;for(var cn=null,En=null,ur=0;ur<pe.length;ur++){var Jn=pe[ur];if(!(Jn.from>=Et||Jn.to<=ht)){var Hr=Jn.level!=1,oi=Ii(x,ie,Hr?Math.min(Et,Jn.to)-1:Math.max(ht,Jn.from)).right,Oi=oi<Pe?Pe-oi+1e9:oi-Pe;(!cn||En>Oi)&&(cn=Jn,En=Oi)}}return cn||(cn=pe[pe.length-1]),cn.from<ht&&(cn={from:ht,to:cn.to,level:cn.level}),cn.to>Et&&(cn={from:cn.from,to:Et,level:cn.level}),cn}var Da;function gs(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(Da==null){Da=Ye("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)Da.appendChild(document.createTextNode("x")),Da.appendChild(Ye("br"));Da.appendChild(document.createTextNode("x"))}et(x.measure,Da);var oe=Da.offsetHeight/50;return oe>3&&(x.cachedTextHeight=oe),De(x.measure),oe||1}function Rs(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=Ye("span","xxxxxxxxxx"),oe=Ye("pre",[z],"CodeMirror-line-like");et(x.measure,oe);var ie=z.getBoundingClientRect(),pe=(ie.right-ie.left)/10;return pe>2&&(x.cachedCharWidth=pe),pe||10}function Ws(x){for(var z=x.display,oe={},ie={},pe=z.gutters.clientLeft,Pe=z.gutters.firstChild,qe=0;Pe;Pe=Pe.nextSibling,++qe){var ct=x.display.gutterSpecs[qe].className;oe[ct]=Pe.offsetLeft+Pe.clientLeft+pe,ie[ct]=Pe.clientWidth}return{fixedPos:hl(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:oe,gutterWidth:ie,wrapperWidth:z.wrapper.clientWidth}}function hl(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function ul(x){var z=gs(x.display),oe=x.options.lineWrapping,ie=oe&&Math.max(5,x.display.scroller.clientWidth/Rs(x.display)-3);return function(pe){if(qn(x.doc,pe))return 0;var Pe=0;if(pe.widgets)for(var qe=0;qe<pe.widgets.length;qe++)pe.widgets[qe].height&&(Pe+=pe.widgets[qe].height);return oe?Pe+(Math.ceil(pe.text.length/ie)||1)*z:Pe+z}}function Ts(x){var z=x.doc,oe=ul(x);z.iter(function(ie){var pe=oe(ie);pe!=ie.height&&or(ie,pe)})}function es(x,z,oe,ie){var pe=x.display;if(!oe&&Fr(z).getAttribute("cm-not-content")=="true")return null;var Pe,qe,ct=pe.lineSpace.getBoundingClientRect();try{Pe=z.clientX-ct.left,qe=z.clientY-ct.top}catch(En){return null}var ht=Es(x,Pe,qe),Et;if(ie&&ht.xRel>0&&(Et=an(x.doc,ht.line).text).length==ht.ch){var cn=nt(Et,Et.length,x.options.tabSize)-Et.length;ht=mn(ht.line,Math.max(0,Math.round((Pe-zi(x.display).left)/Rs(x.display))-cn))}return ht}function Bi(x,z){if(z>=x.display.viewTo||(z-=x.display.viewFrom,z<0))return null;for(var oe=x.display.view,ie=0;ie<oe.length;ie++)if(z-=oe[ie].size,z<0)return ie}function Co(x,z,oe,ie){z==null&&(z=x.doc.first),oe==null&&(oe=x.doc.first+x.doc.size),ie||(ie=0);var pe=x.display;if(ie&&oe<pe.viewTo&&(pe.updateLineNumbers==null||pe.updateLineNumbers>z)&&(pe.updateLineNumbers=z),x.curOp.viewChanged=!0,z>=pe.viewTo)Ao&&fn(x.doc,z)<pe.viewTo&&Ca(x);else if(oe<=pe.viewFrom)Ao&&jn(x.doc,oe+ie)>pe.viewFrom?Ca(x):(pe.viewFrom+=ie,pe.viewTo+=ie);else if(z<=pe.viewFrom&&oe>=pe.viewTo)Ca(x);else if(z<=pe.viewFrom){var Pe=is(x,oe,oe+ie,1);Pe?(pe.view=pe.view.slice(Pe.index),pe.viewFrom=Pe.lineN,pe.viewTo+=ie):Ca(x)}else if(oe>=pe.viewTo){var qe=is(x,z,z,-1);qe?(pe.view=pe.view.slice(0,qe.index),pe.viewTo=qe.lineN):Ca(x)}else{var ct=is(x,z,z,-1),ht=is(x,oe,oe+ie,1);ct&&ht?(pe.view=pe.view.slice(0,ct.index).concat(Nn(x,ct.lineN,ht.lineN)).concat(pe.view.slice(ht.index)),pe.viewTo+=ie):Ca(x)}var Et=pe.externalMeasured;Et&&(oe<Et.lineN?Et.lineN+=ie:z<Et.lineN+Et.size&&(pe.externalMeasured=null))}function Qo(x,z,oe){x.curOp.viewChanged=!0;var ie=x.display,pe=x.display.externalMeasured;if(pe&&z>=pe.lineN&&z<pe.lineN+pe.size&&(ie.externalMeasured=null),!(z<ie.viewFrom||z>=ie.viewTo)){var Pe=ie.view[Bi(x,z)];if(Pe.node!=null){var qe=Pe.changes||(Pe.changes=[]);jt(qe,oe)==-1&&qe.push(oe)}}}function Ca(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function is(x,z,oe,ie){var pe=Bi(x,z),Pe,qe=x.display.view;if(!Ao||oe==x.doc.first+x.doc.size)return{index:pe,lineN:oe};for(var ct=x.display.viewFrom,ht=0;ht<pe;ht++)ct+=qe[ht].size;if(ct!=z){if(ie>0){if(pe==qe.length-1)return null;Pe=ct+qe[pe].size-z,pe++}else Pe=ct-z;z+=Pe,oe+=Pe}for(;fn(x.doc,oe)!=oe;){if(pe==(ie<0?0:qe.length-1))return null;oe+=ie*qe[pe-(ie<0?1:0)].size,pe+=ie}return{index:pe,lineN:oe}}function bs(x,z,oe){var ie=x.display,pe=ie.view;pe.length==0||z>=ie.viewTo||oe<=ie.viewFrom?(ie.view=Nn(x,z,oe),ie.viewFrom=z):(ie.viewFrom>z?ie.view=Nn(x,z,ie.viewFrom).concat(ie.view):ie.viewFrom<z&&(ie.view=ie.view.slice(Bi(x,z))),ie.viewFrom=z,ie.viewTo<oe?ie.view=ie.view.concat(Nn(x,ie.viewTo,oe)):ie.viewTo>oe&&(ie.view=ie.view.slice(0,Bi(x,oe)))),ie.viewTo=oe}function bl(x){for(var z=x.display.view,oe=0,ie=0;ie<z.length;ie++){var pe=z[ie];!pe.hidden&&(!pe.node||pe.changes)&&++oe}return oe}function rl(x){x.display.input.showSelection(x.display.input.prepareSelection())}function $l(x,z){z===void 0&&(z=!0);for(var oe=x.doc,ie={},pe=ie.cursors=document.createDocumentFragment(),Pe=ie.selection=document.createDocumentFragment(),qe=0;qe<oe.sel.ranges.length;qe++)if(!(!z&&qe==oe.sel.primIndex)){var ct=oe.sel.ranges[qe];if(!(ct.from().line>=x.display.viewTo||ct.to().line<x.display.viewFrom)){var ht=ct.empty();(ht||x.options.showCursorWhenSelecting)&&ya(x,ct.head,pe),ht||Mo(x,ct,Pe)}}return ie}function ya(x,z,oe){var ie=Ma(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),pe=oe.appendChild(Ye("div","\xA0","CodeMirror-cursor"));if(pe.style.left=ie.left+"px",pe.style.top=ie.top+"px",pe.style.height=Math.max(0,ie.bottom-ie.top)*x.options.cursorHeight+"px",ie.other){var Pe=oe.appendChild(Ye("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Pe.style.display="",Pe.style.left=ie.other.left+"px",Pe.style.top=ie.other.top+"px",Pe.style.height=(ie.other.bottom-ie.other.top)*.85+"px"}}function yi(x,z){return x.top-z.top||x.left-z.left}function Mo(x,z,oe){var ie=x.display,pe=x.doc,Pe=document.createDocumentFragment(),qe=zi(x.display),ct=qe.left,ht=Math.max(ie.sizerWidth,ii(x)-ie.sizer.offsetLeft)-qe.right,Et=pe.direction=="ltr";function cn(Gi,xo,sa,fa){xo<0&&(xo=0),xo=Math.round(xo),fa=Math.round(fa),Pe.appendChild(Ye("div",null,"CodeMirror-selected","position: absolute; left: "+Gi+`px;
|
|
|
top: `+xo+"px; width: "+(sa==null?ht-Gi:sa)+`px;
|
|
|
height: `+(fa-xo)+"px"))}function En(Gi,xo,sa){var fa=an(pe,Gi),us=fa.text.length,el,lc;function Ll(ql,Oc){return Ja(x,mn(Gi,ql),"div",fa,Oc)}function Ic(ql,Oc,ja){var Bl=Qa(x,fa,null,ql),kl=Oc=="ltr"==(ja=="after")?"left":"right",Fl=ja=="after"?Bl.begin:Bl.end-(/\s/.test(fa.text.charAt(Bl.end-1))?2:1);return Ll(Fl,kl)[kl]}var Rc=Xt(fa,pe.direction);return Vt(Rc,xo||0,sa==null?us:sa,function(ql,Oc,ja,Bl){var kl=ja=="ltr",Fl=Ll(ql,kl?"left":"right"),Ul=Ll(Oc-1,kl?"right":"left"),Ku=xo==null&&ql==0,zc=sa==null&&Oc==us,hc=Bl==0,Fs=!Rc||Bl==Rc.length-1;if(Ul.top-Fl.top<=3){var tc=(Et?Ku:zc)&&hc,Bd=(Et?zc:Ku)&&Fs,yu=tc?ct:(kl?Fl:Ul).left,Cu=Bd?ht:(kl?Ul:Fl).right;cn(yu,Fl.top,Cu-yu,Fl.bottom)}else{var du,Jl,Uu,pc;kl?(du=Et&&Ku&&hc?ct:Fl.left,Jl=Et?ht:Ic(ql,ja,"before"),Uu=Et?ct:Ic(Oc,ja,"after"),pc=Et&&zc&&Fs?ht:Ul.right):(du=Et?Ic(ql,ja,"before"):ct,Jl=!Et&&Ku&&hc?ht:Fl.right,Uu=!Et&&zc&&Fs?ct:Ul.left,pc=Et?Ic(Oc,ja,"after"):ht),cn(du,Fl.top,Jl-du,Fl.bottom),Fl.bottom<Ul.top&&cn(ct,Fl.bottom,null,Ul.top),cn(Uu,Ul.top,pc-Uu,Ul.bottom)}(!el||yi(Fl,el)<0)&&(el=Fl),yi(Ul,el)<0&&(el=Ul),(!lc||yi(Fl,lc)<0)&&(lc=Fl),yi(Ul,lc)<0&&(lc=Ul)}),{start:el,end:lc}}var ur=z.from(),Jn=z.to();if(ur.line==Jn.line)En(ur.line,ur.ch,Jn.ch);else{var Hr=an(pe,ur.line),oi=an(pe,Jn.line),Oi=kt(Hr)==kt(oi),ro=En(ur.line,ur.ch,Oi?Hr.text.length+1:null).end,yo=En(Jn.line,Oi?0:null,Jn.ch).start;Oi&&(ro.top<yo.top-2?(cn(ro.right,ro.top,null,ro.bottom),cn(ct,yo.top,yo.left,yo.bottom)):cn(ro.right,ro.top,yo.left-ro.right,ro.bottom)),ro.bottom<yo.top&&cn(ct,ro.bottom,null,yo.top)}oe.appendChild(Pe)}function Do(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var oe=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||Sl(x),z.cursorDiv.style.visibility=(oe=!oe)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Uo(x){x.state.focused||(x.display.input.focus(),ls(x))}function Ss(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Sl(x))},100)}function ls(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(Yn(x,"focus",x,z),x.state.focused=!0,Kt(x.display.wrapper,"CodeMirror-focused"),!x.curOp&&x.display.selForContextMenu!=x.doc.sel&&(x.display.input.reset(),ae&&setTimeout(function(){return x.display.input.reset(!0)},20)),x.display.input.receivedFocus()),Do(x))}function Sl(x,z){x.state.delayingBlurEvent||(x.state.focused&&(Yn(x,"blur",x,z),x.state.focused=!1,Re(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function pl(x){for(var z=x.display,oe=z.lineDiv.offsetTop,ie=0;ie<z.view.length;ie++){var pe=z.view[ie],Pe=x.options.lineWrapping,qe=void 0,ct=0;if(!pe.hidden){if(ce&&fe<8){var ht=pe.node.offsetTop+pe.node.offsetHeight;qe=ht-oe,oe=ht}else{var Et=pe.node.getBoundingClientRect();qe=Et.bottom-Et.top,!Pe&&pe.text.firstChild&&(ct=pe.text.firstChild.getBoundingClientRect().right-Et.left-1)}var cn=pe.line.height-qe;if((cn>.005||cn<-.005)&&(or(pe.line,qe),rc(pe.line),pe.rest))for(var En=0;En<pe.rest.length;En++)rc(pe.rest[En]);if(ct>x.display.sizerWidth){var ur=Math.ceil(ct/Rs(x.display));ur>x.display.maxLineLength&&(x.display.maxLineLength=ur,x.display.maxLine=pe.line,x.display.maxLineChanged=!0)}}}}function rc(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var oe=x.widgets[z],ie=oe.node.parentNode;ie&&(oe.height=ie.offsetHeight)}}function Xa(x,z,oe){var ie=oe&&oe.top!=null?Math.max(0,oe.top):x.scroller.scrollTop;ie=Math.floor(ie-Ai(x));var pe=oe&&oe.bottom!=null?oe.bottom:ie+x.wrapper.clientHeight,Pe=Xn(z,ie),qe=Xn(z,pe);if(oe&&oe.ensure){var ct=oe.ensure.from.line,ht=oe.ensure.to.line;ct<Pe?(Pe=ct,qe=Xn(z,An(an(z,ct))+x.wrapper.clientHeight)):Math.min(ht,z.lastLine())>=qe&&(Pe=Xn(z,An(an(z,ht))-x.wrapper.clientHeight),qe=ht)}return{from:Pe,to:Math.max(qe,Pe+1)}}function wl(x,z){if(!pr(x,"scrollCursorIntoView")){var oe=x.display,ie=oe.sizer.getBoundingClientRect(),pe=null;if(z.top+ie.top<0?pe=!0:z.bottom+ie.top>(window.innerHeight||document.documentElement.clientHeight)&&(pe=!1),pe!=null&&!se){var Pe=Ye("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-oe.viewOffset-Ai(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+ai(x)+oe.barHeight)+`px;
|
|
|
left: `+z.left+"px; width: "+Math.max(2,z.right-z.left)+"px;");x.display.lineSpace.appendChild(Pe),Pe.scrollIntoView(pe),x.display.lineSpace.removeChild(Pe)}}}function ic(x,z,oe,ie){ie==null&&(ie=0);var pe;!x.options.lineWrapping&&z==oe&&(z=z.ch?mn(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,oe=z.sticky=="before"?mn(z.line,z.ch+1,"before"):z);for(var Pe=0;Pe<5;Pe++){var qe=!1,ct=Ma(x,z),ht=!oe||oe==z?ct:Ma(x,oe);pe={left:Math.min(ct.left,ht.left),top:Math.min(ct.top,ht.top)-ie,right:Math.max(ct.left,ht.left),bottom:Math.max(ct.bottom,ht.bottom)+ie};var Et=xc(x,pe),cn=x.doc.scrollTop,En=x.doc.scrollLeft;if(Et.scrollTop!=null&&(ts(x,Et.scrollTop),Math.abs(x.doc.scrollTop-cn)>1&&(qe=!0)),Et.scrollLeft!=null&&($s(x,Et.scrollLeft),Math.abs(x.doc.scrollLeft-En)>1&&(qe=!0)),!qe)break}return pe}function Vc(x,z){var oe=xc(x,z);oe.scrollTop!=null&&ts(x,oe.scrollTop),oe.scrollLeft!=null&&$s(x,oe.scrollLeft)}function xc(x,z){var oe=x.display,ie=gs(x.display);z.top<0&&(z.top=0);var pe=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:oe.scroller.scrollTop,Pe=Ui(x),qe={};z.bottom-z.top>Pe&&(z.bottom=z.top+Pe);var ct=x.doc.height+pi(oe),ht=z.top<ie,Et=z.bottom>ct-ie;if(z.top<pe)qe.scrollTop=ht?0:z.top;else if(z.bottom>pe+Pe){var cn=Math.min(z.top,(Et?ct:z.bottom)-Pe);cn!=pe&&(qe.scrollTop=cn)}var En=x.options.fixedGutter?0:oe.gutters.offsetWidth,ur=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:oe.scroller.scrollLeft-En,Jn=ii(x)-oe.gutters.offsetWidth,Hr=z.right-z.left>Jn;return Hr&&(z.right=z.left+Jn),z.left<10?qe.scrollLeft=0:z.left<ur?qe.scrollLeft=Math.max(0,z.left+En-(Hr?0:10)):z.right>Jn+ur-3&&(qe.scrollLeft=z.right+(Hr?0:10)-Jn),qe}function Ql(x,z){z!=null&&(Fo(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function Al(x){Fo(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ec(x,z,oe){(z!=null||oe!=null)&&Fo(x),z!=null&&(x.curOp.scrollLeft=z),oe!=null&&(x.curOp.scrollTop=oe)}function Hl(x,z){Fo(x),x.curOp.scrollToPos=z}function Fo(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var oe=Za(x,z.from),ie=Za(x,z.to);Bs(x,oe,ie,z.margin)}}function Bs(x,z,oe,ie){var pe=xc(x,{left:Math.min(z.left,oe.left),top:Math.min(z.top,oe.top)-ie,right:Math.max(z.right,oe.right),bottom:Math.max(z.bottom,oe.bottom)+ie});Ec(x,pe.scrollLeft,pe.scrollTop)}function ts(x,z){Math.abs(x.doc.scrollTop-z)<2||(te||Va(x,{top:z}),Os(x,z,!0),te&&Va(x),jr(x,100))}function Os(x,z,oe){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!oe)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function $s(x,z,oe,ie){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((oe?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!ie)&&(x.doc.scrollLeft=z,Ns(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function il(x){var z=x.display,oe=z.gutters.offsetWidth,ie=Math.round(x.doc.height+pi(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?oe:0,docHeight:ie,scrollHeight:ie+ai(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:oe}}var El=function(x,z,oe){this.cm=oe;var ie=this.vert=Ye("div",[Ye("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pe=this.horiz=Ye("div",[Ye("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ie.tabIndex=pe.tabIndex=-1,x(ie),x(pe),bn(ie,"scroll",function(){ie.clientHeight&&z(ie.scrollTop,"vertical")}),bn(pe,"scroll",function(){pe.clientWidth&&z(pe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ce&&fe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};El.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,oe=x.scrollHeight>x.clientHeight+1,ie=x.nativeBarWidth;if(oe){this.vert.style.display="block",this.vert.style.bottom=z?ie+"px":"0";var pe=x.viewHeight-(z?ie:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+pe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=oe?ie+"px":"0",this.horiz.style.left=x.barLeft+"px";var Pe=x.viewWidth-x.barLeft-(oe?ie:0);this.horiz.firstChild.style.width=Math.max(0,x.scrollWidth-x.clientWidth+Pe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&x.clientHeight>0&&(ie==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:oe?ie:0,bottom:z?ie:0}},El.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},El.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},El.prototype.zeroWidthHack=function(){var x=ve&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ge,this.disableVert=new Ge},El.prototype.enableZeroWidthBar=function(x,z,oe){x.style.pointerEvents="auto";function ie(){var pe=x.getBoundingClientRect(),Pe=oe=="vert"?document.elementFromPoint(pe.right-1,(pe.top+pe.bottom)/2):document.elementFromPoint((pe.right+pe.left)/2,pe.bottom-1);Pe!=x?x.style.pointerEvents="none":z.set(1e3,ie)}z.set(1e3,ie)},El.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var ol=function(){};ol.prototype.update=function(){return{bottom:0,right:0}},ol.prototype.setScrollLeft=function(){},ol.prototype.setScrollTop=function(){},ol.prototype.clear=function(){};function ns(x,z){z||(z=il(x));var oe=x.display.barWidth,ie=x.display.barHeight;qs(x,z);for(var pe=0;pe<4&&oe!=x.display.barWidth||ie!=x.display.barHeight;pe++)oe!=x.display.barWidth&&x.options.lineWrapping&&pl(x),qs(x,il(x)),oe=x.display.barWidth,ie=x.display.barHeight}function qs(x,z){var oe=x.display,ie=oe.scrollbars.update(z);oe.sizer.style.paddingRight=(oe.barWidth=ie.right)+"px",oe.sizer.style.paddingBottom=(oe.barHeight=ie.bottom)+"px",oe.heightForcer.style.borderBottom=ie.bottom+"px solid transparent",ie.right&&ie.bottom?(oe.scrollbarFiller.style.display="block",oe.scrollbarFiller.style.height=ie.bottom+"px",oe.scrollbarFiller.style.width=ie.right+"px"):oe.scrollbarFiller.style.display="",ie.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(oe.gutterFiller.style.display="block",oe.gutterFiller.style.height=ie.bottom+"px",oe.gutterFiller.style.width=z.gutterWidth+"px"):oe.gutterFiller.style.display=""}var Hc={native:El,null:ol};function Tl(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Re(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Hc[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),bn(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,oe){oe=="horizontal"?$s(x,z):ts(x,z)},x),x.display.scrollbars.addClass&&Kt(x.display.wrapper,x.display.scrollbars.addClass)}var au=0;function Mc(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:++au},vn(x.curOp)}function Lc(x){var z=x.curOp;z&&Gn(z,function(oe){for(var ie=0;ie<oe.ops.length;ie++)oe.ops[ie].cm.curOp=null;Nc(oe)})}function Nc(x){for(var z=x.ops,oe=0;oe<z.length;oe++)Jc(z[oe]);for(var ie=0;ie<z.length;ie++)os(z[ie]);for(var pe=0;pe<z.length;pe++)Ka(z[pe]);for(var Pe=0;Pe<z.length;Pe++)xl(z[Pe]);for(var qe=0;qe<z.length;qe++)Vl(z[qe])}function Jc(x){var z=x.cm,oe=z.display;kr(z),x.updateMaxLine&&wn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<oe.viewFrom||x.scrollToPos.to.line>=oe.viewTo)||oe.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new Kr(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function os(x){x.updatedDisplay=x.mustUpdate&&Fa(x.cm,x.update)}function Ka(x){var z=x.cm,oe=z.display;x.updatedDisplay&&pl(z),x.barMeasure=il(z),oe.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=So(z,oe.maxLine,oe.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(oe.scroller.clientWidth,oe.sizer.offsetLeft+x.adjustWidthTo+ai(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,oe.sizer.offsetLeft+x.adjustWidthTo-ii(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=oe.input.prepareSelection())}function xl(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&$s(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var oe=x.focus&&x.focus==pt();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,oe),(x.updatedDisplay||x.startHeight!=z.doc.height)&&ns(z,x.barMeasure),x.updatedDisplay&&Zo(z,x.barMeasure),x.selectionChanged&&Do(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),oe&&Uo(x.cm)}function Vl(x){var z=x.cm,oe=z.display,ie=z.doc;if(x.updatedDisplay&&zo(z,x.update),oe.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(oe.wheelStartX=oe.wheelStartY=null),x.scrollTop!=null&&Os(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&$s(z,x.scrollLeft,!0,!0),x.scrollToPos){var pe=ic(z,yr(ie,x.scrollToPos.from),yr(ie,x.scrollToPos.to),x.scrollToPos.margin);wl(z,pe)}var Pe=x.maybeHiddenMarkers,qe=x.maybeUnhiddenMarkers;if(Pe)for(var ct=0;ct<Pe.length;++ct)Pe[ct].lines.length||Yn(Pe[ct],"hide");if(qe)for(var ht=0;ht<qe.length;++ht)qe[ht].lines.length&&Yn(qe[ht],"unhide");oe.wrapper.offsetHeight&&(ie.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&Yn(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function mt(x,z){if(x.curOp)return z();Mc(x);try{return z()}finally{Lc(x)}}function Bt(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Mc(x);try{return z.apply(x,arguments)}finally{Lc(x)}}}function Wt(x){return function(){if(this.curOp)return x.apply(this,arguments);Mc(this);try{return x.apply(this,arguments)}finally{Lc(this)}}}function di(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Mc(z);try{return x.apply(this,arguments)}finally{Lc(z)}}}function jr(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,ft(Rr,x))}function Rr(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var oe=+new Date+x.options.workTime,ie=bo(x,z.highlightFrontier),pe=[];z.iter(ie.line,Math.min(z.first+z.size,x.display.viewTo+500),function(Pe){if(ie.line>=x.display.viewFrom){var qe=Pe.styles,ct=Pe.text.length>x.options.maxHighlightLength?We(z.mode,ie.state):null,ht=ua(x,Pe,ie,!0);ct&&(ie.state=ct),Pe.styles=ht.styles;var Et=Pe.styleClasses,cn=ht.classes;cn?Pe.styleClasses=cn:Et&&(Pe.styleClasses=null);for(var En=!qe||qe.length!=Pe.styles.length||Et!=cn&&(!Et||!cn||Et.bgClass!=cn.bgClass||Et.textClass!=cn.textClass),ur=0;!En&&ur<qe.length;++ur)En=qe[ur]!=Pe.styles[ur];En&&pe.push(ie.line),Pe.stateAfter=ie.save(),ie.nextLine()}else Pe.text.length<=x.options.maxHighlightLength&&oo(x,Pe.text,ie),Pe.stateAfter=ie.line%5==0?ie.save():null,ie.nextLine();if(+new Date>oe)return jr(x,x.options.workDelay),!0}),z.highlightFrontier=ie.line,z.modeFrontier=Math.max(z.modeFrontier,ie.line),pe.length&&mt(x,function(){for(var Pe=0;Pe<pe.length;Pe++)Qo(x,pe[Pe],"text")})}}var Kr=function(x,z,oe){var ie=x.display;this.viewport=z,this.visible=Xa(ie,x.doc,z),this.editorIsHidden=!ie.wrapper.offsetWidth,this.wrapperHeight=ie.wrapper.clientHeight,this.wrapperWidth=ie.wrapper.clientWidth,this.oldDisplayWidth=ii(x),this.force=oe,this.dims=Ws(x),this.events=[]};Kr.prototype.signal=function(x,z){Pn(x,z)&&this.events.push(arguments)},Kr.prototype.finish=function(){for(var x=0;x<this.events.length;x++)Yn.apply(null,this.events[x])};function kr(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=ai(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=ai(x)+"px",z.scrollbarsClipped=!0)}function Gr(x){if(x.hasFocus())return null;var z=pt();if(!z||!zt(x.display.lineDiv,z))return null;var oe={activeElt:z};if(window.getSelection){var ie=window.getSelection();ie.anchorNode&&ie.extend&&zt(x.display.lineDiv,ie.anchorNode)&&(oe.anchorNode=ie.anchorNode,oe.anchorOffset=ie.anchorOffset,oe.focusNode=ie.focusNode,oe.focusOffset=ie.focusOffset)}return oe}function Li(x){if(!(!x||!x.activeElt||x.activeElt==pt())&&(x.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName)&&x.anchorNode&&zt(document.body,x.anchorNode)&&zt(document.body,x.focusNode))){var z=window.getSelection(),oe=document.createRange();oe.setEnd(x.anchorNode,x.anchorOffset),oe.collapse(!1),z.removeAllRanges(),z.addRange(oe),z.extend(x.focusNode,x.focusOffset)}}function Fa(x,z){var oe=x.display,ie=x.doc;if(z.editorIsHidden)return Ca(x),!1;if(!z.force&&z.visible.from>=oe.viewFrom&&z.visible.to<=oe.viewTo&&(oe.updateLineNumbers==null||oe.updateLineNumbers>=oe.viewTo)&&oe.renderedView==oe.view&&bl(x)==0)return!1;Ta(x)&&(Ca(x),z.dims=Ws(x));var pe=ie.first+ie.size,Pe=Math.max(z.visible.from-x.options.viewportMargin,ie.first),qe=Math.min(pe,z.visible.to+x.options.viewportMargin);oe.viewFrom<Pe&&Pe-oe.viewFrom<20&&(Pe=Math.max(ie.first,oe.viewFrom)),oe.viewTo>qe&&oe.viewTo-qe<20&&(qe=Math.min(pe,oe.viewTo)),Ao&&(Pe=fn(x.doc,Pe),qe=jn(x.doc,qe));var ct=Pe!=oe.viewFrom||qe!=oe.viewTo||oe.lastWrapHeight!=z.wrapperHeight||oe.lastWrapWidth!=z.wrapperWidth;bs(x,Pe,qe),oe.viewOffset=An(an(x.doc,oe.viewFrom)),x.display.mover.style.top=oe.viewOffset+"px";var ht=bl(x);if(!ct&&ht==0&&!z.force&&oe.renderedView==oe.view&&(oe.updateLineNumbers==null||oe.updateLineNumbers>=oe.viewTo))return!1;var Et=Gr(x);return ht>4&&(oe.lineDiv.style.display="none"),Lo(x,oe.updateLineNumbers,z.dims),ht>4&&(oe.lineDiv.style.display=""),oe.renderedView=oe.view,Li(Et),De(oe.cursorDiv),De(oe.selectionDiv),oe.gutters.style.height=oe.sizer.style.minHeight=0,ct&&(oe.lastWrapHeight=z.wrapperHeight,oe.lastWrapWidth=z.wrapperWidth,jr(x,400)),oe.updateLineNumbers=null,!0}function zo(x,z){for(var oe=z.viewport,ie=!0;;ie=!1){if(!ie||!x.options.lineWrapping||z.oldDisplayWidth==ii(x)){if(oe&&oe.top!=null&&(oe={top:Math.min(x.doc.height+pi(x.display)-Ui(x),oe.top)}),z.visible=Xa(x.display,x.doc,oe),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else ie&&(z.visible=Xa(x.display,x.doc,oe));if(!Fa(x,z))break;pl(x);var pe=il(x);rl(x),ns(x,pe),Zo(x,pe),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 Va(x,z){var oe=new Kr(x,z);if(Fa(x,oe)){pl(x),zo(x,oe);var ie=il(x);rl(x),ns(x,ie),Zo(x,ie),oe.finish()}}function Lo(x,z,oe){var ie=x.display,pe=x.options.lineNumbers,Pe=ie.lineDiv,qe=Pe.firstChild;function ct(Hr){var oi=Hr.nextSibling;return ae&&ve&&x.display.currentWheelTarget==Hr?Hr.style.display="none":Hr.parentNode.removeChild(Hr),oi}for(var ht=ie.view,Et=ie.viewFrom,cn=0;cn<ht.length;cn++){var En=ht[cn];if(!En.hidden)if(!En.node||En.node.parentNode!=Pe){var ur=wi(x,En,Et,oe);Pe.insertBefore(ur,qe)}else{for(;qe!=En.node;)qe=ct(qe);var Jn=pe&&z!=null&&z<=Et&&En.lineNumber;En.changes&&(jt(En.changes,"gutter")>-1&&(Jn=!1),Ur(x,En,Et,oe)),Jn&&(De(En.lineNumber),En.lineNumber.appendChild(document.createTextNode(_r(x.options,Et)))),qe=En.node.nextSibling}Et+=En.size}for(;qe;)qe=ct(qe)}function Ra(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Zo(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+ai(x)+"px"}function Ns(x){var z=x.display,oe=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var ie=hl(z)-z.scroller.scrollLeft+x.doc.scrollLeft,pe=z.gutters.offsetWidth,Pe=ie+"px",qe=0;qe<oe.length;qe++)if(!oe[qe].hidden){x.options.fixedGutter&&(oe[qe].gutter&&(oe[qe].gutter.style.left=Pe),oe[qe].gutterBackground&&(oe[qe].gutterBackground.style.left=Pe));var ct=oe[qe].alignable;if(ct)for(var ht=0;ht<ct.length;ht++)ct[ht].style.left=Pe}x.options.fixedGutter&&(z.gutters.style.left=ie+pe+"px")}}function Ta(x){if(!x.options.lineNumbers)return!1;var z=x.doc,oe=_r(x.options,z.first+z.size-1),ie=x.display;if(oe.length!=ie.lineNumChars){var pe=ie.measure.appendChild(Ye("div",[Ye("div",oe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Pe=pe.firstChild.offsetWidth,qe=pe.offsetWidth-Pe;return ie.lineGutter.style.width="",ie.lineNumInnerWidth=Math.max(Pe,ie.lineGutter.offsetWidth-qe)+1,ie.lineNumWidth=ie.lineNumInnerWidth+qe,ie.lineNumChars=ie.lineNumInnerWidth?oe.length:-1,ie.lineGutter.style.width=ie.lineNumWidth+"px",Ra(x.display),!0}return!1}function qa(x,z){for(var oe=[],ie=!1,pe=0;pe<x.length;pe++){var Pe=x[pe],qe=null;if(typeof Pe!="string"&&(qe=Pe.style,Pe=Pe.className),Pe=="CodeMirror-linenumbers")if(z)ie=!0;else continue;oe.push({className:Pe,style:qe})}return z&&!ie&&oe.push({className:"CodeMirror-linenumbers",style:null}),oe}function Hs(x){var z=x.gutters,oe=x.gutterSpecs;De(z),x.lineGutter=null;for(var ie=0;ie<oe.length;++ie){var pe=oe[ie],Pe=pe.className,qe=pe.style,ct=z.appendChild(Ye("div",null,"CodeMirror-gutter "+Pe));qe&&(ct.style.cssText=qe),Pe=="CodeMirror-linenumbers"&&(x.lineGutter=ct,ct.style.width=(x.lineNumWidth||1)+"px")}z.style.display=oe.length?"":"none",Ra(x)}function ba(x){Hs(x.display),Co(x),Ns(x)}function Ds(x,z,oe,ie){var pe=this;this.input=oe,pe.scrollbarFiller=Ye("div",null,"CodeMirror-scrollbar-filler"),pe.scrollbarFiller.setAttribute("cm-not-content","true"),pe.gutterFiller=Ye("div",null,"CodeMirror-gutter-filler"),pe.gutterFiller.setAttribute("cm-not-content","true"),pe.lineDiv=dt("div",null,"CodeMirror-code"),pe.selectionDiv=Ye("div",null,null,"position: relative; z-index: 1"),pe.cursorDiv=Ye("div",null,"CodeMirror-cursors"),pe.measure=Ye("div",null,"CodeMirror-measure"),pe.lineMeasure=Ye("div",null,"CodeMirror-measure"),pe.lineSpace=dt("div",[pe.measure,pe.lineMeasure,pe.selectionDiv,pe.cursorDiv,pe.lineDiv],null,"position: relative; outline: none");var Pe=dt("div",[pe.lineSpace],"CodeMirror-lines");pe.mover=Ye("div",[Pe],null,"position: relative"),pe.sizer=Ye("div",[pe.mover],"CodeMirror-sizer"),pe.sizerWidth=null,pe.heightForcer=Ye("div",null,null,"position: absolute; height: "+yn+"px; width: 1px;"),pe.gutters=Ye("div",null,"CodeMirror-gutters"),pe.lineGutter=null,pe.scroller=Ye("div",[pe.sizer,pe.heightForcer,pe.gutters],"CodeMirror-scroll"),pe.scroller.setAttribute("tabIndex","-1"),pe.wrapper=Ye("div",[pe.scrollbarFiller,pe.gutterFiller,pe.scroller],"CodeMirror"),ce&&fe<8&&(pe.gutters.style.zIndex=-1,pe.scroller.style.paddingRight=0),!ae&&!(te&&Me)&&(pe.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(pe.wrapper):x(pe.wrapper)),pe.viewFrom=pe.viewTo=z.first,pe.reportedViewFrom=pe.reportedViewTo=z.first,pe.view=[],pe.renderedView=null,pe.externalMeasured=null,pe.viewOffset=0,pe.lastWrapHeight=pe.lastWrapWidth=0,pe.updateLineNumbers=null,pe.nativeBarWidth=pe.barHeight=pe.barWidth=0,pe.scrollbarsClipped=!1,pe.lineNumWidth=pe.lineNumInnerWidth=pe.lineNumChars=null,pe.alignWidgets=!1,pe.cachedCharWidth=pe.cachedTextHeight=pe.cachedPaddingH=null,pe.maxLine=null,pe.maxLineLength=0,pe.maxLineChanged=!1,pe.wheelDX=pe.wheelDY=pe.wheelStartX=pe.wheelStartY=null,pe.shift=!1,pe.selForContextMenu=null,pe.activeTouch=null,pe.gutterSpecs=qa(ie.gutters,ie.lineNumbers),Hs(pe),oe.init(pe)}var Ri=0,Oa=null;ce?Oa=-.53:te?Oa=15:re?Oa=-.7:he&&(Oa=-1/3);function za(x){var z=x.wheelDeltaX,oe=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),oe==null&&x.detail&&x.axis==x.VERTICAL_AXIS?oe=x.detail:oe==null&&(oe=x.wheelDelta),{x:z,y:oe}}function Gs(x){var z=za(x);return z.x*=Oa,z.y*=Oa,z}function Gl(x,z){var oe=za(z),ie=oe.x,pe=oe.y,Pe=x.display,qe=Pe.scroller,ct=qe.scrollWidth>qe.clientWidth,ht=qe.scrollHeight>qe.clientHeight;if(ie&&ct||pe&&ht){if(pe&&ve&&ae){e:for(var Et=z.target,cn=Pe.view;Et!=qe;Et=Et.parentNode)for(var En=0;En<cn.length;En++)if(cn[En].node==Et){x.display.currentWheelTarget=Et;break e}}if(ie&&!te&&!de&&Oa!=null){pe&&ht&&ts(x,Math.max(0,qe.scrollTop+pe*Oa)),$s(x,Math.max(0,qe.scrollLeft+ie*Oa)),(!pe||pe&&ht)&&Br(z),Pe.wheelStartX=null;return}if(pe&&Oa!=null){var ur=pe*Oa,Jn=x.doc.scrollTop,Hr=Jn+Pe.wrapper.clientHeight;ur<0?Jn=Math.max(0,Jn+ur-50):Hr=Math.min(x.doc.height,Hr+ur+50),Va(x,{top:Jn,bottom:Hr})}Ri<20&&(Pe.wheelStartX==null?(Pe.wheelStartX=qe.scrollLeft,Pe.wheelStartY=qe.scrollTop,Pe.wheelDX=ie,Pe.wheelDY=pe,setTimeout(function(){if(Pe.wheelStartX!=null){var oi=qe.scrollLeft-Pe.wheelStartX,Oi=qe.scrollTop-Pe.wheelStartY,ro=Oi&&Pe.wheelDY&&Oi/Pe.wheelDY||oi&&Pe.wheelDX&&oi/Pe.wheelDX;Pe.wheelStartX=Pe.wheelStartY=null,ro&&(Oa=(Oa*Ri+ro)/(Ri+1),++Ri)}},200)):(Pe.wheelDX+=ie,Pe.wheelDY+=pe))}}var Yi=function(x,z){this.ranges=x,this.primIndex=z};Yi.prototype.primary=function(){return this.ranges[this.primIndex]},Yi.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 oe=this.ranges[z],ie=x.ranges[z];if(!Vr(oe.anchor,ie.anchor)||!Vr(oe.head,ie.head))return!1}return!0},Yi.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new oa(qr(this.ranges[z].anchor),qr(this.ranges[z].head));return new Yi(x,this.primIndex)},Yi.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},Yi.prototype.contains=function(x,z){z||(z=x);for(var oe=0;oe<this.ranges.length;oe++){var ie=this.ranges[oe];if($n(z,ie.from())>=0&&$n(x,ie.to())<=0)return oe}return-1};var oa=function(x,z){this.anchor=x,this.head=z};oa.prototype.from=function(){return hi(this.anchor,this.head)},oa.prototype.to=function(){return Ir(this.anchor,this.head)},oa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Na(x,z,oe){var ie=x&&x.options.selectionsMayTouch,pe=z[oe];z.sort(function(ur,Jn){return $n(ur.from(),Jn.from())}),oe=jt(z,pe);for(var Pe=1;Pe<z.length;Pe++){var qe=z[Pe],ct=z[Pe-1],ht=$n(ct.to(),qe.from());if(ie&&!qe.empty()?ht>0:ht>=0){var Et=hi(ct.from(),qe.from()),cn=Ir(ct.to(),qe.to()),En=ct.empty()?qe.from()==qe.head:ct.from()==ct.head;Pe<=oe&&--oe,z.splice(--Pe,2,new oa(En?cn:Et,En?Et:cn))}}return new Yi(z,oe)}function uo(x,z){return new Yi([new oa(x,z||x)],0)}function Sa(x){return x.text?mn(x.from.line+x.text.length-1,Mn(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function cs(x,z){if($n(x,z.from)<0)return x;if($n(x,z.to)<=0)return Sa(z);var oe=x.line+z.text.length-(z.to.line-z.from.line)-1,ie=x.ch;return x.line==z.to.line&&(ie+=Sa(z).ch-z.to.ch),mn(oe,ie)}function as(x,z){for(var oe=[],ie=0;ie<x.sel.ranges.length;ie++){var pe=x.sel.ranges[ie];oe.push(new oa(cs(pe.anchor,z),cs(pe.head,z)))}return Na(x.cm,oe,x.sel.primIndex)}function kc(x,z,oe){return x.line==z.line?mn(oe.line,x.ch-z.ch+oe.ch):mn(oe.line+(x.line-z.line),x.ch)}function jc(x,z,oe){for(var ie=[],pe=mn(x.first,0),Pe=pe,qe=0;qe<z.length;qe++){var ct=z[qe],ht=kc(ct.from,pe,Pe),Et=kc(Sa(ct),pe,Pe);if(pe=ct.to,Pe=Et,oe=="around"){var cn=x.sel.ranges[qe],En=$n(cn.head,cn.anchor)<0;ie[qe]=new oa(En?Et:ht,En?ht:Et)}else ie[qe]=new oa(ht,ht)}return new Yi(ie,x.sel.primIndex)}function Ac(x){x.doc.mode=ge(x.options,x.doc.modeOption),Tc(x)}function Tc(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,jr(x,100),x.state.modeGen++,x.curOp&&Co(x)}function _c(x,z){return z.from.ch==0&&z.to.ch==0&&Mn(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function Kc(x,z,oe,ie){function pe(yo){return oe?oe[yo]:null}function Pe(yo,Gi,xo){vr(yo,Gi,xo,ie),sr(yo,"change",yo,z)}function qe(yo,Gi){for(var xo=[],sa=yo;sa<Gi;++sa)xo.push(new Un(Et[sa],pe(sa),ie));return xo}var ct=z.from,ht=z.to,Et=z.text,cn=an(x,ct.line),En=an(x,ht.line),ur=Mn(Et),Jn=pe(Et.length-1),Hr=ht.line-ct.line;if(z.full)x.insert(0,qe(0,Et.length)),x.remove(Et.length,x.size-Et.length);else if(_c(x,z)){var oi=qe(0,Et.length-1);Pe(En,En.text,Jn),Hr&&x.remove(ct.line,Hr),oi.length&&x.insert(ct.line,oi)}else if(cn==En)if(Et.length==1)Pe(cn,cn.text.slice(0,ct.ch)+ur+cn.text.slice(ht.ch),Jn);else{var Oi=qe(1,Et.length-1);Oi.push(new Un(ur+cn.text.slice(ht.ch),Jn,ie)),Pe(cn,cn.text.slice(0,ct.ch)+Et[0],pe(0)),x.insert(ct.line+1,Oi)}else if(Et.length==1)Pe(cn,cn.text.slice(0,ct.ch)+Et[0]+En.text.slice(ht.ch),pe(0)),x.remove(ct.line+1,Hr);else{Pe(cn,cn.text.slice(0,ct.ch)+Et[0],pe(0)),Pe(En,ur+En.text.slice(ht.ch),Jn);var ro=qe(1,Et.length-1);Hr>1&&x.remove(ct.line+1,Hr-1),x.insert(ct.line+1,ro)}sr(x,"change",x,z)}function Bo(x,z,oe){function ie(pe,Pe,qe){if(pe.linked)for(var ct=0;ct<pe.linked.length;++ct){var ht=pe.linked[ct];if(ht.doc!=Pe){var Et=qe&&ht.sharedHist;oe&&!Et||(z(ht.doc,Et),ie(ht.doc,pe,Et))}}}ie(x,null,!0)}function Ps(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,Ts(x),Ac(x),jl(x),x.options.lineWrapping||wn(x),x.options.mode=z.modeOption,Co(x)}function jl(x){(x.doc.direction=="rtl"?Kt:Re)(x.display.lineDiv,"CodeMirror-rtl")}function Pc(x){mt(x,function(){jl(x),Co(x)})}function Kl(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 oc(x,z){var oe={from:qr(z.from),to:Sa(z),text:Rn(x,z.from,z.to)};return Ht(x,oe,z.from.line,z.to.line+1),Bo(x,function(ie){return Ht(ie,oe,z.from.line,z.to.line+1)},!0),oe}function Cc(x){for(;x.length;){var z=Mn(x);if(z.ranges)x.pop();else break}}function al(x,z){if(z)return Cc(x.done),Mn(x.done);if(x.done.length&&!Mn(x.done).ranges)return Mn(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Mn(x.done)}function Ve(x,z,oe,ie){var pe=x.history;pe.undone.length=0;var Pe=+new Date,qe,ct;if((pe.lastOp==ie||pe.lastOrigin==z.origin&&z.origin&&(z.origin.charAt(0)=="+"&&pe.lastModTime>Pe-(x.cm?x.cm.options.historyEventDelay:500)||z.origin.charAt(0)=="*"))&&(qe=al(pe,pe.lastOp==ie)))ct=Mn(qe.changes),$n(z.from,z.to)==0&&$n(z.from,ct.to)==0?ct.to=Sa(z):qe.changes.push(oc(x,z));else{var ht=Mn(pe.done);for((!ht||!ht.ranges)&&Rt(x.sel,pe.done),qe={changes:[oc(x,z)],generation:pe.generation},pe.done.push(qe);pe.done.length>pe.undoDepth;)pe.done.shift(),pe.done[0].ranges||pe.done.shift()}pe.done.push(oe),pe.generation=++pe.maxGeneration,pe.lastModTime=pe.lastSelTime=Pe,pe.lastOp=pe.lastSelOp=ie,pe.lastOrigin=pe.lastSelOrigin=z.origin,ct||Yn(x,"historyAdded")}function Qe(x,z,oe,ie){var pe=z.charAt(0);return pe=="*"||pe=="+"&&oe.ranges.length==ie.ranges.length&&oe.somethingSelected()==ie.somethingSelected()&&new Date-x.history.lastSelTime<=(x.cm?x.cm.options.historyEventDelay:500)}function bt(x,z,oe,ie){var pe=x.history,Pe=ie&&ie.origin;oe==pe.lastSelOp||Pe&&pe.lastSelOrigin==Pe&&(pe.lastModTime==pe.lastSelTime&&pe.lastOrigin==Pe||Qe(x,Pe,Mn(pe.done),z))?pe.done[pe.done.length-1]=z:Rt(z,pe.done),pe.lastSelTime=+new Date,pe.lastSelOrigin=Pe,pe.lastSelOp=oe,ie&&ie.clearRedo!==!1&&Cc(pe.undone)}function Rt(x,z){var oe=Mn(z);oe&&oe.ranges&&oe.equals(x)||z.push(x)}function Ht(x,z,oe,ie){var pe=z["spans_"+x.id],Pe=0;x.iter(Math.max(x.first,oe),Math.min(x.first+x.size,ie),function(qe){qe.markedSpans&&((pe||(pe=z["spans_"+x.id]={}))[Pe]=qe.markedSpans),++Pe})}function Yt(x){if(!x)return null;for(var z,oe=0;oe<x.length;++oe)x[oe].marker.explicitlyCleared?z||(z=x.slice(0,oe)):z&&z.push(x[oe]);return z?z.length?z:null:x}function xn(x,z){var oe=z["spans_"+x.id];if(!oe)return null;for(var ie=[],pe=0;pe<z.text.length;++pe)ie.push(Yt(oe[pe]));return ie}function Ln(x,z){var oe=xn(x,z),ie=Xi(x,z);if(!oe)return ie;if(!ie)return oe;for(var pe=0;pe<oe.length;++pe){var Pe=oe[pe],qe=ie[pe];if(Pe&&qe)e:for(var ct=0;ct<qe.length;++ct){for(var ht=qe[ct],Et=0;Et<Pe.length;++Et)if(Pe[Et].marker==ht.marker)continue e;Pe.push(ht)}else qe&&(oe[pe]=qe)}return oe}function _n(x,z,oe){for(var ie=[],pe=0;pe<x.length;++pe){var Pe=x[pe];if(Pe.ranges){ie.push(oe?Yi.prototype.deepCopy.call(Pe):Pe);continue}var qe=Pe.changes,ct=[];ie.push({changes:ct});for(var ht=0;ht<qe.length;++ht){var Et=qe[ht],cn=void 0;if(ct.push({from:Et.from,to:Et.to,text:Et.text}),z)for(var En in Et)(cn=En.match(/^spans_(\d+)$/))&&jt(z,Number(cn[1]))>-1&&(Mn(ct)[En]=Et[En],delete Et[En])}}return ie}function Vn(x,z,oe,ie){if(ie){var pe=x.anchor;if(oe){var Pe=$n(z,pe)<0;Pe!=$n(oe,pe)<0?(pe=z,z=oe):Pe!=$n(z,oe)<0&&(z=oe)}return new oa(pe,z)}else return new oa(oe||z,z)}function hr(x,z,oe,ie,pe){pe==null&&(pe=x.cm&&(x.cm.display.shift||x.extend)),Zr(x,new Yi([Vn(x.sel.primary(),z,oe,pe)],0),ie)}function Sn(x,z,oe){for(var ie=[],pe=x.cm&&(x.cm.display.shift||x.extend),Pe=0;Pe<x.sel.ranges.length;Pe++)ie[Pe]=Vn(x.sel.ranges[Pe],z[Pe],null,pe);var qe=Na(x.cm,ie,x.sel.primIndex);Zr(x,qe,oe)}function Er(x,z,oe,ie){var pe=x.sel.ranges.slice(0);pe[z]=oe,Zr(x,Na(x.cm,pe,x.sel.primIndex),ie)}function Dr(x,z,oe,ie){Zr(x,uo(z,oe),ie)}function $r(x,z,oe){var ie={ranges:z.ranges,update:function(pe){this.ranges=[];for(var Pe=0;Pe<pe.length;Pe++)this.ranges[Pe]=new oa(yr(x,pe[Pe].anchor),yr(x,pe[Pe].head))},origin:oe&&oe.origin};return Yn(x,"beforeSelectionChange",x,ie),x.cm&&Yn(x.cm,"beforeSelectionChange",x.cm,ie),ie.ranges!=z.ranges?Na(x.cm,ie.ranges,ie.ranges.length-1):z}function ei(x,z,oe){var ie=x.history.done,pe=Mn(ie);pe&&pe.ranges?(ie[ie.length-1]=z,Ei(x,z,oe)):Zr(x,z,oe)}function Zr(x,z,oe){Ei(x,z,oe),bt(x,x.sel,x.cm?x.cm.curOp.id:NaN,oe)}function Ei(x,z,oe){(Pn(x,"beforeSelectionChange")||x.cm&&Pn(x.cm,"beforeSelectionChange"))&&(z=$r(x,z,oe));var ie=oe&&oe.bias||($n(z.primary().head,x.sel.primary().head)<0?-1:1);fi(x,mo(x,z,ie,!0)),!(oe&&oe.scroll===!1)&&x.cm&&Al(x.cm)}function fi(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,ti(x.cm)),sr(x,"cursorActivity",x))}function $i(x){fi(x,mo(x,x.sel,null,!1))}function mo(x,z,oe,ie){for(var pe,Pe=0;Pe<z.ranges.length;Pe++){var qe=z.ranges[Pe],ct=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[Pe],ht=po(x,qe.anchor,ct&&ct.anchor,oe,ie),Et=po(x,qe.head,ct&&ct.head,oe,ie);(pe||ht!=qe.anchor||Et!=qe.head)&&(pe||(pe=z.ranges.slice(0,Pe)),pe[Pe]=new oa(ht,Et))}return pe?Na(x.cm,pe,z.primIndex):z}function ao(x,z,oe,ie,pe){var Pe=an(x,z.line);if(Pe.markedSpans)for(var qe=0;qe<Pe.markedSpans.length;++qe){var ct=Pe.markedSpans[qe],ht=ct.marker,Et="selectLeft"in ht?!ht.selectLeft:ht.inclusiveLeft,cn="selectRight"in ht?!ht.selectRight:ht.inclusiveRight;if((ct.from==null||(Et?ct.from<=z.ch:ct.from<z.ch))&&(ct.to==null||(cn?ct.to>=z.ch:ct.to>z.ch))){if(pe&&(Yn(ht,"beforeCursorEnter"),ht.explicitlyCleared))if(Pe.markedSpans){--qe;continue}else break;if(!ht.atomic)continue;if(oe){var En=ht.find(ie<0?1:-1),ur=void 0;if((ie<0?cn:Et)&&(En=Vo(x,En,-ie,En&&En.line==z.line?Pe:null)),En&&En.line==z.line&&(ur=$n(En,oe))&&(ie<0?ur<0:ur>0))return ao(x,En,z,ie,pe)}var Jn=ht.find(ie<0?-1:1);return(ie<0?Et:cn)&&(Jn=Vo(x,Jn,ie,Jn.line==z.line?Pe:null)),Jn?ao(x,Jn,z,ie,pe):null}}return z}function po(x,z,oe,ie,pe){var Pe=ie||1,qe=ao(x,z,oe,Pe,pe)||!pe&&ao(x,z,oe,Pe,!0)||ao(x,z,oe,-Pe,pe)||!pe&&ao(x,z,oe,-Pe,!0);return qe||(x.cantEdit=!0,mn(x.first,0))}function Vo(x,z,oe,ie){return oe<0&&z.ch==0?z.line>x.first?yr(x,mn(z.line-1)):null:oe>0&&z.ch==(ie||an(x,z.line)).text.length?z.line<x.first+x.size-1?mn(z.line+1,0):null:new mn(z.line,z.ch+oe)}function wa(x){x.setSelection(mn(x.firstLine(),0),mn(x.lastLine()),Tt)}function eo(x,z,oe){var ie={canceled:!1,from:z.from,to:z.to,text:z.text,origin:z.origin,cancel:function(){return ie.canceled=!0}};return oe&&(ie.update=function(pe,Pe,qe,ct){pe&&(ie.from=yr(x,pe)),Pe&&(ie.to=yr(x,Pe)),qe&&(ie.text=qe),ct!==void 0&&(ie.origin=ct)}),Yn(x,"beforeChange",x,ie),x.cm&&Yn(x.cm,"beforeChange",x.cm,ie),ie.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:ie.from,to:ie.to,text:ie.text,origin:ie.origin}}function so(x,z,oe){if(x.cm){if(!x.cm.curOp)return Bt(x.cm,so)(x,z,oe);if(x.cm.state.suppressEdits)return}if(!((Pn(x,"beforeChange")||x.cm&&Pn(x.cm,"beforeChange"))&&(z=eo(x,z,!0),!z))){var ie=Ia&&!oe&&_o(x,z.from,z.to);if(ie)for(var pe=ie.length-1;pe>=0;--pe)no(x,{from:ie[pe].from,to:ie[pe].to,text:pe?[""]:z.text,origin:z.origin});else no(x,z)}}function no(x,z){if(!(z.text.length==1&&z.text[0]==""&&$n(z.from,z.to)==0)){var oe=as(x,z);Ve(x,z,oe,x.cm?x.cm.curOp.id:NaN),Go(x,z,oe,Xi(x,z));var ie=[];Bo(x,function(pe,Pe){!Pe&&jt(ie,pe.history)==-1&&(Ha(pe.history,z),ie.push(pe.history)),Go(pe,z,null,Xi(pe,z))})}}function ki(x,z,oe){var ie=x.cm&&x.cm.state.suppressEdits;if(!(ie&&!oe)){for(var pe=x.history,Pe,qe=x.sel,ct=z=="undo"?pe.done:pe.undone,ht=z=="undo"?pe.undone:pe.done,Et=0;Et<ct.length&&(Pe=ct[Et],!(oe?Pe.ranges&&!Pe.equals(x.sel):!Pe.ranges));Et++);if(Et!=ct.length){for(pe.lastOrigin=pe.lastSelOrigin=null;;)if(Pe=ct.pop(),Pe.ranges){if(Rt(Pe,ht),oe&&!Pe.equals(x.sel)){Zr(x,Pe,{clearRedo:!1});return}qe=Pe}else if(ie){ct.push(Pe);return}else break;var cn=[];Rt(qe,ht),ht.push({changes:cn,generation:pe.generation}),pe.generation=Pe.generation||++pe.maxGeneration;for(var En=Pn(x,"beforeChange")||x.cm&&Pn(x.cm,"beforeChange"),ur=function(oi){var Oi=Pe.changes[oi];if(Oi.origin=z,En&&!eo(x,Oi,!1))return ct.length=0,{};cn.push(oc(x,Oi));var ro=oi?as(x,Oi):Mn(ct);Go(x,Oi,ro,Ln(x,Oi)),!oi&&x.cm&&x.cm.scrollIntoView({from:Oi.from,to:Sa(Oi)});var yo=[];Bo(x,function(Gi,xo){!xo&&jt(yo,Gi.history)==-1&&(Ha(Gi.history,Oi),yo.push(Gi.history)),Go(Gi,Oi,null,Ln(Gi,Oi))})},Jn=Pe.changes.length-1;Jn>=0;--Jn){var Hr=ur(Jn);if(Hr)return Hr.v}}}}function co(x,z){if(z!=0&&(x.first+=z,x.sel=new Yi(Wn(x.sel.ranges,function(pe){return new oa(mn(pe.anchor.line+z,pe.anchor.ch),mn(pe.head.line+z,pe.head.ch))}),x.sel.primIndex),x.cm)){Co(x.cm,x.first,x.first-z,z);for(var oe=x.cm.display,ie=oe.viewFrom;ie<oe.viewTo;ie++)Qo(x.cm,ie,"gutter")}}function Go(x,z,oe,ie){if(x.cm&&!x.cm.curOp)return Bt(x.cm,Go)(x,z,oe,ie);if(z.to.line<x.first){co(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 pe=z.text.length-1-(x.first-z.from.line);co(x,pe),z={from:mn(x.first,0),to:mn(z.to.line+pe,z.to.ch),text:[Mn(z.text)],origin:z.origin}}var Pe=x.lastLine();z.to.line>Pe&&(z={from:z.from,to:mn(Pe,an(x,Pe).text.length),text:[z.text[0]],origin:z.origin}),z.removed=Rn(x,z.from,z.to),oe||(oe=as(x,z)),x.cm?$a(x.cm,z,ie):Kc(x,z,ie),Ei(x,oe,Tt),x.cantEdit&&po(x,mn(x.firstLine(),0))&&(x.cantEdit=!1)}}function $a(x,z,oe){var ie=x.doc,pe=x.display,Pe=z.from,qe=z.to,ct=!1,ht=Pe.line;x.options.lineWrapping||(ht=cr(kt(an(ie,Pe.line))),ie.iter(ht,qe.line+1,function(Jn){if(Jn==pe.maxLine)return ct=!0,!0})),ie.sel.contains(z.from,z.to)>-1&&ti(x),Kc(ie,z,oe,ul(x)),x.options.lineWrapping||(ie.iter(ht,Pe.line+z.text.length,function(Jn){var Hr=Dn(Jn);Hr>pe.maxLineLength&&(pe.maxLine=Jn,pe.maxLineLength=Hr,pe.maxLineChanged=!0,ct=!1)}),ct&&(x.curOp.updateMaxLine=!0)),Wa(ie,Pe.line),jr(x,400);var Et=z.text.length-(qe.line-Pe.line)-1;z.full?Co(x):Pe.line==qe.line&&z.text.length==1&&!_c(x.doc,z)?Qo(x,Pe.line,"text"):Co(x,Pe.line,qe.line+1,Et);var cn=Pn(x,"changes"),En=Pn(x,"change");if(En||cn){var ur={from:Pe,to:qe,text:z.text,removed:z.removed,origin:z.origin};En&&sr(x,"change",x,ur),cn&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(ur)}x.display.selForContextMenu=null}function ha(x,z,oe,ie,pe){var Pe;ie||(ie=oe),$n(ie,oe)<0&&(Pe=[ie,oe],oe=Pe[0],ie=Pe[1]),typeof z=="string"&&(z=x.splitLines(z)),so(x,{from:oe,to:ie,text:z,origin:pe})}function Yo(x,z,oe,ie){oe<x.line?x.line+=ie:z<x.line&&(x.line=z,x.ch=0)}function Ua(x,z,oe,ie){for(var pe=0;pe<x.length;++pe){var Pe=x[pe],qe=!0;if(Pe.ranges){Pe.copied||(Pe=x[pe]=Pe.deepCopy(),Pe.copied=!0);for(var ct=0;ct<Pe.ranges.length;ct++)Yo(Pe.ranges[ct].anchor,z,oe,ie),Yo(Pe.ranges[ct].head,z,oe,ie);continue}for(var ht=0;ht<Pe.changes.length;++ht){var Et=Pe.changes[ht];if(oe<Et.from.line)Et.from=mn(Et.from.line+ie,Et.from.ch),Et.to=mn(Et.to.line+ie,Et.to.ch);else if(z<=Et.to.line){qe=!1;break}}qe||(x.splice(0,pe+1),pe=0)}}function Ha(x,z){var oe=z.from.line,ie=z.to.line,pe=z.text.length-(ie-oe)-1;Ua(x.done,oe,ie,pe),Ua(x.undone,oe,ie,pe)}function Ms(x,z,oe,ie){var pe=z,Pe=z;return typeof z=="number"?Pe=an(x,Ni(x,z)):pe=cr(z),pe==null?null:(ie(Pe,pe)&&x.cm&&Qo(x.cm,pe,oe),Pe)}function Ga(x){this.lines=x,this.parent=null;for(var z=0,oe=0;oe<x.length;++oe)x[oe].parent=this,z+=x[oe].height;this.height=z}Ga.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var oe=x,ie=x+z;oe<ie;++oe){var pe=this.lines[oe];this.height-=pe.height,er(pe),sr(pe,"delete")}this.lines.splice(x,z)},collapse:function(x){x.push.apply(x,this.lines)},insertInner:function(x,z,oe){this.height+=oe,this.lines=this.lines.slice(0,x).concat(z).concat(this.lines.slice(x));for(var ie=0;ie<z.length;++ie)z[ie].parent=this},iterN:function(x,z,oe){for(var ie=x+z;x<ie;++x)if(oe(this.lines[x]))return!0}};function js(x){this.children=x;for(var z=0,oe=0,ie=0;ie<x.length;++ie){var pe=x[ie];z+=pe.chunkSize(),oe+=pe.height,pe.parent=this}this.size=z,this.height=oe,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(x,z){this.size-=z;for(var oe=0;oe<this.children.length;++oe){var ie=this.children[oe],pe=ie.chunkSize();if(x<pe){var Pe=Math.min(z,pe-x),qe=ie.height;if(ie.removeInner(x,Pe),this.height-=qe-ie.height,pe==Pe&&(this.children.splice(oe--,1),ie.parent=null),(z-=Pe)==0)break;x=0}else x-=pe}if(this.size-z<25&&(this.children.length>1||!(this.children[0]instanceof Ga))){var ct=[];this.collapse(ct),this.children=[new Ga(ct)],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,oe){this.size+=z.length,this.height+=oe;for(var ie=0;ie<this.children.length;++ie){var pe=this.children[ie],Pe=pe.chunkSize();if(x<=Pe){if(pe.insertInner(x,z,oe),pe.lines&&pe.lines.length>50){for(var qe=pe.lines.length%25+25,ct=qe;ct<pe.lines.length;){var ht=new Ga(pe.lines.slice(ct,ct+=25));pe.height-=ht.height,this.children.splice(++ie,0,ht),ht.parent=this}pe.lines=pe.lines.slice(0,qe),this.maybeSpill()}break}x-=Pe}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),oe=new js(z);if(x.parent){x.size-=oe.size,x.height-=oe.height;var pe=jt(x.parent.children,x);x.parent.children.splice(pe+1,0,oe)}else{var ie=new js(x.children);ie.parent=x,x.children=[ie,oe],x=ie}oe.parent=x.parent}while(x.children.length>10);x.parent.maybeSpill()}},iterN:function(x,z,oe){for(var ie=0;ie<this.children.length;++ie){var pe=this.children[ie],Pe=pe.chunkSize();if(x<Pe){var qe=Math.min(z,Pe-x);if(pe.iterN(x,qe,oe))return!0;if((z-=qe)==0)break;x=0}else x-=Pe}}};var Ks=function(x,z,oe){if(oe)for(var ie in oe)oe.hasOwnProperty(ie)&&(this[ie]=oe[ie]);this.doc=x,this.node=z};Ks.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,oe=this.line,ie=cr(oe);if(!(ie==null||!z)){for(var pe=0;pe<z.length;++pe)z[pe]==this&&z.splice(pe--,1);z.length||(oe.widgets=null);var Pe=Pi(this);or(oe,Math.max(0,oe.height-Pe)),x&&(mt(x,function(){ka(x,oe,-Pe),Qo(x,ie,"widget")}),sr(x,"lineWidgetCleared",x,this,ie))}},Ks.prototype.changed=function(){var x=this,z=this.height,oe=this.doc.cm,ie=this.line;this.height=null;var pe=Pi(this)-z;pe&&(qn(this.doc,ie)||or(ie,ie.height+pe),oe&&mt(oe,function(){oe.curOp.forceUpdate=!0,ka(oe,ie,pe),sr(oe,"lineWidgetChanged",oe,x,cr(ie))}))},Or(Ks);function ka(x,z,oe){An(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&Ql(x,oe)}function ml(x,z,oe,ie){var pe=new Ks(x,oe,ie),Pe=x.cm;return Pe&&pe.noHScroll&&(Pe.display.alignWidgets=!0),Ms(x,z,"widget",function(qe){var ct=qe.widgets||(qe.widgets=[]);if(pe.insertAt==null?ct.push(pe):ct.splice(Math.min(ct.length-1,Math.max(0,pe.insertAt)),0,pe),pe.line=qe,Pe&&!qn(x,qe)){var ht=An(qe)<x.scrollTop;or(qe,qe.height+Pi(pe)),ht&&Ql(Pe,pe.height),Pe.curOp.forceUpdate=!0}return!0}),Pe&&sr(Pe,"lineWidgetAdded",Pe,pe,typeof z=="number"?z:cr(z)),pe}var hs=0,ks=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++hs};ks.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Mc(x),Pn(this,"clear")){var oe=this.find();oe&&sr(this,"clear",oe.from,oe.to)}for(var ie=null,pe=null,Pe=0;Pe<this.lines.length;++Pe){var qe=this.lines[Pe],ct=lr(qe.markedSpans,this);x&&!this.collapsed?Qo(x,cr(qe),"text"):x&&(ct.to!=null&&(pe=cr(qe)),ct.from!=null&&(ie=cr(qe))),qe.markedSpans=Cr(qe.markedSpans,ct),ct.from==null&&this.collapsed&&!qn(this.doc,qe)&&x&&or(qe,gs(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var ht=0;ht<this.lines.length;++ht){var Et=kt(this.lines[ht]),cn=Dn(Et);cn>x.display.maxLineLength&&(x.display.maxLine=Et,x.display.maxLineLength=cn,x.display.maxLineChanged=!0)}ie!=null&&x&&this.collapsed&&Co(x,ie,pe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&$i(x.doc)),x&&sr(x,"markerCleared",x,this,ie,pe),z&&Lc(x),this.parent&&this.parent.clear()}},ks.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var oe,ie,pe=0;pe<this.lines.length;++pe){var Pe=this.lines[pe],qe=lr(Pe.markedSpans,this);if(qe.from!=null&&(oe=mn(z?Pe:cr(Pe),qe.from),x==-1))return oe;if(qe.to!=null&&(ie=mn(z?Pe:cr(Pe),qe.to),x==1))return ie}return oe&&{from:oe,to:ie}},ks.prototype.changed=function(){var x=this,z=this.find(-1,!0),oe=this,ie=this.doc.cm;!z||!ie||mt(ie,function(){var pe=z.line,Pe=cr(z.line),qe=go(ie,Pe);if(qe&&(Ro(qe),ie.curOp.selectionChanged=ie.curOp.forceUpdate=!0),ie.curOp.updateMaxLine=!0,!qn(oe.doc,pe)&&oe.height!=null){var ct=oe.height;oe.height=null;var ht=Pi(oe)-ct;ht&&or(pe,pe.height+ht)}sr(ie,"markerChanged",ie,x)})},ks.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||jt(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},ks.prototype.detachLine=function(x){if(this.lines.splice(jt(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},Or(ks);function xs(x,z,oe,ie,pe){if(ie&&ie.shared)return Vi(x,z,oe,ie,pe);if(x.cm&&!x.cm.curOp)return Bt(x.cm,xs)(x,z,oe,ie,pe);var Pe=new ks(x,pe),qe=$n(z,oe);if(ie&&Ut(ie,Pe,!1),qe>0||qe==0&&Pe.clearWhenEmpty!==!1)return Pe;if(Pe.replacedWith&&(Pe.collapsed=!0,Pe.widgetNode=dt("span",[Pe.replacedWith],"CodeMirror-widget"),ie.handleMouseEvents||Pe.widgetNode.setAttribute("cm-ignore-events","true"),ie.insertLeft&&(Pe.widgetNode.insertLeft=!0)),Pe.collapsed){if(yt(x,z.line,z,oe,Pe)||z.line!=oe.line&&yt(x,oe.line,z,oe,Pe))throw new Error("Inserting collapsed marker partially overlapping an existing one");sn()}Pe.addToHistory&&Ve(x,{from:z,to:oe,origin:"markText"},x.sel,NaN);var ct=z.line,ht=x.cm,Et;if(x.iter(ct,oe.line+1,function(En){ht&&Pe.collapsed&&!ht.options.lineWrapping&&kt(En)==ht.display.maxLine&&(Et=!0),Pe.collapsed&&ct!=z.line&&or(En,0),vi(En,new Hn(Pe,ct==z.line?z.ch:null,ct==oe.line?oe.ch:null)),++ct}),Pe.collapsed&&x.iter(z.line,oe.line+1,function(En){qn(x,En)&&or(En,0)}),Pe.clearOnEnter&&bn(Pe,"beforeCursorEnter",function(){return Pe.clear()}),Pe.readOnly&&(pn(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),Pe.collapsed&&(Pe.id=++hs,Pe.atomic=!0),ht){if(Et&&(ht.curOp.updateMaxLine=!0),Pe.collapsed)Co(ht,z.line,oe.line+1);else if(Pe.className||Pe.startStyle||Pe.endStyle||Pe.css||Pe.attributes||Pe.title)for(var cn=z.line;cn<=oe.line;cn++)Qo(ht,cn,"text");Pe.atomic&&$i(ht.doc),sr(ht,"markerAdded",ht,Pe)}return Pe}var ga=function(x,z){this.markers=x,this.primary=z;for(var oe=0;oe<x.length;++oe)x[oe].parent=this};ga.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();sr(this,"clear")}},ga.prototype.find=function(x,z){return this.primary.find(x,z)},Or(ga);function Vi(x,z,oe,ie,pe){ie=Ut(ie),ie.shared=!1;var Pe=[xs(x,z,oe,ie,pe)],qe=Pe[0],ct=ie.widgetNode;return Bo(x,function(ht){ct&&(ie.widgetNode=ct.cloneNode(!0)),Pe.push(xs(ht,yr(ht,z),yr(ht,oe),ie,pe));for(var Et=0;Et<ht.linked.length;++Et)if(ht.linked[Et].isParent)return;qe=Mn(Pe)}),new ga(Pe,qe)}function Oo(x){return x.findMarks(mn(x.first,0),x.clipPos(mn(x.lastLine())),function(z){return z.parent})}function Xo(x,z){for(var oe=0;oe<z.length;oe++){var ie=z[oe],pe=ie.find(),Pe=x.clipPos(pe.from),qe=x.clipPos(pe.to);if($n(Pe,qe)){var ct=xs(x,Pe,qe,ie.primary,ie.primary.type);ie.markers.push(ct),ct.parent=ie}}}function lo(x){for(var z=function(ie){var pe=x[ie],Pe=[pe.primary.doc];Bo(pe.primary.doc,function(ht){return Pe.push(ht)});for(var qe=0;qe<pe.markers.length;qe++){var ct=pe.markers[qe];jt(Pe,ct.doc)==-1&&(ct.parent=null,pe.markers.splice(qe--,1))}},oe=0;oe<x.length;oe++)z(oe)}var ps=0,Wi=function(x,z,oe,ie,pe){if(!(this instanceof Wi))return new Wi(x,z,oe,ie,pe);oe==null&&(oe=0),js.call(this,[new Ga([new Un("",null)])]),this.first=oe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=oe;var Pe=mn(oe,0);this.sel=uo(Pe),this.history=new Kl(null),this.id=++ps,this.modeOption=z,this.lineSep=ie,this.direction=pe=="rtl"?"rtl":"ltr",this.extend=!1,typeof x=="string"&&(x=this.splitLines(x)),Kc(this,{from:Pe,to:Pe,text:x}),Zr(this,uo(Pe),Tt)};Wi.prototype=Oe(js.prototype,{constructor:Wi,iter:function(x,z,oe){oe?this.iterN(x-this.first,z-x,oe):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var oe=0,ie=0;ie<z.length;++ie)oe+=z[ie].height;this.insertInner(x-this.first,z,oe)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=mr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:di(function(x){var z=mn(this.first,0),oe=this.first+this.size-1;so(this,{from:z,to:mn(oe,an(this,oe).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ec(this.cm,0,0),Zr(this,uo(z),Tt)}),replaceRange:function(x,z,oe,ie){z=yr(this,z),oe=oe?yr(this,oe):z,ha(this,x,z,oe,ie)},getRange:function(x,z,oe){var ie=Rn(this,yr(this,x),yr(this,z));return oe===!1?ie:ie.join(oe||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(br(this,x))return an(this,x)},getLineNumber:function(x){return cr(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=an(this,x)),kt(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return yr(this,x)},getCursor:function(x){var z=this.sel.primary(),oe;return x==null||x=="head"?oe=z.head:x=="anchor"?oe=z.anchor:x=="end"||x=="to"||x===!1?oe=z.to():oe=z.from(),oe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:di(function(x,z,oe){Dr(this,yr(this,typeof x=="number"?mn(x,z||0):x),null,oe)}),setSelection:di(function(x,z,oe){Dr(this,yr(this,x),yr(this,z||x),oe)}),extendSelection:di(function(x,z,oe){hr(this,yr(this,x),z&&yr(this,z),oe)}),extendSelections:di(function(x,z){Sn(this,ar(this,x),z)}),extendSelectionsBy:di(function(x,z){var oe=Wn(this.sel.ranges,x);Sn(this,ar(this,oe),z)}),setSelections:di(function(x,z,oe){if(x.length){for(var ie=[],pe=0;pe<x.length;pe++)ie[pe]=new oa(yr(this,x[pe].anchor),yr(this,x[pe].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),Zr(this,Na(this.cm,ie,z),oe)}}),addSelection:di(function(x,z,oe){var ie=this.sel.ranges.slice(0);ie.push(new oa(yr(this,x),yr(this,z||x))),Zr(this,Na(this.cm,ie,ie.length-1),oe)}),getSelection:function(x){for(var z=this.sel.ranges,oe,ie=0;ie<z.length;ie++){var pe=Rn(this,z[ie].from(),z[ie].to());oe=oe?oe.concat(pe):pe}return x===!1?oe:oe.join(x||this.lineSeparator())},getSelections:function(x){for(var z=[],oe=this.sel.ranges,ie=0;ie<oe.length;ie++){var pe=Rn(this,oe[ie].from(),oe[ie].to());x!==!1&&(pe=pe.join(x||this.lineSeparator())),z[ie]=pe}return z},replaceSelection:function(x,z,oe){for(var ie=[],pe=0;pe<this.sel.ranges.length;pe++)ie[pe]=x;this.replaceSelections(ie,z,oe||"+input")},replaceSelections:di(function(x,z,oe){for(var ie=[],pe=this.sel,Pe=0;Pe<pe.ranges.length;Pe++){var qe=pe.ranges[Pe];ie[Pe]={from:qe.from(),to:qe.to(),text:this.splitLines(x[Pe]),origin:oe}}for(var ct=z&&z!="end"&&jc(this,ie,z),ht=ie.length-1;ht>=0;ht--)so(this,ie[ht]);ct?ei(this,ct):this.cm&&Al(this.cm)}),undo:di(function(){ki(this,"undo")}),redo:di(function(){ki(this,"redo")}),undoSelection:di(function(){ki(this,"undo",!0)}),redoSelection:di(function(){ki(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,oe=0,ie=0;ie<x.done.length;ie++)x.done[ie].ranges||++z;for(var pe=0;pe<x.undone.length;pe++)x.undone[pe].ranges||++oe;return{undo:z,redo:oe}},clearHistory:function(){var x=this;this.history=new Kl(this.history.maxGeneration),Bo(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:_n(this.history.done),undone:_n(this.history.undone)}},setHistory:function(x){var z=this.history=new Kl(this.history.maxGeneration);z.done=_n(x.done.slice(0),null,!0),z.undone=_n(x.undone.slice(0),null,!0)},setGutterMarker:di(function(x,z,oe){return Ms(this,x,"gutter",function(ie){var pe=ie.gutterMarkers||(ie.gutterMarkers={});return pe[z]=oe,!oe&&we(pe)&&(ie.gutterMarkers=null),!0})}),clearGutter:di(function(x){var z=this;this.iter(function(oe){oe.gutterMarkers&&oe.gutterMarkers[x]&&Ms(z,oe,"gutter",function(){return oe.gutterMarkers[x]=null,we(oe.gutterMarkers)&&(oe.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!br(this,x)||(z=x,x=an(this,x),!x))return null}else if(z=cr(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:di(function(x,z,oe){return Ms(this,x,z=="gutter"?"gutter":"class",function(ie){var pe=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass";if(!ie[pe])ie[pe]=oe;else{if(be(oe).test(ie[pe]))return!1;ie[pe]+=" "+oe}return!0})}),removeLineClass:di(function(x,z,oe){return Ms(this,x,z=="gutter"?"gutter":"class",function(ie){var pe=z=="text"?"textClass":z=="background"?"bgClass":z=="gutter"?"gutterClass":"wrapClass",Pe=ie[pe];if(Pe)if(oe==null)ie[pe]=null;else{var qe=Pe.match(be(oe));if(!qe)return!1;var ct=qe.index+qe[0].length;ie[pe]=Pe.slice(0,qe.index)+(!qe.index||ct==Pe.length?"":" ")+Pe.slice(ct)||null}else return!1;return!0})}),addLineWidget:di(function(x,z,oe){return ml(this,x,z,oe)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,oe){return xs(this,yr(this,x),yr(this,z),oe,oe&&oe.type||"range")},setBookmark:function(x,z){var oe={replacedWith:z&&(z.nodeType==null?z.widget:z),insertLeft:z&&z.insertLeft,clearWhenEmpty:!1,shared:z&&z.shared,handleMouseEvents:z&&z.handleMouseEvents};return x=yr(this,x),xs(this,x,x,oe,"bookmark")},findMarksAt:function(x){x=yr(this,x);var z=[],oe=an(this,x.line).markedSpans;if(oe)for(var ie=0;ie<oe.length;++ie){var pe=oe[ie];(pe.from==null||pe.from<=x.ch)&&(pe.to==null||pe.to>=x.ch)&&z.push(pe.marker.parent||pe.marker)}return z},findMarks:function(x,z,oe){x=yr(this,x),z=yr(this,z);var ie=[],pe=x.line;return this.iter(x.line,z.line+1,function(Pe){var qe=Pe.markedSpans;if(qe)for(var ct=0;ct<qe.length;ct++){var ht=qe[ct];!(ht.to!=null&&pe==x.line&&x.ch>=ht.to||ht.from==null&&pe!=x.line||ht.from!=null&&pe==z.line&&ht.from>=z.ch)&&(!oe||oe(ht.marker))&&ie.push(ht.marker.parent||ht.marker)}++pe}),ie},getAllMarks:function(){var x=[];return this.iter(function(z){var oe=z.markedSpans;if(oe)for(var ie=0;ie<oe.length;++ie)oe[ie].from!=null&&x.push(oe[ie].marker)}),x},posFromIndex:function(x){var z,oe=this.first,ie=this.lineSeparator().length;return this.iter(function(pe){var Pe=pe.text.length+ie;if(Pe>x)return z=x,!0;x-=Pe,++oe}),yr(this,mn(oe,z))},indexFromPos:function(x){x=yr(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var oe=this.lineSeparator().length;return this.iter(this.first,x.line,function(ie){z+=ie.text.length+oe}),z},copy:function(x){var z=new Wi(mr(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,oe=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<oe&&(oe=x.to);var ie=new Wi(mr(this,z,oe),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(ie.history=this.history),(this.linked||(this.linked=[])).push({doc:ie,sharedHist:x.sharedHist}),ie.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],Xo(ie,Oo(this)),ie},unlinkDoc:function(x){if(x instanceof Aa&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var oe=this.linked[z];if(oe.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),lo(Oo(this));break}}if(x.history==this.history){var ie=[x.id];Bo(x,function(pe){return ie.push(pe.id)},!0),x.history=new Kl(null),x.history.done=_n(this.history.done,ie),x.history.undone=_n(this.history.undone,ie)}},iterLinkedDocs:function(x){Bo(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):rn(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:di(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&Pc(this.cm))})}),Wi.prototype.eachLine=Wi.prototype.iter;var xa=0;function ds(x){var z=this;if(vl(z),!(pr(z,x)||Mi(z.display,x))){Br(x),ce&&(xa=+new Date);var oe=es(z,x,!0),ie=x.dataTransfer.files;if(!(!oe||z.isReadOnly()))if(ie&&ie.length&&window.FileReader&&window.File)for(var pe=ie.length,Pe=Array(pe),qe=0,ct=function(){++qe==pe&&Bt(z,function(){oe=yr(z.doc,oe);var Jn={from:oe,to:oe,text:z.doc.splitLines(Pe.filter(function(Hr){return Hr!=null}).join(z.doc.lineSeparator())),origin:"paste"};so(z.doc,Jn),ei(z.doc,uo(yr(z.doc,oe),yr(z.doc,Sa(Jn))))})()},ht=function(Jn,Hr){if(z.options.allowDropFileTypes&&jt(z.options.allowDropFileTypes,Jn.type)==-1){ct();return}var oi=new FileReader;oi.onerror=function(){return ct()},oi.onload=function(){var Oi=oi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Oi)){ct();return}Pe[Hr]=Oi,ct()},oi.readAsText(Jn)},Et=0;Et<ie.length;Et++)ht(ie[Et],Et);else{if(z.state.draggingText&&z.doc.sel.contains(oe)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var cn=x.dataTransfer.getData("Text");if(cn){var En;if(z.state.draggingText&&!z.state.draggingText.copy&&(En=z.listSelections()),Ei(z.doc,uo(oe,oe)),En)for(var ur=0;ur<En.length;++ur)ha(z.doc,"",En[ur].anchor,En[ur].head,"drag");z.replaceSelection(cn,"around","paste"),z.display.input.focus()}}catch(Jn){}}}}function ss(x,z){if(ce&&(!x.state.draggingText||+new Date-xa<100)){ci(z);return}if(!(pr(x,z)||Mi(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!he)){var oe=Ye("img",null,null,"position: fixed; left: 0; top: 0;");oe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(oe.width=oe.height=1,x.display.wrapper.appendChild(oe),oe._top=oe.offsetTop),z.dataTransfer.setDragImage(oe,0,0),de&&oe.parentNode.removeChild(oe)}}function Yl(x,z){var oe=es(x,z);if(oe){var ie=document.createDocumentFragment();ya(x,oe,ie),x.display.dragCursor||(x.display.dragCursor=Ye("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),et(x.display.dragCursor,ie)}}function vl(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function cc(x){if(document.getElementsByClassName){for(var z=document.getElementsByClassName("CodeMirror"),oe=[],ie=0;ie<z.length;ie++){var pe=z[ie].CodeMirror;pe&&oe.push(pe)}oe.length&&oe[0].operation(function(){for(var Pe=0;Pe<oe.length;Pe++)x(oe[Pe])})}}var Xr=!1;function wc(){Xr||(sl(),Xr=!0)}function sl(){var x;bn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,cc(ec)},100))}),bn(window,"blur",function(){return cc(Sl)})}function ec(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var ac={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"},fs=0;fs<10;fs++)ac[fs+48]=ac[fs+96]=String(fs);for(var ys=65;ys<=90;ys++)ac[ys]=String.fromCharCode(ys);for(var Us=1;Us<=12;Us++)ac[Us+111]=ac[Us+63235]="F"+Us;var Pa={};Pa.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"},Pa.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"},Pa.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"},Pa.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"]},Pa.default=ve?Pa.macDefault:Pa.pcDefault;function Ml(x){var z=x.split(/-(?!$)/);x=z[z.length-1];for(var oe,ie,pe,Pe,qe=0;qe<z.length-1;qe++){var ct=z[qe];if(/^(cmd|meta|m)$/i.test(ct))Pe=!0;else if(/^a(lt)?$/i.test(ct))oe=!0;else if(/^(c|ctrl|control)$/i.test(ct))ie=!0;else if(/^s(hift)?$/i.test(ct))pe=!0;else throw new Error("Unrecognized modifier name: "+ct)}return oe&&(x="Alt-"+x),ie&&(x="Ctrl-"+x),Pe&&(x="Cmd-"+x),pe&&(x="Shift-"+x),x}function Ya(x){var z={};for(var oe in x)if(x.hasOwnProperty(oe)){var ie=x[oe];if(/^(name|fallthrough|(de|at)tach)$/.test(oe))continue;if(ie=="..."){delete x[oe];continue}for(var pe=Wn(oe.split(" "),Ml),Pe=0;Pe<pe.length;Pe++){var qe=void 0,ct=void 0;Pe==pe.length-1?(ct=pe.join(" "),qe=ie):(ct=pe.slice(0,Pe+1).join(" "),qe="...");var ht=z[ct];if(!ht)z[ct]=qe;else if(ht!=qe)throw new Error("Inconsistent bindings for "+ct)}delete x[oe]}for(var Et in z)x[Et]=z[Et];return x}function gl(x,z,oe,ie){z=ll(z);var pe=z.call?z.call(x,ie):z[x];if(pe===!1)return"nothing";if(pe==="...")return"multi";if(pe!=null&&oe(pe))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return gl(x,z.fallthrough,oe,ie);for(var Pe=0;Pe<z.fallthrough.length;Pe++){var qe=gl(x,z.fallthrough[Pe],oe,ie);if(qe)return qe}}}function Dl(x){var z=typeof x=="string"?x:ac[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function Il(x,z,oe){var ie=x;return z.altKey&&ie!="Alt"&&(x="Alt-"+x),(ze?z.metaKey:z.ctrlKey)&&ie!="Ctrl"&&(x="Ctrl-"+x),(ze?z.ctrlKey:z.metaKey)&&ie!="Mod"&&(x="Cmd-"+x),!oe&&z.shiftKey&&ie!="Shift"&&(x="Shift-"+x),x}function uc(x,z){if(de&&x.keyCode==34&&x.char)return!1;var oe=ac[x.keyCode];return oe==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(oe=x.code),Il(oe,x,z))}function ll(x){return typeof x=="string"?Pa[x]:x}function dc(x,z){for(var oe=x.doc.sel.ranges,ie=[],pe=0;pe<oe.length;pe++){for(var Pe=z(oe[pe]);ie.length&&$n(Pe.from,Mn(ie).to)<=0;){var qe=ie.pop();if($n(qe.from,Pe.from)<0){Pe.from=qe.from;break}}ie.push(Pe)}mt(x,function(){for(var ct=ie.length-1;ct>=0;ct--)ha(x.doc,"",ie[ct].from,ie[ct].to,"+delete");Al(x)})}function cl(x,z,oe){var ie=Ct(x.text,z+oe,oe);return ie<0||ie>x.text.length?null:ie}function Rl(x,z,oe){var ie=cl(x,z.ch,oe);return ie==null?null:new mn(z.line,ie,oe<0?"after":"before")}function Ol(x,z,oe,ie,pe){if(x){z.doc.direction=="rtl"&&(pe=-pe);var Pe=Xt(oe,z.doc.direction);if(Pe){var qe=pe<0?Mn(Pe):Pe[0],ct=pe<0==(qe.level==1),ht=ct?"after":"before",Et;if(qe.level>0||z.doc.direction=="rtl"){var cn=Zi(z,oe);Et=pe<0?oe.text.length-1:0;var En=Ii(z,cn,Et).top;Et=$t(function(ur){return Ii(z,cn,ur).top==En},pe<0==(qe.level==1)?qe.from:qe.to-1,Et),ht=="before"&&(Et=cl(oe,Et,1))}else Et=pe<0?qe.to:qe.from;return new mn(ie,Et,ht)}}return new mn(ie,pe<0?oe.text.length:0,pe<0?"before":"after")}function dl(x,z,oe,ie){var pe=Xt(z,x.doc.direction);if(!pe)return Rl(z,oe,ie);oe.ch>=z.text.length?(oe.ch=z.text.length,oe.sticky="before"):oe.ch<=0&&(oe.ch=0,oe.sticky="after");var Pe=on(pe,oe.ch,oe.sticky),qe=pe[Pe];if(x.doc.direction=="ltr"&&qe.level%2==0&&(ie>0?qe.to>oe.ch:qe.from<oe.ch))return Rl(z,oe,ie);var ct=function(ro,yo){return cl(z,ro instanceof mn?ro.ch:ro,yo)},ht,Et=function(ro){return x.options.lineWrapping?(ht=ht||Zi(x,z),Qa(x,z,ht,ro)):{begin:0,end:z.text.length}},cn=Et(oe.sticky=="before"?ct(oe,-1):oe.ch);if(x.doc.direction=="rtl"||qe.level==1){var En=qe.level==1==ie<0,ur=ct(oe,En?1:-1);if(ur!=null&&(En?ur<=qe.to&&ur<=cn.end:ur>=qe.from&&ur>=cn.begin)){var Jn=En?"before":"after";return new mn(oe.line,ur,Jn)}}var Hr=function(ro,yo,Gi){for(var xo=function(el,lc){return lc?new mn(oe.line,ct(el,1),"before"):new mn(oe.line,el,"after")};ro>=0&&ro<pe.length;ro+=yo){var sa=pe[ro],fa=yo>0==(sa.level!=1),us=fa?Gi.begin:ct(Gi.end,-1);if(sa.from<=us&&us<sa.to||(us=fa?sa.from:ct(sa.to,-1),Gi.begin<=us&&us<Gi.end))return xo(us,fa)}},oi=Hr(Pe+ie,ie,cn);if(oi)return oi;var Oi=ie>0?cn.end:ct(cn.begin,-1);return Oi!=null&&!(ie>0&&Oi==z.text.length)&&(oi=Hr(ie>0?0:pe.length-1,ie,Et(Oi)),oi)?oi:null}var Js={selectAll:wa,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),Tt)},killLine:function(x){return dc(x,function(z){if(z.empty()){var oe=an(x.doc,z.head.line).text.length;return z.head.ch==oe&&z.head.line<x.lastLine()?{from:z.head,to:mn(z.head.line+1,0)}:{from:z.head,to:mn(z.head.line,oe)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return dc(x,function(z){return{from:mn(z.from().line,0),to:yr(x.doc,mn(z.to().line+1,0))}})},delLineLeft:function(x){return dc(x,function(z){return{from:mn(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return dc(x,function(z){var oe=x.charCoords(z.head,"div").top+5,ie=x.coordsChar({left:0,top:oe},"div");return{from:ie,to:z.from()}})},delWrappedLineRight:function(x){return dc(x,function(z){var oe=x.charCoords(z.head,"div").top+5,ie=x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:oe},"div");return{from:z.from(),to:ie}})},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(mn(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(mn(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return Vs(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return su(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return Bc(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var oe=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:oe},"div")},Jt)},goLineLeft:function(x){return x.extendSelectionsBy(function(z){var oe=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:0,top:oe},"div")},Jt)},goLineLeftSmart:function(x){return x.extendSelectionsBy(function(z){var oe=x.cursorCoords(z.head,"div").top+5,ie=x.coordsChar({left:0,top:oe},"div");return ie.ch<x.getLine(ie.line).search(/\S/)?su(x,z.head):ie},Jt)},goLineUp:function(x){return x.moveV(-1,"line")},goLineDown:function(x){return x.moveV(1,"line")},goPageUp:function(x){return x.moveV(-1,"page")},goPageDown:function(x){return x.moveV(1,"page")},goCharLeft:function(x){return x.moveH(-1,"char")},goCharRight:function(x){return x.moveH(1,"char")},goColumnLeft:function(x){return x.moveH(-1,"column")},goColumnRight:function(x){return x.moveH(1,"column")},goWordLeft:function(x){return x.moveH(-1,"word")},goGroupRight:function(x){return x.moveH(1,"group")},goGroupLeft:function(x){return x.moveH(-1,"group")},goWordRight:function(x){return x.moveH(1,"word")},delCharBefore:function(x){return x.deleteH(-1,"codepoint")},delCharAfter:function(x){return x.deleteH(1,"char")},delWordBefore:function(x){return x.deleteH(-1,"word")},delWordAfter:function(x){return x.deleteH(1,"word")},delGroupBefore:function(x){return x.deleteH(-1,"group")},delGroupAfter:function(x){return x.deleteH(1,"group")},indentAuto:function(x){return x.indentSelection("smart")},indentMore:function(x){return x.indentSelection("add")},indentLess:function(x){return x.indentSelection("subtract")},insertTab:function(x){return x.replaceSelection(" ")},insertSoftTab:function(x){for(var z=[],oe=x.listSelections(),ie=x.options.tabSize,pe=0;pe<oe.length;pe++){var Pe=oe[pe].from(),qe=nt(x.getLine(Pe.line),Pe.ch,ie);z.push(Qt(ie-qe%ie))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return mt(x,function(){for(var z=x.listSelections(),oe=[],ie=0;ie<z.length;ie++)if(z[ie].empty()){var pe=z[ie].head,Pe=an(x.doc,pe.line).text;if(Pe){if(pe.ch==Pe.length&&(pe=new mn(pe.line,pe.ch-1)),pe.ch>0)pe=new mn(pe.line,pe.ch+1),x.replaceRange(Pe.charAt(pe.ch-1)+Pe.charAt(pe.ch-2),mn(pe.line,pe.ch-2),pe,"+transpose");else if(pe.line>x.doc.first){var qe=an(x.doc,pe.line-1).text;qe&&(pe=new mn(pe.line,1),x.replaceRange(Pe.charAt(0)+x.doc.lineSeparator()+qe.charAt(qe.length-1),mn(pe.line-1,qe.length-1),pe,"+transpose"))}}oe.push(new oa(pe,pe))}x.setSelections(oe)})},newlineAndIndent:function(x){return mt(x,function(){for(var z=x.listSelections(),oe=z.length-1;oe>=0;oe--)x.replaceRange(x.doc.lineSeparator(),z[oe].anchor,z[oe].head,"+input");z=x.listSelections();for(var ie=0;ie<z.length;ie++)x.indentLine(z[ie].from().line,null,!0);Al(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function Vs(x,z){var oe=an(x.doc,z),ie=kt(oe);return ie!=oe&&(z=cr(ie)),Ol(!0,x,ie,z,1)}function Bc(x,z){var oe=an(x.doc,z),ie=At(oe);return ie!=oe&&(z=cr(ie)),Ol(!0,x,oe,z,-1)}function su(x,z){var oe=Vs(x,z.line),ie=an(x.doc,oe.line),pe=Xt(ie,x.doc.direction);if(!pe||pe[0].level==0){var Pe=Math.max(oe.ch,ie.text.search(/\S/)),qe=z.line==oe.line&&z.ch<=Pe&&z.ch;return mn(oe.line,qe?0:Pe,oe.sticky)}return oe}function Ys(x,z,oe){if(typeof z=="string"&&(z=Js[z],!z))return!1;x.display.input.ensurePolled();var ie=x.display.shift,pe=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),oe&&(x.display.shift=!1),pe=z(x)!=ln}finally{x.display.shift=ie,x.state.suppressEdits=!1}return pe}function Xl(x,z,oe){for(var ie=0;ie<x.state.keyMaps.length;ie++){var pe=gl(z,x.state.keyMaps[ie],oe,x);if(pe)return pe}return x.options.extraKeys&&gl(z,x.options.extraKeys,oe,x)||gl(z,x.options.keyMap,oe,x)}var Yu=new Ge;function lu(x,z,oe,ie){var pe=x.state.keySeq;if(pe){if(Dl(z))return"handled";if(/\'$/.test(z)?x.state.keySeq=null:Yu.set(50,function(){x.state.keySeq==pe&&(x.state.keySeq=null,x.display.input.reset())}),rs(x,pe+" "+z,oe,ie))return!0}return rs(x,z,oe,ie)}function rs(x,z,oe,ie){var pe=Xl(x,z,ie);return pe=="multi"&&(x.state.keySeq=z),pe=="handled"&&sr(x,"keyHandled",x,z,oe),(pe=="handled"||pe=="multi")&&(Br(oe),Do(x)),!!pe}function $o(x,z){var oe=uc(z,!0);return oe?z.shiftKey&&!x.state.keySeq?lu(x,"Shift-"+oe,z,function(ie){return Ys(x,ie,!0)})||lu(x,oe,z,function(ie){if(typeof ie=="string"?/^go[A-Z]/.test(ie):ie.motion)return Ys(x,ie)}):lu(x,oe,z,function(ie){return Ys(x,ie)}):!1}function _l(x,z,oe){return lu(x,"'"+oe+"'",z,function(ie){return Ys(x,ie,!0)})}var As=null;function Nl(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=pt(),!pr(z,x))){ce&&fe<11&&x.keyCode==27&&(x.returnValue=!1);var oe=x.keyCode;z.display.shift=oe==16||x.shiftKey;var ie=$o(z,x);de&&(As=ie?oe:null,!ie&&oe==88&&!dr&&(ve?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),te&&!ve&&!ie&&oe==46&&x.shiftKey&&!x.ctrlKey&&document.execCommand&&document.execCommand("cut"),oe==18&&!/\bCodeMirror-crosshair\b/.test(z.display.lineDiv.className)&&wr(z)}}function wr(x){var z=x.display.lineDiv;Kt(z,"CodeMirror-crosshair");function oe(ie){(ie.keyCode==18||!ie.altKey)&&(Re(z,"CodeMirror-crosshair"),Zn(document,"keyup",oe),Zn(document,"mouseover",oe))}bn(document,"keyup",oe),bn(document,"mouseover",oe)}function fc(x){x.keyCode==16&&(this.doc.sel.shift=!1),pr(this,x)}function Gc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Mi(z.display,x)||pr(z,x)||x.ctrlKey&&!x.altKey||ve&&x.metaKey)){var oe=x.keyCode,ie=x.charCode;if(de&&oe==As){As=null,Br(x);return}if(!(de&&(!x.which||x.which<10)&&$o(z,x))){var pe=String.fromCharCode(ie==null?oe:ie);pe!="\b"&&(_l(z,x,pe)||z.display.input.onKeyPress(x))}}}var Xu=400,ud=function(x,z,oe){this.time=x,this.pos=z,this.button=oe};ud.prototype.compare=function(x,z,oe){return this.time+Xu>x&&$n(z,this.pos)==0&&oe==this.button};var Yc,Pu;function Dd(x,z){var oe=+new Date;return Pu&&Pu.compare(oe,x,z)?(Yc=Pu=null,"triple"):Yc&&Yc.compare(oe,x,z)?(Pu=new ud(oe,x,z),Yc=null,"double"):(Yc=new ud(oe,x,z),Pu=null,"single")}function Pl(x){var z=this,oe=z.display;if(!(pr(z,x)||oe.activeTouch&&oe.input.supportsTouch())){if(oe.input.ensurePolled(),oe.shift=x.shiftKey,Mi(oe,x)){ae||(oe.scroller.draggable=!1,setTimeout(function(){return oe.scroller.draggable=!0},100));return}if(!sc(z,x)){var ie=es(z,x),pe=zr(x),Pe=ie?Dd(ie,pe):"single";window.focus(),pe==1&&z.state.selectingText&&z.state.selectingText(x),!(ie&&Dc(z,pe,ie,Pe,x))&&(pe==1?ie?qu(z,ie,Pe,x):Fr(x)==oe.scroller&&Br(x):pe==2?(ie&&hr(z.doc,ie),setTimeout(function(){return oe.input.focus()},20)):pe==3&&(Ee?z.display.input.onContextMenu(x):Ss(z)))}}}function Dc(x,z,oe,ie,pe){var Pe="Click";return ie=="double"?Pe="Double"+Pe:ie=="triple"&&(Pe="Triple"+Pe),Pe=(z==1?"Left":z==2?"Middle":"Right")+Pe,lu(x,Il(Pe,pe),pe,function(qe){if(typeof qe=="string"&&(qe=Js[qe]),!qe)return!1;var ct=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),ct=qe(x,oe)!=ln}finally{x.state.suppressEdits=!1}return ct})}function Bu(x,z,oe){var ie=x.getOption("configureMouse"),pe=ie?ie(x,z,oe):{};if(pe.unit==null){var Pe=Fe?oe.shiftKey&&oe.metaKey:oe.altKey;pe.unit=Pe?"rectangle":z=="single"?"char":z=="double"?"word":"line"}return(pe.extend==null||x.doc.extend)&&(pe.extend=x.doc.extend||oe.shiftKey),pe.addNew==null&&(pe.addNew=ve?oe.metaKey:oe.ctrlKey),pe.moveOnDrag==null&&(pe.moveOnDrag=!(ve?oe.altKey:oe.ctrlKey)),pe}function qu(x,z,oe,ie){ce?setTimeout(ft(Uo,x),0):x.curOp.focus=pt();var pe=Bu(x,oe,ie),Pe=x.doc.sel,qe;x.options.dragDrop&&Fi&&!x.isReadOnly()&&oe=="single"&&(qe=Pe.contains(z))>-1&&($n((qe=Pe.ranges[qe]).from(),z)<0||z.xRel>0)&&($n(qe.to(),z)>0||z.xRel<0)?Id(x,ie,z,pe):Ju(x,ie,z,pe)}function Id(x,z,oe,ie){var pe=x.display,Pe=!1,qe=Bt(x,function(Et){ae&&(pe.scroller.draggable=!1),x.state.draggingText=!1,Zn(pe.wrapper.ownerDocument,"mouseup",qe),Zn(pe.wrapper.ownerDocument,"mousemove",ct),Zn(pe.scroller,"dragstart",ht),Zn(pe.scroller,"drop",qe),Pe||(Br(Et),ie.addNew||hr(x.doc,oe,null,null,ie.extend),ae&&!he||ce&&fe==9?setTimeout(function(){pe.wrapper.ownerDocument.body.focus({preventScroll:!0}),pe.input.focus()},20):pe.input.focus())}),ct=function(Et){Pe=Pe||Math.abs(z.clientX-Et.clientX)+Math.abs(z.clientY-Et.clientY)>=10},ht=function(){return Pe=!0};ae&&(pe.scroller.draggable=!0),x.state.draggingText=qe,qe.copy=!ie.moveOnDrag,pe.scroller.dragDrop&&pe.scroller.dragDrop(),bn(pe.wrapper.ownerDocument,"mouseup",qe),bn(pe.wrapper.ownerDocument,"mousemove",ct),bn(pe.scroller,"dragstart",ht),bn(pe.scroller,"drop",qe),Ss(x),setTimeout(function(){return pe.input.focus()},20)}function Rd(x,z,oe){if(oe=="char")return new oa(z,z);if(oe=="word")return x.findWordAt(z);if(oe=="line")return new oa(mn(z.line,0),yr(x.doc,mn(z.line+1,0)));var ie=oe(x,z);return new oa(ie.from,ie.to)}function Ju(x,z,oe,ie){var pe=x.display,Pe=x.doc;Br(z);var qe,ct,ht=Pe.sel,Et=ht.ranges;if(ie.addNew&&!ie.extend?(ct=Pe.sel.contains(oe),ct>-1?qe=Et[ct]:qe=new oa(oe,oe)):(qe=Pe.sel.primary(),ct=Pe.sel.primIndex),ie.unit=="rectangle")ie.addNew||(qe=new oa(oe,oe)),oe=es(x,z,!0,!0),ct=-1;else{var cn=Rd(x,oe,ie.unit);ie.extend?qe=Vn(qe,cn.anchor,cn.head,ie.extend):qe=cn}ie.addNew?ct==-1?(ct=Et.length,Zr(Pe,Na(x,Et.concat([qe]),ct),{scroll:!1,origin:"*mouse"})):Et.length>1&&Et[ct].empty()&&ie.unit=="char"&&!ie.extend?(Zr(Pe,Na(x,Et.slice(0,ct).concat(Et.slice(ct+1)),0),{scroll:!1,origin:"*mouse"}),ht=Pe.sel):Er(Pe,ct,qe,Lt):(ct=0,Zr(Pe,new Yi([qe],0),Lt),ht=Pe.sel);var En=oe;function ur(Gi){if($n(En,Gi)!=0)if(En=Gi,ie.unit=="rectangle"){for(var xo=[],sa=x.options.tabSize,fa=nt(an(Pe,oe.line).text,oe.ch,sa),us=nt(an(Pe,Gi.line).text,Gi.ch,sa),el=Math.min(fa,us),lc=Math.max(fa,us),Ll=Math.min(oe.line,Gi.line),Ic=Math.min(x.lastLine(),Math.max(oe.line,Gi.line));Ll<=Ic;Ll++){var Rc=an(Pe,Ll).text,ql=kn(Rc,el,sa);el==lc?xo.push(new oa(mn(Ll,ql),mn(Ll,ql))):Rc.length>ql&&xo.push(new oa(mn(Ll,ql),mn(Ll,kn(Rc,lc,sa))))}xo.length||xo.push(new oa(oe,oe)),Zr(Pe,Na(x,ht.ranges.slice(0,ct).concat(xo),ct),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Gi)}else{var Oc=qe,ja=Rd(x,Gi,ie.unit),Bl=Oc.anchor,kl;$n(ja.anchor,Bl)>0?(kl=ja.head,Bl=hi(Oc.from(),ja.anchor)):(kl=ja.anchor,Bl=Ir(Oc.to(),ja.head));var Fl=ht.ranges.slice(0);Fl[ct]=Fu(x,new oa(yr(Pe,Bl),kl)),Zr(Pe,Na(x,Fl,ct),Lt)}}var Jn=pe.wrapper.getBoundingClientRect(),Hr=0;function oi(Gi){var xo=++Hr,sa=es(x,Gi,!0,ie.unit=="rectangle");if(sa)if($n(sa,En)!=0){x.curOp.focus=pt(),ur(sa);var fa=Xa(pe,Pe);(sa.line>=fa.to||sa.line<fa.from)&&setTimeout(Bt(x,function(){Hr==xo&&oi(Gi)}),150)}else{var us=Gi.clientY<Jn.top?-20:Gi.clientY>Jn.bottom?20:0;us&&setTimeout(Bt(x,function(){Hr==xo&&(pe.scroller.scrollTop+=us,oi(Gi))}),50)}}function Oi(Gi){x.state.selectingText=!1,Hr=1/0,Gi&&(Br(Gi),pe.input.focus()),Zn(pe.wrapper.ownerDocument,"mousemove",ro),Zn(pe.wrapper.ownerDocument,"mouseup",yo),Pe.history.lastSelOrigin=null}var ro=Bt(x,function(Gi){Gi.buttons===0||!zr(Gi)?Oi(Gi):oi(Gi)}),yo=Bt(x,Oi);x.state.selectingText=yo,bn(pe.wrapper.ownerDocument,"mousemove",ro),bn(pe.wrapper.ownerDocument,"mouseup",yo)}function Fu(x,z){var oe=z.anchor,ie=z.head,pe=an(x.doc,oe.line);if($n(oe,ie)==0&&oe.sticky==ie.sticky)return z;var Pe=Xt(pe);if(!Pe)return z;var qe=on(Pe,oe.ch,oe.sticky),ct=Pe[qe];if(ct.from!=oe.ch&&ct.to!=oe.ch)return z;var ht=qe+(ct.from==oe.ch==(ct.level!=1)?0:1);if(ht==0||ht==Pe.length)return z;var Et;if(ie.line!=oe.line)Et=(ie.line-oe.line)*(x.doc.direction=="ltr"?1:-1)>0;else{var cn=on(Pe,ie.ch,ie.sticky),En=cn-qe||(ie.ch-oe.ch)*(ct.level==1?-1:1);cn==ht-1||cn==ht?Et=En<0:Et=En>0}var ur=Pe[ht+(Et?-1:0)],Jn=Et==(ur.level==1),Hr=Jn?ur.from:ur.to,oi=Jn?"after":"before";return oe.ch==Hr&&oe.sticky==oi?z:new oa(new mn(oe.line,Hr,oi),ie)}function xu(x,z,oe,ie){var pe,Pe;if(z.touches)pe=z.touches[0].clientX,Pe=z.touches[0].clientY;else try{pe=z.clientX,Pe=z.clientY}catch(ur){return!1}if(pe>=Math.floor(x.display.gutters.getBoundingClientRect().right))return!1;ie&&Br(z);var qe=x.display,ct=qe.lineDiv.getBoundingClientRect();if(Pe>ct.bottom||!Pn(x,oe))return mi(z);Pe-=ct.top-qe.viewOffset;for(var ht=0;ht<x.display.gutterSpecs.length;++ht){var Et=qe.gutters.childNodes[ht];if(Et&&Et.getBoundingClientRect().right>=pe){var cn=Xn(x.doc,Pe),En=x.display.gutterSpecs[ht];return Yn(x,oe,x,cn,En.className,z),mi(z)}}}function sc(x,z){return xu(x,z,"gutterClick",!0)}function Qc(x,z){Mi(x.display,z)||dd(x,z)||pr(x,z,"contextmenu")||Ee||x.display.input.onContextMenu(z)}function dd(x,z){return Pn(x,"gutterContextMenu")?xu(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Qi(x)}var cu={toString:function(){return"CodeMirror.Init"}},Od={},zu={};function Qu(x){var z=x.optionHandlers;function oe(ie,pe,Pe,qe){x.defaults[ie]=pe,Pe&&(z[ie]=qe?function(ct,ht,Et){Et!=cu&&Pe(ct,ht,Et)}:Pe)}x.defineOption=oe,x.Init=cu,oe("value","",function(ie,pe){return ie.setValue(pe)},!0),oe("mode",null,function(ie,pe){ie.doc.modeOption=pe,Ac(ie)},!0),oe("indentUnit",2,Ac,!0),oe("indentWithTabs",!1),oe("smartIndent",!0),oe("tabSize",4,function(ie){Tc(ie),Qi(ie),Co(ie)},!0),oe("lineSeparator",null,function(ie,pe){if(ie.doc.lineSep=pe,!!pe){var Pe=[],qe=ie.doc.first;ie.doc.iter(function(ht){for(var Et=0;;){var cn=ht.text.indexOf(pe,Et);if(cn==-1)break;Et=cn+pe.length,Pe.push(mn(qe,cn))}qe++});for(var ct=Pe.length-1;ct>=0;ct--)ha(ie.doc,pe,Pe[ct],mn(Pe[ct].line,Pe[ct].ch+pe.length))}}),oe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ie,pe,Pe){ie.state.specialChars=new RegExp(pe.source+(pe.test(" ")?"":"| "),"g"),Pe!=cu&&ie.refresh()}),oe("specialCharPlaceholder",Xe,function(ie){return ie.refresh()},!0),oe("electricChars",!0),oe("inputStyle",Me?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),oe("spellcheck",!1,function(ie,pe){return ie.getInputField().spellcheck=pe},!0),oe("autocorrect",!1,function(ie,pe){return ie.getInputField().autocorrect=pe},!0),oe("autocapitalize",!1,function(ie,pe){return ie.getInputField().autocapitalize=pe},!0),oe("rtlMoveVisually",!$e),oe("wholeLineUpdateBefore",!0),oe("theme","default",function(ie){fd(ie),ba(ie)},!0),oe("keyMap","default",function(ie,pe,Pe){var qe=ll(pe),ct=Pe!=cu&&ll(Pe);ct&&ct.detach&&ct.detach(ie,qe),qe.attach&&qe.attach(ie,ct||null)}),oe("extraKeys",null),oe("configureMouse",null),oe("lineWrapping",!1,ed,!0),oe("gutters",[],function(ie,pe){ie.display.gutterSpecs=qa(pe,ie.options.lineNumbers),ba(ie)},!0),oe("fixedGutter",!0,function(ie,pe){ie.display.gutters.style.left=pe?hl(ie.display)+"px":"0",ie.refresh()},!0),oe("coverGutterNextToScrollbar",!1,function(ie){return ns(ie)},!0),oe("scrollbarStyle","native",function(ie){Tl(ie),ns(ie),ie.display.scrollbars.setScrollTop(ie.doc.scrollTop),ie.display.scrollbars.setScrollLeft(ie.doc.scrollLeft)},!0),oe("lineNumbers",!1,function(ie,pe){ie.display.gutterSpecs=qa(ie.options.gutters,pe),ba(ie)},!0),oe("firstLineNumber",1,ba,!0),oe("lineNumberFormatter",function(ie){return ie},ba,!0),oe("showCursorWhenSelecting",!1,rl,!0),oe("resetSelectionOnContextMenu",!0),oe("lineWiseCopyCut",!0),oe("pasteLinesPerSelection",!0),oe("selectionsMayTouch",!1),oe("readOnly",!1,function(ie,pe){pe=="nocursor"&&(Sl(ie),ie.display.input.blur()),ie.display.input.readOnlyChanged(pe)}),oe("screenReaderLabel",null,function(ie,pe){pe=pe===""?null:pe,ie.display.input.screenReaderLabelChanged(pe)}),oe("disableInput",!1,function(ie,pe){pe||ie.display.input.reset()},!0),oe("dragDrop",!0,hd),oe("allowDropFileTypes",null),oe("cursorBlinkRate",530),oe("cursorScrollMargin",0),oe("cursorHeight",1,rl,!0),oe("singleCursorHeightPerLine",!0,rl,!0),oe("workTime",100),oe("workDelay",100),oe("flattenSpans",!0,Tc,!0),oe("addModeClass",!1,Tc,!0),oe("pollInterval",100),oe("undoDepth",200,function(ie,pe){return ie.doc.history.undoDepth=pe}),oe("historyEventDelay",1250),oe("viewportMargin",10,function(ie){return ie.refresh()},!0),oe("maxHighlightLength",1e4,Tc,!0),oe("moveInputWithCursor",!0,function(ie,pe){pe||ie.display.input.resetPosition()}),oe("tabindex",null,function(ie,pe){return ie.display.input.getField().tabIndex=pe||""}),oe("autofocus",null),oe("direction","ltr",function(ie,pe){return ie.doc.setDirection(pe)},!0),oe("phrases",null)}function hd(x,z,oe){var ie=oe&&oe!=cu;if(!z!=!ie){var pe=x.display.dragFunctions,Pe=z?bn:Zn;Pe(x.display.scroller,"dragstart",pe.start),Pe(x.display.scroller,"dragenter",pe.enter),Pe(x.display.scroller,"dragover",pe.over),Pe(x.display.scroller,"dragleave",pe.leave),Pe(x.display.scroller,"drop",pe.drop)}}function ed(x){x.options.lineWrapping?(Kt(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Re(x.display.wrapper,"CodeMirror-wrap"),wn(x)),Ts(x),Co(x),Qi(x),setTimeout(function(){return ns(x)},100)}function Aa(x,z){var oe=this;if(!(this instanceof Aa))return new Aa(x,z);this.options=z=z?Ut(z):{},Ut(Od,z,!1);var ie=z.value;typeof ie=="string"?ie=new Wi(ie,z.mode,null,z.lineSeparator,z.direction):z.mode&&(ie.modeOption=z.mode),this.doc=ie;var pe=new Aa.inputStyles[z.inputStyle](this),Pe=this.display=new Ds(x,ie,pe,z);Pe.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tl(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 Ge,keySeq:null,specialChars:null},z.autofocus&&!Me&&Pe.input.focus(),ce&&fe<11&&setTimeout(function(){return oe.display.input.reset(!0)},20),Nd(this),wc(),Mc(this),this.curOp.forceUpdate=!0,Ps(this,ie),z.autofocus&&!Me||this.hasFocus()?setTimeout(function(){oe.hasFocus()&&!oe.state.focused&&ls(oe)},20):Sl(this);for(var qe in zu)zu.hasOwnProperty(qe)&&zu[qe](this,z[qe],cu);Ta(this),z.finishInit&&z.finishInit(this);for(var ct=0;ct<td.length;++ct)td[ct](this);Lc(this),ae&&z.lineWrapping&&getComputedStyle(Pe.lineDiv).textRendering=="optimizelegibility"&&(Pe.lineDiv.style.textRendering="auto")}Aa.defaults=Od,Aa.optionHandlers=zu;function Nd(x){var z=x.display;bn(z.scroller,"mousedown",Bt(x,Pl)),ce&&fe<11?bn(z.scroller,"dblclick",Bt(x,function(ht){if(!pr(x,ht)){var Et=es(x,ht);if(!(!Et||sc(x,ht)||Mi(x.display,ht))){Br(ht);var cn=x.findWordAt(Et);hr(x.doc,cn.anchor,cn.head)}}})):bn(z.scroller,"dblclick",function(ht){return pr(x,ht)||Br(ht)}),bn(z.scroller,"contextmenu",function(ht){return Qc(x,ht)}),bn(z.input.getField(),"contextmenu",function(ht){z.scroller.contains(ht.target)||Qc(x,ht)});var oe,ie={end:0};function pe(){z.activeTouch&&(oe=setTimeout(function(){return z.activeTouch=null},1e3),ie=z.activeTouch,ie.end=+new Date)}function Pe(ht){if(ht.touches.length!=1)return!1;var Et=ht.touches[0];return Et.radiusX<=1&&Et.radiusY<=1}function qe(ht,Et){if(Et.left==null)return!0;var cn=Et.left-ht.left,En=Et.top-ht.top;return cn*cn+En*En>20*20}bn(z.scroller,"touchstart",function(ht){if(!pr(x,ht)&&!Pe(ht)&&!sc(x,ht)){z.input.ensurePolled(),clearTimeout(oe);var Et=+new Date;z.activeTouch={start:Et,moved:!1,prev:Et-ie.end<=300?ie:null},ht.touches.length==1&&(z.activeTouch.left=ht.touches[0].pageX,z.activeTouch.top=ht.touches[0].pageY)}}),bn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),bn(z.scroller,"touchend",function(ht){var Et=z.activeTouch;if(Et&&!Mi(z,ht)&&Et.left!=null&&!Et.moved&&new Date-Et.start<300){var cn=x.coordsChar(z.activeTouch,"page"),En;!Et.prev||qe(Et,Et.prev)?En=new oa(cn,cn):!Et.prev.prev||qe(Et,Et.prev.prev)?En=x.findWordAt(cn):En=new oa(mn(cn.line,0),yr(x.doc,mn(cn.line+1,0))),x.setSelection(En.anchor,En.head),x.focus(),Br(ht)}pe()}),bn(z.scroller,"touchcancel",pe),bn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(ts(x,z.scroller.scrollTop),$s(x,z.scroller.scrollLeft,!0),Yn(x,"scroll",x))}),bn(z.scroller,"mousewheel",function(ht){return Gl(x,ht)}),bn(z.scroller,"DOMMouseScroll",function(ht){return Gl(x,ht)}),bn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(ht){pr(x,ht)||ci(ht)},over:function(ht){pr(x,ht)||(Yl(x,ht),ci(ht))},start:function(ht){return ss(x,ht)},drop:Bt(x,ds),leave:function(ht){pr(x,ht)||vl(x)}};var ct=z.input.getField();bn(ct,"keyup",function(ht){return fc.call(x,ht)}),bn(ct,"keydown",Bt(x,Nl)),bn(ct,"keypress",Bt(x,Gc)),bn(ct,"focus",function(ht){return ls(x,ht)}),bn(ct,"blur",function(ht){return Sl(x,ht)})}var td=[];Aa.defineInitHook=function(x){return td.push(x)};function Fc(x,z,oe,ie){var pe=x.doc,Pe;oe==null&&(oe="add"),oe=="smart"&&(pe.mode.indent?Pe=bo(x,z).state:oe="prev");var qe=x.options.tabSize,ct=an(pe,z),ht=nt(ct.text,null,qe);ct.stateAfter&&(ct.stateAfter=null);var Et=ct.text.match(/^\s*/)[0],cn;if(!ie&&!/\S/.test(ct.text))cn=0,oe="not";else if(oe=="smart"&&(cn=pe.mode.indent(Pe,ct.text.slice(Et.length),ct.text),cn==ln||cn>150)){if(!ie)return;oe="prev"}oe=="prev"?z>pe.first?cn=nt(an(pe,z-1).text,null,qe):cn=0:oe=="add"?cn=ht+x.options.indentUnit:oe=="subtract"?cn=ht-x.options.indentUnit:typeof oe=="number"&&(cn=ht+oe),cn=Math.max(0,cn);var En="",ur=0;if(x.options.indentWithTabs)for(var Jn=Math.floor(cn/qe);Jn;--Jn)ur+=qe,En+=" ";if(ur<cn&&(En+=Qt(cn-ur)),En!=Et)return ha(pe,En,mn(z,0),mn(z,Et.length),"+input"),ct.stateAfter=null,!0;for(var Hr=0;Hr<pe.sel.ranges.length;Hr++){var oi=pe.sel.ranges[Hr];if(oi.head.line==z&&oi.head.ch<Et.length){var Oi=mn(z,Et.length);Er(pe,Hr,new oa(Oi,Oi));break}}}var Uc=null;function eu(x){Uc=x}function $u(x,z,oe,ie,pe){var Pe=x.doc;x.display.shift=!1,ie||(ie=Pe.sel);var qe=+new Date-200,ct=pe=="paste"||x.state.pasteIncoming>qe,ht=rn(z),Et=null;if(ct&&ie.ranges.length>1)if(Uc&&Uc.text.join(`
|
|
|
`)==z){if(ie.ranges.length%Uc.text.length==0){Et=[];for(var cn=0;cn<Uc.text.length;cn++)Et.push(Pe.splitLines(Uc.text[cn]))}}else ht.length==ie.ranges.length&&x.options.pasteLinesPerSelection&&(Et=Wn(ht,function(ro){return[ro]}));for(var En=x.curOp.updateInput,ur=ie.ranges.length-1;ur>=0;ur--){var Jn=ie.ranges[ur],Hr=Jn.from(),oi=Jn.to();Jn.empty()&&(oe&&oe>0?Hr=mn(Hr.line,Hr.ch-oe):x.state.overwrite&&!ct?oi=mn(oi.line,Math.min(an(Pe,oi.line).text.length,oi.ch+Mn(ht).length)):ct&&Uc&&Uc.lineWise&&Uc.text.join(`
|
|
|
`)==ht.join(`
|
|
|
`)&&(Hr=oi=mn(Hr.line,0)));var Oi={from:Hr,to:oi,text:Et?Et[ur%Et.length]:ht,origin:pe||(ct?"paste":x.state.cutIncoming>qe?"cut":"+input")};so(x.doc,Oi),sr(x,"inputRead",x,Oi)}z&&!ct&&Hu(x,z),Al(x),x.curOp.updateInput<2&&(x.curOp.updateInput=En),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function nd(x,z){var oe=x.clipboardData&&x.clipboardData.getData("Text");if(oe)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&mt(z,function(){return $u(z,oe,0,null,"paste")}),!0}function Hu(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var oe=x.doc.sel,ie=oe.ranges.length-1;ie>=0;ie--){var pe=oe.ranges[ie];if(!(pe.head.ch>100||ie&&oe.ranges[ie-1].head.line==pe.head.line)){var Pe=x.getModeAt(pe.head),qe=!1;if(Pe.electricChars){for(var ct=0;ct<Pe.electricChars.length;ct++)if(z.indexOf(Pe.electricChars.charAt(ct))>-1){qe=Fc(x,pe.head.line,"smart");break}}else Pe.electricInput&&Pe.electricInput.test(an(x.doc,pe.head.line).text.slice(0,pe.head.ch))&&(qe=Fc(x,pe.head.line,"smart"));qe&&sr(x,"electricInput",x,pe.head.line)}}}function vu(x){for(var z=[],oe=[],ie=0;ie<x.doc.sel.ranges.length;ie++){var pe=x.doc.sel.ranges[ie].head.line,Pe={anchor:mn(pe,0),head:mn(pe+1,0)};oe.push(Pe),z.push(x.getRange(Pe.anchor,Pe.head))}return{text:z,ranges:oe}}function Pd(x,z,oe,ie){x.setAttribute("autocorrect",oe?"":"off"),x.setAttribute("autocapitalize",ie?"":"off"),x.setAttribute("spellcheck",!!z)}function _s(){var x=Ye("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=Ye("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ae?x.style.width="1000px":x.setAttribute("wrap","off"),ye&&(x.style.border="1px solid black"),Pd(x),z}function Zs(x){var z=x.optionHandlers,oe=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ie,pe){var Pe=this.options,qe=Pe[ie];Pe[ie]==pe&&ie!="mode"||(Pe[ie]=pe,z.hasOwnProperty(ie)&&Bt(this,z[ie])(this,pe,qe),Yn(this,"optionChange",this,ie))},getOption:function(ie){return this.options[ie]},getDoc:function(){return this.doc},addKeyMap:function(ie,pe){this.state.keyMaps[pe?"push":"unshift"](ll(ie))},removeKeyMap:function(ie){for(var pe=this.state.keyMaps,Pe=0;Pe<pe.length;++Pe)if(pe[Pe]==ie||pe[Pe].name==ie)return pe.splice(Pe,1),!0},addOverlay:Wt(function(ie,pe){var Pe=ie.token?ie:x.getMode(this.options,ie);if(Pe.startState)throw new Error("Overlays may not be stateful.");zn(this.state.overlays,{mode:Pe,modeSpec:ie,opaque:pe&&pe.opaque,priority:pe&&pe.priority||0},function(qe){return qe.priority}),this.state.modeGen++,Co(this)}),removeOverlay:Wt(function(ie){for(var pe=this.state.overlays,Pe=0;Pe<pe.length;++Pe){var qe=pe[Pe].modeSpec;if(qe==ie||typeof ie=="string"&&qe.name==ie){pe.splice(Pe,1),this.state.modeGen++,Co(this);return}}}),indentLine:Wt(function(ie,pe,Pe){typeof pe!="string"&&typeof pe!="number"&&(pe==null?pe=this.options.smartIndent?"smart":"prev":pe=pe?"add":"subtract"),br(this.doc,ie)&&Fc(this,ie,pe,Pe)}),indentSelection:Wt(function(ie){for(var pe=this.doc.sel.ranges,Pe=-1,qe=0;qe<pe.length;qe++){var ct=pe[qe];if(ct.empty())ct.head.line>Pe&&(Fc(this,ct.head.line,ie,!0),Pe=ct.head.line,qe==this.doc.sel.primIndex&&Al(this));else{var ht=ct.from(),Et=ct.to(),cn=Math.max(Pe,ht.line);Pe=Math.min(this.lastLine(),Et.line-(Et.ch?0:1))+1;for(var En=cn;En<Pe;++En)Fc(this,En,ie);var ur=this.doc.sel.ranges;ht.ch==0&&pe.length==ur.length&&ur[qe].from().ch>0&&Er(this.doc,qe,new oa(ht,ur[qe].to()),Tt)}}}),getTokenAt:function(ie,pe){return ea(this,ie,pe)},getLineTokens:function(ie,pe){return ea(this,mn(ie),pe,!0)},getTokenTypeAt:function(ie){ie=yr(this.doc,ie);var pe=Jo(this,an(this.doc,ie.line)),Pe=0,qe=(pe.length-1)/2,ct=ie.ch,ht;if(ct==0)ht=pe[2];else for(;;){var Et=Pe+qe>>1;if((Et?pe[Et*2-1]:0)>=ct)qe=Et;else if(pe[Et*2+1]<ct)Pe=Et+1;else{ht=pe[Et*2+2];break}}var cn=ht?ht.indexOf("overlay "):-1;return cn<0?ht:cn==0?null:ht.slice(0,cn-1)},getModeAt:function(ie){var pe=this.doc.mode;return pe.innerMode?x.innerMode(pe,this.getTokenAt(ie).state).mode:pe},getHelper:function(ie,pe){return this.getHelpers(ie,pe)[0]},getHelpers:function(ie,pe){var Pe=[];if(!oe.hasOwnProperty(pe))return Pe;var qe=oe[pe],ct=this.getModeAt(ie);if(typeof ct[pe]=="string")qe[ct[pe]]&&Pe.push(qe[ct[pe]]);else if(ct[pe])for(var ht=0;ht<ct[pe].length;ht++){var Et=qe[ct[pe][ht]];Et&&Pe.push(Et)}else ct.helperType&&qe[ct.helperType]?Pe.push(qe[ct.helperType]):qe[ct.name]&&Pe.push(qe[ct.name]);for(var cn=0;cn<qe._global.length;cn++){var En=qe._global[cn];En.pred(ct,this)&&jt(Pe,En.val)==-1&&Pe.push(En.val)}return Pe},getStateAfter:function(ie,pe){var Pe=this.doc;return ie=Ni(Pe,ie==null?Pe.first+Pe.size-1:ie),bo(this,ie+1,pe).state},cursorCoords:function(ie,pe){var Pe,qe=this.doc.sel.primary();return ie==null?Pe=qe.head:typeof ie=="object"?Pe=yr(this.doc,ie):Pe=ie?qe.from():qe.to(),Ma(this,Pe,pe||"page")},charCoords:function(ie,pe){return Ja(this,yr(this.doc,ie),pe||"page")},coordsChar:function(ie,pe){return ie=Ea(this,ie,pe||"page"),Es(this,ie.left,ie.top)},lineAtHeight:function(ie,pe){return ie=Ea(this,{top:ie,left:0},pe||"page").top,Xn(this.doc,ie+this.display.viewOffset)},heightAtLine:function(ie,pe,Pe){var qe=!1,ct;if(typeof ie=="number"){var ht=this.doc.first+this.doc.size-1;ie<this.doc.first?ie=this.doc.first:ie>ht&&(ie=ht,qe=!0),ct=an(this.doc,ie)}else ct=ie;return ca(this,ct,{top:0,left:0},pe||"page",Pe||qe).top+(qe?this.doc.height-An(ct):0)},defaultTextHeight:function(){return gs(this.display)},defaultCharWidth:function(){return Rs(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ie,pe,Pe,qe,ct){var ht=this.display;ie=Ma(this,yr(this.doc,ie));var Et=ie.bottom,cn=ie.left;if(pe.style.position="absolute",pe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pe),ht.sizer.appendChild(pe),qe=="over")Et=ie.top;else if(qe=="above"||qe=="near"){var En=Math.max(ht.wrapper.clientHeight,this.doc.height),ur=Math.max(ht.sizer.clientWidth,ht.lineSpace.clientWidth);(qe=="above"||ie.bottom+pe.offsetHeight>En)&&ie.top>pe.offsetHeight?Et=ie.top-pe.offsetHeight:ie.bottom+pe.offsetHeight<=En&&(Et=ie.bottom),cn+pe.offsetWidth>ur&&(cn=ur-pe.offsetWidth)}pe.style.top=Et+"px",pe.style.left=pe.style.right="",ct=="right"?(cn=ht.sizer.clientWidth-pe.offsetWidth,pe.style.right="0px"):(ct=="left"?cn=0:ct=="middle"&&(cn=(ht.sizer.clientWidth-pe.offsetWidth)/2),pe.style.left=cn+"px"),Pe&&Vc(this,{left:cn,top:Et,right:cn+pe.offsetWidth,bottom:Et+pe.offsetHeight})},triggerOnKeyDown:Wt(Nl),triggerOnKeyPress:Wt(Gc),triggerOnKeyUp:fc,triggerOnMouseDown:Wt(Pl),execCommand:function(ie){if(Js.hasOwnProperty(ie))return Js[ie].call(null,this)},triggerElectric:Wt(function(ie){Hu(this,ie)}),findPosH:function(ie,pe,Pe,qe){var ct=1;pe<0&&(ct=-1,pe=-pe);for(var ht=yr(this.doc,ie),Et=0;Et<pe&&(ht=yc(this.doc,ht,ct,Pe,qe),!ht.hitSide);++Et);return ht},moveH:Wt(function(ie,pe){var Pe=this;this.extendSelectionsBy(function(qe){return Pe.display.shift||Pe.doc.extend||qe.empty()?yc(Pe.doc,qe.head,ie,pe,Pe.options.rtlMoveVisually):ie<0?qe.from():qe.to()},Jt)}),deleteH:Wt(function(ie,pe){var Pe=this.doc.sel,qe=this.doc;Pe.somethingSelected()?qe.replaceSelection("",null,"+delete"):dc(this,function(ct){var ht=yc(qe,ct.head,ie,pe,!1);return ie<0?{from:ht,to:ct.head}:{from:ct.head,to:ht}})}),findPosV:function(ie,pe,Pe,qe){var ct=1,ht=qe;pe<0&&(ct=-1,pe=-pe);for(var Et=yr(this.doc,ie),cn=0;cn<pe;++cn){var En=Ma(this,Et,"div");if(ht==null?ht=En.left:En.left=ht,Et=tu(this,En,ct,Pe),Et.hitSide)break}return Et},moveV:Wt(function(ie,pe){var Pe=this,qe=this.doc,ct=[],ht=!this.display.shift&&!qe.extend&&qe.sel.somethingSelected();if(qe.extendSelectionsBy(function(cn){if(ht)return ie<0?cn.from():cn.to();var En=Ma(Pe,cn.head,"div");cn.goalColumn!=null&&(En.left=cn.goalColumn),ct.push(En.left);var ur=tu(Pe,En,ie,pe);return pe=="page"&&cn==qe.sel.primary()&&Ql(Pe,Ja(Pe,ur,"div").top-En.top),ur},Jt),ct.length)for(var Et=0;Et<qe.sel.ranges.length;Et++)qe.sel.ranges[Et].goalColumn=ct[Et]}),findWordAt:function(ie){var pe=this.doc,Pe=an(pe,ie.line).text,qe=ie.ch,ct=ie.ch;if(Pe){var ht=this.getHelper(ie,"wordChars");(ie.sticky=="before"||ct==Pe.length)&&qe?--qe:++ct;for(var Et=Pe.charAt(qe),cn=Ne(Et,ht)?function(En){return Ne(En,ht)}:/\s/.test(Et)?function(En){return/\s/.test(En)}:function(En){return!/\s/.test(En)&&!Ne(En)};qe>0&&cn(Pe.charAt(qe-1));)--qe;for(;ct<Pe.length&&cn(Pe.charAt(ct));)++ct}return new oa(mn(ie.line,qe),mn(ie.line,ct))},toggleOverwrite:function(ie){ie!=null&&ie==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Kt(this.display.cursorDiv,"CodeMirror-overwrite"):Re(this.display.cursorDiv,"CodeMirror-overwrite"),Yn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==pt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wt(function(ie,pe){Ec(this,ie,pe)}),getScrollInfo:function(){var ie=this.display.scroller;return{left:ie.scrollLeft,top:ie.scrollTop,height:ie.scrollHeight-ai(this)-this.display.barHeight,width:ie.scrollWidth-ai(this)-this.display.barWidth,clientHeight:Ui(this),clientWidth:ii(this)}},scrollIntoView:Wt(function(ie,pe){ie==null?(ie={from:this.doc.sel.primary().head,to:null},pe==null&&(pe=this.options.cursorScrollMargin)):typeof ie=="number"?ie={from:mn(ie,0),to:null}:ie.from==null&&(ie={from:ie,to:null}),ie.to||(ie.to=ie.from),ie.margin=pe||0,ie.from.line!=null?Hl(this,ie):Bs(this,ie.from,ie.to,ie.margin)}),setSize:Wt(function(ie,pe){var Pe=this,qe=function(ht){return typeof ht=="number"||/^\d+$/.test(String(ht))?ht+"px":ht};ie!=null&&(this.display.wrapper.style.width=qe(ie)),pe!=null&&(this.display.wrapper.style.height=qe(pe)),this.options.lineWrapping&&qo(this);var ct=this.display.viewFrom;this.doc.iter(ct,this.display.viewTo,function(ht){if(ht.widgets){for(var Et=0;Et<ht.widgets.length;Et++)if(ht.widgets[Et].noHScroll){Qo(Pe,ct,"widget");break}}++ct}),this.curOp.forceUpdate=!0,Yn(this,"refresh",this)}),operation:function(ie){return mt(this,ie)},startOperation:function(){return Mc(this)},endOperation:function(){return Lc(this)},refresh:Wt(function(){var ie=this.display.cachedTextHeight;Co(this),this.curOp.forceUpdate=!0,Qi(this),Ec(this,this.doc.scrollLeft,this.doc.scrollTop),Ra(this.display),(ie==null||Math.abs(ie-gs(this.display))>.5||this.options.lineWrapping)&&Ts(this),Yn(this,"refresh",this)}),swapDoc:Wt(function(ie){var pe=this.doc;return pe.cm=null,this.state.selectingText&&this.state.selectingText(),Ps(this,ie),Qi(this),this.display.input.reset(),Ec(this,ie.scrollLeft,ie.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,pe),pe}),phrase:function(ie){var pe=this.options.phrases;return pe&&Object.prototype.hasOwnProperty.call(pe,ie)?pe[ie]:ie},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}},Or(x),x.registerHelper=function(ie,pe,Pe){oe.hasOwnProperty(ie)||(oe[ie]=x[ie]={_global:[]}),oe[ie][pe]=Pe},x.registerGlobalHelper=function(ie,pe,Pe,qe){x.registerHelper(ie,pe,qe),oe[ie]._global.push({pred:Pe,val:qe})}}function yc(x,z,oe,ie,pe){var Pe=z,qe=oe,ct=an(x,z.line),ht=pe&&x.direction=="rtl"?-oe:oe;function Et(){var yo=z.line+ht;return yo<x.first||yo>=x.first+x.size?!1:(z=new mn(yo,z.ch,z.sticky),ct=an(x,yo))}function cn(yo){var Gi;if(ie=="codepoint"){var xo=ct.text.charCodeAt(z.ch+(ie>0?0:-1));isNaN(xo)?Gi=null:Gi=new mn(z.line,Math.max(0,Math.min(ct.text.length,z.ch+oe*(xo>=55296&&xo<56320?2:1))),-oe)}else pe?Gi=dl(x.cm,ct,z,oe):Gi=Rl(ct,z,oe);if(Gi==null)if(!yo&&Et())z=Ol(pe,x.cm,ct,z.line,ht);else return!1;else z=Gi;return!0}if(ie=="char"||ie=="codepoint")cn();else if(ie=="column")cn(!0);else if(ie=="word"||ie=="group")for(var En=null,ur=ie=="group",Jn=x.cm&&x.cm.getHelper(z,"wordChars"),Hr=!0;!(oe<0&&!cn(!Hr));Hr=!1){var oi=ct.text.charAt(z.ch)||`
|
|
|
`,Oi=Ne(oi,Jn)?"w":ur&&oi==`
|
|
|
`?"n":!ur||/\s/.test(oi)?null:"p";if(ur&&!Hr&&!Oi&&(Oi="s"),En&&En!=Oi){oe<0&&(oe=1,cn(),z.sticky="after");break}if(Oi&&(En=Oi),oe>0&&!cn(!Hr))break}var ro=po(x,z,Pe,qe,!0);return Vr(Pe,ro)&&(ro.hitSide=!0),ro}function tu(x,z,oe,ie){var pe=x.doc,Pe=z.left,qe;if(ie=="page"){var ct=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ht=Math.max(ct-.5*gs(x.display),3);qe=(oe>0?z.bottom:z.top)+oe*ht}else ie=="line"&&(qe=oe>0?z.bottom+3:z.top-3);for(var Et;Et=Es(x,Pe,qe),!!Et.outside;){if(oe<0?qe<=0:qe>=pe.height){Et.hitSide=!0;break}qe+=oe*5}return Et}var Cs=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ge,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Cs.prototype.init=function(x){var z=this,oe=this,ie=oe.cm,pe=oe.div=x.lineDiv;Pd(pe,ie.options.spellcheck,ie.options.autocorrect,ie.options.autocapitalize);function Pe(ct){for(var ht=ct.target;ht;ht=ht.parentNode){if(ht==pe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ht.className))break}return!1}bn(pe,"paste",function(ct){!Pe(ct)||pr(ie,ct)||nd(ct,ie)||fe<=11&&setTimeout(Bt(ie,function(){return z.updateFromDOM()}),20)}),bn(pe,"compositionstart",function(ct){z.composing={data:ct.data,done:!1}}),bn(pe,"compositionupdate",function(ct){z.composing||(z.composing={data:ct.data,done:!1})}),bn(pe,"compositionend",function(ct){z.composing&&(ct.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),bn(pe,"touchstart",function(){return oe.forceCompositionEnd()}),bn(pe,"input",function(){z.composing||z.readFromDOMSoon()});function qe(ct){if(!(!Pe(ct)||pr(ie,ct))){if(ie.somethingSelected())eu({lineWise:!1,text:ie.getSelections()}),ct.type=="cut"&&ie.replaceSelection("",null,"cut");else if(ie.options.lineWiseCopyCut){var ht=vu(ie);eu({lineWise:!0,text:ht.text}),ct.type=="cut"&&ie.operation(function(){ie.setSelections(ht.ranges,0,Tt),ie.replaceSelection("",null,"cut")})}else return;if(ct.clipboardData){ct.clipboardData.clearData();var Et=Uc.text.join(`
|
|
|
`);if(ct.clipboardData.setData("Text",Et),ct.clipboardData.getData("Text")==Et){ct.preventDefault();return}}var cn=_s(),En=cn.firstChild;ie.display.lineSpace.insertBefore(cn,ie.display.lineSpace.firstChild),En.value=Uc.text.join(`
|
|
|
`);var ur=document.activeElement;tt(En),setTimeout(function(){ie.display.lineSpace.removeChild(cn),ur.focus(),ur==pe&&oe.showPrimarySelection()},50)}}bn(pe,"copy",qe),bn(pe,"cut",qe)},Cs.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Cs.prototype.prepareSelection=function(){var x=$l(this.cm,!1);return x.focus=document.activeElement==this.div,x},Cs.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Cs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Cs.prototype.showPrimarySelection=function(){var x=this.getSelection(),z=this.cm,oe=z.doc.sel.primary(),ie=oe.from(),pe=oe.to();if(z.display.viewTo==z.display.viewFrom||ie.line>=z.display.viewTo||pe.line<z.display.viewFrom){x.removeAllRanges();return}var Pe=_u(z,x.anchorNode,x.anchorOffset),qe=_u(z,x.focusNode,x.focusOffset);if(!(Pe&&!Pe.bad&&qe&&!qe.bad&&$n(hi(Pe,qe),ie)==0&&$n(Ir(Pe,qe),pe)==0)){var ct=z.display.view,ht=ie.line>=z.display.viewFrom&&pd(z,ie)||{node:ct[0].measure.map[2],offset:0},Et=pe.line<z.display.viewTo&&pd(z,pe);if(!Et){var cn=ct[ct.length-1].measure,En=cn.maps?cn.maps[cn.maps.length-1]:cn.map;Et={node:En[En.length-1],offset:En[En.length-2]-En[En.length-3]}}if(!ht||!Et){x.removeAllRanges();return}var ur=x.rangeCount&&x.getRangeAt(0),Jn;try{Jn=Ke(ht.node,ht.offset,Et.offset,Et.node)}catch(Hr){}Jn&&(!te&&z.state.focused?(x.collapse(ht.node,ht.offset),Jn.collapsed||(x.removeAllRanges(),x.addRange(Jn))):(x.removeAllRanges(),x.addRange(Jn)),ur&&x.anchorNode==null?x.addRange(ur):te&&this.startGracePeriod()),this.rememberSelection()}},Cs.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)},Cs.prototype.showMultipleSelections=function(x){et(this.cm.display.cursorDiv,x.cursors),et(this.cm.display.selectionDiv,x.selection)},Cs.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Cs.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return zt(this.div,z)},Cs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Cs.prototype.blur=function(){this.div.blur()},Cs.prototype.getField=function(){return this.div},Cs.prototype.supportsTouch=function(){return!0},Cs.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():mt(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)},Cs.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Cs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(_e&&re&&this.cm.display.gutterSpecs.length&&md(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var oe=_u(z,x.anchorNode,x.anchorOffset),ie=_u(z,x.focusNode,x.focusOffset);oe&&ie&&mt(z,function(){Zr(z.doc,uo(oe,ie),Tt),(oe.bad||ie.bad)&&(z.curOp.selectionChanged=!0)})}}},Cs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var x=this.cm,z=x.display,oe=x.doc.sel.primary(),ie=oe.from(),pe=oe.to();if(ie.ch==0&&ie.line>x.firstLine()&&(ie=mn(ie.line-1,an(x.doc,ie.line-1).length)),pe.ch==an(x.doc,pe.line).text.length&&pe.line<x.lastLine()&&(pe=mn(pe.line+1,0)),ie.line<z.viewFrom||pe.line>z.viewTo-1)return!1;var Pe,qe,ct;ie.line==z.viewFrom||(Pe=Bi(x,ie.line))==0?(qe=cr(z.view[0].line),ct=z.view[0].node):(qe=cr(z.view[Pe].line),ct=z.view[Pe-1].node.nextSibling);var ht=Bi(x,pe.line),Et,cn;if(ht==z.view.length-1?(Et=z.viewTo-1,cn=z.lineDiv.lastChild):(Et=cr(z.view[ht+1].line)-1,cn=z.view[ht+1].node.previousSibling),!ct)return!1;for(var En=x.doc.splitLines(vd(x,ct,cn,qe,Et)),ur=Rn(x.doc,mn(qe,0),mn(Et,an(x.doc,Et).text.length));En.length>1&&ur.length>1;)if(Mn(En)==Mn(ur))En.pop(),ur.pop(),Et--;else if(En[0]==ur[0])En.shift(),ur.shift(),qe++;else break;for(var Jn=0,Hr=0,oi=En[0],Oi=ur[0],ro=Math.min(oi.length,Oi.length);Jn<ro&&oi.charCodeAt(Jn)==Oi.charCodeAt(Jn);)++Jn;for(var yo=Mn(En),Gi=Mn(ur),xo=Math.min(yo.length-(En.length==1?Jn:0),Gi.length-(ur.length==1?Jn:0));Hr<xo&&yo.charCodeAt(yo.length-Hr-1)==Gi.charCodeAt(Gi.length-Hr-1);)++Hr;if(En.length==1&&ur.length==1&&qe==ie.line)for(;Jn&&Jn>ie.ch&&yo.charCodeAt(yo.length-Hr-1)==Gi.charCodeAt(Gi.length-Hr-1);)Jn--,Hr++;En[En.length-1]=yo.slice(0,yo.length-Hr).replace(/^\u200b+/,""),En[0]=En[0].slice(Jn).replace(/\u200b+$/,"");var sa=mn(qe,Jn),fa=mn(Et,ur.length?Mn(ur).length-Hr:0);if(En.length>1||En[0]||$n(sa,fa))return ha(x.doc,En,sa,fa,"+input"),!0},Cs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Cs.prototype.reset=function(){this.forceCompositionEnd()},Cs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Cs.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))},Cs.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&mt(this.cm,function(){return Co(x.cm)})},Cs.prototype.setUneditable=function(x){x.contentEditable="false"},Cs.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||Bt(this.cm,$u)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Cs.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Cs.prototype.onContextMenu=function(){},Cs.prototype.resetPosition=function(){},Cs.prototype.needsContentAttribute=!0;function pd(x,z){var oe=go(x,z.line);if(!oe||oe.hidden)return null;var ie=an(x.doc,z.line),pe=la(oe,ie,z.line),Pe=Xt(ie,x.doc.direction),qe="left";if(Pe){var ct=on(Pe,z.ch);qe=ct%2?"right":"left"}var ht=io(pe.map,z.ch,qe);return ht.offset=ht.collapse=="right"?ht.end:ht.start,ht}function md(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function uu(x,z){return z&&(x.bad=!0),x}function vd(x,z,oe,ie,pe){var Pe="",qe=!1,ct=x.doc.lineSeparator(),ht=!1;function Et(Jn){return function(Hr){return Hr.id==Jn}}function cn(){qe&&(Pe+=ct,ht&&(Pe+=ct),qe=ht=!1)}function En(Jn){Jn&&(cn(),Pe+=Jn)}function ur(Jn){if(Jn.nodeType==1){var Hr=Jn.getAttribute("cm-text");if(Hr){En(Hr);return}var oi=Jn.getAttribute("cm-marker"),Oi;if(oi){var ro=x.findMarks(mn(ie,0),mn(pe+1,0),Et(+oi));ro.length&&(Oi=ro[0].find(0))&&En(Rn(x.doc,Oi.from,Oi.to).join(ct));return}if(Jn.getAttribute("contenteditable")=="false")return;var yo=/^(pre|div|p|li|table|br)$/i.test(Jn.nodeName);if(!/^br$/i.test(Jn.nodeName)&&Jn.textContent.length==0)return;yo&&cn();for(var Gi=0;Gi<Jn.childNodes.length;Gi++)ur(Jn.childNodes[Gi]);/^(pre|p)$/i.test(Jn.nodeName)&&(ht=!0),yo&&(qe=!0)}else Jn.nodeType==3&&En(Jn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ur(z),z!=oe;)z=z.nextSibling,ht=!1;return Pe}function _u(x,z,oe){var ie;if(z==x.display.lineDiv){if(ie=x.display.lineDiv.childNodes[oe],!ie)return uu(x.clipPos(mn(x.display.viewTo-1)),!0);z=null,oe=0}else for(ie=z;;ie=ie.parentNode){if(!ie||ie==x.display.lineDiv)return null;if(ie.parentNode&&ie.parentNode==x.display.lineDiv)break}for(var pe=0;pe<x.display.view.length;pe++){var Pe=x.display.view[pe];if(Pe.node==ie)return dh(Pe,z,oe)}}function dh(x,z,oe){var ie=x.text.firstChild,pe=!1;if(!z||!zt(ie,z))return uu(mn(cr(x.line),0),!0);if(z==ie&&(pe=!0,z=ie.childNodes[oe],oe=0,!z)){var Pe=x.rest?Mn(x.rest):x.line;return uu(mn(cr(Pe),Pe.text.length),pe)}var qe=z.nodeType==3?z:null,ct=z;for(!qe&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(qe=z.firstChild,oe&&(oe=qe.nodeValue.length));ct.parentNode!=ie;)ct=ct.parentNode;var ht=x.measure,Et=ht.maps;function cn(Oi,ro,yo){for(var Gi=-1;Gi<(Et?Et.length:0);Gi++)for(var xo=Gi<0?ht.map:Et[Gi],sa=0;sa<xo.length;sa+=3){var fa=xo[sa+2];if(fa==Oi||fa==ro){var us=cr(Gi<0?x.line:x.rest[Gi]),el=xo[sa]+yo;return(yo<0||fa!=Oi)&&(el=xo[sa+(yo?1:0)]),mn(us,el)}}}var En=cn(qe,ct,oe);if(En)return uu(En,pe);for(var ur=ct.nextSibling,Jn=qe?qe.nodeValue.length-oe:0;ur;ur=ur.nextSibling){if(En=cn(ur,ur.firstChild,0),En)return uu(mn(En.line,En.ch-Jn),pe);Jn+=ur.textContent.length}for(var Hr=ct.previousSibling,oi=oe;Hr;Hr=Hr.previousSibling){if(En=cn(Hr,Hr.firstChild,-1),En)return uu(mn(En.line,En.ch+oi),pe);oi+=Hr.textContent.length}}var Qs=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ge,this.hasSelection=!1,this.composing=null};Qs.prototype.init=function(x){var z=this,oe=this,ie=this.cm;this.createField(x);var pe=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),ye&&(pe.style.width="0px"),bn(pe,"input",function(){ce&&fe>=9&&z.hasSelection&&(z.hasSelection=null),oe.poll()}),bn(pe,"paste",function(qe){pr(ie,qe)||nd(qe,ie)||(ie.state.pasteIncoming=+new Date,oe.fastPoll())});function Pe(qe){if(!pr(ie,qe)){if(ie.somethingSelected())eu({lineWise:!1,text:ie.getSelections()});else if(ie.options.lineWiseCopyCut){var ct=vu(ie);eu({lineWise:!0,text:ct.text}),qe.type=="cut"?ie.setSelections(ct.ranges,null,Tt):(oe.prevInput="",pe.value=ct.text.join(`
|
|
|
`),tt(pe))}else return;qe.type=="cut"&&(ie.state.cutIncoming=+new Date)}}bn(pe,"cut",Pe),bn(pe,"copy",Pe),bn(x.scroller,"paste",function(qe){if(!(Mi(x,qe)||pr(ie,qe))){if(!pe.dispatchEvent){ie.state.pasteIncoming=+new Date,oe.focus();return}var ct=new Event("paste");ct.clipboardData=qe.clipboardData,pe.dispatchEvent(ct)}}),bn(x.lineSpace,"selectstart",function(qe){Mi(x,qe)||Br(qe)}),bn(pe,"compositionstart",function(){var qe=ie.getCursor("from");oe.composing&&oe.composing.range.clear(),oe.composing={start:qe,range:ie.markText(qe,ie.getCursor("to"),{className:"CodeMirror-composing"})}}),bn(pe,"compositionend",function(){oe.composing&&(oe.poll(),oe.composing.range.clear(),oe.composing=null)})},Qs.prototype.createField=function(x){this.wrapper=_s(),this.textarea=this.wrapper.firstChild},Qs.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var x=this.cm,z=x.display,oe=x.doc,ie=$l(x);if(x.options.moveInputWithCursor){var pe=Ma(x,oe.sel.primary().head,"div"),Pe=z.wrapper.getBoundingClientRect(),qe=z.lineDiv.getBoundingClientRect();ie.teTop=Math.max(0,Math.min(z.wrapper.clientHeight-10,pe.top+qe.top-Pe.top)),ie.teLeft=Math.max(0,Math.min(z.wrapper.clientWidth-10,pe.left+qe.left-Pe.left))}return ie},Qs.prototype.showSelection=function(x){var z=this.cm,oe=z.display;et(oe.cursorDiv,x.cursors),et(oe.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},Qs.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var oe=z.getSelection();this.textarea.value=oe,z.state.focused&&tt(this.textarea),ce&&fe>=9&&(this.hasSelection=oe)}else x||(this.prevInput=this.textarea.value="",ce&&fe>=9&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Me||pt()!=this.textarea))try{this.textarea.focus()}catch(x){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},Qs.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function oe(){var ie=z.poll();!ie&&!x?(x=!0,z.polling.set(60,oe)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,oe)},Qs.prototype.poll=function(){var x=this,z=this.cm,oe=this.textarea,ie=this.prevInput;if(this.contextMenuPending||!z.state.focused||nr(oe)&&!ie&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var pe=oe.value;if(pe==ie&&!z.somethingSelected())return!1;if(ce&&fe>=9&&this.hasSelection===pe||ve&&/[\uf700-\uf7ff]/.test(pe))return z.display.input.reset(),!1;if(z.doc.sel==z.display.selForContextMenu){var Pe=pe.charCodeAt(0);if(Pe==8203&&!ie&&(ie="\u200B"),Pe==8666)return this.reset(),this.cm.execCommand("undo")}for(var qe=0,ct=Math.min(ie.length,pe.length);qe<ct&&ie.charCodeAt(qe)==pe.charCodeAt(qe);)++qe;return mt(z,function(){$u(z,pe.slice(qe),ie.length-qe,null,x.composing?"*compose":null),pe.length>1e3||pe.indexOf(`
|
|
|
`)>-1?oe.value=x.prevInput="":x.prevInput=pe,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){ce&&fe>=9&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(x){var z=this,oe=z.cm,ie=oe.display,pe=z.textarea;z.contextMenuPending&&z.contextMenuPending();var Pe=es(oe,x),qe=ie.scroller.scrollTop;if(!Pe||de)return;var ct=oe.options.resetSelectionOnContextMenu;ct&&oe.doc.sel.contains(Pe)==-1&&Bt(oe,Zr)(oe.doc,uo(Pe),Tt);var ht=pe.style.cssText,Et=z.wrapper.style.cssText,cn=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",pe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-cn.top-5)+"px; left: "+(x.clientX-cn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ce?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var En;ae&&(En=window.scrollY),ie.input.focus(),ae&&window.scrollTo(null,En),ie.input.reset(),oe.somethingSelected()||(pe.value=z.prevInput=" "),z.contextMenuPending=Jn,ie.selForContextMenu=oe.doc.sel,clearTimeout(ie.detectingSelectAll);function ur(){if(pe.selectionStart!=null){var oi=oe.somethingSelected(),Oi="\u200B"+(oi?pe.value:"");pe.value="\u21DA",pe.value=Oi,z.prevInput=oi?"":"\u200B",pe.selectionStart=1,pe.selectionEnd=Oi.length,ie.selForContextMenu=oe.doc.sel}}function Jn(){if(z.contextMenuPending==Jn&&(z.contextMenuPending=!1,z.wrapper.style.cssText=Et,pe.style.cssText=ht,ce&&fe<9&&ie.scrollbars.setScrollTop(ie.scroller.scrollTop=qe),pe.selectionStart!=null)){(!ce||ce&&fe<9)&&ur();var oi=0,Oi=function(){ie.selForContextMenu==oe.doc.sel&&pe.selectionStart==0&&pe.selectionEnd>0&&z.prevInput=="\u200B"?Bt(oe,wa)(oe):oi++<10?ie.detectingSelectAll=setTimeout(Oi,500):(ie.selForContextMenu=null,ie.input.reset())};ie.detectingSelectAll=setTimeout(Oi,200)}}if(ce&&fe>=9&&ur(),Ee){ci(x);var Hr=function(){Zn(window,"mouseup",Hr),setTimeout(Jn,20)};bn(window,"mouseup",Hr)}else setTimeout(Jn,50)},Qs.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1;function ju(x,z){if(z=z?Ut(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 oe=pt();z.autofocus=oe==x||x.getAttribute("autofocus")!=null&&oe==document.body}function ie(){x.value=ct.getValue()}var pe;if(x.form&&(bn(x.form,"submit",ie),!z.leaveSubmitMethodAlone)){var Pe=x.form;pe=Pe.submit;try{var qe=Pe.submit=function(){ie(),Pe.submit=pe,Pe.submit(),Pe.submit=qe}}catch(ht){}}z.finishInit=function(ht){ht.save=ie,ht.getTextArea=function(){return x},ht.toTextArea=function(){ht.toTextArea=isNaN,ie(),x.parentNode.removeChild(ht.getWrapperElement()),x.style.display="",x.form&&(Zn(x.form,"submit",ie),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=pe))}},x.style.display="none";var ct=Aa(function(ht){return x.parentNode.insertBefore(ht,x.nextSibling)},z);return ct}function rd(x){x.off=Zn,x.on=bn,x.wheelEventPixels=Gs,x.Doc=Wi,x.splitLines=rn,x.countColumn=nt,x.findColumn=kn,x.isWordChar=Be,x.Pass=ln,x.signal=Yn,x.Line=Un,x.changeEnd=Sa,x.scrollbarModel=Hc,x.Pos=mn,x.cmpPos=$n,x.modes=Ar,x.mimeModes=Mr,x.resolveMode=Ot,x.getMode=ge,x.modeExtensions=Ie,x.extendMode=Ae,x.copyState=We,x.startState=xt,x.innerMode=it,x.commands=Js,x.keyMap=Pa,x.keyName=uc,x.isModifierKey=Dl,x.lookupKey=gl,x.normalizeKeyMap=Ya,x.StringStream=Ft,x.SharedTextMarker=ga,x.TextMarker=ks,x.LineWidget=Ks,x.e_preventDefault=Br,x.e_stopPropagation=Di,x.e_stop=ci,x.addClass=Kt,x.contains=zt,x.rmClass=Re,x.keyNames=ac}Qu(Aa),Zs(Aa);var gu="iter insert remove copy getEditor constructor".split(" ");for(var Xc in Wi.prototype)Wi.prototype.hasOwnProperty(Xc)&&jt(gu,Xc)<0&&(Aa.prototype[Xc]=function(x){return function(){return x.apply(this.doc,arguments)}}(Wi.prototype[Xc]));return Or(Wi),Aa.inputStyles={textarea:Qs,contenteditable:Cs},Aa.defineMode=function(x){!Aa.defaults.mode&&x!="null"&&(Aa.defaults.mode=x),tr.apply(this,arguments)},Aa.defineMIME=Zt,Aa.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),Aa.defineMIME("text/plain","null"),Aa.defineExtension=function(x,z){Aa.prototype[x]=z},Aa.defineDocExtension=function(x,z){Wi.prototype[x]=z},Aa.fromTextArea=ju,rd(Aa),Aa.version="5.58.2",Aa})},49047:function(dn,St,ee){(function(te){te(ee(4631),ee(29589),ee(52539))})(function(te){"use strict";te.defineMode("markdown",function(Se,Le){var Ce=te.getMode(Se,"text/html"),ce=Ce.name=="null";function fe(nt){if(te.findModeByName){var Ge=te.findModeByName(nt);Ge&&(nt=Ge.mime||Ge.mimes[0])}var jt=te.getMode(Se,nt);return jt.name=="null"?null:jt}Le.highlightFormatting===void 0&&(Le.highlightFormatting=!1),Le.maxBlockquoteDepth===void 0&&(Le.maxBlockquoteDepth=0),Le.taskLists===void 0&&(Le.taskLists=!1),Le.strikethrough===void 0&&(Le.strikethrough=!1),Le.emoji===void 0&&(Le.emoji=!1),Le.fencedCodeBlockHighlighting===void 0&&(Le.fencedCodeBlockHighlighting=!0),Le.fencedCodeBlockDefaultMode===void 0&&(Le.fencedCodeBlockDefaultMode="text/plain"),Le.xml===void 0&&(Le.xml=!0),Le.tokenTypeOverrides===void 0&&(Le.tokenTypeOverrides={});var ae={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 le in ae)ae.hasOwnProperty(le)&&Le.tokenTypeOverrides[le]&&(ae[le]=Le.tokenTypeOverrides[le]);var re=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,he=/^\[(x| )\](?=\s)/i,me=Le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,se=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ye=/^[^#!\[\]*_\\<>` "'(~:]+/,_e=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Me=/^\s*\[[^\]]+?\]:.*$/,ve=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Fe=" ";function $e(nt,Ge,jt){return Ge.f=Ge.inline=jt,jt(nt,Ge)}function Te(nt,Ge,jt){return Ge.f=Ge.block=jt,jt(nt,Ge)}function ze(nt){return!nt||!/\S/.test(nt.string)}function Ee(nt){if(nt.linkTitle=!1,nt.linkHref=!1,nt.linkText=!1,nt.em=!1,nt.strong=!1,nt.strikethrough=!1,nt.quote=0,nt.indentedCode=!1,nt.f==Re){var Ge=ce;if(!Ge){var jt=te.innerMode(Ce,nt.htmlState);Ge=jt.mode.name=="xml"&&jt.state.tagStart===null&&!jt.state.context&&jt.state.tokenize.isInText}Ge&&(nt.f=dt,nt.block=be,nt.htmlState=null)}return nt.trailingSpace=0,nt.trailingSpaceNewLine=!1,nt.prevLine=nt.thisLine,nt.thisLine={stream:null},null}function be(nt,Ge){var jt=nt.column()===Ge.indentation,yn=ze(Ge.prevLine.stream),ln=Ge.indentedCode,Tt=Ge.prevLine.hr,Lt=Ge.list!==!1,Jt=(Ge.listStack[Ge.listStack.length-1]||0)+3;Ge.indentedCode=!1;var kn=Ge.indentation;if(Ge.indentationDiff===null&&(Ge.indentationDiff=Ge.indentation,Lt)){for(Ge.list=null;kn<Ge.listStack[Ge.listStack.length-1];)Ge.listStack.pop(),Ge.listStack.length?Ge.indentation=Ge.listStack[Ge.listStack.length-1]:Ge.list=!1;Ge.list!==!1&&(Ge.indentationDiff=kn-Ge.listStack[Ge.listStack.length-1])}var In=!yn&&!Tt&&!Ge.prevLine.header&&(!Lt||!ln)&&!Ge.prevLine.fencedCodeEnd,Qt=(Ge.list===!1||Tt||yn)&&Ge.indentation<=Jt&&nt.match(re),Mn=null;if(Ge.indentationDiff>=4&&(ln||Ge.prevLine.fencedCodeEnd||Ge.prevLine.header||yn))return nt.skipToEnd(),Ge.indentedCode=!0,ae.code;if(nt.eatSpace())return null;if(jt&&Ge.indentation<=Jt&&(Mn=nt.match(me))&&Mn[1].length<=6)return Ge.quote=0,Ge.header=Mn[1].length,Ge.thisLine.header=!0,Le.highlightFormatting&&(Ge.formatting="header"),Ge.f=Ge.inline,et(Ge);if(Ge.indentation<=Jt&&nt.eat(">"))return Ge.quote=jt?1:Ge.quote+1,Le.highlightFormatting&&(Ge.formatting="quote"),nt.eatSpace(),et(Ge);if(!Qt&&!Ge.setext&&jt&&Ge.indentation<=Jt&&(Mn=nt.match(de))){var Wn=Mn[1]?"ol":"ul";return Ge.indentation=kn+nt.current().length,Ge.list=!0,Ge.quote=0,Ge.listStack.push(Ge.indentation),Ge.em=!1,Ge.strong=!1,Ge.code=!1,Ge.strikethrough=!1,Le.taskLists&&nt.match(he,!1)&&(Ge.taskList=!0),Ge.f=Ge.inline,Le.highlightFormatting&&(Ge.formatting=["list","list-"+Wn]),et(Ge)}else{if(jt&&Ge.indentation<=Jt&&(Mn=nt.match(_e,!0)))return Ge.quote=0,Ge.fencedEndRE=new RegExp(Mn[1]+"+ *$"),Ge.localMode=Le.fencedCodeBlockHighlighting&&fe(Mn[2]||Le.fencedCodeBlockDefaultMode),Ge.localMode&&(Ge.localState=te.startState(Ge.localMode)),Ge.f=Ge.block=De,Le.highlightFormatting&&(Ge.formatting="code-block"),Ge.code=-1,et(Ge);if(Ge.setext||(!In||!Lt)&&!Ge.quote&&Ge.list===!1&&!Ge.code&&!Qt&&!Me.test(nt.string)&&(Mn=nt.lookAhead(1))&&(Mn=Mn.match(se)))return Ge.setext?(Ge.header=Ge.setext,Ge.setext=0,nt.skipToEnd(),Le.highlightFormatting&&(Ge.formatting="header")):(Ge.header=Mn[0].charAt(0)=="="?1:2,Ge.setext=Ge.header),Ge.thisLine.header=!0,Ge.f=Ge.inline,et(Ge);if(Qt)return nt.skipToEnd(),Ge.hr=!0,Ge.thisLine.hr=!0,ae.hr;if(nt.peek()==="[")return $e(nt,Ge,Ze)}return $e(nt,Ge,Ge.inline)}function Re(nt,Ge){var jt=Ce.token(nt,Ge.htmlState);if(!ce){var yn=te.innerMode(Ce,Ge.htmlState);(yn.mode.name=="xml"&&yn.state.tagStart===null&&!yn.state.context&&yn.state.tokenize.isInText||Ge.md_inside&&nt.current().indexOf(">")>-1)&&(Ge.f=dt,Ge.block=be,Ge.htmlState=null)}return jt}function De(nt,Ge){var jt=Ge.listStack[Ge.listStack.length-1]||0,yn=Ge.indentation<jt,ln=jt+3;if(Ge.fencedEndRE&&Ge.indentation<=ln&&(yn||nt.match(Ge.fencedEndRE))){Le.highlightFormatting&&(Ge.formatting="code-block");var Tt;return yn||(Tt=et(Ge)),Ge.localMode=Ge.localState=null,Ge.block=be,Ge.f=dt,Ge.fencedEndRE=null,Ge.code=0,Ge.thisLine.fencedCodeEnd=!0,yn?Te(nt,Ge,Ge.block):Tt}else return Ge.localMode?Ge.localMode.token(nt,Ge.localState):(nt.skipToEnd(),ae.code)}function et(nt){var Ge=[];if(nt.formatting){Ge.push(ae.formatting),typeof nt.formatting=="string"&&(nt.formatting=[nt.formatting]);for(var jt=0;jt<nt.formatting.length;jt++)Ge.push(ae.formatting+"-"+nt.formatting[jt]),nt.formatting[jt]==="header"&&Ge.push(ae.formatting+"-"+nt.formatting[jt]+"-"+nt.header),nt.formatting[jt]==="quote"&&(!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=nt.quote?Ge.push(ae.formatting+"-"+nt.formatting[jt]+"-"+nt.quote):Ge.push("error"))}if(nt.taskOpen)return Ge.push("meta"),Ge.length?Ge.join(" "):null;if(nt.taskClosed)return Ge.push("property"),Ge.length?Ge.join(" "):null;if(nt.linkHref?Ge.push(ae.linkHref,"url"):(nt.strong&&Ge.push(ae.strong),nt.em&&Ge.push(ae.em),nt.strikethrough&&Ge.push(ae.strikethrough),nt.emoji&&Ge.push(ae.emoji),nt.linkText&&Ge.push(ae.linkText),nt.code&&Ge.push(ae.code),nt.image&&Ge.push(ae.image),nt.imageAltText&&Ge.push(ae.imageAltText,"link"),nt.imageMarker&&Ge.push(ae.imageMarker)),nt.header&&Ge.push(ae.header,ae.header+"-"+nt.header),nt.quote&&(Ge.push(ae.quote),!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=nt.quote?Ge.push(ae.quote+"-"+nt.quote):Ge.push(ae.quote+"-"+Le.maxBlockquoteDepth)),nt.list!==!1){var yn=(nt.listStack.length-1)%3;yn?yn===1?Ge.push(ae.list2):Ge.push(ae.list3):Ge.push(ae.list1)}return nt.trailingSpaceNewLine?Ge.push("trailing-space-new-line"):nt.trailingSpace&&Ge.push("trailing-space-"+(nt.trailingSpace%2?"a":"b")),Ge.length?Ge.join(" "):null}function Ye(nt,Ge){if(nt.match(ye,!0))return et(Ge)}function dt(nt,Ge){var jt=Ge.text(nt,Ge);if(typeof jt!="undefined")return jt;if(Ge.list)return Ge.list=null,et(Ge);if(Ge.taskList){var yn=nt.match(he,!0)[1]===" ";return yn?Ge.taskOpen=!0:Ge.taskClosed=!0,Le.highlightFormatting&&(Ge.formatting="task"),Ge.taskList=!1,et(Ge)}if(Ge.taskOpen=!1,Ge.taskClosed=!1,Ge.header&&nt.match(/^#+$/,!0))return Le.highlightFormatting&&(Ge.formatting="header"),et(Ge);var ln=nt.next();if(Ge.linkTitle){Ge.linkTitle=!1;var Tt=ln;ln==="("&&(Tt=")"),Tt=(Tt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Lt="^\\s*(?:[^"+Tt+"\\\\]+|\\\\\\\\|\\\\.)"+Tt;if(nt.match(new RegExp(Lt),!0))return ae.linkHref}if(ln==="`"){var Jt=Ge.formatting;Le.highlightFormatting&&(Ge.formatting="code"),nt.eatWhile("`");var kn=nt.current().length;if(Ge.code==0&&(!Ge.quote||kn==1))return Ge.code=kn,et(Ge);if(kn==Ge.code){var In=et(Ge);return Ge.code=0,In}else return Ge.formatting=Jt,et(Ge)}else if(Ge.code)return et(Ge);if(ln==="\\"&&(nt.next(),Le.highlightFormatting)){var Qt=et(Ge),Mn=ae.formatting+"-escape";return Qt?Qt+" "+Mn:Mn}if(ln==="!"&&nt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ge.imageMarker=!0,Ge.image=!0,Le.highlightFormatting&&(Ge.formatting="image"),et(Ge);if(ln==="["&&Ge.imageMarker&&nt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ge.imageMarker=!1,Ge.imageAltText=!0,Le.highlightFormatting&&(Ge.formatting="image"),et(Ge);if(ln==="]"&&Ge.imageAltText){Le.highlightFormatting&&(Ge.formatting="image");var Qt=et(Ge);return Ge.imageAltText=!1,Ge.image=!1,Ge.inline=Ge.f=zt,Qt}if(ln==="["&&!Ge.image)return Ge.linkText&&nt.match(/^.*?\]/)||(Ge.linkText=!0,Le.highlightFormatting&&(Ge.formatting="link")),et(Ge);if(ln==="]"&&Ge.linkText){Le.highlightFormatting&&(Ge.formatting="link");var Qt=et(Ge);return Ge.linkText=!1,Ge.inline=Ge.f=nt.match(/\(.*?\)| ?\[.*?\]/,!1)?zt:dt,Qt}if(ln==="<"&&nt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Ke,Le.highlightFormatting&&(Ge.formatting="link");var Qt=et(Ge);return Qt?Qt+=" ":Qt="",Qt+ae.linkInline}if(ln==="<"&&nt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Ke,Le.highlightFormatting&&(Ge.formatting="link");var Qt=et(Ge);return Qt?Qt+=" ":Qt="",Qt+ae.linkEmail}if(Le.xml&&ln==="<"&&nt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Wn=nt.string.indexOf(">",nt.pos);if(Wn!=-1){var zn=nt.string.substring(nt.start,Wn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(zn)&&(Ge.md_inside=!0)}return nt.backUp(1),Ge.htmlState=te.startState(Ce),Te(nt,Ge,Re)}if(Le.xml&&ln==="<"&&nt.match(/^\/\w*?>/))return Ge.md_inside=!1,"tag";if(ln==="*"||ln==="_"){for(var at=1,Oe=nt.pos==1?" ":nt.string.charAt(nt.pos-2);at<3&&nt.eat(ln);)at++;var ke=nt.peek()||" ",Be=!/\s/.test(ke)&&(!ve.test(ke)||/\s/.test(Oe)||ve.test(Oe)),Ne=!/\s/.test(Oe)&&(!ve.test(Oe)||/\s/.test(ke)||ve.test(ke)),we=null,rt=null;if(at%2&&(!Ge.em&&Be&&(ln==="*"||!Ne||ve.test(Oe))?we=!0:Ge.em==ln&&Ne&&(ln==="*"||!Be||ve.test(ke))&&(we=!1)),at>1&&(!Ge.strong&&Be&&(ln==="*"||!Ne||ve.test(Oe))?rt=!0:Ge.strong==ln&&Ne&&(ln==="*"||!Be||ve.test(ke))&&(rt=!1)),rt!=null||we!=null){Le.highlightFormatting&&(Ge.formatting=we==null?"strong":rt==null?"em":"strong em"),we===!0&&(Ge.em=ln),rt===!0&&(Ge.strong=ln);var In=et(Ge);return we===!1&&(Ge.em=!1),rt===!1&&(Ge.strong=!1),In}}else if(ln===" "&&(nt.eat("*")||nt.eat("_"))){if(nt.peek()===" ")return et(Ge);nt.backUp(1)}if(Le.strikethrough){if(ln==="~"&&nt.eatWhile(ln)){if(Ge.strikethrough){Le.highlightFormatting&&(Ge.formatting="strikethrough");var In=et(Ge);return Ge.strikethrough=!1,In}else if(nt.match(/^[^\s]/,!1))return Ge.strikethrough=!0,Le.highlightFormatting&&(Ge.formatting="strikethrough"),et(Ge)}else if(ln===" "&&nt.match(/^~~/,!0)){if(nt.peek()===" ")return et(Ge);nt.backUp(2)}}if(Le.emoji&&ln===":"&&nt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ge.emoji=!0,Le.highlightFormatting&&(Ge.formatting="emoji");var It=et(Ge);return Ge.emoji=!1,It}return ln===" "&&(nt.match(/^ +$/,!1)?Ge.trailingSpace++:Ge.trailingSpace&&(Ge.trailingSpaceNewLine=!0)),et(Ge)}function Ke(nt,Ge){var jt=nt.next();if(jt===">"){Ge.f=Ge.inline=dt,Le.highlightFormatting&&(Ge.formatting="link");var yn=et(Ge);return yn?yn+=" ":yn="",yn+ae.linkInline}return nt.match(/^[^>]+/,!0),ae.linkInline}function zt(nt,Ge){if(nt.eatSpace())return null;var jt=nt.next();return jt==="("||jt==="["?(Ge.f=Ge.inline=Kt(jt==="("?")":"]"),Le.highlightFormatting&&(Ge.formatting="link-string"),Ge.linkHref=!0,et(Ge)):"error"}var pt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Kt(nt){return function(Ge,jt){var yn=Ge.next();if(yn===nt){jt.f=jt.inline=dt,Le.highlightFormatting&&(jt.formatting="link-string");var ln=et(jt);return jt.linkHref=!1,ln}return Ge.match(pt[nt]),jt.linkHref=!0,et(jt)}}function Ze(nt,Ge){return nt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ge.f=tt,nt.next(),Le.highlightFormatting&&(Ge.formatting="link"),Ge.linkText=!0,et(Ge)):$e(nt,Ge,dt)}function tt(nt,Ge){if(nt.match(/^\]:/,!0)){Ge.f=Ge.inline=ft,Le.highlightFormatting&&(Ge.formatting="link");var jt=et(Ge);return Ge.linkText=!1,jt}return nt.match(/^([^\]\\]|\\.)+/,!0),ae.linkText}function ft(nt,Ge){return nt.eatSpace()?null:(nt.match(/^[^\s]+/,!0),nt.peek()===void 0?Ge.linkTitle=!0:nt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ge.f=Ge.inline=dt,ae.linkHref+" url")}var Ut={startState:function(){return{f:be,prevLine:{stream:null},thisLine:{stream:null},block:be,htmlState:null,indentation:0,inline:dt,text:Ye,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(nt){return{f:nt.f,prevLine:nt.prevLine,thisLine:nt.thisLine,block:nt.block,htmlState:nt.htmlState&&te.copyState(Ce,nt.htmlState),indentation:nt.indentation,localMode:nt.localMode,localState:nt.localMode?te.copyState(nt.localMode,nt.localState):null,inline:nt.inline,text:nt.text,formatting:!1,linkText:nt.linkText,linkTitle:nt.linkTitle,linkHref:nt.linkHref,code:nt.code,em:nt.em,strong:nt.strong,strikethrough:nt.strikethrough,emoji:nt.emoji,header:nt.header,setext:nt.setext,hr:nt.hr,taskList:nt.taskList,list:nt.list,listStack:nt.listStack.slice(0),quote:nt.quote,indentedCode:nt.indentedCode,trailingSpace:nt.trailingSpace,trailingSpaceNewLine:nt.trailingSpaceNewLine,md_inside:nt.md_inside,fencedEndRE:nt.fencedEndRE}},token:function(nt,Ge){if(Ge.formatting=!1,nt!=Ge.thisLine.stream){if(Ge.header=0,Ge.hr=!1,nt.match(/^\s*$/,!0))return Ee(Ge),null;if(Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:nt},Ge.taskList=!1,Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,!Ge.localState&&(Ge.f=Ge.block,Ge.f!=Re)){var jt=nt.match(/^\s*/,!0)[0].replace(/\t/g,Fe).length;if(Ge.indentation=jt,Ge.indentationDiff=null,jt>0)return null}}return Ge.f(nt,Ge)},innerMode:function(nt){return nt.block==Re?{state:nt.htmlState,mode:Ce}:nt.localState?{state:nt.localState,mode:nt.localMode}:{state:nt,mode:Ut}},indent:function(nt,Ge,jt){return nt.block==Re&&Ce.indent?Ce.indent(nt.htmlState,Ge,jt):nt.localState&&nt.localMode.indent?nt.localMode.indent(nt.localState,Ge,jt):te.Pass},blankLine:Ee,getType:et,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ut},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},52539:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){"use strict";te.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Se=0;Se<te.modeInfo.length;Se++){var Le=te.modeInfo[Se];Le.mimes&&(Le.mime=Le.mimes[0])}te.findModeByMIME=function(Ce){Ce=Ce.toLowerCase();for(var ce=0;ce<te.modeInfo.length;ce++){var fe=te.modeInfo[ce];if(fe.mime==Ce)return fe;if(fe.mimes){for(var ae=0;ae<fe.mimes.length;ae++)if(fe.mimes[ae]==Ce)return fe}}if(/\+xml$/.test(Ce))return te.findModeByMIME("application/xml");if(/\+json$/.test(Ce))return te.findModeByMIME("application/json")},te.findModeByExtension=function(Ce){Ce=Ce.toLowerCase();for(var ce=0;ce<te.modeInfo.length;ce++){var fe=te.modeInfo[ce];if(fe.ext){for(var ae=0;ae<fe.ext.length;ae++)if(fe.ext[ae]==Ce)return fe}}},te.findModeByFileName=function(Ce){for(var ce=0;ce<te.modeInfo.length;ce++){var fe=te.modeInfo[ce];if(fe.file&&fe.file.test(Ce))return fe}var ae=Ce.lastIndexOf("."),le=ae>-1&&Ce.substring(ae+1,Ce.length);if(le)return te.findModeByExtension(le)},te.findModeByName=function(Ce){Ce=Ce.toLowerCase();for(var ce=0;ce<te.modeInfo.length;ce++){var fe=te.modeInfo[ce];if(fe.name.toLowerCase()==Ce)return fe;if(fe.alias){for(var ae=0;ae<fe.alias.length;ae++)if(fe.alias[ae].toLowerCase()==Ce)return fe}}}})},80785:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){"use strict";te.defineMode("stex",function(Se,Le){"use strict";function Ce(ye,_e){ye.cmdState.push(_e)}function ce(ye){return ye.cmdState.length>0?ye.cmdState[ye.cmdState.length-1]:null}function fe(ye){var _e=ye.cmdState.pop();_e&&_e.closeBracket()}function ae(ye){for(var _e=ye.cmdState,Me=_e.length-1;Me>=0;Me--){var ve=_e[Me];if(ve.name!="DEFAULT")return ve}return{styleIdentifier:function(){return null}}}function le(ye,_e,Me){return function(){this.name=ye,this.bracketNo=0,this.style=_e,this.styles=Me,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var re={};re.importmodule=le("importmodule","tag",["string","builtin"]),re.documentclass=le("documentclass","tag",["","atom"]),re.usepackage=le("usepackage","tag",["atom"]),re.begin=le("begin","tag",["atom"]),re.end=le("end","tag",["atom"]),re.label=le("label","tag",["atom"]),re.ref=le("ref","tag",["atom"]),re.eqref=le("eqref","tag",["atom"]),re.cite=le("cite","tag",["atom"]),re.bibitem=le("bibitem","tag",["atom"]),re.Bibitem=le("Bibitem","tag",["atom"]),re.RBibitem=le("RBibitem","tag",["atom"]),re.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(ye,_e){ye.f=_e}function he(ye,_e){var Me;if(ye.match(/^\\[a-zA-Z@]+/)){var ve=ye.current().slice(1);return Me=re.hasOwnProperty(ve)?re[ve]:re.DEFAULT,Me=new Me,Ce(_e,Me),de(_e,se),Me.style}if(ye.match(/^\\[$&%#{}_]/)||ye.match(/^\\[,;!\/\\]/))return"tag";if(ye.match("\\["))return de(_e,function($e,Te){return me($e,Te,"\\]")}),"keyword";if(ye.match("\\("))return de(_e,function($e,Te){return me($e,Te,"\\)")}),"keyword";if(ye.match("$$"))return de(_e,function($e,Te){return me($e,Te,"$$")}),"keyword";if(ye.match("$"))return de(_e,function($e,Te){return me($e,Te,"$")}),"keyword";var Fe=ye.next();if(Fe=="%")return ye.skipToEnd(),"comment";if(Fe=="}"||Fe=="]"){if(Me=ce(_e),Me)Me.closeBracket(Fe),de(_e,se);else return"error";return"bracket"}else return Fe=="{"||Fe=="["?(Me=re.DEFAULT,Me=new Me,Ce(_e,Me),"bracket"):/\d/.test(Fe)?(ye.eatWhile(/[\w.%]/),"atom"):(ye.eatWhile(/[\w\-_]/),Me=ae(_e),Me.name=="begin"&&(Me.argument=ye.current()),Me.styleIdentifier())}function me(ye,_e,Me){if(ye.eatSpace())return null;if(Me&&ye.match(Me))return de(_e,he),"keyword";if(ye.match(/^\\[a-zA-Z@]+/))return"tag";if(ye.match(/^[a-zA-Z]+/))return"variable-2";if(ye.match(/^\\[$&%#{}_]/)||ye.match(/^\\[,;!\/]/)||ye.match(/^[\^_&]/))return"tag";if(ye.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ye.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ve=ye.next();return ve=="{"||ve=="}"||ve=="["||ve=="]"||ve=="("||ve==")"?"bracket":ve=="%"?(ye.skipToEnd(),"comment"):"error"}function se(ye,_e){var Me=ye.peek(),ve;return Me=="{"||Me=="["?(ve=ce(_e),ve.openBracket(Me),ye.eat(Me),de(_e,he),"bracket"):/[ \t\r]/.test(Me)?(ye.eat(Me),null):(de(_e,he),fe(_e),he(ye,_e))}return{startState:function(){var ye=Le.inMathMode?function(_e,Me){return me(_e,Me)}:he;return{cmdState:[],f:ye}},copyState:function(ye){return{cmdState:ye.cmdState.slice(),f:ye.f}},token:function(ye,_e){return _e.f(ye,_e)},blankLine:function(ye){ye.f=he,ye.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},29589:function(dn,St,ee){(function(te){te(ee(4631))})(function(te){"use strict";var Se={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},Le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(Ce,ce){var fe=Ce.indentUnit,ae={},le=ce.htmlMode?Se:Le;for(var re in le)ae[re]=le[re];for(var re in ce)ae[re]=ce[re];var de,he;function me(Ke,zt){function pt(tt){return zt.tokenize=tt,tt(Ke,zt)}var Kt=Ke.next();if(Kt=="<")return Ke.eat("!")?Ke.eat("[")?Ke.match("CDATA[")?pt(_e("atom","]]>")):null:Ke.match("--")?pt(_e("comment","-->")):Ke.match("DOCTYPE",!0,!0)?(Ke.eatWhile(/[\w\._\-]/),pt(Me(1))):null:Ke.eat("?")?(Ke.eatWhile(/[\w\._\-]/),zt.tokenize=_e("meta","?>"),"meta"):(de=Ke.eat("/")?"closeTag":"openTag",zt.tokenize=se,"tag bracket");if(Kt=="&"){var Ze;return Ke.eat("#")?Ke.eat("x")?Ze=Ke.eatWhile(/[a-fA-F\d]/)&&Ke.eat(";"):Ze=Ke.eatWhile(/[\d]/)&&Ke.eat(";"):Ze=Ke.eatWhile(/[\w\.\-:]/)&&Ke.eat(";"),Ze?"atom":"error"}else return Ke.eatWhile(/[^&<]/),null}me.isInText=!0;function se(Ke,zt){var pt=Ke.next();if(pt==">"||pt=="/"&&Ke.eat(">"))return zt.tokenize=me,de=pt==">"?"endTag":"selfcloseTag","tag bracket";if(pt=="=")return de="equals",null;if(pt=="<"){zt.tokenize=me,zt.state=Te,zt.tagName=zt.tagStart=null;var Kt=zt.tokenize(Ke,zt);return Kt?Kt+" tag error":"tag error"}else return/[\'\"]/.test(pt)?(zt.tokenize=ye(pt),zt.stringStartCol=Ke.column(),zt.tokenize(Ke,zt)):(Ke.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ye(Ke){var zt=function(pt,Kt){for(;!pt.eol();)if(pt.next()==Ke){Kt.tokenize=se;break}return"string"};return zt.isInAttribute=!0,zt}function _e(Ke,zt){return function(pt,Kt){for(;!pt.eol();){if(pt.match(zt)){Kt.tokenize=me;break}pt.next()}return Ke}}function Me(Ke){return function(zt,pt){for(var Kt;(Kt=zt.next())!=null;){if(Kt=="<")return pt.tokenize=Me(Ke+1),pt.tokenize(zt,pt);if(Kt==">")if(Ke==1){pt.tokenize=me;break}else return pt.tokenize=Me(Ke-1),pt.tokenize(zt,pt)}return"meta"}}function ve(Ke,zt,pt){this.prev=Ke.context,this.tagName=zt,this.indent=Ke.indented,this.startOfLine=pt,(ae.doNotIndent.hasOwnProperty(zt)||Ke.context&&Ke.context.noIndent)&&(this.noIndent=!0)}function Fe(Ke){Ke.context&&(Ke.context=Ke.context.prev)}function $e(Ke,zt){for(var pt;;){if(!Ke.context||(pt=Ke.context.tagName,!ae.contextGrabbers.hasOwnProperty(pt)||!ae.contextGrabbers[pt].hasOwnProperty(zt)))return;Fe(Ke)}}function Te(Ke,zt,pt){return Ke=="openTag"?(pt.tagStart=zt.column(),ze):Ke=="closeTag"?Ee:Te}function ze(Ke,zt,pt){return Ke=="word"?(pt.tagName=zt.current(),he="tag",De):ae.allowMissingTagName&&Ke=="endTag"?(he="tag bracket",De(Ke,zt,pt)):(he="error",ze)}function Ee(Ke,zt,pt){if(Ke=="word"){var Kt=zt.current();return pt.context&&pt.context.tagName!=Kt&&ae.implicitlyClosed.hasOwnProperty(pt.context.tagName)&&Fe(pt),pt.context&&pt.context.tagName==Kt||ae.matchClosing===!1?(he="tag",be):(he="tag error",Re)}else return ae.allowMissingTagName&&Ke=="endTag"?(he="tag bracket",be(Ke,zt,pt)):(he="error",Re)}function be(Ke,zt,pt){return Ke!="endTag"?(he="error",be):(Fe(pt),Te)}function Re(Ke,zt,pt){return he="error",be(Ke,zt,pt)}function De(Ke,zt,pt){if(Ke=="word")return he="attribute",et;if(Ke=="endTag"||Ke=="selfcloseTag"){var Kt=pt.tagName,Ze=pt.tagStart;return pt.tagName=pt.tagStart=null,Ke=="selfcloseTag"||ae.autoSelfClosers.hasOwnProperty(Kt)?$e(pt,Kt):($e(pt,Kt),pt.context=new ve(pt,Kt,Ze==pt.indented)),Te}return he="error",De}function et(Ke,zt,pt){return Ke=="equals"?Ye:(ae.allowMissing||(he="error"),De(Ke,zt,pt))}function Ye(Ke,zt,pt){return Ke=="string"?dt:Ke=="word"&&ae.allowUnquoted?(he="string",De):(he="error",De(Ke,zt,pt))}function dt(Ke,zt,pt){return Ke=="string"?dt:De(Ke,zt,pt)}return{startState:function(Ke){var zt={tokenize:me,state:Te,indented:Ke||0,tagName:null,tagStart:null,context:null};return Ke!=null&&(zt.baseIndent=Ke),zt},token:function(Ke,zt){if(!zt.tagName&&Ke.sol()&&(zt.indented=Ke.indentation()),Ke.eatSpace())return null;de=null;var pt=zt.tokenize(Ke,zt);return(pt||de)&&pt!="comment"&&(he=null,zt.state=zt.state(de||pt,Ke,zt),he&&(pt=he=="error"?pt+" error":he)),pt},indent:function(Ke,zt,pt){var Kt=Ke.context;if(Ke.tokenize.isInAttribute)return Ke.tagStart==Ke.indented?Ke.stringStartCol+1:Ke.indented+fe;if(Kt&&Kt.noIndent)return te.Pass;if(Ke.tokenize!=se&&Ke.tokenize!=me)return pt?pt.match(/^(\s*)/)[0].length:0;if(Ke.tagName)return ae.multilineTagIndentPastTag!==!1?Ke.tagStart+Ke.tagName.length+2:Ke.tagStart+fe*(ae.multilineTagIndentFactor||1);if(ae.alignCDATA&&/<!\[CDATA\[/.test(zt))return 0;var Ze=zt&&/^<(\/)?([\w_:\.-]*)/.exec(zt);if(Ze&&Ze[1])for(;Kt;)if(Kt.tagName==Ze[2]){Kt=Kt.prev;break}else if(ae.implicitlyClosed.hasOwnProperty(Kt.tagName))Kt=Kt.prev;else break;else if(Ze)for(;Kt;){var tt=ae.contextGrabbers[Kt.tagName];if(tt&&tt.hasOwnProperty(Ze[2]))Kt=Kt.prev;else break}for(;Kt&&Kt.prev&&!Kt.startOfLine;)Kt=Kt.prev;return Kt?Kt.indent+fe:Ke.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ae.htmlMode?"html":"xml",helperType:ae.htmlMode?"html":"xml",skipAttribute:function(Ke){Ke.state==Ye&&(Ke.state=De)},xmlCurrentTag:function(Ke){return Ke.tagName?{name:Ke.tagName,close:Ke.type=="closeTag"}:null},xmlCurrentContext:function(Ke){for(var zt=[],pt=Ke.context;pt;pt=pt.prev)pt.tagName&&zt.push(pt.tagName);return zt.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},82702:function(dn,St,ee){var te=ee(34155);(function(Se,Le){dn.exports=Le()})(this,function(){"use strict";function Se(Ct){var $t=typeof Ct;return Ct!==null&&($t==="object"||$t==="function")}function Le(Ct){return typeof Ct=="function"}var Ce=void 0;Array.isArray?Ce=Array.isArray:Ce=function(Ct){return Object.prototype.toString.call(Ct)==="[object Array]"};var ce=Ce,fe=0,ae=void 0,le=void 0,re=function($t,Vt){Ee[fe]=$t,Ee[fe+1]=Vt,fe+=2,fe===2&&(le?le(be):De())};function de(Ct){le=Ct}function he(Ct){re=Ct}var me=typeof window!="undefined"?window:void 0,se=me||{},ye=se.MutationObserver||se.WebKitMutationObserver,_e=typeof self=="undefined"&&typeof te!="undefined"&&{}.toString.call(te)==="[object process]",Me=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function ve(){return function(){return te.nextTick(be)}}function Fe(){return typeof ae!="undefined"?function(){ae(be)}:ze()}function $e(){var Ct=0,$t=new ye(be),Vt=document.createTextNode("");return $t.observe(Vt,{characterData:!0}),function(){Vt.data=Ct=++Ct%2}}function Te(){var Ct=new MessageChannel;return Ct.port1.onmessage=be,function(){return Ct.port2.postMessage(0)}}function ze(){var Ct=setTimeout;return function(){return Ct(be,1)}}var Ee=new Array(1e3);function be(){for(var Ct=0;Ct<fe;Ct+=2){var $t=Ee[Ct],Vt=Ee[Ct+1];$t(Vt),Ee[Ct]=void 0,Ee[Ct+1]=void 0}fe=0}function Re(){try{var Ct=Function("return this")().require("vertx");return ae=Ct.runOnLoop||Ct.runOnContext,Fe()}catch($t){return ze()}}var De=void 0;_e?De=ve():ye?De=$e():Me?De=Te():me===void 0?De=Re():De=ze();function et(Ct,$t){var Vt=this,wt=new this.constructor(Ke);wt[dt]===void 0&&Wn(wt);var on=Vt._state;if(on){var Dt=arguments[on-1];re(function(){return kn(on,wt,Dt,Vt._result)})}else Lt(Vt,wt,Ct,$t);return wt}function Ye(Ct){var $t=this;if(Ct&&typeof Ct=="object"&&Ct.constructor===$t)return Ct;var Vt=new $t(Ke);return jt(Vt,Ct),Vt}var dt=Math.random().toString(36).substring(2);function Ke(){}var zt=void 0,pt=1,Kt=2;function Ze(){return new TypeError("You cannot resolve a promise with itself")}function tt(){return new TypeError("A promises callback cannot return that same promise.")}function ft(Ct,$t,Vt,wt){try{Ct.call($t,Vt,wt)}catch(on){return on}}function Ut(Ct,$t,Vt){re(function(wt){var on=!1,Dt=ft(Vt,$t,function(Xt){on||(on=!0,$t!==Xt?jt(wt,Xt):ln(wt,Xt))},function(Xt){on||(on=!0,Tt(wt,Xt))},"Settle: "+(wt._label||" unknown promise"));!on&&Dt&&(on=!0,Tt(wt,Dt))},Ct)}function nt(Ct,$t){$t._state===pt?ln(Ct,$t._result):$t._state===Kt?Tt(Ct,$t._result):Lt($t,void 0,function(Vt){return jt(Ct,Vt)},function(Vt){return Tt(Ct,Vt)})}function Ge(Ct,$t,Vt){$t.constructor===Ct.constructor&&Vt===et&&$t.constructor.resolve===Ye?nt(Ct,$t):Vt===void 0?ln(Ct,$t):Le(Vt)?Ut(Ct,$t,Vt):ln(Ct,$t)}function jt(Ct,$t){if(Ct===$t)Tt(Ct,Ze());else if(Se($t)){var Vt=void 0;try{Vt=$t.then}catch(wt){Tt(Ct,wt);return}Ge(Ct,$t,Vt)}else ln(Ct,$t)}function yn(Ct){Ct._onerror&&Ct._onerror(Ct._result),Jt(Ct)}function ln(Ct,$t){Ct._state===zt&&(Ct._result=$t,Ct._state=pt,Ct._subscribers.length!==0&&re(Jt,Ct))}function Tt(Ct,$t){Ct._state===zt&&(Ct._state=Kt,Ct._result=$t,re(yn,Ct))}function Lt(Ct,$t,Vt,wt){var on=Ct._subscribers,Dt=on.length;Ct._onerror=null,on[Dt]=$t,on[Dt+pt]=Vt,on[Dt+Kt]=wt,Dt===0&&Ct._state&&re(Jt,Ct)}function Jt(Ct){var $t=Ct._subscribers,Vt=Ct._state;if($t.length!==0){for(var wt=void 0,on=void 0,Dt=Ct._result,Xt=0;Xt<$t.length;Xt+=3)wt=$t[Xt],on=$t[Xt+Vt],wt?kn(Vt,wt,on,Dt):on(Dt);Ct._subscribers.length=0}}function kn(Ct,$t,Vt,wt){var on=Le(Vt),Dt=void 0,Xt=void 0,nn=!0;if(on){try{Dt=Vt(wt)}catch(bn){nn=!1,Xt=bn}if($t===Dt){Tt($t,tt());return}}else Dt=wt;$t._state!==zt||(on&&nn?jt($t,Dt):nn===!1?Tt($t,Xt):Ct===pt?ln($t,Dt):Ct===Kt&&Tt($t,Dt))}function In(Ct,$t){try{$t(function(wt){jt(Ct,wt)},function(wt){Tt(Ct,wt)})}catch(Vt){Tt(Ct,Vt)}}var Qt=0;function Mn(){return Qt++}function Wn(Ct){Ct[dt]=Qt++,Ct._state=void 0,Ct._result=void 0,Ct._subscribers=[]}function zn(){return new Error("Array Methods must be provided an Array")}var at=function(){function Ct($t,Vt){this._instanceConstructor=$t,this.promise=new $t(Ke),this.promise[dt]||Wn(this.promise),ce(Vt)?(this.length=Vt.length,this._remaining=Vt.length,this._result=new Array(this.length),this.length===0?ln(this.promise,this._result):(this.length=this.length||0,this._enumerate(Vt),this._remaining===0&&ln(this.promise,this._result))):Tt(this.promise,zn())}return Ct.prototype._enumerate=function(Vt){for(var wt=0;this._state===zt&&wt<Vt.length;wt++)this._eachEntry(Vt[wt],wt)},Ct.prototype._eachEntry=function(Vt,wt){var on=this._instanceConstructor,Dt=on.resolve;if(Dt===Ye){var Xt=void 0,nn=void 0,bn=!1;try{Xt=Vt.then}catch(Zn){bn=!0,nn=Zn}if(Xt===et&&Vt._state!==zt)this._settledAt(Vt._state,wt,Vt._result);else if(typeof Xt!="function")this._remaining--,this._result[wt]=Vt;else if(on===rt){var en=new on(Ke);bn?Tt(en,nn):Ge(en,Vt,Xt),this._willSettleAt(en,wt)}else this._willSettleAt(new on(function(Zn){return Zn(Vt)}),wt)}else this._willSettleAt(Dt(Vt),wt)},Ct.prototype._settledAt=function(Vt,wt,on){var Dt=this.promise;Dt._state===zt&&(this._remaining--,Vt===Kt?Tt(Dt,on):this._result[wt]=on),this._remaining===0&&ln(Dt,this._result)},Ct.prototype._willSettleAt=function(Vt,wt){var on=this;Lt(Vt,void 0,function(Dt){return on._settledAt(pt,wt,Dt)},function(Dt){return on._settledAt(Kt,wt,Dt)})},Ct}();function Oe(Ct){return new at(this,Ct).promise}function ke(Ct){var $t=this;return ce(Ct)?new $t(function(Vt,wt){for(var on=Ct.length,Dt=0;Dt<on;Dt++)$t.resolve(Ct[Dt]).then(Vt,wt)}):new $t(function(Vt,wt){return wt(new TypeError("You must pass an array to race."))})}function Be(Ct){var $t=this,Vt=new $t(Ke);return Tt(Vt,Ct),Vt}function Ne(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function we(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var rt=function(){function Ct($t){this[dt]=Mn(),this._result=this._state=void 0,this._subscribers=[],Ke!==$t&&(typeof $t!="function"&&Ne(),this instanceof Ct?In(this,$t):we())}return Ct.prototype.catch=function(Vt){return this.then(null,Vt)},Ct.prototype.finally=function(Vt){var wt=this,on=wt.constructor;return Le(Vt)?wt.then(function(Dt){return on.resolve(Vt()).then(function(){return Dt})},function(Dt){return on.resolve(Vt()).then(function(){throw Dt})}):wt.then(Vt,Vt)},Ct}();rt.prototype.then=et,rt.all=Oe,rt.race=ke,rt.resolve=Ye,rt.reject=Be,rt._setScheduler=de,rt._setAsap=he,rt._asap=re;function It(){var Ct=void 0;if(typeof ee.g!="undefined")Ct=ee.g;else if(typeof self!="undefined")Ct=self;else try{Ct=Function("return this")()}catch(wt){throw new Error("polyfill failed because global object is unavailable in this environment")}var $t=Ct.Promise;if($t){var Vt=null;try{Vt=Object.prototype.toString.call($t.resolve())}catch(wt){}if(Vt==="[object Promise]"&&!$t.cast)return}Ct.Promise=rt}return rt.polyfill=It,rt.Promise=rt,rt})},17187:function(dn){"use strict";var St=typeof Reflect=="object"?Reflect:null,ee=St&&typeof St.apply=="function"?St.apply:function(Te,ze,Ee){return Function.prototype.apply.call(Te,ze,Ee)},te;St&&typeof St.ownKeys=="function"?te=St.ownKeys:Object.getOwnPropertySymbols?te=function(Te){return Object.getOwnPropertyNames(Te).concat(Object.getOwnPropertySymbols(Te))}:te=function(Te){return Object.getOwnPropertyNames(Te)};function Se($e){console&&console.warn&&console.warn($e)}var Le=Number.isNaN||function(Te){return Te!==Te};function Ce(){Ce.init.call(this)}dn.exports=Ce,dn.exports.once=Me,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._eventsCount=0,Ce.prototype._maxListeners=void 0;var ce=10;function fe($e){if(typeof $e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof $e)}Object.defineProperty(Ce,"defaultMaxListeners",{enumerable:!0,get:function(){return ce},set:function($e){if(typeof $e!="number"||$e<0||Le($e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$e+".");ce=$e}}),Ce.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ce.prototype.setMaxListeners=function(Te){if(typeof Te!="number"||Te<0||Le(Te))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Te+".");return this._maxListeners=Te,this};function ae($e){return $e._maxListeners===void 0?Ce.defaultMaxListeners:$e._maxListeners}Ce.prototype.getMaxListeners=function(){return ae(this)},Ce.prototype.emit=function(Te){for(var ze=[],Ee=1;Ee<arguments.length;Ee++)ze.push(arguments[Ee]);var be=Te==="error",Re=this._events;if(Re!==void 0)be=be&&Re.error===void 0;else if(!be)return!1;if(be){var De;if(ze.length>0&&(De=ze[0]),De instanceof Error)throw De;var et=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw et.context=De,et}var Ye=Re[Te];if(Ye===void 0)return!1;if(typeof Ye=="function")ee(Ye,this,ze);else for(var dt=Ye.length,Ke=se(Ye,dt),Ee=0;Ee<dt;++Ee)ee(Ke[Ee],this,ze);return!0};function le($e,Te,ze,Ee){var be,Re,De;if(fe(ze),Re=$e._events,Re===void 0?(Re=$e._events=Object.create(null),$e._eventsCount=0):(Re.newListener!==void 0&&($e.emit("newListener",Te,ze.listener?ze.listener:ze),Re=$e._events),De=Re[Te]),De===void 0)De=Re[Te]=ze,++$e._eventsCount;else if(typeof De=="function"?De=Re[Te]=Ee?[ze,De]:[De,ze]:Ee?De.unshift(ze):De.push(ze),be=ae($e),be>0&&De.length>be&&!De.warned){De.warned=!0;var et=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(Te)+" listeners added. Use emitter.setMaxListeners() to increase limit");et.name="MaxListenersExceededWarning",et.emitter=$e,et.type=Te,et.count=De.length,Se(et)}return $e}Ce.prototype.addListener=function(Te,ze){return le(this,Te,ze,!1)},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.prependListener=function(Te,ze){return le(this,Te,ze,!0)};function re(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function de($e,Te,ze){var Ee={fired:!1,wrapFn:void 0,target:$e,type:Te,listener:ze},be=re.bind(Ee);return be.listener=ze,Ee.wrapFn=be,be}Ce.prototype.once=function(Te,ze){return fe(ze),this.on(Te,de(this,Te,ze)),this},Ce.prototype.prependOnceListener=function(Te,ze){return fe(ze),this.prependListener(Te,de(this,Te,ze)),this},Ce.prototype.removeListener=function(Te,ze){var Ee,be,Re,De,et;if(fe(ze),be=this._events,be===void 0)return this;if(Ee=be[Te],Ee===void 0)return this;if(Ee===ze||Ee.listener===ze)--this._eventsCount===0?this._events=Object.create(null):(delete be[Te],be.removeListener&&this.emit("removeListener",Te,Ee.listener||ze));else if(typeof Ee!="function"){for(Re=-1,De=Ee.length-1;De>=0;De--)if(Ee[De]===ze||Ee[De].listener===ze){et=Ee[De].listener,Re=De;break}if(Re<0)return this;Re===0?Ee.shift():ye(Ee,Re),Ee.length===1&&(be[Te]=Ee[0]),be.removeListener!==void 0&&this.emit("removeListener",Te,et||ze)}return this},Ce.prototype.off=Ce.prototype.removeListener,Ce.prototype.removeAllListeners=function(Te){var ze,Ee,be;if(Ee=this._events,Ee===void 0)return this;if(Ee.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ee[Te]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ee[Te]),this;if(arguments.length===0){var Re=Object.keys(Ee),De;for(be=0;be<Re.length;++be)De=Re[be],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ze=Ee[Te],typeof ze=="function")this.removeListener(Te,ze);else if(ze!==void 0)for(be=ze.length-1;be>=0;be--)this.removeListener(Te,ze[be]);return this};function he($e,Te,ze){var Ee=$e._events;if(Ee===void 0)return[];var be=Ee[Te];return be===void 0?[]:typeof be=="function"?ze?[be.listener||be]:[be]:ze?_e(be):se(be,be.length)}Ce.prototype.listeners=function(Te){return he(this,Te,!0)},Ce.prototype.rawListeners=function(Te){return he(this,Te,!1)},Ce.listenerCount=function($e,Te){return typeof $e.listenerCount=="function"?$e.listenerCount(Te):me.call($e,Te)},Ce.prototype.listenerCount=me;function me($e){var Te=this._events;if(Te!==void 0){var ze=Te[$e];if(typeof ze=="function")return 1;if(ze!==void 0)return ze.length}return 0}Ce.prototype.eventNames=function(){return this._eventsCount>0?te(this._events):[]};function se($e,Te){for(var ze=new Array(Te),Ee=0;Ee<Te;++Ee)ze[Ee]=$e[Ee];return ze}function ye($e,Te){for(;Te+1<$e.length;Te++)$e[Te]=$e[Te+1];$e.pop()}function _e($e){for(var Te=new Array($e.length),ze=0;ze<Te.length;++ze)Te[ze]=$e[ze].listener||$e[ze];return Te}function Me($e,Te){return new Promise(function(ze,Ee){function be(De){$e.removeListener(Te,Re),Ee(De)}function Re(){typeof $e.removeListener=="function"&&$e.removeListener("error",be),ze([].slice.call(arguments))}Fe($e,Te,Re,{once:!0}),Te!=="error"&&ve($e,be,{once:!0})})}function ve($e,Te,ze){typeof $e.on=="function"&&Fe($e,"error",Te,ze)}function Fe($e,Te,ze,Ee){if(typeof $e.on=="function")Ee.once?$e.once(Te,ze):$e.on(Te,ze);else if(typeof $e.addEventListener=="function")$e.addEventListener(Te,function be(Re){Ee.once&&$e.removeEventListener(Te,be),ze(Re)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $e)}},19575:function(dn,St,ee){var te,Se;(function(Le,Ce){dn.exports=Ce(Le)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ee.g!="undefined"?ee.g:this,function(Le){"use strict";Le=Le||{};var Ce=Le.Base64,ce="2.6.4",fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ae=function(pt){for(var Kt={},Ze=0,tt=pt.length;Ze<tt;Ze++)Kt[pt.charAt(Ze)]=Ze;return Kt}(fe),le=String.fromCharCode,re=function(pt){if(pt.length<2){var Kt=pt.charCodeAt(0);return Kt<128?pt:Kt<2048?le(192|Kt>>>6)+le(128|Kt&63):le(224|Kt>>>12&15)+le(128|Kt>>>6&63)+le(128|Kt&63)}else{var Kt=65536+(pt.charCodeAt(0)-55296)*1024+(pt.charCodeAt(1)-56320);return le(240|Kt>>>18&7)+le(128|Kt>>>12&63)+le(128|Kt>>>6&63)+le(128|Kt&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,he=function(pt){return pt.replace(de,re)},me=function(pt){var Kt=[0,2,1][pt.length%3],Ze=pt.charCodeAt(0)<<16|(pt.length>1?pt.charCodeAt(1):0)<<8|(pt.length>2?pt.charCodeAt(2):0),tt=[fe.charAt(Ze>>>18),fe.charAt(Ze>>>12&63),Kt>=2?"=":fe.charAt(Ze>>>6&63),Kt>=1?"=":fe.charAt(Ze&63)];return tt.join("")},se=Le.btoa&&typeof Le.btoa=="function"?function(pt){return Le.btoa(pt)}:function(pt){if(pt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return pt.replace(/[\s\S]{1,3}/g,me)},ye=function(pt){return se(he(String(pt)))},_e=function(pt){return pt.replace(/[+\/]/g,function(Kt){return Kt=="+"?"-":"_"}).replace(/=/g,"")},Me=function(pt,Kt){return Kt?_e(ye(pt)):ye(pt)},ve=function(pt){return Me(pt,!0)},Fe;Le.Uint8Array&&(Fe=function(pt,Kt){for(var Ze="",tt=0,ft=pt.length;tt<ft;tt+=3){var Ut=pt[tt],nt=pt[tt+1],Ge=pt[tt+2],jt=Ut<<16|nt<<8|Ge;Ze+=fe.charAt(jt>>>18)+fe.charAt(jt>>>12&63)+(typeof nt!="undefined"?fe.charAt(jt>>>6&63):"=")+(typeof Ge!="undefined"?fe.charAt(jt&63):"=")}return Kt?_e(Ze):Ze});var $e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Te=function(pt){switch(pt.length){case 4:var Kt=(7&pt.charCodeAt(0))<<18|(63&pt.charCodeAt(1))<<12|(63&pt.charCodeAt(2))<<6|63&pt.charCodeAt(3),Ze=Kt-65536;return le((Ze>>>10)+55296)+le((Ze&1023)+56320);case 3:return le((15&pt.charCodeAt(0))<<12|(63&pt.charCodeAt(1))<<6|63&pt.charCodeAt(2));default:return le((31&pt.charCodeAt(0))<<6|63&pt.charCodeAt(1))}},ze=function(pt){return pt.replace($e,Te)},Ee=function(pt){var Kt=pt.length,Ze=Kt%4,tt=(Kt>0?ae[pt.charAt(0)]<<18:0)|(Kt>1?ae[pt.charAt(1)]<<12:0)|(Kt>2?ae[pt.charAt(2)]<<6:0)|(Kt>3?ae[pt.charAt(3)]:0),ft=[le(tt>>>16),le(tt>>>8&255),le(tt&255)];return ft.length-=[0,0,2,1][Ze],ft.join("")},be=Le.atob&&typeof Le.atob=="function"?function(pt){return Le.atob(pt)}:function(pt){return pt.replace(/\S{1,4}/g,Ee)},Re=function(pt){return be(String(pt).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(pt){return ze(be(pt))},et=function(pt){return String(pt).replace(/[-_]/g,function(Kt){return Kt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ye=function(pt){return De(et(pt))},dt;Le.Uint8Array&&(dt=function(pt){return Uint8Array.from(Re(et(pt)),function(Kt){return Kt.charCodeAt(0)})});var Ke=function(){var pt=Le.Base64;return Le.Base64=Ce,pt};if(Le.Base64={VERSION:ce,atob:Re,btoa:se,fromBase64:Ye,toBase64:Me,utob:he,encode:Me,encodeURI:ve,btou:ze,decode:Ye,noConflict:Ke,fromUint8Array:Fe,toUint8Array:dt},typeof Object.defineProperty=="function"){var zt=function(pt){return{value:pt,enumerable:!1,writable:!0,configurable:!0}};Le.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",zt(function(){return Ye(this)})),Object.defineProperty(String.prototype,"toBase64",zt(function(pt){return Me(this,pt)})),Object.defineProperty(String.prototype,"toBase64URI",zt(function(){return Me(this,!0)}))}}return Le.Meteor&&(Base64=Le.Base64),dn.exports?dn.exports.Base64=Le.Base64:(te=[],Se=function(){return Le.Base64}.apply(St,te),Se!==void 0&&(dn.exports=Se)),{Base64:Le.Base64}})},15979:function(dn,St,ee){"use strict";ee.d(St,{hP:function(){return zn}});var te=function(at,Oe){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Be){ke.__proto__=Be}||function(ke,Be){for(var Ne in Be)Object.prototype.hasOwnProperty.call(Be,Ne)&&(ke[Ne]=Be[Ne])})(at,Oe)};function Se(at,Oe){function ke(){this.constructor=at}te(at,Oe),at.prototype=Oe===null?Object.create(Oe):(ke.prototype=Oe.prototype,new ke)}function Le(at,Oe,ke,Be){return new(ke||(ke=Promise))(function(Ne,we){function rt($t){try{Ct(Be.next($t))}catch(Vt){we(Vt)}}function It($t){try{Ct(Be.throw($t))}catch(Vt){we(Vt)}}function Ct($t){var Vt;$t.done?Ne($t.value):(Vt=$t.value,Vt instanceof ke?Vt:new ke(function(wt){wt(Vt)})).then(rt,It)}Ct((Be=Be.apply(at,Oe||[])).next())})}function Ce(at,Oe){var ke,Be,Ne,we,rt={label:0,sent:function(){if(1&Ne[0])throw Ne[1];return Ne[1]},trys:[],ops:[]};return we={next:It(0),throw:It(1),return:It(2)},typeof Symbol=="function"&&(we[Symbol.iterator]=function(){return this}),we;function It(Ct){return function($t){return function(Vt){if(ke)throw new TypeError("Generator is already executing.");for(;rt;)try{if(ke=1,Be&&(Ne=2&Vt[0]?Be.return:Vt[0]?Be.throw||((Ne=Be.return)&&Ne.call(Be),0):Be.next)&&!(Ne=Ne.call(Be,Vt[1])).done)return Ne;switch(Be=0,Ne&&(Vt=[2&Vt[0],Ne.value]),Vt[0]){case 0:case 1:Ne=Vt;break;case 4:return rt.label++,{value:Vt[1],done:!1};case 5:rt.label++,Be=Vt[1],Vt=[0];continue;case 7:Vt=rt.ops.pop(),rt.trys.pop();continue;default:if(Ne=rt.trys,!((Ne=Ne.length>0&&Ne[Ne.length-1])||Vt[0]!==6&&Vt[0]!==2)){rt=0;continue}if(Vt[0]===3&&(!Ne||Vt[1]>Ne[0]&&Vt[1]<Ne[3])){rt.label=Vt[1];break}if(Vt[0]===6&&rt.label<Ne[1]){rt.label=Ne[1],Ne=Vt;break}if(Ne&&rt.label<Ne[2]){rt.label=Ne[2],rt.ops.push(Vt);break}Ne[2]&&rt.ops.pop(),rt.trys.pop();continue}Vt=Oe.call(at,rt)}catch(wt){Vt=[6,wt],Be=0}finally{ke=Ne=0}if(5&Vt[0])throw Vt[1];return{value:Vt[0]?Vt[1]:void 0,done:!0}}([Ct,$t])}}}function ce(){for(var at=0,Oe=0,ke=arguments.length;Oe<ke;Oe++)at+=arguments[Oe].length;var Be=Array(at),Ne=0;for(Oe=0;Oe<ke;Oe++)for(var we=arguments[Oe],rt=0,It=we.length;rt<It;rt++,Ne++)Be[Ne]=we[rt];return Be}var fe=function(){function at(){}return at.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},at.setAttributes=function(Oe,ke){for(var Be=0,Ne=ke;Be<Ne.length;Be++){var we=Ne[Be],rt=we[0],It=we[1];Oe.setAttribute(rt,It)}},at.createRect=function(Oe,ke,Be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ne.setAttribute("width",Oe.toString()),Ne.setAttribute("height",ke.toString()),Be&&at.setAttributes(Ne,Be),Ne},at.createLine=function(Oe,ke,Be,Ne,we){var rt=document.createElementNS("http://www.w3.org/2000/svg","line");return rt.setAttribute("x1",Oe.toString()),rt.setAttribute("y1",ke.toString()),rt.setAttribute("x2",Be.toString()),rt.setAttribute("y2",Ne.toString()),we&&at.setAttributes(rt,we),rt},at.createPolygon=function(Oe,ke){var Be=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Be.setAttribute("points",Oe),ke&&at.setAttributes(Be,ke),Be},at.createCircle=function(Oe,ke){var Be=document.createElementNS("http://www.w3.org/2000/svg","circle");return Be.setAttribute("cx",(Oe/2).toString()),Be.setAttribute("cy",(Oe/2).toString()),Be.setAttribute("r",Oe.toString()),ke&&at.setAttributes(Be,ke),Be},at.createEllipse=function(Oe,ke,Be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ne.setAttribute("cx",(Oe/2).toString()),Ne.setAttribute("cy",(ke/2).toString()),Ne.setAttribute("rx",(Oe/2).toString()),Ne.setAttribute("ry",(ke/2).toString()),Be&&at.setAttributes(Ne,Be),Ne},at.createGroup=function(Oe){var ke=document.createElementNS("http://www.w3.org/2000/svg","g");return Oe&&at.setAttributes(ke,Oe),ke},at.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},at.createMarker=function(Oe,ke,Be,Ne,we,rt,It){var Ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return at.setAttributes(Ct,[["id",Oe],["orient",ke],["markerWidth",Be.toString()],["markerHeight",Ne.toString()],["refX",we.toString()],["refY",rt.toString()]]),Ct.appendChild(It),Ct},at.createText=function(Oe){var ke=document.createElementNS("http://www.w3.org/2000/svg","text");return ke.setAttribute("x","0"),ke.setAttribute("y","0"),Oe&&at.setAttributes(ke,Oe),ke},at.createTSpan=function(Oe,ke){var Be=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Be.textContent=Oe,ke&&at.setAttributes(Be,ke),Be},at.createImage=function(Oe){var ke=document.createElementNS("http://www.w3.org/2000/svg","image");return Oe&&at.setAttributes(ke,Oe),ke},at.createPoint=function(Oe,ke){var Be=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Be.x=Oe,Be.y=ke,Be},at.createPath=function(Oe,ke){var Be=document.createElementNS("http://www.w3.org/2000/svg","path");return Be.setAttribute("d",Oe),ke&&at.setAttributes(Be,ke),Be},at}(),ae=function(){function at(){}return at.addKey=function(Oe){at.key=Oe},Object.defineProperty(at,"isLicensed",{get:function(){return!!at.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(at.key)},enumerable:!1,configurable:!0}),at}(),le=function(){function at(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return at.prototype.rasterize=function(Oe,ke,Be){var Ne=this;return new Promise(function(we){var rt=Be!==void 0?Be:document.createElement("canvas");Oe===null&&(Ne.markersOnly=!0,Ne.naturalSize=!1);var It=document.createElementNS("http://www.w3.org/2000/svg","svg");It.setAttribute("xmlns","http://www.w3.org/2000/svg"),It.setAttribute("width",ke.width.baseVal.valueAsString),It.setAttribute("height",ke.height.baseVal.valueAsString),It.setAttribute("viewBox","0 0 "+ke.viewBox.baseVal.width.toString()+" "+ke.viewBox.baseVal.height.toString()),It.innerHTML=ke.innerHTML,Ne.naturalSize===!0?(It.width.baseVal.value=Oe.naturalWidth,It.height.baseVal.value=Oe.naturalHeight):Ne.width!==void 0&&Ne.height!==void 0&&(It.width.baseVal.value=Ne.width,It.height.baseVal.value=Ne.height),rt.width=It.width.baseVal.value,rt.height=It.height.baseVal.value;var Ct=It.outerHTML,$t=rt.getContext("2d");Ne.markersOnly!==!0&&$t.drawImage(Oe,0,0,rt.width,rt.height);var Vt=window.URL,wt=new Image(rt.width,rt.height);wt.setAttribute("crossOrigin","anonymous");var on=new Blob([Ct],{type:"image/svg+xml"}),Dt=Vt.createObjectURL(on);wt.onload=function(){$t.drawImage(wt,0,0),Vt.revokeObjectURL(Dt);var Xt=rt.toDataURL(Ne.imageType,Ne.imageQuality);we(Xt)},wt.src=Dt})},at}(),re=function(){},de=function(){function at(Oe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Oe+"_"}return Object.defineProperty(at.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(at.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(at.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),at.prototype.addClass=function(Oe){return this.styleSheet===void 0&&this.addStyleSheet(),Oe.name=""+this.classNamePrefix+Oe.localName,this.classes.push(Oe),this.styleSheet.sheet.insertRule("."+Oe.name+" {"+Oe.style+"}",this.styleSheet.sheet.cssRules.length),Oe},at.prototype.addRule=function(Oe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Oe),this.styleSheet.sheet.insertRule(Oe.selector+" {"+Oe.style+"}",this.styleSheet.sheet.cssRules.length)},at.prototype.addStyleSheet=function(){var Oe;this.styleSheet=document.createElement("style"),((Oe=this.styleSheetRoot)!==null&&Oe!==void 0?Oe:document.head).appendChild(this.styleSheet),this.addRule(new he("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new he("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new he("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new me("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new me("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},at.prototype.removeStyleSheet=function(){var Oe;this.styleSheet&&(((Oe=this.styleSheetRoot)!==null&&Oe!==void 0?Oe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},at}(),he=function(at,Oe){this.selector=at,this.style=Oe},me=function(at,Oe){this.localName=at,this.style=Oe},se=function(){function at(Oe,ke,Be,Ne,we){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Oe,this.displayMode=ke,this.markerItems=Be,this.uiStyleSettings=Ne,this.styles=we,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return at.prototype.show=function(Oe){var ke=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Oe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Be=document.createElement("div");Be.className=this.toolbarBlockStyleClass.name,Be.style.whiteSpace="nowrap",this.uiContainer.appendChild(Be),this.addActionButton(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(we){var rt=document.createElement("div");rt.className=""+ke.toolbarButtonStyleClass.name,rt.setAttribute("data-type-name",we.typeName),rt.innerHTML=we.icon,rt.addEventListener("click",function(){ke.markerToolbarButtonClicked(rt,we)}),ke.buttons.push(rt),ke.markerButtons.push(rt)}),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 Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",Ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<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(Ne,'<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()},at.prototype.addButtonClickListener=function(Oe){this.buttonClickListeners.push(Oe)},at.prototype.removeButtonClickListener=function(Oe){this.buttonClickListeners.indexOf(Oe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Oe),1)},at.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},at.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Oe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ke=0;ke<this.markerButtons.length;ke++)ke<Oe||ke===Oe&&this.markerButtons.length-1===Oe?this.markerButtonBlock.appendChild(this.markerButtons[ke]):(ke===Oe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ke]))}},at.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")},at.prototype.resetButtonStyles=function(){var Oe=this;this.buttons.forEach(function(ke){ke.className=ke.className.replace(Oe.uiStyleSettings.toolbarButtonStyleColorsClassName?Oe.uiStyleSettings.toolbarButtonStyleColorsClassName:Oe.toolbarButtonStyleColorsClass.name,"").trim(),ke.className=ke.className.replace(Oe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Oe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Oe.toolbarActiveButtonStyleColorsClass.name,"").trim(),ke.className+=" "+(Oe.uiStyleSettings.toolbarButtonStyleColorsClassName?Oe.uiStyleSettings.toolbarButtonStyleColorsClassName:Oe.toolbarButtonStyleColorsClass.name)})},at.prototype.addActionButton=function(Oe,ke,Be){var Ne=this,we=document.createElement("div");switch(we.className=""+this.toolbarButtonStyleClass.name,we.innerHTML=ke,we.setAttribute("data-action",Be),we.addEventListener("click",function(){Ne.actionToolbarButtonClicked(we,Be)}),Be){case"select":we.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":we.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":we.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":we.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":we.style.fill=this.uiStyleSettings.closeButtonColor}Oe.appendChild(we),this.buttons.push(we)},at.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("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 me("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("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 me("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Oe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Oe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Oe)+`px;
|
|
|
padding: `+Oe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new he("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new he("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},at.prototype.markerToolbarButtonClicked=function(Oe,ke){this.setActiveButton(Oe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("marker",ke)}),this.markerButtonOverflowBlock.style.display="none"},at.prototype.actionToolbarButtonClicked=function(Oe,ke){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("action",ke)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},at.prototype.setActiveButton=function(Oe){this.resetButtonStyles(),Oe.className=Oe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Oe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},at.prototype.setActiveMarkerButton=function(Oe){var ke=this.markerButtons.find(function(Be){return Be.getAttribute("data-type-name")===Oe});ke&&this.setActiveButton(ke)},at.prototype.setCurrentMarker=function(Oe){var ke=this;this.currentMarker=Oe,this.buttons.filter(function(Be){return/delete|notes/.test(Be.getAttribute("data-action"))}).forEach(function(Be){ke.currentMarker===void 0?(Be.style.fillOpacity="0.4",Be.style.pointerEvents="none"):(Be.style.fillOpacity="1",Be.style.pointerEvents="all")})},at}(),ye=function(){function at(Oe,ke,Be,Ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=Oe,this.displayMode=ke,this.uiStyleSettings=Be,this.styles=Ne,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return at.prototype.addStyles=function(){var Oe;this.toolboxStyleClass=this.styles.addClass(new me("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 me("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var ke=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("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 me("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Oe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Oe!==void 0?Oe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ke)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ke)+`px;
|
|
|
padding: `+ke+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new he("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new he("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},at.prototype.show=function(Oe){var ke;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Oe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ke=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ke!==void 0?ke:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},at.prototype.setPanelButtons=function(Oe){var ke,Be,Ne=this;this.panels=Oe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ke=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ke!==void 0?ke:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(we){var rt;we.uiStyleSettings=Ne.uiStyleSettings;var It=document.createElement("div");It.className=Ne.toolboxButtonStyleClass.name+" "+((rt=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:Ne.toolboxButtonStyleColorsClass.name),It.innerHTML=we.icon,It.title=we.title,It.addEventListener("click",function(){Ne.panelButtonClick(we)}),Ne.panelButtons.push(It),Ne.buttonRow.appendChild(It)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},at.prototype.panelButtonClick=function(Oe){var ke=this,Be=-1;if(Oe!==this.activePanel){Be=this.panels.indexOf(Oe),this.panelRow.innerHTML="";var Ne=Oe.getUi();Ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ne),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=Oe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ke.displayMode==="inline"?ke.panelRow.style.display="none":ke.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(we,rt){var It,Ct;we.className=ke.toolboxButtonStyleClass.name+" "+(rt===Be?""+((It=ke.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&It!==void 0?It:ke.toolboxActiveButtonStyleColorsClass.name):""+((Ct=ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:ke.toolboxButtonStyleColorsClass.name))})},at}(),_e=function(at,Oe){this.title=at,this.icon=Oe},Me=function(at){function Oe(ke,Be,Ne,we){var rt=at.call(this,ke,we||'<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 rt.colors=[],rt.addTransparent=!1,rt.colorBoxes=[],rt.colors=Be,rt.currentColor=Ne,rt.setCurrentColor=rt.setCurrentColor.bind(rt),rt.getColorBox=rt.getColorBox.bind(rt),rt}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.whiteSpace="nowrap",this.colors.forEach(function(Ne){var we=ke.getColorBox(Ne);Be.appendChild(we),ke.colorBoxes.push(we)}),Be},Oe.prototype.getColorBox=function(ke){var Be=this,Ne=this.uiStyleSettings.toolbarHeight/4,we=this.uiStyleSettings.toolbarHeight-Ne,rt=document.createElement("div");rt.style.display="inline-block",rt.style.boxSizing="content-box",rt.style.width=we-2+"px",rt.style.height=we-2+"px",rt.style.padding="1px",rt.style.marginRight="2px",rt.style.marginBottom="2px",rt.style.borderWidth="2px",rt.style.borderStyle="solid",rt.style.borderRadius=(we+2)/2+"px",rt.style.borderColor=ke===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",rt.addEventListener("click",function(){Be.setCurrentColor(ke,rt)});var It=document.createElement("div");return It.style.display="inline-block",It.style.width=we-2+"px",It.style.height=we-2+"px",It.style.backgroundColor=ke,It.style.borderRadius=we/2+"px",ke==="transparent"&&(It.style.fill=this.uiStyleSettings.toolboxAccentColor,It.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>`),rt.appendChild(It),rt},Oe.prototype.setCurrentColor=function(ke,Be){var Ne=this;this.currentColor=ke,this.colorBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ke)},Oe}(_e),ve=function(){function at(Oe,ke,Be){this._state="new",this._isSelected=!1,this._container=Oe,this._overlayContainer=ke,this.globalSettings=Be,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(at.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),at.prototype.ownsTarget=function(Oe){return!1},Object.defineProperty(at.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),at.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},at.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},at.prototype.pointerDown=function(Oe,ke){},at.prototype.dblClick=function(Oe,ke){},at.prototype.manipulate=function(Oe){},at.prototype.pointerUp=function(Oe){this.stateChanged()},at.prototype.dispose=function(){},at.prototype.addMarkerVisualToContainer=function(Oe){this.container.childNodes.length>0?this.container.insertBefore(Oe,this.container.childNodes[0]):this.container.appendChild(Oe)},at.prototype.getState=function(){return{typeName:at.typeName,state:this.state,notes:this.notes}},at.prototype.restoreState=function(Oe){this._state=Oe.state,this.notes=Oe.notes},at.prototype.scale=function(Oe,ke){},at.prototype.colorChanged=function(Oe){this.onColorChanged&&this.onColorChanged(Oe),this.stateChanged()},at.prototype.fillColorChanged=function(Oe){this.onFillColorChanged&&this.onFillColorChanged(Oe),this.stateChanged()},at.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Oe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Oe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Oe)&&this.onStateChanged(this)}},at.typeName="MarkerBase",at}(),Fe=function(){function at(){this.findGripByVisual=this.findGripByVisual.bind(this)}return at.prototype.findGripByVisual=function(Oe){return this.topLeft.ownsTarget(Oe)?this.topLeft:this.topCenter.ownsTarget(Oe)?this.topCenter:this.topRight.ownsTarget(Oe)?this.topRight:this.centerLeft.ownsTarget(Oe)?this.centerLeft:this.centerRight.ownsTarget(Oe)?this.centerRight:this.bottomLeft.ownsTarget(Oe)?this.bottomLeft:this.bottomCenter.ownsTarget(Oe)?this.bottomCenter:this.bottomRight.ownsTarget(Oe)?this.bottomRight:void 0},at}(),$e=function(){function at(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return at.prototype.ownsTarget=function(Oe){return Oe===this.visual||Oe===this.visual.childNodes[0]||Oe===this.visual.childNodes[1]},at}(),Te=function(){function at(){}return at.toITransformMatrix=function(Oe){return{a:Oe.a,b:Oe.b,c:Oe.c,d:Oe.d,e:Oe.e,f:Oe.f}},at.toSVGMatrix=function(Oe,ke){return Oe.a=ke.a,Oe.b=ke.b,Oe.c=ke.c,Oe.d=ke.d,Oe.e=ke.e,Oe.f=ke.f,Oe},at}(),ze=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.left=0,we.top=0,we.width=0,we.height=0,we.defaultSize={x:50,y:20},we.offsetX=0,we.offsetY=0,we.rotationAngle=0,we.CB_DISTANCE=10,we._suppressMarkerCreateEvent=!1,we.container.transform.baseVal.appendItem(fe.createTransform()),we.setupControlBox(),we}return Se(Oe,at),Object.defineProperty(Oe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"visual",{get:function(){return this._visual},set:function(ke){this._visual=ke;var Be=fe.createTransform();this._visual.transform.baseVal.appendItem(Be)},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(ke){return!!at.prototype.ownsTarget.call(this,ke)||!!(this.controlGrips.findGripByVisual(ke)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ke))},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="new"&&(this.left=ke.x,this.top=ke.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ne=this.unrotatePoint(ke);if(this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.offsetX=Ne.x-this.left,this.offsetY=Ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Be),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be)){this.activeGrip=this.rotatorGrip;var we=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=we.x-this.width/2,this.top=we.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var rt=this.container.transform.baseVal.getItem(0);rt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(rt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Oe.prototype.pointerUp=function(ke){var Be=this.state;at.prototype.pointerUp.call(this,ke),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ke),this._state="select",Be==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Oe.prototype.moveVisual=function(ke){this.visual.style.transform="translate("+ke.x+"px, "+ke.y+"px)"},Oe.prototype.manipulate=function(ke){var Be=this.unrotatePoint(ke);this.state==="creating"?this.resize(ke):this.state==="move"?(this.left=this.manipulationStartLeft+(Be.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Be.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Be):this.state==="rotate"&&this.rotate(ke)},Oe.prototype.resize=function(ke){var Be=this.manipulationStartLeft,Ne=this.manipulationStartWidth,we=this.manipulationStartTop,rt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Be=this.manipulationStartLeft+ke.x-this.manipulationStartX,Ne=this.manipulationStartWidth+this.manipulationStartLeft-Be;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ne=this.manipulationStartWidth+ke.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:we=this.manipulationStartTop+ke.y-this.manipulationStartY,rt=this.manipulationStartHeight+this.manipulationStartTop-we;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:rt=this.manipulationStartHeight+ke.y-this.manipulationStartY}Ne>=0?(this.left=Be,this.width=Ne):(this.left=Be+Ne,this.width=-Ne),rt>=0?(this.top=we,this.height=rt):(this.top=we+rt,this.height=-rt),this.setSize()},Oe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Oe.prototype.rotate=function(ke){if(Math.abs(ke.x-this.centerX)>.1){var Be=Math.sign(ke.x-this.centerX);this.rotationAngle=180*Math.atan((ke.y-this.centerY)/(ke.x-this.centerX))/Math.PI+90*Be,this.applyRotation()}},Oe.prototype.applyRotation=function(){var ke=this.container.transform.baseVal.getItem(0);ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ke,0)},Oe.prototype.rotatePoint=function(ke){if(this.rotationAngle===0)return ke;var Be=this.container.getCTM(),Ne=fe.createPoint(ke.x,ke.y);return{x:(Ne=Ne.matrixTransform(Be)).x,y:Ne.y}},Oe.prototype.unrotatePoint=function(ke){if(this.rotationAngle===0)return ke;var Be=this.container.getCTM();Be=Be.inverse();var Ne=fe.createPoint(ke.x,ke.y);return{x:(Ne=Ne.matrixTransform(Be)).x,y:Ne.y}},Oe.prototype.select=function(){at.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Oe.prototype.deselect=function(){at.prototype.deselect.call(this),this.controlBox.style.display="none"},Oe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var ke=fe.createTransform();ke.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ke),this.container.appendChild(this.controlBox),this.controlRect=fe.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=fe.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 Fe,this.addControlGrips(),this.controlBox.style.display="none"},Oe.prototype.adjustControlBox=function(){var ke=this.controlBox.transform.baseVal.getItem(0);ke.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ke,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()},Oe.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()},Oe.prototype.createGrip=function(){var ke=new $e;return ke.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(ke.visual),ke},Oe.prototype.positionGrips=function(){var ke=this.controlGrips.topLeft.GRIP_SIZE,Be=-ke/2,Ne=Be,we=(this.width+this.CB_DISTANCE)/2-ke/2,rt=(this.height+this.CB_DISTANCE)/2-ke/2,It=this.height+this.CB_DISTANCE-ke/2,Ct=this.width+this.CB_DISTANCE-ke/2;this.positionGrip(this.controlGrips.topLeft.visual,Be,Ne),this.positionGrip(this.controlGrips.topCenter.visual,we,Ne),this.positionGrip(this.controlGrips.topRight.visual,Ct,Ne),this.positionGrip(this.controlGrips.centerLeft.visual,Be,rt),this.positionGrip(this.controlGrips.centerRight.visual,Ct,rt),this.positionGrip(this.controlGrips.bottomLeft.visual,Be,It),this.positionGrip(this.controlGrips.bottomCenter.visual,we,It),this.positionGrip(this.controlGrips.bottomRight.visual,Ct,It),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,we,Ne-3*this.CB_DISTANCE)},Oe.prototype.positionGrip=function(ke,Be,Ne){var we=ke.transform.baseVal.getItem(0);we.setTranslate(Be,Ne),ke.transform.baseVal.replaceItem(we,0)},Oe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Oe.prototype.showControlBox=function(){this.controlBox.style.display=""},Oe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Te.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Te.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},at.prototype.getState.call(this))},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke);var Be=ke;this.left=Be.left,this.top=Be.top,this.width=Be.width,this.height=Be.height,this.rotationAngle=Be.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Te.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Be.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Te.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Be.containerTransformMatrix))},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be);var Ne=this.rotatePoint({x:this.left,y:this.top}),we=this.unrotatePoint({x:Ne.x*ke,y:Ne.y*Be});this.left=we.x,this.top=we.y,this.width=this.width*ke,this.height=this.height*Be,this.adjustControlBox()},Oe}(ve),Ee=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.fillColor="transparent",we.strokeColor="transparent",we.strokeWidth=0,we.strokeDasharray="",we.opacity=1,we.setStrokeColor=we.setStrokeColor.bind(we),we.setFillColor=we.setFillColor.bind(we),we.setStrokeWidth=we.setStrokeWidth.bind(we),we.setStrokeDasharray=we.setStrokeDasharray.bind(we),we.createVisual=we.createVisual.bind(we),we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual)},Oe.prototype.createVisual=function(){this.visual=fe.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)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(ke),this._state="creating")},Oe.prototype.manipulate=function(ke){at.prototype.manipulate.call(this,ke)},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),this.setSize()},Oe.prototype.setSize=function(){at.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Oe.prototype.pointerUp=function(ke){at.prototype.pointerUp.call(this,ke),this.setSize()},Oe.prototype.setStrokeColor=function(ke){this.strokeColor=ke,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ke),this.stateChanged()},Oe.prototype.setFillColor=function(ke){this.fillColor=ke,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Oe.prototype.setStrokeWidth=function(ke){this.strokeWidth=ke,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Oe.prototype.setStrokeDasharray=function(ke){this.strokeDasharray=ke,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Oe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},at.prototype.getState.call(this))},Oe.prototype.restoreState=function(ke){var Be=ke;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),at.prototype.restoreState.call(this,ke),this.setSize()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.setSize()},Oe.title="Rectangle marker",Oe}(ze),be=function(at){function Oe(ke,Be,Ne,we){var rt=at.call(this,ke,we||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return rt.widths=[],rt.widthBoxes=[],rt.widths=Be,rt.currentWidth=Ne,rt.setCurrentWidth=rt.setCurrentWidth.bind(rt),rt}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.widths.forEach(function(Ne){var we=document.createElement("div");we.style.display="flex",we.style.flexGrow="2",we.style.alignItems="center",we.style.justifyContent="space-between",we.style.padding="5px",we.style.borderWidth="2px",we.style.borderStyle="solid",we.style.borderColor=Ne===ke.currentWidth?ke.uiStyleSettings.toolboxAccentColor:"transparent",we.addEventListener("click",function(){ke.setCurrentWidth(Ne,we)}),Be.appendChild(we);var rt=document.createElement("div");rt.innerText=Ne.toString(),rt.style.marginRight="5px",we.appendChild(rt);var It=document.createElement("div");It.style.minHeight="20px",It.style.flexGrow="2",It.style.display="flex",It.style.alignItems="center";var Ct=document.createElement("hr");Ct.style.minWidth="20px",Ct.style.border="0px",Ct.style.borderTop=Ne+"px solid "+ke.uiStyleSettings.toolboxColor,Ct.style.flexGrow="2",It.appendChild(Ct),we.appendChild(It),ke.widthBoxes.push(we)}),Be},Oe.prototype.setCurrentWidth=function(ke,Be){var Ne=this;this.currentWidth=ke,this.widthBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Oe}(_e),Re=function(at){function Oe(ke,Be,Ne,we){var rt=at.call(this,ke,we||'<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 rt.styles=[],rt.styleBoxes=[],rt.styles=Be,rt.currentStyle=Ne,rt.setCurrentStyle=rt.setCurrentStyle.bind(rt),rt}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.styles.forEach(function(Ne){var we=document.createElement("div");we.style.display="flex",we.style.alignItems="center",we.style.justifyContent="space-between",we.style.padding="5px",we.style.borderWidth="2px",we.style.borderStyle="solid",we.style.overflow="hidden",we.style.maxWidth=100/ke.styles.length-5+"%",we.style.borderColor=Ne===ke.currentStyle?ke.uiStyleSettings.toolboxAccentColor:"transparent",we.addEventListener("click",function(){ke.setCurrentStyle(Ne,we)}),Be.appendChild(we);var rt=document.createElement("div");rt.style.minHeight="20px",rt.style.flexGrow="2",rt.style.overflow="hidden";var It=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ke.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ne!==""?'stroke-dasharray="'+Ne+'"':"")+` />
|
|
|
</svg>`;rt.innerHTML=It,we.appendChild(rt),ke.styleBoxes.push(we)}),Be},Oe.prototype.setCurrentStyle=function(ke,Be){var Ne=this;this.currentStyle=ke,this.styleBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Oe}(_e),De=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.strokeColor=Ne.defaultColor,we.strokeWidth=Ne.defaultStrokeWidth,we.strokeDasharray=Ne.defaultStrokeDasharray,we.strokePanel=new Me("Line color",Ne.defaultColorSet,Ne.defaultColor),we.strokePanel.onColorChanged=we.setStrokeColor,we.strokeWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.strokeWidthPanel.onWidthChanged=we.setStrokeWidth,we.strokeStylePanel=new Re("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),we.strokeStylePanel.onStyleChanged=we.setStrokeDasharray,we}return Se(Oe,at),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=at.prototype.getState.call(this);return ke.typeName=Oe.typeName,ke},Oe.typeName="FrameMarker",Oe.title="Frame marker",Oe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Oe}(Ee),et=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"},Ye=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.x1=0,we.y1=0,we.x2=0,we.y2=0,we.defaultLength=50,we.manipulationStartX=0,we.manipulationStartY=0,we.manipulationStartX1=0,we.manipulationStartY1=0,we.manipulationStartX2=0,we.manipulationStartY2=0,we.setupControlBox(),we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!!at.prototype.ownsTarget.call(this,ke)||!(!this.grip1.ownsTarget(ke)&&!this.grip2.ownsTarget(ke))},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.manipulationStartX=ke.x,this.manipulationStartY=ke.y,this.state==="new"&&(this.x1=ke.x,this.y1=ke.y,this.x2=ke.x,this.y2=ke.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(Be)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Be)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Oe.prototype.pointerUp=function(ke){var Be=this.state;at.prototype.pointerUp.call(this,ke),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(ke),this._state="select",Be==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Oe.prototype.adjustVisual=function(){},Oe.prototype.manipulate=function(ke){this.state==="creating"?this.resize(ke):this.state==="move"?(this.x1=this.manipulationStartX1+ke.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ke.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ke.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ke.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ke)},Oe.prototype.resize=function(ke){switch(this.activeGrip){case this.grip1:this.x1=ke.x,this.y1=ke.y;break;case this.grip2:case void 0:this.x2=ke.x,this.y2=ke.y}this.adjustVisual(),this.adjustControlBox()},Oe.prototype.select=function(){at.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Oe.prototype.deselect=function(){at.prototype.deselect.call(this),this.controlBox.style.display="none"},Oe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Oe.prototype.adjustControlBox=function(){this.positionGrips()},Oe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Oe.prototype.createGrip=function(){var ke=new $e;return ke.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(ke.visual),ke},Oe.prototype.positionGrips=function(){var ke=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ke/2,this.y1-ke/2),this.positionGrip(this.grip2.visual,this.x2-ke/2,this.y2-ke/2)},Oe.prototype.positionGrip=function(ke,Be,Ne){var we=ke.transform.baseVal.getItem(0);we.setTranslate(Be,Ne),ke.transform.baseVal.replaceItem(we,0)},Oe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},at.prototype.getState.call(this))},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke);var Be=ke;this.x1=Be.x1,this.y1=Be.y1,this.x2=Be.x2,this.y2=Be.y2},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.x1=this.x1*ke,this.y1=this.y1*Be,this.x2=this.x2*ke,this.y2=this.y2*Be,this.adjustVisual(),this.adjustControlBox()},Oe}(ve),dt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.strokeColor="transparent",we.strokeWidth=0,we.strokeDasharray="",we.setStrokeColor=we.setStrokeColor.bind(we),we.setStrokeWidth=we.setStrokeWidth.bind(we),we.setStrokeDasharray=we.setStrokeDasharray.bind(we),we.strokeColor=Ne.defaultColor,we.strokeWidth=Ne.defaultStrokeWidth,we.strokeDasharray=Ne.defaultStrokeDasharray,we.strokePanel=new Me("Line color",Ne.defaultColorSet,Ne.defaultColor),we.strokePanel.onColorChanged=we.setStrokeColor,we.strokeWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.strokeWidthPanel.onWidthChanged=we.setStrokeWidth,we.strokeStylePanel=new Re("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),we.strokeStylePanel.onStyleChanged=we.setStrokeDasharray,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual&&ke!==this.selectorLine&&ke!==this.visibleLine)},Oe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.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)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Oe.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()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Oe.prototype.setStrokeColor=function(ke){this.strokeColor=ke,this.adjustVisual(),this.colorChanged(ke)},Oe.prototype.setStrokeWidth=function(ke){this.strokeWidth=ke,this.adjustVisual()},Oe.prototype.setStrokeDasharray=function(ke){this.strokeDasharray=ke,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke);var Be=ke;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.createVisual(),this.adjustVisual()},Oe.typeName="LineMarker",Oe.title="Line marker",Oe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Oe}(Ye),Ke=function(at){function Oe(ke,Be,Ne,we){var rt=at.call(this,ke,we||'<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 rt.fonts=[],rt.fontBoxes=[],rt.fonts=Be,rt.currentFont=Ne,rt.setCurrentFont=rt.setCurrentFont.bind(rt),rt}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.flexGrow="2",this.fonts.forEach(function(Ne){var we=document.createElement("div");we.style.display="inline-block",we.style.alignItems="center",we.style.justifyContent="space-between",we.style.padding="5px",we.style.borderWidth="2px",we.style.borderStyle="solid",we.style.overflow="hidden",we.style.maxWidth=100/ke.fonts.length-5+"%",we.style.borderColor=Ne===ke.currentFont?ke.uiStyleSettings.toolboxAccentColor:"transparent",we.addEventListener("click",function(){ke.setCurrentFont(Ne,we)}),Be.appendChild(we);var rt=document.createElement("div");rt.style.display="flex",rt.style.minHeight="20px",rt.style.flexGrow="2",rt.style.fontFamily=Ne,rt.style.overflow="hidden";var It=document.createElement("div");It.style.whiteSpace="nowrap",It.style.overflow="hidden",It.style.textOverflow="ellipsis",It.innerHTML="The quick brown fox jumps over the lazy dog",rt.appendChild(It),we.appendChild(rt),ke.fontBoxes.push(we)}),Be},Oe.prototype.setCurrentFont=function(ke,Be){var Ne=this;this.currentFont=ke,this.fontBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Oe}(_e),zt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.color="transparent",we.padding=5,we.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",we.text=we.DEFAULT_TEXT,we.isMoved=!1,we.color=Ne.defaultColor,we.fontFamily=Ne.defaultFontFamily,we.defaultSize={x:100,y:30},we.setColor=we.setColor.bind(we),we.setFont=we.setFont.bind(we),we.renderText=we.renderText.bind(we),we.sizeText=we.sizeText.bind(we),we.textEditDivClicked=we.textEditDivClicked.bind(we),we.showTextEditor=we.showTextEditor.bind(we),we.setSize=we.setSize.bind(we),we.positionTextEditor=we.positionTextEditor.bind(we),we.colorPanel=new Me("Color",Ne.defaultColorSet,Ne.defaultColor),we.colorPanel.onColorChanged=we.setColor,we.fontFamilyPanel=new Ke("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),we.fontFamilyPanel.onFontChanged=we.setFont,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){if(at.prototype.ownsTarget.call(this,ke)||ke===this.visual||ke===this.textElement||ke===this.bgRectangle)return!0;var Be=!1;return this.textElement.childNodes.forEach(function(Ne){Ne===ke&&(Be=!0)}),Be},Oe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.isMoved=!1,this.pointerDownPoint=ke,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ke),this._state="creating")},Oe.prototype.renderText=function(){var ke=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(Be){ke.textElement.appendChild(fe.createTSpan(Be.trim()===""?" ":Be.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Oe.prototype.getTextScale=function(){var ke=this.textElement.getBBox(),Be=1;if(ke.width>0&&ke.height>0){var Ne=(1*this.width-this.width*this.padding*2/100)/ke.width,we=(1*this.height-this.height*this.padding*2/100)/ke.height;Be=Math.min(Ne,we)}return Be},Oe.prototype.getTextPosition=function(ke){var Be=this.textElement.getBBox(),Ne=0,we=0;return Be.width>0&&Be.height>0&&(Ne=(this.width-Be.width*ke)/2,we=this.height/2-Be.height*ke/2),{x:Ne,y:we}},Oe.prototype.sizeText=function(){var ke=this.textElement.getBBox(),Be=this.getTextScale(),Ne=this.getTextPosition(Be);Ne.y-=ke.y*Be,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ne.x+"px, "+Ne.y+"px) scale("+Be+", "+Be+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ne.x,Ne.y),this.textElement.transform.baseVal.getItem(1).setScale(Be,Be))},Oe.prototype.manipulate=function(ke){at.prototype.manipulate.call(this,ke),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ke.x-this.pointerDownPoint.x)>5||Math.abs(ke.y-this.pointerDownPoint.y)>5)},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),this.isMoved=!0,this.setSize(),this.sizeText()},Oe.prototype.setSize=function(){at.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Oe.prototype.pointerUp=function(ke){var Be=this.state;Be==="creating"&&(this._suppressMarkerCreateEvent=!0),at.prototype.pointerUp.call(this,ke),this.setSize(),(Be==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Oe.prototype.showTextEditor=function(){var ke=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(Be){Be.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Be=Number.parseFloat(ke.textEditor.style.fontSize);ke.textEditor.clientWidth>=Number.parseInt(ke.textEditor.style.maxWidth)&&Be>.9;)Be-=.1,ke.textEditor.style.fontSize=Math.max(Be,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Be){if(Be.clipboardData){var Ne=Be.clipboardData.getData("text"),we=window.getSelection();if(!we.rangeCount)return!1;we.deleteFromDocument(),we.getRangeAt(0).insertNode(document.createTextNode(Ne)),Be.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ke.textEditDivClicked(ke.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Oe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ke=this.getTextScale(),Be=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ne=this.textElement.getBBox(),we={x:Ne.width*ke,y:Ne.height*ke};Be.x-=we.x/2,Be.y-=we.y/2,this.textEditor.style.top=Be.y+"px",this.textEditor.style.left=Be.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Be.x+"px",this.textEditor.style.fontSize=Math.max(16*ke,12)+"px",this.textElement.style.display="none"}},Oe.prototype.textEditDivClicked=function(ke){this.text=ke.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Oe.prototype.select=function(){at.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Oe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),at.prototype.deselect.call(this)},Oe.prototype.dblClick=function(ke,Be){at.prototype.dblClick.call(this,ke,Be),this.showTextEditor()},Oe.prototype.setColor=function(ke){this.textElement&&fe.setAttributes(this.textElement,[["fill",ke]]),this.color=ke,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ke)},Oe.prototype.setFont=function(ke){this.textElement&&fe.setAttributes(this.textElement,[["font-family",ke]]),this.fontFamily=ke,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Oe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Oe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){var Be=ke;this.color=Be.color,this.fontFamily=Be.fontFamily,this.padding=Be.padding,this.text=Be.text,this.createVisual(),at.prototype.restoreState.call(this,ke),this.setSize()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.setSize(),this.sizeText(),this.positionTextEditor()},Oe.typeName="TextMarker",Oe.title="Text marker",Oe.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>',Oe}(ze),pt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.color="transparent",we.lineWidth=3,we.drawing=!1,we.pixelRatio=1,we.color=Ne.defaultColor,we.lineWidth=Ne.defaultStrokeWidth,we.pixelRatio=Ne.freehandPixelRatio,we.setColor=we.setColor.bind(we),we.addCanvas=we.addCanvas.bind(we),we.finishCreation=we.finishCreation.bind(we),we.setLineWidth=we.setLineWidth.bind(we),we.colorPanel=new Me("Color",Ne.defaultColorSet,Ne.defaultColor),we.colorPanel.onColorChanged=we.setColor,we.lineWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.lineWidthPanel.onWidthChanged=we.setLineWidth,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual&&ke!==this.drawingImage)},Oe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var ke=fe.createTransform();this.visual.transform.baseVal.appendItem(ke),this.addMarkerVisualToContainer(this.visual)},Oe.prototype.pointerDown=function(ke,Be){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(ke.x,ke.y),this.drawing=!0):at.prototype.pointerDown.call(this,ke,Be)},Oe.prototype.manipulate=function(ke){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ke.x,ke.y),this.canvasContext.stroke()):at.prototype.manipulate.call(this,ke)},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Oe.prototype.pointerUp=function(ke){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):at.prototype.pointerUp.call(this,ke)},Oe.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)},Oe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),at.prototype.select.call(this)},Oe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),at.prototype.deselect.call(this)},Oe.prototype.finishCreation=function(){for(var ke=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Be=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ne=Be[0],we=Be[1],rt=Be[2],It=Be[3],Ct=!1,$t=0;$t<this.canvasElement.height;$t++)for(var Vt=0;Vt<this.canvasElement.width;Vt++)ke.data[$t*this.canvasElement.width*4+4*Vt+3]>0&&(Ct=!0,$t<we&&(we=$t),Vt<Ne&&(Ne=Vt),$t>It&&(It=$t),Vt>rt&&(rt=Vt));if(Ct){this.left=Ne/this.pixelRatio,this.top=we/this.pixelRatio,this.width=(rt-Ne)/this.pixelRatio,this.height=(It-we)/this.pixelRatio;var wt=document.createElement("canvas");wt.width=rt-Ne,wt.height=It-we,wt.getContext("2d").putImageData(this.canvasContext.getImageData(Ne,we,rt-Ne,It-we),0,0),this.drawingImgUrl=wt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Oe.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Oe.prototype.setColor=function(ke){this.color=ke,this.colorChanged(ke)},Oe.prototype.setLineWidth=function(ke){this.lineWidth=ke},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({drawingImgUrl:this.drawingImgUrl},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){this.createVisual(),at.prototype.restoreState.call(this,ke),this.drawingImgUrl=ke.drawingImgUrl,this.setDrawingImage()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.setDrawingImage()},Oe.typeName="FreehandMarker",Oe.title="Freehand marker",Oe.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>',Oe}(ze),Kt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Ne||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return we.typeBoxes=[],we.currentType=Be,we.setCurrentType=we.setCurrentType.bind(we),we}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2";for(var Ne=function(It){var Ct="both";switch(It){case 0:Ct="both";break;case 1:Ct="start";break;case 2:Ct="end";break;case 3:Ct="none"}var $t=document.createElement("div");if($t.style.display="flex",$t.style.flexGrow="2",$t.style.alignItems="center",$t.style.justifyContent="space-between",$t.style.padding="5px",$t.style.borderWidth="2px",$t.style.borderStyle="solid",$t.style.borderColor=Ct===we.currentType?we.uiStyleSettings.toolboxAccentColor:"transparent",$t.addEventListener("click",function(){ke.setCurrentType(Ct,$t)}),Be.appendChild($t),Ct==="both"||Ct==="start"){var Vt=document.createElement("div");Vt.style.display="flex",Vt.style.alignItems="center",Vt.style.minHeight="20px",Vt.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="`+(we.uiStyleSettings!==void 0?we.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Vt.style.marginLeft="5px",$t.appendChild(Vt)}var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(we.uiStyleSettings!==void 0?we.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",wt.appendChild(on),$t.appendChild(wt),Ct==="both"||Ct==="end"){var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(we.uiStyleSettings!==void 0?we.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Dt.style.marginRight="5px",$t.appendChild(Dt)}we.typeBoxes.push($t)},we=this,rt=0;rt<4;rt++)Ne(rt);return Be},Oe.prototype.setCurrentType=function(ke,Be){var Ne=this;this.currentType=ke,this.typeBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Oe}(_e),Ze=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.arrowType="end",we.arrowBaseHeight=10,we.arrowBaseWidth=10,we.getArrowPoints=we.getArrowPoints.bind(we),we.setArrowType=we.setArrowType.bind(we),we.arrowTypePanel=new Kt("Arrow type","end"),we.arrowTypePanel.onArrowTypeChanged=we.setArrowType,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.arrow1&&ke!==this.arrow2)},Oe.prototype.getArrowPoints=function(ke,Be){var Ne=this.arrowBaseWidth+2*this.strokeWidth,we=this.arrowBaseHeight+2*this.strokeWidth;return ke-Ne/2+","+(Be+we/2)+" "+ke+","+(Be-we/2)+" "+(ke+Ne/2)+","+(Be+we/2)},Oe.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="creating"&&this.createTips()},Oe.prototype.adjustVisual=function(){if(at.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",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ke=0;Math.abs(this.x1-this.x2)>.1&&(ke=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Be=this.arrow1.transform.baseVal.getItem(0);Be.setRotate(ke,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Be,0);var Ne=this.arrow2.transform.baseVal.getItem(0);Ne.setRotate(ke+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ne,0)}},Oe.prototype.setArrowType=function(ke){this.arrowType=ke,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({arrowType:this.arrowType},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke);var Be=ke;this.arrowType=Be.arrowType,this.createTips(),this.adjustVisual()},Oe.typeName="ArrowMarker",Oe.title="Arrow marker",Oe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Oe}(dt),tt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.fillColor=Ne.defaultFillColor,we.strokeWidth=0,we.fillPanel=new Me("Color",Ne.defaultColorSet,Ne.defaultFillColor),we.fillPanel.onColorChanged=we.setFillColor,we}return Se(Oe,at),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=at.prototype.getState.call(this);return ke.typeName=Oe.typeName,ke},Oe.typeName="CoverMarker",Oe.title="Cover marker",Oe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Oe}(Ee),ft=function(at){function Oe(ke,Be,Ne,we){var rt=at.call(this,ke,we||'<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 rt.opacities=[],rt.opacityBoxes=[],rt.opacities=Be,rt.currentOpacity=Ne,rt.setCurrentOpacity=rt.setCurrentOpacity.bind(rt),rt}return Se(Oe,at),Oe.prototype.getUi=function(){var ke=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",Be.style.justifyContent="space-between",this.opacities.forEach(function(Ne){var we=document.createElement("div");we.style.display="flex",we.style.alignItems="center",we.style.justifyContent="center",we.style.padding="5px",we.style.borderWidth="2px",we.style.borderStyle="solid",we.style.borderColor=Ne===ke.currentOpacity?ke.uiStyleSettings.toolboxAccentColor:"transparent",we.addEventListener("click",function(){ke.setCurrentOpacity(Ne,we)}),Be.appendChild(we);var rt=document.createElement("div");rt.innerText=100*Ne+"%",we.appendChild(rt),ke.opacityBoxes.push(we)}),Be},Oe.prototype.setCurrentOpacity=function(ke,Be){var Ne=this;this.currentOpacity=ke,this.opacityBoxes.forEach(function(we){we.style.borderColor=we===Be?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Oe}(_e),Ut=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.setOpacity=we.setOpacity.bind(we),we.fillColor=Ne.defaultHighlightColor,we.strokeWidth=0,we.opacity=Ne.defaultHighlightOpacity,we.fillPanel=new Me("Color",Ne.defaultColorSet,we.fillColor),we.fillPanel.onColorChanged=we.setFillColor,we.opacityPanel=new ft("Opacity",Ne.defaultOpacitySteps,we.opacity),we.opacityPanel.onOpacityChanged=we.setOpacity,we}return Se(Oe,at),Oe.prototype.setOpacity=function(ke){this.opacity=ke,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=at.prototype.getState.call(this);return ke.typeName=Oe.typeName,ke},Oe.typeName="HighlightMarker",Oe.title="Highlight marker",Oe.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>',Oe}(tt),nt='<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>',Ge='<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>',jt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.bgColor="transparent",we.tipPosition={x:0,y:0},we.tipBase1Position={x:0,y:0},we.tipBase2Position={x:0,y:0},we.tipMoving=!1,we.color=Ne.defaultStrokeColor,we.bgColor=Ne.defaultFillColor,we.fontFamily=Ne.defaultFontFamily,we.defaultSize={x:100,y:30},we.setBgColor=we.setBgColor.bind(we),we.getTipPoints=we.getTipPoints.bind(we),we.positionTip=we.positionTip.bind(we),we.setTipPoints=we.setTipPoints.bind(we),we.colorPanel=new Me("Text color",Ne.defaultColorSet,we.color,nt),we.colorPanel.onColorChanged=we.setColor,we.bgColorPanel=new Me("Fill color",Ne.defaultColorSet,we.bgColor,Ge),we.bgColorPanel.onColorChanged=we.setBgColor,we.fontFamilyPanel=new Ke("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),we.fontFamilyPanel.onFontChanged=we.setFont,we.tipGrip=new $e,we.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),we.controlBox.appendChild(we.tipGrip.visual),we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return at.prototype.ownsTarget.call(this,ke)||this.tipGrip.ownsTarget(ke)||this.tip===ke},Oe.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Oe.prototype.pointerDown=function(ke,Be){this.state==="new"&&at.prototype.pointerDown.call(this,ke,Be),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Be)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):at.prototype.pointerDown.call(this,ke,Be)},Oe.prototype.pointerUp=function(ke){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,at.prototype.pointerUp.call(this,ke);else{var Be=this.state==="creating";at.prototype.pointerUp.call(this,ke),this.setTipPoints(Be),this.positionTip()}},Oe.prototype.manipulate=function(ke){if(this.tipMoving){var Be=this.unrotatePoint(ke);this.tipPosition={x:Be.x-this.manipulationStartLeft,y:Be.y-this.manipulationStartTop},this.positionTip()}else at.prototype.manipulate.call(this,ke)},Oe.prototype.setBgColor=function(ke){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",ke]]),fe.setAttributes(this.tip,[["fill",ke]])),this.bgColor=ke,this.fillColorChanged(ke)},Oe.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},Oe.prototype.setTipPoints=function(ke){ke===void 0&&(ke=!1);var Be=Math.min(this.height/2,15),Ne=this.height/5;ke&&(this.tipPosition={x:Be+Ne/2,y:this.height+20});var we=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?we<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ne=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:0},this.tipBase2Position={x:Be+Ne,y:0}):(this.tipBase1Position={x:0,y:Be},this.tipBase2Position={x:0,y:Be+Ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?we<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ne=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ne,y:0},this.tipBase2Position={x:this.width-Be,y:0}):(this.tipBase1Position={x:this.width,y:Be},this.tipBase2Position={x:this.width,y:Be+Ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?we<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ne=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ne,y:this.height},this.tipBase2Position={x:this.width-Be,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Be-Ne},this.tipBase2Position={x:this.width,y:this.height-Be}):we<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ne=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:this.height},this.tipBase2Position={x:Be+Ne,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Be},this.tipBase2Position={x:0,y:this.height-Be-Ne})},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),this.positionTip()},Oe.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ke=this.tipGrip.visual.transform.baseVal.getItem(0);ke.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ke,0)},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Oe.prototype.select=function(){this.positionTip(),at.prototype.select.call(this)},Oe.prototype.getState=function(){var ke=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){var Be=ke;this.bgColor=Be.bgColor,this.tipPosition=Be.tipPosition,at.prototype.restoreState.call(this,ke),this.createTip(),this.setTipPoints()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.tipPosition={x:this.tipPosition.x*ke,y:this.tipPosition.y*Be},this.positionTip()},Oe.typeName="CalloutMarker",Oe.title="Callout marker",Oe.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>',Oe}(zt),yn=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.fillColor="transparent",we.strokeColor="transparent",we.strokeWidth=0,we.strokeDasharray="",we.opacity=1,we.strokeColor=Ne.defaultColor,we.strokeWidth=Ne.defaultStrokeWidth,we.strokeDasharray=Ne.defaultStrokeDasharray,we.fillColor=Ne.defaultFillColor,we.setStrokeColor=we.setStrokeColor.bind(we),we.setFillColor=we.setFillColor.bind(we),we.setStrokeWidth=we.setStrokeWidth.bind(we),we.setStrokeDasharray=we.setStrokeDasharray.bind(we),we.setOpacity=we.setOpacity.bind(we),we.createVisual=we.createVisual.bind(we),we.strokePanel=new Me("Line color",ce(Ne.defaultColorSet,["transparent"]),Ne.defaultColor),we.strokePanel.onColorChanged=we.setStrokeColor,we.fillPanel=new Me("Fill color",ce(Ne.defaultColorSet,["transparent"]),we.fillColor,Ge),we.fillPanel.onColorChanged=we.setFillColor,we.strokeWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.strokeWidthPanel.onWidthChanged=we.setStrokeWidth,we.strokeStylePanel=new Re("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),we.strokeStylePanel.onStyleChanged=we.setStrokeDasharray,we.opacityPanel=new ft("Opacity",Ne.defaultOpacitySteps,we.opacity),we.opacityPanel.onOpacityChanged=we.setOpacity,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual)},Oe.prototype.createVisual=function(){this.visual=fe.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)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(ke),this._state="creating")},Oe.prototype.manipulate=function(ke){at.prototype.manipulate.call(this,ke)},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),this.setSize()},Oe.prototype.setSize=function(){at.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Oe.prototype.pointerUp=function(ke){at.prototype.pointerUp.call(this,ke),this.setSize()},Oe.prototype.setStrokeColor=function(ke){this.strokeColor=ke,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ke),this.stateChanged()},Oe.prototype.setFillColor=function(ke){this.fillColor=ke,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ke),this.stateChanged()},Oe.prototype.setStrokeWidth=function(ke){this.strokeWidth=ke,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Oe.prototype.setStrokeDasharray=function(ke){this.strokeDasharray=ke,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Oe.prototype.setOpacity=function(ke){this.opacity=ke,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){var Be=ke;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),at.prototype.restoreState.call(this,ke),this.setSize()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.setSize()},Oe.typeName="EllipseMarker",Oe.title="Ellipse marker",Oe.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>',Oe}(ze),ln=function(at){function Oe(ke,Be,Ne){return at.call(this,ke,Be,Ne)||this}return Se(Oe,at),Object.defineProperty(Oe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.tip1&&ke!==this.tip2)},Oe.prototype.createTips=function(){this.tip1=fe.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(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.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(fe.createTransform()),this.visual.appendChild(this.tip2)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.state==="creating"&&this.createTips()},Oe.prototype.adjustVisual=function(){if(at.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.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()]]),fe.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 ke=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Be=this.tip1.transform.baseVal.getItem(0);Be.setRotate(ke,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Be,0);var Ne=this.tip2.transform.baseVal.getItem(0);Ne.setRotate(ke+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ne,0)}},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=at.prototype.getState.call(this);return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke),this.createTips(),this.adjustVisual()},Oe.typeName="MeasurementMarker",Oe.title="Measurement marker",Oe.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>',Oe}(dt),Tt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.strokePanel.colors=Ne.defaultColorSet,we.fillColor="transparent",we}return Se(Oe,at),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=at.prototype.getState.call(this);return ke.typeName=Oe.typeName,ke},Oe.typeName="EllipseFrameMarker",Oe.title="Ellipse frame marker",Oe.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>',Oe}(yn),Lt=function(){function at(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(at.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),at.prototype.addUndoStep=function(Oe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Oe)||(this.undoStack.push(Oe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Oe)&&this.redoStack.splice(0,this.redoStack.length))},at.prototype.replaceLastUndoStep=function(Oe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Oe)},at.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},at.prototype.undo=function(){if(this.undoStack.length>1){var Oe=this.undoStack.pop();return Oe!==void 0&&this.redoStack.push(Oe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},at.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},at}(),Jt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.strokeColor="transparent",we.strokeWidth=0,we.strokeDasharray="",we.curveX=0,we.curveY=0,we.manipulationStartCurveX=0,we.manipulationStartCurveY=0,we.setStrokeColor=we.setStrokeColor.bind(we),we.setStrokeWidth=we.setStrokeWidth.bind(we),we.setStrokeDasharray=we.setStrokeDasharray.bind(we),we.positionGrips=we.positionGrips.bind(we),we.addControlGrips=we.addControlGrips.bind(we),we.adjustVisual=we.adjustVisual.bind(we),we.setupControlBox=we.setupControlBox.bind(we),we.resize=we.resize.bind(we),we.strokeColor=Ne.defaultColor,we.strokeWidth=Ne.defaultStrokeWidth,we.strokeDasharray=Ne.defaultStrokeDasharray,we.strokePanel=new Me("Line color",Ne.defaultColorSet,Ne.defaultColor),we.strokePanel.onColorChanged=we.setStrokeColor,we.strokeWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.strokeWidthPanel.onWidthChanged=we.setStrokeWidth,we.strokeStylePanel=new Re("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),we.strokeStylePanel.onStyleChanged=we.setStrokeDasharray,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual&&ke!==this.selectorCurve&&ke!==this.visibleCurve&&!this.curveGrip.ownsTarget(ke))},Oe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Oe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.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)},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ke.x,this.curveY=ke.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Be)&&(this.activeGrip=this.curveGrip,this._state="resize")},Oe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Oe.prototype.setupControlBox=function(){at.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.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)},Oe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,at.prototype.addControlGrips.call(this)},Oe.prototype.positionGrips=function(){at.prototype.positionGrips.call(this);var ke=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ke/2,this.curveY-ke/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()))},Oe.prototype.manipulate=function(ke){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ke.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ke.y-this.manipulationStartY),at.prototype.manipulate.call(this,ke)},Oe.prototype.resize=function(ke){this.activeGrip===this.curveGrip&&(this.curveX=ke.x,this.curveY=ke.y),at.prototype.resize.call(this,ke),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Oe.prototype.setStrokeColor=function(ke){this.strokeColor=ke,this.adjustVisual(),this.colorChanged(ke)},Oe.prototype.setStrokeWidth=function(ke){this.strokeWidth=ke,this.adjustVisual()},Oe.prototype.setStrokeDasharray=function(ke){this.strokeDasharray=ke,this.adjustVisual()},Oe.prototype.scale=function(ke,Be){this.curveX=this.curveX*ke,this.curveY=this.curveY*Be,at.prototype.scale.call(this,ke,Be)},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},at.prototype.getState.call(this));return ke.typeName=Oe.typeName,ke},Oe.prototype.restoreState=function(ke){at.prototype.restoreState.call(this,ke);var Be=ke;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.curveX=Be.curveX,this.curveY=Be.curveY,this.createVisual(),this.adjustVisual()},Oe.typeName="CurveMarker",Oe.title="Curve marker",Oe.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>',Oe}(Ye),kn=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,Be,Ne)||this;return we.fillColor="transparent",we.strokeColor="transparent",we.strokeWidth=0,we.strokeDasharray="",we.textColor="transparent",we.fontSize="1rem",we.isMoved=!1,we.captionText="Caption",we.PADDING=5,we.captionBoxWidth=0,we.captionBoxHeight=0,we.strokeColor=Ne.defaultColor,we.strokeWidth=Ne.defaultStrokeWidth,we.strokeDasharray=Ne.defaultStrokeDasharray,we.fillColor=Ne.defaultFillColor,we.textColor=Ne.defaultStrokeColor,we.fontFamily=Ne.defaultFontFamily,we.fontSize=Ne.defaultCaptionFontSize,we.captionText=Ne.defaultCaptionText,we.setStrokeColor=we.setStrokeColor.bind(we),we.setFillColor=we.setFillColor.bind(we),we.setStrokeWidth=we.setStrokeWidth.bind(we),we.setStrokeDasharray=we.setStrokeDasharray.bind(we),we.createVisual=we.createVisual.bind(we),we.sizeCaption=we.sizeCaption.bind(we),we.setCaptionText=we.setCaptionText.bind(we),we.showTextEditor=we.showTextEditor.bind(we),we.positionTextEditor=we.positionTextEditor.bind(we),we.finishTextEditing=we.finishTextEditing.bind(we),we.setFont=we.setFont.bind(we),we.setTextColor=we.setTextColor.bind(we),we.strokePanel=new Me("Line color",ce(Ne.defaultColorSet,["transparent"]),we.strokeColor),we.strokePanel.onColorChanged=we.setStrokeColor,we.fillPanel=new Me("Fill color",ce(Ne.defaultColorSet,["transparent"]),we.fillColor,Ge),we.fillPanel.onColorChanged=we.setFillColor,we.strokeWidthPanel=new be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),we.strokeWidthPanel.onWidthChanged=we.setStrokeWidth,we.strokeStylePanel=new Re("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),we.strokeStylePanel.onStyleChanged=we.setStrokeDasharray,we.fontFamilyPanel=new Ke("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),we.fontFamilyPanel.onFontChanged=we.setFont,we.textColorPanel=new Me("Text color",Ne.defaultColorSet,we.textColor,nt),we.textColorPanel.onColorChanged=we.setTextColor,we}return Se(Oe,at),Oe.prototype.ownsTarget=function(ke){return!(!at.prototype.ownsTarget.call(this,ke)&&ke!==this.visual&&ke!==this.frame&&ke!==this.captionBg&&ke!==this.captionElement)},Oe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=fe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=fe.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=fe.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()},Oe.prototype.setCaptionText=function(ke){this.captionText=ke,this.captionElement.textContent=this.captionText,this.sizeCaption()},Oe.prototype.pointerDown=function(ke,Be){at.prototype.pointerDown.call(this,ke,Be),this.isMoved=!1,this.pointerDownPoint=ke,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ke),this._state="creating")},Oe.prototype.manipulate=function(ke){at.prototype.manipulate.call(this,ke),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ke.x-this.pointerDownPoint.x)>5||Math.abs(ke.y-this.pointerDownPoint.y)>5)},Oe.prototype.resize=function(ke){at.prototype.resize.call(this,ke),this.setSize()},Oe.prototype.sizeCaption=function(){var ke=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ke.width+2*this.PADDING,this.captionBoxHeight=ke.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),fe.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')"]]),fe.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')"]])},Oe.prototype.showTextEditor=function(){var ke=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(Be){Be.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Be){Be.key==="Enter"&&ke.finishTextEditing(ke.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ke.finishTextEditing(ke.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ke.finishTextEditing(ke.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Oe.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"))},Oe.prototype.finishTextEditing=function(ke){this.setCaptionText(ke.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Oe.prototype.setFont=function(ke){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",ke]]),this.fontFamily=ke,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Oe.prototype.setTextColor=function(ke){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",ke]]),this.textColor=ke,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Oe.prototype.setSize=function(){at.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Oe.prototype.pointerUp=function(ke){at.prototype.pointerUp.call(this,ke),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Oe.prototype.dblClick=function(ke,Be){at.prototype.dblClick.call(this,ke,Be),this.showTextEditor()},Oe.prototype.setStrokeColor=function(ke){this.strokeColor=ke,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ke),this.stateChanged()},Oe.prototype.setFillColor=function(ke){this.fillColor=ke,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ke),this.stateChanged()},Oe.prototype.setStrokeWidth=function(ke){this.strokeWidth=ke,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Oe.prototype.setStrokeDasharray=function(ke){this.strokeDasharray=ke,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Oe.prototype.getState=function(){var ke=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},at.prototype.getState.call(this));return ke.typeName=this.typeName,ke},Oe.prototype.restoreState=function(ke){var Be=ke;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.textColor=Be.textColor,this.fontFamily=Be.fontFamily,this.captionText=Be.captionText,this.fontSize=Be.fontSize,this.createVisual(),at.prototype.restoreState.call(this,ke),this.setSize()},Oe.prototype.scale=function(ke,Be){at.prototype.scale.call(this,ke,Be),this.setSize()},Oe.typeName="CaptionFrameMarker",Oe.title="Caption frame marker",Oe.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>',Oe}(ze),In=function(){function at(Oe,ke){ke===void 0&&(ke=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Oe,this.cancelable=ke}return Object.defineProperty(at.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),at.prototype.preventDefault=function(){this._defaultPrevented=!0},at}(),Qt=function(at){function Oe(ke,Be,Ne){var we=at.call(this,ke,!1)||this;return we.dataUrl=Be,we.state=Ne,we}return Se(Oe,at),Oe}(In),Mn=function(at){function Oe(ke,Be,Ne){Ne===void 0&&(Ne=!1);var we=at.call(this,ke,Ne)||this;return we.marker=Be,we}return Se(Oe,at),Oe}(In),Wn=function(){function at(){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 at.prototype.addEventListener=function(Oe,ke){this[Oe].push(ke)},at.prototype.removeEventListener=function(Oe,ke){var Be=this[Oe].indexOf(ke);Be>-1&&this[Oe].splice(Be,1)},at}(),zn=function(){function at(Oe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new Lt,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 Wn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=at.instanceCounter++,this.styles=new de(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Oe,this.targetRoot=document.body,this.width=Oe.clientWidth,this.height=Oe.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(at.prototype,"ALL_MARKER_TYPES",{get:function(){return[De,pt,Ze,zt,Tt,yn,Ut,jt,ln,tt,dt,Jt,kn]},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[De,pt,Ze,zt,yn,Ut,jt]},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"BASIC_MARKER_TYPES",{get:function(){return[De,pt,Ze,zt,Ut]},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Oe){var ke=this;this._availableMarkerTypes.splice(0),Oe.forEach(function(Be){if(typeof Be=="string"){var Ne=ke.ALL_MARKER_TYPES.find(function(we){return we.typeName===Be});Ne!==void 0&&ke._availableMarkerTypes.push(Ne)}else ke._availableMarkerTypes.push(Be)})},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Oe){this._zoomLevel=Oe,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(at.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),at.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ae.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},at.prototype.show=function(){var Oe=this;this.styles.styleSheetRoot===void 0&&re.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=re.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ke){return ke(new In(Oe))})},at.prototype.render=function(){return Le(this,void 0,void 0,function(){var Oe;return Ce(this,function(ke){switch(ke.label){case 0:return this.setCurrentMarker(),(Oe=new le).naturalSize=this.renderAtNaturalSize,Oe.imageType=this.renderImageType,Oe.imageQuality=this.renderImageQuality,Oe.markersOnly=this.renderMarkersOnly,Oe.width=this.renderWidth,Oe.height=this.renderHeight,[4,Oe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ke.sent(),[4,Oe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ke.sent()]}})})},at.prototype.close=function(Oe){var ke=this;if(Oe===void 0&&(Oe=!1),this.isOpen){var Be=!1;Oe||this.eventListeners.beforeclose.forEach(function(Ne){var we=new In(ke,!0);Ne(we),we.defaultPrevented&&(Be=!0)}),Be||(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(Ne){return Ne(new In(ke))}),this.detachEvents(),this._isOpen=!1)}},at.prototype.addMarkersToToolbar=function(){for(var Oe,ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];(Oe=this._availableMarkerTypes).push.apply(Oe,ke)},at.prototype.addRenderEventListener=function(Oe){this.addEventListener("render",function(ke){Oe(ke.dataUrl,ke.state)})},at.prototype.removeRenderEventListener=function(Oe){},at.prototype.addCloseEventListener=function(Oe){this.addEventListener("close",function(){Oe()})},at.prototype.removeCloseEventListener=function(Oe){},at.prototype.setupResizeObserver=function(){var Oe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Oe.resize(Oe.target.clientWidth,Oe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Oe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},at.prototype.onPopupTargetResize=function(){var Oe=1*this.target.clientWidth/this.target.clientHeight,ke=this.editorCanvas.clientWidth/Oe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Oe:this.editorCanvas.clientWidth,Be=ke<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Oe;this.resize(ke,Be)},at.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},at.prototype.resize=function(Oe,ke){this._isResizing=!0;var Be=Oe/this.imageWidth,Ne=ke/this.imageHeight;this.imageWidth=Math.round(Oe),this.imageHeight=Math.round(ke),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(Be,Ne),this._isResizing=!1},at.prototype.scaleMarkers=function(Oe,ke){var Be,Ne=this;this._currentMarker&&this._currentMarker instanceof zt?this._currentMarker.scale(Oe,ke):(Be=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(we){we!==Ne._currentMarker&&we.scale(Oe,ke)}),Be!==void 0&&this.setCurrentMarker(Be)},at.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"},at.prototype.setTopLeft=function(){var Oe=this.editingTarget.getBoundingClientRect(),ke=this.editorCanvas.getBoundingClientRect();this.left=Oe.left-ke.left,this.top=Oe.top-ke.top},at.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)},at.prototype.addDefs=function(){for(var Oe,ke=[],Be=0;Be<arguments.length;Be++)ke[Be]=arguments[Be];this.defs=fe.createDefs(),this.addDefsToImage(),(Oe=this.defs).append.apply(Oe,ke)},at.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},at.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)},at.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},at.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},at.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)},at.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},at.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)},at.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 Oe=document.createElement("a");Oe.href="https://markerjs.com/",Oe.target="_blank",Oe.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>',Oe.title="Powered by marker.js",Oe.style.display="grid",Oe.style.alignItems="center",Oe.style.justifyItems="center",Oe.style.padding="3px",Oe.style.width="20px",Oe.style.height="20px",this.logoUI.appendChild(Oe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},at.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")},at.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"},at.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},at.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 Oe=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=Oe+"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 se(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 ye(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},at.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},at.prototype.removeMarker=function(Oe){this.markerImage.removeChild(Oe.container),this.markers.indexOf(Oe)>-1&&this.markers.splice(this.markers.indexOf(Oe),1),Oe.dispose()},at.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())},at.prototype.toolbarButtonClicked=function(Oe,ke){if(Oe==="marker"&&ke!==void 0)this.createNewMarker(ke);else if(Oe==="action")switch(ke){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()}},at.prototype.deleteSelectedMarker=function(){var Oe=this;if(this._currentMarker!==void 0){var ke=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ne){var we=new Mn(Oe,Oe._currentMarker,!0);Ne(we),we.defaultPrevented&&(ke=!0)}),!ke){var Be=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(Ne){return Ne(new Mn(Oe,Be))})}}},at.prototype.clear=function(){var Oe=this,ke=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(rt){var It=new Mn(Oe,void 0,!0);rt(It),It.defaultPrevented&&(ke=!0)}),!ke)){this.setCurrentMarker();for(var Be=function(rt){var It=Ne.markers[rt];Ne.setCurrentMarker(Ne.markers[rt]),Ne._currentMarker.dispose(),Ne.markerImage.removeChild(Ne._currentMarker.container),Ne.markers.splice(Ne.markers.indexOf(Ne._currentMarker),1),Ne.eventListeners.markerdelete.forEach(function(Ct){return Ct(new Mn(Oe,It))})},Ne=this,we=this.markers.length-1;we>=0;we--)Be(we);this.addUndoStep()}},Object.defineProperty(at.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),at.prototype.showNotesEditor=function(){var Oe;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=(Oe=this._currentMarker.notes)!==null&&Oe!==void 0?Oe:"",this.overlayContainer.appendChild(this.notesArea))},at.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)},at.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},at.prototype.addUndoStep=function(){var Oe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ke=this.getState(),Be=this.undoRedoManager.getLastUndoStep();if(!Be||Be.width===ke.width&&Be.height===ke.height){var Ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ke),Ne<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(we){return we(new In(Oe))})}else this.undoRedoManager.replaceLastUndoStep(ke),this.eventListeners.statechange.forEach(function(we){return we(new In(Oe))})}},at.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},at.prototype.undoStep=function(){var Oe=this,ke=this.undoRedoManager.undo();ke!==void 0&&(this.restoreState(ke),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new In(Oe))}))},at.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},at.prototype.redoStep=function(){var Oe=this,ke=this.undoRedoManager.redo();ke!==void 0&&(this.restoreState(ke),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new In(Oe))}))},at.prototype.stepZoom=function(){var Oe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Oe<this.zoomSteps.length-1?this.zoomSteps[Oe+1]:this.zoomSteps[0]},at.prototype.panTo=function(Oe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Oe.x,top:this.prevPanPoint.y-Oe.y}),this.prevPanPoint=Oe},at.prototype.startRenderAndClose=function(){return Le(this,void 0,void 0,function(){var Oe,ke,Be=this;return Ce(this,function(Ne){switch(Ne.label){case 0:return[4,this.render()];case 1:return Oe=Ne.sent(),ke=this.getState(),this.eventListeners.render.forEach(function(we){return we(new Qt(Be,Oe,ke))}),this.close(!0),[2]}})})},at.prototype.getState=function(Oe){Oe===!0&&this.setCurrentMarker();var ke={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Be){return ke.markers.push(Be.getState())}),ke},at.prototype.restoreState=function(Oe){var ke=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Oe.markers.forEach(function(Be){var Ne=ke._availableMarkerTypes.find(function(rt){return rt.typeName===Be.typeName});if(Ne!==void 0){var we=ke.addNewMarker(Ne);we.restoreState(Be),ke.markers.push(we)}}),Oe.width&&Oe.height&&(Oe.width!==this.imageWidth||Oe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Oe.width,this.imageHeight/Oe.height),this.eventListeners.restorestate.forEach(function(Be){return Be(new In(ke))})},at.prototype.addNewMarker=function(Oe){var ke=fe.createGroup();return this.markerImage.appendChild(ke),new Oe(ke,this.overlayContainer,this.settings)},at.prototype.createNewMarker=function(Oe){var ke,Be=this;(ke=typeof Oe=="string"?this._availableMarkerTypes.find(function(Ne){return Ne.typeName===Oe}):Oe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ke),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(ke.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ne){return Ne(new Mn(Be,Be._currentMarker))}))},at.prototype.markerCreated=function(Oe){var ke=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Oe),this.setCurrentMarker(Oe),Oe instanceof pt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(pt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Be){return Be(new Mn(ke,ke._currentMarker))})},at.prototype.colorChanged=function(Oe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Oe,this.settings.defaultStrokeColor=Oe)},at.prototype.fillColorChanged=function(Oe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Oe)},at.prototype.markerStateChanged=function(Oe){var ke=this;this.eventListeners.markerchange.forEach(function(Be){return Be(new Mn(ke,Oe))})},at.prototype.setCurrentMarker=function(Oe){var ke=this;this._currentMarker!==Oe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Be){return Be(new Mn(ke,ke._currentMarker))})),this._currentMarker=Oe,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(Be){return Be(new Mn(ke,ke._currentMarker))}))},at.prototype.onPointerDown=function(Oe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Oe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ke=this.markers.find(function(Be){return Be.ownsTarget(Oe.target)});ke!==void 0?(this.setCurrentMarker(ke),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Oe.clientX,Oe.clientY),Oe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Oe.clientX,y:Oe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Oe.clientX,Oe.clientY))},at.prototype.onDblClick=function(Oe){if(this._isFocused||this.focus(),this.mode==="select"){var ke=this.markers.find(function(Be){return Be.ownsTarget(Oe.target)});ke!==void 0&&ke!==this._currentMarker&&this.setCurrentMarker(ke),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Oe.clientX,Oe.clientY),Oe.target):this.setCurrentMarker()}},at.prototype.onPointerMove=function(Oe){this.touchPoints!==1&&Oe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Oe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Oe.clientX,Oe.clientY)):this.zoomLevel>1&&this.panTo({x:Oe.clientX,y:Oe.clientY}))},at.prototype.onPointerUp=function(Oe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Oe.clientX,Oe.clientY)),this.isDragging=!1,this.addUndoStep()},at.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},at.prototype.onKeyUp=function(Oe){this._currentMarker===void 0||this.notesArea!==void 0||Oe.key!=="Delete"&&Oe.key!=="Backspace"||this.deleteSelectedMarker()},at.prototype.clientToLocalCoordinates=function(Oe,ke){var Be=this.markerImage.getBoundingClientRect();return{x:(Oe-Be.left)/this.zoomLevel,y:(ke-Be.top)/this.zoomLevel}},at.prototype.onWindowResize=function(){this.positionUI()},at.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Oe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Oe+"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()},at.prototype.addLicenseKey=function(Oe){ae.addKey(Oe)},at.prototype.addEventListener=function(Oe,ke){this.eventListeners.addEventListener(Oe,ke)},at.prototype.removeEventListener=function(Oe,ke){this.eventListeners.removeEventListener(Oe,ke)},at.prototype.renderState=function(Oe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Oe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(at.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),at.prototype.focus=function(){var Oe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ke){return ke(new In(Oe))}))},at.prototype.blur=function(){var Oe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ke){return ke(new In(Oe))}))},at.instanceCounter=0,at}()},95860:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Te}});var te=ee(87462),Se=ee(1413),Le=ee(4942),Ce=ee(97685),ce=ee(45987),fe=ee(94184),ae=ee.n(fe),le=ee(67294);function re(ze){var Ee=le.useRef();Ee.current=ze;var be=le.useCallback(function(){for(var Re,De=arguments.length,et=new Array(De),Ye=0;Ye<De;Ye++)et[Ye]=arguments[Ye];return(Re=Ee.current)===null||Re===void 0?void 0:Re.call.apply(Re,[Ee].concat(et))},[]);return be}function de(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var he=de()?le.useLayoutEffect:le.useEffect,me=function(Ee,be){var Re=le.useRef(!0);he(function(){return Ee(Re.current)},be),he(function(){return Re.current=!1,function(){Re.current=!0}},[])},se=function(Ee,be){me(function(Re){if(!Re)return Ee()},be)},ye=null;function _e(ze){var Ee=le.useRef(!1),be=le.useState(ze),Re=(0,Ce.Z)(be,2),De=Re[0],et=Re[1];le.useEffect(function(){return Ee.current=!1,function(){Ee.current=!0}},[]);function Ye(dt,Ke){Ke&&Ee.current||et(dt)}return[De,Ye]}function Me(ze){return ze!==void 0}function ve(ze,Ee){var be=Ee||{},Re=be.defaultValue,De=be.value,et=be.onChange,Ye=be.postState,dt=_e(function(){return Me(De)?De:Me(Re)?typeof Re=="function"?Re():Re:typeof ze=="function"?ze():ze}),Ke=(0,Ce.Z)(dt,2),zt=Ke[0],pt=Ke[1],Kt=De!==void 0?De:zt,Ze=Ye?Ye(Kt):Kt,tt=re(et),ft=_e([Kt]),Ut=(0,Ce.Z)(ft,2),nt=Ut[0],Ge=Ut[1];se(function(){var yn=nt[0];zt!==yn&&tt(zt,yn)},[nt]),se(function(){Me(De)||pt(De)},[De]);var jt=re(function(yn,ln){pt(yn,ln),Ge([Kt],ln)});return[Ze,jt]}var Fe=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],$e=(0,le.forwardRef)(function(ze,Ee){var be,Re=ze.prefixCls,De=Re===void 0?"rc-checkbox":Re,et=ze.className,Ye=ze.style,dt=ze.checked,Ke=ze.disabled,zt=ze.defaultChecked,pt=zt===void 0?!1:zt,Kt=ze.type,Ze=Kt===void 0?"checkbox":Kt,tt=ze.title,ft=ze.onChange,Ut=(0,ce.Z)(ze,Fe),nt=(0,le.useRef)(null),Ge=ve(pt,{value:dt}),jt=(0,Ce.Z)(Ge,2),yn=jt[0],ln=jt[1];(0,le.useImperativeHandle)(Ee,function(){return{focus:function(){var kn;(kn=nt.current)===null||kn===void 0||kn.focus()},blur:function(){var kn;(kn=nt.current)===null||kn===void 0||kn.blur()},input:nt.current}});var Tt=ae()(De,et,(be={},(0,Le.Z)(be,"".concat(De,"-checked"),yn),(0,Le.Z)(be,"".concat(De,"-disabled"),Ke),be)),Lt=function(kn){Ke||("checked"in ze||ln(kn.target.checked),ft==null||ft({target:(0,Se.Z)((0,Se.Z)({},ze),{},{type:Ze,checked:kn.target.checked}),stopPropagation:function(){kn.stopPropagation()},preventDefault:function(){kn.preventDefault()},nativeEvent:kn.nativeEvent}))};return le.createElement("span",{className:Tt,title:tt,style:Ye},le.createElement("input",(0,te.Z)({},Ut,{className:"".concat(De,"-input"),ref:nt,onChange:Lt,disabled:Ke,checked:!!yn,type:Ze})),le.createElement("span",{className:"".concat(De,"-inner")}))}),Te=$e},26819:function(dn,St){"use strict";var ee;var te=typeof Symbol=="function"&&Symbol.for,Se=te?Symbol.for("react.element"):60103,Le=te?Symbol.for("react.portal"):60106,Ce=te?Symbol.for("react.fragment"):60107,ce=te?Symbol.for("react.strict_mode"):60108,fe=te?Symbol.for("react.profiler"):60114,ae=te?Symbol.for("react.provider"):60109,le=te?Symbol.for("react.context"):60110,re=te?Symbol.for("react.async_mode"):60111,de=te?Symbol.for("react.concurrent_mode"):60111,he=te?Symbol.for("react.forward_ref"):60112,me=te?Symbol.for("react.suspense"):60113,se=te?Symbol.for("react.suspense_list"):60120,ye=te?Symbol.for("react.memo"):60115,_e=te?Symbol.for("react.lazy"):60116,Me=te?Symbol.for("react.block"):60121,ve=te?Symbol.for("react.fundamental"):60117,Fe=te?Symbol.for("react.responder"):60118,$e=te?Symbol.for("react.scope"):60119;function Te(Ee){if(typeof Ee=="object"&&Ee!==null){var be=Ee.$$typeof;switch(be){case Se:switch(Ee=Ee.type,Ee){case re:case de:case Ce:case fe:case ce:case me:return Ee;default:switch(Ee=Ee&&Ee.$$typeof,Ee){case le:case he:case _e:case ye:case ae:return Ee;default:return be}}case Le:return be}}}function ze(Ee){return Te(Ee)===de}ee=re,ee=de,ee=le,ee=ae,ee=Se,ee=he,ee=Ce,ee=_e,ee=ye,ee=Le,ee=fe,ee=ce,ee=me,ee=function(Ee){return ze(Ee)||Te(Ee)===re},ee=ze,ee=function(Ee){return Te(Ee)===le},ee=function(Ee){return Te(Ee)===ae},ee=function(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Se},ee=function(Ee){return Te(Ee)===he},ee=function(Ee){return Te(Ee)===Ce},ee=function(Ee){return Te(Ee)===_e},St.isMemo=function(Ee){return Te(Ee)===ye},ee=function(Ee){return Te(Ee)===Le},ee=function(Ee){return Te(Ee)===fe},ee=function(Ee){return Te(Ee)===ce},ee=function(Ee){return Te(Ee)===me},ee=function(Ee){return typeof Ee=="string"||typeof Ee=="function"||Ee===Ce||Ee===de||Ee===fe||Ee===ce||Ee===me||Ee===se||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===_e||Ee.$$typeof===ye||Ee.$$typeof===ae||Ee.$$typeof===le||Ee.$$typeof===he||Ee.$$typeof===ve||Ee.$$typeof===Fe||Ee.$$typeof===$e||Ee.$$typeof===Me)},ee=Te},18459:function(dn,St,ee){"use strict";dn.exports=ee(26819)},16651:function(dn,St){"use strict";var ee;var te=Symbol.for("react.element"),Se=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ae=Symbol.for("react.context"),le=Symbol.for("react.server_context"),re=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),_e;_e=Symbol.for("react.module.reference");function Me(ve){if(typeof ve=="object"&&ve!==null){var Fe=ve.$$typeof;switch(Fe){case te:switch(ve=ve.type,ve){case Le:case ce:case Ce:case de:case he:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case le:case ae:case re:case se:case me:case fe:return ve;default:return Fe}}case Se:return Fe}}}ee=ae,ee=fe,ee=te,ee=re,ee=Le,ee=se,ee=me,ee=Se,ee=ce,ee=Ce,ee=de,ee=he,ee=function(){return!1},ee=function(){return!1},ee=function(ve){return Me(ve)===ae},ee=function(ve){return Me(ve)===fe},ee=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===te},ee=function(ve){return Me(ve)===re},ee=function(ve){return Me(ve)===Le},ee=function(ve){return Me(ve)===se},ee=function(ve){return Me(ve)===me},ee=function(ve){return Me(ve)===Se},ee=function(ve){return Me(ve)===ce},ee=function(ve){return Me(ve)===Ce},ee=function(ve){return Me(ve)===de},ee=function(ve){return Me(ve)===he},ee=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===Le||ve===ce||ve===Ce||ve===de||ve===he||ve===ye||typeof ve=="object"&&ve!==null&&(ve.$$typeof===se||ve.$$typeof===me||ve.$$typeof===fe||ve.$$typeof===ae||ve.$$typeof===re||ve.$$typeof===_e||ve.getModuleId!==void 0)},ee=Me},33993:function(dn,St,ee){"use strict";ee(16651)},82523:function(dn,St){"use strict";var ee;var te=Symbol.for("react.element"),Se=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ae=Symbol.for("react.context"),le=Symbol.for("react.server_context"),re=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),_e;_e=Symbol.for("react.module.reference");function Me(ve){if(typeof ve=="object"&&ve!==null){var Fe=ve.$$typeof;switch(Fe){case te:switch(ve=ve.type,ve){case Le:case ce:case Ce:case de:case he:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case le:case ae:case re:case se:case me:case fe:return ve;default:return Fe}}case Se:return Fe}}}ee=ae,ee=fe,ee=te,ee=re,ee=Le,ee=se,ee=me,ee=Se,ee=ce,ee=Ce,ee=de,ee=he,ee=function(){return!1},ee=function(){return!1},ee=function(ve){return Me(ve)===ae},ee=function(ve){return Me(ve)===fe},ee=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===te},ee=function(ve){return Me(ve)===re},ee=function(ve){return Me(ve)===Le},ee=function(ve){return Me(ve)===se},ee=function(ve){return Me(ve)===me},ee=function(ve){return Me(ve)===Se},ee=function(ve){return Me(ve)===ce},ee=function(ve){return Me(ve)===Ce},ee=function(ve){return Me(ve)===de},ee=function(ve){return Me(ve)===he},ee=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===Le||ve===ce||ve===Ce||ve===de||ve===he||ve===ye||typeof ve=="object"&&ve!==null&&(ve.$$typeof===se||ve.$$typeof===me||ve.$$typeof===fe||ve.$$typeof===ae||ve.$$typeof===re||ve.$$typeof===_e||ve.getModuleId!==void 0)},ee=Me},27183:function(dn,St,ee){"use strict";ee(82523)},67656:function(dn,St,ee){"use strict";ee.r(St),ee.d(St,{BaseInput:function(){return de},default:function(){return $e}});var te=ee(87462),Se=ee(1413),Le=ee(4942),Ce=ee(71002),ce=ee(94184),fe=ee.n(ce),ae=ee(67294),le=ee(87887),re=function(ze){var Ee,be,Re=ze.inputElement,De=ze.prefixCls,et=ze.prefix,Ye=ze.suffix,dt=ze.addonBefore,Ke=ze.addonAfter,zt=ze.className,pt=ze.style,Kt=ze.disabled,Ze=ze.readOnly,tt=ze.focused,ft=ze.triggerFocus,Ut=ze.allowClear,nt=ze.value,Ge=ze.handleReset,jt=ze.hidden,yn=ze.classes,ln=ze.classNames,Tt=ze.dataAttrs,Lt=ze.styles,Jt=ze.components,kn=(Jt==null?void 0:Jt.affixWrapper)||"span",In=(Jt==null?void 0:Jt.groupWrapper)||"span",Qt=(Jt==null?void 0:Jt.wrapper)||"span",Mn=(Jt==null?void 0:Jt.groupAddon)||"span",Wn=(0,ae.useRef)(null),zn=function(wt){var on;(on=Wn.current)!==null&&on!==void 0&&on.contains(wt.target)&&(ft==null||ft())},at=function(){var wt;if(!Ut)return null;var on=!Kt&&!Ze&&nt,Dt="".concat(De,"-clear-icon"),Xt=(0,Ce.Z)(Ut)==="object"&&Ut!==null&&Ut!==void 0&&Ut.clearIcon?Ut.clearIcon:"\u2716";return ae.createElement("span",{onClick:Ge,onMouseDown:function(bn){return bn.preventDefault()},className:fe()(Dt,(wt={},(0,Le.Z)(wt,"".concat(Dt,"-hidden"),!on),(0,Le.Z)(wt,"".concat(Dt,"-has-suffix"),!!Ye),wt)),role:"button",tabIndex:-1},Xt)},Oe=(0,ae.cloneElement)(Re,{value:nt,hidden:jt,className:fe()((Ee=Re.props)===null||Ee===void 0?void 0:Ee.className,!(0,le.X3)(ze)&&!(0,le.He)(ze)&&zt)||null,style:(0,Se.Z)((0,Se.Z)({},(be=Re.props)===null||be===void 0?void 0:be.style),!(0,le.X3)(ze)&&!(0,le.He)(ze)?pt:{})});if((0,le.X3)(ze)){var ke,Be="".concat(De,"-affix-wrapper"),Ne=fe()(Be,(ke={},(0,Le.Z)(ke,"".concat(Be,"-disabled"),Kt),(0,Le.Z)(ke,"".concat(Be,"-focused"),tt),(0,Le.Z)(ke,"".concat(Be,"-readonly"),Ze),(0,Le.Z)(ke,"".concat(Be,"-input-with-clear-btn"),Ye&&Ut&&nt),ke),!(0,le.He)(ze)&&zt,yn==null?void 0:yn.affixWrapper,ln==null?void 0:ln.affixWrapper),we=(Ye||Ut)&&ae.createElement("span",{className:fe()("".concat(De,"-suffix"),ln==null?void 0:ln.suffix),style:Lt==null?void 0:Lt.suffix},at(),Ye);Oe=ae.createElement(kn,(0,te.Z)({className:Ne,style:(0,Se.Z)((0,Se.Z)({},(0,le.He)(ze)?void 0:pt),Lt==null?void 0:Lt.affixWrapper),hidden:!(0,le.He)(ze)&&jt,onClick:zn},Tt==null?void 0:Tt.affixWrapper,{ref:Wn}),et&&ae.createElement("span",{className:fe()("".concat(De,"-prefix"),ln==null?void 0:ln.prefix),style:Lt==null?void 0:Lt.prefix},et),(0,ae.cloneElement)(Re,{value:nt,hidden:null}),we)}if((0,le.He)(ze)){var rt="".concat(De,"-group"),It="".concat(rt,"-addon"),Ct=fe()("".concat(De,"-wrapper"),rt,yn==null?void 0:yn.wrapper),$t=fe()("".concat(De,"-group-wrapper"),zt,yn==null?void 0:yn.group);return ae.createElement(In,{className:$t,style:pt,hidden:jt},ae.createElement(Qt,{className:Ct},dt&&ae.createElement(Mn,{className:It},dt),(0,ae.cloneElement)(Oe,{hidden:null}),Ke&&ae.createElement(Mn,{className:It},Ke)))}return Oe},de=re,he=ee(74902),me=ee(97685),se=ee(45987),ye=ee(21770),_e=ee(98423),Me=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ve=(0,ae.forwardRef)(function(Te,ze){var Ee=Te.autoComplete,be=Te.onChange,Re=Te.onFocus,De=Te.onBlur,et=Te.onPressEnter,Ye=Te.onKeyDown,dt=Te.prefixCls,Ke=dt===void 0?"rc-input":dt,zt=Te.disabled,pt=Te.htmlSize,Kt=Te.className,Ze=Te.maxLength,tt=Te.suffix,ft=Te.showCount,Ut=Te.type,nt=Ut===void 0?"text":Ut,Ge=Te.classes,jt=Te.classNames,yn=Te.styles,ln=(0,se.Z)(Te,Me),Tt=(0,ye.Z)(Te.defaultValue,{value:Te.value}),Lt=(0,me.Z)(Tt,2),Jt=Lt[0],kn=Lt[1],In=(0,ae.useState)(!1),Qt=(0,me.Z)(In,2),Mn=Qt[0],Wn=Qt[1],zn=(0,ae.useRef)(null),at=function($t){zn.current&&(0,le.nH)(zn.current,$t)};(0,ae.useImperativeHandle)(ze,function(){return{focus:at,blur:function(){var $t;($t=zn.current)===null||$t===void 0||$t.blur()},setSelectionRange:function($t,Vt,wt){var on;(on=zn.current)===null||on===void 0||on.setSelectionRange($t,Vt,wt)},select:function(){var $t;($t=zn.current)===null||$t===void 0||$t.select()},input:zn.current}}),(0,ae.useEffect)(function(){Wn(function(Ct){return Ct&&zt?!1:Ct})},[zt]);var Oe=function($t){Te.value===void 0&&kn($t.target.value),zn.current&&(0,le.rJ)(zn.current,$t,be)},ke=function($t){et&&$t.key==="Enter"&&et($t),Ye==null||Ye($t)},Be=function($t){Wn(!0),Re==null||Re($t)},Ne=function($t){Wn(!1),De==null||De($t)},we=function($t){kn(""),at(),zn.current&&(0,le.rJ)(zn.current,$t,be)},rt=function(){var $t=(0,_e.Z)(Te,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ae.createElement("input",(0,te.Z)({autoComplete:Ee},$t,{onChange:Oe,onFocus:Be,onBlur:Ne,onKeyDown:ke,className:fe()(Ke,(0,Le.Z)({},"".concat(Ke,"-disabled"),zt),jt==null?void 0:jt.input),style:yn==null?void 0:yn.input,ref:zn,size:pt,type:nt}))},It=function(){var $t=Number(Ze)>0;if(tt||ft){var Vt=(0,le.D7)(Jt),wt=(0,he.Z)(Vt).length,on=(0,Ce.Z)(ft)==="object"?ft.formatter({value:Vt,count:wt,maxLength:Ze}):"".concat(wt).concat($t?" / ".concat(Ze):"");return ae.createElement(ae.Fragment,null,!!ft&&ae.createElement("span",{className:fe()("".concat(Ke,"-show-count-suffix"),(0,Le.Z)({},"".concat(Ke,"-show-count-has-suffix"),!!tt),jt==null?void 0:jt.count),style:(0,Se.Z)({},yn==null?void 0:yn.count)},on),tt)}return null};return ae.createElement(de,(0,te.Z)({},ln,{prefixCls:Ke,className:Kt,inputElement:rt(),handleReset:we,value:(0,le.D7)(Jt),focused:Mn,triggerFocus:at,suffix:It(),disabled:zt,classes:Ge,classNames:jt,styles:yn}))}),Fe=ve,$e=Fe},87887:function(dn,St,ee){"use strict";ee.d(St,{D7:function(){return ce},He:function(){return te},X3:function(){return Se},nH:function(){return Ce},rJ:function(){return Le}});function te(fe){return!!(fe.addonBefore||fe.addonAfter)}function Se(fe){return!!(fe.prefix||fe.suffix||fe.allowClear)}function Le(fe,ae,le,re){if(le){var de=ae;if(ae.type==="click"){var he=fe.cloneNode(!0);de=Object.create(ae,{target:{value:he},currentTarget:{value:he}}),he.value="",le(de);return}if(re!==void 0){de=Object.create(ae,{target:{value:fe},currentTarget:{value:fe}}),fe.value=re,le(de);return}le(de)}}function Ce(fe,ae){if(fe){fe.focus(ae);var le=ae||{},re=le.cursor;if(re){var de=fe.value.length;switch(re){case"start":fe.setSelectionRange(0,0);break;case"end":fe.setSelectionRange(de,de);break;default:fe.setSelectionRange(0,de)}}}}function ce(fe){return typeof fe=="undefined"||fe===null?"":String(fe)}},78595:function(dn,St,ee){"use strict";ee.d(St,{iz:function(){return Xi},ck:function(){return bi},BW:function(){return ji},sN:function(){return bi},Wd:function(){return Hn},ZP:function(){return lt},Xl:function(){return on}});var te=ee(87462),Se=ee(4942),Le=ee(1413),Ce=ee(74902),ce=ee(97685),fe=ee(45987),ae=ee(94184),le=ee.n(ae),re=ee(67294),de=ee(48555);function he(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var me=he()?re.useLayoutEffect:re.useEffect,se=function(gt,yt){var kt=re.useRef(!0);me(function(){return gt(kt.current)},yt),me(function(){return kt.current=!1,function(){kt.current=!0}},[])},ye=function(gt,yt){se(function(kt){if(!kt)return gt()},yt)},_e=se,Me=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ve=void 0;function Fe(ut,gt){var yt=ut.prefixCls,kt=ut.invalidate,At=ut.item,tn=ut.renderItem,fn=ut.responsive,jn=ut.responsiveDisabled,qn=ut.registerSize,Kn=ut.itemKey,An=ut.className,Dn=ut.style,wn=ut.children,Un=ut.display,vr=ut.order,er=ut.component,ir=er===void 0?"div":er,fr=(0,fe.Z)(ut,Me),_t=fn&&!Un;function vt(qt){qn(Kn,qt)}re.useEffect(function(){return function(){vt(null)}},[]);var Xe=tn&&At!==ve?tn(At):wn,ot;kt||(ot={opacity:_t?0:1,height:_t?0:ve,overflowY:_t?"hidden":ve,order:fn?vr:ve,pointerEvents:_t?"none":ve,position:_t?"absolute":ve});var Nt={};_t&&(Nt["aria-hidden"]=!0);var Pt=re.createElement(ir,(0,te.Z)({className:le()(!kt&&yt,An),style:(0,Le.Z)((0,Le.Z)({},ot),Dn)},Nt,fr,{ref:gt}),Xe);return fn&&(Pt=re.createElement(de.Z,{onResize:function(hn){var gn=hn.offsetWidth;vt(gn)},disabled:jn},Pt)),Pt}var $e=re.forwardRef(Fe);$e.displayName="Item";var Te=$e;function ze(ut){var gt=re.useRef();gt.current=ut;var yt=re.useCallback(function(){for(var kt,At=arguments.length,tn=new Array(At),fn=0;fn<At;fn++)tn[fn]=arguments[fn];return(kt=gt.current)===null||kt===void 0?void 0:kt.call.apply(kt,[gt].concat(tn))},[]);return yt}var Ee=ee(73935),be=function(gt){return+setTimeout(gt,16)},Re=function(gt){return clearTimeout(gt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(be=function(gt){return window.requestAnimationFrame(gt)},Re=function(gt){return window.cancelAnimationFrame(gt)});var De=0,et=new Map;function Ye(ut){et.delete(ut)}var dt=function(gt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;De+=1;var kt=De;function At(tn){if(tn===0)Ye(kt),gt();else{var fn=be(function(){At(tn-1)});et.set(kt,fn)}}return At(yt),kt};dt.cancel=function(ut){var gt=et.get(ut);return Ye(gt),Re(gt)};var Ke=dt;function zt(ut){if(typeof MessageChannel=="undefined")Ke(ut);else{var gt=new MessageChannel;gt.port1.onmessage=function(){return ut()},gt.port2.postMessage(void 0)}}function pt(){var ut=re.useRef(null),gt=function(kt){ut.current||(ut.current=[],zt(function(){(0,Ee.unstable_batchedUpdates)(function(){ut.current.forEach(function(At){At()}),ut.current=null})})),ut.current.push(kt)};return gt}function Kt(ut,gt){var yt=re.useState(gt),kt=(0,ce.Z)(yt,2),At=kt[0],tn=kt[1],fn=ze(function(jn){ut(function(){tn(jn)})});return[At,fn]}var Ze=re.createContext(null),tt=["component"],ft=["className"],Ut=["className"],nt=function(gt,yt){var kt=re.useContext(Ze);if(!kt){var At=gt.component,tn=At===void 0?"div":At,fn=(0,fe.Z)(gt,tt);return re.createElement(tn,(0,te.Z)({},fn,{ref:yt}))}var jn=kt.className,qn=(0,fe.Z)(kt,ft),Kn=gt.className,An=(0,fe.Z)(gt,Ut);return re.createElement(Ze.Provider,{value:null},re.createElement(Te,(0,te.Z)({ref:yt,className:le()(jn,Kn)},qn,An)))},Ge=re.forwardRef(nt);Ge.displayName="RawItem";var jt=Ge,yn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ln="responsive",Tt="invalidate";function Lt(ut){return"+ ".concat(ut.length," ...")}function Jt(ut,gt){var yt=ut.prefixCls,kt=yt===void 0?"rc-overflow":yt,At=ut.data,tn=At===void 0?[]:At,fn=ut.renderItem,jn=ut.renderRawItem,qn=ut.itemKey,Kn=ut.itemWidth,An=Kn===void 0?10:Kn,Dn=ut.ssr,wn=ut.style,Un=ut.className,vr=ut.maxCount,er=ut.renderRest,ir=ut.renderRawRest,fr=ut.suffix,_t=ut.component,vt=_t===void 0?"div":_t,Xe=ut.itemComponent,ot=ut.onVisibleChange,Nt=(0,fe.Z)(ut,yn),Pt=Dn==="full",qt=pt(),hn=Kt(qt,null),gn=(0,ce.Z)(hn,2),Nn=gn[0],On=gn[1],vn=Nn||0,Fn=Kt(qt,new Map),Gn=(0,ce.Z)(Fn,2),xr=Gn[0],sr=Gn[1],Lr=Kt(qt,0),Ur=(0,ce.Z)(Lr,2),Pr=Ur[0],Qr=Ur[1],Tr=Kt(qt,0),Wr=(0,ce.Z)(Tr,2),ni=Wr[0],Si=Wr[1],Nr=Kt(qt,0),wi=(0,ce.Z)(Nr,2),gi=wi[0],vo=wi[1],Ji=(0,re.useState)(null),Pi=(0,ce.Z)(Ji,2),Mi=Pi[0],Ai=Pi[1],pi=(0,re.useState)(null),zi=(0,ce.Z)(pi,2),ai=zi[0],ii=zi[1],Ui=re.useMemo(function(){return ai===null&&Pt?Number.MAX_SAFE_INTEGER:ai||0},[ai,Nn]),to=(0,re.useState)(!1),la=(0,ce.Z)(to,2),da=la[0],So=la[1],go="".concat(kt,"-item"),Zi=Math.max(Pr,ni),Ii=vr===ln,pa=tn.length&&Ii,io=vr===Tt,si=pa||typeof vr=="number"&&tn.length>vr,Ki=(0,re.useMemo)(function(){var ho=tn;return pa?Nn===null&&Pt?ho=tn:ho=tn.slice(0,Math.min(tn.length,vn/An)):typeof vr=="number"&&(ho=tn.slice(0,vr)),ho},[tn,An,Nn,vr,pa]),Io=(0,re.useMemo)(function(){return pa?tn.slice(Ui+1):tn.slice(Ki.length)},[tn,Ki,pa,Ui]),Ro=(0,re.useCallback)(function(ho,Po){var _a;return typeof qn=="function"?qn(ho):(_a=qn&&(ho==null?void 0:ho[qn]))!==null&&_a!==void 0?_a:Po},[qn]),qo=(0,re.useCallback)(fn||function(ho){return ho},[fn]);function Qi(ho,Po,_a){ai===ho&&(Po===void 0||Po===Mi)||(ii(ho),_a||(So(ho<tn.length-1),ot==null||ot(ho)),Po!==void 0&&Ai(Po))}function ma(ho,Po){On(Po.clientWidth)}function va(ho,Po){sr(function(_a){var Da=new Map(_a);return Po===null?Da.delete(ho):Da.set(ho,Po),Da})}function ia(ho,Po){Si(Po),Qr(ni)}function ca(ho,Po){vo(Po)}function Ea(ho){return xr.get(Ro(Ki[ho],ho))}_e(function(){if(vn&&typeof Zi=="number"&&Ki){var ho=gi,Po=Ki.length,_a=Po-1;if(!Po){Qi(0,null);return}for(var Da=0;Da<Po;Da+=1){var gs=Ea(Da);if(Pt&&(gs=gs||0),gs===void 0){Qi(Da-1,void 0,!0);break}if(ho+=gs,_a===0&&ho<=vn||Da===_a-1&&ho+Ea(_a)<=vn){Qi(_a,null);break}else if(ho+Zi>vn){Qi(Da-1,ho-gs-gi+ni);break}}fr&&Ea(0)+gi>vn&&Ai(null)}},[vn,xr,ni,gi,Ro,Ki]);var Ja=da&&!!Io.length,Ma={};Mi!==null&&pa&&(Ma={position:"absolute",left:Mi,top:0});var Za={prefixCls:go,responsive:pa,component:Xe,invalidate:io},vs=jn?function(ho,Po){var _a=Ro(ho,Po);return re.createElement(Ze.Provider,{key:_a,value:(0,Le.Z)((0,Le.Z)({},Za),{},{order:Po,item:ho,itemKey:_a,registerSize:va,display:Po<=Ui})},jn(ho,Po))}:function(ho,Po){var _a=Ro(ho,Po);return re.createElement(Te,(0,te.Z)({},Za,{order:Po,key:_a,item:ho,renderItem:qo,itemKey:_a,registerSize:va,display:Po<=Ui}))},Es,Ls={order:Ja?Ui:Number.MAX_SAFE_INTEGER,className:"".concat(go,"-rest"),registerSize:ia,display:Ja};if(ir)ir&&(Es=re.createElement(Ze.Provider,{value:(0,Le.Z)((0,Le.Z)({},Za),Ls)},ir(Io)));else{var Qa=er||Lt;Es=re.createElement(Te,(0,te.Z)({},Za,Ls),typeof Qa=="function"?Qa(Io):Qa)}var La=re.createElement(vt,(0,te.Z)({className:le()(!io&&kt,Un),style:wn,ref:gt},Nt),Ki.map(vs),si?Es:null,fr&&re.createElement(Te,(0,te.Z)({},Za,{responsive:Ii,responsiveDisabled:!pa,order:Ui,className:"".concat(go,"-suffix"),registerSize:ca,display:!0,style:Ma}),fr));return Ii&&(La=re.createElement(de.Z,{onResize:ma,disabled:!pa},La)),La}var kn=re.forwardRef(Jt);kn.displayName="Overflow",kn.Item=jt,kn.RESPONSIVE=ln,kn.INVALIDATE=Tt;var In=kn,Qt=In,Mn=ee(21770),Wn=ee(80334),zn=ee(91881),at=re.createContext(null);function Oe(ut,gt){return ut===void 0?null:"".concat(ut,"-").concat(gt)}function ke(ut){var gt=re.useContext(at);return Oe(gt,ut)}var Be=ee(56982),Ne=["children","locked"],we=re.createContext(null);function rt(ut,gt){var yt=(0,Le.Z)({},ut);return Object.keys(gt).forEach(function(kt){var At=gt[kt];At!==void 0&&(yt[kt]=At)}),yt}function It(ut){var gt=ut.children,yt=ut.locked,kt=(0,fe.Z)(ut,Ne),At=re.useContext(we),tn=(0,Be.Z)(function(){return rt(At,kt)},[At,kt],function(fn,jn){return!yt&&(fn[0]!==jn[0]||!(0,zn.Z)(fn[1],jn[1],!0))});return re.createElement(we.Provider,{value:tn},gt)}var Ct=[],$t=re.createContext(null);function Vt(){return re.useContext($t)}var wt=re.createContext(Ct);function on(ut){var gt=re.useContext(wt);return re.useMemo(function(){return ut!==void 0?[].concat((0,Ce.Z)(gt),[ut]):gt},[gt,ut])}var Dt=re.createContext(null),Xt=re.createContext({}),nn=Xt,bn=ee(15105),en=ee(75164),Zn=function(ut){if(!ut)return!1;if(ut instanceof Element){if(ut.offsetParent)return!0;if(ut.getBBox){var gt=ut.getBBox(),yt=gt.width,kt=gt.height;if(yt||kt)return!0}if(ut.getBoundingClientRect){var At=ut.getBoundingClientRect(),tn=At.width,fn=At.height;if(tn||fn)return!0}}return!1};function Yn(ut){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Zn(ut)){var yt=ut.nodeName.toLowerCase(),kt=["input","select","textarea","button"].includes(yt)||ut.isContentEditable||yt==="a"&&!!ut.getAttribute("href"),At=ut.getAttribute("tabindex"),tn=Number(At),fn=null;return At&&!Number.isNaN(tn)?fn=tn:kt&&fn===null&&(fn=0),kt&&ut.disabled&&(fn=null),fn!==null&&(fn>=0||gt&&fn<0)}return!1}function pr(ut){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=(0,Ce.Z)(ut.querySelectorAll("*")).filter(function(kt){return Yn(kt,gt)});return Yn(ut,gt)&&yt.unshift(ut),yt}var ti=null;function Pn(){ti=document.activeElement}function Or(){ti=null}function Br(){if(ti)try{ti.focus()}catch(ut){}}function Di(ut,gt){if(gt.keyCode===9){var yt=pr(ut),kt=yt[gt.shiftKey?0:yt.length-1],At=kt===document.activeElement||ut===document.activeElement;if(At){var tn=yt[gt.shiftKey?yt.length-1:0];tn.focus(),gt.preventDefault()}}}var mi=bn.Z.LEFT,ci=bn.Z.RIGHT,Fr=bn.Z.UP,zr=bn.Z.DOWN,Fi=bn.Z.ENTER,ko=bn.Z.ESC,aa=bn.Z.HOME,Wo=bn.Z.END,li=[Fr,zr,mi,ci];function rn(ut,gt,yt,kt){var At,tn,fn,jn,qn="prev",Kn="next",An="children",Dn="parent";if(ut==="inline"&&kt===Fi)return{inlineTrigger:!0};var wn=(At={},(0,Se.Z)(At,Fr,qn),(0,Se.Z)(At,zr,Kn),At),Un=(tn={},(0,Se.Z)(tn,mi,yt?Kn:qn),(0,Se.Z)(tn,ci,yt?qn:Kn),(0,Se.Z)(tn,zr,An),(0,Se.Z)(tn,Fi,An),tn),vr=(fn={},(0,Se.Z)(fn,Fr,qn),(0,Se.Z)(fn,zr,Kn),(0,Se.Z)(fn,Fi,An),(0,Se.Z)(fn,ko,Dn),(0,Se.Z)(fn,mi,yt?An:Dn),(0,Se.Z)(fn,ci,yt?Dn:An),fn),er={inline:wn,horizontal:Un,vertical:vr,inlineSub:wn,horizontalSub:vr,verticalSub:vr},ir=(jn=er["".concat(ut).concat(gt?"":"Sub")])===null||jn===void 0?void 0:jn[kt];switch(ir){case qn:return{offset:-1,sibling:!0};case Kn:return{offset:1,sibling:!0};case Dn:return{offset:-1,sibling:!1};case An:return{offset:1,sibling:!1};default:return null}}function nr(ut){for(var gt=ut;gt;){if(gt.getAttribute("data-menu-list"))return gt;gt=gt.parentElement}return null}function dr(ut,gt){for(var yt=ut||document.activeElement;yt;){if(gt.has(yt))return yt;yt=yt.parentElement}return null}function rr(ut,gt){var yt=pr(ut,!0);return yt.filter(function(kt){return gt.has(kt)})}function Jr(ut,gt,yt){var kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ut)return null;var At=rr(ut,gt),tn=At.length,fn=At.findIndex(function(jn){return yt===jn});return kt<0?fn===-1?fn=tn-1:fn-=1:kt>0&&(fn+=1),fn=(fn+tn)%tn,At[fn]}function Ar(ut,gt,yt,kt,At,tn,fn,jn,qn,Kn){var An=re.useRef(),Dn=re.useRef();Dn.current=gt;var wn=function(){en.Z.cancel(An.current)};return re.useEffect(function(){return function(){wn()}},[]),function(Un){var vr=Un.which;if([].concat(li,[Fi,ko,aa,Wo]).includes(vr)){var er,ir,fr,_t=function(){er=new Set,ir=new Map,fr=new Map;var Gn=tn();return Gn.forEach(function(xr){var sr=document.querySelector("[data-menu-id='".concat(Oe(kt,xr),"']"));sr&&(er.add(sr),fr.set(sr,xr),ir.set(xr,sr))}),er};_t();var vt=ir.get(gt),Xe=dr(vt,er),ot=fr.get(Xe),Nt=rn(ut,fn(ot,!0).length===1,yt,vr);if(!Nt&&vr!==aa&&vr!==Wo)return;(li.includes(vr)||[aa,Wo].includes(vr))&&Un.preventDefault();var Pt=function(Gn){if(Gn){var xr=Gn,sr=Gn.querySelector("a");sr!=null&&sr.getAttribute("href")&&(xr=sr);var Lr=fr.get(Gn);jn(Lr),wn(),An.current=(0,en.Z)(function(){Dn.current===Lr&&xr.focus()})}};if([aa,Wo].includes(vr)||Nt.sibling||!Xe){var qt;!Xe||ut==="inline"?qt=At.current:qt=nr(Xe);var hn,gn=rr(qt,er);vr===aa?hn=gn[0]:vr===Wo?hn=gn[gn.length-1]:hn=Jr(qt,er,Xe,Nt.offset),Pt(hn)}else if(Nt.inlineTrigger)qn(ot);else if(Nt.offset>0)qn(ot,!0),wn(),An.current=(0,en.Z)(function(){_t();var Fn=Xe.getAttribute("aria-controls"),Gn=document.getElementById(Fn),xr=Jr(Gn,er);Pt(xr)},5);else if(Nt.offset<0){var Nn=fn(ot,!0),On=Nn[Nn.length-2],vn=ir.get(On);qn(On,!1),Pt(vn)}}Kn==null||Kn(Un)}}function Mr(ut){Promise.resolve().then(ut)}var tr="__RC_UTIL_PATH_SPLIT__",Zt=function(gt){return gt.join(tr)},Ot=function(gt){return gt.split(tr)},ge="rc-menu-more";function Ie(){var ut=re.useState({}),gt=(0,ce.Z)(ut,2),yt=gt[1],kt=(0,re.useRef)(new Map),At=(0,re.useRef)(new Map),tn=re.useState([]),fn=(0,ce.Z)(tn,2),jn=fn[0],qn=fn[1],Kn=(0,re.useRef)(0),An=(0,re.useRef)(!1),Dn=function(){An.current||yt({})},wn=(0,re.useCallback)(function(vt,Xe){var ot=Zt(Xe);At.current.set(ot,vt),kt.current.set(vt,ot),Kn.current+=1;var Nt=Kn.current;Mr(function(){Nt===Kn.current&&Dn()})},[]),Un=(0,re.useCallback)(function(vt,Xe){var ot=Zt(Xe);At.current.delete(ot),kt.current.delete(vt)},[]),vr=(0,re.useCallback)(function(vt){qn(vt)},[]),er=(0,re.useCallback)(function(vt,Xe){var ot=kt.current.get(vt)||"",Nt=Ot(ot);return Xe&&jn.includes(Nt[0])&&Nt.unshift(ge),Nt},[jn]),ir=(0,re.useCallback)(function(vt,Xe){return vt.some(function(ot){var Nt=er(ot,!0);return Nt.includes(Xe)})},[er]),fr=function(){var Xe=(0,Ce.Z)(kt.current.keys());return jn.length&&Xe.push(ge),Xe},_t=(0,re.useCallback)(function(vt){var Xe="".concat(kt.current.get(vt)).concat(tr),ot=new Set;return(0,Ce.Z)(At.current.keys()).forEach(function(Nt){Nt.startsWith(Xe)&&ot.add(At.current.get(Nt))}),ot},[]);return re.useEffect(function(){return function(){An.current=!0}},[]),{registerPath:wn,unregisterPath:Un,refreshOverflowKeys:vr,isSubPathKey:ir,getKeyPath:er,getKeys:fr,getSubPathKeys:_t}}function Ae(ut){var gt=re.useRef(ut);gt.current=ut;var yt=re.useCallback(function(){for(var kt,At=arguments.length,tn=new Array(At),fn=0;fn<At;fn++)tn[fn]=arguments[fn];return(kt=gt.current)===null||kt===void 0?void 0:kt.call.apply(kt,[gt].concat(tn))},[]);return ut?yt:void 0}var We=Math.random().toFixed(5).toString().slice(2),it=0;function xt(ut){var gt=(0,Mn.Z)(ut,{value:ut}),yt=(0,ce.Z)(gt,2),kt=yt[0],At=yt[1];return re.useEffect(function(){it+=1;var tn="".concat(We,"-").concat(it);At("rc-menu-uuid-".concat(tn))},[]),kt}var Ft=ee(15671),an=ee(43144),Rn=ee(60136),mr=ee(51630),or=ee(98423),cr=ee(42550);function Xn(ut,gt,yt,kt){var At=re.useContext(we),tn=At.activeKey,fn=At.onActive,jn=At.onInactive,qn={active:tn===ut};return gt||(qn.onMouseEnter=function(Kn){yt==null||yt({key:ut,domEvent:Kn}),fn(ut)},qn.onMouseLeave=function(Kn){kt==null||kt({key:ut,domEvent:Kn}),jn(ut)}),qn}function br(ut){var gt=re.useContext(we),yt=gt.mode,kt=gt.rtl,At=gt.inlineIndent;if(yt!=="inline")return null;var tn=ut;return kt?{paddingRight:tn*At}:{paddingLeft:tn*At}}function _r(ut){var gt=ut.icon,yt=ut.props,kt=ut.children,At;return gt===null||gt===!1?null:(typeof gt=="function"?At=re.createElement(gt,(0,Le.Z)({},yt)):typeof gt!="boolean"&&(At=gt),At||kt||null)}var mn=["item"];function $n(ut){var gt=ut.item,yt=(0,fe.Z)(ut,mn);return Object.defineProperty(yt,"item",{get:function(){return(0,Wn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),gt}}),yt}var Vr=["title","attribute","elementRef"],qr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ir=["active"],hi=function(ut){(0,Rn.Z)(yt,ut);var gt=(0,mr.Z)(yt);function yt(){return(0,Ft.Z)(this,yt),gt.apply(this,arguments)}return(0,an.Z)(yt,[{key:"render",value:function(){var At=this.props,tn=At.title,fn=At.attribute,jn=At.elementRef,qn=(0,fe.Z)(At,Vr),Kn=(0,or.Z)(qn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Wn.ZP)(!fn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),re.createElement(Qt.Item,(0,te.Z)({},fn,{title:typeof tn=="string"?tn:void 0},Kn,{ref:jn}))}}]),yt}(re.Component),Ni=re.forwardRef(function(ut,gt){var yt,kt=ut.style,At=ut.className,tn=ut.eventKey,fn=ut.warnKey,jn=ut.disabled,qn=ut.itemIcon,Kn=ut.children,An=ut.role,Dn=ut.onMouseEnter,wn=ut.onMouseLeave,Un=ut.onClick,vr=ut.onKeyDown,er=ut.onFocus,ir=(0,fe.Z)(ut,qr),fr=ke(tn),_t=re.useContext(we),vt=_t.prefixCls,Xe=_t.onItemClick,ot=_t.disabled,Nt=_t.overflowDisabled,Pt=_t.itemIcon,qt=_t.selectedKeys,hn=_t.onActive,gn=re.useContext(nn),Nn=gn._internalRenderMenuItem,On="".concat(vt,"-item"),vn=re.useRef(),Fn=re.useRef(),Gn=ot||jn,xr=(0,cr.x1)(gt,Fn),sr=on(tn),Lr=function(Pi){return{key:tn,keyPath:(0,Ce.Z)(sr).reverse(),item:vn.current,domEvent:Pi}},Ur=qn||Pt,Pr=Xn(tn,Gn,Dn,wn),Qr=Pr.active,Tr=(0,fe.Z)(Pr,Ir),Wr=qt.includes(tn),ni=br(sr.length),Si=function(Pi){if(!Gn){var Mi=Lr(Pi);Un==null||Un($n(Mi)),Xe(Mi)}},Nr=function(Pi){if(vr==null||vr(Pi),Pi.which===bn.Z.ENTER){var Mi=Lr(Pi);Un==null||Un($n(Mi)),Xe(Mi)}},wi=function(Pi){hn(tn),er==null||er(Pi)},gi={};ut.role==="option"&&(gi["aria-selected"]=Wr);var vo=re.createElement(hi,(0,te.Z)({ref:vn,elementRef:xr,role:An===null?"none":An||"menuitem",tabIndex:jn?null:-1,"data-menu-id":Nt&&fr?null:fr},ir,Tr,gi,{component:"li","aria-disabled":jn,style:(0,Le.Z)((0,Le.Z)({},ni),kt),className:le()(On,(yt={},(0,Se.Z)(yt,"".concat(On,"-active"),Qr),(0,Se.Z)(yt,"".concat(On,"-selected"),Wr),(0,Se.Z)(yt,"".concat(On,"-disabled"),Gn),yt),At),onClick:Si,onKeyDown:Nr,onFocus:wi}),Kn,re.createElement(_r,{props:(0,Le.Z)((0,Le.Z)({},ut),{},{isSelected:Wr}),icon:Ur}));return Nn&&(vo=Nn(vo,ut,{selected:Wr})),vo});function yr(ut,gt){var yt=ut.eventKey,kt=Vt(),At=on(yt);return re.useEffect(function(){if(kt)return kt.registerPath(yt,At),function(){kt.unregisterPath(yt,At)}},[At]),kt?null:re.createElement(Ni,(0,te.Z)({},ut,{ref:gt}))}var bi=re.forwardRef(yr),ar=["className","children"],fo=function(gt,yt){var kt=gt.className,At=gt.children,tn=(0,fe.Z)(gt,ar),fn=re.useContext(we),jn=fn.prefixCls,qn=fn.mode,Kn=fn.rtl;return re.createElement("ul",(0,te.Z)({className:le()(jn,Kn&&"".concat(jn,"-rtl"),"".concat(jn,"-sub"),"".concat(jn,"-").concat(qn==="inline"?"inline":"vertical"),kt),role:"menu"},tn,{"data-menu-list":!0,ref:yt}),At)},qi=re.forwardRef(fo);qi.displayName="SubMenuList";var ua=qi,Jo=ee(50344);function bo(ut,gt){return(0,Jo.Z)(ut).map(function(yt,kt){if(re.isValidElement(yt)){var At,tn,fn=yt.key,jn=(At=(tn=yt.props)===null||tn===void 0?void 0:tn.eventKey)!==null&&At!==void 0?At:fn,qn=jn==null;qn&&(jn="tmp_key-".concat([].concat((0,Ce.Z)(gt),[kt]).join("-")));var Kn={key:jn,eventKey:jn};return re.cloneElement(yt,Kn)}return yt})}var oo=ee(62709),na={adjustX:1,adjustY:1},Eo={topLeft:{points:["bl","tl"],overflow:na},topRight:{points:["br","tr"],overflow:na},bottomLeft:{points:["tl","bl"],overflow:na},bottomRight:{points:["tr","br"],overflow:na},leftTop:{points:["tr","tl"],overflow:na},leftBottom:{points:["br","bl"],overflow:na},rightTop:{points:["tl","tr"],overflow:na},rightBottom:{points:["bl","br"],overflow:na}},ra={topLeft:{points:["bl","tl"],overflow:na},topRight:{points:["br","tr"],overflow:na},bottomLeft:{points:["tl","bl"],overflow:na},bottomRight:{points:["tr","br"],overflow:na},rightTop:{points:["tr","tl"],overflow:na},rightBottom:{points:["br","bl"],overflow:na},leftTop:{points:["tl","tr"],overflow:na},leftBottom:{points:["bl","br"],overflow:na}},ea=null;function Ho(ut,gt,yt){if(gt)return gt;if(yt)return yt[ut]||yt.other}var No={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ba(ut){var gt=ut.prefixCls,yt=ut.visible,kt=ut.children,At=ut.popup,tn=ut.popupStyle,fn=ut.popupClassName,jn=ut.popupOffset,qn=ut.disabled,Kn=ut.mode,An=ut.onVisibleChange,Dn=re.useContext(we),wn=Dn.getPopupContainer,Un=Dn.rtl,vr=Dn.subMenuOpenDelay,er=Dn.subMenuCloseDelay,ir=Dn.builtinPlacements,fr=Dn.triggerSubMenuAction,_t=Dn.forceSubMenuRender,vt=Dn.rootClassName,Xe=Dn.motion,ot=Dn.defaultMotions,Nt=re.useState(!1),Pt=(0,ce.Z)(Nt,2),qt=Pt[0],hn=Pt[1],gn=Un?(0,Le.Z)((0,Le.Z)({},ra),ir):(0,Le.Z)((0,Le.Z)({},Eo),ir),Nn=No[Kn],On=Ho(Kn,Xe,ot),vn=re.useRef(On);Kn!=="inline"&&(vn.current=On);var Fn=(0,Le.Z)((0,Le.Z)({},vn.current),{},{leavedClassName:"".concat(gt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Gn=re.useRef();return re.useEffect(function(){return Gn.current=(0,en.Z)(function(){hn(yt)}),function(){en.Z.cancel(Gn.current)}},[yt]),re.createElement(oo.Z,{prefixCls:gt,popupClassName:le()("".concat(gt,"-popup"),(0,Se.Z)({},"".concat(gt,"-rtl"),Un),fn,vt),stretch:Kn==="horizontal"?"minWidth":null,getPopupContainer:wn,builtinPlacements:gn,popupPlacement:Nn,popupVisible:qt,popup:At,popupStyle:tn,popupAlign:jn&&{offset:jn},action:qn?[]:[fr],mouseEnterDelay:vr,mouseLeaveDelay:er,onPopupVisibleChange:An,forceRender:_t,popupMotion:Fn,fresh:!0},kt)}var Wa=ee(62874);function Ia(ut){var gt=ut.id,yt=ut.open,kt=ut.keyPath,At=ut.children,tn="inline",fn=re.useContext(we),jn=fn.prefixCls,qn=fn.forceSubMenuRender,Kn=fn.motion,An=fn.defaultMotions,Dn=fn.mode,wn=re.useRef(!1);wn.current=Dn===tn;var Un=re.useState(!wn.current),vr=(0,ce.Z)(Un,2),er=vr[0],ir=vr[1],fr=wn.current?yt:!1;re.useEffect(function(){wn.current&&ir(!1)},[Dn]);var _t=(0,Le.Z)({},Ho(tn,Kn,An));kt.length>1&&(_t.motionAppear=!1);var vt=_t.onVisibleChanged;return _t.onVisibleChanged=function(Xe){return!wn.current&&!Xe&&ir(!0),vt==null?void 0:vt(Xe)},er?null:re.createElement(It,{mode:tn,locked:!wn.current},re.createElement(Wa.Z,(0,te.Z)({visible:fr},_t,{forceRender:qn,removeOnLeave:!1,leavedClassName:"".concat(jn,"-hidden")}),function(Xe){var ot=Xe.className,Nt=Xe.style;return re.createElement(ua,{id:gt,className:ot,style:Nt},At)}))}var Ao=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],pn=["active"],sn=function(gt){var yt,kt=gt.style,At=gt.className,tn=gt.title,fn=gt.eventKey,jn=gt.warnKey,qn=gt.disabled,Kn=gt.internalPopupClose,An=gt.children,Dn=gt.itemIcon,wn=gt.expandIcon,Un=gt.popupClassName,vr=gt.popupOffset,er=gt.popupStyle,ir=gt.onClick,fr=gt.onMouseEnter,_t=gt.onMouseLeave,vt=gt.onTitleClick,Xe=gt.onTitleMouseEnter,ot=gt.onTitleMouseLeave,Nt=(0,fe.Z)(gt,Ao),Pt=ke(fn),qt=re.useContext(we),hn=qt.prefixCls,gn=qt.mode,Nn=qt.openKeys,On=qt.disabled,vn=qt.overflowDisabled,Fn=qt.activeKey,Gn=qt.selectedKeys,xr=qt.itemIcon,sr=qt.expandIcon,Lr=qt.onItemClick,Ur=qt.onOpenChange,Pr=qt.onActive,Qr=re.useContext(nn),Tr=Qr._internalRenderSubMenuItem,Wr=re.useContext(Dt),ni=Wr.isSubPathKey,Si=on(),Nr="".concat(hn,"-submenu"),wi=On||qn,gi=re.useRef(),vo=re.useRef(),Ji=Dn!=null?Dn:xr,Pi=wn!=null?wn:sr,Mi=Nn.includes(fn),Ai=!vn&&Mi,pi=ni(Gn,fn),zi=Xn(fn,wi,Xe,ot),ai=zi.active,ii=(0,fe.Z)(zi,pn),Ui=re.useState(!1),to=(0,ce.Z)(Ui,2),la=to[0],da=to[1],So=function(ca){wi||da(ca)},go=function(ca){So(!0),fr==null||fr({key:fn,domEvent:ca})},Zi=function(ca){So(!1),_t==null||_t({key:fn,domEvent:ca})},Ii=re.useMemo(function(){return ai||(gn!=="inline"?la||ni([Fn],fn):!1)},[gn,ai,Fn,la,fn,ni]),pa=br(Si.length),io=function(ca){wi||(vt==null||vt({key:fn,domEvent:ca}),gn==="inline"&&Ur(fn,!Mi))},si=Ae(function(ia){ir==null||ir($n(ia)),Lr(ia)}),Ki=function(ca){gn!=="inline"&&Ur(fn,ca)},Io=function(){Pr(fn)},Ro=Pt&&"".concat(Pt,"-popup"),qo=re.createElement("div",(0,te.Z)({role:"menuitem",style:pa,className:"".concat(Nr,"-title"),tabIndex:wi?null:-1,ref:gi,title:typeof tn=="string"?tn:null,"data-menu-id":vn&&Pt?null:Pt,"aria-expanded":Ai,"aria-haspopup":!0,"aria-controls":Ro,"aria-disabled":wi,onClick:io,onFocus:Io},ii),tn,re.createElement(_r,{icon:gn!=="horizontal"?Pi:void 0,props:(0,Le.Z)((0,Le.Z)({},gt),{},{isOpen:Ai,isSubMenu:!0})},re.createElement("i",{className:"".concat(Nr,"-arrow")}))),Qi=re.useRef(gn);if(gn!=="inline"&&Si.length>1?Qi.current="vertical":Qi.current=gn,!vn){var ma=Qi.current;qo=re.createElement(Ba,{mode:ma,prefixCls:Nr,visible:!Kn&&Ai&&gn!=="inline",popupClassName:Un,popupOffset:vr,popupStyle:er,popup:re.createElement(It,{mode:ma==="horizontal"?"vertical":ma},re.createElement(ua,{id:Ro,ref:vo},An)),disabled:wi,onVisibleChange:Ki},qo)}var va=re.createElement(Qt.Item,(0,te.Z)({role:"none"},Nt,{component:"li",style:kt,className:le()(Nr,"".concat(Nr,"-").concat(gn),At,(yt={},(0,Se.Z)(yt,"".concat(Nr,"-open"),Ai),(0,Se.Z)(yt,"".concat(Nr,"-active"),Ii),(0,Se.Z)(yt,"".concat(Nr,"-selected"),pi),(0,Se.Z)(yt,"".concat(Nr,"-disabled"),wi),yt)),onMouseEnter:go,onMouseLeave:Zi}),qo,!vn&&re.createElement(Ia,{id:Ro,open:Ai,keyPath:Si},An));return Tr&&(va=Tr(va,gt,{selected:pi,active:Ii,open:Ai,disabled:wi})),re.createElement(It,{onItemClick:si,mode:gn==="horizontal"?"vertical":gn,itemIcon:Ji,expandIcon:Pi},va)};function Hn(ut){var gt=ut.eventKey,yt=ut.children,kt=on(gt),At=bo(yt,kt),tn=Vt();re.useEffect(function(){if(tn)return tn.registerPath(gt,kt),function(){tn.unregisterPath(gt,kt)}},[kt]);var fn;return tn?fn=At:fn=re.createElement(sn,ut,At),re.createElement(wt.Provider,{value:kt},fn)}var lr=ee(71002),Cr=["className","title","eventKey","children"],vi=["children"],_i=function(gt){var yt=gt.className,kt=gt.title,At=gt.eventKey,tn=gt.children,fn=(0,fe.Z)(gt,Cr),jn=re.useContext(we),qn=jn.prefixCls,Kn="".concat(qn,"-item-group");return re.createElement("li",(0,te.Z)({role:"presentation"},fn,{onClick:function(Dn){return Dn.stopPropagation()},className:le()(Kn,yt)}),re.createElement("div",{role:"presentation",className:"".concat(Kn,"-title"),title:typeof kt=="string"?kt:void 0},kt),re.createElement("ul",{role:"group",className:"".concat(Kn,"-list")},tn))};function ji(ut){var gt=ut.children,yt=(0,fe.Z)(ut,vi),kt=on(yt.eventKey),At=bo(gt,kt),tn=Vt();return tn?At:re.createElement(_i,(0,or.Z)(yt,["warnKey"]),At)}function Xi(ut){var gt=ut.className,yt=ut.style,kt=re.useContext(we),At=kt.prefixCls,tn=Vt();return tn?null:re.createElement("li",{role:"separator",className:le()("".concat(At,"-item-divider"),gt),style:yt})}var Ci=["label","children","key","type"];function _o(ut){return(ut||[]).map(function(gt,yt){if(gt&&(0,lr.Z)(gt)==="object"){var kt=gt,At=kt.label,tn=kt.children,fn=kt.key,jn=kt.type,qn=(0,fe.Z)(kt,Ci),Kn=fn!=null?fn:"tmp-".concat(yt);return tn||jn==="group"?jn==="group"?re.createElement(ji,(0,te.Z)({key:Kn},qn,{title:At}),_o(tn)):re.createElement(Hn,(0,te.Z)({key:Kn},qn,{title:At}),_o(tn)):jn==="divider"?re.createElement(Xi,(0,te.Z)({key:Kn},qn)):re.createElement(bi,(0,te.Z)({key:Kn},qn),At)}return null}).filter(function(gt){return gt})}function To(ut,gt,yt){var kt=ut;return gt&&(kt=_o(gt)),bo(kt,yt)}var Ko=["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"],Tn=[],Bn=re.forwardRef(function(ut,gt){var yt,kt,At=ut,tn=At.prefixCls,fn=tn===void 0?"rc-menu":tn,jn=At.rootClassName,qn=At.style,Kn=At.className,An=At.tabIndex,Dn=An===void 0?0:An,wn=At.items,Un=At.children,vr=At.direction,er=At.id,ir=At.mode,fr=ir===void 0?"vertical":ir,_t=At.inlineCollapsed,vt=At.disabled,Xe=At.disabledOverflow,ot=At.subMenuOpenDelay,Nt=ot===void 0?.1:ot,Pt=At.subMenuCloseDelay,qt=Pt===void 0?.1:Pt,hn=At.forceSubMenuRender,gn=At.defaultOpenKeys,Nn=At.openKeys,On=At.activeKey,vn=At.defaultActiveFirst,Fn=At.selectable,Gn=Fn===void 0?!0:Fn,xr=At.multiple,sr=xr===void 0?!1:xr,Lr=At.defaultSelectedKeys,Ur=At.selectedKeys,Pr=At.onSelect,Qr=At.onDeselect,Tr=At.inlineIndent,Wr=Tr===void 0?24:Tr,ni=At.motion,Si=At.defaultMotions,Nr=At.triggerSubMenuAction,wi=Nr===void 0?"hover":Nr,gi=At.builtinPlacements,vo=At.itemIcon,Ji=At.expandIcon,Pi=At.overflowedIndicator,Mi=Pi===void 0?"...":Pi,Ai=At.overflowedIndicatorPopupClassName,pi=At.getPopupContainer,zi=At.onClick,ai=At.onOpenChange,ii=At.onKeyDown,Ui=At.openAnimation,to=At.openTransitionName,la=At._internalRenderMenuItem,da=At._internalRenderSubMenuItem,So=(0,fe.Z)(At,Ko),go=re.useMemo(function(){return To(Un,wn,Tn)},[Un,wn]),Zi=re.useState(!1),Ii=(0,ce.Z)(Zi,2),pa=Ii[0],io=Ii[1],si=re.useRef(),Ki=xt(er),Io=vr==="rtl",Ro=(0,Mn.Z)(gn,{value:Nn,postState:function(ts){return ts||Tn}}),qo=(0,ce.Z)(Ro,2),Qi=qo[0],ma=qo[1],va=function(ts){var Os=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function $s(){ma(ts),ai==null||ai(ts)}Os?(0,Ee.flushSync)($s):$s()},ia=re.useState(Qi),ca=(0,ce.Z)(ia,2),Ea=ca[0],Ja=ca[1],Ma=re.useRef(!1),Za=re.useMemo(function(){return(fr==="inline"||fr==="vertical")&&_t?["vertical",_t]:[fr,!1]},[fr,_t]),vs=(0,ce.Z)(Za,2),Es=vs[0],Ls=vs[1],Qa=Es==="inline",La=re.useState(Es),ho=(0,ce.Z)(La,2),Po=ho[0],_a=ho[1],Da=re.useState(Ls),gs=(0,ce.Z)(Da,2),Rs=gs[0],Ws=gs[1];re.useEffect(function(){_a(Es),Ws(Ls),Ma.current&&(Qa?ma(Ea):va(Tn))},[Es,Ls]);var hl=re.useState(0),ul=(0,ce.Z)(hl,2),Ts=ul[0],es=ul[1],Bi=Ts>=go.length-1||Po!=="horizontal"||Xe;re.useEffect(function(){Qa&&Ja(Qi)},[Qi]),re.useEffect(function(){return Ma.current=!0,function(){Ma.current=!1}},[]);var Co=Ie(),Qo=Co.registerPath,Ca=Co.unregisterPath,is=Co.refreshOverflowKeys,bs=Co.isSubPathKey,bl=Co.getKeyPath,rl=Co.getKeys,$l=Co.getSubPathKeys,ya=re.useMemo(function(){return{registerPath:Qo,unregisterPath:Ca}},[Qo,Ca]),yi=re.useMemo(function(){return{isSubPathKey:bs}},[bs]);re.useEffect(function(){is(Bi?Tn:go.slice(Ts+1).map(function(Bs){return Bs.key}))},[Ts,Bi]);var Mo=(0,Mn.Z)(On||vn&&((yt=go[0])===null||yt===void 0?void 0:yt.key),{value:On}),Do=(0,ce.Z)(Mo,2),Uo=Do[0],Ss=Do[1],ls=Ae(function(Bs){Ss(Bs)}),Sl=Ae(function(){Ss(void 0)});(0,re.useImperativeHandle)(gt,function(){return{list:si.current,focus:function(ts){var Os,$s=Uo!=null?Uo:(Os=go.find(function(ns){return!ns.props.disabled}))===null||Os===void 0?void 0:Os.key;if($s){var il,El,ol;(il=si.current)===null||il===void 0||(El=il.querySelector("li[data-menu-id='".concat(Oe(Ki,$s),"']")))===null||El===void 0||(ol=El.focus)===null||ol===void 0||ol.call(El,ts)}}}});var pl=(0,Mn.Z)(Lr||[],{value:Ur,postState:function(ts){return Array.isArray(ts)?ts:ts==null?Tn:[ts]}}),rc=(0,ce.Z)(pl,2),Xa=rc[0],wl=rc[1],ic=function(ts){if(Gn){var Os=ts.key,$s=Xa.includes(Os),il;sr?$s?il=Xa.filter(function(ol){return ol!==Os}):il=[].concat((0,Ce.Z)(Xa),[Os]):il=[Os],wl(il);var El=(0,Le.Z)((0,Le.Z)({},ts),{},{selectedKeys:il});$s?Qr==null||Qr(El):Pr==null||Pr(El)}!sr&&Qi.length&&Po!=="inline"&&va(Tn)},Vc=Ae(function(Bs){zi==null||zi($n(Bs)),ic(Bs)}),xc=Ae(function(Bs,ts){var Os=Qi.filter(function(il){return il!==Bs});if(ts)Os.push(Bs);else if(Po!=="inline"){var $s=$l(Bs);Os=Os.filter(function(il){return!$s.has(il)})}(0,zn.Z)(Qi,Os,!0)||va(Os,!0)}),Ql=function(ts,Os){var $s=Os!=null?Os:!Qi.includes(ts);xc(ts,$s)},Al=Ar(Po,Uo,Io,Ki,si,rl,bl,Ss,Ql,ii);re.useEffect(function(){io(!0)},[]);var Ec=re.useMemo(function(){return{_internalRenderMenuItem:la,_internalRenderSubMenuItem:da}},[la,da]),Hl=Po!=="horizontal"||Xe?go:go.map(function(Bs,ts){return re.createElement(It,{key:Bs.key,overflowDisabled:ts>Ts},Bs)}),Fo=re.createElement(Qt,(0,te.Z)({id:er,ref:si,prefixCls:"".concat(fn,"-overflow"),component:"ul",itemComponent:bi,className:le()(fn,"".concat(fn,"-root"),"".concat(fn,"-").concat(Po),Kn,(kt={},(0,Se.Z)(kt,"".concat(fn,"-inline-collapsed"),Rs),(0,Se.Z)(kt,"".concat(fn,"-rtl"),Io),kt),jn),dir:vr,style:qn,role:"menu",tabIndex:Dn,data:Hl,renderRawItem:function(ts){return ts},renderRawRest:function(ts){var Os=ts.length,$s=Os?go.slice(-Os):null;return re.createElement(Hn,{eventKey:ge,title:Mi,disabled:Bi,internalPopupClose:Os===0,popupClassName:Ai},$s)},maxCount:Po!=="horizontal"||Xe?Qt.INVALIDATE:Qt.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ts){es(ts)},onKeyDown:Al},So));return re.createElement(nn.Provider,{value:Ec},re.createElement(at.Provider,{value:Ki},re.createElement(It,{prefixCls:fn,rootClassName:jn,mode:Po,openKeys:Qi,rtl:Io,disabled:vt,motion:pa?ni:null,defaultMotions:pa?Si:null,activeKey:Uo,onActive:ls,onInactive:Sl,selectedKeys:Xa,inlineIndent:Wr,subMenuOpenDelay:Nt,subMenuCloseDelay:qt,forceSubMenuRender:hn,builtinPlacements:gi,triggerSubMenuAction:wi,getPopupContainer:pi,itemIcon:vo,expandIcon:Ji,onItemClick:Vc,onOpenChange:xc},re.createElement(Dt.Provider,{value:yi},Fo),re.createElement("div",{style:{display:"none"},"aria-hidden":!0},re.createElement($t.Provider,{value:ya},go)))))}),Qn=Bn,He=Qn;He.Item=bi,He.SubMenu=Hn,He.ItemGroup=ji,He.Divider=Xi;var lt=He},81626:function(dn,St){"use strict";St.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(dn,St){"use strict";var ee;var te=Symbol.for("react.element"),Se=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ae=Symbol.for("react.context"),le=Symbol.for("react.server_context"),re=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),_e;_e=Symbol.for("react.module.reference");function Me(ve){if(typeof ve=="object"&&ve!==null){var Fe=ve.$$typeof;switch(Fe){case te:switch(ve=ve.type,ve){case Le:case ce:case Ce:case de:case he:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case le:case ae:case re:case se:case me:case fe:return ve;default:return Fe}}case Se:return Fe}}}ee=ae,ee=fe,ee=te,ee=re,ee=Le,ee=se,ee=me,ee=Se,ee=ce,ee=Ce,ee=de,ee=he,ee=function(){return!1},ee=function(){return!1},ee=function(ve){return Me(ve)===ae},ee=function(ve){return Me(ve)===fe},ee=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===te},ee=function(ve){return Me(ve)===re},St.isFragment=function(ve){return Me(ve)===Le},ee=function(ve){return Me(ve)===se},ee=function(ve){return Me(ve)===me},ee=function(ve){return Me(ve)===Se},ee=function(ve){return Me(ve)===ce},ee=function(ve){return Me(ve)===Ce},ee=function(ve){return Me(ve)===de},ee=function(ve){return Me(ve)===he},ee=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===Le||ve===ce||ve===Ce||ve===de||ve===he||ve===ye||typeof ve=="object"&&ve!==null&&(ve.$$typeof===se||ve.$$typeof===me||ve.$$typeof===fe||ve.$$typeof===ae||ve.$$typeof===re||ve.$$typeof===_e||ve.getModuleId!==void 0)},ee=Me},35110:function(dn,St,ee){"use strict";dn.exports=ee(46762)},66680:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});var te=ee(67294);function Se(Le){var Ce=te.useRef();Ce.current=Le;var ce=te.useCallback(function(){for(var fe,ae=arguments.length,le=new Array(ae),re=0;re<ae;re++)le[re]=arguments[re];return(fe=Ce.current)===null||fe===void 0?void 0:fe.call.apply(fe,[Ce].concat(le))},[]);return ce}},21770:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return fe}});var te=ee(97685),Se=ee(66680),Le=ee(8410),Ce=ee(63896);function ce(ae){return ae!==void 0}function fe(ae,le){var re=le||{},de=re.defaultValue,he=re.value,me=re.onChange,se=re.postState,ye=(0,Ce.Z)(function(){return ce(he)?he:ce(de)?typeof de=="function"?de():de:typeof ae=="function"?ae():ae}),_e=(0,te.Z)(ye,2),Me=_e[0],ve=_e[1],Fe=he!==void 0?he:Me,$e=se?se(Fe):Fe,Te=(0,Se.Z)(me),ze=(0,Ce.Z)([Fe]),Ee=(0,te.Z)(ze,2),be=Ee[0],Re=Ee[1];(0,Le.o)(function(){var et=be[0];Me!==et&&Te(Me,et)},[be]),(0,Le.o)(function(){ce(he)||ve(he)},[he]);var De=(0,Se.Z)(function(et,Ye){ve(et,Ye),Re([Fe],Ye)});return[$e,De]}},91881:function(dn,St,ee){"use strict";var te=ee(71002),Se=ee(80334);function Le(Ce,ce){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ae=new Set;function le(re,de){var he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,me=ae.has(re);if((0,Se.ZP)(!me,"Warning: There may be circular references"),me)return!1;if(re===de)return!0;if(fe&&he>1)return!1;ae.add(re);var se=he+1;if(Array.isArray(re)){if(!Array.isArray(de)||re.length!==de.length)return!1;for(var ye=0;ye<re.length;ye++)if(!le(re[ye],de[ye],se))return!1;return!0}if(re&&de&&(0,te.Z)(re)==="object"&&(0,te.Z)(de)==="object"){var _e=Object.keys(re);return _e.length!==Object.keys(de).length?!1:_e.every(function(Me){return le(re[Me],de[Me],se)})}return!1}return le(Ce,ce)}St.Z=Le},98423:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return Se}});var te=ee(1413);function Se(Le,Ce){var ce=(0,te.Z)({},Le);return Array.isArray(Ce)&&Ce.forEach(function(fe){delete ce[fe]}),ce}},73299:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return li}});var te=ee(87462),Se=ee(1413),Le=ee(71002),Ce=ee(97685),ce=ee(4942),fe=ee(45987),ae=ee(67294),le=ee(73935),re=ee(94184),de=ee.n(re),he=ee(48555),me=ae.forwardRef(function(rn,nr){var dr=rn.height,rr=rn.offsetY,Jr=rn.offsetX,Ar=rn.children,Mr=rn.prefixCls,tr=rn.onInnerResize,Zt=rn.innerProps,Ot=rn.rtl,ge=rn.extra,Ie={},Ae={display:"flex",flexDirection:"column"};if(rr!==void 0){var We;Ie={height:dr,position:"relative",overflow:"hidden"},Ae=(0,Se.Z)((0,Se.Z)({},Ae),{},(We={transform:"translateY(".concat(rr,"px)")},(0,ce.Z)(We,Ot?"marginRight":"marginLeft",-Jr),(0,ce.Z)(We,"position","absolute"),(0,ce.Z)(We,"left",0),(0,ce.Z)(We,"right",0),(0,ce.Z)(We,"top",0),We))}return ae.createElement("div",{style:Ie},ae.createElement(he.Z,{onResize:function(xt){var Ft=xt.offsetHeight;Ft&&tr&&tr()}},ae.createElement("div",(0,te.Z)({style:Ae,className:de()((0,ce.Z)({},"".concat(Mr,"-holder-inner"),Mr)),ref:nr},Zt),Ar,ge)))});me.displayName="Filler";var se=me,ye=function(nr){return+setTimeout(nr,16)},_e=function(nr){return clearTimeout(nr)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ye=function(nr){return window.requestAnimationFrame(nr)},_e=function(nr){return window.cancelAnimationFrame(nr)});var Me=0,ve=new Map;function Fe(rn){ve.delete(rn)}var $e=function(nr){var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Me+=1;var rr=Me;function Jr(Ar){if(Ar===0)Fe(rr),nr();else{var Mr=ye(function(){Jr(Ar-1)});ve.set(rr,Mr)}}return Jr(dr),rr};$e.cancel=function(rn){var nr=ve.get(rn);return Fe(nr),_e(nr)};var Te=$e;function ze(rn,nr){var dr="touches"in rn?rn.touches[0]:rn;return dr[nr?"pageX":"pageY"]}var Ee=ae.forwardRef(function(rn,nr){var dr,rr=rn.prefixCls,Jr=rn.rtl,Ar=rn.scrollOffset,Mr=rn.scrollRange,tr=rn.onStartMove,Zt=rn.onStopMove,Ot=rn.onScroll,ge=rn.horizontal,Ie=rn.spinSize,Ae=rn.containerSize,We=rn.style,it=rn.thumbStyle,xt=ae.useState(!1),Ft=(0,Ce.Z)(xt,2),an=Ft[0],Rn=Ft[1],mr=ae.useState(null),or=(0,Ce.Z)(mr,2),cr=or[0],Xn=or[1],br=ae.useState(null),_r=(0,Ce.Z)(br,2),mn=_r[0],$n=_r[1],Vr=!Jr,qr=ae.useRef(),Ir=ae.useRef(),hi=ae.useState(!1),Ni=(0,Ce.Z)(hi,2),yr=Ni[0],bi=Ni[1],ar=ae.useRef(),fo=function(){clearTimeout(ar.current),bi(!0),ar.current=setTimeout(function(){bi(!1)},3e3)},qi=Mr-Ae||0,ua=Ae-Ie||0,Jo=qi>0,bo=ae.useMemo(function(){if(Ar===0||qi===0)return 0;var Wa=Ar/qi;return Wa*ua},[Ar,qi,ua]),oo=function(Ia){Ia.stopPropagation(),Ia.preventDefault()},na=ae.useRef({top:bo,dragging:an,pageY:cr,startTop:mn});na.current={top:bo,dragging:an,pageY:cr,startTop:mn};var Eo=function(Ia){Rn(!0),Xn(ze(Ia,ge)),$n(na.current.top),tr(),Ia.stopPropagation(),Ia.preventDefault()};ae.useEffect(function(){var Wa=function(sn){sn.preventDefault()},Ia=qr.current,Ao=Ir.current;return Ia.addEventListener("touchstart",Wa),Ao.addEventListener("touchstart",Eo),function(){Ia.removeEventListener("touchstart",Wa),Ao.removeEventListener("touchstart",Eo)}},[]);var ra=ae.useRef();ra.current=qi;var ea=ae.useRef();ea.current=ua,ae.useEffect(function(){if(an){var Wa,Ia=function(sn){var Hn=na.current,lr=Hn.dragging,Cr=Hn.pageY,vi=Hn.startTop;if(Te.cancel(Wa),lr){var _i=ze(sn,ge)-Cr,ji=vi;!Vr&&ge?ji-=_i:ji+=_i;var Xi=ra.current,Ci=ea.current,_o=Ci?ji/Ci:0,To=Math.ceil(_o*Xi);To=Math.max(To,0),To=Math.min(To,Xi),Wa=Te(function(){Ot(To,ge)})}},Ao=function(){Rn(!1),Zt()};return window.addEventListener("mousemove",Ia),window.addEventListener("touchmove",Ia),window.addEventListener("mouseup",Ao),window.addEventListener("touchend",Ao),function(){window.removeEventListener("mousemove",Ia),window.removeEventListener("touchmove",Ia),window.removeEventListener("mouseup",Ao),window.removeEventListener("touchend",Ao),Te.cancel(Wa)}}},[an]),ae.useEffect(function(){fo()},[Ar]),ae.useImperativeHandle(nr,function(){return{delayHidden:fo}});var Ho="".concat(rr,"-scrollbar"),No={position:"absolute",visibility:yr&&Jo?null:"hidden"},Ba={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ge?(No.height=8,No.left=0,No.right=0,No.bottom=0,Ba.height="100%",Ba.width=Ie,Vr?Ba.left=bo:Ba.right=bo):(No.width=8,No.top=0,No.bottom=0,Vr?No.right=0:No.left=0,Ba.width="100%",Ba.height=Ie,Ba.top=bo),ae.createElement("div",{ref:qr,className:de()(Ho,(dr={},(0,ce.Z)(dr,"".concat(Ho,"-horizontal"),ge),(0,ce.Z)(dr,"".concat(Ho,"-vertical"),!ge),(0,ce.Z)(dr,"".concat(Ho,"-visible"),yr),dr)),style:(0,Se.Z)((0,Se.Z)({},No),We),onMouseDown:oo,onMouseMove:fo},ae.createElement("div",{ref:Ir,className:de()("".concat(Ho,"-thumb"),(0,ce.Z)({},"".concat(Ho,"-thumb-moving"),an)),style:(0,Se.Z)((0,Se.Z)({},Ba),it),onMouseDown:Eo}))}),be=Ee;function Re(rn){var nr=rn.children,dr=rn.setRef,rr=ae.useCallback(function(Jr){dr(Jr)},[]);return ae.cloneElement(nr,{ref:rr})}function De(rn,nr,dr,rr,Jr,Ar,Mr){var tr=Mr.getKey;return rn.slice(nr,dr+1).map(function(Zt,Ot){var ge=nr+Ot,Ie=Ar(Zt,ge,{style:{width:rr}}),Ae=tr(Zt);return ae.createElement(Re,{key:Ae,setRef:function(it){return Jr(Zt,it)}},Ie)})}function et(rn){return rn instanceof HTMLElement||rn instanceof SVGElement}function Ye(rn){return et(rn)?rn:rn instanceof ae.Component?le.findDOMNode(rn):null}var dt=ee(15671),Ke=ee(43144),zt=function(){function rn(){(0,dt.Z)(this,rn),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Ke.Z)(rn,[{key:"set",value:function(dr,rr){this.maps[dr]=rr,this.id+=1}},{key:"get",value:function(dr){return this.maps[dr]}}]),rn}(),pt=zt;function Kt(rn,nr,dr){var rr=ae.useState(0),Jr=(0,Ce.Z)(rr,2),Ar=Jr[0],Mr=Jr[1],tr=(0,ae.useRef)(new Map),Zt=(0,ae.useRef)(new pt),Ot=(0,ae.useRef)();function ge(){Te.cancel(Ot.current)}function Ie(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ge();var it=function(){tr.current.forEach(function(Ft,an){if(Ft&&Ft.offsetParent){var Rn=Ye(Ft),mr=Rn.offsetHeight;Zt.current.get(an)!==mr&&Zt.current.set(an,Rn.offsetHeight)}}),Mr(function(Ft){return Ft+1})};We?it():Ot.current=Te(it)}function Ae(We,it){var xt=rn(We),Ft=tr.current.get(xt);it?(tr.current.set(xt,it),Ie()):tr.current.delete(xt),!Ft!=!it&&(it?nr==null||nr(We):dr==null||dr(We))}return(0,ae.useEffect)(function(){return ge},[]),[Ae,Ie,Zt.current,Ar]}function Ze(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var tt=Ze()?ae.useLayoutEffect:ae.useEffect,ft=function(nr,dr){var rr=ae.useRef(!0);tt(function(){return nr(rr.current)},dr),tt(function(){return rr.current=!1,function(){rr.current=!0}},[])},Ut=function(nr,dr){ft(function(rr){if(!rr)return nr()},dr)},nt=ft;function Ge(rn){var nr=ae.useRef();nr.current=rn;var dr=ae.useCallback(function(){for(var rr,Jr=arguments.length,Ar=new Array(Jr),Mr=0;Mr<Jr;Mr++)Ar[Mr]=arguments[Mr];return(rr=nr.current)===null||rr===void 0?void 0:rr.call.apply(rr,[nr].concat(Ar))},[]);return dr}function jt(rn){var nr=React.useRef(!1),dr=React.useState(rn),rr=_slicedToArray(dr,2),Jr=rr[0],Ar=rr[1];React.useEffect(function(){return nr.current=!1,function(){nr.current=!0}},[]);function Mr(tr,Zt){Zt&&nr.current||Ar(tr)}return[Jr,Mr]}function yn(rn){return rn!==void 0}function ln(rn,nr){var dr=nr||{},rr=dr.defaultValue,Jr=dr.value,Ar=dr.onChange,Mr=dr.postState,tr=useState(function(){return yn(Jr)?Jr:yn(rr)?typeof rr=="function"?rr():rr:typeof rn=="function"?rn():rn}),Zt=_slicedToArray(tr,2),Ot=Zt[0],ge=Zt[1],Ie=Jr!==void 0?Jr:Ot,Ae=Mr?Mr(Ie):Ie,We=useEvent(Ar),it=useState([Ie]),xt=_slicedToArray(it,2),Ft=xt[0],an=xt[1];useLayoutUpdateEffect(function(){var mr=Ft[0];Ot!==mr&&We(Ot,mr)},[Ft]),useLayoutUpdateEffect(function(){yn(Jr)||ge(Jr)},[Jr]);var Rn=useEvent(function(mr,or){ge(mr,or),an([Ie],or)});return[Ae,Rn]}var Tt=ee(31461);function Lt(rn,nr,dr){var rr=React.useRef({});return(!("value"in rr.current)||dr(rr.current.condition,nr))&&(rr.current.value=rn(),rr.current.condition=nr),rr.current.value}function Jt(rn,nr){typeof rn=="function"?rn(nr):_typeof(rn)==="object"&&rn&&"current"in rn&&(rn.current=nr)}function kn(){for(var rn=arguments.length,nr=new Array(rn),dr=0;dr<rn;dr++)nr[dr]=arguments[dr];var rr=nr.filter(function(Jr){return Jr});return rr.length<=1?rr[0]:function(Jr){nr.forEach(function(Ar){Jt(Ar,Jr)})}}function In(){for(var rn=arguments.length,nr=new Array(rn),dr=0;dr<rn;dr++)nr[dr]=arguments[dr];return useMemo(function(){return kn.apply(void 0,nr)},nr,function(rr,Jr){return rr.length!==Jr.length||rr.every(function(Ar,Mr){return Ar!==Jr[Mr]})})}function Qt(rn){var nr,dr,rr=isMemo(rn)?rn.type.type:rn.type;return!(typeof rr=="function"&&!((nr=rr.prototype)!==null&&nr!==void 0&&nr.render)||typeof rn=="function"&&!((dr=rn.prototype)!==null&&dr!==void 0&&dr.render))}function Mn(rn){return!isValidElement(rn)||isFragment(rn)?!1:Qt(rn)}function Wn(rn,nr,dr,rr){if(!nr.length)return dr;var Jr=_toArray(nr),Ar=Jr[0],Mr=Jr.slice(1),tr;return!rn&&typeof Ar=="number"?tr=[]:Array.isArray(rn)?tr=_toConsumableArray(rn):tr=_objectSpread({},rn),rr&&dr===void 0&&Mr.length===1?delete tr[Ar][Mr[0]]:tr[Ar]=Wn(tr[Ar],Mr,dr,rr),tr}function zn(rn,nr,dr){var rr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return nr.length&&rr&&dr===void 0&&!get(rn,nr.slice(0,-1))?rn:Wn(rn,nr,dr,rr)}function at(rn){return _typeof(rn)==="object"&&rn!==null&&Object.getPrototypeOf(rn)===Object.prototype}function Oe(rn){return Array.isArray(rn)?[]:{}}var ke=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Be(){for(var rn=arguments.length,nr=new Array(rn),dr=0;dr<rn;dr++)nr[dr]=arguments[dr];var rr=Oe(nr[0]);return nr.forEach(function(Jr){function Ar(Mr,tr){var Zt=new Set(tr),Ot=get(Jr,Mr),ge=Array.isArray(Ot);if(ge||at(Ot)){if(!Zt.has(Ot)){Zt.add(Ot);var Ie=get(rr,Mr);ge?rr=zn(rr,Mr,[]):(!Ie||_typeof(Ie)!=="object")&&(rr=zn(rr,Mr,Oe(Ot))),ke(Ot).forEach(function(Ae){Ar([].concat(_toConsumableArray(Mr),[Ae]),Zt)})}}else rr=zn(rr,Mr,Ot)}Ar([])}),rr}var Ne={},we=[],rt=function(nr){we.push(nr)};function It(rn,nr){if(0)var dr}function Ct(rn,nr){if(0)var dr}function $t(){Ne={}}function Vt(rn,nr,dr){!nr&&!Ne[dr]&&(rn(!1,dr),Ne[dr]=!0)}function wt(rn,nr){Vt(It,rn,nr)}function on(rn,nr){Vt(Ct,rn,nr)}wt.preMessage=rt,wt.resetWarned=$t,wt.noteOnce=on;var Dt=null,Xt=10;function nn(rn,nr,dr,rr,Jr,Ar,Mr,tr){var Zt=ae.useRef(),Ot=ae.useState(null),ge=(0,Ce.Z)(Ot,2),Ie=ge[0],Ae=ge[1];return nt(function(){if(Ie&&Ie.times<Xt){if(!rn.current){Ae(function(fo){return(0,Se.Z)({},fo)});return}Ar();var We=Ie.targetAlign,it=Ie.originAlign,xt=Ie.index,Ft=Ie.offset,an=rn.current.clientHeight,Rn=!1,mr=We,or=null;if(an){for(var cr=We||it,Xn=0,br=0,_r=0,mn=Math.min(nr.length-1,xt),$n=0;$n<=mn;$n+=1){var Vr=Jr(nr[$n]);br=Xn;var qr=dr.get(Vr);_r=br+(qr===void 0?rr:qr),Xn=_r}for(var Ir=cr==="top"?Ft:an-Ft,hi=mn;hi>=0;hi-=1){var Ni=Jr(nr[hi]),yr=dr.get(Ni);if(yr===void 0){Rn=!0;break}if(Ir-=yr,Ir<=0)break}switch(cr){case"top":or=br-Ft;break;case"bottom":or=_r-an+Ft;break;default:{var bi=rn.current.scrollTop,ar=bi+an;br<bi?mr="top":_r>ar&&(mr="bottom")}}or!==null&&Mr(or),or!==Ie.lastTop&&(Rn=!0)}Rn&&Ae(function(fo){return(0,Se.Z)((0,Se.Z)({},fo),{},{times:fo.times+1,targetAlign:mr,lastTop:or})})}},[Ie,rn.current]),function(We){if(We==null){tr();return}if(Te.cancel(Zt.current),typeof We=="number")Mr(We);else if(We&&(0,Le.Z)(We)==="object"){var it,xt=We.align;"index"in We?it=We.index:it=nr.findIndex(function(Rn){return Jr(Rn)===We.key});var Ft=We.offset,an=Ft===void 0?0:Ft;Ae({times:0,index:it,offset:an,originAlign:xt})}}}function bn(rn,nr,dr,rr){var Jr=dr-rn,Ar=nr-dr,Mr=Math.min(Jr,Ar)*2;if(rr<=Mr){var tr=Math.floor(rr/2);return rr%2?dr+tr+1:dr-tr}return Jr>Ar?dr-(rr-Ar):dr+(rr-Jr)}function en(rn,nr,dr){var rr=rn.length,Jr=nr.length,Ar,Mr;if(rr===0&&Jr===0)return null;rr<Jr?(Ar=rn,Mr=nr):(Ar=nr,Mr=rn);var tr={__EMPTY_ITEM__:!0};function Zt(it){return it!==void 0?dr(it):tr}for(var Ot=null,ge=Math.abs(rr-Jr)!==1,Ie=0;Ie<Mr.length;Ie+=1){var Ae=Zt(Ar[Ie]),We=Zt(Mr[Ie]);if(Ae!==We){Ot=Ie,ge=ge||Ae!==Zt(Mr[Ie+1]);break}}return Ot===null?null:{index:Ot,multiple:ge}}function Zn(rn,nr,dr){var rr=ae.useState(rn),Jr=(0,Ce.Z)(rr,2),Ar=Jr[0],Mr=Jr[1],tr=ae.useState(null),Zt=(0,Ce.Z)(tr,2),Ot=Zt[0],ge=Zt[1];return ae.useEffect(function(){var Ie=en(Ar||[],rn||[],nr);(Ie==null?void 0:Ie.index)!==void 0&&(dr==null||dr(Ie.index),ge(rn[Ie.index])),Mr(rn)},[rn]),[Ot]}var Yn=(typeof navigator=="undefined"?"undefined":(0,Le.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),pr=Yn,ti=function(rn,nr){var dr=(0,ae.useRef)(!1),rr=(0,ae.useRef)(null);function Jr(){clearTimeout(rr.current),dr.current=!0,rr.current=setTimeout(function(){dr.current=!1},50)}var Ar=(0,ae.useRef)({top:rn,bottom:nr});return Ar.current.top=rn,Ar.current.bottom=nr,function(Mr){var tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zt=Mr<0&&Ar.current.top||Mr>0&&Ar.current.bottom;return tr&&Zt?(clearTimeout(rr.current),dr.current=!1):(!Zt||dr.current)&&Jr(),!dr.current&&Zt}};function Pn(rn,nr,dr,rr,Jr){var Ar=(0,ae.useRef)(0),Mr=(0,ae.useRef)(null),tr=(0,ae.useRef)(null),Zt=(0,ae.useRef)(!1),Ot=ti(nr,dr);function ge(Ft,an){Te.cancel(Mr.current),Ar.current+=an,tr.current=an,!Ot(an)&&(pr||Ft.preventDefault(),Mr.current=Te(function(){var Rn=Zt.current?10:1;Jr(Ar.current*Rn),Ar.current=0}))}function Ie(Ft,an){Jr(an,!0),pr||Ft.preventDefault()}var Ae=(0,ae.useRef)(null),We=(0,ae.useRef)(null);function it(Ft){if(rn){Te.cancel(We.current),We.current=Te(function(){Ae.current=null},2);var an=Ft.deltaX,Rn=Ft.deltaY,mr=Ft.shiftKey,or=an,cr=Rn;(Ae.current==="sx"||!Ae.current&&mr&&Rn&&!an)&&(or=Rn,cr=0,Ae.current="sx");var Xn=Math.abs(or),br=Math.abs(cr);Ae.current===null&&(Ae.current=rr&&Xn>br?"x":"y"),Ae.current==="y"?ge(Ft,cr):Ie(Ft,or)}}function xt(Ft){rn&&(Zt.current=Ft.detail===tr.current)}return[it,xt]}var Or=14/15;function Br(rn,nr,dr){var rr=(0,ae.useRef)(!1),Jr=(0,ae.useRef)(0),Ar=(0,ae.useRef)(null),Mr=(0,ae.useRef)(null),tr,Zt=function(Ae){if(rr.current){var We=Math.ceil(Ae.touches[0].pageY),it=Jr.current-We;Jr.current=We,dr(it)&&Ae.preventDefault(),clearInterval(Mr.current),Mr.current=setInterval(function(){it*=Or,(!dr(it,!0)||Math.abs(it)<=.1)&&clearInterval(Mr.current)},16)}},Ot=function(){rr.current=!1,tr()},ge=function(Ae){tr(),Ae.touches.length===1&&!rr.current&&(rr.current=!0,Jr.current=Math.ceil(Ae.touches[0].pageY),Ar.current=Ae.target,Ar.current.addEventListener("touchmove",Zt),Ar.current.addEventListener("touchend",Ot))};tr=function(){Ar.current&&(Ar.current.removeEventListener("touchmove",Zt),Ar.current.removeEventListener("touchend",Ot))},nt(function(){return rn&&nr.current.addEventListener("touchstart",ge),function(){var Ie;(Ie=nr.current)===null||Ie===void 0||Ie.removeEventListener("touchstart",ge),tr(),clearInterval(Mr.current)}},[rn])}var Di=20;function mi(){var rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,dr=rn/nr*100;return isNaN(dr)&&(dr=0),dr=Math.max(dr,Di),dr=Math.min(dr,rn/2),Math.floor(dr)}function ci(rn,nr,dr,rr){var Jr=ae.useMemo(function(){return[new Map,[]]},[rn,dr.id,rr]),Ar=(0,Ce.Z)(Jr,2),Mr=Ar[0],tr=Ar[1],Zt=function(ge){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge,Ae=Mr.get(ge),We=Mr.get(Ie);if(Ae===void 0||We===void 0)for(var it=rn.length,xt=tr.length;xt<it;xt+=1){var Ft,an=rn[xt],Rn=nr(an);Mr.set(Rn,xt);var mr=(Ft=dr.get(Rn))!==null&&Ft!==void 0?Ft:rr;if(tr[xt]=(tr[xt-1]||0)+mr,Rn===ge&&(Ae=xt),Rn===Ie&&(We=xt),Ae!==void 0&&We!==void 0)break}return{top:tr[Ae-1]||0,bottom:tr[We]}};return Zt}var Fr=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],zr=[],Fi={overflowY:"auto",overflowAnchor:"none"};function ko(rn,nr){var dr=rn.prefixCls,rr=dr===void 0?"rc-virtual-list":dr,Jr=rn.className,Ar=rn.height,Mr=rn.itemHeight,tr=rn.fullHeight,Zt=tr===void 0?!0:tr,Ot=rn.style,ge=rn.data,Ie=rn.children,Ae=rn.itemKey,We=rn.virtual,it=rn.direction,xt=rn.scrollWidth,Ft=rn.component,an=Ft===void 0?"div":Ft,Rn=rn.onScroll,mr=rn.onVirtualScroll,or=rn.onVisibleChange,cr=rn.innerProps,Xn=rn.extraRender,br=rn.styles,_r=(0,fe.Z)(rn,Fr),mn=!!(We!==!1&&Ar&&Mr),$n=mn&&ge&&(Mr*ge.length>Ar||!!xt),Vr=it==="rtl",qr=de()(rr,(0,ce.Z)({},"".concat(rr,"-rtl"),Vr),Jr),Ir=ge||zr,hi=(0,ae.useRef)(),Ni=(0,ae.useRef)(),yr=(0,ae.useState)(0),bi=(0,Ce.Z)(yr,2),ar=bi[0],fo=bi[1],qi=(0,ae.useState)(0),ua=(0,Ce.Z)(qi,2),Jo=ua[0],bo=ua[1],oo=(0,ae.useState)(!1),na=(0,Ce.Z)(oo,2),Eo=na[0],ra=na[1],ea=function(){ra(!0)},Ho=function(){ra(!1)},No=ae.useCallback(function(vn){return typeof Ae=="function"?Ae(vn):vn==null?void 0:vn[Ae]},[Ae]),Ba={getKey:No};function Wa(vn){fo(function(Fn){var Gn;typeof vn=="function"?Gn=vn(Fn):Gn=vn;var xr=jn(Gn);return hi.current.scrollTop=xr,xr})}var Ia=(0,ae.useRef)({start:0,end:Ir.length}),Ao=(0,ae.useRef)(),pn=Zn(Ir,No),sn=(0,Ce.Z)(pn,1),Hn=sn[0];Ao.current=Hn;var lr=Kt(No,null,null),Cr=(0,Ce.Z)(lr,4),vi=Cr[0],_i=Cr[1],ji=Cr[2],Xi=Cr[3],Ci=ae.useMemo(function(){if(!mn)return{scrollHeight:void 0,start:0,end:Ir.length-1,offset:void 0};if(!$n){var vn;return{scrollHeight:((vn=Ni.current)===null||vn===void 0?void 0:vn.offsetHeight)||0,start:0,end:Ir.length-1,offset:void 0}}for(var Fn=0,Gn,xr,sr,Lr=Ir.length,Ur=0;Ur<Lr;Ur+=1){var Pr=Ir[Ur],Qr=No(Pr),Tr=ji.get(Qr),Wr=Fn+(Tr===void 0?Mr:Tr);Wr>=ar&&Gn===void 0&&(Gn=Ur,xr=Fn),Wr>ar+Ar&&sr===void 0&&(sr=Ur),Fn=Wr}return Gn===void 0&&(Gn=0,xr=0,sr=Math.ceil(Ar/Mr)),sr===void 0&&(sr=Ir.length-1),sr=Math.min(sr+1,Ir.length-1),{scrollHeight:Fn,start:Gn,end:sr,offset:xr}},[$n,mn,ar,Ir,Xi,Ar]),_o=Ci.scrollHeight,To=Ci.start,Ko=Ci.end,Tn=Ci.offset;Ia.current.start=To,Ia.current.end=Ko;var Bn=ae.useState({width:0,height:Ar}),Qn=(0,Ce.Z)(Bn,2),He=Qn[0],lt=Qn[1],ut=function(Fn){lt({width:Fn.width||Fn.offsetWidth,height:Fn.height||Fn.offsetHeight})},gt=(0,ae.useRef)(),yt=(0,ae.useRef)(),kt=ae.useMemo(function(){return mi(He.width,xt)},[He.width,xt]),At=ae.useMemo(function(){return mi(He.height,_o)},[He.height,_o]),tn=_o-Ar,fn=(0,ae.useRef)(tn);fn.current=tn;function jn(vn){var Fn=vn;return Number.isNaN(fn.current)||(Fn=Math.min(Fn,fn.current)),Fn=Math.max(Fn,0),Fn}var qn=ar<=0,Kn=ar>=tn,An=ti(qn,Kn),Dn=function(){return{x:Vr?-Jo:Jo,y:ar}},wn=(0,ae.useRef)(Dn()),Un=Ge(function(){if(mr){var vn=Dn();(wn.current.x!==vn.x||wn.current.y!==vn.y)&&(mr(vn),wn.current=vn)}});function vr(vn,Fn){var Gn=vn;Fn?((0,le.flushSync)(function(){bo(Gn)}),Un()):Wa(Gn)}function er(vn){var Fn=vn.currentTarget.scrollTop;Fn!==ar&&Wa(Fn),Rn==null||Rn(vn),Un()}var ir=function(Fn){var Gn=Fn,xr=xt-He.width;return Gn=Math.max(Gn,0),Gn=Math.min(Gn,xr),Gn},fr=Ge(function(vn,Fn){Fn?((0,le.flushSync)(function(){bo(function(Gn){var xr=Gn+(Vr?-vn:vn);return ir(xr)})}),Un()):Wa(function(Gn){var xr=Gn+vn;return xr})}),_t=Pn(mn,qn,Kn,!!xt,fr),vt=(0,Ce.Z)(_t,2),Xe=vt[0],ot=vt[1];Br(mn,hi,function(vn,Fn){return An(vn,Fn)?!1:(Xe({preventDefault:function(){},deltaY:vn}),!0)}),nt(function(){function vn(Gn){mn&&Gn.preventDefault()}var Fn=hi.current;return Fn.addEventListener("wheel",Xe),Fn.addEventListener("DOMMouseScroll",ot),Fn.addEventListener("MozMousePixelScroll",vn),function(){Fn.removeEventListener("wheel",Xe),Fn.removeEventListener("DOMMouseScroll",ot),Fn.removeEventListener("MozMousePixelScroll",vn)}},[mn]),nt(function(){xt&&bo(function(vn){return ir(vn)})},[He.width,xt]);var Nt=function(){var Fn,Gn;(Fn=gt.current)===null||Fn===void 0||Fn.delayHidden(),(Gn=yt.current)===null||Gn===void 0||Gn.delayHidden()},Pt=nn(hi,Ir,ji,Mr,No,function(){return _i(!0)},Wa,Nt);ae.useImperativeHandle(nr,function(){return{getScrollInfo:Dn,scrollTo:function(Fn){function Gn(xr){return xr&&(0,Le.Z)(xr)==="object"&&("left"in xr||"top"in xr)}Gn(Fn)?(Fn.left!==void 0&&bo(ir(Fn.left)),Pt(Fn.top)):Pt(Fn)}}}),nt(function(){if(or){var vn=Ir.slice(To,Ko+1);or(vn,Ir)}},[To,Ko,Ir]);var qt=ci(Ir,No,ji,Mr),hn=Xn==null?void 0:Xn({start:To,end:Ko,virtual:$n,offsetX:Jo,offsetY:Tn,rtl:Vr,getSize:qt}),gn=De(Ir,To,Ko,xt,vi,Ie,Ba),Nn=null;Ar&&(Nn=(0,Se.Z)((0,ce.Z)({},Zt?"height":"maxHeight",Ar),Fi),mn&&(Nn.overflowY="hidden",xt&&(Nn.overflowX="hidden"),Eo&&(Nn.pointerEvents="none")));var On={};return Vr&&(On.dir="rtl"),ae.createElement("div",(0,te.Z)({style:(0,Se.Z)((0,Se.Z)({},Ot),{},{position:"relative"}),className:qr},On,_r),ae.createElement(he.Z,{onResize:ut},ae.createElement(an,{className:"".concat(rr,"-holder"),style:Nn,ref:hi,onScroll:er,onMouseEnter:Nt},ae.createElement(se,{prefixCls:rr,height:_o,offsetX:Jo,offsetY:Tn,scrollWidth:xt,onInnerResize:_i,ref:Ni,innerProps:cr,rtl:Vr,extra:hn},gn))),$n&&_o>Ar&&ae.createElement(be,{ref:gt,prefixCls:rr,scrollOffset:ar,scrollRange:_o,rtl:Vr,onScroll:vr,onStartMove:ea,onStopMove:Ho,spinSize:At,containerSize:He.height,style:br==null?void 0:br.verticalScrollBar,thumbStyle:br==null?void 0:br.verticalScrollBarThumb}),$n&&xt&&ae.createElement(be,{ref:yt,prefixCls:rr,scrollOffset:Jo,scrollRange:xt,rtl:Vr,onScroll:vr,onStartMove:ea,onStopMove:Ho,spinSize:kt,containerSize:He.width,horizontal:!0,style:br==null?void 0:br.horizontalScrollBar,thumbStyle:br==null?void 0:br.horizontalScrollBarThumb}))}var aa=ae.forwardRef(ko);aa.displayName="List";var Wo=aa,li=Wo},66392:function(dn,St){"use strict";var ee;var te=Symbol.for("react.element"),Se=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ae=Symbol.for("react.context"),le=Symbol.for("react.server_context"),re=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),_e;_e=Symbol.for("react.module.reference");function Me(ve){if(typeof ve=="object"&&ve!==null){var Fe=ve.$$typeof;switch(Fe){case te:switch(ve=ve.type,ve){case Le:case ce:case Ce:case de:case he:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case le:case ae:case re:case se:case me:case fe:return ve;default:return Fe}}case Se:return Fe}}}ee=ae,ee=fe,ee=te,ee=re,ee=Le,ee=se,ee=me,ee=Se,ee=ce,ee=Ce,ee=de,ee=he,ee=function(){return!1},ee=function(){return!1},ee=function(ve){return Me(ve)===ae},ee=function(ve){return Me(ve)===fe},ee=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===te},ee=function(ve){return Me(ve)===re},ee=function(ve){return Me(ve)===Le},ee=function(ve){return Me(ve)===se},ee=function(ve){return Me(ve)===me},ee=function(ve){return Me(ve)===Se},ee=function(ve){return Me(ve)===ce},ee=function(ve){return Me(ve)===Ce},ee=function(ve){return Me(ve)===de},ee=function(ve){return Me(ve)===he},ee=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===Le||ve===ce||ve===Ce||ve===de||ve===he||ve===ye||typeof ve=="object"&&ve!==null&&(ve.$$typeof===se||ve.$$typeof===me||ve.$$typeof===fe||ve.$$typeof===ae||ve.$$typeof===re||ve.$$typeof===_e||ve.getModuleId!==void 0)},ee=Me},31461:function(dn,St,ee){"use strict";ee(66392)},58971:function(dn,St,ee){var te=ee(62195),Se=ee(39015),Le=[ee(19257)];dn.exports=te.createStore(Se,Le)},19257:function(dn,St,ee){dn.exports=te;function te(){return ee(55703),{}}},55703:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(dn){return dn<10?"0"+dn:dn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(dn){return rx_escapable.lastIndex=0,rx_escapable.test(dn)?'"'+dn.replace(rx_escapable,function(St){var ee=meta[St];return typeof ee=="string"?ee:"\\u"+("0000"+St.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+dn+'"'}function str(dn,St){var ee,te,Se,Le,Ce=gap,ce,fe=St[dn];switch(fe&&typeof fe=="object"&&typeof fe.toJSON=="function"&&(fe=fe.toJSON(dn)),typeof rep=="function"&&(fe=rep.call(St,dn,fe)),typeof fe){case"string":return quote(fe);case"number":return isFinite(fe)?String(fe):"null";case"boolean":case"null":return String(fe);case"object":if(!fe)return"null";if(gap+=indent,ce=[],Object.prototype.toString.apply(fe)==="[object Array]"){for(Le=fe.length,ee=0;ee<Le;ee+=1)ce[ee]=str(ee,fe)||"null";return Se=ce.length===0?"[]":gap?`[
|
|
|
`+gap+ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Ce+"]":"["+ce.join(",")+"]",gap=Ce,Se}if(rep&&typeof rep=="object")for(Le=rep.length,ee=0;ee<Le;ee+=1)typeof rep[ee]=="string"&&(te=rep[ee],Se=str(te,fe),Se&&ce.push(quote(te)+(gap?": ":":")+Se));else for(te in fe)Object.prototype.hasOwnProperty.call(fe,te)&&(Se=str(te,fe),Se&&ce.push(quote(te)+(gap?": ":":")+Se));return Se=ce.length===0?"{}":gap?`{
|
|
|
`+gap+ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Ce+"}":"{"+ce.join(",")+"}",gap=Ce,Se}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(dn,St,ee){var te;if(gap="",indent="",typeof ee=="number")for(te=0;te<ee;te+=1)indent+=" ";else typeof ee=="string"&&(indent=ee);if(rep=St,St&&typeof St!="function"&&(typeof St!="object"||typeof St.length!="number"))throw new Error("JSON.stringify");return str("",{"":dn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(dn,St){var ee,te,Se=dn[St];if(Se&&typeof Se=="object")for(ee in Se)Object.prototype.hasOwnProperty.call(Se,ee)&&(te=walk(Se,ee),te!==void 0?Se[ee]=te:delete Se[ee]);return reviver.call(dn,St,Se)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(dn){return"\\u"+("0000"+dn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},62195:function(dn,St,ee){var te=ee(69078),Se=te.slice,Le=te.pluck,Ce=te.each,ce=te.bind,fe=te.create,ae=te.isList,le=te.isFunction,re=te.isObject;dn.exports={createStore:me};var de={version:"2.0.12",enabled:!1,get:function(se,ye){var _e=this.storage.read(this._namespacePrefix+se);return this._deserialize(_e,ye)},set:function(se,ye){return ye===void 0?this.remove(se):(this.storage.write(this._namespacePrefix+se,this._serialize(ye)),ye)},remove:function(se){this.storage.remove(this._namespacePrefix+se)},each:function(se){var ye=this;this.storage.each(function(_e,Me){se.call(ye,ye._deserialize(_e),(Me||"").replace(ye._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(se){return this._namespacePrefix=="__storejs_"+se+"_"},createStore:function(){return me.apply(this,arguments)},addPlugin:function(se){this._addPlugin(se)},namespace:function(se){return me(this.storage,this.plugins,se)}};function he(){var se=typeof console=="undefined"?null:console;if(se){var ye=se.warn?se.warn:se.log;ye.apply(se,arguments)}}function me(se,ye,_e){_e||(_e=""),se&&!ae(se)&&(se=[se]),ye&&!ae(ye)&&(ye=[ye]);var Me=_e?"__storejs_"+_e+"_":"",ve=_e?new RegExp("^"+Me):null,Fe=/^[a-zA-Z0-9_\-]*$/;if(!Fe.test(_e))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var $e={_namespacePrefix:Me,_namespaceRegexp:ve,_testStorage:function(ze){try{var Ee="__storejs__test__";ze.write(Ee,Ee);var be=ze.read(Ee)===Ee;return ze.remove(Ee),be}catch(Re){return!1}},_assignPluginFnProp:function(ze,Ee){var be=this[Ee];this[Ee]=function(){var De=Se(arguments,0),et=this;function Ye(){if(be)return Ce(arguments,function(Ke,zt){De[zt]=Ke}),be.apply(et,De)}var dt=[Ye].concat(De);return ze.apply(et,dt)}},_serialize:function(ze){return JSON.stringify(ze)},_deserialize:function(ze,Ee){if(!ze)return Ee;var be="";try{be=JSON.parse(ze)}catch(Re){be=ze}return be!==void 0?be:Ee},_addStorage:function(ze){this.enabled||this._testStorage(ze)&&(this.storage=ze,this.enabled=!0)},_addPlugin:function(ze){var Ee=this;if(ae(ze)){Ce(ze,function(De){Ee._addPlugin(De)});return}var be=Le(this.plugins,function(De){return ze===De});if(!be){if(this.plugins.push(ze),!le(ze))throw new Error("Plugins must be function values that return objects");var Re=ze.call(this);if(!re(Re))throw new Error("Plugins must return an object of function properties");Ce(Re,function(De,et){if(!le(De))throw new Error("Bad plugin property: "+et+" from plugin "+ze.name+". Plugins should only return functions.");Ee._assignPluginFnProp(De,et)})}},addStorage:function(ze){he("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ze)}},Te=fe($e,de,{plugins:[]});return Te.raw={},Ce(Te,function(ze,Ee){le(ze)&&(Te.raw[Ee]=ce(Te,ze))}),Ce(se,function(ze){Te._addStorage(ze)}),Ce(ye,function(ze){Te._addPlugin(ze)}),Te}},69078:function(dn,St,ee){var te=ce(),Se=fe(),Le=ae(),Ce=typeof window!="undefined"?window:ee.g;dn.exports={assign:te,create:Se,trim:Le,bind:le,slice:re,each:de,map:he,pluck:me,isList:se,isFunction:ye,isObject:_e,Global:Ce};function ce(){return Object.assign?Object.assign:function(ve,Fe,$e,Te){for(var ze=1;ze<arguments.length;ze++)de(Object(arguments[ze]),function(Ee,be){ve[be]=Ee});return ve}}function fe(){if(Object.create)return function(Fe,$e,Te,ze){var Ee=re(arguments,1);return te.apply(this,[Object.create(Fe)].concat(Ee))};{let ve=function(){};var Me=ve;return function($e,Te,ze,Ee){var be=re(arguments,1);return ve.prototype=$e,te.apply(this,[new ve].concat(be))}}}function ae(){return String.prototype.trim?function(ve){return String.prototype.trim.call(ve)}:function(ve){return ve.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function le(Me,ve){return function(){return ve.apply(Me,Array.prototype.slice.call(arguments,0))}}function re(Me,ve){return Array.prototype.slice.call(Me,ve||0)}function de(Me,ve){me(Me,function(Fe,$e){return ve(Fe,$e),!1})}function he(Me,ve){var Fe=se(Me)?[]:{};return me(Me,function($e,Te){return Fe[Te]=ve($e,Te),!1}),Fe}function me(Me,ve){if(se(Me)){for(var Fe=0;Fe<Me.length;Fe++)if(ve(Me[Fe],Fe))return Me[Fe]}else for(var $e in Me)if(Me.hasOwnProperty($e)&&ve(Me[$e],$e))return Me[$e]}function se(Me){return Me!=null&&typeof Me!="function"&&typeof Me.length=="number"}function ye(Me){return Me&&{}.toString.call(Me)==="[object Function]"}function _e(Me){return Me&&{}.toString.call(Me)==="[object Object]"}},39015:function(dn,St,ee){dn.exports=[ee(39627),ee(95347),ee(34524),ee(45580),ee(58855),ee(8728)]},45580:function(dn,St,ee){var te=ee(69078),Se=te.Global,Le=te.trim;dn.exports={name:"cookieStorage",read:ce,write:ae,each:fe,remove:le,clearAll:re};var Ce=Se.document;function ce(he){if(!he||!de(he))return null;var me="(?:^|.*;\\s*)"+escape(he).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Ce.cookie.replace(new RegExp(me),"$1"))}function fe(he){for(var me=Ce.cookie.split(/; ?/g),se=me.length-1;se>=0;se--)if(Le(me[se])){var ye=me[se].split("="),_e=unescape(ye[0]),Me=unescape(ye[1]);he(Me,_e)}}function ae(he,me){he&&(Ce.cookie=escape(he)+"="+escape(me)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function le(he){!he||!de(he)||(Ce.cookie=escape(he)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function re(){fe(function(he,me){le(me)})}function de(he){return new RegExp("(?:^|;\\s*)"+escape(he).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Ce.cookie)}},39627:function(dn,St,ee){var te=ee(69078),Se=te.Global;dn.exports={name:"localStorage",read:Ce,write:ce,each:fe,remove:ae,clearAll:le};function Le(){return Se.localStorage}function Ce(re){return Le().getItem(re)}function ce(re,de){return Le().setItem(re,de)}function fe(re){for(var de=Le().length-1;de>=0;de--){var he=Le().key(de);re(Ce(he),he)}}function ae(re){return Le().removeItem(re)}function le(){return Le().clear()}},8728:function(dn){dn.exports={name:"memoryStorage",read:ee,write:te,each:Se,remove:Le,clearAll:Ce};var St={};function ee(ce){return St[ce]}function te(ce,fe){St[ce]=fe}function Se(ce){for(var fe in St)St.hasOwnProperty(fe)&&ce(St[fe],fe)}function Le(ce){delete St[ce]}function Ce(ce){St={}}},95347:function(dn,St,ee){var te=ee(69078),Se=te.Global;dn.exports={name:"oldFF-globalStorage",read:Ce,write:ce,each:fe,remove:ae,clearAll:le};var Le=Se.globalStorage;function Ce(re){return Le[re]}function ce(re,de){Le[re]=de}function fe(re){for(var de=Le.length-1;de>=0;de--){var he=Le.key(de);re(Le[he],he)}}function ae(re){return Le.removeItem(re)}function le(){fe(function(re,de){delete Le[re]})}},34524:function(dn,St,ee){var te=ee(69078),Se=te.Global;dn.exports={name:"oldIE-userDataStorage",write:ae,read:le,each:re,remove:de,clearAll:he};var Le="storejs",Ce=Se.document,ce=ye(),fe=(Se.navigator?Se.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function ae(_e,Me){if(!fe){var ve=se(_e);ce(function(Fe){Fe.setAttribute(ve,Me),Fe.save(Le)})}}function le(_e){if(!fe){var Me=se(_e),ve=null;return ce(function(Fe){ve=Fe.getAttribute(Me)}),ve}}function re(_e){ce(function(Me){for(var ve=Me.XMLDocument.documentElement.attributes,Fe=ve.length-1;Fe>=0;Fe--){var $e=ve[Fe];_e(Me.getAttribute($e.name),$e.name)}})}function de(_e){var Me=se(_e);ce(function(ve){ve.removeAttribute(Me),ve.save(Le)})}function he(){ce(function(_e){var Me=_e.XMLDocument.documentElement.attributes;_e.load(Le);for(var ve=Me.length-1;ve>=0;ve--)_e.removeAttribute(Me[ve].name);_e.save(Le)})}var me=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function se(_e){return _e.replace(/^\d/,"___$&").replace(me,"___")}function ye(){if(!Ce||!Ce.documentElement||!Ce.documentElement.addBehavior)return null;var _e="script",Me,ve,Fe;try{ve=new ActiveXObject("htmlfile"),ve.open(),ve.write("<"+_e+">document.w=window</"+_e+'><iframe src="/favicon.ico"></iframe>'),ve.close(),Me=ve.w.frames[0].document,Fe=Me.createElement("div")}catch($e){Fe=Ce.createElement("div"),Me=Ce.body}return function($e){var Te=[].slice.call(arguments,0);Te.unshift(Fe),Me.appendChild(Fe),Fe.addBehavior("#default#userData"),Fe.load(Le),$e.apply(this,Te),Me.removeChild(Fe)}}},58855:function(dn,St,ee){var te=ee(69078),Se=te.Global;dn.exports={name:"sessionStorage",read:Ce,write:ce,each:fe,remove:ae,clearAll:le};function Le(){return Se.sessionStorage}function Ce(re){return Le().getItem(re)}function ce(re,de){return Le().setItem(re,de)}function fe(re){for(var de=Le().length-1;de>=0;de--){var he=Le().key(de);re(Ce(he),he)}}function ae(re){return Le().removeItem(re)}function le(){return Le().clear()}},18034:function(dn){var St=arguments[3],ee=arguments[4],te=arguments[5],Se=JSON.stringify;dn.exports=function(Le,Ce){for(var ce,fe=Object.keys(te),ae=0,le=fe.length;ae<le;ae++){var re=fe[ae],de=te[re].exports;if(de===Le||de&&de.default===Le){ce=re;break}}if(!ce){ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var he={},ae=0,le=fe.length;ae<le;ae++){var re=fe[ae];he[re]=re}ee[ce]=["function(require,module,exports){"+Le+"(self); }",he]}var me=Math.floor(Math.pow(16,8)*Math.random()).toString(16),se={};se[ce]=ce,ee[me]=["function(require,module,exports){var f = require("+Se(ce)+");(f.default ? f.default : f)(self);}",se];var ye={};_e(me);function _e(ze){ye[ze]=!0;for(var Ee in ee[ze][1]){var be=ee[ze][1][Ee];ye[be]||_e(be)}}var Me="("+St+")({"+Object.keys(ye).map(function(ze){return Se(ze)+":["+ee[ze][0]+","+Se(ee[ze][1])+"]"}).join(",")+"},{},["+Se(me)+"])",ve=window.URL||window.webkitURL||window.mozURL||window.msURL,Fe=new Blob([Me],{type:"text/javascript"});if(Ce&&Ce.bare)return Fe;var $e=ve.createObjectURL(Fe),Te=new Worker($e);return Te.objectURL=$e,Te}},12320:function(dn){(function(St,ee){if(1)dn.exports=ee();else var te,Se})(window,function(){return function(St){var ee={};function te(Se){if(ee[Se])return ee[Se].exports;var Le=ee[Se]={i:Se,l:!1,exports:{}};return St[Se].call(Le.exports,Le,Le.exports,te),Le.l=!0,Le.exports}return te.m=St,te.c=ee,te.d=function(Se,Le,Ce){te.o(Se,Le)||Object.defineProperty(Se,Le,{enumerable:!0,get:Ce})},te.r=function(Se){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Se,"__esModule",{value:!0})},te.t=function(Se,Le){if(1&Le&&(Se=te(Se)),8&Le||4&Le&&typeof Se=="object"&&Se&&Se.__esModule)return Se;var Ce=Object.create(null);if(te.r(Ce),Object.defineProperty(Ce,"default",{enumerable:!0,value:Se}),2&Le&&typeof Se!="string")for(var ce in Se)te.d(Ce,ce,function(fe){return Se[fe]}.bind(null,ce));return Ce},te.n=function(Se){var Le=Se&&Se.__esModule?function(){return Se.default}:function(){return Se};return te.d(Le,"a",Le),Le},te.o=function(Se,Le){return Object.prototype.hasOwnProperty.call(Se,Le)},te.p="",te(te.s=34)}([function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.forwardEvent=ee.EventEmitter=void 0;var Se=function(){function Le(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Le.prototype,"event",{get:function(){var Ce=this;return this._event||(this._event=function(ce){return Ce._listeners.push(ce),{dispose:function(){if(!Ce._disposed){for(var fe=0;fe<Ce._listeners.length;fe++)if(Ce._listeners[fe]===ce)return void Ce._listeners.splice(fe,1)}}}}),this._event},enumerable:!1,configurable:!0}),Le.prototype.fire=function(Ce,ce){for(var fe=[],ae=0;ae<this._listeners.length;ae++)fe.push(this._listeners[ae]);for(ae=0;ae<fe.length;ae++)fe[ae].call(void 0,Ce,ce)},Le.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Le}();ee.EventEmitter=Se,ee.forwardEvent=function(Le,Ce){return Le(function(ce){return Ce.fire(ce)})}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.IUnicodeService=ee.IOptionsService=ee.ILogService=ee.IInstantiationService=ee.IDirtyRowService=ee.ICharsetService=ee.ICoreService=ee.ICoreMouseService=ee.IBufferService=void 0;var Se=te(14);ee.IBufferService=Se.createDecorator("BufferService"),ee.ICoreMouseService=Se.createDecorator("CoreMouseService"),ee.ICoreService=Se.createDecorator("CoreService"),ee.ICharsetService=Se.createDecorator("CharsetService"),ee.IDirtyRowService=Se.createDecorator("DirtyRowService"),ee.IInstantiationService=Se.createDecorator("InstantiationService"),ee.ILogService=Se.createDecorator("LogService"),ee.IOptionsService=Se.createDecorator("OptionsService"),ee.IUnicodeService=Se.createDecorator("UnicodeService")},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.getDisposeArrayDisposable=ee.disposeArray=ee.Disposable=void 0;var Se=function(){function Ce(){this._disposables=[],this._isDisposed=!1}return Ce.prototype.dispose=function(){this._isDisposed=!0;for(var ce=0,fe=this._disposables;ce<fe.length;ce++)fe[ce].dispose();this._disposables.length=0},Ce.prototype.register=function(ce){return this._disposables.push(ce),ce},Ce.prototype.unregister=function(ce){var fe=this._disposables.indexOf(ce);fe!==-1&&this._disposables.splice(fe,1)},Ce}();function Le(Ce){for(var ce=0,fe=Ce;ce<fe.length;ce++)fe[ce].dispose();Ce.length=0}ee.Disposable=Se,ee.disposeArray=Le,ee.getDisposeArrayDisposable=function(Ce){return{dispose:function(){return Le(Ce)}}}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.WHITESPACE_CELL_CODE=ee.WHITESPACE_CELL_WIDTH=ee.WHITESPACE_CELL_CHAR=ee.NULL_CELL_CODE=ee.NULL_CELL_WIDTH=ee.NULL_CELL_CHAR=ee.CHAR_DATA_CODE_INDEX=ee.CHAR_DATA_WIDTH_INDEX=ee.CHAR_DATA_CHAR_INDEX=ee.CHAR_DATA_ATTR_INDEX=ee.DEFAULT_ATTR=ee.DEFAULT_COLOR=void 0,ee.DEFAULT_COLOR=256,ee.DEFAULT_ATTR=256|ee.DEFAULT_COLOR<<9,ee.CHAR_DATA_ATTR_INDEX=0,ee.CHAR_DATA_CHAR_INDEX=1,ee.CHAR_DATA_WIDTH_INDEX=2,ee.CHAR_DATA_CODE_INDEX=3,ee.NULL_CELL_CHAR="",ee.NULL_CELL_WIDTH=1,ee.NULL_CELL_CODE=0,ee.WHITESPACE_CELL_CHAR=" ",ee.WHITESPACE_CELL_WIDTH=1,ee.WHITESPACE_CELL_CODE=32},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(le,re){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,he){de.__proto__=he}||function(de,he){for(var me in he)he.hasOwnProperty(me)&&(de[me]=he[me])})(le,re)},function(le,re){function de(){this.constructor=le}Se(le,re),le.prototype=re===null?Object.create(re):(de.prototype=re.prototype,new de)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CellData=void 0;var Ce=te(8),ce=te(3),fe=te(6),ae=function(le){function re(){var de=le!==null&&le.apply(this,arguments)||this;return de.content=0,de.fg=0,de.bg=0,de.extended=new fe.ExtendedAttrs,de.combinedData="",de}return Le(re,le),re.fromCharData=function(de){var he=new re;return he.setFromCharData(de),he},re.prototype.isCombined=function(){return 2097152&this.content},re.prototype.getWidth=function(){return this.content>>22},re.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?Ce.stringFromCodePoint(2097151&this.content):""},re.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},re.prototype.setFromCharData=function(de){this.fg=de[ce.CHAR_DATA_ATTR_INDEX],this.bg=0;var he=!1;if(de[ce.CHAR_DATA_CHAR_INDEX].length>2)he=!0;else if(de[ce.CHAR_DATA_CHAR_INDEX].length===2){var me=de[ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=me&&me<=56319){var se=de[ce.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=se&&se<=57343?this.content=1024*(me-55296)+se-56320+65536|de[ce.CHAR_DATA_WIDTH_INDEX]<<22:he=!0}else he=!0}else this.content=de[ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|de[ce.CHAR_DATA_WIDTH_INDEX]<<22;he&&(this.combinedData=de[ce.CHAR_DATA_CHAR_INDEX],this.content=2097152|de[ce.CHAR_DATA_WIDTH_INDEX]<<22)},re.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},re}(fe.AttributeData);ee.CellData=ae},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ISoundService=ee.ISelectionService=ee.IRenderService=ee.IMouseService=ee.ICoreBrowserService=ee.ICharSizeService=void 0;var Se=te(14);ee.ICharSizeService=Se.createDecorator("CharSizeService"),ee.ICoreBrowserService=Se.createDecorator("CoreBrowserService"),ee.IMouseService=Se.createDecorator("MouseService"),ee.IRenderService=Se.createDecorator("RenderService"),ee.ISelectionService=Se.createDecorator("SelectionService"),ee.ISoundService=Se.createDecorator("SoundService")},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ExtendedAttrs=ee.AttributeData=void 0;var Se=function(){function Ce(){this.fg=0,this.bg=0,this.extended=new Le}return Ce.toColorRGB=function(ce){return[ce>>>16&255,ce>>>8&255,255&ce]},Ce.fromColorRGB=function(ce){return(255&ce[0])<<16|(255&ce[1])<<8|255&ce[2]},Ce.prototype.clone=function(){var ce=new Ce;return ce.fg=this.fg,ce.bg=this.bg,ce.extended=this.extended.clone(),ce},Ce.prototype.isInverse=function(){return 67108864&this.fg},Ce.prototype.isBold=function(){return 134217728&this.fg},Ce.prototype.isUnderline=function(){return 268435456&this.fg},Ce.prototype.isBlink=function(){return 536870912&this.fg},Ce.prototype.isInvisible=function(){return 1073741824&this.fg},Ce.prototype.isItalic=function(){return 67108864&this.bg},Ce.prototype.isDim=function(){return 134217728&this.bg},Ce.prototype.getFgColorMode=function(){return 50331648&this.fg},Ce.prototype.getBgColorMode=function(){return 50331648&this.bg},Ce.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Ce.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Ce.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Ce.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Ce.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Ce.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Ce.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Ce.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Ce.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Ce.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Ce.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Ce.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},Ce.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Ce.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Ce.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Ce.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Ce.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Ce}();ee.AttributeData=Se;var Le=function(){function Ce(ce,fe){ce===void 0&&(ce=0),fe===void 0&&(fe=-1),this.underlineStyle=ce,this.underlineColor=fe}return Ce.prototype.clone=function(){return new Ce(this.underlineStyle,this.underlineColor)},Ce.prototype.isEmpty=function(){return this.underlineStyle===0},Ce}();ee.ExtendedAttrs=Le},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.addDisposableDomListener=void 0,ee.addDisposableDomListener=function(Se,Le,Ce,ce){Se.addEventListener(Le,Ce,ce);var fe=!1;return{dispose:function(){fe||(fe=!0,Se.removeEventListener(Le,Ce,ce))}}}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Utf8ToUtf32=ee.StringToUtf32=ee.utf32ToString=ee.stringFromCodePoint=void 0,ee.stringFromCodePoint=function(Ce){return Ce>65535?(Ce-=65536,String.fromCharCode(55296+(Ce>>10))+String.fromCharCode(Ce%1024+56320)):String.fromCharCode(Ce)},ee.utf32ToString=function(Ce,ce,fe){ce===void 0&&(ce=0),fe===void 0&&(fe=Ce.length);for(var ae="",le=ce;le<fe;++le){var re=Ce[le];re>65535?(re-=65536,ae+=String.fromCharCode(55296+(re>>10))+String.fromCharCode(re%1024+56320)):ae+=String.fromCharCode(re)}return ae};var Se=function(){function Ce(){this._interim=0}return Ce.prototype.clear=function(){this._interim=0},Ce.prototype.decode=function(ce,fe){var ae=ce.length;if(!ae)return 0;var le=0,re=0;this._interim&&(56320<=(me=ce.charCodeAt(re++))&&me<=57343?fe[le++]=1024*(this._interim-55296)+me-56320+65536:(fe[le++]=this._interim,fe[le++]=me),this._interim=0);for(var de=re;de<ae;++de){var he=ce.charCodeAt(de);if(55296<=he&&he<=56319){if(++de>=ae)return this._interim=he,le;var me;56320<=(me=ce.charCodeAt(de))&&me<=57343?fe[le++]=1024*(he-55296)+me-56320+65536:(fe[le++]=he,fe[le++]=me)}else fe[le++]=he}return le},Ce}();ee.StringToUtf32=Se;var Le=function(){function Ce(){this.interim=new Uint8Array(3)}return Ce.prototype.clear=function(){this.interim.fill(0)},Ce.prototype.decode=function(ce,fe){var ae=ce.length;if(!ae)return 0;var le,re,de,he,me=0,se=0,ye=0;if(this.interim[0]){var _e=!1,Me=this.interim[0];Me&=(224&Me)==192?31:(240&Me)==224?15:7;for(var ve=0,Fe=void 0;(Fe=63&this.interim[++ve])&&ve<4;)Me<<=6,Me|=Fe;for(var $e=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,Te=$e-ve;ye<Te;){if(ye>=ae)return 0;if((192&(Fe=ce[ye++]))!=128){ye--,_e=!0;break}this.interim[ve++]=Fe,Me<<=6,Me|=63&Fe}_e||($e===2?Me<128?ye--:fe[me++]=Me:$e===3?Me<2048||Me>=55296&&Me<=57343||(fe[me++]=Me):Me<65536||Me>1114111||(fe[me++]=Me)),this.interim.fill(0)}for(var ze=ae-4,Ee=ye;Ee<ae;){for(;!(!(Ee<ze)||128&(le=ce[Ee])||128&(re=ce[Ee+1])||128&(de=ce[Ee+2])||128&(he=ce[Ee+3]));)fe[me++]=le,fe[me++]=re,fe[me++]=de,fe[me++]=he,Ee+=4;if((le=ce[Ee++])<128)fe[me++]=le;else if((224&le)==192){if(Ee>=ae)return this.interim[0]=le,me;if((192&(re=ce[Ee++]))!=128){Ee--;continue}if((se=(31&le)<<6|63&re)<128){Ee--;continue}fe[me++]=se}else if((240&le)==224){if(Ee>=ae)return this.interim[0]=le,me;if((192&(re=ce[Ee++]))!=128){Ee--;continue}if(Ee>=ae)return this.interim[0]=le,this.interim[1]=re,me;if((192&(de=ce[Ee++]))!=128){Ee--;continue}if((se=(15&le)<<12|(63&re)<<6|63&de)<2048||se>=55296&&se<=57343)continue;fe[me++]=se}else if((248&le)==240){if(Ee>=ae)return this.interim[0]=le,me;if((192&(re=ce[Ee++]))!=128){Ee--;continue}if(Ee>=ae)return this.interim[0]=le,this.interim[1]=re,me;if((192&(de=ce[Ee++]))!=128){Ee--;continue}if(Ee>=ae)return this.interim[0]=le,this.interim[1]=re,this.interim[2]=de,me;if((192&(he=ce[Ee++]))!=128){Ee--;continue}if((se=(7&le)<<18|(63&re)<<12|(63&de)<<6|63&he)<65536||se>1114111)continue;fe[me++]=se}}return me},Ce}();ee.Utf8ToUtf32=Le},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CHAR_ATLAS_CELL_SPACING=ee.DIM_OPACITY=ee.INVERTED_DEFAULT_COLOR=void 0,ee.INVERTED_DEFAULT_COLOR=257,ee.DIM_OPACITY=.5,ee.CHAR_ATLAS_CELL_SPACING=1},function(St,ee,te){"use strict";var Se,Le,Ce,ce;function fe(le){var re=le.toString(16);return re.length<2?"0"+re:re}function ae(le,re){return le<re?(re+.05)/(le+.05):(le+.05)/(re+.05)}Object.defineProperty(ee,"__esModule",{value:!0}),ee.contrastRatio=ee.toPaddedHex=ee.rgba=ee.rgb=ee.css=ee.color=ee.channels=void 0,function(le){le.toCss=function(re,de,he,me){return me!==void 0?"#"+fe(re)+fe(de)+fe(he)+fe(me):"#"+fe(re)+fe(de)+fe(he)},le.toRgba=function(re,de,he,me){return me===void 0&&(me=255),(re<<24|de<<16|he<<8|me)>>>0}}(Se=ee.channels||(ee.channels={})),(Le=ee.color||(ee.color={})).blend=function(le,re){var de=(255&re.rgba)/255;if(de===1)return{css:re.css,rgba:re.rgba};var he=re.rgba>>24&255,me=re.rgba>>16&255,se=re.rgba>>8&255,ye=le.rgba>>24&255,_e=le.rgba>>16&255,Me=le.rgba>>8&255,ve=ye+Math.round((he-ye)*de),Fe=_e+Math.round((me-_e)*de),$e=Me+Math.round((se-Me)*de);return{css:Se.toCss(ve,Fe,$e),rgba:Se.toRgba(ve,Fe,$e)}},Le.isOpaque=function(le){return(255&le.rgba)==255},Le.ensureContrastRatio=function(le,re,de){var he=ce.ensureContrastRatio(le.rgba,re.rgba,de);if(he)return ce.toColor(he>>24&255,he>>16&255,he>>8&255)},Le.opaque=function(le){var re=(255|le.rgba)>>>0,de=ce.toChannels(re),he=de[0],me=de[1],se=de[2];return{css:Se.toCss(he,me,se),rgba:re}},Le.opacity=function(le,re){var de=Math.round(255*re),he=ce.toChannels(le.rgba),me=he[0],se=he[1],ye=he[2];return{css:Se.toCss(me,se,ye,de),rgba:Se.toRgba(me,se,ye,de)}},(ee.css||(ee.css={})).toColor=function(le){switch(le.length){case 7:return{css:le,rgba:(parseInt(le.slice(1),16)<<8|255)>>>0};case 9:return{css:le,rgba:parseInt(le.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(le){function re(de,he,me){var se=de/255,ye=he/255,_e=me/255;return .2126*(se<=.03928?se/12.92:Math.pow((se+.055)/1.055,2.4))+.7152*(ye<=.03928?ye/12.92:Math.pow((ye+.055)/1.055,2.4))+.0722*(_e<=.03928?_e/12.92:Math.pow((_e+.055)/1.055,2.4))}le.relativeLuminance=function(de){return re(de>>16&255,de>>8&255,255&de)},le.relativeLuminance2=re}(Ce=ee.rgb||(ee.rgb={})),function(le){function re(he,me,se){for(var ye=he>>24&255,_e=he>>16&255,Me=he>>8&255,ve=me>>24&255,Fe=me>>16&255,$e=me>>8&255,Te=ae(Ce.relativeLuminance2(ve,$e,Fe),Ce.relativeLuminance2(ye,_e,Me));Te<se&&(ve>0||Fe>0||$e>0);)ve-=Math.max(0,Math.ceil(.1*ve)),Fe-=Math.max(0,Math.ceil(.1*Fe)),$e-=Math.max(0,Math.ceil(.1*$e)),Te=ae(Ce.relativeLuminance2(ve,$e,Fe),Ce.relativeLuminance2(ye,_e,Me));return(ve<<24|Fe<<16|$e<<8|255)>>>0}function de(he,me,se){for(var ye=he>>24&255,_e=he>>16&255,Me=he>>8&255,ve=me>>24&255,Fe=me>>16&255,$e=me>>8&255,Te=ae(Ce.relativeLuminance2(ve,$e,Fe),Ce.relativeLuminance2(ye,_e,Me));Te<se&&(ve<255||Fe<255||$e<255);)ve=Math.min(255,ve+Math.ceil(.1*(255-ve))),Fe=Math.min(255,Fe+Math.ceil(.1*(255-Fe))),$e=Math.min(255,$e+Math.ceil(.1*(255-$e))),Te=ae(Ce.relativeLuminance2(ve,$e,Fe),Ce.relativeLuminance2(ye,_e,Me));return(ve<<24|Fe<<16|$e<<8|255)>>>0}le.ensureContrastRatio=function(he,me,se){var ye=Ce.relativeLuminance(he>>8),_e=Ce.relativeLuminance(me>>8);if(ae(ye,_e)<se)return _e<ye?re(he,me,se):de(he,me,se)},le.reduceLuminance=re,le.increaseLuminance=de,le.toChannels=function(he){return[he>>24&255,he>>16&255,he>>8&255,255&he]},le.toColor=function(he,me,se){return{css:Se.toCss(he,me,se),rgba:Se.toRgba(he,me,se)}}}(ce=ee.rgba||(ee.rgba={})),ee.toPaddedHex=fe,ee.contrastRatio=ae},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.isLinux=ee.isWindows=ee.isIphone=ee.isIpad=ee.isMac=ee.isSafari=ee.isFirefox=void 0;var Se=typeof navigator=="undefined",Le=Se?"node":navigator.userAgent,Ce=Se?"node":navigator.platform;function ce(fe,ae){return fe.indexOf(ae)>=0}ee.isFirefox=!!~Le.indexOf("Firefox"),ee.isSafari=/^((?!chrome|android).)*safari/i.test(Le),ee.isMac=ce(["Macintosh","MacIntel","MacPPC","Mac68K"],Ce),ee.isIpad=Ce==="iPad",ee.isIphone=Ce==="iPhone",ee.isWindows=ce(["Windows","Win16","Win32","WinCE"],Ce),ee.isLinux=Ce.indexOf("Linux")>=0},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.C1=ee.C0=void 0,function(Se){Se.NUL="\0",Se.SOH="",Se.STX="",Se.ETX="",Se.EOT="",Se.ENQ="",Se.ACK="",Se.BEL="\x07",Se.BS="\b",Se.HT=" ",Se.LF=`
|
|
|
`,Se.VT="\v",Se.FF="\f",Se.CR="\r",Se.SO="",Se.SI="",Se.DLE="",Se.DC1="",Se.DC2="",Se.DC3="",Se.DC4="",Se.NAK="",Se.SYN="",Se.ETB="",Se.CAN="",Se.EM="",Se.SUB="",Se.ESC="\x1B",Se.FS="",Se.GS="",Se.RS="",Se.US="",Se.SP=" ",Se.DEL="\x7F"}(ee.C0||(ee.C0={})),function(Se){Se.PAD="\x80",Se.HOP="\x81",Se.BPH="\x82",Se.NBH="\x83",Se.IND="\x84",Se.NEL="\x85",Se.SSA="\x86",Se.ESA="\x87",Se.HTS="\x88",Se.HTJ="\x89",Se.VTS="\x8A",Se.PLD="\x8B",Se.PLU="\x8C",Se.RI="\x8D",Se.SS2="\x8E",Se.SS3="\x8F",Se.DCS="\x90",Se.PU1="\x91",Se.PU2="\x92",Se.STS="\x93",Se.CCH="\x94",Se.MW="\x95",Se.SPA="\x96",Se.EPA="\x97",Se.SOS="\x98",Se.SGCI="\x99",Se.SCI="\x9A",Se.CSI="\x9B",Se.ST="\x9C",Se.OSC="\x9D",Se.PM="\x9E",Se.APC="\x9F"}(ee.C1||(ee.C1={}))},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BaseRenderLayer=void 0;var Se=te(3),Le=te(9),Ce=te(25),ce=te(6),fe=te(28),ae=te(10),le=te(17),re=function(){function de(he,me,se,ye,_e,Me,ve,Fe){this._container=he,this._alpha=ye,this._colors=_e,this._rendererId=Me,this._bufferService=ve,this._optionsService=Fe,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+me+"-layer"),this._canvas.style.zIndex=se.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return de.prototype.dispose=function(){var he;le.removeElementFromParent(this._canvas),(he=this._charAtlas)===null||he===void 0||he.dispose()},de.prototype._initCanvas=function(){this._ctx=fe.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},de.prototype.onOptionsChanged=function(){},de.prototype.onBlur=function(){},de.prototype.onFocus=function(){},de.prototype.onCursorMove=function(){},de.prototype.onGridChanged=function(he,me){},de.prototype.onSelectionChanged=function(he,me,se){se===void 0&&(se=!1)},de.prototype.setColors=function(he){this._refreshCharAtlas(he)},de.prototype._setTransparency=function(he){if(he!==this._alpha){var me=this._canvas;this._alpha=he,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,me),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},de.prototype._refreshCharAtlas=function(he){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Ce.acquireCharAtlas(this._optionsService.options,this._rendererId,he,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},de.prototype.resize=function(he){this._scaledCellWidth=he.scaledCellWidth,this._scaledCellHeight=he.scaledCellHeight,this._scaledCharWidth=he.scaledCharWidth,this._scaledCharHeight=he.scaledCharHeight,this._scaledCharLeft=he.scaledCharLeft,this._scaledCharTop=he.scaledCharTop,this._canvas.width=he.scaledCanvasWidth,this._canvas.height=he.scaledCanvasHeight,this._canvas.style.width=he.canvasWidth+"px",this._canvas.style.height=he.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},de.prototype._fillCells=function(he,me,se,ye){this._ctx.fillRect(he*this._scaledCellWidth,me*this._scaledCellHeight,se*this._scaledCellWidth,ye*this._scaledCellHeight)},de.prototype._fillBottomLineAtCells=function(he,me,se){se===void 0&&(se=1),this._ctx.fillRect(he*this._scaledCellWidth,(me+1)*this._scaledCellHeight-window.devicePixelRatio-1,se*this._scaledCellWidth,window.devicePixelRatio)},de.prototype._fillLeftLineAtCell=function(he,me,se){this._ctx.fillRect(he*this._scaledCellWidth,me*this._scaledCellHeight,window.devicePixelRatio*se,this._scaledCellHeight)},de.prototype._strokeRectAtCell=function(he,me,se,ye){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(he*this._scaledCellWidth+window.devicePixelRatio/2,me*this._scaledCellHeight+window.devicePixelRatio/2,se*this._scaledCellWidth-window.devicePixelRatio,ye*this._scaledCellHeight-window.devicePixelRatio)},de.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},de.prototype._clearCells=function(he,me,se,ye){this._alpha?this._ctx.clearRect(he*this._scaledCellWidth,me*this._scaledCellHeight,se*this._scaledCellWidth,ye*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(he*this._scaledCellWidth,me*this._scaledCellHeight,se*this._scaledCellWidth,ye*this._scaledCellHeight))},de.prototype._fillCharTrueColor=function(he,me,se){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(se),this._ctx.fillText(he.getChars(),me*this._scaledCellWidth+this._scaledCharLeft,se*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},de.prototype._drawChars=function(he,me,se){var ye,_e,Me=this._getContrastColor(he);Me||he.isFgRGB()||he.isBgRGB()?this._drawUncachedChars(he,me,se,Me):(he.isInverse()?(ye=he.isBgDefault()?Le.INVERTED_DEFAULT_COLOR:he.getBgColor(),_e=he.isFgDefault()?Le.INVERTED_DEFAULT_COLOR:he.getFgColor()):(_e=he.isBgDefault()?Se.DEFAULT_COLOR:he.getBgColor(),ye=he.isFgDefault()?Se.DEFAULT_COLOR:he.getFgColor()),ye+=this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&ye<8?8:0,this._currentGlyphIdentifier.chars=he.getChars()||Se.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=he.getCode()||Se.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=_e,this._currentGlyphIdentifier.fg=ye,this._currentGlyphIdentifier.bold=!!he.isBold(),this._currentGlyphIdentifier.dim=!!he.isDim(),this._currentGlyphIdentifier.italic=!!he.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,me*this._scaledCellWidth+this._scaledCharLeft,se*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(he,me,se))},de.prototype._drawUncachedChars=function(he,me,se,ye){if(this._ctx.save(),this._ctx.font=this._getFont(!!he.isBold(),!!he.isItalic()),this._ctx.textBaseline="middle",he.isInverse())if(ye)this._ctx.fillStyle=ye.css;else if(he.isBgDefault())this._ctx.fillStyle=ae.color.opaque(this._colors.background).css;else if(he.isBgRGB())this._ctx.fillStyle="rgb("+ce.AttributeData.toColorRGB(he.getBgColor()).join(",")+")";else{var _e=he.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&_e<8&&(_e+=8),this._ctx.fillStyle=this._colors.ansi[_e].css}else if(ye)this._ctx.fillStyle=ye.css;else if(he.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(he.isFgRGB())this._ctx.fillStyle="rgb("+ce.AttributeData.toColorRGB(he.getFgColor()).join(",")+")";else{var Me=he.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&Me<8&&(Me+=8),this._ctx.fillStyle=this._colors.ansi[Me].css}this._clipRow(se),he.isDim()&&(this._ctx.globalAlpha=Le.DIM_OPACITY),this._ctx.fillText(he.getChars(),me*this._scaledCellWidth+this._scaledCharLeft,se*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},de.prototype._clipRow=function(he){this._ctx.beginPath(),this._ctx.rect(0,he*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},de.prototype._getFont=function(he,me){return(me?"italic":"")+" "+(he?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},de.prototype._getContrastColor=function(he){if(this._optionsService.options.minimumContrastRatio!==1){var me=this._colors.contrastCache.getColor(he.bg,he.fg);if(me!==void 0)return me||void 0;var se=he.getFgColor(),ye=he.getFgColorMode(),_e=he.getBgColor(),Me=he.getBgColorMode(),ve=!!he.isInverse(),Fe=!!he.isInverse();if(ve){var $e=se;se=_e,_e=$e;var Te=ye;ye=Me,Me=Te}var ze=this._resolveBackgroundRgba(Me,_e,ve),Ee=this._resolveForegroundRgba(ye,se,ve,Fe),be=ae.rgba.ensureContrastRatio(ze,Ee,this._optionsService.options.minimumContrastRatio);if(be){var Re={css:ae.channels.toCss(be>>24&255,be>>16&255,be>>8&255),rgba:be};return this._colors.contrastCache.setColor(he.bg,he.fg,Re),Re}this._colors.contrastCache.setColor(he.bg,he.fg,null)}},de.prototype._resolveBackgroundRgba=function(he,me,se){switch(he){case 16777216:case 33554432:return this._colors.ansi[me].rgba;case 50331648:return me<<8;case 0:default:return se?this._colors.foreground.rgba:this._colors.background.rgba}},de.prototype._resolveForegroundRgba=function(he,me,se,ye){switch(he){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ye&&me<8&&(me+=8),this._colors.ansi[me].rgba;case 50331648:return me<<8;case 0:default:return se?this._colors.background.rgba:this._colors.foreground.rgba}},de}();ee.BaseRenderLayer=re},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.createDecorator=ee.getServiceDependencies=ee.serviceRegistry=void 0;function Se(Le,Ce,ce){Ce.di$target===Ce?Ce.di$dependencies.push({id:Le,index:ce}):(Ce.di$dependencies=[{id:Le,index:ce}],Ce.di$target=Ce)}ee.serviceRegistry=new Map,ee.getServiceDependencies=function(Le){return Le.di$dependencies||[]},ee.createDecorator=function(Le){if(ee.serviceRegistry.has(Le))return ee.serviceRegistry.get(Le);var Ce=function(ce,fe,ae){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Se(Ce,ce,ae)};return Ce.toString=function(){return Le},ee.serviceRegistry.set(Le,Ce),Ce}},function(St,ee,te){"use strict";function Se(Le,Ce,ce,fe){if(ce===void 0&&(ce=0),fe===void 0&&(fe=Le.length),ce>=Le.length)return Le;ce=(Le.length+ce)%Le.length,fe=fe>=Le.length?Le.length:(Le.length+fe)%Le.length;for(var ae=ce;ae<fe;++ae)Le[ae]=Ce;return Le}Object.defineProperty(ee,"__esModule",{value:!0}),ee.concat=ee.fillFallback=ee.fill=void 0,ee.fill=function(Le,Ce,ce,fe){return Le.fill?Le.fill(Ce,ce,fe):Se(Le,Ce,ce,fe)},ee.fillFallback=Se,ee.concat=function(Le,Ce){var ce=new Le.constructor(Le.length+Ce.length);return ce.set(Le),ce.set(Ce,Le.length),ce}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferLine=ee.DEFAULT_ATTR_DATA=void 0;var Se=te(8),Le=te(3),Ce=te(4),ce=te(6);ee.DEFAULT_ATTR_DATA=Object.freeze(new ce.AttributeData);var fe=function(){function ae(le,re,de){de===void 0&&(de=!1),this.isWrapped=de,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*le);for(var he=re||Ce.CellData.fromCharData([0,Le.NULL_CELL_CHAR,Le.NULL_CELL_WIDTH,Le.NULL_CELL_CODE]),me=0;me<le;++me)this.setCell(me,he);this.length=le}return ae.prototype.get=function(le){var re=this._data[3*le+0],de=2097151&re;return[this._data[3*le+1],2097152&re?this._combined[le]:de?Se.stringFromCodePoint(de):"",re>>22,2097152&re?this._combined[le].charCodeAt(this._combined[le].length-1):de]},ae.prototype.set=function(le,re){this._data[3*le+1]=re[Le.CHAR_DATA_ATTR_INDEX],re[Le.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[le]=re[1],this._data[3*le+0]=2097152|le|re[Le.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*le+0]=re[Le.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|re[Le.CHAR_DATA_WIDTH_INDEX]<<22},ae.prototype.getWidth=function(le){return this._data[3*le+0]>>22},ae.prototype.hasWidth=function(le){return 12582912&this._data[3*le+0]},ae.prototype.getFg=function(le){return this._data[3*le+1]},ae.prototype.getBg=function(le){return this._data[3*le+2]},ae.prototype.hasContent=function(le){return 4194303&this._data[3*le+0]},ae.prototype.getCodePoint=function(le){var re=this._data[3*le+0];return 2097152&re?this._combined[le].charCodeAt(this._combined[le].length-1):2097151&re},ae.prototype.isCombined=function(le){return 2097152&this._data[3*le+0]},ae.prototype.getString=function(le){var re=this._data[3*le+0];return 2097152&re?this._combined[le]:2097151&re?Se.stringFromCodePoint(2097151&re):""},ae.prototype.loadCell=function(le,re){var de=3*le;return re.content=this._data[de+0],re.fg=this._data[de+1],re.bg=this._data[de+2],2097152&re.content&&(re.combinedData=this._combined[le]),268435456&re.bg&&(re.extended=this._extendedAttrs[le]),re},ae.prototype.setCell=function(le,re){2097152&re.content&&(this._combined[le]=re.combinedData),268435456&re.bg&&(this._extendedAttrs[le]=re.extended),this._data[3*le+0]=re.content,this._data[3*le+1]=re.fg,this._data[3*le+2]=re.bg},ae.prototype.setCellFromCodePoint=function(le,re,de,he,me,se){268435456&me&&(this._extendedAttrs[le]=se),this._data[3*le+0]=re|de<<22,this._data[3*le+1]=he,this._data[3*le+2]=me},ae.prototype.addCodepointToCell=function(le,re){var de=this._data[3*le+0];2097152&de?this._combined[le]+=Se.stringFromCodePoint(re):(2097151&de?(this._combined[le]=Se.stringFromCodePoint(2097151&de)+Se.stringFromCodePoint(re),de&=-2097152,de|=2097152):de=re|1<<22,this._data[3*le+0]=de)},ae.prototype.insertCells=function(le,re,de,he){if((le%=this.length)&&this.getWidth(le-1)===2&&this.setCellFromCodePoint(le-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs),re<this.length-le){for(var me=new Ce.CellData,se=this.length-le-re-1;se>=0;--se)this.setCell(le+re+se,this.loadCell(le+se,me));for(se=0;se<re;++se)this.setCell(le+se,de)}else for(se=le;se<this.length;++se)this.setCell(se,de);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs)},ae.prototype.deleteCells=function(le,re,de,he){if(le%=this.length,re<this.length-le){for(var me=new Ce.CellData,se=0;se<this.length-le-re;++se)this.setCell(le+se,this.loadCell(le+re+se,me));for(se=this.length-re;se<this.length;++se)this.setCell(se,de)}else for(se=le;se<this.length;++se)this.setCell(se,de);le&&this.getWidth(le-1)===2&&this.setCellFromCodePoint(le-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs),this.getWidth(le)!==0||this.hasContent(le)||this.setCellFromCodePoint(le,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs)},ae.prototype.replaceCells=function(le,re,de,he){for(le&&this.getWidth(le-1)===2&&this.setCellFromCodePoint(le-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs),re<this.length&&this.getWidth(re-1)===2&&this.setCellFromCodePoint(re,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new ce.ExtendedAttrs);le<re&&le<this.length;)this.setCell(le++,de)},ae.prototype.resize=function(le,re){if(le!==this.length){if(le>this.length){var de=new Uint32Array(3*le);this.length&&(3*le<this._data.length?de.set(this._data.subarray(0,3*le)):de.set(this._data)),this._data=de;for(var he=this.length;he<le;++he)this.setCell(he,re)}else if(le){(de=new Uint32Array(3*le)).set(this._data.subarray(0,3*le)),this._data=de;var me=Object.keys(this._combined);for(he=0;he<me.length;he++){var se=parseInt(me[he],10);se>=le&&delete this._combined[se]}}else this._data=new Uint32Array(0),this._combined={};this.length=le}},ae.prototype.fill=function(le){this._combined={},this._extendedAttrs={};for(var re=0;re<this.length;++re)this.setCell(re,le)},ae.prototype.copyFrom=function(le){for(var re in this.length!==le.length?this._data=new Uint32Array(le._data):this._data.set(le._data),this.length=le.length,this._combined={},le._combined)this._combined[re]=le._combined[re];for(var re in this._extendedAttrs={},le._extendedAttrs)this._extendedAttrs[re]=le._extendedAttrs[re];this.isWrapped=le.isWrapped},ae.prototype.clone=function(){var le=new ae(0);for(var re in le._data=new Uint32Array(this._data),le.length=this.length,this._combined)le._combined[re]=this._combined[re];for(var re in this._extendedAttrs)le._extendedAttrs[re]=this._extendedAttrs[re];return le.isWrapped=this.isWrapped,le},ae.prototype.getTrimmedLength=function(){for(var le=this.length-1;le>=0;--le)if(4194303&this._data[3*le+0])return le+(this._data[3*le+0]>>22);return 0},ae.prototype.copyCellsFrom=function(le,re,de,he,me){var se=le._data;if(me)for(var ye=he-1;ye>=0;ye--)for(var _e=0;_e<3;_e++)this._data[3*(de+ye)+_e]=se[3*(re+ye)+_e];else for(ye=0;ye<he;ye++)for(_e=0;_e<3;_e++)this._data[3*(de+ye)+_e]=se[3*(re+ye)+_e];var Me=Object.keys(le._combined);for(_e=0;_e<Me.length;_e++){var ve=parseInt(Me[_e],10);ve>=re&&(this._combined[ve-re+de]=le._combined[ve])}},ae.prototype.translateToString=function(le,re,de){le===void 0&&(le=!1),re===void 0&&(re=0),de===void 0&&(de=this.length),le&&(de=Math.min(de,this.getTrimmedLength()));for(var he="";re<de;){var me=this._data[3*re+0],se=2097151&me;he+=2097152&me?this._combined[re]:se?Se.stringFromCodePoint(se):Le.WHITESPACE_CELL_CHAR,re+=me>>22||1}return he},ae}();ee.BufferLine=fe},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.removeElementFromParent=void 0,ee.removeElementFromParent=function(){for(var Se,Le=[],Ce=0;Ce<arguments.length;Ce++)Le[Ce]=arguments[Ce];for(var ce=0,fe=Le;ce<fe.length;ce++){var ae=fe[ce];(Se=ae==null?void 0:ae.parentElement)===null||Se===void 0||Se.removeChild(ae)}}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.tooMuchOutput=ee.promptLabel=void 0,ee.promptLabel="Terminal input",ee.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Ee,be){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Re,De){Re.__proto__=De}||function(Re,De){for(var et in De)De.hasOwnProperty(et)&&(Re[et]=De[et])})(Ee,be)},function(Ee,be){function Re(){this.constructor=Ee}Se(Ee,be),Ee.prototype=be===null?Object.create(be):(Re.prototype=be.prototype,new Re)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.InputHandler=ee.WindowsOptionsReportType=void 0;var Ce,ce=te(12),fe=te(20),ae=te(39),le=te(2),re=te(15),de=te(8),he=te(16),me=te(0),se=te(3),ye=te(4),_e=te(6),Me=te(22),ve=te(24),Fe={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function $e(Ee,be){if(Ee>24)return be.setWinLines||!1;switch(Ee){case 1:return!!be.restoreWin;case 2:return!!be.minimizeWin;case 3:return!!be.setWinPosition;case 4:return!!be.setWinSizePixels;case 5:return!!be.raiseWin;case 6:return!!be.lowerWin;case 7:return!!be.refreshWin;case 8:return!!be.setWinSizeChars;case 9:return!!be.maximizeWin;case 10:return!!be.fullscreenWin;case 11:return!!be.getWinState;case 13:return!!be.getWinPosition;case 14:return!!be.getWinSizePixels;case 15:return!!be.getScreenSizePixels;case 16:return!!be.getCellSizePixels;case 18:return!!be.getWinSizeChars;case 19:return!!be.getScreenSizeChars;case 20:return!!be.getIconTitle;case 21:return!!be.getWinTitle;case 22:return!!be.pushTitle;case 23:return!!be.popTitle;case 24:return!!be.setWinLines}return!1}(function(Ee){Ee[Ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Ee[Ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Ce=ee.WindowsOptionsReportType||(ee.WindowsOptionsReportType={}));var Te=function(){function Ee(be,Re,De,et){this._bufferService=be,this._coreService=Re,this._logService=De,this._optionsService=et,this._data=new Uint32Array(0)}return Ee.prototype.hook=function(be){this._data=new Uint32Array(0)},Ee.prototype.put=function(be,Re,De){this._data=re.concat(this._data,be.subarray(Re,De))},Ee.prototype.unhook=function(be){if(be){var Re=de.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Re){case'"q':return this._coreService.triggerDataEvent(ce.C0.ESC+'P1$r0"q'+ce.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(ce.C0.ESC+'P1$r61;1"p'+ce.C0.ESC+"\\");case"r":var De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(ce.C0.ESC+"P1$r"+De+ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(ce.C0.ESC+"P1$r0m"+ce.C0.ESC+"\\");case" q":var et={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return et-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(ce.C0.ESC+"P1$r"+et+" q"+ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Re),this._coreService.triggerDataEvent(ce.C0.ESC+"P0$r"+ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},Ee}(),ze=function(Ee){function be(Re,De,et,Ye,dt,Ke,zt,pt,Kt){Kt===void 0&&(Kt=new ae.EscapeSequenceParser);var Ze=Ee.call(this)||this;Ze._bufferService=Re,Ze._charsetService=De,Ze._coreService=et,Ze._dirtyRowService=Ye,Ze._logService=dt,Ze._optionsService=Ke,Ze._coreMouseService=zt,Ze._unicodeService=pt,Ze._parser=Kt,Ze._parseBuffer=new Uint32Array(4096),Ze._stringDecoder=new de.StringToUtf32,Ze._utf8Decoder=new de.Utf8ToUtf32,Ze._workCell=new ye.CellData,Ze._windowTitle="",Ze._iconName="",Ze._windowTitleStack=[],Ze._iconNameStack=[],Ze._curAttrData=he.DEFAULT_ATTR_DATA.clone(),Ze._eraseAttrDataInternal=he.DEFAULT_ATTR_DATA.clone(),Ze._onRequestBell=new me.EventEmitter,Ze._onRequestRefreshRows=new me.EventEmitter,Ze._onRequestReset=new me.EventEmitter,Ze._onRequestScroll=new me.EventEmitter,Ze._onRequestSyncScrollBar=new me.EventEmitter,Ze._onRequestWindowsOptionsReport=new me.EventEmitter,Ze._onA11yChar=new me.EventEmitter,Ze._onA11yTab=new me.EventEmitter,Ze._onCursorMove=new me.EventEmitter,Ze._onLineFeed=new me.EventEmitter,Ze._onScroll=new me.EventEmitter,Ze._onTitleChange=new me.EventEmitter,Ze.register(Ze._parser),Ze._parser.setCsiHandlerFallback(function(nt,Ge){Ze._logService.debug("Unknown CSI code: ",{identifier:Ze._parser.identToString(nt),params:Ge.toArray()})}),Ze._parser.setEscHandlerFallback(function(nt){Ze._logService.debug("Unknown ESC code: ",{identifier:Ze._parser.identToString(nt)})}),Ze._parser.setExecuteHandlerFallback(function(nt){Ze._logService.debug("Unknown EXECUTE code: ",{code:nt})}),Ze._parser.setOscHandlerFallback(function(nt,Ge,jt){Ze._logService.debug("Unknown OSC code: ",{identifier:nt,action:Ge,data:jt})}),Ze._parser.setDcsHandlerFallback(function(nt,Ge,jt){Ge==="HOOK"&&(jt=jt.toArray()),Ze._logService.debug("Unknown DCS code: ",{identifier:Ze._parser.identToString(nt),action:Ge,payload:jt})}),Ze._parser.setPrintHandler(function(nt,Ge,jt){return Ze.print(nt,Ge,jt)}),Ze._parser.setCsiHandler({final:"@"},function(nt){return Ze.insertChars(nt)}),Ze._parser.setCsiHandler({intermediates:" ",final:"@"},function(nt){return Ze.scrollLeft(nt)}),Ze._parser.setCsiHandler({final:"A"},function(nt){return Ze.cursorUp(nt)}),Ze._parser.setCsiHandler({intermediates:" ",final:"A"},function(nt){return Ze.scrollRight(nt)}),Ze._parser.setCsiHandler({final:"B"},function(nt){return Ze.cursorDown(nt)}),Ze._parser.setCsiHandler({final:"C"},function(nt){return Ze.cursorForward(nt)}),Ze._parser.setCsiHandler({final:"D"},function(nt){return Ze.cursorBackward(nt)}),Ze._parser.setCsiHandler({final:"E"},function(nt){return Ze.cursorNextLine(nt)}),Ze._parser.setCsiHandler({final:"F"},function(nt){return Ze.cursorPrecedingLine(nt)}),Ze._parser.setCsiHandler({final:"G"},function(nt){return Ze.cursorCharAbsolute(nt)}),Ze._parser.setCsiHandler({final:"H"},function(nt){return Ze.cursorPosition(nt)}),Ze._parser.setCsiHandler({final:"I"},function(nt){return Ze.cursorForwardTab(nt)}),Ze._parser.setCsiHandler({final:"J"},function(nt){return Ze.eraseInDisplay(nt)}),Ze._parser.setCsiHandler({prefix:"?",final:"J"},function(nt){return Ze.eraseInDisplay(nt)}),Ze._parser.setCsiHandler({final:"K"},function(nt){return Ze.eraseInLine(nt)}),Ze._parser.setCsiHandler({prefix:"?",final:"K"},function(nt){return Ze.eraseInLine(nt)}),Ze._parser.setCsiHandler({final:"L"},function(nt){return Ze.insertLines(nt)}),Ze._parser.setCsiHandler({final:"M"},function(nt){return Ze.deleteLines(nt)}),Ze._parser.setCsiHandler({final:"P"},function(nt){return Ze.deleteChars(nt)}),Ze._parser.setCsiHandler({final:"S"},function(nt){return Ze.scrollUp(nt)}),Ze._parser.setCsiHandler({final:"T"},function(nt){return Ze.scrollDown(nt)}),Ze._parser.setCsiHandler({final:"X"},function(nt){return Ze.eraseChars(nt)}),Ze._parser.setCsiHandler({final:"Z"},function(nt){return Ze.cursorBackwardTab(nt)}),Ze._parser.setCsiHandler({final:"`"},function(nt){return Ze.charPosAbsolute(nt)}),Ze._parser.setCsiHandler({final:"a"},function(nt){return Ze.hPositionRelative(nt)}),Ze._parser.setCsiHandler({final:"b"},function(nt){return Ze.repeatPrecedingCharacter(nt)}),Ze._parser.setCsiHandler({final:"c"},function(nt){return Ze.sendDeviceAttributesPrimary(nt)}),Ze._parser.setCsiHandler({prefix:">",final:"c"},function(nt){return Ze.sendDeviceAttributesSecondary(nt)}),Ze._parser.setCsiHandler({final:"d"},function(nt){return Ze.linePosAbsolute(nt)}),Ze._parser.setCsiHandler({final:"e"},function(nt){return Ze.vPositionRelative(nt)}),Ze._parser.setCsiHandler({final:"f"},function(nt){return Ze.hVPosition(nt)}),Ze._parser.setCsiHandler({final:"g"},function(nt){return Ze.tabClear(nt)}),Ze._parser.setCsiHandler({final:"h"},function(nt){return Ze.setMode(nt)}),Ze._parser.setCsiHandler({prefix:"?",final:"h"},function(nt){return Ze.setModePrivate(nt)}),Ze._parser.setCsiHandler({final:"l"},function(nt){return Ze.resetMode(nt)}),Ze._parser.setCsiHandler({prefix:"?",final:"l"},function(nt){return Ze.resetModePrivate(nt)}),Ze._parser.setCsiHandler({final:"m"},function(nt){return Ze.charAttributes(nt)}),Ze._parser.setCsiHandler({final:"n"},function(nt){return Ze.deviceStatus(nt)}),Ze._parser.setCsiHandler({prefix:"?",final:"n"},function(nt){return Ze.deviceStatusPrivate(nt)}),Ze._parser.setCsiHandler({intermediates:"!",final:"p"},function(nt){return Ze.softReset(nt)}),Ze._parser.setCsiHandler({intermediates:" ",final:"q"},function(nt){return Ze.setCursorStyle(nt)}),Ze._parser.setCsiHandler({final:"r"},function(nt){return Ze.setScrollRegion(nt)}),Ze._parser.setCsiHandler({final:"s"},function(nt){return Ze.saveCursor(nt)}),Ze._parser.setCsiHandler({final:"t"},function(nt){return Ze.windowOptions(nt)}),Ze._parser.setCsiHandler({final:"u"},function(nt){return Ze.restoreCursor(nt)}),Ze._parser.setCsiHandler({intermediates:"'",final:"}"},function(nt){return Ze.insertColumns(nt)}),Ze._parser.setCsiHandler({intermediates:"'",final:"~"},function(nt){return Ze.deleteColumns(nt)}),Ze._parser.setExecuteHandler(ce.C0.BEL,function(){return Ze.bell()}),Ze._parser.setExecuteHandler(ce.C0.LF,function(){return Ze.lineFeed()}),Ze._parser.setExecuteHandler(ce.C0.VT,function(){return Ze.lineFeed()}),Ze._parser.setExecuteHandler(ce.C0.FF,function(){return Ze.lineFeed()}),Ze._parser.setExecuteHandler(ce.C0.CR,function(){return Ze.carriageReturn()}),Ze._parser.setExecuteHandler(ce.C0.BS,function(){return Ze.backspace()}),Ze._parser.setExecuteHandler(ce.C0.HT,function(){return Ze.tab()}),Ze._parser.setExecuteHandler(ce.C0.SO,function(){return Ze.shiftOut()}),Ze._parser.setExecuteHandler(ce.C0.SI,function(){return Ze.shiftIn()}),Ze._parser.setExecuteHandler(ce.C1.IND,function(){return Ze.index()}),Ze._parser.setExecuteHandler(ce.C1.NEL,function(){return Ze.nextLine()}),Ze._parser.setExecuteHandler(ce.C1.HTS,function(){return Ze.tabSet()}),Ze._parser.setOscHandler(0,new Me.OscHandler(function(nt){Ze.setTitle(nt),Ze.setIconName(nt)})),Ze._parser.setOscHandler(1,new Me.OscHandler(function(nt){return Ze.setIconName(nt)})),Ze._parser.setOscHandler(2,new Me.OscHandler(function(nt){return Ze.setTitle(nt)})),Ze._parser.setEscHandler({final:"7"},function(){return Ze.saveCursor()}),Ze._parser.setEscHandler({final:"8"},function(){return Ze.restoreCursor()}),Ze._parser.setEscHandler({final:"D"},function(){return Ze.index()}),Ze._parser.setEscHandler({final:"E"},function(){return Ze.nextLine()}),Ze._parser.setEscHandler({final:"H"},function(){return Ze.tabSet()}),Ze._parser.setEscHandler({final:"M"},function(){return Ze.reverseIndex()}),Ze._parser.setEscHandler({final:"="},function(){return Ze.keypadApplicationMode()}),Ze._parser.setEscHandler({final:">"},function(){return Ze.keypadNumericMode()}),Ze._parser.setEscHandler({final:"c"},function(){return Ze.fullReset()}),Ze._parser.setEscHandler({final:"n"},function(){return Ze.setgLevel(2)}),Ze._parser.setEscHandler({final:"o"},function(){return Ze.setgLevel(3)}),Ze._parser.setEscHandler({final:"|"},function(){return Ze.setgLevel(3)}),Ze._parser.setEscHandler({final:"}"},function(){return Ze.setgLevel(2)}),Ze._parser.setEscHandler({final:"~"},function(){return Ze.setgLevel(1)}),Ze._parser.setEscHandler({intermediates:"%",final:"@"},function(){return Ze.selectDefaultCharset()}),Ze._parser.setEscHandler({intermediates:"%",final:"G"},function(){return Ze.selectDefaultCharset()});var tt=function(nt){ft._parser.setEscHandler({intermediates:"(",final:nt},function(){return Ze.selectCharset("("+nt)}),ft._parser.setEscHandler({intermediates:")",final:nt},function(){return Ze.selectCharset(")"+nt)}),ft._parser.setEscHandler({intermediates:"*",final:nt},function(){return Ze.selectCharset("*"+nt)}),ft._parser.setEscHandler({intermediates:"+",final:nt},function(){return Ze.selectCharset("+"+nt)}),ft._parser.setEscHandler({intermediates:"-",final:nt},function(){return Ze.selectCharset("-"+nt)}),ft._parser.setEscHandler({intermediates:".",final:nt},function(){return Ze.selectCharset("."+nt)}),ft._parser.setEscHandler({intermediates:"/",final:nt},function(){return Ze.selectCharset("/"+nt)})},ft=this;for(var Ut in fe.CHARSETS)tt(Ut);return Ze._parser.setEscHandler({intermediates:"#",final:"8"},function(){return Ze.screenAlignmentPattern()}),Ze._parser.setErrorHandler(function(nt){return Ze._logService.error("Parsing error: ",nt),nt}),Ze._parser.setDcsHandler({intermediates:"$",final:"q"},new Te(Ze._bufferService,Ze._coreService,Ze._logService,Ze._optionsService)),Ze}return Le(be,Ee),Object.defineProperty(be.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),be.prototype.dispose=function(){Ee.prototype.dispose.call(this)},be.prototype.parse=function(Re){var De=this._bufferService.buffer,et=De.x,Ye=De.y;if(this._logService.debug("parsing data",Re),this._parseBuffer.length<Re.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Re.length,131072))),this._dirtyRowService.clearRange(),Re.length>131072)for(var dt=0;dt<Re.length;dt+=131072){var Ke=dt+131072<Re.length?dt+131072:Re.length,zt=typeof Re=="string"?this._stringDecoder.decode(Re.substring(dt,Ke),this._parseBuffer):this._utf8Decoder.decode(Re.subarray(dt,Ke),this._parseBuffer);this._parser.parse(this._parseBuffer,zt)}else zt=typeof Re=="string"?this._stringDecoder.decode(Re,this._parseBuffer):this._utf8Decoder.decode(Re,this._parseBuffer),this._parser.parse(this._parseBuffer,zt);(De=this._bufferService.buffer).x===et&&De.y===Ye||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},be.prototype.print=function(Re,De,et){var Ye,dt,Ke=this._bufferService.buffer,zt=this._charsetService.charset,pt=this._optionsService.options.screenReaderMode,Kt=this._bufferService.cols,Ze=this._coreService.decPrivateModes.wraparound,tt=this._coreService.modes.insertMode,ft=this._curAttrData,Ut=Ke.lines.get(Ke.ybase+Ke.y);this._dirtyRowService.markDirty(Ke.y),Ke.x&&et-De>0&&Ut.getWidth(Ke.x-1)===2&&Ut.setCellFromCodePoint(Ke.x-1,0,1,ft.fg,ft.bg,ft.extended);for(var nt=De;nt<et;++nt){if(Ye=Re[nt],dt=this._unicodeService.wcwidth(Ye),Ye<127&&zt){var Ge=zt[String.fromCharCode(Ye)];Ge&&(Ye=Ge.charCodeAt(0))}if(pt&&this._onA11yChar.fire(de.stringFromCodePoint(Ye)),dt||!Ke.x){if(Ke.x+dt-1>=Kt){if(Ze){for(;Ke.x<Kt;)Ut.setCellFromCodePoint(Ke.x++,0,1,ft.fg,ft.bg,ft.extended);Ke.x=0,Ke.y++,Ke.y===Ke.scrollBottom+1?(Ke.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Ke.y>=this._bufferService.rows&&(Ke.y=this._bufferService.rows-1),Ke.lines.get(Ke.ybase+Ke.y).isWrapped=!0),Ut=Ke.lines.get(Ke.ybase+Ke.y)}else if(Ke.x=Kt-1,dt===2)continue}if(tt&&(Ut.insertCells(Ke.x,dt,Ke.getNullCell(ft),ft),Ut.getWidth(Kt-1)===2&&Ut.setCellFromCodePoint(Kt-1,se.NULL_CELL_CODE,se.NULL_CELL_WIDTH,ft.fg,ft.bg,ft.extended)),Ut.setCellFromCodePoint(Ke.x++,Ye,dt,ft.fg,ft.bg,ft.extended),dt>0)for(;--dt;)Ut.setCellFromCodePoint(Ke.x++,0,0,ft.fg,ft.bg,ft.extended)}else Ut.getWidth(Ke.x-1)?Ut.addCodepointToCell(Ke.x-1,Ye):Ut.addCodepointToCell(Ke.x-2,Ye)}et-De>0&&(Ut.loadCell(Ke.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Ke.x<Kt&&et-De>0&&Ut.getWidth(Ke.x)===0&&!Ut.hasContent(Ke.x)&&Ut.setCellFromCodePoint(Ke.x,0,1,ft.fg,ft.bg,ft.extended),this._dirtyRowService.markDirty(Ke.y)},be.prototype.addCsiHandler=function(Re,De){var et=this;return Re.final!=="t"||Re.prefix||Re.intermediates?this._parser.addCsiHandler(Re,De):this._parser.addCsiHandler(Re,function(Ye){return!$e(Ye.params[0],et._optionsService.options.windowOptions)||De(Ye)})},be.prototype.addDcsHandler=function(Re,De){return this._parser.addDcsHandler(Re,new ve.DcsHandler(De))},be.prototype.addEscHandler=function(Re,De){return this._parser.addEscHandler(Re,De)},be.prototype.addOscHandler=function(Re,De){return this._parser.addOscHandler(Re,new Me.OscHandler(De))},be.prototype.bell=function(){this._onRequestBell.fire()},be.prototype.lineFeed=function(){var Re=this._bufferService.buffer;this._dirtyRowService.markDirty(Re.y),this._optionsService.options.convertEol&&(Re.x=0),Re.y++,Re.y===Re.scrollBottom+1?(Re.y--,this._onRequestScroll.fire(this._eraseAttrData())):Re.y>=this._bufferService.rows&&(Re.y=this._bufferService.rows-1),Re.x>=this._bufferService.cols&&Re.x--,this._dirtyRowService.markDirty(Re.y),this._onLineFeed.fire()},be.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},be.prototype.backspace=function(){var Re,De=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(De.x>0&&De.x--);if(this._restrictCursor(this._bufferService.cols),De.x>0)De.x--;else if(De.x===0&&De.y>De.scrollTop&&De.y<=De.scrollBottom&&(!((Re=De.lines.get(De.ybase+De.y))===null||Re===void 0)&&Re.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var et=De.lines.get(De.ybase+De.y);et.hasWidth(De.x)&&!et.hasContent(De.x)&&De.x--}this._restrictCursor()},be.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Re=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Re)}},be.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},be.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},be.prototype._restrictCursor=function(Re){Re===void 0&&(Re=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Re,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype._setCursor=function(Re,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Re,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Re,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype._moveCursor=function(Re,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Re,this._bufferService.buffer.y+De)},be.prototype.cursorUp=function(Re){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Re.params[0]||1)):this._moveCursor(0,-(Re.params[0]||1))},be.prototype.cursorDown=function(Re){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,Re.params[0]||1)):this._moveCursor(0,Re.params[0]||1)},be.prototype.cursorForward=function(Re){this._moveCursor(Re.params[0]||1,0)},be.prototype.cursorBackward=function(Re){this._moveCursor(-(Re.params[0]||1),0)},be.prototype.cursorNextLine=function(Re){this.cursorDown(Re),this._bufferService.buffer.x=0},be.prototype.cursorPrecedingLine=function(Re){this.cursorUp(Re),this._bufferService.buffer.x=0},be.prototype.cursorCharAbsolute=function(Re){this._setCursor((Re.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.cursorPosition=function(Re){this._setCursor(Re.length>=2?(Re.params[1]||1)-1:0,(Re.params[0]||1)-1)},be.prototype.charPosAbsolute=function(Re){this._setCursor((Re.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.hPositionRelative=function(Re){this._moveCursor(Re.params[0]||1,0)},be.prototype.linePosAbsolute=function(Re){this._setCursor(this._bufferService.buffer.x,(Re.params[0]||1)-1)},be.prototype.vPositionRelative=function(Re){this._moveCursor(0,Re.params[0]||1)},be.prototype.hVPosition=function(Re){this.cursorPosition(Re)},be.prototype.tabClear=function(Re){var De=Re.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},be.prototype.cursorForwardTab=function(Re){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Re.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},be.prototype.cursorBackwardTab=function(Re){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Re.params[0]||1,et=this._bufferService.buffer;De--;)et.x=et.prevStop()},be.prototype._eraseInBufferLine=function(Re,De,et,Ye){Ye===void 0&&(Ye=!1);var dt=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Re);dt.replaceCells(De,et,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ye&&(dt.isWrapped=!1)},be.prototype._resetBufferLine=function(Re){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Re);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},be.prototype.eraseInDisplay=function(Re){var De;switch(this._restrictCursor(),Re.params[0]){case 0:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);De<this._bufferService.rows;De++)this._resetBufferLine(De);this._dirtyRowService.markDirty(De);break;case 1:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(De+1).isWrapped=!1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 2:for(De=this._bufferService.rows,this._dirtyRowService.markDirty(De-1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 3:var et=this._bufferService.buffer.lines.length-this._bufferService.rows;et>0&&(this._bufferService.buffer.lines.trimStart(et),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-et,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-et,0),this._onScroll.fire(0))}},be.prototype.eraseInLine=function(Re){switch(this._restrictCursor(),Re.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype.insertLines=function(Re){this._restrictCursor();var De=Re.params[0]||1,et=this._bufferService.buffer;if(!(et.y>et.scrollBottom||et.y<et.scrollTop)){for(var Ye=et.ybase+et.y,dt=this._bufferService.rows-1-et.scrollBottom,Ke=this._bufferService.rows-1+et.ybase-dt+1;De--;)et.lines.splice(Ke-1,1),et.lines.splice(Ye,0,et.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(et.y,et.scrollBottom),et.x=0}},be.prototype.deleteLines=function(Re){this._restrictCursor();var De=Re.params[0]||1,et=this._bufferService.buffer;if(!(et.y>et.scrollBottom||et.y<et.scrollTop)){var Ye,dt=et.ybase+et.y;for(Ye=this._bufferService.rows-1-et.scrollBottom,Ye=this._bufferService.rows-1+et.ybase-Ye;De--;)et.lines.splice(dt,1),et.lines.splice(Ye,0,et.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(et.y,et.scrollBottom),et.x=0}},be.prototype.insertChars=function(Re){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.insertCells(this._bufferService.buffer.x,Re.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.deleteChars=function(Re){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.deleteCells(this._bufferService.buffer.x,Re.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.scrollUp=function(Re){for(var De=Re.params[0]||1,et=this._bufferService.buffer;De--;)et.lines.splice(et.ybase+et.scrollTop,1),et.lines.splice(et.ybase+et.scrollBottom,0,et.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(et.scrollTop,et.scrollBottom)},be.prototype.scrollDown=function(Re){for(var De=Re.params[0]||1,et=this._bufferService.buffer;De--;)et.lines.splice(et.ybase+et.scrollBottom,1),et.lines.splice(et.ybase+et.scrollTop,0,et.getBlankLine(he.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(et.scrollTop,et.scrollBottom)},be.prototype.scrollLeft=function(Re){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var et=Re.params[0]||1,Ye=De.scrollTop;Ye<=De.scrollBottom;++Ye){var dt=De.lines.get(De.ybase+Ye);dt.deleteCells(0,et,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),dt.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.prototype.scrollRight=function(Re){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var et=Re.params[0]||1,Ye=De.scrollTop;Ye<=De.scrollBottom;++Ye){var dt=De.lines.get(De.ybase+Ye);dt.insertCells(0,et,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),dt.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.prototype.insertColumns=function(Re){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var et=Re.params[0]||1,Ye=De.scrollTop;Ye<=De.scrollBottom;++Ye){var dt=this._bufferService.buffer.lines.get(De.ybase+Ye);dt.insertCells(De.x,et,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),dt.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.prototype.deleteColumns=function(Re){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var et=Re.params[0]||1,Ye=De.scrollTop;Ye<=De.scrollBottom;++Ye){var dt=De.lines.get(De.ybase+Ye);dt.deleteCells(De.x,et,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),dt.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},be.prototype.eraseChars=function(Re){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Re.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.repeatPrecedingCharacter=function(Re){if(this._parser.precedingCodepoint){for(var De=Re.params[0]||1,et=new Uint32Array(De),Ye=0;Ye<De;++Ye)et[Ye]=this._parser.precedingCodepoint;this.print(et,0,et.length)}},be.prototype.sendDeviceAttributesPrimary=function(Re){Re.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(ce.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(ce.C0.ESC+"[?6c"))},be.prototype.sendDeviceAttributesSecondary=function(Re){Re.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(ce.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(ce.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Re.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(ce.C0.ESC+"[>83;40003;0c"))},be.prototype._is=function(Re){return(this._optionsService.options.termName+"").indexOf(Re)===0},be.prototype.setMode=function(Re){for(var De=0;De<Re.length;De++)switch(Re.params[De]){case 4:this._coreService.modes.insertMode=!0}},be.prototype.setModePrivate=function(Re){for(var De=0;De<Re.length;De++)switch(Re.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,fe.DEFAULT_CHARSET),this._charsetService.setgCharset(1,fe.DEFAULT_CHARSET),this._charsetService.setgCharset(2,fe.DEFAULT_CHARSET),this._charsetService.setgCharset(3,fe.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},be.prototype.resetMode=function(Re){for(var De=0;De<Re.length;De++)switch(Re.params[De]){case 4:this._coreService.modes.insertMode=!1}},be.prototype.resetModePrivate=function(Re){for(var De=0;De<Re.length;De++)switch(Re.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Re.params[De]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},be.prototype._updateAttrColor=function(Re,De,et,Ye,dt){return De===2?(Re|=50331648,Re&=-16777216,Re|=_e.AttributeData.fromColorRGB([et,Ye,dt])):De===5&&(Re&=-50331904,Re|=33554432|255&et),Re},be.prototype._extractColor=function(Re,De,et){var Ye=[0,0,-1,0,0,0],dt=0,Ke=0;do{if(Ye[Ke+dt]=Re.params[De+Ke],Re.hasSubParams(De+Ke)){var zt=Re.getSubParams(De+Ke),pt=0;do Ye[1]===5&&(dt=1),Ye[Ke+pt+1+dt]=zt[pt];while(++pt<zt.length&&pt+Ke+1+dt<Ye.length);break}if(Ye[1]===5&&Ke+dt>=2||Ye[1]===2&&Ke+dt>=5)break;Ye[1]&&(dt=1)}while(++Ke+De<Re.length&&Ke+dt<Ye.length);for(pt=2;pt<Ye.length;++pt)Ye[pt]===-1&&(Ye[pt]=0);switch(Ye[0]){case 38:et.fg=this._updateAttrColor(et.fg,Ye[1],Ye[3],Ye[4],Ye[5]);break;case 48:et.bg=this._updateAttrColor(et.bg,Ye[1],Ye[3],Ye[4],Ye[5]);break;case 58:et.extended=et.extended.clone(),et.extended.underlineColor=this._updateAttrColor(et.extended.underlineColor,Ye[1],Ye[3],Ye[4],Ye[5])}return Ke},be.prototype._processUnderline=function(Re,De){De.extended=De.extended.clone(),(!~Re||Re>5)&&(Re=1),De.extended.underlineStyle=Re,De.fg|=268435456,Re===0&&(De.fg&=-268435457),De.updateExtended()},be.prototype.charAttributes=function(Re){if(Re.length===1&&Re.params[0]===0)return this._curAttrData.fg=he.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=he.DEFAULT_ATTR_DATA.bg);for(var De,et=Re.length,Ye=this._curAttrData,dt=0;dt<et;dt++)(De=Re.params[dt])>=30&&De<=37?(Ye.fg&=-50331904,Ye.fg|=16777216|De-30):De>=40&&De<=47?(Ye.bg&=-50331904,Ye.bg|=16777216|De-40):De>=90&&De<=97?(Ye.fg&=-50331904,Ye.fg|=16777224|De-90):De>=100&&De<=107?(Ye.bg&=-50331904,Ye.bg|=16777224|De-100):De===0?(Ye.fg=he.DEFAULT_ATTR_DATA.fg,Ye.bg=he.DEFAULT_ATTR_DATA.bg):De===1?Ye.fg|=134217728:De===3?Ye.bg|=67108864:De===4?(Ye.fg|=268435456,this._processUnderline(Re.hasSubParams(dt)?Re.getSubParams(dt)[0]:1,Ye)):De===5?Ye.fg|=536870912:De===7?Ye.fg|=67108864:De===8?Ye.fg|=1073741824:De===2?Ye.bg|=134217728:De===21?this._processUnderline(2,Ye):De===22?(Ye.fg&=-134217729,Ye.bg&=-134217729):De===23?Ye.bg&=-67108865:De===24?Ye.fg&=-268435457:De===25?Ye.fg&=-536870913:De===27?Ye.fg&=-67108865:De===28?Ye.fg&=-1073741825:De===39?(Ye.fg&=-67108864,Ye.fg|=16777215&he.DEFAULT_ATTR_DATA.fg):De===49?(Ye.bg&=-67108864,Ye.bg|=16777215&he.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?dt+=this._extractColor(Re,dt,Ye):De===59?(Ye.extended=Ye.extended.clone(),Ye.extended.underlineColor=-1,Ye.updateExtended()):De===100?(Ye.fg&=-67108864,Ye.fg|=16777215&he.DEFAULT_ATTR_DATA.fg,Ye.bg&=-67108864,Ye.bg|=16777215&he.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",De)},be.prototype.deviceStatus=function(Re){switch(Re.params[0]){case 5:this._coreService.triggerDataEvent(ce.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,et=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(ce.C0.ESC+"["+De+";"+et+"R")}},be.prototype.deviceStatusPrivate=function(Re){switch(Re.params[0]){case 6:var De=this._bufferService.buffer.y+1,et=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(ce.C0.ESC+"[?"+De+";"+et+"R")}},be.prototype.softReset=function(Re){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=he.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},be.prototype.setCursorStyle=function(Re){var De=Re.params[0]||1;switch(De){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var et=De%2==1;this._optionsService.options.cursorBlink=et},be.prototype.setScrollRegion=function(Re){var De,et=Re.params[0]||1;(Re.length<2||(De=Re.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>et&&(this._bufferService.buffer.scrollTop=et-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},be.prototype.windowOptions=function(Re){if($e(Re.params[0],this._optionsService.options.windowOptions)){var De=Re.length>1?Re.params[1]:0;switch(Re.params[0]){case 14:De!==2&&this._onRequestWindowsOptionsReport.fire(Ce.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Ce.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(ce.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:De!==0&&De!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),De!==0&&De!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:De!==0&&De!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),De!==0&&De!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},be.prototype.saveCursor=function(Re){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},be.prototype.restoreCursor=function(Re){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},be.prototype.setTitle=function(Re){this._windowTitle=Re,this._onTitleChange.fire(Re)},be.prototype.setIconName=function(Re){this._iconName=Re},be.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},be.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},be.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},be.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,fe.DEFAULT_CHARSET)},be.prototype.selectCharset=function(Re){Re.length===2?Re[0]!=="/"&&this._charsetService.setgCharset(Fe[Re[0]],fe.CHARSETS[Re[1]]||fe.DEFAULT_CHARSET):this.selectDefaultCharset()},be.prototype.index=function(){this._restrictCursor();var Re=this._bufferService.buffer;this._bufferService.buffer.y++,Re.y===Re.scrollBottom+1?(Re.y--,this._onRequestScroll.fire(this._eraseAttrData())):Re.y>=this._bufferService.rows&&(Re.y=this._bufferService.rows-1),this._restrictCursor()},be.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},be.prototype.reverseIndex=function(){this._restrictCursor();var Re=this._bufferService.buffer;if(Re.y===Re.scrollTop){var De=Re.scrollBottom-Re.scrollTop;Re.lines.shiftElements(Re.ybase+Re.y,De,1),Re.lines.set(Re.ybase+Re.y,Re.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Re.scrollTop,Re.scrollBottom)}else Re.y--,this._restrictCursor()},be.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},be.prototype.reset=function(){this._curAttrData=he.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=he.DEFAULT_ATTR_DATA.clone()},be.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},be.prototype.setgLevel=function(Re){this._charsetService.setgLevel(Re)},be.prototype.screenAlignmentPattern=function(){var Re=new ye.CellData;Re.content=1<<22|69,Re.fg=this._curAttrData.fg,Re.bg=this._curAttrData.bg;var De=this._bufferService.buffer;this._setCursor(0,0);for(var et=0;et<this._bufferService.rows;++et){var Ye=De.ybase+De.y+et,dt=De.lines.get(Ye);dt&&(dt.fill(Re),dt.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},be}(le.Disposable);ee.InputHandler=ze},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DEFAULT_CHARSET=ee.CHARSETS=void 0,ee.CHARSETS={},ee.DEFAULT_CHARSET=ee.CHARSETS.B,ee.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},ee.CHARSETS.A={"#":"\xA3"},ee.CHARSETS.B=void 0,ee.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},ee.CHARSETS.C=ee.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},ee.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},ee.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},ee.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},ee.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},ee.CHARSETS.E=ee.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},ee.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},ee.CHARSETS.H=ee.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},ee.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Params=void 0;var Se=function(){function Le(Ce,ce){if(Ce===void 0&&(Ce=32),ce===void 0&&(ce=32),this.maxLength=Ce,this.maxSubParamsLength=ce,ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Ce),this.length=0,this._subParams=new Int32Array(ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Ce),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Le.fromArray=function(Ce){var ce=new Le;if(!Ce.length)return ce;for(var fe=Ce[0]instanceof Array?1:0;fe<Ce.length;++fe){var ae=Ce[fe];if(ae instanceof Array)for(var le=0;le<ae.length;++le)ce.addSubParam(ae[le]);else ce.addParam(ae)}return ce},Le.prototype.clone=function(){var Ce=new Le(this.maxLength,this.maxSubParamsLength);return Ce.params.set(this.params),Ce.length=this.length,Ce._subParams.set(this._subParams),Ce._subParamsLength=this._subParamsLength,Ce._subParamsIdx.set(this._subParamsIdx),Ce._rejectDigits=this._rejectDigits,Ce._rejectSubDigits=this._rejectSubDigits,Ce._digitIsSub=this._digitIsSub,Ce},Le.prototype.toArray=function(){for(var Ce=[],ce=0;ce<this.length;++ce){Ce.push(this.params[ce]);var fe=this._subParamsIdx[ce]>>8,ae=255&this._subParamsIdx[ce];ae-fe>0&&Ce.push(Array.prototype.slice.call(this._subParams,fe,ae))}return Ce},Le.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Le.prototype.addParam=function(Ce){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Ce>2147483647?2147483647:Ce}},Le.prototype.addSubParam=function(Ce){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Ce>2147483647?2147483647:Ce,this._subParamsIdx[this.length-1]++}},Le.prototype.hasSubParams=function(Ce){return(255&this._subParamsIdx[Ce])-(this._subParamsIdx[Ce]>>8)>0},Le.prototype.getSubParams=function(Ce){var ce=this._subParamsIdx[Ce]>>8,fe=255&this._subParamsIdx[Ce];return fe-ce>0?this._subParams.subarray(ce,fe):null},Le.prototype.getSubParamsAll=function(){for(var Ce={},ce=0;ce<this.length;++ce){var fe=this._subParamsIdx[ce]>>8,ae=255&this._subParamsIdx[ce];ae-fe>0&&(Ce[ce]=this._subParams.slice(fe,ae))}return Ce},Le.prototype.addDigit=function(Ce){var ce;if(!(this._rejectDigits||!(ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var fe=this._digitIsSub?this._subParams:this.params,ae=fe[ce-1];fe[ce-1]=~ae?Math.min(10*ae+Ce,2147483647):Ce}},Le}();ee.Params=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.OscHandler=ee.OscParser=void 0;var Se=te(23),Le=te(8),Ce=function(){function fe(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return fe.prototype.addHandler=function(ae,le){this._handlers[ae]===void 0&&(this._handlers[ae]=[]);var re=this._handlers[ae];return re.push(le),{dispose:function(){var de=re.indexOf(le);de!==-1&&re.splice(de,1)}}},fe.prototype.setHandler=function(ae,le){this._handlers[ae]=[le]},fe.prototype.clearHandler=function(ae){this._handlers[ae]&&delete this._handlers[ae]},fe.prototype.setHandlerFallback=function(ae){this._handlerFb=ae},fe.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},fe.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},fe.prototype._start=function(){var ae=this._handlers[this._id];if(ae)for(var le=ae.length-1;le>=0;le--)ae[le].start();else this._handlerFb(this._id,"START")},fe.prototype._put=function(ae,le,re){var de=this._handlers[this._id];if(de)for(var he=de.length-1;he>=0;he--)de[he].put(ae,le,re);else this._handlerFb(this._id,"PUT",Le.utf32ToString(ae,le,re))},fe.prototype._end=function(ae){var le=this._handlers[this._id];if(le){for(var re=le.length-1;re>=0&&le[re].end(ae)===!1;re--);for(re--;re>=0;re--)le[re].end(!1)}else this._handlerFb(this._id,"END",ae)},fe.prototype.start=function(){this.reset(),this._id=-1,this._state=1},fe.prototype.put=function(ae,le,re){if(this._state!==3){if(this._state===1)for(;le<re;){var de=ae[le++];if(de===59){this._state=2,this._start();break}if(de<48||57<de)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+de-48}this._state===2&&re-le>0&&this._put(ae,le,re)}},fe.prototype.end=function(ae){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(ae)),this._id=-1,this._state=0)},fe}();ee.OscParser=Ce;var ce=function(){function fe(ae){this._handler=ae,this._data="",this._hitLimit=!1}return fe.prototype.start=function(){this._data="",this._hitLimit=!1},fe.prototype.put=function(ae,le,re){this._hitLimit||(this._data+=Le.utf32ToString(ae,le,re),this._data.length>Se.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},fe.prototype.end=function(ae){var le;return this._hitLimit?le=!1:ae&&(le=this._handler(this._data)),this._data="",this._hitLimit=!1,le},fe}();ee.OscHandler=ce},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.PAYLOAD_LIMIT=void 0,ee.PAYLOAD_LIMIT=1e7},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DcsHandler=ee.DcsParser=void 0;var Se=te(8),Le=te(21),Ce=te(23),ce=[],fe=function(){function le(){this._handlers=Object.create(null),this._active=ce,this._ident=0,this._handlerFb=function(){}}return le.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},le.prototype.addHandler=function(re,de){this._handlers[re]===void 0&&(this._handlers[re]=[]);var he=this._handlers[re];return he.push(de),{dispose:function(){var me=he.indexOf(de);me!==-1&&he.splice(me,1)}}},le.prototype.setHandler=function(re,de){this._handlers[re]=[de]},le.prototype.clearHandler=function(re){this._handlers[re]&&delete this._handlers[re]},le.prototype.setHandlerFallback=function(re){this._handlerFb=re},le.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=ce,this._ident=0},le.prototype.hook=function(re,de){if(this.reset(),this._ident=re,this._active=this._handlers[re]||ce,this._active.length)for(var he=this._active.length-1;he>=0;he--)this._active[he].hook(de);else this._handlerFb(this._ident,"HOOK",de)},le.prototype.put=function(re,de,he){if(this._active.length)for(var me=this._active.length-1;me>=0;me--)this._active[me].put(re,de,he);else this._handlerFb(this._ident,"PUT",Se.utf32ToString(re,de,he))},le.prototype.unhook=function(re){if(this._active.length){for(var de=this._active.length-1;de>=0&&this._active[de].unhook(re)===!1;de--);for(de--;de>=0;de--)this._active[de].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",re);this._active=ce,this._ident=0},le}();ee.DcsParser=fe;var ae=function(){function le(re){this._handler=re,this._data="",this._hitLimit=!1}return le.prototype.hook=function(re){this._params=re.clone(),this._data="",this._hitLimit=!1},le.prototype.put=function(re,de,he){this._hitLimit||(this._data+=Se.utf32ToString(re,de,he),this._data.length>Ce.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},le.prototype.unhook=function(re){var de;return this._hitLimit?de=!1:re&&(de=this._handler(this._data,this._params||new Le.Params)),this._params=void 0,this._data="",this._hitLimit=!1,de},le}();ee.DcsHandler=ae},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.removeTerminalFromCache=ee.acquireCharAtlas=void 0;var Se=te(26),Le=te(43),Ce=[];ee.acquireCharAtlas=function(ce,fe,ae,le,re){for(var de=Se.generateConfig(le,re,ce,ae),he=0;he<Ce.length;he++){var me=(se=Ce[he]).ownedBy.indexOf(fe);if(me>=0){if(Se.configEquals(se.config,de))return se.atlas;se.ownedBy.length===1?(se.atlas.dispose(),Ce.splice(he,1)):se.ownedBy.splice(me,1);break}}for(he=0;he<Ce.length;he++){var se=Ce[he];if(Se.configEquals(se.config,de))return se.ownedBy.push(fe),se.atlas}var ye={atlas:new Le.DynamicCharAtlas(document,de),config:de,ownedBy:[fe]};return Ce.push(ye),ye.atlas},ee.removeTerminalFromCache=function(ce){for(var fe=0;fe<Ce.length;fe++){var ae=Ce[fe].ownedBy.indexOf(ce);if(ae!==-1){Ce[fe].ownedBy.length===1?(Ce[fe].atlas.dispose(),Ce.splice(fe,1)):Ce[fe].ownedBy.splice(ae,1);break}}}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.is256Color=ee.configEquals=ee.generateConfig=void 0;var Se=te(3);ee.generateConfig=function(Le,Ce,ce,fe){var ae={foreground:fe.foreground,background:fe.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:fe.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Le,scaledCharHeight:Ce,fontFamily:ce.fontFamily,fontSize:ce.fontSize,fontWeight:ce.fontWeight,fontWeightBold:ce.fontWeightBold,allowTransparency:ce.allowTransparency,colors:ae}},ee.configEquals=function(Le,Ce){for(var ce=0;ce<Le.colors.ansi.length;ce++)if(Le.colors.ansi[ce].rgba!==Ce.colors.ansi[ce].rgba)return!1;return Le.devicePixelRatio===Ce.devicePixelRatio&&Le.fontFamily===Ce.fontFamily&&Le.fontSize===Ce.fontSize&&Le.fontWeight===Ce.fontWeight&&Le.fontWeightBold===Ce.fontWeightBold&&Le.allowTransparency===Ce.allowTransparency&&Le.scaledCharWidth===Ce.scaledCharWidth&&Le.scaledCharHeight===Ce.scaledCharHeight&&Le.colors.foreground===Ce.colors.foreground&&Le.colors.background===Ce.colors.background},ee.is256Color=function(Le){return Le<Se.DEFAULT_COLOR}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ColorManager=ee.DEFAULT_ANSI_COLORS=void 0;var Se=te(10),Le=te(45),Ce=Se.css.toColor("#ffffff"),ce=Se.css.toColor("#000000"),fe=Se.css.toColor("#ffffff"),ae=Se.css.toColor("#000000"),le={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};ee.DEFAULT_ANSI_COLORS=function(){for(var de=[Se.css.toColor("#2e3436"),Se.css.toColor("#cc0000"),Se.css.toColor("#4e9a06"),Se.css.toColor("#c4a000"),Se.css.toColor("#3465a4"),Se.css.toColor("#75507b"),Se.css.toColor("#06989a"),Se.css.toColor("#d3d7cf"),Se.css.toColor("#555753"),Se.css.toColor("#ef2929"),Se.css.toColor("#8ae234"),Se.css.toColor("#fce94f"),Se.css.toColor("#729fcf"),Se.css.toColor("#ad7fa8"),Se.css.toColor("#34e2e2"),Se.css.toColor("#eeeeec")],he=[0,95,135,175,215,255],me=0;me<216;me++){var se=he[me/36%6|0],ye=he[me/6%6|0],_e=he[me%6];de.push({css:Se.channels.toCss(se,ye,_e),rgba:Se.channels.toRgba(se,ye,_e)})}for(me=0;me<24;me++){var Me=8+10*me;de.push({css:Se.channels.toCss(Me,Me,Me),rgba:Se.channels.toRgba(Me,Me,Me)})}return de}();var re=function(){function de(he,me){this.allowTransparency=me;var se=he.createElement("canvas");se.width=1,se.height=1;var ye=se.getContext("2d");if(!ye)throw new Error("Could not get rendering context");this._ctx=ye,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Le.ColorContrastCache,this.colors={foreground:Ce,background:ce,cursor:fe,cursorAccent:ae,selectionTransparent:le,selectionOpaque:Se.color.blend(ce,le),ansi:ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return de.prototype.onOptionsChange=function(he){he==="minimumContrastRatio"&&this._contrastCache.clear()},de.prototype.setTheme=function(he){he===void 0&&(he={}),this.colors.foreground=this._parseColor(he.foreground,Ce),this.colors.background=this._parseColor(he.background,ce),this.colors.cursor=this._parseColor(he.cursor,fe,!0),this.colors.cursorAccent=this._parseColor(he.cursorAccent,ae,!0),this.colors.selectionTransparent=this._parseColor(he.selection,le,!0),this.colors.selectionOpaque=Se.color.blend(this.colors.background,this.colors.selectionTransparent),Se.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=Se.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(he.black,ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(he.red,ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(he.green,ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(he.yellow,ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(he.blue,ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(he.magenta,ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(he.cyan,ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(he.white,ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(he.brightBlack,ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(he.brightRed,ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(he.brightGreen,ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(he.brightYellow,ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(he.brightBlue,ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(he.brightMagenta,ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(he.brightCyan,ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(he.brightWhite,ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},de.prototype._parseColor=function(he,me,se){if(se===void 0&&(se=this.allowTransparency),he===void 0)return me;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=he,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+he+" is invalid using fallback "+me.css),me;this._ctx.fillRect(0,0,1,1);var ye=this._ctx.getImageData(0,0,1,1).data;if(ye[3]!==255){if(!se)return console.warn("Color: "+he+" is using transparency, but allowTransparency is false. Using fallback "+me.css+"."),me;var _e=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(ze){return Number(ze)}),Me=_e[0],ve=_e[1],Fe=_e[2],$e=_e[3],Te=Math.round(255*$e);return{rgba:Se.channels.toRgba(Me,ve,Fe,Te),css:he}}return{css:this._ctx.fillStyle,rgba:Se.channels.toRgba(ye[0],ye[1],ye[2],ye[3])}},de}();ee.ColorManager=re},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.throwIfFalsy=void 0,ee.throwIfFalsy=function(Se){if(!Se)throw new Error("value must not be falsy");return Se}},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(re,de){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,me){he.__proto__=me}||function(he,me){for(var se in me)me.hasOwnProperty(se)&&(he[se]=me[se])})(re,de)},function(re,de){function he(){this.constructor=re}Se(re,de),re.prototype=de===null?Object.create(de):(he.prototype=de.prototype,new he)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharacterJoinerRegistry=ee.JoinedCellData=void 0;var Ce=te(6),ce=te(3),fe=te(4),ae=function(re){function de(he,me,se){var ye=re.call(this)||this;return ye.content=0,ye.combinedData="",ye.fg=he.fg,ye.bg=he.bg,ye.combinedData=me,ye._width=se,ye}return Le(de,re),de.prototype.isCombined=function(){return 2097152},de.prototype.getWidth=function(){return this._width},de.prototype.getChars=function(){return this.combinedData},de.prototype.getCode=function(){return 2097151},de.prototype.setFromCharData=function(he){throw new Error("not implemented")},de.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},de}(Ce.AttributeData);ee.JoinedCellData=ae;var le=function(){function re(de){this._bufferService=de,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new fe.CellData}return re.prototype.registerCharacterJoiner=function(de){var he={id:this._nextCharacterJoinerId++,handler:de};return this._characterJoiners.push(he),he.id},re.prototype.deregisterCharacterJoiner=function(de){for(var he=0;he<this._characterJoiners.length;he++)if(this._characterJoiners[he].id===de)return this._characterJoiners.splice(he,1),!0;return!1},re.prototype.getJoinedCharacters=function(de){if(this._characterJoiners.length===0)return[];var he=this._bufferService.buffer.lines.get(de);if(!he||he.length===0)return[];for(var me=[],se=he.translateToString(!0),ye=0,_e=0,Me=0,ve=he.getFg(0),Fe=he.getBg(0),$e=0;$e<he.getTrimmedLength();$e++)if(he.loadCell($e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==ve||this._workCell.bg!==Fe){if($e-ye>1)for(var Te=this._getJoinedRanges(se,Me,_e,he,ye),ze=0;ze<Te.length;ze++)me.push(Te[ze]);ye=$e,Me=_e,ve=this._workCell.fg,Fe=this._workCell.bg}_e+=this._workCell.getChars().length||ce.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ye>1)for(Te=this._getJoinedRanges(se,Me,_e,he,ye),ze=0;ze<Te.length;ze++)me.push(Te[ze]);return me},re.prototype._getJoinedRanges=function(de,he,me,se,ye){for(var _e=de.substring(he,me),Me=this._characterJoiners[0].handler(_e),ve=1;ve<this._characterJoiners.length;ve++)for(var Fe=this._characterJoiners[ve].handler(_e),$e=0;$e<Fe.length;$e++)re._mergeRanges(Me,Fe[$e]);return this._stringRangesToCellRanges(Me,se,ye),Me},re.prototype._stringRangesToCellRanges=function(de,he,me){var se=0,ye=!1,_e=0,Me=de[se];if(Me){for(var ve=me;ve<this._bufferService.cols;ve++){var Fe=he.getWidth(ve),$e=he.getString(ve).length||ce.WHITESPACE_CELL_CHAR.length;if(Fe!==0){if(!ye&&Me[0]<=_e&&(Me[0]=ve,ye=!0),Me[1]<=_e){if(Me[1]=ve,!(Me=de[++se]))break;Me[0]<=_e?(Me[0]=ve,ye=!0):ye=!1}_e+=$e}}Me&&(Me[1]=this._bufferService.cols)}},re._mergeRanges=function(de,he){for(var me=!1,se=0;se<de.length;se++){var ye=de[se];if(me){if(he[1]<=ye[0])return de[se-1][1]=he[1],de;if(he[1]<=ye[1])return de[se-1][1]=Math.max(he[1],ye[1]),de.splice(se,1),de;de.splice(se,1),se--}else{if(he[1]<=ye[0])return de.splice(se,0,he),de;if(he[1]<=ye[1])return ye[0]=Math.min(he[0],ye[0]),de;he[0]<ye[1]&&(ye[0]=Math.min(he[0],ye[0]),me=!0)}}return me?de[de.length-1][1]=he[1]:de.push(he),de},re}();ee.CharacterJoinerRegistry=le},function(St,ee,te){"use strict";function Se(Le,Ce){var ce=Ce.getBoundingClientRect();return[Le.clientX-ce.left,Le.clientY-ce.top]}Object.defineProperty(ee,"__esModule",{value:!0}),ee.getRawByteCoords=ee.getCoords=ee.getCoordsRelativeToElement=void 0,ee.getCoordsRelativeToElement=Se,ee.getCoords=function(Le,Ce,ce,fe,ae,le,re,de){if(ae){var he=Se(Le,Ce);if(he)return he[0]=Math.ceil((he[0]+(de?le/2:0))/le),he[1]=Math.ceil(he[1]/re),he[0]=Math.min(Math.max(he[0],1),ce+(de?1:0)),he[1]=Math.min(Math.max(he[1],1),fe),he}},ee.getRawByteCoords=function(Le){if(Le)return{x:Le[0]+32,y:Le[1]+32}}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.RenderDebouncer=void 0;var Se=function(){function Le(Ce){this._renderCallback=Ce}return Le.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Le.prototype.refresh=function(Ce,ce,fe){var ae=this;this._rowCount=fe,Ce=Ce!==void 0?Ce:0,ce=ce!==void 0?ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Ce):Ce,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,ce):ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return ae._innerRefresh()}))},Le.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Ce=Math.max(this._rowStart,0),ce=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Ce,ce)}},Le}();ee.RenderDebouncer=Se},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(ce,fe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,le){ae.__proto__=le}||function(ae,le){for(var re in le)le.hasOwnProperty(re)&&(ae[re]=le[re])})(ce,fe)},function(ce,fe){function ae(){this.constructor=ce}Se(ce,fe),ce.prototype=fe===null?Object.create(fe):(ae.prototype=fe.prototype,new ae)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.ScreenDprMonitor=void 0;var Ce=function(ce){function fe(){var ae=ce!==null&&ce.apply(this,arguments)||this;return ae._currentDevicePixelRatio=window.devicePixelRatio,ae}return Le(fe,ce),fe.prototype.setListener=function(ae){var le=this;this._listener&&this.clearListener(),this._listener=ae,this._outerListener=function(){le._listener&&(le._listener(window.devicePixelRatio,le._currentDevicePixelRatio),le._updateDpr())},this._updateDpr()},fe.prototype.dispose=function(){ce.prototype.dispose.call(this),this.clearListener()},fe.prototype._updateDpr=function(){var ae;this._outerListener&&((ae=this._resolutionMediaMatchList)===null||ae===void 0||ae.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},fe.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},fe}(te(2).Disposable);ee.ScreenDprMonitor=Ce},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.clone=void 0,ee.clone=function Se(Le,Ce){if(Ce===void 0&&(Ce=5),typeof Le!="object")return Le;var ce=Array.isArray(Le)?[]:{};for(var fe in Le)ce[fe]=Ce<=1?Le[fe]:Le[fe]?Se(Le[fe],Ce-1):Le[fe];return ce}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;var Se=te(4),Le=te(35),Ce=te(18),ce=te(0),fe=te(83),ae=function(){function se(ye){this._core=new Le.Terminal(ye),this._addonManager=new fe.AddonManager}return se.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(se.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new he(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"unicode",{get:function(){return this._checkProposedApi(),new me(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"buffer",{get:function(){return this._checkProposedApi(),new re(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),se.prototype.blur=function(){this._core.blur()},se.prototype.focus=function(){this._core.focus()},se.prototype.resize=function(ye,_e){this._verifyIntegers(ye,_e),this._core.resize(ye,_e)},se.prototype.open=function(ye){this._core.open(ye)},se.prototype.attachCustomKeyEventHandler=function(ye){this._core.attachCustomKeyEventHandler(ye)},se.prototype.registerLinkMatcher=function(ye,_e,Me){return this._checkProposedApi(),this._core.registerLinkMatcher(ye,_e,Me)},se.prototype.deregisterLinkMatcher=function(ye){this._checkProposedApi(),this._core.deregisterLinkMatcher(ye)},se.prototype.registerLinkProvider=function(ye){return this._checkProposedApi(),this._core.registerLinkProvider(ye)},se.prototype.registerCharacterJoiner=function(ye){return this._checkProposedApi(),this._core.registerCharacterJoiner(ye)},se.prototype.deregisterCharacterJoiner=function(ye){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ye)},se.prototype.registerMarker=function(ye){return this._checkProposedApi(),this._verifyIntegers(ye),this._core.addMarker(ye)},se.prototype.addMarker=function(ye){return this.registerMarker(ye)},se.prototype.hasSelection=function(){return this._core.hasSelection()},se.prototype.select=function(ye,_e,Me){this._verifyIntegers(ye,_e,Me),this._core.select(ye,_e,Me)},se.prototype.getSelection=function(){return this._core.getSelection()},se.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},se.prototype.clearSelection=function(){this._core.clearSelection()},se.prototype.selectAll=function(){this._core.selectAll()},se.prototype.selectLines=function(ye,_e){this._verifyIntegers(ye,_e),this._core.selectLines(ye,_e)},se.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},se.prototype.scrollLines=function(ye){this._verifyIntegers(ye),this._core.scrollLines(ye)},se.prototype.scrollPages=function(ye){this._verifyIntegers(ye),this._core.scrollPages(ye)},se.prototype.scrollToTop=function(){this._core.scrollToTop()},se.prototype.scrollToBottom=function(){this._core.scrollToBottom()},se.prototype.scrollToLine=function(ye){this._verifyIntegers(ye),this._core.scrollToLine(ye)},se.prototype.clear=function(){this._core.clear()},se.prototype.write=function(ye,_e){this._core.write(ye,_e)},se.prototype.writeUtf8=function(ye,_e){this._core.write(ye,_e)},se.prototype.writeln=function(ye,_e){this._core.write(ye),this._core.write(`\r
|
|
|
`,_e)},se.prototype.paste=function(ye){this._core.paste(ye)},se.prototype.getOption=function(ye){return this._core.optionsService.getOption(ye)},se.prototype.setOption=function(ye,_e){this._core.optionsService.setOption(ye,_e)},se.prototype.refresh=function(ye,_e){this._verifyIntegers(ye,_e),this._core.refresh(ye,_e)},se.prototype.reset=function(){this._core.reset()},se.prototype.loadAddon=function(ye){return this._addonManager.loadAddon(this,ye)},Object.defineProperty(se,"strings",{get:function(){return Ce},enumerable:!1,configurable:!0}),se.prototype._verifyIntegers=function(){for(var ye=[],_e=0;_e<arguments.length;_e++)ye[_e]=arguments[_e];for(var Me=0,ve=ye;Me<ve.length;Me++){var Fe=ve[Me];if(Fe===1/0||isNaN(Fe)||Fe%1!=0)throw new Error("This API only accepts integers")}},se}();ee.Terminal=ae;var le=function(){function se(ye,_e){this._buffer=ye,this.type=_e}return se.prototype.init=function(ye){return this._buffer=ye,this},Object.defineProperty(se.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),se.prototype.getLine=function(ye){var _e=this._buffer.lines.get(ye);if(_e)return new de(_e)},se.prototype.getNullCell=function(){return new Se.CellData},se}(),re=function(){function se(ye){var _e=this;this._buffers=ye,this._onBufferChange=new ce.EventEmitter,this._normal=new le(this._buffers.normal,"normal"),this._alternate=new le(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return _e._onBufferChange.fire(_e.active)})}return Object.defineProperty(se.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),se}(),de=function(){function se(ye){this._line=ye}return Object.defineProperty(se.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),se.prototype.getCell=function(ye,_e){if(!(ye<0||ye>=this._line.length))return _e?(this._line.loadCell(ye,_e),_e):this._line.loadCell(ye,new Se.CellData)},se.prototype.translateToString=function(ye,_e,Me){return this._line.translateToString(ye,_e,Me)},se}(),he=function(){function se(ye){this._core=ye}return se.prototype.registerCsiHandler=function(ye,_e){return this._core.addCsiHandler(ye,function(Me){return _e(Me.toArray())})},se.prototype.addCsiHandler=function(ye,_e){return this.registerCsiHandler(ye,_e)},se.prototype.registerDcsHandler=function(ye,_e){return this._core.addDcsHandler(ye,function(Me,ve){return _e(Me,ve.toArray())})},se.prototype.addDcsHandler=function(ye,_e){return this.registerDcsHandler(ye,_e)},se.prototype.registerEscHandler=function(ye,_e){return this._core.addEscHandler(ye,_e)},se.prototype.addEscHandler=function(ye,_e){return this.registerEscHandler(ye,_e)},se.prototype.registerOscHandler=function(ye,_e){return this._core.addOscHandler(ye,_e)},se.prototype.addOscHandler=function(ye,_e){return this.registerOscHandler(ye,_e)},se}(),me=function(){function se(ye){this._core=ye}return se.prototype.register=function(ye){this._core.unicodeService.register(ye)},Object.defineProperty(se.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ye){this._core.unicodeService.activeVersion=ye},enumerable:!1,configurable:!0}),se}()},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Kt,Ze){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(tt,ft){tt.__proto__=ft}||function(tt,ft){for(var Ut in ft)ft.hasOwnProperty(Ut)&&(tt[Ut]=ft[Ut])})(Kt,Ze)},function(Kt,Ze){function tt(){this.constructor=Kt}Se(Kt,Ze),Kt.prototype=Ze===null?Object.create(Ze):(tt.prototype=Ze.prototype,new tt)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.Terminal=void 0;var Ce=te(36),ce=te(37),fe=te(38),ae=te(12),le=te(19),re=te(40),de=te(50),he=te(51),me=te(11),se=te(7),ye=te(18),_e=te(54),Me=te(55),ve=te(56),Fe=te(57),$e=te(59),Te=te(0),ze=te(16),Ee=te(27),be=te(60),Re=te(5),De=te(61),et=te(62),Ye=te(63),dt=te(64),Ke=te(65),zt=typeof window!="undefined"?window.document:null,pt=function(Kt){function Ze(tt){tt===void 0&&(tt={});var ft=Kt.call(this,tt)||this;return ft.browser=me,ft._keyDownHandled=!1,ft._onCursorMove=new Te.EventEmitter,ft._onKey=new Te.EventEmitter,ft._onRender=new Te.EventEmitter,ft._onSelectionChange=new Te.EventEmitter,ft._onTitleChange=new Te.EventEmitter,ft._onFocus=new Te.EventEmitter,ft._onBlur=new Te.EventEmitter,ft._onA11yCharEmitter=new Te.EventEmitter,ft._onA11yTabEmitter=new Te.EventEmitter,ft._setup(),ft.linkifier=ft._instantiationService.createInstance(de.Linkifier),ft.linkifier2=ft.register(ft._instantiationService.createInstance(Ye.Linkifier2)),ft.register(ft._inputHandler.onRequestBell(function(){return ft.bell()})),ft.register(ft._inputHandler.onRequestRefreshRows(function(Ut,nt){return ft.refresh(Ut,nt)})),ft.register(ft._inputHandler.onRequestReset(function(){return ft.reset()})),ft.register(ft._inputHandler.onRequestScroll(function(Ut,nt){return ft.scroll(Ut,nt||void 0)})),ft.register(ft._inputHandler.onRequestWindowsOptionsReport(function(Ut){return ft._reportWindowsOptions(Ut)})),ft.register(Te.forwardEvent(ft._inputHandler.onCursorMove,ft._onCursorMove)),ft.register(Te.forwardEvent(ft._inputHandler.onTitleChange,ft._onTitleChange)),ft.register(Te.forwardEvent(ft._inputHandler.onA11yChar,ft._onA11yCharEmitter)),ft.register(Te.forwardEvent(ft._inputHandler.onA11yTab,ft._onA11yTabEmitter)),ft.register(ft._bufferService.onResize(function(Ut){return ft._afterResize(Ut.cols,Ut.rows)})),ft}return Le(Ze,Kt),Object.defineProperty(Ze.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),Ze.prototype.dispose=function(){var tt,ft,Ut;this._isDisposed||(Kt.prototype.dispose.call(this),(tt=this._renderService)===null||tt===void 0||tt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Ut=(ft=this.element)===null||ft===void 0?void 0:ft.parentNode)===null||Ut===void 0||Ut.removeChild(this.element))},Ze.prototype._setup=function(){Kt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(Ze.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),Ze.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},Ze.prototype._updateOptions=function(tt){var ft,Ut,nt,Ge;switch(Kt.prototype._updateOptions.call(this,tt),tt){case"fontFamily":case"fontSize":(ft=this._renderService)===null||ft===void 0||ft.clear(),(Ut=this._charSizeService)===null||Ut===void 0||Ut.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(nt=this.viewport)===null||nt===void 0||nt.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)):((Ge=this._accessibilityManager)===null||Ge===void 0||Ge.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},Ze.prototype._onTextAreaFocus=function(tt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ae.C0.ESC+"[I"),this.updateCursorStyle(tt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},Ze.prototype.blur=function(){var tt;return(tt=this.textarea)===null||tt===void 0?void 0:tt.blur()},Ze.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ae.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},Ze.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var tt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ft=this._bufferService.buffer.y*tt,Ut=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Ut+"px",this.textarea.style.top=ft+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=tt+"px",this.textarea.style.lineHeight=tt+"px",this.textarea.style.zIndex="-5"}},Ze.prototype._initGlobal=function(){var tt=this;this._bindKeys(),this.register(se.addDisposableDomListener(this.element,"copy",function(Ut){tt.hasSelection()&&fe.copyHandler(Ut,tt._selectionService)}));var ft=function(Ut){return fe.handlePasteEvent(Ut,tt.textarea,tt._coreService)};this.register(se.addDisposableDomListener(this.textarea,"paste",ft)),this.register(se.addDisposableDomListener(this.element,"paste",ft)),me.isFirefox?this.register(se.addDisposableDomListener(this.element,"mousedown",function(Ut){Ut.button===2&&fe.rightClickHandler(Ut,tt.textarea,tt.screenElement,tt._selectionService,tt.options.rightClickSelectsWord)})):this.register(se.addDisposableDomListener(this.element,"contextmenu",function(Ut){fe.rightClickHandler(Ut,tt.textarea,tt.screenElement,tt._selectionService,tt.options.rightClickSelectsWord)})),me.isLinux&&this.register(se.addDisposableDomListener(this.element,"auxclick",function(Ut){Ut.button===1&&fe.moveTextAreaUnderMouseCursor(Ut,tt.textarea,tt.screenElement)}))},Ze.prototype._bindKeys=function(){var tt=this;this.register(se.addDisposableDomListener(this.textarea,"keyup",function(ft){return tt._keyUp(ft)},!0)),this.register(se.addDisposableDomListener(this.textarea,"keydown",function(ft){return tt._keyDown(ft)},!0)),this.register(se.addDisposableDomListener(this.textarea,"keypress",function(ft){return tt._keyPress(ft)},!0)),this.register(se.addDisposableDomListener(this.textarea,"compositionstart",function(){return tt._compositionHelper.compositionstart()})),this.register(se.addDisposableDomListener(this.textarea,"compositionupdate",function(ft){return tt._compositionHelper.compositionupdate(ft)})),this.register(se.addDisposableDomListener(this.textarea,"compositionend",function(){return tt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return tt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ft){return tt._queueLinkification(ft.start,ft.end)}))},Ze.prototype.open=function(tt){var ft=this;if(!tt)throw new Error("Terminal requires a parent element.");zt.body.contains(tt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=tt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),tt.appendChild(this.element);var Ut=zt.createDocumentFragment();this._viewportElement=zt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Ut.appendChild(this._viewportElement),this._viewportScrollArea=zt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=zt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=zt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Ut.appendChild(this.screenElement),this.textarea=zt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ye.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(se.addDisposableDomListener(this.textarea,"focus",function(jt){return ft._onTextAreaFocus(jt)})),this.register(se.addDisposableDomListener(this.textarea,"blur",function(){return ft._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var nt=this._instantiationService.createInstance(dt.CoreBrowserService,this.textarea);this._instantiationService.setService(Re.ICoreBrowserService,nt),this._charSizeService=this._instantiationService.createInstance(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Re.ICharSizeService,this._charSizeService),this._compositionView=zt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Ce.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Ut),this._theme=this.options.theme||this._theme,this._colorManager=new Ee.ColorManager(zt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(jt){return ft._colorManager.onOptionsChange(jt)})),this._colorManager.setTheme(this._theme);var Ge=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(be.RenderService,Ge,this.rows,this.screenElement)),this._instantiationService.setService(Re.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(jt){return ft._onRender.fire(jt)})),this.onResize(function(jt){return ft._renderService.resize(jt.cols,jt.rows)}),this._soundService=this._instantiationService.createInstance(_e.SoundService),this._instantiationService.setService(Re.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(et.MouseService),this._instantiationService.setService(Re.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(ce.Viewport,function(jt,yn){return ft.scrollLines(jt,yn)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ft.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ft._renderService.onCursorMove(),ft._syncTextArea()})),this.register(this.onResize(function(){return ft._renderService.onResize(ft.cols,ft.rows)})),this.register(this.onBlur(function(){return ft._renderService.onBlur()})),this.register(this.onFocus(function(){return ft._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ft.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(he.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Re.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(jt){return ft.scrollLines(jt.amount,jt.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ft._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(jt){return ft._renderService.onSelectionChanged(jt.start,jt.end,jt.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(jt){ft.textarea.value=jt,ft.textarea.focus(),ft.textarea.select()})),this.register(this.onScroll(function(){ft.viewport.syncScrollArea(),ft._selectionService.refresh()})),this.register(se.addDisposableDomListener(this._viewportElement,"scroll",function(){return ft._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(Me.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ft._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(se.addDisposableDomListener(this.element,"mousedown",function(jt){return ft._selectionService.onMouseDown(jt)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},Ze.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(re.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(Fe.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},Ze.prototype._setTheme=function(tt){var ft,Ut,nt;this._theme=tt,(ft=this._colorManager)===null||ft===void 0||ft.setTheme(tt),(Ut=this._renderService)===null||Ut===void 0||Ut.setColors(this._colorManager.colors),(nt=this.viewport)===null||nt===void 0||nt.onThemeChange(this._colorManager.colors)},Ze.prototype.bindMouse=function(){var tt=this,ft=this,Ut=this.element;function nt(Lt){var Jt,kn,In=ft._mouseService.getRawByteCoords(Lt,ft.screenElement,ft.cols,ft.rows);if(!In)return!1;switch(Lt.overrideType||Lt.type){case"mousemove":kn=32,Lt.buttons===void 0?(Jt=3,Lt.button!==void 0&&(Jt=Lt.button<3?Lt.button:3)):Jt=1&Lt.buttons?0:4&Lt.buttons?1:2&Lt.buttons?2:3;break;case"mouseup":kn=0,Jt=Lt.button<3?Lt.button:3;break;case"mousedown":kn=1,Jt=Lt.button<3?Lt.button:3;break;case"wheel":Lt.deltaY!==0&&(kn=Lt.deltaY<0?0:1),Jt=4;break;default:return!1}return!(kn===void 0||Jt===void 0||Jt>4)&&ft._coreMouseService.triggerMouseEvent({col:In.x-33,row:In.y-33,button:Jt,action:kn,ctrl:Lt.ctrlKey,alt:Lt.altKey,shift:Lt.shiftKey})}var Ge={mouseup:null,wheel:null,mousedrag:null,mousemove:null},jt=function(Lt){return nt(Lt),Lt.buttons||(tt._document.removeEventListener("mouseup",Ge.mouseup),Ge.mousedrag&&tt._document.removeEventListener("mousemove",Ge.mousedrag)),tt.cancel(Lt)},yn=function(Lt){return nt(Lt),Lt.preventDefault(),tt.cancel(Lt)},ln=function(Lt){Lt.buttons&&nt(Lt)},Tt=function(Lt){Lt.buttons||nt(Lt)};this.register(this._coreMouseService.onProtocolChange(function(Lt){Lt?(tt.optionsService.options.logLevel==="debug"&&tt._logService.debug("Binding to mouse events:",tt._coreMouseService.explainEvents(Lt)),tt.element.classList.add("enable-mouse-events"),tt._selectionService.disable()):(tt._logService.debug("Unbinding from mouse events."),tt.element.classList.remove("enable-mouse-events"),tt._selectionService.enable()),8&Lt?Ge.mousemove||(Ut.addEventListener("mousemove",Tt),Ge.mousemove=Tt):(Ut.removeEventListener("mousemove",Ge.mousemove),Ge.mousemove=null),16&Lt?Ge.wheel||(Ut.addEventListener("wheel",yn,{passive:!1}),Ge.wheel=yn):(Ut.removeEventListener("wheel",Ge.wheel),Ge.wheel=null),2&Lt?Ge.mouseup||(Ge.mouseup=jt):(tt._document.removeEventListener("mouseup",Ge.mouseup),Ge.mouseup=null),4&Lt?Ge.mousedrag||(Ge.mousedrag=ln):(tt._document.removeEventListener("mousemove",Ge.mousedrag),Ge.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(se.addDisposableDomListener(Ut,"mousedown",function(Lt){if(Lt.preventDefault(),tt.focus(),tt._coreMouseService.areMouseEventsActive&&!tt._selectionService.shouldForceSelection(Lt))return nt(Lt),Ge.mouseup&&tt._document.addEventListener("mouseup",Ge.mouseup),Ge.mousedrag&&tt._document.addEventListener("mousemove",Ge.mousedrag),tt.cancel(Lt)})),this.register(se.addDisposableDomListener(Ut,"wheel",function(Lt){if(!Ge.wheel){if(!tt.buffer.hasScrollback){var Jt=tt.viewport.getLinesScrolled(Lt);if(Jt===0)return;for(var kn=ae.C0.ESC+(tt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Lt.deltaY<0?"A":"B"),In="",Qt=0;Qt<Math.abs(Jt);Qt++)In+=kn;tt._coreService.triggerDataEvent(In,!0)}}},{passive:!0})),this.register(se.addDisposableDomListener(Ut,"wheel",function(Lt){if(!Ge.wheel)return tt.viewport.onWheel(Lt)?void 0:tt.cancel(Lt)},{passive:!1})),this.register(se.addDisposableDomListener(Ut,"touchstart",function(Lt){if(!tt._coreMouseService.areMouseEventsActive)return tt.viewport.onTouchStart(Lt),tt.cancel(Lt)},{passive:!0})),this.register(se.addDisposableDomListener(Ut,"touchmove",function(Lt){if(!tt._coreMouseService.areMouseEventsActive)return tt.viewport.onTouchMove(Lt)?void 0:tt.cancel(Lt)},{passive:!1}))},Ze.prototype.refresh=function(tt,ft){var Ut;(Ut=this._renderService)===null||Ut===void 0||Ut.refreshRows(tt,ft)},Ze.prototype._queueLinkification=function(tt,ft){var Ut;(Ut=this.linkifier)===null||Ut===void 0||Ut.linkifyRows(tt,ft)},Ze.prototype.updateCursorStyle=function(tt){this._selectionService&&this._selectionService.shouldColumnSelect(tt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},Ze.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},Ze.prototype.scrollLines=function(tt,ft){Kt.prototype.scrollLines.call(this,tt,ft),this.refresh(0,this.rows-1)},Ze.prototype.paste=function(tt){fe.paste(tt,this.textarea,this._coreService)},Ze.prototype.attachCustomKeyEventHandler=function(tt){this._customKeyEventHandler=tt},Ze.prototype.registerLinkMatcher=function(tt,ft,Ut){var nt=this.linkifier.registerLinkMatcher(tt,ft,Ut);return this.refresh(0,this.rows-1),nt},Ze.prototype.deregisterLinkMatcher=function(tt){this.linkifier.deregisterLinkMatcher(tt)&&this.refresh(0,this.rows-1)},Ze.prototype.registerLinkProvider=function(tt){return this.linkifier2.registerLinkProvider(tt)},Ze.prototype.registerCharacterJoiner=function(tt){var ft=this._renderService.registerCharacterJoiner(tt);return this.refresh(0,this.rows-1),ft},Ze.prototype.deregisterCharacterJoiner=function(tt){this._renderService.deregisterCharacterJoiner(tt)&&this.refresh(0,this.rows-1)},Object.defineProperty(Ze.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),Ze.prototype.addMarker=function(tt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+tt)},Ze.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},Ze.prototype.select=function(tt,ft,Ut){this._selectionService.setSelection(tt,ft,Ut)},Ze.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},Ze.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},Ze.prototype.clearSelection=function(){var tt;(tt=this._selectionService)===null||tt===void 0||tt.clearSelection()},Ze.prototype.selectAll=function(){var tt;(tt=this._selectionService)===null||tt===void 0||tt.selectAll()},Ze.prototype.selectLines=function(tt,ft){var Ut;(Ut=this._selectionService)===null||Ut===void 0||Ut.selectLines(tt,ft)},Ze.prototype._keyDown=function(tt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(tt)===!1)return!1;if(!this._compositionHelper.keydown(tt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ft=$e.evaluateKeyboardEvent(tt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(tt),ft.type===3||ft.type===2){var Ut=this.rows-1;return this.scrollLines(ft.type===2?-Ut:Ut),this.cancel(tt,!0)}return ft.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,tt)||(ft.cancel&&this.cancel(tt,!0),!ft.key||(ft.key!==ae.C0.ETX&&ft.key!==ae.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ft.key,domEvent:tt}),this._showCursor(),this._coreService.triggerDataEvent(ft.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(tt,!0)))},Ze.prototype._isThirdLevelShift=function(tt,ft){var Ut=tt.isMac&&!this.options.macOptionIsMeta&&ft.altKey&&!ft.ctrlKey&&!ft.metaKey||tt.isWindows&&ft.altKey&&ft.ctrlKey&&!ft.metaKey;return ft.type==="keypress"?Ut:Ut&&(!ft.keyCode||ft.keyCode>47)},Ze.prototype._keyUp=function(tt){this._customKeyEventHandler&&this._customKeyEventHandler(tt)===!1||(function(ft){return ft.keyCode===16||ft.keyCode===17||ft.keyCode===18}(tt)||this.focus(),this.updateCursorStyle(tt))},Ze.prototype._keyPress=function(tt){var ft;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(tt)===!1)return!1;if(this.cancel(tt),tt.charCode)ft=tt.charCode;else if(tt.which===null||tt.which===void 0)ft=tt.keyCode;else{if(tt.which===0||tt.charCode===0)return!1;ft=tt.which}return!(!ft||(tt.altKey||tt.ctrlKey||tt.metaKey)&&!this._isThirdLevelShift(this.browser,tt))&&(ft=String.fromCharCode(ft),this._onKey.fire({key:ft,domEvent:tt}),this._showCursor(),this._coreService.triggerDataEvent(ft,!0),!0)},Ze.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},Ze.prototype.resize=function(tt,ft){tt!==this.cols||ft!==this.rows?Kt.prototype.resize.call(this,tt,ft):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},Ze.prototype._afterResize=function(tt,ft){var Ut,nt;(Ut=this._charSizeService)===null||Ut===void 0||Ut.measure(),(nt=this.viewport)===null||nt===void 0||nt.syncScrollArea(!0)},Ze.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var tt=1;tt<this.rows;tt++)this.buffer.lines.push(this.buffer.getBlankLine(ze.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},Ze.prototype.reset=function(){var tt,ft;this.options.rows=this.rows,this.options.cols=this.cols;var Ut=this._customKeyEventHandler;this._setup(),Kt.prototype.reset.call(this),(tt=this._selectionService)===null||tt===void 0||tt.reset(),this._customKeyEventHandler=Ut,this.refresh(0,this.rows-1),(ft=this.viewport)===null||ft===void 0||ft.syncScrollArea()},Ze.prototype._reportWindowsOptions=function(tt){if(this._renderService)switch(tt){case le.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ft=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Ut=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(ae.C0.ESC+"[4;"+Ut+";"+ft+"t");break;case le.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var nt=this._renderService.dimensions.scaledCellWidth.toFixed(0),Ge=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(ae.C0.ESC+"[6;"+Ge+";"+nt+"t")}},Ze.prototype.cancel=function(tt,ft){if(this.options.cancelEvents||ft)return tt.preventDefault(),tt.stopPropagation(),!1},Ze.prototype._visualBell=function(){return!1},Ze.prototype._soundBell=function(){return this.options.bellStyle==="sound"},Ze}(Ke.CoreTerminal);ee.Terminal=pt},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(ae,le,re,de){var he,me=arguments.length,se=me<3?le:de===null?de=Object.getOwnPropertyDescriptor(le,re):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(ae,le,re,de);else for(var ye=ae.length-1;ye>=0;ye--)(he=ae[ye])&&(se=(me<3?he(se):me>3?he(le,re,se):he(le,re))||se);return me>3&&se&&Object.defineProperty(le,re,se),se},Le=this&&this.__param||function(ae,le){return function(re,de){le(re,de,ae)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CompositionHelper=void 0;var Ce=te(5),ce=te(1),fe=function(){function ae(le,re,de,he,me,se){this._textarea=le,this._compositionView=re,this._bufferService=de,this._optionsService=he,this._charSizeService=me,this._coreService=se,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(ae.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),ae.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},ae.prototype.compositionupdate=function(le){var re=this;this._compositionView.textContent=le.data,this.updateCompositionElements(),setTimeout(function(){re._compositionPosition.end=re._textarea.value.length},0)},ae.prototype.compositionend=function(){this._finalizeComposition(!0)},ae.prototype.keydown=function(le){if(this._isComposing||this._isSendingComposition){if(le.keyCode===229||le.keyCode===16||le.keyCode===17||le.keyCode===18)return!1;this._finalizeComposition(!1)}return le.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},ae.prototype._finalizeComposition=function(le){var re=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,le){var de={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(re._isSendingComposition){re._isSendingComposition=!1;var me=void 0;me=re._isComposing?re._textarea.value.substring(de.start,de.end):re._textarea.value.substring(de.start),re._coreService.triggerDataEvent(me,!0)}},0)}else{this._isSendingComposition=!1;var he=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(he,!0)}},ae.prototype._handleAnyTextareaChanges=function(){var le=this,re=this._textarea.value;setTimeout(function(){if(!le._isComposing){var de=le._textarea.value.replace(re,"");de.length>0&&le._coreService.triggerDataEvent(de,!0)}},0)},ae.prototype.updateCompositionElements=function(le){var re=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var de=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),he=this._bufferService.buffer.y*de,me=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=me+"px",this._compositionView.style.top=he+"px",this._compositionView.style.height=de+"px",this._compositionView.style.lineHeight=de+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var se=this._compositionView.getBoundingClientRect();this._textarea.style.left=me+"px",this._textarea.style.top=he+"px",this._textarea.style.width=se.width+"px",this._textarea.style.height=se.height+"px",this._textarea.style.lineHeight=se.height+"px"}le||setTimeout(function(){return re.updateCompositionElements(!0)},0)}},ae=Se([Le(2,ce.IBufferService),Le(3,ce.IOptionsService),Le(4,Ce.ICharSizeService),Le(5,ce.ICoreService)],ae)}();ee.CompositionHelper=fe},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)}),Ce=this&&this.__decorate||function(he,me,se,ye){var _e,Me=arguments.length,ve=Me<3?me:ye===null?ye=Object.getOwnPropertyDescriptor(me,se):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(he,me,se,ye);else for(var Fe=he.length-1;Fe>=0;Fe--)(_e=he[Fe])&&(ve=(Me<3?_e(ve):Me>3?_e(me,se,ve):_e(me,se))||ve);return Me>3&&ve&&Object.defineProperty(me,se,ve),ve},ce=this&&this.__param||function(he,me){return function(se,ye){me(se,ye,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Viewport=void 0;var fe=te(2),ae=te(7),le=te(5),re=te(1),de=function(he){function me(se,ye,_e,Me,ve,Fe,$e){var Te=he.call(this)||this;return Te._scrollLines=se,Te._viewportElement=ye,Te._scrollArea=_e,Te._bufferService=Me,Te._optionsService=ve,Te._charSizeService=Fe,Te._renderService=$e,Te.scrollBarWidth=0,Te._currentRowHeight=0,Te._lastRecordedBufferLength=0,Te._lastRecordedViewportHeight=0,Te._lastRecordedBufferHeight=0,Te._lastTouchY=0,Te._lastScrollTop=0,Te._wheelPartialScroll=0,Te._refreshAnimationFrame=null,Te._ignoreNextScrollEvent=!1,Te.scrollBarWidth=Te._viewportElement.offsetWidth-Te._scrollArea.offsetWidth||15,Te.register(ae.addDisposableDomListener(Te._viewportElement,"scroll",Te._onScroll.bind(Te))),setTimeout(function(){return Te.syncScrollArea()},0),Te}return Le(me,he),me.prototype.onThemeChange=function(se){this._viewportElement.style.backgroundColor=se.background.css},me.prototype._refresh=function(se){var ye=this;if(se)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ye._innerRefresh()}))},me.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var se=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==se&&(this._lastRecordedBufferHeight=se,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ye=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ye&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ye),this._refreshAnimationFrame=null},me.prototype.syncScrollArea=function(se){if(se===void 0&&(se=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(se);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ye=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ye&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(se)}else this._refresh(se)},me.prototype._onScroll=function(se){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ye=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ye,!0)}},me.prototype._bubbleScroll=function(se,ye){var _e=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ye<0&&this._viewportElement.scrollTop!==0||ye>0&&_e<this._lastRecordedBufferHeight)||(se.cancelable&&se.preventDefault(),!1)},me.prototype.onWheel=function(se){var ye=this._getPixelsScrolled(se);return ye!==0&&(this._viewportElement.scrollTop+=ye,this._bubbleScroll(se,ye))},me.prototype._getPixelsScrolled=function(se){if(se.deltaY===0)return 0;var ye=this._applyScrollModifier(se.deltaY,se);return se.deltaMode===WheelEvent.DOM_DELTA_LINE?ye*=this._currentRowHeight:se.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ye*=this._currentRowHeight*this._bufferService.rows),ye},me.prototype.getLinesScrolled=function(se){if(se.deltaY===0)return 0;var ye=this._applyScrollModifier(se.deltaY,se);return se.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ye/=this._currentRowHeight+0,this._wheelPartialScroll+=ye,ye=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):se.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ye*=this._bufferService.rows),ye},me.prototype._applyScrollModifier=function(se,ye){var _e=this._optionsService.options.fastScrollModifier;return _e==="alt"&&ye.altKey||_e==="ctrl"&&ye.ctrlKey||_e==="shift"&&ye.shiftKey?se*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:se*this._optionsService.options.scrollSensitivity},me.prototype.onTouchStart=function(se){this._lastTouchY=se.touches[0].pageY},me.prototype.onTouchMove=function(se){var ye=this._lastTouchY-se.touches[0].pageY;return this._lastTouchY=se.touches[0].pageY,ye!==0&&(this._viewportElement.scrollTop+=ye,this._bubbleScroll(se,ye))},me=Ce([ce(3,re.IBufferService),ce(4,re.IOptionsService),ce(5,le.ICharSizeService),ce(6,le.IRenderService)],me)}(fe.Disposable);ee.Viewport=de},function(St,ee,te){"use strict";function Se(fe){return fe.replace(/\r?\n/g,"\r")}function Le(fe,ae){return ae?"\x1B[200~"+fe+"\x1B[201~":fe}function Ce(fe,ae,le){fe=Le(fe=Se(fe),le.decPrivateModes.bracketedPasteMode),le.triggerDataEvent(fe,!0),ae.value=""}function ce(fe,ae,le){var re=le.getBoundingClientRect(),de=fe.clientX-re.left-10,he=fe.clientY-re.top-10;ae.style.width="20px",ae.style.height="20px",ae.style.left=de+"px",ae.style.top=he+"px",ae.style.zIndex="1000",ae.focus()}Object.defineProperty(ee,"__esModule",{value:!0}),ee.rightClickHandler=ee.moveTextAreaUnderMouseCursor=ee.paste=ee.handlePasteEvent=ee.copyHandler=ee.bracketTextForPaste=ee.prepareTextForTerminal=void 0,ee.prepareTextForTerminal=Se,ee.bracketTextForPaste=Le,ee.copyHandler=function(fe,ae){fe.clipboardData&&fe.clipboardData.setData("text/plain",ae.selectionText),fe.preventDefault()},ee.handlePasteEvent=function(fe,ae,le){fe.stopPropagation(),fe.clipboardData&&Ce(fe.clipboardData.getData("text/plain"),ae,le)},ee.paste=Ce,ee.moveTextAreaUnderMouseCursor=ce,ee.rightClickHandler=function(fe,ae,le,re,de){ce(fe,ae,le),de&&!re.isClickInSelection(fe)&&re.selectWordAtCursor(fe),ae.value=re.selectionText,ae.select()}},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.EscapeSequenceParser=ee.VT500_TRANSITION_TABLE=ee.TransitionTable=void 0;var Ce=te(2),ce=te(15),fe=te(21),ae=te(22),le=te(24),re=function(){function he(me){this.table=new Uint8Array(me)}return he.prototype.setDefault=function(me,se){ce.fill(this.table,me<<4|se)},he.prototype.add=function(me,se,ye,_e){this.table[se<<8|me]=ye<<4|_e},he.prototype.addMany=function(me,se,ye,_e){for(var Me=0;Me<me.length;Me++)this.table[se<<8|me[Me]]=ye<<4|_e},he}();ee.TransitionTable=re,ee.VT500_TRANSITION_TABLE=function(){var he=new re(4095),me=Array.apply(null,Array(256)).map(function(Fe,$e){return $e}),se=function(Fe,$e){return me.slice(Fe,$e)},ye=se(32,127),_e=se(0,24);_e.push(25),_e.push.apply(_e,se(28,32));var Me,ve=se(0,14);for(Me in he.setDefault(1,0),he.addMany(ye,0,2,0),ve)he.addMany([24,26,153,154],Me,3,0),he.addMany(se(128,144),Me,3,0),he.addMany(se(144,152),Me,3,0),he.add(156,Me,0,0),he.add(27,Me,11,1),he.add(157,Me,4,8),he.addMany([152,158,159],Me,0,7),he.add(155,Me,11,3),he.add(144,Me,11,9);return he.addMany(_e,0,3,0),he.addMany(_e,1,3,1),he.add(127,1,0,1),he.addMany(_e,8,0,8),he.addMany(_e,3,3,3),he.add(127,3,0,3),he.addMany(_e,4,3,4),he.add(127,4,0,4),he.addMany(_e,6,3,6),he.addMany(_e,5,3,5),he.add(127,5,0,5),he.addMany(_e,2,3,2),he.add(127,2,0,2),he.add(93,1,4,8),he.addMany(ye,8,5,8),he.add(127,8,5,8),he.addMany([156,27,24,26,7],8,6,0),he.addMany(se(28,32),8,0,8),he.addMany([88,94,95],1,0,7),he.addMany(ye,7,0,7),he.addMany(_e,7,0,7),he.add(156,7,0,0),he.add(127,7,0,7),he.add(91,1,11,3),he.addMany(se(64,127),3,7,0),he.addMany(se(48,60),3,8,4),he.addMany([60,61,62,63],3,9,4),he.addMany(se(48,60),4,8,4),he.addMany(se(64,127),4,7,0),he.addMany([60,61,62,63],4,0,6),he.addMany(se(32,64),6,0,6),he.add(127,6,0,6),he.addMany(se(64,127),6,0,0),he.addMany(se(32,48),3,9,5),he.addMany(se(32,48),5,9,5),he.addMany(se(48,64),5,0,6),he.addMany(se(64,127),5,7,0),he.addMany(se(32,48),4,9,5),he.addMany(se(32,48),1,9,2),he.addMany(se(32,48),2,9,2),he.addMany(se(48,127),2,10,0),he.addMany(se(48,80),1,10,0),he.addMany(se(81,88),1,10,0),he.addMany([89,90,92],1,10,0),he.addMany(se(96,127),1,10,0),he.add(80,1,11,9),he.addMany(_e,9,0,9),he.add(127,9,0,9),he.addMany(se(28,32),9,0,9),he.addMany(se(32,48),9,9,12),he.addMany(se(48,60),9,8,10),he.addMany([60,61,62,63],9,9,10),he.addMany(_e,11,0,11),he.addMany(se(32,128),11,0,11),he.addMany(se(28,32),11,0,11),he.addMany(_e,10,0,10),he.add(127,10,0,10),he.addMany(se(28,32),10,0,10),he.addMany(se(48,60),10,8,10),he.addMany([60,61,62,63],10,0,11),he.addMany(se(32,48),10,9,12),he.addMany(_e,12,0,12),he.add(127,12,0,12),he.addMany(se(28,32),12,0,12),he.addMany(se(32,48),12,9,12),he.addMany(se(48,64),12,0,11),he.addMany(se(64,127),12,12,13),he.addMany(se(64,127),10,12,13),he.addMany(se(64,127),9,12,13),he.addMany(_e,13,13,13),he.addMany(ye,13,13,13),he.add(127,13,0,13),he.addMany([27,156,24,26],13,14,0),he.add(160,0,2,0),he.add(160,8,5,8),he.add(160,6,0,6),he.add(160,11,0,11),he.add(160,13,13,13),he}();var de=function(he){function me(se){se===void 0&&(se=ee.VT500_TRANSITION_TABLE);var ye=he.call(this)||this;return ye._transitions=se,ye.initialState=0,ye.currentState=ye.initialState,ye._params=new fe.Params,ye._params.addParam(0),ye._collect=0,ye.precedingCodepoint=0,ye._printHandlerFb=function(_e,Me,ve){},ye._executeHandlerFb=function(_e){},ye._csiHandlerFb=function(_e,Me){},ye._escHandlerFb=function(_e){},ye._errorHandlerFb=function(_e){return _e},ye._printHandler=ye._printHandlerFb,ye._executeHandlers=Object.create(null),ye._csiHandlers=Object.create(null),ye._escHandlers=Object.create(null),ye._oscParser=new ae.OscParser,ye._dcsParser=new le.DcsParser,ye._errorHandler=ye._errorHandlerFb,ye.setEscHandler({final:"\\"},function(){}),ye}return Le(me,he),me.prototype._identifier=function(se,ye){ye===void 0&&(ye=[64,126]);var _e=0;if(se.prefix){if(se.prefix.length>1)throw new Error("only one byte as prefix supported");if((_e=se.prefix.charCodeAt(0))&&60>_e||_e>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(se.intermediates){if(se.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var Me=0;Me<se.intermediates.length;++Me){var ve=se.intermediates.charCodeAt(Me);if(32>ve||ve>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");_e<<=8,_e|=ve}}if(se.final.length!==1)throw new Error("final must be a single byte");var Fe=se.final.charCodeAt(0);if(ye[0]>Fe||Fe>ye[1])throw new Error("final must be in range "+ye[0]+" .. "+ye[1]);return _e<<=8,_e|=Fe},me.prototype.identToString=function(se){for(var ye=[];se;)ye.push(String.fromCharCode(255&se)),se>>=8;return ye.reverse().join("")},me.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},me.prototype.setPrintHandler=function(se){this._printHandler=se},me.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},me.prototype.addEscHandler=function(se,ye){var _e=this._identifier(se,[48,126]);this._escHandlers[_e]===void 0&&(this._escHandlers[_e]=[]);var Me=this._escHandlers[_e];return Me.push(ye),{dispose:function(){var ve=Me.indexOf(ye);ve!==-1&&Me.splice(ve,1)}}},me.prototype.setEscHandler=function(se,ye){this._escHandlers[this._identifier(se,[48,126])]=[ye]},me.prototype.clearEscHandler=function(se){this._escHandlers[this._identifier(se,[48,126])]&&delete this._escHandlers[this._identifier(se,[48,126])]},me.prototype.setEscHandlerFallback=function(se){this._escHandlerFb=se},me.prototype.setExecuteHandler=function(se,ye){this._executeHandlers[se.charCodeAt(0)]=ye},me.prototype.clearExecuteHandler=function(se){this._executeHandlers[se.charCodeAt(0)]&&delete this._executeHandlers[se.charCodeAt(0)]},me.prototype.setExecuteHandlerFallback=function(se){this._executeHandlerFb=se},me.prototype.addCsiHandler=function(se,ye){var _e=this._identifier(se);this._csiHandlers[_e]===void 0&&(this._csiHandlers[_e]=[]);var Me=this._csiHandlers[_e];return Me.push(ye),{dispose:function(){var ve=Me.indexOf(ye);ve!==-1&&Me.splice(ve,1)}}},me.prototype.setCsiHandler=function(se,ye){this._csiHandlers[this._identifier(se)]=[ye]},me.prototype.clearCsiHandler=function(se){this._csiHandlers[this._identifier(se)]&&delete this._csiHandlers[this._identifier(se)]},me.prototype.setCsiHandlerFallback=function(se){this._csiHandlerFb=se},me.prototype.addDcsHandler=function(se,ye){return this._dcsParser.addHandler(this._identifier(se),ye)},me.prototype.setDcsHandler=function(se,ye){this._dcsParser.setHandler(this._identifier(se),ye)},me.prototype.clearDcsHandler=function(se){this._dcsParser.clearHandler(this._identifier(se))},me.prototype.setDcsHandlerFallback=function(se){this._dcsParser.setHandlerFallback(se)},me.prototype.addOscHandler=function(se,ye){return this._oscParser.addHandler(se,ye)},me.prototype.setOscHandler=function(se,ye){this._oscParser.setHandler(se,ye)},me.prototype.clearOscHandler=function(se){this._oscParser.clearHandler(se)},me.prototype.setOscHandlerFallback=function(se){this._oscParser.setHandlerFallback(se)},me.prototype.setErrorHandler=function(se){this._errorHandler=se},me.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},me.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},me.prototype.parse=function(se,ye){for(var _e=0,Me=0,ve=this.currentState,Fe=this._oscParser,$e=this._dcsParser,Te=this._collect,ze=this._params,Ee=this._transitions.table,be=0;be<ye;++be){switch((Me=Ee[ve<<8|((_e=se[be])<160?_e:160)])>>4){case 2:for(var Re=be+1;;++Re){if(Re>=ye||(_e=se[Re])<32||_e>126&&_e<160){this._printHandler(se,be,Re),be=Re-1;break}if(++Re>=ye||(_e=se[Re])<32||_e>126&&_e<160){this._printHandler(se,be,Re),be=Re-1;break}if(++Re>=ye||(_e=se[Re])<32||_e>126&&_e<160){this._printHandler(se,be,Re),be=Re-1;break}if(++Re>=ye||(_e=se[Re])<32||_e>126&&_e<160){this._printHandler(se,be,Re),be=Re-1;break}}break;case 3:this._executeHandlers[_e]?this._executeHandlers[_e]():this._executeHandlerFb(_e),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:be,code:_e,currentState:ve,collect:Te,params:ze,abort:!1}).abort)return;break;case 7:for(var De=this._csiHandlers[Te<<8|_e],et=De?De.length-1:-1;et>=0&&De[et](ze)===!1;et--);et<0&&this._csiHandlerFb(Te<<8|_e,ze),this.precedingCodepoint=0;break;case 8:do switch(_e){case 59:ze.addParam(0);break;case 58:ze.addSubParam(-1);break;default:ze.addDigit(_e-48)}while(++be<ye&&(_e=se[be])>47&&_e<60);be--;break;case 9:Te<<=8,Te|=_e;break;case 10:for(var Ye=this._escHandlers[Te<<8|_e],dt=Ye?Ye.length-1:-1;dt>=0&&Ye[dt]()===!1;dt--);dt<0&&this._escHandlerFb(Te<<8|_e),this.precedingCodepoint=0;break;case 11:ze.reset(),ze.addParam(0),Te=0;break;case 12:$e.hook(Te<<8|_e,ze);break;case 13:for(var Ke=be+1;;++Ke)if(Ke>=ye||(_e=se[Ke])===24||_e===26||_e===27||_e>127&&_e<160){$e.put(se,be,Ke),be=Ke-1;break}break;case 14:$e.unhook(_e!==24&&_e!==26),_e===27&&(Me|=1),ze.reset(),ze.addParam(0),Te=0,this.precedingCodepoint=0;break;case 4:Fe.start();break;case 5:for(var zt=be+1;;zt++)if(zt>=ye||(_e=se[zt])<32||_e>127&&_e<=159){Fe.put(se,be,zt),be=zt-1;break}break;case 6:Fe.end(_e!==24&&_e!==26),_e===27&&(Me|=1),ze.reset(),ze.addParam(0),Te=0,this.precedingCodepoint=0}ve=15&Me}this._collect=Te,this.currentState=ve},me}(Ce.Disposable);ee.EscapeSequenceParser=de},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Fe,$e){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Te,ze){Te.__proto__=ze}||function(Te,ze){for(var Ee in ze)ze.hasOwnProperty(Ee)&&(Te[Ee]=ze[Ee])})(Fe,$e)},function(Fe,$e){function Te(){this.constructor=Fe}Se(Fe,$e),Fe.prototype=$e===null?Object.create($e):(Te.prototype=$e.prototype,new Te)}),Ce=this&&this.__decorate||function(Fe,$e,Te,ze){var Ee,be=arguments.length,Re=be<3?$e:ze===null?ze=Object.getOwnPropertyDescriptor($e,Te):ze;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Re=Reflect.decorate(Fe,$e,Te,ze);else for(var De=Fe.length-1;De>=0;De--)(Ee=Fe[De])&&(Re=(be<3?Ee(Re):be>3?Ee($e,Te,Re):Ee($e,Te))||Re);return be>3&&Re&&Object.defineProperty($e,Te,Re),Re},ce=this&&this.__param||function(Fe,$e){return function(Te,ze){$e(Te,ze,Fe)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Renderer=void 0;var fe=te(41),ae=te(47),le=te(48),re=te(49),de=te(29),he=te(2),me=te(5),se=te(1),ye=te(25),_e=te(0),Me=1,ve=function(Fe){function $e(Te,ze,Ee,be,Re,De,et,Ye,dt){var Ke=Fe.call(this)||this;Ke._colors=Te,Ke._screenElement=ze,Ke._bufferService=Re,Ke._charSizeService=De,Ke._optionsService=et,Ke._id=Me++,Ke._onRequestRedraw=new _e.EventEmitter;var zt=Ke._optionsService.options.allowTransparency;return Ke._characterJoinerRegistry=new de.CharacterJoinerRegistry(Ke._bufferService),Ke._renderLayers=[new fe.TextRenderLayer(Ke._screenElement,0,Ke._colors,Ke._characterJoinerRegistry,zt,Ke._id,Ke._bufferService,et),new ae.SelectionRenderLayer(Ke._screenElement,1,Ke._colors,Ke._id,Ke._bufferService,et),new re.LinkRenderLayer(Ke._screenElement,2,Ke._colors,Ke._id,Ee,be,Ke._bufferService,et),new le.CursorRenderLayer(Ke._screenElement,3,Ke._colors,Ke._id,Ke._onRequestRedraw,Ke._bufferService,et,Ye,dt)],Ke.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ke._devicePixelRatio=window.devicePixelRatio,Ke._updateDimensions(),Ke.onOptionsChanged(),Ke}return Le($e,Fe),Object.defineProperty($e.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),$e.prototype.dispose=function(){for(var Te=0,ze=this._renderLayers;Te<ze.length;Te++)ze[Te].dispose();Fe.prototype.dispose.call(this),ye.removeTerminalFromCache(this._id)},$e.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},$e.prototype.setColors=function(Te){this._colors=Te;for(var ze=0,Ee=this._renderLayers;ze<Ee.length;ze++){var be=Ee[ze];be.setColors(this._colors),be.reset()}},$e.prototype.onResize=function(Te,ze){this._updateDimensions();for(var Ee=0,be=this._renderLayers;Ee<be.length;Ee++)be[Ee].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},$e.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},$e.prototype.onBlur=function(){this._runOperation(function(Te){return Te.onBlur()})},$e.prototype.onFocus=function(){this._runOperation(function(Te){return Te.onFocus()})},$e.prototype.onSelectionChanged=function(Te,ze,Ee){Ee===void 0&&(Ee=!1),this._runOperation(function(be){return be.onSelectionChanged(Te,ze,Ee)})},$e.prototype.onCursorMove=function(){this._runOperation(function(Te){return Te.onCursorMove()})},$e.prototype.onOptionsChanged=function(){this._runOperation(function(Te){return Te.onOptionsChanged()})},$e.prototype.clear=function(){this._runOperation(function(Te){return Te.reset()})},$e.prototype._runOperation=function(Te){for(var ze=0,Ee=this._renderLayers;ze<Ee.length;ze++)Te(Ee[ze])},$e.prototype.renderRows=function(Te,ze){for(var Ee=0,be=this._renderLayers;Ee<be.length;Ee++)be[Ee].onGridChanged(Te,ze)},$e.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},$e.prototype.registerCharacterJoiner=function(Te){return this._characterJoinerRegistry.registerCharacterJoiner(Te)},$e.prototype.deregisterCharacterJoiner=function(Te){return this._characterJoinerRegistry.deregisterCharacterJoiner(Te)},$e=Ce([ce(4,se.IBufferService),ce(5,me.ICharSizeService),ce(6,se.IOptionsService),ce(7,se.ICoreService),ce(8,me.ICoreBrowserService)],$e)}(he.Disposable);ee.Renderer=ve},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.TextRenderLayer=void 0;var Ce=te(42),ce=te(13),fe=te(6),ae=te(3),le=te(29),re=te(4),de=function(he){function me(se,ye,_e,Me,ve,Fe,$e,Te){var ze=he.call(this,se,"text",ye,ve,_e,Fe,$e,Te)||this;return ze._characterWidth=0,ze._characterFont="",ze._characterOverlapCache={},ze._workCell=new re.CellData,ze._state=new Ce.GridCache,ze._characterJoinerRegistry=Me,ze}return Le(me,he),me.prototype.resize=function(se){he.prototype.resize.call(this,se);var ye=this._getFont(!1,!1);this._characterWidth===se.scaledCharWidth&&this._characterFont===ye||(this._characterWidth=se.scaledCharWidth,this._characterFont=ye,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},me.prototype.reset=function(){this._state.clear(),this._clearAll()},me.prototype._forEachCell=function(se,ye,_e,Me){for(var ve=se;ve<=ye;ve++)for(var Fe=ve+this._bufferService.buffer.ydisp,$e=this._bufferService.buffer.lines.get(Fe),Te=_e?_e.getJoinedCharacters(Fe):[],ze=0;ze<this._bufferService.cols;ze++){$e.loadCell(ze,this._workCell);var Ee=this._workCell,be=!1,Re=ze;if(Ee.getWidth()!==0){if(Te.length>0&&ze===Te[0][0]){be=!0;var De=Te.shift();Ee=new le.JoinedCellData(this._workCell,$e.translateToString(!0,De[0],De[1]),De[1]-De[0]),Re=De[1]-1}!be&&this._isOverlapping(Ee)&&Re<$e.length-1&&$e.getCodePoint(Re+1)===ae.NULL_CELL_CODE&&(Ee.content&=-12582913,Ee.content|=2<<22),Me(Ee,ze,ve),ze=Re}}},me.prototype._drawBackground=function(se,ye){var _e=this,Me=this._ctx,ve=this._bufferService.cols,Fe=0,$e=0,Te=null;Me.save(),this._forEachCell(se,ye,null,function(ze,Ee,be){var Re=null;ze.isInverse()?Re=ze.isFgDefault()?_e._colors.foreground.css:ze.isFgRGB()?"rgb("+fe.AttributeData.toColorRGB(ze.getFgColor()).join(",")+")":_e._colors.ansi[ze.getFgColor()].css:ze.isBgRGB()?Re="rgb("+fe.AttributeData.toColorRGB(ze.getBgColor()).join(",")+")":ze.isBgPalette()&&(Re=_e._colors.ansi[ze.getBgColor()].css),Te===null&&(Fe=Ee,$e=be),be!==$e?(Me.fillStyle=Te||"",_e._fillCells(Fe,$e,ve-Fe,1),Fe=Ee,$e=be):Te!==Re&&(Me.fillStyle=Te||"",_e._fillCells(Fe,$e,Ee-Fe,1),Fe=Ee,$e=be),Te=Re}),Te!==null&&(Me.fillStyle=Te,this._fillCells(Fe,$e,ve-Fe,1)),Me.restore()},me.prototype._drawForeground=function(se,ye){var _e=this;this._forEachCell(se,ye,this._characterJoinerRegistry,function(Me,ve,Fe){if(!Me.isInvisible()&&(_e._drawChars(Me,ve,Fe),Me.isUnderline())){if(_e._ctx.save(),Me.isInverse())if(Me.isBgDefault())_e._ctx.fillStyle=_e._colors.background.css;else if(Me.isBgRGB())_e._ctx.fillStyle="rgb("+fe.AttributeData.toColorRGB(Me.getBgColor()).join(",")+")";else{var $e=Me.getBgColor();_e._optionsService.options.drawBoldTextInBrightColors&&Me.isBold()&&$e<8&&($e+=8),_e._ctx.fillStyle=_e._colors.ansi[$e].css}else if(Me.isFgDefault())_e._ctx.fillStyle=_e._colors.foreground.css;else if(Me.isFgRGB())_e._ctx.fillStyle="rgb("+fe.AttributeData.toColorRGB(Me.getFgColor()).join(",")+")";else{var Te=Me.getFgColor();_e._optionsService.options.drawBoldTextInBrightColors&&Me.isBold()&&Te<8&&(Te+=8),_e._ctx.fillStyle=_e._colors.ansi[Te].css}_e._fillBottomLineAtCells(ve,Fe,Me.getWidth()),_e._ctx.restore()}})},me.prototype.onGridChanged=function(se,ye){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,se,this._bufferService.cols,ye-se+1),this._drawBackground(se,ye),this._drawForeground(se,ye))},me.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},me.prototype._isOverlapping=function(se){if(se.getWidth()!==1||se.getCode()<256)return!1;var ye=se.getChars();if(this._characterOverlapCache.hasOwnProperty(ye))return this._characterOverlapCache[ye];this._ctx.save(),this._ctx.font=this._characterFont;var _e=Math.floor(this._ctx.measureText(ye).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ye]=_e,_e},me}(ce.BaseRenderLayer);ee.TextRenderLayer=de},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.GridCache=void 0;var Se=function(){function Le(){this.cache=[]}return Le.prototype.resize=function(Ce,ce){for(var fe=0;fe<Ce;fe++){this.cache.length<=fe&&this.cache.push([]);for(var ae=this.cache[fe].length;ae<ce;ae++)this.cache[fe].push(void 0);this.cache[fe].length=ce}this.cache.length=Ce},Le.prototype.clear=function(){for(var Ce=0;Ce<this.cache.length;Ce++)for(var ce=0;ce<this.cache[Ce].length;ce++)this.cache[Ce][ce]=void 0},Le}();ee.GridCache=Se},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(_e,Me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,Fe){ve.__proto__=Fe}||function(ve,Fe){for(var $e in Fe)Fe.hasOwnProperty($e)&&(ve[$e]=Fe[$e])})(_e,Me)},function(_e,Me){function ve(){this.constructor=_e}Se(_e,Me),_e.prototype=Me===null?Object.create(Me):(ve.prototype=Me.prototype,new ve)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.NoneCharAtlas=ee.DynamicCharAtlas=ee.getGlyphCacheKey=void 0;var Ce=te(9),ce=te(44),fe=te(27),ae=te(46),le=te(11),re=te(28),de=te(10),he={css:"rgba(0, 0, 0, 0)",rgba:0};function me(_e){return _e.code<<21|_e.bg<<12|_e.fg<<3|(_e.bold?0:4)+(_e.dim?0:2)+(_e.italic?0:1)}ee.getGlyphCacheKey=me;var se=function(_e){function Me(ve,Fe){var $e=_e.call(this)||this;$e._config=Fe,$e._drawToCacheCount=0,$e._glyphsWaitingOnBitmap=[],$e._bitmapCommitTimeout=null,$e._bitmap=null,$e._cacheCanvas=ve.createElement("canvas"),$e._cacheCanvas.width=1024,$e._cacheCanvas.height=1024,$e._cacheCtx=re.throwIfFalsy($e._cacheCanvas.getContext("2d",{alpha:!0}));var Te=ve.createElement("canvas");Te.width=$e._config.scaledCharWidth,Te.height=$e._config.scaledCharHeight,$e._tmpCtx=re.throwIfFalsy(Te.getContext("2d",{alpha:$e._config.allowTransparency})),$e._width=Math.floor(1024/$e._config.scaledCharWidth),$e._height=Math.floor(1024/$e._config.scaledCharHeight);var ze=$e._width*$e._height;return $e._cacheMap=new ae.LRUMap(ze),$e._cacheMap.prealloc(ze),$e}return Le(Me,_e),Me.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},Me.prototype.beginFrame=function(){this._drawToCacheCount=0},Me.prototype.draw=function(ve,Fe,$e,Te){if(Fe.code===32)return!0;if(!this._canCache(Fe))return!1;var ze=me(Fe),Ee=this._cacheMap.get(ze);if(Ee!=null)return this._drawFromCache(ve,Ee,$e,Te),!0;if(this._drawToCacheCount<100){var be=void 0;be=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Re=this._drawToCache(Fe,be);return this._cacheMap.set(ze,Re),this._drawFromCache(ve,Re,$e,Te),!0}return!1},Me.prototype._canCache=function(ve){return ve.code<256},Me.prototype._toCoordinateX=function(ve){return ve%this._width*this._config.scaledCharWidth},Me.prototype._toCoordinateY=function(ve){return Math.floor(ve/this._width)*this._config.scaledCharHeight},Me.prototype._drawFromCache=function(ve,Fe,$e,Te){if(!Fe.isEmpty){var ze=this._toCoordinateX(Fe.index),Ee=this._toCoordinateY(Fe.index);ve.drawImage(Fe.inBitmap?this._bitmap:this._cacheCanvas,ze,Ee,this._config.scaledCharWidth,this._config.scaledCharHeight,$e,Te,this._config.scaledCharWidth,this._config.scaledCharHeight)}},Me.prototype._getColorFromAnsiIndex=function(ve){return ve<this._config.colors.ansi.length?this._config.colors.ansi[ve]:fe.DEFAULT_ANSI_COLORS[ve]},Me.prototype._getBackgroundColor=function(ve){return this._config.allowTransparency?he:ve.bg===Ce.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:ve.bg<256?this._getColorFromAnsiIndex(ve.bg):this._config.colors.background},Me.prototype._getForegroundColor=function(ve){return ve.fg===Ce.INVERTED_DEFAULT_COLOR?de.color.opaque(this._config.colors.background):ve.fg<256?this._getColorFromAnsiIndex(ve.fg):this._config.colors.foreground},Me.prototype._drawToCache=function(ve,Fe){this._drawToCacheCount++,this._tmpCtx.save();var $e=this._getBackgroundColor(ve);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$e.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var Te=ve.bold?this._config.fontWeightBold:this._config.fontWeight,ze=ve.italic?"italic":"";this._tmpCtx.font=ze+" "+Te+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(ve).css,ve.dim&&(this._tmpCtx.globalAlpha=Ce.DIM_OPACITY),this._tmpCtx.fillText(ve.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var Ee=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),be=!1;this._config.allowTransparency||(be=function(Ye,dt){for(var Ke=!0,zt=dt.rgba>>>24,pt=dt.rgba>>>16&255,Kt=dt.rgba>>>8&255,Ze=0;Ze<Ye.data.length;Ze+=4)Ye.data[Ze]===zt&&Ye.data[Ze+1]===pt&&Ye.data[Ze+2]===Kt?Ye.data[Ze+3]=0:Ke=!1;return Ke}(Ee,$e));var Re=this._toCoordinateX(Fe),De=this._toCoordinateY(Fe);this._cacheCtx.putImageData(Ee,Re,De);var et={index:Fe,isEmpty:be,inBitmap:!1};return this._addGlyphToBitmap(et),et},Me.prototype._addGlyphToBitmap=function(ve){var Fe=this;!("createImageBitmap"in window)||le.isFirefox||le.isSafari||(this._glyphsWaitingOnBitmap.push(ve),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return Fe._generateBitmap()},100)))},Me.prototype._generateBitmap=function(){var ve=this,Fe=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function($e){ve._bitmap=$e;for(var Te=0;Te<Fe.length;Te++)Fe[Te].inBitmap=!0}),this._bitmapCommitTimeout=null},Me}(ce.BaseCharAtlas);ee.DynamicCharAtlas=se;var ye=function(_e){function Me(ve,Fe){return _e.call(this)||this}return Le(Me,_e),Me.prototype.draw=function(ve,Fe,$e,Te){return!1},Me}(ce.BaseCharAtlas);ee.NoneCharAtlas=ye},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BaseCharAtlas=void 0;var Se=function(){function Le(){this._didWarmUp=!1}return Le.prototype.dispose=function(){},Le.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Le.prototype._doWarmUp=function(){},Le.prototype.beginFrame=function(){},Le}();ee.BaseCharAtlas=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.ColorContrastCache=void 0;var Se=function(){function Le(){this._color={},this._rgba={}}return Le.prototype.clear=function(){this._color={},this._rgba={}},Le.prototype.setCss=function(Ce,ce,fe){this._rgba[Ce]||(this._rgba[Ce]={}),this._rgba[Ce][ce]=fe},Le.prototype.getCss=function(Ce,ce){return this._rgba[Ce]?this._rgba[Ce][ce]:void 0},Le.prototype.setColor=function(Ce,ce,fe){this._color[Ce]||(this._color[Ce]={}),this._color[Ce][ce]=fe},Le.prototype.getColor=function(Ce,ce){return this._color[Ce]?this._color[Ce][ce]:void 0},Le}();ee.ColorContrastCache=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.LRUMap=void 0;var Se=function(){function Le(Ce){this.capacity=Ce,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Le.prototype._unlinkNode=function(Ce){var ce=Ce.prev,fe=Ce.next;Ce===this._head&&(this._head=fe),Ce===this._tail&&(this._tail=ce),ce!==null&&(ce.next=fe),fe!==null&&(fe.prev=ce)},Le.prototype._appendNode=function(Ce){var ce=this._tail;ce!==null&&(ce.next=Ce),Ce.prev=ce,Ce.next=null,this._tail=Ce,this._head===null&&(this._head=Ce)},Le.prototype.prealloc=function(Ce){for(var ce=this._nodePool,fe=0;fe<Ce;fe++)ce.push({prev:null,next:null,key:null,value:null})},Le.prototype.get=function(Ce){var ce=this._map[Ce];return ce!==void 0?(this._unlinkNode(ce),this._appendNode(ce),ce.value):null},Le.prototype.peekValue=function(Ce){var ce=this._map[Ce];return ce!==void 0?ce.value:null},Le.prototype.peek=function(){var Ce=this._head;return Ce===null?null:Ce.value},Le.prototype.set=function(Ce,ce){var fe=this._map[Ce];if(fe!==void 0)fe=this._map[Ce],this._unlinkNode(fe),fe.value=ce;else if(this.size>=this.capacity)fe=this._head,this._unlinkNode(fe),delete this._map[fe.key],fe.key=Ce,fe.value=ce,this._map[Ce]=fe;else{var ae=this._nodePool;ae.length>0?((fe=ae.pop()).key=Ce,fe.value=ce):fe={prev:null,next:null,key:Ce,value:ce},this._map[Ce]=fe,this.size++}this._appendNode(fe)},Le}();ee.LRUMap=Se},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(ce,fe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,le){ae.__proto__=le}||function(ae,le){for(var re in le)le.hasOwnProperty(re)&&(ae[re]=le[re])})(ce,fe)},function(ce,fe){function ae(){this.constructor=ce}Se(ce,fe),ce.prototype=fe===null?Object.create(fe):(ae.prototype=fe.prototype,new ae)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionRenderLayer=void 0;var Ce=function(ce){function fe(ae,le,re,de,he,me){var se=ce.call(this,ae,"selection",le,!0,re,de,he,me)||this;return se._clearState(),se}return Le(fe,ce),fe.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},fe.prototype.resize=function(ae){ce.prototype.resize.call(this,ae),this._clearState()},fe.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},fe.prototype.onSelectionChanged=function(ae,le,re){if(this._didStateChange(ae,le,re,this._bufferService.buffer.ydisp))if(this._clearAll(),ae&&le){var de=ae[1]-this._bufferService.buffer.ydisp,he=le[1]-this._bufferService.buffer.ydisp,me=Math.max(de,0),se=Math.min(he,this._bufferService.rows-1);if(!(me>=this._bufferService.rows||se<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,re){var ye=ae[0],_e=le[0]-ye,Me=se-me+1;this._fillCells(ye,me,_e,Me)}else{ye=de===me?ae[0]:0;var ve=me===se?le[0]:this._bufferService.cols;this._fillCells(ye,me,ve-ye,1);var Fe=Math.max(se-me-1,0);if(this._fillCells(0,me+1,this._bufferService.cols,Fe),me!==se){var $e=he===se?le[0]:this._bufferService.cols;this._fillCells(0,se,$e,1)}}this._state.start=[ae[0],ae[1]],this._state.end=[le[0],le[1]],this._state.columnSelectMode=re,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},fe.prototype._didStateChange=function(ae,le,re,de){return!this._areCoordinatesEqual(ae,this._state.start)||!this._areCoordinatesEqual(le,this._state.end)||re!==this._state.columnSelectMode||de!==this._state.ydisp},fe.prototype._areCoordinatesEqual=function(ae,le){return!(!ae||!le)&&ae[0]===le[0]&&ae[1]===le[1]},fe}(te(13).BaseRenderLayer);ee.SelectionRenderLayer=Ce},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(le,re){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,he){de.__proto__=he}||function(de,he){for(var me in he)he.hasOwnProperty(me)&&(de[me]=he[me])})(le,re)},function(le,re){function de(){this.constructor=le}Se(le,re),le.prototype=re===null?Object.create(re):(de.prototype=re.prototype,new de)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CursorRenderLayer=void 0;var Ce=te(13),ce=te(4),fe=function(le){function re(de,he,me,se,ye,_e,Me,ve,Fe){var $e=le.call(this,de,"cursor",he,!0,me,se,_e,Me)||this;return $e._onRequestRedraw=ye,$e._coreService=ve,$e._coreBrowserService=Fe,$e._cell=new ce.CellData,$e._state={x:0,y:0,isFocused:!1,style:"",width:0},$e._cursorRenderers={bar:$e._renderBarCursor.bind($e),block:$e._renderBlockCursor.bind($e),underline:$e._renderUnderlineCursor.bind($e)},$e}return Le(re,le),re.prototype.resize=function(de){le.prototype.resize.call(this,de),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},re.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},re.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},re.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},re.prototype.onOptionsChanged=function(){var de,he=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new ae(this._coreBrowserService.isFocused,function(){he._render(!0)})):((de=this._cursorBlinkStateManager)===null||de===void 0||de.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},re.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},re.prototype.onGridChanged=function(de,he){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},re.prototype._render=function(de){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var he=this._bufferService.buffer.ybase+this._bufferService.buffer.y,me=he-this._bufferService.buffer.ydisp;if(me<0||me>=this._bufferService.rows)this._clearCursor();else{var se=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(he).loadCell(se,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ye=this._optionsService.options.cursorStyle;return ye&&ye!=="block"?this._cursorRenderers[ye](se,me,this._cell):this._renderBlurCursor(se,me,this._cell),this._ctx.restore(),this._state.x=se,this._state.y=me,this._state.isFocused=!1,this._state.style=ye,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===se&&this._state.y===me&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](se,me,this._cell),this._ctx.restore(),this._state.x=se,this._state.y=me,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},re.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},re.prototype._renderBarCursor=function(de,he,me){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(de,he,this._optionsService.options.cursorWidth),this._ctx.restore()},re.prototype._renderBlockCursor=function(de,he,me){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(de,he,me.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(me,de,he),this._ctx.restore()},re.prototype._renderUnderlineCursor=function(de,he,me){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(de,he),this._ctx.restore()},re.prototype._renderBlurCursor=function(de,he,me){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(de,he,me.getWidth(),1),this._ctx.restore()},re}(Ce.BaseRenderLayer);ee.CursorRenderLayer=fe;var ae=function(){function le(re,de){this._renderCallback=de,this.isCursorVisible=!0,re&&this._restartInterval()}return Object.defineProperty(le.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),le.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},le.prototype.restartBlinkAnimation=function(){var re=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){re._renderCallback(),re._animationFrame=void 0})))},le.prototype._restartInterval=function(re){var de=this;re===void 0&&(re=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(de._animationTimeRestarted){var he=600-(Date.now()-de._animationTimeRestarted);if(de._animationTimeRestarted=void 0,he>0)return void de._restartInterval(he)}de.isCursorVisible=!1,de._animationFrame=window.requestAnimationFrame(function(){de._renderCallback(),de._animationFrame=void 0}),de._blinkInterval=window.setInterval(function(){if(de._animationTimeRestarted){var me=600-(Date.now()-de._animationTimeRestarted);return de._animationTimeRestarted=void 0,void de._restartInterval(me)}de.isCursorVisible=!de.isCursorVisible,de._animationFrame=window.requestAnimationFrame(function(){de._renderCallback(),de._animationFrame=void 0})},600)},re)},le.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},le.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},le}()},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(le,re){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,he){de.__proto__=he}||function(de,he){for(var me in he)he.hasOwnProperty(me)&&(de[me]=he[me])})(le,re)},function(le,re){function de(){this.constructor=le}Se(le,re),le.prototype=re===null?Object.create(re):(de.prototype=re.prototype,new de)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.LinkRenderLayer=void 0;var Ce=te(13),ce=te(9),fe=te(26),ae=function(le){function re(de,he,me,se,ye,_e,Me,ve){var Fe=le.call(this,de,"link",he,!0,me,se,Me,ve)||this;return ye.onShowLinkUnderline(function($e){return Fe._onShowLinkUnderline($e)}),ye.onHideLinkUnderline(function($e){return Fe._onHideLinkUnderline($e)}),_e.onShowLinkUnderline(function($e){return Fe._onShowLinkUnderline($e)}),_e.onHideLinkUnderline(function($e){return Fe._onHideLinkUnderline($e)}),Fe}return Le(re,le),re.prototype.resize=function(de){le.prototype.resize.call(this,de),this._state=void 0},re.prototype.reset=function(){this._clearCurrentLink()},re.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var de=this._state.y2-this._state.y1-1;de>0&&this._clearCells(0,this._state.y1+1,this._state.cols,de),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},re.prototype._onShowLinkUnderline=function(de){if(de.fg===ce.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:de.fg&&fe.is256Color(de.fg)?this._ctx.fillStyle=this._colors.ansi[de.fg].css:this._ctx.fillStyle=this._colors.foreground.css,de.y1===de.y2)this._fillBottomLineAtCells(de.x1,de.y1,de.x2-de.x1);else{this._fillBottomLineAtCells(de.x1,de.y1,de.cols-de.x1);for(var he=de.y1+1;he<de.y2;he++)this._fillBottomLineAtCells(0,he,de.cols);this._fillBottomLineAtCells(0,de.y2,de.x2)}this._state=de},re.prototype._onHideLinkUnderline=function(de){this._clearCurrentLink()},re}(Ce.BaseRenderLayer);ee.LinkRenderLayer=ae},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(le,re,de,he){var me,se=arguments.length,ye=se<3?re:he===null?he=Object.getOwnPropertyDescriptor(re,de):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(le,re,de,he);else for(var _e=le.length-1;_e>=0;_e--)(me=le[_e])&&(ye=(se<3?me(ye):se>3?me(re,de,ye):me(re,de))||ye);return se>3&&ye&&Object.defineProperty(re,de,ye),ye},Le=this&&this.__param||function(le,re){return function(de,he){re(de,he,le)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseZone=ee.Linkifier=void 0;var Ce=te(0),ce=te(1),fe=function(){function le(re,de,he){this._bufferService=re,this._logService=de,this._unicodeService=he,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Ce.EventEmitter,this._onHideLinkUnderline=new Ce.EventEmitter,this._onLinkTooltip=new Ce.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(le.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),le.prototype.attachToDom=function(re,de){this._element=re,this._mouseZoneManager=de},le.prototype.linkifyRows=function(re,de){var he=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=re,this._rowsToLinkify.end=de):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,re),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,de)),this._mouseZoneManager.clearAll(re,de),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return he._linkifyRows()},le._timeBeforeLatency))},le.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var re=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var de=re.ydisp+this._rowsToLinkify.start;if(!(de>=re.lines.length)){for(var he=re.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,me=Math.ceil(2e3/this._bufferService.cols),se=this._bufferService.buffer.iterator(!1,de,he,me,me);se.hasNext();)for(var ye=se.next(),_e=0;_e<this._linkMatchers.length;_e++)this._doLinkifyRow(ye.range.first,ye.content,this._linkMatchers[_e]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},le.prototype.registerLinkMatcher=function(re,de,he){if(he===void 0&&(he={}),!de)throw new Error("handler must be defined");var me={id:this._nextLinkMatcherId++,regex:re,handler:de,matchIndex:he.matchIndex,validationCallback:he.validationCallback,hoverTooltipCallback:he.tooltipCallback,hoverLeaveCallback:he.leaveCallback,willLinkActivate:he.willLinkActivate,priority:he.priority||0};return this._addLinkMatcherToList(me),me.id},le.prototype._addLinkMatcherToList=function(re){if(this._linkMatchers.length!==0){for(var de=this._linkMatchers.length-1;de>=0;de--)if(re.priority<=this._linkMatchers[de].priority)return void this._linkMatchers.splice(de+1,0,re);this._linkMatchers.splice(0,0,re)}else this._linkMatchers.push(re)},le.prototype.deregisterLinkMatcher=function(re){for(var de=0;de<this._linkMatchers.length;de++)if(this._linkMatchers[de].id===re)return this._linkMatchers.splice(de,1),!0;return!1},le.prototype._doLinkifyRow=function(re,de,he){for(var me,se=this,ye=new RegExp(he.regex.source,(he.regex.flags||"")+"g"),_e=-1,Me=function(){var Fe=me[typeof he.matchIndex!="number"?0:he.matchIndex];if(!Fe)return ve._logService.debug("match found without corresponding matchIndex",me,he),"break";if(_e=de.indexOf(Fe,_e+1),ye.lastIndex=_e+Fe.length,_e<0)return"break";var $e=ve._bufferService.buffer.stringIndexToBufferIndex(re,_e);if($e[0]<0)return"break";var Te=ve._bufferService.buffer.lines.get($e[0]);if(!Te)return"break";var ze=Te.getFg($e[1]),Ee=ze?ze>>9&511:void 0;he.validationCallback?he.validationCallback(Fe,function(be){se._rowsTimeoutId||be&&se._addLink($e[1],$e[0]-se._bufferService.buffer.ydisp,Fe,he,Ee)}):ve._addLink($e[1],$e[0]-ve._bufferService.buffer.ydisp,Fe,he,Ee)},ve=this;(me=ye.exec(de))!==null&&Me()!=="break";);},le.prototype._addLink=function(re,de,he,me,se){var ye=this;if(this._mouseZoneManager&&this._element){var _e=this._unicodeService.getStringCellWidth(he),Me=re%this._bufferService.cols,ve=de+Math.floor(re/this._bufferService.cols),Fe=(Me+_e)%this._bufferService.cols,$e=ve+Math.floor((Me+_e)/this._bufferService.cols);Fe===0&&(Fe=this._bufferService.cols,$e--),this._mouseZoneManager.add(new ae(Me+1,ve+1,Fe+1,$e+1,function(Te){if(me.handler)return me.handler(Te,he);var ze=window.open();ze?(ze.opener=null,ze.location.href=he):console.warn("Opening link blocked as opener could not be cleared")},function(){ye._onShowLinkUnderline.fire(ye._createLinkHoverEvent(Me,ve,Fe,$e,se)),ye._element.classList.add("xterm-cursor-pointer")},function(Te){ye._onLinkTooltip.fire(ye._createLinkHoverEvent(Me,ve,Fe,$e,se)),me.hoverTooltipCallback&&me.hoverTooltipCallback(Te,he,{start:{x:Me,y:ve},end:{x:Fe,y:$e}})},function(){ye._onHideLinkUnderline.fire(ye._createLinkHoverEvent(Me,ve,Fe,$e,se)),ye._element.classList.remove("xterm-cursor-pointer"),me.hoverLeaveCallback&&me.hoverLeaveCallback()},function(Te){return!me.willLinkActivate||me.willLinkActivate(Te,he)}))}},le.prototype._createLinkHoverEvent=function(re,de,he,me,se){return{x1:re,y1:de,x2:he,y2:me,cols:this._bufferService.cols,fg:se}},le._timeBeforeLatency=200,le=Se([Le(0,ce.IBufferService),Le(1,ce.ILogService),Le(2,ce.IUnicodeService)],le)}();ee.Linkifier=fe;var ae=function(le,re,de,he,me,se,ye,_e,Me){this.x1=le,this.y1=re,this.x2=de,this.y2=he,this.clickCallback=me,this.hoverCallback=se,this.tooltipCallback=ye,this.leaveCallback=_e,this.willLinkActivate=Me};ee.MouseZone=ae},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Fe,$e){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Te,ze){Te.__proto__=ze}||function(Te,ze){for(var Ee in ze)ze.hasOwnProperty(Ee)&&(Te[Ee]=ze[Ee])})(Fe,$e)},function(Fe,$e){function Te(){this.constructor=Fe}Se(Fe,$e),Fe.prototype=$e===null?Object.create($e):(Te.prototype=$e.prototype,new Te)}),Ce=this&&this.__decorate||function(Fe,$e,Te,ze){var Ee,be=arguments.length,Re=be<3?$e:ze===null?ze=Object.getOwnPropertyDescriptor($e,Te):ze;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Re=Reflect.decorate(Fe,$e,Te,ze);else for(var De=Fe.length-1;De>=0;De--)(Ee=Fe[De])&&(Re=(be<3?Ee(Re):be>3?Ee($e,Te,Re):Ee($e,Te))||Re);return be>3&&Re&&Object.defineProperty($e,Te,Re),Re},ce=this&&this.__param||function(Fe,$e){return function(Te,ze){$e(Te,ze,Fe)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionService=void 0;var fe=te(11),ae=te(52),le=te(4),re=te(0),de=te(5),he=te(1),me=te(30),se=te(53),ye=te(2),_e="\xA0",Me=new RegExp(_e,"g"),ve=function(Fe){function $e(Te,ze,Ee,be,Re,De,et){var Ye=Fe.call(this)||this;return Ye._element=Te,Ye._screenElement=ze,Ye._bufferService=Ee,Ye._coreService=be,Ye._mouseService=Re,Ye._optionsService=De,Ye._renderService=et,Ye._dragScrollAmount=0,Ye._enabled=!0,Ye._workCell=new le.CellData,Ye._mouseDownTimeStamp=0,Ye._onLinuxMouseSelection=Ye.register(new re.EventEmitter),Ye._onRedrawRequest=Ye.register(new re.EventEmitter),Ye._onSelectionChange=Ye.register(new re.EventEmitter),Ye._onRequestScrollLines=Ye.register(new re.EventEmitter),Ye._mouseMoveListener=function(dt){return Ye._onMouseMove(dt)},Ye._mouseUpListener=function(dt){return Ye._onMouseUp(dt)},Ye._coreService.onUserInput(function(){Ye.hasSelection&&Ye.clearSelection()}),Ye._trimListener=Ye._bufferService.buffer.lines.onTrim(function(dt){return Ye._onTrim(dt)}),Ye.register(Ye._bufferService.buffers.onBufferActivate(function(dt){return Ye._onBufferActivate(dt)})),Ye.enable(),Ye._model=new ae.SelectionModel(Ye._bufferService),Ye._activeSelectionMode=0,Ye}return Le($e,Fe),Object.defineProperty($e.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),$e.prototype.dispose=function(){this._removeMouseDownListeners()},$e.prototype.reset=function(){this.clearSelection()},$e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},$e.prototype.enable=function(){this._enabled=!0},Object.defineProperty($e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"hasSelection",{get:function(){var Te=this._model.finalSelectionStart,ze=this._model.finalSelectionEnd;return!(!Te||!ze)&&(Te[0]!==ze[0]||Te[1]!==ze[1])},enumerable:!1,configurable:!0}),Object.defineProperty($e.prototype,"selectionText",{get:function(){var Te=this._model.finalSelectionStart,ze=this._model.finalSelectionEnd;if(!Te||!ze)return"";var Ee=this._bufferService.buffer,be=[];if(this._activeSelectionMode===3){if(Te[0]===ze[0])return"";for(var Re=Te[1];Re<=ze[1];Re++){var De=Ee.translateBufferLineToString(Re,!0,Te[0],ze[0]);be.push(De)}}else{var et=Te[1]===ze[1]?ze[0]:void 0;for(be.push(Ee.translateBufferLineToString(Te[1],!0,Te[0],et)),Re=Te[1]+1;Re<=ze[1]-1;Re++){var Ye=Ee.lines.get(Re);De=Ee.translateBufferLineToString(Re,!0),Ye&&Ye.isWrapped?be[be.length-1]+=De:be.push(De)}Te[1]!==ze[1]&&(Ye=Ee.lines.get(ze[1]),De=Ee.translateBufferLineToString(ze[1],!0,0,ze[0]),Ye&&Ye.isWrapped?be[be.length-1]+=De:be.push(De))}return be.map(function(dt){return dt.replace(Me," ")}).join(fe.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),$e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},$e.prototype.refresh=function(Te){var ze=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return ze._refresh()})),fe.isLinux&&Te&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},$e.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},$e.prototype.isClickInSelection=function(Te){var ze=this._getMouseBufferCoords(Te),Ee=this._model.finalSelectionStart,be=this._model.finalSelectionEnd;return!!(Ee&&be&&ze)&&this._areCoordsInSelection(ze,Ee,be)},$e.prototype._areCoordsInSelection=function(Te,ze,Ee){return Te[1]>ze[1]&&Te[1]<Ee[1]||ze[1]===Ee[1]&&Te[1]===ze[1]&&Te[0]>=ze[0]&&Te[0]<Ee[0]||ze[1]<Ee[1]&&Te[1]===Ee[1]&&Te[0]<Ee[0]||ze[1]<Ee[1]&&Te[1]===ze[1]&&Te[0]>=ze[0]},$e.prototype.selectWordAtCursor=function(Te){var ze=this._getMouseBufferCoords(Te);ze&&(this._selectWordAt(ze,!1),this._model.selectionEnd=void 0,this.refresh(!0))},$e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},$e.prototype.selectLines=function(Te,ze){this._model.clearSelection(),Te=Math.max(Te,0),ze=Math.min(ze,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,Te],this._model.selectionEnd=[this._bufferService.cols,ze],this.refresh(),this._onSelectionChange.fire()},$e.prototype._onTrim=function(Te){this._model.onTrim(Te)&&this.refresh()},$e.prototype._getMouseBufferCoords=function(Te){var ze=this._mouseService.getCoords(Te,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(ze)return ze[0]--,ze[1]--,ze[1]+=this._bufferService.buffer.ydisp,ze},$e.prototype._getMouseEventScrollAmount=function(Te){var ze=me.getCoordsRelativeToElement(Te,this._screenElement)[1],Ee=this._renderService.dimensions.canvasHeight;return ze>=0&&ze<=Ee?0:(ze>Ee&&(ze-=Ee),ze=Math.min(Math.max(ze,-50),50),(ze/=50)/Math.abs(ze)+Math.round(14*ze))},$e.prototype.shouldForceSelection=function(Te){return fe.isMac?Te.altKey&&this._optionsService.options.macOptionClickForcesSelection:Te.shiftKey},$e.prototype.onMouseDown=function(Te){if(this._mouseDownTimeStamp=Te.timeStamp,(Te.button!==2||!this.hasSelection)&&Te.button===0){if(!this._enabled){if(!this.shouldForceSelection(Te))return;Te.stopPropagation()}Te.preventDefault(),this._dragScrollAmount=0,this._enabled&&Te.shiftKey?this._onIncrementalClick(Te):Te.detail===1?this._onSingleClick(Te):Te.detail===2?this._onDoubleClick(Te):Te.detail===3&&this._onTripleClick(Te),this._addMouseDownListeners(),this.refresh(!0)}},$e.prototype._addMouseDownListeners=function(){var Te=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return Te._dragScroll()},50)},$e.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},$e.prototype._onIncrementalClick=function(Te){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(Te))},$e.prototype._onSingleClick=function(Te){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(Te)?3:0,this._model.selectionStart=this._getMouseBufferCoords(Te),this._model.selectionStart){this._model.selectionEnd=void 0;var ze=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);ze&&ze.length!==this._model.selectionStart[0]&&ze.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},$e.prototype._onDoubleClick=function(Te){var ze=this._getMouseBufferCoords(Te);ze&&(this._activeSelectionMode=1,this._selectWordAt(ze,!0))},$e.prototype._onTripleClick=function(Te){var ze=this._getMouseBufferCoords(Te);ze&&(this._activeSelectionMode=2,this._selectLineAt(ze[1]))},$e.prototype.shouldColumnSelect=function(Te){return Te.altKey&&!(fe.isMac&&this._optionsService.options.macOptionClickForcesSelection)},$e.prototype._onMouseMove=function(Te){if(Te.stopImmediatePropagation(),this._model.selectionStart){var ze=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(Te),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(Te),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var Ee=this._bufferService.buffer;if(this._model.selectionEnd[1]<Ee.lines.length){var be=Ee.lines.get(this._model.selectionEnd[1]);be&&be.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}ze&&ze[0]===this._model.selectionEnd[0]&&ze[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},$e.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var Te=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(Te.ydisp+this._bufferService.rows,Te.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=Te.ydisp),this.refresh()}},$e.prototype._onMouseUp=function(Te){var ze=Te.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&ze<500&&Te.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var Ee=this._mouseService.getCoords(Te,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(Ee&&Ee[0]!==void 0&&Ee[1]!==void 0){var be=se.moveToCellSequence(Ee[0]-1,Ee[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(be,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},$e.prototype._onBufferActivate=function(Te){var ze=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=Te.activeBuffer.lines.onTrim(function(Ee){return ze._onTrim(Ee)})},$e.prototype._convertViewportColToCharacterIndex=function(Te,ze){for(var Ee=ze[0],be=0;ze[0]>=be;be++){var Re=Te.loadCell(be,this._workCell).getChars().length;this._workCell.getWidth()===0?Ee--:Re>1&&ze[0]!==be&&(Ee+=Re-1)}return Ee},$e.prototype.setSelection=function(Te,ze,Ee){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[Te,ze],this._model.selectionStartLength=Ee,this.refresh()},$e.prototype._getWordAt=function(Te,ze,Ee,be){if(Ee===void 0&&(Ee=!0),be===void 0&&(be=!0),!(Te[0]>=this._bufferService.cols)){var Re=this._bufferService.buffer,De=Re.lines.get(Te[1]);if(De){var et=Re.translateBufferLineToString(Te[1],!1),Ye=this._convertViewportColToCharacterIndex(De,Te),dt=Ye,Ke=Te[0]-Ye,zt=0,pt=0,Kt=0,Ze=0;if(et.charAt(Ye)===" "){for(;Ye>0&&et.charAt(Ye-1)===" ";)Ye--;for(;dt<et.length&&et.charAt(dt+1)===" ";)dt++}else{var tt=Te[0],ft=Te[0];De.getWidth(tt)===0&&(zt++,tt--),De.getWidth(ft)===2&&(pt++,ft++);var Ut=De.getString(ft).length;for(Ut>1&&(Ze+=Ut-1,dt+=Ut-1);tt>0&&Ye>0&&!this._isCharWordSeparator(De.loadCell(tt-1,this._workCell));){De.loadCell(tt-1,this._workCell);var nt=this._workCell.getChars().length;this._workCell.getWidth()===0?(zt++,tt--):nt>1&&(Kt+=nt-1,Ye-=nt-1),Ye--,tt--}for(;ft<De.length&&dt+1<et.length&&!this._isCharWordSeparator(De.loadCell(ft+1,this._workCell));){De.loadCell(ft+1,this._workCell);var Ge=this._workCell.getChars().length;this._workCell.getWidth()===2?(pt++,ft++):Ge>1&&(Ze+=Ge-1,dt+=Ge-1),dt++,ft++}}dt++;var jt=Ye+Ke-zt+Kt,yn=Math.min(this._bufferService.cols,dt-Ye+zt+pt-Kt-Ze);if(ze||et.slice(Ye,dt).trim()!==""){if(Ee&&jt===0&&De.getCodePoint(0)!==32){var ln=Re.lines.get(Te[1]-1);if(ln&&De.isWrapped&&ln.getCodePoint(this._bufferService.cols-1)!==32){var Tt=this._getWordAt([this._bufferService.cols-1,Te[1]-1],!1,!0,!1);if(Tt){var Lt=this._bufferService.cols-Tt.start;jt-=Lt,yn+=Lt}}}if(be&&jt+yn===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var Jt=Re.lines.get(Te[1]+1);if(Jt&&Jt.isWrapped&&Jt.getCodePoint(0)!==32){var kn=this._getWordAt([0,Te[1]+1],!1,!1,!0);kn&&(yn+=kn.length)}}return{start:jt,length:yn}}}}},$e.prototype._selectWordAt=function(Te,ze){var Ee=this._getWordAt(Te,ze);if(Ee){for(;Ee.start<0;)Ee.start+=this._bufferService.cols,Te[1]--;this._model.selectionStart=[Ee.start,Te[1]],this._model.selectionStartLength=Ee.length}},$e.prototype._selectToWordAt=function(Te){var ze=this._getWordAt(Te,!0);if(ze){for(var Ee=Te[1];ze.start<0;)ze.start+=this._bufferService.cols,Ee--;if(!this._model.areSelectionValuesReversed())for(;ze.start+ze.length>this._bufferService.cols;)ze.length-=this._bufferService.cols,Ee++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?ze.start:ze.start+ze.length,Ee]}},$e.prototype._isCharWordSeparator=function(Te){return Te.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(Te.getChars())>=0},$e.prototype._selectLineAt=function(Te){var ze=this._bufferService.buffer.getWrappedRangeForLine(Te);this._model.selectionStart=[0,ze.first],this._model.selectionEnd=[this._bufferService.cols,ze.last],this._model.selectionStartLength=0},$e=Ce([ce(2,he.IBufferService),ce(3,he.ICoreService),ce(4,de.IMouseService),ce(5,he.IOptionsService),ce(6,de.IRenderService)],$e)}(ye.Disposable);ee.SelectionService=ve},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.SelectionModel=void 0;var Se=function(){function Le(Ce){this._bufferService=Ce,this.isSelectAllActive=!1,this.selectionStartLength=0}return Le.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Le.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var Ce=this.selectionStart[0]+this.selectionStartLength;return Ce>this._bufferService.cols?[Ce%this._bufferService.cols,this.selectionStart[1]+Math.floor(Ce/this._bufferService.cols)]:[Ce,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Le.prototype.areSelectionValuesReversed=function(){var Ce=this.selectionStart,ce=this.selectionEnd;return!(!Ce||!ce)&&(Ce[1]>ce[1]||Ce[1]===ce[1]&&Ce[0]>ce[0])},Le.prototype.onTrim=function(Ce){return this.selectionStart&&(this.selectionStart[1]-=Ce),this.selectionEnd&&(this.selectionEnd[1]-=Ce),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Le}();ee.SelectionModel=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.moveToCellSequence=void 0;var Se=te(12);function Le(re,de,he,me){var se=re-Ce(he,re),ye=de-Ce(he,de);return le(Math.abs(se-ye)-function(_e,Me,ve){for(var Fe=0,$e=_e-Ce(ve,_e),Te=Me-Ce(ve,Me),ze=0;ze<Math.abs($e-Te);ze++){var Ee=ce(_e,Me)==="A"?-1:1,be=ve.buffer.lines.get($e+Ee*ze);be&&be.isWrapped&&Fe++}return Fe}(re,de,he),ae(ce(re,de),me))}function Ce(re,de){for(var he=0,me=re.buffer.lines.get(de),se=me&&me.isWrapped;se&&de>=0&&de<re.rows;)he++,se=(me=re.buffer.lines.get(--de))&&me.isWrapped;return he}function ce(re,de){return re>de?"A":"B"}function fe(re,de,he,me,se,ye){for(var _e=re,Me=de,ve="";_e!==he||Me!==me;)_e+=se?1:-1,se&&_e>ye.cols-1?(ve+=ye.buffer.translateBufferLineToString(Me,!1,re,_e),_e=0,re=0,Me++):!se&&_e<0&&(ve+=ye.buffer.translateBufferLineToString(Me,!1,0,re+1),re=_e=ye.cols-1,Me--);return ve+ye.buffer.translateBufferLineToString(Me,!1,re,_e)}function ae(re,de){var he=de?"O":"[";return Se.C0.ESC+he+re}function le(re,de){re=Math.floor(re);for(var he="",me=0;me<re;me++)he+=de;return he}ee.moveToCellSequence=function(re,de,he,me){var se,ye=he.buffer.x,_e=he.buffer.y;if(!he.buffer.hasScrollback)return function(ve,Fe,$e,Te,ze,Ee){return Le(Fe,Te,ze,Ee).length===0?"":le(fe(ve,Fe,ve,Fe-Ce(ze,Fe),!1,ze).length,ae("D",Ee))}(ye,_e,0,de,he,me)+Le(_e,de,he,me)+function(ve,Fe,$e,Te,ze,Ee){var be;be=Le(Fe,Te,ze,Ee).length>0?Te-Ce(ze,Te):Fe;var Re=Te,De=function(et,Ye,dt,Ke,zt,pt){var Kt;return Kt=Le(dt,Ke,zt,pt).length>0?Ke-Ce(zt,Ke):Ye,et<dt&&Kt<=Ke||et>=dt&&Kt<Ke?"C":"D"}(ve,Fe,$e,Te,ze,Ee);return le(fe(ve,be,$e,Re,De==="C",ze).length,ae(De,Ee))}(ye,_e,re,de,he,me);if(_e===de)return se=ye>re?"D":"C",le(Math.abs(ye-re),ae(se,me));se=_e>de?"D":"C";var Me=Math.abs(_e-de);return le(function(ve,Fe){return Fe.cols-ve}(_e>de?re:ye,he)+(Me-1)*he.cols+1+((_e>de?ye:re)-1),ae(se,me))}},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(fe,ae,le,re){var de,he=arguments.length,me=he<3?ae:re===null?re=Object.getOwnPropertyDescriptor(ae,le):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(fe,ae,le,re);else for(var se=fe.length-1;se>=0;se--)(de=fe[se])&&(me=(he<3?de(me):he>3?de(ae,le,me):de(ae,le))||me);return he>3&&me&&Object.defineProperty(ae,le,me),me},Le=this&&this.__param||function(fe,ae){return function(le,re){ae(le,re,fe)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.SoundService=void 0;var Ce=te(1),ce=function(){function fe(ae){this._optionsService=ae}return Object.defineProperty(fe,"audioContext",{get:function(){if(!fe._audioContext){var ae=window.AudioContext||window.webkitAudioContext;if(!ae)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;fe._audioContext=new ae}return fe._audioContext},enumerable:!1,configurable:!0}),fe.prototype.playBellSound=function(){var ae=fe.audioContext;if(ae){var le=ae.createBufferSource();ae.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(re){le.buffer=re,le.connect(ae.destination),le.start(0)})}},fe.prototype._base64ToArrayBuffer=function(ae){for(var le=window.atob(ae),re=le.length,de=new Uint8Array(re),he=0;he<re;he++)de[he]=le.charCodeAt(he);return de.buffer},fe.prototype._removeMimeType=function(ae){return ae.split(",")[1]},fe=Se([Le(0,Ce.IOptionsService)],fe)}();ee.SoundService=ce},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)}),Ce=this&&this.__decorate||function(he,me,se,ye){var _e,Me=arguments.length,ve=Me<3?me:ye===null?ye=Object.getOwnPropertyDescriptor(me,se):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(he,me,se,ye);else for(var Fe=he.length-1;Fe>=0;Fe--)(_e=he[Fe])&&(ve=(Me<3?_e(ve):Me>3?_e(me,se,ve):_e(me,se))||ve);return Me>3&&ve&&Object.defineProperty(me,se,ve),ve},ce=this&&this.__param||function(he,me){return function(se,ye){me(se,ye,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseZoneManager=void 0;var fe=te(2),ae=te(7),le=te(5),re=te(1),de=function(he){function me(se,ye,_e,Me,ve,Fe){var $e=he.call(this)||this;return $e._element=se,$e._screenElement=ye,$e._bufferService=_e,$e._mouseService=Me,$e._selectionService=ve,$e._optionsService=Fe,$e._zones=[],$e._areZonesActive=!1,$e._lastHoverCoords=[void 0,void 0],$e._initialSelectionLength=0,$e.register(ae.addDisposableDomListener($e._element,"mousedown",function(Te){return $e._onMouseDown(Te)})),$e._mouseMoveListener=function(Te){return $e._onMouseMove(Te)},$e._mouseLeaveListener=function(Te){return $e._onMouseLeave(Te)},$e._clickListener=function(Te){return $e._onClick(Te)},$e}return Le(me,he),me.prototype.dispose=function(){he.prototype.dispose.call(this),this._deactivate()},me.prototype.add=function(se){this._zones.push(se),this._zones.length===1&&this._activate()},me.prototype.clearAll=function(se,ye){if(this._zones.length!==0){se&&ye||(se=0,ye=this._bufferService.rows-1);for(var _e=0;_e<this._zones.length;_e++){var Me=this._zones[_e];(Me.y1>se&&Me.y1<=ye+1||Me.y2>se&&Me.y2<=ye+1||Me.y1<se&&Me.y2>ye+1)&&(this._currentZone&&this._currentZone===Me&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(_e--,1))}this._zones.length===0&&this._deactivate()}},me.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},me.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},me.prototype._onMouseMove=function(se){this._lastHoverCoords[0]===se.pageX&&this._lastHoverCoords[1]===se.pageY||(this._onHover(se),this._lastHoverCoords=[se.pageX,se.pageY])},me.prototype._onHover=function(se){var ye=this,_e=this._findZoneEventAt(se);_e!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),_e&&(this._currentZone=_e,_e.hoverCallback&&_e.hoverCallback(se),this._tooltipTimeout=window.setTimeout(function(){return ye._onTooltip(se)},this._optionsService.options.linkTooltipHoverDuration)))},me.prototype._onTooltip=function(se){this._tooltipTimeout=void 0;var ye=this._findZoneEventAt(se);ye&&ye.tooltipCallback&&ye.tooltipCallback(se)},me.prototype._onMouseDown=function(se){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ye=this._findZoneEventAt(se);ye!=null&&ye.willLinkActivate(se)&&(se.preventDefault(),se.stopImmediatePropagation())}},me.prototype._onMouseLeave=function(se){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},me.prototype._onClick=function(se){var ye=this._findZoneEventAt(se),_e=this._getSelectionLength();ye&&_e===this._initialSelectionLength&&(ye.clickCallback(se),se.preventDefault(),se.stopImmediatePropagation())},me.prototype._getSelectionLength=function(){var se=this._selectionService.selectionText;return se?se.length:0},me.prototype._findZoneEventAt=function(se){var ye=this._mouseService.getCoords(se,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ye)for(var _e=ye[0],Me=ye[1],ve=0;ve<this._zones.length;ve++){var Fe=this._zones[ve];if(Fe.y1===Fe.y2){if(Me===Fe.y1&&_e>=Fe.x1&&_e<Fe.x2)return Fe}else if(Me===Fe.y1&&_e>=Fe.x1||Me===Fe.y2&&_e<Fe.x2||Me>Fe.y1&&Me<Fe.y2)return Fe}},me=Ce([ce(2,re.IBufferService),ce(3,le.IMouseService),ce(4,le.ISelectionService),ce(5,re.IOptionsService)],me)}(fe.Disposable);ee.MouseZoneManager=de},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(me,se){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,_e){ye.__proto__=_e}||function(ye,_e){for(var Me in _e)_e.hasOwnProperty(Me)&&(ye[Me]=_e[Me])})(me,se)},function(me,se){function ye(){this.constructor=me}Se(me,se),me.prototype=se===null?Object.create(se):(ye.prototype=se.prototype,new ye)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.AccessibilityManager=void 0;var Ce=te(18),ce=te(11),fe=te(31),ae=te(7),le=te(2),re=te(32),de=te(17),he=function(me){function se(ye,_e){var Me=me.call(this)||this;Me._terminal=ye,Me._renderService=_e,Me._liveRegionLineCount=0,Me._charsToConsume=[],Me._charsToAnnounce="",Me._accessibilityTreeRoot=document.createElement("div"),Me._accessibilityTreeRoot.classList.add("xterm-accessibility"),Me._rowContainer=document.createElement("div"),Me._rowContainer.classList.add("xterm-accessibility-tree"),Me._rowContainer.setAttribute("role","list"),Me._rowElements=[];for(var ve=0;ve<Me._terminal.rows;ve++)Me._rowElements[ve]=Me._createAccessibilityTreeNode(),Me._rowContainer.appendChild(Me._rowElements[ve]);if(Me._topBoundaryFocusListener=function(Fe){return Me._onBoundaryFocus(Fe,0)},Me._bottomBoundaryFocusListener=function(Fe){return Me._onBoundaryFocus(Fe,1)},Me._rowElements[0].addEventListener("focus",Me._topBoundaryFocusListener),Me._rowElements[Me._rowElements.length-1].addEventListener("focus",Me._bottomBoundaryFocusListener),Me._refreshRowsDimensions(),Me._accessibilityTreeRoot.appendChild(Me._rowContainer),Me._renderRowsDebouncer=new fe.RenderDebouncer(Me._renderRows.bind(Me)),Me._refreshRows(),Me._liveRegion=document.createElement("div"),Me._liveRegion.classList.add("live-region"),Me._liveRegion.setAttribute("aria-live","assertive"),Me._accessibilityTreeRoot.appendChild(Me._liveRegion),!Me._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return Me._terminal.element.insertAdjacentElement("afterbegin",Me._accessibilityTreeRoot),Me.register(Me._renderRowsDebouncer),Me.register(Me._terminal.onResize(function(Fe){return Me._onResize(Fe.rows)})),Me.register(Me._terminal.onRender(function(Fe){return Me._refreshRows(Fe.start,Fe.end)})),Me.register(Me._terminal.onScroll(function(){return Me._refreshRows()})),Me.register(Me._terminal.onA11yChar(function(Fe){return Me._onChar(Fe)})),Me.register(Me._terminal.onLineFeed(function(){return Me._onChar(`
|
|
|
`)})),Me.register(Me._terminal.onA11yTab(function(Fe){return Me._onTab(Fe)})),Me.register(Me._terminal.onKey(function(Fe){return Me._onKey(Fe.key)})),Me.register(Me._terminal.onBlur(function(){return Me._clearLiveRegion()})),Me.register(Me._renderService.onDimensionsChange(function(){return Me._refreshRowsDimensions()})),Me._screenDprMonitor=new re.ScreenDprMonitor,Me.register(Me._screenDprMonitor),Me._screenDprMonitor.setListener(function(){return Me._refreshRowsDimensions()}),Me.register(ae.addDisposableDomListener(window,"resize",function(){return Me._refreshRowsDimensions()})),Me}return Le(se,me),se.prototype.dispose=function(){me.prototype.dispose.call(this),de.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},se.prototype._onBoundaryFocus=function(ye,_e){var Me=ye.target,ve=this._rowElements[_e===0?1:this._rowElements.length-2];if(Me.getAttribute("aria-posinset")!==(_e===0?"1":""+this._terminal.buffer.lines.length)&&ye.relatedTarget===ve){var Fe,$e;if(_e===0?(Fe=Me,$e=this._rowElements.pop(),this._rowContainer.removeChild($e)):(Fe=this._rowElements.shift(),$e=Me,this._rowContainer.removeChild(Fe)),Fe.removeEventListener("focus",this._topBoundaryFocusListener),$e.removeEventListener("focus",this._bottomBoundaryFocusListener),_e===0){var Te=this._createAccessibilityTreeNode();this._rowElements.unshift(Te),this._rowContainer.insertAdjacentElement("afterbegin",Te)}else Te=this._createAccessibilityTreeNode(),this._rowElements.push(Te),this._rowContainer.appendChild(Te);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_e===0?-1:1),this._rowElements[_e===0?1:this._rowElements.length-2].focus(),ye.preventDefault(),ye.stopImmediatePropagation()}},se.prototype._onResize=function(ye){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var _e=this._rowContainer.children.length;_e<this._terminal.rows;_e++)this._rowElements[_e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_e]);for(;this._rowElements.length>ye;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},se.prototype._createAccessibilityTreeNode=function(){var ye=document.createElement("div");return ye.setAttribute("role","listitem"),ye.tabIndex=-1,this._refreshRowDimensions(ye),ye},se.prototype._onTab=function(ye){for(var _e=0;_e<ye;_e++)this._onChar(" ")},se.prototype._onChar=function(ye){var _e=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ye&&(this._charsToAnnounce+=ye):this._charsToAnnounce+=ye,ye===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Ce.tooMuchOutput)),ce.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){_e._accessibilityTreeRoot.appendChild(_e._liveRegion)},0))},se.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,ce.isMac&&de.removeElementFromParent(this._liveRegion)},se.prototype._onKey=function(ye){this._clearLiveRegion(),this._charsToConsume.push(ye)},se.prototype._refreshRows=function(ye,_e){this._renderRowsDebouncer.refresh(ye,_e,this._terminal.rows)},se.prototype._renderRows=function(ye,_e){for(var Me=this._terminal.buffer,ve=Me.lines.length.toString(),Fe=ye;Fe<=_e;Fe++){var $e=Me.translateBufferLineToString(Me.ydisp+Fe,!0),Te=(Me.ydisp+Fe+1).toString(),ze=this._rowElements[Fe];ze&&($e.length===0?ze.innerHTML=" ":ze.textContent=$e,ze.setAttribute("aria-posinset",Te),ze.setAttribute("aria-setsize",ve))}this._announceCharacters()},se.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ye=0;ye<this._terminal.rows;ye++)this._refreshRowDimensions(this._rowElements[ye])}},se.prototype._refreshRowDimensions=function(ye){ye.style.height=this._renderService.dimensions.actualCellHeight+"px"},se.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},se}(le.Disposable);ee.AccessibilityManager=he},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Me,ve){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Fe,$e){Fe.__proto__=$e}||function(Fe,$e){for(var Te in $e)$e.hasOwnProperty(Te)&&(Fe[Te]=$e[Te])})(Me,ve)},function(Me,ve){function Fe(){this.constructor=Me}Se(Me,ve),Me.prototype=ve===null?Object.create(ve):(Fe.prototype=ve.prototype,new Fe)}),Ce=this&&this.__decorate||function(Me,ve,Fe,$e){var Te,ze=arguments.length,Ee=ze<3?ve:$e===null?$e=Object.getOwnPropertyDescriptor(ve,Fe):$e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ee=Reflect.decorate(Me,ve,Fe,$e);else for(var be=Me.length-1;be>=0;be--)(Te=Me[be])&&(Ee=(ze<3?Te(Ee):ze>3?Te(ve,Fe,Ee):Te(ve,Fe))||Ee);return ze>3&&Ee&&Object.defineProperty(ve,Fe,Ee),Ee},ce=this&&this.__param||function(Me,ve){return function(Fe,$e){ve(Fe,$e,Me)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.DomRenderer=void 0;var fe=te(58),ae=te(9),le=te(2),re=te(5),de=te(1),he=te(0),me=te(10),se=te(17),ye=1,_e=function(Me){function ve(Fe,$e,Te,ze,Ee,be,Re,De,et){var Ye=Me.call(this)||this;return Ye._colors=Fe,Ye._element=$e,Ye._screenElement=Te,Ye._viewportElement=ze,Ye._linkifier=Ee,Ye._linkifier2=be,Ye._charSizeService=Re,Ye._optionsService=De,Ye._bufferService=et,Ye._terminalClass=ye++,Ye._rowElements=[],Ye._rowContainer=document.createElement("div"),Ye._rowContainer.classList.add("xterm-rows"),Ye._rowContainer.style.lineHeight="normal",Ye._rowContainer.setAttribute("aria-hidden","true"),Ye._refreshRowElements(Ye._bufferService.cols,Ye._bufferService.rows),Ye._selectionContainer=document.createElement("div"),Ye._selectionContainer.classList.add("xterm-selection"),Ye._selectionContainer.setAttribute("aria-hidden","true"),Ye.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ye._updateDimensions(),Ye._injectCss(),Ye._rowFactory=new fe.DomRendererRowFactory(document,Ye._optionsService,Ye._colors),Ye._element.classList.add("xterm-dom-renderer-owner-"+Ye._terminalClass),Ye._screenElement.appendChild(Ye._rowContainer),Ye._screenElement.appendChild(Ye._selectionContainer),Ye._linkifier.onShowLinkUnderline(function(dt){return Ye._onLinkHover(dt)}),Ye._linkifier.onHideLinkUnderline(function(dt){return Ye._onLinkLeave(dt)}),Ye._linkifier2.onShowLinkUnderline(function(dt){return Ye._onLinkHover(dt)}),Ye._linkifier2.onHideLinkUnderline(function(dt){return Ye._onLinkLeave(dt)}),Ye}return Le(ve,Me),Object.defineProperty(ve.prototype,"onRequestRedraw",{get:function(){return new he.EventEmitter().event},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),se.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),Me.prototype.dispose.call(this)},ve.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var Fe=0,$e=this._rowElements;Fe<$e.length;Fe++){var Te=$e[Fe];Te.style.width=this.dimensions.canvasWidth+"px",Te.style.height=this.dimensions.actualCellHeight+"px",Te.style.lineHeight=this.dimensions.actualCellHeight+"px",Te.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var ze=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=ze,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ve.prototype.setColors=function(Fe){this._colors=Fe,this._injectCss()},ve.prototype._injectCss=function(){var Fe=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var $e=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";$e+=this._terminalSelector+" span:not(."+fe.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+fe.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+fe.ITALIC_CLASS+" { font-style: italic;}",$e+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",$e+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",$e+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+fe.CURSOR_CLASS+"."+fe.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+fe.CURSOR_CLASS+"."+fe.CURSOR_BLINK_CLASS+":not(."+fe.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+fe.CURSOR_CLASS+"."+fe.CURSOR_BLINK_CLASS+"."+fe.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+fe.CURSOR_CLASS+"."+fe.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+fe.CURSOR_CLASS+"."+fe.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+fe.CURSOR_CLASS+"."+fe.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",$e+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(Te,ze){$e+=Fe._terminalSelector+" .xterm-fg-"+ze+" { color: "+Te.css+"; }"+Fe._terminalSelector+" .xterm-bg-"+ze+" { background-color: "+Te.css+"; }"}),$e+=this._terminalSelector+" .xterm-fg-"+ae.INVERTED_DEFAULT_COLOR+" { color: "+me.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+ae.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=$e},ve.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},ve.prototype._refreshRowElements=function(Fe,$e){for(var Te=this._rowElements.length;Te<=$e;Te++){var ze=document.createElement("div");this._rowContainer.appendChild(ze),this._rowElements.push(ze)}for(;this._rowElements.length>$e;)this._rowContainer.removeChild(this._rowElements.pop())},ve.prototype.onResize=function(Fe,$e){this._refreshRowElements(Fe,$e),this._updateDimensions()},ve.prototype.onCharSizeChanged=function(){this._updateDimensions()},ve.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},ve.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},ve.prototype.onSelectionChanged=function(Fe,$e,Te){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(Fe&&$e){var ze=Fe[1]-this._bufferService.buffer.ydisp,Ee=$e[1]-this._bufferService.buffer.ydisp,be=Math.max(ze,0),Re=Math.min(Ee,this._bufferService.rows-1);if(!(be>=this._bufferService.rows||Re<0)){var De=document.createDocumentFragment();if(Te)De.appendChild(this._createSelectionElement(be,Fe[0],$e[0],Re-be+1));else{var et=ze===be?Fe[0]:0,Ye=be===Re?$e[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(be,et,Ye));var dt=Re-be-1;if(De.appendChild(this._createSelectionElement(be+1,0,this._bufferService.cols,dt)),be!==Re){var Ke=Ee===Re?$e[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Re,0,Ke))}}this._selectionContainer.appendChild(De)}}},ve.prototype._createSelectionElement=function(Fe,$e,Te,ze){ze===void 0&&(ze=1);var Ee=document.createElement("div");return Ee.style.height=ze*this.dimensions.actualCellHeight+"px",Ee.style.top=Fe*this.dimensions.actualCellHeight+"px",Ee.style.left=$e*this.dimensions.actualCellWidth+"px",Ee.style.width=this.dimensions.actualCellWidth*(Te-$e)+"px",Ee},ve.prototype.onCursorMove=function(){},ve.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},ve.prototype.clear=function(){for(var Fe=0,$e=this._rowElements;Fe<$e.length;Fe++)$e[Fe].innerHTML=""},ve.prototype.renderRows=function(Fe,$e){for(var Te=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ze=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),Ee=this._optionsService.options.cursorBlink,be=Fe;be<=$e;be++){var Re=this._rowElements[be];Re.innerHTML="";var De=be+this._bufferService.buffer.ydisp,et=this._bufferService.buffer.lines.get(De),Ye=this._optionsService.options.cursorStyle;Re.appendChild(this._rowFactory.createRow(et,De===Te,Ye,ze,Ee,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(ve.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),ve.prototype.registerCharacterJoiner=function(Fe){return-1},ve.prototype.deregisterCharacterJoiner=function(Fe){return!1},ve.prototype._onLinkHover=function(Fe){this._setCellUnderline(Fe.x1,Fe.x2,Fe.y1,Fe.y2,Fe.cols,!0)},ve.prototype._onLinkLeave=function(Fe){this._setCellUnderline(Fe.x1,Fe.x2,Fe.y1,Fe.y2,Fe.cols,!1)},ve.prototype._setCellUnderline=function(Fe,$e,Te,ze,Ee,be){for(;Fe!==$e||Te!==ze;){var Re=this._rowElements[Te];if(!Re)return;var De=Re.children[Fe];De&&(De.style.textDecoration=be?"underline":"none"),++Fe>=Ee&&(Fe=0,Te++)}},ve=Ce([ce(6,re.ICharSizeService),ce(7,de.IOptionsService),ce(8,de.IBufferService)],ve)}(le.Disposable);ee.DomRenderer=_e},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.DomRendererRowFactory=ee.CURSOR_STYLE_UNDERLINE_CLASS=ee.CURSOR_STYLE_BAR_CLASS=ee.CURSOR_STYLE_BLOCK_CLASS=ee.CURSOR_BLINK_CLASS=ee.CURSOR_CLASS=ee.UNDERLINE_CLASS=ee.ITALIC_CLASS=ee.DIM_CLASS=ee.BOLD_CLASS=void 0;var Se=te(9),Le=te(3),Ce=te(4),ce=te(10);ee.BOLD_CLASS="xterm-bold",ee.DIM_CLASS="xterm-dim",ee.ITALIC_CLASS="xterm-italic",ee.UNDERLINE_CLASS="xterm-underline",ee.CURSOR_CLASS="xterm-cursor",ee.CURSOR_BLINK_CLASS="xterm-cursor-blink",ee.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",ee.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",ee.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var fe=function(){function le(re,de,he){this._document=re,this._optionsService=de,this._colors=he,this._workCell=new Ce.CellData}return le.prototype.setColors=function(re){this._colors=re},le.prototype.createRow=function(re,de,he,me,se,ye,_e){for(var Me=this._document.createDocumentFragment(),ve=0,Fe=Math.min(re.length,_e)-1;Fe>=0;Fe--)if(re.loadCell(Fe,this._workCell).getCode()!==Le.NULL_CELL_CODE||de&&Fe===me){ve=Fe+1;break}for(Fe=0;Fe<ve;Fe++){re.loadCell(Fe,this._workCell);var $e=this._workCell.getWidth();if($e!==0){var Te=this._document.createElement("span");if($e>1&&(Te.style.width=ye*$e+"px"),de&&Fe===me)switch(Te.classList.add(ee.CURSOR_CLASS),se&&Te.classList.add(ee.CURSOR_BLINK_CLASS),he){case"bar":Te.classList.add(ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":Te.classList.add(ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:Te.classList.add(ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&Te.classList.add(ee.BOLD_CLASS),this._workCell.isItalic()&&Te.classList.add(ee.ITALIC_CLASS),this._workCell.isDim()&&Te.classList.add(ee.DIM_CLASS),this._workCell.isUnderline()&&Te.classList.add(ee.UNDERLINE_CLASS),this._workCell.isInvisible()?Te.textContent=Le.WHITESPACE_CELL_CHAR:Te.textContent=this._workCell.getChars()||Le.WHITESPACE_CELL_CHAR;var ze=this._workCell.getFgColor(),Ee=this._workCell.getFgColorMode(),be=this._workCell.getBgColor(),Re=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var et=ze;ze=be,be=et;var Ye=Ee;Ee=Re,Re=Ye}switch(Ee){case 16777216:case 33554432:this._workCell.isBold()&&ze<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ze+=8),this._applyMinimumContrast(Te,this._colors.background,this._colors.ansi[ze])||Te.classList.add("xterm-fg-"+ze);break;case 50331648:var dt=ce.rgba.toColor(ze>>16&255,ze>>8&255,255&ze);this._applyMinimumContrast(Te,this._colors.background,dt)||this._addStyle(Te,"color:#"+ae(ze.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(Te,this._colors.background,this._colors.foreground)||De&&Te.classList.add("xterm-fg-"+Se.INVERTED_DEFAULT_COLOR)}switch(Re){case 16777216:case 33554432:Te.classList.add("xterm-bg-"+be);break;case 50331648:this._addStyle(Te,"background-color:#"+ae(be.toString(16),"0",6));break;case 0:default:De&&Te.classList.add("xterm-bg-"+Se.INVERTED_DEFAULT_COLOR)}Me.appendChild(Te)}}return Me},le.prototype._applyMinimumContrast=function(re,de,he){if(this._optionsService.options.minimumContrastRatio===1)return!1;var me=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return me===void 0&&(me=ce.color.ensureContrastRatio(de,he,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,me!=null?me:null)),!!me&&(this._addStyle(re,"color:"+me.css),!0)},le.prototype._addStyle=function(re,de){re.setAttribute("style",""+(re.getAttribute("style")||"")+de+";")},le}();function ae(le,re,de){for(;le.length<de;)le=re+le;return le}ee.DomRendererRowFactory=fe},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.evaluateKeyboardEvent=void 0;var Se=te(12),Le={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};ee.evaluateKeyboardEvent=function(Ce,ce,fe,ae){var le={type:0,cancel:!1,key:void 0},re=(Ce.shiftKey?1:0)|(Ce.altKey?2:0)|(Ce.ctrlKey?4:0)|(Ce.metaKey?8:0);switch(Ce.keyCode){case 0:Ce.key==="UIKeyInputUpArrow"?le.key=ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A":Ce.key==="UIKeyInputLeftArrow"?le.key=ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D":Ce.key==="UIKeyInputRightArrow"?le.key=ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C":Ce.key==="UIKeyInputDownArrow"&&(le.key=ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B");break;case 8:if(Ce.shiftKey){le.key=Se.C0.BS;break}if(Ce.altKey){le.key=Se.C0.ESC+Se.C0.DEL;break}le.key=Se.C0.DEL;break;case 9:if(Ce.shiftKey){le.key=Se.C0.ESC+"[Z";break}le.key=Se.C0.HT,le.cancel=!0;break;case 13:le.key=Ce.altKey?Se.C0.ESC+Se.C0.CR:Se.C0.CR,le.cancel=!0;break;case 27:le.key=Se.C0.ESC,Ce.altKey&&(le.key=Se.C0.ESC+Se.C0.ESC),le.cancel=!0;break;case 37:if(Ce.metaKey)break;re?(le.key=Se.C0.ESC+"[1;"+(re+1)+"D",le.key===Se.C0.ESC+"[1;3D"&&(le.key=Se.C0.ESC+(fe?"b":"[1;5D"))):le.key=ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D";break;case 39:if(Ce.metaKey)break;re?(le.key=Se.C0.ESC+"[1;"+(re+1)+"C",le.key===Se.C0.ESC+"[1;3C"&&(le.key=Se.C0.ESC+(fe?"f":"[1;5C"))):le.key=ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C";break;case 38:if(Ce.metaKey)break;re?(le.key=Se.C0.ESC+"[1;"+(re+1)+"A",fe||le.key!==Se.C0.ESC+"[1;3A"||(le.key=Se.C0.ESC+"[1;5A")):le.key=ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A";break;case 40:if(Ce.metaKey)break;re?(le.key=Se.C0.ESC+"[1;"+(re+1)+"B",fe||le.key!==Se.C0.ESC+"[1;3B"||(le.key=Se.C0.ESC+"[1;5B")):le.key=ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B";break;case 45:Ce.shiftKey||Ce.ctrlKey||(le.key=Se.C0.ESC+"[2~");break;case 46:le.key=re?Se.C0.ESC+"[3;"+(re+1)+"~":Se.C0.ESC+"[3~";break;case 36:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"H":ce?Se.C0.ESC+"OH":Se.C0.ESC+"[H";break;case 35:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"F":ce?Se.C0.ESC+"OF":Se.C0.ESC+"[F";break;case 33:Ce.shiftKey?le.type=2:le.key=Se.C0.ESC+"[5~";break;case 34:Ce.shiftKey?le.type=3:le.key=Se.C0.ESC+"[6~";break;case 112:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"P":Se.C0.ESC+"OP";break;case 113:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"Q":Se.C0.ESC+"OQ";break;case 114:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"R":Se.C0.ESC+"OR";break;case 115:le.key=re?Se.C0.ESC+"[1;"+(re+1)+"S":Se.C0.ESC+"OS";break;case 116:le.key=re?Se.C0.ESC+"[15;"+(re+1)+"~":Se.C0.ESC+"[15~";break;case 117:le.key=re?Se.C0.ESC+"[17;"+(re+1)+"~":Se.C0.ESC+"[17~";break;case 118:le.key=re?Se.C0.ESC+"[18;"+(re+1)+"~":Se.C0.ESC+"[18~";break;case 119:le.key=re?Se.C0.ESC+"[19;"+(re+1)+"~":Se.C0.ESC+"[19~";break;case 120:le.key=re?Se.C0.ESC+"[20;"+(re+1)+"~":Se.C0.ESC+"[20~";break;case 121:le.key=re?Se.C0.ESC+"[21;"+(re+1)+"~":Se.C0.ESC+"[21~";break;case 122:le.key=re?Se.C0.ESC+"[23;"+(re+1)+"~":Se.C0.ESC+"[23~";break;case 123:le.key=re?Se.C0.ESC+"[24;"+(re+1)+"~":Se.C0.ESC+"[24~";break;default:if(!Ce.ctrlKey||Ce.shiftKey||Ce.altKey||Ce.metaKey)if(fe&&!ae||!Ce.altKey||Ce.metaKey)fe&&!Ce.altKey&&!Ce.ctrlKey&&Ce.metaKey?Ce.keyCode===65&&(le.type=1):Ce.key&&!Ce.ctrlKey&&!Ce.altKey&&!Ce.metaKey&&Ce.keyCode>=48&&Ce.key.length===1?le.key=Ce.key:Ce.key&&Ce.ctrlKey&&Ce.key==="_"&&(le.key=Se.C0.US);else{var de=Le[Ce.keyCode],he=de&&de[Ce.shiftKey?1:0];if(he)le.key=Se.C0.ESC+he;else if(Ce.keyCode>=65&&Ce.keyCode<=90){var me=Ce.ctrlKey?Ce.keyCode-64:Ce.keyCode+32;le.key=Se.C0.ESC+String.fromCharCode(me)}}else Ce.keyCode>=65&&Ce.keyCode<=90?le.key=String.fromCharCode(Ce.keyCode-64):Ce.keyCode===32?le.key=Se.C0.NUL:Ce.keyCode>=51&&Ce.keyCode<=55?le.key=String.fromCharCode(Ce.keyCode-51+27):Ce.keyCode===56?le.key=Se.C0.DEL:Ce.keyCode===219?le.key=Se.C0.ESC:Ce.keyCode===220?le.key=Se.C0.FS:Ce.keyCode===221&&(le.key=Se.C0.GS)}return le}},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(ye,_e){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Me,ve){Me.__proto__=ve}||function(Me,ve){for(var Fe in ve)ve.hasOwnProperty(Fe)&&(Me[Fe]=ve[Fe])})(ye,_e)},function(ye,_e){function Me(){this.constructor=ye}Se(ye,_e),ye.prototype=_e===null?Object.create(_e):(Me.prototype=_e.prototype,new Me)}),Ce=this&&this.__decorate||function(ye,_e,Me,ve){var Fe,$e=arguments.length,Te=$e<3?_e:ve===null?ve=Object.getOwnPropertyDescriptor(_e,Me):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Te=Reflect.decorate(ye,_e,Me,ve);else for(var ze=ye.length-1;ze>=0;ze--)(Fe=ye[ze])&&(Te=($e<3?Fe(Te):$e>3?Fe(_e,Me,Te):Fe(_e,Me))||Te);return $e>3&&Te&&Object.defineProperty(_e,Me,Te),Te},ce=this&&this.__param||function(ye,_e){return function(Me,ve){_e(Me,ve,ye)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.RenderService=void 0;var fe=te(31),ae=te(0),le=te(2),re=te(32),de=te(7),he=te(1),me=te(5),se=function(ye){function _e(Me,ve,Fe,$e,Te,ze){var Ee=ye.call(this)||this;if(Ee._renderer=Me,Ee._rowCount=ve,Ee._isPaused=!1,Ee._needsFullRefresh=!1,Ee._isNextRenderRedrawOnly=!0,Ee._needsSelectionRefresh=!1,Ee._canvasWidth=0,Ee._canvasHeight=0,Ee._selectionState={start:void 0,end:void 0,columnSelectMode:!1},Ee._onDimensionsChange=new ae.EventEmitter,Ee._onRender=new ae.EventEmitter,Ee._onRefreshRequest=new ae.EventEmitter,Ee.register({dispose:function(){return Ee._renderer.dispose()}}),Ee._renderDebouncer=new fe.RenderDebouncer(function(Re,De){return Ee._renderRows(Re,De)}),Ee.register(Ee._renderDebouncer),Ee._screenDprMonitor=new re.ScreenDprMonitor,Ee._screenDprMonitor.setListener(function(){return Ee.onDevicePixelRatioChange()}),Ee.register(Ee._screenDprMonitor),Ee.register(ze.onResize(function(Re){return Ee._fullRefresh()})),Ee.register($e.onOptionChange(function(){return Ee._renderer.onOptionsChanged()})),Ee.register(Te.onCharSizeChange(function(){return Ee.onCharSizeChanged()})),Ee._renderer.onRequestRedraw(function(Re){return Ee.refreshRows(Re.start,Re.end,!0)}),Ee.register(de.addDisposableDomListener(window,"resize",function(){return Ee.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var be=new IntersectionObserver(function(Re){return Ee._onIntersectionChange(Re[Re.length-1])},{threshold:0});be.observe(Fe),Ee.register({dispose:function(){return be.disconnect()}})}return Ee}return Le(_e,ye),Object.defineProperty(_e.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),_e.prototype._onIntersectionChange=function(Me){this._isPaused=Me.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},_e.prototype.refreshRows=function(Me,ve,Fe){Fe===void 0&&(Fe=!1),this._isPaused?this._needsFullRefresh=!0:(Fe||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(Me,ve,this._rowCount))},_e.prototype._renderRows=function(Me,ve){this._renderer.renderRows(Me,ve),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:Me,end:ve}),this._isNextRenderRedrawOnly=!0},_e.prototype.resize=function(Me,ve){this._rowCount=ve,this._fireOnCanvasResize()},_e.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},_e.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},_e.prototype.dispose=function(){ye.prototype.dispose.call(this)},_e.prototype.setRenderer=function(Me){var ve=this;this._renderer.dispose(),this._renderer=Me,this._renderer.onRequestRedraw(function(Fe){return ve.refreshRows(Fe.start,Fe.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},_e.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},_e.prototype.setColors=function(Me){this._renderer.setColors(Me),this._fullRefresh()},_e.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},_e.prototype.onResize=function(Me,ve){this._renderer.onResize(Me,ve),this._fullRefresh()},_e.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},_e.prototype.onBlur=function(){this._renderer.onBlur()},_e.prototype.onFocus=function(){this._renderer.onFocus()},_e.prototype.onSelectionChanged=function(Me,ve,Fe){this._selectionState.start=Me,this._selectionState.end=ve,this._selectionState.columnSelectMode=Fe,this._renderer.onSelectionChanged(Me,ve,Fe)},_e.prototype.onCursorMove=function(){this._renderer.onCursorMove()},_e.prototype.clear=function(){this._renderer.clear()},_e.prototype.registerCharacterJoiner=function(Me){return this._renderer.registerCharacterJoiner(Me)},_e.prototype.deregisterCharacterJoiner=function(Me){return this._renderer.deregisterCharacterJoiner(Me)},_e=Ce([ce(3,he.IOptionsService),ce(4,me.ICharSizeService),ce(5,he.IBufferService)],_e)}(le.Disposable);ee.RenderService=se},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(le,re,de,he){var me,se=arguments.length,ye=se<3?re:he===null?he=Object.getOwnPropertyDescriptor(re,de):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(le,re,de,he);else for(var _e=le.length-1;_e>=0;_e--)(me=le[_e])&&(ye=(se<3?me(ye):se>3?me(re,de,ye):me(re,de))||ye);return se>3&&ye&&Object.defineProperty(re,de,ye),ye},Le=this&&this.__param||function(le,re){return function(de,he){re(de,he,le)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharSizeService=void 0;var Ce=te(1),ce=te(0),fe=function(){function le(re,de,he){this._optionsService=he,this.width=0,this.height=0,this._onCharSizeChange=new ce.EventEmitter,this._measureStrategy=new ae(re,de,this._optionsService)}return Object.defineProperty(le.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),le.prototype.measure=function(){var re=this._measureStrategy.measure();re.width===this.width&&re.height===this.height||(this.width=re.width,this.height=re.height,this._onCharSizeChange.fire())},le=Se([Le(2,Ce.IOptionsService)],le)}();ee.CharSizeService=fe;var ae=function(){function le(re,de,he){this._document=re,this._parentElement=de,this._optionsService=he,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return le.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var re=this._measureElement.getBoundingClientRect();return re.width!==0&&re.height!==0&&(this._result.width=re.width,this._result.height=Math.ceil(re.height)),this._result},le}()},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(ae,le,re,de){var he,me=arguments.length,se=me<3?le:de===null?de=Object.getOwnPropertyDescriptor(le,re):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(ae,le,re,de);else for(var ye=ae.length-1;ye>=0;ye--)(he=ae[ye])&&(se=(me<3?he(se):me>3?he(le,re,se):he(le,re))||se);return me>3&&se&&Object.defineProperty(le,re,se),se},Le=this&&this.__param||function(ae,le){return function(re,de){le(re,de,ae)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.MouseService=void 0;var Ce=te(5),ce=te(30),fe=function(){function ae(le,re){this._renderService=le,this._charSizeService=re}return ae.prototype.getCoords=function(le,re,de,he,me){return ce.getCoords(le,re,de,he,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,me)},ae.prototype.getRawByteCoords=function(le,re,de,he){var me=this.getCoords(le,re,de,he);return ce.getRawByteCoords(me)},ae=Se([Le(0,Ce.IRenderService),Le(1,Ce.ICharSizeService)],ae)}();ee.MouseService=fe},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)}),Ce=this&&this.__decorate||function(he,me,se,ye){var _e,Me=arguments.length,ve=Me<3?me:ye===null?ye=Object.getOwnPropertyDescriptor(me,se):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(he,me,se,ye);else for(var Fe=he.length-1;Fe>=0;Fe--)(_e=he[Fe])&&(ve=(Me<3?_e(ve):Me>3?_e(me,se,ve):_e(me,se))||ve);return Me>3&&ve&&Object.defineProperty(me,se,ve),ve},ce=this&&this.__param||function(he,me){return function(se,ye){me(se,ye,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.Linkifier2=void 0;var fe=te(1),ae=te(0),le=te(2),re=te(7),de=function(he){function me(se){var ye=he.call(this)||this;return ye._bufferService=se,ye._linkProviders=[],ye._linkCacheDisposables=[],ye._isMouseOut=!0,ye._activeLine=-1,ye._onShowLinkUnderline=ye.register(new ae.EventEmitter),ye._onHideLinkUnderline=ye.register(new ae.EventEmitter),ye.register(le.getDisposeArrayDisposable(ye._linkCacheDisposables)),ye}return Le(me,he),Object.defineProperty(me.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),me.prototype.registerLinkProvider=function(se){var ye=this;return this._linkProviders.push(se),{dispose:function(){var _e=ye._linkProviders.indexOf(se);_e!==-1&&ye._linkProviders.splice(_e,1)}}},me.prototype.attachToDom=function(se,ye,_e){var Me=this;this._element=se,this._mouseService=ye,this._renderService=_e,this.register(re.addDisposableDomListener(this._element,"mouseleave",function(){Me._isMouseOut=!0,Me._clearCurrentLink()})),this.register(re.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(re.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},me.prototype._onMouseMove=function(se){if(this._lastMouseEvent=se,this._element&&this._mouseService){var ye=this._positionFromMouseEvent(se,this._element,this._mouseService);if(ye){this._isMouseOut=!1;for(var _e=se.composedPath(),Me=0;Me<_e.length;Me++){var ve=_e[Me];if(ve.classList.contains("xterm"))break;if(ve.classList.contains("xterm-hover"))return}this._lastBufferCell&&ye.x===this._lastBufferCell.x&&ye.y===this._lastBufferCell.y||(this._onHover(ye),this._lastBufferCell=ye)}}},me.prototype._onHover=function(se){if(this._activeLine!==se.y)return this._clearCurrentLink(),void this._askForLink(se,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,se)||(this._clearCurrentLink(),this._askForLink(se,!0))},me.prototype._askForLink=function(se,ye){var _e=this;this._activeProviderReplies&&ye||(this._activeProviderReplies=new Map,this._activeLine=se.y);var Me=!1;this._linkProviders.forEach(function(ve,Fe){var $e;ye?!(($e=_e._activeProviderReplies)===null||$e===void 0)&&$e.get(Fe)&&(Me=_e._checkLinkProviderResult(Fe,se,Me)):ve.provideLinks(se.y,function(Te){var ze,Ee;if(!_e._isMouseOut){var be=Te==null?void 0:Te.map(function(Re){return{link:Re}});(ze=_e._activeProviderReplies)===null||ze===void 0||ze.set(Fe,be),Me=_e._checkLinkProviderResult(Fe,se,Me),((Ee=_e._activeProviderReplies)===null||Ee===void 0?void 0:Ee.size)===_e._linkProviders.length&&_e._removeIntersectingLinks(se.y,_e._activeProviderReplies)}})})},me.prototype._removeIntersectingLinks=function(se,ye){for(var _e=new Set,Me=0;Me<ye.size;Me++){var ve=ye.get(Me);if(ve)for(var Fe=0;Fe<ve.length;Fe++)for(var $e=ve[Fe],Te=$e.link.range.start.y<se?0:$e.link.range.start.x,ze=$e.link.range.end.y>se?this._bufferService.cols:$e.link.range.end.x,Ee=Te;Ee<=ze;Ee++){if(_e.has(Ee)){ve.splice(Fe--,1);break}_e.add(Ee)}}},me.prototype._checkLinkProviderResult=function(se,ye,_e){var Me,ve=this;if(!this._activeProviderReplies)return _e;for(var Fe=this._activeProviderReplies.get(se),$e=!1,Te=0;Te<se;Te++)this._activeProviderReplies.has(Te)&&!this._activeProviderReplies.get(Te)||($e=!0);if(!$e&&Fe){var ze=Fe.find(function(be){return ve._linkAtPosition(be.link,ye)});ze&&(_e=!0,this._handleNewLink(ze))}if(this._activeProviderReplies.size===this._linkProviders.length&&!_e)for(Te=0;Te<this._activeProviderReplies.size;Te++){var Ee=(Me=this._activeProviderReplies.get(Te))===null||Me===void 0?void 0:Me.find(function(be){return ve._linkAtPosition(be.link,ye)});if(Ee){_e=!0,this._handleNewLink(Ee);break}}return _e},me.prototype._onClick=function(se){if(this._element&&this._mouseService&&this._currentLink){var ye=this._positionFromMouseEvent(se,this._element,this._mouseService);ye&&this._linkAtPosition(this._currentLink.link,ye)&&this._currentLink.link.activate(se,this._currentLink.link.text)}},me.prototype._clearCurrentLink=function(se,ye){this._element&&this._currentLink&&this._lastMouseEvent&&(!se||!ye||this._currentLink.link.range.start.y>=se&&this._currentLink.link.range.end.y<=ye)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,le.disposeArray(this._linkCacheDisposables))},me.prototype._handleNewLink=function(se){var ye=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var _e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_e&&this._linkAtPosition(se.link,_e)&&(this._currentLink=se,this._currentLink.state={decorations:{underline:se.link.decorations===void 0||se.link.decorations.underline,pointerCursor:se.link.decorations===void 0||se.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,se.link,this._lastMouseEvent),se.link.decorations={},Object.defineProperties(se.link.decorations,{pointerCursor:{get:function(){var Me,ve;return(ve=(Me=ye._currentLink)===null||Me===void 0?void 0:Me.state)===null||ve===void 0?void 0:ve.decorations.pointerCursor},set:function(Me){var ve,Fe;!((ve=ye._currentLink)===null||ve===void 0)&&ve.state&&ye._currentLink.state.decorations.pointerCursor!==Me&&(ye._currentLink.state.decorations.pointerCursor=Me,ye._currentLink.state.isHovered&&((Fe=ye._element)===null||Fe===void 0||Fe.classList.toggle("xterm-cursor-pointer",Me)))}},underline:{get:function(){var Me,ve;return(ve=(Me=ye._currentLink)===null||Me===void 0?void 0:Me.state)===null||ve===void 0?void 0:ve.decorations.underline},set:function(Me){var ve,Fe,$e;!((ve=ye._currentLink)===null||ve===void 0)&&ve.state&&(($e=(Fe=ye._currentLink)===null||Fe===void 0?void 0:Fe.state)===null||$e===void 0?void 0:$e.decorations.underline)!==Me&&(ye._currentLink.state.decorations.underline=Me,ye._currentLink.state.isHovered&&ye._fireUnderlineEvent(se.link,Me))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(Me){var ve=Me.start===0?0:Me.start+1+ye._bufferService.buffer.ydisp;ye._clearCurrentLink(ve,Me.end+1+ye._bufferService.buffer.ydisp)})))}},me.prototype._linkHover=function(se,ye,_e){var Me;!((Me=this._currentLink)===null||Me===void 0)&&Me.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ye,!0),this._currentLink.state.decorations.pointerCursor&&se.classList.add("xterm-cursor-pointer")),ye.hover&&ye.hover(_e,ye.text)},me.prototype._fireUnderlineEvent=function(se,ye){var _e=se.range,Me=this._bufferService.buffer.ydisp,ve=this._createLinkUnderlineEvent(_e.start.x-1,_e.start.y-Me-1,_e.end.x,_e.end.y-Me-1,void 0);(ye?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(ve)},me.prototype._linkLeave=function(se,ye,_e){var Me;!((Me=this._currentLink)===null||Me===void 0)&&Me.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ye,!1),this._currentLink.state.decorations.pointerCursor&&se.classList.remove("xterm-cursor-pointer")),ye.leave&&ye.leave(_e,ye.text)},me.prototype._linkAtPosition=function(se,ye){var _e=se.range.start.y===se.range.end.y,Me=se.range.start.y<ye.y,ve=se.range.end.y>ye.y;return(_e&&se.range.start.x<=ye.x&&se.range.end.x>=ye.x||Me&&se.range.end.x>=ye.x||ve&&se.range.start.x<=ye.x||Me&&ve)&&se.range.start.y<=ye.y&&se.range.end.y>=ye.y},me.prototype._positionFromMouseEvent=function(se,ye,_e){var Me=_e.getCoords(se,ye,this._bufferService.cols,this._bufferService.rows);if(Me)return{x:Me[0],y:Me[1]+this._bufferService.buffer.ydisp}},me.prototype._createLinkUnderlineEvent=function(se,ye,_e,Me,ve){return{x1:se,y1:ye,x2:_e,y2:Me,cols:this._bufferService.cols,fg:ve}},me=Ce([ce(0,fe.IBufferService)],me)}(le.Disposable);ee.Linkifier2=de},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreBrowserService=void 0;var Se=function(){function Le(Ce){this._textarea=Ce}return Object.defineProperty(Le.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Le}();ee.CoreBrowserService=Se},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(Te,ze){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ee,be){Ee.__proto__=be}||function(Ee,be){for(var Re in be)be.hasOwnProperty(Re)&&(Ee[Re]=be[Re])})(Te,ze)},function(Te,ze){function Ee(){this.constructor=Te}Se(Te,ze),Te.prototype=ze===null?Object.create(ze):(Ee.prototype=ze.prototype,new Ee)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreTerminal=void 0;var Ce=te(2),ce=te(1),fe=te(66),ae=te(67),le=te(68),re=te(74),de=te(75),he=te(0),me=te(76),se=te(77),ye=te(78),_e=te(80),Me=te(81),ve=te(19),Fe=te(82),$e=function(Te){function ze(Ee){var be=Te.call(this)||this;return be._onBinary=new he.EventEmitter,be._onData=new he.EventEmitter,be._onLineFeed=new he.EventEmitter,be._onResize=new he.EventEmitter,be._onScroll=new he.EventEmitter,be._instantiationService=new fe.InstantiationService,be.optionsService=new re.OptionsService(Ee),be._instantiationService.setService(ce.IOptionsService,be.optionsService),be._bufferService=be.register(be._instantiationService.createInstance(le.BufferService)),be._instantiationService.setService(ce.IBufferService,be._bufferService),be._logService=be._instantiationService.createInstance(ae.LogService),be._instantiationService.setService(ce.ILogService,be._logService),be._coreService=be.register(be._instantiationService.createInstance(de.CoreService,function(){return be.scrollToBottom()})),be._instantiationService.setService(ce.ICoreService,be._coreService),be._coreMouseService=be._instantiationService.createInstance(me.CoreMouseService),be._instantiationService.setService(ce.ICoreMouseService,be._coreMouseService),be._dirtyRowService=be._instantiationService.createInstance(se.DirtyRowService),be._instantiationService.setService(ce.IDirtyRowService,be._dirtyRowService),be.unicodeService=be._instantiationService.createInstance(ye.UnicodeService),be._instantiationService.setService(ce.IUnicodeService,be.unicodeService),be._charsetService=be._instantiationService.createInstance(_e.CharsetService),be._instantiationService.setService(ce.ICharsetService,be._charsetService),be._inputHandler=new ve.InputHandler(be._bufferService,be._charsetService,be._coreService,be._dirtyRowService,be._logService,be.optionsService,be._coreMouseService,be.unicodeService),be.register(he.forwardEvent(be._inputHandler.onLineFeed,be._onLineFeed)),be.register(be._inputHandler),be.register(he.forwardEvent(be._bufferService.onResize,be._onResize)),be.register(he.forwardEvent(be._coreService.onData,be._onData)),be.register(he.forwardEvent(be._coreService.onBinary,be._onBinary)),be.register(be.optionsService.onOptionChange(function(Re){return be._updateOptions(Re)})),be._writeBuffer=new Fe.WriteBuffer(function(Re){return be._inputHandler.parse(Re)}),be}return Le(ze,Te),Object.defineProperty(ze.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),ze.prototype.dispose=function(){var Ee;this._isDisposed||(Te.prototype.dispose.call(this),(Ee=this._windowsMode)===null||Ee===void 0||Ee.dispose(),this._windowsMode=void 0)},ze.prototype.write=function(Ee,be){this._writeBuffer.write(Ee,be)},ze.prototype.writeSync=function(Ee){this._writeBuffer.writeSync(Ee)},ze.prototype.resize=function(Ee,be){isNaN(Ee)||isNaN(be)||(Ee=Math.max(Ee,le.MINIMUM_COLS),be=Math.max(be,le.MINIMUM_ROWS),this._bufferService.resize(Ee,be))},ze.prototype.scroll=function(Ee,be){be===void 0&&(be=!1);var Re,De=this._bufferService.buffer;(Re=this._cachedBlankLine)&&Re.length===this.cols&&Re.getFg(0)===Ee.fg&&Re.getBg(0)===Ee.bg||(Re=De.getBlankLine(Ee,be),this._cachedBlankLine=Re),Re.isWrapped=be;var et=De.ybase+De.scrollTop,Ye=De.ybase+De.scrollBottom;if(De.scrollTop===0){var dt=De.lines.isFull;Ye===De.lines.length-1?dt?De.lines.recycle().copyFrom(Re):De.lines.push(Re.clone()):De.lines.splice(Ye+1,0,Re.clone()),dt?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Ke=Ye-et+1;De.lines.shiftElements(et+1,Ke-1,-1),De.lines.set(Ye,Re.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.ydisp)},ze.prototype.scrollLines=function(Ee,be){var Re=this._bufferService.buffer;if(Ee<0){if(Re.ydisp===0)return;this._bufferService.isUserScrolling=!0}else Ee+Re.ydisp>=Re.ybase&&(this._bufferService.isUserScrolling=!1);var De=Re.ydisp;Re.ydisp=Math.max(Math.min(Re.ydisp+Ee,Re.ybase),0),De!==Re.ydisp&&(be||this._onScroll.fire(Re.ydisp))},ze.prototype.scrollPages=function(Ee){this.scrollLines(Ee*(this.rows-1))},ze.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},ze.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},ze.prototype.scrollToLine=function(Ee){var be=Ee-this._bufferService.buffer.ydisp;be!==0&&this.scrollLines(be)},ze.prototype.addEscHandler=function(Ee,be){return this._inputHandler.addEscHandler(Ee,be)},ze.prototype.addDcsHandler=function(Ee,be){return this._inputHandler.addDcsHandler(Ee,be)},ze.prototype.addCsiHandler=function(Ee,be){return this._inputHandler.addCsiHandler(Ee,be)},ze.prototype.addOscHandler=function(Ee,be){return this._inputHandler.addOscHandler(Ee,be)},ze.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},ze.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},ze.prototype._updateOptions=function(Ee){var be;switch(Ee){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((be=this._windowsMode)===null||be===void 0||be.dispose(),this._windowsMode=void 0)}},ze.prototype._enableWindowsMode=function(){var Ee=this;if(!this._windowsMode){var be=[];be.push(this.onLineFeed(Me.updateWindowsModeWrappedState.bind(null,this._bufferService))),be.push(this.addCsiHandler({final:"H"},function(){return Me.updateWindowsModeWrappedState(Ee._bufferService),!1})),this._windowsMode={dispose:function(){for(var Re=0,De=be;Re<De.length;Re++)De[Re].dispose()}}}},ze}(Ce.Disposable);ee.CoreTerminal=$e},function(St,ee,te){"use strict";var Se=this&&this.__spreadArrays||function(){for(var ae=0,le=0,re=arguments.length;le<re;le++)ae+=arguments[le].length;var de=Array(ae),he=0;for(le=0;le<re;le++)for(var me=arguments[le],se=0,ye=me.length;se<ye;se++,he++)de[he]=me[se];return de};Object.defineProperty(ee,"__esModule",{value:!0}),ee.InstantiationService=ee.ServiceCollection=void 0;var Le=te(1),Ce=te(14),ce=function(){function ae(){for(var le=[],re=0;re<arguments.length;re++)le[re]=arguments[re];this._entries=new Map;for(var de=0,he=le;de<he.length;de++){var me=he[de],se=me[0],ye=me[1];this.set(se,ye)}}return ae.prototype.set=function(le,re){var de=this._entries.get(le);return this._entries.set(le,re),de},ae.prototype.forEach=function(le){this._entries.forEach(function(re,de){return le(de,re)})},ae.prototype.has=function(le){return this._entries.has(le)},ae.prototype.get=function(le){return this._entries.get(le)},ae}();ee.ServiceCollection=ce;var fe=function(){function ae(){this._services=new ce,this._services.set(Le.IInstantiationService,this)}return ae.prototype.setService=function(le,re){this._services.set(le,re)},ae.prototype.getService=function(le){return this._services.get(le)},ae.prototype.createInstance=function(le){for(var re=[],de=1;de<arguments.length;de++)re[de-1]=arguments[de];for(var he=Ce.getServiceDependencies(le).sort(function(Fe,$e){return Fe.index-$e.index}),me=[],se=0,ye=he;se<ye.length;se++){var _e=ye[se],Me=this._services.get(_e.id);if(!Me)throw new Error("[createInstance] "+le.name+" depends on UNKNOWN service "+_e.id+".");me.push(Me)}var ve=he.length>0?he[0].index:re.length;if(re.length!==ve)throw new Error("[createInstance] First service dependency of "+le.name+" at position "+(ve+1)+" conflicts with "+re.length+" static arguments");return new(le.bind.apply(le,Se([void 0],Se(re,me))))},ae}();ee.InstantiationService=fe},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(re,de,he,me){var se,ye=arguments.length,_e=ye<3?de:me===null?me=Object.getOwnPropertyDescriptor(de,he):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_e=Reflect.decorate(re,de,he,me);else for(var Me=re.length-1;Me>=0;Me--)(se=re[Me])&&(_e=(ye<3?se(_e):ye>3?se(de,he,_e):se(de,he))||_e);return ye>3&&_e&&Object.defineProperty(de,he,_e),_e},Le=this&&this.__param||function(re,de){return function(he,me){de(he,me,re)}},Ce=this&&this.__spreadArrays||function(){for(var re=0,de=0,he=arguments.length;de<he;de++)re+=arguments[de].length;var me=Array(re),se=0;for(de=0;de<he;de++)for(var ye=arguments[de],_e=0,Me=ye.length;_e<Me;_e++,se++)me[se]=ye[_e];return me};Object.defineProperty(ee,"__esModule",{value:!0}),ee.LogService=ee.LogLevel=void 0;var ce,fe=te(1);(function(re){re[re.DEBUG=0]="DEBUG",re[re.INFO=1]="INFO",re[re.WARN=2]="WARN",re[re.ERROR=3]="ERROR",re[re.OFF=4]="OFF"})(ce=ee.LogLevel||(ee.LogLevel={}));var ae={debug:ce.DEBUG,info:ce.INFO,warn:ce.WARN,error:ce.ERROR,off:ce.OFF},le=function(){function re(de){var he=this;this._optionsService=de,this._updateLogLevel(),this._optionsService.onOptionChange(function(me){me==="logLevel"&&he._updateLogLevel()})}return re.prototype._updateLogLevel=function(){this._logLevel=ae[this._optionsService.options.logLevel]},re.prototype._evalLazyOptionalParams=function(de){for(var he=0;he<de.length;he++)typeof de[he]=="function"&&(de[he]=de[he]())},re.prototype._log=function(de,he,me){this._evalLazyOptionalParams(me),de.call.apply(de,Ce([console,"xterm.js: "+he],me))},re.prototype.debug=function(de){for(var he=[],me=1;me<arguments.length;me++)he[me-1]=arguments[me];this._logLevel<=ce.DEBUG&&this._log(console.log,de,he)},re.prototype.info=function(de){for(var he=[],me=1;me<arguments.length;me++)he[me-1]=arguments[me];this._logLevel<=ce.INFO&&this._log(console.info,de,he)},re.prototype.warn=function(de){for(var he=[],me=1;me<arguments.length;me++)he[me-1]=arguments[me];this._logLevel<=ce.WARN&&this._log(console.warn,de,he)},re.prototype.error=function(de){for(var he=[],me=1;me<arguments.length;me++)he[me-1]=arguments[me];this._logLevel<=ce.ERROR&&this._log(console.error,de,he)},re=Se([Le(0,fe.IOptionsService)],re)}();ee.LogService=le},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(he,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,ye){se.__proto__=ye}||function(se,ye){for(var _e in ye)ye.hasOwnProperty(_e)&&(se[_e]=ye[_e])})(he,me)},function(he,me){function se(){this.constructor=he}Se(he,me),he.prototype=me===null?Object.create(me):(se.prototype=me.prototype,new se)}),Ce=this&&this.__decorate||function(he,me,se,ye){var _e,Me=arguments.length,ve=Me<3?me:ye===null?ye=Object.getOwnPropertyDescriptor(me,se):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(he,me,se,ye);else for(var Fe=he.length-1;Fe>=0;Fe--)(_e=he[Fe])&&(ve=(Me<3?_e(ve):Me>3?_e(me,se,ve):_e(me,se))||ve);return Me>3&&ve&&Object.defineProperty(me,se,ve),ve},ce=this&&this.__param||function(he,me){return function(se,ye){me(se,ye,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferService=ee.MINIMUM_ROWS=ee.MINIMUM_COLS=void 0;var fe=te(1),ae=te(69),le=te(0),re=te(2);ee.MINIMUM_COLS=2,ee.MINIMUM_ROWS=1;var de=function(he){function me(se){var ye=he.call(this)||this;return ye._optionsService=se,ye.isUserScrolling=!1,ye._onResize=new le.EventEmitter,ye.cols=Math.max(se.options.cols,ee.MINIMUM_COLS),ye.rows=Math.max(se.options.rows,ee.MINIMUM_ROWS),ye.buffers=new ae.BufferSet(se,ye),ye}return Le(me,he),Object.defineProperty(me.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){he.prototype.dispose.call(this),this.buffers.dispose()},me.prototype.resize=function(se,ye){this.cols=se,this.rows=ye,this.buffers.resize(se,ye),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:se,rows:ye})},me.prototype.reset=function(){this.buffers.dispose(),this.buffers=new ae.BufferSet(this._optionsService,this),this.isUserScrolling=!1},me=Ce([ce(0,fe.IOptionsService)],me)}(re.Disposable);ee.BufferService=de},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(ae,le){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,de){re.__proto__=de}||function(re,de){for(var he in de)de.hasOwnProperty(he)&&(re[he]=de[he])})(ae,le)},function(ae,le){function re(){this.constructor=ae}Se(ae,le),ae.prototype=le===null?Object.create(le):(re.prototype=le.prototype,new re)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferSet=void 0;var Ce=te(70),ce=te(0),fe=function(ae){function le(re,de){var he=ae.call(this)||this;return he._onBufferActivate=he.register(new ce.EventEmitter),he._normal=new Ce.Buffer(!0,re,de),he._normal.fillViewportRows(),he._alt=new Ce.Buffer(!1,re,de),he._activeBuffer=he._normal,he.setupTabStops(),he}return Le(le,ae),Object.defineProperty(le.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),le.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},le.prototype.activateAltBuffer=function(re){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(re),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},le.prototype.resize=function(re,de){this._normal.resize(re,de),this._alt.resize(re,de)},le.prototype.setupTabStops=function(re){this._normal.setupTabStops(re),this._alt.setupTabStops(re)},le}(te(2).Disposable);ee.BufferSet=fe},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.BufferStringIterator=ee.Buffer=ee.MAX_BUFFER_SIZE=void 0;var Se=te(71),Le=te(16),Ce=te(4),ce=te(3),fe=te(72),ae=te(73),le=te(20),re=te(6);ee.MAX_BUFFER_SIZE=4294967295;var de=function(){function me(se,ye,_e){this._hasScrollback=se,this._optionsService=ye,this._bufferService=_e,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Le.DEFAULT_ATTR_DATA.clone(),this.savedCharset=le.DEFAULT_CHARSET,this.markers=[],this._nullCell=Ce.CellData.fromCharData([0,ce.NULL_CELL_CHAR,ce.NULL_CELL_WIDTH,ce.NULL_CELL_CODE]),this._whitespaceCell=Ce.CellData.fromCharData([0,ce.WHITESPACE_CELL_CHAR,ce.WHITESPACE_CELL_WIDTH,ce.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return me.prototype.getNullCell=function(se){return se?(this._nullCell.fg=se.fg,this._nullCell.bg=se.bg,this._nullCell.extended=se.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new re.ExtendedAttrs),this._nullCell},me.prototype.getWhitespaceCell=function(se){return se?(this._whitespaceCell.fg=se.fg,this._whitespaceCell.bg=se.bg,this._whitespaceCell.extended=se.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new re.ExtendedAttrs),this._whitespaceCell},me.prototype.getBlankLine=function(se,ye){return new Le.BufferLine(this._bufferService.cols,this.getNullCell(se),ye)},Object.defineProperty(me.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"isCursorInViewport",{get:function(){var se=this.ybase+this.y-this.ydisp;return se>=0&&se<this._rows},enumerable:!1,configurable:!0}),me.prototype._getCorrectBufferLength=function(se){if(!this._hasScrollback)return se;var ye=se+this._optionsService.options.scrollback;return ye>ee.MAX_BUFFER_SIZE?ee.MAX_BUFFER_SIZE:ye},me.prototype.fillViewportRows=function(se){if(this.lines.length===0){se===void 0&&(se=Le.DEFAULT_ATTR_DATA);for(var ye=this._rows;ye--;)this.lines.push(this.getBlankLine(se))}},me.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},me.prototype.resize=function(se,ye){var _e=this.getNullCell(Le.DEFAULT_ATTR_DATA),Me=this._getCorrectBufferLength(ye);if(Me>this.lines.maxLength&&(this.lines.maxLength=Me),this.lines.length>0){if(this._cols<se)for(var ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(se,_e);var Fe=0;if(this._rows<ye)for(var $e=this._rows;$e<ye;$e++)this.lines.length<ye+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Le.BufferLine(se,_e)):this.ybase>0&&this.lines.length<=this.ybase+this.y+Fe+1?(this.ybase--,Fe++,this.ydisp>0&&this.ydisp--):this.lines.push(new Le.BufferLine(se,_e)));else for($e=this._rows;$e>ye;$e--)this.lines.length>ye+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(Me<this.lines.maxLength){var Te=this.lines.length-Me;Te>0&&(this.lines.trimStart(Te),this.ybase=Math.max(this.ybase-Te,0),this.ydisp=Math.max(this.ydisp-Te,0),this.savedY=Math.max(this.savedY-Te,0)),this.lines.maxLength=Me}this.x=Math.min(this.x,se-1),this.y=Math.min(this.y,ye-1),Fe&&(this.y+=Fe),this.savedX=Math.min(this.savedX,se-1),this.scrollTop=0}if(this.scrollBottom=ye-1,this._isReflowEnabled&&(this._reflow(se,ye),this._cols>se))for(ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(se,_e);this._cols=se,this._rows=ye},Object.defineProperty(me.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),me.prototype._reflow=function(se,ye){this._cols!==se&&(se>this._cols?this._reflowLarger(se,ye):this._reflowSmaller(se,ye))},me.prototype._reflowLarger=function(se,ye){var _e=fe.reflowLargerGetLinesToRemove(this.lines,this._cols,se,this.ybase+this.y,this.getNullCell(Le.DEFAULT_ATTR_DATA));if(_e.length>0){var Me=fe.reflowLargerCreateNewLayout(this.lines,_e);fe.reflowLargerApplyNewLayout(this.lines,Me.layout),this._reflowLargerAdjustViewport(se,ye,Me.countRemoved)}},me.prototype._reflowLargerAdjustViewport=function(se,ye,_e){for(var Me=this.getNullCell(Le.DEFAULT_ATTR_DATA),ve=_e;ve-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ye&&this.lines.push(new Le.BufferLine(se,Me))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_e,0)},me.prototype._reflowSmaller=function(se,ye){for(var _e=this.getNullCell(Le.DEFAULT_ATTR_DATA),Me=[],ve=0,Fe=this.lines.length-1;Fe>=0;Fe--){var $e=this.lines.get(Fe);if(!(!$e||!$e.isWrapped&&$e.getTrimmedLength()<=se)){for(var Te=[$e];$e.isWrapped&&Fe>0;)$e=this.lines.get(--Fe),Te.unshift($e);var ze=this.ybase+this.y;if(!(ze>=Fe&&ze<Fe+Te.length)){var Ee=Te[Te.length-1].getTrimmedLength(),be=fe.reflowSmallerGetNewLineLengths(Te,this._cols,se),Re=be.length-Te.length,De=void 0;De=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Re):Math.max(0,this.lines.length-this.lines.maxLength+Re);for(var et=[],Ye=0;Ye<Re;Ye++){var dt=this.getBlankLine(Le.DEFAULT_ATTR_DATA,!0);et.push(dt)}et.length>0&&(Me.push({start:Fe+Te.length+ve,newLines:et}),ve+=et.length),Te.push.apply(Te,et);var Ke=be.length-1,zt=be[Ke];zt===0&&(zt=be[--Ke]);for(var pt=Te.length-Re-1,Kt=Ee;pt>=0;){var Ze=Math.min(Kt,zt);if(Te[Ke].copyCellsFrom(Te[pt],Kt-Ze,zt-Ze,Ze,!0),(zt-=Ze)===0&&(zt=be[--Ke]),(Kt-=Ze)===0){pt--;var tt=Math.max(pt,0);Kt=fe.getWrappedLineTrimmedLength(Te,tt,this._cols)}}for(Ye=0;Ye<Te.length;Ye++)be[Ye]<se&&Te[Ye].setCell(be[Ye],_e);for(var ft=Re-De;ft-- >0;)this.ybase===0?this.y<ye-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+ve)-ye&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Re,this.ybase+ye-1)}}}if(Me.length>0){var Ut=[],nt=[];for(Ye=0;Ye<this.lines.length;Ye++)nt.push(this.lines.get(Ye));var Ge=this.lines.length,jt=Ge-1,yn=0,ln=Me[yn];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+ve);var Tt=0;for(Ye=Math.min(this.lines.maxLength-1,Ge+ve-1);Ye>=0;Ye--)if(ln&&ln.start>jt+Tt){for(var Lt=ln.newLines.length-1;Lt>=0;Lt--)this.lines.set(Ye--,ln.newLines[Lt]);Ye++,Ut.push({index:jt+1,amount:ln.newLines.length}),Tt+=ln.newLines.length,ln=Me[++yn]}else this.lines.set(Ye,nt[jt--]);var Jt=0;for(Ye=Ut.length-1;Ye>=0;Ye--)Ut[Ye].index+=Jt,this.lines.onInsertEmitter.fire(Ut[Ye]),Jt+=Ut[Ye].amount;var kn=Math.max(0,Ge+ve-this.lines.maxLength);kn>0&&this.lines.onTrimEmitter.fire(kn)}},me.prototype.stringIndexToBufferIndex=function(se,ye,_e){for(_e===void 0&&(_e=!1);ye;){var Me=this.lines.get(se);if(!Me)return[-1,-1];for(var ve=_e?Me.getTrimmedLength():Me.length,Fe=0;Fe<ve;++Fe)if(Me.get(Fe)[ce.CHAR_DATA_WIDTH_INDEX]&&(ye-=Me.get(Fe)[ce.CHAR_DATA_CHAR_INDEX].length||1),ye<0)return[se,Fe];se++}return[se,0]},me.prototype.translateBufferLineToString=function(se,ye,_e,Me){_e===void 0&&(_e=0);var ve=this.lines.get(se);return ve?ve.translateToString(ye,_e,Me):""},me.prototype.getWrappedRangeForLine=function(se){for(var ye=se,_e=se;ye>0&&this.lines.get(ye).isWrapped;)ye--;for(;_e+1<this.lines.length&&this.lines.get(_e+1).isWrapped;)_e++;return{first:ye,last:_e}},me.prototype.setupTabStops=function(se){for(se!=null?this.tabs[se]||(se=this.prevStop(se)):(this.tabs={},se=0);se<this._cols;se+=this._optionsService.options.tabStopWidth)this.tabs[se]=!0},me.prototype.prevStop=function(se){for(se==null&&(se=this.x);!this.tabs[--se]&&se>0;);return se>=this._cols?this._cols-1:se<0?0:se},me.prototype.nextStop=function(se){for(se==null&&(se=this.x);!this.tabs[++se]&&se<this._cols;);return se>=this._cols?this._cols-1:se<0?0:se},me.prototype.addMarker=function(se){var ye=this,_e=new ae.Marker(se);return this.markers.push(_e),_e.register(this.lines.onTrim(function(Me){_e.line-=Me,_e.line<0&&_e.dispose()})),_e.register(this.lines.onInsert(function(Me){_e.line>=Me.index&&(_e.line+=Me.amount)})),_e.register(this.lines.onDelete(function(Me){_e.line>=Me.index&&_e.line<Me.index+Me.amount&&_e.dispose(),_e.line>Me.index&&(_e.line-=Me.amount)})),_e.register(_e.onDispose(function(){return ye._removeMarker(_e)})),_e},me.prototype._removeMarker=function(se){this.markers.splice(this.markers.indexOf(se),1)},me.prototype.iterator=function(se,ye,_e,Me,ve){return new he(this,se,ye,_e,Me,ve)},me}();ee.Buffer=de;var he=function(){function me(se,ye,_e,Me,ve,Fe){_e===void 0&&(_e=0),Me===void 0&&(Me=se.lines.length),ve===void 0&&(ve=0),Fe===void 0&&(Fe=0),this._buffer=se,this._trimRight=ye,this._startIndex=_e,this._endIndex=Me,this._startOverscan=ve,this._endOverscan=Fe,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return me.prototype.hasNext=function(){return this._current<this._endIndex},me.prototype.next=function(){var se=this._buffer.getWrappedRangeForLine(this._current);se.first<this._startIndex-this._startOverscan&&(se.first=this._startIndex-this._startOverscan),se.last>this._endIndex+this._endOverscan&&(se.last=this._endIndex+this._endOverscan),se.first=Math.max(se.first,0),se.last=Math.min(se.last,this._buffer.lines.length);for(var ye="",_e=se.first;_e<=se.last;++_e)ye+=this._buffer.translateBufferLineToString(_e,this._trimRight);return this._current=se.last+1,{range:se,content:ye}},me}();ee.BufferStringIterator=he},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CircularList=void 0;var Se=te(0),Le=function(){function Ce(ce){this._maxLength=ce,this.onDeleteEmitter=new Se.EventEmitter,this.onInsertEmitter=new Se.EventEmitter,this.onTrimEmitter=new Se.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(Ce.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"maxLength",{get:function(){return this._maxLength},set:function(ce){if(this._maxLength!==ce){for(var fe=new Array(ce),ae=0;ae<Math.min(ce,this.length);ae++)fe[ae]=this._array[this._getCyclicIndex(ae)];this._array=fe,this._maxLength=ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"length",{get:function(){return this._length},set:function(ce){if(ce>this._length)for(var fe=this._length;fe<ce;fe++)this._array[fe]=void 0;this._length=ce},enumerable:!1,configurable:!0}),Ce.prototype.get=function(ce){return this._array[this._getCyclicIndex(ce)]},Ce.prototype.set=function(ce,fe){this._array[this._getCyclicIndex(ce)]=fe},Ce.prototype.push=function(ce){this._array[this._getCyclicIndex(this._length)]=ce,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},Ce.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(Ce.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Ce.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Ce.prototype.splice=function(ce,fe){for(var ae=[],le=2;le<arguments.length;le++)ae[le-2]=arguments[le];if(fe){for(var re=ce;re<this._length-fe;re++)this._array[this._getCyclicIndex(re)]=this._array[this._getCyclicIndex(re+fe)];this._length-=fe}for(re=this._length-1;re>=ce;re--)this._array[this._getCyclicIndex(re+ae.length)]=this._array[this._getCyclicIndex(re)];for(re=0;re<ae.length;re++)this._array[this._getCyclicIndex(ce+re)]=ae[re];if(this._length+ae.length>this._maxLength){var de=this._length+ae.length-this._maxLength;this._startIndex+=de,this._length=this._maxLength,this.onTrimEmitter.fire(de)}else this._length+=ae.length},Ce.prototype.trimStart=function(ce){ce>this._length&&(ce=this._length),this._startIndex+=ce,this._length-=ce,this.onTrimEmitter.fire(ce)},Ce.prototype.shiftElements=function(ce,fe,ae){if(!(fe<=0)){if(ce<0||ce>=this._length)throw new Error("start argument out of range");if(ce+ae<0)throw new Error("Cannot shift elements in list beyond index 0");if(ae>0){for(var le=fe-1;le>=0;le--)this.set(ce+le+ae,this.get(ce+le));var re=ce+fe+ae-this._length;if(re>0)for(this._length+=re;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(le=0;le<fe;le++)this.set(ce+le+ae,this.get(ce+le))}},Ce.prototype._getCyclicIndex=function(ce){return(this._startIndex+ce)%this._maxLength},Ce}();ee.CircularList=Le},function(St,ee,te){"use strict";function Se(Le,Ce,ce){if(Ce===Le.length-1)return Le[Ce].getTrimmedLength();var fe=!Le[Ce].hasContent(ce-1)&&Le[Ce].getWidth(ce-1)===1,ae=Le[Ce+1].getWidth(0)===2;return fe&&ae?ce-1:ce}Object.defineProperty(ee,"__esModule",{value:!0}),ee.getWrappedLineTrimmedLength=ee.reflowSmallerGetNewLineLengths=ee.reflowLargerApplyNewLayout=ee.reflowLargerCreateNewLayout=ee.reflowLargerGetLinesToRemove=void 0,ee.reflowLargerGetLinesToRemove=function(Le,Ce,ce,fe,ae){for(var le=[],re=0;re<Le.length-1;re++){var de=re,he=Le.get(++de);if(he.isWrapped){for(var me=[Le.get(re)];de<Le.length&&he.isWrapped;)me.push(he),he=Le.get(++de);if(fe>=re&&fe<de)re+=me.length-1;else{for(var se=0,ye=Se(me,se,Ce),_e=1,Me=0;_e<me.length;){var ve=Se(me,_e,Ce),Fe=ve-Me,$e=ce-ye,Te=Math.min(Fe,$e);me[se].copyCellsFrom(me[_e],Me,ye,Te,!1),(ye+=Te)===ce&&(se++,ye=0),(Me+=Te)===ve&&(_e++,Me=0),ye===0&&se!==0&&me[se-1].getWidth(ce-1)===2&&(me[se].copyCellsFrom(me[se-1],ce-1,ye++,1,!1),me[se-1].setCell(ce-1,ae))}me[se].replaceCells(ye,ce,ae);for(var ze=0,Ee=me.length-1;Ee>0&&(Ee>se||me[Ee].getTrimmedLength()===0);Ee--)ze++;ze>0&&(le.push(re+me.length-ze),le.push(ze)),re+=me.length-1}}}return le},ee.reflowLargerCreateNewLayout=function(Le,Ce){for(var ce=[],fe=0,ae=Ce[fe],le=0,re=0;re<Le.length;re++)if(ae===re){var de=Ce[++fe];Le.onDeleteEmitter.fire({index:re-le,amount:de}),re+=de-1,le+=de,ae=Ce[++fe]}else ce.push(re);return{layout:ce,countRemoved:le}},ee.reflowLargerApplyNewLayout=function(Le,Ce){for(var ce=[],fe=0;fe<Ce.length;fe++)ce.push(Le.get(Ce[fe]));for(fe=0;fe<ce.length;fe++)Le.set(fe,ce[fe]);Le.length=Ce.length},ee.reflowSmallerGetNewLineLengths=function(Le,Ce,ce){for(var fe=[],ae=Le.map(function(ye,_e){return Se(Le,_e,Ce)}).reduce(function(ye,_e){return ye+_e}),le=0,re=0,de=0;de<ae;){if(ae-de<ce){fe.push(ae-de);break}le+=ce;var he=Se(Le,re,Ce);le>he&&(le-=he,re++);var me=Le[re].getWidth(le-1)===2;me&&le--;var se=me?ce-1:ce;fe.push(se),de+=se}return fe},ee.getWrappedLineTrimmedLength=Se},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(fe,ae){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,re){le.__proto__=re}||function(le,re){for(var de in re)re.hasOwnProperty(de)&&(le[de]=re[de])})(fe,ae)},function(fe,ae){function le(){this.constructor=fe}Se(fe,ae),fe.prototype=ae===null?Object.create(ae):(le.prototype=ae.prototype,new le)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.Marker=void 0;var Ce=te(0),ce=function(fe){function ae(le){var re=fe.call(this)||this;return re.line=le,re._id=ae._nextId++,re.isDisposed=!1,re._onDispose=new Ce.EventEmitter,re}return Le(ae,fe),Object.defineProperty(ae.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},ae._nextId=1,ae}(te(2).Disposable);ee.Marker=ce},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.OptionsService=ee.DEFAULT_OPTIONS=ee.DEFAULT_BELL_SOUND=void 0;var Se=te(0),Le=te(11),Ce=te(33);ee.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",ee.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:ee.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Le.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var ce=["cols","rows"],fe=function(){function ae(le){this._onOptionChange=new Se.EventEmitter,this.options=Ce.clone(ee.DEFAULT_OPTIONS);for(var re=0,de=Object.keys(le);re<de.length;re++){var he=de[re];if(he in this.options){var me=le[he];this.options[he]=me}}}return Object.defineProperty(ae.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),ae.prototype.setOption=function(le,re){if(!(le in ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+le+'"');if(ce.indexOf(le)!==-1)throw new Error('Option "'+le+'" can only be set in the constructor');this.options[le]!==re&&(re=this._sanitizeAndValidateOption(le,re),this.options[le]!==re&&(this.options[le]=re,this._onOptionChange.fire(le)))},ae.prototype._sanitizeAndValidateOption=function(le,re){switch(le){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":re||(re=ee.DEFAULT_OPTIONS[le]);break;case"cursorWidth":re=Math.floor(re);case"lineHeight":case"tabStopWidth":if(re<1)throw new Error(le+" cannot be less than 1, value: "+re);break;case"minimumContrastRatio":re=Math.max(1,Math.min(21,Math.round(10*re)/10));break;case"scrollback":if((re=Math.min(re,4294967295))<0)throw new Error(le+" cannot be less than 0, value: "+re);break;case"fastScrollSensitivity":case"scrollSensitivity":if(re<=0)throw new Error(le+" cannot be less than or equal to 0, value: "+re)}return re},ae.prototype.getOption=function(le){if(!(le in ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+le+'"');return this.options[le]},ae}();ee.OptionsService=fe},function(St,ee,te){"use strict";var Se,Le=this&&this.__extends||(Se=function(se,ye){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_e,Me){_e.__proto__=Me}||function(_e,Me){for(var ve in Me)Me.hasOwnProperty(ve)&&(_e[ve]=Me[ve])})(se,ye)},function(se,ye){function _e(){this.constructor=se}Se(se,ye),se.prototype=ye===null?Object.create(ye):(_e.prototype=ye.prototype,new _e)}),Ce=this&&this.__decorate||function(se,ye,_e,Me){var ve,Fe=arguments.length,$e=Fe<3?ye:Me===null?Me=Object.getOwnPropertyDescriptor(ye,_e):Me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$e=Reflect.decorate(se,ye,_e,Me);else for(var Te=se.length-1;Te>=0;Te--)(ve=se[Te])&&($e=(Fe<3?ve($e):Fe>3?ve(ye,_e,$e):ve(ye,_e))||$e);return Fe>3&&$e&&Object.defineProperty(ye,_e,$e),$e},ce=this&&this.__param||function(se,ye){return function(_e,Me){ye(_e,Me,se)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreService=void 0;var fe=te(1),ae=te(0),le=te(33),re=te(2),de=Object.freeze({insertMode:!1}),he=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),me=function(se){function ye(_e,Me,ve,Fe){var $e=se.call(this)||this;return $e._bufferService=Me,$e._logService=ve,$e._optionsService=Fe,$e.isCursorInitialized=!1,$e.isCursorHidden=!1,$e._onData=$e.register(new ae.EventEmitter),$e._onUserInput=$e.register(new ae.EventEmitter),$e._onBinary=$e.register(new ae.EventEmitter),$e._scrollToBottom=_e,$e.register({dispose:function(){return $e._scrollToBottom=void 0}}),$e.modes=le.clone(de),$e.decPrivateModes=le.clone(he),$e}return Le(ye,se),Object.defineProperty(ye.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ye.prototype.reset=function(){this.modes=le.clone(de),this.decPrivateModes=le.clone(he)},ye.prototype.triggerDataEvent=function(_e,Me){if(Me===void 0&&(Me=!1),!this._optionsService.options.disableStdin){var ve=this._bufferService.buffer;ve.ybase!==ve.ydisp&&this._scrollToBottom(),Me&&this._onUserInput.fire(),this._logService.debug('sending data "'+_e+'"',function(){return _e.split("").map(function(Fe){return Fe.charCodeAt(0)})}),this._onData.fire(_e)}},ye.prototype.triggerBinaryEvent=function(_e){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+_e+'"',function(){return _e.split("").map(function(Me){return Me.charCodeAt(0)})}),this._onBinary.fire(_e))},ye=Ce([ce(1,fe.IBufferService),ce(2,fe.ILogService),ce(3,fe.IOptionsService)],ye)}(re.Disposable);ee.CoreService=me},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(he,me,se,ye){var _e,Me=arguments.length,ve=Me<3?me:ye===null?ye=Object.getOwnPropertyDescriptor(me,se):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(he,me,se,ye);else for(var Fe=he.length-1;Fe>=0;Fe--)(_e=he[Fe])&&(ve=(Me<3?_e(ve):Me>3?_e(me,se,ve):_e(me,se))||ve);return Me>3&&ve&&Object.defineProperty(me,se,ve),ve},Le=this&&this.__param||function(he,me){return function(se,ye){me(se,ye,he)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.CoreMouseService=void 0;var Ce=te(1),ce=te(0),fe={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(he){return he.button!==4&&he.action===1&&(he.ctrl=!1,he.alt=!1,he.shift=!1,!0)}},VT200:{events:19,restrict:function(he){return he.action!==32}},DRAG:{events:23,restrict:function(he){return he.action!==32||he.button!==3}},ANY:{events:31,restrict:function(he){return!0}}};function ae(he,me){var se=(he.ctrl?16:0)|(he.shift?4:0)|(he.alt?8:0);return he.button===4?(se|=64,se|=he.action):(se|=3&he.button,4&he.button&&(se|=64),8&he.button&&(se|=128),he.action===32?se|=32:he.action!==0||me||(se|=3)),se}var le=String.fromCharCode,re={DEFAULT:function(he){var me=[ae(he,!1)+32,he.col+32,he.row+32];return me[0]>255||me[1]>255||me[2]>255?"":"\x1B[M"+le(me[0])+le(me[1])+le(me[2])},SGR:function(he){var me=he.action===0&&he.button!==4?"m":"M";return"\x1B[<"+ae(he,!0)+";"+he.col+";"+he.row+me}},de=function(){function he(me,se){this._bufferService=me,this._coreService=se,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new ce.EventEmitter,this._lastEvent=null;for(var ye=0,_e=Object.keys(fe);ye<_e.length;ye++){var Me=_e[ye];this.addProtocol(Me,fe[Me])}for(var ve=0,Fe=Object.keys(re);ve<Fe.length;ve++){var $e=Fe[ve];this.addEncoding($e,re[$e])}this.reset()}return he.prototype.addProtocol=function(me,se){this._protocols[me]=se},he.prototype.addEncoding=function(me,se){this._encodings[me]=se},Object.defineProperty(he.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(me){if(!this._protocols[me])throw new Error('unknown protocol "'+me+'"');this._activeProtocol=me,this._onProtocolChange.fire(this._protocols[me].events)},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(me){if(!this._encodings[me])throw new Error('unknown encoding "'+me+'"');this._activeEncoding=me},enumerable:!1,configurable:!0}),he.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(he.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),he.prototype.triggerMouseEvent=function(me){if(me.col<0||me.col>=this._bufferService.cols||me.row<0||me.row>=this._bufferService.rows||me.button===4&&me.action===32||me.button===3&&me.action!==32||me.button!==4&&(me.action===2||me.action===3)||(me.col++,me.row++,me.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,me))||!this._protocols[this._activeProtocol].restrict(me))return!1;var se=this._encodings[this._activeEncoding](me);return se&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(se):this._coreService.triggerDataEvent(se,!0)),this._lastEvent=me,!0},he.prototype.explainEvents=function(me){return{down:!!(1&me),up:!!(2&me),drag:!!(4&me),move:!!(8&me),wheel:!!(16&me)}},he.prototype._compareEvents=function(me,se){return me.col===se.col&&me.row===se.row&&me.button===se.button&&me.action===se.action&&me.ctrl===se.ctrl&&me.alt===se.alt&&me.shift===se.shift},he=Se([Le(0,Ce.IBufferService),Le(1,Ce.ICoreService)],he)}();ee.CoreMouseService=de},function(St,ee,te){"use strict";var Se=this&&this.__decorate||function(fe,ae,le,re){var de,he=arguments.length,me=he<3?ae:re===null?re=Object.getOwnPropertyDescriptor(ae,le):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(fe,ae,le,re);else for(var se=fe.length-1;se>=0;se--)(de=fe[se])&&(me=(he<3?de(me):he>3?de(ae,le,me):de(ae,le))||me);return he>3&&me&&Object.defineProperty(ae,le,me),me},Le=this&&this.__param||function(fe,ae){return function(le,re){ae(le,re,fe)}};Object.defineProperty(ee,"__esModule",{value:!0}),ee.DirtyRowService=void 0;var Ce=te(1),ce=function(){function fe(ae){this._bufferService=ae,this.clearRange()}return Object.defineProperty(fe.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),fe.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},fe.prototype.markDirty=function(ae){ae<this._start?this._start=ae:ae>this._end&&(this._end=ae)},fe.prototype.markRangeDirty=function(ae,le){if(ae>le){var re=ae;ae=le,le=re}ae<this._start&&(this._start=ae),le>this._end&&(this._end=le)},fe.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},fe=Se([Le(0,Ce.IBufferService)],fe)}();ee.DirtyRowService=ce},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.UnicodeService=void 0;var Se=te(0),Le=te(79),Ce=function(){function ce(){this._providers=Object.create(null),this._active="",this._onChange=new Se.EventEmitter;var fe=new Le.UnicodeV6;this.register(fe),this._active=fe.version,this._activeProvider=fe}return Object.defineProperty(ce.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"activeVersion",{get:function(){return this._active},set:function(fe){if(!this._providers[fe])throw new Error('unknown Unicode version "'+fe+'"');this._active=fe,this._activeProvider=this._providers[fe],this._onChange.fire(fe)},enumerable:!1,configurable:!0}),ce.prototype.register=function(fe){this._providers[fe.version]=fe},ce.prototype.wcwidth=function(fe){return this._activeProvider.wcwidth(fe)},ce.prototype.getStringCellWidth=function(fe){for(var ae=0,le=fe.length,re=0;re<le;++re){var de=fe.charCodeAt(re);if(55296<=de&&de<=56319){if(++re>=le)return ae+this.wcwidth(de);var he=fe.charCodeAt(re);56320<=he&&he<=57343?de=1024*(de-55296)+he-56320+65536:ae+=this.wcwidth(he)}ae+=this.wcwidth(de)}return ae},ce}();ee.UnicodeService=Ce},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.UnicodeV6=void 0;var Se,Le=te(15),Ce=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],ce=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],fe=function(){function ae(){if(this.version="6",!Se){Se=new Uint8Array(65536),Le.fill(Se,1),Se[0]=0,Le.fill(Se,0,1,32),Le.fill(Se,0,127,160),Le.fill(Se,2,4352,4448),Se[9001]=2,Se[9002]=2,Le.fill(Se,2,11904,42192),Se[12351]=1,Le.fill(Se,2,44032,55204),Le.fill(Se,2,63744,64256),Le.fill(Se,2,65040,65050),Le.fill(Se,2,65072,65136),Le.fill(Se,2,65280,65377),Le.fill(Se,2,65504,65511);for(var le=0;le<Ce.length;++le)Le.fill(Se,0,Ce[le][0],Ce[le][1]+1)}}return ae.prototype.wcwidth=function(le){return le<32?0:le<127?1:le<65536?Se[le]:function(re,de){var he,me=0,se=de.length-1;if(re<de[0][0]||re>de[se][1])return!1;for(;se>=me;)if(re>de[he=me+se>>1][1])me=he+1;else{if(!(re<de[he][0]))return!0;se=he-1}return!1}(le,ce)?0:le>=131072&&le<=196605||le>=196608&&le<=262141?2:1},ae}();ee.UnicodeV6=fe},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.CharsetService=void 0;var Se=function(){function Le(){this.glevel=0,this._charsets=[]}return Le.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Le.prototype.setgLevel=function(Ce){this.glevel=Ce,this.charset=this._charsets[Ce]},Le.prototype.setgCharset=function(Ce,ce){this._charsets[Ce]=ce,this.glevel===Ce&&(this.charset=ce)},Le}();ee.CharsetService=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.updateWindowsModeWrappedState=void 0;var Se=te(3);ee.updateWindowsModeWrappedState=function(Le){var Ce=Le.buffer.lines.get(Le.buffer.ybase+Le.buffer.y-1),ce=Ce==null?void 0:Ce.get(Le.cols-1),fe=Le.buffer.lines.get(Le.buffer.ybase+Le.buffer.y);fe&&ce&&(fe.isWrapped=ce[Se.CHAR_DATA_CODE_INDEX]!==Se.NULL_CELL_CODE&&ce[Se.CHAR_DATA_CODE_INDEX]!==Se.WHITESPACE_CELL_CODE)}},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.WriteBuffer=void 0;var Se=function(){function Le(Ce){this._action=Ce,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Le.prototype.writeSync=function(Ce){if(this._writeBuffer.length){for(var ce=this._bufferOffset;ce<this._writeBuffer.length;++ce){var fe=this._writeBuffer[ce],ae=this._callbacks[ce];this._action(fe),ae&&ae()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Ce)},Le.prototype.write=function(Ce,ce){var fe=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return fe._innerWrite()})),this._pendingData+=Ce.length,this._writeBuffer.push(Ce),this._callbacks.push(ce)},Le.prototype._innerWrite=function(){for(var Ce=this,ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var fe=this._writeBuffer[this._bufferOffset],ae=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(fe),this._pendingData-=fe.length,ae&&ae(),Date.now()-ce>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return Ce._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Le}();ee.WriteBuffer=Se},function(St,ee,te){"use strict";Object.defineProperty(ee,"__esModule",{value:!0}),ee.AddonManager=void 0;var Se=function(){function Le(){this._addons=[]}return Le.prototype.dispose=function(){for(var Ce=this._addons.length-1;Ce>=0;Ce--)this._addons[Ce].instance.dispose()},Le.prototype.loadAddon=function(Ce,ce){var fe=this,ae={instance:ce,dispose:ce.dispose,isDisposed:!1};this._addons.push(ae),ce.dispose=function(){return fe._wrappedAddonDispose(ae)},ce.activate(Ce)},Le.prototype._wrappedAddonDispose=function(Ce){if(!Ce.isDisposed){for(var ce=-1,fe=0;fe<this._addons.length;fe++)if(this._addons[fe]===Ce){ce=fe;break}if(ce===-1)throw new Error("Could not dispose an addon that has not been loaded");Ce.isDisposed=!0,Ce.dispose.apply(Ce.instance),this._addons.splice(ce,1)}},Le}();ee.AddonManager=Se}])})},62522:function(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},36459:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return te}});function te(Se){if(Se==null)throw new TypeError("Cannot destructure "+Se)}},84279:function(dn,St,ee){"use strict";var te=Object.defineProperty,Se=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,ae=(a,y,b)=>y in a?te(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,le=(a,y)=>{for(var b in y||(y={}))ce.call(y,b)&&ae(a,b,y[b]);if(Ce)for(var b of Ce(y))fe.call(y,b)&&ae(a,b,y[b]);return a},re=(a,y)=>Se(a,Le(y)),de=a=>typeof a=="symbol"?a:a+"",he=(a,y)=>{var b={};for(var E in a)ce.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ce)for(var E of Ce(a))y.indexOf(E)<0&&fe.call(a,E)&&(b[E]=a[E]);return b};function me(a){return Array.isArray(a)}var se={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 ye(){return"window"in globalThis&&"document"in globalThis}function _e(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Me(){return typeof navigator.vibrate=="function"}function ve(){var a,y;if(!ye())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 Fe(){if(!ye())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 $e(){return HTMLElement.prototype.hasOwnProperty("popover")}var Te={strings:se,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Te._locale||(Te._locale=ye()?navigator.language.slice(0,5):"en-US"),Te._locale},set locale(a){Te._locale=a,Te._numberFormatter=void 0,Te.dirty=!0},get numberFormatter(){return Te._numberFormatter||(Te._numberFormatter=new Intl.NumberFormat(Te.locale)),Te._numberFormatter},merge(a,y){if(typeof a=="string"&&y)Te.strings[a]=le(le({},Te.strings[a]),y),Te.dirty=!0;else for(const b of Object.keys(a))Te.merge(b,a[b])},get dirty(){return Te._dirty},set dirty(a){Te._dirty||Te._dirty===a||(Te._dirty=!0,setTimeout(()=>{Te._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return Te._subscribers.push(a),Te._subscribers.length-1},unsubscribe(a){a<0||a>=Te._subscribers.length||(Te._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 ne=ze(E);ne&&b.setAttribute("data-tooltip",ne)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const ne=ze(E);ne&&b.setAttribute("aria-label",ne)}}}};function ze(a,...y){if(a===void 0)return;let b="";const E=Te.locale;Te.strings[E]&&(b=Te.strings[E][a]);const ne=E.slice(0,2);if(!b&&Te.strings[ne]&&(b=Te.strings[ne][a]),b||(b=Te.strings.en[a]),!b)return;const ue=/(%@|%([0-9]+)\$@)/g;let xe=ue.exec(b),je=0;for(;xe;){if(y[je++]){const Je=xe[2]?parseInt(xe[2],10)-1:je-1;let st=y[Je];typeof st=="number"&&(st=Te.numberFormatter.format(st)),b=b.replace(xe[1],st)}xe=ue.exec(b)}return b=b.replace(/%%/g,"%"),b}var Ee={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},be={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Re={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"},De={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"},et={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"},Ye={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 dt(a){var y,b,E,ne,ue,xe;const je=a.split("!");let Ue,Je,st,Mt=255,Gt=255,un=255,Cn=-1;const Sr=je.length>0&&je[0].startsWith("-");Sr&&(je[0]=je[0].slice(1));for(let xi=0;xi<je.length;xi++){Ue=Mt,Je=Gt,st=un;const gr=(y=je[xi].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],Yr=gr==null?void 0:gr.toLowerCase(),Ti=gr&&(xe=(ue=(ne=(E=(b=De[Yr])!=null?b:De[et[gr]])!=null?E:be[gr])!=null?ne:Ye[gr])!=null?ue:Ee[gr])!=null?xe:je[xi].trim();let ri=Ti.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(ri!=null&&ri[1]&&ri[2]&&ri[3])Mt=Math.max(0,Math.min(255,Number.parseInt(ri[1],16))),Gt=Math.max(0,Math.min(255,Number.parseInt(ri[2],16))),un=Math.max(0,Math.min(255,Number.parseInt(ri[3],16)));else if(ri=Ti.match(/^#([\da-f]{3})$/i),ri!=null&&ri[1]){const wo=Number.parseInt(ri[1][0],16),ta=Number.parseInt(ri[1][1],16),jo=Number.parseInt(ri[1][2],16);Mt=Math.max(0,Math.min(255,wo*16+wo)),Gt=Math.max(0,Math.min(255,ta*16+ta)),un=Math.max(0,Math.min(255,jo*16+jo))}else if(ri=Ti.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),ri!=null&&ri[1]&&ri[2]&&ri[3])Mt=Math.max(0,Math.min(255,Number.parseInt(ri[1]))),Gt=Math.max(0,Math.min(255,Number.parseInt(ri[2]))),un=Math.max(0,Math.min(255,Number.parseInt(ri[3])));else return;Cn>=0&&(Mt=(1-Cn)*Mt+Cn*Ue,Gt=(1-Cn)*Gt+Cn*Je,un=(1-Cn)*un+Cn*st,Cn=-1),xi+1<je.length&&(Cn=Math.max(0,Math.min(100,Number.parseInt(je[++xi])))/100)}return Cn>=0&&(Mt=Cn*Mt+(1-Cn)*Ue,Gt=Cn*Gt+(1-Cn)*Je,un=Cn*un+(1-Cn)*st),Sr&&(Mt=255-Mt,Gt=255-Gt,un=255-un),"#"+("00"+Math.round(Mt).toString(16)).slice(-2)+("00"+Math.round(Gt).toString(16)).slice(-2)+("00"+Math.round(un).toString(16)).slice(-2)}function Ke(a){var y,b;return a=a.trim(),(b=(y=Re[a.toLowerCase()])!=null?y:Re[et[a]])!=null?b:dt(a)}function zt(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&y.a===void 0&&(y.a=1),y}function pt(a,y,b){return b<0&&(b+=6),b>=6&&(b-=6),b<1?(y-a)*b+a:b<3?y:b<4?(y-a)*(4-b)+a:a}function Kt(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 ne=E<=.5?E*(b+1):E+b-E*b,ue=E*2-ne;return{r:Math.round(255*pt(ue,ne,y+2)),g:Math.round(255*pt(ue,ne,y)),b:Math.round(255*pt(ue,ne,y-2))}}function Ze(a){return a<0?0:a>255?255:Math.round(a)}function tt(a){const{r:y,g:b,b:E}=a;let ne=((1<<24)+(Ze(y)<<16)+(Ze(b)<<8)+Ze(E)).toString(16).slice(1);return ne[0]===ne[1]&&ne[2]===ne[3]&&ne[4]===ne[5]&&ne[6]===ne[7]&&(ne=ne[0]+ne[2]+ne[4]),"#"+ne}function ft(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ne=Math.min(y,b,E),ue=Math.max(y,b,E),xe=ue-ne;let je,Ue;ue===ne?je=0:y===ue?je=(b-E)/xe:b===ue?je=2+(E-y)/xe:E===ue&&(je=4+(y-b)/xe),je=Math.min(je*60,360),je<0&&(je+=360);const Je=(ne+ue)/2;return ue===ne?Ue=0:Je<=.5?Ue=xe/(ue+ne):Ue=xe/(2-ue-ne),{h:je,s:Ue,l:Je}}function Ut(a){let y=zt(a);if(!y)return a;let{h:b,s:E,l:ne}=ft(y);return E+=.1,ne-=.1,tt(Kt({h:b,s:E,l:ne}))}var nt={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"},Ge={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},jt=[{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 yn(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 ne of jt)if((!y||ne.variant===y)&&(!b||ne.style===b)&&E>=ne.offset&&E<ne.offset+ne.len){const ue=ne.start+E-ne.offset;return String.fromCodePoint(Ge[ue]||ue)}return a}function ln(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Ge)if(Ge[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of jt)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 Tt(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ne=(y=E.codePointAt(0))!=null?y:0;let ue=nt[ne];if(ue)ue.startsWith("\\")?b+=ue+" ":b+=ue;else{const{char:xe,variant:je,style:Ue}=ln(ne);switch(ue=xe,je){case"double-struck":ue=`\\mathbb{${ue}}`;break;case"fraktur":ue=`\\mathfrak{${ue}}`;break;case"script":ue=`\\mathscr{${ue}}`;break;case"sans-serif":ue=`\\mathsf{${ue}}`;break;case"monospace":ue=`\\mathtt{${ue}}`;break;case"calligraphic":ue=`\\mathcal{${ue}}`;break}switch(Ue){case"bold":ue=`\\mathbf{${ue}}`;break;case"italic":ue=`\\mathit{${ue}}`;break;case"bolditalic":ue=`\\mathbfit{${ue}}`;break}b+=ue}}return b}function Lt(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var Jt={},kn=le({},nt),In={},Qt={},Mn={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}"},Wn={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}},zn={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}},at={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:zn},"amsmath.sty":{package:Wn,primitive:!0},"texvc.sty":{package:Mn,primitive:!1}},Oe={" ":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},ke=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Be,Ne;Fe()?(Be=new RegExp("\\p{Letter}","u"),Ne=new RegExp("[0-9\\p{Letter}]","u")):(Be=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,Ne=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function we(a,y,b="mord",E){y!==void 0&&(Jt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},kn[y]||(kn[y]=a))}function rt(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ne=a.charAt(E);we(ne,ne.codePointAt(0))}return}for(const[E,ne,ue,xe]of a)we(E,ne,ue!=null?ue:y,xe!=null?xe:b)}function It(a,y){for(let b=a;b<=y;b++)we(String.fromCodePoint(b),b)}function Ct(a){var y;return(y=Qt[a])!=null?y:null}function $t(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ne=[];for(const xe in In)xe.startsWith(y)&&!In[xe].infix&&ne.push({match:xe,frequency:(b=In[xe].frequency)!=null?b:0});for(const xe in Jt)xe.startsWith(y)&&ne.push({match:xe,frequency:(E=Jt[xe].frequency)!=null?E:0});const ue=y.substring(1);for(const xe of Object.keys(a.options.macros))xe.startsWith(ue)&&ne.push({match:"\\"+xe,frequency:0});return ne.sort((xe,je)=>{var Ue,Je;return xe.frequency===je.frequency?xe.match.length===je.match.length?xe.match<je.match?-1:1:xe.match.length-je.match.length:((Ue=je.frequency)!=null?Ue:0)-((Je=xe.frequency)!=null?Je:0)}),ne.map(xe=>xe.match)}function Vt(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function wt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Vt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...wt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Vt(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...wt(b[E]))}return y}function on(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 Dt(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)Qt[E]=b}function Xt(a,y,b){typeof a=="string"&&(a=[a]);const ne={tabular:!0,params:wt(y),createAtom:b};for(const ue of a)Qt[ue]=ne}function nn(a,y,b){var E,ne;b||(b={});const ue={definitionType:"function",params:wt(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(ne=b.infix)!=null?ne:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")In["\\"+a]=ue;else for(const xe of a)In["\\"+xe]=ue}var bn;function en(a){return bn||(bn=Yn(at)),a?Yn(le(le({},bn),a)):bn}function Zn(a,y){var b,E,ne,ue;if(typeof a=="string"){let xe=0;const je=a;return/(^|[^\\])#1/.test(je)&&(xe=1),/(^|[^\\])#2/.test(je)&&(xe=2),/(^|[^\\])#3/.test(je)&&(xe=3),/(^|[^\\])#4/.test(je)&&(xe=4),/(^|[^\\])#5/.test(je)&&(xe=5),/(^|[^\\])#6/.test(je)&&(xe=6),/(^|[^\\])#7/.test(je)&&(xe=7),/(^|[^\\])#8/.test(je)&&(xe=8),/(^|[^\\])#9/.test(je)&&(xe=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:xe,def:je}}return le({expand:(ne=y==null?void 0:y.expand)!=null?ne:!0,captureSelection:(ue=y==null?void 0:y.captureSelection)!=null?ue:!0,args:0},a)}function Yn(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 ne of Object.keys(E.package))y[ne]=Zn(E.package[ne],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Zn(E)}return y}function pr(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=In[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=Jt[a]:Oe[a]&&(b={definitionType:"symbol",type:"mord",codepoint:Oe[a]})}else if(y==="math"){if(b=Jt[a],!b&&a.length===1){const E=Pn("math",a.codePointAt(0));return E.startsWith("\\")?re(le({},pr(E,"math")),{command:E}):null}}else Oe[a]?b={definitionType:"symbol",type:"mord",codepoint:Oe[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function ti(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function Pn(a,y){if(y===void 0)return"";if(a==="math"&&kn[y])return kn[y];if(a==="text"){const b=Object.keys(Oe).find(E=>Oe[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var Or=[0,.68889,0,0,.72222],Br=[0,.68889,0,0,.66667],Di=[0,.68889,0,0,.77778],mi=[0,.68889,0,0,.61111],ci=[.16667,.68889,0,0,.77778],Fr=[0,.68889,0,0,.55556],zr=[0,0,0,0,.25],Fi=[0,.825,0,0,2.33334],ko=[0,.9,0,0,2.33334],aa=[0,.68889,0,0,.54028],Wo=[-.03598,.46402,0,0,.5],li=[-.13313,.36687,0,0,1],rn=[.01354,.52239,0,0,1],nr=[.01354,.52239,0,0,1.11111],dr=[0,.54986,0,0,1],rr=[0,.69224,0,0,.5],Jr=[0,.43056,0,0,1],Ar=[.08198,.58198,0,0,.77778],Mr=[.19444,.69224,0,0,.41667],tr=[.1808,.675,0,0,1],Zt=[.19444,.69224,0,0,.83334],Ot=[.13667,.63667,0,0,1],ge=[-.064,.437,0,0,1.334],Ie=[.08167,.58167,0,0,.77778],Ae=[0,.69224,0,0,.72222],We=[0,.69224,0,0,.66667],it=[-.13313,.36687,0,0,.77778],xt=[.06062,.54986,0,0,.77778],Ft=[0,.69224,0,0,.77778],an=[.25583,.75583,0,0,.77778],Rn=[.25142,.75726,0,0,.77778],mr=[.20576,.70576,0,0,.77778],or=[.30274,.79383,0,0,.77778],cr=[.22958,.72958,0,0,.77778],Xn=[.1808,.675,0,0,.77778],br=[.13667,.63667,0,0,.77778],_r=[.13597,.63597,0,0,.77778],mn=[.03517,.54986,0,0,.77778],$n=[0,.675,0,0,.77778],Vr=[.19444,.69224,0,0,.61111],qr=[0,.54986,0,0,.76042],Ir=[0,.54986,0,0,.66667],hi=[.0391,.5391,0,0,.77778],Ni=[.03517,.54986,0,0,1.33334],yr=[.38569,.88569,0,0,.77778],bi=[.23222,.74111,0,0,.77778],ar=[.19444,.69224,0,0,.77778],fo=[0,.37788,0,0,.5],qi=[0,.54986,0,0,.72222],ua=[0,.69224,0,0,.83334],Jo=[.11111,.69224,0,0,.66667],bo=[.26167,.75726,0,0,.77778],oo=[.48256,.98256,0,0,.77778],na=[.28481,.79383,0,0,.77778],Eo=[.08167,.58167,0,0,.22222],ra=[.08167,.58167,0,0,.38889],ea=[0,.43056,.04028,0,.66667],Ho=[.41951,.91951,0,0,.77778],No=[.24982,.74947,0,0,.38865],Ba=[.08319,.58283,0,0,.75623],Wa=[0,.10803,0,0,.27764],Ia=[0,.47534,0,0,.50181],Ao=[.18906,.47534,0,0,.50181],pn=[0,.69141,0,0,.50181],sn=[.24982,.74947,0,0,.27764],Hn=[0,.69141,0,0,.21471],lr=[.25,.75,0,0,.44722],Cr=[0,.64444,0,0,.575],vi=[.08556,.58556,0,0,.89444],_i=[0,.69444,0,0,.89444],ji=[0,.68611,0,0,.9],Xi=[0,.68611,0,0,.86944],Ci=[.25,.75,0,0,.575],_o=[.25,.75,0,0,.31944],To=[0,.69444,0,0,.63889],Ko=[0,.69444,0,0,.31944],Tn=[0,.44444,0,0,.63889],Bn=[0,.44444,0,0,.51111],Qn=[0,.69444,0,0,.575],He=[.13333,.63333,0,0,.89444],lt=[0,.44444,0,0,.31944],ut=[0,.69444,0,0,.86944],gt=[0,.68611,0,0,.69166],yt=[0,.68611,0,0,.83055],kt=[0,.68611,0,0,.89444],At=[0,.69444,0,0,.60278],tn=[.19444,.69444,0,0,.51111],fn=[0,.69444,0,0,.83055],jn=[-.10889,.39111,0,0,1.14999],qn=[.19444,.69444,0,0,.575],Kn=[.19444,.69444,0,0,1.14999],An=[.19444,.69444,0,0,.70277],Dn=[.05556,.75,0,0,.575],wn=[0,.68611,0,0,.95833],Un=[.08556,.58556,0,0,.76666],vr=[-.02639,.47361,0,0,.575],er=[0,.44444,0,0,.89444],ir=[0,.55556,0,0,.76666],fr=[-.10889,.39111,0,0,.89444],_t=[.00222,.50222,0,0,.89444],vt=[.19667,.69667,0,0,.89444],Xe=[.08556,.58556,0,0,1.14999],ot=[0,.69444,0,0,.70277],Nt=[-.02778,.47222,0,0,.575],Pt=[.25,.75,0,0,.51111],qt=[-.13889,.36111,0,0,1.14999],hn=[.19444,.69444,0,0,1.02222],gn=[.12963,.69444,0,0,.89444],Nn=[.19444,.69444,0,0,.44722],On=[0,.64444,.13167,0,.59111],vn=[.19444,.64444,.13167,0,.59111],Fn=[0,.68611,.17208,0,.8961],Gn=[.19444,.44444,.105,0,.53222],xr=[0,.44444,.085,0,.82666],sr=[0,.69444,.06709,0,.59111],Lr=[0,.69444,.12945,0,.35555],Ur=[0,.69444,0,0,.94888],Pr=[0,.69444,.11472,0,.59111],Qr=[0,.68611,.10778,0,.88555],Tr=[0,.69444,.07939,0,.62055],Wr=[0,.69444,.12417,0,.30667],ni=[0,.64444,.13556,0,.51111],Si=[.19444,.64444,.13556,0,.51111],Nr=[0,.68333,.16389,0,.74333],wi=[.19444,.43056,.08847,0,.46],gi=[0,.43056,.07514,0,.71555],vo=[0,.69444,.06646,0,.51111],Ji=[0,.69444,0,0,.83129],Pi=[0,.69444,.1225,0,.51111],Mi=[0,.68333,.09403,0,.76666],Ai=[0,.68333,.11111,0,.76666],pi=[0,.69444,.06961,0,.51444],zi=[0,.69444,0,0,.27778],ai=[.25,.75,0,0,.38889],ii=[0,.64444,0,0,.5],Ui=[0,.69444,0,0,.77778],to=[0,.68333,0,0,.75],la=[0,.68333,0,0,.77778],da=[0,.68333,0,0,.68056],So=[0,.68333,0,0,.72222],go=[.25,.75,0,0,.5],Zi=[.25,.75,0,0,.27778],Ii=[0,.69444,0,0,.5],pa=[0,.69444,0,0,.55556],io=[0,.43056,0,0,.44445],si=[0,.43056,0,0,.5],Ki=[.19444,.43056,0,0,.55556],Io=[0,.43056,0,0,.55556],Ro=[.08333,.58333,0,0,.77778],qo=[0,.43056,0,0,.27778],Qi=[0,.66786,0,0,.27778],ma=[0,.69444,0,0,.75],va=[0,.66786,0,0,.5],ia=[0,.68333,0,0,.625],ca=[.19444,.69444,0,0,.44445],Ea=[0,.69444,0,0,.72222],Ja=[.19444,.69444,0,0,.5],Ma=[.19444,.69444,0,0,1],Za=[.011,.511,0,0,1.126],vs=[.19444,.69444,0,0,.61111],Es=[.05556,.75,0,0,.5],Ls=[0,.68333,0,0,.83334],Qa=[.0391,.5391,0,0,.66667],La=[-.05555,.44445,0,0,.5],ho=[0,.43056,0,0,.77778],Po=[0,.55556,0,0,.66667],_a=[-.03625,.46375,0,0,.77778],Da=[-.01688,.48312,0,0,.77778],gs=[.0391,.5391,0,0,1],Rs=[0,.69444,0,0,.61111],Ws=[-.03472,.46528,0,0,.5],hl=[.25,.75,0,0,.44445],ul=[-.14236,.35764,0,0,1],Ts=[.244,.744,0,0,.412],es=[.19444,.69444,0,0,.88889],Bi=[.12963,.69444,0,0,.77778],Co=[.19444,.69444,0,0,.38889],Qo=[.011,.511,0,0,1.638],Ca=[.19444,.69444,0,0,0],is=[0,.44444,0,0,.575],bs=[.19444,.44444,0,0,.575],bl=[0,.68611,0,0,.75555],rl=[0,.69444,0,0,.66759],$l=[0,.68611,0,0,.80555],ya=[0,.68611,.08229,0,.98229],yi=[0,.68611,0,0,.76666],Mo=[0,.44444,0,0,.58472],Do=[.19444,.44444,0,0,.6118],Uo=[.19444,.43056,0,0,.5],Ss=[0,.68333,.02778,.08334,.76278],ls=[0,.68333,.08125,.05556,.83125],Sl=[0,.43056,0,.05556,.48472],pl=[.19444,.43056,0,.08334,.51702],rc=[.25,.75,0,0,.42778],Xa=[0,.69444,0,0,.55],wl=[0,.69444,0,0,.73334],ic=[0,.69444,0,0,.79445],Vc=[0,.69444,0,0,.51945],xc=[0,.69444,0,0,.70278],Ql=[0,.69444,0,0,.76389],Al=[.25,.75,0,0,.34306],Ec=[0,.69444,0,0,.56111],Hl=[0,.69444,0,0,.25556],Fo=[.19444,.45833,0,0,.56111],Bs=[0,.45833,0,0,.56111],ts=[0,.69444,0,0,.30556],Os=[0,.69444,0,0,.58056],$s=[0,.69444,0,0,.67223],il=[0,.69444,0,0,.85556],El=[0,.69444,0,0,.55834],ol=[0,.65556,.11156,0,.5],ns=[0,.69444,.08094,0,.70834],qs=[.17014,0,0,0,.44445],Hc=[0,.69444,.0799,0,.5],Tl=[0,.69444,0,0,.73752],au=[0,.69444,.09205,0,.5],Mc=[0,.69444,.09031,0,.77778],Lc=[0,.69444,.07816,0,.27778],Nc=[0,.69444,.00316,0,.5],Jc=[.19444,.69444,0,0,.83334],os=[.05556,.75,0,0,.83334],Ka=[0,.75,0,0,.5],xl=[.125,.08333,0,0,.27778],Vl=[0,.08333,0,0,.27778],mt=[0,.65556,0,0,.5],Bt=[0,.69444,0,0,.47222],Wt=[0,.69444,0,0,.66667],di=[0,.69444,0,0,.59722],jr=[0,.69444,0,0,.54167],Rr=[0,.69444,0,0,.70834],Kr=[.25,.75,0,0,.28889],kr=[0,.69444,0,0,.51667],Gr=[0,.44444,0,0,.44445],Li=[.19444,.44444,0,0,.51667],Fa=[0,.44444,0,0,.38333],zo=[0,.44444,0,0,.51667],Va=[0,.69444,0,0,.83334],Lo=[.35001,.85,0,0,.45834],Ra=[.35001,.85,0,0,.57778],Zo=[.35001,.85,0,0,.41667],Ns=[.35001,.85,0,0,.58334],Ta=[0,.72222,0,0,.55556],qa=[1e-5,.6,0,0,.66667],Hs=[1e-5,.6,0,0,.77778],ba=[.25001,.75,0,0,.94445],Ds=[.306,.805,.19445,0,.47222],Ri=[.30612,.805,.19445,0,.47222],Oa=[.25001,.75,0,0,.83334],za=[.35001,.85,0,0,.47222],Gs=[.25001,.75,0,0,1.11111],Gl=[.65002,1.15,0,0,.59722],Yi=[.65002,1.15,0,0,.81111],oa=[.65002,1.15,0,0,.47222],Na=[.65002,1.15,0,0,.66667],uo=[0,.75,0,0,1],Sa=[.55001,1.05,0,0,1.27778],cs=[.862,1.36,.44445,0,.55556],as=[.86225,1.36,.44445,0,.55556],kc=[.55001,1.05,0,0,1.11111],jc=[.65002,1.15,0,0,.52778],Ac=[.65002,1.15,0,0,.61111],Tc=[.55001,1.05,0,0,1.51112],_c=[.95003,1.45,0,0,.73611],Kc=[.95003,1.45,0,0,1.04445],Bo=[.95003,1.45,0,0,.52778],Ps=[.95003,1.45,0,0,.75],jl=[0,.75,0,0,1.44445],Pc=[.95003,1.45,0,0,.58334],Kl=[1.25003,1.75,0,0,.79167],oc=[1.25003,1.75,0,0,1.27778],Cc=[1.25003,1.75,0,0,.58334],al=[1.25003,1.75,0,0,.80556],Ve=[0,.825,0,0,1.8889],Qe=[1.25003,1.75,0,0,.63889],bt=[.64502,1.155,0,0,.875],Rt=[1e-5,.6,0,0,.875],Ht=[-99e-5,.601,0,0,.66667],Yt=[.64502,1.155,0,0,.66667],xn=[1e-5,.9,0,0,.88889],Ln=[.65002,1.15,0,0,.88889],_n=[.90001,0,0,0,.88889],Vn=[-.00499,.605,0,0,1.05556],hr=[0,.12,0,0,.45],Sn=[0,.61111,0,0,.525],Er=[.08333,.69444,0,0,.525],Dr=[-.08056,.53055,0,0,.525],$r=[-.05556,.55556,0,0,.525],ei=[0,.43056,0,0,.525],Zr=[.22222,.43056,0,0,.525],Ei=[0,0,0,0,.525],fi={"AMS-Regular":{32:zr,65:Or,66:Br,67:Or,68:Or,69:Br,70:mi,71:Di,72:Di,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Di,76:Br,77:[0,.68889,0,0,.94445],78:Or,79:ci,80:mi,81:ci,82:Or,83:Fr,84:Br,85:Or,86:Or,87:[0,.68889,0,0,1],88:Or,89:Or,90:Br,107:Fr,160:zr,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Fr,295:aa,710:Fi,732:ko,770:Fi,771:ko,989:Ie,1008:ea,8245:[0,.54986,0,0,.275],8463:aa,8487:Or,8498:Fr,8502:Br,8503:[0,.68889,0,0,.44445],8504:Br,8513:[0,.68889,0,0,.63889],8592:Wo,8594:Wo,8602:li,8603:li,8606:rn,8608:rn,8610:nr,8611:nr,8619:dr,8620:dr,8621:[-.13313,.37788,0,0,1.38889],8622:li,8624:rr,8625:rr,8630:Jr,8631:Jr,8634:Ar,8635:Ar,8638:Mr,8639:Mr,8642:Mr,8643:Mr,8644:tr,8646:tr,8647:tr,8648:Zt,8649:tr,8650:Zt,8651:rn,8652:rn,8653:li,8654:li,8655:li,8666:Ot,8667:Ot,8669:[-.13313,.37788,0,0,1],8672:ge,8674:ge,8705:[0,.825,0,0,.5],8708:Fr,8709:Ie,8717:[0,.43056,0,0,.42917],8722:Wo,8724:[.08198,.69224,0,0,.77778],8726:Ie,8733:Ft,8736:Ae,8737:Ae,8738:[.03517,.52239,0,0,.72222],8739:Eo,8740:[.25142,.74111,0,0,.27778],8741:ra,8742:[.25142,.74111,0,0,.5],8756:We,8757:We,8764:it,8765:[-.13313,.37788,0,0,.77778],8769:it,8770:_a,8774:or,8776:Da,8778:Ie,8782:xt,8783:xt,8785:Ar,8786:Ar,8787:Ar,8790:Ft,8791:cr,8796:[.08198,.91667,0,0,.77778],8806:an,8807:an,8808:Rn,8809:Rn,8812:[.25583,.75583,0,0,.5],8814:mr,8815:mr,8816:or,8817:or,8818:cr,8819:cr,8822:Xn,8823:Xn,8828:br,8829:br,8830:cr,8831:cr,8832:mr,8833:mr,8840:or,8841:or,8842:_r,8843:_r,8847:mn,8848:mn,8858:Ar,8859:Ar,8861:Ar,8862:$n,8863:$n,8864:$n,8865:$n,8872:[0,.69224,0,0,.61111],8873:Ae,8874:[0,.69224,0,0,.88889],8876:mi,8877:mi,8878:Or,8879:Or,8882:mn,8883:mn,8884:br,8885:br,8888:[0,.54986,0,0,1.11111],8890:Ki,8891:Vr,8892:Vr,8901:[0,.54986,0,0,.27778],8903:Ie,8905:Ie,8906:Ie,8907:Ft,8908:Ft,8909:[-.03598,.46402,0,0,.77778],8910:qr,8911:qr,8912:mn,8913:mn,8914:Ir,8915:Ir,8916:We,8918:hi,8919:hi,8920:Ni,8921:Ni,8922:yr,8923:yr,8926:br,8927:br,8928:or,8929:or,8934:bi,8935:bi,8936:bi,8937:bi,8938:mr,8939:mr,8940:or,8941:or,8994:ar,8995:ar,9416:[.15559,.69224,0,0,.90222],9484:rr,9488:rr,9492:fo,9496:fo,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:$n,9633:$n,9650:qi,9651:qi,9654:mn,9660:qi,9661:qi,9664:mn,9674:Jo,9733:[.19444,.69224,0,0,.94445],10003:ua,10016:ua,10731:Jo,10846:[.19444,.75583,0,0,.61111],10877:br,10878:br,10885:an,10886:an,10887:_r,10888:_r,10889:bo,10890:bo,10891:oo,10892:oo,10901:br,10902:br,10933:Rn,10934:Rn,10935:bo,10936:bo,10937:bo,10938:bo,10949:an,10950:an,10955:na,10956:na,57350:Eo,57351:ra,57352:Ie,57353:ea,57356:Rn,57357:Rn,57358:Ho,57359:or,57360:or,57361:Ho,57366:Rn,57367:Rn,57368:Rn,57369:Rn,57370:_r,57371:_r},"Caligraphic-Regular":{32:zr,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:zr},"Fraktur-Regular":{32:zr,33:[0,.69141,0,0,.29574],34:Hn,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:No,41:No,42:[0,.62119,0,0,.27764],43:Ba,44:Wa,45:Ba,46:Wa,47:[.24982,.74947,0,0,.50181],48:Ia,49:Ia,50:Ia,51:Ao,52:Ao,53:Ao,54:pn,55:Ao,56:pn,57:Ao,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:sn,93:sn,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:zr,8216:Hn,8217:Hn,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:zr,33:[0,.69444,0,0,.35],34:At,35:[.19444,.69444,0,0,.95833],36:Dn,37:[.05556,.75,0,0,.95833],38:_i,39:Ko,40:lr,41:lr,42:[0,.75,0,0,.575],43:He,44:[.19444,.15556,0,0,.31944],45:Fa,46:[0,.15556,0,0,.31944],47:Ci,48:Cr,49:Cr,50:Cr,51:Cr,52:Cr,53:Cr,54:Cr,55:Cr,56:Cr,57:Cr,58:lt,59:[.19444,.44444,0,0,.31944],60:vi,61:fr,62:vi,63:[0,.69444,0,0,.54305],64:_i,65:Xi,66:[0,.68611,0,0,.81805],67:yt,68:[0,.68611,0,0,.88194],69:bl,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:ji,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:gt,77:[0,.68611,0,0,1.09166],78:ji,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:Xi,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:_o,92:Ci,93:_o,94:Qn,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:To,99:Bn,100:To,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:To,105:Ko,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Ko,109:[0,.44444,0,0,.95833],110:Tn,111:is,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:Tn,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:Ci,124:_o,125:Ci,126:[.35,.34444,0,0,.575],160:zr,163:[0,.69444,0,0,.86853],168:Qn,172:[0,.44444,0,0,.76666],176:ut,177:He,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:He,216:[.04861,.73472,0,0,.89444],223:di,230:[0,.44444,0,0,.83055],247:He,248:[.09722,.54167,0,0,.575],305:lt,338:[0,.68611,0,0,1.16944],339:er,567:[.19444,.44444,0,0,.35139],710:Qn,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Qn,715:Qn,728:Qn,729:Ko,730:ut,732:Qn,733:Qn,915:gt,916:wn,920:kt,923:$l,926:yi,928:ji,931:yt,933:kt,934:yt,936:kt,937:yt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Ko,8217:Ko,8220:At,8221:At,8224:tn,8225:tn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:rl,8465:fn,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:fn,8501:ot,8592:jn,8593:qn,8594:jn,8595:qn,8596:jn,8597:Ci,8598:Kn,8599:Kn,8600:Kn,8601:Kn,8636:jn,8637:jn,8640:jn,8641:jn,8656:jn,8657:An,8658:jn,8659:An,8660:jn,8661:[.25,.75,0,0,.70277],8704:To,8706:[0,.69444,.06389,0,.62847],8707:To,8709:Dn,8711:wn,8712:Un,8715:Un,8722:He,8723:He,8725:Ci,8726:Ci,8727:Nt,8728:vr,8729:vr,8730:[.18,.82,0,0,.95833],8733:er,8734:[0,.44444,0,0,1.14999],8736:Ae,8739:_o,8741:Ci,8743:ir,8744:ir,8745:ir,8746:ir,8747:[.19444,.69444,.12778,0,.56875],8764:fr,8768:[.19444,.69444,0,0,.31944],8771:_t,8776:[.02444,.52444,0,0,.89444],8781:_t,8801:_t,8804:vt,8805:vt,8810:Xe,8811:Xe,8826:vi,8827:vi,8834:vi,8835:vi,8838:vt,8839:vt,8846:ir,8849:vt,8850:vt,8851:ir,8852:ir,8853:He,8854:He,8855:He,8856:He,8857:He,8866:ot,8867:ot,8868:_i,8869:_i,8900:vr,8901:[-.02639,.47361,0,0,.31944],8902:Nt,8968:Pt,8969:Pt,8970:Pt,8971:Pt,8994:qt,8995:qt,9651:hn,9657:Nt,9661:hn,9667:Nt,9711:Kn,9824:gn,9825:gn,9826:gn,9827:gn,9837:[0,.75,0,0,.44722],9838:Nn,9839:Nn,10216:lr,10217:lr,10815:ji,10927:vt,10928:vt,57376:Ca},"Main-BoldItalic":{32:zr,33:[0,.69444,.11417,0,.38611],34:Tr,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Lr,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:On,49:On,50:On,51:On,52:vn,53:On,54:On,55:vn,56:On,57:On,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Pr,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:Fn,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:Fn,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:sr,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:Gn,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:Gn,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:zr,168:[0,.69444,.11473,0,.59111],176:Ur,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:xr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:xr,567:[.19444,.44444,.04611,0,.385],710:sr,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:Lr,730:Ur,732:Pr,733:Pr,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:Fn,931:[0,.68611,.11431,0,.82666],933:Qr,934:[0,.68611,.05632,0,.82666],936:Qr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Lr,8217:Lr,8220:[0,.69444,.16772,0,.62055],8221:Tr},"Main-Italic":{32:zr,33:Wr,34:pi,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Wr,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:ni,49:ni,50:ni,51:ni,52:Si,53:ni,54:ni,55:Si,56:ni,57:ni,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Pi,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:Nr,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:Nr,79:Mi,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:Nr,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:vo,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:wi,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:wi,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:zr,168:[0,.66786,.10474,0,.51111],176:Ji,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:gi,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:gi,710:vo,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:Ji,732:[0,.66786,.11585,0,.51111],733:Pi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Mi,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Nr,931:[0,.68333,.12028,0,.71555],933:Ai,934:[0,.68333,.05986,0,.71555],936:Ai,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Wr,8217:Wr,8220:[0,.69444,.1685,0,.51444],8221:pi,8463:aa},"Main-Regular":{32:zr,33:zi,34:Ii,35:Jc,36:Es,37:os,38:Ui,39:zi,40:ai,41:ai,42:Ka,43:Ro,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:go,48:ii,49:ii,50:ii,51:ii,52:ii,53:ii,54:ii,55:ii,56:ii,57:ii,58:qo,59:[.19444,.43056,0,0,.27778],60:hi,61:it,62:hi,63:Bt,64:Ui,65:to,66:[0,.68333,0,0,.70834],67:So,68:[0,.68333,0,0,.76389],69:da,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:to,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:la,76:ia,77:[0,.68333,0,0,.91667],78:to,79:la,80:da,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:So,85:to,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:to,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Zi,92:go,93:Zi,94:Ii,95:[.31,.12056,.02778,0,.5],97:si,98:pa,99:io,100:pa,101:io,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:pa,105:Qi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:zi,109:[0,.43056,0,0,.83334],110:Io,111:si,112:Ki,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:Io,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:io,123:go,124:Zi,125:go,126:[.35,.31786,0,0,.5],160:zr,163:[0,.69444,0,0,.76909],167:ca,168:va,172:[0,.43056,0,0,.66667],176:ma,177:Ro,182:vs,184:qs,198:[0,.68333,0,0,.90278],215:Ro,216:[.04861,.73194,0,0,.77778],223:Ii,230:[0,.43056,0,0,.72222],247:Ro,248:[.09722,.52778,0,0,.5],305:qo,338:[0,.68333,0,0,1.01389],339:ho,567:[.19444,.43056,0,0,.30556],710:Ii,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Ii,715:Ii,728:Ii,729:Qi,730:ma,732:va,733:Ii,915:ia,916:Ls,920:la,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:to,931:So,933:la,934:So,936:la,937:So,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:zi,8217:zi,8220:Ii,8221:Ii,8224:ca,8225:ca,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:aa,8465:Ea,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ea,8501:Rs,8592:li,8593:Ja,8594:li,8595:Ja,8596:li,8597:go,8598:Ma,8599:Ma,8600:Ma,8601:Ma,8614:[.011,.511,0,0,1],8617:Za,8618:Za,8636:li,8637:li,8640:li,8641:li,8652:[.011,.671,0,0,1],8656:li,8657:vs,8658:li,8659:vs,8660:li,8661:[.25,.75,0,0,.61111],8704:pa,8706:[0,.69444,.05556,.08334,.5309],8707:pa,8709:Es,8711:Ls,8712:Qa,8715:Qa,8722:Ro,8723:Ro,8725:go,8726:go,8727:Ws,8728:La,8729:La,8730:[.2,.8,0,0,.83334],8733:ho,8734:Jr,8736:Ae,8739:Zi,8741:go,8743:Po,8744:Po,8745:Po,8746:Po,8747:[.19444,.69444,.11111,0,.41667],8764:it,8768:[.19444,.69444,0,0,.27778],8771:_a,8773:[-.022,.589,0,0,1],8776:Da,8781:_a,8784:[-.133,.67,0,0,.778],8801:_a,8804:_r,8805:_r,8810:gs,8811:gs,8826:hi,8827:hi,8834:hi,8835:hi,8838:_r,8839:_r,8846:Po,8849:_r,8850:_r,8851:Po,8852:Po,8853:Ro,8854:Ro,8855:Ro,8856:Ro,8857:Ro,8866:Rs,8867:Rs,8868:Ui,8869:Ui,8872:[.249,.75,0,0,.867],8900:La,8901:[-.05555,.44445,0,0,.27778],8902:Ws,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:hl,8969:hl,8970:hl,8971:hl,8994:ul,8995:ul,9136:Ts,9137:Ts,9651:es,9657:Ws,9661:es,9667:Ws,9711:Ma,9824:Bi,9825:Bi,9826:Bi,9827:Bi,9837:[0,.75,0,0,.38889],9838:Co,9839:Co,10216:ai,10217:ai,10222:Ts,10223:Ts,10229:[.011,.511,0,0,1.609],10230:Qo,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:Qo,10815:to,10927:_r,10928:_r,57376:Ca},"Math-BoldItalic":{32:zr,48:is,49:is,50:is,51:bs,52:bs,53:bs,54:Cr,55:bs,56:Cr,57:bs,65:Xi,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:ya,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:bl,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:rl,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:Mo,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:zr,915:[0,.68611,.15972,0,.65694],916:wn,920:[0,.68611,.03194,0,.86722],923:$l,926:[0,.68611,.07458,0,.84125],928:ya,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:yi,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:Mo,960:[0,.44444,.03704,0,.68241],961:Do,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:Do,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:zr,48:si,49:si,50:si,51:Uo,52:Uo,53:Uo,54:ii,55:Uo,56:ii,57:Uo,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:ls,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:Ss,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:Sl,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:zr,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ss,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:ls,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:Sl,960:[0,.43056,.03588,0,.57003],961:pl,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:pl,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:zr,33:[0,.69444,0,0,.36667],34:El,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:ts,40:rc,41:rc,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:Xa,49:Xa,50:Xa,51:Xa,52:Xa,53:Xa,54:Xa,55:Xa,56:Xa,57:Xa,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Vc,64:wl,65:wl,66:wl,67:xc,68:ic,69:[0,.69444,0,0,.64167],70:Rs,71:wl,72:ic,73:[0,.69444,0,0,.33056],74:Vc,75:Ql,76:Os,77:[0,.69444,0,0,.97778],78:ic,79:ic,80:xc,81:[.10556,.69444,0,0,.79445],82:xc,83:Rs,84:wl,85:Ql,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:wl,89:[0,.69444,.0275,0,.73334],90:$s,91:Al,93:Al,94:Xa,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ec,99:[0,.45833,0,0,.48889],100:Ec,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ec,105:Hl,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Hl,109:[0,.45833,0,0,.86667],110:Bs,111:[0,.45833,0,0,.55],112:Fo,113:Fo,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Bs,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:zr,168:Xa,176:wl,180:Xa,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:Xa,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:Xa,729:ts,730:wl,732:Xa,733:Xa,915:Os,916:[0,.69444,0,0,.91667],920:il,923:$s,926:wl,928:ic,931:ic,933:il,934:ic,936:il,937:ic,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:ts,8217:ts,8220:El,8221:El},"SansSerif-Italic":{32:zr,33:[0,.69444,.05733,0,.31945],34:Nc,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:Lc,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:xl,45:[0,.44444,.01946,0,.33333],46:Vl,47:[.25,.75,.13164,0,.5],48:ol,49:ol,50:ol,51:ol,52:ol,53:ol,54:ol,55:ol,56:ol,57:ol,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:Wt,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:ns,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:jr,77:[0,.69444,.08094,0,.875],78:ns,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:Hc,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:zr,168:[0,.67937,.06385,0,.5],176:Tl,184:qs,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Hc,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:au,715:Ii,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Tl,732:[0,.67659,.08826,0,.5],733:au,915:[0,.69444,.13372,0,.54167],916:Va,920:[0,.69444,.07555,0,.77778],923:Rs,926:[0,.69444,.12816,0,.66667],928:ns,931:[0,.69444,.11983,0,.72222],933:Mc,934:[0,.69444,.04603,0,.72222],936:Mc,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Lc,8217:Lc,8220:[0,.69444,.14205,0,.5],8221:Nc},"SansSerif-Regular":{32:zr,33:[0,.69444,0,0,.31945],34:Ii,35:Jc,36:Es,37:os,38:[0,.69444,0,0,.75834],39:zi,40:ai,41:ai,42:Ka,43:Ro,44:xl,45:[0,.44444,0,0,.33333],46:Vl,47:go,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:Bt,64:Wt,65:Wt,66:Wt,67:To,68:[0,.69444,0,0,.72223],69:di,70:[0,.69444,0,0,.56945],71:Wt,72:Rr,73:zi,74:Bt,75:[0,.69444,0,0,.69445],76:jr,77:[0,.69444,0,0,.875],78:Rr,79:[0,.69444,0,0,.73611],80:To,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:pa,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:Wt,89:[0,.69444,.025,0,.66667],90:Rs,91:Kr,93:Kr,94:Ii,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:kr,99:Gr,100:kr,101:Gr,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:kr,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:zo,111:[0,.44444,0,0,.5],112:Li,113:Li,114:[0,.44444,.01389,0,.34167],115:Fa,116:[0,.57143,0,0,.36111],117:zo,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:zr,168:[0,.67937,0,0,.5],176:Wt,184:qs,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Ii,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Ii,715:Ii,728:Ii,729:[0,.67937,0,0,.27778],730:Wt,732:[0,.67659,0,0,.5],733:Ii,915:jr,916:Va,920:Ui,923:Rs,926:Wt,928:Rr,931:Ea,933:Ui,934:Ea,936:Ui,937:Ea,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:zi,8217:zi,8220:Ii,8221:Ii},"Script-Regular":{32:zr,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:zr},"Size1-Regular":{32:zr,40:Lo,41:Lo,47:Ra,91:Zo,92:Ra,93:Zo,123:Ns,125:Ns,160:zr,710:Ta,732:Ta,770:Ta,771:Ta,8214:[-99e-5,.601,0,0,.77778],8593:qa,8595:qa,8657:Hs,8659:Hs,8719:ba,8720:ba,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:Ri,8748:Ds,8749:Ds,8750:Ri,8896:Oa,8897:Oa,8898:Oa,8899:Oa,8968:za,8969:za,8970:za,8971:za,9168:Ht,10216:za,10217:za,10752:Gs,10753:Gs,10754:Gs,10756:Oa,10758:Oa},"Size2-Regular":{32:zr,40:Gl,41:Gl,47:Yi,91:oa,92:Yi,93:oa,123:Na,125:Na,160:zr,710:uo,732:uo,770:uo,771:uo,8719:Sa,8720:Sa,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:as,8748:cs,8749:cs,8750:as,8896:kc,8897:kc,8898:kc,8899:kc,8968:jc,8969:jc,8970:jc,8971:jc,10216:Ac,10217:Ac,10752:Tc,10753:Tc,10754:Tc,10756:kc,10758:kc},"Size3-Regular":{32:zr,40:_c,41:_c,47:Kc,91:Bo,92:Kc,93:Bo,123:Ps,125:Ps,160:zr,710:jl,732:jl,770:jl,771:jl,8730:[.95003,1.45,0,0,1],8968:Pc,8969:Pc,8970:Pc,8971:Pc,10216:Ps,10217:Ps},"Size4-Regular":{32:zr,40:Kl,41:Kl,47:oc,91:Cc,92:oc,93:Cc,123:al,125:al,160:zr,710:Ve,732:Ve,770:Ve,771:Ve,8730:[1.25003,1.75,0,0,1],8968:Qe,8969:Qe,8970:Qe,8971:Qe,9115:bt,9116:Rt,9117:bt,9118:bt,9119:Rt,9120:bt,9121:Yt,9122:Ht,9123:Yt,9124:Yt,9125:Ht,9126:Yt,9127:xn,9128:Ln,9129:_n,9130:[0,.3,0,0,.88889],9131:xn,9132:Ln,9133:_n,9143:[.88502,.915,0,0,1.05556],10216:al,10217:al,57344:Vn,57345:Vn,57680:hr,57681:hr,57682:hr,57683:hr},"Typewriter-Regular":{32:Ei,33:Sn,34:Sn,35:Sn,36:Er,37:Er,38:Sn,39:Sn,40:Er,41:Er,42:[0,.52083,0,0,.525],43:Dr,44:[.13889,.125,0,0,.525],45:Dr,46:[0,.125,0,0,.525],47:Er,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,58:ei,59:[.13889,.43056,0,0,.525],60:$r,61:[-.19549,.41562,0,0,.525],62:$r,63:Sn,64:Sn,65:Sn,66:Sn,67:Sn,68:Sn,69:Sn,70:Sn,71:Sn,72:Sn,73:Sn,74:Sn,75:Sn,76:Sn,77:Sn,78:Sn,79:Sn,80:Sn,81:[.13889,.61111,0,0,.525],82:Sn,83:Sn,84:Sn,85:Sn,86:Sn,87:Sn,88:Sn,89:Sn,90:Sn,91:Er,92:Er,93:Er,94:Sn,95:[.09514,0,0,0,.525],96:Sn,97:ei,98:Sn,99:ei,100:Sn,101:ei,102:Sn,103:Zr,104:Sn,105:Sn,106:[.22222,.61111,0,0,.525],107:Sn,108:Sn,109:ei,110:ei,111:ei,112:Zr,113:Zr,114:ei,115:ei,116:[0,.55358,0,0,.525],117:ei,118:ei,119:ei,120:ei,121:Zr,122:ei,123:Er,124:Er,125:Er,126:Sn,127:Sn,160:Ei,176:Sn,184:[.19445,0,0,0,.525],305:ei,567:Zr,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:Sn,715:Sn,728:Sn,730:Sn,770:Sn,771:Sn,776:Sn,915:Sn,916:Sn,920:Sn,923:Sn,926:Sn,928:Sn,931:Sn,933:Sn,934:Sn,936:Sn,937:Sn,8216:Sn,8217:Sn,8242:Sn,9251:[.11111,.21944,0,0,.525]}},$i=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,mo=10,ao=.25,po=1.2,Vo=.431,wa={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Vo,Vo,Vo],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:[ao,ao,ao],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]},eo=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],so=5,no={"\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 ki(a,y){a===void 0&&(a=77);const b=fi[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 no)a=no[E].codePointAt(0);else if($i.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 co={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]},Go={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]},$a={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 ha(a){if(Go[a]){const[Je,st,Mt]=Go[a],Gt=`<span class="stretchy" style="height:${Mt}em"><svg width="100%" height="${Mt}em" viewBox="0 0 ${Je} ${st}" preserveAspectRatio="none" ><path fill="currentcolor" d="${$a[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Mt/2)/100}em;min-width:0">${Gt}</span>`}const[y,b,E,ne]=co[a];let ue,xe;const je=E/1e3;y.length===3?(ue=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],xe=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(ue=["slice-1-of-2","slice-2-of-2"],xe=["xMinYMin","xMaxYMin"]):(ue=["slice-1-of-1"],xe=[ne]);const Ue=y.map((Je,st)=>`<span class="${ue[st]}" style=height:${je}em><svg width=400em height=${je}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${xe[st]} slice"><path fill="currentcolor" d="${$a[Je]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${je}em;min-width:${b}em;">${Ue}</span>`}function Yo(a){return co[a]?co[a][2]/1e3:Go[a][2]}function Ua(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 ne=a.charCodeAt(b+1);if(ne>=56320&&ne<=57343){const ue=E-55296,xe=ne-56320;E=Nu(2,16)+ue*Nu(2,10)+xe,b++}}y.push(E)}return y}var Ha=8205,Ms=[[Ha,1],[65038,2],[127995,5],[129456,4],[917536,96]],Ga,js=[127462,127487];function Ks(a){var y;if(Ga===void 0){Ga={};for(const b of Ms)for(let E=b[0];E<=b[0]+b[1]-1;E++)Ga[E]=!0}return(y=Ga[a])!=null?y:!1}function ka(a){return a>=js[0]&&a<=js[1]}function ml(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=Ua(a);let E=0;for(;E<b.length;){const ne=b[E++],ue=b[E];if(ue===Ha){const xe=E-1;for(E+=2;b[E]===Ha;)E+=2;y.push(String.fromCodePoint(...b.slice(xe,E-xe+1)))}else if(Ks(ue)){const xe=E-1;for(;Ks(b[E]);)E+=b[E]===Ha?2:1;y.push(String.fromCodePoint(...b.slice(xe,2*E-xe-1)))}else ka(ne)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ne))}return y}var hs=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=ml(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 ks(a,y){var b,E,ne,ue;const xe=[];let je=a.next();if(je&&je!=="\\relax"){if(je==="\\noexpand")je=a.next(),je&&xe.push(je);else if(je==="\\obeyspaces")a.obeyspaces=!0;else if(je==="\\bgroup")xe.push("<{>");else if(je==="\\egroup")xe.push("<}>");else if(je==="\\string"){if(je=a.next(),je)if(je.startsWith("\\"))for(const Ue of je)xe.push(Ue==="\\"?"\\backslash":Ue);else je==="<{>"?xe.push("\\{"):je==="<space>"?xe.push("~"):je==="<}>"&&xe.push("\\}")}else if(je==="\\csname"){for(;a.peek()==="<space>";)a.next();let Ue="",Je=!1,st=[];do{if(st.length===0)if(/^#[\d?@]$/.test(a.peek())){const Mt=a.get().slice(1);st=xs((E=(b=y==null?void 0:y(Mt))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),je=st[0]}else je=a.next(),st=je?[je]:[];Je=st.length===0,!Je&&je==="\\endcsname"&&(Je=!0,st.shift()),Je||(Je=je==="<$>"||je==="<$$>"||je==="<{>"||je==="<}>"||typeof je=="string"&&je.length>1&&je.startsWith("\\")),Je||(Ue+=st.shift())}while(!Je);Ue&&xe.push("\\"+Ue),xe.push(...st)}else if(je!=="\\endcsname")if(je.length>1&&je.startsWith("#")){const Ue=je.slice(1);xe.push(...xs((ue=(ne=y==null?void 0:y(Ue))!=null?ne:y==null?void 0:y("?"))!=null?ue:"\\placeholder{}",y))}else xe.push(je)}return xe}function xs(a,y=null){const b=[];let E="";for(const xe of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const je=xe.match(/((?:\\%)|[^%])*/);je!==null&&b.push(je[0])}const ne=new hs(Tt(b.join(""))),ue=[];do ue.push(...ks(ne,y));while(!ne.end());return ue}function ga(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 Vi(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ga([a,...y.map(b=>`{${b}}`)])}function Oo(a){return ga(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var Xo=class Af{constructor(y){Af._registry[y]=this}static createAtom(y,b,E){return Af._registry[y].createAtom(b,pr(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ne=[];for(const ue of ps(y)){const xe=Af._registry[ue[0].mode];ne.push(...xe.serialize(ue,b))}return ga(ne)}return ga(ss(y,b))}static getFont(y,b,E){return Af._registry[y].getFont(b,E)}};Xo._registry={};var lo=Xo;function ps(a){const y=[];let b=[],E="NONE";for(const ne of a)ne.type!=="first"&&(ne.mode!==E?(b.length>0&&y.push(b),b=[ne],E=ne.mode):b.push(ne));return b.length>0&&y.push(b),y}function Wi(a,y){const b=[];let E=[],ne;for(const ue of a)if(ue.type!=="first"&&ue.style){let xe;y==="variant"?(xe=ue.style.variant,ue.style.variantStyle&&ue.style.variantStyle!=="up"&&(xe+="-"+ue.style.variantStyle)):xe=ue.style[y],xe===ne?E.push(ue):(E.length>0&&b.push(E),E=[ue],ne=xe)}return E.length>0&&b.push(E),b}function xa(a,y){var b;const{parent:E}=a[0],ne=E==null?void 0:E.computedStyle.color,ue=[];for(const xe of ps(a)){const je=y.defaultMode;for(const Ue of Wi(xe,"color")){const Je=Ue[0].computedStyle,st=lo._registry[Ue[0].mode].serialize(Ue,re(le({},y),{defaultMode:je==="text"?"text":"math"}));!y.skipStyles&&Je.color&&Je.color!=="none"&&(!E||ne!==Je.color)?ue.push(Vi("\\textcolor",(b=Je.verbatimColor)!=null?b:Je.color,ga(st))):ue.push(ga(st))}}return ue}function ds(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Wi(a,"backgroundColor").map(ne=>{var ue;if(ne.length>0||ne[0].type!=="box"){const xe=ne[0].computedStyle;if(xe.backgroundColor&&xe.backgroundColor!=="none"&&(!b||E!==xe.backgroundColor))return Vi("\\colorbox",(ue=xe.verbatimBackgroundColor)!=null?ue:xe.backgroundColor,ga(xa(ne,re(le({},y),{defaultMode:"text"}))))}return ga(xa(ne,y))})}function ss(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ne=[];for(const ue of Wi(a,"fontSize")){const xe=ue[0].computedStyle.fontSize,je=ds(ue,y);je&&(xe&&xe!=="auto"&&(!b||E!==xe)?ne.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][xe],...je):ne.push(...je))}return ne}function Yl(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 vl(a){if(a.length===0)return"ord";const y=Yl(a[0].type),b=Yl(a[a.length-1].type);return y&&y===b?y:"ord"}function cc(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 Xr=class w0{constructor(y,b){var E,ne,ue,xe,je;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:me(y)?this.children=y.filter(Je=>Je!==null):y&&y instanceof w0&&(this.children=[y]),this.children)for(const Je of this.children)Je.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=(ne=b==null?void 0:b.classes)!=null?ne:"",this.isTight=(ue=b==null?void 0:b.isTight)!=null?ue:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let Ue=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(Ue=(je=lo.getFont((xe=b.mode)!=null?xe:"math",this,re(le({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?je:void 0),Ue||(Ue="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),fs(this,Ue)}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 ne=cc(b,E);ne.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ne)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=cc(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"]=cc(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"]=cc(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"]=cc(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 ne=y.backgroundColor;this.isSelected&&(ne=Ut(ne)),ne&&ne!==b.backgroundColor&&(this.setStyle("background-color",ne),this.setStyle("display","inline-block"));const ue=y.scalingFactor;return this.scale=ue,this.skew*=ue,this.italic*=ue,this}toMarkup(){var y,b,E,ne;let ue=(y=this.value)!=null?y:"";if(this.children)for(const un of this.children)ue+=un.toMarkup();let xe="";if(this.svgBody)xe=ha(this.svgBody);else if(this.svgOverlay){xe='<span style="',xe+="display: inline-block;",xe+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,xe+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,xe+='">',xe+=ue,xe+="</span>",xe+='<svg style="position:absolute;overflow:visible;',xe+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const un=(b=this.cssProperties)==null?void 0:b.padding;un?(xe+=`top:${un};`,xe+=`left:${un};`,xe+=`width:calc(100% - 2 * ${un} );`):xe+="top:0;left:0;width:100%;",xe+="z-index:2;",xe+='"',this.svgStyle&&(xe+=this.svgStyle),xe+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,xe+=`>${this.svgOverlay}</svg>`}let je="";const Ue=this.classes.split(" ");Ue.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&Ue.push("ML__latex-caret"),this.isSelected&&Ue.push("ML__selected");const Je=Ue.length===1?Ue[0]:Ue.filter((un,Cn,Sr)=>un.length>0&&Sr.indexOf(un)===Cn).join(" ");if(Je.length>0&&(je+=` class="${Je}"`),this.id&&(je+=` data-atom-id=${this.id}`),this.cssId&&(je+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(je+=" "+Object.keys(this.attributes).map(un=>`${un}="${this.attributes[un]}"`).join(" ")),this.htmlData){const un=this.htmlData.split(",");for(const Cn of un){const Sr=Cn.match(/([^=]+)=(.+$)/);if(Sr){const xi=Sr[1].trim().replace(/ /g,"-");xi&&(je+=` data-${xi}="${Sr[2]}" `)}else{const xi=Cn.trim().replace(/ /g,"-");xi&&(je+=` data-${xi} `)}}}const st=(ne=this.cssProperties)!=null?ne:{};this.hasExplicitWidth&&st.width===void 0&&(st.width=`${Math.ceil(this._width*100)/100}em`);const Mt=Object.keys(st).map(un=>`${un}:${st[un]}`);if(this.scale!==void 0&&this.scale!==1&&(ue.length>0||xe.length>0)&&Mt.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const un=this.htmlStyle.split(";");let Cn="";for(const Sr of un){const xi=Sr.match(/([^=]+):(.+$)/);if(xi){const gr=xi[1].trim().replace(/ /g,"-");gr&&(Cn+=`${gr}:${xi[2]};`)}}Cn&&(je+=` style="${Cn}"`)}Mt.length>0&&(je+=` style="${Mt.join(";")}"`);let Gt="";return je.length>0||xe.length>0?Gt=`<span${je}>${ue}${xe}</span>`:Gt=ue,this.caret==="text"?Gt+='<span class="ML__text-caret"></span>':this.caret==="math"&&(Gt+='<span class="ML__caret"></span>'),Gt}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 Ue of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&Ue in y.cssProperties||this.cssProperties&&Ue in this.cssProperties)return!1}const ne=this.cssProperties?Object.keys(this.cssProperties).length:0,ue=y.cssProperties?Object.keys(y.cssProperties).length:0;if(ne!==ue)return!1;if(ne>0){for(const Ue of Object.keys(this.cssProperties))if(this.cssProperties[Ue]!==y.cssProperties[Ue])return!1}const xe=this.classes.trim().replace(/\s+/g," ").split(" "),je=y.classes.trim().replace(/\s+/g," ").split(" ");if(xe.length!==je.length)return!1;xe.sort(),je.sort();for(const[Ue,Je]of xe.entries())if(Je==="vertical-separator"||Je!==je[Ue])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 wc(a){if(!a||a.length===0)return[];a[0].children=wc(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=wc(a[b].children),y.push(a[b]));return y}function sl(a){return a.children&&(a.children=wc(a.children)),a}function ec(a,y){if(!a)return new Xr(null,y);const b=new Xr(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const ne=new Xr(null,{classes:"ML__strut--bottom",type:"ignore"});ne.setStyle("height",a.height+a.depth,"em"),ne.setStyle("vertical-align",-a.depth,"em"),E.push(ne)}return E.push(a),new Xr(E,re(le({},y),{type:"lift"}))}function ac(a){const y=Yo(a)/2,b=new Xr(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function fs(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 ne=ki(a.value.codePointAt(E),y);a.height=Math.max(a.height,ne.height),a.depth=Math.max(a.depth,ne.depth),a._width+=ne.width,a.skew=ne.skew,a.italic=ne.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ne=-1/0,ue=0;for(const xe of a.children)xe.height>E&&(E=xe.height),xe.depth>ne&&(ne=xe.depth),ue=Math.max(ue,(b=xe.maxFontSize)!=null?b:0);a.height=E,a.depth=ne,a._width=a.children.reduce((xe,je)=>xe+je.width,0),a.maxFontSize=ue}}function ys(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ne=-b.shift-b.box.depth;let ue=ne;for(let xe=1;xe<y.length;xe++){const je=y[xe],Ue=-je.shift-ue-je.box.depth,Je=Ue-(b.box.height+b.box.depth);ue=ue+Ue,E.push(Je),E.push(je),b=je}return[E,ne]}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 Us(a){var y;const[b,E]=ys(a);if(!b)return[[],0,0];const ne=new Xr(null,{classes:"pstrut"});let ue=0;for(const Cn of b)if(typeof Cn!="number"){const Sr=Cn.box;ue=Math.max(ue,Sr.maxFontSize,Sr.height)}ue+=2,ne.height=ue,ne.setStyle("height",ue,"em");const xe=[];let je=E,Ue=E,Je=E,st=0;for(const Cn of b){if(typeof Cn=="number")Je+=Cn;else{const Sr=Cn.box,xi=(y=Cn.classes)!=null?y:[],gr=new Xr([ne,Sr],{classes:xi.join(" "),style:Cn.style});Sr.setStyle("height",Sr.height+Sr.depth,"em"),Sr.setStyle("display","inline-block"),gr.setStyle("top",-ue-Je-Sr.depth,"em"),Cn.marginLeft&&gr.setStyle("margin-left",Cn.marginLeft,"em"),Cn.marginRight&&gr.setStyle("margin-right",Cn.marginRight,"em"),xe.push(gr),Je+=Sr.height+Sr.depth,st=Math.max(st,gr.width)}je=Math.min(je,Je),Ue=Math.max(Ue,Je)}xe.forEach(Cn=>{Cn.softWidth=st});const Mt=new Xr(xe,{classes:"vlist"});if(Mt.softWidth=st,Mt.height=Ue,Mt.setStyle("height",Ue,"em"),je>=0)return[[new Xr(Mt,{classes:"vlist-r"})],Ue,-je];const Gt=new Xr(new Xr(null),{classes:"vlist"});Gt.height=-je,Gt.setStyle("height",-je,"em");const un=new Xr(8203,{classes:"vlist-s",maxFontSize:0});return un.softWidth=0,un.height=0,un.depth=0,[[new Xr([Mt,un],{classes:"vlist-r"}),new Xr(Gt,{classes:"vlist-r"})],Ue,-je]}var Pa=class extends Xr{constructor(a,y){var b;const[E,ne,ue]=Us(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=ne,this.depth=ue,this.softWidth=E.reduce((xe,je)=>Math.max(xe,je.width),0)}};function Ml(a,y){var b,E,ne,ue,xe;const je=a.metrics,Ue=new Xr(y.base),Je=(b=y.baseShift)!=null?b:0,st=(E=y.slant)!=null?E:0;let Mt=0,Gt=0;y.above&&(Mt=(ne=y.aboveShift)!=null?ne:Math.max(je.bigOpSpacing1,je.bigOpSpacing3-y.above.depth)),y.below&&(Gt=(ue=y.belowShift)!=null?ue:Math.max(je.bigOpSpacing2,je.bigOpSpacing4-y.below.height));let un=null;if(y.below&&y.above){const Cn=je.bigOpSpacing5+y.below.height+y.below.depth+Gt+Ue.depth+Je;un=new Pa({bottom:Cn,children:[je.bigOpSpacing5,{box:y.below,marginLeft:-st,classes:["ML__center"]},Gt,{box:Ue,classes:["ML__center"]},Mt,{box:y.above,marginLeft:st,classes:["ML__center"]},je.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)un=new Pa({top:Ue.height-Je,children:[je.bigOpSpacing5,{box:y.below,marginLeft:-st,classes:["ML__center"]},Gt,{box:Ue,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const Cn=Ue.depth+Je;un=new Pa({bottom:Cn,children:[{box:Ue,classes:["ML__center"]},Mt,{box:y.above,marginLeft:st,classes:["ML__center"]},je.bigOpSpacing5]}).wrap(a)}else{const Cn=Ue.depth+Je;un=new Pa({bottom:Cn,children:[{box:Ue},je.bigOpSpacing5]}).wrap(a)}return new Xr(un,{type:(xe=y.type)!=null?xe:"op"})}var Ya=7,gl=6,Dl=5,Il=4,uc=3,ll=2,dc=1,cl=0,Rl=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(wa).reduce((ne,ue)=>re(le({},ne),{[ue]:wa[ue][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return dl[[cl,dc,cl,dc,ll,uc,ll,uc][this.id]]}get sub(){return dl[[cl,cl,cl,cl,ll,ll,ll,ll][this.id]]}get fracNum(){return dl[[cl,dc,cl,dc,ll,uc,Il,Dl][this.id]]}get fracDen(){return dl[[cl,cl,cl,cl,ll,ll,Il,Il][this.id]]}get cramp(){return dl[[cl,cl,ll,ll,Il,Il,gl,gl][this.id]]}get isTight(){return this.sizeDelta<0}},Ol={7:new Rl(Ya,0,!1),6:new Rl(gl,0,!0),5:new Rl(Dl,0,!1),4:new Rl(Il,0,!0),3:new Rl(uc,-3,!1),2:new Rl(ll,-3,!0),1:new Rl(dc,-4,!1),0:new Rl(cl,-4,!0)},dl=re(le({},Ol),{displaystyle:Ol[Ya],textstyle:Ol[Dl],scriptstyle:Ol[uc],scriptscriptstyle:Ol[dc]});function Js(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:mo,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 ne=Nu(10,y);return Math.round(a.dimension/mo*E*ne)/ne}return a.dimension*E}function Vs(a,y){if(a===null)return 0;const b=Js(a)/mo;if(Number.isFinite(y)){const E=Nu(10,y);return Math.round(b*E)/E}return b}function Bc(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function su(a){let y=Bc(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${Bc(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${Bc(a.shrink)}`),y}function Ys(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=su(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 ne=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ne).toString(16).toUpperCase(),ne<=255?E=E.padStart(2,"0"):ne<=65535?E=E.padStart(4,"0"):ne<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ne).toString(8),ne<=63?E=E.padStart(2,"0"):ne<=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 Xl(a,y){return a==null?null:"number"in a?re(le({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?re(le({},a),{factor:a.factor*y}):re(le({},a),{factor:y}):"dimension"in a?re(le({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:Xl(a.glue,y),shrink:Xl(a.shrink,y),grow:Xl(a.grow,y)}:a.shrink?{glue:Xl(a.glue,y),shrink:Xl(a.shrink,y)}:a.grow?{glue:Xl(a.glue,y),grow:Xl(a.grow,y)}:{glue:Xl(a.glue,y)}:null}var Yu={"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 lu(){return le({},Yu)}function rs(){return{registers:lu(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Te.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:dt,backgroundColorMap:Ke,getMacro:a=>ti(a,en())}}var $o=class E0{constructor(y,b){var E,ne,ue,xe,je,Ue,Je,st,Mt,Gt,un,Cn,Sr,xi,gr;let Yr;y!=null&&y.parent?(this.parent=y.parent,Yr=y.parent,this.registers={}):(Yr=le(le({},rs()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=Yr.registers),Yr.atomIdsSettings&&(this.atomIdsSettings=le({},Yr.atomIdsSettings)),this.renderPlaceholder=Yr.renderPlaceholder,this.isPhantom=(xe=(ue=y==null?void 0:y.isPhantom)!=null?ue:(ne=this.parent)==null?void 0:ne.isPhantom)!=null?xe:!1,this.letterShapeStyle=Yr.letterShapeStyle,this.minFontScale=Yr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(Ue=(je=this.parent)==null?void 0:je.color)!=null?Ue:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(st=(Je=this.parent)==null?void 0:Je.backgroundColor)!=null?st:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((Mt=this.parent)==null?void 0:Mt.size)?this.size=b.fontSize:this.size=(un=(Gt=this.parent)==null?void 0:Gt.size)!=null?un:so;let Ti=(Sr=(Cn=this.parent)==null?void 0:Cn.mathstyle)!=null?Sr:dl.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(Yr instanceof E0)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=dl.textstyle;break;case"displaystyle":Ti=dl.displaystyle;break;case"scriptstyle":Ti=dl.scriptstyle;break;case"scriptscriptstyle":Ti=dl.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Ti,this.smartFence=Yr.smartFence,this.placeholderSymbol=Yr.placeholderSymbol,this.colorMap=(xi=Yr.colorMap)!=null?xi:ri=>ri,this.backgroundColorMap=(gr=Yr.backgroundColorMap)!=null?gr:ri=>ri,this.getMacro=Yr.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===Ya||this.mathstyle.id===gl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(eo[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 Vs(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 ne=b.getRegister(y.register);if(ne===void 0)return;if(typeof ne=="string")return{string:Number(ne).toString()+ne};if(typeof ne=="number")return{number:E*ne};const ue=b.evaluate(ne);if(ue!==void 0)return"string"in ue?{string:Number(ne).toString()+ue.string}:"number"in ue?{number:E*ue.number}:"dimension"in ue?re(le({},ue),{dimension:E*ue.dimension}):"glue"in ue?re(le({},ue),{glue:re(le({},ue.glue),{dimension:E*ue.glue.dimension}),shrink:ue.shrink?re(le({},ue.shrink),{dimension:E*ue.shrink.dimension}):void 0,grow:ue.grow?re(le({},ue.grow),{dimension:E*ue.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:Js(E,b)/mo}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 ne=this.evaluate(y);return ne===void 0?null:"string"in ne?(E=(b=this.colorMap)==null?void 0:b.call(this,ne.string))!=null?E:ne.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ne=this.evaluate(y);return ne===void 0?null:"string"in ne?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ne.string))!=null?E:ne.string:null}},_l=["body","above","below","superscript","subscript"];function As(a){return typeof a=="string"&&_l.includes(a)}function Nl(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var wr=class Vu{constructor(y){var b,E,ne,ue,xe,je;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=(ne=y.mode)!=null?ne:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=le({},y.style),this.displayContainsHighlight=(ue=y.displayContainsHighlight)!=null?ue:!1,this.captureSelection=(xe=y.captureSelection)!=null?xe:!1,this.skipBoundary=(je=y.skipBoundary)!=null?je:!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 ne;if(!b)return null;const ue=fc(b),xe=[];for(const Ue of ue){const Je=Ue[0].style,st=Gc(y,Ue,{style:{color:Je.color,backgroundColor:Je.backgroundColor,fontSize:Je.fontSize}});st&&xe.push(st)}if(xe.length===0)return null;const je=((ne=E==null?void 0:E.classes)!=null?ne:"").trim();return xe.length===1&&!je&&!(E!=null&&E.type)?xe[0].wrap(y):new Xr(xe,{classes:je,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return lo.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:ne}=y;for(;ne;)E.add(ne),ne=ne.parent;for(ne=b.parent;ne;){if(E.has(ne))return ne;ne=ne.parent}console.assert(!!ne)}static fromJson(y){return typeof y=="string"?new Vu({type:"mord",value:y,mode:"math"}):new Vu(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=le({},this.style)),this.verbatimLatex!==void 0&&(y.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),this.isFunction&&(y.isFunction=!0),this.displayContainsHighlight&&(y.displayContainsHighlight=!0),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.skipBoundary&&(y.skipBoundary=!0),this.captureSelection&&(y.captureSelection=!0),this.args&&(y.args=ud(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=pr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ga([Vi(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ga([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return lo.serialize(this.body,re(le({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return lo.serialize(this.above,y)}belowToLatex(y){return lo.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=re(le({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=lo.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=lo.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(As(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of _l)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(As(y)),As(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 Nl(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Nl(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",ne=typeof this.style.verbatimBackgroundColor=="string",ue=le(le({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete ue.variant,delete ue.variantStyle,ne||delete ue.verbatimBackgroundColor,E||delete ue.verbatimColor,ue}applyStyle(y){this.isDirty=!0,this.style=le(le({},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(As(b)),!As(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ne=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ne:this._branches={[b]:ne};for(const ue of y)ue.parent=this,ue.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new Vu({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 ne of y)ne.parent=this,ne.parentBranch=b,E.push(ne);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 ne of y)ne.parent=this,ne.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(As(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 _l)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=pr(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new $o({parent:y},this.style);let ne=this.createBox(E,{classes:this.parent?"":"ML__base"});return ne?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(ne=this.attachSupsub(E,{base:ne})),ne.wrap(E)):null}attachSupsub(y,b){var E;const ne=b.base,ue=this.superscript,xe=this.subscript;if(!ue&&!xe)return ne;let je=null,Ue=null;const Je=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let st=0;if(ue){const Sr=new $o({parent:y,mathstyle:"superscript"});je=Vu.createBox(Sr,ue),Je||(st=ne.height-y.metrics.supDrop*Sr.scalingFactor)}let Mt=0;if(xe){const Sr=new $o({parent:y,mathstyle:"subscript"});Ue=Vu.createBox(Sr,xe),Je||(Mt=ne.depth+y.metrics.subDrop*Sr.scalingFactor)}let Gt;y.isDisplayStyle?Gt=y.metrics.sup1:y.isCramped?Gt=y.metrics.sup3:Gt=y.metrics.sup2;const un=.5/mo/y.scalingFactor;let Cn=null;if(Ue&&je){st=Math.max(st,Gt,je.depth+.25*y.metrics.xHeight),Mt=Math.max(Mt,y.metrics.sub2);const Sr=y.metrics.defaultRuleThickness;if(st-je.depth-(Ue.height-Mt)<4*Sr){Mt=4*Sr-(st-je.depth)+Ue.height;const gr=.8*y.metrics.xHeight-(st-je.depth);gr>0&&(st+=gr,Mt-=gr)}const xi=this.isExtensibleSymbol&&ne.italic?-ne.italic:0;Cn=new Pa({individualShift:[{box:Ue,shift:Mt,marginLeft:xi},{box:je,shift:-st}]}).wrap(y)}else Ue&&!je?(Mt=Math.max(Mt,y.metrics.sub1,Ue.height-.8*Vo),Cn=new Pa({shift:Mt,children:[{box:Ue,marginRight:un,marginLeft:this.isCharacterBox()?-ne.italic:0}]})):!Ue&&je&&(st=Math.max(st,Gt,je.depth+.25*Vo),Cn=new Pa({shift:-st,children:[{box:je,marginRight:un}]}));return new Xr([ne,new Xr(Cn,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Vu.createBox(new $o({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ne=this.subscript?Vu.createBox(new $o({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ne?b.base.wrap(y):Ml(y,re(le({},b),{above:E,below:ne}))}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,ne,ue,xe;const je=(E=this.value)!=null?E:this.body,Ue=(ne=b==null?void 0:b.boxType)!=null?ne:Yl(this.type);let Je=(ue=b==null?void 0:b.classes)!=null?ue:"";this.mode==="text"&&(Je+=" ML__text");const st=typeof je=="string"||je===void 0?new Xr(je!=null?je:null,{type:Ue,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:re(le({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:Je}):(xe=Vu.createBox(y,je,{type:Ue,classes:Je}))!=null?xe:new Xr(null);return y.isTight&&(st.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(st.italic=0),st.right=st.italic,this.bind(y,st),this.caret&&!this.superscript&&!this.subscript&&(st.caret=this.caret),st}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 fc(a){let y;const b=[];let E=[];for(const ne of a)if(!y&&!ne.style)E.push(ne);else{const ue=ne.computedStyle;y&&ue.color===y.color&&ue.backgroundColor===y.backgroundColor&&ue.fontSize===y.fontSize?E.push(ne):(E.length>0&&b.push(E),E=[ne],y=ue)}return E.length>0&&b.push(E),b}function Gc(a,y,b){var E,ne,ue,xe,je;if(!y||y.length===0)return null;const Ue=new $o({parent:a},b.style),Je=!((E=Ue.atomIdsSettings)!=null&&E.groupNumbers);let st=[];if(y.length===1){const Gt=y[0],un=Gt.render(Ue);un&&(Je&&Gt.isSelected&&un.selected(!0),st=[un])}else{let Gt="",un=!0;for(const Cn of y){(ne=Ue.atomIdsSettings)!=null&&ne.groupNumbers&&Gt&&(un&&Cn.isDigit()||!un&&Xu(Cn))&&(Ue.atomIdsSettings.overrideID=Gt);const Sr=Cn.render(Ue);Ue.atomIdsSettings&&(Ue.atomIdsSettings.overrideID=void 0),Sr&&((ue=Ue.atomIdsSettings)!=null&&ue.groupNumbers&&((Cn.isDigit()||Xu(Cn))&&(!Gt||un!==Cn.isDigit())&&(un=Cn.isDigit(),Gt=(xe=Cn.id)!=null?xe:""),Gt&&(!(Cn.isDigit()||Xu(Cn))||!Cn.hasEmptyBranch("superscript")||!Cn.hasEmptyBranch("subscript"))&&(Gt="")),Je&&Cn.isSelected&&Sr.selected(!0),st.push(Sr))}}if(st.length===0)return null;const Mt=new Xr(st,re(le({isTight:Ue.isTight},b),{type:(je=b.type)!=null?je:"lift"}));return Mt.isSelected=st.every(Gt=>Gt.isSelected),Mt.wrap(Ue)}function Xu(a){return a.mode==="text"}function ud(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof wr?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var Yc=class M0 extends wr{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 M0(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:Pn("text",this.value.codePointAt(0))}};function Pu(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&Dd(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function Dd(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Pl(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 Dc(a){return typeof a=="number"&&!Number.isNaN(a)}function Bu(a){return Array.isArray(a)&&a.length===2}function qu(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function Id(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ne=b.parent;for(;!E&≠)ne&&(E=ne.mode),ne=ne.parent}return E}function Rd(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,ne=!1,ue=!1,xe=!1,je=!1,Ue=!1,Je=!1,st=!1,Mt=!1,Gt=!1,un=!1,Cn=!1,Sr=!1,xi=!1,gr=a[0],Yr=0;for(;gr!=null&&gr.type&&/^(subsup|placeholder)$/.test(gr.type);)Yr+=1,gr=a[Yr];return b=!gr||gr.type==="first",gr&&(Sr=gr.mode==="text",E=!Sr&&gr.type==="mord"&&Be.test(gr.value),ne=!Sr&&gr.type==="mord"&&/\d+$/.test(gr.value),ue=!Sr&&gr.isFunction,xe=gr.type==="genfrac",je=gr.type==="surd",Ue=gr.type==="mbin",Je=gr.type==="mrel",st=gr.type==="mop"||gr.type==="operator"||gr.type==="extensible-symbol",Mt=gr.type==="mpunct"||gr.type==="minner",Gt=gr.type==="array",un=gr.type==="mopen",Cn=gr.type==="mclose"||gr.type==="leftright",xi=gr.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&ne||y.after.includes("function")&&ue||y.after.includes("frac")&&xe||y.after.includes("surd")&&je||y.after.includes("binop")&&Ue||y.after.includes("relop")&&Je||y.after.includes("operator")&&st||y.after.includes("punct")&&Mt||y.after.includes("array")&&Gt||y.after.includes("openfence")&&un||y.after.includes("closefence")&&Cn||y.after.includes("text")&&Sr||y.after.includes("space")&&xi?y.value:""}function Ju(a,y,b){return b?Rd(a,b[y]):""}var Fu={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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 xu(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=Od(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",sc(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function sc(a,y){var b,E,ne;if(!a)return"";let ue=!1,xe;const je=(b=y.inlineShortcuts)!=null?b:Fu;if(!ue&&(a.startsWith("^")||a.startsWith("_"))&&(xe=Qc(a.slice(1),{inlineShortcuts:je,noWrap:!0}),a=a[0]+"{"+xe.match+"}",a+=sc(xe.rest,y),ue=!0),ue||(xe=a.match(/^(sqrt|\u221A)(.*)/),xe&&(xe=Qc(xe[2],{inlineShortcuts:je,noWrap:!0}),a="\\sqrt{"+((E=xe.match)!=null?E:"\\placeholder{}")+"}",a+=sc(xe.rest,y),ue=!0)),ue||(xe=a.match(/^(\\cbrt|\u221B)(.*)/),xe&&(xe=Qc(xe[2],{inlineShortcuts:je,noWrap:!0}),a="\\sqrt[3]{"+((ne=xe.match)!=null?ne:"\\placeholder{}")+"}",a+=sc(xe.rest,y),ue=!0)),ue||(xe=a.match(/^abs(.*)/),xe&&(xe=Qc(xe[1],{inlineShortcuts:je,noWrap:!0}),a="\\left|"+xe.match+"\\right|",a+=sc(xe.rest,y),ue=!0)),ue||(xe=a.match(/^["”“](.*?)["”“](.*)/),xe&&(a="\\text{"+xe[1]+"}",a+=sc(xe[2],y),ue=!0)),ue||(xe=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),xe&&(a=dd(xe[1],je),a+=sc(xe[2],y),ue=!0)),!ue&&/^([fgh])[^a-zA-Z]/.test(a)&&(xe=Qc(a.slice(1),{inlineShortcuts:je,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+xe.match+"\\right)":a[0]+xe.match,a+=sc(xe.rest,y),ue=!0),ue||(xe=a.match(/^([a-zA-Z]+)(.*)/),xe&&(a=dd(xe[1],je),a+=sc(xe[2],y),ue=!0)),!ue)if(xe=Qc(a,{inlineShortcuts:je,noWrap:!0}),xe.match&&xe.rest[0]==="/"){const Ue=Qc(xe.rest.slice(1),{inlineShortcuts:je,noWrap:!0});Ue.match&&(a="\\frac{"+xe.match+"}{"+Ue.match+"}"+sc(Ue.rest,y)),ue=!0}else xe.match&&(a=a.startsWith("(")?"\\left("+xe.match+"\\right)"+sc(xe.rest,y):xe.match+sc(xe.rest,y),ue=!0);return ue||(xe=a.match(/^(\s+)(.*)$/),xe&&(a=" "+sc(xe[2],y),ue=!0)),a}function Qc(a,y){let b="";a=a.trim();let E=a,ne=a.charAt(0),ue={"(":")","{":"}","[":"]"}[ne];if(ue){let xe=1,je=1;for(;je<a.length&&xe>0;)a[je]===ne&&xe++,a[je]===ue&&xe--,je++;xe===0?(y.noWrap&&ne==="("?b=sc(a.substring(1,je-1),y):(ne==="{"&&ue==="}"&&(ne="\\{",ue="\\}"),b="\\left"+ne+sc(a.substring(1,je-1),y)+"\\right"+ue),E=a.slice(Math.max(0,je))):(b=a.substring(1,je),E="")}else{let xe=a.match(/^([a-zA-Z]+)/);if(xe){let je=Ju(null,a,y.inlineShortcuts);if(je)return je=je.replace("_{#?}",""),je=je.replace("^{#?}",""),{match:je,rest:a.slice(je.length)}}if(xe=a.match(/^([a-zA-Z])/),xe)return{match:xe[1],rest:a.slice(1)};if(xe=a.match(/^(-)?\d+(\.\d*)?/),xe)return{match:xe[0],rest:a.slice(xe[0].length)};/^\\(left|right)/.test(a)||(xe=a.match(/^(\\[a-zA-Z]+)/),xe&&(E=a.slice(xe[1].length),b=xe[1]))}return{match:b,rest:E}}function dd(a,y){let b=Ju(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function cu(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function Od(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=cu(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 zu="$$",Qu="$$",hd=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${zu} ${y} ${Qu}`),y),ed=class uh{constructor(y){uh._modes[y]=this}static onPaste(y,b,E){var ne;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const xe=new DataTransfer;xe.setData("text/plain",E),E=xe}const ue=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ne=b.host)!=null&&ne.dispatchEvent(ue)?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,ne=E.selectionIsCollapsed?[0,E.lastOffset]:Pl(E.selection),ue=E.getValue(ne,b);navigator.clipboard.writeText(ue).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 ne=y.model,ue=ne.selectionIsCollapsed?[0,ne.lastOffset]:Pl(ne.selection);let xe=ne.getAtoms(ue);if(xe.every(je=>je.mode==="text"||!je.mode))b.clipboardData.setData("text/plain",xe.filter(je=>je instanceof Yc).map(je=>je.value).join(""));else if(xe.every(je=>je.mode==="latex"))b.clipboardData.setData("text/plain",ne.getAtoms(ue,{includeChildren:!0}).map(je=>{var Ue;return(Ue=je.value)!=null?Ue:""}).join(""));else{let je;xe.length===1&&xe[0].verbatimLatex!==void 0?je=xe[0].verbatimLatex:je=ne.getValue(ue,"latex-expanded"),b.clipboardData.setData("application/x-latex",je);try{b.clipboardData.setData("text/plain",y.options.onExport(y,je,ue))}catch(Ue){}if(xe.length===1){const Ue=xe[0];(Ue.type==="root"||Ue.type==="group")&&(xe=Ue.body.filter(Je=>Je.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(xe.map(Ue=>Ue.toJson())))}catch(Ue){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const Ue=window.MathfieldElement.computeEngine;if(Ue)try{const Je=Ue.jsonSerializationOptions;Ue.jsonSerializationOptions={metadata:["latex"]};const st=Ue.parse(ne.getValue(ue,"latex-unstyled"));Ue.jsonSerializationOptions=Je;const Mt=JSON.stringify(st.json);Mt&&b.clipboardData.setData("application/json",Mt)}catch(Je){}}}b.preventDefault()}static insert(y,b,E={}){var ne;const ue=E.mode==="auto"?y.mode:(ne=E.mode)!=null?ne:y.mode;return uh._modes[ue].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};ed._modes={};var Aa=ed,Nd=[{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","^"]}],td={"\\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 Fc(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Uc(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 eu(a){const y=Uc(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function $u(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 nd(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ne=y.right-y.left,ue=y.bottom-y.top,xe=Math.ceil(y.left-E.left+a.field.scrollLeft*b),je=Math.ceil(y.top-E.top);return{left:xe,right:xe+ne,top:je,bottom:je+ue}}function Hu(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 ne of a.children)if(ne.nodeType===1&&"atomId"in ne.dataset&&!ne.classList.contains("pstrut")){const ue=Hu(ne);E.left=Math.min(E.left,ue.left),E.right=Math.max(E.right,ue.right),E.top=Math.min(E.top,ue.top),E.bottom=Math.max(E.bottom,ue.bottom)}return E}function vu(a,y){var b,E;if(!y.id)return null;let ne=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ne!==null)return ne;const ue=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ne=ue?Hu(ue):null,a.atomBoundsCache&&(ne?a.atomBoundsCache.set(y.id,ne):a.atomBoundsCache.delete(y.id)),ne!=null?ne:null}function Pd(a,y,b){const E=new Map;for(const ne of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ne.style.backgroundColor)continue;const ue=a.field,xe=ue.offsetWidth;let Ue=Math.floor(ue.getBoundingClientRect().width)/xe;Ue=isNaN(Ue)?1:Ue;const Je=nd(a,vu(a,ne),Ue);if(Je){const st=$u(ne);if(E.has(st)){const Mt=E.get(st);E.set(st,{left:Math.min(Mt.left,Je.left),right:Math.max(Mt.right,Je.right),top:Math.min(Mt.top,Je.top),bottom:Math.max(Mt.bottom,Je.bottom)})}else E.set(st,Je)}}return[...E.values()]}function _s(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...Pd(a,E,y)),[])}function Zs(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function yc(a){let y=0,b=0;const E=a.offsetWidth,ne=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ne)}var tu=`@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;
|
|
|
}
|
|
|
`,Cs=`.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);
|
|
|
}
|
|
|
`,pd=`#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);
|
|
|
}
|
|
|
`,md=`/* 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;
|
|
|
}
|
|
|
`,uu=`/* 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);*/
|
|
|
}
|
|
|
`,vd=`.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));
|
|
|
}
|
|
|
`,_u=`: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;
|
|
|
}
|
|
|
`,Qs;function ju(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=Cs;break;case"mathfield":y=tu;break;case"environment-popover":y=pd;break;case"suggestion-popover":y=md;break;case"keystroke-caption":y=uu;break;case"virtual-keyboard":y=vd;break;case"ui":y=_u;break;case"menu":y=dh;break;default:debugger}return y}function rd(a){return Qs||(Qs={}),Qs[a]||(Qs[a]=new CSSStyleSheet,Qs[a].replaceSync(ju(a))),Qs[a]}var gu;function Xc(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(ju(a))),window.document.head.appendChild(b);return}if(gu||(gu={}),((y=gu[a])!=null?y:0)!==0)gu[a]+=1;else{const b=rd(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],gu[a]=1}}function x(a){if("adoptedStyleSheets"in document&&gu!=null&&gu[a]&&(gu[a]-=1,gu[a]<=0)){const y=Qs[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class L0 extends wr{constructor(y){var b;super(re(le({},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 L0(y)}toJson(){return re(le({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new $o({parent:y,mathstyle:"cramp"},this.style),ne=(b=wr.createBox(E,this.body))!=null?b:new Xr("\u25A2",{style:this.style});let ue=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(ue=ne.skew);let xe=Math.min(ne.height,Vo),je;if(this.svgAccent)je=ac(this.svgAccent),xe=E.metrics.bigOpSpacing1-xe;else if(this.accent){const Je=new Xr(this.accent,{fontFamily:"Main-Regular"});Je.italic=0;const st=this.accent===8407?" ML__accent-vec":"";je=new Xr(new Xr(Je),{classes:"ML__accent-body"+st})}je=new Pa({shift:0,children:[{box:new Xr(ne)},-xe,{box:je,marginLeft:ne.left+2*ue,classes:["ML__center"]}]});const Ue=new Xr(je,{type:"lift"});return this.caret&&(Ue.caret=this.caret),this.bind(E,Ue.wrap(E)),this.attachSupsub(E,{base:Ue})}},oe={"(":")","{":"}","[":"]","|":"|","\\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"},ie=Object.fromEntries(Object.entries(oe).map(([a,y])=>[y,a]));function pe(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 Pe(a,y,b,E){var ne;const xe=new Xr(pe(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ne=E.classes)!=null?ne:"")}).wrap(y);return b&&xe.setTop((1-y.scalingFactor)*ao),xe}function qe(a,y,b,E,ne){var ue,xe;const je=new $o({parent:E,mathstyle:"textstyle"},ne==null?void 0:ne.style),Ue=new Xr(pe(a),{fontFamily:`Size${y}-Regular`,isSelected:ne.isSelected,classes:((ue=ne.classes)!=null?ue:"")+` ML__delim-size${y}`,type:(xe=ne.type)!=null?xe:"ignore"}).wrap(je);return b&&Ue.setTop((1-je.scalingFactor)*ao),Ue}function ct(a,y,b,E,ne){var ue;let xe,je,Ue,Je;xe=Ue=Je=pe(a),je=null;let st="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?Ue=xe=Je=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?Ue=xe=Je=8741:a==="\\uparrow"?Ue=Je=9168:a==="\\Uparrow"?Ue=Je=8214:a==="\\downarrow"?xe=Ue=9168:a==="\\Downarrow"?xe=Ue=8214:a==="\\updownarrow"?(xe=8593,Ue=9168,Je=8595):a==="\\Updownarrow"?(xe=8657,Ue=8214,Je=8659):a==="["||a==="\\lbrack"?(xe=9121,Ue=9122,Je=9123,st="Size4-Regular"):a==="]"||a==="\\rbrack"?(xe=9124,Ue=9125,Je=9126,st="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(Ue=xe=9122,Je=9123,st="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(xe=9121,Ue=Je=9122,st="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(Ue=xe=9125,Je=9126,st="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(xe=9124,Ue=Je=9125,st="Size4-Regular"):a==="("||a==="\\lparen"?(xe=9115,Ue=9116,Je=9117,st="Size4-Regular"):a===")"||a==="\\rparen"?(xe=9118,Ue=9119,Je=9120,st="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(xe=9127,je=9128,Je=9129,Ue=9130,st="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(xe=9131,je=9132,Je=9133,Ue=9130,st="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(xe=9127,Je=9129,Ue=9130,st="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(xe=9131,Je=9133,Ue=9130,st="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(xe=9127,Je=9133,Ue=9130,st="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(xe=9131,Je=9129,Ue=9130,st="Size4-Regular"):a==="\\surd"?(xe=57345,Je=9143,Ue=57344,st="Size4-Regular"):a==="\\ulcorner"?(xe=9484,Ue=Je=32):a==="\\urcorner"?(xe=9488,Ue=Je=32):a==="\\llcorner"?(Je=9492,Ue=xe=32):a==="\\lrcorner"&&(xe=9496,Ue=xe=32);const Mt=ki(xe,st),Gt=Mt.height+Mt.depth,un=ki(Ue,st),Cn=un.height+un.depth,Sr=ki(Je,st),xi=Sr.height+Sr.depth;let gr=0,Yr=1;if(je!==null){const vc=ki(je,st);gr=vc.height+vc.depth,Yr=2}const Ti=Gt+xi+gr,ri=Math.max(0,Math.ceil((y-Ti)/(Yr*Cn))),wo=Ti+ri*Yr*Cn;let ta=ao;b&&(ta=ta*E.scalingFactor);const jo=wo/2-ta,ws=.008,Xs=[];Xs.push({box:new Xr(Je,{fontFamily:st})}),Xs.push(-ws);const Hi=new Xr(Ue,{fontFamily:st});if(je===null)for(let vc=0;vc<ri;vc++)Xs.push({box:Hi});else{for(let vc=0;vc<ri;vc++)Xs.push({box:Hi});Xs.push(-ws),Xs.push({box:new Xr(je,{fontFamily:st})}),Xs.push(-ws);for(let vc=0;vc<ri;vc++)Xs.push({box:Hi})}Xs.push(-ws),Xs.push({box:new Xr(xe,{fontFamily:st})});let iu="";st==="Size1-Regular"?iu=" delim-size1":st==="Size4-Regular"&&(iu=" delim-size4");const Tu=new Pa({bottom:jo,children:Xs},{classes:iu});return new Xr(Tu,re(le({},ne!=null?ne:{}),{classes:((ue=ne==null?void 0:ne.classes)!=null?ue:"")+" ML__delim-mult"}))}var ht=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),Et=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),cn=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),En=[0,1.2,1.8,2.4,3];function ur(a,y,b,E){return a===void 0||a==="."?xo(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),ht.has(a)||cn.has(a)?qe(a,y,!1,b,E):Et.has(a)?ct(a,En[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var Jn=[{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}],Hr=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],oi=[{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 Oi(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function ro(a,y,b,E){const ne={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let ue=ne;ue<b.length&&b[ue].type!=="stack";ue++){const xe=ki(a,Oi(b[ue]));if(xe.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let je=xe.height+xe.depth;if(b[ue].type==="small"&&(b[ue].mathstyle==="scriptscriptstyle"?je*=Math.max(eo[Math.max(1,E.size-2)],E.minFontScale):b[ue].mathstyle==="scriptstyle"&&(je*=Math.max(eo[Math.max(1,E.size-1)],E.minFontScale))),je>y)return b[ue]}return b[b.length-1]}function yo(a,y,b,E,ne,ue){if(!y||y.length===0||y===".")return xo(ne);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let xe;cn.has(y)?xe=Jn:ht.has(y)?xe=oi:xe=Hr;const je=ro(pe(y),b,xe,ne),Ue=new $o({parent:ne,mathstyle:je.mathstyle},ue==null?void 0:ue.style);return je.type==="small"?Pe(y,Ue,E,re(le({},ue),{type:a})):je.type==="large"?qe(y,je.size,E,Ue,re(le({},ue),{type:a})):(console.assert(je.type==="stack"),ct(y,b,E,Ue,re(le({},ue),{type:a})))}function Gi(a,y,b,E,ne,ue){if(y===".")return xo(ne,ue==null?void 0:ue.classes);const xe=ao*ne.scalingFactor,je=901,Ue=5/mo,Je=Math.max(b-xe,E+xe),st=Math.max(Je/500*je,2*Je-Ue);return yo(a,y,st,!0,ne,ue)}function xo(a,y){const b=new Xr(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new $o({parent:a,mathstyle:"textstyle"}))}var sa=class k0 extends wr{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 k0(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{}"}},fa=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],us=["cases","dcases","rcases"],el=["align","align*","aligned","gather","gathered","split"],lc=["array","subequations","eqnarray"];function Ll(a){return lc.concat(el).concat(us).concat(fa).includes(a)}function Ic(a){return fa.includes(a)}function Rc(a){return us.includes(a)}function ql(a){return el.includes(a)}function Oc(a,y,b){let E=0;for(const Je of b)"align"in Je&&(E+=1);let ne=0;const ue=[];for(const Je of y){let st=0;for(ne=Math.max(ne,Math.min(Je.length,E));st<Je.length;){const Mt=[],Gt=Math.min(Je.length,st+E);for(;st<Gt;){const un=Je[st];un.length===0?Mt.push([new wr({type:"first",mode:a.mode})]):un[0].type!=="first"?Mt.push([new wr({type:"first",mode:a.mode}),...un]):(console.assert(!un.slice(1).some(Cn=>Cn.type==="first")),Mt.push(un)),st+=1}ue.push(Mt)}}ue.length>0&&ue[ue.length-1].length===1&&ue[ue.length-1][0].length===1&&ue[ue.length-1][0][0].type==="first"&&ue.pop();const xe=[];for(const Je of ue){if(Je.length!==ne)for(let st=Je.length;st<ne;st++)Je.push([new wr({type:"first",mode:a.mode}),new sa]);xe.push(Je)}let je=0,Ue=0;for(const Je of xe){Ue=0;for(const st of Je){for(const Mt of st)Mt.parent=a,Mt.parentBranch=[je,Ue];Ue+=1}je+=1}return a.isDirty=!0,xe}var ja=class A0 extends wr{constructor(y,b,E,ne={}){var ue;super({type:"array"}),this.environmentName=y,this.rowGaps=E,ne.mathstyleName&&(this.mathstyleName=ne.mathstyleName),ne.columns&&(ne.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ne.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=Oc(this,b,this.colFormat),ne.leftDelim&&(this.leftDelim=ne.leftDelim),ne.rightDelim&&(this.rightDelim=ne.rightDelim),ne.arraycolsep!==void 0&&(this.arraycolsep=ne.arraycolsep),this.colSeparationType=ne.colSeparationType,ne.arraystretch!==void 0&&(this.arraystretch=ne.arraystretch),this.minColumns=(ue=ne.minColumns)!=null?ue:1}static fromJson(y){return new A0(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=re(le({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(ne=>ne.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(Nl(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Nl(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(As(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 ne of E)y.push(...ne.children),y.push(ne);return[...y,...super.children]}render(y){var b,E,ne,ue,xe,je;const Ue=new $o({parent:y,mathstyle:this.mathstyleName},this.style),Je=Ue.getRegisterAsEm("arrayrulewidth"),st=Ue.getRegisterAsEm("arraycolsep"),Mt=Ue.getRegisterAsEm("doublerulesep"),Gt=(E=(b=this.arraystretch)!=null?b:Ue.getRegisterAsNumber("arraystretch"))!=null?E:1;let un=typeof this.arraycolsep=="number"?this.arraycolsep:st;this.colSeparationType==="small"&&(un=.2778*(new $o({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const Cn=Gt*po,Sr=.7*Cn,xi=.3*Cn;let gr=0;const Yr=[];let Ti=0;const ri=this.array.length;for(let nl=0;nl<ri;++nl){const Zl=this.array[nl];Ti=Math.max(Ti,Zl.length);const gc=new $o({parent:Ue,mathstyle:this.mathstyleName},this.style);let Du=Sr/gc.scalingFactor,Iu=xi/gc.scalingFactor;const Ru={cells:[],height:0,depth:0,pos:0};for(const Su of Zl){const ep=(ne=wr.createBox(gc,Su,{type:"ignore"}))!=null?ne:new Xr(null,{type:"ignore"});Iu=Math.max(Iu,ep.depth),Du=Math.max(Du,ep.height),Ru.cells.push(ep)}let Ou=(ue=Vs(this.rowGaps[nl]))!=null?ue:0;Ou>0&&(Ou+=xi,Iu=Math.max(Iu,Ou),Ou=0),nl<ri-1&&!Ic(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Iu+=Ue.getRegisterAsEm("jot")),Ru.height=Du,Ru.depth=Iu,gr+=Du,Ru.pos=gr,gr+=Iu+Ou,Yr.push(Ru)}const wo=gr/2+ao,ta=[];for(let nl=0;nl<Ti;nl++){const Zl=[];for(const gc of Yr){const Du=gc.cells[nl];Du.depth=gc.depth,Du.height=gc.height,Zl.push({box:Du,shift:gc.pos-wo})}Zl.length>0&&ta.push(new Pa({individualShift:Zl}))}const jo=[];let ws=!1,Xs=!1,Hi=0,iu=!this.leftDelim;const{colFormat:Tu}=this;for(const nl of Tu){if("align"in nl&&Hi>=ta.length)break;if("align"in nl)ws?jo.push(kl(2*un)):(Xs||iu)&&jo.push(kl(un)),jo.push(new Xr(ta[Hi],{classes:"col-align-"+nl.align})),Hi++,ws=!0,Xs=!1,iu=!1;else if("gap"in nl){if(typeof nl.gap=="number")jo.push(kl(nl.gap));else{const Zl=Fl(y,Yr,wo,nl.gap);Zl&&jo.push(Zl)}ws=!1,Xs=!1,iu=!1}else if("separator"in nl){const Zl=new Xr(null,{classes:"vertical-separator"});Zl.height=gr,Zl.setStyle("height",gr,"em"),Zl.setStyle("border-right",`${Je}em ${nl.separator} currentColor`),Zl.setStyle("vertical-align",-(gr-wo),"em");let gc=0;Xs?gc=Mt-Je:ws&&(gc=un-Je),Zl.left=gc,jo.push(Zl),ws=!1,Xs=!0,iu=!1}}ws&&!this.rightDelim&&jo.push(kl(un));const pu=new Xr(jo,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(pu.caret=this.caret),this.bind(y,pu);const vc=pu.height,ou=pu.depth,Zc=this.bind(y,new Xr([this.bind(y,Gi("open",(xe=this.leftDelim)!=null?xe:".",vc,ou,Ue,{isSelected:this.isSelected})),pu,this.bind(y,Gi("close",(je=this.rightDelim)!=null?je:".",vc,ou,Ue,{isSelected:this.isSelected}))],{type:"ord"}));return Zc?(Zc.setStyle("display","inline-block"),this.caret&&(Zc.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Zc}))):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 ne of this.colFormat)"align"in ne&&typeof ne.align=="string"?E.push(ne.align):"separator"in ne&&ne.separator==="solid"?E.push("|"):"separator"in ne&&ne.separator==="dashed"&&E.push(":");E.push("}")}for(let ne=0;ne<this.array.length;ne++){for(let ue=0;ue<this.array[ne].length;ue++)ue>0&&E.push(" & "),E.push(wr.serialize(this.array[ne][ue],y));if(ne<this.array.length-1){const ue=this.rowGaps[ne];ue!=null&&ue.dimension?E.push(`\\\\[${ue.dimension} ${(b=ue.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ga(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 ue of this.array[y][b])ue.parent=void 0,ue.parentBranch=void 0;let ne=E;(E.length===0||E[0].type!=="first")&&(ne=[new wr({type:"first",mode:this.mode}),...E]),this.array[y][b]=ne;for(const ue of ne)ue.parent=this,ue.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(Bl(this));this.array.splice(y,0,b);for(let E=y;E<this.rowCount;E++)for(let ne=0;ne<this.colCount;ne++){const ue=this.array[E][ne];if(ue)for(const xe of ue)xe.parentBranch=[E,ne]}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(Bl(this));this.array.splice(y+1,0,b);for(let E=y+1;E<this.rowCount;E++)for(let ne=0;ne<this.colCount;ne++){const ue=this.array[E][ne];if(ue)for(const xe of ue)xe.parentBranch=[E,ne]}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 ne of E)if(ne)for(const ue of ne)ue.parent=void 0,ue.parentBranch=void 0;for(let E=y;E<this.rowCount;E++)for(let ne=0;ne<this.colCount;ne++){const ue=this.array[E][ne];if(ue)for(const xe of ue)xe.parentBranch=[E,ne]}this.isDirty=!0}addColumnBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,Bl(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ne=this.array[b][E];if(ne)for(const ue of ne)ue.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,Bl(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const ne=this.array[b][E];if(ne)for(const ue of ne)ue.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 ne of E)if(ne)for(const ue of ne)ue.parent=void 0,ue.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ne=this.array[b][E];if(ne)for(const ue of ne)ue.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(ne=>ne.type!=="first"));return y}};function Bl(a){const y=new wr({type:"first",mode:a.mode});y.parent=a;const b=new sa;return b.parent=a,[y,b]}function kl(a){const y=new Xr(null,{classes:"arraycolsep"});return y.width=a,y}function Fl(a,y,b,E){if(!E)return null;const ne=[];for(const ue of y){const xe=wr.createBox(a,E,{type:"ignore"});xe&&(xe.depth=ue.depth,xe.height=ue.height,ne.push({box:xe,shift:ue.pos-b}))}return new Pa({individualShift:ne}).wrap(a)}var Ul=class T0 extends wr{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 T0(y)}toJson(){return re(le({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,ne,ue;const xe=wr.createBox(y,this.body,{type:"lift"});if(!xe)return null;const je=y.toEm((b=this.offset)!=null?b:{dimension:0});xe.depth+=je,xe.setStyle("display","inline-block"),xe.setStyle("position","relative"),xe.setStyle("height",Math.floor(100*xe.height+xe.depth)/100,"em"),xe.setStyle("vertical-align",-Math.floor(100*xe.height)/100,"em");const Ue=new $o({parent:y},this.style),Je=Ue.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),st=new Xr(null,{classes:"ML__box"});st.height=xe.height+Je,st.depth=xe.depth+Je,st.setStyle("box-sizing","border-box"),st.setStyle("position","absolute"),st.setStyle("top",-Je+.3,"em"),st.setStyle("left",0),st.setStyle("height",st.height+st.depth,"em"),st.setStyle("width","100%"),this.backgroundcolor&&st.setStyle("background-color",(ne=Ue.toColor(this.backgroundcolor))!=null?ne:"transparent"),this.framecolor&&st.setStyle("border",`${Ue.getRegisterAsEm("fboxrule",2)}em solid ${(ue=Ue.toColor(this.framecolor))!=null?ue:"black"}`),this.border&&st.setStyle("border",this.border);const Mt=new Xr([st,xe],{type:"lift"});return Mt.setStyle("display","inline-block"),Mt.setStyle("position","relative"),Mt.setStyle("line-height",0),Mt.height=xe.height+Je+(je>0?je:0),Mt.depth=xe.depth+Je+(je<0?-je:0),Mt.setStyle("padding-left",Je,"em"),Mt.setStyle("padding-right",Je,"em"),Mt.setStyle("height",Math.floor(100*(xe.height+xe.depth+2*Je+Math.abs(je)))/100,"em"),Mt.setStyle("margin-top",-Je,"em"),Mt.setStyle("top",Math.floor(100*(xe.depth-xe.height+2*Je-je))/100,"em"),Mt.setStyle("vertical-align",Math.floor(100*(xe.depth+2*Je))/100,"em"),this.caret&&(Mt.caret=this.caret),this.attachSupsub(y,{base:Mt})}_serialize(y){return y.skipStyles?ga([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Ku=class D0 extends wr{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 D0(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Xr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},zc=class I0 extends wr{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new I0(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},hc=class R0 extends wr{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 R0(y.body,y.mode,y.style)}render(y){const b=wr.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=pr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Fs=class O0 extends wr{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 ne=this.matchingRightDelim();return this.variant==="left...right"?ga(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ne]):this.variant==="mleft...mright"?ga(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ne]):ga([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),ne])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=oe[E])!=null?b:E}render(y){var b,E;const ne=new $o({parent:y},this.style);console.assert(this.body!==void 0);const ue=new $o({parent:y,mathstyle:"textstyle"},this.style),xe=(b=wr.createBox(ne,this.body,{type:"inner"}))!=null?b:new Xr(null,{type:"inner"}),je=xe.height/ue.scalingFactor,Ue=xe.depth/ue.scalingFactor,Je=[];if(this.leftDelim&&Je.push(this.bind(ue,Gi("open",this.leftDelim,je,Ue,ue,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),xe&&(tc(xe.children,this,ne,je,Ue),Je.push(xe)),this.rightDelim){let un=this.containsCaret?" ML__contains-caret":"",Cn=this.rightDelim;Cn==="?"&&(ne.smartFence?(Cn=this.matchingRightDelim(),un+=" ML__smart-fence__close"):Cn="."),Je.push(this.bind(ue,Gi("close",Cn,je,Ue,ue,{isSelected:this.isSelected,classes:un+" ML__close",mode:this.mode,style:this.style})))}let st=this.variant==="mleft...mright";const Mt=this.leftSibling;Mt&&(!st&&Mt.isFunction&&(st=!0),!st&&Mt.type==="subsup"&&((E=Mt.leftSibling)!=null&&E.isFunction)&&(st=!0));const Gt=new Xr(Je,{type:st?"close":"inner",classes:"left-right"});return Gt.setStyle("margin-top",`${-xe.depth}em`),Gt.setStyle("height",`${xe.height+xe.depth}em`),this.caret&&(Gt.caret=this.caret),this.bind(ne,Gt.wrap(ne))}};function tc(a,y,b,E,ne){if(a)for(let ue=0;ue<a.length;ue++){const xe=a[ue];xe.type==="middle"?(a[ue]=y.bind(b,Gi("inner",xe.value,E,ne,b,{isSelected:y.isSelected})),a[ue].caret=xe.caret,a[ue].isSelected=xe.isSelected,a[ue].cssId=xe.cssId,a[ue].htmlData=xe.htmlData,a[ue].htmlStyle=xe.htmlStyle,a[ue].attributes=xe.attributes,a[ue].cssProperties=xe.cssProperties):xe.children&&tc(xe.children,y,b,E,ne)}}var Bd=class N0 extends wr{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=wr.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},yu=class P0 extends wr{constructor(){super({type:"macro-argument"})}static fromJson(y){return new P0}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},Cu=class B0 extends wr{constructor(y,b,E=!1,ne,ue){var xe;super({type:"prompt",mode:(xe=ue==null?void 0:ue.mode)!=null?xe:"math",style:ue==null?void 0:ue.style,command:"\\placeholder"}),this.body=ne,this.correctness=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new B0(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 $o({parent:y}),E=b.getRegisterAsEm("fboxsep"),ne=E,ue=E,xe=wr.createBox(y,this.body);if(!xe)return null;xe.height||(xe.height=b.metrics.xHeight),xe.setStyle("vertical-align",-xe.height,"em"),this.correctness==="correct"?xe.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&xe.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const je=new Xr(xe,{type:"ord"});je.setStyle("display","inline-block"),je.setStyle("height",xe.height+xe.depth,"em"),je.setStyle("vertical-align",-ue,"em");let Ue="ML__prompt ";this.locked?Ue+=" ML__lockedPromptBox ":Ue+=" ML__editablePromptBox ",this.correctness==="correct"?Ue+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(Ue+=" ML__incorrectPromptBox "),this.containsCaret&&(Ue+=" ML__focusedPromptBox ");const Je=new Xr(null,{classes:Ue,attributes:{part:"prompt"}});Je.height=je.height+ue,Je.depth=je.depth+ue,Je.width=je.width+2*ne,Je.setStyle("box-sizing","border-box"),Je.setStyle("position","absolute"),Je.setStyle("height",je.height+je.depth+2*ue,"em"),ne===0&&Je.setStyle("width","100%"),ne!==0&&(Je.setStyle("width",`calc(100% + ${2*ne}em)`),Je.setStyle("top",E,"em"),Je.setStyle("left",-ne,"em")),(!this.body||this.body.length===1)&&(Je.width=3*ne,Je.setStyle("width",`calc(100% + ${3*ne}em)`),Je.setStyle("left",-1.5*ne,"em"));let st="";this.correctness==="incorrect"&&(st+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),st&&(Je.svgOverlay=st);const Mt=new Xr([Je,je],{classes:"ML__prompt-atom"});return Mt.setStyle("position","relative"),Mt.setStyle("display","inline-block"),Mt.setStyle("line-height",0),Mt.height=je.height+ue+.2,Mt.depth=je.depth+ue,Mt.left=ne,Mt.right=ne,Mt.setStyle("height",je.height+ue,"em"),Mt.setStyle("top",je.depth-je.height,"em"),Mt.setStyle("vertical-align",je.depth+ue,"em"),Mt.setStyle("margin-left",.5,"em"),Mt.setStyle("margin-right",.5,"em"),this.caret&&(Mt.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Mt}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let ne="\\placeholder";return this.placeholderId&&(ne+=`[${this.placeholderId}]`),this.correctness==="correct"?ne+="[correct]":this.correctness==="incorrect"&&(ne+="[incorrect]"),this.locked&&(ne+="[locked]"),Vi(ne,E)}},du=class F0 extends wr{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new F0(y);for(const E of _l)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new $o({parent:y,isPhantom:!0}),ne=this.leftSibling,ue=(b=ne.render(E))!=null?b:new Xr(null),xe=new Xr(null);return xe.height=ue.height,xe.depth=ue.depth,this.attachSupsub(y,{base:xe,isCharacterBox:ne.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Jl(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Uu=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ne,ue,xe;b!=null||(b={}),this.tokens=a,this.context=y instanceof $o&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new $o({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:(ne=b.style)!=null?ne:{},parseMode:(ue=b.parseMode)!=null?ue:"math",mathstyle:(xe=b.mathstyle)!=null?xe:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ne=this.parsingContext,ue={parent:ne,mathlist:[],style:le({},ne.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:ne.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b:ne.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=ue}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(le({before:Oo(this.tokens.slice(this.index,this.index+10)),after:Oo(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 le({},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 du({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=pr(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?pc(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new sa({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 ue=this.get();Jl(ue)?(E+=ue,b=this.end()||E.length>=a.length):b=!0}const ne=a.toUpperCase()===E.toUpperCase();return ne||(this.index=y),ne}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(Jl(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,ne=this.peek();for(;ne==="<space>"||ne==="+"||ne==="-";)this.get(),ne==="-"&&(E=!E),ne=this.peek();a=!!a;let ue=10,xe=/\d/;if(this.match("'"))ue=8,xe=/[0-7]/,a=!0;else if(this.match('"'))ue=16,xe=/[\dA-F]/,a=!0;else if(this.match("x"))ue=16,xe=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ne=this.get(),ne?ne.length===2&&ne.startsWith("\\")?{number:(E?-1:1)*((y=ne.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ne.codePointAt(0))!=null?b:0),base:"alpha"}:null;let je="";for(;this.hasPattern(xe);)je+=this.get();if(!a&&(this.match(".")||this.match(",")))for(je+=".";this.hasPattern(xe);)je+=this.get();const Ue=a?Number.parseInt(je,ue):Number.parseFloat(je);return Number.isNaN(Ue)?null:{number:E?-Ue:Ue,base:ue===16?"hexadecimal":ue===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 ue=this.peek();if(ue==="-")E=!E;else if(ue!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const ue=this.get();return ue.startsWith("\\")?b?{register:ue,global:!0,factor:(E?-1:1)*b.number}:E?{register:ue,global:!0,factor:-1}:{register:ue,global:!0}:(this.index=y,null)}let ne=this.get();return ne!=null&&ne.startsWith("\\")?(ne=ne.substring(1),this.context.registers[ne]?!E||b!==null?{register:ne,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ne}:(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()||!Jl(this.peek()))return null;const ne=this.scanString();return ne.length>0?{string:ne}: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=Ct(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const je of y.params)if(je.isOptional)b.push(this.scanOptionalArgument(je.type));else{const Ue=this.scanArgument(je.type);Ue||this.onError({code:"missing-argument",arg:a}),b.push(Ue)}this.beginContext({tabular:y.tabular});const E=[],ne=[];let ue=[],xe=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),xe=!0),!xe&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),xe=!0),!xe)if(this.matchColumnSeparator())ue.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){ue.push(this.mathlist),this.mathlist=[];let je=null;this.skipWhitespace(),this.match("[")&&(je=this.scanDimen(),this.skipWhitespace(),this.match("]")),ne.push(je!=null?je:{dimension:0}),E.push(ue),ue=[]}else this.mathlist.push(...this.scan(je=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(je)));while(!xe);return ue.push(this.mathlist),ue.length>0&&E.push(ue),this.endContext(),y.createAtom(a,E,ne,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=xe=>xe==="<}>");let y="",b=null,E=[],ne=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=pr(y,"math"),b&&(E=this.scanArguments(b)[1]),ne=this.mathlist,this.mathlist=[]):this.parseExpression();let ue;return y?(console.assert(!!b),E.unshift(this.mathlist),ne&&E.unshift(ne),ue=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):ue=this.mathlist,this.endContext(),ue}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 hc(y,this.parseMode,this.style);return b.verbatimLatex=Oo(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 Fs("",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(!Jl(a)&&!a.startsWith("\\"))return null;this.next();const y=pr(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 zc("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new zc("\\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 zc(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ne=(a=this.scanDelim())!=null?a:".";return new Fs(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ne,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 wr({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new wr({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(Lt(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 ne=a.params[E];ne.type==="rest"?b.push(this.scan(ue=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(ue))):ne.isOptional?b.push(this.scanOptionalArgument(ne.type)):ne.type.endsWith("*")?y=ne.type.slice(0,-1):b.push(this.scanArgument(ne.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Jl(a)){const b=lo.createAtom(this.parseMode,a,le({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=pr(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new zc(a)];if(b.definitionType==="symbol"){const E=le({},this.style);b.variant&&(E.variant=b.variant),y=new wr({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 zc(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 ne=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ne}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ne=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ne}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 ne=this.mathlist;return this.endContext(),{group:ne}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ne=this.mathlist;return this.endContext(),{group:ne}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ne=this.mathlist;return this.endContext(),{group:ne}}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 ne of E){const ue=ne.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(ue)b.padding={dimension:parseInt(ue[1]),unit:ue[2]};else{const xe=ne.match(/^\s*border\s*:\s*(.*)/);xe?b.border=xe[1]:b.backgroundcolor={string:ne}}}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 je=this.scanOptionalArgument("string"),Ue=this.scanOptionalArgument("math"),Je=wr.serialize(Ue,{defaultMode:"math"});let st=[],Mt;!Mt&&Je==="correct"?Mt="correct":!Mt&&Je==="incorrect"?Mt="incorrect":Je!==""&&(st=Ue);const Gt=this.scanOptionalArgument("string")==="locked",un=this.scanArgument("auto");let Cn;return un&&Array.isArray(un)&&un.length>0?Cn=un:un&&typeof un=="object"&&"group"in un?Cn=un.group:Cn=st,je?[new Cu(je,Mt,Gt,Cn!=null?Cn:st,{mode:this.parseMode,style:this.style})]:[new sa({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const je=this.index,Ue=this.scanLiteralGroup()||this.next();if(!Ue)return null;if(this.context.registers[Ue.substring(1)]){const Je=this.scanArgument("string");Je!==null&&(this.context.registers[Ue.substring(1)]=Je);const st=ga([a,Oo(this.tokens.slice(je,this.index))]);return[new wr({type:"text",value:"",verbatimLatex:st})]}}let ne=this.scanMacro(a);if(ne)return[ne];const ue=pr(a,this.parseMode);if(!ue)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(je=>new wr({type:"text",value:je,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new zc(a)]);const xe=this.index;if(ue.definitionType==="symbol"){const je=le({},this.style);ue.variant&&(je.variant=ue.variant),ne=new wr({type:ue.type,command:a,style:je,value:String.fromCodePoint(ue.codepoint),mode:this.parseMode})}else{if(ue.ifMode&&!ue.ifMode.includes(this.parseMode))return[];const je=this.parseMode;ue.applyMode&&(this.parseMode=ue.applyMode);let Ue,Je=[];if(ue.parse?Je=ue.parse(this):[Ue,Je]=this.scanArguments(ue),this.parseMode=je,ue.applyMode&&!ue.applyStyle&&!ue.createAtom)return Lt(Je[0]);if(ue.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof ue.createAtom=="function")ne=ue.createAtom({command:a,args:Je,style:this.style,mode:this.parseMode}),Ue&&(ne.body=Lt(this.scanArgument(Ue)));else if(typeof ue.applyStyle=="function"){const st=le(le({},this.style),ue.applyStyle(a,Je,this.context)),Mt=this.parseMode;if(ue.applyMode&&(this.parseMode=ue.applyMode),Ue){const Gt=this.style;this.style=st;const un=this.scanArgument(Ue);return this.style=Gt,this.parseMode=Mt,Lt(un)}this.style=st}else ne=new wr({type:"mord",command:(b=ue.command)!=null?b:a,style:le({},this.style),value:a,mode:(E=ue.applyMode)!=null?E:this.parseMode})}if(!ne)return null;if(ne instanceof wr&&ne.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(a)){const je=ga([a,Oo(this.tokens.slice(xe,this.index))]);je&&(ne.verbatimLatex=je)}if(ne.verbatimLatex===null&&(ne.verbatimLatex=void 0),ne.isFunction&&this.smartFence){const je=this.scanSmartFence();if(je)return[ne,je]}return[ne]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Jl(a)){const y=lo.createAtom(this.parseMode,a,le({},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 Yc(" "," ",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,ne=b.args,ue={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let xe=1;xe<=ne;xe++){let je=this.scanLiteralGroup();if(!je){const Ue=this.index;this.scanExpression(),je=Oo(this.tokens.slice(Ue,this.index))}ue[xe]=je}return new Bd(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:Oo(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:pc(b.def,{context:this.context,parseMode:this.parseMode,args:xe=>ue[xe],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ne=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(ne===null){if(this.parseSupSub()||this.parseLimits())return!0;ne=this.scanSymbolCommandOrLiteral()}return ne?(Array.isArray(ne)?this.mathlist.push(...ne):this.mathlist.push(ne),!0):!1}};function pc(a,y){var b,E,ne,ue;const xe=(b=y==null?void 0:y.args)!=null?b:void 0,je=new Uu(xs(a,xe),y==null?void 0:y.context,{args:xe,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ne=y==null?void 0:y.parseMode)!=null?ne:"math",style:(ue=y==null?void 0:y.style)!=null?ue:{}}),Ue=[];for(;!je.end();)Ue.push(...je.scan(()=>!1));return Ue}function tp(a,y){var b;const E=new Uu(xs(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 z0 extends wr{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=Cl.go(ui.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=pc(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new z0(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return re(le({},super.toJson()),{arg:this.arg})}render(y){const b=wr.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}};nn(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new np(a.command,(y=a.args[0])!=null?y:"")}});var ui={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 ne,ue=10,xe=[];;){ne!==a?(ue=10,ne=a):ue--;var je=ui.stateMachines[y],Ue=je.transitions[b]||je.transitions["*"];e:for(var Je=0;Je<Ue.length;Je++){var st=ui.patterns.match_(Ue[Je].pattern,a);if(st){for(var Mt=Ue[Je].task,Gt=0;Gt<Mt.action_.length;Gt++){var un;if(je.actions[Mt.action_[Gt].type_])un=je.actions[Mt.action_[Gt].type_](E,st.match_,Mt.action_[Gt].option);else if(ui.actions[Mt.action_[Gt].type_])un=ui.actions[Mt.action_[Gt].type_](E,st.match_,Mt.action_[Gt].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Mt.action_[Gt].type_+")"];ui.concatArray(xe,un)}if(b=Mt.nextState||b,a.length>0){if(Mt.revisit||(a=st.remainder),!Mt.toContinue)break e}else return xe}}if(ue<=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=ui.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 ui.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return ui.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return ui.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return ui.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return ui.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return ui.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return ui.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return ui.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return ui.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return ui.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return ui.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return ui.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return ui.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 ui.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return ui.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return ui.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return ui.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 ui.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return ui.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return ui.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return ui.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return ui.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return ui.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return ui.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return ui.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=ui.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,ne,ue,xe,je,Ue,Je){var st=function(gr,Yr){if(typeof Yr=="string")return gr.indexOf(Yr)!==0?null:Yr;var Ti=gr.match(Yr);return Ti?Ti[0]:null},Mt=function(gr,Yr,Ti){for(var ri=0;Yr<gr.length;){var wo=gr.charAt(Yr),ta=st(gr.substr(Yr),Ti);if(ta!==null&&ri===0)return{endMatchBegin:Yr,endMatchEnd:Yr+ta.length};if(wo==="{")ri++;else if(wo==="}"){if(ri===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];ri--}Yr++}return ri>0,null},Gt=st(a,y);if(Gt===null||(a=a.substr(Gt.length),Gt=st(a,b),Gt===null))return null;var un=Mt(a,Gt.length,E||ne);if(un===null)return null;var Cn=a.substring(0,E?un.endMatchEnd:un.endMatchBegin);if(ue||xe){var Sr=this.findObserveGroups(a.substr(un.endMatchEnd),ue,xe,je,Ue);if(Sr===null)return null;var xi=[Cn,Sr.match_];return{match_:Je?xi.join(""):xi,remainder:Sr.remainder}}else return{match_:Cn,remainder:a.substr(un.endMatchEnd)}},match_:function(a,y){var b=ui.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return ui.patterns.patterns[a](y);var E=y.match(b);if(E){var ne;return E[2]?ne=[E[1],E[2]]:E[1]?ne=E[1]:ne=E[0],{match_:ne,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 ui.go(y,"text")},"{text}":function(a,y){var b=["{"];return ui.concatArray(b,ui.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return ui.go(y,"tex-math")},"tex-math tight":function(a,y){return ui.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 ui.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 ui.go(y,"9,9")}},createTransitions:function(a){var y,b,E,ne,ue={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,ne=0;ne<E.length;ne++)ue[E[ne]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],ne=0;ne<E.length;ne++){var xe=a[y][b];if(xe.action_){xe.action_=[].concat(xe.action_);for(var je=0;je<xe.action_.length;je++)typeof xe.action_[je]=="string"&&(xe.action_[je]={type_:xe.action_[je]})}else xe.action_=[];for(var Ue=y.split("|"),Je=0;Je<Ue.length;Je++)if(E[ne]==="*")for(var st in ue)ue[st].push({pattern:Ue[Je],task:xe});else ue[E[ne]].push({pattern:Ue[Je],task:xe})}return ue},stateMachines:{}};ui.stateMachines={ce:{transitions:ui.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 ui.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 ui.concatArray(b,this.output(a)),ui.concatArray(b,ui.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=ui.patterns.match_("orbital",a.o||""),ne=ui.patterns.match_("one lowercase greek letter $",a.o||""),ue=ui.patterns.match_("one lowercase latin letter $",a.o||""),xe=ui.patterns.match_("$one lowercase latin letter$ $",a.o||""),je=y==="-"&&(E&&E.remainder===""||ne||ue||xe);je&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&ue&&(a.o="$"+a.o+"$");var Ue=[];return je?(ui.concatArray(Ue,this.output(a)),Ue.push({type_:"hyphen"})):(E=ui.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(ui.concatArray(Ue,ui.actions["d="](a,y)),ui.concatArray(Ue,this.output(a))):(ui.concatArray(Ue,this.output(a)),ui.concatArray(Ue,ui.actions.bond(a,y,"-")))),Ue},"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:ui.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"&&ui.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:ui.go(a.a,"a"),b:ui.go(a.b,"bd"),p:ui.go(a.p,"pq"),o:ui.go(a.o,"o"),q:ui.go(a.q,"pq"),d:ui.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ne;a.rdt==="M"?ne=ui.go(a.rd,"tex-math"):a.rdt==="T"?ne=[{type_:"text",p1:a.rd||""}]:ne=ui.go(a.rd);var ue;a.rqt==="M"?ue=ui.go(a.rq,"tex-math"):a.rqt==="T"?ue=[{type_:"text",p1:a.rq||""}]:ue=ui.go(a.rq),E={type_:"arrow",r:a.r,rd:ne,rq:ue}}for(var xe in a)xe!=="parenthesisLevel"&&xe!=="beginsWithBond"&&delete a[xe];return E},"oxidation-output":function(a,y){var b=["{"];return ui.concatArray(b,ui.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:ui.go(y[0]),p2:ui.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:ui.go(y[0]),p2:ui.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:ui.go(y[0]),p2:ui.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:ui.go(y[0]),p2:ui.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:ui.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:ui.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:ui.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:ui.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:ui.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:ui.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:ui.go(y[1],"pq")}}}},bd:{transitions:ui.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:ui.go(y[1],"bd")}}}},oxidation:{transitions:ui.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:ui.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:ui.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:ui.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:ui.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]&&(ui.concatArray(b,ui.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?ui.concatArray(b,ui.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]),ui.concatArray(b,ui.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=ui.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=ui.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 ne={d:ui.go(a.d,"pu"),q:ui.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:ne.d,p2:ne.q}:(y=ne.d,ne.d.length>1||ne.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),ui.concatArray(y,ne.q))}else y=ui.go(a.d,"pu-2");for(var ue in a)delete a[ue];return y}}},"pu-2":{transitions:ui.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=ui.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=ui.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:ui.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 ne in a)delete a[ne];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 ne in a)delete a[ne];return y}}}};var Cl={go:function(a,y){if(!a)return"";for(var b="",E=!1,ne=0;ne<a.length;ne++){var ue=a[ne];typeof ue=="string"?b+=ue:(b+=Cl._go2(ue),ue.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&Cl.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:Cl._goInner(a.a),b:Cl._goInner(a.b),p:Cl._goInner(a.p),o:Cl._goInner(a.o),q:Cl._goInner(a.q),d:Cl._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 "+Cl._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+Cl._goInner(a.p1);break;case"bond":if(y=Cl._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 ne="\\frac{"+Cl._goInner(a.p1)+"}{"+Cl._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ne+"}{"+ne+"}{"+ne+"}{"+ne+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+Cl._goInner(a.p1)+"}{"+Cl._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+Cl._goInner(a.p1)+"}{"+Cl._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+Cl._goInner(a.p1)+"}{"+Cl._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+Cl._goInner(a.p1)+"}_{"+Cl._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+Cl._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var ue={rd:Cl._goInner(a.rd),rq:Cl._goInner(a.rq)},xe=Cl._getArrow(a.r);ue.rd||ue.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(xe="\\long"+xe,ue.rd&&(xe="\\overset{"+ue.rd+"}{"+xe+"}"),ue.rq&&(a.r==="<-->"?xe="\\underset{\\lower2mu{"+ue.rq+"}}{"+xe+"}":xe="\\underset{\\lower6mu{"+ue.rq+"}}{"+xe+"}"),xe=" {}\\mathrel{"+xe+"}{} "):(ue.rq&&(xe+="[{"+ue.rq+"}]"),xe+="{"+ue.rd+"}",xe=" {}\\mathrel{\\x"+xe+"}{} "):xe=" {}\\mathrel{\\long"+xe+"}{} ",y=xe;break;case"operator":y=Cl._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 E1(a){}function M1(a){}var rp=class $0 extends wr{constructor(y){super(re(le({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new $0(y)}toJson(){return re(le({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Xr(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=pr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):Vi(this.command,this.value)}},ip=class H0 extends wr{constructor(y){super(re(le({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new H0(y)}toJson(){return re(le({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=ur(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=pr(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):Vi(this.command,this.value)}},rf=class j0 extends wr{constructor(y,b,E,ne){var ue,xe;super({type:"enclose",command:y,style:ne.style}),this.body=b,this.backgroundcolor=ne.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=(ue=ne.shadow)!=null?ue:"none",this.strokeWidth=(xe=ne.strokeWidth)!=null?xe:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=ne.strokeStyle,this.svgStrokeStyle=ne.svgStrokeStyle,this.strokeColor=ne.strokeColor,this.borderStyle=ne.borderStyle,this.padding=ne.padding,this.captureSelection=!1}static fromJson(y){return new j0(y.command,y.body,y.notation,y)}toJson(){return re(le({},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=pr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ne=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ne+="{"+Object.keys(this.notation).join(" ")+"}";let ue="",xe="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(ue+=xe+'mathbackground="'+this.backgroundcolor+'"',xe=","),this.shadow&&this.shadow!=="auto"&&(ue+=xe+'shadow="'+this.shadow+'"',xe=","),this.strokeWidth||this.strokeStyle!=="solid"?(ue+=xe+this.borderStyle,xe=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(ue+=xe+'mathcolor="'+this.strokeColor+'"',xe=","),ue&&(ne+=`[${ue}]`)}return Vi(ne,this.bodyToLatex(y))}render(y){const b=new $o({parent:y},this.style),E=wr.createBox(b,this.body);if(!E)return null;const ne=im(this.borderStyle),ue=b.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",ue,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const xe=new Xr(null,{classes:"ML__notation"});let je=E.height+E.depth+2*ue;const Ue=E.width+2*ue;let Je="";if(this.notation.horizontalstrike&&(Je+=this.line(3,50,97,50)),this.notation.verticalstrike&&(Je+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(Je+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(Je+=this.line(3,3,97,97)),this.notation.updiagonalarrow){Je+=this.line(ue.toString(),(ue+E.depth+E.height).toString(),(ue+E.width).toString(),ue.toString());const Cn=.03*Math.sqrt(Ue*Ue+je*je)*1,Sr=E.width*Cn,xi=(E.depth+E.height)*Cn,gr=ue+E.width;let Yr=ue;Yr+xi-.4*Sr<0&&(Yr=.4*Sr-xi),Je+='<polygon points="',Je+=`${gr},${Yr} ${gr-Sr-.4*xi},${Yr+xi-.4*Sr} `,Je+=`${gr-.7*Sr},${Yr+.7*xi} ${gr-Sr+.4*xi},${Yr+xi+.4*Sr} `,Je+=`${gr},${Yr}`,Je+=`" stroke='none' fill="${this.strokeColor}"`,Je+="/>"}let st=0;if(this.notation.phasorangle){const Gt=op(b),un=(E.height+E.depth+2*Gt+ue).toString(),Cn=(E.height+E.depth)/2;Je+=this.line(ue.toString(),un,(ue+Cn+E.width).toString(),un),Je+=this.line(ue.toString(),un,(ue+Cn).toString(),(ue-Gt).toString()),je+=Gt,st=Cn,E.left+=je/2-ue}if(this.notation.longdiv){const Gt=op(b);je+=Gt,Je+=this.line(ue.toString(),ue.toString(),(ue+E.width).toString(),ue.toString());const un=.3;st=un+Gt,E.left+=un+Gt,E.setTop(ue+Gt),Je+='<path d="',Je+=`M ${ue} ${ue} a${un} ${(E.depth+E.height+2*Gt)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*Gt} "`,Je+=` stroke-width="${om(b)}" stroke="${this.strokeColor}" fill="none"`,Je+="/>"}if(xe.width=E.width+2*ue+st,xe.height=E.height+ue,xe.depth=E.depth+ue,xe.setStyle("box-sizing","border-box"),xe.setStyle("left",`calc(-${ne} / 2 )`),xe.setStyle("height",`${Math.floor(100*je)/100}em`),xe.setStyle("top",`calc(${ne} / 2 )`),this.backgroundcolor&&xe.setStyle("background-color",this.backgroundcolor),this.notation.box&&xe.setStyle("border","1px solid red"),this.notation.actuarial&&(xe.setStyle("border-top",this.borderStyle),xe.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(xe.setStyle("border-bottom",this.borderStyle),xe.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(xe.setStyle("border-radius","8px"),xe.setStyle("border",this.borderStyle)),this.notation.circle&&(xe.setStyle("border-radius","50%"),xe.setStyle("border",this.borderStyle)),this.notation.top&&xe.setStyle("border-top",this.borderStyle),this.notation.left&&xe.setStyle("border-left",this.borderStyle),this.notation.right&&xe.setStyle("border-right",this.borderStyle),this.notation.bottom&&xe.setStyle("border-bottom",this.borderStyle),Je){let Gt="";this.shadow==="auto"&&(Gt+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(Gt+=`filter: drop-shadow(${this.shadow})`),Gt+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,Gt+=' stroke-linecap="round"',this.svgStrokeStyle&&(Gt+=` stroke-dasharray="${this.svgStrokeStyle}"`),xe.svgStyle=Gt,xe.svgOverlay=Je}const Mt=new Xr([xe,E]);return Mt.setStyle("position","relative"),Mt.setStyle("vertical-align",ue,"em"),Mt.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*ue))/100}em`),Mt.setStyle("display","inline-block"),Mt.height=xe.height,Mt.depth=xe.depth,Mt.width=xe.width-2*ue,Mt.left=ue,Mt.right=ue,this.caret&&(Mt.caret=this.caret),Mt.wrap(b)}line(y,b,E,ne){return`<line x1="${Tf(y)}" y1="${Tf(b)}" x2="${Tf(E)}" y2="${Tf(ne)}" vector-effect="non-scaling-stroke"></line>`}};function Tf(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 om(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function op(a){const y=a.isDisplayStyle?Vo:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var Fd=class K0 extends wr{constructor(y,b,E){var ne,ue;super(re(le({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,this.hasBarLine=(ne=E==null?void 0:E.hasBarLine)!=null?ne:!0,this.continuousFraction=(ue=E==null?void 0:E.continuousFraction)!=null?ue:!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 K0(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),le(le({},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 ne=new $o({parent:y,mathstyle:this.mathstyleName},this.style),ue=ne.metrics,xe=new $o({parent:ne,mathstyle:this.continuousFraction?"":"numerator"},this.style),je=this.numerPrefix?new Xr([new Xr(this.numerPrefix),wr.createBox(xe,this.above)],{isTight:xe.isTight,type:"ignore"}):(b=wr.createBox(xe,this.above,{type:"ignore"}))!=null?b:new Xr(null,{type:"ignore"}),Ue=new $o({parent:ne,mathstyle:this.continuousFraction?"":"denominator"},this.style),Je=this.denomPrefix?new Xr([new Xr(this.denomPrefix),wr.createBox(Ue,this.below,{type:"ignore"})]):(E=wr.createBox(Ue,this.below,{type:"ignore"}))!=null?E:new Xr(null,{type:"ignore"}),st=this.hasBarLine?ue.defaultRuleThickness:0;let Mt,Gt=0,un;ne.isDisplayStyle?(Mt=xe.metrics.num1,Gt=st>0?3*st:7*st,un=Ue.metrics.denom1):(st>0?(Mt=xe.metrics.num2,Gt=st):(Mt=xe.metrics.num3,Gt=3*ue.defaultRuleThickness),un=Ue.metrics.denom2);const Cn=[];this.isSelected&&Cn.push("ML__selected");const Sr=je.depth,xi=Je.height;let gr;if(st<=0){const jo=Mt-Sr-(xi-un);jo<Gt&&(Mt+=(Gt-jo)/2,un+=(Gt-jo)/2),gr=new Pa({individualShift:[{box:je,shift:-Mt,classes:[...Cn,"ML__center"]},{box:Je,shift:un,classes:[...Cn,"ML__center"]}]}).wrap(ne)}else{const jo=new Xr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});jo.softWidth=Math.max(je.width,Je.width),jo.height=st/2,jo.depth=st/2;const ws=ao+st/2;Mt<Gt+Sr+ws&&(Mt=Gt+Sr+ws);const Xs=ao-st/2;un<Gt+xi-Xs&&(un=Gt+xi-Xs),gr=new Pa({individualShift:[{box:Je,shift:un,classes:[...Cn,"ML__center"]},{box:jo,shift:-Xs,classes:Cn},{box:je,shift:-Mt,classes:[...Cn,"ML__center"]}]}).wrap(ne)}const Yr=ne.isDisplayStyle?ue.delim1:ue.delim2,Ti=this.leftDelim?this.bind(y,yo("open",this.leftDelim,Yr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):xo(ne,"open");let ri=null;this.continuousFraction?ri=new Xr(null,{type:"close"}):this.rightDelim?ri=this.bind(y,yo("close",this.rightDelim,Yr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):ri=xo(ne,"close");const wo=new Xr([Ti,gr,ri],{isTight:ne.isTight,type:"inner",classes:"mfrac"}),ta=this.bind(y,wo);return this.caret&&(ta.caret=this.caret),this.attachSupsub(y,{base:ta})}},bc=class U0 extends wr{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 U0(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),le({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Xr(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}},of=class W0 extends wr{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new bc(b)),this.skipBoundary=!1}static fromJson(y){return new W0("")}toJson(){return super.toJson()}render(y){const b=wr.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(ne=>ne.value).join(""))!=null?E:""}},fh=class Z0 extends wr{constructor(y,b){super(re(le({},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 Z0(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",ne=new Xr(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(!ne)return null;ne.right=ne.italic;const ue=(ne.height-ne.depth)/2-ao*y.scalingFactor,xe=ne.italic;ne.setTop(ue);let je=ne;if(this.superscript||this.subscript){const Ue=(b=this.subsupPlacement)!=null?b:"auto";je=Ue==="over-under"||Ue==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ne,baseShift:ue,slant:xe}):this.attachSupsub(y,{base:ne})}return new Xr(this.bind(y,je),{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=pr(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)),ga(E)}},gd=class V0 extends wr{constructor(y){const b=y.body;super(re(le({},y),{type:"overlap",body:typeof b=="string"?[new wr({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),le(le({},super.toJson()),y)}render(y){const b=wr.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Xr([b,new Xr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},fu=class G0 extends wr{constructor(y){var b,E,ne,ue;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=(ne=y.paddedBody)!=null?ne:!1,this.paddedLabels=(ue=y.paddedLabels)!=null?ue:!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?ac(this.svgBody):wr.createBox(y,this.body,{type:"ignore"});const E=new $o({parent:y,mathstyle:"scriptstyle"},this.style);let ne=null;this.svgAbove?ne=ac(this.svgAbove):this.above&&(ne=wr.createBox(E,this.above,{type:"ignore"}));let ue=null;this.svgBelow?ue=ac(this.svgBelow):this.below&&(ue=wr.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Xr([xo(y,"open"),b,xo(y,"close")],{type:"ignore"}));let xe=am(y,{base:b,above:ne,below:ue,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return xe?(this.subsupPlacement==="over-under"?xe=this.attachLimits(y,{base:xe,type:xe.type}):xe=this.attachSupsub(y,{base:xe}),this.caret&&(xe.caret=this.caret),this.bind(y,xe)):null}};function am(a,y){if(!y.base)return null;if(!y.above&&!y.below){const je=new Xr(y.base,{type:y.type});return je.setStyle("position","relative"),je}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ne=y.base,ue=0,xe=["ML__center"];if(y.paddedAboveBelow&&xe.push("ML__label_padding"),y.below&&y.above){const je=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ne.depth+ue;E=new Pa({bottom:je,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:xe},{box:ne,classes:["ML__center"]},b,{box:y.above,classes:xe},a.metrics.bigOpSpacing5]})}else y.below?E=new Pa({top:ne.height-ue,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:xe},{box:ne,classes:["ML__center"]}]}):y.above&&(E=new Pa({bottom:ne.depth+ue,children:[{box:ne,classes:["ML__center"]},b,{box:y.above,classes:xe},a.metrics.bigOpSpacing5]}));return new Xr(E,{type:y.type})}var af=class Y0 extends wr{constructor(y){var b,E,ne,ue;super(re(le({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(ne=y.smashHeight)!=null?ne:!1,this.smashWidth=(ue=y.smashWidth)!=null?ue:!1}static fromJson(y){return new Y0(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),le(le({},super.toJson()),y)}render(y){const b=new $o({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),wr.createBox(b,this.body,{classes:"inner"});const E=wr.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ne=new Xr(null,{classes:"fix"});return new Xr([E,ne],{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 ne of E.children)this.smashHeight&&(ne.height=0),this.smashDepth&&(ne.depth=0);return new Pa({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},sf=class X0 extends wr{constructor(y){var b;super(le({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 X0(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 Xr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Xr(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const ne=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Xr(null,{classes:ne})}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=pr(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ne=(b=this.command)!=null?b:"";return this.width===void 0?ne:this._braced&&!("register"in this.width)?`${ne}{${Ys(this.width)}}`:`${ne}${Ys(this.width)}`}},ap=class q0 extends wr{constructor(y){var b;super(re(le({},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 q0(re(le({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=pr(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ne=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?Vi(`${E}[${this.aboveToLatex(y)}]`,ne):/^[0-9]$/.test(ne)?`${E}${ne}`:Vi(E,ne)}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 $o({parent:y,mathstyle:"cramp"},this.style),ne=(b=wr.createBox(E,this.body,{type:"inner"}))!=null?b:new Xr(null),ue=E.scalingFactor,xe=E.metrics.defaultRuleThickness/ue,je=y.isDisplayStyle?Vo:xe,Ue=new Xr(null,{classes:"ML__sqrt-line",style:this.style});Ue.height=xe,Ue.softWidth=ne.width;let Je=ue*(xe+je/4);const Mt=Math.max(ue*2*je,ne.height+ne.depth)+Je+xe,Gt=new $o({parent:y},this.style),un=this.bind(Gt,new Xr(yo("inner","\\surd",Mt,!1,Gt,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!un)return null;const Cn=un.height+un.depth-xe;Cn>ne.height+ne.depth+Je&&(Je=(Je+Cn-(ne.height+ne.depth))/2),un.setTop(un.height-ne.height-Je);const Sr=this.bind(y,new Pa({firstBaseline:[{box:new Xr(ne)},Je-2*xe,{box:Ue},xe]})),xi=wr.createBox(new $o({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!xi){const Ti=new Xr([un,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 gr=new Pa({shift:-.6*(Math.max(un.height,Sr.height)-Math.max(un.depth,Sr.depth)),children:[{box:xi}]}),Yr=new Xr([new Xr(gr,{classes:"ML__sqrt-index",type:"ignore"}),un,Sr],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return Yr.height=un.height,Yr.depth=un.depth,this.caret&&(Yr.caret=this.caret),this.bind(y,Yr)}},sm=class extends Xr{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 Df(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ne=E-1;for(;ne>=0&&b[ne].type==="ignore";)ne-=1;if(ne<0&&a.parent.parent&&a.parent.type==="lift"){Df(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"),ne=y.getRegisterAsEm("medmuskip"),ue=y.getRegisterAsEm("thickmuskip");return cf(b,(xe,je)=>{var Ue,Je,st;if(!xe)return;const Mt=xe.type,Gt=je.isTight?(Ue=cm[Mt])!=null?Ue:null:(Je=lm[Mt])!=null?Je:null,un=(st=Gt==null?void 0:Gt[je.type])!=null?st:null;un===3&&Df(je,E),un===4&&Df(je,ne),un===5&&Df(je,ue)}),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 J0 extends wr{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new wr({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new J0(re(le({},y),{tooltip:id(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 re(le({},super.toJson()),{tooltip:b})}render(y){const b=wr.createBox(new $o,this.body);if(!b)return null;const E=new $o({parent:y,mathstyle:"displaystyle"},{fontSize:so}),ne=sl(lf(new Xr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),ue=new Xr([ne,b],{classes:"ML__tooltip-container"});return this.caret&&(ue.caret=this.caret),this.bind(y,ue)}},yd=class Q0 extends wr{constructor(y,b){super(re(le({},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 Xr(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let ne=E;if(this.superscript||this.subscript){const ue=(b=this.subsupPlacement)!=null?b:"auto";ne=ue==="over-under"||ue==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Xr(this.bind(y,ne),{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=pr(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)),ga(E)}};function id(a){if(me(a))return a.map(E=>id(E));if(typeof a=="string")return wr.fromJson(a);a=le({},a);for(const E of _l)a[E]&&(a[E]=id(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=id(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=ja.fromJson(a)),y==="box"&&(b=Ul.fromJson(a)),y==="chem"&&(b=np.fromJson(a)),y==="composition"&&(b=Ku.fromJson(a)),y==="delim"&&(b=rp.fromJson(a)),y==="enclose"&&(b=rf.fromJson(a)),y==="error"&&(b=zc.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=Fd.fromJson(a)),y==="group"&&(b=hc.fromJson(a)),y==="latex"&&(b=bc.fromJson(a)),y==="latexgroup"&&(b=of.fromJson(a)),y==="leftright"&&(b=Fs.fromJson(a)),y==="macro"&&(b=Bd.fromJson(a)),y==="macro-argument"&&(b=yu.fromJson(a)),y==="operator"&&(b=yd.fromJson(a)),y==="overlap"&&(b=gd.fromJson(a)),y==="overunder"&&(b=fu.fromJson(a)),y==="placeholder"&&(b=sa.fromJson(a)),y==="prompt"&&(b=Cu.fromJson(a)),y==="phantom"&&(b=af.fromJson(a)),y==="sizeddelim"&&(b=ip.fromJson(a)),y==="spacing"&&(b=sf.fromJson(a)),y==="subsup"&&(b=du.fromJson(a)),y==="surd"&&(b=ap.fromJson(a)),y==="text"&&(b=Yc.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=wr.fromJson(a));for(const E of _l)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=>id(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>id(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 lo{constructor(){super("math")}createAtom(a,y,b){var E,ne,ue,xe;if(y===null)return new wr({type:"mord",mode:"math",command:a,value:a,style:b});const je=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const Je=new wr({type:(ne=y.type)!=null?ne:"mord",mode:"math",command:(ue=y.command)!=null?ue:a,value:String.fromCodePoint(y.codepoint),style:b});return je&&(Je.isFunction=!0),a.startsWith("\\")&&(Je.verbatimLatex=a),Je}const Ue=new wr({type:"mord",mode:"math",command:(xe=y.command)!=null?xe:a,value:a,style:b});return je&&(Ue.isFunction=!0),a.startsWith("\\")&&(Ue.verbatimLatex=a),Ue}serialize(a,y){const b=vm(a,re(le({},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((je,Ue)=>{var Je;je.test(a.value)&&pm[(Je=y.letterShapeStyle)!=null?Je:"tex"][Ue]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ne=E?b+"-"+E:b;console.assert(sp[ne]!==void 0);const[ue,xe]=sp[ne];return ph[b]&&!ph[b].test(a.value)?(a.value=yn(a.value,b,E),null):(lp.test(a.value)&&(a.classes+=" lcGreek"),xe&&(a.classes+=" "+xe),ue)}};function vm(a,y){const{parent:b}=a[0],E=cp(b);return Wi(a,"variant").map(ne=>{const ue=cp(ne[0]);let xe="";ue&&ue!==E&&(xe={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"}[ue],console.assert(xe!==void 0));const je=ga(ne.map(Ue=>Ue._serialize(y)));return xe?Vi(xe,je):je})}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 gm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Wi(a,"fontShape").map(b=>{const E=gm(b,y),{fontShape:ne}=b[0].style;let ue="";return ne==="it"&&(ue="\\textit"),ne==="sl"&&(ue="\\textsl"),ne==="sc"&&(ue="\\textsc"),ne==="n"&&(ue="\\textup"),!ue&&ne?`{${Vi("\\fontshape",ne)}${ga(E)}}`:ue?Vi(ue,ga(E)):ga(E)})}function bm(a,y){return Wi(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ne}=b[0].style;let ue="";return ne==="b"&&(ue="\\textbf"),ne==="l"&&(ue="\\textlf"),ne==="m"&&(ue="\\textmd"),ne&&!ue?`{${Vi("\\fontseries",ne)}${ga(E)}}`:ue?Vi(ue,ga(E)):ga(E)})}function Sm(a,y){return Wi(a,"fontSize").map(b=>{var E,ne;const ue=bm(b,y),xe=(ne=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ne:"";return xe?`${xe} ${ga(ue)}`:ga(ue)})}function xm(a,y,b){return Wi(a,"fontFamily").map(E=>{var ne,ue;const xe=Sm(E,y),je=(ue={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ne=E[0].style.fontFamily)!=null?ne:""])!=null?ue:"";return je?`\\${je}{${ga(xe)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ga(xe)}}`:b?`\\text{${ga(xe)}}`:ga(xe)})}var up={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},_m=class extends lo{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new Yc(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return xm(a,re(le({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ne,ue,xe;const{fontFamily:je}=y;if(up[je]?a.classes+=" "+up[je]:je&&a.setStyle("font-family",je),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 Ue=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);Ue&&(a.classes+=" ",a.classes+=(ne={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=Ue[1])!=null?E:""])!=null?ne:"",a.classes+=" ",a.classes+=(xe={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"}[(ue=Ue[2])!=null?ue:""])!=null?xe:"")}return"Main-Regular"}};new _m;var Cm=class extends lo{constructor(){super("latex")}createAtom(a){return new bc(a)}serialize(a,y){return a.filter(b=>b instanceof bc&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var wm={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:[")",")",")",")"]}},Em={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:["=","=","=","="]}},Mm={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:["<",">","",""]}},Lm={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"]}},km={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Am={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Tm={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Dm={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Im={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Rm={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 zd(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 vh(){switch(ve()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function nu(a){(!a.platform||a.platform===vh())&&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[ne,ue]of Object.entries(y.mapping)){if(ue[0]===a)return E.key=`[${ne}]`,E;if(ue[1]===a)return E.shift=!0,E.key=`[${ne}]`,E;if(ue[2]===a)return E.alt=!0,E.key=`[${ne}]`,E;if(ue[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ne}]`,E}return E.key=(b=Om[a])!=null?b:"",E}function Pm(a){if(a.code)return a;const y=Object.entries(ff().mapping);let b=!1,E=!1,ne="";for(let ue=0;ue<4;ue++){for(const[xe,je]of y)if(je[ue]===a.key){ne=xe,ue===3?(b=!0,E=!0):ue===2?b=!0:ue===1&&(E=!0);break}if(ne)break}return new KeyboardEvent(a.type,re(le({},a),{altKey:b,shiftKey:E,code:ne}))}function Bm(a){var y,b;if(!a||a.key==="Unidentified"||a.key==="Dead")return;const E=a.shiftKey&&a.altKey?3:a.altKey?2:a.shiftKey?1:0;for(const ne of uf)((y=ne.mapping[a.code])==null?void 0:y[E])===a.key?ne.score+=1:(b=ne.mapping[a.code])!=null&&b[E]&&(ne.score=0);uf.sort((ne,ue)=>ue.score-ne.score)}function Fm(a){df=uf.find(y=>a.startsWith(y.locale))}function ff(){return df!=null?df:uf[0]}function zm(){switch(vh()){case"apple":return mh;case"windows":return dp;case"linux":return fp}return mh}switch(vh()){case"apple":nu(mh),nu(Em),nu(Dm),nu(km);break;case"windows":nu(dp),nu(Mm),nu(Im),nu(Am);break;case"linux":nu(fp),nu(Lm),nu(Rm),nu(Tm);break}nu(wm);function gh(a){var y;const b=/macos|ios/.test(ve()),E=a.split("+");let ne="";for(const ue of E)ne&&(ne+=b?"\u2009":'<span class="ML__shortcut-join">+</span>'),ue.startsWith("[Key")?ne+=ue.slice(4,5):ue.startsWith("Key")?ne+=ue.slice(3,4):ue.startsWith("[Digit")?ne+=ue.slice(6,7):ue.startsWith("Digit")?ne+=ue.slice(5,6):ne+=(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"}[ue.toLowerCase()])!=null?y:ue.toUpperCase();return ne}function If(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,ne)=>({x:E.x+ne.clientX,y:E.y+ne.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function bd(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 $m(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.meta}var Hm=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Rf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Hm.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 wu=class Gu{static get scrim(){return Gu._scrim||(Gu._scrim=new Gu),Gu._scrim}static open(y){Gu.scrim.open(y)}static close(){Gu.scrim.close()}static get state(){return Gu.scrim.state}static get element(){return Gu.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 ne=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const ue=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${ue+ne}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,ne;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:ue}=this;ue.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),ue.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Of()!==this.savedActiveElement&&((ne=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ne.call(E)),ue.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 jm(a,y,b){let E=null,ne=null,ue=!1,xe=!1,je=!1;const Ue=new AbortController,Je=Ue.signal;return a.addEventListener("keydown",st=>{if(ue||st.key==="Process"||st.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(st.code)){E=null;return}E=st,ne=null,b.onKeystroke(st)?a.textContent="":E=null},{capture:!0,signal:Je}),a.addEventListener("keypress",st=>{ue||(E&&ne&&b.onKeystroke(E),ne=st)},{capture:!0,signal:Je}),a.addEventListener("compositionstart",st=>{a.textContent="",ue=!0,b.onCompositionStart(st.data)},{capture:!0,signal:Je}),a.addEventListener("compositionupdate",st=>{ue&&b.onCompositionUpdate(st.data)},{capture:!0,signal:Je}),a.addEventListener("compositionend",st=>{a.textContent="",ue&&(ue=!1,b.onCompositionEnd(st.data))},{capture:!0,signal:Je}),a.addEventListener("beforeinput",st=>st.stopImmediatePropagation(),{signal:Je}),a.addEventListener("input",st=>{var Mt;if(!ue&&(a.textContent="",st.inputType!=="insertCompositionText")){if(st.inputType==="insertFromPaste"){st.preventDefault(),st.stopPropagation();return}b.onInput((Mt=st.data)!=null?Mt:""),st.preventDefault(),st.stopPropagation()}},{signal:Je}),a.addEventListener("paste",st=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(st)||st.preventDefault(),st.stopImmediatePropagation()},{signal:Je}),a.addEventListener("cut",st=>b.onCut(st),{capture:!0,signal:Je}),a.addEventListener("copy",st=>b.onCopy(st),{capture:!0,signal:Je}),a.addEventListener("blur",st=>{var Mt,Gt;if(((Gt=(Mt=st.relatedTarget)==null?void 0:Mt._mathfield)==null?void 0:Gt.element)===y){a.focus({preventScroll:!0}),st.preventDefault(),st.stopPropagation();return}const un=wu.state;if(un==="open"||un==="opening"){st.preventDefault(),st.stopPropagation();return}if(st.relatedTarget===st.target.getRootNode().host){st.preventDefault(),st.stopPropagation();return}je||xe||(je=!0,E=null,ne=null,b.onBlur(),je=!1)},{capture:!0,signal:Je}),a.addEventListener("focus",st=>{je||xe||(xe=!0,b.onFocus(),xe=!1)},{capture:!0,signal:Je}),{dispose:()=>Ue.abort(),cancelComposition:()=>{ue&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!xe&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Of()===a,setAriaLabel:st=>a.setAttribute("aria-label",st),setValue:st=>{var Mt;a.textContent=st,a.style.left="-1000px",(Mt=window.getSelection())==null||Mt.selectAllChildren(a)},moveTo:(st,Mt)=>{a.style.top=`${Mt}px`,a.style.left=`${st}px`}}}function $d(a){var y;if(!a||!Rf(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=Pm(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 Km(a){if(ye()){const y=ve(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Um(a,y,b){if(a.length===0)return"";const E=zd(hp(pp(b))),ne=zd({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(ve()),cmd:!1,win:!1});for(let ue=a.length-1;ue>=0;ue--)if((a[ue].key===E||a[ue].key===ne)&&(!a[ue].ifMode||a[ue].ifMode===y))return a[ue].command;return""}function mp(a){let y=a;return me(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function Wm(a,y){let b=[];if(typeof y=="string"){const ue=td[y];me(ue)?b=ue.slice():ue&&b.push(ue)}const E=mp(y),ne=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const ue of a)ne.test(mp(ue.command))&&b.push(ue.key);return b.map(gh)}function Zm(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=ve()==="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&&!Km(E))return;if(/^\[.+\]$/.test(b.key))return re(le({},a),{key:zd(b)});const ne=Nm(b.key,y);if(!ne)return re(le({},a),{key:zd(b)});if(ne.shift&&b.shift||ne.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${zd(ne)} using the ${y.displayName} keyboard layout`);return ne.shift=ne.shift||b.shift,ne.alt=ne.alt||b.alt,ne.meta=b.meta,ne.ctrl=b.ctrl,re(le({},a),{key:zd(ne)})}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 ne of a)try{const ue=Zm(ne,y);if(!ue)continue;const xe=E.find(je=>je.key===ue.key&&je.ifMode===ue.ifMode);if(xe)throw new Error(`Ambiguous key binding ${ne.key} (${yh(ne.command)}) matches ${xe.key} (${yh(xe.command)}) with the ${y.displayName} keyboard layout`);E.push(ue)}catch(ue){ue instanceof Error&&b.push(ue.message)}return[E,b]}var Gm=class extends Aa{constructor(){super("latex")}createAtom(a){return new bc(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"}),zl(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 ne=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Pl(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 ue=[];for(const Ue of y)ke.test(Ue)&&ue.push(new bc(Ue));let xe=a.at(a.position);if(xe instanceof of&&(xe=xe.lastChild),!(xe.parent instanceof of)){const Ue=new of("");xe.parent.addChildAfter(Ue,xe),xe=Ue.firstChild}const je=xe.parent.addChildrenAfter(ue,xe);return a.silenceNotifications=ne,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(je)):je&&(a.position=a.offsetOf(je))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Ym(a){return a.atoms.find(y=>y.type==="latexgroup")}function hf(a){var y,b;const E=a.atoms.find(ne=>ne.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ne=>ne.type==="latex"))!=null?b:[]:[]}function vp(a,y){var b;let E=0,ne=!1;const ue=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=ue&&!ne;){const Ue=a.at(E);ne=Ue instanceof bc&&Ue.isSuggestion,ne||E++}if(!ne)return[void 0,void 0];let xe=E,je=!1;for(;xe<=ue&&!je;){const Ue=a.at(xe);je=!(Ue instanceof bc&&Ue.isSuggestion),je||xe++}return[E-1,xe-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 st of hf(E))st.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){jd(a);return}const ne=[];let ue=E.at(E.position);for(;ue&&ue instanceof bc&&/^[a-zA-Z\*]$/.test(ue.value);)ue=ue.leftSibling;if(ue&&ue instanceof bc&&ue.value==="\\")for(ne.push(ue),ue=ue.rightSibling;ue&&ue instanceof bc&&/^[a-zA-Z\*]$/.test(ue.value);)ne.push(ue),ue=ue.rightSibling;const xe=ne.map(st=>st.value).join(""),je=$t(a,xe);if(je.length===0){if(/^\\[a-zA-Z\*]+$/.test(xe))for(const st of ne)st.isError=!0;jd(a);return}const Ue=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=Ue<0?je.length-1:Ue%je.length;const Je=je[a.suggestionIndex];if(Je!==xe){const st=ne[ne.length-1];st.parent.addChildrenAfter([...Je.slice(xe.length-Je.length)].map(Mt=>new bc(Mt,{isSuggestion:!0})),st),Sd(a,{interactive:!0})}qm(a,je)}function gp(a){const[y,b]=vp(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ne=>{ne.isSuggestion&&(ne.isSuggestion=!1,E=!0)}),E}function Hd(a,y="accept",b){var E,ne;jd(a);const ue=Ym(a.model);if(!ue)return!1;if(y==="accept-suggestion"||y==="accept-all"){const Je=hf(a.model).filter(st=>st.isSuggestion);if(Je.length!==0){for(const st of Je)st.isSuggestion=!1;a.model.position=a.model.offsetOf(Je[Je.length-1])}if(y==="accept-suggestion")return Je.length!==0}const je=hf(a.model).filter(Je=>!Je.isSuggestion).map(Je=>Je.value).join(""),Ue=ue.leftSibling;return ue.parent.removeChild(ue),a.model.position=a.model.offsetOf(Ue),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(Aa.insert(a.model,je,{selectionMode:(ne=b==null?void 0:b.selectItem)!=null&&ne?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Pf(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function Xm(a,y){const b=new $o({from:a.context}),E=new wr({mode:"math",type:"root",body:pc(y,{context:b})}),ne=sl(lf(new Xr(E.render(b),{classes:"ML__base"}),b));return ec(ne,{classes:"ML__latex"}).toMarkup()}function qm(a,y){var b;if(y.length===0){jd(a);return}let E="";for(const[ue,xe]of y.entries()){const je=xe,Ue=Xm(a,xe),Je=Wm(a.keybindings,je).join("<br>");E+=`<li role="button" data-command="${je}" ${ue===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${je}</span><span class="ML__popover__command">${Ue}</span>`,Je&&(E+=`<span class="ML__popover__keybinding">${Je}</span>`),E+="</li>"}const ne=Jm(a,`<ul>${E}</ul>`);Sh()&&((b=ne.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var ue;ne&&!Sh()&&(ne.classList.add("is-visible"),Bf(a),(ue=ne.querySelector(".ML__popover__current"))==null||ue.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function Sh(){const a=document.getElementById("mathlive-suggestion-popover");return a?a.classList.contains("is-visible"):!1}function Bf(a,y){var b;if(!a.element||a.element.mathfield!==a||!Sh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){jd(a);return}if(y!=null&&y.deferred){setTimeout(()=>Bf(a),32);return}const E=eu(a.field);if(!E)return;const ne=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,ue=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,xe=window.innerWidth-document.documentElement.clientWidth,je=window.innerHeight-document.documentElement.clientHeight,Ue=window.mathVirtualKeyboard.boundingRect.height,Je=document.getElementById("mathlive-suggestion-popover");E.x+Je.offsetWidth/2>ue-xe?Je.style.left=`${ue-Je.offsetWidth-xe}px`:E.x-Je.offsetWidth/2<0?Je.style.left="0":Je.style.left=`${E.x-Je.offsetWidth/2}px`;const st=E.y-E.height;ne-je-Ue-E.y<st?(Je.classList.add("ML__popover--reverse-direction"),Je.classList.remove("top-tip"),Je.classList.add("bottom-tip"),Je.style.top=`${E.y-E.height-Je.offsetHeight-15}px`):(Je.classList.remove("ML__popover--reverse-direction"),Je.classList.add("top-tip"),Je.classList.remove("bottom-tip"),Je.style.top=`${E.y+15}px`)}function jd(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Pf("mathlive-suggestion-popover"),Xc("suggestion-popover"),Xc("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ne=E.target;for(;ne&&!ne.dataset.command;)ne=ne.parentElement;ne&&(Hd(a,"reject"),Aa.insert(a.model,ne.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 ev(){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 Ff=null,yp,bp,xh=((bp=(yp=globalThis==null?void 0:globalThis.document)==null?void 0:yp.currentScript)==null?void 0:bp.src)||ev();function Sp(a){return cd(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(Ff===null)try{const y=yield fetch(xh,{method:"HEAD"});y.status===200&&(Ff=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${xh}")`)}return new URL(a,Ff!=null?Ff:xh).href})}function tv(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var ru="not-loaded";function nv(){return cd(this,null,function*(){return ru="not-loaded",zf()})}function zf(){return cd(this,null,function*(){var a;if(ru!=="not-loaded")return;if(ru="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){ru="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(xe=>xe.family);if(b.every(xe=>E.includes(xe))){ru="ready";return}if(!window.MathfieldElement.fontsDirectory){ru="not-loaded";return}const ne=yield Sp(window.MathfieldElement.fontsDirectory);if(!ne){document.body.classList.add("ML__fonts-did-not-load"),ru="error";return}const ue=[["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(xe=>tv(xe[0].replace(/-[a-zA-Z]+$/,""),`${ne}/${xe[0]}`,xe[1]));try{(yield Promise.all(ue.map(je=>{try{return je.load()}catch(Ue){}}))).forEach(je=>document.fonts.add(je)),ru="ready";return}catch(xe){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${ne}"`,{cause:xe}),document.body.classList.add("ML__fonts-did-not-load")}ru="error"}})}function rv(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 zl(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Fc(a)&&a.dirty&&(a.atomBoundsCache=new Map,Sd(a,y),a.atomBoundsCache=void 0)})))}function iv(a,y){var b;y=y!=null?y:{};const E=new $o({from:re(le({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rv(wr.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"}),ne=a.model.root.render(E);return ec(lf(ne,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function xp(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const ne of b.atoms)ne.caret=void 0,ne.isSelected=!1,ne.containsCaret=!1;if(b.selectionIsCollapsed){const ne=b.at(b.position);ne.caret=a.model.mode;let ue=ne.parent;for(;ue;)ue.containsCaret=!0,ue=ue.parent}else{const ne=b.getAtoms(b.selection,{includeChildren:!0});for(const ue of ne)ue.isSelected=!0}return iv(a,y).toMarkup()}function Sd(a,y){if(!Fc(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 ne=a.isSelectionEditable&&a.hasFocus(),ue=E.classList.contains("ML__focused");ue&&!ne?E.classList.remove("ML__focused"):!ue&&ne&&E.classList.add("ML__focused");let xe=xp(a,y);const je=a.element.querySelector("[part=menu-toggle]");if(je&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?je.style.display="none":je.style.display=""),a.model.atoms.length<=1){const Ue=a.options.contentPlaceholder;Ue&&(xe+=`<span part=placeholder class="ML__content-placeholder">${mc(Ue)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(xe),$f(a,y.interactive),a.dirty=!1}function $f(a,y){const b=a.field;if(!b)return;for(const je of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))je.remove();!(y!=null&&y)&&ru!=="error"&&ru!=="ready"&&setTimeout(()=>{ru==="ready"?$f(a):setTimeout(()=>$f(a),128)},32);const E=a.model,ne=b.offsetWidth,ue=b.getBoundingClientRect().width;let xe=Math.floor(ue)/ne;if(xe=isNaN(xe)?1:xe,E.selectionIsCollapsed){Bf(a,{deferred:!0});let je=E.at(E.position);for(;je&&je.type!=="prompt"&&!(je.containsCaret&&je.displayContainsHighlight);)je=je.parent;if(je!=null&&je.containsCaret&&je.displayContainsHighlight){const Ue=nd(a,vu(a,je),xe);if(Ue){Ue.left/=xe,Ue.right/=xe,Ue.top/=xe,Ue.bottom/=xe;const Je=document.createElement("div");Je.classList.add("ML__contains-highlight"),Je.style.position="absolute",Je.style.left=`${Ue.left+1}px`,Je.style.top=`${Math.ceil(Ue.top)}px`,Je.style.width=`${Math.ceil(Ue.right-Ue.left)}px`,Je.style.height=`${Math.ceil(Ue.bottom-Ue.top)}px`,b.insertBefore(Je,b.childNodes[0])}}return}for(const je of ov(_s(a,{excludeAtomsWithBackground:!0}))){je.left/=xe,je.right/=xe,je.top/=xe,je.bottom/=xe;const Ue=document.createElement("div");Ue.classList.add("ML__selection"),Ue.style.position="absolute",Ue.style.left=`${je.left}px`,Ue.style.top=`${je.top}px`,Ue.style.width=`${Math.ceil(je.right-je.left)}px`,Ue.style.height=`${Math.ceil(je.bottom-je.top-1)}px`,b.insertBefore(Ue,b.childNodes[0])}}function ov(a){let y=[];for(const b of a){let E=!1;for(const ne of y)if(b.left===ne.left&&b.right===ne.right&&b.top===ne.top&&b.bottom===ne.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const ne of a)if(b.left>=ne.left&&b.right<=ne.right&&b.top>=ne.top&&b.bottom<=ne.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var _p=3,Eu;function qc(a,y){y=le({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Eu||(Eu={});for(const b of Object.keys(a))console.assert(!Eu[b],"Selector already defined: ",b),Eu[b]=re(le({},y),{fn:a[b]})}function _h(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return _h(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Eu[y]}function Kd(a){var y;return(y=_h(a))==null?void 0:y.target}function av(a,y){var b;if(!y)return!1;let E,ne=[],ue=!1,xe=!1;me(y)?(E=y[0],ne=y.slice(1)):E=y,E=E.replace(/-\w/g,Je=>Je[1].toUpperCase());const je=Eu[E],Ue=je==null?void 0:je.target;if(Ue==="model"){if(!a.isSelectionEditable&&(je!=null&&je.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Nf(a),Eu[E].fn(a.model,...ne),pf(a),xe=!0,ue=!0}else if(Ue==="virtual-keyboard")xe=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,ue=!0;else if(Eu[E]){if(!a.isSelectionEditable&&(je!=null&&je.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),xe=Eu[E].fn(a,...ne),ue=!0}else throw new Error(`Unknown command "${E}"`);return Ue!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||je!=null&&je.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),je!=null&&je.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),xe&&zl(a),ue}function sv(a,y){var b;if(!a)return!1;a.focus(),g0.keypressVibration&&Me()&&navigator.vibrate(_p);const E=_h(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ne=a.executeCommand(y);return a.scrollIntoView(),ne}qc({performWithFeedback:(a,y)=>sv(a,y)});function lv(a){return pf(a,{atIndex:a.suggestionIndex+1}),!1}function cv(a){return pf(a,{atIndex:a.suggestionIndex-1}),!1}qc({complete:Hd},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),qc({nextSuggestion:lv,previousSuggestion:cv},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Hf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Hf}var uv=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(!Zs(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(le({type:Hf,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]"]]}},jf={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 wp(a,y){var b,E,ne;const ue=od.singleton;if(!ue)return;const xe=Ud(a),je=(E=(b=ue.getKeycap(xe==null?void 0:xe.id))==null?void 0:b.variants)!=null?E:"";if(typeof je=="string"&&!Ep(je)||Array.isArray(je)&&je.length===0){y==null||y();return}const Ue={};let Je="";for(const Sr of fv(je)){const xi=Lp(Sr),gr=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);Ue[gr]=xi;const[Yr,Ti]=Kf(xi);Je+=`<div id=${gr} class="item ${Ti}">${Yr}</div>`}const st=document.createElement("div");st.setAttribute("aria-hidden","true"),st.className="MLK__variant-panel",st.style.height="auto";const Mt=Object.keys(Ue).length;let Gt=5;Mt===1?Gt=1:Mt===2||Mt===4?Gt=2:Mt===3||Mt===5||Mt===6?Gt=3:Mt>=7&&Mt<14&&(Gt=4),st.style.width=`calc(var(--variant-keycap-length) * ${Gt} + 12px)`,st.innerHTML=g0.createHTML(Je),wu.open({root:(ne=ue==null?void 0:ue.container)==null?void 0:ne.querySelector(".ML__keyboard"),child:st}),mf=new AbortController;const{signal:un}=mf,Cn=a==null?void 0:a.getBoundingClientRect();if(Cn){Cn.top-st.clientHeight<0&&(st.style.width="auto",Mt<=6?st.style.height="56px":Mt<=12?st.style.height="108px":Mt<=18?st.style.height="205px":st.classList.add("compact"));const Sr=Math.max(0,Math.min(window.innerWidth-st.offsetWidth,(Cn.left+Cn.right-st.offsetWidth)/2)),xi=Cn.top-st.clientHeight+5;st.style.transform=`translate(${Sr}px, ${xi}px)`,st.classList.add("is-visible"),requestAnimationFrame(()=>{st.addEventListener("pointerup",gr=>{const Yr=Ud(gr.target);!(Yr!=null&&Yr.id)||!Ue[Yr.id]||(wh(Ue[Yr.id]),vf(),y==null||y(),gr.preventDefault())},{capture:!0,passive:!1,signal:un}),st.addEventListener("pointerenter",gr=>{const Yr=Ud(gr.target);!(Yr!=null&&Yr.id)||!Ue[Yr.id]||Yr.classList.add("is-active")},{capture:!0,signal:un}),st.addEventListener("pointerleave",gr=>{const Yr=Ud(gr.target);!(Yr!=null&&Yr.id)||!Ue[Yr.id]||Yr.classList.remove("is-active")},{capture:!0,signal:un}),window.addEventListener("pointercancel",()=>{vf(),y==null||y()},{signal:un}),window.addEventListener("pointerup",()=>{vf(),y==null||y()},{signal:un})})}}function vf(){mf==null||mf.abort(),mf=null,wu.state==="open"&&wu.close()}function dv(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(De))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+De[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(Re))y.push({class:"swatch-button",label:'<span style="background:'+Re[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function Ep(a){return jf[a]!==void 0}function fv(a){var y;return typeof a!="string"?a:(jf[a]||(jf[a]=(y=dv(a))!=null?y:[]),jf[a])}function hv(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pv(a){return Object.keys(a).map(y=>`${y} {${hv(a[y])}}`).join("")}function gf(a){if(!a)return"";const y=new $o,b=new wr({mode:"math",type:"root",body:pc(a,{context:y,args:ne=>ne==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=sl(lf(new Xr(b.render(y),{classes:"ML__base"}),y));return ec(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(ne=>Lp(ne)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mv(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const je=ff();je&&(E=je.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Te.locale.slice(0,2)])!=null?a:"qwerty")}const ne={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},ue=(y=ne[E])!=null?y:ne.qwerty,xe=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 je of ue){const Ue=[];for(const Je of je)/[a-z]/.test(Je)?Ue.push({label:Je,class:"hide-shift",shift:{label:Je.toUpperCase()},variants:Ep(Je)?Je:void 0}):Je==="~"?E!=="dvorak"?Ue.push("[backspace]"):Ue.push({label:"[backspace]",width:1}):Je==="^"?Ue.push("[shift]"):Je===" "&&Ue.push("[separator-5]");xe.push(Ue)}return xe.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:xe})}}function Mp(a){if(a==="alphabetic")return mv();if(typeof a=="string")return console.assert(Cp[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),Mp(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 ne=a,{rows:ue}=ne,xe=he(ne,["rows"]);y=re(le({},xe),{layers:yf({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ne=a,{markup:ue}=ne,xe=he(ne,["markup"]);y=re(le({},xe),{layers:yf(a.markup)})}else y=le({},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 ne of y.layers)if(ne.rows)for(const ue of ne.rows.flat()){Wd(ue)&&(b=!0);const xe=ue.command;typeof xe=="string"&&["undo","redo","cut","copy","paste"].includes(xe)&&(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 vv(a,y){var b,E;let ne='<div class="left">';if(a.normalizedLayouts.length>1)for(const[ue,xe]of a.normalizedLayouts.entries()){const je=xe,Ue=[ue===y?"selected":"layer-switch"];je.tooltip&&Ue.push("MLK__tooltip"),je.labelClass&&Ue.push(...je.labelClass.split(" ")),ne+=`<div class="${Ue.join(" ")}"`,je.tooltip&&(ne+=" data-tooltip='"+((b=ze(je.tooltip))!=null?b:je.tooltip)+"' "),ue!==y&&(ne+=`data-layer="${je.layers[0].id}"`),ne+=`>${(E=je.label)!=null?E:"untitled"}</div>`}return ne+="</div>",ne}function gv(a,y){let b="";if(a.editToolbar==="none")return"";const ne=[];y.selectionIsCollapsed?ne.push("undo","redo","pasteFromClipboard"):ne.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const ue={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${ze("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${ze("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${ze("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${ze("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${ze("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return b+=ne.map(xe=>ue[xe]).join(""),b}function yv(a){for(const y of a)bv(y)}function bv(a){const y=od.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,ne]=Kf(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function Sv(){Xc("virtual-keyboard"),Xc("core"),zf()}function xv(){x("core"),x("virtual-keyboard")}var _v=`<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 Cv(a){a.resetKeycapRegistry(),Sv();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(_v+a.normalizedLayouts.map((xe,je)=>wv(a,xe,je)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",Mv,{passive:!1});const ne=y.querySelectorAll(".ML__edit-toolbar");if(ne)for(const xe of ne)xe.addEventListener("click",je=>{var Ue,Je;let st=je.target,Mt="";for(;st&&!Mt;)Mt=(Ue=st==null?void 0:st.getAttribute("data-command"))!=null?Ue:"",st=(Je=st==null?void 0:st.parentElement)!=null?Je:null;Mt&&a.executeCommand(JSON.parse(Mt))});yv(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const ue=y.querySelectorAll(".MLK__layer");console.assert(ue.length>0,"No virtual keyboards available");for(const xe of ue)xe.addEventListener("pointerdown",je=>je.preventDefault());return a.currentLayer=a.latentLayer,y}function wv(a,y,b){const E=[];if(!("layers"in y))return"";for(const ne of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ne.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(vv(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Ev(a,ne)),E.push("</div>");return E.join("")}function Ev(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>${pv(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 ne of E)if(ne){const ue=a.registerKeycap(ne),[xe,je]=Kf(ne);/(^|\s)separator/.test(je)?b+=`<div class="${je}"`:b+=`<div tabindex="-1" id="${ue}" class="${je}"`,ne.tooltip&&(b+=` data-tooltip="${ne.tooltip}"`),b+=`>${xe}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Kf(a,y={shifted:!1}){var b,E,ne,ue,xe,je,Ue;let Je="",st=(b=a.class)!=null?b:"";if(y.shifted&&Wd(a)&&(st+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?Je=gf(a.shift):typeof a.shift=="object"&&(Je=a.shift.label?a.shift.label:(E=gf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(st=(ue=(ne=a.shift.class)!=null?ne:a.class)!=null?ue:"");else{if(Je=a.label?a.label:(xe=gf(a.latex||a.insert||"")||a.key)!=null?xe:"",a.shift){let Mt;typeof a.shift=="string"?Mt=gf(a.shift):a.shift.label?Mt=a.shift.label:Mt=(je=gf(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?je:"",Je+=`<span class="MLK__shift">${Mt}</span>`}a.aside&&(Je+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(st)&&(st+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(st)||(st+=" MLK__keycap"),!/\bw[0-9]+\b/.test(st)&&a.width&&(st+=(Ue={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?Ue:""),[Je,st||"MLK__keycap"]}var xd={"[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 Lp(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!xd[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&xd[a.label]&&(b=re(le(le({},xd[a.label]),a),{label:xd[a.label].label})),"key"in a&&a.key&&xd[a.key]&&(b=re(le(le({},xd[a.key]),a),{key:xd[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=le(le({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=le(le({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=le(le({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=le(le({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var bf;function Mv(a){var y;if(a.button!==0)return;const b=od.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 ne=Ud(a.target);if(!(ne!=null&&ne.id))return;const ue=b.getKeycap(ne.id);if(!ue)return;console.assert(a.type==="pointerdown");const xe=new AbortController,je=xe.signal;ne.classList.add("is-pressed"),ne.addEventListener("pointerenter",Uf(xe),{capture:!0,signal:je}),ne.addEventListener("pointerleave",Uf(xe),{capture:!0,signal:je}),ne.addEventListener("pointercancel",Uf(xe),{signal:je}),ne.addEventListener("pointerup",Uf(xe),{signal:je}),Wd(ue)&&(ne.classList.add("is-active"),b.shiftPressCount++),ue.variants&&(bf&&clearTimeout(bf),bf=setTimeout(()=>{ne.classList.contains("is-pressed")&&(ne.classList.remove("is-pressed"),ne.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),wp(ne,()=>{xe.abort(),ne==null||ne.classList.remove("is-active")}))},300)),a.preventDefault()}function Uf(a){return y=>{const b=Ud(y.target);if(!(b!=null&&b.id))return;const E=od.singleton;if(!E)return;const ne=E.getKeycap(b.id);if(ne){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Wd(ne)&&(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(ne)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){bf&&clearTimeout(bf),Wd(ne)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&ne.shift?typeof ne.shift=="string"?E.executeCommand(["insert",ne.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):wh(ne.shift):wh(ne),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function wh(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=od.singleton)==null||y.executeCommand(b)}function Lv(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 Ud(a){if(!a)return;let y=a;for(;y&&!Lv(y);)y=y.parentElement;return y!=null?y:void 0}function Wd(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var od=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(ne=>{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(ne){window.addEventListener("message",this)}document.body.addEventListener("focusin",ne=>{const ue=ne.target;ue!=null&&ue.isConnected&&setTimeout(()=>{const xe=kp();xe&&!xe.readOnly&&xe.mathVirtualKeyboardPolicy==="auto"&&_e()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ne=>{ne.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{kp()||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 ne of E.layers)if(ne.id===y)return ne}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(ne=>ne==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ne=>Mp(ne))}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 ne=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ne}px)`:`${ne}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 ne=this.getKeycap(E.id);if(ne){const[ue,xe]=Kf(ne,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(ue),E.className=xe}}}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 ne=this._element.getElementsByClassName("MLK__plate")[0];if(ne&&this.observer.observe(ne),E===window.document.body){const ue=E.style.paddingBottom;this.originalContainerBottomPadding=ue;const xe=ne.offsetHeight-1;E.style.paddingBottom=ue?`calc(${ue} + ${xe}px)`:`${xe}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 ne;return(ne=this._element)==null?void 0:ne.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 ne=this._element.getElementsByClassName("MLK__plate")[0];ne&&this.observer.unobserve(ne),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}),vf(),xv(),(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=Cv(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&wp(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!Zs(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:ne}=y,ue=Kd(ne);if(window.top!==void 0&&ue!=="virtual-keyboard")return;this.executeCommand(ne);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:le({type:Hf,action:y},b)}));return}if(E)E.postMessage(le({type:Hf,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 ne=b.command[1].split("");for(const ue of ne)this.dispatchEvent(new KeyboardEvent("keydown",{key:ue,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:ue,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 ne of E)ne.innerHTML=gv(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=[],ne=Kd(y);return me(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ne=Kd(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,ue=>ue[1].toUpperCase()),ne==="virtual-keyboard"?Eu[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 kp(){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(ye()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=od.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>uv.singleton,configurable:!0});function Wf(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(me(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[ue,xe]=E.split(",").map(je=>parseInt(je.trim()));y.scriptDepth=[ue,xe]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ne=a.mathVirtualKeyboardPolicy.toLowerCase();if(ne==="sandboxed"){if(window!==window.top){const ue=od.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ue})}ne="manual"}y.mathVirtualKeyboardPolicy=ne;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?Te.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=Yn(a.macros);break;default:me(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=le({},a[b]):y[b]=a[b]}return y}function _d(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ne of b)a[ne]===null?E[ne]=null:me(a[ne])?E[ne]=[...a[ne]]:typeof a[ne]=="object"&&!(a[ne]instanceof Element)&&ne!=="computeEngine"?E[ne]=le({},a[ne]):E[ne]=a[ne];return typeof y=="string"?E[y]:E}function Zf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:dt,backgroundColorMap:Ke,letterShapeStyle:Te.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:Nd,inlineShortcuts:Fu,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:hd,value:""}}function Ap(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function ad(a,y){!a||!y||(me(a)?a.forEach(b=>ad(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),ad(a.body,y),ad(a.above,y),ad(a.below,y),ad(a.subscript,y),ad(a.superscript,y)))}function Eh(a,y,b,E){function ne(xe,je){for(const Ue of ue)if(Ue.style[xe]!==je)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const ue=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ne("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ne("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ne("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ne("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ne("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ne("fontSize",b.fontSize)&&(b.fontSize=so),b.variant&&ne("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ne("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const xe of ue)xe.applyStyle(b);return!0}function kv(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 ne=new Ku(y,{mode:b.mode});ne.caret=E,b.parent.addChildAfter(ne,b),a.position+=1}}function Av(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}Dt(["math","displaymath"],hu),Dt("center",hu),nn("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 ja("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Xt("array","{columns:colspec}",(a,y,b,E)=>new ja(a,Mh(y),b,{columns:E[0],mathstyleName:"textstyle"})),Xt(["equation","equation*","subequations"],"",(a,y,b)=>new ja(a,Mh(y),b,{columns:[{align:"c"}]})),Xt(["multline","multline*"],"",hu),Xt(["align","align*","aligned","eqnarray"],"",hu),Xt("split","",hu),Xt(["gather","gathered"],"",hu),Xt(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",hu),Xt(["smallmatrix","smallmatrix*"],"[columns:colspec]",hu),Xt(["cases","dcases","rcases"],"",hu);function Tv(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function Mh(a,y=1){return Tv(a)?Array(y).fill([[new wr({type:"first"}),new sa]]):a.map(b=>b.length===0?[[new wr({type:"first"})]]:b.map(E=>E.length===0?[new wr({type:"first"})]:(E[0].type!=="first"&&E.unshift(new wr({type:"first"})),E)))}function hu(a,y=[[[]]],b=[],E=[]){switch(y=Mh(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new ja(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new ja(a,y,b,{mathstyleName:"textstyle"});case"center":return new ja(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new ja(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new ja(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new ja(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Cd(E[0])});case"bmatrix":case"bmatrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Cd(E[0])});case"Bmatrix":case"Bmatrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Cd(E[0])});case"vmatrix":case"vmatrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Cd(E[0])});case"Vmatrix":case"Vmatrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Cd(E[0])});case"matrix":case"matrix*":return new ja(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Cd(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new ja(a,y,b,{mathstyleName:"scriptstyle",columns:Cd(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new ja(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 ja(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new ja(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ne=0;for(const je of y)ne=Math.max(ne,je.length);const ue=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let xe=2;for(;xe<ne;)ue.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),xe+=2;return ue.push({gap:0}),new ja(a,y,b,{arraycolsep:0,columns:ue,minColumns:2})}}return new ja(a,y,b,{mathstyleName:"textstyle"})}function Cd(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 Dv(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof ja);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof ja)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ne=a.extractAtoms([a.position,a.lastOffset]),ue=a.extractAtoms([0,a.position]);ue.length===0&&(ue=Yf()),ne.length===0&&(ne=Yf());let xe;return y.endsWith("column")?(xe=hu("split",[[ue,ne]]),a.root=xe,wd(xe,0,0)?Ed(a,xe,0,0):wd(xe,0,1)?Ed(a,xe,0,1):a.position=a.offsetOf(E)):(xe=hu("lines",[[ue],[ne]]),a.root=xe,wd(xe,0,0)?Ed(a,xe,0,0):wd(xe,1,0)?Ed(a,xe,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Fs){const ne=b.parent;let ue=a.extractAtoms([a.position,a.offsetOf(ne.lastChild)]),xe=a.extractAtoms([a.offsetOf(ne.firstChild),a.position]);xe.length===0&&(xe=Yf()),ue.length===0&&(ue=Yf());let je="pmatrix";const Ue=ne.leftDelim,Je=ne.rightDelim;Ue==="("&&(Je===")"||Je==="?")?je="pmatrix":(Ue==="["||Ue==="\\lbrack")&&(Je==="]"||Je==="\\rbrack"||Je==="?")?je="bmatrix":Ue==="\\vert"&&Je==="\\vert"?je="vmatrix":Ue==="\\Vert"&&Je==="\\Vert"?je="Vmatrix":(Ue==="{"||Ue==="\\lbrace")&&(Je==="."||Je==="?")&&(je="cases");const st=hu(je,y.endsWith("column")?[[xe,ue]]:[[xe],[ue]]);return ne.parent.addChildBefore(st,ne),ne.parent.removeChild(ne),wd(st,0,0)?Ed(a,st,0,0):y.endsWith("column")?wd(st,0,1)?Ed(a,st,0,1):a.position=a.offsetOf(b):wd(st,1,0)?Ed(a,st,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof ja?[b.parent,b.parentBranch]:[void 0,[0,0]]}function wd(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Iv(a,y,b,E){const ne=y.getCell(b,E);return ne?[a.offsetOf(ne[0]),a.offsetOf(ne[ne.length-1])]:-1}function Ed(a,y,b,E){const ne=Iv(a,y,b,E);typeof ne!="number"&&a.setSelection(ne)}function Vf(a,y,b,E,ne){const ue=y.getCell(b,E);ue&&a.setPositionHandlingPlaceholder(a.offsetOf(ue[ne==="start"?0:ue.length-1]))}function Gf(a,y){const[b,[E,ne]]=Dv(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(ne),Vf(a,b,E,ne+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(ne),Vf(a,b,E,ne,"start");break}}function Tp(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Rv(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Dp(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ov(a){return a.contentWillChange({inputType:"insertText"})?(Gf(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Ip(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 ne=a.at(a.position),ue=ne.type==="array"?ne:a.parentEnvironment;return ue.environmentName=y,ue.leftDelim=b,ue.rightDelim=E,a.contentDidChange({}),!0}function Rp(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof ja);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof ja){const E=b.parent,ne=b.parentBranch;let ue;switch(y){case"row":if(E.rowCount>1){E.removeRow(ne[0]);const xe=E.getCell(Math.max(0,ne[0]-1),ne[1]);ue=a.offsetOf(xe[xe.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ne[1]);const xe=E.getCell(ne[0],Math.max(0,ne[1]-1));ue=a.offsetOf(xe[xe.length-1])}break}ue&&a.setPositionHandlingPlaceholder(ue)}}function Nv(a){return a.contentWillChange({inputType:"deleteContent"})?(Rp(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Pv(a){return a.contentWillChange({inputType:"deleteContent"})?(Rp(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}qc({addRowAfter:Tp,addColumnAfter:Dp,addRowBefore:Rv,addColumnBefore:Ov,removeRow:Nv,removeColumn:Pv,setEnvironment:Ip},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Yf(){return[new sa]}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 Bv=Op;function Lh(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ne;if(Ne.test(a.at(y).value)){let ue=y,xe;do xe=a.at(ue).mode==="text"&&Ne.test(a.at(ue).value),ue+=E;while(a.at(ue)&&xe);ne=a.at(ue)?ue-2*E:ue-E}else if(/\s/.test(a.at(y).value)){let ue=y;for(;a.at(ue)&&a.at(ue).mode==="text"&&/\s/.test(a.at(ue).value);)ue+=E;if(!a.at(ue))ne=ue-E;else{let xe=!0;do xe=a.at(ue).mode==="text"&&!/\s/.test(a.at(ue).value),ue+=E;while(a.at(ue)&&xe);ne=a.at(ue)?ue-2*E:ue-E}}else{let ue=y;for(;a.at(ue)&&a.at(ue).mode==="text"&&!/\s/.test(a.at(ue).value);)ue+=E;ne=a.at(ue)?ue:ue-E;let xe=!0;for(;a.at(ue)&&xe;)xe=a.at(ue).mode==="text"&&/\s/.test(a.at(ue).value),xe&&(ne=ue),ue+=E;ne=a.at(ue)?ue-2*E:ue-E}return ne-(E>0?0:1)}function Zd(a,y,b){var E,ne,ue,xe,je,Ue,Je;const st=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Mt=a.at(a.position);if(y==="forward"&&(Mt.type==="subsup"?(Mt=Mt.rightSibling,Mt||(Mt=a.at(a.position+1))):Mt=a.at(a.position+1)),!Mt)return a.announce("plonk"),!1;let Gt=a.offsetOf(Mt);if(Mt instanceof Yc)Gt=Lh(a,Gt,y);else if(Mt instanceof bc)if(Mt.isSuggestion)for(console.assert(y==="forward");Mt&&Mt instanceof bc;)Mt.isSuggestion=!1,Gt=a.offsetOf(Mt),Mt=Mt.rightSibling;else if(y==="forward"){if(Mt=Mt.rightSibling,!Mt||!(Mt instanceof bc))return a.announce("plonk"),!1;for(;Mt&&Mt instanceof bc&&/[a-zA-Z\*]/.test(Mt.value);)Gt=a.offsetOf(Mt),Mt=Mt.rightSibling}else{if(Mt=Mt.leftSibling,!Mt||!(Mt instanceof bc))return a.announce("plonk"),!1;for(;Mt&&Mt instanceof bc&&/[a-zA-Z\*]/.test(Mt.value);)Gt=a.offsetOf(Mt),Mt=Mt.leftSibling}else if(y==="forward"&&Mt.type==="mopen"){let un=0;do Mt.type==="mopen"?un+=1:Mt.type==="mclose"&&(un-=1),Mt=Mt.rightSibling;while(!Mt.isLastSibling&&un!==0);Gt=a.offsetOf(Mt.leftSibling)}else if(y==="backward"&&Mt.type==="mclose"){let un=0;do Mt.type==="mopen"?un+=1:Mt.type==="mclose"&&(un-=1),Mt=Mt.leftSibling;while(!Mt.isFirstSibling&&un!==0);Gt=a.offsetOf(Mt)}else if(y==="backward")if(Mt.type==="first")for(;Gt>0&&Mt.type==="first";)Gt-=1,Mt=a.at(Gt);else{const un=Mt.type;Mt.type==="subsup"&&(Gt=a.offsetOf(a.at(Gt).leftSibling)),Gt-=1;let Cn=(ne=a.at(Gt))==null?void 0:ne.type;for(;Gt>=0&&Cn===un;)((ue=a.at(Gt))==null?void 0:ue.type)==="subsup"?Gt=a.offsetOf(a.at(Gt).leftSibling):Gt-=1,Cn=a.at(Gt).type}else{const{type:un}=Mt;let Cn=(xe=a.at(Gt))==null?void 0:xe.type;const{lastOffset:Sr}=a;for(;Gt<=Sr&&(Cn===un||Cn==="subsup");){for(;((je=a.at(Gt).rightSibling)==null?void 0:je.type)==="subsup";)Gt=a.offsetOf(a.at(Gt).rightSibling);Gt+=1,Cn=(Ue=a.at(Gt))==null?void 0:Ue.type}Gt-=1}if((Je=b==null?void 0:b.extend)!=null&&Je){if(!a.setSelection(a.anchor,Gt))return a.announce("plonk"),!1}else{if(Gt===a.position)return a.announce("plonk"),!1;a.position=Gt}return a.announce("move",st),a.mathfield.stopCoalescingUndo(),!0}function Mu(a,y,b){var E,ne;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[je,Ue]=vp(a);je!==void 0&&Ue!==void 0&&a.deleteAtoms([je,Ue])}if(y==="upward")return zv(a,b);if(y==="downward")return $v(a,b);if(b.extend){let je=Xf(a,a.position,y);je<0&&(je=0),je>a.lastOffset&&(je=a.lastOffset);const Ue=a.setSelection(a.anchor,je);return a.mathfield.stopCoalescingUndo(),Ue}if(a.selectionIsPlaceholder){a.collapseSelection(y);const je=Mu(a,y);return a.mathfield.stopCoalescingUndo(),je}let ue=a.position;const xe=ue;if(a.collapseSelection(y)?(ue=a.position,Np(a,ue)||(ue=Xf(a,ue,y))):ue=Xf(a,ue,y),ue<0||ue>a.lastOffset){let je=!0;return a.silenceNotifications||(je=(ne=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ne:!0),je&&a.announce("plonk"),je}return a.setPositionHandlingPlaceholder(ue),a.mathfield.stopCoalescingUndo(),a.announce("move",xe),!0}function Xf(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||Np(a,y)?y:Xf(a,y,b)}function Np(a,y){var b;const E=a.at(y);let ne=E.parent;for(;ne&&!ne.inCaptureSelection;)ne=ne.parent;return!(ne!=null&&ne.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function Fv(a,y,b){let E=1/0,ne=0;for(;ne<y.length;ne++){const ue=yc(a.getHTMLElement(y[ne])).right,xe=Math.abs(b-ue);if(xe<=E)E=xe;else break}return y[ne-1]}function qf(a,y,b,E,ne){const ue=a.mathfield.hasEditablePrompts,xe=ue?b.filter(Je=>Je.type==="prompt"&&!Je.captureSelection):b,je=yc(a.mathfield.getHTMLElement(y)).right,Ue=a.offsetOf(Fv(a.mathfield,xe,je))-(ue?1:0);if(E){const[Je,st]=a.selection.ranges[0];let Mt;Ue<(ne==="up"?Je:st)?Mt={ranges:[[Ue,st]],direction:"backward"}:Mt={ranges:[[Je,Ue]],direction:"forward"},a.setSelection(Mt)}else a.setPositionHandlingPlaceholder(Ue);a.announce(`move ${ne}`)}function zv(a,y){var b,E;const ne=(b=y==null?void 0:y.extend)!=null?b:!1;ne||a.collapseSelection("backward");const ue=()=>{var Ue,Je;let st=!0;return a.silenceNotifications||(st=(Je=(Ue=a.mathfield.host)==null?void 0:Ue.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Je:!0),a.announce(st?"plonk":"line"),st},xe=a.at(a.position);let je=xe;for(;je&&je.parentBranch!=="below"&&!(Array.isArray(je.parentBranch)&&je.parent instanceof ja);)je=je.parent;if(Array.isArray(je==null?void 0:je.parentBranch)&&je.parent instanceof ja){const Ue=je.parent;if(je.parentBranch[0]<1)return ue();const Je=je.parentBranch[0]-1,st=Ue.array[Je][je.parentBranch[1]];if(!st.some(Gt=>Gt.type==="prompt"&&!Gt.captureSelection)&&a.mathfield.hasEditablePrompts)return ue();qf(a,xe,st,ne,"up")}else if(je){const Ue=(E=je.parent.branch("above"))!=null?E:je.parent.createBranch("above");if(!Ue.some(st=>st.type==="prompt"&&st.placeholderId)&&a.mathfield.hasEditablePrompts)return ue();qf(a,xe,Ue,ne,"up")}else return ue();return a.mathfield.stopCoalescingUndo(),!0}function $v(a,y){var b,E;const ne=(b=y==null?void 0:y.extend)!=null?b:!1;ne||a.collapseSelection("forward");const ue=()=>{var Ue,Je;let st=!0;return a.silenceNotifications||(st=(Je=(Ue=a.mathfield.host)==null?void 0:Ue.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?Je:!0),a.announce(st?"plonk":"line"),st},xe=a.at(a.position);let je=xe;for(;je&&je.parentBranch!=="above"&&!(Array.isArray(je.parentBranch)&&je.parent instanceof ja);)je=je.parent;if(Array.isArray(je==null?void 0:je.parentBranch)&&je.parent instanceof ja){const Ue=je.parent;if(je.parentBranch[0]+1>Ue.array.length-1)return ue();const Je=je.parentBranch[0]+1,st=Ue.array[Je][je.parentBranch[1]];if(!st.some(Gt=>Gt.type==="prompt"&&!Gt.captureSelection)&&a.mathfield.hasEditablePrompts)return ue();qf(a,xe,st,ne,"down")}else if(je){const Ue=(E=je.parent.branch("below"))!=null?E:je.parent.createBranch("below");if(!Ue.some(st=>st.type==="prompt")&&a.mathfield.hasEditablePrompts)return ue();qf(a,xe,Ue,ne,"down")}else return ue();return!0}function Pp(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 Hv(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 jv(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 Bp(a){var y;if(a.collapseSelection(),Hv(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 du({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function Fp(a){var y;if(a.collapseSelection(),jv(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 du({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 Kv(){function a(Ue){const Je=[],st=[];return[...Ue.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((Gt,un)=>{const Cn=E(Gt);Cn===0?Je.push(Gt):st.push({documentOrder:un,tabIndex:Cn,node:Gt})}),st.sort((Gt,un)=>Gt.tabIndex===un.tabIndex?Gt.documentOrder-un.documentOrder:Gt.tabIndex-un.tabIndex).map(Gt=>Gt.node).concat(Je)}function y(Ue){return!(!b(Ue)||ne(Ue)||E(Ue)<0)}function b(Ue){return!(Ue.disabled||Ue.type==="hidden"&&Ue.tagName.toUpperCase()==="INPUT"||je(Ue))}function E(Ue){var Je;const st=Number.parseInt((Je=Ue.getAttribute("tabindex"))!=null?Je:"NaN",10);return Number.isNaN(st)?Ue.contentEditable==="true"||(Ue.nodeName==="AUDIO"||Ue.nodeName==="VIDEO")&&Ue.getAttribute("tabindex")===null?0:Ue.tabIndex:st}function ne(Ue){return Ue.tagName.toUpperCase()==="INPUT"&&Ue.type==="radio"&&!xe(Ue)}function ue(Ue,Je){for(const st of Ue)if(st.checked&&st.form===Je)return st;return null}function xe(Ue){var Je;if(!Ue.name)return!0;const Mt=((Je=Ue.form)!=null?Je:Ue.ownerDocument).querySelectorAll('input[type="radio"][name="'+Ue.name+'"]'),Gt=ue(Mt,Ue.form);return!Gt||Gt===Ue}function je(Ue){if(!ye()||Ue===document.activeElement||Ue.contains(document.activeElement))return!1;if(getComputedStyle(Ue).visibility==="hidden")return!0;const Je=Ue.getBoundingClientRect();if(Je.width===0||Je.height===0)return!0;for(;Ue;){if(getComputedStyle(Ue).display==="none")return!0;Ue=Ue.parentElement}return!1}return ye()?a(document.body):[]}function $c(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ne=a.offsetOf(y[0]),ue=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ne,ue):a.setSelection(ue,ne),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?$c(a,[y.leftSibling,y]):$c(a,[y,y.leftSibling])}function bu(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Jf(a,y,b=!0){var E,ne;const ue=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Mu(a,y);let xe;const je=a.at(a.anchor).parentPrompt;je?y==="forward"?xe=a.offsetOf(je)+1:xe=a.offsetOf(je.leftSibling):xe=Math.max(a.position+ue,0);const Ue=kh(a,xe,y);if(!Ue||y==="forward"&&a.offsetOf(Ue)<xe||y==="backward"&&a.offsetOf(Ue)>xe){if(!b||!((ne=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||ne))return a.announce("plonk"),!1;const st=Kv();if(!document.activeElement||st.length<=1)return a.announce("plonk"),!1;let Mt=st.indexOf(document.activeElement)+ue;return Mt<0&&(Mt=st.length-1),Mt>=st.length&&(Mt=0),st[Mt].focus(),a.mathfield.stopCoalescingUndo(),!0}return bu(a,Ue),!0}function kh(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)}qc({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 ne=b.parentBranch;let ue;if(typeof ne=="string"&&(ue=y[ne]),!ue){const je=b.subsupPlacement?Fp(a):Bp(a);return a.mathfield.stopCoalescingUndo(),je}E.branch(ue)||E.createBranch(ue);const xe=a.setSelection(a.getBranchRange(a.offsetOf(E),ue));return a.mathfield.stopCoalescingUndo(),xe},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=>Pp(a),moveToNextChar:a=>Mu(a,"forward"),moveToPreviousChar:a=>Mu(a,"backward"),moveUp:a=>Mu(a,"upward"),moveDown:a=>Mu(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,ne;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Jf(a,"forward");const ue=a.at(a.position);if(ue.mode==="text"){if(a.selectionIsCollapsed){let Gt=ue;for(;Gt&&Gt.mode==="text";)Gt=Gt.leftSibling;let un=ue;for(;((y=un.rightSibling)==null?void 0:y.mode)==="text";)un=un.rightSibling;if(Gt&&un)return $c(a,[Gt,un])}if(ue.rightSibling.mode==="text"){let Gt=ue;for(;Gt&&Gt.mode==="text";)Gt=Gt.rightSibling;return Gt?(bu(a,(b=Gt.leftSibling)!=null?b:Gt),a.mathfield.switchMode("math"),!0):bu(a,a.lastOffset)}}const je=a.at(a.anchor).parentPrompt,Ue=je?a.offsetOf(je)+1:Math.max(a.position+1,0),Je=kh(a,Ue,"forward");if(Je)return bu(a,Je);const st=zp(a,ue,Gt=>Gt.type==="leftright"||Gt.type==="text","forward");if(st){if(st.mode==="text"){let Gt=st;for(;Gt&&Gt.mode==="text";)Gt=Gt.rightSibling;return $c(a,[(E=st.leftSibling)!=null?E:st,(ne=Gt.leftSibling)!=null?ne:Gt])}return $c(a,st)}const Mt=ue.parent;if(Mt){if(Mt.type==="leftright"||Mt.type==="surd")return $c(a,Mt);if(ue.parentBranch==="superscript"&&Mt.subscript)return $c(a,Mt.subscript);if(ue.parentBranch==="above"&&Mt.below)return $c(a,Mt.below);if(ue.parentBranch==="superscript"||ue.parentBranch==="subscript")return bu(a,Mt);if(ue.parentBranch==="above"||ue.parentBranch==="below")return $c(a,Mt)}return bu(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Jf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let je=b;for(;je&&je.mode==="text";)je=je.leftSibling;let Ue=b;for(;((y=Ue.rightSibling)==null?void 0:y.mode)==="text";)Ue=Ue.rightSibling;if(je&&Ue)return $c(a,[je,Ue])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?bu(a,b):bu(a,0)}const ne=a.at(a.anchor).parentPrompt,ue=ne?a.offsetOf(ne.leftSibling):Math.max(a.position-1,0),xe=kh(a,ue,"backward");if(xe)return bu(a,xe);if(E==="math"){const je=zp(a,b,Je=>Je.type==="leftright"||Je.type==="text","backward");if(je){if(je.mode==="text"){let Je=je;for(;Je&&Je.mode==="text";)Je=Je.leftSibling;return $c(a,[je,Je])}return $c(a,je)}const Ue=b.parent;if(Ue){if(Ue.type==="leftright"||Ue.type==="surd")return $c(a,Ue);if(b.parentBranch==="subscript"&&Ue.superscript)return $c(a,Ue.superscript);if(b.parentBranch==="below"&&Ue.above)return $c(a,Ue.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return bu(a,Ue);if(b.parentBranch==="above"||b.parentBranch==="below")return $c(a,Ue)}return bu(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:Bp,moveToSubscript:Fp},{target:"model",changeSelection:!0}),qc({moveToNextPlaceholder:a=>Jf(a,"forward"),moveToPreviousPlaceholder:a=>Jf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function zp(a,y,b,E){if(E==="forward"){let ue=y.rightSibling;for(;ue&&!b(ue);)ue=ue.rightSibling;return ue}let ne=y.leftSibling;for(;ne&&!b(ne);)ne=ne.leftSibling;return ne}function Qf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ne=!1,ue="";for(;!ne;){const xe=a.at(E);ne=y===0||xe===void 0||xe.type==="first"||xe.mode!=="math"||!(xe.type&&/mord|mpunct|operator/.test(xe.type)||xe.type==="mop"&&/[a-zA-Z ]+/.test(xe.value))||!xe.hasEmptyBranch("superscript")||!xe.hasEmptyBranch("subscript")||typeof b=="function"&&!b(xe),ne||(xe.mode="text",xe.command=xe.value,xe.verbatimLatex=void 0,ue+=xe.value),E-=1,y-=1}a.contentDidChange({data:ue,inputType:"insertText"})}function Md(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ne=!1;const ue=[];for(;!ne;){const xe=a.at(E);ne=y===0||!xe||xe.type==="first"||xe.isFirstSibling||xe.mode!=="text"||xe.value===" "||typeof b=="function"&&!b(xe),ne||(ue.push(wr.serialize([xe],{defaultMode:"math"})),xe.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ga(ue),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Uv(a){let y="",b=a.position,E=!1;for(;!E;){const ne=a.at(b);E=!(ne&&(ne.mode==="text"||ne.mode==="math"&&ne.type&&/mord|mpunct/.test(ne.type))),E||(y=ne.value+y),b-=1}return y}function Wv(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Rf(b))return!1;const ne=$d(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ne));const ue=Uv(E)+ne;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ne))return!0;if(/[\^_]/.test(ne))return/(^|\s)[a-zA-Z][^_]$/.test(ue)&&Md(E,1),!0;const xe={")":"(","}":"{","]":"["}[ne],{parent:je}=E.at(E.position);if(xe&&je instanceof Fs&&je.leftDelim===xe)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(ue))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(ne))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(ue))return Md(E,1),!1;if(/\D\.[^\d\s]$/.test(ue)){Md(E,1);const Ue=E.at(E.position);return Ue.value="\u22C5",Ue.style.variant="normal",Ue.command="\\cdot",Ue.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(ue)||/\.\d$/.test(ue)||/\([\d+\-.]$/.test(ue))return Md(E,1),!0;if(/\([a-z][,;]$/.test(ue))return Md(E,2),!0;if(/[\d+\-=><*|]$/.test(ne))return Ah(E),!0}else{if(y==="[Space]")return Qf(E,void 0,xe=>/[a-z][:,;.]$/.test(xe.value)),!0;if(/[a-zA-Z]{3,}$/.test(ue)&&!/(dxd|abc|xyz|uvw)$/.test(ue))return Qf(E,void 0,xe=>/[a-zA-Z]/.test(xe.value)),!0;if(/(^|\W)(if)$/i.test(ue))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(ue)&&!/(αβγ)$/.test(ue))return Qf(E,void 0,xe=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(xe.value)),!0;if(ne==="?"||ne==="."&&!/[\d-+]\.$/.test(ue))return!0}return!1}function Zv(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=$p(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(gh(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 Vv(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=$p();y.innerHTML=""}else{const y=Pf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function $p(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(Xc("keystroke-caption"),Xc("core"),Pf("mathlive-keystroke-caption-panel"))}function Gv(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function Hp(a,y){var b,E,ne;const{model:ue}=a,xe=pp(y);if(y.isTrusted){Bm(y);const un=ff();a.keyboardLayout!==un.id&&(a.keyboardLayout=un.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Zv(a,xe),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let je,Ue="",Je;const st=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(ue.mode==="math")if(xe==="[Backspace]")st.pop();else if(!Rf(y))a.flushInlineShortcutBuffer();else{const un=$d(y),Cn=[...(E=(b=st[st.length-1])==null?void 0:b.keystrokes)!=null?E:[],un];st.push({state:ue.getState(),keystrokes:Cn,leftSiblings:Yv(a)});let Sr=0,xi="";for(;!je&&Sr<Cn.length;)Je=st.length-(Cn.length-Sr),xi=Cn.slice(Sr).join(""),je=Ju(st[Je].leftSiblings,xi,a.options.inlineShortcuts),!je&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(xi)&&(je=a.options.onInlineShortcut(a,xi)),Sr+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(je?a.switchMode("math"):Wv(a,xe,y)&&(a.switchMode({math:"text",text:"math"}[ue.mode]),Ue=""))}if(!je){if(Ue||(Ue=Um(a.keybindings,ue.mode,y)),!Ue&&(xe==="[Enter]"||xe==="[Return]")){let un=!1;return ue.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(un=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),un||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),ue.contentDidChange({inputType:"insertLineBreak"})),un}if((!Ue||xe==="[Space]")&&ue.mode==="math"){if(xe==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return Aa.insert(ue,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),Ue="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const un=ue.at(ue.position+1),Cn=ue.at(ue.position-1);if((un==null?void 0:un.mode)==="text"||(Cn==null?void 0:Cn.mode)==="text")return Aa.insert(ue," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ne=ue.at(ue.position))!=null&&ne.isDigit()&&window.MathfieldElement.decimalSeparator===","&&$d(y)===","&&(Ue="insertDecimalSeparator")}}if(!je&&!Ue){if(ue.mathfield.smartFence){if(Dh(ue,$d(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:un}=ue.at(ue.position);if(un instanceof Fs&&un.rightDelim==="?"&&ue.at(ue.position).isLastSibling&&/^[)}\]|]$/.test(xe))return a.snapshot(),un.isDirty=!0,un.rightDelim=xe,ue.position+=1,ue.selectionDidChange(),ue.contentDidChange({data:$d(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!ue.selectionIsCollapsed){const Cn=$d(y);if(Cn==="("||Cn==="{"||Cn==="["){const Sr={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Cn],xi={"(":")","{":"\\rbrace","[":"\\rbrack"}[Cn],[gr,Yr]=Pl(ue.selection);return a.snapshot(),ue.position=Yr,Aa.insert(ue,xi,{format:"latex"}),ue.position=gr,Aa.insert(ue,Sr,{format:"latex"}),ue.setSelection(gr+1,Yr+1),ue.contentDidChange({data:Cn,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Mt=ue.at(Math.max(ue.position,ue.anchor)),{parent:Gt}=Mt;if(Ue==="moveAfterParent"&&(Gt==null?void 0:Gt.type)==="leftright"&&Mt.isLastSibling&&a.options.smartFence&&Dh(ue,".",a.defaultStyle)&&(Ue="",zl(a)),a.keyboardDelegate.cancelComposition(),Ue)a.executeCommand(Ue);else if(je){const un=a.effectiveStyle;ue.setState(st[Je].state);const Cn=st[st.length-1].keystrokes;for(const Sr of Cn)Aa.insert(ue,Sr,{silenceNotifications:!0,style:un});a.snapshot("insert-shortcut"),ue.setState(st[Je].state),ue.deferNotifications({content:!0,selection:!0,data:je,type:"insertText"},()=>(Aa.insert(ue,je,{format:"latex",style:un}),Ah(a.model),je.endsWith(" ")&&(a.switchMode("text"),Aa.insert(ue," ",{style:un,mode:"text"})),a.snapshot(),ue.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,ue.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ne=ml(y);const ue=window.mathVirtualKeyboard;if(ue!=null&&ue.isShifted&&(ne=typeof ne=="string"?ne.toUpperCase():ne.map(Ue=>Ue.toUpperCase())),b.simulateKeystroke){let Ue=!0;for(const Je of ne)Hp(a,new KeyboardEvent("keypress",{key:Je}))&&(Ue=!1);if(Ue)return}const xe=E.at(E.position),je=le(le({},xe.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Pl(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Nf(a);for(const Ue of ne)Aa.insert(E,Ue);a.snapshot("insert-latex"),pf(a)});else if(E.mode==="text"){for(const Ue of ne)Aa.insert(E,Ue,{style:je});a.snapshot("insert-text")}else if(E.mode==="math")for(const Ue of ne)Xv(a,Ue,je,xe);a.dirty=!0,a.scrollIntoView()}function Yv(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 Xv(a,y,b,E){const ne=a.model;let ue={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(ue=["insert",a.options.mathModeSpace]),ue){a.executeCommand(ue);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){qv(ne),Aa.insert(ne,y,{style:b}),a.snapshot(),Pp(ne),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const xe=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(xe==null?void 0:xe.type)==="mord"&&/[a-zA-Z0-9]/.test(xe.value)&&(b=le({},b),xe.style.variant&&(b.variant=xe.style.variant),xe.style.variantStyle&&(b.variantStyle=xe.style.variantStyle))}Aa.insert(ne,y,{style:b}),a.snapshot(`insert-${ne.at(ne.position).type}`)}function qv(a){a.selectionIsCollapsed||(a.deleteAtoms(Pl(a.selection)),a.mathfield.snapshot("delete"))}function Dh(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ne}=E,ue={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!ue)return!1;const xe=ie[ue],je=oe[ue];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[Ue,Je]=Pl(a.selection),st=a.extractAtoms([Ue,Je]),Mt=ne.addChildrenAfter([new Fs("left...right",st,{leftDelim:ue,rightDelim:je})],a.at(Ue));return a.setSelection(a.offsetOf(Mt.firstChild),a.offsetOf(Mt.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:ue,inputType:"insertText"}),!0}if(ue==="|"){const Ue=ne instanceof Fs?ne.leftDelim+ne.rightDelim:"";if(Ue==="\\lbrace\\rbrace"||Ue==="\\{\\}"||Ue==="\\lbrace?")return a.mathfield.snapshot(),Aa.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:ue,inputType:"insertText"}),!0}if(je){if(ne instanceof Fs&&ne.firstChild===E&&(ne.leftDelim==="?"||ne.leftDelim==="."))return ne.leftDelim=ue,ne.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ne instanceof Fs)){let Mt=E;for(;Mt&&!(Mt.type==="mclose"&&Mt.value===je);)Mt=Mt.rightSibling;if(Mt){a.mathfield.snapshot();const Gt=a.extractAtoms([a.offsetOf(E),a.offsetOf(Mt)]);return Gt.pop(),ne.addChildrenAfter([new Fs("left...right",Gt,{leftDelim:ue,rightDelim:je})],E),a.position=a.offsetOf(ne.firstChild)+1,a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const Ue=a.offsetOf(E.lastSibling);let Je;for(Je=a.position;Je<=Ue;Je++){const Mt=a.at(Je);if(Mt instanceof Fs&&(Mt.leftDelim==="?"||Mt.leftDelim===".")&&jp(ue,Mt.rightDelim))break}const st=a.at(Je);if(Je<=Ue&&st instanceof Fs){st.leftDelim=ue,a.mathfield.snapshot();let Mt=a.extractAtoms([a.position,Je-1]);return Mt=Mt.filter(Gt=>Gt.type!=="first"),st.addChildren(Mt,st.parentBranch),a.position+=1,a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ne instanceof Fs&&(ne.leftDelim==="?"||ne.leftDelim===".")&&jp(ue,ne.rightDelim)){ne.isDirty=!0,ne.leftDelim=ue,a.mathfield.snapshot();const Mt=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const Gt of Mt)ne.parent.addChildBefore(Gt,ne);return a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ne instanceof Fs&&ne.leftDelim==="|")){if(a.mathfield.snapshot(),Aa.insert(a,`\\left${ue}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Mt=a.offsetOf(E.lastSibling),Gt=a.extractAtoms([a.position,Mt]);a.at(a.position).body=Gt,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(xe){let Ue=E;for(;Ue;){if(Ue.type==="mopen"&&Ue.value===xe){a.mathfield.snapshot();const un=Ue.leftSibling,Cn=a.extractAtoms([a.offsetOf(Ue.leftSibling),a.offsetOf(E)]);Cn.shift();const Sr=new Fs("left...right",Cn,{leftDelim:xe,rightDelim:ue});return ne.addChildrenAfter([Sr],un),a.position=a.offsetOf(Sr),a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}Ue=Ue.leftSibling}if(ne instanceof Fs&&E.isLastSibling&&Ih(ne.leftDelim,ue))return a.mathfield.snapshot(),ne.isDirty=!0,ne.rightDelim=ue,a.position+=1,a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const Je=a.offsetOf(E.firstSibling);let st;for(st=a.position;st>=Je;st--){const un=a.at(st);if(un instanceof Fs&&(un.rightDelim==="?"||un.rightDelim===".")&&Ih(un.leftDelim,ue))break}const Mt=a.at(st);if(st>=Je&&Mt instanceof Fs)return a.mathfield.snapshot(),Mt.rightDelim=ue,Mt.addChildren(a.extractAtoms([st,a.position]),Mt.parentBranch),a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ne instanceof Fs&&(ne.rightDelim==="?"||ne.rightDelim===".")&&Ih(ne.leftDelim,ue))return a.mathfield.snapshot(),ne.isDirty=!0,ne.rightDelim=ue,ne.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ne.parentBranch),a.position=a.offsetOf(ne),a.contentDidChange({data:ue,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const Gt=ne.parent;return Gt instanceof Fs&&(Gt.rightDelim==="?"||Gt.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(Gt),Dh(a,ue,b)):!1}return!1}function Ih(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):oe[a]===y:!0}function jp(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):ie[y]===a:!0}qc({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:Vv,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{const E=a.getPrompts();let ne="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),ue=0;for(;E.includes(ne)&&ue<100;){if(ue===99)return console.error("could not find a unique ID after 100 tries"),!1;ne="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),ue++}return a.insert(`\\placeholder[${y!=null?y:ne}]{}`,b),!0}}),qc({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"}),qc({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"}),zl(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jv(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Rh(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=le(le({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ne=>Eh(E,ne,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}qc({applyStyle:Jv},{target:"mathfield",canUndo:!0,changeContent:!0});function Rh(a,y){var b,E,ne,ue,xe,je,Ue,Je,st,Mt;const Gt={};if(typeof y.color=="string"){const Cn=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";Cn!==y.color&&(Gt.verbatimColor=(ne=y.verbatimColor)!=null?ne:y.color),Gt.color=Cn}if(typeof y.backgroundColor=="string"){const Cn=(xe=a.backgroundColorMap((ue=y.backgroundColor)!=null?ue:y.verbatimBackgroundColor))!=null?xe:"none";Cn!==y.backgroundColor&&(Gt.verbatimBackgroundColor=(je=y.verbatimBackgroundColor)!=null?je:y.backgroundColor),Gt.backgroundColor=Cn}typeof y.fontFamily=="string"&&(Gt.fontFamily=y.fontFamily),typeof y.series=="string"&&(Gt.fontSeries=y.series),typeof y.fontSeries=="string"&&(Gt.fontSeries=y.fontSeries.toLowerCase()),Gt.fontSeries&&(Gt.fontSeries=(Ue={bold:"b",medium:"m",normal:"m"}[Gt.fontSeries])!=null?Ue:Gt.fontSeries),typeof y.shape=="string"&&(Gt.fontShape=y.shape),typeof y.fontShape=="string"&&(Gt.fontShape=y.fontShape.toLowerCase()),Gt.fontShape&&(Gt.fontShape=(Je={italic:"it",up:"n",upright:"n",normal:"n"}[Gt.fontShape])!=null?Je:Gt.fontShape),y.variant&&(Gt.variant=y.variant.toLowerCase()),y.variantStyle&&(Gt.variantStyle=y.variantStyle.toLowerCase());const un=(st=y.size)!=null?st:y.fontSize;return typeof un=="number"?Gt.fontSize=Math.max(1,Math.min(10,un)):typeof un=="string"&&(Gt.fontSize=(Mt={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[un.toLowerCase()])!=null?Mt:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[un]),Gt}function Oh(a){let[y,b]=Pl(a.selection);if(y=Kp(a,y,"backward"),b=Kp(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 Kp(a,y,b){var E,ne,ue;let xe=a.at(y);if(!xe)return y;const je=b==="forward"?1:-1;if(xe.mode==="text"){for(;xe&&!(xe.mode!=="text"||!Ne.test(xe.value));)y+=je,xe=a.at(y);return b==="backward"?y-1:y}if(xe.mode==="latex"){if(/[a-zA-Z\*]/.test(xe.value))if(b==="backward")for(;xe&&xe.mode==="latex"&&xe.value!=="\\"&&/[a-zA-Z]/.test(xe.value);)y+=je,xe=a.at(y);else for(;xe&&xe.mode==="latex"&&/[a-zA-Z\*]/.test(xe.value);)y+=je,xe=a.at(y);else if(xe.value==="{"){if(b==="forward"){for(;xe&&xe.mode==="latex"&&xe.value!=="}";)y+=je,xe=a.at(y);return y}return y-1}else if(xe.value==="}"){if(b==="backward"){for(;xe&&xe.mode==="latex"&&xe.value!=="{";)y+=je,xe=a.at(y);return y-1}return y}return y-1}if(xe.mode==="math"){if(xe.isDigit()){for(;(E=a.at(y+je))!=null&&E.isDigit();)y+=je;return b==="backward"?y-1:y}if(xe.style.variant||xe.style.variantStyle){let Ue=(ne=a.at(y))==null?void 0:ne.style;for(;Ue&&Ue.variant===xe.style.variant&&Ue.variantStyle===xe.style.variantStyle;)Ue=(ue=a.at(y+je))==null?void 0:ue.style,y+=je;return b==="backward"?y-1:y}return y}return y}qc({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Mu(a,"forward",{extend:!0}),extendSelectionBackward:a=>Mu(a,"backward",{extend:!0}),extendToNextWord:a=>Zd(a,"forward",{extend:!0}),extendToPreviousWord:a=>Zd(a,"backward",{extend:!0}),extendSelectionUpward:a=>Mu(a,"upward",{extend:!0}),extendSelectionDownward:a=>Mu(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 Ld=null,Sf=0,eh=class mu{static start(y,b,E,ne){var ue;mu.element=y,(ue=mu.controller)==null||ue.abort(),mu.controller=new AbortController;const xe={signal:mu.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,xe),y.addEventListener("pointerup",ne,xe),y.addEventListener("pointercancel",ne,xe),Nh(b)&&(mu.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,xe),window.addEventListener("blur",ne,xe),window.addEventListener("mouseup",ne,xe))}static stop(){var y;(y=mu.controller)==null||y.abort(),mu.controller=void 0,typeof mu.pointerId=="number"&&(mu.element.releasePointerCapture(mu.pointerId),mu.pointerId=void 0)}};function Nh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function Up(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ne,ue=!1,xe=!1,je="none",Ue=!1,Je=!1;const st=y.clientX,Mt=y.clientY,Gt=Date.now(),un=E.field,Cn=setInterval(()=>{Ue?un.scroll({top:0,left:un.scrollLeft-16}):Je&&un.scroll({top:0,left:un.scrollLeft+16})},32);function Sr(){eh.stop(),ue=!1,clearInterval(Cn),a.element.classList.remove("tracking"),y&&y.preventDefault()}function xi(Yr){if(!E.hasFocus()){Sr();return}const Ti=Yr.clientX,ri=Yr.clientY,wo=Nh(Yr)&&Yr.pointerType==="touch"?20:5;if(Date.now()<Gt+500&&Math.abs(st-Ti)<wo&&Math.abs(Mt-ri)<wo){Yr.preventDefault(),Yr.stopPropagation();return}const ta=un.getBoundingClientRect();Je=Ti>ta.right,Ue=Ti<ta.left;let jo=ne;Nh(Yr)&&(Yr.isPrimary||(jo=xf(E,Yr.clientX,Yr.clientY,{bias:0})));const ws=xf(E,Ti,ri,{bias:Ti<=st?Ti===st?0:-1:1});jo>=0&&ws>=0&&(E.model.extendSelectionTo(jo,ws),zl(a)),xe&&Oh(E.model)}Ld&&Math.abs(Ld.x-st)<5&&Math.abs(Ld.y-Mt)<5&&Date.now()<Ld.time+500?(Sf+=1,Ld.time=Gt):(Ld={x:st,y:Mt,time:Gt},Sf=1);const gr=un.getBoundingClientRect();if(st>=gr.left&&st<=gr.right&&Mt>=gr.top&&Mt<=gr.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ne=xf(a,st,Mt,{bias:0}),ne>=0){if(a.element.classList.add("tracking"),y.shiftKey){const Yr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ne),gp(a.model)||Yr?je="all":je="selection"}else a.model.at(ne).type==="placeholder"?(a.model.setSelection(ne-1,ne),je="selection"):((b=a.model.at(ne).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ne,ne+1),je="selection"):(a.model.position=ne,gp(a.model)?je="all":je="selection");a.defaultStyle={},y.detail===3||Sf>2?(Sr(),(y.detail===3||Sf===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},je="all")):ue||(ue=!0,eh.start(un,y,xi,Sr),(y.detail===2||Sf===2)&&(xe=!0,Oh(a.model),je="all"))}a.hasFocus()||(je="none",a.focus({preventScroll:!0}))}else Ld=null;a.stopCoalescingUndo(),je!=="none"&&(a.model.selectionIsCollapsed&&(je="all"),zl(a)),y.preventDefault()}function Qv(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,ne=y-(b.top+b.bottom)/2;return E*E+ne*ne}function Wp(a,y,b,E,ne){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const ue=vu(a,b);if(!ue)return[1/0,null];let xe=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=ue.left&&E<=ue.right)for(const je of b.children){const Ue=Wp(a,y,je,E,ne);Ue[0]<=xe[0]&&(xe=Ue)}return xe[1]||(xe=[Qv(E,ne,ue),b]),y.set(b.id,xe),xe}function eg(a,y,b){const[,E]=Wp(a,new Map,a.model.root,y,b);return E}function xf(a,y,b,E){var ne;const ue=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!ue)return 0;if(y>ue.right||b>ue.bottom+8)return a.model.lastOffset;if(y<ue.left||b<ue.top-8)return 0;E=E!=null?E:{},E.bias=(ne=E.bias)!=null?ne:0;let xe=eg(a,y,b);const je=[];let Ue=xe;for(;Ue;)je.unshift(Ue),Ue=Ue.parent;for(const st of je)if(st.captureSelection){xe=st;break}let Je=a.model.offsetOf(xe);if(Je<0)return-1;if(xe.leftSibling)if(E.bias===0&&xe.type!=="placeholder"){const st=vu(a,xe);st&&y<(st.left+st.right)/2&&(Je=a.model.offsetOf(xe.leftSibling))}else E.bias<0&&(Je=a.model.offsetOf(xe.leftSibling));return Je}var tg=class extends Aa{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",ne=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ne)try{const ue=JSON.parse(ne);if(ue&&Array.isArray(ue)){a.snapshot();const xe=id(ue),{model:je}=a;je.selectionIsCollapsed||je.deleteAtoms(Pl(je.selection));const Ue=je.at(je.position);if(Ue.parent instanceof ja){console.assert(Ue.parentBranch!==void 0);const Je=[];let st=[];xe[0].type==="first"&&xe.shift(),xe[xe.length-1].type==="first"&&xe.pop();for(const Cn of xe)Cn.type==="first"&&st.length>0?(Je.push(st),st=[Cn]):st.push(Cn);st.length>0&&Je.push(st);let Mt=Number(Ue.parentBranch[0]),Gt=Number(Ue.parentBranch[1]);const un=Ue.parent.maxColumns;for(;Ue.parent.colCount-Gt<Je.length&&Ue.parent.colCount<un;)Ue.parent.addColumn();Ue.parent.addChildrenAfter(Je[0],Ue);for(let Cn=1;Cn<Je.length;Cn++)Gt++,Gt>=un&&(Gt=0,Ue.parent.addRowAfter(Mt),Mt++),Ue.parent.setCell(Mt,Gt,Je[Cn])}else Ue.parent.addChildrenAfter(xe.filter(Je=>Je.type!=="first"),Ue);return je.position=je.offsetOf(xe[xe.length-1]),je.contentDidChange({inputType:"insertFromPaste"}),zl(a),!0}}catch(ue){}if(ne=typeof y!="string"?y.getData("application/json"):"",ne&&window.MathfieldElement.computeEngine)try{const ue=JSON.parse(ne);if(typeof ue=="object"&&"latex"in ue&&ue.latex&&(b=ue.latex),!b){const xe=window.MathfieldElement.computeEngine.box(ue);xe&&!xe.has("Error")&&(b=xe.latex)}b||(E="latex")}catch(ue){}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 ue;return[ue,b]=cu(b),E==="auto"&&ue&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),zl(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,ne;const ue=typeof y=="string"?y:(ne=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?ne:"";if(!b.silenceNotifications&&!a.contentWillChange({data:ue,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:xe}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const je=a.silenceNotifications;a.silenceNotifications=!0;const Ue={"?":"\\placeholder{}","@":"\\placeholder{}"};Ue[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Pl(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 Je=-1;Ue[0]?Ue["@"]=Ue[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(Je=rg(a),Je>=0&&(Ue["@"]=a.getValue(Je,a.position,"latex"))),Ue[0]||(Ue[0]=Ue["?"]);let st=!1;const Mt=Ti=>(st=!0,Ue[Ti]);let[Gt,un]=Zp(a,y,Mt,b);if(!un)return!1;const Cn=un.length===1&&un[0].type==="genfrac";Cn&&Je>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(Ue["@"]=Ue["?"],st=!1,[Gt,un]=Zp(a,y,Mt,b)):Je>=0&&a.deleteAtoms([Je,a.position]);const{parent:Sr}=a.at(a.position),xi=Sr.hasEmptyBranch("body");if(Cn&&Gt!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Sr instanceof Fs&&Sr.leftDelim==="("&&xi){const Ti=Sr.parent,ri=Sr.parentBranch;Ti.removeChild(Sr),Ti.setChildren(un,ri)}const gr=a.at(a.position);gr.parent.addChildrenAfter(un,gr),Gt==="latex"&&typeof y=="string"&&(Sr==null?void 0:Sr.type)==="root"&&xi&&!st&&(Sr.verbatimLatex=y),a.silenceNotifications=je;const Yr=un[un.length-1];if(b.selectionMode==="placeholder"){const Ti=un.flatMap(ri=>[ri,...ri.children]).find(ri=>ri.type==="placeholder");if(Ti){const ri=a.offsetOf(Ti);a.setSelection(ri-1,ri),a.announce("move")}else Yr&&(a.position=a.offsetOf(Yr))}else b.selectionMode==="before"||(b.selectionMode==="after"?Yr&&(a.position=a.offsetOf(Yr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(Yr)));return a.contentDidChange({data:ue,inputType:"insertText"}),a.silenceNotifications=xe,!0}};function Zp(a,y,b,E){var ne;let ue,xe=[];if(typeof y!="string"||E.format==="math-json"){const je=window.MathfieldElement.computeEngine;if(!je)return["math-json",[]];[ue,y]=["latex",je.box(y).latex],xe=pc(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([ue,y]=xu(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),xe=pc(y,{context:a.mathfield.context}),ue!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&th(xe)):(E.format==="auto"||(ne=E.format)!=null&&ne.startsWith("latex"))&&(E.format==="auto"&&([ue,y]=xu(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=cu(y)),xe=pc(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&th(xe));return ad(xe,E.style),[ue!=null?ue:"latex",xe]}function ng(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Fs&&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 Fs&&b.leftDelim==="("){let E=0,ne=0,ue=0;for(let xe=0;b.body[xe];xe++)b.body[xe].type==="genfrac"&&(E++,ne=xe),ue++;ue===0&&E===1&&(a[y]=b.body[ne])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){th(y.branch(b));const E=ng(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof ja)for(const b of y.cells)th(b)}}}function rg(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 ne=ie[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===ne);)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 ne=[];for(;!y.isFirstSibling&&(Vp(y)||ne.length>0);)y.type==="mclose"&&ne.unshift(y.value),y.type==="mopen"&&ne.length>0&&y.value===ie[ne[0]]&&ne.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 tg;var ig=class extends Aa{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"),zl(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 ne=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Pl(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 ue=og(y,a.mathfield.context);if(ad(ue,b.style),!ue)return!1;const xe=a.at(a.position),je=xe.parent.addChildrenAfter(ue,xe);return a.silenceNotifications=ne,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(je)):je&&(a.position=a.offsetOf(je))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function og(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 "),pc(a,{context:y,parseMode:"text"})}new ig;function Lu(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var fl=4,Wc=20,nc=2*(Wc+fl),nh=(a,y)=>`
|
|
|
<line x1="${a+Wc}" y1="${y+Wc}"
|
|
|
x2="${a>y?a+Wc:7*Wc+10*fl}"
|
|
|
y2="${a<y?y+Wc:7*Wc+10*fl}"/>
|
|
|
<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+Wc}" y1="${y+Wc}"
|
|
|
x2="${a>y?a+Wc:7*Wc+10*fl}"
|
|
|
y2="${a<y?y+Wc:7*Wc+10*fl}"/>
|
|
|
<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>`,ag=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Wc+10*fl+5} ${8*Wc+10*fl+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${nc+fl}"
|
|
|
height="${3*nc}"
|
|
|
width="${nc}"
|
|
|
rx="${nc/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${nc+fl}"
|
|
|
y="0"
|
|
|
height="${nc}"
|
|
|
width="${3*nc}"
|
|
|
rx="${nc/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${rh(2*(fl+nc),2*fl+3*nc,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${rh(2*(fl+nc),2*fl+nc,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${rh(2*fl+3*nc,2*(fl+nc),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${rh(2*fl+nc,2*(fl+nc),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${nh(2*fl+nc,fl)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${Gp(2*fl+2*nc,fl)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${nh(2*fl+3*nc,fl)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${nh(fl,2*fl+nc)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${Gp(fl,2*fl+2*nc)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${nh(fl,2*fl+3*nc)}
|
|
|
</g>
|
|
|
</svg>`,sg=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>`,lg=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>`,Yp=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>`,cg=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>`,ug=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>`,dg=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>`,fg=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>`,hg=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>`,Ph={matrix:sg,pmatrix:lg,bmatrix:cg,Bmatrix:Yp,vmatrix:ug,Vmatrix:dg},Bh={cases:fg,rcases:hg,Bmatrix:Yp};function pg(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ne=0;E.forEach(Cn=>{(!ne||Cn.length>ne)&&(ne=Cn.length)});let ue=document.getElementById("mathlive-environment-popover");ue||(ue=Pf("mathlive-environment-popover"),Xc("environment-popover"),Xc("core"),ue.setAttribute("aria-hidden","true"));let xe;const je=ue.querySelector(".MLEP__environment-controls");je?xe=je:(xe=document.createElement("div"),ue.innerHTML="",ue.appendChild(xe)),xe.className="MLEP__environment-controls",xe.style.display="flex",xe.style.width="100%",xe.style.height="100%",xe.style.boxSizing="border-box",xe.innerHTML=ag;let Ue=[],Je="";const st=a.model.parentEnvironment.environmentName;if(Ic(st)){const Cn=vg(st);Je=Ph[Cn]("active");const Sr=Ph,{[Cn]:xi}=Sr,gr=he(Sr,[de(Cn)]);Ue=Object.values(gr).map(Yr=>Yr("inactive"))}else if(Rc(st)){const Cn=gg(st);Je=Bh[Cn]("active");const Sr=Bh,{[Cn]:xi}=Sr,gr=he(Sr,[de(Cn)]);Ue=Object.values(gr).map(Yr=>Yr("inactive"))}else ql(st)&&(Je=Ph.matrix("active"),Ue=Object.values(Bh).map(Cn=>Cn("inactive")));const Mt=document.createElement("div");Mt.className="MLEP__environment-delimiter-controls",Mt.style.display="flex",Mt.style.flexDirection="column",Mt.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${Je}
|
|
|
${Ue.join("")}
|
|
|
</div>`,Je&&xe.appendChild(Mt),xe.querySelectorAll("[data-command]").forEach(Cn=>{const Sr=Cn.dataset.command;let xi=Sr;try{xi=JSON.parse(Sr)}catch(gr){}Cn.addEventListener("mousedown",gr=>gr.preventDefault()),xi&&Cn.addEventListener("click",()=>a.executeCommand(xi))});const un=(b=a.field)==null?void 0:b.getBoundingClientRect();un&&(ue.style.top=`${window.scrollY+(un.top-ue.clientHeight-15)}px`,ue.style.left=`${un.left+20}px`,ue.classList.add("is-visible"))}function Fh(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mg(){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&&Ll(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pg(a):Fh()}function vg(a){return a.replace("*","")}function gg(a){return a==="dcases"?"cases":a}function Xp(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function qp(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function zh(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 yg(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 bg(a,y){var b,E,ne;const ue=(b=Xp(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 xe=a.getBoundingClientRect(),je=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let Ue=Math.min(je,(E=y.height)!=null?E:xe.height),Je=zh(y.location.y,Ue,y.verticalPos,ue);Je+Ue>window.innerHeight-8&&(y.alternateLocation?(Je=zh(y.alternateLocation.y,Ue,y.verticalPos,ue),Je+Ue>window.innerHeight-8&&(Je=void 0)):Je=void 0),Number.isFinite(Je)||(Je=Math.max(8,window.innerHeight-8-Ue),8+Ue>window.innerHeight-8&&(a.style.bottom="8px")),Ue=Math.min(Je+Ue,window.innerHeight-8)-Je;const st=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Mt=Math.min(st,(ne=y.width)!=null?ne:xe.width),Gt=zh(y.location.x,Mt,y.horizontalPos,ue);Gt+Mt>window.innerWidth-8&&(y.alternateLocation?(Gt=yg(y.alternateLocation.x,Mt,y.verticalPos,ue),Gt+Mt>window.innerWidth-8&&(Gt=void 0)):Gt=void 0),Number.isFinite(Gt)||(Gt=Math.max(8,window.innerWidth-8-Mt),8+Mt>window.innerWidth-8&&(a.style.right="8px")),Mt=Math.min(Gt+Mt,window.innerWidth-8)-Gt,ue==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-Gt-Mt).toString()}px`:a.style.left=`${Math.ceil(Gt).toString()}px`,a.style.top=`${Math.ceil(Je).toString()}px`,Ue!==xe.height&&(a.style.height=`${Math.ceil(Ue).toString()}px`),Mt!==xe.width&&(a.style.width=`${Math.ceil(Mt).toString()}px`)}function Sg(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Vd(a){return"submenu"in a}function ku(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function $h(a){return"type"in a&&a.type==="divider"}function Hh(a){return"type"in a&&a.type==="heading"}var Jp={};function jh(a){let y=Jp[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,Jp[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,Vd(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=ku(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 ne=this._declaration;if($h(ne)){this.enabled=!1,this.checked=!1;return}Hh(ne)&&(this.enabled=!1,this.checked=!1,this.visible=!0),ku(ne)&&(this.checked=ku(ne)&&((y=Gd(ne.checked,a))!=null?y:!1)),(ku(ne)||Vd(ne))&&(this.enabled=(b=Gd(ne.enabled,a))!=null?b:!0,this.visible=(E=Gd(ne.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(ku(ne)||Hh(ne)||Vd(ne))&&(this.label=Gd(ne.label,a),this.tooltip=Gd(ne.tooltip,a),this.ariaLabel=Gd(ne.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(jh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(jh("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),ku(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=gh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(jh("trailing-chevron"))}get element(){if(this._element)return this._element;if($h(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,(ku(this._declaration)||Hh(this._declaration)||Vd(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(!ku(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=Xp(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:qp(b,"trailing",E),y:b.top-4},alternateLocation:{x:qp(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(xg(E,y.clientY-a.clientY,b)<=.2)return!1;let ue="right";if(this.submenu.element){const xe=this.submenu.element.getBoundingClientRect(),je=this.element.getBoundingClientRect();xe.left<je.left+je.width/2&&(ue="left")}return ue==="right"?E>0:E<0}};function xg(a,y,b){return Math.hypot(a,y)/b}function Gd(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 nf{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ne;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(ne=b==null?void 0:b.columnCount)!=null?ne: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,ne;this._menuItems.forEach(Je=>Je.updateState(y));const ue=this.hasCheck;this.hasCheck=this._menuItems.some(Je=>Je.visible&&Je.hasCheck),this.hasCheck!==ue&&this._menuItems.forEach(Je=>Je.updateState(y));let xe,je=0;for(const Je of this._menuItems)Je.type==="heading"?(xe&&je===0&&(xe.visible=!1),xe=Je,je=0):Je.type==="divider"&&xe?(xe.visible=je>0,xe=void 0,je=0):xe&&Je.visible&&(je+=1);xe&&(xe.visible=je>0);let Ue=!0;for(const Je of this._menuItems)Je.type==="divider"?(Je.visible=!Ue,Ue=!0):Je.visible&&(Ue=!1);(b=this.activeMenuItem)!=null&&b.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((ne=this.activeMenuItem)==null?void 0:ne.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,ne,ue;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const xe=this.activeMenuItem;xe.active=!1,(b=xe.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?(ne=y.element)==null||ne.focus({preventScroll:!0}):(ue=this._element)==null||ue.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const ne=E[y];b=ne.type!=="divider"&&ne.visible&&ne.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 ne=y[b];E=ne.type!=="divider"&&ne.visible&&ne.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 ne=this._menuItems.indexOf(this._activeMenuItem),ue=1;for(;ne>=b&&ne<=E;){ne+=y>0?1:-1;const xe=this._menuItems[ne];if(!xe)break;if(xe.visible&&xe.enabled){if(ue===Math.abs(y))return this._menuItems[ne];ue+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(ne=>ne.visible&&ne.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return nf._collator||(nf._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),nf._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(je=>je.type!=="divider"&&je.visible&&je.enabled);if(E.length===0)return null;const ne=Math.max(...E.map(je=>je.label.length))-y.length;if(ne<0)return null;let ue=null,xe=0;for(;xe<ne&&!ue;)ue=(b=E.find(je=>nf.collator.compare(y,je.label.substring(xe,y.length))===0))!=null?b:null,xe++;return ue}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),$e()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bg(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,ne,ue;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),$e()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(ue=(ne=this._element)==null?void 0:ne.parentNode)==null||ue.removeChild(this._element)}set openSubmenu(y){var b,E,ne,ue;const xe=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",xe.toString())),(ue=(ne=this.activeMenuItem)==null?void 0:ne.element)==null||ue.classList.toggle("is-submenu-open",xe),this.isSubmenuOpen=xe}},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){$m(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=bd(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ne;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=bd(y));let ue=!0;const xe=this.activeSubmenu,je=xe.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":je==null||je.select(bd(y));break;case"ArrowRight":if((je==null?void 0:je.type)==="submenu")je.select(bd(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!je)xe.activeMenuItem=xe.firstMenuItem;else{const Ue=(b=xe.getMenuItemColumn(je))!=null?b:-1;if(Ue>=0&&Ue<((E=xe.columnCount)!=null?E:1)-1){const Je=xe.nextMenuItem(1);Je&&(xe.activeMenuItem=Je)}}break;case"ArrowLeft":if(xe===this.rootMenu)je||(xe.activeMenuItem=xe.firstMenuItem);else if((je&&(ne=xe.getMenuItemColumn(je))!=null?ne:-1)<=0||!je){xe.hide();const Je=xe.parentMenu.activeMenuItem;if(Je){const{element:st}=Je;st==null||st.focus(),st==null||st.classList.remove("is-submenu-open")}}else{const Je=xe.nextMenuItem(-1);Je&&(xe.activeMenuItem=Je)}break;case"ArrowDown":xe.activeMenuItem=xe.nextMenuItem(xe.columnCount);break;case"ArrowUp":xe.activeMenuItem=xe.nextMenuItem(-xe.columnCount);break;case"Home":case"PageUp":xe.activeMenuItem=xe.firstMenuItem;break;case"End":case"PageDown":xe.activeMenuItem=xe.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const Ue=xe.findMenuItem(this.typingBuffer);Ue&&(xe.activeMenuItem=Ue),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Rf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const Ue=xe.findMenuItem(this.typingBuffer);Ue&&(xe.activeMenuItem=Ue),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else ue=!1}ue&&(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 wu.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),wu.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),wu.state==="open"&&wu.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(re(le({},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,wu.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 _g=n0;function r0(a){return $h(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(ku(a)||Vd(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||ku(a)&&typeof a.checked=="function"?!0:Vd(a)?a.submenu.some(r0):!1}var oh=class{};oh.DELAY=300,oh.MAX_DISTANCE=10;function Cg(a){return new Promise((y,b)=>{const E=If(a);E||y(!1);let ne=E;const ue=setTimeout(()=>{xe.abort(),y(Sg(ne,E)<oh.MAX_DISTANCE)},oh.DELAY),xe=new AbortController,je=xe.signal;for(const Ue of["pointermove","pointerup","pointercancel"])window.addEventListener(Ue,Je=>{if(Je.type==="pointerup"||Je.type==="pointercancel")clearTimeout(ue),xe.abort(),y(!1);else if(Je.type==="pointermove"){const st=If(Je);st&&(ne=st)}},{passive:!0,signal:je})})}function i0(a,y,b){return cd(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:If(E),modifiers:bd(E)}))return a.preventDefault(),a.stopPropagation(),!0}if(a.type==="keydown"){const E=a;if(E.code==="ContextMenu"||E.code==="F10"&&E.shiftKey){const ne=y==null?void 0:y.getBoundingClientRect();if(ne&&b.show({target:y,location:{x:Math.ceil(ne.left+ne.width/2),y:Math.ceil(ne.top+ne.height/2)},modifiers:bd(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 ne=If(a);if(yield Cg(a))return b.state!=="closed"?!1:(b.show({target:y,location:ne}),!0)}return!1})}var o0={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};nn(Object.keys(o0),"{body:auto}",{createAtom:a=>new z(re(le({},a),{body:Lt(a.args[0]),accentChar:o0[a.command.slice(1)]}))}),nn(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=on(Lt(a.args[0]));return new z(re(le({},a),{body:Lt(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),nn(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(re(le({},a),{body:Lt(a.args[0]),svgAccent:"overarc"}))}),nn(["underarc","underparen"],"{body:auto}",{createAtom:a=>new fu(re(le({},a),{body:Lt(a.args[0]),svgBelow:"underarc"}))}),nn("utilde","{body:auto}",{createAtom:a=>{const y=Lt(a.args[0]),b=on(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new fu(re(le({},a),{body:y,svgBelow:E,boxType:vl(y)}))}}),nn("^","{:string}",{createAtom:a=>{var y;return new wr(re(le({},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:"^"}))}}),nn("`","{:string}",{createAtom:a=>{var y;return new wr(re(le({},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:"`"}))}}),nn("'","{:string}",{createAtom:a=>{var y;return new wr(re(le({},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:"'"}))}}),nn('"',"{:string}",{createAtom:a=>{var y,b;return new wr(re(le({},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]:'"'}))}}),nn(".","{:string}",{createAtom:a=>{var y,b;return new wr(re(le({},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]:"."}))}}),nn("=","{:string}",{createAtom:a=>{var y,b;return new wr(re(le({},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]:"="}))}}),nn("~","{:string}",{createAtom:a=>{var y;return new wr(re(le({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"}))}}),nn("c","{:string}",{createAtom:a=>{var y;return new wr(re(le({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),nn("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,ne={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 xe=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const je of xe){const Ue=je.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(Ue)ne.strokeWidth=Ue[1],ne.strokeStyle=Ue[2],ne.strokeColor=Ue[3];else{const Je=je.match(/\s*([a-z]*)\s*=\s*"(.*)"/);Je&&(Je[1]==="mathbackground"?ne.backgroundcolor=Je[2]:Je[1]==="mathcolor"?ne.strokeColor=Je[2]:Je[1]==="padding"?ne.padding=Je[2]:Je[1]==="shadow"&&(ne.shadow=Je[2]))}}ne.strokeStyle==="dashed"?ne.svgStrokeStyle="5,5":ne.strokeStyle==="dotted"&&(ne.svgStrokeStyle="1,5")}ne.borderStyle=`${ne.strokeWidth} ${ne.strokeStyle} ${ne.strokeColor}`;const ue={};return((b=E[0])!=null?b:"").split(/[, ]/).filter(xe=>xe.length>0).forEach(xe=>{ue[xe.toLowerCase()]=!0}),new rf(a.command,Lt(E[2]),ue,ne)}}),nn("cancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,Lt(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:{}})}}),nn("bcancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,Lt(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:{}})}}),nn("xcancel","{body:auto}",{createAtom:a=>{var y;return new rf(a.command,Lt(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:{}})}}),nn(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new fu(re(le({},a),{body:Lt((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),nn("overbrace","{:auto}",{createAtom:a=>new fu(re(le({},a),{body:Lt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),nn(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new fu(re(le({},a),{body:Lt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),nn(["underbrace"],"{:auto}",{createAtom:a=>new fu(re(le({},a),{body:Lt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),nn(["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,ne,ue;return new fu(re(le({},a),{svgBody:a.command.slice(1),above:((b=Lt((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:Lt((E=a.args)==null?void 0:E[1]),below:(ue=Lt((ne=a.args)==null?void 0:ne[0]))!=null?ue: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)}`}),nn(["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 yd(a.command.slice(1),re(le({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),nn(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new yd({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],re(le({},a),{limits:"over-under",variant:"main"}))}),nn(["lim","mod"],"",{ifMode:"math",createAtom:a=>new yd(a.command.slice(1),re(le({},a),{limits:"over-under",variant:"main"}))}),nn(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new yd(a.command.slice(1),re(le({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),nn(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new wr(re(le({},a),{body:Lt(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 ne=new Xr("\xB0",{style:re(le({},a.style),{variant:"normal",variantStyle:"up"})});return new Xr([b,ne],{type:"inner",isSelected:a.isSelected,caret:E})}}),nn("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new ap(re(le({},a),{body:Lt(a.args[1]),index:a.args[0]?Lt(a.args[0]):void 0}))}),nn(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=le({},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 Fd(E[0]?Lt(E[0]):[new sa],E[1]?Lt(E[1]):[new sa],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}`:Vi(a.command,b,E)}}),nn(["brace","brack"],"",{infix:!0,createAtom:a=>new Fd(Lt(a.args[0]),Lt(a.args[1]),re(le({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ga([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),nn(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new Fd(Lt(E[0]),Lt(E[1]),re(le({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ga([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),nn(["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 Fd(Lt(E[0]),Lt(E[1]),re(le({},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)}`}),nn("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new Fd(Lt(a.args[0]),Lt(a.args[1]),re(le({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),nn(["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)],re(le({},a),{limits:"auto",variant:"main"}))}),nn("smallint","",{ifMode:"math",createAtom:a=>new yd("\u222B",re(le({},a),{limits:"adjacent",variant:"main"}))});var a0={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"};nn(Object.keys(a0),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=a0[y.slice(1)];return new fh(b,re(le({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),nn(["Re","Im"],"",{ifMode:"math",createAtom:a=>new yd({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],re(le({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),nn("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new rp(re(le({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),nn("the","{:value}",{createAtom:a=>new wr(re(le({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new $o({parent:y},a.style);let ne="";a.isSelected&&(ne+=" ML__selected");const ue=E.evaluate(a.args[0]);return new Xr(((b=Ys(ue))!=null?b:"").split("").map(xe=>new Xr(xe,{type:"ord",classes:ne,mode:a.mode,isSelected:a.isSelected,style:le({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ne}).wrap(E)},serialize:a=>{var y;return`\\the${(y=Ys(a.args[0]))!=null?y:"\\relax"}`}}),nn("mathtip","{:auto}{:math}",{createAtom:a=>new hh(re(le({},a),{body:Lt(a.args[0]),tooltip:Lt(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${wr.serialize([a.tooltip],re(le({},y),{defaultMode:"math"}))}}`}),nn("texttip","{:auto}{:text}",{createAtom:a=>new hh(re(le({},a),{body:Lt(a.args[0]),tooltip:Lt(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${wr.serialize([a.tooltip],re(le({},y),{defaultMode:"text"}))}}`}),nn("error","{:math}",{createAtom:a=>new wr(re(le({},a),{body:Lt(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),nn("ensuremath","{:math}",{createAtom:a=>new wr(re(le({},a),{body:Lt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(re(le({},y),{defaultMode:"math"}))}}`}),nn("color","{:value}",{applyStyle:(a,y,b)=>{var E,ne;return{verbatimColor:(E=Ys(y[0]))!=null?E:void 0,color:b.toColor((ne=y[0])!=null?ne:{string:"red"})}}}),nn("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ne;return{verbatimColor:(E=Ys(y[0]))!=null?E:void 0,color:b.toColor((ne=y[0])!=null?ne:{string:"red"})}}}),nn("boxed","{content:math}",{createAtom:a=>new Ul(re(le({},a),{body:Lt(a.args[0]),framecolor:{string:"black"}}))}),nn("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ne;return{verbatimBackgroundColor:(E=Ys(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ne=y[0])!=null?ne:{string:"yellow"})}}}),nn("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new Ul(re(le({},a),{body:Lt(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(re(le({},y),{defaultMode:"text"})):Vi(a.command,(b=Ys(a.framecolor))!=null?b:"",(E=Ys(a.backgroundcolor))!=null?E:"",a.bodyToLatex(re(le({},y),{defaultMode:"text"})))}}),nn("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=Lt(a.args[1]);return b?new Ul(re(le({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new Ul(re(le({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let ne=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const ue=[];a.padding&&ue.push((b=Ys(a.padding))!=null?b:""),a.border&&ue.push(`border: ${a.border}`),a.backgroundcolor&&ue.push((E=Ys(a.backgroundcolor))!=null?E:""),ne+=`[${ue.join(",")}]`}return Vi(ne,a.bodyToLatex(y))}}),nn(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new wr(re(le({},a),{body:Lt(a.args[0])})),render:(a,y)=>{const b=new $o({parent:y,mathstyle:a.command.slice(1)},a.style),E=wr.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):`{${ga([a.command,a.bodyToLatex(y)])}}`}),nn(["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]})}),nn("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),nn("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),nn("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),nn("selectfont","",{ifMode:"text",applyStyle:()=>({})}),nn("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),nn(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new wr(re(le({},a),{body:Lt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),nn("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),nn("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),nn("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),nn("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),nn("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),nn("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),nn("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),nn("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),nn("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),nn("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),nn("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),nn("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),nn("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),nn("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),nn("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),nn("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),nn("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),nn("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),nn("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),nn("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),nn("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),nn("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),nn("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),nn("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),nn("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),nn("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),nn("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),nn(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),nn(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),nn("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),nn("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),nn("mbox","{:text}",{ifMode:"math",createAtom:a=>new wr(re(le({},a),{type:"mord",body:Lt(a.args[0]),mode:"math"})),serialize:(a,y)=>Vi("\\mbox",a.bodyToLatex(re(le({},y),{defaultMode:"text"})))}),nn("text","{:text}",{ifMode:"math",applyMode:"text"}),nn(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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:""})}}),nn(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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}}),nn("htmlData","{data:string}{content:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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}}),nn(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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}}),nn("em","{:rest}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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"})}),nn("emph","{:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(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}};nn(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new ip(re(le({},a),{delim:(y=a.args[0])!=null?y:".",size:s0[a.command].size,delimType:s0[a.command].mclass}))}}),nn(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new sf(re(le({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),nn(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new sf(re(le({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),nn("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new wr(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Dl||E===Il)&&(b=1),(E===uc||E===ll)&&(b=2),(E===dc||E===cl)&&(b=3);const ne=Lt(a.args[b]);return wr.createBox(y,ne)},serialize:(a,y)=>`\\mathchoice{${wr.serialize(a.args[0],y)}}{${wr.serialize(a.args[1],y)}}{${wr.serialize(a.args[2],y)}}{${wr.serialize(a.args[3],y)}}`}),nn("mathop","{:auto}",{createAtom:a=>new wr(re(le({},a),{type:"mop",body:Lt(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=wr.createBox(y,a.body);if(a.superscript||a.subscript){const ne=(b=a.subsupPlacement)!=null?b:"auto";E=ne==="over-under"||ne==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Xr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[Vi(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)),ga(b)}}),nn(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new wr(re(le({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:Lt(a.args[0])}))}),nn(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=Lt(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 wr(re(le({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=wr.createBox(y,a.body);if(a.superscript||a.subscript){const ne=(b=a.subsupPlacement)!=null?b:"auto";E=ne==="over-under"||ne==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Xr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[Vi(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)),ga(b)}}),nn(["char","unicode"],"{charcode:value}",{createAtom:a=>new wr(re(le({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Ys((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)}}),nn("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new wr(a),render:(a,y)=>{var b,E,ne;const ue=new $o({parent:y,mathstyle:"textstyle"},a.style),xe=ue.toEm((b=a.args[0])!=null?b:{dimension:0}),je=ue.toEm((E=a.args[1])!=null?E:{dimension:10}),Ue=ue.toEm((ne=a.args[2])!=null?ne:{dimension:10}),Je=new Xr(null,{classes:"rule",type:"ord"});return Je.width=je,Je.height=Ue+xe,Je.depth=-xe,Je.setStyle("border-right-width",je,"em"),Je.setStyle("border-top-width",Ue,"em"),Je.setStyle("border-color",a.style.color),Je.setStyle("vertical-align",xe,"em"),a.isSelected&&Je.setStyle("opacity","50%"),a.bind(ue,Je),a.caret&&(Je.caret=a.caret),Je.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Ys(a.args[0])}]`:""}{${Ys(a.args[1])}}{${Ys(a.args[2])}}`}),nn(["overline","underline"],"{:auto}",{createAtom:a=>new wr(re(le({},a),{body:Lt(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new $o({parent:y,mathstyle:"cramp"},a.style),ne=wr.createBox(E,a.body);if(!ne)return null;const ue=E.metrics.defaultRuleThickness/E.scalingFactor,xe=new Xr(null,{classes:b+"-line"});xe.height=ue,xe.maxFontSize=ue*1.125*E.scalingFactor;let je;return b==="overline"?je=new Pa({shift:0,children:[{box:ne},3*ue,{box:xe},ue]}):je=new Pa({top:ne.height,children:[ue,{box:xe},3*ue,{box:ne}]}),a.caret&&(je.caret=a.caret),new Xr(je,{classes:b,type:"ignore"})}}),nn("overset","{:auto}{base:auto}",{createAtom:a=>{const y=Lt(a.args[1]);return new fu(re(le({},a),{above:Lt(a.args[0]),body:y,skipBoundary:!1,boxType:vl(y)}))},serialize:(a,y)=>Vi(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),nn("underset","{:auto}{base:auto}",{createAtom:a=>{const y=Lt(a.args[1]);return new fu(re(le({},a),{below:Lt(a.args[0]),body:y,skipBoundary:!1,boxType:vl(y)}))},serialize:(a,y)=>Vi(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),nn("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=Lt(a.args[2]);return new fu(re(le({},a),{above:Lt(a.args[0]),below:Lt(a.args[1]),body:y,skipBoundary:!1,boxType:vl(y)}))},serialize:(a,y)=>Vi(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),nn(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new fu(re(le({},a),{body:Lt(a.args[2]),above:Lt(a.args[1]),below:Lt(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>Vi(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),nn("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ne;return new af(re(le({},a),{body:Lt(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(ne=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ne:!0}))}}),nn(["vphantom"],"{:auto}",{createAtom:a=>new af(re(le({},a),{body:Lt(a.args[0]),isInvisible:!0,smashWidth:!0}))}),nn(["hphantom"],"{:auto}",{createAtom:a=>new af(re(le({},a),{body:Lt(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),nn(["phantom"],"{:auto}",{createAtom:a=>new af(re(le({},a),{body:Lt(a.args[0]),isInvisible:!0}))}),nn("not","{:math}",{createAtom:a=>{const y=Lt(a.args[0]);return y.length===0?new wr(re(le({},a),{type:"mrel",value:"\uE020"})):new wr(re(le({},a),{body:[new gd(re(le({},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{${wr.serialize(b.group,y)}}`:`\\not${wr.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":vl(Lt(a.args[0])),ne=wr.createBox(y,a.body,{type:E});return a.caret&&(ne.caret=a.caret),a.bind(y,ne)}}),nn(["ne","neq"],"",{createAtom:a=>new wr(re(le({},a),{type:"mrel",body:[new gd(re(le({},a),{body:"\uE020",align:"right",boxType:"rel"})),new wr(re(le({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),nn("rlap","{:auto}",{createAtom:a=>new gd(re(le({},a),{body:Lt(a.args[0]),align:"right"}))}),nn("llap","{:auto}",{createAtom:a=>new gd(re(le({},a),{body:Lt(a.args[0]),align:"left"}))}),nn("mathrlap","{:math}",{createAtom:a=>new gd(re(le({},a),{body:Lt(a.args[0]),align:"left"}))}),nn("mathllap","{:math}",{createAtom:a=>new gd(re(le({},a),{body:Lt(a.args[0]),align:"left"}))}),nn("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new Ul(re(le({},a),{body:Lt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return Vi("\\raisebox",(b=Ys(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),nn("raise","{:value}{:auto}",{createAtom:a=>{var y;return new Ul(re(le({},a),{body:Lt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return Vi("\\raise",(b=Ys(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),nn("lower","{:value}{:auto}",{createAtom:a=>{var y;return new Ul(re(le({},a),{body:Lt(a.args[1]),padding:{dimension:0},offset:(y=Xl(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return Vi("\\lower",(E=Ys(Xl((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),rt("0123456789/@.?!"),It(65,90),It(97,122),rt([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),rt([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),rt([["\\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]]),rt([["\\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"),rt([["\\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"]]),rt([["\\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"]]),rt([["\\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"),rt([["+",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"),rt([["\\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"),rt([["\\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]]),rt([["=",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"),rt([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),rt([["\\wp",8472],["\\aleph",8501]]),rt([["\\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"),rt([["\\ ",160],["~",160]],"space"),nn(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new sf(a)}),nn("space","",{createAtom:a=>new sf(a)}),rt([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),rt([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),rt([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var l0="<mo>⁡</mo>",ah="<mo>⁢</mo>";function sh(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function tl(a,y){return!a||!y.generateID?"":` extid="${a}"`}function wg(a,y,b){var E,ne,ue,xe,je,Ue,Je,st,Mt,Gt,un;let Cn=!1;y=y!=null?y:a.atoms.length;let Sr="",xi="",gr=a.atoms[a.index];const Yr=(ne=(E=gr.style)==null?void 0:E.variant)!=null?ne:"",Ti=(xe=(ue=gr.style)==null?void 0:ue.variantStyle)!=null?xe:"";let ri="";if(Yr||Ti){const ta=yn(gr.value,(je=gr.style)==null?void 0:je.variant,(Ue=gr.style)==null?void 0:Ue.variantStyle);if(ta!==gr.value)return a.index+=1,Sr=`<mi${tl(gr.id,b)}>${ta}</mi>`,Wu(Sr,a,b)||(a.mathML+=Sr,a.lastType="mi"),!0;ri=(Je={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+Yr])!=null?Je:"",ri=` mathvariant="${ri}"`}const wo={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(gr.command==="!")return a.index+=1,Sr="<mo>!</mo>",Wu(Sr,a,b)||(a.mathML+=Sr,a.lastType="mo"),!0;if(wo[gr.command]){a.index+=1;let ta=`<mi${tl(gr.id,b)}${ri}>${wo[gr.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(ta=ah+ta),Wu(ta,a,b)||(a.mathML+=ta,a.lastType="mi"),!0}if(gr.command==="\\operatorname")xi=Yd(gr.body),a.index+=1;else if(Yr||Ti)for(;a.index<y&&(gr.type==="mord"||gr.type==="macro")&&!gr.isDigit()&&Yr===((Mt=(st=gr.style)==null?void 0:st.variant)!=null?Mt:"")&&Ti===((un=(Gt=gr.style)==null?void 0:Gt.variantStyle)!=null?un:"");)xi+=Yd([gr]),a.index+=1,gr=a.atoms[a.index];else(gr.type==="mord"||gr.type==="macro")&&!gr.isDigit()&&(xi+=Yd([gr]),a.index+=1);if(xi.length>0){Cn=!0,Sr=`<mi${ri}>${xi}</mi>`;const ta=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)||((ta==="mi"||ta==="mn"||ta==="mtext"||ta==="fence")&&(Sr=ah+Sr),a.mathML+=Sr)}return Cn}function Eg(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function Mg(a){let y=-1,b=a.index,E=!1,ne=!1;for(;b<a.atoms.length&&!E&&!ne;){const ue=a.atoms[b];E=!ue.isDigit(),ne=!E&&ue.superscript!==void 0,b++}return ne&&(y=b-1),y}function Wu(a,y,b){var E;let ne=y.atoms[y.index-1];if(!ne)return!1;if(!ne.superscript&&!ne.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")ne=y.atoms[y.index],y.index+=1;else return!1;const ue=y.lastType;y.lastType="";const xe=zs(ne.superscript,b);y.lastType="";const je=zs(ne.subscript,b);if(y.lastType=ue,!xe&&!je)return!1;let Ue="";return xe&&je?Ue=`<msubsup>${a}${je}${xe}</msubsup>`:xe?Ue=`<msup>${a}${xe}</msup>`:je&&(Ue=`<msub>${a}${je}</msub>`),y.mathML+=Ue,y.lastType="",!0}function Lg(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ne="";for(;a.index<y&&a.atoms[a.index].mode==="text";)ne+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ne.length>0?(a.mathML+=`<mtext ${tl(a.atoms[E].id,b)}>${ne}</mtext>`,a.lastType="mtext",!0):!1}function kg(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ne="",ue=Mg(a);for(ue>=0&&ue<y&&(y=ue);a.index<y&&a.atoms[a.index].isDigit();)ne+=a.atoms[a.index].asDigit(),a.index+=1;return ne.length<=0?!1:(ne="<mn"+tl(a.atoms[E].id,b)+">"+ne+"</mn>",ue<0&&Eg(a)&&(ue=a.index,a.index+=1),Wu(ne,a,b)||(a.mathML+=ne,a.lastType="mn"),!0)}function Ag(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ne="",ue="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let xe=!1,je=0;const Ue=a.index;let Je=-1,st=Ue+1;for(;st<y&&!xe;)a.atoms[st].type==="mopen"?je+=1:a.atoms[st].type==="mclose"&&(je-=1),je===-1&&(xe=!0,Je=st),st+=1;xe&&(ne="<mrow>",ne+=kd(a.atoms[Ue],b),ne+=zs(a.atoms,b,Ue+1,Je),ne+=kd(a.atoms[Je],b),ne+="</mrow>",a.index=Je+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=ah),Wu(ne,a,b)&&(E=!0,a.lastType="",ne=""),ue="fence")}return ne.length>0&&(E=!0,a.mathML+=ne,a.lastType=ue),E}function Tg(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ne="",ue="";const xe=a.atoms[a.index];if(!xe)return!1;const je={"\\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(je[xe.command]){a.index+=1;const Ue=`<mo${tl(xe.id,b)}>${je[xe.command]}</mo>`;return Wu(Ue,a,b)||(a.mathML+=Ue,a.lastType="mo"),!0}if(a.index<y&&(xe.type==="mbin"||xe.type==="mrel"))ne+=Kh(a.atoms[a.index],b),a.index+=1,ue="mo";else if(a.index<y&&(xe.type==="mop"||xe.type==="operator"||xe.type==="extensible-symbol")){if(xe.subsupPlacement==="over-under"&&(xe.superscript||xe.subscript)){const Ue=kd(xe,b);return xe.superscript&&xe.subscript?(ne+="<munderover>"+Ue,ne+=zs(xe.subscript,b),ne+=zs(xe.superscript,b),ne+="</munderover>"):xe.superscript?(ne+="<mover>"+Ue,ne+=zs(xe.superscript,b),ne+="</mover>"):xe.subscript&&(ne+="<munder>"+Ue,ne+=zs(xe.subscript,b),ne+="</munder>"),a.mathML+=ne,a.lastType="mo",a.index+=1,!0}{const Ue=a.atoms[a.index],Je=Ue.value==="\\operatorname",st=Je?'<mi class="MathML-Unit"'+tl(Ue.id,b)+">"+Yd(Ue.value)+"</mi>":kd(Ue,b);ne+=st,!Je&&!/^<mo>(.*)<\/mo>$/.test(st)?(ne+=l0,ue="applyfunction"):ue=Je?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ne)&&(ne=ah+ne),a.index+=1}return ne.length>0&&(E=!0,Wu(ne,a,b)||(a.mathML+=ne,a.lastType=ue)),E}function zs(a,y,b,E){y!=null||(y={});const ne={atoms:[],index:b!=null?b:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")ne.mathML=a.toString();else if(typeof a=="string")ne.mathML=a;else if(a instanceof wr)ne.mathML=Kh(a,y);else if(Array.isArray(a)){ne.atoms=a;let ue=0;for(E=E||(a?a.length:0);ne.index<E;)if(Lg(ne,E,y)||kg(ne,E,y)||wg(ne,E,y)||Tg(ne,E,y)||Ag(ne,E,y))ue+=1;else if(ne.index<E){let xe=Kh(ne.atoms[ne.index],y);ne.lastType==="mn"&&xe.length>0&&ne.atoms[ne.index].type==="genfrac"&&(xe="<mo>⁤</mo>"+xe),ne.atoms[ne.index].type==="genfrac"?ne.lastType="mfrac":ne.lastType="",ne.index+=1,Wu(xe,ne,y)?ue+=1:xe.length>0&&(ne.mathML+=xe,ue+=1)}ue>1&&(ne.mathML="<mrow>"+ne.mathML+"</mrow>")}return ne.mathML}function kd(a,y){let b="";const E=Yd(a.value);return E&&(b="<mo"+tl(a.id,y)+">"+E+"</mo>"),b}function Yd(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 Kh(a,y){var b,E,ne,ue,xe,je,Ue,Je,st,Mt,Gt,un,Cn,Sr,xi,gr,Yr,Ti,ri,wo,ta,jo;if(a.mode==="text")return`<mi${tl(a.id,y)}>${a.value}</mi>`;const ws={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"},Xs={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Hi="",iu="",Tu,pu,vc,ou,Zc,nl;const{command:Zl}=a;if(a.command==="\\error")return`<merror${tl(a.id,y)}>${zs(a.body,y)}</merror>`;const gc={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Du={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":Hi=zs(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Hi+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Hi+="<mo>"+(gc[a.leftDelim]||a.leftDelim)+"</mo>")),Hi+="<mtable",a.colFormat){for(Hi+=' columnalign="',vc=0;vc<a.colFormat.length;vc++)a.colFormat[vc].align&&(Hi+={l:"left",c:"center",r:"right"}[a.colFormat[vc].align]+" ");Hi+='"'}for(Hi+=">",pu=0;pu<a.array.length;pu++){for(Hi+="<mtr>",Tu=0;Tu<a.array[pu].length;Tu++)Hi+="<mtd>"+zs(a.array[pu][Tu],y)+"</mtd>";Hi+="</mtr>"}Hi+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Hi+="<mo>"+(gc[a.leftDelim]||a.rightDelim)+"</mo>"),Hi+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Hi+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Hi+="<mo"+tl(a.id,y)+">"+(gc[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Hi+="<mfrac>",Hi+=zs(a.above,y)||"<mi> </mi>",Hi+=zs(a.below,y)||"<mi> </mi>",Hi+="</mfrac>"):(Hi+="<mtable"+tl(a.id,y)+">",Hi+="<mtr>"+zs(a.above,y)+"</mtr>",Hi+="<mtr>"+zs(a.below,y)+"</mtr>",Hi+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Hi+="<mo"+tl(a.id,y)+">"+(gc[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Hi+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Hi+="<msqrt"+tl(a.id,y)+">",Hi+=zs(a.body,y),Hi+="</msqrt>"):(Hi+="<mroot"+tl(a.id,y)+">",Hi+=zs(a.body,y),Hi+=zs(a.above,y),Hi+="</mroot>");break;case"leftright":const Iu=a,Ru=Iu.leftDelim;Hi="<mrow>",Ru&&Ru!=="."&&(Hi+=`<mo${tl(a.id,y)}>${(b=gc[Ru])!=null?b:Ru}</mo>`),a.body&&(Hi+=zs(a.body,y));const Ou=Iu.matchingRightDelim();Ou&&Ou!=="."&&(Hi+=`<mo${tl(a.id,y)}>${(E=gc[Ou])!=null?E:Ou}</mo>`),Hi+="</mrow>";break;case"sizeddelim":case"delim":Hi+=`<mo${tl(a.id,y)}>${gc[a.value]||a.value}</mo>`;break;case"accent":Hi+='<mover accent="true"'+tl(a.id,y)+">",Hi+=zs(a.body,y),Hi+="<mo>"+(Du[Zl]||a.accent)+"</mo>",Hi+="</mover>";break;case"line":case"overlap":break;case"overunder":Zc=a.above,ou=a.below,(a.svgAbove||Zc)&&(a.svgBelow||ou)?nl=a.body:Zc&&Zc.length>0?(nl=a.body,(ue=(ne=a.body)==null?void 0:ne[0])!=null&&ue.below?(ou=a.body[0].below,nl=a.body[0].body):((je=(xe=a.body)==null?void 0:xe[0])==null?void 0:je.type)==="first"&&((Je=(Ue=a.body)==null?void 0:Ue[1])!=null&&Je.below)&&(ou=a.body[1].below,nl=a.body[1].body)):ou&&ou.length>0&&(nl=a.body,(Mt=(st=a.body)==null?void 0:st[0])!=null&&Mt.above?(Zc=a.body[0].above,nl=a.body[0].body):((un=(Gt=a.body)==null?void 0:Gt[0])==null?void 0:un.type)==="first"&&((Sr=(Cn=a.body)==null?void 0:Cn[1])!=null&&Sr.above)&&(Zc=a.body[1].overscript,nl=a.body[1].body)),(a.svgAbove||Zc)&&(a.svgBelow||ou)?(Hi+=`<munderover ${tl(a.id,y)}>`,Hi+=(xi=ws[a.svgBody])!=null?xi:zs(nl,y),Hi+=(gr=ws[a.svgBelow])!=null?gr:zs(ou,y),Hi+=(Yr=ws[a.svgAbove])!=null?Yr:zs(Zc,y),Hi+="</munderover>"):a.svgAbove||Zc?(Hi+=`<mover ${tl(a.id,y)}>`+((Ti=ws[a.svgBody])!=null?Ti:zs(nl,y)),Hi+=(ri=ws[a.svgAbove])!=null?ri:zs(Zc,y),Hi+="</mover>"):(a.svgBelow||ou)&&(Hi+=`<munder ${tl(a.id,y)}>`+((wo=ws[a.svgBody])!=null?wo:zs(nl,y)),Hi+=(ta=ws[a.svgBelow])!=null?ta:zs(ou,y),Hi+="</munder>");break;case"placeholder":Hi+="?";break;case"mord":{Hi=typeof a.value=="string"?a.value:Zl,Zl==="\\char"?Hi="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Hi.length>0&&Hi.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Hi="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Hi=a.value.charAt(0):(console.error("Did not expect this"),Hi=""));const Su=/\d/.test(Hi)?"mn":"mi";Hi=`<${Su}${tl(a.id,y)}>${sh(Hi)}</${Su}>`;break}case"mbin":case"mrel":case"minner":Hi=kd(a,y);break;case"mpunct":Hi='<mo separator="true"'+tl(a.id,y)+">"+Zl+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Hi="<mo"+tl(a.id,y)+">",Hi+=Zl==="\\operatorname"?a.body:Zl||a.body,Hi+="</mo>");break;case"box":Hi='<menclose notation="box"',a.backgroundcolor&&(Hi+=' mathbackground="'+a.backgroundcolor+'"'),Hi+=tl(a.id,y)+">"+zs(a.body,y)+"</menclose>";break;case"spacing":Hi+='<mspace width="'+((jo=Xs[Zl])!=null?jo:0)+'em"/>';break;case"enclose":Hi='<menclose notation="';for(const Su in a.notation)Object.prototype.hasOwnProperty.call(a.notation,Su)&&a.notation[Su]&&(Hi+=iu+Su,iu=" ");Hi+=tl(a.id,y)+'">'+zs(a.body,y)+"</menclose>";break;case"prompt":Hi='<menclose notation="roundexbox""">'+zs(a.body,y)+"</menclose>";break;case"space":Hi+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Hi+=kd(a,y);break;case"mclose":Hi+=kd(a,y);break;case"macro":{const Su=a.command+Yd(a.macroArgs);Su&&(Hi+=`<mo ${tl(a.id,y)}>${Su}</mo>`)}break;case"latexgroup":Hi+=zs(a.body,y);break;case"latex":Hi+="<mtext"+tl(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Hi+=zs(a.body,y);break;case"text":Hi+=`<mtext ${tl(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${tl(a.id,y)} displaystyle="true">${zs(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${tl(a.id,y)} displaystyle="false">${zs(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Hi}var Xd={"\\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"},Uh={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 Dg(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function _f(a){let y=0;if(me(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Ig(a){if(me(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function c0(a){let y="";if(me(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Rg(a){return a?a.map(y=>y.value).join(""):""}function ms(a,y){var b,E,ne,ue,xe;function je(st){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(st)?` <say-as interpret-as="character">${st}</say-as>`:/[A-Z]/.test(st)?`capital <say-as interpret-as="character">${st.toLowerCase()}</say-as>`:st:/[a-z]/.test(st)?" '"+st.toUpperCase()+"'":/[A-Z]/.test(st)?" 'capital "+st.toUpperCase()+"'":st}function Ue(st){return"<emphasis>"+st+"</emphasis>"}if(!y)return"";let Je="";if(me(y)){let st=!1,Mt=!1;for(let Gt=0;Gt<y.length;Gt++)y[Gt].type!=="first"&&(y[Gt].mode!=="text"&&(Mt=!1),Gt<y.length-2&&y[Gt].type==="mopen"&&y[Gt+2].type==="mclose"&&y[Gt+1].type==="mord"?(Je+=" of ",Je+=Ue(ms(a,y[Gt+1])),Gt+=2):y[Gt].mode==="text"?Mt?Je+=(b=y[Gt].value)!=null?b:" ":(Mt=!0,Je+=ms("text",y[Gt])):y[Gt].isDigit()?st?Je+=y[Gt].asDigit():(st=!0,Je+=ms(a,y[Gt])):(st=!1,Je+=ms(a,y[Gt])))}else if(y.mode==="text")y.id&&a==="math"&&(Je+='<mark name="'+y.id.toString()+'"/>'),Je+=y.value;else{y.id&&a==="math"&&(Je+='<mark name="'+y.id.toString()+'"/>');let st="",Mt="",Gt="",un=!1;const{command:Cn}=y;switch(Cn){case"\\vec":return"vector "+ms(a,y.body);case"\\acute":return ms(a,y.body)+" acute";case"\\grave":return ms(a,y.body)+" grave";case"\\dot":return"dot over"+ms(a,y.body);case"\\ddot":return"double dot over"+ms(a,y.body);case"\\mathring":return"ring over"+ms(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+ms(a,y.body);case"\\bar":return ms(a,y.body)+" bar";case"\\breve":return ms(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+ms(a,y.body);case"\\hat":case"\\widehat":return"hat over"+ms(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+ms(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+ms(a,y.body)}switch(y.type){case"prompt":const Sr=y.body.length>1?'start input . <break time="500ms"/> '+ms(a,y.body)+'. <break time="500ms"/> end input':"blank";Je+=' <break time="300ms"/> '+Sr+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const xi=y.array,gr=y.environmentName;if(Object.keys(Uh).includes(gr)){Je+=` begin ${Uh[gr]} `;for(let ri=0;ri<xi.length;ri++){ri>0&&(Je+=","),Je+=` row ${ri+1} `;for(let wo=0;wo<xi[ri].length;wo++)wo>0&&(Je+=","),Je+=` column ${wo+1}: `,Je+=ms("math",xi[ri][wo])}Je+=` end ${Uh[gr]} `}break;case"group":Cn==="\\ne"?Je+=" not equal ":(Cn==="\\not"&&(Je+=" not "),Je+=ms("math",y.body));break;case"root":Je+=ms("math",y.body);break;case"genfrac":if(st=ms("math",y.above),Mt=ms("math",y.below),_f(y.above)&&_f(y.below)){const wo={"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)];wo?Je=wo:Je+=st+" over "+Mt}else Je+=' the fraction <break time="150ms"/>'+st+' over <break time="150ms"/>'+Mt+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(Gt=ms("math",y.body),y.hasEmptyBranch("above"))Je+=_f(y.body)?" the square root of "+Gt+" , ":' the square root of <break time="200ms"/>'+Gt+'. <break time="200ms"/> End square root';else{let ri=ms("math",y.above);ri=ri.trim();const wo=ri.replace(/<mark([^/]*)\/>/g,"");wo==="3"?Je+=' the cube root of <break time="200ms"/>'+Gt+'. <break time="200ms"/> End cube root':wo==="n"?Je+=' the nth root of <break time="200ms"/>'+Gt+'. <break time="200ms"/> End root':Je+=' the root with index: <break time="200ms"/>'+ri+', of <break time="200ms"/>'+Gt+'. <break time="200ms"/> End root'}break;case"leftright":{const ri=y;Je+=(ne=ri.leftDelim?Xd[ri.leftDelim]:void 0)!=null?ne:ri.leftDelim,Je+=ms("math",y.body),Je+=(ue=ri.rightDelim?Xd[ri.rightDelim]:void 0)!=null?ue:ri.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const Yr=Cn.replace(/^\\/g,""),Ti=en()[Yr];Ti&&(Ti!=null&&Ti.expand?Je+=ms("math",y.body):Je+=`${Yr} `);break;case"placeholder":Je+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Cn==="\\mathbin"||Cn==="\\mathrel"||Cn==="\\mathopen"||Cn==="\\mathclose"||Cn==="\\mathpunct"||Cn==="\\mathord"||Cn==="\\mathinner"){Je=ms(a,y.body);break}let ri=y.isDigit()?y.asDigit():y.value,wo=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(wo=y.value,ri=wo),a==="text")Je+=ri;else{if(y.type==="mbin"&&(Je+='<break time="150ms"/>'),ri){const ta=Xd[ri]||(wo?Xd[wo.trim()]:"");if(ta)Je+=" "+ta;else{const jo=wo?Dg(wo.trim()):"";Je+=jo||je(ri)}}else Je+=ms("math",y.body);y.type==="mbin"&&(Je+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const ri=y.command;if(ri==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let wo=ms("math",y.superscript);wo=wo.trim();let ta=ms("math",y.subscript);ta=ta.trim(),Je+=' the summation from <break time="200ms"/>'+ta+'<break time="200ms"/> to <break time="200ms"/>'+wo+'<break time="200ms"/> of <break time="150ms"/>',un=!0}else if(y.hasEmptyBranch("subscript"))Je+=" the summation of";else{let wo=ms("math",y.subscript);wo=wo.trim(),Je+=' the summation from <break time="200ms"/>'+wo+'<break time="200ms"/> of <break time="150ms"/>',un=!0}else if(ri==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let wo=ms("math",y.superscript);wo=wo.trim();let ta=ms("math",y.subscript);ta=ta.trim(),Je+=' the product from <break time="200ms"/>'+ta+'<break time="200ms"/> to <break time="200ms"/>'+wo+'<break time="200ms"/> of <break time="150ms"/>',un=!0}else if(y.hasEmptyBranch("subscript"))Je+=" the product of ";else{let wo=ms("math",y.subscript);wo=wo.trim(),Je+=' the product from <break time="200ms"/>'+wo+'<break time="200ms"/> of <break time="150ms"/>',un=!0}else if(ri==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let wo=ms("math",y.superscript);wo=wo.trim();let ta=ms("math",y.subscript);ta=ta.trim(),Je+=' the integral from <break time="200ms"/>'+Ue(ta)+'<break time="200ms"/> to <break time="200ms"/>'+Ue(wo)+' <break time="200ms"/> of ',un=!0}else Je+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const wo=(xe=Xd[y.value])!=null?xe:y.command?Xd[y.command]:void 0;Je+=wo||" "+y.value}else y.command&&(y.command==="\\mathop"?Je+=ms("math",y.body):y.command==="\\operatorname"?Je+=Rg(y.body):Je+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":Gt=ms("math",y.body),Je+=" crossed out "+Gt+". End crossed out.";break;case"space":case"spacing":break}if(!un&&!y.hasEmptyBranch("superscript")){let Sr=ms(a,y.superscript);Sr=Sr.trim();const xi=Sr.replace(/<[^>]*>/g,"");if(_f(y.superscript)){if(a==="math"){const gr=Ig(y.superscript);gr&&(Je+='<mark name="'+gr+'"/>')}xi==="\u2032"?Je+=" prime ":xi==="2"?Je+=" squared ":xi==="3"?Je+=" cubed ":Number.isNaN(Number.parseInt(xi))?Je+=" to the "+Sr+"; ":Je+=' to the <say-as interpret-as="ordinal">'+xi+"</say-as> power; "}else Number.isNaN(Number.parseInt(xi))?Je+=" raised to the "+Sr+"; ":Je+=' raised to the <say-as interpret-as="ordinal">'+xi+"</say-as> power; "}if(!un&&!y.hasEmptyBranch("subscript")){let Sr=ms("math",y.subscript);Sr=Sr.trim(),Je+=_f(y.subscript)?" sub "+Sr:" subscript "+Sr+". End subscript. "}}return Je}function qd(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ne=zs(a);if(ne){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=re(le({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=re(le({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=re(le({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const ue=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&ue.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let xe="";try{xe=ue.toSpeech(ne)}catch(je){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",je)}return xe}return""}let E=ms("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let ne="";window.MathfieldElement.speechEngineRate&&(ne='<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>'+ne+"<p><s>"+E+"</s></p>"+(ne?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&ve()==="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"},wf={"\\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 Og(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 Wl(a){var y,b,E,ne,ue,xe,je,Ue,Je,st,Mt,Gt,un;if(!a)return"";if(me(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(Wl).join("");if(a[0].mode==="text"){let Ti=0,ri="";for(;((y=a[Ti])==null?void 0:y.mode)==="text";)ri+=a[Ti].body?Wl(a[Ti].body):a[Ti].value,Ti++;return`"${ri}" ${Wl(a.slice(Ti))}`}let gr=0;const Yr=[];for(;a[gr]&&a[gr].mode==="math";){let Ti="";for(;a[gr]&&a[gr].type==="mord"&&/\d/.test(a[gr].value);)Ti+=a[gr++].value;Ti?Yr.push(Ti):Yr.push(Wl(a[gr++]))}return Yr.push(Wl(a.slice(gr))),Og(Yr)}if(a.mode==="text")return`"${a.value}"`;let Cn="";const{command:Sr}=a;let xi;if(Sr==="\\placeholder")return`(${Wl(a.body)})`;switch(a.type){case"accent":const gr={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Sr];Cn=`${gr!=null?gr:""} ${Wl(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(jo=>jo.value).join("");case"group":case"root":Cn=(b=Cf[Sr])!=null?b:Wl(a.body);break;case"genfrac":{const jo=a;(jo.leftDelim||jo.rightDelim)&&(Cn=jo.leftDelim==="."||!jo.leftDelim?"{:":jo.leftDelim),jo.hasBarLine?(Cn+="(",Cn+=Wl(jo.above),Cn+=")/(",Cn+=Wl(jo.below),Cn+=")"):(Cn+="("+Wl(jo.above)+"),",Cn+="("+Wl(jo.below)+")"),(jo.leftDelim||jo.rightDelim)&&(Cn+=jo.rightDelim==="."||!jo.rightDelim?"{:":jo.rightDelim)}break;case"surd":Cn+=a.hasEmptyBranch("above")?"sqrt("+Wl(a.body)+")":"root("+Wl(a.above)+")("+Wl(a.body)+")";break;case"latex":Cn=a.value;break;case"leftright":{const jo=a,ws=jo.leftDelim;Cn+=ws==="."||!ws?"{:":ws,Cn+=Wl(jo.body);const Xs=jo.matchingRightDelim();Cn+=Xs==="."||!Xs?":}":Xs}break;case"sizeddelim":case"delim":Cn=a.value;break;case"overlap":break;case"overunder":break;case"mord":Cn=(ne=(E=Cf[Sr])!=null?E:Sr)!=null?ne:typeof a.value=="string"?a.value:"",Cn.startsWith("\\")&&(Cn+=" "),xi=Sr?Sr.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,xi?Cn=String.fromCodePoint(Number.parseInt("0x"+xi[1])):Cn.length>0&&Cn.startsWith("\\")&&(Cn=typeof a.value=="string"?a.value.charAt(0):a.command),Cn=Ng(Cn,a.style);break;case"mbin":case"mrel":case"minner":Cn=(xe=(ue=Cf[Sr])!=null?ue:wf[Sr])!=null?xe:a.value;break;case"mopen":case"mclose":Cn=a.value;break;case"mpunct":Cn=(je=wf[Sr])!=null?je:Sr;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(wf[Sr]?Cn=wf[Sr]:Cn=Sr==="\\operatorname"?Wl(a.body):(Ue=a.value)!=null?Ue:Sr,Cn+=" ");break;case"array":const Yr=a.array,Ti=a.environmentName,ri=(Je={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Ti])!=null?Je:["(",")"],wo=[];for(const jo of Yr){const ws=[];for(const Xs of jo)ws.push(ri[0]+Wl(Xs)+ri[1]);wo.push(ws.join(","))}const ta=(st={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Ti])!=null?st:["(",")"];Cn=ta[0]+wo.join(",")+ta[1];break;case"box":break;case"spacing":Cn=(Mt=Cf[Sr])!=null?Mt:" ";break;case"enclose":Cn="("+Wl(a.body)+")";break;case"space":Cn=" ";break;case"subsup":Cn="";break;case"macro":Cn=(un=(Gt=Cf[Sr])!=null?Gt:wf[Sr])!=null?un:Wl(a.body);break}if(!a.hasEmptyBranch("subscript")){Cn+="_";const gr=Wl(a.subscript);Cn+=gr.length!==1?`(${gr})`:gr}if(!a.hasEmptyBranch("superscript")){Cn+="^";const gr=Wl(a.superscript);Cn+=gr.length!==1?`(${gr})`:gr}return Cn}function Ng(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 mc(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ne=new $o({from:re(le({},rs()),{renderPlaceholder:()=>new Xr(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),xe=new wr({mode:"math",type:"root",body:pc(a,{context:ne,parseMode:"math",mathstyle:y.mathstyle})}).render(ne);return xe?(sl(lf(xe,ne)),ec(xe,{classes:"ML__latex"}).toMarkup()):""}function L1(a){return tp(a,{context:rs()})}function Pg(a,y={}){return zs(pc(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function Bg(a){const y=pc(a,{parseMode:"math",mathstyle:"displaystyle"});return qd(y)}var lh;function Fg(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 k1(a,y="math"){return Wl(new wr({type:"root",body:pc(a,{parseMode:y})}))}function A1(a){return xu(a,{format:"ascii-math"})[1]}function Wh(a){if(typeof a=="string"){const y=zg(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Hg(a):"a"in a?u0(a):a}function Jd(a){return a<0?0:a>255?255:Math.round(a)}function zg(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 Zh(a){const[y,b,E]=[a.L,a.C,a.H],ne=E*Math.PI/180,ue={L:y,a:b*Math.cos(ne),b:b*Math.sin(ne)};return a.alpha!==void 0&&(ue.alpha=a.alpha),ue}function $g(a){const[y,b,E]=[a.L,a.a,a.b],ne=Math.sqrt(b*b+E*E),xe=Math.atan2(E,b)*180/Math.PI,je={L:y,C:ne,H:xe};return a.alpha!==void 0&&(je.alpha=a.alpha),je}function Vh(a){const[y,b,E]=[a.L,a.a,a.b],ne=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),ue=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),xe=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),je=4.076741661347994*ne-3.307711590408193*ue+.230969928729428*xe,Ue=-1.2684380040921763*ne+2.6097574006633715*ue-.3413193963102197*xe,Je=-.004196086541837188*ne-.7034186144594493*ue+1.7076147009309444*xe,st=Mt=>{const Gt=Math.abs(Mt);return Gt<=.0031308?Mt*12.92:(Math.sign(Mt)||1)*(1.055*Math.pow(Gt,1/2.4)-.055)};return[st(je),st(Ue),st(Je)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Yh(a,y){let[b,E,ne]=a;return b=Jd(b*255),E=Jd(E*255),ne=Jd(ne*255),y!==void 0?{r:b,g:E,b:ne,alpha:y}:{r:b,g:E,b:ne}}function u0(a){let[y,b,E]=Vh(a);if(Gh([y,b,E]))return Yh([y,b,E],a.alpha);const ne=$g(a);if(ne.C=0,[y,b,E]=Vh(Zh(ne)),!Gh([y,b,E]))return Yh([y,b,E],a.alpha);let ue=0,xe=a.L,je=(ue+xe)/2;ne.C=je;const Ue=.36/Math.pow(2,12);for(;xe-ue>Ue;)je=(ue+xe)/2,ne.C=je,[y,b,E]=Vh(Zh(ne)),Gh([y,b,E])?ue=je:xe=je;return Yh([y,b,E],a.alpha)}function Hg(a){return u0(Zh(a))}function d0(a,y){const b=Wh(a),E=Wh(y),ne=.56,ue=.57,xe=.62,je=.65,Ue=.022,Je=1.414,st=.1,Mt=5e-4,Gt=1.14,un=.027,Cn=1.14,Sr=.027;function xi(jo){return jo>=Ue?jo:jo+Nu(Ue-jo,Je)}function gr(jo){return(jo<0?-1:1)*Math.pow(Math.abs(jo),2.4)}const Yr=xi(gr(E.r/255)*.2126729+gr(E.g/255)*.7151522+gr(E.b/255)*.072175),Ti=xi(gr(b.r/255)*.2126729+gr(b.g/255)*.7151522+gr(b.b/255)*.072175);let ri,wo,ta;return Math.abs(Ti-Yr)<Mt?wo=0:Ti>Yr?(ri=Nu(Ti,ne)-Nu(Yr,ue),wo=ri*Gt):(ri=Nu(Ti,je)-Nu(Yr,xe),wo=ri*Cn),Math.abs(wo)<st?ta=0:wo>0?ta=wo-Sr:ta=wo+un,ta*100}function f0(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=d0(a,b),ne=d0(a,y);return Math.abs(E)>Math.abs(ne)?b:y}function jg(a){const y=Wh(a);let b=((1<<24)+(Jd(y.r)<<16)+(Jd(y.g)<<8)+Jd(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 yl(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 Kg(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 Ug(a,y){return yl(a).length>0}function Wg(a){return[Xh(a,"double-struck","mathbb","tooltip.blackboard"),Xh(a,"fraktur","mathfrak","tooltip.fraktur"),Xh(a,"calligraphic","mathcal","tooltip.caligraphic"),qh(a,"up","mathrm","tooltip.roman-upright"),qh(a,"bold","mathbf","tooltip.bold"),qh(a,"italic","mathit","tooltip.italic")]}function Zg(a){return[{label:()=>mc(`\\vec{${yl(a)}}`),visible:()=>yl(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>mc(`\\overrightarrow{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>mc(`\\overleftarrow{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>mc(`\\dot{${yl(a)}}`),visible:()=>yl(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>mc(`\\ddot{${yl(a)}}`),visible:()=>yl(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>mc(`\\bar{${yl(a)}}`),visible:()=>yl(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>mc(`\\overline{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>mc(`\\overgroup{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>mc(`\\overbrace{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>mc(`\\underline{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>mc(`\\undergroup{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>mc(`\\underbrace{${yl(a)}}`),visible:()=>yl(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vg(a){return[{label:()=>mc(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>mc(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>mc(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gg(a){const y=[];for(const b of Object.keys(Re))y.push({class:(jg(f0(Re[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Re[b]} "></span>`,ariaLabel:()=>{var E;return(E=ze(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 Yg(a){const y=[];for(const b of Object.keys(De))y.push({class:(f0(De[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${De[b]} "></span>`,ariaLabel:()=>{var E;return(E=ze(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 Xg=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 qg(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ne,ue)=>new Xg(ne,ue,b,E),label:"\u2610",tooltip:()=>ze("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 Jg(a){return[{label:()=>ze("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Ad(a)},{label:()=>ze("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Ad(a)},{label:()=>ze("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Ad(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>ze("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Ad(a)},{type:"divider"},{label:()=>ze("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Ad(a)},{label:()=>ze("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Ad(a)},{type:"divider"},{label:()=>ze("menu.borders"),visible:()=>(Qg(a)||Ad(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>Ef(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>Ef(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>Ef(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>Ef(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>Ef(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ze("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:qg(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ze("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ze("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Hd(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ze("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Hd(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ze("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ze("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:Wg(a),submenuClass:"variant-submenu"},{label:()=>ze("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Yg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ze("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gg(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ze("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Zg(a),submenuClass:"variant-submenu"},{label:()=>ze("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&yl(a).length>0,submenu:Vg(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ze("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=t1(a);if(!y){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${y}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(y,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>ze("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?ze("menu.solve-for",mc(b)):ze("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],ne=(y=b.solve(E))==null?void 0:y.map(ue=>{var xe;return(xe=ue.simplify().latex)!=null?xe:""});if(!ne){a.model.announce("plonk");return}a.insert(`${E}=${ne.length===1?ne[0]:"\\left\\lbrace"+(ne==null?void 0:ne.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>ze("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ze("menu.copy"),id:"copy",submenu:[{label:()=>ze("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Aa.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ze("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Aa.copyToClipboard(a,"ascii-math")},{label:()=>ze("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Aa.copyToClipboard(a,"math-ml")}]},{label:()=>ze("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ze("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Ad(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qg(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ne)=>Math.max(E,ne.length),0)]:[0,0]}function Ef(a,y){Nf(a),a.flushInlineShortcutBuffer(),Ip(a.model,y),zl(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ne=E.evaluate();return ne.isSame(E)&&(ne=E.N()),ne.latex}function Xh(a,y,b,E){return{label:()=>mc(`\\${b}{${yl(a)}}`),tooltip:()=>{var ne;return(ne=ze(E))!=null?ne:E},visible:()=>Kg(a,y),checked:()=>{var ne;return{some:"mixed",all:!0}[(ne=a.queryStyle({variant:y}))!=null?ne:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function qh(a,y,b,E){return{label:()=>mc(`\\${b}{${yl(a)}}`),tooltip:()=>{var ne;return(ne=ze(E))!=null?ne:E},visible:()=>Ug(a,y),checked:()=>{var ne;return{some:"mixed",all:!0}[(ne=a.queryStyle({variantStyle:y}))!=null?ne:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Qd(a,y){return a+qd(y)}qc({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ne;b=b!=null?b:{withHighlighting:!1};const{model:ue}=a;function xe(st){let Mt=null;switch(st){case"all":Mt=ue.root;break;case"selection":Mt=ue.getAtoms(ue.selection);break;case"left":{Mt=ue.getAtoms(ue.offsetOf(ue.at(ue.position).leftSibling),ue.position);break}case"right":{Mt=ue.getAtoms(ue.position,ue.offsetOf(ue.at(ue.position).rightSibling));break}case"group":Mt=ue.getAtoms(ue.getSiblingsRange(ue.position));break;case"parent":{const{parent:Gt}=ue.at(ue.position);Gt!=null&&Gt.parent?Mt=Gt:Mt=ue.root;break}default:Mt=ue.root}return Mt}function je(st){let Mt="";switch(st){case"all":console.log("Internal failure: speak all failed");break;case"selection":Mt="no selection";break;case"left":Mt="at start";break;case"right":Mt="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Mt="no parent";break;default:console.log('unknown speak_ param value: "'+st+'"');break}return Mt}const Ue=xe(y);if(Ue===null)return(ne=(E=window.MathfieldElement).speakHook)==null||ne.call(E,je(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const Je=qd(Ue);return ye()&&b.withHighlighting?(ld().readAloudMathfield=a,Sd(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,Je)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(Je),!1}function r1(a){var y,b;if(!ye()){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"}),ne={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(ne,(ue,xe)=>{if(ue)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${ue}`);else if(xe!=null&&xe.AudioStream){const je=new Uint8Array(xe.AudioStream),Ue=new Blob([je.buffer],{type:"audio/mpeg"}),Je=URL.createObjectURL(Ue);new Audio(Je).play().catch(Mt=>console.log(Mt))}else console.log("polly.synthesizeSpeech():",xe)})}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 i1(a,y,b,E){let ne="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ne=Qd("deleted: ",E);else if(y==="focus"||y.includes("move"))ne=o1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+a1(a.model);else if(y==="replacement")ne=Qd("",a.model.at(a.model.position));else if(y==="line"){const ue=Qd("",a.model.root);a.keyboardDelegate.setAriaLabel(ue)}else ne=E?Qd(y+" ",E):y;if(ne){const ue=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ne+ue}}function o1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ne=b.parent;const ue=a.at(a.position).parent;for(;ne!==a.root&&ne!==ue;)E+=`out of ${p0(ne)};`,ne=ne.parent;return E}function a1(a){if(!a.selectionIsCollapsed)return Qd("",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+=Qd("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ne={};if((y==null?void 0:y.type)==="undo"&&(ne={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ne={inputType:"historyRedo"}),this.contentWillChange(ne)){const ue=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=id(a.content),this.selection=a.selection,this.silenceNotifications=ue,this.contentDidChange(ne)}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,ne;const ue=this.normalizeSelection(a,y);if(ue===void 0)throw new TypeError("Invalid selection");if(ue.ranges.length===1&&ue.ranges[0][0]===ue.ranges[0][1]){const st=ue.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(st))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(st-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(st-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ne=this.at(st+1))!=null&&ne.parentPrompt){this._anchor=this.normalizeOffset(st+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=st,this._position=st,this._selection=ue;return}const xe=Pl(ue);ue.direction==="backward"?[this._position,this._anchor]=xe:[this._anchor,this._position]=xe;const je=this.at(xe[0]+1),Ue=this.at(xe[1]),Je=wr.commonAncestor(je,Ue);(Je==null?void 0:Je.type)==="array"&&je.parent===Je&&Ue.parent===Je?this._selection={ranges:[xe],direction:ue.direction}:this._selection={ranges:[xe],direction:ue.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 bc&&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(qu(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((Je,st)=>[...Je,...this.getAtoms(st,E)],[]);a=a.ranges[0]}let ne,ue;if(Dc(a)){if(ne=a,!Dc(y))return[];ue=y}else[ne,ue]=a,E=y!=null?y:{};if(!Number.isFinite(ne))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ne<0&&(ne=this.lastOffset-ne+1),ue<0&&(ue=this.lastOffset-ue+1);const xe=Math.min(ne,ue)+1,je=Math.max(ne,ue);if(!E.includeChildren&&xe===1&&je===this.lastOffset)return[this.root];let Ue=[];for(let Je=xe;Je<=je;Je++){const st=this.atoms[Je];m0(this,st,xe,je)&&Ue.push(st)}return E.includeChildren||(Ue=Ue.filter(Je=>{let st=!1,{parent:Mt}=Je;for(;Mt&&!st;)st=m0(this,Mt,xe,je),Mt=Mt.parent;return!st})),Ue}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 ne=this.lastOffset;if(b==="forward"){for(let ue=y;ue<=ne;ue++)if(E=this.atoms[ue],a(E))return E;for(let ue=0;ue<y;ue++)if(E=this.atoms[ue],a(E))return E;return}for(let ue=y;ue>=0;ue--)if(E=this.atoms[ue],a(E))return E;for(let ue=ne;ue>y;ue--)if(E=this.atoms[ue],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 wr({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 wr.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 zs(a);if(b==="spoken")return qd(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ne=qd(a);return window.MathfieldElement.textToSpeechMarkup=E,ne}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ne=qd(a);return window.MathfieldElement.textToSpeechMarkup=E,ne}return b==="ascii-math"?Wl(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,ne;if(Dc(a)&&Dc(y)?(E=[this.normalizeRange([a,y])],ne=b):Bu(a)?(E=[this.normalizeRange(a)],ne=y):qu(a)?(E=a.ranges,ne=y):(E=[this.normalizeRange([0,-1])],ne=a),ne!=null||(ne="latex"),ne==="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 ue=this.getValue({ranges:E},"latex-unstyled");try{const xe=window.MathfieldElement.computeEngine.parse(ue);return JSON.stringify(xe.json)}catch(xe){return JSON.stringify(["Error",`'${xe.toString()}'`])}}if(ne.startsWith("latex")){const ue={expandMacro:ne==="latex-expanded",skipStyles:ne==="latex-unstyled",skipPlaceholders:ne==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ga(E.map(xe=>wr.serialize(this.getAtoms(xe),ue)))}return E.map(ue=>this.getAtoms(ue).map(xe=>this.atomToString(xe,ne)).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,ne]=b,{parent:ue}=this.at(ne);if(ue&&(ue.type==="genfrac"||ue.type==="subsup"))for(;ue!==this.root&&Jh(this,ue,[E,ne]);)ne=this.offsetOf(ue),ue=ue.parent;for(ue=this.at(E).parent;ue!==this.root&&Jh(this,ue,[E,ne]);)E=this.offsetOf(ue.leftSibling),ue=ue.parent;if(ue=this.at(ne).parent,(ue==null?void 0:ue.type)==="genfrac")for(;ue!==this.root&&Jh(this,ue,[E,ne]);)ne=this.offsetOf(ue),console.assert(ne>=0),ue=ue.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ne]],direction:"none"}})}announce(a,y,b=[]){var E,ne;((ne=(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?ne:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ne=this._position,ue=this.silenceNotifications;this.silenceNotifications=!0;const xe=this.root.changeCounter;y();const je=this.root.changeCounter!==xe,Ue=E!==this._anchor||ne!==this._position||Pu(this._selection,b)==="different";return this.silenceNotifications=ue,a.content&&je&&this.contentDidChange({inputType:a.type}),a.selection&&Ue&&this.selectionDidChange(),je||Ue}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(Dc(a)){const ne=this.normalizeOffset(a);if(Dc(y)){const ue=this.normalizeOffset(y);E=ne<=ue?{ranges:[[ne,ue]],direction:"none"}:{ranges:[[ue,ne]],direction:"backward"}}else E={ranges:[[ne,ne]],direction:"none"}}else if(Bu(a)){const ne=this.normalizeOffset(a[0]),ue=this.normalizeOffset(a[1]);E=ne<=ue?{ranges:[[ne,ue]],direction:"none"}:{ranges:[[ue,ne]],direction:"backward"}}else qu(a)&&(E={ranges:a.ranges.map(ne=>this.normalizeRange(ne)),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(Lu(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",re(le({},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(Lu(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 ne=a.offsetOf(y);if(ne<b||ne>E)return!1;if(!y.hasChildren)return!0;const ue=a.offsetOf(y.firstChild);if(ue>=b&&ue<=E){const xe=a.offsetOf(y.lastChild);if(xe>=b&&xe<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ne]=b,ue=a.offsetOf(y.firstChild),xe=a.offsetOf(y.lastChild);return ue>=E&&ue<=ne&&xe>=ue&&xe<=ne}function Mf(a,y,b,E){var ne,ue,xe,je,Ue,Je;const st=b.parent;if(st&&b instanceof Fs){const Mt=!E&&y==="forward"||E==="body"&&y==="backward";let Gt=Mt?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Mt?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(st.addChildrenAfter(b.removeBranch("body"),b),st.removeChild(b),Gt--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(st.addChildrenAfter(b.removeBranch("body"),b),st.removeChild(b),Gt--),a.position=Gt,!0}if(st&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Mt=b.leftSibling;b.hasChildren&&st.addChildrenAfter(b.removeBranch("body"),b),st.removeChild(b),a.position=a.offsetOf(Mt)}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),st.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(st&&(b.type==="box"||b.type==="enclose")){const Mt=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return st.addChildrenAfter(b.removeBranch("body"),b),st.removeChild(b),a.position=a.offsetOf(Mt),!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 Mt=Lf.fractionNavigationOrder==="numerator-denominator"?"above":"below",Gt=Mt==="above"?"below":"above";if(st&&(y==="forward"&&E===Mt||y==="backward"&&E===Gt)){const un=b.removeBranch(Mt),Cn=b.removeBranch(Gt);return st.addChildrenAfter([...un,...Cn],b),st.removeChild(b),a.position=a.offsetOf(un.length>0?un[un.length-1]:Cn[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 Mt=y==="forward"?(xe=(ne=b.superscript)==null?void 0:ne[0])!=null?xe:(ue=b.subscript)==null?void 0:ue[0]:(Je=(je=b.subscript)==null?void 0:je[0].lastSibling)!=null?Je:(Ue=b.superscript)==null?void 0:Ue[0].lastSibling;return Mt&&(a.position=a.offsetOf(Mt)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Mt=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Mt,!0}if(E==="superscript")if(y==="backward"){const Mt=a.offsetOf(b.firstChild)-1;console.assert(Mt>=0),a.position=Mt}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 Mt=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Mt}return!0}if((st==null?void 0:st.type)==="genfrac"&&!E&&b.type!=="first"){let Mt=a.offsetOf(b.leftSibling);return st.removeChild(b),st.hasEmptyBranch("above")&&st.hasEmptyBranch("below")?(Mt=a.offsetOf(st.leftSibling),st.parent.removeChild(st),a.announce("delete",void 0,[st]),a.position=Mt,!0):(a.announce("delete",void 0,[b]),a.position=Mt,!0)}if(y==="backward"&&((st==null?void 0:st.command)==="\\ln"||(st==null?void 0:st.command)==="\\log")&&b.parentBranch!=="body"){const Mt=a.offsetOf(st.leftSibling);return st.parent.removeChild(st),a.announce("delete",void 0,[st]),a.position=Mt,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let y=a.at(a.position);if(!(y&&Mf(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Mf(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])}}):Au(a,Pl(a.selection),"deleteContentBackward")}function c1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Mf(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Mf(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Mf(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 ne=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ne==null?void 0:ne.type)==="subsup";)ne.parent.removeChild(ne),ne=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):Au(a,Pl(a.selection),"deleteContentForward")}function Au(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let ne=E[0].parent.firstChild;ne.type==="first"&&(ne=ne.rightSibling);const ue=E[E.length-1].parent.lastChild;let xe=E[0];xe.type==="first"&&(xe=xe.rightSibling);const je=E[E.length-1];if(xe===ne&&je===ue){const Ue=E[0].parent;Ue.parent&&Ue.type!=="prompt"&&(y=[a.offsetOf(Ue.leftSibling),a.offsetOf(Ue)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const Ue=E[0].parent,Je=E[0].parentBranch==="below"?"above":"below",st=a.offsetOf(Ue.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Mt,Gt;const un=Ue.removeBranch(Je);if(un.length===1&&un[0].type==="placeholder")(Gt=Ue.parent)==null||Gt.removeChild(Ue),a.position=Math.max(0,st);else{const Cn=Ue.parent.addChildrenAfter(un,Ue);(Mt=Ue.parent)==null||Mt.removeChild(Ue),a.position=a.offsetOf(Cn)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}qc({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&Au(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&Au(a,[a.anchor,Lh(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&Au(a,[a.anchor,Lh(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&Au(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&Au(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&Au(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&Au(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var u1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ze("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,d1=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${ze("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ne;this.options=le(re(le({},Zf()),{macros:en(),registers:lu()}),Wf(y)),this.eventController=new AbortController;const ue=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 xe=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";xe=xe.trim();const je=Ap(this.options),Ue=new wr({type:"root",mode:je,body:pc(xe,{context:this.context})});this.model=new s1(this,je,Ue),this.undoManager=new Bv(this.model);const Je=[];if(Je.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>"),Je.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),Je.push("<span part=content class=ML__content>"),Je.push(xp(this)),Je.push("</span>"),window.mathVirtualKeyboard&&(Je.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">`),Je.push(u1),Je.push("</div>")),Je.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),Je.push(d1),Je.push("</div>"),Je.push("</span>"),Je.push("<span class=ML__sr-only>"),Je.push("<span role=status aria-live=assertive aria-atomic=true></span>"),Je.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(Je.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=Te.subscribe(()=>Te.update(this.element)),Te.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Mt=>Mt.stopImmediatePropagation(),{capture:!1,signal:ue}),this.field.addEventListener("wheel",this,{passive:!1,signal:ue}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:ue}):this.field.addEventListener("mousedown",this,{signal:ue}),(ne=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ne.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Lu(this)))},{signal:ue}),this._menu=new _g(Jg(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:ue});const st=this.element.querySelector("[part=menu-toggle]");st==null||st.addEventListener("pointerdown",Mt=>{if(Mt.currentTarget!==st||this._menu.state!=="closed")return;this.element.classList.add("tracking");const Gt=st.getBoundingClientRect();this._menu.modifiers=bd(Mt),this._menu.show({target:st,location:{x:Gt.left,y:Gt.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Mt.preventDefault(),Mt.stopPropagation()},{signal:ue}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(st.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=jm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:ue}),document.addEventListener("scroll",this,{signal:ue}),this.resizeObserver=new ResizeObserver(()=>zl(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:ue}),df&&!Te.locale.startsWith(df.locale)&&Fm(Te.locale),ru!=="ready"&&document.fonts.ready.then(()=>$f(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(Lu(this)),ih(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Fh())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:eu(this.field))!=null?b:void 0,ne=a==null?void 0:a.modifiers,ue=this.element.querySelector("[part=container]");return this._menu.show({target:ue,location:E,modifiers:ne})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:dt(a)}}get backgroundColorMap(){return a=>{var y,b,E,ne,ue,xe;return(xe=(ue=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?ue:(ne=(E=this.options).colorMap)==null?void 0:ne.call(E,a))!=null?xe:Ke(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=wr.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=le({},a[0].style);for(const b of a)for(const[E,ne]of Object.entries(b.style))y[E]!==ne&&delete y[E];return y}queryStyle(a){const y=Rh(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 Ue of Object.keys(y)){const Je=this.queryStyle({[Ue]:y[Ue]});if(Je==="none")return"none";if(Je==="some")return"some"}return"all"}const E=Object.keys(y)[0],ne=y[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===ne?"all":"none";const ue=this.model.getAtoms(this.model.selection,{includeChildren:!0});let xe=ue.length;if(xe===0)return"none";let je=0;for(const Ue of ue){if(Ue.type==="first"){xe-=1;continue}Ue.style[E]===ne&&(je+=1)}return je===0?"none":je===xe?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=ff())!=null?a:zm());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=le(le({},this.options),Wf(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=wr.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&Aa.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)&&zl(this)}getOptions(a){return _d(this.options,a)}getOption(a){return _d(this.options,a)}handleEvent(a){return cd(this,null,function*(){var y;if(Fc(this)){if(Ch(a)){if(!Zs(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"&&Up(this,a);break;case"pointerdown":this.userSelect!=="none"&&(Up(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(()=>Fc(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Fc(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Fc(this))return;Te.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,Gv(),Qm(),mg()}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(Lu(this))),!1):av(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=Id(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();Aa.insert(this.model,a,y)&&(zl(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,ne=this.host.getBoundingClientRect();ne.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ne.bottom-E.top+8))}}this.dirty&&Sd(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=eu(this.field);else{const E=_s(this);if(E.length>0){let ne=-1/0,ue=-1/0;for(const xe of E)xe.right>ne&&(ne=xe.right),xe.top<ue&&(ue=xe.top);b={x:ne+y.left-this.field.scrollLeft,y:ue+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ne=b.y;let ue=this.host.scrollTop;ne<E.top?ue=ne-E.top+this.host.scrollTop:ne>E.bottom&&(ue=ne-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:ue,left:0})}if(b){const E=b.x-window.scrollX;let ne=this.field.scrollLeft;E<y.left?ne=E-y.left+this.field.scrollLeft-20:E>y.right&&(ne=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ne})}}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&&Me()&&navigator.vibrate(_p),window.MathfieldElement.playSound("keypress")),a==="\\\\"?Tp(this.model):a==="&"?Dp(this.model):this.model.selectionIsCollapsed?Aa.insert(this.model,a,le({style:this.model.at(this.model.position).computedStyle},y)):Aa.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),zl(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 ne=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=ne;return}const ue=this.model.mode,{model:xe}=this;xe.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let je=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const Ue=pc(y,{context:this.context,parseMode:a});xe.collapseSelection("forward");const Je=xe.at(xe.position);xe.position=xe.offsetOf(Je.parent.addChildrenAfter(Ue,Je)),je=!0}if(this.model.mode=a,a==="latex"){let Ue=xe.selectionIsCollapsed;Hd(this,"accept");let Je,st=xe.at(xe.position);if(Ue)Je="\\";else{const Gt=Pl(xe.selection);Je=this.model.getValue(Gt,"latex");const un=this.model.extractAtoms(Gt);un.length===1&&un[0].type==="placeholder"&&(Je=y,Ue=!0),st=xe.at(Gt[0])}const Mt=new of(Je);st.parent.addChildAfter(Mt,st),Ue?xe.position=xe.offsetOf(Mt.lastChild):xe.setSelection(xe.offsetOf(Mt.firstChild),xe.offsetOf(Mt.lastChild))}else hf(xe).forEach(Ue=>{Ue.isError=!1});if(b){const Ue=pc(b,{context:this.context,parseMode:ue});xe.collapseSelection("forward");const Je=xe.at(xe.position);xe.position=xe.offsetOf(Je.parent.addChildrenAfter(Ue,Je)),je=!0}return zl(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),je}),this.model.mode=a,window.mathVirtualKeyboard.update(Lu(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 ne={operation:"set",silenceNotifications:!1};Bu(y)?ne.range=y:(y.operation==="toggle"&&(ne.operation="toggle"),ne.range=y.range,ne.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const ue=Rh(this,a),xe=(E=ne.operation)!=null?E:"set";if(ne.range===void 0&&this.model.selectionIsCollapsed){if(xe==="set"){this.defaultStyle=le(le({},this.defaultStyle),ue);return}const je=le({},this.defaultStyle);for(const Ue of Object.keys(ue))je[Ue]===ue[Ue]?(Ue==="color"&&delete je.verbatimColor,Ue==="backgroundColor"&&delete je.verbatimBackgroundColor,delete je[Ue]):je[Ue]=ue[Ue];this.defaultStyle=je;return}this.model.deferNotifications({content:!ne.silenceNotifications,type:"insertText"},()=>{if(ne.range===void 0)for(const je of this.model.selection.ranges)Eh(this.model,je,ue,{operation:xe});else Eh(this.model,ne.range,ue,{operation:xe})}),zl(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=eu(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=xf(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),zl(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),ne=this.model.offsetOf(b.lastChild);return this.model.getValue(E,ne,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 ne=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(ne),this.insert(y,re(le({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),zl(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),zl(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(Lu(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(Lu(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(Lu(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),ne=(a=E.mode)!=null?a:Ap(this.options);this.model.mode!==ne&&(this.model.mode==="latex"?(Hd(this,"accept",{mode:ne}),b.position=b.offsetOf(E)):this.switchMode(ne))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Lu(this)),ih(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",re(le({},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(),Sd(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="",jd(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})),zl(this),this.focusBlurInProgress=!1,Fh();const E=new AbortController,ne=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Fc(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ne})},{once:!0,signal:ne}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return Hp(this,a)}onCompositionStart(a){this.model.deleteAtoms(Pl(this.model.selection));const y=eu(this.field);y&&requestAnimationFrame(()=>{Sd(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){kv(this.model,a),zl(this)}onCompositionEnd(a){Av(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),Aa.onCopy(this,a),Au(this.model,Pl(this.model.selection),"deleteByCut"),this.snapshot("cut"),zl(this))}onCopy(a){Aa.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=Aa.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(),Bf(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=>ti(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function v0(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)v0(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!ye())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"}),ne={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};ld().readAloudElement=a,E.synthesizeSpeech(ne,(ue,xe)=>{if(ue){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${ue}`);return}if(!(xe!=null&&xe.AudioStream)){console.log("polly.synthesizeSpeech():",xe);return}const je=new TextDecoder("utf-8").decode(new Uint8Array(xe.AudioStream));ld().readAloudMarks=je.split(`
|
|
|
`).map(Ue=>Ue?JSON.parse(Ue):{}),ld().readAloudTokens=[];for(const Ue of ld().readAloudMarks)Ue.value&&ld().readAloudTokens.push(Ue.value);ld().readAloudCurrentMark="",ne.OutputFormat="mp3",ne.SpeechMarkTypes=[],E.synthesizeSpeech(ne,(Ue,Je)=>{if(Ue){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${Ue}`);return}if(!(Je!=null&&Je.AudioStream))return;const st=new Uint8Array(Je.AudioStream),Mt=new Blob([st.buffer],{type:"audio/mpeg"}),Gt=URL.createObjectURL(Mt),un=ld();un.readAloudAudio?un.readAloudAudio.pause():(un.readAloudAudio=new Audio,un.readAloudAudio.addEventListener("ended",()=>{const Cn=un.readAloudMathfield;un.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Cn?(Sd(Cn),un.readAloudElement=null,un.readAloudMathfield=null,un.readAloudTokens=[],un.readAloudMarks=[],un.readAloudCurrentMark=""):v0(un.readAloudElement)}),un.readAloudAudio.addEventListener("timeupdate",()=>{let Cn="";const Sr=un.readAloudAudio.currentTime*1e3+100;for(const xi of un.readAloudMarks)xi.time<Sr&&(Cn=xi.value);un.readAloudCurrentMark!==Cn&&(un.readAloudCurrentToken=Cn,Cn&&Cn===un.readAloudFinalToken?un.readAloudAudio.pause():(un.readAloudCurrentMark=Cn,Qh(un.readAloudElement,un.readAloudCurrentMark)))})),un.readAloudAudio.src=Gt,un.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),un.readAloudAudio.play()})})}ye()||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 Is=new WeakMap,p1=.5,sd={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 = ..."},Sc=class Td extends HTMLElement{static get formAssociated(){return ef()}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,nv())}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,ne;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:(ne=y.delete)!=null?ne: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 Te.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),Te.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 Te.strings}static set strings(y){Te.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 cd(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 ue=yield(yield fetch(yield Sp(`${E}/${b}`))).arrayBuffer(),xe=yield this.audioContext.decodeAudioData(ue);this.audioBuffers[y]=xe}catch(ne){}})}static playSound(y){return cd(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(sd[E])if(sd[E].startsWith("mf."))if(sd[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${sd[E]}`);else{const ne=sd[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ne[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${sd[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(ef()&&(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=[rd("core"),rd("mathfield"),rd("mathfield-element"),rd("ui"),rd("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>"+ju("core")+ju("mathfield")+ju("mathfield-element")+ju("ui")+ju("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(ne=>ne.nodeType===3?ne.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,ne;return(ne=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ne:""}setPromptValue(y,b,E){var ne;(ne=this._mathfield)==null||ne.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 ne=(E=(b=Td.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;ne!==null&&this._mathfield.setValue(ne),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?_d(this._mathfield.options,y):Is.has(this)?le({},_d(le(le({},Zf()),Wf(Is.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?_d(this._mathfield.options,y):Is.has(this)?_d(le(le({},Zf()),Wf(Is.get(this).options)),y):null}reflectAttributes(){const y=Zf(),b=this._getOptions();Object.keys(Td.optionsAttributes).forEach(E=>{const ne=Zu(E);Td.optionsAttributes[E]==="on/off"?y[ne]!==b[ne]?this.setAttribute(E,b[ne]?"on":"off"):this.removeAttribute(E):y[ne]!==b[ne]&&(Td.optionsAttributes[E]==="boolean"?b[ne]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ne]=="string"||typeof b[ne]=="number")&&this.setAttribute(E,b[ne].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(Is.has(this)){const b=le(le({},Is.get(this).options),y);Is.set(this,re(le({},Is.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Is.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))sd[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${sd[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 ne,ue;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Is.has(this)){let xe,je,Ue;if(qu(y)?([xe,je]=y.ranges[0],Ue=b):Bu(y)?([xe,je]=y,Ue=b):Dc(y)&&Dc(b)?(xe=y,je=b,Ue=E):(xe=0,je=-1,Ue=y),(Ue===void 0||Ue==="latex")&&xe===0&&je===-1)return(ue=(ne=Is.get(this).value)!=null?ne:this.textContent)!=null?ue:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(Is.has(this)){const ne=Is.get(this).options;Is.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ne,menuItems:void 0});return}const E=kf(this);Is.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,ne;return(ne=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?ne:!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,ne;return(ne=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?ne:!1}offsetFromPoint(y,b,E){return this._mathfield?xf(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=vu(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,ne,ue;wu.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"&&((ne=this._mathfield)==null||ne.focus()),y.type==="blur"&&((ue=this._mathfield)==null||ue.blur()))}connectedCallback(){var y,b,E,ne;const ue=window.getComputedStyle(this),xe=this.shadowRoot,je=ue.userSelect!=="none";if(je)xe.host.addEventListener("pointerdown",this,!0);else{const st=xe.querySelector("span");st.style.pointerEvents="none"}xe.host.addEventListener("focus",this,!0),xe.host.addEventListener("blur",this,!0),ef()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),je&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const Ue=xe.querySelector("slot:not([name])");if(Ue)try{this._style=Ue.assignedElements().filter(st=>st.tagName.toLowerCase()==="style").map(st=>st.textContent).join("")}catch(st){console.error(st)}if(this._style){const st=document.createElement("style");st.textContent=this._style,xe.appendChild(st)}let Je="";if(this.hasAttribute("value")?Je=this.getAttribute("value"):Je=(y=Ue==null?void 0:Ue.assignedNodes().map(st=>st.nodeType===3?st.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(xe.querySelector(":host > span"),re(le({},(E=(b=Is.get(this))==null?void 0:b.options)!=null?E:kf(this)),{eventSink:this,value:Je})),!Is.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const st of Object.keys(Td.optionsAttributes))this.upgradeProperty(Zu(st))}if(!((ne=this._mathfield)!=null&&ne.model)){this._mathfield=null;return}if(Is.has(this)){const st=this._mathfield,Mt=Is.get(this),Gt=Mt.menuItems;st.model.deferNotifications({content:!1,selection:!1},()=>{const un=Mt.value;un!==void 0&&st.setValue(un),st.model.selection=Mt.selection,Is.delete(this)}),Gt&&(this.menuItems=Gt)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),zf()}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=_d(this._mathfield.options,Object.keys(Td.optionsAttributes).map(ne=>Zu(ne)));Is.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 ne=E!==null;switch(y){case"contenteditable":zl(this._mathfield);break;case"disabled":this.disabled=ne;break;case"read-only":case"readonly":this.readOnly=ne;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),ef()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(ef()?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"),ef()?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,ne){return typeof E!="string"?!1:(y._setOptions({registers:re(le({},y._getOption("registers")),{[E]:ne})}),!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(ne=>ne.menuItem))!=null?y:[]:(E=(b=Is.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}Is.has(this)?Is.set(this,re(le({},Is.get(this)),{menuItems:y})):Is.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:kf(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 ne;(ne=this._mathfield)==null||ne.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:Is.has(this)?Is.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,zl(this._mathfield);return}if(Is.has(this)){Is.set(this,re(le({},Is.get(this)),{selection:y}));return}Is.set(this,{value:void 0,selection:y,options:kf(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:Is.has(this)?Is.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,zl(this._mathfield)),Is.has(this)){Is.set(this,re(le({},Is.get(this)),{selection:{ranges:[[y,y]]}}));return}Is.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:kf(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}};Sc.version="0.98.5",Sc._fontsDirectory="./fonts",Sc._soundsDirectory="./sounds",Sc.keypressVibration=!0,Sc._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},Sc._plonkSound="plonk.wav",Sc.audioBuffers={},Sc.createHTML=a=>a,Sc._speechEngineRate="100%",Sc._speechEngineVoice="Joanna",Sc._textToSpeechMarkup="",Sc._textToSpeechRules="mathlive",Sc._textToSpeechRulesOptions={},Sc.speakHook=r1,Sc.readAloudHook=h1,Sc._decimalSeparator=".",Sc.fractionNavigationOrder="numerator-denominator",Sc._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 Lf=Sc;function Zu(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function kf(a){const y={readOnly:!1},b=Lf.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ne=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ne!=null?ne:"":b[E]==="boolean"?y[Zu(E)]=!0:b[E]==="on/off"?ne==="on"?y[Zu(E)]=!0:ne==="off"?y[Zu(E)]=!1:y[Zu(E)]=void 0:b[E]==="number"?y[Zu(E)]=Number.parseFloat(ne!=null?ne:"0"):y[Zu(E)]=ne}}),y}function ef(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var g0=Lf,y0,b0,S0,x0;if(ye()&&!((y0=window.customElements)!=null&&y0.get("math-field"))){(S0=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=Lf,(x0=window.customElements)==null||x0.define("math-field",Lf)}function m1(a,y,b){let E=b,ne=0;const ue=a.length;for(;E<y.length;){const xe=y[E];if(ne<=0&&y.slice(E,E+ue)===a)return E;xe==="\\"?E++:xe==="{"?ne++:xe==="}"&&ne--,E++}return-1}function ch(a,y,b,E,ne="latex"){const ue=[];for(const xe of a)if(xe.type==="text"){const je=xe.data;let Ue=!0,Je=0,st;st=je.indexOf(y),st!==-1&&(Je=st,Je>0&&ue.push({type:"text",data:je.slice(0,Je)}),Ue=!1);let Mt=!1;for(;!Mt;){if(Ue){if(st=je.indexOf(y,Je),st===-1){Mt=!0;break}Je!==st&&ue.push({type:"text",data:je.slice(Je,st)}),Je=st}else{if(st=m1(b,je,Je+y.length),st===-1){Mt=!0;break}let Gt=je.slice(Je+y.length,st);ne==="ascii-math"&&([,Gt]=xu(Gt,{format:"ascii-math"})),ue.push({type:"math",data:Gt,rawData:je.slice(Je,st+b.length),mathstyle:E}),Je=st+b.length}Ue=!Ue}Je<je.length&&ue.push({type:"text",data:je.slice(Je)})}else ue.push(xe);return ue}function _0(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ne,ue])=>{E=ch(E,ne,ue,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ne,ue])=>{E=ch(E,ne,ue,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ne,ue])=>{E=ch(E,ne,ue,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ne,ue])=>{E=ch(E,ne,ue,"displaystyle","ascii-math")}),E}function v1(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 g1(a,y,b,E){try{const ne=y.renderToMarkup(a,{mathstyle:b,format:"html"}),ue=document.createElement("span");return ue.dataset.latex=a,ue.style.display=b==="displaystyle"?"flex":"inline-flex",ue.setAttribute("aria-hidden","true"),ue.setAttribute("translate","no"),ue.innerHTML=window.MathfieldElement.createHTML(ne),ue}catch(ne){if(console.error("Could not parse'"+a+"' with ",ne),E)return document.createTextNode(a)}return null}function tf(a,y,b,E){var ne;const ue=g1(a,b,y||"textstyle",E),xe=(ne=b.renderAccessibleContent)!=null?ne:"";if(ue&&/\b(mathml|speakable-text)\b/i.test(xe)){const je=document.createElement("span");if(/\bmathml\b/i.test(xe)&&b.renderToMathML&&je.append(v1(a,b)),/\bspeakable-text\b/i.test(xe)&&b.renderToSpeakableText){const Ue=document.createElement("span");Ue.setAttribute("translate","no");const Je=b.renderToSpeakableText(a);Ue.innerHTML=window.MathfieldElement.createHTML(Je),Ue.className="ML__sr-only",je.append(Ue)}return je.append(ue),je}return ue}function y1(a,y){var b,E,ne;let ue=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){ue=document.createDocumentFragment();const xe=tf(a,"",y,!0);xe&&ue.appendChild(xe)}else{if(!a.trim())return null;const xe=_0(a,(E=y.TeX)==null?void 0:E.delimiters,(ne=y.asciiMath)==null?void 0:ne.delimiters);if(xe.length===1&&xe[0].type==="text")return null;ue=document.createDocumentFragment();for(const je of xe)if(je.type==="text")ue.appendChild(document.createTextNode(je.data));else{const Ue=tf(je.data,je.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);Ue&&ue.appendChild(Ue)}}return ue}function C0(a,y){var b,E,ne,ue,xe,je,Ue,Je,st,Mt,Gt,un,Cn,Sr,xi,gr;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const Yr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(Yr)){a.textContent="";const ri=tf(Yr,"",y,!0);ri&&a.append(ri);return}const Ti=_0(Yr,(ne=y.TeX)==null?void 0:ne.delimiters,(ue=y.asciiMath)==null?void 0:ue.delimiters);if(Ti.length===1&&Ti[0].type==="math"){a.textContent="";const ri=tf(Ti[0].data,Ti[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);ri&&a.append(ri);return}if(Ti.length===1&&Ti[0].type==="text")return}for(let Yr=a.childNodes.length-1;Yr>=0;Yr--){const Ti=a.childNodes[Yr];if(Ti.nodeType===3){const ri=y1((xe=Ti.textContent)!=null?xe:"",y);ri&&(Yr+=ri.childNodes.length-1,Ti.replaceWith(ri))}else if(Ti.nodeType===1){const ri=Ti,wo=Ti.nodeName.toLowerCase();if(wo==="script"){const ta=Ti;let jo;if((je=y.processScriptTypePattern)!=null&&je.test(ta.type))jo=(Ue=ta.textContent)!=null?Ue:"";else if((Je=y.processMathJSONScriptTypePattern)!=null&&Je.test(ta.type))try{jo=(Mt=y.serializeToLatex)==null?void 0:Mt.call(y,JSON.parse((st=ta.textContent)!=null?st:""))}catch(ws){console.error(ws)}if(jo){let ws="textstyle";for(const Hi of ta.type.split(";")){const[iu,Tu]=Hi.toLowerCase().split("=");iu.trim()==="mode"&&(ws=Tu.trim()==="display"?"displaystyle":"textstyle")}const Xs=tf(jo,ws,y,!0);Xs&&ta.parentNode.replaceChild(Xs,ta)}}else if(((un=(Gt=y.processClassPattern)==null?void 0:Gt.test(ri.className))!=null?un:!1)||!((Sr=(Cn=y.skipTags)==null?void 0:Cn.includes(wo))!=null&&Sr||(gr=(xi=y.ignoreClassPattern)==null?void 0:xi.test(ri.className))!=null&&gr))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const jo=a.textContent;a.textContent="";const ws=tf(jo!=null?jo:"","displaystyle",y,!0);ws&&a.append(ws)}else C0(ri,y)}}}var b1={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function S1(a,y){var b,E,ne,ue;try{const xe=le(le({},b1),y);xe.ignoreClassPattern=new RegExp((b=xe.ignoreClass)!=null?b:""),xe.processClassPattern=new RegExp((E=xe.processClass)!=null?E:""),xe.processScriptTypePattern=new RegExp((ne=xe.processScriptType)!=null?ne:""),xe.processMathJSONScriptTypePattern=new RegExp((ue=xe.processMathJSONScriptType)!=null?ue:""),zf(),Xc("core"),C0(a,xe)}catch(xe){xe instanceof Error?console.error("renderMathInElement(): "+xe.message):console.error("renderMathInElement(): Could not render math for element",a)}}function x1(a,y){const b=od.singleton;return b?(b.show(),vf(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function _1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}qc({switchKeyboardLayer:x1,toggleVirtualKeyboard:_1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function ld(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function D1(a){w1(document.body,a)}function C1(a){if(typeof a=="string"){const y=document.getElementById(a);if(y===null)throw new Error(`The element with ID "${a}" could not be found.`);return y}return typeof a=="string"?null:a}function w1(a,y){var b,E,ne,ue;const xe=C1(a);if(!xe)return;const je=y!=null?y:{};(b=je.renderToMarkup)!=null||(je.renderToMarkup=mc),(E=je.renderToMathML)!=null||(je.renderToMathML=Pg),(ne=je.renderToSpeakableText)!=null||(je.renderToSpeakableText=Bg),(ue=je.serializeToLatex)!=null||(je.serializeToLatex=Fg),S1(xe,je)}var I1={mathlive:"0.98.5"}},17423:function(dn,St,ee){"use strict";ee.d(St,{Z:function(){return le}});const te=re=>typeof re=="object"&&re!=null&&re.nodeType===1,Se=(re,de)=>(!de||re!=="hidden")&&re!=="visible"&&re!=="clip",Le=(re,de)=>{if(re.clientHeight<re.scrollHeight||re.clientWidth<re.scrollWidth){const he=getComputedStyle(re,null);return Se(he.overflowY,de)||Se(he.overflowX,de)||(me=>{const se=(ye=>{if(!ye.ownerDocument||!ye.ownerDocument.defaultView)return null;try{return ye.ownerDocument.defaultView.frameElement}catch(_e){return null}})(me);return!!se&&(se.clientHeight<me.scrollHeight||se.clientWidth<me.scrollWidth)})(re)}return!1},Ce=(re,de,he,me,se,ye,_e,Me)=>ye<re&&_e>de||ye>re&&_e<de?0:ye<=re&&Me<=he||_e>=de&&Me>=he?ye-re-me:_e>de&&Me<he||ye<re&&Me>he?_e-de+se:0,ce=re=>{const de=re.parentElement;return de==null?re.getRootNode().host||null:de},fe=(re,de)=>{var he,me,se,ye;if(typeof document=="undefined")return[];const{scrollMode:_e,block:Me,inline:ve,boundary:Fe,skipOverflowHiddenElements:$e}=de,Te=typeof Fe=="function"?Fe:ln=>ln!==Fe;if(!te(re))throw new TypeError("Invalid target");const ze=document.scrollingElement||document.documentElement,Ee=[];let be=re;for(;te(be)&&Te(be);){if(be=ce(be),be===ze){Ee.push(be);break}be!=null&&be===document.body&&Le(be)&&!Le(document.documentElement)||be!=null&&Le(be,$e)&&Ee.push(be)}const Re=(me=(he=window.visualViewport)==null?void 0:he.width)!=null?me:innerWidth,De=(ye=(se=window.visualViewport)==null?void 0:se.height)!=null?ye:innerHeight,{scrollX:et,scrollY:Ye}=window,{height:dt,width:Ke,top:zt,right:pt,bottom:Kt,left:Ze}=re.getBoundingClientRect(),{top:tt,right:ft,bottom:Ut,left:nt}=(ln=>{const Tt=window.getComputedStyle(ln);return{top:parseFloat(Tt.scrollMarginTop)||0,right:parseFloat(Tt.scrollMarginRight)||0,bottom:parseFloat(Tt.scrollMarginBottom)||0,left:parseFloat(Tt.scrollMarginLeft)||0}})(re);let Ge=Me==="start"||Me==="nearest"?zt-tt:Me==="end"?Kt+Ut:zt+dt/2-tt+Ut,jt=ve==="center"?Ze+Ke/2-nt+ft:ve==="end"?pt+ft:Ze-nt;const yn=[];for(let ln=0;ln<Ee.length;ln++){const Tt=Ee[ln],{height:Lt,width:Jt,top:kn,right:In,bottom:Qt,left:Mn}=Tt.getBoundingClientRect();if(_e==="if-needed"&&zt>=0&&Ze>=0&&Kt<=De&&pt<=Re&&zt>=kn&&Kt<=Qt&&Ze>=Mn&&pt<=In)return yn;const Wn=getComputedStyle(Tt),zn=parseInt(Wn.borderLeftWidth,10),at=parseInt(Wn.borderTopWidth,10),Oe=parseInt(Wn.borderRightWidth,10),ke=parseInt(Wn.borderBottomWidth,10);let Be=0,Ne=0;const we="offsetWidth"in Tt?Tt.offsetWidth-Tt.clientWidth-zn-Oe:0,rt="offsetHeight"in Tt?Tt.offsetHeight-Tt.clientHeight-at-ke:0,It="offsetWidth"in Tt?Tt.offsetWidth===0?0:Jt/Tt.offsetWidth:0,Ct="offsetHeight"in Tt?Tt.offsetHeight===0?0:Lt/Tt.offsetHeight:0;if(ze===Tt)Be=Me==="start"?Ge:Me==="end"?Ge-De:Me==="nearest"?Ce(Ye,Ye+De,De,at,ke,Ye+Ge,Ye+Ge+dt,dt):Ge-De/2,Ne=ve==="start"?jt:ve==="center"?jt-Re/2:ve==="end"?jt-Re:Ce(et,et+Re,Re,zn,Oe,et+jt,et+jt+Ke,Ke),Be=Math.max(0,Be+Ye),Ne=Math.max(0,Ne+et);else{Be=Me==="start"?Ge-kn-at:Me==="end"?Ge-Qt+ke+rt:Me==="nearest"?Ce(kn,Qt,Lt,at,ke+rt,Ge,Ge+dt,dt):Ge-(kn+Lt/2)+rt/2,Ne=ve==="start"?jt-Mn-zn:ve==="center"?jt-(Mn+Jt/2)+we/2:ve==="end"?jt-In+Oe+we:Ce(Mn,In,Jt,zn,Oe+we,jt,jt+Ke,Ke);const{scrollLeft:$t,scrollTop:Vt}=Tt;Be=Ct===0?0:Math.max(0,Math.min(Vt+Be/Ct,Tt.scrollHeight-Lt/Ct+rt)),Ne=It===0?0:Math.max(0,Math.min($t+Ne/It,Tt.scrollWidth-Jt/It+we)),Ge+=Vt-Be,jt+=$t-Ne}yn.push({el:Tt,top:Be,left:Ne})}return yn},ae=re=>re===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(re)?re:{block:"start",inline:"nearest"};function le(re,de){if(!re.isConnected||!(se=>{let ye=se;for(;ye&&ye.parentNode;){if(ye.parentNode===document)return!0;ye=ye.parentNode instanceof ShadowRoot?ye.parentNode.host:ye.parentNode}return!1})(re))return;const he=(se=>{const ye=window.getComputedStyle(se);return{top:parseFloat(ye.scrollMarginTop)||0,right:parseFloat(ye.scrollMarginRight)||0,bottom:parseFloat(ye.scrollMarginBottom)||0,left:parseFloat(ye.scrollMarginLeft)||0}})(re);if((se=>typeof se=="object"&&typeof se.behavior=="function")(de))return de.behavior(fe(re,de));const me=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:se,top:ye,left:_e}of fe(re,ae(de))){const Me=ye-he.top+he.bottom,ve=_e-he.left+he.right;se.scroll({top:Me,left:ve,behavior:me})}}}}]);
|
|
|
}()); |